From fce1d62e0cb7c6cfb92322fcec5b323d877e95df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 28 Aug 2019 17:57:44 +0200 Subject: [PATCH 0001/1234] Initial prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .gitignore | 77 +++ CONTRIBUTING.md | 61 ++ LICENSE | 201 +++++++ Makefile | 88 +++ README.md | 63 ++ build/Dockerfile | 15 + build/bin/entrypoint | 12 + build/bin/user_setup | 13 + cmd/manager/main.go | 181 ++++++ ...etry_v1alpha1_opentelemetryservice_cr.yaml | 6 + ...try_v1alpha1_opentelemetryservice_crd.yaml | 57 ++ ...operator.v0.0.1.clusterserviceversion.yaml | 127 ++++ ...try_v1alpha1_opentelemetryservice_crd.yaml | 38 ++ .../opentelemetry-operator.package.yaml | 5 + deploy/operator.yaml | 32 + deploy/role.yaml | 61 ++ deploy/role_binding.yaml | 11 + deploy/service_account.yaml | 4 + examples/simplest.yaml | 20 + go.mod | 35 ++ go.sum | 546 ++++++++++++++++++ .../addtoscheme_opentelemetry_v1alpha1.go | 10 + pkg/apis/apis.go | 13 + pkg/apis/opentelemetry/const.go | 13 + pkg/apis/opentelemetry/group.go | 6 + pkg/apis/opentelemetry/v1alpha1/doc.go | 4 + .../v1alpha1/opentelemetryservice_types.go | 52 ++ pkg/apis/opentelemetry/v1alpha1/register.go | 19 + .../v1alpha1/zz_generated.deepcopy.go | 107 ++++ .../v1alpha1/zz_generated.openapi.go | 106 ++++ pkg/controller/add_opentelemetryservice.go | 10 + pkg/controller/controller.go | 18 + pkg/controller/opentelemetryservice/labels.go | 25 + .../opentelemetryservice_controller.go | 58 ++ .../opentelemetryservice/reconcile.go | 79 +++ .../reconcile_configmap.go | 59 ++ .../reconcile_deployment.go | 95 +++ .../opentelemetryservice/reconcile_service.go | 68 +++ tools.go | 7 + version/version.go | 9 + 40 files changed, 2411 insertions(+) create mode 100644 .gitignore create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 build/Dockerfile create mode 100755 build/bin/entrypoint create mode 100755 build/bin/user_setup create mode 100644 cmd/manager/main.go create mode 100644 deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml create mode 100644 deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml create mode 100644 deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml create mode 100644 deploy/operator.yaml create mode 100644 deploy/role.yaml create mode 100644 deploy/role_binding.yaml create mode 100644 deploy/service_account.yaml create mode 100644 examples/simplest.yaml create mode 100644 go.mod create mode 100644 go.sum create mode 100644 pkg/apis/addtoscheme_opentelemetry_v1alpha1.go create mode 100644 pkg/apis/apis.go create mode 100644 pkg/apis/opentelemetry/const.go create mode 100644 pkg/apis/opentelemetry/group.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/doc.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/register.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go create mode 100644 pkg/controller/add_opentelemetryservice.go create mode 100644 pkg/controller/controller.go create mode 100644 pkg/controller/opentelemetryservice/labels.go create mode 100644 pkg/controller/opentelemetryservice/opentelemetryservice_controller.go create mode 100644 pkg/controller/opentelemetryservice/reconcile.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_configmap.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_deployment.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_service.go create mode 100644 tools.go create mode 100644 version/version.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..7c504700d --- /dev/null +++ b/.gitignore @@ -0,0 +1,77 @@ +# Temporary Build Files +build/_output +build/_test +# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* +# Org-mode +.org-id-locations +*_archive +# flymake-mode +*_flymake.* +# eshell files +/eshell/history +/eshell/lastdir +# elpa packages +/elpa/ +# reftex files +*.rel +# AUCTeX auto folder +/auto/ +# cask packages +.cask/ +dist/ +# Flycheck +flycheck_*.el +# server auth directory +/server/ +# projectiles files +.projectile +projectile-bookmarks.eld +# directory configuration +.dir-locals.el +# saveplace +places +# url cache +url/cache/ +# cedet +ede-projects.el +# smex +smex-items +# company-statistics +company-statistics-cache.el +# anaconda-mode +anaconda-mode/ +### Go ### +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +# Test binary, build with 'go test -c' +*.test +# Output of the go coverage tool, specifically when used with LiteIDE +*.out +### Vim ### +# swap +.sw[a-p] +.*.sw[a-p] +# session +Session.vim +# temporary +.netrwhist +# auto-generated tag files +tags +### VisualStudioCode ### +.vscode/* +.history +# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..1e8ff48c7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# How to Contribute to the OpenTelemetry Operator for Kubernetes + +We'd love your help! + +This project is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. + +We gratefully welcome improvements to documentation as well as to code. + +## Certificate of Origin + +By contributing to this project you agree to the [Developer Certificate of Origin](https://developercertificate.org/) (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the [DCO](DCO) file for details. + +## Getting Started + +This project is a regular [Kubernetes Operator](https://coreos.com/operators/) built using the Operator SDK. Refer to the Operator SDK documentation to understand the basic architecture of this operator. + +### Installing the Operator SDK command line tool + +Follow the installation guidelines from [Operator SDK GitHub page](https://github.com/operator-framework/operator-sdk). + +### Developing + +As usual for operators following the Operator SDK in recent versions, the dependencies are managed using [`go modules`](https://golang.org/doc/go1.11#modules). Refer to that project's documentation for instructions on how to add or update dependencies. + +The first step is to get a local Kubernetes instance up and running. The recommended approach is using `minikube`. Refer to the Kubernetes' [documentation](https://kubernetes.io/docs/tasks/tools/install-minikube/) for instructions on how to install it. + +Once `minikube` is installed, it can be started with: + +``` +minikube start +``` + +NOTE: Make sure to read the documentation to learn the performance switches that can be applied to your platform. + +Once minikube has finished starting, get the Operator running: + +``` +make run +``` + +At this point, a Jaeger instance can be installed: + +``` +kubectl apply -f deploy/examples/simplest.yaml +kubectl get otelsvcs +kubectl get pods +``` + +To remove the instance: + +``` +kubectl delete -f deploy/examples/simplest.yaml +``` + +#### Model changes + +The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetryservice_types.go`) + +#### Tests + +Right now, there are no tests on this repo yet. This will change really soon. \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..91e0e0caf --- /dev/null +++ b/Makefile @@ -0,0 +1,88 @@ +OPERATOR_NAME ?= opentelemetry-operator +OPERATOR_VERSION ?= "$(shell git describe --tags)" +VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') + +GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on +KUBERNETES_CONFIG ?= "$(HOME)/.kube/config" +WATCH_NAMESPACE ?= "" +BIN_DIR ?= "build/_output/bin" + +NAMESPACE ?= "$(USER)" +BUILD_IMAGE ?= "$(NAMESPACE)/$(OPERATOR_NAME):latest" +OUTPUT_BINARY ?= "$(BIN_DIR)/$(OPERATOR_NAME)" +VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/version" +LD_FLAGS ?= "-X=$(VERSION_PKG).Version=$(OPERATOR_VERSION)" + +PACKAGES := $(shell go list ./cmd/... ./pkg/...) + +.DEFAULT_GOAL := build + +.PHONY: check +check: + @echo Checking... + @go fmt $(PACKAGES) > $(FMT_LOG) + +.PHONY: ensure-generate-is-noop +ensure-generate-is-noop: generate + @git diff -s --exit-code pkg/apis/opentelemetry/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1) + +.PHONY: format +format: + @echo Formatting code... + @go fmt $(PACKAGES) + +.PHONY: lint +lint: + @echo Linting... + @$(GOPATH)/bin/golint -set_exit_status=1 $(PACKAGES) + +.PHONY: security +security: + @echo Security... + @$(GOPATH)/bin/gosec -quiet $(PACKAGES) 2>/dev/null + +.PHONY: build +build: format + @echo Building... + @operator-sdk build ${BUILD_IMAGE} --go-build-args "-ldflags ${LD_FLAGS}" + +.PHONY: run +run: crd + @operator-sdk up local OPERATOR_NAME=$(OPERATOR_NAME) --go-ldflags "-X $(VERSION_PKG).Version=$(OPERATOR_VERSION) -X $(VERSION_PKG).BuildDate=$(VERSION_DATE)" + +.PHONY: run-debug +run-debug: crd + @operator-sdk up local --operator-flags "--log-level=debug" OPERATOR_NAME=$(OPERATOR_NAME) + +.PHONY: clean +clean: + @echo Cleaning... + +.PHONY: crd +crd: + @kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml 2>&1 | grep -v "already exists" || true + +.PHONY: generate +generate: + @operator-sdk generate k8s + @operator-sdk generate openapi + +.PHONY: test +test: + @echo Running tests... + +.PHONY: all +all: check format lint security build test + +.PHONY: ci +ci: ensure-generate-is-noop all + +.PHONY: scorecard +scorecard: + @operator-sdk scorecard --cr-manifest deploy/examples/simplest.yaml --csv-path deploy/olm-catalog/jaeger.clusterserviceversion.yaml --init-timeout 30 + +.PHONY: install-tools +install-tools: + @go get -u \ + golang.org/x/lint/golint \ + github.com/securego/gosec/cmd/gosec diff --git a/README.md b/README.md new file mode 100644 index 000000000..4b8fe9dbf --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +[![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] + +# OpenTelemetry Operator for Kubernetes + +The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/). + +At this point, it has [OpenTelemetry Service](https://github.com/open-telemetry/opentelemetry-service) as the only managed component. + +## Getting started + +To install the operator, run: +``` +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/operator.yaml +``` + +Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Service (otelsvc) instance, like: + +``` +kubectl apply -f - </dev/null; then + if [ -w /etc/passwd ]; then + echo "${USER_NAME:-opentelemetry-operator}:x:$(id -u):$(id -g):${USER_NAME:-opentelemetry-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd + fi +fi + +exec ${OPERATOR} $@ diff --git a/build/bin/user_setup b/build/bin/user_setup new file mode 100755 index 000000000..1e36064cb --- /dev/null +++ b/build/bin/user_setup @@ -0,0 +1,13 @@ +#!/bin/sh +set -x + +# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be) +mkdir -p ${HOME} +chown ${USER_UID}:0 ${HOME} +chmod ug+rwx ${HOME} + +# runtime user will need to be able to self-insert in /etc/passwd +chmod g+rw /etc/passwd + +# no need for this script to remain in the image after running +rm $0 diff --git a/cmd/manager/main.go b/cmd/manager/main.go new file mode 100644 index 000000000..6d215fb43 --- /dev/null +++ b/cmd/manager/main.go @@ -0,0 +1,181 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + "runtime" + + // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) + _ "k8s.io/client-go/plugin/pkg/client/auth" + "k8s.io/client-go/rest" + + "github.com/operator-framework/operator-sdk/pkg/k8sutil" + kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics" + "github.com/operator-framework/operator-sdk/pkg/leader" + "github.com/operator-framework/operator-sdk/pkg/log/zap" + "github.com/operator-framework/operator-sdk/pkg/metrics" + "github.com/operator-framework/operator-sdk/pkg/restmapper" + sdkVersion "github.com/operator-framework/operator-sdk/version" + "github.com/spf13/pflag" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/controller-runtime/pkg/client/config" + "sigs.k8s.io/controller-runtime/pkg/manager" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + "sigs.k8s.io/controller-runtime/pkg/runtime/signals" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis" + "github.com/open-telemetry/opentelemetry-operator/pkg/controller" + "github.com/open-telemetry/opentelemetry-operator/version" +) + +// Change below variables to serve metrics on different host or port. +var ( + metricsHost = "0.0.0.0" + metricsPort int32 = 8383 + operatorMetricsPort int32 = 8686 +) +var log = logf.Log.WithName("cmd") + +func printVersion() { + log.Info("Starting the OpenTelemetry Operator", + "opentelemetry-operator", version.Version, + "build-date", version.BuildDate, + "go-version", runtime.Version(), + "go-arch", runtime.GOARCH, + "go-os", runtime.GOOS, + "operator-sdk-version", sdkVersion.Version, + ) +} + +func main() { + // Add the zap logger flag set to the CLI. The flag set must + // be added before calling pflag.Parse(). + pflag.CommandLine.AddFlagSet(zap.FlagSet()) + + // Add flags registered by imported packages (e.g. glog and + // controller-runtime) + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + + pflag.Parse() + + // Use a zap logr.Logger implementation. If none of the zap + // flags are configured (or if the zap flag set is not being + // used), this defaults to a production zap logger. + // + // The logger instantiated here can be changed to any logger + // implementing the logr.Logger interface. This logger will + // be propagated through the whole operator, generating + // uniform and structured logs. + logf.SetLogger(zap.Logger()) + + printVersion() + + namespace, err := k8sutil.GetWatchNamespace() + if err != nil { + log.Error(err, "Failed to get watch namespace") + os.Exit(1) + } + + // Get a config to talk to the apiserver + cfg, err := config.GetConfig() + if err != nil { + log.Error(err, "") + os.Exit(1) + } + + ctx := context.TODO() + // Become the leader before proceeding + err = leader.Become(ctx, "opentelemetry-operator-lock") + if err != nil { + log.Error(err, "") + os.Exit(1) + } + + // Create a new Cmd to provide shared dependencies and start components + mgr, err := manager.New(cfg, manager.Options{ + Namespace: namespace, + MapperProvider: restmapper.NewDynamicRESTMapper, + MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), + }) + if err != nil { + log.Error(err, "") + os.Exit(1) + } + + log.Info("Registering Components.") + + // Setup Scheme for all resources + if err := apis.AddToScheme(mgr.GetScheme()); err != nil { + log.Error(err, "") + os.Exit(1) + } + + // Setup all Controllers + if err := controller.AddToManager(mgr); err != nil { + log.Error(err, "") + os.Exit(1) + } + + if err = serveCRMetrics(cfg); err != nil { + log.Info("Could not generate and serve custom resource metrics", "error", err.Error()) + } + + // Add to the below struct any other metrics ports you want to expose. + servicePorts := []v1.ServicePort{ + {Port: metricsPort, Name: metrics.OperatorPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: metricsPort}}, + {Port: operatorMetricsPort, Name: metrics.CRPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: operatorMetricsPort}}, + } + // Create Service object to expose the metrics port(s). + service, err := metrics.CreateMetricsService(ctx, cfg, servicePorts) + if err != nil { + log.Info("Could not create metrics Service", "error", err.Error()) + } + + // CreateServiceMonitors will automatically create the prometheus-operator ServiceMonitor resources + // necessary to configure Prometheus to scrape metrics from this operator. + services := []*v1.Service{service} + _, err = metrics.CreateServiceMonitors(cfg, namespace, services) + if err != nil { + log.Info("Could not create ServiceMonitor object", "error", err.Error()) + // If this operator is deployed to a cluster without the prometheus-operator running, it will return + // ErrServiceMonitorNotPresent, which can be used to safely skip ServiceMonitor creation. + if err == metrics.ErrServiceMonitorNotPresent { + log.Info("Install prometheus-operator in your cluster to create ServiceMonitor objects", "error", err.Error()) + } + } + + log.Info("Starting the Cmd.") + + // Start the Cmd + if err := mgr.Start(signals.SetupSignalHandler()); err != nil { + log.Error(err, "Manager exited non-zero") + os.Exit(1) + } +} + +// serveCRMetrics gets the Operator/CustomResource GVKs and generates metrics based on those types. +// It serves those metrics on "http://metricsHost:operatorMetricsPort". +func serveCRMetrics(cfg *rest.Config) error { + // Below function returns filtered operator/CustomResource specific GVKs. + // For more control override the below GVK list with your own custom logic. + filteredGVK, err := k8sutil.GetGVKsFromAddToScheme(apis.AddToScheme) + if err != nil { + return err + } + // Get the namespace the operator is currently deployed in. + operatorNs, err := k8sutil.GetOperatorNamespace() + if err != nil { + return err + } + // To generate metrics in other namespaces, add the values below. + ns := []string{operatorNs} + // Generate and serve custom resource specific metrics. + err = kubemetrics.GenerateAndServeCRMetrics(cfg, ns, filteredGVK, metricsHost, operatorMetricsPort) + if err != nil { + return err + } + return nil +} diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml new file mode 100644 index 000000000..ecc0cb9f0 --- /dev/null +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml @@ -0,0 +1,6 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryService +metadata: + name: example-opentelemetryservice +spec: + replicas: 3 diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml new file mode 100644 index 000000000..9ede510b1 --- /dev/null +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml @@ -0,0 +1,57 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: opentelemetryservices.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryService + listKind: OpenTelemetryServiceList + plural: opentelemetryservices + shortNames: + - otelsvc + - otelsvcs + singular: opentelemetryservice + scope: Namespaced + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + config: + description: +required + type: string + replicas: + format: int32 + type: integer + type: object + status: + properties: + replicas: + format: int32 + type: integer + required: + - replicas + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml new file mode 100644 index 000000000..1348e662c --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml @@ -0,0 +1,127 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion":"opentelemetry.io/v1alpha1","kind":"OpenTelemetryService","metadata":{"name":"example-opentelemetryservice"},"spec":{"size":3}}]' + capabilities: Basic Install + name: opentelemetry-operator.v0.0.1 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: {} + description: Placeholder description + displayName: Opentelemetry Operator + install: + spec: + deployments: + - name: opentelemetry-operator + spec: + replicas: 1 + selector: + matchLabels: + name: opentelemetry-operator + strategy: {} + template: + metadata: + labels: + name: opentelemetry-operator + spec: + containers: + - command: + - opentelemetry-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: opentelemetry-operator + image: REPLACE_IMAGE + imagePullPolicy: Always + name: opentelemetry-operator + resources: {} + serviceAccountName: opentelemetry-operator + permissions: + - rules: + - apiGroups: + - "" + resources: + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - '*' + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - '*' + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - opentelemetry-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - opentelemetry.io + resources: + - '*' + verbs: + - '*' + serviceAccountName: opentelemetry-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - tracing + - distributed tracing + - monitoring + - troubleshooting + maintainers: + - email: juraci.github@kroehling.de + name: Juraci Paixão Kröhling + maturity: alpha + provider: + name: OpenTelemetry + version: 0.0.1 diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml new file mode 100644 index 000000000..2a3ebd6c7 --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml @@ -0,0 +1,38 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: opentelemetryservices.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryService + listKind: OpenTelemetryServiceList + plural: opentelemetryservices + singular: opentelemetryservice + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + type: object + status: + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml new file mode 100644 index 000000000..66206db68 --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml @@ -0,0 +1,5 @@ +channels: +- currentCSV: opentelemetry-operator.v0.0.1 + name: alpha +defaultChannel: alpha +packageName: opentelemetry-operator diff --git a/deploy/operator.yaml b/deploy/operator.yaml new file mode 100644 index 000000000..e51178805 --- /dev/null +++ b/deploy/operator.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-operator +spec: + replicas: 1 + selector: + matchLabels: + name: opentelemetry-operator + template: + metadata: + labels: + name: opentelemetry-operator + spec: + serviceAccountName: opentelemetry-operator + containers: + - name: opentelemetry-operator + image: quay.io/jpkroehling/opentelemetry-operator:latest + command: + - opentelemetry-operator + imagePullPolicy: Always + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: "opentelemetry-operator" diff --git a/deploy/role.yaml b/deploy/role.yaml new file mode 100644 index 000000000..11eab3d34 --- /dev/null +++ b/deploy/role.yaml @@ -0,0 +1,61 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + creationTimestamp: null + name: opentelemetry-operator +rules: +- apiGroups: + - "" + resources: + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - '*' +- apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - '*' +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create +- apiGroups: + - apps + resourceNames: + - opentelemetry-operator + resources: + - deployments/finalizers + verbs: + - update +- apiGroups: + - "" + resources: + - pods + verbs: + - get +- apiGroups: + - apps + resources: + - replicasets + verbs: + - get +- apiGroups: + - opentelemetry.io + resources: + - '*' + verbs: + - '*' diff --git a/deploy/role_binding.yaml b/deploy/role_binding.yaml new file mode 100644 index 000000000..481eff9af --- /dev/null +++ b/deploy/role_binding.yaml @@ -0,0 +1,11 @@ +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: opentelemetry-operator +subjects: +- kind: ServiceAccount + name: opentelemetry-operator +roleRef: + kind: Role + name: opentelemetry-operator + apiGroup: rbac.authorization.k8s.io diff --git a/deploy/service_account.yaml b/deploy/service_account.yaml new file mode 100644 index 000000000..f97a12acb --- /dev/null +++ b/deploy/service_account.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: opentelemetry-operator diff --git a/examples/simplest.yaml b/examples/simplest.yaml new file mode 100644 index 000000000..b67d4620c --- /dev/null +++ b/examples/simplest.yaml @@ -0,0 +1,20 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryService +metadata: + name: simplest +spec: + config: | + receivers: + jaeger: + + processors: + queued-retry: + + exporters: + logging: + + pipelines: + traces: + receivers: [jaeger] + processors: [queued-retry] + exporters: [logging] diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..451e4492a --- /dev/null +++ b/go.mod @@ -0,0 +1,35 @@ +module github.com/open-telemetry/opentelemetry-operator + +require ( + github.com/NYTimes/gziphandler v1.0.1 // indirect + github.com/go-openapi/spec v0.19.0 + github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 + github.com/spf13/pflag v1.0.3 + gopkg.in/yaml.v2 v2.2.2 + k8s.io/api v0.0.0-20190612125737-db0771252981 + k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad + k8s.io/client-go v11.0.0+incompatible + k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 + sigs.k8s.io/controller-runtime v0.1.12 + sigs.k8s.io/controller-tools v0.1.10 +) + +// Pinned to kubernetes-1.13.4 +replace ( + k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 + k8s.io/client-go => k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 +) + +replace ( + github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0 + // Pinned to v2.9.2 (kubernetes-1.13.1) so https://proxy.golang.org can + // resolve it correctly. + github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190424153033-d3245f150225 + k8s.io/kube-state-metrics => k8s.io/kube-state-metrics v1.6.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.12 + sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde +) + +replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0 diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..784d7e69d --- /dev/null +++ b/go.sum @@ -0,0 +1,546 @@ +bitbucket.org/ww/goautoneg v0.0.0-20120707110453-75cd24fc2f2c/go.mod h1:1vhO7Mn/FZMgOgDVGLy5X1mE6rq1HbkBdkF/yj8zkcg= +cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0= +cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= +contrib.go.opencensus.io/exporter/ocagent v0.4.11 h1:Zwy9skaqR2igcEfSVYDuAsbpa33N0RPtnYTHEe2whPI= +contrib.go.opencensus.io/exporter/ocagent v0.4.11/go.mod h1:7ihiYRbdcVfW4m4wlXi9WRPdv79C0fStcjNlyE6ek9s= +git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= +github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSepE2OqVu0Pn1CbDw9IuMlONapol0zuwk= +github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= +github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.0.0-20180612054059-a9fbbdc8dd87/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= +github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= +github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= +github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= +github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= +github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4= +github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8= +github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= +github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= +github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.0.0-20180330165814-781450b3c4fc/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= +github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855 h1:3dfUujjROkkXcwIpsh9z6bjOhPFooLpxejc7qgX13/g= +github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= +github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= +github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= +github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRCHSm4sHKPWz0tt4mwBsVodG7+Xyqg= +github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/markbates/inflect v1.0.4 h1:5fh1gzTFhfae06u3hzHYO9xe3l3v3nW5Pwt3naLTP5g= +github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= +github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= +github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= +github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= +github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd52LG3YQ0jtwiwEGdm98S1TH5P4RAA= +github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= +github.com/operator-framework/operator-sdk v0.10.0 h1:k2yovBNxaya06yIkJ1e6lNsqiWjhS32G+d2LUdjuu/E= +github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2zCdERf/828Mrftq4u7GS0I68= +github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4= +github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= +github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= +go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= +go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= +go.opencensus.io v0.20.0 h1:L/ARO58pdktB6dLmYI0zAyW1XnavEmGziFd0MKfxnck= +go.opencensus.io v0.20.0/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= +go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= +golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= +golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190213015956-f7e1b50d2251/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= +golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= +google.golang.org/api v0.3.0 h1:UIJY20OEo3+tK5MBlcdx37kmdH6EnRjGkW78mc6+EeA= +google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYqJLFeWiJ9l4OE= +k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 h1:JfFtjaElBIgYKCWEtYQkcNrTpW+lMO4GJy8NP6SVQmM= +k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= +k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg= +k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= +k8s.io/apiserver v0.0.0-20181213151703-3ccfe8365421/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= +k8s.io/cli-runtime v0.0.0-20181213153952-835b10687cb6/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= +k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 h1:aE8wOCKuoRs2aU0OP/Rz8SXiAB0FTTku3VtGhhrkSmc= +k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= +k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a h1:QoHVuRquf80YZ+/bovwxoMO3Q/A3nt3yTgS0/0nejuk= +k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68= +k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= +k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= +k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco= +k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= +k8s.io/kube-state-metrics v1.6.0 h1:6wkxiTPTZ4j+LoMWuT+rZ+OlUWswktzXs5yHmggmAZ0= +k8s.io/kube-state-metrics v1.6.0/go.mod h1:84+q9aGVQPzXYGgtvyhZr/fSI6BdLsbPWXn37RASc9k= +k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +sigs.k8s.io/controller-runtime v0.1.12 h1:ovDq28E64PeY1yR+6H7DthakIC09soiDCrKvfP2tPYo= +sigs.k8s.io/controller-runtime v0.1.12/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= +sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde h1:ZkaHf5rNYzIB6CB82keKMQNv7xxkqT0ylOBdfJPfi+k= +sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde/go.mod h1:ATWLRP3WGxuAN9HcT2LaKHReXIH+EZGzRuMHuxjXfhQ= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= +sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go b/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go new file mode 100644 index 000000000..ee6c25b28 --- /dev/null +++ b/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go @@ -0,0 +1,10 @@ +package apis + +import ( + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func init() { + // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) +} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go new file mode 100644 index 000000000..07dc96164 --- /dev/null +++ b/pkg/apis/apis.go @@ -0,0 +1,13 @@ +package apis + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// AddToSchemes may be used to add all resources defined in the project to a Scheme +var AddToSchemes runtime.SchemeBuilder + +// AddToScheme adds all Resources to the Scheme +func AddToScheme(s *runtime.Scheme) error { + return AddToSchemes.AddToScheme(s) +} diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go new file mode 100644 index 000000000..0708cbf9c --- /dev/null +++ b/pkg/apis/opentelemetry/const.go @@ -0,0 +1,13 @@ +package opentelemetry + +// ContextEntry represents a key in the context map +type ContextEntry string + +// ConfigMapEntry represents an entry in a config map +type ConfigMapEntry string + +// Instance is the OpenTelemetryService CR (instance) that is the current target of the reconciliation +const Instance ContextEntry = "__instance" + +// CollectorConfigMapEntry represents the configuration file name for the collector +const CollectorConfigMapEntry = "collector.yaml" diff --git a/pkg/apis/opentelemetry/group.go b/pkg/apis/opentelemetry/group.go new file mode 100644 index 000000000..5efabeb0b --- /dev/null +++ b/pkg/apis/opentelemetry/group.go @@ -0,0 +1,6 @@ +// Package opentelemetry contains opentelemetry API versions. +// +// This file ensures Go source parsers acknowledge the opentelemetry package +// and any child packages. It can be removed if any other Go source files are +// added to this package. +package opentelemetry diff --git a/pkg/apis/opentelemetry/v1alpha1/doc.go b/pkg/apis/opentelemetry/v1alpha1/doc.go new file mode 100644 index 000000000..961c2544a --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=opentelemetry.io +package v1alpha1 diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go new file mode 100644 index 000000000..b1ff4fbe9 --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go @@ -0,0 +1,52 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService +// +k8s:openapi-gen=true +type OpenTelemetryServiceSpec struct { + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // +required + Config string `json:"config,omitempty"` +} + +// OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService +// +k8s:openapi-gen=true +type OpenTelemetryServiceStatus struct { + Replicas int32 `json:"replicas"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenTelemetryService is the Schema for the opentelemetryservices API +// +k8s:openapi-gen=true +// +kubebuilder:resource:shortName=otelsvc;otelsvcs +// +kubebuilder:subresource:status +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +type OpenTelemetryService struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenTelemetryServiceSpec `json:"spec,omitempty"` + Status OpenTelemetryServiceStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// OpenTelemetryServiceList contains a list of OpenTelemetryService +type OpenTelemetryServiceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenTelemetryService `json:"items"` +} + +func init() { + SchemeBuilder.Register(&OpenTelemetryService{}, &OpenTelemetryServiceList{}) +} diff --git a/pkg/apis/opentelemetry/v1alpha1/register.go b/pkg/apis/opentelemetry/v1alpha1/register.go new file mode 100644 index 000000000..2e3ce9497 --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/register.go @@ -0,0 +1,19 @@ +// NOTE: Boilerplate only. Ignore this file. + +// Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=opentelemetry.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} +) diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..07bf436b3 --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,107 @@ +// +build !ignore_autogenerated + +// Code generated by operator-sdk. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryService) DeepCopyInto(out *OpenTelemetryService) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryService. +func (in *OpenTelemetryService) DeepCopy() *OpenTelemetryService { + if in == nil { + return nil + } + out := new(OpenTelemetryService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenTelemetryService) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryServiceList) DeepCopyInto(out *OpenTelemetryServiceList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenTelemetryService, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryServiceList. +func (in *OpenTelemetryServiceList) DeepCopy() *OpenTelemetryServiceList { + if in == nil { + return nil + } + out := new(OpenTelemetryServiceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenTelemetryServiceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryServiceSpec) DeepCopyInto(out *OpenTelemetryServiceSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryServiceSpec. +func (in *OpenTelemetryServiceSpec) DeepCopy() *OpenTelemetryServiceSpec { + if in == nil { + return nil + } + out := new(OpenTelemetryServiceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryServiceStatus) DeepCopyInto(out *OpenTelemetryServiceStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryServiceStatus. +func (in *OpenTelemetryServiceStatus) DeepCopy() *OpenTelemetryServiceStatus { + if in == nil { + return nil + } + out := new(OpenTelemetryServiceStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go new file mode 100644 index 000000000..9b0df933a --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -0,0 +1,106 @@ +// +build !ignore_autogenerated + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +package v1alpha1 + +import ( + spec "github.com/go-openapi/spec" + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{ + "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryService": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryService(ref), + "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceSpec": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref), + "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceStatus": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceStatus(ref), + } +} + +func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryService(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenTelemetryService is the Schema for the opentelemetryservices API", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Ref: ref("./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceSpec", "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService", + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "config": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + } +} + +func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService", + Properties: map[string]spec.Schema{ + "replicas": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"replicas"}, + }, + }, + Dependencies: []string{}, + } +} diff --git a/pkg/controller/add_opentelemetryservice.go b/pkg/controller/add_opentelemetryservice.go new file mode 100644 index 000000000..57fa34345 --- /dev/null +++ b/pkg/controller/add_opentelemetryservice.go @@ -0,0 +1,10 @@ +package controller + +import ( + "github.com/open-telemetry/opentelemetry-operator/pkg/controller/opentelemetryservice" +) + +func init() { + // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. + AddToManagerFuncs = append(AddToManagerFuncs, opentelemetryservice.Add) +} diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go new file mode 100644 index 000000000..7c069f3ee --- /dev/null +++ b/pkg/controller/controller.go @@ -0,0 +1,18 @@ +package controller + +import ( + "sigs.k8s.io/controller-runtime/pkg/manager" +) + +// AddToManagerFuncs is a list of functions to add all Controllers to the Manager +var AddToManagerFuncs []func(manager.Manager) error + +// AddToManager adds all Controllers to the Manager +func AddToManager(m manager.Manager) error { + for _, f := range AddToManagerFuncs { + if err := f(m); err != nil { + return err + } + } + return nil +} diff --git a/pkg/controller/opentelemetryservice/labels.go b/pkg/controller/opentelemetryservice/labels.go new file mode 100644 index 000000000..c9dfcaff0 --- /dev/null +++ b/pkg/controller/opentelemetryservice/labels.go @@ -0,0 +1,25 @@ +package opentelemetryservice + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// commonLabels return the common labels to all objects that are part of a managed OpenTelemetryService +func commonLabels(ctx context.Context) map[string]string { + instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + base := instance.Labels + if nil == base { + base = map[string]string{} + } + + base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) + base["app.kubernetes.io/part-of"] = "opentelemetry" + base["app.kubernetes.io/component"] = "opentelemetry-service" + + return base +} diff --git a/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go b/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go new file mode 100644 index 000000000..c062f1be0 --- /dev/null +++ b/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go @@ -0,0 +1,58 @@ +package opentelemetryservice + +import ( + corev1 "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/controller" + "sigs.k8s.io/controller-runtime/pkg/handler" + "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + "sigs.k8s.io/controller-runtime/pkg/source" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +var log = logf.Log.WithName("controller_opentelemetryservice") + +/** +* USER ACTION REQUIRED: This is a scaffold file intended for the user to modify with their own Controller +* business logic. Delete these comments after modifying this file.* + */ + +// Add creates a new OpenTelemetryService Controller and adds it to the Manager. The Manager will set fields on the Controller +// and Start it when the Manager is Started. +func Add(mgr manager.Manager) error { + return add(mgr, newReconciler(mgr)) +} + +// newReconciler returns a new reconcile.Reconciler +func newReconciler(mgr manager.Manager) reconcile.Reconciler { + return &ReconcileOpenTelemetryService{client: mgr.GetClient(), scheme: mgr.GetScheme()} +} + +// add adds a new Controller to mgr with r as the reconcile.Reconciler +func add(mgr manager.Manager, r reconcile.Reconciler) error { + // Create a new controller + c, err := controller.New("opentelemetryservice-controller", mgr, controller.Options{Reconciler: r}) + if err != nil { + return err + } + + // Watch for changes to primary resource OpenTelemetryService + err = c.Watch(&source.Kind{Type: &v1alpha1.OpenTelemetryService{}}, &handler.EnqueueRequestForObject{}) + if err != nil { + return err + } + + // TODO(user): Modify this to be the types you create that are owned by the primary resource + // Watch for changes to secondary resource Pods and requeue the owner OpenTelemetryService + err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ + IsController: true, + OwnerType: &v1alpha1.OpenTelemetryService{}, + }) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/controller/opentelemetryservice/reconcile.go b/pkg/controller/opentelemetryservice/reconcile.go new file mode 100644 index 000000000..5c9ba0e9c --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile.go @@ -0,0 +1,79 @@ +package opentelemetryservice + +import ( + "context" + + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// blank assignment to verify that ReconcileOpenTelemetryService implements reconcile.Reconciler +var _ reconcile.Reconciler = &ReconcileOpenTelemetryService{} + +// ReconcileOpenTelemetryService reconciles a OpenTelemetryService object +type ReconcileOpenTelemetryService struct { + // This client, initialized using mgr.Client() above, is a split client + // that reads objects from the cache and writes to the apiserver + client client.Client + scheme *runtime.Scheme +} + +// Reconcile reads that state of the cluster for a OpenTelemetryService object and makes changes based on the state read +// and what is in the OpenTelemetryService.Spec +func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (reconcile.Result, error) { + reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) + reqLogger.Info("Reconciling OpenTelemetryService") + + // Fetch the OpenTelemetryService instance + instance := &v1alpha1.OpenTelemetryService{} + err := r.client.Get(context.Background(), request.NamespacedName, instance) + if err != nil { + if errors.IsNotFound(err) { + // Request object not found, could have been deleted after reconcile request. + // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. + // Return and don't requeue + return reconcile.Result{}, nil + } + // Error reading the object - requeue the request. + return reconcile.Result{}, err + } + + // set the execution context for this reconcile loop + ctx := context.WithValue(context.Background(), opentelemetry.Instance, instance) + + if err := r.handleReconcile(ctx); err != nil { + return reconcile.Result{}, err + } + + return reconcile.Result{}, nil +} + +// handleReconcile compares the existing state vs. the expected state and performs the necessary actions to make the two match +func (r *ReconcileOpenTelemetryService) handleReconcile(ctx context.Context) error { + funcs := []func(context.Context) error{ + r.reconcileConfigMap, + r.reconcileService, + r.reconcileDeployment, + } + + for _, f := range funcs { + if err := f(ctx); err != nil { + return err + } + } + + return nil +} + +// setControllerReference should be used by the individual reconcile functions to establish the ownership of the underlying resources +func (r *ReconcileOpenTelemetryService) setControllerReference(ctx context.Context, object v1.Object) error { + instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + return controllerutil.SetControllerReference(instance, object, r.scheme) +} diff --git a/pkg/controller/opentelemetryservice/reconcile_configmap.go b/pkg/controller/opentelemetryservice/reconcile_configmap.go new file mode 100644 index 000000000..06ee3c08a --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_configmap.go @@ -0,0 +1,59 @@ +package opentelemetryservice + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// reconcileDeployment reconciles the deployment(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryService) reconcileConfigMap(ctx context.Context) error { + desired, err := configMap(ctx) + if err != nil { + return err + } + + r.setControllerReference(ctx, desired) + + expected := &corev1.ConfigMap{} + err = r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return err + } + } else if err != nil { + return err + } + + // it exists already, merge the two if the end result isn't identical to the existing one + // TODO(jpkroehling) + + return nil +} + +func configMap(ctx context.Context) (*corev1.ConfigMap, error) { + instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + name := fmt.Sprintf("%s-collector", instance.Name) + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + return &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Data: map[string]string{ + opentelemetry.CollectorConfigMapEntry: instance.Spec.Config, + }, + }, nil +} diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment.go b/pkg/controller/opentelemetryservice/reconcile_deployment.go new file mode 100644 index 000000000..b06db4b96 --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_deployment.go @@ -0,0 +1,95 @@ +package opentelemetryservice + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// reconcileDeployment reconciles the deployment(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryService) reconcileDeployment(ctx context.Context) error { + desired := deployment(ctx) + r.setControllerReference(ctx, desired) + + expected := &appsv1.Deployment{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return err + } + } else if err != nil { + return err + } + + // it exists already, merge the two if the end result isn't identical to the existing one + // TODO(jpkroehling) + + return nil +} + +func deployment(ctx context.Context) *appsv1.Deployment { + instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + name := fmt.Sprintf("%s-collector", instance.Name) + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + specAnnotations := instance.Annotations + specAnnotations["prometheus.io/scrape"] = "true" + specAnnotations["prometheus.io/port"] = "8888" + specAnnotations["prometheus.io/path"] = "/metrics" + + return &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: instance.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: specAnnotations, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "opentelemetry-service", + Image: "quay.io/jpkroehling/opentelemetry-service:latest", + VolumeMounts: []corev1.VolumeMount{{ + Name: name, + MountPath: "/conf", + }}, + Args: []string{ + fmt.Sprintf("--config=/conf/%s", opentelemetry.CollectorConfigMapEntry), + }, + }}, + Volumes: []corev1.Volume{{ + Name: name, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: name}, + Items: []corev1.KeyToPath{{ + Key: opentelemetry.CollectorConfigMapEntry, + Path: opentelemetry.CollectorConfigMapEntry, + }}, + }, + }, + }}, + }, + }, + }, + } +} diff --git a/pkg/controller/opentelemetryservice/reconcile_service.go b/pkg/controller/opentelemetryservice/reconcile_service.go new file mode 100644 index 000000000..bd5eea064 --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_service.go @@ -0,0 +1,68 @@ +package opentelemetryservice + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" +) + +// reconcileService reconciles the service(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryService) reconcileService(ctx context.Context) error { + desired := service(ctx) + r.setControllerReference(ctx, desired) + + expected := &corev1.Service{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return err + } + } else if err != nil { + return err + } + + // it exists already, merge the two if the end result isn't identical to the existing one + // TODO(jpkroehling) + + return nil +} + +func service(ctx context.Context) *corev1.Service { + instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + name := fmt.Sprintf("%s-collector", instance.Name) + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + // by coincidence, the selector is the same as the label, but note that the selector points to the deployment + // whereas 'labels' refers to the service + selector := labels + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + ClusterIP: "", + Ports: []corev1.ServicePort{ + { + Name: "jaeger-grpc", + Port: 14250, + TargetPort: intstr.FromInt(14250), + }, + }, + }, + } + +} diff --git a/tools.go b/tools.go new file mode 100644 index 000000000..648413f98 --- /dev/null +++ b/tools.go @@ -0,0 +1,7 @@ +// +build tools + +package tools + +import ( + _ "sigs.k8s.io/controller-tools/pkg/crd/generator" +) diff --git a/version/version.go b/version/version.go new file mode 100644 index 000000000..53df316af --- /dev/null +++ b/version/version.go @@ -0,0 +1,9 @@ +package version + +var ( + // Version of this operator + Version string + + // BuildDate of this operator + BuildDate string +) From 85ddc37ebf3195af2f05052843e6f06416f5b663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Aug 2019 15:48:15 +0200 Subject: [PATCH 0002/1234] Tests, ci, docs, Makefile, ... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/script.sh | 14 ++ .codecov.yml | 3 + .github/workflows/continuous-integration.yaml | 14 ++ CONTRIBUTING.md | 4 +- Makefile | 35 ++--- cmd/manager/empty_test.go | 2 + ...try_v1alpha1_opentelemetryservice_crd.yaml | 4 + go.mod | 14 ++ go.sum | 39 +++++ pkg/apis/empty_test.go | 2 + pkg/apis/opentelemetry/const.go | 20 +-- pkg/apis/opentelemetry/empty_test.go | 2 + pkg/apis/opentelemetry/group.go | 6 - pkg/apis/opentelemetry/v1alpha1/empty_test.go | 2 + .../v1alpha1/opentelemetryservice_types.go | 12 +- pkg/apis/opentelemetry/v1alpha1/register.go | 2 - .../v1alpha1/zz_generated.deepcopy.go | 7 + .../v1alpha1/zz_generated.openapi.go | 25 +++- pkg/controller/empty_test.go | 2 + pkg/controller/opentelemetryservice/labels.go | 2 +- .../opentelemetryservice/labels_test.go | 52 +++++++ .../opentelemetryservice/main_test.go | 56 ++++++++ .../opentelemetryservice_controller.go | 18 +-- .../opentelemetryservice/reconcile.go | 32 ++++- .../reconcile_configmap.go | 14 +- .../reconcile_configmap_test.go | 42 ++++++ .../reconcile_deployment.go | 29 +++- .../reconcile_deployment_test.go | 63 ++++++++ .../opentelemetryservice/reconcile_service.go | 11 +- .../reconcile_service_test.go | 40 ++++++ .../opentelemetryservice/reconcile_test.go | 134 ++++++++++++++++++ 31 files changed, 611 insertions(+), 91 deletions(-) create mode 100755 .ci/script.sh create mode 100644 .codecov.yml create mode 100644 .github/workflows/continuous-integration.yaml create mode 100644 cmd/manager/empty_test.go create mode 100644 pkg/apis/empty_test.go create mode 100644 pkg/apis/opentelemetry/empty_test.go delete mode 100644 pkg/apis/opentelemetry/group.go create mode 100644 pkg/apis/opentelemetry/v1alpha1/empty_test.go create mode 100644 pkg/controller/empty_test.go create mode 100644 pkg/controller/opentelemetryservice/labels_test.go create mode 100644 pkg/controller/opentelemetryservice/main_test.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_configmap_test.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_deployment_test.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_service_test.go create mode 100644 pkg/controller/opentelemetryservice/reconcile_test.go diff --git a/.ci/script.sh b/.ci/script.sh new file mode 100755 index 000000000..78f1fd0e1 --- /dev/null +++ b/.ci/script.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [ -z ${GOPATH} ]; then + export PATH="${HOME}/go/bin:${PATH}" +else + export PATH="${GOPATH}/bin:${PATH}" +fi + +BUILD_IMAGE="quay.io/jpkroehling/opentelemetry-operator" make ci +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to build the operator." + exit ${RT} +fi diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..a2ef66ad3 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,3 @@ +ignore: + - "./pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go" + - "./pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go" diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml new file mode 100644 index 000000000..25e79324a --- /dev/null +++ b/.github/workflows/continuous-integration.yaml @@ -0,0 +1,14 @@ +name: "Continuous Integration" +on: [push, pull_request] + +jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: jpkrohling/setup-operator-sdk@v1-release + with: + operator-sdk-version: v0.10.0 + + - name: "basic checks" + run: ./.ci/script.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1e8ff48c7..50d2c8dcf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ Once minikube has finished starting, get the Operator running: make run ``` -At this point, a Jaeger instance can be installed: +At this point, an OpenTelemetry Service instance can be installed: ``` kubectl apply -f deploy/examples/simplest.yaml @@ -58,4 +58,4 @@ The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*. #### Tests -Right now, there are no tests on this repo yet. This will change really soon. \ No newline at end of file +Right now, there are only unit tests in this repository. They can be executed via `make unit-tests`. End-to-end tests are planned, and should be executed via `make e2e-tests`. All tests, including unit and end-to-end, will be executed when `make test` is called. diff --git a/Makefile b/Makefile index 91e0e0caf..2ad50564f 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ OUTPUT_BINARY ?= "$(BIN_DIR)/$(OPERATOR_NAME)" VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/version" LD_FLAGS ?= "-X=$(VERSION_PKG).Version=$(OPERATOR_VERSION)" -PACKAGES := $(shell go list ./cmd/... ./pkg/...) +PACKAGES := $(shell go list ./cmd/... ./pkg/... ./version/...) .DEFAULT_GOAL := build .PHONY: check -check: +check: format ensure-generate-is-noop @echo Checking... - @go fmt $(PACKAGES) > $(FMT_LOG) + @git diff -s --exit-code . || (echo "Build failed: one or more source files aren't properly formatted. Run 'make format' and update your PR." && exit 1) .PHONY: ensure-generate-is-noop ensure-generate-is-noop: generate @@ -29,17 +29,12 @@ ensure-generate-is-noop: generate .PHONY: format format: @echo Formatting code... - @go fmt $(PACKAGES) - -.PHONY: lint -lint: - @echo Linting... - @$(GOPATH)/bin/golint -set_exit_status=1 $(PACKAGES) + @goimports -w -local "github.com/open-telemetry/opentelemetry-operator" . .PHONY: security security: @echo Security... - @$(GOPATH)/bin/gosec -quiet $(PACKAGES) 2>/dev/null + @gosec -quiet $(PACKAGES) 2>/dev/null .PHONY: build build: format @@ -68,21 +63,21 @@ generate: @operator-sdk generate openapi .PHONY: test -test: - @echo Running tests... +test: unit-tests + +.PHONY: unit-tests +unit-tests: + @echo Running unit tests... + @go test $(PACKAGES) -cover -coverprofile=cover.out .PHONY: all -all: check format lint security build test +all: check format security build test .PHONY: ci -ci: ensure-generate-is-noop all - -.PHONY: scorecard -scorecard: - @operator-sdk scorecard --cr-manifest deploy/examples/simplest.yaml --csv-path deploy/olm-catalog/jaeger.clusterserviceversion.yaml --init-timeout 30 +ci: install-tools ensure-generate-is-noop all .PHONY: install-tools install-tools: @go get -u \ - golang.org/x/lint/golint \ - github.com/securego/gosec/cmd/gosec + github.com/securego/gosec/cmd/gosec \ + golang.org/x/tools/cmd/goimports diff --git a/cmd/manager/empty_test.go b/cmd/manager/empty_test.go new file mode 100644 index 000000000..f69931bba --- /dev/null +++ b/cmd/manager/empty_test.go @@ -0,0 +1,2 @@ +// this file exists to force the coverage tool to count this directory +package main diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml index 9ede510b1..5e52c2e59 100644 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml @@ -35,6 +35,10 @@ spec: type: object spec: properties: + args: + additionalProperties: + type: string + type: object config: description: +required type: string diff --git a/go.mod b/go.mod index 451e4492a..6f33b004c 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,23 @@ module github.com/open-telemetry/opentelemetry-operator require ( github.com/NYTimes/gziphandler v1.0.1 // indirect + github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 + github.com/golang/protobuf v1.3.2 // indirect + github.com/kr/pty v1.1.8 // indirect + github.com/lib/pq v1.2.0 // indirect + github.com/onsi/ginkgo v1.9.0 // indirect + github.com/onsi/gomega v1.7.0 // indirect github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 + github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c // indirect github.com/spf13/pflag v1.0.3 + github.com/stretchr/objx v0.2.0 // indirect + github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect + golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect + golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect + golang.org/x/text v0.3.2 // indirect + golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d // indirect gopkg.in/yaml.v2 v2.2.2 k8s.io/api v0.0.0-20190612125737-db0771252981 k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad diff --git a/go.sum b/go.sum index 784d7e69d..087a01a12 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,7 @@ github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -83,6 +84,7 @@ github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= @@ -149,6 +151,8 @@ github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= @@ -224,7 +228,10 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -248,17 +255,24 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= @@ -315,7 +329,10 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c h1:e77ClRtOeEikSJwd2kx9yHx8Q7S4gTKIMlYB7J9LlCA= +github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c/go.mod h1:shk+oGa7JTGg9taMxXk2skTwpt9KQAbryuwFIHCm/fw= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= @@ -336,10 +353,13 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -374,6 +394,8 @@ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM= +golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -399,6 +421,10 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -413,6 +439,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -429,10 +457,16 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -440,6 +474,7 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZe golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -450,6 +485,10 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0FFLWGLCe3IqGE0vsP0m4= +golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= diff --git a/pkg/apis/empty_test.go b/pkg/apis/empty_test.go new file mode 100644 index 000000000..03fd21c53 --- /dev/null +++ b/pkg/apis/empty_test.go @@ -0,0 +1,2 @@ +// this file exists to force the coverage tool to count this directory +package apis diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go index 0708cbf9c..989dbf3ff 100644 --- a/pkg/apis/opentelemetry/const.go +++ b/pkg/apis/opentelemetry/const.go @@ -1,13 +1,17 @@ package opentelemetry -// ContextEntry represents a key in the context map -type ContextEntry string +type ( + // ContextEntry represents a key in the context map + ContextEntry string +) -// ConfigMapEntry represents an entry in a config map -type ConfigMapEntry string +const ( + // ContextInstance is the OpenTelemetryService CR (instance) that is the current target of the reconciliation + ContextInstance ContextEntry = "__instance" -// Instance is the OpenTelemetryService CR (instance) that is the current target of the reconciliation -const Instance ContextEntry = "__instance" + // ContextLogger represents the context entry for the logger instance to be used for context-dependent log entries + ContextLogger ContextEntry = "__logger" -// CollectorConfigMapEntry represents the configuration file name for the collector -const CollectorConfigMapEntry = "collector.yaml" + // CollectorConfigMapEntry represents the configuration file name for the collector + CollectorConfigMapEntry = "collector.yaml" +) diff --git a/pkg/apis/opentelemetry/empty_test.go b/pkg/apis/opentelemetry/empty_test.go new file mode 100644 index 000000000..69082cbb7 --- /dev/null +++ b/pkg/apis/opentelemetry/empty_test.go @@ -0,0 +1,2 @@ +// this file exists to force the coverage tool to count this directory +package opentelemetry diff --git a/pkg/apis/opentelemetry/group.go b/pkg/apis/opentelemetry/group.go deleted file mode 100644 index 5efabeb0b..000000000 --- a/pkg/apis/opentelemetry/group.go +++ /dev/null @@ -1,6 +0,0 @@ -// Package opentelemetry contains opentelemetry API versions. -// -// This file ensures Go source parsers acknowledge the opentelemetry package -// and any child packages. It can be removed if any other Go source files are -// added to this package. -package opentelemetry diff --git a/pkg/apis/opentelemetry/v1alpha1/empty_test.go b/pkg/apis/opentelemetry/v1alpha1/empty_test.go new file mode 100644 index 000000000..64da128b5 --- /dev/null +++ b/pkg/apis/opentelemetry/v1alpha1/empty_test.go @@ -0,0 +1,2 @@ +// this file exists to force the coverage tool to count this directory +package v1alpha1 diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go index b1ff4fbe9..ccea7c5f1 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go @@ -4,17 +4,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - // OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService // +k8s:openapi-gen=true type OpenTelemetryServiceSpec struct { - // +optional - Replicas *int32 `json:"replicas,omitempty"` - // +required Config string `json:"config,omitempty"` + + // +optional + Args map[string]string `json:"args,omitempty"` + + // +optional + Replicas *int32 `json:"replicas,omitempty"` } // OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService diff --git a/pkg/apis/opentelemetry/v1alpha1/register.go b/pkg/apis/opentelemetry/v1alpha1/register.go index 2e3ce9497..1f79cf0f0 100644 --- a/pkg/apis/opentelemetry/v1alpha1/register.go +++ b/pkg/apis/opentelemetry/v1alpha1/register.go @@ -1,5 +1,3 @@ -// NOTE: Boilerplate only. Ignore this file. - // Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group // +k8s:deepcopy-gen=package,register // +groupName=opentelemetry.io diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go index 07bf436b3..3191b75d7 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go @@ -72,6 +72,13 @@ func (in *OpenTelemetryServiceList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryServiceSpec) DeepCopyInto(out *OpenTelemetryServiceSpec) { *out = *in + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas *out = new(int32) diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 9b0df933a..472eefca7 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -66,18 +66,31 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common. SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService", Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, "config": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, + "args": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, diff --git a/pkg/controller/empty_test.go b/pkg/controller/empty_test.go new file mode 100644 index 000000000..6323e14cc --- /dev/null +++ b/pkg/controller/empty_test.go @@ -0,0 +1,2 @@ +// this file exists to force the coverage tool to count this directory +package controller diff --git a/pkg/controller/opentelemetryservice/labels.go b/pkg/controller/opentelemetryservice/labels.go index c9dfcaff0..7edea5491 100644 --- a/pkg/controller/opentelemetryservice/labels.go +++ b/pkg/controller/opentelemetryservice/labels.go @@ -10,7 +10,7 @@ import ( // commonLabels return the common labels to all objects that are part of a managed OpenTelemetryService func commonLabels(ctx context.Context) map[string]string { - instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) base := instance.Labels if nil == base { base = map[string]string{} diff --git a/pkg/controller/opentelemetryservice/labels_test.go b/pkg/controller/opentelemetryservice/labels_test.go new file mode 100644 index 000000000..4fc33b0bc --- /dev/null +++ b/pkg/controller/opentelemetryservice/labels_test.go @@ -0,0 +1,52 @@ +package opentelemetryservice + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestNilLabels(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryService{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-otelsvc", + Namespace: "observability", + Labels: nil, + }, + } + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + + // test + labels := commonLabels(ctx) + + // verify + assert.NotNil(t, labels) + assert.Contains(t, labels, "app.kubernetes.io/managed-by") + assert.Contains(t, labels, "app.kubernetes.io/instance") + assert.Contains(t, labels, "app.kubernetes.io/part-of") + assert.Contains(t, labels, "app.kubernetes.io/component") +} + +func TestInstanceName(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryService{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-otelsvc", + Namespace: "observability", + Labels: nil, + }, + } + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + + // test + labels := commonLabels(ctx) + + // verify + assert.Equal(t, labels["app.kubernetes.io/instance"], "observability.my-otelsvc") +} diff --git a/pkg/controller/opentelemetryservice/main_test.go b/pkg/controller/opentelemetryservice/main_test.go new file mode 100644 index 000000000..d50351454 --- /dev/null +++ b/pkg/controller/opentelemetryservice/main_test.go @@ -0,0 +1,56 @@ +package opentelemetryservice + +import ( + "context" + "os" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +var ( + instance *v1alpha1.OpenTelemetryService + ctx context.Context + reconciler *ReconcileOpenTelemetryService + schem *runtime.Scheme + cl client.Client +) + +// TestMain ensures that all tests in this package have a fresh and sane instance of the common resources +func TestMain(m *testing.M) { + schem := scheme.Scheme + schem.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.OpenTelemetryService{}) + + gvk := v1alpha1.SchemeGroupVersion.WithKind("OpenTelemetryService") + instance = &v1alpha1.OpenTelemetryService{ + TypeMeta: metav1.TypeMeta{ + // TypeMeta is added by Kubernetes, there's no need for consumers to set this manually + Kind: gvk.Kind, + APIVersion: gvk.GroupVersion().String(), + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "my-otelsvc", + Namespace: "observability", + Labels: map[string]string{"custom-label": "custom-value"}, + Annotations: map[string]string{"custom-annotation": "custom-annotation-value"}, + }, + Spec: v1alpha1.OpenTelemetryServiceSpec{ + Config: "the-config-in-yaml-format", + }, + } + ctx = context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + cl = fake.NewFakeClient(instance) + reconciler = New(cl, schem) + + os.Exit(m.Run()) +} diff --git a/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go b/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go index c062f1be0..314d38e33 100644 --- a/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go +++ b/pkg/controller/opentelemetryservice/opentelemetryservice_controller.go @@ -1,7 +1,6 @@ package opentelemetryservice import ( - corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -14,11 +13,6 @@ import ( var log = logf.Log.WithName("controller_opentelemetryservice") -/** -* USER ACTION REQUIRED: This is a scaffold file intended for the user to modify with their own Controller -* business logic. Delete these comments after modifying this file.* - */ - // Add creates a new OpenTelemetryService Controller and adds it to the Manager. The Manager will set fields on the Controller // and Start it when the Manager is Started. func Add(mgr manager.Manager) error { @@ -27,7 +21,7 @@ func Add(mgr manager.Manager) error { // newReconciler returns a new reconcile.Reconciler func newReconciler(mgr manager.Manager) reconcile.Reconciler { - return &ReconcileOpenTelemetryService{client: mgr.GetClient(), scheme: mgr.GetScheme()} + return New(mgr.GetClient(), mgr.GetScheme()) } // add adds a new Controller to mgr with r as the reconcile.Reconciler @@ -44,15 +38,5 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } - // TODO(user): Modify this to be the types you create that are owned by the primary resource - // Watch for changes to secondary resource Pods and requeue the owner OpenTelemetryService - err = c.Watch(&source.Kind{Type: &corev1.Pod{}}, &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &v1alpha1.OpenTelemetryService{}, - }) - if err != nil { - return err - } - return nil } diff --git a/pkg/controller/opentelemetryservice/reconcile.go b/pkg/controller/opentelemetryservice/reconcile.go index 5c9ba0e9c..5c6fd809d 100644 --- a/pkg/controller/opentelemetryservice/reconcile.go +++ b/pkg/controller/opentelemetryservice/reconcile.go @@ -23,6 +23,24 @@ type ReconcileOpenTelemetryService struct { // that reads objects from the cache and writes to the apiserver client client.Client scheme *runtime.Scheme + + // the list of reconciliation functions to execute + reconcileFuncs []func(context.Context) error +} + +// New constructs a ReconcileOpenTelemetryService based on the client and scheme, with the default reconciliation functions +func New(client client.Client, scheme *runtime.Scheme) *ReconcileOpenTelemetryService { + r := &ReconcileOpenTelemetryService{ + client: client, + scheme: scheme, + } + r.reconcileFuncs = []func(context.Context) error{ + r.reconcileConfigMap, + r.reconcileService, + r.reconcileDeployment, + } + + return r } // Reconcile reads that state of the cluster for a OpenTelemetryService object and makes changes based on the state read @@ -46,7 +64,8 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re } // set the execution context for this reconcile loop - ctx := context.WithValue(context.Background(), opentelemetry.Instance, instance) + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, reqLogger) if err := r.handleReconcile(ctx); err != nil { return reconcile.Result{}, err @@ -57,13 +76,12 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re // handleReconcile compares the existing state vs. the expected state and performs the necessary actions to make the two match func (r *ReconcileOpenTelemetryService) handleReconcile(ctx context.Context) error { - funcs := []func(context.Context) error{ - r.reconcileConfigMap, - r.reconcileService, - r.reconcileDeployment, + if nil == r.reconcileFuncs { + // nothing to do! + return nil } - for _, f := range funcs { + for _, f := range r.reconcileFuncs { if err := f(ctx); err != nil { return err } @@ -74,6 +92,6 @@ func (r *ReconcileOpenTelemetryService) handleReconcile(ctx context.Context) err // setControllerReference should be used by the individual reconcile functions to establish the ownership of the underlying resources func (r *ReconcileOpenTelemetryService) setControllerReference(ctx context.Context, object v1.Object) error { - instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) return controllerutil.SetControllerReference(instance, object, r.scheme) } diff --git a/pkg/controller/opentelemetryservice/reconcile_configmap.go b/pkg/controller/opentelemetryservice/reconcile_configmap.go index 06ee3c08a..f51d5cf55 100644 --- a/pkg/controller/opentelemetryservice/reconcile_configmap.go +++ b/pkg/controller/opentelemetryservice/reconcile_configmap.go @@ -15,15 +15,11 @@ import ( // reconcileDeployment reconciles the deployment(s) required for the instance in the current context func (r *ReconcileOpenTelemetryService) reconcileConfigMap(ctx context.Context) error { - desired, err := configMap(ctx) - if err != nil { - return err - } - + desired := configMap(ctx) r.setControllerReference(ctx, desired) expected := &corev1.ConfigMap{} - err = r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) if err != nil && errors.IsNotFound(err) { if err := r.client.Create(ctx, desired); err != nil { return err @@ -38,8 +34,8 @@ func (r *ReconcileOpenTelemetryService) reconcileConfigMap(ctx context.Context) return nil } -func configMap(ctx context.Context) (*corev1.ConfigMap, error) { - instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) +func configMap(ctx context.Context) *corev1.ConfigMap { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) name := fmt.Sprintf("%s-collector", instance.Name) labels := commonLabels(ctx) @@ -55,5 +51,5 @@ func configMap(ctx context.Context) (*corev1.ConfigMap, error) { Data: map[string]string{ opentelemetry.CollectorConfigMapEntry: instance.Spec.Config, }, - }, nil + } } diff --git a/pkg/controller/opentelemetryservice/reconcile_configmap_test.go b/pkg/controller/opentelemetryservice/reconcile_configmap_test.go new file mode 100644 index 000000000..54cc7ed12 --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_configmap_test.go @@ -0,0 +1,42 @@ +package opentelemetryservice + +import ( + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" +) + +func TestProperConfigMap(t *testing.T) { + // test + c := configMap(ctx) + + // verify + assert.Equal(t, c.Name, "my-otelsvc-collector") + assert.Equal(t, c.Annotations["custom-annotation"], "custom-annotation-value") + assert.Equal(t, c.Labels["custom-label"], "custom-value") + assert.Equal(t, c.Labels["app.kubernetes.io/name"], c.Name) + assert.Equal(t, c.Data[opentelemetry.CollectorConfigMapEntry], "the-config-in-yaml-format") +} + +func TestProperReconcileConfigMap(t *testing.T) { + // prepare + req := reconcile.Request{} + + // test + reconciler.Reconcile(req) + + // verify + list := &corev1.ConfigMapList{} + cl.List(ctx, client.InNamespace(instance.Namespace), list) + + // we assert the correctness of the service in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test + assert.Len(t, list.Items[0].OwnerReferences, 1) +} diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment.go b/pkg/controller/opentelemetryservice/reconcile_deployment.go index b06db4b96..7dc7016ed 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment.go @@ -4,6 +4,7 @@ import ( "context" "fmt" + "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -36,17 +37,39 @@ func (r *ReconcileOpenTelemetryService) reconcileDeployment(ctx context.Context) } func deployment(ctx context.Context) *appsv1.Deployment { - instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) name := fmt.Sprintf("%s-collector", instance.Name) labels := commonLabels(ctx) labels["app.kubernetes.io/name"] = name specAnnotations := instance.Annotations + if specAnnotations == nil { + specAnnotations = map[string]string{} + } + specAnnotations["prometheus.io/scrape"] = "true" specAnnotations["prometheus.io/port"] = "8888" specAnnotations["prometheus.io/path"] = "/metrics" + argsMap := instance.Spec.Args + if argsMap == nil { + argsMap = map[string]string{} + } + + if _, exists := argsMap["config"]; exists { + logger.Info("the 'config' flag isn't allowed and is being ignored") + } + + // this effectively overrides any 'config' entry that might exist in the CR + argsMap["config"] = fmt.Sprintf("/conf/%s", opentelemetry.CollectorConfigMapEntry) + + var args []string + for k, v := range argsMap { + args = append(args, fmt.Sprintf("--%s=%s", k, v)) + } + return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -72,9 +95,7 @@ func deployment(ctx context.Context) *appsv1.Deployment { Name: name, MountPath: "/conf", }}, - Args: []string{ - fmt.Sprintf("--config=/conf/%s", opentelemetry.CollectorConfigMapEntry), - }, + Args: args, }}, Volumes: []corev1.Volume{{ Name: name, diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go new file mode 100644 index 000000000..238928245 --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go @@ -0,0 +1,63 @@ +package opentelemetryservice + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestProperDeployment(t *testing.T) { + // test + d := deployment(ctx) + + // verify + assert.Equal(t, d.Name, "my-otelsvc-collector") + assert.Equal(t, d.Annotations["custom-annotation"], "custom-annotation-value") + assert.Equal(t, d.Labels["custom-label"], "custom-value") + assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) +} + +func TestDeploymentOverridesConfig(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryService{ + Spec: v1alpha1.OpenTelemetryServiceSpec{ + Args: map[string]string{"config": "custom-path"}, + }, + } + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + // test + d := deployment(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Len(t, d.Spec.Template.Spec.Containers[0].Args, 1) + assert.Contains(t, d.Spec.Template.Spec.Containers[0].Args[0], "/conf/collector.yaml") +} + +func TestProperReconcileDeployment(t *testing.T) { + // prepare + req := reconcile.Request{} + + // test + reconciler.Reconcile(req) + + // verify + list := &appsv1.DeploymentList{} + cl.List(ctx, client.InNamespace(instance.Namespace), list) + + // we assert the correctness of the service in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test + assert.Len(t, list.Items[0].OwnerReferences, 1) +} diff --git a/pkg/controller/opentelemetryservice/reconcile_service.go b/pkg/controller/opentelemetryservice/reconcile_service.go index bd5eea064..234f95884 100644 --- a/pkg/controller/opentelemetryservice/reconcile_service.go +++ b/pkg/controller/opentelemetryservice/reconcile_service.go @@ -4,13 +4,14 @@ import ( "context" "fmt" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" ) // reconcileService reconciles the service(s) required for the instance in the current context @@ -31,11 +32,15 @@ func (r *ReconcileOpenTelemetryService) reconcileService(ctx context.Context) er // it exists already, merge the two if the end result isn't identical to the existing one // TODO(jpkroehling) + // and finally, we should remove all services that were previously created for this instance that + // are not in use anymore + // TODO(jpkroehling) + return nil } func service(ctx context.Context) *corev1.Service { - instance := ctx.Value(opentelemetry.Instance).(*v1alpha1.OpenTelemetryService) + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) name := fmt.Sprintf("%s-collector", instance.Name) labels := commonLabels(ctx) diff --git a/pkg/controller/opentelemetryservice/reconcile_service_test.go b/pkg/controller/opentelemetryservice/reconcile_service_test.go new file mode 100644 index 000000000..57e897e3f --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_service_test.go @@ -0,0 +1,40 @@ +package opentelemetryservice + +import ( + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/reconcile" +) + +func TestProperService(t *testing.T) { + // test + s := service(ctx) + + // verify + assert.Equal(t, s.Name, "my-otelsvc-collector") + assert.Equal(t, s.Annotations["custom-annotation"], "custom-annotation-value") + assert.Equal(t, s.Labels["custom-label"], "custom-value") + assert.Equal(t, s.Labels["app.kubernetes.io/name"], s.Name) + assert.Equal(t, s.Spec.Selector, s.Labels) // shortcut, as they are the same at this point +} + +func TestProperReconcileService(t *testing.T) { + // prepare + req := reconcile.Request{} + + // test + reconciler.Reconcile(req) + + // verify + list := &corev1.ServiceList{} + cl.List(ctx, client.InNamespace(instance.Namespace), list) + + // we assert the correctness of the service in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test + assert.Len(t, list.Items[0].OwnerReferences, 1) +} diff --git a/pkg/controller/opentelemetryservice/reconcile_test.go b/pkg/controller/opentelemetryservice/reconcile_test.go new file mode 100644 index 000000000..e80de5560 --- /dev/null +++ b/pkg/controller/opentelemetryservice/reconcile_test.go @@ -0,0 +1,134 @@ +package opentelemetryservice + +import ( + "context" + "errors" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestProperReconcile(t *testing.T) { + // prepare + var ( + reconciled *v1alpha1.OpenTelemetryService + logger logr.Logger + req reconcile.Request + ) + + called := false + reconciler.reconcileFuncs = []func(context.Context) error{ + func(ctx context.Context) error { + called = true + reconciled = ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger = ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + return nil + }, + } + + // test + res, err := reconciler.Reconcile(req) + + // verify + assert.NoError(t, err) + assert.False(t, res.Requeue) + assert.True(t, called) + assert.Equal(t, instance.Name, reconciled.Name) + assert.NotNil(t, logger) +} + +func TestReconcileDeletedObject(t *testing.T) { + // prepare + cl := fake.NewFakeClient() // no objects + reconciler := New(cl, schem) + + req := reconcile.Request{} + reconciler.reconcileFuncs = []func(context.Context) error{ + func(context.Context) error { + assert.Fail(t, "shouldn't have been called") + return nil + }, + } + + // test + res, err := reconciler.Reconcile(req) + + // verify + assert.False(t, res.Requeue) + assert.NoError(t, err) + +} + +func TestReconcileFailsFast(t *testing.T) { + // prepare + req := reconcile.Request{} + reconciler.reconcileFuncs = []func(context.Context) error{ + func(context.Context) error { + return errors.New("the server made a boo boo") + }, + func(context.Context) error { + assert.Fail(t, "shouldn't have been called") + return nil + }, + } + + // test + _, err := reconciler.Reconcile(req) + + // verify + assert.Error(t, err) +} + +func TestReconcileFuncsAreCalled(t *testing.T) { + // prepare + called := false + reconciler.reconcileFuncs = []func(context.Context) error{ + func(context.Context) error { + called = true + return nil + }, + } + + // test + err := reconciler.handleReconcile(ctx) + + // verify + assert.NoError(t, err) + assert.True(t, called) +} + +func TestNilReconcileFuncs(t *testing.T) { + // prepare + reconciler.reconcileFuncs = nil + + // test + err := reconciler.handleReconcile(ctx) + + // verify + assert.NoError(t, err) +} + +func TestSetControllerReference(t *testing.T) { + // prepare + d := &appsv1.Deployment{} + + // sanity check + assert.Len(t, d.OwnerReferences, 0) + + // test + reconciler.setControllerReference(ctx, d) + + // verify + assert.Len(t, d.OwnerReferences, 1) + assert.Equal(t, instance.Name, d.OwnerReferences[0].Name) + assert.Equal(t, instance.TypeMeta.APIVersion, d.OwnerReferences[0].APIVersion) + assert.Equal(t, instance.TypeMeta.Kind, d.OwnerReferences[0].Kind) + +} From 700c9b2de9319b5acf4423f6604587331c771e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Aug 2019 17:37:46 +0200 Subject: [PATCH 0003/1234] Added code coverage and workflow badge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/upload-test-coverage.sh | 3 +++ .github/workflows/continuous-integration.yaml | 5 +++++ Makefile | 2 +- README.md | 4 +++- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 .ci/upload-test-coverage.sh diff --git a/.ci/upload-test-coverage.sh b/.ci/upload-test-coverage.sh new file mode 100755 index 000000000..38c878be6 --- /dev/null +++ b/.ci/upload-test-coverage.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 25e79324a..5a2da22ba 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -12,3 +12,8 @@ jobs: - name: "basic checks" run: ./.ci/script.sh + + - name: "upload test coverage report" + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + run: ./.ci/upload-test-coverage.sh diff --git a/Makefile b/Makefile index 2ad50564f..64ec0e231 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ test: unit-tests .PHONY: unit-tests unit-tests: @echo Running unit tests... - @go test $(PACKAGES) -cover -coverprofile=cover.out + @go test $(PACKAGES) -cover -coverprofile=coverage.txt -covermode=atomic -race .PHONY: all all: check format security build test diff --git a/README.md b/README.md index 4b8fe9dbf..97f936690 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] +[![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] # OpenTelemetry Operator for Kubernetes @@ -57,6 +57,8 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). [Apache 2.0 License](./LICENSE). +[github-workflow]: https://github.com/jpkrohling/opentelemetry-operator/actions +[github-workflow-img]: https://github.com/jpkrohling/opentelemetry-operator/workflows/Continuous%20Integration/badge.svg [goreport-img]: https://goreportcard.com/badge/github.com/jpkrohling/opentelemetry-operator [goreport]: https://goreportcard.com/report/github.com/jpkrohling/opentelemetry-operator [godoc-img]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator?status.svg From 4d1e2fc02a317e4ef8ca2d78fe80b51436b42abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Aug 2019 17:53:11 +0200 Subject: [PATCH 0004/1234] badges for codecov and codeclimate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97f936690..ebc7e9b9f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] +[![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] [![Maintainability][code-climate-img]][code-climate] [![codecov][codecov-img]][codecov] # OpenTelemetry Operator for Kubernetes @@ -63,3 +63,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). [goreport]: https://goreportcard.com/report/github.com/jpkrohling/opentelemetry-operator [godoc-img]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator?status.svg [godoc]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryService +[code-climate]: https://codeclimate.com/github/jpkrohling/opentelemetry-operator/maintainability +[code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability +[codecov]: https://codecov.io/gh/jpkrohling/opentelemetry-operator +[codecov-img]: https://codecov.io/gh/jpkrohling/opentelemetry-operator/branch/master/graph/badge.svg From 00a128ab51fb44217ddbd4030c7e354f79dd3ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 2 Sep 2019 13:41:01 +0200 Subject: [PATCH 0005/1234] go mod tidy, and replaced location of git.apache.org/thrift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- go.mod | 8 ++------ go.sum | 27 +++++++++------------------ 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 6f33b004c..b17496765 100644 --- a/go.mod +++ b/go.mod @@ -1,25 +1,19 @@ module github.com/open-telemetry/opentelemetry-operator require ( - github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 github.com/golang/protobuf v1.3.2 // indirect - github.com/kr/pty v1.1.8 // indirect - github.com/lib/pq v1.2.0 // indirect github.com/onsi/ginkgo v1.9.0 // indirect github.com/onsi/gomega v1.7.0 // indirect github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 - github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c // indirect github.com/spf13/pflag v1.0.3 - github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect golang.org/x/text v0.3.2 // indirect golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d // indirect - gopkg.in/yaml.v2 v2.2.2 k8s.io/api v0.0.0-20190612125737-db0771252981 k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad k8s.io/client-go v11.0.0+incompatible @@ -47,3 +41,5 @@ replace ( ) replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0 + +replace git.apache.org/thrift.git => github.com/apache/thrift v0.12.0 diff --git a/go.sum b/go.sum index 087a01a12..6f025d971 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,6 @@ cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= contrib.go.opencensus.io/exporter/ocagent v0.4.11 h1:Zwy9skaqR2igcEfSVYDuAsbpa33N0RPtnYTHEe2whPI= contrib.go.opencensus.io/exporter/ocagent v0.4.11/go.mod h1:7ihiYRbdcVfW4m4wlXi9WRPdv79C0fStcjNlyE6ek9s= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= @@ -57,7 +55,6 @@ github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -89,6 +86,7 @@ github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -139,6 +137,7 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -157,6 +156,7 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -224,14 +224,13 @@ github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f26 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -255,23 +254,20 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.9.0 h1:SZjF721BByVj8QH636/8S2DnX4n0Re3SteMmw3N+tzc= github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= @@ -329,10 +325,7 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c h1:e77ClRtOeEikSJwd2kx9yHx8Q7S4gTKIMlYB7J9LlCA= -github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c/go.mod h1:shk+oGa7JTGg9taMxXk2skTwpt9KQAbryuwFIHCm/fw= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= @@ -353,7 +346,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= @@ -421,7 +413,6 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -458,7 +449,6 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -485,7 +475,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0FFLWGLCe3IqGE0vsP0m4= golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -499,6 +488,7 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -516,6 +506,7 @@ google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= From eb4ebfe77c35307445a0d2b178aa42b17ad5caa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 2 Sep 2019 13:50:57 +0200 Subject: [PATCH 0006/1234] added back gziphandler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index b17496765..fee747229 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/open-telemetry/opentelemetry-operator require ( + github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 github.com/golang/protobuf v1.3.2 // indirect From 638ee957168811ff2c122729576c2bf1d2973156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 2 Sep 2019 13:59:13 +0200 Subject: [PATCH 0007/1234] updated go.mod/sum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- go.mod | 11 ++++++++--- go.sum | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fee747229..519f6dbbf 100644 --- a/go.mod +++ b/go.mod @@ -5,16 +5,21 @@ require ( github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 github.com/golang/protobuf v1.3.2 // indirect - github.com/onsi/ginkgo v1.9.0 // indirect + github.com/kr/pty v1.1.8 // indirect + github.com/lib/pq v1.2.0 // indirect + github.com/onsi/ginkgo v1.10.1 // indirect github.com/onsi/gomega v1.7.0 // indirect github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 + github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c // indirect github.com/spf13/pflag v1.0.3 + github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect - golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect + golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 // indirect golang.org/x/text v0.3.2 // indirect - golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d // indirect + golang.org/x/tools v0.0.0-20190830223141-573d9926052a // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect k8s.io/api v0.0.0-20190612125737-db0771252981 k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad k8s.io/client-go v11.0.0+incompatible diff --git a/go.sum b/go.sum index 6f025d971..39ac4ce1d 100644 --- a/go.sum +++ b/go.sum @@ -55,6 +55,7 @@ github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -229,8 +230,11 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -254,19 +258,25 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= +github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.9.0 h1:SZjF721BByVj8QH636/8S2DnX4n0Re3SteMmw3N+tzc= github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -325,7 +335,10 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c h1:e77ClRtOeEikSJwd2kx9yHx8Q7S4gTKIMlYB7J9LlCA= +github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c/go.mod h1:shk+oGa7JTGg9taMxXk2skTwpt9KQAbryuwFIHCm/fw= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= @@ -346,6 +359,7 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= @@ -413,6 +427,7 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -449,8 +464,11 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 h1:7z820YPX9pxWR59qM7BE5+fglp4D/mKqAwCvGt11b+8= +golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= @@ -475,8 +493,11 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0FFLWGLCe3IqGE0vsP0m4= golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190830223141-573d9926052a h1:XAHT1kdPpnU8Hk+FPi42KZFhtNFEk4vBg1U4OmIeHTU= +golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -508,6 +529,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= From 27e39e4103138a55f2cc880909c91dca2db3a0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 2 Sep 2019 14:01:30 +0200 Subject: [PATCH 0008/1234] added coverage.txt to gitignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7c504700d..6910dae07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Temporary Build Files build/_output build/_test +coverage.txt # Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode ### Emacs ### # -*- mode: gitignore; -*- From 5266a698aef50a0e07ea6e9faf3304119ce219f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 2 Sep 2019 16:08:26 +0200 Subject: [PATCH 0009/1234] Added support for custom images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- cmd/manager/main.go | 4 ++ ...try_v1alpha1_opentelemetryservice_crd.yaml | 2 + go.mod | 3 +- go.sum | 10 +++++ pkg/apis/opentelemetry/const.go | 3 ++ pkg/apis/opentelemetry/flagset.go | 31 +++++++++++++ .../v1alpha1/opentelemetryservice_types.go | 3 ++ .../v1alpha1/zz_generated.openapi.go | 6 +++ .../reconcile_deployment.go | 8 +++- .../reconcile_deployment_test.go | 43 +++++++++++++++++++ 10 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 pkg/apis/opentelemetry/flagset.go diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 6d215fb43..bd1b1e7dc 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -27,6 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/runtime/signals" "github.com/open-telemetry/opentelemetry-operator/pkg/apis" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/controller" "github.com/open-telemetry/opentelemetry-operator/version" ) @@ -59,6 +60,9 @@ func main() { // controller-runtime) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + // Add flags related to this operator + pflag.CommandLine.AddFlagSet(opentelemetry.FlagSet()) + pflag.Parse() // Use a zap logr.Logger implementation. If none of the zap diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml index 5e52c2e59..5c3df92b7 100644 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml @@ -42,6 +42,8 @@ spec: config: description: +required type: string + image: + type: string replicas: format: int32 type: integer diff --git a/go.mod b/go.mod index 519f6dbbf..08c218e24 100644 --- a/go.mod +++ b/go.mod @@ -12,11 +12,12 @@ require ( github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c // indirect github.com/spf13/pflag v1.0.3 + github.com/spf13/viper v1.3.2 github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect - golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 // indirect + golang.org/x/sys v0.0.0-20190902133755-9109b7679e13 // indirect golang.org/x/text v0.3.2 // indirect golang.org/x/tools v0.0.0-20190830223141-573d9926052a // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect diff --git a/go.sum b/go.sum index 39ac4ce1d..fff17edb6 100644 --- a/go.sum +++ b/go.sum @@ -199,6 +199,7 @@ github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -235,6 +236,7 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -251,6 +253,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -271,6 +274,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.9.0 h1:SZjF721BByVj8QH636/8S2DnX4n0Re3SteMmw3N+tzc= github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -294,6 +298,7 @@ github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2 github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.3.0 h1:e5+lF2E4Y2WCIxBefVowBuB0iHrUH4HZ8q+6mGF7fJc= github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= @@ -348,13 +353,16 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -469,6 +477,8 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 h1:7z820YPX9pxWR59qM7BE5+fglp4D/mKqAwCvGt11b+8= golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190902133755-9109b7679e13 h1:tdsQdquKbTNMsSZLqnLELJGzCANp9oXhu6zFBW6ODx4= +golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go index 989dbf3ff..6884fdfae 100644 --- a/pkg/apis/opentelemetry/const.go +++ b/pkg/apis/opentelemetry/const.go @@ -14,4 +14,7 @@ const ( // CollectorConfigMapEntry represents the configuration file name for the collector CollectorConfigMapEntry = "collector.yaml" + + // OtelSvcImageConfigKey represents the key to override the OpenTelemetry Service container image + OtelSvcImageConfigKey = "otelsvc-image" ) diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go new file mode 100644 index 000000000..84f692521 --- /dev/null +++ b/pkg/apis/opentelemetry/flagset.go @@ -0,0 +1,31 @@ +package opentelemetry + +import ( + "sync" + + "github.com/spf13/pflag" + "github.com/spf13/viper" +) + +var ( + mu sync.Mutex + fs *pflag.FlagSet +) + +// FlagSet returns this operator's flags +func FlagSet() *pflag.FlagSet { + if nil == fs { + mu.Lock() + defer mu.Unlock() + + fs = pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) + fs.String( + OtelSvcImageConfigKey, + "quay.io/jpkroehling/opentelemetry-service:latest", + "The default image to use for OpenTelemetry Service when not specified in the individual custom resource (CR)", + ) + viper.BindPFlag(OtelSvcImageConfigKey, fs.Lookup(OtelSvcImageConfigKey)) + } + + return fs +} diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go index ccea7c5f1..f86f295e6 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go @@ -15,6 +15,9 @@ type OpenTelemetryServiceSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` + + // +optional + Image string `json:"image,omitempty"` } // OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 472eefca7..5c8511c17 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -91,6 +91,12 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common. Format: "int32", }, }, + "image": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment.go b/pkg/controller/opentelemetryservice/reconcile_deployment.go index 7dc7016ed..8c62b26b1 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/go-logr/logr" + "github.com/spf13/viper" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -41,6 +42,11 @@ func deployment(ctx context.Context) *appsv1.Deployment { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) name := fmt.Sprintf("%s-collector", instance.Name) + image := instance.Spec.Image + if len(image) == 0 { + image = viper.GetString(opentelemetry.OtelSvcImageConfigKey) + } + labels := commonLabels(ctx) labels["app.kubernetes.io/name"] = name @@ -90,7 +96,7 @@ func deployment(ctx context.Context) *appsv1.Deployment { Spec: corev1.PodSpec{ Containers: []corev1.Container{{ Name: "opentelemetry-service", - Image: "quay.io/jpkroehling/opentelemetry-service:latest", + Image: image, VolumeMounts: []corev1.VolumeMount{{ Name: name, MountPath: "/conf", diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go index 238928245..1cccee70b 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go @@ -4,6 +4,7 @@ import ( "context" "testing" + "github.com/spf13/viper" "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -61,3 +62,45 @@ func TestProperReconcileDeployment(t *testing.T) { // we assert the correctness of the reference in another test assert.Len(t, list.Items[0].OwnerReferences, 1) } + +func TestOverrideImageFromCustomResource(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryService{ + Spec: v1alpha1.OpenTelemetryServiceSpec{ + Image: "myrepo/custom-image:version", + }, + } + ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) + + // test + d := deployment(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "myrepo/custom-image:version", d.Spec.Template.Spec.Containers[0].Image) +} + +func TestOverrideImageFromCLI(t *testing.T) { + // prepare + viper.Set(opentelemetry.OtelSvcImageConfigKey, "myrepo/custom-image-cli:version") + defer viper.Reset() + + // test + d := deployment(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "myrepo/custom-image-cli:version", d.Spec.Template.Spec.Containers[0].Image) +} + +func TestDefaultImage(t *testing.T) { + // prepare + opentelemetry.FlagSet() + + // test + d := deployment(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "quay.io/jpkroehling/opentelemetry-service:latest", d.Spec.Template.Spec.Containers[0].Image) +} From 3347a9fb0aba5b437d61c501fdd19660a9e21b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 13 Sep 2019 14:05:19 +0200 Subject: [PATCH 0010/1234] Added headless service, for gRPC load balancing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 4 +-- examples/business-application.yaml | 32 +++++++++++++++++++ pkg/apis/opentelemetry/flagset.go | 2 +- .../opentelemetryservice/reconcile.go | 8 ++++- .../reconcile_deployment_test.go | 2 +- .../opentelemetryservice/reconcile_service.go | 29 ++++++++++++----- .../reconcile_service_test.go | 15 +++++++-- 7 files changed, 77 insertions(+), 15 deletions(-) create mode 100644 examples/business-application.yaml diff --git a/Makefile b/Makefile index 64ec0e231..9f688341c 100644 --- a/Makefile +++ b/Makefile @@ -43,11 +43,11 @@ build: format .PHONY: run run: crd - @operator-sdk up local OPERATOR_NAME=$(OPERATOR_NAME) --go-ldflags "-X $(VERSION_PKG).Version=$(OPERATOR_VERSION) -X $(VERSION_PKG).BuildDate=$(VERSION_DATE)" + @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --go-ldflags "-X $(VERSION_PKG).Version=$(OPERATOR_VERSION) -X $(VERSION_PKG).BuildDate=$(VERSION_DATE)" .PHONY: run-debug run-debug: crd - @operator-sdk up local --operator-flags "--log-level=debug" OPERATOR_NAME=$(OPERATOR_NAME) + @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --operator-flags "--log-level=debug" .PHONY: clean clean: diff --git a/examples/business-application.yaml b/examples/business-application.yaml new file mode 100644 index 000000000..9d0897347 --- /dev/null +++ b/examples/business-application.yaml @@ -0,0 +1,32 @@ +# when `simplest.yaml` is deployed, this is how an application containing the Jaeger client can be configured to use otelsvc +# in this case, we make use of the jaeger-agent as a sidecar, and the jaeger-agent connects to otelsvc via gRPC +# this is suitable when the application is already configured to talk to Jaeger via UDP +# for greenfield applications, the OpenTelemetry client should be preferred +apiVersion: apps/v1 +kind: Deployment +metadata: + name: myapp +spec: + selector: + matchLabels: + app: myapp + template: + metadata: + labels: + app: myapp + spec: + containers: + - name: myapp + image: jaegertracing/vertx-create-span:operator-e2e-tests + - name: jaeger-agent + image: jaegertracing/jaeger-agent:1.14.0 + args: + - --reporter.grpc.host-port=dns:///simplest-collector-headless.default:14250 + - --reporter.type=grpc + ports: + - containerPort: 5778 + name: config-rest + protocol: TCP + - containerPort: 6831 + name: jg-compact-trft + protocol: TCP diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go index 84f692521..7b481d351 100644 --- a/pkg/apis/opentelemetry/flagset.go +++ b/pkg/apis/opentelemetry/flagset.go @@ -21,7 +21,7 @@ func FlagSet() *pflag.FlagSet { fs = pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) fs.String( OtelSvcImageConfigKey, - "quay.io/jpkroehling/opentelemetry-service:latest", + "quay.io/opentelemetry/opentelemetry-service:v0.0.2", "The default image to use for OpenTelemetry Service when not specified in the individual custom resource (CR)", ) viper.BindPFlag(OtelSvcImageConfigKey, fs.Lookup(OtelSvcImageConfigKey)) diff --git a/pkg/controller/opentelemetryservice/reconcile.go b/pkg/controller/opentelemetryservice/reconcile.go index 5c6fd809d..25d6375af 100644 --- a/pkg/controller/opentelemetryservice/reconcile.go +++ b/pkg/controller/opentelemetryservice/reconcile.go @@ -2,6 +2,7 @@ package opentelemetryservice import ( "context" + "time" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -46,7 +47,11 @@ func New(client client.Client, scheme *runtime.Scheme) *ReconcileOpenTelemetrySe // Reconcile reads that state of the cluster for a OpenTelemetryService object and makes changes based on the state read // and what is in the OpenTelemetryService.Spec func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (reconcile.Result, error) { - reqLogger := log.WithValues("Request.Namespace", request.Namespace, "Request.Name", request.Name) + reqLogger := log.WithValues( + "Request.Namespace", request.Namespace, + "Request.Name", request.Name, + "Request.ID", time.Now().UTC().Unix(), + ) reqLogger.Info("Reconciling OpenTelemetryService") // Fetch the OpenTelemetryService instance @@ -71,6 +76,7 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re return reconcile.Result{}, err } + reqLogger.Info("Finished reconciling OpenTelemetryService") return reconcile.Result{}, nil } diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go index 1cccee70b..1f07ca951 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go @@ -102,5 +102,5 @@ func TestDefaultImage(t *testing.T) { // verify assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "quay.io/jpkroehling/opentelemetry-service:latest", d.Spec.Template.Spec.Containers[0].Image) + assert.Contains(t, d.Spec.Template.Spec.Containers[0].Image, "quay.io/opentelemetry/opentelemetry-service") } diff --git a/pkg/controller/opentelemetryservice/reconcile_service.go b/pkg/controller/opentelemetryservice/reconcile_service.go index 234f95884..fde0adde0 100644 --- a/pkg/controller/opentelemetryservice/reconcile_service.go +++ b/pkg/controller/opentelemetryservice/reconcile_service.go @@ -16,17 +16,23 @@ import ( // reconcileService reconciles the service(s) required for the instance in the current context func (r *ReconcileOpenTelemetryService) reconcileService(ctx context.Context) error { - desired := service(ctx) - r.setControllerReference(ctx, desired) + svcs := []*corev1.Service{ + service(ctx), + headless(ctx), + } + for _, svc := range svcs { + desired := svc + r.setControllerReference(ctx, desired) - expected := &corev1.Service{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) - if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { + expected := &corev1.Service{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return err + } + } else if err != nil { return err } - } else if err != nil { - return err } // it exists already, merge the two if the end result isn't identical to the existing one @@ -71,3 +77,10 @@ func service(ctx context.Context) *corev1.Service { } } + +func headless(ctx context.Context) *corev1.Service { + h := service(ctx) + h.Name = fmt.Sprintf("%s-headless", h.Name) + h.Spec.ClusterIP = "None" + return h +} diff --git a/pkg/controller/opentelemetryservice/reconcile_service_test.go b/pkg/controller/opentelemetryservice/reconcile_service_test.go index 57e897e3f..312a74a4b 100644 --- a/pkg/controller/opentelemetryservice/reconcile_service_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_service_test.go @@ -21,6 +21,15 @@ func TestProperService(t *testing.T) { assert.Equal(t, s.Spec.Selector, s.Labels) // shortcut, as they are the same at this point } +func TestProperHeadlessService(t *testing.T) { + // test + s := headless(ctx) + + // verify + assert.Equal(t, s.Name, "my-otelsvc-collector-headless") + assert.Equal(t, s.Spec.ClusterIP, "None") +} + func TestProperReconcileService(t *testing.T) { // prepare req := reconcile.Request{} @@ -33,8 +42,10 @@ func TestProperReconcileService(t *testing.T) { cl.List(ctx, client.InNamespace(instance.Namespace), list) // we assert the correctness of the service in another test - assert.Len(t, list.Items, 1) + assert.Len(t, list.Items, 2) // we assert the correctness of the reference in another test - assert.Len(t, list.Items[0].OwnerReferences, 1) + for _, item := range list.Items { + assert.Len(t, item.OwnerReferences, 1) + } } From d076f7ab767367cd6f19cc1ce685d14e37ea8072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 13 Sep 2019 14:23:32 +0200 Subject: [PATCH 0011/1234] Updated go.mod/go.sum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- go.mod | 19 ++++++------------- go.sum | 13 +++++++++++++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 08c218e24..504335990 100644 --- a/go.mod +++ b/go.mod @@ -4,23 +4,16 @@ require ( github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 - github.com/golang/protobuf v1.3.2 // indirect - github.com/kr/pty v1.1.8 // indirect - github.com/lib/pq v1.2.0 // indirect - github.com/onsi/ginkgo v1.10.1 // indirect - github.com/onsi/gomega v1.7.0 // indirect github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 - github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c // indirect + github.com/ryanuber/go-glob v1.0.0 // indirect + github.com/securego/gosec v0.0.0-20190912120752-140048b2a218 // indirect github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.3.2 - github.com/stretchr/objx v0.2.0 // indirect github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect - golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect - golang.org/x/sys v0.0.0-20190902133755-9109b7679e13 // indirect - golang.org/x/text v0.3.2 // indirect - golang.org/x/tools v0.0.0-20190830223141-573d9926052a // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 // indirect + golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect + golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 // indirect + golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 // indirect k8s.io/api v0.0.0-20190612125737-db0771252981 k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad k8s.io/client-go v11.0.0+incompatible diff --git a/go.sum b/go.sum index fff17edb6..ae9ef90d7 100644 --- a/go.sum +++ b/go.sum @@ -344,6 +344,8 @@ github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIH github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c h1:e77ClRtOeEikSJwd2kx9yHx8Q7S4gTKIMlYB7J9LlCA= github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c/go.mod h1:shk+oGa7JTGg9taMxXk2skTwpt9KQAbryuwFIHCm/fw= +github.com/securego/gosec v0.0.0-20190912120752-140048b2a218 h1:O0yPHYL49quNL4Oj2wVq+zbGMu4dAM6iLoOQtm49TrQ= +github.com/securego/gosec v0.0.0-20190912120752-140048b2a218/go.mod h1:q6oYAujd2qyeU4cJqIri4LBIgdHXGvxWHZ1E29HNFRE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= @@ -410,6 +412,7 @@ golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjW golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM= golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -439,6 +442,9 @@ golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190909003024-a7b16738d86b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 h1:4dVFTC832rPn4pomLSz1vA+are2+dU19w1H8OngV7nc= +golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -455,6 +461,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -479,6 +486,9 @@ golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 h1:7z820YPX9pxWR59qM7BE5+fgl golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190902133755-9109b7679e13 h1:tdsQdquKbTNMsSZLqnLELJGzCANp9oXhu6zFBW6ODx4= golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190911201528-7ad0cfa0b7b5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 h1:wYqz/tQaWUgGKyx+B/rssSE6wkIKdY5Ee6ryOmzarIg= +golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= @@ -508,6 +518,9 @@ golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0 golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190830223141-573d9926052a h1:XAHT1kdPpnU8Hk+FPi42KZFhtNFEk4vBg1U4OmIeHTU= golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911230505-6bfd74cf029c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 h1:rM1Udd0CgtYI3KUIhu9ROz0QCqjW+n/ODp/hH7c60Xc= +golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= From 3a8f270be45f52fe506595238e8c0ffad2fbaee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 13 Sep 2019 14:57:47 +0200 Subject: [PATCH 0012/1234] Updated go.sum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- go.sum | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.sum b/go.sum index ae9ef90d7..44b902c0d 100644 --- a/go.sum +++ b/go.sum @@ -412,6 +412,7 @@ golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjW golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM= golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -461,6 +462,7 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0 golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= From 76dcea459aeeb8fc4dffe113068a4766c3c5d2d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 13 Sep 2019 15:21:40 +0200 Subject: [PATCH 0013/1234] ignore changes from golist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9f688341c..cc5c2a0e1 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,13 @@ PACKAGES := $(shell go list ./cmd/... ./pkg/... ./version/...) .DEFAULT_GOAL := build +.PHONY: discard-go-mod-changes +discard-go-mod-changes: + @# 'go list' will update go.mod/go.sum and there's no way to prevent it (not even with -mod=readonly) + @git checkout -- go.mod go.sum + .PHONY: check -check: format ensure-generate-is-noop +check: format ensure-generate-is-noop discard-go-mod-changes @echo Checking... @git diff -s --exit-code . || (echo "Build failed: one or more source files aren't properly formatted. Run 'make format' and update your PR." && exit 1) From 247796bac3b3bd53bb4c8ecc98800ae32037ecb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 13 Sep 2019 14:22:24 +0200 Subject: [PATCH 0014/1234] Added update/delete support to the reconciliation logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- .../opentelemetryservice/main_test.go | 2 +- .../opentelemetryservice/reconcile.go | 6 +- .../reconcile_configmap.go | 106 ++++++++++++++--- .../reconcile_configmap_test.go | 60 +++++++++- .../reconcile_deployment.go | 104 ++++++++++++++--- .../reconcile_deployment_test.go | 55 +++++++++ .../opentelemetryservice/reconcile_service.go | 110 +++++++++++++++--- .../reconcile_service_test.go | 67 +++++++++++ 9 files changed, 463 insertions(+), 49 deletions(-) diff --git a/Makefile b/Makefile index cc5c2a0e1..7dbee14d7 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ run: crd .PHONY: run-debug run-debug: crd - @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --operator-flags "--log-level=debug" + @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --operator-flags "--zap-level=2" .PHONY: clean clean: diff --git a/pkg/controller/opentelemetryservice/main_test.go b/pkg/controller/opentelemetryservice/main_test.go index d50351454..35544c481 100644 --- a/pkg/controller/opentelemetryservice/main_test.go +++ b/pkg/controller/opentelemetryservice/main_test.go @@ -26,7 +26,7 @@ var ( // TestMain ensures that all tests in this package have a fresh and sane instance of the common resources func TestMain(m *testing.M) { - schem := scheme.Scheme + schem = scheme.Scheme schem.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.OpenTelemetryService{}) gvk := v1alpha1.SchemeGroupVersion.WithKind("OpenTelemetryService") diff --git a/pkg/controller/opentelemetryservice/reconcile.go b/pkg/controller/opentelemetryservice/reconcile.go index 25d6375af..51521b0a8 100644 --- a/pkg/controller/opentelemetryservice/reconcile.go +++ b/pkg/controller/opentelemetryservice/reconcile.go @@ -2,6 +2,7 @@ package opentelemetryservice import ( "context" + "fmt" "time" "k8s.io/apimachinery/pkg/api/errors" @@ -50,7 +51,7 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re reqLogger := log.WithValues( "Request.Namespace", request.Namespace, "Request.Name", request.Name, - "Request.ID", time.Now().UTC().Unix(), + "Request.ID", time.Now().UTC().UnixNano(), ) reqLogger.Info("Reconciling OpenTelemetryService") @@ -62,6 +63,7 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re // Request object not found, could have been deleted after reconcile request. // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. // Return and don't requeue + reqLogger.Info("OpenTelemetryService was deleted, reconciliation terminated") return reconcile.Result{}, nil } // Error reading the object - requeue the request. @@ -89,7 +91,7 @@ func (r *ReconcileOpenTelemetryService) handleReconcile(ctx context.Context) err for _, f := range r.reconcileFuncs { if err := f(ctx); err != nil { - return err + return fmt.Errorf("reconciliation failed: %v", err) } } diff --git a/pkg/controller/opentelemetryservice/reconcile_configmap.go b/pkg/controller/opentelemetryservice/reconcile_configmap.go index f51d5cf55..f759e8b4b 100644 --- a/pkg/controller/opentelemetryservice/reconcile_configmap.go +++ b/pkg/controller/opentelemetryservice/reconcile_configmap.go @@ -4,32 +4,32 @@ import ( "context" "fmt" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" ) -// reconcileDeployment reconciles the deployment(s) required for the instance in the current context +// reconcileConfigMap reconciles the config map(s) required for the instance in the current context func (r *ReconcileOpenTelemetryService) reconcileConfigMap(ctx context.Context) error { - desired := configMap(ctx) - r.setControllerReference(ctx, desired) + desired := []*corev1.ConfigMap{ + configMap(ctx), + } - expected := &corev1.ConfigMap{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) - if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { - return err - } - } else if err != nil { - return err + // first, handle the create/update parts + if err := r.reconcileExpectedConfigMaps(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected deployments: %v", err) } - // it exists already, merge the two if the end result isn't identical to the existing one - // TODO(jpkroehling) + // then, delete the extra objects + if err := r.deleteConfigMaps(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + } return nil } @@ -53,3 +53,83 @@ func configMap(ctx context.Context) *corev1.ConfigMap { }, } } + +func (r *ReconcileOpenTelemetryService) reconcileExpectedConfigMaps(ctx context.Context, expected []*corev1.ConfigMap) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + for _, obj := range expected { + desired := obj + r.setControllerReference(ctx, desired) + + existing := &corev1.ConfigMap{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("configmap.name", desired.Name, "configmap.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to get: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Data = desired.Data + updated.BinaryData = desired.BinaryData + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := r.client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %v", err) + } + logger.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryService) deleteConfigMaps(ctx context.Context, expected []*corev1.ConfigMap) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }) + list := &corev1.ConfigMapList{} + if err := r.client.List(ctx, opts, list); err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := r.client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/controller/opentelemetryservice/reconcile_configmap_test.go b/pkg/controller/opentelemetryservice/reconcile_configmap_test.go index 54cc7ed12..8be735b35 100644 --- a/pkg/controller/opentelemetryservice/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_configmap_test.go @@ -1,12 +1,17 @@ package opentelemetryservice import ( + "context" + "fmt" "testing" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" ) @@ -28,7 +33,8 @@ func TestProperReconcileConfigMap(t *testing.T) { req := reconcile.Request{} // test - reconciler.Reconcile(req) + _, err := reconciler.Reconcile(req) + assert.NoError(t, err) // verify list := &corev1.ConfigMapList{} @@ -40,3 +46,55 @@ func TestProperReconcileConfigMap(t *testing.T) { // we assert the correctness of the reference in another test assert.Len(t, list.Items[0].OwnerReferences, 1) } + +func TestUpdateConfigMap(t *testing.T) { + // prepare + req := reconcile.Request{} + reconciler.Reconcile(req) + + // sanity check + name := fmt.Sprintf("%s-collector", instance.Name) + persisted := &corev1.ConfigMap{} + err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + assert.NoError(t, err) + assert.Equal(t, "the-config-in-yaml-format", persisted.Data[opentelemetry.CollectorConfigMapEntry]) + + // prepare the test object + updated := *instance + updated.Spec.Config = "updated-config-map" + + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + // test + reconciler.reconcileConfigMap(ctx) + + // verify + persisted = &corev1.ConfigMap{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.Equal(t, "updated-config-map", persisted.Data[opentelemetry.CollectorConfigMapEntry]) +} + +func TestDeleteExtraConfigMap(t *testing.T) { + // prepare + c := configMap(ctx) + c.Name = "extra-config-map" + + cl := fake.NewFakeClient(c) + reconciler := New(cl, schem) + + // sanity check + persisted := &corev1.ConfigMap{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + + // test + err := reconciler.reconcileConfigMap(ctx) + assert.NoError(t, err) + + // verify + persisted = &corev1.ConfigMap{} + err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + + assert.Empty(t, persisted.Name) + assert.Error(t, err) // not found +} diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment.go b/pkg/controller/opentelemetryservice/reconcile_deployment.go index 8c62b26b1..30469e3a2 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment.go @@ -11,6 +11,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -18,21 +19,19 @@ import ( // reconcileDeployment reconciles the deployment(s) required for the instance in the current context func (r *ReconcileOpenTelemetryService) reconcileDeployment(ctx context.Context) error { - desired := deployment(ctx) - r.setControllerReference(ctx, desired) - - expected := &appsv1.Deployment{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) - if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { - return err - } - } else if err != nil { - return err + desired := []*appsv1.Deployment{ + deployment(ctx), } - // it exists already, merge the two if the end result isn't identical to the existing one - // TODO(jpkroehling) + // first, handle the create/update parts + if err := r.reconcileExpectedDeployments(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected deployments: %v", err) + } + + // then, delete the extra objects + if err := r.deleteDeployments(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + } return nil } @@ -120,3 +119,82 @@ func deployment(ctx context.Context) *appsv1.Deployment { }, } } + +func (r *ReconcileOpenTelemetryService) reconcileExpectedDeployments(ctx context.Context, expected []*appsv1.Deployment) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + for _, obj := range expected { + desired := obj + r.setControllerReference(ctx, desired) + + existing := &appsv1.Deployment{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("deployment.name", desired.Name, "deployment.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to get: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := r.client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %v", err) + } + logger.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryService) deleteDeployments(ctx context.Context, expected []*appsv1.Deployment) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }) + list := &appsv1.DeploymentList{} + if err := r.client.List(ctx, opts, list); err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := r.client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go index 1f07ca951..9cc7391cd 100644 --- a/pkg/controller/opentelemetryservice/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_deployment_test.go @@ -2,12 +2,15 @@ package opentelemetryservice import ( "context" + "fmt" "testing" "github.com/spf13/viper" "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" + "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" @@ -104,3 +107,55 @@ func TestDefaultImage(t *testing.T) { assert.Len(t, d.Spec.Template.Spec.Containers, 1) assert.Contains(t, d.Spec.Template.Spec.Containers[0].Image, "quay.io/opentelemetry/opentelemetry-service") } + +func TestUpdateDeployment(t *testing.T) { + // prepare + req := reconcile.Request{} + reconciler.Reconcile(req) + + // sanity check + name := fmt.Sprintf("%s-collector", instance.Name) + persisted := &appsv1.Deployment{} + err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + assert.NoError(t, err) + + // prepare the test object + updated := *instance + updated.Spec.Image = "custom-image" + + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + // test + reconciler.reconcileDeployment(ctx) + + // verify + persisted = &appsv1.Deployment{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) +} + +func TestDeleteExtraDeployment(t *testing.T) { + // prepare + c := deployment(ctx) + c.Name = "extra-deployment" + + cl := fake.NewFakeClient(c) + reconciler := New(cl, schem) + + // sanity check + persisted := &appsv1.Deployment{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + + // test + err := reconciler.reconcileDeployment(ctx) + assert.NoError(t, err) + + // verify + persisted = &appsv1.Deployment{} + err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + + assert.Empty(t, persisted.Name) + assert.Error(t, err) // not found +} diff --git a/pkg/controller/opentelemetryservice/reconcile_service.go b/pkg/controller/opentelemetryservice/reconcile_service.go index fde0adde0..84913be5e 100644 --- a/pkg/controller/opentelemetryservice/reconcile_service.go +++ b/pkg/controller/opentelemetryservice/reconcile_service.go @@ -4,11 +4,13 @@ import ( "context" "fmt" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -20,27 +22,16 @@ func (r *ReconcileOpenTelemetryService) reconcileService(ctx context.Context) er service(ctx), headless(ctx), } - for _, svc := range svcs { - desired := svc - r.setControllerReference(ctx, desired) - expected := &corev1.Service{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, expected) - if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { - return err - } - } else if err != nil { - return err - } + // first, handle the create/update parts + if err := r.reconcileExpectedServices(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the expected services: %v", err) } - // it exists already, merge the two if the end result isn't identical to the existing one - // TODO(jpkroehling) - - // and finally, we should remove all services that were previously created for this instance that - // are not in use anymore - // TODO(jpkroehling) + // then, delete the extra objects + if err := r.deleteServices(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the services to be deleted: %v", err) + } return nil } @@ -84,3 +75,86 @@ func headless(ctx context.Context) *corev1.Service { h.Spec.ClusterIP = "None" return h } + +func (r *ReconcileOpenTelemetryService) reconcileExpectedServices(ctx context.Context, expected []*corev1.Service) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + for _, obj := range expected { + desired := obj + r.setControllerReference(ctx, desired) + + existing := &corev1.Service{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("service.name", desired.Name, "service.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to retrieve: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + // we keep the ClusterIP that got assigned by the cluster, if it's empty in the "desired" and not empty on the "current" + if desired.Spec.ClusterIP == "" && len(updated.Spec.ClusterIP) > 0 { + desired.Spec.ClusterIP = updated.Spec.ClusterIP + } + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := r.client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes to service: %v", err) + } + logger.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryService) deleteServices(ctx context.Context, expected []*corev1.Service) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }) + list := &corev1.ServiceList{} + if err := r.client.List(ctx, opts, list); err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := r.client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/controller/opentelemetryservice/reconcile_service_test.go b/pkg/controller/opentelemetryservice/reconcile_service_test.go index 312a74a4b..71fcf18fd 100644 --- a/pkg/controller/opentelemetryservice/reconcile_service_test.go +++ b/pkg/controller/opentelemetryservice/reconcile_service_test.go @@ -5,7 +5,10 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) @@ -49,3 +52,67 @@ func TestProperReconcileService(t *testing.T) { assert.Len(t, item.OwnerReferences, 1) } } + +func TestUpdateService(t *testing.T) { + // prepare + c := service(ctx) + + // right now, there's nothing we can do at the CR level that influences the underlying + // service object, so, we simulate a change made manually by some admin, changing the port + // from 14250 to 12345. Upon reconciliation, this change should be reverted + c.Spec.Ports = []corev1.ServicePort{ + { + Name: "jaeger-grpc", + Port: 12345, + TargetPort: intstr.FromInt(12345), + }, + } + c.Annotations = nil + c.Labels = nil + + // the cluster has assigned an IP to this service already + c.Spec.ClusterIP = "172.172.172.172" + + cl := fake.NewFakeClient(c) + reconciler := New(cl, schem) + + // sanity check + persisted := &corev1.Service{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.Len(t, persisted.Spec.Ports, 1) + assert.Equal(t, int32(12345), persisted.Spec.Ports[0].Port) + + // test + err := reconciler.reconcileService(ctx) + assert.NoError(t, err) + + // verify + persisted = &corev1.Service{} + err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + assert.Equal(t, int32(14250), persisted.Spec.Ports[0].Port) + assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept +} + +func TestDeleteExtraService(t *testing.T) { + // prepare + c := service(ctx) + c.Name = "extra-service" + + cl := fake.NewFakeClient(c) + reconciler := New(cl, schem) + + // sanity check + persisted := &corev1.Service{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + + // test + err := reconciler.reconcileService(ctx) + assert.NoError(t, err) + + // verify + persisted = &corev1.Service{} + err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + + assert.Empty(t, persisted.Name) + assert.Error(t, err) // not found +} From 5142b4092b71c822ffa04cf9a5233339ba82ca69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Sep 2019 11:26:58 +0200 Subject: [PATCH 0015/1234] Added upgrade mechanism MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 34 +++-- cmd/manager/main.go | 21 ++- ...try_v1alpha1_opentelemetryservice_crd.yaml | 3 + go.mod | 11 +- go.sum | 127 +++++++++++++----- opentelemetry.version | 5 + .../v1alpha1/opentelemetryservice_types.go | 3 +- .../v1alpha1/zz_generated.openapi.go | 8 +- .../opentelemetryservice/reconcile.go | 18 +++ .../opentelemetryservice/upgrade.go | 43 ++++++ .../opentelemetryservice/upgrade_test.go | 35 +++++ pkg/upgrade/upgrade.go | 70 ++++++++++ pkg/upgrade/upgrade_test.go | 76 +++++++++++ pkg/upgrade/v0_0_2.go | 13 ++ pkg/upgrade/versions.go | 29 ++++ pkg/version/main.go | 56 ++++++++ pkg/version/main_test.go | 19 +++ version/version.go | 9 -- 18 files changed, 512 insertions(+), 68 deletions(-) create mode 100644 opentelemetry.version create mode 100644 pkg/controller/opentelemetryservice/upgrade.go create mode 100644 pkg/controller/opentelemetryservice/upgrade_test.go create mode 100644 pkg/upgrade/upgrade.go create mode 100644 pkg/upgrade/upgrade_test.go create mode 100644 pkg/upgrade/v0_0_2.go create mode 100644 pkg/upgrade/versions.go create mode 100644 pkg/version/main.go create mode 100644 pkg/version/main_test.go delete mode 100644 version/version.go diff --git a/Makefile b/Makefile index 7dbee14d7..c94e3ad1a 100644 --- a/Makefile +++ b/Makefile @@ -3,17 +3,19 @@ OPERATOR_VERSION ?= "$(shell git describe --tags)" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on -KUBERNETES_CONFIG ?= "$(HOME)/.kube/config" +KUBERNETES_CONFIG ?= "${HOME}/.kube/config" WATCH_NAMESPACE ?= "" BIN_DIR ?= "build/_output/bin" -NAMESPACE ?= "$(USER)" -BUILD_IMAGE ?= "$(NAMESPACE)/$(OPERATOR_NAME):latest" -OUTPUT_BINARY ?= "$(BIN_DIR)/$(OPERATOR_NAME)" -VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/version" -LD_FLAGS ?= "-X=$(VERSION_PKG).Version=$(OPERATOR_VERSION)" +NAMESPACE ?= "${USER}" +BUILD_IMAGE ?= "${NAMESPACE}/${OPERATOR_NAME}:latest" +OUTPUT_BINARY ?= "${BIN_DIR}/${OPERATOR_NAME}" +VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/pkg/version" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelSvc=${OTELSVC_VERSION}" -PACKAGES := $(shell go list ./cmd/... ./pkg/... ./version/...) +OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-service | awk -F= '{print $$2}')" + +PACKAGES := $(shell go list ./cmd/... ./pkg/...) .DEFAULT_GOAL := build @@ -39,20 +41,26 @@ format: .PHONY: security security: @echo Security... - @gosec -quiet $(PACKAGES) 2>/dev/null + @gosec -quiet ${PACKAGES} 2>/dev/null .PHONY: build build: format - @echo Building... - @operator-sdk build ${BUILD_IMAGE} --go-build-args "-ldflags ${LD_FLAGS}" + @echo Building operator binary... + @${GO_FLAGS} go build -o ${OUTPUT_BINARY} -ldflags ${LD_FLAGS} ./cmd/manager/main.go + +.PHONY: container +container: + @echo Building container... + @mkdir -p build/_output + @docker build -f build/Dockerfile -t ${BUILD_IMAGE} . > build/_output/build-container.log 2>&1 .PHONY: run run: crd - @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --go-ldflags "-X $(VERSION_PKG).Version=$(OPERATOR_VERSION) -X $(VERSION_PKG).BuildDate=$(VERSION_DATE)" + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --go-ldflags ${LD_FLAGS} .PHONY: run-debug run-debug: crd - @OPERATOR_NAME=$(OPERATOR_NAME) operator-sdk up local --operator-flags "--zap-level=2" + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --operator-flags "--zap-level=2" --go-ldflags ${LD_FLAGS} .PHONY: clean clean: @@ -73,7 +81,7 @@ test: unit-tests .PHONY: unit-tests unit-tests: @echo Running unit tests... - @go test $(PACKAGES) -cover -coverprofile=coverage.txt -covermode=atomic -race + @go test ${PACKAGES} -cover -coverprofile=coverage.txt -covermode=atomic -race .PHONY: all all: check format security build test diff --git a/cmd/manager/main.go b/cmd/manager/main.go index bd1b1e7dc..d637cf4d2 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -17,7 +17,6 @@ import ( "github.com/operator-framework/operator-sdk/pkg/log/zap" "github.com/operator-framework/operator-sdk/pkg/metrics" "github.com/operator-framework/operator-sdk/pkg/restmapper" - sdkVersion "github.com/operator-framework/operator-sdk/version" "github.com/spf13/pflag" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -29,7 +28,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/apis" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/controller" - "github.com/open-telemetry/opentelemetry-operator/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/upgrade" + "github.com/open-telemetry/opentelemetry-operator/pkg/version" ) // Change below variables to serve metrics on different host or port. @@ -41,13 +41,15 @@ var ( var log = logf.Log.WithName("cmd") func printVersion() { + v := version.Get() log.Info("Starting the OpenTelemetry Operator", - "opentelemetry-operator", version.Version, - "build-date", version.BuildDate, - "go-version", runtime.Version(), + "opentelemetry-operator", v.Operator, + "opentelemetry-service", v.OpenTelemetryService, + "build-date", v.BuildDate, + "go-version", v.Go, "go-arch", runtime.GOARCH, "go-os", runtime.GOOS, - "operator-sdk-version", sdkVersion.Version, + "operator-sdk-version", v.OperatorSdk, ) } @@ -90,7 +92,7 @@ func main() { os.Exit(1) } - ctx := context.TODO() + ctx := context.Background() // Become the leader before proceeding err = leader.Become(ctx, "opentelemetry-operator-lock") if err != nil { @@ -117,6 +119,11 @@ func main() { os.Exit(1) } + ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetryservice")) + if err := upgrade.ManagedInstances(ctxUpgrade, mgr.GetClient()); err != nil { + log.Error(err, "failed to upgrade managed instances") + } + // Setup all Controllers if err := controller.AddToManager(mgr); err != nil { log.Error(err, "") diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml index 5c3df92b7..2d45d87bb 100644 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml @@ -53,8 +53,11 @@ spec: replicas: format: int32 type: integer + version: + type: string required: - replicas + - version type: object version: v1alpha1 versions: diff --git a/go.mod b/go.mod index 504335990..7d311634c 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,26 @@ module github.com/open-telemetry/opentelemetry-operator require ( + github.com/Azure/go-autorest v13.0.1+incompatible // indirect github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 + github.com/golang/protobuf v1.3.2 // indirect + github.com/jaegertracing/jaeger-operator v1.14.0 + github.com/onsi/ginkgo v1.10.1 // indirect + github.com/onsi/gomega v1.7.0 // indirect github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 - github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/securego/gosec v0.0.0-20190912120752-140048b2a218 // indirect github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.3.2 github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 // indirect golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 // indirect golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 // indirect + golang.org/x/text v0.3.2 // indirect golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gotest.tools v2.2.0+incompatible k8s.io/api v0.0.0-20190612125737-db0771252981 k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad k8s.io/client-go v11.0.0+incompatible diff --git a/go.sum b/go.sum index 44b902c0d..c509393bf 100644 --- a/go.sum +++ b/go.sum @@ -3,14 +3,36 @@ cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+Dw cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= contrib.go.opencensus.io/exporter/ocagent v0.4.11 h1:Zwy9skaqR2igcEfSVYDuAsbpa33N0RPtnYTHEe2whPI= contrib.go.opencensus.io/exporter/ocagent v0.4.11/go.mod h1:7ihiYRbdcVfW4m4wlXi9WRPdv79C0fStcjNlyE6ek9s= +contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= +contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= +dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= +dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= +dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= +dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v13.0.1+incompatible h1:wRg6hB3T3dp7qjj5v3NmVsdU9IyXodW+SQnN9xlpGEA= +github.com/Azure/go-autorest v13.0.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.2.0 h1:zBtSTOQTtjzHVRe+mhkiHvHwRTKHhjBEyo1m6DfI3So= +github.com/Azure/go-autorest/autorest v0.2.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= +github.com/Azure/go-autorest/autorest/adal v0.1.0 h1:RSw/7EAullliqwkZvgIGDYZWQm1PGKXI8c4aY/87yuU= +github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= +github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -43,6 +65,7 @@ github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXG github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -55,7 +78,6 @@ github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -68,6 +90,7 @@ github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20180612054059-a9fbbdc8dd87/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -98,6 +121,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -105,10 +129,12 @@ github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpR github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -123,6 +149,7 @@ github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pL github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8= github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= @@ -171,6 +198,7 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -179,6 +207,9 @@ github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTV github.com/gophercloud/gophercloud v0.0.0-20180330165814-781450b3c4fc/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855 h1:3dfUujjROkkXcwIpsh9z6bjOhPFooLpxejc7qgX13/g= github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -210,6 +241,8 @@ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jaegertracing/jaeger-operator v1.14.0 h1:hJUWS+DYD9GGO72LyJHVSSNyoex4jcsMxKtnp/RxK8E= +github.com/jaegertracing/jaeger-operator v1.14.0/go.mod h1:NOl6opNb5Jg7tECsLvIr9xRhAecLcxt84gfCmghjkgM= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= @@ -231,11 +264,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -251,8 +281,11 @@ github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsO github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= +github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -261,19 +294,16 @@ github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lN github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1ORQBMvzfzBgpsctsbQikCVpvC+tX285E= -github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.9.0 h1:SZjF721BByVj8QH636/8S2DnX4n0Re3SteMmw3N+tzc= -github.com/onsi/ginkgo v1.9.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -284,7 +314,9 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/openshift/api v0.0.0-20180830153656-5ad8479f64f1/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= @@ -295,6 +327,7 @@ github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd5 github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= github.com/operator-framework/operator-sdk v0.10.0 h1:k2yovBNxaya06yIkJ1e6lNsqiWjhS32G+d2LUdjuu/E= github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2zCdERf/828Mrftq4u7GS0I68= +github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -329,6 +362,7 @@ github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190203183350-488faf799f86/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4= github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -340,21 +374,43 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c h1:e77ClRtOeEikSJwd2kx9yHx8Q7S4gTKIMlYB7J9LlCA= -github.com/securego/gosec v0.0.0-20190709033609-4b59c948083c/go.mod h1:shk+oGa7JTGg9taMxXk2skTwpt9KQAbryuwFIHCm/fw= -github.com/securego/gosec v0.0.0-20190912120752-140048b2a218 h1:O0yPHYL49quNL4Oj2wVq+zbGMu4dAM6iLoOQtm49TrQ= -github.com/securego/gosec v0.0.0-20190912120752-140048b2a218/go.mod h1:q6oYAujd2qyeU4cJqIri4LBIgdHXGvxWHZ1E29HNFRE= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= +github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= +github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= +github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= +github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= +github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= +github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= +github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= +github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= +github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= +github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= +github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= +github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= +github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= +github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -362,14 +418,15 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= @@ -380,6 +437,9 @@ github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cb github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= +github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -393,6 +453,9 @@ go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.20.0 h1:L/ARO58pdktB6dLmYI0zAyW1XnavEmGziFd0MKfxnck= go.opencensus.io v0.20.0/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= @@ -400,6 +463,7 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -410,8 +474,6 @@ golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM= -golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -439,11 +501,7 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190420063019-afa5a82059c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190909003024-a7b16738d86b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 h1:4dVFTC832rPn4pomLSz1vA+are2+dU19w1H8OngV7nc= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -467,6 +525,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -481,14 +540,6 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0 h1:7z820YPX9pxWR59qM7BE5+fglp4D/mKqAwCvGt11b+8= -golang.org/x/sys v0.0.0-20190830142957-1e83adbbebd0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190902133755-9109b7679e13 h1:tdsQdquKbTNMsSZLqnLELJGzCANp9oXhu6zFBW6ODx4= -golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190911201528-7ad0cfa0b7b5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 h1:wYqz/tQaWUgGKyx+B/rssSE6wkIKdY5Ee6ryOmzarIg= golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -507,6 +558,7 @@ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -515,21 +567,18 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0FFLWGLCe3IqGE0vsP0m4= -golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190830223141-573d9926052a h1:XAHT1kdPpnU8Hk+FPi42KZFhtNFEk4vBg1U4OmIeHTU= -golang.org/x/tools v0.0.0-20190830223141-573d9926052a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911230505-6bfd74cf029c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 h1:rM1Udd0CgtYI3KUIhu9ROz0QCqjW+n/ODp/hH7c60Xc= golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.0 h1:UIJY20OEo3+tK5MBlcdx37kmdH6EnRjGkW78mc6+EeA= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= +google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -540,7 +589,9 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -554,6 +605,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= @@ -571,6 +623,7 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -588,6 +641,7 @@ k8s.io/apiserver v0.0.0-20181213151703-3ccfe8365421/go.mod h1:6bqaTSOSJavUIXUtfa k8s.io/cli-runtime v0.0.0-20181213153952-835b10687cb6/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 h1:aE8wOCKuoRs2aU0OP/Rz8SXiAB0FTTku3VtGhhrkSmc= k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/code-generator v0.0.0-20180823001027-3dcf91f64f63/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -602,6 +656,7 @@ k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= +k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco= @@ -620,4 +675,6 @@ sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkW sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/opentelemetry.version b/opentelemetry.version new file mode 100644 index 000000000..391de77ca --- /dev/null +++ b/opentelemetry.version @@ -0,0 +1,5 @@ +# this file contains the version of the OpenTelemetry components that will be used +# by default with the OpenTelemetry Operator. This would usually be the latest +# stable OpenTelemetry version. When you update this file, make sure to update the +# the docs as well. +opentelemetry-service=0.0.2 diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go index f86f295e6..f72aa8627 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetryservice_types.go @@ -23,7 +23,8 @@ type OpenTelemetryServiceSpec struct { // OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService // +k8s:openapi-gen=true type OpenTelemetryServiceStatus struct { - Replicas int32 `json:"replicas"` + Replicas int32 `json:"replicas"` + Version string `json:"version"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 5c8511c17..f24a595fc 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -116,8 +116,14 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceStatus(ref commo Format: "int32", }, }, + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, - Required: []string{"replicas"}, + Required: []string{"replicas", "version"}, }, }, Dependencies: []string{}, diff --git a/pkg/controller/opentelemetryservice/reconcile.go b/pkg/controller/opentelemetryservice/reconcile.go index 51521b0a8..4901b5dd1 100644 --- a/pkg/controller/opentelemetryservice/reconcile.go +++ b/pkg/controller/opentelemetryservice/reconcile.go @@ -74,7 +74,25 @@ func (r *ReconcileOpenTelemetryService) Reconcile(request reconcile.Request) (re ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) ctx = context.WithValue(ctx, opentelemetry.ContextLogger, reqLogger) + if err := r.applyUpgrades(ctx); err != nil { + reqLogger.Error(err, "failed to upgrade the custom resource and its underlying resources, reconciliation aborted") + return reconcile.Result{}, err + } + if err := r.handleReconcile(ctx); err != nil { + reqLogger.Error(err, "failed to reconcile custom resource") + return reconcile.Result{}, err + } + + // update the status object, which might have also been updated + if err := r.client.Status().Update(ctx, instance); err != nil { + reqLogger.Error(err, "failed to store the custom resource's status") + return reconcile.Result{}, err + } + + // apply it back, as it might have been updated + if err := r.client.Update(ctx, instance); err != nil { + reqLogger.Error(err, "failed to store back the custom resource") return reconcile.Result{}, err } diff --git a/pkg/controller/opentelemetryservice/upgrade.go b/pkg/controller/opentelemetryservice/upgrade.go new file mode 100644 index 000000000..f12927229 --- /dev/null +++ b/pkg/controller/opentelemetryservice/upgrade.go @@ -0,0 +1,43 @@ +package opentelemetryservice + +import ( + "context" + + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/upgrade" + "github.com/open-telemetry/opentelemetry-operator/pkg/version" +) + +func (r *ReconcileOpenTelemetryService) applyUpgrades(ctx context.Context) error { + otelsvc := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryService) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + currentVersions := version.Get() + + upgraded := false + if len(otelsvc.Status.Version) > 0 { + if otelsvc.Status.Version != currentVersions.OpenTelemetryService { + // in theory, the version from the Status could be higher than currentVersions.Jaeger, but we let the upgrade routine + // check/handle it + u, err := upgrade.ManagedInstance(ctx, r.client, otelsvc) + if err != nil { + return err + } + otelsvc = u + upgraded = true + } + } + + // at this point, the Jaeger we are managing is in sync with the Operator's version + // if this is a new object, no upgrade was made, so, we just set the version + otelsvc.Status.Version = version.Get().OpenTelemetryService + + if upgraded { + logger.V(2).Info("managed instance upgraded", "version", otelsvc.Status.Version) + } + + return nil +} diff --git a/pkg/controller/opentelemetryservice/upgrade_test.go b/pkg/controller/opentelemetryservice/upgrade_test.go new file mode 100644 index 000000000..5a89ff0e3 --- /dev/null +++ b/pkg/controller/opentelemetryservice/upgrade_test.go @@ -0,0 +1,35 @@ +package opentelemetryservice + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/version" +) + +func TestApplyUpgrades(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryService{ + Status: v1alpha1.OpenTelemetryServiceStatus{ + Version: "0.0.1", + }, + } + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + cl = fake.NewFakeClient(instance) + reconciler = New(cl, schem) + + // test + err := reconciler.applyUpgrades(ctx) + + // verify + assert.NoError(t, err) + assert.NotEqual(t, "0.0.1", instance.Status.Version) + assert.Equal(t, version.Get().OpenTelemetryService, instance.Status.Version) +} diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go new file mode 100644 index 000000000..994f40ccf --- /dev/null +++ b/pkg/upgrade/upgrade.go @@ -0,0 +1,70 @@ +package upgrade + +import ( + "context" + "fmt" + "reflect" + + "github.com/go-logr/logr" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// ManagedInstances finds all the otelsvc instances for the current operator and upgrades them, if necessary +func ManagedInstances(ctx context.Context, c client.Client) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + logger.Info("looking for managed instances to upgrade") + + list := &v1alpha1.OpenTelemetryServiceList{} + if err := c.List(ctx, &client.ListOptions{}, list); err != nil { + return fmt.Errorf("failed to get list of otelsvc instances: %v", err) + } + + for _, j := range list.Items { + otelsvc, err := ManagedInstance(ctx, c, &j) + if err != nil { + // nothing to do at this level, just go to the next instance + continue + } + + if !reflect.DeepEqual(otelsvc, j) { + // the CR has changed, store it! + if err := c.Update(ctx, otelsvc); err != nil { + logger.Error(err, "failed to store the upgraded otelsvc instances", "name", otelsvc.Name, "namespace", otelsvc.Namespace) + return err + } + + logger.Info("instance upgraded", "name", otelsvc.Name, "namespace", otelsvc.Namespace) + } + } + + if len(list.Items) == 0 { + logger.Info("no instances to upgrade") + } + + return nil +} + +// ManagedInstance performs the necessary changes to bring the given otelsvc instance to the current version +func ManagedInstance(ctx context.Context, client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + if v, ok := versions[otelsvc.Status.Version]; ok { + // we don't need to run the upgrade function for the version 'v', only the next ones + for n := v.next; n != nil; n = n.next { + // performs the upgrade to version 'n' + upgraded, err := n.upgrade(client, otelsvc) + if err != nil { + logger.Error(err, "failed to upgrade managed otelsvc instances", "name", otelsvc.Name, "namespace", otelsvc.Namespace) + return otelsvc, err + } + + upgraded.Status.Version = n.v + otelsvc = upgraded + } + } + + return otelsvc, nil +} diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go new file mode 100644 index 000000000..3a17ffceb --- /dev/null +++ b/pkg/upgrade/upgrade_test.go @@ -0,0 +1,76 @@ +package upgrade + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestVersionUpgradeToLatest(t *testing.T) { + // prepare + ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) + + nsn := types.NamespacedName{Name: "my-instance"} + existing := &v1alpha1.OpenTelemetryService{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + } + existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function + objs := []runtime.Object{existing} + + s := scheme.Scheme + s.AddKnownTypes(v1alpha1.SchemeGroupVersion, + &v1alpha1.OpenTelemetryService{}, + &v1alpha1.OpenTelemetryServiceList{}, + ) + cl := fake.NewFakeClient(objs...) + + // test + assert.NoError(t, ManagedInstances(ctx, cl)) + + // verify + persisted := &v1alpha1.OpenTelemetryService{} + assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) + assert.Equal(t, latest.v, persisted.Status.Version) +} + +func TestUnknownVersion(t *testing.T) { + // prepare + ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) + nsn := types.NamespacedName{Name: "my-instance"} + existing := &v1alpha1.OpenTelemetryService{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + } + existing.Status.Version = "0.0.0" // we don't know how to upgrade from 0.0.0 + objs := []runtime.Object{existing} + + s := scheme.Scheme + s.AddKnownTypes(v1alpha1.SchemeGroupVersion, + &v1alpha1.OpenTelemetryService{}, + &v1alpha1.OpenTelemetryServiceList{}, + ) + cl := fake.NewFakeClient(objs...) + + // test + assert.NoError(t, ManagedInstances(ctx, cl)) + + // verify + persisted := &v1alpha1.OpenTelemetryService{} + assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) + assert.Equal(t, "0.0.0", persisted.Status.Version) +} diff --git a/pkg/upgrade/v0_0_2.go b/pkg/upgrade/v0_0_2.go new file mode 100644 index 000000000..94c019ebc --- /dev/null +++ b/pkg/upgrade/v0_0_2.go @@ -0,0 +1,13 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func upgrade0_0_2(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { + // this has the same content as `noop`, but it's added a separate function + // to serve as template for versions with an actual upgrade procedure + return otelsvc, nil +} diff --git a/pkg/upgrade/versions.go b/pkg/upgrade/versions.go new file mode 100644 index 000000000..136bff32d --- /dev/null +++ b/pkg/upgrade/versions.go @@ -0,0 +1,29 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +type version struct { + v string + upgrade func(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) + next *version +} + +var ( + v0_0_1 = version{v: "0.0.1", upgrade: noop, next: &v0_0_2} + v0_0_2 = version{v: "0.0.2", upgrade: upgrade0_0_2} + + latest = &v0_0_2 + + versions = map[string]version{ + v0_0_1.v: v0_0_1, + v0_0_2.v: v0_0_2, + } +) + +func noop(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { + return otelsvc, nil +} diff --git a/pkg/version/main.go b/pkg/version/main.go new file mode 100644 index 000000000..9482cdf8b --- /dev/null +++ b/pkg/version/main.go @@ -0,0 +1,56 @@ +package version + +import ( + "fmt" + "runtime" + + sdkVersion "github.com/operator-framework/operator-sdk/version" +) + +var ( + version string + buildDate string + otelSvc string +) + +// Version holds this Operator's version as well as the version of some of the components it uses +type Version struct { + Operator string `json:"opentelemetry-operator"` + BuildDate string `json:"build-date"` + OpenTelemetryService string `json:"opentelemetry-service-version"` + Go string `json:"go-version"` + OperatorSdk string `json:"operator-sdk-version"` +} + +// Get returns the Version object with the relevant information +func Get() Version { + return Version{ + Operator: version, + BuildDate: buildDate, + OpenTelemetryService: DefaultOpenTelemetryService(), + Go: runtime.Version(), + OperatorSdk: sdkVersion.Version, + } +} + +func (v Version) String() string { + return fmt.Sprintf( + "Version(Operator='%v', BuildDate='%v', OpenTelemetryService='%v', Go='%v', OperatorSDK='%v')", + v.Operator, + v.BuildDate, + v.OpenTelemetryService, + v.Go, + v.OperatorSdk, + ) +} + +// DefaultOpenTelemetryService returns the default OpenTelemetryService to use when no versions are specified via CLI or configuration +func DefaultOpenTelemetryService() string { + if len(otelSvc) > 0 { + // this should always be set, as it's specified during the build + return otelSvc + } + + // fallback value, useful for tests + return "0.0.0" +} diff --git a/pkg/version/main_test.go b/pkg/version/main_test.go new file mode 100644 index 000000000..cc0b256f1 --- /dev/null +++ b/pkg/version/main_test.go @@ -0,0 +1,19 @@ +package version + +import ( + "testing" + + "gotest.tools/assert" +) + +func TestDefaultOpenTelemetryService(t *testing.T) { + assert.Equal(t, "0.0.0", DefaultOpenTelemetryService()) +} + +func TestCurrentOpenTelemetryService(t *testing.T) { + otelSvc = "0.0.2" // set during the build + defer func() { + otelSvc = "" + }() + assert.Equal(t, "0.0.2", Get().OpenTelemetryService) +} diff --git a/version/version.go b/version/version.go deleted file mode 100644 index 53df316af..000000000 --- a/version/version.go +++ /dev/null @@ -1,9 +0,0 @@ -package version - -var ( - // Version of this operator - Version string - - // BuildDate of this operator - BuildDate string -) From c34c7a58de7b90b3037aa6df731dbd54badf3657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 26 Sep 2019 10:46:47 +0200 Subject: [PATCH 0016/1234] Updated CRDs/CRs to latest operator-sdk and changed install-tools to not touch go.mod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 6 +- ...elemetry.io_opentelemetryservices_crd.yaml | 71 +++++++++++++++++++ ...etry_v1alpha1_opentelemetryservice_cr.yaml | 6 -- ...try_v1alpha1_opentelemetryservice_crd.yaml | 66 ----------------- deploy/crds/simplest.yaml | 20 ++++++ .../v1alpha1/zz_generated.openapi.go | 6 +- 6 files changed, 98 insertions(+), 77 deletions(-) create mode 100644 deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml delete mode 100644 deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml delete mode 100644 deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml create mode 100644 deploy/crds/simplest.yaml diff --git a/Makefile b/Makefile index c94e3ad1a..2f864ee15 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ OPERATOR_VERSION ?= "$(shell git describe --tags)" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on +GOPATH ?= $(shell go env GOPATH) KUBERNETES_CONFIG ?= "${HOME}/.kube/config" WATCH_NAMESPACE ?= "" BIN_DIR ?= "build/_output/bin" @@ -91,6 +92,5 @@ ci: install-tools ensure-generate-is-noop all .PHONY: install-tools install-tools: - @go get -u \ - github.com/securego/gosec/cmd/gosec \ - golang.org/x/tools/cmd/goimports + @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 + @go install golang.org/x/tools/cmd/goimports diff --git a/deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml new file mode 100644 index 000000000..5d20536cc --- /dev/null +++ b/deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml @@ -0,0 +1,71 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: opentelemetryservices.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryService + listKind: OpenTelemetryServiceList + plural: opentelemetryservices + shortNames: + - otelsvc + - otelsvcs + singular: opentelemetryservice + scope: Namespaced + version: v1alpha1 + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryService is the Schema for the opentelemetryservices + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService + properties: + args: + additionalProperties: + type: string + type: object + config: + type: string + image: + type: string + replicas: + format: int32 + type: integer + type: object + status: + description: OpenTelemetryServiceStatus defines the observed state of + OpenTelemetryService + properties: + replicas: + format: int32 + type: integer + version: + type: string + required: + - replicas + - version + type: object + type: object + served: true + storage: true + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml deleted file mode 100644 index ecc0cb9f0..000000000 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_cr.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryService -metadata: - name: example-opentelemetryservice -spec: - replicas: 3 diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml deleted file mode 100644 index 2d45d87bb..000000000 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +++ /dev/null @@ -1,66 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: opentelemetryservices.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryService - listKind: OpenTelemetryServiceList - plural: opentelemetryservices - shortNames: - - otelsvc - - otelsvcs - singular: opentelemetryservice - scope: Namespaced - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - args: - additionalProperties: - type: string - type: object - config: - description: +required - type: string - image: - type: string - replicas: - format: int32 - type: integer - type: object - status: - properties: - replicas: - format: int32 - type: integer - version: - type: string - required: - - replicas - - version - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/deploy/crds/simplest.yaml b/deploy/crds/simplest.yaml new file mode 100644 index 000000000..b67d4620c --- /dev/null +++ b/deploy/crds/simplest.yaml @@ -0,0 +1,20 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryService +metadata: + name: simplest +spec: + config: | + receivers: + jaeger: + + processors: + queued-retry: + + exporters: + logging: + + pipelines: + traces: + receivers: [jaeger] + processors: [queued-retry] + exporters: [logging] diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index f24a595fc..3b0134678 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -22,6 +22,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryService(ref common.Refe Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryService is the Schema for the opentelemetryservices API", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -65,6 +66,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common. Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryServiceSpec defines the desired state of OpenTelemetryService", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "config": { SchemaProps: spec.SchemaProps{ @@ -76,6 +78,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common. SchemaProps: spec.SchemaProps{ Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -100,7 +103,6 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceSpec(ref common. }, }, }, - Dependencies: []string{}, } } @@ -109,6 +111,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceStatus(ref commo Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryServiceStatus defines the observed state of OpenTelemetryService", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "replicas": { SchemaProps: spec.SchemaProps{ @@ -126,6 +129,5 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryServiceStatus(ref commo Required: []string{"replicas", "version"}, }, }, - Dependencies: []string{}, } } From a6427294805cc2d51bd4c75bdbcaf7f77a39fddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 26 Sep 2019 10:55:24 +0200 Subject: [PATCH 0017/1234] Renamed "OpenTelemetry Service" to "OpenTelemetry Collector" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CONTRIBUTING.md | 6 +- Makefile | 6 +- README.md | 16 ++--- cmd/manager/main.go | 4 +- ...elemetry.io_opentelemetryservices_crd.yaml | 71 ------------------- ...y_v1alpha1_opentelemetrycollector_crd.yaml | 66 +++++++++++++++++ deploy/crds/simplest.yaml | 2 +- ...operator.v0.0.1.clusterserviceversion.yaml | 2 +- ...try_v1alpha1_opentelemetryservice_crd.yaml | 10 +-- examples/business-application.yaml | 4 +- examples/simplest.yaml | 2 +- pkg/apis/opentelemetry/const.go | 6 +- pkg/apis/opentelemetry/flagset.go | 8 +-- ...pes.go => opentelemetrycollector_types.go} | 26 +++---- .../v1alpha1/zz_generated.deepcopy.go | 38 +++++----- .../v1alpha1/zz_generated.openapi.go | 30 ++++---- ...rvice.go => add_opentelemetrycollector.go} | 4 +- .../labels.go | 8 +-- .../labels_test.go | 12 ++-- .../main_test.go | 16 ++--- .../opentelemetrycollector_controller.go} | 12 ++-- .../reconcile.go | 38 +++++----- .../reconcile_configmap.go | 12 ++-- .../reconcile_configmap_test.go | 4 +- .../reconcile_deployment.go | 16 ++--- .../reconcile_deployment_test.go | 16 ++--- .../reconcile_service.go | 12 ++-- .../reconcile_service_test.go | 6 +- .../reconcile_test.go | 6 +- .../upgrade.go | 18 ++--- .../upgrade_test.go | 8 +-- pkg/upgrade/upgrade.go | 32 ++++----- pkg/upgrade/upgrade_test.go | 16 ++--- pkg/upgrade/v0_0_2.go | 4 +- pkg/upgrade/versions.go | 6 +- pkg/version/main.go | 34 ++++----- pkg/version/main_test.go | 12 ++-- 37 files changed, 291 insertions(+), 298 deletions(-) delete mode 100644 deploy/crds/opentelemetry.io_opentelemetryservices_crd.yaml create mode 100644 deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml rename pkg/apis/opentelemetry/v1alpha1/{opentelemetryservice_types.go => opentelemetrycollector_types.go} (53%) rename pkg/controller/{add_opentelemetryservice.go => add_opentelemetrycollector.go} (67%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/labels.go (80%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/labels_test.go (85%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/main_test.go (81%) rename pkg/controller/{opentelemetryservice/opentelemetryservice_controller.go => opentelemetrycollector/opentelemetrycollector_controller.go} (64%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile.go (72%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_configmap.go (90%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_configmap_test.go (97%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_deployment.go (91%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_deployment_test.go (91%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_service.go (91%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_service_test.go (95%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/reconcile_test.go (96%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/upgrade.go (61%) rename pkg/controller/{opentelemetryservice => opentelemetrycollector}/upgrade_test.go (80%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50d2c8dcf..596646b66 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,11 +38,11 @@ Once minikube has finished starting, get the Operator running: make run ``` -At this point, an OpenTelemetry Service instance can be installed: +At this point, an OpenTelemetry Collector instance can be installed: ``` kubectl apply -f deploy/examples/simplest.yaml -kubectl get otelsvcs +kubectl get otelcols kubectl get pods ``` @@ -54,7 +54,7 @@ kubectl delete -f deploy/examples/simplest.yaml #### Model changes -The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetryservice_types.go`) +The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetrycollector_types.go`) #### Tests diff --git a/Makefile b/Makefile index 2f864ee15..a1776f271 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,9 @@ NAMESPACE ?= "${USER}" BUILD_IMAGE ?= "${NAMESPACE}/${OPERATOR_NAME}:latest" OUTPUT_BINARY ?= "${BIN_DIR}/${OPERATOR_NAME}" VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/pkg/version" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelSvc=${OTELSVC_VERSION}" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" -OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-service | awk -F= '{print $$2}')" +OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-collector | awk -F= '{print $$2}')" PACKAGES := $(shell go list ./cmd/... ./pkg/...) @@ -69,7 +69,7 @@ clean: .PHONY: crd crd: - @kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml 2>&1 | grep -v "already exists" || true + @kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml 2>&1 | grep -v "already exists" || true .PHONY: generate generate: diff --git a/README.md b/README.md index ebc7e9b9f..92d0b2eed 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,25 @@ The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/). -At this point, it has [OpenTelemetry Service](https://github.com/open-telemetry/opentelemetry-service) as the only managed component. +At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) as the only managed component. ## Getting started To install the operator, run: ``` -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/operator.yaml ``` -Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Service (otelsvc) instance, like: +Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like: ``` kubectl apply -f - < 0 { - if otelsvc.Status.Version != currentVersions.OpenTelemetryService { + if len(otelcol.Status.Version) > 0 { + if otelcol.Status.Version != currentVersions.OpenTelemetryCollector { // in theory, the version from the Status could be higher than currentVersions.Jaeger, but we let the upgrade routine // check/handle it - u, err := upgrade.ManagedInstance(ctx, r.client, otelsvc) + u, err := upgrade.ManagedInstance(ctx, r.client, otelcol) if err != nil { return err } - otelsvc = u + otelcol = u upgraded = true } } // at this point, the Jaeger we are managing is in sync with the Operator's version // if this is a new object, no upgrade was made, so, we just set the version - otelsvc.Status.Version = version.Get().OpenTelemetryService + otelcol.Status.Version = version.Get().OpenTelemetryCollector if upgraded { - logger.V(2).Info("managed instance upgraded", "version", otelsvc.Status.Version) + logger.V(2).Info("managed instance upgraded", "version", otelcol.Status.Version) } return nil diff --git a/pkg/controller/opentelemetryservice/upgrade_test.go b/pkg/controller/opentelemetrycollector/upgrade_test.go similarity index 80% rename from pkg/controller/opentelemetryservice/upgrade_test.go rename to pkg/controller/opentelemetrycollector/upgrade_test.go index 5a89ff0e3..26b44f84e 100644 --- a/pkg/controller/opentelemetryservice/upgrade_test.go +++ b/pkg/controller/opentelemetrycollector/upgrade_test.go @@ -1,4 +1,4 @@ -package opentelemetryservice +package opentelemetrycollector import ( "context" @@ -15,8 +15,8 @@ import ( func TestApplyUpgrades(t *testing.T) { // prepare - instance := &v1alpha1.OpenTelemetryService{ - Status: v1alpha1.OpenTelemetryServiceStatus{ + instance := &v1alpha1.OpenTelemetryCollector{ + Status: v1alpha1.OpenTelemetryCollectorStatus{ Version: "0.0.1", }, } @@ -31,5 +31,5 @@ func TestApplyUpgrades(t *testing.T) { // verify assert.NoError(t, err) assert.NotEqual(t, "0.0.1", instance.Status.Version) - assert.Equal(t, version.Get().OpenTelemetryService, instance.Status.Version) + assert.Equal(t, version.Get().OpenTelemetryCollector, instance.Status.Version) } diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index 994f40ccf..ab521d8fe 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -12,31 +12,31 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" ) -// ManagedInstances finds all the otelsvc instances for the current operator and upgrades them, if necessary +// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary func ManagedInstances(ctx context.Context, c client.Client) error { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) logger.Info("looking for managed instances to upgrade") - list := &v1alpha1.OpenTelemetryServiceList{} + list := &v1alpha1.OpenTelemetryCollectorList{} if err := c.List(ctx, &client.ListOptions{}, list); err != nil { - return fmt.Errorf("failed to get list of otelsvc instances: %v", err) + return fmt.Errorf("failed to get list of otelcol instances: %v", err) } for _, j := range list.Items { - otelsvc, err := ManagedInstance(ctx, c, &j) + otelcol, err := ManagedInstance(ctx, c, &j) if err != nil { // nothing to do at this level, just go to the next instance continue } - if !reflect.DeepEqual(otelsvc, j) { + if !reflect.DeepEqual(otelcol, j) { // the CR has changed, store it! - if err := c.Update(ctx, otelsvc); err != nil { - logger.Error(err, "failed to store the upgraded otelsvc instances", "name", otelsvc.Name, "namespace", otelsvc.Namespace) + if err := c.Update(ctx, otelcol); err != nil { + logger.Error(err, "failed to store the upgraded otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return err } - logger.Info("instance upgraded", "name", otelsvc.Name, "namespace", otelsvc.Namespace) + logger.Info("instance upgraded", "name", otelcol.Name, "namespace", otelcol.Namespace) } } @@ -47,24 +47,24 @@ func ManagedInstances(ctx context.Context, c client.Client) error { return nil } -// ManagedInstance performs the necessary changes to bring the given otelsvc instance to the current version -func ManagedInstance(ctx context.Context, client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { +// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version +func ManagedInstance(ctx context.Context, client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - if v, ok := versions[otelsvc.Status.Version]; ok { + if v, ok := versions[otelcol.Status.Version]; ok { // we don't need to run the upgrade function for the version 'v', only the next ones for n := v.next; n != nil; n = n.next { // performs the upgrade to version 'n' - upgraded, err := n.upgrade(client, otelsvc) + upgraded, err := n.upgrade(client, otelcol) if err != nil { - logger.Error(err, "failed to upgrade managed otelsvc instances", "name", otelsvc.Name, "namespace", otelsvc.Namespace) - return otelsvc, err + logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) + return otelcol, err } upgraded.Status.Version = n.v - otelsvc = upgraded + otelcol = upgraded } } - return otelsvc, nil + return otelcol, nil } diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go index 3a17ffceb..793483adc 100644 --- a/pkg/upgrade/upgrade_test.go +++ b/pkg/upgrade/upgrade_test.go @@ -21,7 +21,7 @@ func TestVersionUpgradeToLatest(t *testing.T) { ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) nsn := types.NamespacedName{Name: "my-instance"} - existing := &v1alpha1.OpenTelemetryService{ + existing := &v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, @@ -32,8 +32,8 @@ func TestVersionUpgradeToLatest(t *testing.T) { s := scheme.Scheme s.AddKnownTypes(v1alpha1.SchemeGroupVersion, - &v1alpha1.OpenTelemetryService{}, - &v1alpha1.OpenTelemetryServiceList{}, + &v1alpha1.OpenTelemetryCollector{}, + &v1alpha1.OpenTelemetryCollectorList{}, ) cl := fake.NewFakeClient(objs...) @@ -41,7 +41,7 @@ func TestVersionUpgradeToLatest(t *testing.T) { assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted := &v1alpha1.OpenTelemetryService{} + persisted := &v1alpha1.OpenTelemetryCollector{} assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) assert.Equal(t, latest.v, persisted.Status.Version) } @@ -50,7 +50,7 @@ func TestUnknownVersion(t *testing.T) { // prepare ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) nsn := types.NamespacedName{Name: "my-instance"} - existing := &v1alpha1.OpenTelemetryService{ + existing := &v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, @@ -61,8 +61,8 @@ func TestUnknownVersion(t *testing.T) { s := scheme.Scheme s.AddKnownTypes(v1alpha1.SchemeGroupVersion, - &v1alpha1.OpenTelemetryService{}, - &v1alpha1.OpenTelemetryServiceList{}, + &v1alpha1.OpenTelemetryCollector{}, + &v1alpha1.OpenTelemetryCollectorList{}, ) cl := fake.NewFakeClient(objs...) @@ -70,7 +70,7 @@ func TestUnknownVersion(t *testing.T) { assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted := &v1alpha1.OpenTelemetryService{} + persisted := &v1alpha1.OpenTelemetryCollector{} assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) assert.Equal(t, "0.0.0", persisted.Status.Version) } diff --git a/pkg/upgrade/v0_0_2.go b/pkg/upgrade/v0_0_2.go index 94c019ebc..843e7a4c4 100644 --- a/pkg/upgrade/v0_0_2.go +++ b/pkg/upgrade/v0_0_2.go @@ -6,8 +6,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" ) -func upgrade0_0_2(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { +func upgrade0_0_2(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // this has the same content as `noop`, but it's added a separate function // to serve as template for versions with an actual upgrade procedure - return otelsvc, nil + return otelcol, nil } diff --git a/pkg/upgrade/versions.go b/pkg/upgrade/versions.go index 136bff32d..38a781e76 100644 --- a/pkg/upgrade/versions.go +++ b/pkg/upgrade/versions.go @@ -8,7 +8,7 @@ import ( type version struct { v string - upgrade func(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) + upgrade func(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) next *version } @@ -24,6 +24,6 @@ var ( } ) -func noop(client client.Client, otelsvc *v1alpha1.OpenTelemetryService) (*v1alpha1.OpenTelemetryService, error) { - return otelsvc, nil +func noop(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + return otelcol, nil } diff --git a/pkg/version/main.go b/pkg/version/main.go index 9482cdf8b..e8652a220 100644 --- a/pkg/version/main.go +++ b/pkg/version/main.go @@ -10,45 +10,45 @@ import ( var ( version string buildDate string - otelSvc string + otelCol string ) // Version holds this Operator's version as well as the version of some of the components it uses type Version struct { - Operator string `json:"opentelemetry-operator"` - BuildDate string `json:"build-date"` - OpenTelemetryService string `json:"opentelemetry-service-version"` - Go string `json:"go-version"` - OperatorSdk string `json:"operator-sdk-version"` + Operator string `json:"opentelemetry-operator"` + BuildDate string `json:"build-date"` + OpenTelemetryCollector string `json:"opentelemetry-collector-version"` + Go string `json:"go-version"` + OperatorSdk string `json:"operator-sdk-version"` } // Get returns the Version object with the relevant information func Get() Version { return Version{ - Operator: version, - BuildDate: buildDate, - OpenTelemetryService: DefaultOpenTelemetryService(), - Go: runtime.Version(), - OperatorSdk: sdkVersion.Version, + Operator: version, + BuildDate: buildDate, + OpenTelemetryCollector: DefaultOpenTelemetryCollector(), + Go: runtime.Version(), + OperatorSdk: sdkVersion.Version, } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryService='%v', Go='%v', OperatorSDK='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', OperatorSDK='%v')", v.Operator, v.BuildDate, - v.OpenTelemetryService, + v.OpenTelemetryCollector, v.Go, v.OperatorSdk, ) } -// DefaultOpenTelemetryService returns the default OpenTelemetryService to use when no versions are specified via CLI or configuration -func DefaultOpenTelemetryService() string { - if len(otelSvc) > 0 { +// DefaultOpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration +func DefaultOpenTelemetryCollector() string { + if len(otelCol) > 0 { // this should always be set, as it's specified during the build - return otelSvc + return otelCol } // fallback value, useful for tests diff --git a/pkg/version/main_test.go b/pkg/version/main_test.go index cc0b256f1..fdd6a8c86 100644 --- a/pkg/version/main_test.go +++ b/pkg/version/main_test.go @@ -6,14 +6,14 @@ import ( "gotest.tools/assert" ) -func TestDefaultOpenTelemetryService(t *testing.T) { - assert.Equal(t, "0.0.0", DefaultOpenTelemetryService()) +func TestDefaultOpenTelemetryCollector(t *testing.T) { + assert.Equal(t, "0.0.0", DefaultOpenTelemetryCollector()) } -func TestCurrentOpenTelemetryService(t *testing.T) { - otelSvc = "0.0.2" // set during the build +func TestCurrentOpenTelemetryCollector(t *testing.T) { + otelCol = "0.0.2" // set during the build defer func() { - otelSvc = "" + otelCol = "" }() - assert.Equal(t, "0.0.2", Get().OpenTelemetryService) + assert.Equal(t, "0.0.2", Get().OpenTelemetryCollector) } From 19bdf0342b09292807aafc90834e8e202e019923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 27 Sep 2019 16:33:31 +0200 Subject: [PATCH 0018/1234] Implemented deployment mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ...y_v1alpha1_opentelemetrycollector_crd.yaml | 5 + examples/daemonset.yaml | 21 ++ opentelemetry.version | 2 +- pkg/apis/opentelemetry/const.go | 9 + pkg/apis/opentelemetry/flagset.go | 5 + .../v1alpha1/opentelemetrycollector_types.go | 6 + .../v1alpha1/zz_generated.openapi.go | 6 + .../opentelemetrycollector/reconcile.go | 1 + .../reconcile_daemonset.go | 208 ++++++++++++++++++ .../reconcile_daemonset_test.go | 194 ++++++++++++++++ .../reconcile_deployment.go | 15 +- .../reconcile_deployment_test.go | 29 ++- 12 files changed, 494 insertions(+), 7 deletions(-) create mode 100644 examples/daemonset.yaml create mode 100644 pkg/controller/opentelemetrycollector/reconcile_daemonset.go create mode 100644 pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml b/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml index 2654eff91..42d0f0a31 100644 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml +++ b/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml @@ -44,6 +44,11 @@ spec: type: string image: type: string + mode: + enum: + - daemonset + - deployment + type: string replicas: format: int32 type: integer diff --git a/examples/daemonset.yaml b/examples/daemonset.yaml new file mode 100644 index 000000000..8cb9f529e --- /dev/null +++ b/examples/daemonset.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: otelcol-as-daemonset +spec: + mode: daemonset + config: | + receivers: + jaeger: + + processors: + queued-retry: + + exporters: + logging: + + pipelines: + traces: + receivers: [jaeger] + processors: [queued-retry] + exporters: [logging] diff --git a/opentelemetry.version b/opentelemetry.version index 391de77ca..11f4b718c 100644 --- a/opentelemetry.version +++ b/opentelemetry.version @@ -2,4 +2,4 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-service=0.0.2 +opentelemetry-collector=0.0.2 diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go index 90f92875c..17e4b34c3 100644 --- a/pkg/apis/opentelemetry/const.go +++ b/pkg/apis/opentelemetry/const.go @@ -3,6 +3,9 @@ package opentelemetry type ( // ContextEntry represents a key in the context map ContextEntry string + + // Mode represents how the collector should be deployed (deployment vs. daemonset) + Mode string ) const ( @@ -12,6 +15,12 @@ const ( // ContextLogger represents the context entry for the logger instance to be used for context-dependent log entries ContextLogger ContextEntry = "__logger" + // ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet + ModeDaemonSet Mode = "daemonset" + + // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment + ModeDeployment Mode = "deployment" + // CollectorConfigMapEntry represents the configuration file name for the collector CollectorConfigMapEntry = "collector.yaml" diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go index d2c489170..2e64b3b5d 100644 --- a/pkg/apis/opentelemetry/flagset.go +++ b/pkg/apis/opentelemetry/flagset.go @@ -29,3 +29,8 @@ func FlagSet() *pflag.FlagSet { return fs } + +// ResetFlagSet will set the cached flagset to nil +func ResetFlagSet() { + fs = nil +} diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 8a9bbf926..2d7ddcb0c 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -2,6 +2,8 @@ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" ) // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector @@ -18,6 +20,10 @@ type OpenTelemetryCollectorSpec struct { // +optional Image string `json:"image,omitempty"` + + // +optional + // +kubebuilder:validation:Enum=daemonset,deployment + Mode opentelemetry.Mode `json:"mode,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index ebf28c0d4..79a2ccb88 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -97,6 +97,12 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo Format: "", }, }, + "mode": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index 4752d6795..1b493da19 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -40,6 +40,7 @@ func New(client client.Client, scheme *runtime.Scheme) *ReconcileOpenTelemetryCo r.reconcileConfigMap, r.reconcileService, r.reconcileDeployment, + r.reconcileDaemonSet, } return r diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go new file mode 100644 index 000000000..ecd54380b --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -0,0 +1,208 @@ +package opentelemetrycollector + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + "github.com/spf13/viper" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// reconcileDaemonSet reconciles the daemonSet(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryCollector) reconcileDaemonSet(ctx context.Context) error { + desired := daemonSets(ctx) + + // first, handle the create/update parts + if err := r.reconcileExpectedDaemonSets(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected daemonSets: %v", err) + } + + // then, delete the extra objects + if err := r.deleteDaemonSets(ctx, desired); err != nil { + return fmt.Errorf("failed to reconcile the daemonSets to be deleted: %v", err) + } + + return nil +} + +func daemonSets(ctx context.Context) []*appsv1.DaemonSet { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + + var desired []*appsv1.DaemonSet + if instance.Spec.Mode == opentelemetry.ModeDaemonSet { + desired = append(desired, daemonSet(ctx)) + } + + return desired +} + +func daemonSet(ctx context.Context) *appsv1.DaemonSet { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + name := fmt.Sprintf("%s-collector", instance.Name) + + image := instance.Spec.Image + if len(image) == 0 { + image = viper.GetString(opentelemetry.OtelColImageConfigKey) + } + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + specAnnotations := instance.Annotations + if specAnnotations == nil { + specAnnotations = map[string]string{} + } + + specAnnotations["prometheus.io/scrape"] = "true" + specAnnotations["prometheus.io/port"] = "8888" + specAnnotations["prometheus.io/path"] = "/metrics" + + argsMap := instance.Spec.Args + if argsMap == nil { + argsMap = map[string]string{} + } + + if _, exists := argsMap["config"]; exists { + logger.Info("the 'config' flag isn't allowed and is being ignored") + } + + // this effectively overrides any 'config' entry that might exist in the CR + argsMap["config"] = fmt.Sprintf("/conf/%s", opentelemetry.CollectorConfigMapEntry) + + var args []string + for k, v := range argsMap { + args = append(args, fmt.Sprintf("--%s=%s", k, v)) + } + + return &appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Spec: appsv1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: specAnnotations, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "opentelemetry-collector", + Image: image, + VolumeMounts: []corev1.VolumeMount{{ + Name: name, + MountPath: "/conf", + }}, + Args: args, + }}, + Volumes: []corev1.Volume{{ + Name: name, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: name}, + Items: []corev1.KeyToPath{{ + Key: opentelemetry.CollectorConfigMapEntry, + Path: opentelemetry.CollectorConfigMapEntry, + }}, + }, + }, + }}, + }, + }, + }, + } +} + +func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx context.Context, expected []*appsv1.DaemonSet) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + for _, obj := range expected { + desired := obj + r.setControllerReference(ctx, desired) + + existing := &appsv1.DaemonSet{} + err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + if err != nil && errors.IsNotFound(err) { + if err := r.client.Create(ctx, desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to get: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := r.client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %v", err) + } + logger.V(2).Info("applied", "daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, expected []*appsv1.DaemonSet) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }) + list := &appsv1.DaemonSetList{} + if err := r.client.List(ctx, opts, list); err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := r.client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "daemonSet.name", existing.Name, "daemonSet.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go new file mode 100644 index 000000000..94dc2609b --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -0,0 +1,194 @@ +package opentelemetrycollector + +import ( + "context" + "fmt" + "testing" + + "github.com/spf13/viper" + "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestProperDaemonSet(t *testing.T) { + // test + d := daemonSet(ctx) + + // verify + assert.Equal(t, d.Name, "my-otelcol-collector") + assert.Equal(t, d.Annotations["custom-annotation"], "custom-annotation-value") + assert.Equal(t, d.Labels["custom-label"], "custom-value") + assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) +} + +func TestProperDaemonSets(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryCollector{} + instance.Spec.Mode = opentelemetry.ModeDaemonSet + ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) + + // test + d := daemonSets(ctx) + + // verify + assert.Len(t, d, 1) +} + +func TestNoDaemonSetsWhenModeDaemonSet(t *testing.T) { + // prepare + d := daemonSets(ctx) + + // verify + assert.Len(t, d, 0) +} + +func TestDaemonSetOverridesConfig(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{"config": "custom-path"}, + Mode: opentelemetry.ModeDaemonSet, + }, + } + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + // test + d := daemonSet(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Len(t, d.Spec.Template.Spec.Containers[0].Args, 1) + assert.Contains(t, d.Spec.Template.Spec.Containers[0].Args[0], "/conf/collector.yaml") +} + +func TestProperReconcileDaemonSet(t *testing.T) { + // prepare + instance := *instance + instance.Spec.Mode = opentelemetry.ModeDaemonSet + cl := fake.NewFakeClient(&instance) + reconciler := New(cl, schem) + req := reconcile.Request{} + + // test + reconciler.Reconcile(req) + + // verify + list := &appsv1.DaemonSetList{} + cl.List(ctx, client.InNamespace(instance.Namespace), list) + + // we assert the correctness of the service in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test + assert.Len(t, list.Items[0].OwnerReferences, 1) +} + +func TestOverrideDaemonSetImageFromCustomResource(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "myrepo/custom-image:version", + Mode: opentelemetry.ModeDaemonSet, + }, + } + ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) + + // test + d := daemonSet(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "myrepo/custom-image:version", d.Spec.Template.Spec.Containers[0].Image) +} + +func TestOverrideDaemonSetImageFromCLI(t *testing.T) { + // prepare + viper.Set(opentelemetry.OtelColImageConfigKey, "myrepo/custom-image-cli:version") + defer viper.Reset() + defer opentelemetry.ResetFlagSet() + + // test + d := daemonSet(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "myrepo/custom-image-cli:version", d.Spec.Template.Spec.Containers[0].Image) +} + +func TestDefaultDaemonSetImage(t *testing.T) { + // prepare + opentelemetry.FlagSet() + defer opentelemetry.ResetFlagSet() + + // test + d := daemonSet(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Contains(t, d.Spec.Template.Spec.Containers[0].Image, "quay.io/opentelemetry/opentelemetry-collector") +} + +func TestUpdateDaemonSet(t *testing.T) { + // prepare + instance := *instance + instance.Spec.Mode = opentelemetry.ModeDaemonSet + cl := fake.NewFakeClient(&instance) + reconciler := New(cl, schem) + req := reconcile.Request{} + reconciler.Reconcile(req) + + // sanity check + name := fmt.Sprintf("%s-collector", instance.Name) + persisted := &appsv1.DaemonSet{} + err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + assert.NoError(t, err) + + // prepare the test object + updated := instance + updated.Spec.Image = "custom-image" + + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + // test + reconciler.reconcileDaemonSet(ctx) + + // verify + persisted = &appsv1.DaemonSet{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) + assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) +} + +func TestDeleteExtraDaemonSet(t *testing.T) { + // prepare + c := daemonSet(ctx) + c.Name = "extra-daemonSet" + + cl := fake.NewFakeClient(c) + reconciler := New(cl, schem) + + // sanity check + persisted := &appsv1.DaemonSet{} + assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + + // test + err := reconciler.reconcileDaemonSet(ctx) + assert.NoError(t, err) + + // verify + persisted = &appsv1.DaemonSet{} + err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + + assert.Empty(t, persisted.Name) + assert.Error(t, err) // not found +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index f869dccd6..df360f2f8 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -19,9 +19,7 @@ import ( // reconcileDeployment reconciles the deployment(s) required for the instance in the current context func (r *ReconcileOpenTelemetryCollector) reconcileDeployment(ctx context.Context) error { - desired := []*appsv1.Deployment{ - deployment(ctx), - } + desired := deployments(ctx) // first, handle the create/update parts if err := r.reconcileExpectedDeployments(ctx, desired); err != nil { @@ -36,6 +34,17 @@ func (r *ReconcileOpenTelemetryCollector) reconcileDeployment(ctx context.Contex return nil } +func deployments(ctx context.Context) []*appsv1.Deployment { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + + var desired []*appsv1.Deployment + if len(instance.Spec.Mode) == 0 || instance.Spec.Mode == opentelemetry.ModeDeployment { + desired = append(desired, deployment(ctx)) + } + + return desired +} + func deployment(ctx context.Context) *appsv1.Deployment { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index c0444acaf..51b1c595d 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -29,6 +29,27 @@ func TestProperDeployment(t *testing.T) { assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) } +func TestProperDeployments(t *testing.T) { + // test + d := deployments(ctx) + + // verify + assert.Len(t, d, 1) +} + +func TestNoDeploymentsWhenModeDaemonSet(t *testing.T) { + // test + instance := &v1alpha1.OpenTelemetryCollector{} + instance.Spec.Mode = opentelemetry.ModeDaemonSet + ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) + + // prepare + d := deployments(ctx) + + // verify + assert.Len(t, d, 0) +} + func TestDeploymentOverridesConfig(t *testing.T) { // prepare instance := &v1alpha1.OpenTelemetryCollector{ @@ -66,7 +87,7 @@ func TestProperReconcileDeployment(t *testing.T) { assert.Len(t, list.Items[0].OwnerReferences, 1) } -func TestOverrideImageFromCustomResource(t *testing.T) { +func TestOverrideDeploymentImageFromCustomResource(t *testing.T) { // prepare instance := &v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ @@ -83,10 +104,11 @@ func TestOverrideImageFromCustomResource(t *testing.T) { assert.Equal(t, "myrepo/custom-image:version", d.Spec.Template.Spec.Containers[0].Image) } -func TestOverrideImageFromCLI(t *testing.T) { +func TestOverrideDeploymentImageFromCLI(t *testing.T) { // prepare viper.Set(opentelemetry.OtelColImageConfigKey, "myrepo/custom-image-cli:version") defer viper.Reset() + defer opentelemetry.ResetFlagSet() // test d := deployment(ctx) @@ -96,9 +118,10 @@ func TestOverrideImageFromCLI(t *testing.T) { assert.Equal(t, "myrepo/custom-image-cli:version", d.Spec.Template.Spec.Containers[0].Image) } -func TestDefaultImage(t *testing.T) { +func TestDefaultDeploymentImage(t *testing.T) { // prepare opentelemetry.FlagSet() + defer opentelemetry.ResetFlagSet() // test d := deployment(ctx) From ce0c8c7d21485c2fed2a58f0b930c9ee44a0a12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 1 Oct 2019 15:37:10 +0200 Subject: [PATCH 0019/1234] Added documentation about the deployment mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92d0b2eed..9303a1aa6 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-ope Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like: -``` -kubectl apply -f - < Date: Mon, 7 Oct 2019 13:59:57 +0200 Subject: [PATCH 0020/1234] Fixed readme's mention to the exporter being used in the example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9303a1aa6..9953c1763 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ spec: EOF ``` -This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `jaeger-grpc` to a remote Jaeger collector. +This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `logging`, which writes the spans to the console (`stdout`) of the OpenTelemetry Collector instance that receives the span. The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) documentation for a reference of the possible entries. From 61ab031684e045713c43221af6eb9037c0295859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 7 Oct 2019 14:09:17 +0200 Subject: [PATCH 0021/1234] Updated operator.yaml to use 0.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- deploy/operator.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a1776f271..2ebd21449 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ build: format .PHONY: container container: - @echo Building container... + @echo Building container ${BUILD_IMAGE}... @mkdir -p build/_output @docker build -f build/Dockerfile -t ${BUILD_IMAGE} . > build/_output/build-container.log 2>&1 diff --git a/deploy/operator.yaml b/deploy/operator.yaml index e51178805..d0dc83691 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: opentelemetry-operator containers: - name: opentelemetry-operator - image: quay.io/jpkroehling/opentelemetry-operator:latest + image: quay.io/jpkroehling/opentelemetry-operator:v0.0.2 command: - opentelemetry-operator imagePullPolicy: Always From b4aa987026aeb77fc2663837824f59547384ff12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 7 Oct 2019 14:12:23 +0200 Subject: [PATCH 0022/1234] Updated operator.yaml to use image from the opentelemetry namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- deploy/operator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/operator.yaml b/deploy/operator.yaml index d0dc83691..915eb50c5 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: opentelemetry-operator containers: - name: opentelemetry-operator - image: quay.io/jpkroehling/opentelemetry-operator:v0.0.2 + image: quay.io/opentelemetry/opentelemetry-operator:v0.0.2 command: - opentelemetry-operator imagePullPolicy: Always From 1f41d1e952dcefd8f39d1fc1f035f20a6fac476c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 14 Oct 2019 17:23:37 +0200 Subject: [PATCH 0023/1234] Upgraded to Operator SDK 0.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 2 +- ...metry.io_opentelemetrycollectors_crd.yaml} | 9 +- go.mod | 44 ++- go.sum | 251 ++++++++++++++++++ .../v1alpha1/opentelemetrycollector_types.go | 2 +- .../v1alpha1/zz_generated.openapi.go | 6 +- .../reconcile_configmap.go | 13 +- .../reconcile_configmap_test.go | 2 +- .../reconcile_daemonset.go | 13 +- .../reconcile_daemonset_test.go | 2 +- .../reconcile_deployment.go | 13 +- .../reconcile_deployment_test.go | 2 +- .../reconcile_service.go | 13 +- .../reconcile_service_test.go | 2 +- pkg/upgrade/upgrade.go | 2 +- 15 files changed, 323 insertions(+), 53 deletions(-) rename deploy/crds/{opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml => opentelemetry.io_opentelemetrycollectors_crd.yaml} (82%) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 5a2da22ba..4960f974c 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v1 - uses: jpkrohling/setup-operator-sdk@v1-release with: - operator-sdk-version: v0.10.0 + operator-sdk-version: v0.11.0 - name: "basic checks" run: ./.ci/script.sh diff --git a/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml similarity index 82% rename from deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml rename to deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index 42d0f0a31..e1dbbdd8e 100644 --- a/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -20,6 +20,8 @@ spec: status: {} validation: openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -34,17 +36,19 @@ spec: metadata: type: object spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector properties: args: additionalProperties: type: string type: object config: - description: +required type: string image: type: string mode: + description: Mode represents how the collector should be deployed (deployment + vs. daemonset) enum: - daemonset - deployment @@ -54,6 +58,8 @@ spec: type: integer type: object status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector properties: replicas: format: int32 @@ -64,6 +70,7 @@ spec: - replicas - version type: object + type: object version: v1alpha1 versions: - name: v1alpha1 diff --git a/go.mod b/go.mod index 7d311634c..9d2d7b412 100644 --- a/go.mod +++ b/go.mod @@ -2,14 +2,13 @@ module github.com/open-telemetry/opentelemetry-operator require ( github.com/Azure/go-autorest v13.0.1+incompatible // indirect - github.com/NYTimes/gziphandler v1.0.1 // indirect github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 github.com/golang/protobuf v1.3.2 // indirect github.com/jaegertracing/jaeger-operator v1.14.0 github.com/onsi/ginkgo v1.10.1 // indirect github.com/onsi/gomega v1.7.0 // indirect - github.com/operator-framework/operator-sdk v0.10.1-0.20190827134739-8e55eb7da610 + github.com/operator-framework/operator-sdk v0.11.1-0.20191012024916-f419ad3f3dc5 github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.3.2 github.com/stretchr/testify v1.4.0 @@ -17,36 +16,35 @@ require ( golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 // indirect golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 // indirect - golang.org/x/text v0.3.2 // indirect golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 // indirect gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gotest.tools v2.2.0+incompatible - k8s.io/api v0.0.0-20190612125737-db0771252981 - k8s.io/apimachinery v0.0.0-20190612125636-6a5db36e93ad - k8s.io/client-go v11.0.0+incompatible - k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 - sigs.k8s.io/controller-runtime v0.1.12 - sigs.k8s.io/controller-tools v0.1.10 + k8s.io/api v0.0.0-20190918155943-95b840bb6a1f + k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655 + k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible + k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c + sigs.k8s.io/controller-runtime v0.2.0 + sigs.k8s.io/controller-tools v0.2.0 ) -// Pinned to kubernetes-1.13.4 +// Pinned to kubernetes-1.14.1 replace ( - k8s.io/api => k8s.io/api v0.0.0-20190222213804-5cb15d344471 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 - k8s.io/client-go => k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 + k8s.io/api => k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d + k8s.io/client-go => k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible + k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190409023720-1bc0c81fa51d ) replace ( - github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.29.0 - // Pinned to v2.9.2 (kubernetes-1.13.1) so https://proxy.golang.org can + // Indirect operator-sdk dependencies use git.apache.org, which is frequently + // down. The github mirror should be used instead. + // Locking to a specific version (from 'go mod graph'): + git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 + github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.31.1 + // Pinned to v2.10.0 (kubernetes-1.14.1) so https://proxy.golang.org can // resolve it correctly. - github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190424153033-d3245f150225 - k8s.io/kube-state-metrics => k8s.io/kube-state-metrics v1.6.0 - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.1.12 - sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde + github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190525122359-d20e84d0fb64 ) -replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.10.0 - -replace git.apache.org/thrift.git => github.com/apache/thrift v0.12.0 +replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.11.0 diff --git a/go.sum b/go.sum index c509393bf..4842f2dcb 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,12 @@ dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= +github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= +github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v13.0.1+incompatible h1:wRg6hB3T3dp7qjj5v3NmVsdU9IyXodW+SQnN9xlpGEA= @@ -34,12 +38,16 @@ github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0Sub github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= @@ -49,27 +57,51 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= +github.com/a8m/mark v0.1.1-0.20170507133748-44f2db618845/go.mod h1:c8Mh99Cw82nrsAnPgxQSZHkswVOJF7/MqZb1ZdvriLM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= +github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSepE2OqVu0Pn1CbDw9IuMlONapol0zuwk= github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.15.24/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8/go.mod h1:Iev9Q3MErcn+w3UOJD/DkEzllvugfdx7bGcMOFhvr/4= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/cenk/backoff v2.0.0+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20180905225744-ee1a9a0726d2/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68mZX1lGBkTWyp3CLcenw9I94W2dLeRvMzcn9N4= +github.com/cockroachdb/cockroach v0.0.0-20170608034007-84bc9597164f/go.mod h1:xeT/CQ0qZHangbYbWShlCGAx31aV4AjGswDUjhKS6HQ= +github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.12+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -78,6 +110,9 @@ github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= +github.com/coreos/prometheus-operator v0.31.1 h1:+pS6+Ha01vuoGBh5glhfngk2sB1ELwe6tbXhMkMmp/U= +github.com/coreos/prometheus-operator v0.31.1/go.mod h1:vHwtP2e+VmEeS6m6lgp87aH+npGVRQsCi5jhcuQA1sA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -86,6 +121,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20180612054059-a9fbbdc8dd87/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -94,11 +130,14 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/elastic/gosigar v0.9.0/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.6.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.8.1+incompatible h1:AyDqLHbJ1quqbWr/OWDw+PlIP8ZFoTmYrGYaxzrLbNg= github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -107,23 +146,34 @@ github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structtag v1.0.0/go.mod h1:IKitwq45uXL/yqi5mYghiD3w9H6eTOvI9vnk8tXMphA= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gernest/wow v0.1.0/go.mod h1:dEPabJRi5BneI1Nev1VWo0ZlcTWibHWp43qxKms4elY= +github.com/getsentry/raven-go v0.1.2/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= @@ -154,10 +204,18 @@ github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= +github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -167,6 +225,7 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= @@ -181,35 +240,46 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20180605153948-8b03ce837f34/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/gophercloud/gophercloud v0.0.0-20180330165814-781450b3c4fc/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= +github.com/gophercloud/gophercloud v0.0.0-20190301152420-fca40860790e/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855 h1:3dfUujjROkkXcwIpsh9z6bjOhPFooLpxejc7qgX13/g= github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= +github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -217,7 +287,9 @@ github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20181025070259-68e3a13e4117/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= @@ -226,12 +298,35 @@ github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= +github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -240,10 +335,17 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/improbable-eng/thanos v0.5.0/go.mod h1:RXlsWB7YlTbhIod//QDyd5cBZsnEN0jROXZJY/ol4nk= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= +github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jaegertracing/jaeger-operator v1.14.0 h1:hJUWS+DYD9GGO72LyJHVSSNyoex4jcsMxKtnp/RxK8E= github.com/jaegertracing/jaeger-operator v1.14.0/go.mod h1:NOl6opNb5Jg7tECsLvIr9xRhAecLcxt84gfCmghjkgM= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -251,10 +353,15 @@ github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBv github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knz/strtime v0.0.0-20181018220328-af2256ee352c/go.mod h1:4ZxfWkxwtc7dBeifERVVWRy9F9rTU9p0yCDgeCtlius= github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -266,6 +373,12 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lightstep/lightstep-tracer-go v0.15.6/go.mod h1:6AMpwZpsyCFwSovxzM78e+AsYxE8sGwiM6C3TytaWeI= +github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -276,29 +389,53 @@ github.com/markbates/inflect v1.0.4 h1:5fh1gzTFhfae06u3hzHYO9xe3l3v3nW5Pwt3naLTP github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.10/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/cli v1.20.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= +github.com/minio/minio-go/v6 v6.0.27-0.20190529152532-de69c0e465ed/go.mod h1:vaNT59cWULS37E+E9zkuN/BVnKHyXtVGS+b04Boc66Y= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/mozillazg/go-cos v0.12.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= +github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= @@ -308,6 +445,7 @@ github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -316,17 +454,27 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/openshift/api v0.0.0-20180830153656-5ad8479f64f1/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= +github.com/opentracing-contrib/go-stdlib v0.0.0-20170113013457-1de4cc2120e7/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/operator-framework/go-appr v0.0.0-20180917210448-f2aef88446f2/go.mod h1:YNzwUx1i6C4dXWcffyq3yaIb0rh/K8/OvQ4vG0SNlSw= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190125151539-1e295784b30a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= +github.com/operator-framework/operator-marketplace v0.0.0-20190216021216-57300a3ef3ba/go.mod h1:msZSL8pXwzQjB+hU+awVrZQw94IwJi3sNZVD3NoESIs= github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd52LG3YQ0jtwiwEGdm98S1TH5P4RAA= github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= +github.com/operator-framework/operator-registry v1.1.1/go.mod h1:7D4WEwL+EKti5npUh4/u64DQhawCBRugp8Ql20duUb4= github.com/operator-framework/operator-sdk v0.10.0 h1:k2yovBNxaya06yIkJ1e6lNsqiWjhS32G+d2LUdjuu/E= github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2zCdERf/828Mrftq4u7GS0I68= +github.com/operator-framework/operator-sdk v0.11.0 h1:If0MefBJjPGYAW6Os6azpTMoaFtsSlXRlQctF23/ORs= +github.com/operator-framework/operator-sdk v0.11.0/go.mod h1:Oo+O2br5qR6XSLWY/GgIvTvpsEKtzeWp+I3rHF0WIq8= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -336,6 +484,8 @@ github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUr github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= +github.com/petermattis/goid v0.0.0-20170504144140-0ded85884ba5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= @@ -343,20 +493,29 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -365,7 +524,14 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190203183350-488faf799f86/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4= github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/prometheus v0.0.0-20190525122359-d20e84d0fb64/go.mod h1:oYrT4Vs22/NcnoVYXt5m4cIHP+znvgyusahVpyETKTw= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rlmcpherson/s3gof3r v0.5.0/go.mod h1:s7vv7SMDPInkitQMuZzH615G7yWHdrU2r/Go7Bo71Rs= github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= @@ -373,10 +539,19 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rubenv/sql-migrate v0.0.0-20190618074426-f4d34eae5a5c/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= +github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= @@ -399,14 +574,20 @@ github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1l github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= +github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -414,6 +595,7 @@ github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgK github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -447,6 +629,7 @@ github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= @@ -462,18 +645,26 @@ go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -499,8 +690,11 @@ golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190403144856-b630fd6fe46b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 h1:4dVFTC832rPn4pomLSz1vA+are2+dU19w1H8OngV7nc= golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -512,6 +706,8 @@ golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAG golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -523,29 +719,39 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 h1:wYqz/tQaWUgGKyx+B/rssSE6wkIKdY5Ee6ryOmzarIg= golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -565,11 +771,17 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190213015956-f7e1b50d2251/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190501045030-23463209683d/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 h1:rM1Udd0CgtYI3KUIhu9ROz0QCqjW+n/ODp/hH7c60Xc= golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= +gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -579,6 +791,8 @@ google.golang.org/api v0.3.0 h1:UIJY20OEo3+tK5MBlcdx37kmdH6EnRjGkW78mc6+EeA= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.3.2 h1:iTp+3yyl/KOtxa/d1/JUE0GGSoR6FuW5udver22iwpw= +google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -603,6 +817,7 @@ google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= @@ -610,16 +825,22 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/fsnotify/fsnotify.v1 v1.3.1/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -632,44 +853,74 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYqJLFeWiJ9l4OE= k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b h1:aBGgKJUM9Hk/3AE8WaZIApnTxG35kbuQba2w+SXqezo= +k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 h1:JfFtjaElBIgYKCWEtYQkcNrTpW+lMO4GJy8NP6SVQmM= k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= +k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg= k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d h1:Jmdtdt1ZnoGfWWIIik61Z7nKYgO3J+swQJtPYsP9wHA= +k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= k8s.io/apiserver v0.0.0-20181213151703-3ccfe8365421/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= +k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= k8s.io/cli-runtime v0.0.0-20181213153952-835b10687cb6/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 h1:aE8wOCKuoRs2aU0OP/Rz8SXiAB0FTTku3VtGhhrkSmc= k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible h1:U5Bt+dab9K8qaUmXINrkXO135kA11/i5Kg1RUydgaMQ= +k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/cloud-provider v0.0.0-20190409023720-1bc0c81fa51d/go.mod h1:LlIffnLBu+GG7d4ppPzC8UnA1Ex8S+ntmSRVsnr7Xy4= k8s.io/code-generator v0.0.0-20180823001027-3dcf91f64f63/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= +k8s.io/code-generator v0.0.0-20190311093542-50b561225d70/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a h1:QoHVuRquf80YZ+/bovwxoMO3Q/A3nt3yTgS0/0nejuk= k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= +k8s.io/helm v2.14.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= +k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= +k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c h1:kJCzg2vGCzah5icgkKR7O1Dzn0NA2iGlym27sb0ZfGE= +k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco= k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-state-metrics v1.6.0 h1:6wkxiTPTZ4j+LoMWuT+rZ+OlUWswktzXs5yHmggmAZ0= k8s.io/kube-state-metrics v1.6.0/go.mod h1:84+q9aGVQPzXYGgtvyhZr/fSI6BdLsbPWXn37RASc9k= +k8s.io/kube-state-metrics v1.7.2 h1:6vdtgXrrRRMSgnyDmgua+qvgCYv954JNfxXAtDkeLVQ= +k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E= k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/kubernetes v1.14.2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g90ETOiA6rfLV1Y= +k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +sigs.k8s.io/controller-runtime v0.1.10/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= sigs.k8s.io/controller-runtime v0.1.12 h1:ovDq28E64PeY1yR+6H7DthakIC09soiDCrKvfP2tPYo= sigs.k8s.io/controller-runtime v0.1.12/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= +sigs.k8s.io/controller-runtime v0.2.0 h1:5gL30PXOisGZl+Osi4CmLhvMUj77BO3wJeouKF2va50= +sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4= +sigs.k8s.io/controller-tools v0.1.10/go.mod h1:6g08p9m9G/So3sBc1AOQifHfhxH/mb6Sc4z0LMI8XMw= sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde h1:ZkaHf5rNYzIB6CB82keKMQNv7xxkqT0ylOBdfJPfi+k= sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde/go.mod h1:ATWLRP3WGxuAN9HcT2LaKHReXIH+EZGzRuMHuxjXfhQ= +sigs.k8s.io/controller-tools v0.2.0/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y= +sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 2d7ddcb0c..8671c33ea 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -22,7 +22,7 @@ type OpenTelemetryCollectorSpec struct { Image string `json:"image,omitempty"` // +optional - // +kubebuilder:validation:Enum=daemonset,deployment + // +kubebuilder:validation:Enum=daemonset;deployment Mode opentelemetry.Mode `json:"mode,omitempty"` } diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 79a2ccb88..fafa2ea22 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -22,6 +22,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollector(ref common.Re Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryCollector is the Schema for the opentelemetrycollectors API", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ @@ -65,6 +66,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "config": { SchemaProps: spec.SchemaProps{ @@ -76,6 +78,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo SchemaProps: spec.SchemaProps{ Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -106,7 +109,6 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo }, }, }, - Dependencies: []string{}, } } @@ -115,6 +117,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorStatus(ref com Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector", + Type: []string{"object"}, Properties: map[string]spec.Schema{ "replicas": { SchemaProps: spec.SchemaProps{ @@ -132,6 +135,5 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorStatus(ref com Required: []string{"replicas", "version"}, }, }, - Dependencies: []string{}, } } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go index 893d9c603..3b5a40837 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap.go @@ -106,12 +106,15 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }) + opts := []client.ListOption{ + client.InNamespace(instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } list := &corev1.ConfigMapList{} - if err := r.client.List(ctx, opts, list); err != nil { + if err := r.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index f000b262d..04acd1f2e 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -38,7 +38,7 @@ func TestProperReconcileConfigMap(t *testing.T) { // verify list := &corev1.ConfigMapList{} - cl.List(ctx, client.InNamespace(instance.Namespace), list) + cl.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index ecd54380b..0579ccd33 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -179,12 +179,15 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }) + opts := []client.ListOption{ + client.InNamespace(instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } list := &appsv1.DaemonSetList{} - if err := r.client.List(ctx, opts, list); err != nil { + if err := r.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go index 94dc2609b..40c13aa4f 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -83,7 +83,7 @@ func TestProperReconcileDaemonSet(t *testing.T) { // verify list := &appsv1.DaemonSetList{} - cl.List(ctx, client.InNamespace(instance.Namespace), list) + cl.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index df360f2f8..5995d443a 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -180,12 +180,15 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }) + opts := []client.ListOption{ + client.InNamespace(instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } list := &appsv1.DeploymentList{} - if err := r.client.List(ctx, opts, list); err != nil { + if err := r.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index 51b1c595d..157d66a54 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -78,7 +78,7 @@ func TestProperReconcileDeployment(t *testing.T) { // verify list := &appsv1.DeploymentList{} - cl.List(ctx, client.InNamespace(instance.Namespace), list) + cl.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index 779d6193f..da385fe18 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -131,12 +131,15 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - opts := client.InNamespace(instance.Namespace).MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }) + opts := []client.ListOption{ + client.InNamespace(instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } list := &corev1.ServiceList{} - if err := r.client.List(ctx, opts, list); err != nil { + if err := r.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go index d03fc7515..9237ebf6d 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service_test.go @@ -42,7 +42,7 @@ func TestProperReconcileService(t *testing.T) { // verify list := &corev1.ServiceList{} - cl.List(ctx, client.InNamespace(instance.Namespace), list) + cl.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 2) diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index ab521d8fe..d3d6958ad 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -18,7 +18,7 @@ func ManagedInstances(ctx context.Context, c client.Client) error { logger.Info("looking for managed instances to upgrade") list := &v1alpha1.OpenTelemetryCollectorList{} - if err := c.List(ctx, &client.ListOptions{}, list); err != nil { + if err := c.List(ctx, list); err != nil { return fmt.Errorf("failed to get list of otelcol instances: %v", err) } From e3c6e1e45fcb3323cb2f6189c2c897ed45eb4cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 17 Sep 2019 15:00:28 +0200 Subject: [PATCH 0024/1234] Added support for ServiceMonitors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 7 +- README.md | 23 ++- cmd/manager/main.go | 7 +- go.mod | 2 + go.sum | 3 + pkg/apis/opentelemetry/const.go | 3 + .../opentelemetrycollector/labels.go | 10 +- .../opentelemetrycollector/main_test.go | 13 +- .../opentelemetrycollector_controller.go | 7 +- .../opentelemetrycollector/reconcile.go | 38 ++++- .../reconcile_configmap.go | 10 +- .../reconcile_configmap_test.go | 24 ++- .../reconcile_daemonset.go | 10 +- .../reconcile_daemonset_test.go | 29 ++-- .../reconcile_deployment.go | 10 +- .../reconcile_deployment_test.go | 24 ++- .../reconcile_service.go | 32 +++- .../reconcile_service_test.go | 38 +++-- .../reconcile_servicemonitor.go | 152 ++++++++++++++++++ .../reconcile_servicemonitor_test.go | 109 +++++++++++++ .../opentelemetrycollector/reconcile_test.go | 27 +++- .../opentelemetrycollector/upgrade.go | 2 +- .../opentelemetrycollector/upgrade_test.go | 6 +- 23 files changed, 496 insertions(+), 90 deletions(-) create mode 100644 pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go create mode 100644 pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go diff --git a/Makefile b/Makefile index 2ebd21449..18b44127c 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ clean: .PHONY: crd crd: - @kubectl create -f deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml 2>&1 | grep -v "already exists" || true + @kubectl create -f deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml 2>&1 | grep -v "already exists" || true .PHONY: generate generate: @@ -94,3 +94,8 @@ ci: install-tools ensure-generate-is-noop all install-tools: @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 @go install golang.org/x/tools/cmd/goimports + +.PHONY: install-prometheus-operator +install-prometheus-operator: + @echo Installing Prometheus Operator bundle + @kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml diff --git a/README.md b/README.md index 9953c1763..121547717 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetr To install the operator, run: ``` -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry_v1alpha1_opentelemetrycollector_crd.yaml +kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml @@ -54,6 +54,27 @@ At this point, the Operator does *not* validate the contents of the configuratio The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. +## Prometheus ServiceMonitor objects + +When the Prometheus Operator is available in the same cluster as the OpenTelemetry Operator, the OpenTelemetry Operator will automatically create the relevant `ServiceMonitor` objects: + +* One set for the OpenTelemetry Operator itself +* One set for each managed OpenTelemetry instance + +Refer to the Prometheus Operator for complete instructions on how to do a production-quality installation. For development purposes, the following will do: + +```console +$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.33.0/bundle.yaml +``` + +When deploying the example `simplest.yaml`, the following `ServiceMonitor` will be created once the Prometheus Operator is available: + +```console +$ kubectl get servicemonitors simplest-collector +NAME AGE +simplest-collector 103s +``` + ## Contributing and Developing Please see [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 2f2605e0e..9180df1ed 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -18,6 +18,7 @@ import ( "github.com/operator-framework/operator-sdk/pkg/metrics" "github.com/operator-framework/operator-sdk/pkg/restmapper" "github.com/spf13/pflag" + "github.com/spf13/viper" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client/config" @@ -54,6 +55,8 @@ func printVersion() { } func main() { + ctx := context.Background() + // Add the zap logger flag set to the CLI. The flag set must // be added before calling pflag.Parse(). pflag.CommandLine.AddFlagSet(zap.FlagSet()) @@ -92,7 +95,6 @@ func main() { os.Exit(1) } - ctx := context.Background() // Become the leader before proceeding err = leader.Become(ctx, "opentelemetry-operator-lock") if err != nil { @@ -148,15 +150,18 @@ func main() { // CreateServiceMonitors will automatically create the prometheus-operator ServiceMonitor resources // necessary to configure Prometheus to scrape metrics from this operator. services := []*v1.Service{service} + svcMonitorAvail := true _, err = metrics.CreateServiceMonitors(cfg, namespace, services) if err != nil { log.Info("Could not create ServiceMonitor object", "error", err.Error()) // If this operator is deployed to a cluster without the prometheus-operator running, it will return // ErrServiceMonitorNotPresent, which can be used to safely skip ServiceMonitor creation. if err == metrics.ErrServiceMonitorNotPresent { + svcMonitorAvail = false log.Info("Install prometheus-operator in your cluster to create ServiceMonitor objects", "error", err.Error()) } } + viper.Set(opentelemetry.SvcMonitorAvailable, svcMonitorAvail) log.Info("Starting the Cmd.") diff --git a/go.mod b/go.mod index 9d2d7b412..b712c28bc 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,7 @@ module github.com/open-telemetry/opentelemetry-operator require ( github.com/Azure/go-autorest v13.0.1+incompatible // indirect + github.com/coreos/prometheus-operator v0.29.0 github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 github.com/golang/protobuf v1.3.2 // indirect @@ -20,6 +21,7 @@ require ( gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gotest.tools v2.2.0+incompatible k8s.io/api v0.0.0-20190918155943-95b840bb6a1f + k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783 k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655 k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c diff --git a/go.sum b/go.sum index 4842f2dcb..80c045d32 100644 --- a/go.sum +++ b/go.sum @@ -857,6 +857,7 @@ k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b h1:aBGgKJUM9Hk/3AE8WaZIApnTxG35kbu k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 h1:JfFtjaElBIgYKCWEtYQkcNrTpW+lMO4GJy8NP6SVQmM= k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= +k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8 h1:q1Qvjzs/iEdXF6A1a8H3AKVFDzJNcJn3nXMs6R6qFtA= k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg= k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= @@ -919,7 +920,9 @@ sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5F sigs.k8s.io/controller-tools v0.1.10/go.mod h1:6g08p9m9G/So3sBc1AOQifHfhxH/mb6Sc4z0LMI8XMw= sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde h1:ZkaHf5rNYzIB6CB82keKMQNv7xxkqT0ylOBdfJPfi+k= sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde/go.mod h1:ATWLRP3WGxuAN9HcT2LaKHReXIH+EZGzRuMHuxjXfhQ= +sigs.k8s.io/controller-tools v0.2.0 h1:AmQ/0JKBJAjyAiPAkrAf9QW06jkx2lc5hpxMjamsFpw= sigs.k8s.io/controller-tools v0.2.0/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y= +sigs.k8s.io/controller-tools v0.2.1 h1:HoCik83vXOpPi7KSJWdPRmiGntyOzK0v0BTV4U+pl8o= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go index 17e4b34c3..709896632 100644 --- a/pkg/apis/opentelemetry/const.go +++ b/pkg/apis/opentelemetry/const.go @@ -26,4 +26,7 @@ const ( // OtelColImageConfigKey represents the key to override the OpenTelemetry Collector container image OtelColImageConfigKey = "otelcol-image" + + // SvcMonitorAvailable represents the key that indicates whether a ServiceMonitor CRD is known to the cluster + SvcMonitorAvailable = "svc-monitor-avail" ) diff --git a/pkg/controller/opentelemetrycollector/labels.go b/pkg/controller/opentelemetrycollector/labels.go index 7f22b84bf..cb03194db 100644 --- a/pkg/controller/opentelemetrycollector/labels.go +++ b/pkg/controller/opentelemetrycollector/labels.go @@ -11,9 +11,13 @@ import ( // commonLabels return the common labels to all objects that are part of a managed OpenTelemetryCollector func commonLabels(ctx context.Context) map[string]string { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - base := instance.Labels - if nil == base { - base = map[string]string{} + + // new map every time, so that we don't touch the instance's label + base := map[string]string{} + if nil != instance.Labels { + for k, v := range instance.Labels { + base[k] = v + } } base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" diff --git a/pkg/controller/opentelemetrycollector/main_test.go b/pkg/controller/opentelemetrycollector/main_test.go index 3e4e7d403..71c7b9d24 100644 --- a/pkg/controller/opentelemetrycollector/main_test.go +++ b/pkg/controller/opentelemetrycollector/main_test.go @@ -8,8 +8,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" @@ -17,11 +15,9 @@ import ( ) var ( - instance *v1alpha1.OpenTelemetryCollector - ctx context.Context - reconciler *ReconcileOpenTelemetryCollector - schem *runtime.Scheme - cl client.Client + instance *v1alpha1.OpenTelemetryCollector + ctx context.Context + schem *runtime.Scheme ) // TestMain ensures that all tests in this package have a fresh and sane instance of the common resources @@ -49,8 +45,5 @@ func TestMain(m *testing.M) { ctx = context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - cl = fake.NewFakeClient(instance) - reconciler = New(cl, schem) - os.Exit(m.Run()) } diff --git a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go b/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go index 03fd53943..90b284c92 100644 --- a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go +++ b/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go @@ -16,12 +16,7 @@ var log = logf.Log.WithName("controller_opentelemetrycollector") // Add creates a new OpenTelemetryCollector Controller and adds it to the Manager. The Manager will set fields on the Controller // and Start it when the Manager is Started. func Add(mgr manager.Manager) error { - return add(mgr, newReconciler(mgr)) -} - -// newReconciler returns a new reconcile.Reconciler -func newReconciler(mgr manager.Manager) reconcile.Reconciler { - return New(mgr.GetClient(), mgr.GetScheme()) + return add(mgr, WithManager(mgr)) } // add adds a new Controller to mgr with r as the reconcile.Reconciler diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index 1b493da19..96db1ad65 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -5,11 +5,13 @@ import ( "fmt" "time" + monclientv1 "github.com/coreos/prometheus-operator/pkg/client/versioned/typed/monitoring/v1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" @@ -23,24 +25,46 @@ var _ reconcile.Reconciler = &ReconcileOpenTelemetryCollector{} type ReconcileOpenTelemetryCollector struct { // This client, initialized using mgr.Client() above, is a split client // that reads objects from the cache and writes to the apiserver - client client.Client scheme *runtime.Scheme + // the clients that compose this reconciler + clients *Clients + // the list of reconciliation functions to execute reconcileFuncs []func(context.Context) error } +// Clients holds all the clients that the reconciler might need to hold +type Clients struct { + client client.Client + + // some places are using the rich REST client + monclient monclientv1.MonitoringV1Interface +} + +// WithManager creates a new reconciler based on the manager information +func WithManager(manager manager.Manager) *ReconcileOpenTelemetryCollector { + monclient := monclientv1.NewForConfigOrDie(manager.GetConfig()) + clients := &Clients{ + client: manager.GetClient(), + monclient: monclient, + } + + return New(manager.GetScheme(), clients) +} + // New constructs a ReconcileOpenTelemetryCollector based on the client and scheme, with the default reconciliation functions -func New(client client.Client, scheme *runtime.Scheme) *ReconcileOpenTelemetryCollector { +func New(scheme *runtime.Scheme, clients *Clients) *ReconcileOpenTelemetryCollector { r := &ReconcileOpenTelemetryCollector{ - client: client, - scheme: scheme, + scheme: scheme, + clients: clients, } r.reconcileFuncs = []func(context.Context) error{ r.reconcileConfigMap, r.reconcileService, r.reconcileDeployment, r.reconcileDaemonSet, + r.reconcileServiceMonitor, } return r @@ -58,7 +82,7 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( // Fetch the OpenTelemetryCollector instance instance := &v1alpha1.OpenTelemetryCollector{} - err := r.client.Get(context.Background(), request.NamespacedName, instance) + err := r.clients.client.Get(context.Background(), request.NamespacedName, instance) if err != nil { if errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -86,13 +110,13 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( } // update the status object, which might have also been updated - if err := r.client.Status().Update(ctx, instance); err != nil { + if err := r.clients.client.Status().Update(ctx, instance); err != nil { reqLogger.Error(err, "failed to store the custom resource's status") return reconcile.Result{}, err } // apply it back, as it might have been updated - if err := r.client.Update(ctx, instance); err != nil { + if err := r.clients.client.Update(ctx, instance); err != nil { reqLogger.Error(err, "failed to store back the custom resource") return reconcile.Result{}, err } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go index 3b5a40837..a0a7d01c2 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap.go @@ -61,9 +61,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex r.setControllerReference(ctx, desired) existing := &corev1.ConfigMap{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { + if err := r.clients.client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -93,7 +93,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex updated.ObjectMeta.Labels[k] = v } - if err := r.client.Update(ctx, updated); err != nil { + if err := r.clients.client.Update(ctx, updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) @@ -114,7 +114,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, }), } list := &corev1.ConfigMapList{} - if err := r.client.List(ctx, list, opts...); err != nil { + if err := r.clients.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -127,7 +127,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, } if del { - if err := r.client.Delete(ctx, &existing); err != nil { + if err := r.clients.client.Delete(ctx, &existing); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index 04acd1f2e..1d8e87769 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -30,6 +30,10 @@ func TestProperConfigMap(t *testing.T) { func TestProperReconcileConfigMap(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} // test @@ -38,7 +42,7 @@ func TestProperReconcileConfigMap(t *testing.T) { // verify list := &corev1.ConfigMapList{} - cl.List(ctx, list, client.InNamespace(instance.Namespace)) + clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -49,13 +53,17 @@ func TestProperReconcileConfigMap(t *testing.T) { func TestUpdateConfigMap(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} reconciler.Reconcile(req) // sanity check name := fmt.Sprintf("%s-collector", instance.Name) persisted := &corev1.ConfigMap{} - err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) assert.Equal(t, "the-config-in-yaml-format", persisted.Data[opentelemetry.CollectorConfigMapEntry]) @@ -71,7 +79,7 @@ func TestUpdateConfigMap(t *testing.T) { // verify persisted = &corev1.ConfigMap{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) assert.Equal(t, "updated-config-map", persisted.Data[opentelemetry.CollectorConfigMapEntry]) } @@ -80,12 +88,14 @@ func TestDeleteExtraConfigMap(t *testing.T) { c := configMap(ctx) c.Name = "extra-config-map" - cl := fake.NewFakeClient(c) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(c), + } + reconciler := New(schem, clients) // sanity check persisted := &corev1.ConfigMap{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) // test err := reconciler.reconcileConfigMap(ctx) @@ -93,7 +103,7 @@ func TestDeleteExtraConfigMap(t *testing.T) { // verify persisted = &corev1.ConfigMap{} - err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) assert.Empty(t, persisted.Name) assert.Error(t, err) // not found diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index 0579ccd33..123049376 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -135,9 +135,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex r.setControllerReference(ctx, desired) existing := &appsv1.DaemonSet{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { + if err := r.clients.client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -166,7 +166,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex updated.ObjectMeta.Labels[k] = v } - if err := r.client.Update(ctx, updated); err != nil { + if err := r.clients.client.Update(ctx, updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace) @@ -187,7 +187,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, }), } list := &appsv1.DaemonSetList{} - if err := r.client.List(ctx, list, opts...); err != nil { + if err := r.clients.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -200,7 +200,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, } if del { - if err := r.client.Delete(ctx, &existing); err != nil { + if err := r.clients.client.Delete(ctx, &existing); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "daemonSet.name", existing.Name, "daemonSet.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go index 40c13aa4f..84ff7079c 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -74,8 +74,11 @@ func TestProperReconcileDaemonSet(t *testing.T) { // prepare instance := *instance instance.Spec.Mode = opentelemetry.ModeDaemonSet - cl := fake.NewFakeClient(&instance) - reconciler := New(cl, schem) + + clients := &Clients{ + client: fake.NewFakeClient(&instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} // test @@ -83,7 +86,7 @@ func TestProperReconcileDaemonSet(t *testing.T) { // verify list := &appsv1.DaemonSetList{} - cl.List(ctx, list, client.InNamespace(instance.Namespace)) + clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -141,15 +144,17 @@ func TestUpdateDaemonSet(t *testing.T) { // prepare instance := *instance instance.Spec.Mode = opentelemetry.ModeDaemonSet - cl := fake.NewFakeClient(&instance) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(&instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} reconciler.Reconcile(req) // sanity check name := fmt.Sprintf("%s-collector", instance.Name) persisted := &appsv1.DaemonSet{} - err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) // prepare the test object @@ -164,7 +169,7 @@ func TestUpdateDaemonSet(t *testing.T) { // verify persisted = &appsv1.DaemonSet{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) } @@ -174,12 +179,14 @@ func TestDeleteExtraDaemonSet(t *testing.T) { c := daemonSet(ctx) c.Name = "extra-daemonSet" - cl := fake.NewFakeClient(c) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(c), + } + reconciler := New(schem, clients) // sanity check persisted := &appsv1.DaemonSet{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) // test err := reconciler.reconcileDaemonSet(ctx) @@ -187,7 +194,7 @@ func TestDeleteExtraDaemonSet(t *testing.T) { // verify persisted = &appsv1.DaemonSet{} - err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) assert.Empty(t, persisted.Name) assert.Error(t, err) // not found diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index 5995d443a..b7d1fd3f6 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -136,9 +136,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte r.setControllerReference(ctx, desired) existing := &appsv1.Deployment{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { + if err := r.clients.client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -167,7 +167,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte updated.ObjectMeta.Labels[k] = v } - if err := r.client.Update(ctx, updated); err != nil { + if err := r.clients.client.Update(ctx, updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) @@ -188,7 +188,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, }), } list := &appsv1.DeploymentList{} - if err := r.client.List(ctx, list, opts...); err != nil { + if err := r.clients.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -201,7 +201,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, } if del { - if err := r.client.Delete(ctx, &existing); err != nil { + if err := r.clients.client.Delete(ctx, &existing); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index 157d66a54..ef26c3827 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -71,6 +71,10 @@ func TestDeploymentOverridesConfig(t *testing.T) { func TestProperReconcileDeployment(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} // test @@ -78,7 +82,7 @@ func TestProperReconcileDeployment(t *testing.T) { // verify list := &appsv1.DeploymentList{} - cl.List(ctx, list, client.InNamespace(instance.Namespace)) + clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -133,13 +137,17 @@ func TestDefaultDeploymentImage(t *testing.T) { func TestUpdateDeployment(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} reconciler.Reconcile(req) // sanity check name := fmt.Sprintf("%s-collector", instance.Name) persisted := &appsv1.Deployment{} - err := cl.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) // prepare the test object @@ -154,7 +162,7 @@ func TestUpdateDeployment(t *testing.T) { // verify persisted = &appsv1.Deployment{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) } @@ -164,12 +172,14 @@ func TestDeleteExtraDeployment(t *testing.T) { c := deployment(ctx) c.Name = "extra-deployment" - cl := fake.NewFakeClient(c) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(c), + } + reconciler := New(schem, clients) // sanity check persisted := &appsv1.Deployment{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) // test err := reconciler.reconcileDeployment(ctx) @@ -177,7 +187,7 @@ func TestDeleteExtraDeployment(t *testing.T) { // verify persisted = &appsv1.Deployment{} - err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) assert.Empty(t, persisted.Name) assert.Error(t, err) // not found diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index da385fe18..5b2f8ae5e 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -20,6 +20,7 @@ import ( func (r *ReconcileOpenTelemetryCollector) reconcileService(ctx context.Context) error { svcs := []*corev1.Service{ service(ctx), + monitoringService(ctx), headless(ctx), } @@ -66,7 +67,6 @@ func service(ctx context.Context) *corev1.Service { }, }, } - } func headless(ctx context.Context) *corev1.Service { @@ -76,6 +76,26 @@ func headless(ctx context.Context) *corev1.Service { return h } +func monitoringService(ctx context.Context) *corev1.Service { + h := service(ctx) + h.Name = fmt.Sprintf("%s-monitoring", h.Name) + + // duplicate the map, as we want to change the h.Labels but not the selector + labels := map[string]string{} + for k, v := range h.Labels { + labels[k] = v + } + labels["app.kubernetes.io/name"] = h.Name + h.Labels = labels + + h.Spec.Ports = []corev1.ServicePort{{ + Name: "monitoring", + Port: 8888, + TargetPort: intstr.FromInt(8888), + }} + return h +} + func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context.Context, expected []*corev1.Service) error { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) for _, obj := range expected { @@ -83,9 +103,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. r.setControllerReference(ctx, desired) existing := &corev1.Service{} - err := r.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) if err != nil && errors.IsNotFound(err) { - if err := r.client.Create(ctx, desired); err != nil { + if err := r.clients.client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -118,7 +138,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. updated.ObjectMeta.Labels[k] = v } - if err := r.client.Update(ctx, updated); err != nil { + if err := r.clients.client.Update(ctx, updated); err != nil { return fmt.Errorf("failed to apply changes to service: %v", err) } logger.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) @@ -139,7 +159,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex }), } list := &corev1.ServiceList{} - if err := r.client.List(ctx, list, opts...); err != nil { + if err := r.clients.client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -152,7 +172,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex } if del { - if err := r.client.Delete(ctx, &existing); err != nil { + if err := r.clients.client.Delete(ctx, &existing); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go index 9237ebf6d..d2eaa6fa9 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service_test.go @@ -33,8 +33,22 @@ func TestProperHeadlessService(t *testing.T) { assert.Equal(t, s.Spec.ClusterIP, "None") } +func TestProperMonitoringService(t *testing.T) { + // test + s := monitoringService(ctx) + + // verify + assert.Equal(t, s.Name, "my-otelcol-collector-monitoring") + assert.Len(t, s.Spec.Ports, 1) + assert.Equal(t, int32(8888), s.Spec.Ports[0].Port) +} + func TestProperReconcileService(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} // test @@ -42,10 +56,10 @@ func TestProperReconcileService(t *testing.T) { // verify list := &corev1.ServiceList{} - cl.List(ctx, list, client.InNamespace(instance.Namespace)) + clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) // we assert the correctness of the service in another test - assert.Len(t, list.Items, 2) + assert.Len(t, list.Items, 3) // we assert the correctness of the reference in another test for _, item := range list.Items { @@ -73,12 +87,14 @@ func TestUpdateService(t *testing.T) { // the cluster has assigned an IP to this service already c.Spec.ClusterIP = "172.172.172.172" - cl := fake.NewFakeClient(c) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(c), + } + reconciler := New(schem, clients) // sanity check persisted := &corev1.Service{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) assert.Len(t, persisted.Spec.Ports, 1) assert.Equal(t, int32(12345), persisted.Spec.Ports[0].Port) @@ -88,7 +104,7 @@ func TestUpdateService(t *testing.T) { // verify persisted = &corev1.Service{} - err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) assert.Equal(t, int32(14250), persisted.Spec.Ports[0].Port) assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept } @@ -98,12 +114,14 @@ func TestDeleteExtraService(t *testing.T) { c := service(ctx) c.Name = "extra-service" - cl := fake.NewFakeClient(c) - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(c), + } + reconciler := New(schem, clients) // sanity check persisted := &corev1.Service{} - assert.NoError(t, cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) // test err := reconciler.reconcileService(ctx) @@ -111,7 +129,7 @@ func TestDeleteExtraService(t *testing.T) { // verify persisted = &corev1.Service{} - err = cl.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) assert.Empty(t, persisted.Name) assert.Error(t, err) // not found diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go new file mode 100644 index 000000000..f327f8734 --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go @@ -0,0 +1,152 @@ +package opentelemetrycollector + +import ( + "context" + "fmt" + + monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" + "github.com/go-logr/logr" + "github.com/spf13/viper" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// reconcileServiceMonitor reconciles the service monitor(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryCollector) reconcileServiceMonitor(ctx context.Context) error { + if !viper.GetBool(opentelemetry.SvcMonitorAvailable) { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + logger.V(2).Info("skipping reconciliation for service monitor, as the CRD isn't registered with the cluster") + return nil + } + + svcs := []*monitoringv1.ServiceMonitor{ + serviceMonitor(ctx), + } + + // first, handle the create/update parts + if err := r.reconcileExpectedServiceMonitors(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the expected service monitors: %v", err) + } + + // then, delete the extra objects + if err := r.deleteServiceMonitors(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the service monitors to be deleted: %v", err) + } + + return nil +} + +func serviceMonitor(ctx context.Context) *monitoringv1.ServiceMonitor { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + name := fmt.Sprintf("%s-collector", instance.Name) + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + selector := commonLabels(ctx) + selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-monitoring", name) + + return &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Selector: metav1.LabelSelector{ + MatchLabels: selector, + }, + Endpoints: []monitoringv1.Endpoint{{ + Port: "monitoring", + }}, + }, + } + +} + +func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx context.Context, expected []*monitoringv1.ServiceMonitor) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + for _, obj := range expected { + desired := obj + r.setControllerReference(ctx, desired) + + existing, err := r.clients.monclient.ServiceMonitors(desired.Namespace).Get(desired.Name, metav1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + if desired, err = r.clients.monclient.ServiceMonitors(desired.Namespace).Create(desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to retrieve: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if _, err = r.clients.monclient.ServiceMonitors(desired.Namespace).Update(updated); err != nil { + return fmt.Errorf("failed to apply changes to service monitor: %v", err) + } + logger.V(2).Info("applied", "svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Context, expected []*monitoringv1.ServiceMonitor) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }).String(), + } + + list, err := r.clients.monclient.ServiceMonitors(instance.Namespace).List(opts) + if err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := r.clients.monclient.ServiceMonitors(instance.Namespace).Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "svcmon.name", existing.Name, "svcmon.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go new file mode 100644 index 000000000..f55d6051a --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go @@ -0,0 +1,109 @@ +package opentelemetrycollector + +import ( + "testing" + + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" + "github.com/spf13/viper" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" +) + +func TestProperServiceMonitor(t *testing.T) { + // test + s := serviceMonitor(ctx) + backingSvc := monitoringService(ctx) + + // verify + assert.Equal(t, "my-otelcol-collector", s.Name) + assert.Equal(t, "custom-annotation-value", s.Annotations["custom-annotation"]) + assert.Equal(t, "custom-value", s.Labels["custom-label"]) + assert.Equal(t, s.Name, s.Labels["app.kubernetes.io/name"]) + assert.Equal(t, backingSvc.Labels, s.Spec.Selector.MatchLabels) +} + +func TestProperReconcileServiceMonitor(t *testing.T) { + // prepare + viper.Set(opentelemetry.SvcMonitorAvailable, true) + defer viper.Reset() + + clients := &Clients{ + client: fake.NewFakeClient(instance), + monclient: fakemon.NewSimpleClientset().MonitoringV1(), + } + reconciler := New(schem, clients) + + // test + req := reconcile.Request{} + _, err := reconciler.Reconcile(req) + assert.NoError(t, err) + + // verify + list, err := clients.monclient.ServiceMonitors(instance.Namespace).List(metav1.ListOptions{}) + require.NoError(t, err) + + // we assert the correctness of the service in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test + for _, item := range list.Items { + assert.Len(t, item.OwnerReferences, 1) + } +} + +func TestUpdateServiceMonitor(t *testing.T) { + // prepare + viper.Set(opentelemetry.SvcMonitorAvailable, true) + defer viper.Reset() + + c := serviceMonitor(ctx) + c.Annotations = nil + c.Labels = nil + + clients := &Clients{ + monclient: fakemon.NewSimpleClientset(c).MonitoringV1(), + } + reconciler := New(schem, clients) + + // sanity check + _, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + + // test + assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) + + // verify + _, err = clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) +} + +func TestDeleteExtraServiceMonitor(t *testing.T) { + // prepare + viper.Set(opentelemetry.SvcMonitorAvailable, true) + defer viper.Reset() + + c := serviceMonitor(ctx) + c.Name = "extra-service" + + clients := &Clients{ + monclient: fakemon.NewSimpleClientset(c).MonitoringV1(), + } + reconciler := New(schem, clients) + + // sanity check + _, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + + // test + assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) + + // verify + persisted, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.Nil(t, persisted) + assert.Error(t, err) // not found +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go index 21d18fa73..0b3dd3f8e 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_test.go @@ -23,6 +23,11 @@ func TestProperReconcile(t *testing.T) { req reconcile.Request ) + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) + called := false reconciler.reconcileFuncs = []func(context.Context) error{ func(ctx context.Context) error { @@ -46,8 +51,10 @@ func TestProperReconcile(t *testing.T) { func TestReconcileDeletedObject(t *testing.T) { // prepare - cl := fake.NewFakeClient() // no objects - reconciler := New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(), + } + reconciler := New(schem, clients) req := reconcile.Request{} reconciler.reconcileFuncs = []func(context.Context) error{ @@ -68,6 +75,10 @@ func TestReconcileDeletedObject(t *testing.T) { func TestReconcileFailsFast(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) req := reconcile.Request{} reconciler.reconcileFuncs = []func(context.Context) error{ func(context.Context) error { @@ -88,6 +99,10 @@ func TestReconcileFailsFast(t *testing.T) { func TestReconcileFuncsAreCalled(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) called := false reconciler.reconcileFuncs = []func(context.Context) error{ func(context.Context) error { @@ -106,6 +121,10 @@ func TestReconcileFuncsAreCalled(t *testing.T) { func TestNilReconcileFuncs(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) reconciler.reconcileFuncs = nil // test @@ -117,6 +136,10 @@ func TestNilReconcileFuncs(t *testing.T) { func TestSetControllerReference(t *testing.T) { // prepare + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) d := &appsv1.Deployment{} // sanity check diff --git a/pkg/controller/opentelemetrycollector/upgrade.go b/pkg/controller/opentelemetrycollector/upgrade.go index 1c841d1e1..0a7c9e7f2 100644 --- a/pkg/controller/opentelemetrycollector/upgrade.go +++ b/pkg/controller/opentelemetrycollector/upgrade.go @@ -22,7 +22,7 @@ func (r *ReconcileOpenTelemetryCollector) applyUpgrades(ctx context.Context) err if otelcol.Status.Version != currentVersions.OpenTelemetryCollector { // in theory, the version from the Status could be higher than currentVersions.Jaeger, but we let the upgrade routine // check/handle it - u, err := upgrade.ManagedInstance(ctx, r.client, otelcol) + u, err := upgrade.ManagedInstance(ctx, r.clients.client, otelcol) if err != nil { return err } diff --git a/pkg/controller/opentelemetrycollector/upgrade_test.go b/pkg/controller/opentelemetrycollector/upgrade_test.go index 26b44f84e..578389e9e 100644 --- a/pkg/controller/opentelemetrycollector/upgrade_test.go +++ b/pkg/controller/opentelemetrycollector/upgrade_test.go @@ -22,8 +22,10 @@ func TestApplyUpgrades(t *testing.T) { } ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - cl = fake.NewFakeClient(instance) - reconciler = New(cl, schem) + clients := &Clients{ + client: fake.NewFakeClient(instance), + } + reconciler := New(schem, clients) // test err := reconciler.applyUpgrades(ctx) From d54d5f42288e1281b72d75a93e650eda8c459895 Mon Sep 17 00:00:00 2001 From: Joe Elliott Date: Wed, 11 Dec 2019 03:25:21 -0500 Subject: [PATCH 0025/1234] Consolidate name logic in one place (#1) Signed-off-by: Joe Elliott --- pkg/controller/opentelemetrycollector/reconcile.go | 4 ++++ .../opentelemetrycollector/reconcile_configmap_test.go | 3 +-- .../opentelemetrycollector/reconcile_daemonset.go | 2 +- .../opentelemetrycollector/reconcile_daemonset_test.go | 3 +-- .../opentelemetrycollector/reconcile_deployment.go | 2 +- .../opentelemetrycollector/reconcile_deployment_test.go | 3 +-- pkg/controller/opentelemetrycollector/reconcile_service.go | 2 +- .../opentelemetrycollector/reconcile_servicemonitor.go | 2 +- pkg/controller/opentelemetrycollector/reconcile_test.go | 7 +++++++ 9 files changed, 18 insertions(+), 10 deletions(-) diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index 96db1ad65..977c4f4d4 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -146,3 +146,7 @@ func (r *ReconcileOpenTelemetryCollector) setControllerReference(ctx context.Con instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) return controllerutil.SetControllerReference(instance, object, r.scheme) } + +func resourceName(instanceName string) string { + return fmt.Sprintf("%s-collector", instanceName) +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index 1d8e87769..813be0ab5 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -2,7 +2,6 @@ package opentelemetrycollector import ( "context" - "fmt" "testing" "github.com/stretchr/testify/assert" @@ -61,7 +60,7 @@ func TestUpdateConfigMap(t *testing.T) { reconciler.Reconcile(req) // sanity check - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) persisted := &corev1.ConfigMap{} err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index 123049376..0eac27d54 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -48,7 +48,7 @@ func daemonSets(ctx context.Context) []*appsv1.DaemonSet { func daemonSet(ctx context.Context) *appsv1.DaemonSet { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) image := instance.Spec.Image if len(image) == 0 { diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go index 84ff7079c..ecdf6494b 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -2,7 +2,6 @@ package opentelemetrycollector import ( "context" - "fmt" "testing" "github.com/spf13/viper" @@ -152,7 +151,7 @@ func TestUpdateDaemonSet(t *testing.T) { reconciler.Reconcile(req) // sanity check - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) persisted := &appsv1.DaemonSet{} err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index b7d1fd3f6..cf8a2b7ec 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -48,7 +48,7 @@ func deployments(ctx context.Context) []*appsv1.Deployment { func deployment(ctx context.Context) *appsv1.Deployment { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) image := instance.Spec.Image if len(image) == 0 { diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index ef26c3827..dc8fd7ab4 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -2,7 +2,6 @@ package opentelemetrycollector import ( "context" - "fmt" "testing" "github.com/spf13/viper" @@ -145,7 +144,7 @@ func TestUpdateDeployment(t *testing.T) { reconciler.Reconcile(req) // sanity check - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) persisted := &appsv1.Deployment{} err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) assert.NoError(t, err) diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index 5b2f8ae5e..dfb8bd33d 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -39,7 +39,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileService(ctx context.Context) func service(ctx context.Context) *corev1.Service { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) labels := commonLabels(ctx) labels["app.kubernetes.io/name"] = name diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go index f327f8734..44564e2f2 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go @@ -42,7 +42,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileServiceMonitor(ctx context.Co func serviceMonitor(ctx context.Context) *monitoringv1.ServiceMonitor { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := fmt.Sprintf("%s-collector", instance.Name) + name := resourceName(instance.Name) labels := commonLabels(ctx) labels["app.kubernetes.io/name"] = name diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go index 0b3dd3f8e..ba2255cba 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_test.go @@ -155,3 +155,10 @@ func TestSetControllerReference(t *testing.T) { assert.Equal(t, instance.TypeMeta.Kind, d.OwnerReferences[0].Kind) } + +func TestNameGeneration(t *testing.T) { + instanceName := "test" + expectedResourceName := "test-collector" + + assert.Equal(t, expectedResourceName, resourceName(instanceName)) +} From 6ad8e1a712de5010cb623be3a9b7faabe1431cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 11:05:16 +0100 Subject: [PATCH 0026/1234] Fixed security checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 6 ++---- pkg/apis/opentelemetry/flagset.go | 1 + .../opentelemetrycollector/reconcile_configmap.go | 2 ++ .../opentelemetrycollector/reconcile_daemonset.go | 2 ++ .../opentelemetrycollector/reconcile_deployment.go | 2 ++ pkg/controller/opentelemetrycollector/reconcile_service.go | 2 ++ .../opentelemetrycollector/reconcile_servicemonitor.go | 2 ++ 7 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 18b44127c..a90d6b5f5 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,6 @@ LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.bui OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-collector | awk -F= '{print $$2}')" -PACKAGES := $(shell go list ./cmd/... ./pkg/...) - .DEFAULT_GOAL := build .PHONY: discard-go-mod-changes @@ -42,7 +40,7 @@ format: .PHONY: security security: @echo Security... - @gosec -quiet ${PACKAGES} 2>/dev/null + @gosec -quiet ./... 2>/dev/null .PHONY: build build: format @@ -82,7 +80,7 @@ test: unit-tests .PHONY: unit-tests unit-tests: @echo Running unit tests... - @go test ${PACKAGES} -cover -coverprofile=coverage.txt -covermode=atomic -race + @go test ./... -cover -coverprofile=coverage.txt -covermode=atomic -race .PHONY: all all: check format security build test diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go index 2e64b3b5d..cc3a23d00 100644 --- a/pkg/apis/opentelemetry/flagset.go +++ b/pkg/apis/opentelemetry/flagset.go @@ -24,6 +24,7 @@ func FlagSet() *pflag.FlagSet { "quay.io/opentelemetry/opentelemetry-collector:v0.0.2", "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", ) + // #nosec G104 (CWE-703): Errors unhandled. viper.BindPFlag(OtelColImageConfigKey, fs.Lookup(OtelColImageConfigKey)) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go index a0a7d01c2..652bb394c 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap.go @@ -58,6 +58,8 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) for _, obj := range expected { desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) existing := &corev1.ConfigMap{} diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index 0eac27d54..b06eac772 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -132,6 +132,8 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) for _, obj := range expected { desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) existing := &appsv1.DaemonSet{} diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index cf8a2b7ec..23412a315 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -133,6 +133,8 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) for _, obj := range expected { desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) existing := &appsv1.Deployment{} diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index dfb8bd33d..8c0a8b99b 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -100,6 +100,8 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) for _, obj := range expected { desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) existing := &corev1.Service{} diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go index 44564e2f2..c58b806ec 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go @@ -74,6 +74,8 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx c for _, obj := range expected { desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) existing, err := r.clients.monclient.ServiceMonitors(desired.Namespace).Get(desired.Name, metav1.GetOptions{}) From 61322ea8323b44cabe34d7670e7aeb29184e3539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 11:23:43 +0100 Subject: [PATCH 0027/1234] Updated to Operator SDK 0.12.0 (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/script.sh | 2 +- .github/workflows/continuous-integration.yaml | 5 +- Makefile | 2 +- go.mod | 69 +- go.sum | 729 +++++++----------- .../v1alpha1/zz_generated.deepcopy.go | 2 +- tools.go | 4 - 7 files changed, 303 insertions(+), 510 deletions(-) diff --git a/.ci/script.sh b/.ci/script.sh index 78f1fd0e1..ee09da110 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -6,7 +6,7 @@ else export PATH="${GOPATH}/bin:${PATH}" fi -BUILD_IMAGE="quay.io/jpkroehling/opentelemetry-operator" make ci +make ci RT=$? if [ ${RT} != 0 ]; then echo "Failed to build the operator." diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 4960f974c..7d0080598 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -5,10 +5,13 @@ jobs: unit-tests: runs-on: ubuntu-latest steps: + - uses: actions/setup-go@v1 + with: + go-version: '1.13.3' - uses: actions/checkout@v1 - uses: jpkrohling/setup-operator-sdk@v1-release with: - operator-sdk-version: v0.11.0 + operator-sdk-version: v0.12.0 - name: "basic checks" run: ./.ci/script.sh diff --git a/Makefile b/Makefile index a90d6b5f5..ae4f2026b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ KUBERNETES_CONFIG ?= "${HOME}/.kube/config" WATCH_NAMESPACE ?= "" BIN_DIR ?= "build/_output/bin" -NAMESPACE ?= "${USER}" +NAMESPACE ?= "quay.io/${USER}" BUILD_IMAGE ?= "${NAMESPACE}/${OPERATOR_NAME}:latest" OUTPUT_BINARY ?= "${BIN_DIR}/${OPERATOR_NAME}" VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/pkg/version" diff --git a/go.mod b/go.mod index b712c28bc..cc15cf75c 100644 --- a/go.mod +++ b/go.mod @@ -1,52 +1,43 @@ module github.com/open-telemetry/opentelemetry-operator +go 1.13 + require ( - github.com/Azure/go-autorest v13.0.1+incompatible // indirect github.com/coreos/prometheus-operator v0.29.0 github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 - github.com/golang/protobuf v1.3.2 // indirect - github.com/jaegertracing/jaeger-operator v1.14.0 - github.com/onsi/ginkgo v1.10.1 // indirect - github.com/onsi/gomega v1.7.0 // indirect - github.com/operator-framework/operator-sdk v0.11.1-0.20191012024916-f419ad3f3dc5 + github.com/operator-framework/operator-sdk v0.12.0 github.com/spf13/pflag v1.0.3 - github.com/spf13/viper v1.3.2 + github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 // indirect - golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 // indirect - golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect - golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 // indirect - golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gotest.tools v2.2.0+incompatible - k8s.io/api v0.0.0-20190918155943-95b840bb6a1f - k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783 - k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655 - k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible - k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c - sigs.k8s.io/controller-runtime v0.2.0 - sigs.k8s.io/controller-tools v0.2.0 + k8s.io/api v0.0.0 + k8s.io/apimachinery v0.0.0 + k8s.io/client-go v11.0.0+incompatible + k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d + sigs.k8s.io/controller-runtime v0.3.0 ) -// Pinned to kubernetes-1.14.1 +// Pinned to kubernetes-1.15.4 replace ( - k8s.io/api => k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d - k8s.io/client-go => k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible - k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190409023720-1bc0c81fa51d + k8s.io/api => k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d + k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190918202139-0b14c719ca62 + k8s.io/client-go => k8s.io/client-go v0.0.0-20190918200256-06eb1244587a + k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190918203125-ae665f80358a + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190918202959-c340507a5d48 + k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b + k8s.io/component-base => k8s.io/component-base v0.0.0-20190918200425-ed2f0867c778 + k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190817025403-3ae76f584e79 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190918203248-97c07dcbb623 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190918201136-c3a845f1fbb2 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190918202837-c54ce30c680e + k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190918202429-08c8357f8e2d + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190918202713-c34a54b3ec8e + k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190918202550-958285cf3eef + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190918203421-225f0541b3ea + k8s.io/metrics => k8s.io/metrics v0.0.0-20190918202012-3c1ca76f5bda + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190918201353-5cc279503896 ) - -replace ( - // Indirect operator-sdk dependencies use git.apache.org, which is frequently - // down. The github mirror should be used instead. - // Locking to a specific version (from 'go mod graph'): - git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 - github.com/coreos/prometheus-operator => github.com/coreos/prometheus-operator v0.31.1 - // Pinned to v2.10.0 (kubernetes-1.14.1) so https://proxy.golang.org can - // resolve it correctly. - github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.0.0-20190525122359-d20e84d0fb64 -) - -replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v0.11.0 diff --git a/go.sum b/go.sum index 80c045d32..0158828a9 100644 --- a/go.sum +++ b/go.sum @@ -1,170 +1,135 @@ +bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= bitbucket.org/ww/goautoneg v0.0.0-20120707110453-75cd24fc2f2c/go.mod h1:1vhO7Mn/FZMgOgDVGLy5X1mE6rq1HbkBdkF/yj8zkcg= -cloud.google.com/go v0.0.0-20160913182117-3b1ae45394a2/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= -cloud.google.com/go v0.37.2 h1:4y4L7BdHenTfZL0HervofNTHh9Ad6mNX72cQvl+5eH0= -cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= -contrib.go.opencensus.io/exporter/ocagent v0.4.11 h1:Zwy9skaqR2igcEfSVYDuAsbpa33N0RPtnYTHEe2whPI= -contrib.go.opencensus.io/exporter/ocagent v0.4.11/go.mod h1:7ihiYRbdcVfW4m4wlXi9WRPdv79C0fStcjNlyE6ek9s= -contrib.go.opencensus.io/exporter/ocagent v0.4.12 h1:jGFvw3l57ViIVEPKKEUXPcLYIXJmQxLUh6ey1eJhwyc= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= -github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= +github.com/Azure/azure-sdk-for-go v21.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v11.1.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= -github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v13.0.1+incompatible h1:wRg6hB3T3dp7qjj5v3NmVsdU9IyXodW+SQnN9xlpGEA= -github.com/Azure/go-autorest v13.0.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.2.0 h1:zBtSTOQTtjzHVRe+mhkiHvHwRTKHhjBEyo1m6DfI3So= -github.com/Azure/go-autorest/autorest v0.2.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= -github.com/Azure/go-autorest/autorest/adal v0.1.0 h1:RSw/7EAullliqwkZvgIGDYZWQm1PGKXI8c4aY/87yuU= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/mocks v0.1.0 h1:Kx+AUU2Te+A3JIyYn6Dfs+cFgx5XorQKuIXrZGoq/SI= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= +github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA= +github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= +github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= +github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v0.0.0-20190301161902-9f8fceff796f/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= -github.com/a8m/mark v0.1.1-0.20170507133748-44f2db618845/go.mod h1:c8Mh99Cw82nrsAnPgxQSZHkswVOJF7/MqZb1ZdvriLM= +github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= -github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 h1:Kn3rqvbUFqSepE2OqVu0Pn1CbDw9IuMlONapol0zuwk= -github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.15.24/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= +github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= +github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us= +github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8/go.mod h1:Iev9Q3MErcn+w3UOJD/DkEzllvugfdx7bGcMOFhvr/4= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= -github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= -github.com/cenk/backoff v2.0.0+incompatible/go.mod h1:7FtoeaSnHoZnmZzz47cM35Y9nSW7tNyaidugnHTaFDE= -github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= -github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20180905225744-ee1a9a0726d2/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/client9/misspell v0.0.0-20170928000206-9ce5d979ffda/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292/go.mod h1:qRiX68mZX1lGBkTWyp3CLcenw9I94W2dLeRvMzcn9N4= -github.com/cockroachdb/cockroach v0.0.0-20170608034007-84bc9597164f/go.mod h1:xeT/CQ0qZHangbYbWShlCGAx31aV4AjGswDUjhKS6HQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= +github.com/codedellemc/goscaleio v0.0.0-20170830184815-20e2ce2cf885/go.mod h1:JIHmDHNZO4tmA3y3RHp6+Gap6kFsNf55W9Pn/3YS9IY= +github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= +github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= +github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containernetworking/cni v0.6.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.12+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-oidc v0.0.0-20180117170138-065b426bd416/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.0.0-20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= -github.com/coreos/prometheus-operator v0.31.1 h1:+pS6+Ha01vuoGBh5glhfngk2sB1ELwe6tbXhMkMmp/U= -github.com/coreos/prometheus-operator v0.31.1/go.mod h1:vHwtP2e+VmEeS6m6lgp87aH+npGVRQsCi5jhcuQA1sA= +github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U= +github.com/cpuguy83/go-md2man v1.0.4/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/cyphar/filepath-securejoin v0.0.0-20170720062807-ae69057f2299/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v0.0.0-20170829104524-6e570ed0a266/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.0.0-20180612054059-a9fbbdc8dd87/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/elastic/gosigar v0.9.0/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190409004836-2e1cfbca03da/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= -github.com/elazarl/goproxy v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy/ext v0.0.0-20190421051319-9d40249d3c2f/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.6.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.8.1+incompatible h1:AyDqLHbJ1quqbWr/OWDw+PlIP8ZFoTmYrGYaxzrLbNg= github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= +github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= +github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA= -github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/camelcase v0.0.0-20160318181535-f6a740d52f96/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structtag v1.0.0/go.mod h1:IKitwq45uXL/yqi5mYghiD3w9H6eTOvI9vnk8tXMphA= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/gernest/wow v0.1.0/go.mod h1:dEPabJRi5BneI1Nev1VWo0ZlcTWibHWp43qxKms4elY= -github.com/getsentry/raven-go v0.1.2/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/ghodss/yaml v1.0.1-0.20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -173,22 +138,23 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.17.2/go.mod h1:QO936ZXeisByFmZEO1IS1Dqhtf4QV1sYYFtIq6Ld86Q= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= @@ -199,17 +165,15 @@ github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pL github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.17.2 h1:K/ycE/XTUDFltNHSO32cGRUhrVGJD64o8WgAIZNyc3k= github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.0 h1:Kg7Wl7LkTPlmc393QZQ/5rQadPhi7pBVEMZxyTi0Ii8= -github.com/go-openapi/swag v0.19.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/validate v0.17.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.6.15 h1:OsV5vOpHYUpP7ZLS6sem1y40/lNX1BZj+ynMiRi21lQ= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= @@ -217,116 +181,85 @@ github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gogo/protobuf v0.0.0-20170330071051-c0656edd0d9e/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20141105023935-44145f04b68c/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.1-0.20190329180013-73dc87cad333/go.mod h1:L3bP22mxdfCUHSUVMs+SPJMx55FrxQew7MSXT11Q86g= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= +github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= +github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= +github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/cadvisor v0.33.2-0.20190411163913-9db8c7dee20a/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20180605153948-8b03ce837f34/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/gophercloud/gophercloud v0.0.0-20180330165814-781450b3c4fc/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= -github.com/gophercloud/gophercloud v0.0.0-20190301152420-fca40860790e/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855 h1:3dfUujjROkkXcwIpsh9z6bjOhPFooLpxejc7qgX13/g= -github.com/gophercloud/gophercloud v0.0.0-20190408160324-6c7ac67f8855/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20181025070259-68e3a13e4117/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.0.0-20160207214719-a0d98a5f2880/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/heketi/heketi v0.0.0-20181109135656-558b29266ce0/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= +github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= +github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= +github.com/heketi/utils v0.0.0-20170317161834-435bc5bdfa64/go.mod h1:RYlF4ghFZPPmk2TC5REt5OFwvfb6lzxFWrTWB+qs28s= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -335,184 +268,151 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/improbable-eng/thanos v0.5.0/go.mod h1:RXlsWB7YlTbhIod//QDyd5cBZsnEN0jROXZJY/ol4nk= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v0.0.0-20170331210902-15e594fc09f1/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jaegertracing/jaeger-operator v1.14.0 h1:hJUWS+DYD9GGO72LyJHVSSNyoex4jcsMxKtnp/RxK8E= -github.com/jaegertracing/jaeger-operator v1.14.0/go.mod h1:NOl6opNb5Jg7tECsLvIr9xRhAecLcxt84gfCmghjkgM= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.0.0-20141017032234-72f9bd7c4e0c/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/jteeuwen/go-bindata v0.0.0-20151023091102-a0ff2567cfb7/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20150410034420-8fef92e41e22/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knz/strtime v0.0.0-20181018220328-af2256ee352c/go.mod h1:4ZxfWkxwtc7dBeifERVVWRy9F9rTU9p0yCDgeCtlius= github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169/go.mod h1:glhvuHOU9Hy7/8PwwdtnarXqLagOX0b/TbZx2zLMqEg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.0.0-20140812000539-f31442d60e51/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.0.0-20130911015532-6807e777504f/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lightstep/lightstep-tracer-go v0.15.6/go.mod h1:6AMpwZpsyCFwSovxzM78e+AsYxE8sGwiM6C3TytaWeI= -github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/libopenstorage/openstorage v0.0.0-20170906232338-093a0c388875/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= +github.com/magiconair/properties v0.0.0-20160816085511-61b492c03cf4/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 h1:wL11wNW7dhKIcRCHSm4sHKPWz0tt4mwBsVodG7+Xyqg= -github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/markbates/inflect v1.0.4 h1:5fh1gzTFhfae06u3hzHYO9xe3l3v3nW5Pwt3naLTP5g= github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= +github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-shellwords v0.0.0-20180605041737-f8471b0a71de/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.10/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/cli v1.20.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY= -github.com/minio/minio-go/v6 v6.0.27-0.20190529152532-de69c0e465ed/go.mod h1:vaNT59cWULS37E+E9zkuN/BVnKHyXtVGS+b04Boc66Y= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/maxbrunsfeld/counterfeiter/v6 v6.0.2/go.mod h1:jDaYg8/bmdfygnyq5gnvMRDocYTEcXLPU0bXPtTco58= +github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= +github.com/mholt/caddy v0.0.0-20180213163048-2de495001514/go.mod h1:Wb1PlT4DAYSqOEd03MsqkdkXnTxA8v9pKjdpxbqM1kY= +github.com/miekg/dns v0.0.0-20160614162101-5d001d020961/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= +github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/montanaflynn/stats v0.0.0-20180911141734-db72e6cae808/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/mozillazg/go-cos v0.12.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= -github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= +github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mvdan/xurls v0.0.0-20160110113200-1b768d7c393a/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/openshift/api v0.0.0-20180830153656-5ad8479f64f1/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/opencontainers/image-spec v0.0.0-20170604055404-372ad780f634/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20181113202123-f000fe11ece1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v0.0.0-20170621221121-4a2974bf1ee9/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= +github.com/openshift/api v3.9.1-0.20190424152011-77b8897ec79a+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/openshift/client-go v0.0.0-20190401163519-84c2b942258a/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= -github.com/opentracing-contrib/go-stdlib v0.0.0-20170113013457-1de4cc2120e7/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/operator-framework/go-appr v0.0.0-20180917210448-f2aef88446f2/go.mod h1:YNzwUx1i6C4dXWcffyq3yaIb0rh/K8/OvQ4vG0SNlSw= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190125151539-1e295784b30a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190128024246-5eb7ae5bdb7a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190605231540-b8a4faf68e36/go.mod h1:HKV3ZB9aOUxRyfM53shoBRtIMP4lg8QRmkW+dmZy+kI= github.com/operator-framework/operator-marketplace v0.0.0-20190216021216-57300a3ef3ba/go.mod h1:msZSL8pXwzQjB+hU+awVrZQw94IwJi3sNZVD3NoESIs= github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd52LG3YQ0jtwiwEGdm98S1TH5P4RAA= github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= github.com/operator-framework/operator-registry v1.1.1/go.mod h1:7D4WEwL+EKti5npUh4/u64DQhawCBRugp8Ql20duUb4= -github.com/operator-framework/operator-sdk v0.10.0 h1:k2yovBNxaya06yIkJ1e6lNsqiWjhS32G+d2LUdjuu/E= -github.com/operator-framework/operator-sdk v0.10.0/go.mod h1:7eW7ldXmvenehIMVdO2zCdERf/828Mrftq4u7GS0I68= -github.com/operator-framework/operator-sdk v0.11.0 h1:If0MefBJjPGYAW6Os6azpTMoaFtsSlXRlQctF23/ORs= -github.com/operator-framework/operator-sdk v0.11.0/go.mod h1:Oo+O2br5qR6XSLWY/GgIvTvpsEKtzeWp+I3rHF0WIq8= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/operator-framework/operator-sdk v0.12.0 h1:9eAD1L8e6pPCpFCAacBUVf2eloDkRuVm29GTCOktLqQ= +github.com/operator-framework/operator-sdk v0.12.0/go.mod h1:mW8isQxiXlLCVf2E+xqflkQAVLOTbiqjndKdkKIrR0M= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.3.0 h1:e5+lF2E4Y2WCIxBefVowBuB0iHrUH4HZ8q+6mGF7fJc= -github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= -github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea/go.mod h1:1VcHEd3ro4QMoHfiNl/j7Jkln9+KQuorp0PItHMJYNg= -github.com/petermattis/goid v0.0.0-20170504144140-0ded85884ba5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -520,159 +420,120 @@ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190203183350-488faf799f86/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872 h1:0aNv3xC7DmQoy1/x1sMh18g+fihWW68LL13i8ao9kl4= -github.com/prometheus/procfs v0.0.0-20190403104016-ea9eea638872/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/prometheus v0.0.0-20190525122359-d20e84d0fb64/go.mod h1:oYrT4Vs22/NcnoVYXt5m4cIHP+znvgyusahVpyETKTw= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rlmcpherson/s3gof3r v0.5.0/go.mod h1:s7vv7SMDPInkitQMuZzH615G7yWHdrU2r/Go7Bo71Rs= +github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= +github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= +github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rubenv/sql-migrate v0.0.0-20190618074426-f4d34eae5a5c/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= -github.com/rubyist/circuitbreaker v2.2.1+incompatible/go.mod h1:Ycs3JgJADPuzJDwffe12k6BZT8hxVi6lFK+gWYJLN4A= +github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rubenv/sql-migrate v0.0.0-20191022111038-5cdff0d8cc42/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= +github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20161028232340-1d7be4effb13/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sasha-s/go-deadlock v0.0.0-20161201235124-341000892f3d/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/seccomp/libseccomp-golang v0.0.0-20150813023252-1b506fc7c24e/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/vfsgen v0.0.0-20180711163814-62bca832be04/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20151028001915-10ef21a441db/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sigma/go-inotify v0.0.0-20181102212354-c87b6cf5033d/go.mod h1:stlh9OsqBQSdwxTxX73mu41BBtRbIpZLQ7flcAoxAfo= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= +github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= +github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= +github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/uber-go/atomic v1.4.0/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.0/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= +github.com/vmware/photon-controller-go-sdk v0.0.0-20170310013346-4a435daef6cc/go.mod h1:e6humHha1ekIwTCm+A5Qed5mG8V4JL+ChHcUOJ+L/8U= +github.com/xanzy/go-cloudstack v0.0.0-20160728180336-1e2cbf647e57/go.mod h1:s3eL3z5pNXF5FVybcT+LIVdId8pYn709yv6v5mrkrQE= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= -go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= -go.opencensus.io v0.20.0 h1:L/ARO58pdktB6dLmYI0zAyW1XnavEmGziFd0MKfxnck= -go.opencensus.io v0.20.0/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2 h1:NAfh7zF0/3/HqtMvJNZ/RFrSlCE6ZTlHmKfhL/Dm1Jk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= +go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= -golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= -golang.org/x/crypto v0.0.0-20180222182404-49796115aa4b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -680,255 +541,197 @@ golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190403144856-b630fd6fe46b/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2 h1:4dVFTC832rPn4pomLSz1vA+are2+dU19w1H8OngV7nc= -golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= +golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a h1:tImsplftrFpALCYumobsd0K86vlAs/eXGFms2txfJfA= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190116161447-11f53e031339/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 h1:khxRGsvPk4n2y8I/mLLjp7e5dMTJmH75wvqS6nMwUtY= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7 h1:wYqz/tQaWUgGKyx+B/rssSE6wkIKdY5Ee6ryOmzarIg= -golang.org/x/sys v0.0.0-20190913121621-c3b328c6e5a7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db h1:6/JqlYfC1CCaLnGceQTI+sDGhC9UBSPAsBqI0Gun6kU= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20170824195420-5d2fd3ccab98/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190213015956-f7e1b50d2251/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190320215829-36c10c0a621f/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350 h1:0USRhKWpISljvJE8egltEaoJb+VD0IUA4eOH6W1yss8= -golang.org/x/tools v0.0.0-20190408170212-12dd9f86f350/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190501045030-23463209683d/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678 h1:rM1Udd0CgtYI3KUIhu9ROz0QCqjW+n/ODp/hH7c60Xc= -golang.org/x/tools v0.0.0-20190912215617-3720d1ec3678/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= -google.golang.org/api v0.3.0 h1:UIJY20OEo3+tK5MBlcdx37kmdH6EnRjGkW78mc6+EeA= -google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= -google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2 h1:iTp+3yyl/KOtxa/d1/JUE0GGSoR6FuW5udver22iwpw= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20170731182057-09f6ed296fc6/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.3.1/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0-20150622162204-20b71e5b60d7/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.0.0-20180411045311-89060dee6a84/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYqJLFeWiJ9l4OE= -k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= -k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b h1:aBGgKJUM9Hk/3AE8WaZIApnTxG35kbuQba2w+SXqezo= -k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= -k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236 h1:JfFtjaElBIgYKCWEtYQkcNrTpW+lMO4GJy8NP6SVQmM= -k8s.io/apiextensions-apiserver v0.0.0-20190228180357-d002e88f6236/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= -k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8 h1:q1Qvjzs/iEdXF6A1a8H3AKVFDzJNcJn3nXMs6R6qFtA= -k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= -k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg= -k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d h1:Jmdtdt1ZnoGfWWIIik61Z7nKYgO3J+swQJtPYsP9wHA= -k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/apiserver v0.0.0-20181026151315-13cfe3978170/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= -k8s.io/apiserver v0.0.0-20181213151703-3ccfe8365421/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= +k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2 h1:bkwe5LsuANqyOwsBng5Qc4S91D2Tv0JHctAztt3YTQs= +k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2/go.mod h1:AOxZTnaXR/xiarlQL0JUfwQPxjmKDvVYoRp58cA7lUo= +k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604 h1:Kl/sh+wWzYK2hWFZtwvuFECup1SbE2kXfMnhGZsoO5M= +k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604/go.mod h1:7H8sjDlWQu89yWB3FhZfsLyRCRLuoXoCoY5qtwW1q6I= +k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d h1:7Kns6qqhMAQWvGkxYOLSLRZ5hJO0/5pcE5lPGP2fxUw= +k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d/go.mod h1:3jediapYqJ2w1BFw7lAZPCx7scubsTfosqHkhXCWJKw= +k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1/go.mod h1:4FuDU+iKPjdsdQSN3GsEKZLB/feQsj1y9dhhBDVV2Ns= k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= -k8s.io/cli-runtime v0.0.0-20181213153952-835b10687cb6/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= -k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 h1:aE8wOCKuoRs2aU0OP/Rz8SXiAB0FTTku3VtGhhrkSmc= -k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible h1:U5Bt+dab9K8qaUmXINrkXO135kA11/i5Kg1RUydgaMQ= -k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/cloud-provider v0.0.0-20190409023720-1bc0c81fa51d/go.mod h1:LlIffnLBu+GG7d4ppPzC8UnA1Ex8S+ntmSRVsnr7Xy4= -k8s.io/code-generator v0.0.0-20180823001027-3dcf91f64f63/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= -k8s.io/code-generator v0.0.0-20181203235156-f8cba74510f3/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= -k8s.io/code-generator v0.0.0-20190311093542-50b561225d70/go.mod h1:MYiN+ZJZ9HkETbgVZdWw2AsuAi9PZ4V80cwfuf2axe8= +k8s.io/cli-runtime v0.0.0-20190918202139-0b14c719ca62/go.mod h1:4AD5RWfUTpo9rDXKcqT+ofGoVKXcwseX9R0TpbjgYHY= +k8s.io/client-go v0.0.0-20190918200256-06eb1244587a h1:huOvPq1vO7dkuw9rZPYsLGpFmyGvy6L8q6mDItgkdQ4= +k8s.io/client-go v0.0.0-20190918200256-06eb1244587a/go.mod h1:3YAcTbI2ArBRmhHns5vlHRX8YQqvkVYpz+U/N5i1mVU= +k8s.io/cloud-provider v0.0.0-20190918203125-ae665f80358a/go.mod h1:hfxdMPnFjoiVZrbaHkBS0t56GelBDM199c4gOXAwQ/I= +k8s.io/cluster-bootstrap v0.0.0-20190918202959-c340507a5d48/go.mod h1:JoNzH2HyeimzRZXShJRDmpANOXTTL5RoXNbeCS3D8gY= +k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I= +k8s.io/component-base v0.0.0-20190918200425-ed2f0867c778/go.mod h1:DFWQCXgXVLiWtzFaS17KxHdlUeUymP7FLxZSkmL9/jU= +k8s.io/cri-api v0.0.0-20190817025403-3ae76f584e79/go.mod h1:MQf3sTYxPlSVy4QhUrDFfHWFxHtwhdpvGBECKGhZULk= +k8s.io/csi-translation-lib v0.0.0-20190918203248-97c07dcbb623/go.mod h1:FP2ff9xZ2FL6m427s99qF74Y18P8WSCvv1+CxK2RpLM= k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a h1:QoHVuRquf80YZ+/bovwxoMO3Q/A3nt3yTgS0/0nejuk= k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/helm v2.13.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= -k8s.io/helm v2.14.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= +k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= +k8s.io/helm v2.15.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68= k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/kube-aggregator v0.0.0-20181204002017-122bac39d429/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= -k8s.io/kube-aggregator v0.0.0-20181213152105-1e8cd453c474/go.mod h1:8sbzT4QQKDEmSCIbfqjV0sd97GpUT7A4W626sBiYJmU= -k8s.io/kube-openapi v0.0.0-20180629012420-d83b052f768a/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20180711000925-0cf8f7e6ed1d/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-aggregator v0.0.0-20190918201136-c3a845f1fbb2/go.mod h1:uQDSuHqLPDAvyKE3kJ1dWfjC/x5ZTs5RB6sJ6VMC1M0= +k8s.io/kube-controller-manager v0.0.0-20190918202837-c54ce30c680e/go.mod h1:6xCliEUbi4Fp9k7K/QLaCai+KoAVSb85hZh5V9cdzb4= k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c h1:kJCzg2vGCzah5icgkKR7O1Dzn0NA2iGlym27sb0ZfGE= k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208 h1:5sW+fEHvlJI3Ngolx30CmubFulwH28DhKjGf70Xmtco= -k8s.io/kube-openapi v0.0.0-20190603182131-db7b694dc208/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-state-metrics v1.6.0 h1:6wkxiTPTZ4j+LoMWuT+rZ+OlUWswktzXs5yHmggmAZ0= -k8s.io/kube-state-metrics v1.6.0/go.mod h1:84+q9aGVQPzXYGgtvyhZr/fSI6BdLsbPWXn37RASc9k= +k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY= +k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-proxy v0.0.0-20190918202429-08c8357f8e2d/go.mod h1:/8t8XDVKNmtIJRE58VWlDE1JpVxxUSClLQ9dYajKsvk= +k8s.io/kube-scheduler v0.0.0-20190918202713-c34a54b3ec8e/go.mod h1:FXv3w4FuJh54SH/aZbDEr1MITXTcYCYpFArZ176M1U0= k8s.io/kube-state-metrics v1.7.2 h1:6vdtgXrrRRMSgnyDmgua+qvgCYv954JNfxXAtDkeLVQ= k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E= +k8s.io/kubelet v0.0.0-20190918202550-958285cf3eef/go.mod h1:y3faEeGRJ9L54/YJWIF0Vp+ZYq9slxgkoPO7ib0Qj9w= k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.14.2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/kubernetes v1.15.4/go.mod h1:4Ggyo4AFgjbIzULOminzUJAvgbzY3j5ysXlW/a0PdcQ= +k8s.io/legacy-cloud-providers v0.0.0-20190918203421-225f0541b3ea/go.mod h1:qd7ZEaONgkMZRdUbaoK6ngxjuJz8kLBImMukwL7mOIg= +k8s.io/metrics v0.0.0-20190918202012-3c1ca76f5bda/go.mod h1:LxAN6ulYLPVQGTtRkXEUyylgseTWArq1iCZ9Zve8edc= +k8s.io/repo-infra v0.0.0-20181204233714-00fe14e3d1a3/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= +k8s.io/sample-apiserver v0.0.0-20190918201353-5cc279503896/go.mod h1:VZkjycg0KSnzhUmktU7DsZghCqJdDQaj9HTWh6b5JZI= +k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g90ETOiA6rfLV1Y= k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= +modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= +modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= +modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= +modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= sigs.k8s.io/controller-runtime v0.1.10/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= -sigs.k8s.io/controller-runtime v0.1.12 h1:ovDq28E64PeY1yR+6H7DthakIC09soiDCrKvfP2tPYo= -sigs.k8s.io/controller-runtime v0.1.12/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= -sigs.k8s.io/controller-runtime v0.2.0 h1:5gL30PXOisGZl+Osi4CmLhvMUj77BO3wJeouKF2va50= -sigs.k8s.io/controller-runtime v0.2.0/go.mod h1:ZHqrRDZi3f6BzONcvlUxkqCKgwasGk5FZrnSv9TVZF4= -sigs.k8s.io/controller-tools v0.1.10/go.mod h1:6g08p9m9G/So3sBc1AOQifHfhxH/mb6Sc4z0LMI8XMw= -sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde h1:ZkaHf5rNYzIB6CB82keKMQNv7xxkqT0ylOBdfJPfi+k= -sigs.k8s.io/controller-tools v0.1.11-0.20190411181648-9d55346c2bde/go.mod h1:ATWLRP3WGxuAN9HcT2LaKHReXIH+EZGzRuMHuxjXfhQ= -sigs.k8s.io/controller-tools v0.2.0 h1:AmQ/0JKBJAjyAiPAkrAf9QW06jkx2lc5hpxMjamsFpw= -sigs.k8s.io/controller-tools v0.2.0/go.mod h1:8t/X+FVWvk6TaBcsa+UKUBbn7GMtvyBKX30SGl4em6Y= -sigs.k8s.io/controller-tools v0.2.1 h1:HoCik83vXOpPi7KSJWdPRmiGntyOzK0v0BTV4U+pl8o= +sigs.k8s.io/controller-runtime v0.3.0 h1:ZtdgqJXVHsIytjdmDuk0QjagnzyLq9FjojXRqIp+dU4= +sigs.k8s.io/controller-runtime v0.3.0/go.mod h1:Cw6PkEg0Sa7dAYovGT4R0tRkGhHXpYijwNxYhAnAZZk= +sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff v0.0.0-20190302045857-e85c7b244fd2/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= -vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= +vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go index 912692f45..8dba90527 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go @@ -40,7 +40,7 @@ func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]OpenTelemetryCollector, len(*in)) diff --git a/tools.go b/tools.go index 648413f98..52a9fac4e 100644 --- a/tools.go +++ b/tools.go @@ -1,7 +1,3 @@ // +build tools package tools - -import ( - _ "sigs.k8s.io/controller-tools/pkg/crd/generator" -) From f1aa93d45035a347a7263f8acdae986dc8f6ae87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 11:51:17 +0100 Subject: [PATCH 0028/1234] Added publishing of images to quay.io (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/publish-images.sh | 37 ++++++++++++++++++++++++++++++++++ .github/workflows/publish.yaml | 20 ++++++++++++++++++ README.md | 1 + build/Dockerfile | 2 +- go.sum | 1 + 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100755 .ci/publish-images.sh create mode 100644 .github/workflows/publish.yaml diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh new file mode 100755 index 000000000..c5c98c2c2 --- /dev/null +++ b/.ci/publish-images.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"opentelemetry/opentelemetry-operator"} +OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags)} + +## if we are on a release tag, let's extract the version number +## the other possible value, currently, is 'master' (or another branch name) +## if we are not running in the CI, it fallsback to the `git describe` above +if [[ $OPERATOR_VERSION == v* ]]; then + OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)") + MAJOR_MINOR=$(echo ${OPERATOR_VERSION} | awk -F. '{print $1"."$2}') +fi + +BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} + +echo "Building image ${BUILD_IMAGE}" +make install-tools build container BUILD_IMAGE="${BUILD_IMAGE}" + +## now, push to quay.io +if [ -n ${QUAY_USERNAME} -a -n ${QUAY_PASSWORD} ]; then + echo "Performing a 'docker login' for Quay" + echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin + + echo "Tagging ${BUILD_IMAGE} as quay.io/${BUILD_IMAGE}" + docker tag "${BUILD_IMAGE}" "quay.io/${BUILD_IMAGE}" + + echo "Pushing 'quay.io/${BUILD_IMAGE}'" + docker push "quay.io/${BUILD_IMAGE}" + + if [ -n ${MAJOR_MINOR_IMAGE} ]; then + echo "Pushing 'quay.io/${MAJOR_MINOR_IMAGE}' to quay.io" + docker tag "${MAJOR_MINOR_IMAGE}" "quay.io/${MAJOR_MINOR_IMAGE}" + docker push "quay.io/${MAJOR_MINOR_IMAGE}" + fi +else + echo "Couldn't publish images to ${BUILD_IMAGE}, as the credentials aren't set" +fi diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 000000000..669f4e8a6 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,20 @@ +name: "Publish artifacts" +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: '1.13.3' + - uses: actions/checkout@v1 + - name: "publishes the container images" + env: + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + OPERATOR_VERSION: master + run: ./.ci/publish-images.sh diff --git a/README.md b/README.md index 121547717..755ebdd41 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] [![Maintainability][code-climate-img]][code-climate] [![codecov][codecov-img]][codecov] +[![Repository on Quay](https://quay.io/repository/opentelemetry/opentelemetry-operator/status "Repository on Quay")](https://quay.io/repository/opentelemetry/opentelemetry-operator) # OpenTelemetry Operator for Kubernetes diff --git a/build/Dockerfile b/build/Dockerfile index 2fdeee9aa..4de868d81 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi7/ubi-minimal:latest +FROM registry.access.redhat.com/ubi8/ubi-minimal:latest ENV OPERATOR=/usr/local/bin/opentelemetry-operator \ USER_UID=1001 \ diff --git a/go.sum b/go.sum index 0158828a9..bd4b7625f 100644 --- a/go.sum +++ b/go.sum @@ -606,6 +606,7 @@ golang.org/x/tools v0.0.0-20190320215829-36c10c0a621f/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From feb79cdd6d9365cd39daa4d4edd2a25cfd3cf4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 13:08:30 +0100 Subject: [PATCH 0029/1234] Moved 'format' to external script (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/format.sh | 12 ++++++++++++ Makefile | 2 +- go.mod | 9 +++++++++ go.sum | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100755 .ci/format.sh diff --git a/.ci/format.sh b/.ci/format.sh new file mode 100755 index 000000000..b23a6e499 --- /dev/null +++ b/.ci/format.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +GOFMT=goimports + +command -v ${GOFMT} > /dev/null +if [ $? != 0 ]; then + if [ -z ${GOPATH} ]; then + GOFMT="${GOPATH}/bin/goimports" + fi +fi + +${GOFMT} -local "github.com/open-telemetry/opentelemetry-operator" -l -w $(git ls-files "*\.go" | grep -v vendor) diff --git a/Makefile b/Makefile index ae4f2026b..77d684218 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ ensure-generate-is-noop: generate .PHONY: format format: @echo Formatting code... - @goimports -w -local "github.com/open-telemetry/opentelemetry-operator" . + @GOPATH=${GOPATH} .ci/format.sh .PHONY: security security: diff --git a/go.mod b/go.mod index cc15cf75c..6f406cdaa 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,19 @@ require ( github.com/coreos/prometheus-operator v0.29.0 github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.0 + github.com/onsi/ginkgo v1.10.3 // indirect + github.com/onsi/gomega v1.7.1 // indirect github.com/operator-framework/operator-sdk v0.12.0 github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.4.0 + golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect + golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect + golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 // indirect + golang.org/x/text v0.3.2 // indirect + golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/yaml.v2 v2.2.7 // indirect gotest.tools v2.2.0+incompatible k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 diff --git a/go.sum b/go.sum index bd4b7625f..55decc25d 100644 --- a/go.sum +++ b/go.sum @@ -357,6 +357,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -364,6 +366,8 @@ github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v0.0.0-20170604055404-372ad780f634/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= @@ -526,6 +530,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -553,6 +559,8 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -581,10 +589,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 h1:khxRGsvPk4n2y8I/mLLjp7e5dMTJmH75wvqS6nMwUtY= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db h1:6/JqlYfC1CCaLnGceQTI+sDGhC9UBSPAsBqI0Gun6kU= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -610,6 +622,8 @@ golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkX golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= @@ -635,6 +649,8 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -656,6 +672,9 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= From 89497f4e741016ba787b61aba74d78c8a76a28e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 13:32:09 +0100 Subject: [PATCH 0030/1234] Fixed check of where goimports is installed (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/format.sh | 2 +- .ci/publish-images.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.ci/format.sh b/.ci/format.sh index b23a6e499..3f8fe66e4 100755 --- a/.ci/format.sh +++ b/.ci/format.sh @@ -4,7 +4,7 @@ GOFMT=goimports command -v ${GOFMT} > /dev/null if [ $? != 0 ]; then - if [ -z ${GOPATH} ]; then + if [ -n "${GOPATH}" ]; then GOFMT="${GOPATH}/bin/goimports" fi fi diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh index c5c98c2c2..5365c1504 100755 --- a/.ci/publish-images.sh +++ b/.ci/publish-images.sh @@ -16,8 +16,14 @@ BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} echo "Building image ${BUILD_IMAGE}" make install-tools build container BUILD_IMAGE="${BUILD_IMAGE}" +if [ -n "${MAJOR_MINOR}" ]; then + MAJOR_MINOR_IMAGE="${BASE_BUILD_IMAGE}:${MAJOR_MINOR}" + docker tag "${BUILD_IMAGE}" "${MAJOR_MINOR_IMAGE}" + docker push "${MAJOR_MINOR_IMAGE}" +fi + ## now, push to quay.io -if [ -n ${QUAY_USERNAME} -a -n ${QUAY_PASSWORD} ]; then +if [ -n "${QUAY_USERNAME}" -a -n "${QUAY_PASSWORD}" ]; then echo "Performing a 'docker login' for Quay" echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin @@ -27,7 +33,7 @@ if [ -n ${QUAY_USERNAME} -a -n ${QUAY_PASSWORD} ]; then echo "Pushing 'quay.io/${BUILD_IMAGE}'" docker push "quay.io/${BUILD_IMAGE}" - if [ -n ${MAJOR_MINOR_IMAGE} ]; then + if [ -n "${MAJOR_MINOR_IMAGE}" ]; then echo "Pushing 'quay.io/${MAJOR_MINOR_IMAGE}' to quay.io" docker tag "${MAJOR_MINOR_IMAGE}" "quay.io/${MAJOR_MINOR_IMAGE}" docker push "quay.io/${MAJOR_MINOR_IMAGE}" From 0a3eef50e6bf3b73b920f397ba2c4a34b50d1891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 15:56:14 +0100 Subject: [PATCH 0031/1234] Changed to build containers with buildah (#6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/build-container.sh | 17 +++++++++++++++++ Makefile | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 .ci/build-container.sh diff --git a/.ci/build-container.sh b/.ci/build-container.sh new file mode 100755 index 000000000..f1971afe0 --- /dev/null +++ b/.ci/build-container.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -z "${BUILD_IMAGE}" ]; then + echo "Build image not provided" + exit 1 +fi + +command -v "buildah" > /dev/null +if [ $? = 0 ]; then + echo "Using buildah" > build/_output/build-container.log + CMD="buildah bud" +else + echo "Using Docker" > build/_output/build-container.log + CMD="docker" +fi + +${CMD} -f build/Dockerfile -t ${BUILD_IMAGE} . >> build/_output/build-container.log 2>&1 \ No newline at end of file diff --git a/Makefile b/Makefile index 77d684218..0b3da12db 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ build: format container: @echo Building container ${BUILD_IMAGE}... @mkdir -p build/_output - @docker build -f build/Dockerfile -t ${BUILD_IMAGE} . > build/_output/build-container.log 2>&1 + @BUILD_IMAGE=${BUILD_IMAGE} ./.ci/build-container.sh .PHONY: run run: crd From 0380df5e90a12958c3aaf0ee17491733883ea2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 18 Dec 2019 16:22:25 +0100 Subject: [PATCH 0032/1234] Replaced operator-sdk clients with typed client-go/kubernetes clients (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 12 +- cmd/manager/main.go | 14 +- go.sum | 21 --- .../v1alpha1/opentelemetrycollector_types.go | 4 + pkg/client/clientset.go | 40 ++++ pkg/client/versioned/clientset.go | 75 ++++++++ pkg/client/versioned/doc.go | 4 + .../versioned/fake/clientset_generated.go | 62 ++++++ pkg/client/versioned/fake/doc.go | 4 + pkg/client/versioned/fake/register.go | 41 ++++ pkg/client/versioned/scheme/doc.go | 4 + pkg/client/versioned/scheme/register.go | 41 ++++ .../typed/opentelemetry/v1alpha1/doc.go | 4 + .../typed/opentelemetry/v1alpha1/fake/doc.go | 4 + .../fake/fake_opentelemetry_client.go | 25 +++ .../fake/fake_opentelemetrycollector.go | 125 +++++++++++++ .../v1alpha1/generated_expansion.go | 5 + .../v1alpha1/opentelemetry_client.go | 75 ++++++++ .../v1alpha1/opentelemetrycollector.go | 176 ++++++++++++++++++ .../opentelemetrycollector_controller.go | 7 +- .../opentelemetrycollector/reconcile.go | 39 ++-- .../reconcile_configmap.go | 26 +-- .../reconcile_configmap_test.go | 54 +++--- .../reconcile_daemonset.go | 26 +-- .../reconcile_daemonset_test.go | 54 +++--- .../reconcile_deployment.go | 26 +-- .../reconcile_deployment_test.go | 54 +++--- .../reconcile_service.go | 26 +-- .../reconcile_service_test.go | 56 +++--- .../reconcile_servicemonitor.go | 14 +- .../reconcile_servicemonitor_test.go | 38 ++-- .../opentelemetrycollector/reconcile_test.go | 47 +++-- .../opentelemetrycollector/upgrade.go | 2 +- .../opentelemetrycollector/upgrade_test.go | 11 +- pkg/upgrade/upgrade.go | 16 +- pkg/upgrade/upgrade_test.go | 28 ++- pkg/upgrade/v0_0_2.go | 5 +- pkg/upgrade/versions.go | 7 +- 38 files changed, 1010 insertions(+), 262 deletions(-) create mode 100644 pkg/client/clientset.go create mode 100644 pkg/client/versioned/clientset.go create mode 100644 pkg/client/versioned/doc.go create mode 100644 pkg/client/versioned/fake/clientset_generated.go create mode 100644 pkg/client/versioned/fake/doc.go create mode 100644 pkg/client/versioned/fake/register.go create mode 100644 pkg/client/versioned/scheme/doc.go create mode 100644 pkg/client/versioned/scheme/register.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go create mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go diff --git a/Makefile b/Makefile index 0b3da12db..43b8296e2 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,12 @@ discard-go-mod-changes: @git checkout -- go.mod go.sum .PHONY: check -check: format ensure-generate-is-noop discard-go-mod-changes +check: ensure-generate-is-noop discard-go-mod-changes @echo Checking... @git diff -s --exit-code . || (echo "Build failed: one or more source files aren't properly formatted. Run 'make format' and update your PR." && exit 1) .PHONY: ensure-generate-is-noop -ensure-generate-is-noop: generate +ensure-generate-is-noop: generate client-gen format @git diff -s --exit-code pkg/apis/opentelemetry/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1) .PHONY: format @@ -92,8 +92,16 @@ ci: install-tools ensure-generate-is-noop all install-tools: @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 @go install golang.org/x/tools/cmd/goimports + @go install k8s.io/code-generator/cmd/client-gen .PHONY: install-prometheus-operator install-prometheus-operator: @echo Installing Prometheus Operator bundle @kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml + +.PHONY: client-gen +client-gen: internal-client-gen format + +.PHONY: internal-client-gen +internal-client-gen: + @client-gen --input "opentelemetry/v1alpha1" --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis --go-header-file /dev/null --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client --clientset-name versioned --output-base ../../../ diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 9180df1ed..463fd1cc7 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -28,6 +28,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/apis" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" "github.com/open-telemetry/opentelemetry-operator/pkg/controller" "github.com/open-telemetry/opentelemetry-operator/pkg/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/version" @@ -121,9 +122,14 @@ func main() { os.Exit(1) } - ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetrycollector")) - if err := upgrade.ManagedInstances(ctxUpgrade, mgr.GetClient()); err != nil { - log.Error(err, "failed to upgrade managed instances") + // Setup client set + if cl, err := client.ForManager(mgr); err == nil { + ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetrycollector")) + if err := upgrade.ManagedInstances(ctxUpgrade, cl); err != nil { + log.Error(err, "failed to upgrade managed instances") + } + } else { + log.Error(err, "failed to obtain a set of clients to perform the upgrade") } // Setup all Controllers @@ -163,8 +169,6 @@ func main() { } viper.Set(opentelemetry.SvcMonitorAvailable, svcMonitorAvail) - log.Info("Starting the Cmd.") - // Start the Cmd if err := mgr.Start(signals.SetupSignalHandler()); err != nil { log.Error(err, "Manager exited non-zero") diff --git a/go.sum b/go.sum index 55decc25d..7666bf224 100644 --- a/go.sum +++ b/go.sum @@ -108,7 +108,6 @@ github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.8.1+incompatible h1:AyDqLHbJ1quqbWr/OWDw+PlIP8ZFoTmYrGYaxzrLbNg= github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -187,7 +186,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -216,14 +214,12 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= @@ -246,7 +242,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.8.5 h1:2+KSC78XiO6Qy0hIjfc1OD9H+hsaJdJlb8Kqsd41CTE= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= @@ -355,7 +350,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -364,7 +358,6 @@ github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuB github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -388,7 +381,6 @@ github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVls github.com/operator-framework/operator-registry v1.1.1/go.mod h1:7D4WEwL+EKti5npUh4/u64DQhawCBRugp8Ql20duUb4= github.com/operator-framework/operator-sdk v0.12.0 h1:9eAD1L8e6pPCpFCAacBUVf2eloDkRuVm29GTCOktLqQ= github.com/operator-framework/operator-sdk v0.12.0/go.mod h1:mW8isQxiXlLCVf2E+xqflkQAVLOTbiqjndKdkKIrR0M= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= @@ -475,7 +467,6 @@ github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= -github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= @@ -510,7 +501,6 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -528,7 +518,6 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -557,7 +546,6 @@ golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -587,13 +575,11 @@ golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438 h1:khxRGsvPk4n2y8I/mLLjp7e5dMTJmH75wvqS6nMwUtY= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db h1:6/JqlYfC1CCaLnGceQTI+sDGhC9UBSPAsBqI0Gun6kU= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -618,9 +604,7 @@ golang.org/x/tools v0.0.0-20190320215829-36c10c0a621f/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -631,7 +615,6 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -642,12 +625,10 @@ google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmE google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1 h1:TrBcJ1yqAl1G++wO39nD/qtgpsW9/1+QGrluyMGEYgM= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -670,7 +651,6 @@ gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= @@ -717,7 +697,6 @@ k8s.io/kube-controller-manager v0.0.0-20190918202837-c54ce30c680e/go.mod h1:6xCl k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c h1:kJCzg2vGCzah5icgkKR7O1Dzn0NA2iGlym27sb0ZfGE= k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 8671c33ea..03981c9aa 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -40,6 +40,7 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +// +genclient type OpenTelemetryCollector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -60,3 +61,6 @@ type OpenTelemetryCollectorList struct { func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } + +// AddToScheme is an alias to SchemeBuilder.AddToScheme, to please client-gen +var AddToScheme = SchemeBuilder.AddToScheme diff --git a/pkg/client/clientset.go b/pkg/client/clientset.go new file mode 100644 index 000000000..a9f374230 --- /dev/null +++ b/pkg/client/clientset.go @@ -0,0 +1,40 @@ +package client + +import ( + monclient "github.com/coreos/prometheus-operator/pkg/client/versioned" + "k8s.io/client-go/kubernetes" + "sigs.k8s.io/controller-runtime/pkg/manager" + + otclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned" +) + +// Clientset holds all the clients that the reconciler might need to hold +type Clientset struct { + Kubernetes kubernetes.Interface + Monitoring monclient.Interface + OpenTelemetry otclient.Interface +} + +// ForManager returns a Clientset based on the information from the given manager +func ForManager(mgr manager.Manager) (*Clientset, error) { + cl, err := kubernetes.NewForConfig(mgr.GetConfig()) + if err != nil { + return nil, err + } + + monclient, err := monclient.NewForConfig(mgr.GetConfig()) + if err != nil { + return nil, err + } + + otclient, err := otclient.NewForConfig(mgr.GetConfig()) + if err != nil { + return nil, err + } + + return &Clientset{ + Kubernetes: cl, + Monitoring: monclient, + OpenTelemetry: otclient, + }, nil +} diff --git a/pkg/client/versioned/clientset.go b/pkg/client/versioned/clientset.go new file mode 100644 index 000000000..7672ef6ac --- /dev/null +++ b/pkg/client/versioned/clientset.go @@ -0,0 +1,75 @@ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" + + opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + opentelemetryV1alpha1 *opentelemetryv1alpha1.OpentelemetryV1alpha1Client +} + +// OpentelemetryV1alpha1 retrieves the OpentelemetryV1alpha1Client +func (c *Clientset) OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface { + return c.opentelemetryV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.opentelemetryV1alpha1, err = opentelemetryv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.opentelemetryV1alpha1 = opentelemetryv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.opentelemetryV1alpha1 = opentelemetryv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/pkg/client/versioned/doc.go b/pkg/client/versioned/doc.go new file mode 100644 index 000000000..0e0c2a890 --- /dev/null +++ b/pkg/client/versioned/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/pkg/client/versioned/fake/clientset_generated.go b/pkg/client/versioned/fake/clientset_generated.go new file mode 100644 index 000000000..bf1c17bc3 --- /dev/null +++ b/pkg/client/versioned/fake/clientset_generated.go @@ -0,0 +1,62 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" + + clientset "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned" + opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" + fakeopentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +var _ clientset.Interface = &Clientset{} + +// OpentelemetryV1alpha1 retrieves the OpentelemetryV1alpha1Client +func (c *Clientset) OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface { + return &fakeopentelemetryv1alpha1.FakeOpentelemetryV1alpha1{Fake: &c.Fake} +} diff --git a/pkg/client/versioned/fake/doc.go b/pkg/client/versioned/fake/doc.go new file mode 100644 index 000000000..3630ed1cd --- /dev/null +++ b/pkg/client/versioned/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/pkg/client/versioned/fake/register.go b/pkg/client/versioned/fake/register.go new file mode 100644 index 000000000..875ddd768 --- /dev/null +++ b/pkg/client/versioned/fake/register.go @@ -0,0 +1,41 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + opentelemetryv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/pkg/client/versioned/scheme/doc.go b/pkg/client/versioned/scheme/doc.go new file mode 100644 index 000000000..14db57a58 --- /dev/null +++ b/pkg/client/versioned/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/pkg/client/versioned/scheme/register.go b/pkg/client/versioned/scheme/register.go new file mode 100644 index 000000000..e16005b08 --- /dev/null +++ b/pkg/client/versioned/scheme/register.go @@ -0,0 +1,41 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + opentelemetryv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go new file mode 100644 index 000000000..93a7ca4e0 --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go new file mode 100644 index 000000000..2b5ba4c8e --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go new file mode 100644 index 000000000..ea6db0066 --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go @@ -0,0 +1,25 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" +) + +type FakeOpentelemetryV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOpentelemetryV1alpha1) OpenTelemetryCollectors(namespace string) v1alpha1.OpenTelemetryCollectorInterface { + return &FakeOpenTelemetryCollectors{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOpentelemetryV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go new file mode 100644 index 000000000..cc41b975e --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go @@ -0,0 +1,125 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// FakeOpenTelemetryCollectors implements OpenTelemetryCollectorInterface +type FakeOpenTelemetryCollectors struct { + Fake *FakeOpentelemetryV1alpha1 + ns string +} + +var opentelemetrycollectorsResource = schema.GroupVersionResource{Group: "opentelemetry.io", Version: "v1alpha1", Resource: "opentelemetrycollectors"} + +var opentelemetrycollectorsKind = schema.GroupVersionKind{Group: "opentelemetry.io", Version: "v1alpha1", Kind: "OpenTelemetryCollector"} + +// Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. +func (c *FakeOpenTelemetryCollectors) Get(name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OpenTelemetryCollector), err +} + +// List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. +func (c *FakeOpenTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(opentelemetrycollectorsResource, opentelemetrycollectorsKind, c.ns, opts), &v1alpha1.OpenTelemetryCollectorList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.OpenTelemetryCollectorList{ListMeta: obj.(*v1alpha1.OpenTelemetryCollectorList).ListMeta} + for _, item := range obj.(*v1alpha1.OpenTelemetryCollectorList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested openTelemetryCollectors. +func (c *FakeOpenTelemetryCollectors) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(opentelemetrycollectorsResource, c.ns, opts)) + +} + +// Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. +func (c *FakeOpenTelemetryCollectors) Create(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OpenTelemetryCollector), err +} + +// Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. +func (c *FakeOpenTelemetryCollectors) Update(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OpenTelemetryCollector), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeOpenTelemetryCollectors) UpdateStatus(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(opentelemetrycollectorsResource, "status", c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OpenTelemetryCollector), err +} + +// Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. +func (c *FakeOpenTelemetryCollectors) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeOpenTelemetryCollectors) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(opentelemetrycollectorsResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.OpenTelemetryCollectorList{}) + return err +} + +// Patch applies the patch and returns the patched openTelemetryCollector. +func (c *FakeOpenTelemetryCollectors) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(opentelemetrycollectorsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OpenTelemetryCollector{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OpenTelemetryCollector), err +} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..4793de80f --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go @@ -0,0 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OpenTelemetryCollectorExpansion interface{} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go new file mode 100644 index 000000000..6f040ebea --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go @@ -0,0 +1,75 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/scheme" +) + +type OpentelemetryV1alpha1Interface interface { + RESTClient() rest.Interface + OpenTelemetryCollectorsGetter +} + +// OpentelemetryV1alpha1Client is used to interact with features provided by the opentelemetry.io group. +type OpentelemetryV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OpentelemetryV1alpha1Client) OpenTelemetryCollectors(namespace string) OpenTelemetryCollectorInterface { + return newOpenTelemetryCollectors(c, namespace) +} + +// NewForConfig creates a new OpentelemetryV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OpentelemetryV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OpentelemetryV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OpentelemetryV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OpentelemetryV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OpentelemetryV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OpentelemetryV1alpha1Client { + return &OpentelemetryV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *OpentelemetryV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go new file mode 100644 index 000000000..12b90b968 --- /dev/null +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go @@ -0,0 +1,176 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + scheme "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/scheme" +) + +// OpenTelemetryCollectorsGetter has a method to return a OpenTelemetryCollectorInterface. +// A group's client should implement this interface. +type OpenTelemetryCollectorsGetter interface { + OpenTelemetryCollectors(namespace string) OpenTelemetryCollectorInterface +} + +// OpenTelemetryCollectorInterface has methods to work with OpenTelemetryCollector resources. +type OpenTelemetryCollectorInterface interface { + Create(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) + Update(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) + UpdateStatus(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.OpenTelemetryCollector, error) + List(opts v1.ListOptions) (*v1alpha1.OpenTelemetryCollectorList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) + OpenTelemetryCollectorExpansion +} + +// openTelemetryCollectors implements OpenTelemetryCollectorInterface +type openTelemetryCollectors struct { + client rest.Interface + ns string +} + +// newOpenTelemetryCollectors returns a OpenTelemetryCollectors +func newOpenTelemetryCollectors(c *OpentelemetryV1alpha1Client, namespace string) *openTelemetryCollectors { + return &openTelemetryCollectors{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. +func (c *openTelemetryCollectors) Get(name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { + result = &v1alpha1.OpenTelemetryCollector{} + err = c.client.Get(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. +func (c *openTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.OpenTelemetryCollectorList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested openTelemetryCollectors. +func (c *openTelemetryCollectors) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. +func (c *openTelemetryCollectors) Create(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { + result = &v1alpha1.OpenTelemetryCollector{} + err = c.client.Post(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + Body(openTelemetryCollector). + Do(). + Into(result) + return +} + +// Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. +func (c *openTelemetryCollectors) Update(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { + result = &v1alpha1.OpenTelemetryCollector{} + err = c.client.Put(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + Name(openTelemetryCollector.Name). + Body(openTelemetryCollector). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *openTelemetryCollectors) UpdateStatus(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { + result = &v1alpha1.OpenTelemetryCollector{} + err = c.client.Put(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + Name(openTelemetryCollector.Name). + SubResource("status"). + Body(openTelemetryCollector). + Do(). + Into(result) + return +} + +// Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. +func (c *openTelemetryCollectors) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *openTelemetryCollectors) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched openTelemetryCollector. +func (c *openTelemetryCollectors) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { + result = &v1alpha1.OpenTelemetryCollector{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("opentelemetrycollectors"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go b/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go index 90b284c92..13cc46aec 100644 --- a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go +++ b/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go @@ -16,7 +16,12 @@ var log = logf.Log.WithName("controller_opentelemetrycollector") // Add creates a new OpenTelemetryCollector Controller and adds it to the Manager. The Manager will set fields on the Controller // and Start it when the Manager is Started. func Add(mgr manager.Manager) error { - return add(mgr, WithManager(mgr)) + r, err := WithManager(mgr) + if err != nil { + return err + } + + return add(mgr, r) } // add adds a new Controller to mgr with r as the reconcile.Reconciler diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index 977c4f4d4..25b0372c5 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -5,17 +5,16 @@ import ( "fmt" "time" - monclientv1 "github.com/coreos/prometheus-operator/pkg/client/versioned/typed/monitoring/v1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" ) // blank assignment to verify that ReconcileOpenTelemetryCollector implements reconcile.Reconciler @@ -28,36 +27,27 @@ type ReconcileOpenTelemetryCollector struct { scheme *runtime.Scheme // the clients that compose this reconciler - clients *Clients + clientset *client.Clientset // the list of reconciliation functions to execute reconcileFuncs []func(context.Context) error } -// Clients holds all the clients that the reconciler might need to hold -type Clients struct { - client client.Client - - // some places are using the rich REST client - monclient monclientv1.MonitoringV1Interface -} - // WithManager creates a new reconciler based on the manager information -func WithManager(manager manager.Manager) *ReconcileOpenTelemetryCollector { - monclient := monclientv1.NewForConfigOrDie(manager.GetConfig()) - clients := &Clients{ - client: manager.GetClient(), - monclient: monclient, +func WithManager(manager manager.Manager) (*ReconcileOpenTelemetryCollector, error) { + cl, err := client.ForManager(manager) + if err != nil { + return nil, err } - return New(manager.GetScheme(), clients) + return New(manager.GetScheme(), cl), nil } // New constructs a ReconcileOpenTelemetryCollector based on the client and scheme, with the default reconciliation functions -func New(scheme *runtime.Scheme, clients *Clients) *ReconcileOpenTelemetryCollector { +func New(scheme *runtime.Scheme, clientset *client.Clientset) *ReconcileOpenTelemetryCollector { r := &ReconcileOpenTelemetryCollector{ - scheme: scheme, - clients: clients, + scheme: scheme, + clientset: clientset, } r.reconcileFuncs = []func(context.Context) error{ r.reconcileConfigMap, @@ -80,9 +70,10 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( ) reqLogger.Info("Reconciling OpenTelemetryCollector") + otelCols := r.clientset.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(request.Namespace) + // Fetch the OpenTelemetryCollector instance - instance := &v1alpha1.OpenTelemetryCollector{} - err := r.clients.client.Get(context.Background(), request.NamespacedName, instance) + instance, err := otelCols.Get(request.Name, v1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -110,13 +101,13 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( } // update the status object, which might have also been updated - if err := r.clients.client.Status().Update(ctx, instance); err != nil { + if instance, err = otelCols.UpdateStatus(instance); err != nil { reqLogger.Error(err, "failed to store the custom resource's status") return reconcile.Result{}, err } // apply it back, as it might have been updated - if err := r.clients.client.Update(ctx, instance); err != nil { + if _, err := otelCols.Update(instance); err != nil { reqLogger.Error(err, "failed to store back the custom resource") return reconcile.Result{}, err } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go index 652bb394c..20ad42f7d 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap.go @@ -8,8 +8,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" + "k8s.io/apimachinery/pkg/labels" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -62,10 +61,11 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) - existing := &corev1.ConfigMap{} - err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + cmaps := r.clientset.Kubernetes.CoreV1().ConfigMaps(desired.Namespace) + + existing, err := cmaps.Get(desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if err := r.clients.client.Create(ctx, desired); err != nil { + if desired, err = cmaps.Create(desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -95,7 +95,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex updated.ObjectMeta.Labels[k] = v } - if err := r.clients.client.Update(ctx, updated); err != nil { + if updated, err = cmaps.Update(updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) @@ -107,16 +107,16 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, expected []*corev1.ConfigMap) error { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + cmaps := r.clientset.Kubernetes.CoreV1().ConfigMaps(instance.Namespace) - opts := []client.ListOption{ - client.InNamespace(instance.Namespace), - client.MatchingLabels(map[string]string{ + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), + }).String(), } - list := &corev1.ConfigMapList{} - if err := r.clients.client.List(ctx, list, opts...); err != nil { + list, err := cmaps.List(opts) + if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -129,7 +129,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, } if del { - if err := r.clients.client.Delete(ctx, &existing); err != nil { + if err := cmaps.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index 813be0ab5..cfc42f086 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -4,15 +4,17 @@ import ( "context" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperConfigMap(t *testing.T) { @@ -29,19 +31,21 @@ func TestProperConfigMap(t *testing.T) { func TestProperReconcileConfigMap(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} // test _, err := reconciler.Reconcile(req) assert.NoError(t, err) // verify - list := &corev1.ConfigMapList{} - clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) + list, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).List(metav1.ListOptions{}) + assert.NoError(t, err) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -52,17 +56,18 @@ func TestProperReconcileConfigMap(t *testing.T) { func TestUpdateConfigMap(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted := &corev1.ConfigMap{} - err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, "the-config-in-yaml-format", persisted.Data[opentelemetry.CollectorConfigMapEntry]) @@ -77,8 +82,8 @@ func TestUpdateConfigMap(t *testing.T) { reconciler.reconcileConfigMap(ctx) // verify - persisted = &corev1.ConfigMap{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Equal(t, "updated-config-map", persisted.Data[opentelemetry.CollectorConfigMapEntry]) } @@ -86,24 +91,25 @@ func TestDeleteExtraConfigMap(t *testing.T) { // prepare c := configMap(ctx) c.Name = "extra-config-map" + c.Namespace = instance.Namespace - clients := &Clients{ - client: fake.NewFakeClient(c), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - persisted := &corev1.ConfigMap{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) // test - err := reconciler.reconcileConfigMap(ctx) + err = reconciler.reconcileConfigMap(ctx) assert.NoError(t, err) // verify - persisted = &corev1.ConfigMap{} - err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) - - assert.Empty(t, persisted.Name) + persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index b06eac772..9f4b3b2a7 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -10,8 +10,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" + "k8s.io/apimachinery/pkg/labels" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -136,10 +135,11 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) - existing := &appsv1.DaemonSet{} - err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + dsets := r.clientset.Kubernetes.AppsV1().DaemonSets(desired.Namespace) + + existing, err := dsets.Get(desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if err := r.clients.client.Create(ctx, desired); err != nil { + if existing, err = dsets.Create(desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -168,7 +168,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex updated.ObjectMeta.Labels[k] = v } - if err := r.clients.client.Update(ctx, updated); err != nil { + if updated, err = dsets.Update(updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace) @@ -180,16 +180,16 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, expected []*appsv1.DaemonSet) error { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + dsets := r.clientset.Kubernetes.AppsV1().DaemonSets(instance.Namespace) - opts := []client.ListOption{ - client.InNamespace(instance.Namespace), - client.MatchingLabels(map[string]string{ + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), + }).String(), } - list := &appsv1.DaemonSetList{} - if err := r.clients.client.List(ctx, list, opts...); err != nil { + list, err := dsets.List(opts) + if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -202,7 +202,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, } if del { - if err := r.clients.client.Delete(ctx, &existing); err != nil { + if err := dsets.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "daemonSet.name", existing.Name, "daemonSet.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go index ecdf6494b..86c0a545a 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -4,17 +4,19 @@ import ( "context" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/spf13/viper" "github.com/stretchr/testify/assert" - appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperDaemonSet(t *testing.T) { @@ -74,18 +76,20 @@ func TestProperReconcileDaemonSet(t *testing.T) { instance := *instance instance.Spec.Mode = opentelemetry.ModeDaemonSet - clients := &Clients{ - client: fake.NewFakeClient(&instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} // test reconciler.Reconcile(req) // verify - list := &appsv1.DaemonSetList{} - clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) + list, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).List(metav1.ListOptions{}) + assert.NoError(t, err) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -143,17 +147,18 @@ func TestUpdateDaemonSet(t *testing.T) { // prepare instance := *instance instance.Spec.Mode = opentelemetry.ModeDaemonSet - clients := &Clients{ - client: fake.NewFakeClient(&instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted := &appsv1.DaemonSet{} - err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + persisted, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(name, metav1.GetOptions{}) assert.NoError(t, err) // prepare the test object @@ -167,8 +172,8 @@ func TestUpdateDaemonSet(t *testing.T) { reconciler.reconcileDaemonSet(ctx) // verify - persisted = &appsv1.DaemonSet{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + persisted, err = clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) } @@ -177,24 +182,25 @@ func TestDeleteExtraDaemonSet(t *testing.T) { // prepare c := daemonSet(ctx) c.Name = "extra-daemonSet" + c.Namespace = instance.Namespace - clients := &Clients{ - client: fake.NewFakeClient(c), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) // sanity check - persisted := &appsv1.DaemonSet{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + persisted, err := clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) // test - err := reconciler.reconcileDaemonSet(ctx) + err = reconciler.reconcileDaemonSet(ctx) assert.NoError(t, err) // verify - persisted = &appsv1.DaemonSet{} - err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) - - assert.Empty(t, persisted.Name) + persisted, err = clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index 23412a315..c5f4c2e6f 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -10,8 +10,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" + "k8s.io/apimachinery/pkg/labels" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -137,10 +136,11 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) - existing := &appsv1.Deployment{} - err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + deps := r.clientset.Kubernetes.AppsV1().Deployments(desired.Namespace) + + existing, err := deps.Get(desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if err := r.clients.client.Create(ctx, desired); err != nil { + if existing, err = deps.Create(desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -169,7 +169,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte updated.ObjectMeta.Labels[k] = v } - if err := r.clients.client.Update(ctx, updated); err != nil { + if updated, err = deps.Update(updated); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) @@ -181,16 +181,16 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, expected []*appsv1.Deployment) error { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + deps := r.clientset.Kubernetes.AppsV1().Deployments(instance.Namespace) - opts := []client.ListOption{ - client.InNamespace(instance.Namespace), - client.MatchingLabels(map[string]string{ + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), + }).String(), } - list := &appsv1.DeploymentList{} - if err := r.clients.client.List(ctx, list, opts...); err != nil { + list, err := deps.List(opts) + if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -203,7 +203,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, } if del { - if err := r.clients.client.Delete(ctx, &existing); err != nil { + if err := deps.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index dc8fd7ab4..d6792ee79 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -4,17 +4,19 @@ import ( "context" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/spf13/viper" "github.com/stretchr/testify/assert" - appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperDeployment(t *testing.T) { @@ -70,18 +72,20 @@ func TestDeploymentOverridesConfig(t *testing.T) { func TestProperReconcileDeployment(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} // test reconciler.Reconcile(req) // verify - list := &appsv1.DeploymentList{} - clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) + list, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).List(metav1.ListOptions{}) + assert.NoError(t, err) // we assert the correctness of the service in another test assert.Len(t, list.Items, 1) @@ -136,17 +140,18 @@ func TestDefaultDeploymentImage(t *testing.T) { func TestUpdateDeployment(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted := &appsv1.Deployment{} - err := clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: instance.Namespace}, persisted) + persisted, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(name, metav1.GetOptions{}) assert.NoError(t, err) // prepare the test object @@ -160,8 +165,8 @@ func TestUpdateDeployment(t *testing.T) { reconciler.reconcileDeployment(ctx) // verify - persisted = &appsv1.Deployment{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: name, Namespace: updated.Namespace}, persisted)) + persisted, err = clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) } @@ -170,24 +175,25 @@ func TestDeleteExtraDeployment(t *testing.T) { // prepare c := deployment(ctx) c.Name = "extra-deployment" + c.Namespace = instance.Namespace - clients := &Clients{ - client: fake.NewFakeClient(c), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - persisted := &appsv1.Deployment{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + persisted, err := clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) // test - err := reconciler.reconcileDeployment(ctx) + err = reconciler.reconcileDeployment(ctx) assert.NoError(t, err) // verify - persisted = &appsv1.Deployment{} - err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) - - assert.Empty(t, persisted.Name) + persisted, err = clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index 8c0a8b99b..5288b0116 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -8,9 +8,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -104,10 +103,11 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) - existing := &corev1.Service{} - err := r.clients.client.Get(ctx, types.NamespacedName{Name: desired.Name, Namespace: desired.Namespace}, existing) + svcs := r.clientset.Kubernetes.CoreV1().Services(desired.Namespace) + + existing, err := svcs.Get(desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if err := r.clients.client.Create(ctx, desired); err != nil { + if desired, err = svcs.Create(desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -140,7 +140,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. updated.ObjectMeta.Labels[k] = v } - if err := r.clients.client.Update(ctx, updated); err != nil { + if updated, err = svcs.Update(updated); err != nil { return fmt.Errorf("failed to apply changes to service: %v", err) } logger.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) @@ -152,16 +152,16 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, expected []*corev1.Service) error { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + svcs := r.clientset.Kubernetes.CoreV1().Services(instance.Namespace) - opts := []client.ListOption{ - client.InNamespace(instance.Namespace), - client.MatchingLabels(map[string]string{ + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), + }).String(), } - list := &corev1.ServiceList{} - if err := r.clients.client.List(ctx, list, opts...); err != nil { + list, err := svcs.List(opts) + if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -174,7 +174,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex } if del { - if err := r.clients.client.Delete(ctx, &existing); err != nil { + if err := svcs.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go index d2eaa6fa9..22120fb47 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service_test.go @@ -3,13 +3,17 @@ package opentelemetrycollector import ( "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperService(t *testing.T) { @@ -45,18 +49,20 @@ func TestProperMonitoringService(t *testing.T) { func TestProperReconcileService(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} // test reconciler.Reconcile(req) // verify - list := &corev1.ServiceList{} - clients.client.List(ctx, list, client.InNamespace(instance.Namespace)) + list, err := clients.Kubernetes.CoreV1().Services(instance.Namespace).List(metav1.ListOptions{}) + assert.NoError(t, err) // we assert the correctness of the service in another test assert.Len(t, list.Items, 3) @@ -70,6 +76,7 @@ func TestProperReconcileService(t *testing.T) { func TestUpdateService(t *testing.T) { // prepare c := service(ctx) + c.Namespace = instance.Namespace // right now, there's nothing we can do at the CR level that influences the underlying // service object, so, we simulate a change made manually by some admin, changing the port @@ -87,24 +94,26 @@ func TestUpdateService(t *testing.T) { // the cluster has assigned an IP to this service already c.Spec.ClusterIP = "172.172.172.172" - clients := &Clients{ - client: fake.NewFakeClient(c), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - persisted := &corev1.Service{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Len(t, persisted.Spec.Ports, 1) assert.Equal(t, int32(12345), persisted.Spec.Ports[0].Port) // test - err := reconciler.reconcileService(ctx) + err = reconciler.reconcileService(ctx) assert.NoError(t, err) // verify - persisted = &corev1.Service{} - err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) + persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Equal(t, int32(14250), persisted.Spec.Ports[0].Port) assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept } @@ -113,24 +122,25 @@ func TestDeleteExtraService(t *testing.T) { // prepare c := service(ctx) c.Name = "extra-service" + c.Namespace = instance.Namespace - clients := &Clients{ - client: fake.NewFakeClient(c), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - persisted := &corev1.Service{} - assert.NoError(t, clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted)) + persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) // test - err := reconciler.reconcileService(ctx) + err = reconciler.reconcileService(ctx) assert.NoError(t, err) // verify - persisted = &corev1.Service{} - err = clients.client.Get(ctx, types.NamespacedName{Name: c.Name, Namespace: c.Namespace}, persisted) - - assert.Empty(t, persisted.Name) + persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) assert.Error(t, err) // not found + assert.Nil(t, persisted) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go index c58b806ec..9927262dc 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go @@ -78,9 +78,11 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx c // #nosec G104 (CWE-703): Errors unhandled. r.setControllerReference(ctx, desired) - existing, err := r.clients.monclient.ServiceMonitors(desired.Namespace).Get(desired.Name, metav1.GetOptions{}) + svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(desired.Namespace) + + existing, err := svcMons.Get(desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if desired, err = r.clients.monclient.ServiceMonitors(desired.Namespace).Create(desired); err != nil { + if desired, err = svcMons.Create(desired); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -109,7 +111,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx c updated.ObjectMeta.Labels[k] = v } - if _, err = r.clients.monclient.ServiceMonitors(desired.Namespace).Update(updated); err != nil { + if _, err = svcMons.Update(updated); err != nil { return fmt.Errorf("failed to apply changes to service monitor: %v", err) } logger.V(2).Info("applied", "svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace) @@ -129,7 +131,9 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Cont }).String(), } - list, err := r.clients.monclient.ServiceMonitors(instance.Namespace).List(opts) + svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace) + + list, err := svcMons.List(opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -143,7 +147,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Cont } if del { - if err := r.clients.monclient.ServiceMonitors(instance.Namespace).Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := svcMons.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "svcmon.name", existing.Name, "svcmon.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go index f55d6051a..8be92c608 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go @@ -8,10 +8,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperServiceMonitor(t *testing.T) { @@ -32,19 +35,20 @@ func TestProperReconcileServiceMonitor(t *testing.T) { viper.Set(opentelemetry.SvcMonitorAvailable, true) defer viper.Reset() - clients := &Clients{ - client: fake.NewFakeClient(instance), - monclient: fakemon.NewSimpleClientset().MonitoringV1(), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // test - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} _, err := reconciler.Reconcile(req) assert.NoError(t, err) // verify - list, err := clients.monclient.ServiceMonitors(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace).List(metav1.ListOptions{}) require.NoError(t, err) // we assert the correctness of the service in another test @@ -64,21 +68,24 @@ func TestUpdateServiceMonitor(t *testing.T) { c := serviceMonitor(ctx) c.Annotations = nil c.Labels = nil + c.Namespace = instance.Namespace - clients := &Clients{ - monclient: fakemon.NewSimpleClientset(c).MonitoringV1(), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(c), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - _, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) // verify - _, err = clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err = clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) assert.NoError(t, err) } @@ -89,21 +96,24 @@ func TestDeleteExtraServiceMonitor(t *testing.T) { c := serviceMonitor(ctx) c.Name = "extra-service" + c.Namespace = instance.Namespace - clients := &Clients{ - monclient: fakemon.NewSimpleClientset(c).MonitoringV1(), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(c), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) // sanity check - _, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) // verify - persisted, err := clients.monclient.ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go index ba2255cba..5a22566ec 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_test.go @@ -5,14 +5,18 @@ import ( "errors" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/go-logr/logr" "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestProperReconcile(t *testing.T) { @@ -23,10 +27,13 @@ func TestProperReconcile(t *testing.T) { req reconcile.Request ) - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) + req.Namespace = instance.Namespace called := false reconciler.reconcileFuncs = []func(context.Context) error{ @@ -51,12 +58,14 @@ func TestProperReconcile(t *testing.T) { func TestReconcileDeletedObject(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} reconciler.reconcileFuncs = []func(context.Context) error{ func(context.Context) error { assert.Fail(t, "shouldn't have been called") @@ -75,11 +84,13 @@ func TestReconcileDeletedObject(t *testing.T) { func TestReconcileFailsFast(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} reconciler.reconcileFuncs = []func(context.Context) error{ func(context.Context) error { return errors.New("the server made a boo boo") @@ -99,8 +110,10 @@ func TestReconcileFailsFast(t *testing.T) { func TestReconcileFuncsAreCalled(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) called := false @@ -121,8 +134,10 @@ func TestReconcileFuncsAreCalled(t *testing.T) { func TestNilReconcileFuncs(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) reconciler.reconcileFuncs = nil @@ -136,8 +151,10 @@ func TestNilReconcileFuncs(t *testing.T) { func TestSetControllerReference(t *testing.T) { // prepare - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) d := &appsv1.Deployment{} diff --git a/pkg/controller/opentelemetrycollector/upgrade.go b/pkg/controller/opentelemetrycollector/upgrade.go index 0a7c9e7f2..840c57f76 100644 --- a/pkg/controller/opentelemetrycollector/upgrade.go +++ b/pkg/controller/opentelemetrycollector/upgrade.go @@ -22,7 +22,7 @@ func (r *ReconcileOpenTelemetryCollector) applyUpgrades(ctx context.Context) err if otelcol.Status.Version != currentVersions.OpenTelemetryCollector { // in theory, the version from the Status could be higher than currentVersions.Jaeger, but we let the upgrade routine // check/handle it - u, err := upgrade.ManagedInstance(ctx, r.clients.client, otelcol) + u, err := upgrade.ManagedInstance(ctx, r.clientset, otelcol) if err != nil { return err } diff --git a/pkg/controller/opentelemetrycollector/upgrade_test.go b/pkg/controller/opentelemetrycollector/upgrade_test.go index 578389e9e..01dbe53ce 100644 --- a/pkg/controller/opentelemetrycollector/upgrade_test.go +++ b/pkg/controller/opentelemetrycollector/upgrade_test.go @@ -4,12 +4,15 @@ import ( "context" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/stretchr/testify/assert" - "sigs.k8s.io/controller-runtime/pkg/client/fake" + "k8s.io/client-go/kubernetes/fake" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" "github.com/open-telemetry/opentelemetry-operator/pkg/version" ) @@ -22,8 +25,10 @@ func TestApplyUpgrades(t *testing.T) { } ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - clients := &Clients{ - client: fake.NewFakeClient(instance), + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(), } reconciler := New(schem, clients) diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index d3d6958ad..09c1da4e7 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -6,19 +6,20 @@ import ( "reflect" "github.com/go-logr/logr" - "sigs.k8s.io/controller-runtime/pkg/client" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" ) // ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary -func ManagedInstances(ctx context.Context, c client.Client) error { +func ManagedInstances(ctx context.Context, c *client.Clientset) error { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) logger.Info("looking for managed instances to upgrade") - list := &v1alpha1.OpenTelemetryCollectorList{} - if err := c.List(ctx, list); err != nil { + list, err := c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").List(metav1.ListOptions{}) + if err != nil { return fmt.Errorf("failed to get list of otelcol instances: %v", err) } @@ -31,7 +32,8 @@ func ManagedInstances(ctx context.Context, c client.Client) error { if !reflect.DeepEqual(otelcol, j) { // the CR has changed, store it! - if err := c.Update(ctx, otelcol); err != nil { + otelcol, err = c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(otelcol.Namespace).Update(otelcol) + if err != nil { logger.Error(err, "failed to store the upgraded otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return err } @@ -48,14 +50,14 @@ func ManagedInstances(ctx context.Context, c client.Client) error { } // ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version -func ManagedInstance(ctx context.Context, client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func ManagedInstance(ctx context.Context, cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) if v, ok := versions[otelcol.Status.Version]; ok { // we don't need to run the upgrade function for the version 'v', only the next ones for n := v.next; n != nil; n = n.next { // performs the upgrade to version 'n' - upgraded, err := n.upgrade(client, otelcol) + upgraded, err := n.upgrade(cl, otelcol) if err != nil { logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return otelcol, err diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go index 793483adc..80792704d 100644 --- a/pkg/upgrade/upgrade_test.go +++ b/pkg/upgrade/upgrade_test.go @@ -4,16 +4,18 @@ import ( "context" "testing" + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client/fake" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) func TestVersionUpgradeToLatest(t *testing.T) { @@ -28,21 +30,24 @@ func TestVersionUpgradeToLatest(t *testing.T) { }, } existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function - objs := []runtime.Object{existing} s := scheme.Scheme s.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}, ) - cl := fake.NewFakeClient(objs...) + cl := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(existing), + } // test assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted := &v1alpha1.OpenTelemetryCollector{} - assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) + persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(nsn.Name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Equal(t, latest.v, persisted.Status.Version) } @@ -57,20 +62,23 @@ func TestUnknownVersion(t *testing.T) { }, } existing.Status.Version = "0.0.0" // we don't know how to upgrade from 0.0.0 - objs := []runtime.Object{existing} s := scheme.Scheme s.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}, ) - cl := fake.NewFakeClient(objs...) + cl := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(existing), + } // test assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted := &v1alpha1.OpenTelemetryCollector{} - assert.NoError(t, cl.Get(context.Background(), nsn, persisted)) + persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(nsn.Name, metav1.GetOptions{}) + assert.NoError(t, err) assert.Equal(t, "0.0.0", persisted.Status.Version) } diff --git a/pkg/upgrade/v0_0_2.go b/pkg/upgrade/v0_0_2.go index 843e7a4c4..81a29c3d3 100644 --- a/pkg/upgrade/v0_0_2.go +++ b/pkg/upgrade/v0_0_2.go @@ -1,12 +1,11 @@ package upgrade import ( - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" ) -func upgrade0_0_2(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_0_2(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // this has the same content as `noop`, but it's added a separate function // to serve as template for versions with an actual upgrade procedure return otelcol, nil diff --git a/pkg/upgrade/versions.go b/pkg/upgrade/versions.go index 38a781e76..8a007b306 100644 --- a/pkg/upgrade/versions.go +++ b/pkg/upgrade/versions.go @@ -1,14 +1,13 @@ package upgrade import ( - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" ) type version struct { v string - upgrade func(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) + upgrade func(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) next *version } @@ -24,6 +23,6 @@ var ( } ) -func noop(client client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func noop(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { return otelcol, nil } From c2a16a1899a41248917b04e15e1ad6b7c8d00df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 09:44:27 +0100 Subject: [PATCH 0033/1234] Replaced links on README.md from jpkrohling to open-telemetry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 755ebdd41..3a7d4c690 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetr To install the operator, run: ``` -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/service_account.yaml -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role.yaml -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/role_binding.yaml -kubectl create -f https://raw.githubusercontent.com/jpkrohling/opentelemetry-operator/master/deploy/operator.yaml +kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/service_account.yaml +kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/role.yaml +kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/role_binding.yaml +kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/operator.yaml ``` Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like: @@ -84,13 +84,13 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). [Apache 2.0 License](./LICENSE). -[github-workflow]: https://github.com/jpkrohling/opentelemetry-operator/actions -[github-workflow-img]: https://github.com/jpkrohling/opentelemetry-operator/workflows/Continuous%20Integration/badge.svg -[goreport-img]: https://goreportcard.com/badge/github.com/jpkrohling/opentelemetry-operator -[goreport]: https://goreportcard.com/report/github.com/jpkrohling/opentelemetry-operator -[godoc-img]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator?status.svg -[godoc]: https://godoc.org/github.com/jpkrohling/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector -[code-climate]: https://codeclimate.com/github/jpkrohling/opentelemetry-operator/maintainability +[github-workflow]: https://github.com/open-telemetry/opentelemetry-operator/actions +[github-workflow-img]: https://github.com/open-telemetry/opentelemetry-operator/workflows/Continuous%20Integration/badge.svg +[goreport-img]: https://goreportcard.com/badge/github.com/open-telemetry/opentelemetry-operator +[goreport]: https://goreportcard.com/report/github.com/open-telemetry/opentelemetry-operator +[godoc-img]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator?status.svg +[godoc]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector +[code-climate]: https://codeclimate.com/github/open-telemetry/opentelemetry-operator/maintainability [code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability -[codecov]: https://codecov.io/gh/jpkrohling/opentelemetry-operator -[codecov-img]: https://codecov.io/gh/jpkrohling/opentelemetry-operator/branch/master/graph/badge.svg +[codecov]: https://codecov.io/gh/open-telemetry/opentelemetry-operator +[codecov-img]: https://codecov.io/gh/open-telemetry/opentelemetry-operator/branch/master/graph/badge.svg From a95d11605e207aa24ec24c63125450603aa38bd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 10:28:28 +0100 Subject: [PATCH 0034/1234] Change the publishing script to fail the build upon failure (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/publish-images.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh index 5365c1504..d227aced9 100755 --- a/.ci/publish-images.sh +++ b/.ci/publish-images.sh @@ -15,6 +15,11 @@ BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} echo "Building image ${BUILD_IMAGE}" make install-tools build container BUILD_IMAGE="${BUILD_IMAGE}" +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to build the operator's container image." + exit ${RT} +fi if [ -n "${MAJOR_MINOR}" ]; then MAJOR_MINOR_IMAGE="${BASE_BUILD_IMAGE}:${MAJOR_MINOR}" @@ -40,4 +45,5 @@ if [ -n "${QUAY_USERNAME}" -a -n "${QUAY_PASSWORD}" ]; then fi else echo "Couldn't publish images to ${BUILD_IMAGE}, as the credentials aren't set" + exit 1 fi From 43307bf2d7281c2982535afd7ac97ae351ce5d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 13:08:45 +0100 Subject: [PATCH 0035/1234] Updated to Operator SDK 0.13.0 (#3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 2 +- Makefile | 27 +- ...emetry.io_opentelemetrycollectors_crd.yaml | 12 +- go.mod | 64 +- go.sum | 604 +++++++++++------- .../v1alpha1/opentelemetrycollector_types.go | 11 + .../v1alpha1/zz_generated.openapi.go | 29 +- pkg/client/versioned/clientset.go | 7 + .../versioned/fake/clientset_generated.go | 7 +- .../v1alpha1/opentelemetry_client.go | 3 +- .../opentelemetrycollector/reconcile_test.go | 10 +- 11 files changed, 478 insertions(+), 298 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7d0080598..1a2a8ace3 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v1 - uses: jpkrohling/setup-operator-sdk@v1-release with: - operator-sdk-version: v0.12.0 + operator-sdk-version: v0.13.0 - name: "basic checks" run: ./.ci/script.sh diff --git a/Makefile b/Makefile index 43b8296e2..fc3b13830 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,9 @@ check: ensure-generate-is-noop discard-go-mod-changes @git diff -s --exit-code . || (echo "Build failed: one or more source files aren't properly formatted. Run 'make format' and update your PR." && exit 1) .PHONY: ensure-generate-is-noop -ensure-generate-is-noop: generate client-gen format +ensure-generate-is-noop: generate format @git diff -s --exit-code pkg/apis/opentelemetry/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1) + @git diff -s --exit-code pkg/client/versioned || (echo "Build failed: the versioned clients aren't up to date. Run 'make generate'." && exit 1) .PHONY: format format: @@ -70,9 +71,21 @@ crd: @kubectl create -f deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml 2>&1 | grep -v "already exists" || true .PHONY: generate -generate: +generate: internal-generate format + +.PHONY: internal-generate +internal-generate: + @echo Generating deepcopy... @operator-sdk generate k8s - @operator-sdk generate openapi + + @echo Generating CRDs... + @operator-sdk generate crds + + @echo Generating clients... + @client-gen --input "opentelemetry/v1alpha1" --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis --go-header-file /dev/null --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client --clientset-name versioned --output-base ../../../ + + @echo Generating OpenAPI... + @openapi-gen --logtostderr=true -o "" -i ./pkg/apis/opentelemetry/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/opentelemetry/v1alpha1 -h /dev/null -r "-" .PHONY: test test: unit-tests @@ -93,15 +106,9 @@ install-tools: @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 @go install golang.org/x/tools/cmd/goimports @go install k8s.io/code-generator/cmd/client-gen + @go install k8s.io/kube-openapi/cmd/openapi-gen .PHONY: install-prometheus-operator install-prometheus-operator: @echo Installing Prometheus Operator bundle @kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml - -.PHONY: client-gen -client-gen: internal-client-gen format - -.PHONY: internal-client-gen -internal-client-gen: - @client-gen --input "opentelemetry/v1alpha1" --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis --go-header-file /dev/null --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client --clientset-name versioned --output-base ../../../ diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index e1dbbdd8e..c62d155ff 100644 --- a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -26,12 +26,12 @@ spec: apiVersion: description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -41,10 +41,16 @@ spec: args: additionalProperties: type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary type: object config: + description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. type: string image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. type: string mode: description: Mode represents how the collector should be deployed (deployment @@ -54,6 +60,8 @@ spec: - deployment type: string replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector format: int32 type: integer type: object diff --git a/go.mod b/go.mod index 6f406cdaa..885920180 100644 --- a/go.mod +++ b/go.mod @@ -3,50 +3,42 @@ module github.com/open-telemetry/opentelemetry-operator go 1.13 require ( - github.com/coreos/prometheus-operator v0.29.0 + github.com/coreos/prometheus-operator v0.34.0 github.com/go-logr/logr v0.1.0 - github.com/go-openapi/spec v0.19.0 - github.com/onsi/ginkgo v1.10.3 // indirect - github.com/onsi/gomega v1.7.1 // indirect - github.com/operator-framework/operator-sdk v0.12.0 - github.com/spf13/pflag v1.0.3 + github.com/go-openapi/spec v0.19.2 + github.com/operator-framework/operator-sdk v0.13.0 + github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.4.0 - golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect - golang.org/x/net v0.0.0-20190923162816-aa69164e4478 // indirect - golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 // indirect - golang.org/x/text v0.3.2 // indirect - golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect - gopkg.in/yaml.v2 v2.2.7 // indirect gotest.tools v2.2.0+incompatible k8s.io/api v0.0.0 k8s.io/apimachinery v0.0.0 - k8s.io/client-go v11.0.0+incompatible + k8s.io/client-go v12.0.0+incompatible k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d - sigs.k8s.io/controller-runtime v0.3.0 + sigs.k8s.io/controller-runtime v0.4.0 ) -// Pinned to kubernetes-1.15.4 +// Pinned to kubernetes-1.16.2 replace ( - k8s.io/api => k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d - k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190918202139-0b14c719ca62 - k8s.io/client-go => k8s.io/client-go v0.0.0-20190918200256-06eb1244587a - k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190918203125-ae665f80358a - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190918202959-c340507a5d48 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b - k8s.io/component-base => k8s.io/component-base v0.0.0-20190918200425-ed2f0867c778 - k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190817025403-3ae76f584e79 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190918203248-97c07dcbb623 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190918201136-c3a845f1fbb2 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190918202837-c54ce30c680e - k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190918202429-08c8357f8e2d - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190918202713-c34a54b3ec8e - k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190918202550-958285cf3eef - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190918203421-225f0541b3ea - k8s.io/metrics => k8s.io/metrics v0.0.0-20190918202012-3c1ca76f5bda - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190918201353-5cc279503896 + k8s.io/api => k8s.io/api v0.0.0-20191016110408-35e52d86657a + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8 + k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191016112112-5190913f932d + k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5 + k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42 + k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 + k8s.io/component-base => k8s.io/component-base v0.0.0-20191016111319-039242c015a9 + k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df + k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b + k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51 + k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b + k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9 ) diff --git a/go.sum b/go.sum index 7666bf224..b43588070 100644 --- a/go.sum +++ b/go.sum @@ -1,135 +1,189 @@ bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= -bitbucket.org/ww/goautoneg v0.0.0-20120707110453-75cd24fc2f2c/go.mod h1:1vhO7Mn/FZMgOgDVGLy5X1mE6rq1HbkBdkF/yj8zkcg= +bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/Azure/azure-sdk-for-go v21.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= +cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v11.1.2+incompatible h1:viZ3tV5l4gE2Sw0xrasFHytCGtzYCrT+um/rrSQ1BfA= -github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= +github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20181220005116-f8e995905100/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= +github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us= github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= +github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= +github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/client9/misspell v0.0.0-20170928000206-9ce5d979ffda/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= +github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= -github.com/codedellemc/goscaleio v0.0.0-20170830184815-20e2ce2cf885/go.mod h1:JIHmDHNZO4tmA3y3RHp6+Gap6kFsNf55W9Pn/3YS9IY= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containernetworking/cni v0.6.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/coreos/bbolt v1.3.0/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.9+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.12+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v0.0.0-20180117170138-065b426bd416/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.0.0-20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/prometheus-operator v0.29.0 h1:Moi4klbr1xUVaofWzlaM12mxwCL294GiLW2Qj8ku0sY= -github.com/coreos/prometheus-operator v0.29.0/go.mod h1:SO+r5yZUacDFPKHfPoUjI3hMsH+ZUdiuNNhuSq3WoSg= +github.com/coreos/prometheus-operator v0.34.0 h1:TF9qaydNeUamLKs0hniaapa4FBz8U8TIlRRtJX987A4= +github.com/coreos/prometheus-operator v0.34.0/go.mod h1:Li6rMllG/hYIyXfMuvUwhyC+hqwJVHdsDdP21hypT1M= github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U= -github.com/cpuguy83/go-md2man v1.0.4/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cyphar/filepath-securejoin v0.0.0-20170720062807-ae69057f2299/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v0.0.0-20170829104524-6e570ed0a266/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= +github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= +github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4= +github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A= +github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE= +github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= +github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= +github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= -github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v0.0.0-20170726174610-edc3ab29cdff/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v0.7.3-0.20190409004836-2e1cfbca03da/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.8.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.3+incompatible h1:2OwhVdhtzYUp5P5wuGsVDPagKSRd9JK72sJCHVCXh5g= -github.com/emicklei/go-restful v2.9.3+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful-swagger12 v0.0.0-20170926063155-7524189396c6/go.mod h1:qr0VowGBT4CS4Q8vFF8BSeKz34PuqKGxs/L0IAQA9DQ= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= +github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/fatih/camelcase v0.0.0-20160318181535-f6a740d52f96/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.1-0.20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= +github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= @@ -139,38 +193,46 @@ github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.0 h1:FTUMcX77w5rQkClIzDtTxvn6Bsa894CcrzNj2MMfeg8= -github.com/go-openapi/jsonpointer v0.19.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.0 h1:BqWKpV1dFd+AuiKlgtddwVIFQsuMpxfBDBHGfM2yNpk= -github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.17.2/go.mod h1:QO936ZXeisByFmZEO1IS1Dqhtf4QV1sYYFtIq6Ld86Q= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.0 h1:A4SZ6IWh3lnjH0rG0Z5lkxazMGBECtrZcbyYQi+64k4= -github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.17.2 h1:K/ycE/XTUDFltNHSO32cGRUhrVGJD64o8WgAIZNyc3k= -github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/validate v0.17.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.4 h1:i/65mCM9s1h8eCkT07F5Z/C1e/f8VTgEwer+00yevpA= +github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= @@ -180,158 +242,192 @@ github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= +github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 h1:X+zN6RZXsvnrSJaAIQhZezPfAfvsqihKKR8oiLHid34= +github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= -github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.1-0.20190329180013-73dc87cad333/go.mod h1:L3bP22mxdfCUHSUVMs+SPJMx55FrxQew7MSXT11Q86g= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= -github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cadvisor v0.33.2-0.20190411163913-9db8c7dee20a/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= +github.com/google/cadvisor v0.34.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v0.0.0-20170330212424-2500245aa611/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.5.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.6.3/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-health-probe v0.2.0/go.mod h1:4GVx/bTCtZaSzhjbGueDY5YgBdsmKeVx+LErv/n0L6s= +github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v0.0.0-20160711231752-d8c773c4cba1/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/heketi/heketi v0.0.0-20181109135656-558b29266ce0/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= +github.com/heketi/heketi v9.0.0+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= github.com/heketi/utils v0.0.0-20170317161834-435bc5bdfa64/go.mod h1:RYlF4ghFZPPmk2TC5REt5OFwvfb6lzxFWrTWB+qs28s= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/iancoleman/strcase v0.0.0-20180726023541-3605ed457bf7/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= +github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/improbable-eng/thanos v0.3.2/go.mod h1:GZewVGILKuJVPNRn7L4Zw+7X96qzFOwj63b22xYGXBE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= +github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.0.0-20141017032234-72f9bd7c4e0c/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jteeuwen/go-bindata v0.0.0-20151023091102-a0ff2567cfb7/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kardianos/osext v0.0.0-20150410034420-8fef92e41e22/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.0.0-20131111012553-2788f0dbd169/go.mod h1:glhvuHOU9Hy7/8PwwdtnarXqLagOX0b/TbZx2zLMqEg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.0.0-20140812000539-f31442d60e51/go.mod h1:Bvhd+E3laJ0AVkG0c9rmtZcnhV0HQ3+c3YxxqTvc/gA= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.0.0-20130911015532-6807e777504f/go.mod h1:sjUstKUATFIcff4qlB53Kml0wQPtJVc/3fWrmuUmcfA= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/libopenstorage/openstorage v0.0.0-20170906232338-093a0c388875/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= +github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= -github.com/magiconair/properties v0.0.0-20160816085511-61b492c03cf4/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= +github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= +github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= +github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/marstr/guid v0.0.0-20170427235115-8bdf7d1a087c/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/martinlindhe/base36 v0.0.0-20180729042928-5cda0030da17/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= +github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= +github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-shellwords v0.0.0-20180605041737-f8471b0a71de/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/maxbrunsfeld/counterfeiter v0.0.0-20181017030959-1aadac120687/go.mod h1:aoVsckWnsNzazwF2kmD+bzgdr4GBlbK91zsdivQJ2eU= -github.com/maxbrunsfeld/counterfeiter/v6 v6.0.2/go.mod h1:jDaYg8/bmdfygnyq5gnvMRDocYTEcXLPU0bXPtTco58= +github.com/maxbrunsfeld/counterfeiter/v6 v6.2.1/go.mod h1:F9YacGpnZbLQMzuPI0rR6op21YvNu/RjL705LJJpM3k= github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= -github.com/mholt/caddy v0.0.0-20180213163048-2de495001514/go.mod h1:Wb1PlT4DAYSqOEd03MsqkdkXnTxA8v9pKjdpxbqM1kY= -github.com/miekg/dns v0.0.0-20160614162101-5d001d020961/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= +github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= -github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -342,104 +438,110 @@ github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwd github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mvdan/xurls v0.0.0-20160110113200-1b768d7c393a/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= +github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= +github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.2-0.20180831124310-ae19f1b56d53/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v0.0.0-20170604055404-372ad780f634/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20181113202123-f000fe11ece1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v0.0.0-20170621221121-4a2974bf1ee9/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= -github.com/openshift/api v3.9.1-0.20190424152011-77b8897ec79a+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openshift/client-go v0.0.0-20190401163519-84c2b942258a/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= +github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= +github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= -github.com/operator-framework/go-appr v0.0.0-20180917210448-f2aef88446f2/go.mod h1:YNzwUx1i6C4dXWcffyq3yaIb0rh/K8/OvQ4vG0SNlSw= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20181023032605-e838f7fb2186/go.mod h1:Ma5ZXd4S1vmMyewWlF7aO8CZiokR7Sd8dhSfkGkNU4U= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190105193533-81104ffdc4fb/go.mod h1:XMyE4n2opUK4N6L45YGQkXXi8F9fD7XDYFv/CsS6V5I= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190125151539-1e295784b30a/go.mod h1:vq6TTFvg6ti1Bn6ACsZneZTmjTsURgDD6tQtVDbEgsU= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20190605231540-b8a4faf68e36/go.mod h1:HKV3ZB9aOUxRyfM53shoBRtIMP4lg8QRmkW+dmZy+kI= -github.com/operator-framework/operator-marketplace v0.0.0-20190216021216-57300a3ef3ba/go.mod h1:msZSL8pXwzQjB+hU+awVrZQw94IwJi3sNZVD3NoESIs= -github.com/operator-framework/operator-registry v1.0.1/go.mod h1:1xEdZjjUg2hPEd52LG3YQ0jtwiwEGdm98S1TH5P4RAA= -github.com/operator-framework/operator-registry v1.0.4/go.mod h1:hve6YwcjM2nGVlscLtNsp9sIIBkNZo6jlJgzWw7vP9s= -github.com/operator-framework/operator-registry v1.1.1/go.mod h1:7D4WEwL+EKti5npUh4/u64DQhawCBRugp8Ql20duUb4= -github.com/operator-framework/operator-sdk v0.12.0 h1:9eAD1L8e6pPCpFCAacBUVf2eloDkRuVm29GTCOktLqQ= -github.com/operator-framework/operator-sdk v0.12.0/go.mod h1:mW8isQxiXlLCVf2E+xqflkQAVLOTbiqjndKdkKIrR0M= +github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/operator-framework/operator-lifecycle-manager v0.0.0-20191115003340-16619cd27fa5/go.mod h1:zL34MNy92LPutBH5gQK+gGhtgTUlZZX03I2G12vWHF4= +github.com/operator-framework/operator-registry v1.5.1/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= +github.com/operator-framework/operator-sdk v0.13.0 h1:AWiKOl6ZeAyQgbGVoD8fNd+eCbFuRWgr4hciaaOEBmE= +github.com/operator-framework/operator-sdk v0.13.0/go.mod h1:XRnicDD4uZCNbJbMXc0B7eyw7hjO4Xzol7FAkWHa1Nc= +github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= +github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= +github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v0.0.0-20160930220758-4d0e916071f6/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= -github.com/robfig/cron v0.0.0-20170309132418-df38d32658d8/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= +github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rubenv/sql-migrate v0.0.0-20191022111038-5cdff0d8cc42/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= +github.com/rubenv/sql-migrate v0.0.0-20191025130928-9355dd04f4b3/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= -github.com/russross/blackfriday v0.0.0-20151117072312-300106c228d5/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sclevine/spec v1.0.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/seccomp/libseccomp-golang v0.0.0-20150813023252-1b506fc7c24e/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20151028001915-10ef21a441db/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sigma/go-inotify v0.0.0-20181102212354-c87b6cf5033d/go.mod h1:stlh9OsqBQSdwxTxX73mu41BBtRbIpZLQ7flcAoxAfo= -github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -448,32 +550,29 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v0.0.0-20160816080757-b28a7effac97/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v0.0.0-20160730092037-e31f36ffc91a/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.0-20180319062004-c439c4fa0937/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v0.0.0-20160311093646-33c24e77fb80/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v0.0.0-20160820190039-7fb2782df3d8/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/stevvooe/resumable v0.0.0-20180830230917-22b14a53ba50/go.mod h1:1pdIZTAHUz+HDKDVZ++5xg/duPlhKAIzw9qy42CWYp4= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -481,25 +580,29 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= +github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= +github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/vmware/photon-controller-go-sdk v0.0.0-20170310013346-4a435daef6cc/go.mod h1:e6humHha1ekIwTCm+A5Qed5mG8V4JL+ChHcUOJ+L/8U= -github.com/xanzy/go-cloudstack v0.0.0-20160728180336-1e2cbf647e57/go.mod h1:s3eL3z5pNXF5FVybcT+LIVdId8pYn709yv6v5mrkrQE= +github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= +gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= @@ -511,80 +614,103 @@ go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslx go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478 h1:l5EDrHhldLYb3ZRHDUhXF7Om7MvYXnkV9/iQNo1lX6g= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181105165119-ca4130e427c7/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180117170059-2c42eef0765b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181023152157-44b849a8bc13/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -593,40 +719,54 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011152555-a398e557df60/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181207222222-4c874b978acb/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190320215829-36c10c0a621f/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= +gonum.org/v1/gonum v0.0.0-20190710053202-4340aa3071a0/go.mod h1:03dgh78c4UvU1WksguQ/lvJQXbezKQGJSrwwRq5MraQ= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= -google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20170731182057-09f6ed296fc6/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181016170114-94acd270e44e/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -636,101 +776,101 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.0.0-20150622162204-20b71e5b60d7/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.0.0-20180411045311-89060dee6a84/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.0.0/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2 h1:bkwe5LsuANqyOwsBng5Qc4S91D2Tv0JHctAztt3YTQs= -k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2/go.mod h1:AOxZTnaXR/xiarlQL0JUfwQPxjmKDvVYoRp58cA7lUo= -k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604 h1:Kl/sh+wWzYK2hWFZtwvuFECup1SbE2kXfMnhGZsoO5M= -k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604/go.mod h1:7H8sjDlWQu89yWB3FhZfsLyRCRLuoXoCoY5qtwW1q6I= -k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d h1:7Kns6qqhMAQWvGkxYOLSLRZ5hJO0/5pcE5lPGP2fxUw= -k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d/go.mod h1:3jediapYqJ2w1BFw7lAZPCx7scubsTfosqHkhXCWJKw= -k8s.io/apiserver v0.0.0-20190918200908-1e17798da8c1/go.mod h1:4FuDU+iKPjdsdQSN3GsEKZLB/feQsj1y9dhhBDVV2Ns= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/api v0.0.0-20191016110408-35e52d86657a h1:VVUE9xTCXP6KUPMf92cQmN88orz600ebexcRRaBTepQ= +k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= +k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 h1:kThoiqgMsSwBdMK/lPgjtYTsEjbUU9nXCA9DyU3feok= +k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65/go.mod h1:5BINdGqggRXXKnDgpwoJ7PyQH8f+Ypp02fvVNcIFy9s= +k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8 h1:Iieh/ZEgT3BWwbLD5qEKcY06jKuPEl6zC7gPSehoLw4= +k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= +k8s.io/apiserver v0.0.0-20191016112112-5190913f932d/go.mod h1:7OqfAolfWxUM/jJ/HBLyE+cdaWFBUoo5Q5pHgJVj2ws= k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= -k8s.io/cli-runtime v0.0.0-20190918202139-0b14c719ca62/go.mod h1:4AD5RWfUTpo9rDXKcqT+ofGoVKXcwseX9R0TpbjgYHY= -k8s.io/client-go v0.0.0-20190918200256-06eb1244587a h1:huOvPq1vO7dkuw9rZPYsLGpFmyGvy6L8q6mDItgkdQ4= -k8s.io/client-go v0.0.0-20190918200256-06eb1244587a/go.mod h1:3YAcTbI2ArBRmhHns5vlHRX8YQqvkVYpz+U/N5i1mVU= -k8s.io/cloud-provider v0.0.0-20190918203125-ae665f80358a/go.mod h1:hfxdMPnFjoiVZrbaHkBS0t56GelBDM199c4gOXAwQ/I= -k8s.io/cluster-bootstrap v0.0.0-20190918202959-c340507a5d48/go.mod h1:JoNzH2HyeimzRZXShJRDmpANOXTTL5RoXNbeCS3D8gY= -k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I= -k8s.io/component-base v0.0.0-20190918200425-ed2f0867c778/go.mod h1:DFWQCXgXVLiWtzFaS17KxHdlUeUymP7FLxZSkmL9/jU= -k8s.io/cri-api v0.0.0-20190817025403-3ae76f584e79/go.mod h1:MQf3sTYxPlSVy4QhUrDFfHWFxHtwhdpvGBECKGhZULk= -k8s.io/csi-translation-lib v0.0.0-20190918203248-97c07dcbb623/go.mod h1:FP2ff9xZ2FL6m427s99qF74Y18P8WSCvv1+CxK2RpLM= -k8s.io/gengo v0.0.0-20181106084056-51747d6e00da/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20181113154421-fd15ee9cc2f7/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190116091435-f8a0810f38af/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5/go.mod h1:sDl6WKSQkDM6zS1u9F49a0VooQ3ycYFBFLqd2jf2Xfo= +k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= +k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= +k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458/go.mod h1:O5SO5xcgxrjJV9EC9R/47RuBpbk5YX9URDBlg++FA5o= +k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42/go.mod h1:MzCL6kLExQuHruGaqibd8cugC8nw8QRxm3+lzR5l8SI= +k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 h1:NMYlxaF7rYQJk2E2IyrUhaX81zX24+dmoZdkPw0gJqI= +k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= +k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI= +k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q= +k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd/go.mod h1:lf1VBseeLanBpSXD0N9tuPx1ylI8sA0j6f+rckCKiIk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f h1:eW/6wVuHNZgQJmFesyAxu0cvj0WAHHUuGaLbPcmNY3Q= k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= -k8s.io/helm v2.15.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= +k8s.io/helm v2.16.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/kube-aggregator v0.0.0-20190918201136-c3a845f1fbb2/go.mod h1:uQDSuHqLPDAvyKE3kJ1dWfjC/x5ZTs5RB6sJ6VMC1M0= -k8s.io/kube-controller-manager v0.0.0-20190918202837-c54ce30c680e/go.mod h1:6xCliEUbi4Fp9k7K/QLaCai+KoAVSb85hZh5V9cdzb4= -k8s.io/kube-openapi v0.0.0-20181031203759-72693cb1fadd/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4/go.mod h1:+aW0UZgSXdTSHTIFnWnueEuXjOqerDUxGIw6Ygr+vYY= +k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df/go.mod h1:WgrTcPKYAfNa9C0LV1UeK+XqfbSOUH1WGq/vX5UiW40= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190401085232-94e1e7b7574c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-proxy v0.0.0-20190918202429-08c8357f8e2d/go.mod h1:/8t8XDVKNmtIJRE58VWlDE1JpVxxUSClLQ9dYajKsvk= -k8s.io/kube-scheduler v0.0.0-20190918202713-c34a54b3ec8e/go.mod h1:FXv3w4FuJh54SH/aZbDEr1MITXTcYCYpFArZ176M1U0= +k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229/go.mod h1:2Hxci1uzXO5ipP0h9n2+h18fvNkBTpYlckk5dOPu8zg= +k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b/go.mod h1:BgDUHHC5Wl0xcBUQgo2XEprE5nG5i9tlRR4iNgEFbL0= k8s.io/kube-state-metrics v1.7.2 h1:6vdtgXrrRRMSgnyDmgua+qvgCYv954JNfxXAtDkeLVQ= k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E= -k8s.io/kubelet v0.0.0-20190918202550-958285cf3eef/go.mod h1:y3faEeGRJ9L54/YJWIF0Vp+ZYq9slxgkoPO7ib0Qj9w= -k8s.io/kubernetes v1.11.7-beta.0.0.20181219023948-b875d52ea96d/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.11.8-beta.0.0.20190124204751-3a10094374f2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.14.2/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.15.4/go.mod h1:4Ggyo4AFgjbIzULOminzUJAvgbzY3j5ysXlW/a0PdcQ= -k8s.io/legacy-cloud-providers v0.0.0-20190918203421-225f0541b3ea/go.mod h1:qd7ZEaONgkMZRdUbaoK6ngxjuJz8kLBImMukwL7mOIg= -k8s.io/metrics v0.0.0-20190918202012-3c1ca76f5bda/go.mod h1:LxAN6ulYLPVQGTtRkXEUyylgseTWArq1iCZ9Zve8edc= +k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51/go.mod h1:gL826ZTIfD4vXTGlmzgTbliCAT9NGiqpCqK2aNYv5MQ= +k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2/go.mod h1:SBvrtLbuePbJygVXGGCMtWKH07+qrN2dE1iMnteSG8E= +k8s.io/kubernetes v1.16.0/go.mod h1:nlP2zevWKRGKuaaVbKIwozU0Rjg9leVDXkL4YTtjmVs= +k8s.io/kubernetes v1.16.2/go.mod h1:SmhGgKfQ30imqjFVj8AI+iW+zSyFsswNErKYeTfgoH0= +k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b/go.mod h1:tKW3pKqdRW8pMveUTpF5pJuCjQxg6a25iLo+Z9BXVH0= +k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e/go.mod h1:ve7/vMWeY5lEBkZf6Bt5TTbGS3b8wAxwGbdXAsufjRs= k8s.io/repo-infra v0.0.0-20181204233714-00fe14e3d1a3/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= -k8s.io/sample-apiserver v0.0.0-20190918201353-5cc279503896/go.mod h1:VZkjycg0KSnzhUmktU7DsZghCqJdDQaj9HTWh6b5JZI= -k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9/go.mod h1:sXltHZrQa4jdKL14nOFRRUhhzpmbnRF0qGuAhRQbaxc= k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 h1:VBM/0P5TWxwk+Nw6Z+lAw3DKgO76g90ETOiA6rfLV1Y= -k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -sigs.k8s.io/controller-runtime v0.1.10/go.mod h1:HFAYoOh6XMV+jKF1UjFwrknPbowfyHEHHRdJMf2jMX8= -sigs.k8s.io/controller-runtime v0.3.0 h1:ZtdgqJXVHsIytjdmDuk0QjagnzyLq9FjojXRqIp+dU4= -sigs.k8s.io/controller-runtime v0.3.0/go.mod h1:Cw6PkEg0Sa7dAYovGT4R0tRkGhHXpYijwNxYhAnAZZk= +sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg= +sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns= sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff v0.0.0-20190302045857-e85c7b244fd2/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/testing_frameworks v0.1.1 h1:cP2l8fkA3O9vekpy5Ks8mmA0NW/F7yBdXf8brkWhVrs= -sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U= +sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= +sigs.k8s.io/testing_frameworks v0.1.2 h1:vK0+tvjF0BZ/RYFeZ1E6BYBwHJJXhjuZ3TdsEKH+UQM= +sigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 03981c9aa..998d6d200 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -9,20 +9,30 @@ import ( // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector // +k8s:openapi-gen=true type OpenTelemetryCollectorSpec struct { + // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. // +required + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Config string `json:"config,omitempty"` + // Args is the set of arguments to pass to the OpenTelemetry Collector binary // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Args map[string]string `json:"args,omitempty"` + // Replicas is the number of pod instances for the underlying OpenTelemetry Collector // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Replicas *int32 `json:"replicas,omitempty"` + // Image indicates the container image to use for the OpenTelemetry Collector. // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` + // Mode represents how the collector should be deployed (deployment vs. daemonset) // +optional // +kubebuilder:validation:Enum=daemonset;deployment + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode opentelemetry.Mode `json:"mode,omitempty"` } @@ -41,6 +51,7 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas // +genclient +// +operator-sdk:gen-csv:customresourcedefinitions.displayName="OpenTelemetry Collector" type OpenTelemetryCollector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index fafa2ea22..2d0423290 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -1,5 +1,7 @@ // +build !ignore_autogenerated +// Code generated by openapi-gen. DO NOT EDIT. + // This file was autogenerated by openapi-gen. Do not edit it manually! package v1alpha1 @@ -26,14 +28,14 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollector(ref common.Re Properties: map[string]spec.Schema{ "kind": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, @@ -70,13 +72,15 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo Properties: map[string]spec.Schema{ "config": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.", + Type: []string{"string"}, + Format: "", }, }, "args": { SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, + Description: "Args is the set of arguments to pass to the OpenTelemetry Collector binary", + Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, Schema: &spec.Schema{ @@ -90,20 +94,23 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo }, "replicas": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "Replicas is the number of pod instances for the underlying OpenTelemetry Collector", + Type: []string{"integer"}, + Format: "int32", }, }, "image": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Image indicates the container image to use for the OpenTelemetry Collector.", + Type: []string{"string"}, + Format: "", }, }, "mode": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Mode represents how the collector should be deployed (deployment vs. daemonset)", + Type: []string{"string"}, + Format: "", }, }, }, diff --git a/pkg/client/versioned/clientset.go b/pkg/client/versioned/clientset.go index 7672ef6ac..a7dc9d857 100644 --- a/pkg/client/versioned/clientset.go +++ b/pkg/client/versioned/clientset.go @@ -3,6 +3,8 @@ package versioned import ( + "fmt" + discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -36,9 +38,14 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { } // NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } var cs Clientset diff --git a/pkg/client/versioned/fake/clientset_generated.go b/pkg/client/versioned/fake/clientset_generated.go index bf1c17bc3..4a15bac24 100644 --- a/pkg/client/versioned/fake/clientset_generated.go +++ b/pkg/client/versioned/fake/clientset_generated.go @@ -26,7 +26,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - cs := &Clientset{} + cs := &Clientset{tracker: o} cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { @@ -48,12 +48,17 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { type Clientset struct { testing.Fake discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker } func (c *Clientset) Discovery() discovery.DiscoveryInterface { return c.discovery } +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + var _ clientset.Interface = &Clientset{} // OpentelemetryV1alpha1 retrieves the OpentelemetryV1alpha1Client diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go index 6f040ebea..7b367e52f 100644 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go @@ -3,7 +3,6 @@ package v1alpha1 import ( - serializer "k8s.io/apimachinery/pkg/runtime/serializer" rest "k8s.io/client-go/rest" v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" @@ -56,7 +55,7 @@ func setConfigDefaults(config *rest.Config) error { gv := v1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go index 5a22566ec..e9adaac87 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_test.go @@ -9,6 +9,7 @@ import ( "github.com/go-logr/logr" "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -154,16 +155,19 @@ func TestSetControllerReference(t *testing.T) { clients := &client.Clientset{ Kubernetes: fake.NewSimpleClientset(), Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - d := &appsv1.Deployment{} + d := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{ + Namespace: instance.Namespace, + }} // sanity check assert.Len(t, d.OwnerReferences, 0) // test - reconciler.setControllerReference(ctx, d) + err := reconciler.setControllerReference(ctx, d) + assert.NoError(t, err) // verify assert.Len(t, d.OwnerReferences, 1) From 298270a0d229d599fee00ad3c6c56f46259dba73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 13:16:24 +0100 Subject: [PATCH 0036/1234] Removed codecov until the secret is added to the repository (#4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 1a2a8ace3..7bd669617 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -15,8 +15,3 @@ jobs: - name: "basic checks" run: ./.ci/script.sh - - - name: "upload test coverage report" - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - run: ./.ci/upload-test-coverage.sh From a8c3bc6a1969b5279837d3f3153a82dc95569384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 13:28:01 +0100 Subject: [PATCH 0037/1234] Disabled publishing until the secrets are added (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/publish.yaml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 669f4e8a6..000000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: "Publish artifacts" -on: - push: - branches: - - master - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v1 - with: - go-version: '1.13.3' - - uses: actions/checkout@v1 - - name: "publishes the container images" - env: - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - OPERATOR_VERSION: master - run: ./.ci/publish-images.sh From 56f4b1fe05afd27f69e446ed6760645374dece7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 13:39:55 +0100 Subject: [PATCH 0038/1234] Added olm-catalog for 0.0.2 (#6) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ...operator.v0.0.2.clusterserviceversion.yaml | 168 ++++++++++++++++++ ...emetry.io_opentelemetrycollectors_crd.yaml | 86 +++++++++ .../opentelemetry-operator.package.yaml | 2 +- 3 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml new file mode 100644 index 000000000..af68abca9 --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml @@ -0,0 +1,168 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "opentelemetry.io/v1alpha1", + "kind": "OpenTelemetryCollector", + "metadata": { + "name": "simplest" + }, + "spec": { + "config": "receivers:\n jaeger:\n\nprocessors:\n queued-retry:\n\nexporters:\n logging:\n\npipelines:\n traces:\n receivers: [jaeger]\n processors: [queued-retry]\n exporters: [logging]\n" + } + } + ] + capabilities: Basic Install + name: opentelemetry-operator.v0.0.2 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + displayName: OpenTelemetry Collector + kind: OpenTelemetryCollector + name: opentelemetrycollectors.opentelemetry.io + specDescriptors: + - description: Args is the set of arguments to pass to the OpenTelemetry Collector + binary + displayName: Args + path: args + - description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. + displayName: Config + path: config + - description: Image indicates the container image to use for the OpenTelemetry + Collector. + displayName: Image + path: image + - description: Mode represents how the collector should be deployed (deployment + vs. daemonset) + displayName: Mode + path: mode + - description: Replicas is the number of pod instances for the underlying OpenTelemetry + Collector + displayName: Replicas + path: replicas + version: v1alpha1 + description: Placeholder description + displayName: Opentelemetry Operator + install: + spec: + deployments: + - name: opentelemetry-operator + spec: + replicas: 1 + selector: + matchLabels: + name: opentelemetry-operator + strategy: {} + template: + metadata: + labels: + name: opentelemetry-operator + spec: + containers: + - command: + - opentelemetry-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: opentelemetry-operator + image: quay.io/opentelemetry/opentelemetry-operator:v0.0.2 + imagePullPolicy: Always + name: opentelemetry-operator + resources: {} + serviceAccountName: opentelemetry-operator + permissions: + - rules: + - apiGroups: + - "" + resources: + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - '*' + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - '*' + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - opentelemetry-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - apiGroups: + - opentelemetry.io + resources: + - '*' + verbs: + - '*' + serviceAccountName: opentelemetry-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - tracing + - distributed tracing + - monitoring + - troubleshooting + maintainers: + - email: juraci.github@kroehling.de + name: Juraci Paixão Kröhling + maturity: alpha + provider: + name: OpenTelemetry + replaces: opentelemetry-operator.v0.0.1 + version: 0.0.2 diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml new file mode 100644 index 000000000..c62d155ff --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -0,0 +1,86 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: opentelemetrycollectors.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors + shortNames: + - otelcol + - otelcols + singular: opentelemetrycollector + scope: Namespaced + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + validation: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + config: + description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. + type: string + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + mode: + description: Mode represents how the collector should be deployed (deployment + vs. daemonset) + enum: + - daemonset + - deployment + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector + format: int32 + type: integer + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector + properties: + replicas: + format: int32 + type: integer + version: + type: string + required: + - replicas + - version + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true diff --git a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml index 66206db68..0d59dd5d5 100644 --- a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml +++ b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml @@ -1,5 +1,5 @@ channels: -- currentCSV: opentelemetry-operator.v0.0.1 +- currentCSV: opentelemetry-operator.v0.0.2 name: alpha defaultChannel: alpha packageName: opentelemetry-operator From e6170ab69c16708a76c7f828d1fd1d0e3b27dde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 14:00:47 +0100 Subject: [PATCH 0039/1234] Added release script (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/release.sh | 68 +++++++++++++++++++++++++++++++++++++++++++ opentelemetry.version | 4 +++ 2 files changed, 72 insertions(+) create mode 100755 .ci/release.sh diff --git a/.ci/release.sh b/.ci/release.sh new file mode 100755 index 000000000..36116550a --- /dev/null +++ b/.ci/release.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +git diff -s --exit-code +if [[ $? != 0 ]]; then + echo "The repository isn't clean. We won't proceed, as we don't know if we should commit those changes or not." + exit 1 +fi + +BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"quay.io/opentelemetry/opentelemetry-operator"} +BASE_TAG=${BASE_TAG:-$(git describe --tags)} +OPERATOR_VERSION=${OPERATOR_VERSION:-${BASE_TAG}} +OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)") +TAG=${TAG:-"v${OPERATOR_VERSION}"} +BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${TAG}"} +CREATED_AT=$(date -u -Isecond) +PREVIOUS_VERSION=$(grep operator= opentelemetry.version | awk -F= '{print $2}') + +if [[ ${BASE_TAG} =~ ^release/v.[[:digit:].]+(\-.*)?$ ]]; then + echo "Releasing ${OPERATOR_VERSION} from ${BASE_TAG}" +else + echo "The release tag does not match the expected format: ${BASE_TAG}" + exit 1 +fi + +if [ -z "${GH_WRITE_TOKEN}" ]; then + echo "The GitHub write token isn't set. Skipping release process." + exit 1 +fi + +# changes to deploy/operator.yaml +sed "s~image: quay.io/opentelemetry/opentelemetry-operator.*~image: ${BUILD_IMAGE}~gi" -i deploy/operator.yaml + +# change the versions.txt +sed "s~operator=${PREVIOUS_VERSION}~operator=${OPERATOR_VERSION}~gi" -i opentelemetry.version + +operator-sdk olm-catalog gen-csv \ + --csv-channel=alpha \ + --default-channel \ + --operator-name opentelemetry-operator \ + --update-crds \ + --csv-version=${OPERATOR_VERSION} \ + --from-version=${PREVIOUS_VERSION} + +git diff -s --exit-code +if [[ $? == 0 ]]; then + echo "No changes detected. Skipping." +else + git add \ + deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml \ + deploy/operator.yaml \ + opentelemetry.version \ + deploy/olm-catalog/opentelemetry-operator/${OPERATOR_VERSION}/ + + git diff -s --exit-code + if [[ $? != 0 ]]; then + echo "There are more changes than expected. Skipping the release." + git diff + exit 1 + fi + + git config user.email "opentelemetry-operator@opentelemetry.io" + git config user.name "OpenTelemetry Operator Release" + + git commit -qm "Release ${TAG}" + git tag ${TAG} + git push --repo=https://${GH_WRITE_TOKEN}@github.com/open-telemetry/opentelemetry-collector.git --tags + git push https://${GH_WRITE_TOKEN}@github.com/open-telemetry/opentelemetry-collector.git refs/tags/${TAG}:master +fi diff --git a/opentelemetry.version b/opentelemetry.version index 11f4b718c..db86ffa3b 100644 --- a/opentelemetry.version +++ b/opentelemetry.version @@ -3,3 +3,7 @@ # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. opentelemetry-collector=0.0.2 + +# DO NOT EDIT the next value, it is updated automatically during the release. +# Represents the current (latest) release of the OpenTelemetry Operator. +operator=0.0.2 From 2bc4ff7c25b5b0dc91cbe0a01291e837ea52d065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Dec 2019 14:33:39 +0100 Subject: [PATCH 0040/1234] Changed default zap configuration on 'make run' (#9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index fc3b13830..66e7161cb 100644 --- a/Makefile +++ b/Makefile @@ -56,11 +56,7 @@ container: .PHONY: run run: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --go-ldflags ${LD_FLAGS} - -.PHONY: run-debug -run-debug: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --operator-flags "--zap-level=2" --go-ldflags ${LD_FLAGS} + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} .PHONY: clean clean: From 4b9b711fe58f002043e1deb66617246e56ce339e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 20 Dec 2019 15:04:26 +0100 Subject: [PATCH 0041/1234] Updated OpenTelemetry Collector to 0.2.0 (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 13 +++++++------ examples/simplest.yaml | 13 +++++++------ opentelemetry.version | 2 +- pkg/apis/opentelemetry/flagset.go | 7 ++++++- pkg/upgrade/{v0_0_2.go => v0_2_0.go} | 2 +- pkg/upgrade/versions.go | 6 ++++-- 6 files changed, 26 insertions(+), 17 deletions(-) rename pkg/upgrade/{v0_0_2.go => v0_2_0.go} (86%) diff --git a/README.md b/README.md index 3a7d4c690..55631f7e2 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,17 @@ spec: jaeger: processors: - queued-retry: + queued_retry: exporters: logging: - pipelines: - traces: - receivers: [jaeger] - processors: [queued-retry] - exporters: [logging] + service: + pipelines: + traces: + receivers: [jaeger] + processors: [queued_retry] + exporters: [logging] EOF ``` diff --git a/examples/simplest.yaml b/examples/simplest.yaml index fe2297d83..9f885e689 100644 --- a/examples/simplest.yaml +++ b/examples/simplest.yaml @@ -8,13 +8,14 @@ spec: jaeger: processors: - queued-retry: + queued_retry: exporters: logging: - pipelines: - traces: - receivers: [jaeger] - processors: [queued-retry] - exporters: [logging] + service: + pipelines: + traces: + receivers: [jaeger] + processors: [queued_retry] + exporters: [logging] diff --git a/opentelemetry.version b/opentelemetry.version index db86ffa3b..a468e3823 100644 --- a/opentelemetry.version +++ b/opentelemetry.version @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.0.2 +opentelemetry-collector=0.2.0 # DO NOT EDIT the next value, it is updated automatically during the release. # Represents the current (latest) release of the OpenTelemetry Operator. diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go index cc3a23d00..ee015ae48 100644 --- a/pkg/apis/opentelemetry/flagset.go +++ b/pkg/apis/opentelemetry/flagset.go @@ -1,10 +1,13 @@ package opentelemetry import ( + "fmt" "sync" "github.com/spf13/pflag" "github.com/spf13/viper" + + "github.com/open-telemetry/opentelemetry-operator/pkg/version" ) var ( @@ -18,10 +21,12 @@ func FlagSet() *pflag.FlagSet { mu.Lock() defer mu.Unlock() + otelColVersion := version.Get().OpenTelemetryCollector + fs = pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) fs.String( OtelColImageConfigKey, - "quay.io/opentelemetry/opentelemetry-collector:v0.0.2", + fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", otelColVersion), "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", ) // #nosec G104 (CWE-703): Errors unhandled. diff --git a/pkg/upgrade/v0_0_2.go b/pkg/upgrade/v0_2_0.go similarity index 86% rename from pkg/upgrade/v0_0_2.go rename to pkg/upgrade/v0_2_0.go index 81a29c3d3..d815490de 100644 --- a/pkg/upgrade/v0_0_2.go +++ b/pkg/upgrade/v0_2_0.go @@ -5,7 +5,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/client" ) -func upgrade0_0_2(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_2_0(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // this has the same content as `noop`, but it's added a separate function // to serve as template for versions with an actual upgrade procedure return otelcol, nil diff --git a/pkg/upgrade/versions.go b/pkg/upgrade/versions.go index 8a007b306..f694a88fa 100644 --- a/pkg/upgrade/versions.go +++ b/pkg/upgrade/versions.go @@ -13,13 +13,15 @@ type version struct { var ( v0_0_1 = version{v: "0.0.1", upgrade: noop, next: &v0_0_2} - v0_0_2 = version{v: "0.0.2", upgrade: upgrade0_0_2} + v0_0_2 = version{v: "0.0.2", upgrade: noop, next: &v0_2_0} + v0_2_0 = version{v: "0.2.0", upgrade: upgrade0_2_0} - latest = &v0_0_2 + latest = &v0_2_0 versions = map[string]version{ v0_0_1.v: v0_0_1, v0_0_2.v: v0_0_2, + v0_2_0.v: v0_2_0, } ) From 4593927867598681b2a13d30012c15ba98b5749c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 17 Feb 2020 10:39:57 +0100 Subject: [PATCH 0042/1234] Updated to Operator SDK 0.15.2 (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/generate.sh | 55 ++++++++ .ci/lint.sh | 16 +++ .github/workflows/continuous-integration.yaml | 2 +- Makefile | 26 ++-- build/Dockerfile | 3 +- build/bin/entrypoint | 12 -- build/bin/user_setup | 13 -- go.mod | 8 +- go.sum | 118 ++++++++++++++++++ 9 files changed, 208 insertions(+), 45 deletions(-) create mode 100755 .ci/generate.sh create mode 100755 .ci/lint.sh delete mode 100755 build/bin/entrypoint delete mode 100755 build/bin/user_setup diff --git a/.ci/generate.sh b/.ci/generate.sh new file mode 100755 index 000000000..2f429e571 --- /dev/null +++ b/.ci/generate.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +OPENAPIGEN=openapi-gen +command -v ${OPENAPIGEN} > /dev/null +if [ $? != 0 ]; then + if [ -n ${GOPATH} ]; then + OPENAPIGEN="${GOPATH}/bin/openapi-gen" + fi +fi + +CLIENTGEN=client-gen +command -v ${OPENAPIGEN} > /dev/null +if [ $? != 0 ]; then + if [ -n ${GOPATH} ]; then + CLIENTGEN="${GOPATH}/bin/client-gen" + fi +fi + +# generate the Kubernetes stubs +operator-sdk generate k8s +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to generate the Kubernetes stubs." + exit ${RT} +fi + +# generate the CRD(s) +operator-sdk generate crds +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to generate CRDs." + exit ${RT} +fi + +# generate the schema validation (openapi) stubs +${OPENAPIGEN} --logtostderr=true -o "" -i ./pkg/apis/opentelemetry/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/opentelemetry/v1alpha1 -h /dev/null -r "-" +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to generate the openapi (schema validation) stubs." + exit ${RT} +fi + +# generate the clients +${CLIENTGEN} \ + --input "opentelemetry/v1alpha1" \ + --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis \ + --go-header-file /dev/null \ + --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client \ + --clientset-name versioned \ + --output-base ../../../ +RT=$? +if [ ${RT} != 0 ]; then + echo "Failed to generate the OpenTelemetry Operator clients." + exit ${RT} +fi diff --git a/.ci/lint.sh b/.ci/lint.sh new file mode 100755 index 000000000..c043be5c8 --- /dev/null +++ b/.ci/lint.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +GOLINT=golint + +command -v ${GOLINT} > /dev/null +if [ $? != 0 ]; then + if [ -n ${GOPATH} ]; then + GOLINT="${GOPATH}/bin/golint" + fi +fi + +out=$(${GOLINT} ./...) +if [[ $out ]]; then + echo "$out" + exit 1 +fi \ No newline at end of file diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7bd669617..d66af875d 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v1 - uses: jpkrohling/setup-operator-sdk@v1-release with: - operator-sdk-version: v0.13.0 + operator-sdk-version: v0.15.2 - name: "basic checks" run: ./.ci/script.sh diff --git a/Makefile b/Makefile index 66e7161cb..c6660af0e 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ container: .PHONY: run run: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk up local --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run --local --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} .PHONY: clean clean: @@ -71,17 +71,12 @@ generate: internal-generate format .PHONY: internal-generate internal-generate: - @echo Generating deepcopy... - @operator-sdk generate k8s + @GOPATH=${GOPATH} ./.ci/generate.sh - @echo Generating CRDs... - @operator-sdk generate crds - - @echo Generating clients... - @client-gen --input "opentelemetry/v1alpha1" --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis --go-header-file /dev/null --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client --clientset-name versioned --output-base ../../../ - - @echo Generating OpenAPI... - @openapi-gen --logtostderr=true -o "" -i ./pkg/apis/opentelemetry/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/opentelemetry/v1alpha1 -h /dev/null -r "-" +.PHONY: lint +lint: + @echo Linting... + @GOPATH=${GOPATH} ./.ci/lint.sh .PHONY: test test: unit-tests @@ -92,7 +87,7 @@ unit-tests: @go test ./... -cover -coverprofile=coverage.txt -covermode=atomic -race .PHONY: all -all: check format security build test +all: check format lint security build test .PHONY: ci ci: install-tools ensure-generate-is-noop all @@ -100,9 +95,10 @@ ci: install-tools ensure-generate-is-noop all .PHONY: install-tools install-tools: @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 - @go install golang.org/x/tools/cmd/goimports - @go install k8s.io/code-generator/cmd/client-gen - @go install k8s.io/kube-openapi/cmd/openapi-gen + @go install \ + golang.org/x/tools/cmd/goimports \ + k8s.io/code-generator/cmd/client-gen \ + k8s.io/kube-openapi/cmd/openapi-gen .PHONY: install-prometheus-operator install-prometheus-operator: diff --git a/build/Dockerfile b/build/Dockerfile index 4de868d81..8222e0abd 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -8,8 +8,7 @@ ENV OPERATOR=/usr/local/bin/opentelemetry-operator \ COPY build/_output/bin/opentelemetry-operator ${OPERATOR} COPY build/bin /usr/local/bin -RUN /usr/local/bin/user_setup -ENTRYPOINT ["/usr/local/bin/entrypoint"] +ENTRYPOINT [${OPERATOR}] USER ${USER_UID} diff --git a/build/bin/entrypoint b/build/bin/entrypoint deleted file mode 100755 index 3eefb416b..000000000 --- a/build/bin/entrypoint +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -e - -# This is documented here: -# https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines - -if ! whoami &>/dev/null; then - if [ -w /etc/passwd ]; then - echo "${USER_NAME:-opentelemetry-operator}:x:$(id -u):$(id -g):${USER_NAME:-opentelemetry-operator} user:${HOME}:/sbin/nologin" >> /etc/passwd - fi -fi - -exec ${OPERATOR} $@ diff --git a/build/bin/user_setup b/build/bin/user_setup deleted file mode 100755 index 1e36064cb..000000000 --- a/build/bin/user_setup +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -set -x - -# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be) -mkdir -p ${HOME} -chown ${USER_UID}:0 ${HOME} -chmod ug+rwx ${HOME} - -# runtime user will need to be able to self-insert in /etc/passwd -chmod g+rw /etc/passwd - -# no need for this script to remain in the image after running -rm $0 diff --git a/go.mod b/go.mod index 885920180..de3fbb0c5 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.13 require ( github.com/coreos/prometheus-operator v0.34.0 github.com/go-logr/logr v0.1.0 - github.com/go-openapi/spec v0.19.2 - github.com/operator-framework/operator-sdk v0.13.0 + github.com/go-openapi/spec v0.19.4 + github.com/operator-framework/operator-sdk v0.15.2 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.4.0 @@ -42,3 +42,7 @@ replace ( k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9 ) + +replace github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm + +replace github.com/openshift/api => github.com/openshift/api v0.0.0-20190924102528-32369d4db2ad // Required until https://github.com/operator-framework/operator-lifecycle-manager/pull/1241 is resolved diff --git a/go.sum b/go.sum index b43588070..915866b0d 100644 --- a/go.sum +++ b/go.sum @@ -31,10 +31,15 @@ github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver/v3 v3.0.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig/v3 v3.0.0/go.mod h1:NEUY/Qq8Gdm2xgYA+NwJM6wmfdRV9xkh8h/Rld20R0U= +github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -50,10 +55,13 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -73,16 +81,23 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v1.5.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= @@ -96,6 +111,9 @@ github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93C github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190823190603-4a2f61c4f2b4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= @@ -132,22 +150,30 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/deislabs/oras v0.7.0/go.mod h1:sqMKPG3tMyIX9xwXUBRLhZ24o+uT4y6jgBD2RzUTKDM= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/cli v0.0.0-20190506213505-d88565df0c2d/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.6.1/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -159,6 +185,8 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.11.1+incompatible h1:CjKsv3uWcCMvySPQYKxO8XX3f9zD4FeZRsW4G0B4ffE= +github.com/emicklei/go-restful v2.11.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -174,6 +202,7 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= +github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -203,11 +232,15 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -219,6 +252,8 @@ github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsd github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= +github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= @@ -228,6 +263,8 @@ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.4 h1:i/65mCM9s1h8eCkT07F5Z/C1e/f8VTgEwer+00yevpA= github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= @@ -244,6 +281,8 @@ github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWS github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= @@ -251,6 +290,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 h1:X+zN6RZXsvnrSJaAIQhZezPfAfvsqihKKR8oiLHid34= github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -258,6 +299,9 @@ github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -280,6 +324,8 @@ github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -288,6 +334,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= @@ -303,11 +350,14 @@ github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPV github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gosuri/uitable v0.0.1/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -327,12 +377,15 @@ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCO github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/heketi/heketi v9.0.0+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= github.com/heketi/utils v0.0.0-20170317161834-435bc5bdfa64/go.mod h1:RYlF4ghFZPPmk2TC5REt5OFwvfb6lzxFWrTWB+qs28s= +github.com/helm/helm-2to3 v0.2.0/go.mod h1:jQUVAWB0bM7zNIqKPIfHFzuFSK0kHYovJrjO+hqcvRk= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= @@ -341,6 +394,8 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/improbable-eng/thanos v0.3.2/go.mod h1:GZewVGILKuJVPNRn7L4Zw+7X96qzFOwj63b22xYGXBE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= @@ -360,6 +415,7 @@ github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= @@ -398,6 +454,10 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/maorfr/helm-plugin-utils v0.0.0-20181205064038-588190cb5e3b/go.mod h1:p3gwmRSFqbWw6plBpR0sKl3n3vpu8kX70gvCJKMvvCA= github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= @@ -407,14 +467,17 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.1/go.mod h1:F9YacGpnZbLQMzuPI0rR6op21YvNu/RjL705LJJpM3k= +github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= +github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= @@ -427,6 +490,7 @@ github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1D github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -453,26 +517,35 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= +github.com/openshift/api v0.0.0-20190924102528-32369d4db2ad/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/operator-framework/api v0.0.0-20200120235816-80fd2f1a09c9/go.mod h1:S5IdlJvmKkF84K2tBvsrqJbI2FVy03P88R75snpRxJo= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20191115003340-16619cd27fa5/go.mod h1:zL34MNy92LPutBH5gQK+gGhtgTUlZZX03I2G12vWHF4= github.com/operator-framework/operator-registry v1.5.1/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= +github.com/operator-framework/operator-registry v1.5.3/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= +github.com/operator-framework/operator-registry v1.5.7-0.20200121213444-d8e2ec52c19a/go.mod h1:ekexcV4O8YMxdQuPb+Xco7MHfVmRIq7Jvj5e6NU7dHI= github.com/operator-framework/operator-sdk v0.13.0 h1:AWiKOl6ZeAyQgbGVoD8fNd+eCbFuRWgr4hciaaOEBmE= github.com/operator-framework/operator-sdk v0.13.0/go.mod h1:XRnicDD4uZCNbJbMXc0B7eyw7hjO4Xzol7FAkWHa1Nc= +github.com/operator-framework/operator-sdk v0.15.2 h1:VlxI0J+HLmMKs5k53drQ/B1AXhyNj0OaD2BbREt8Hnk= +github.com/operator-framework/operator-sdk v0.15.2/go.mod h1:RkC5LpluVONa08ORFIIVCYrEr855xG1/NltRL2jQ8qo= github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= @@ -483,6 +556,7 @@ github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= @@ -500,10 +574,14 @@ github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -512,14 +590,19 @@ github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= @@ -555,6 +638,7 @@ github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -593,10 +677,18 @@ github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59b github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xenolf/lego v0.0.0-20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= +github.com/xenolf/lego v0.3.2-0.20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.6/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -628,10 +720,14 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152 h1:ZC1Xn5A1nlpSmQCIva4bZ3ob3lmhYIefc+GU+DLg1Ow= +golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -646,6 +742,7 @@ golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -660,11 +757,15 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss= +golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -705,6 +806,9 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934 h1:u/E0NqCIWRDAo9WCFo6Ko49njPFDLSd3z+X1HgWDMpE= +golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -714,6 +818,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20170824195420-5d2fd3ccab98/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -754,18 +860,23 @@ google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190128161407-8ac453e89fca/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -784,6 +895,7 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v1 v1.1.2/go.mod h1:QpYS+a4WhS+DTlyQIi6Ka7MS3SuR9a055rgXNEe6EiA= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -800,6 +912,8 @@ gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81 gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= +helm.sh/helm/v3 v3.0.0/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= +helm.sh/helm/v3 v3.0.1/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -858,14 +972,18 @@ k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9/go.mod h1:sXltHZrQa4j k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20191010214722-8d271d903fe4 h1:Gi+/O1saihwDqnlmC8Vhv1M5Sp4+rbOmK9TbsLn8ZEA= +k8s.io/utils v0.0.0-20191010214722-8d271d903fe4/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +rsc.io/letsencrypt v0.0.1/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg= sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns= sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= +sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= From 149394c9a2b716840e8e62998537389c56a36f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 6 Mar 2020 13:41:01 +0100 Subject: [PATCH 0043/1234] Added support for service accounts (#16) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Creates a new service account to be used with the Collector instance - Allows users to specify an existing service account, managed externally to the operator Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- ...emetry.io_opentelemetrycollectors_crd.yaml | 4 + .../v1alpha1/opentelemetrycollector_types.go | 5 + .../v1alpha1/zz_generated.openapi.go | 7 + .../opentelemetrycollector/reconcile.go | 1 + .../reconcile_deployment.go | 1 + .../reconcile_deployment_test.go | 1 + .../reconcile_serviceaccount.go | 148 +++++++++++++++ .../reconcile_serviceaccount_test.go | 170 ++++++++++++++++++ 9 files changed, 338 insertions(+), 1 deletion(-) create mode 100644 pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go create mode 100644 pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go diff --git a/Makefile b/Makefile index c6660af0e..dcacdcd63 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ container: .PHONY: run run: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run --local --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run --local --namespace="${WATCH_NAMESPACE}" --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} .PHONY: clean clean: diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index c62d155ff..4c993737a 100644 --- a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -64,6 +64,10 @@ spec: OpenTelemetry Collector format: int32 type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. + type: string type: object status: description: OpenTelemetryCollectorStatus defines the observed state of diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 998d6d200..e91c0a4e4 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -34,6 +34,11 @@ type OpenTelemetryCollectorSpec struct { // +kubebuilder:validation:Enum=daemonset;deployment // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode opentelemetry.Mode `json:"mode,omitempty"` + + // ServiceAccount indicates the name of an existing service account to use with this instance. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + ServiceAccount string `json:"serviceAccount,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 2d0423290..b85749ae4 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -113,6 +113,13 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo Format: "", }, }, + "serviceAccount": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceAccount indicates the name of an existing service account to use with this instance.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index 25b0372c5..e2ed74701 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -50,6 +50,7 @@ func New(scheme *runtime.Scheme, clientset *client.Clientset) *ReconcileOpenTele clientset: clientset, } r.reconcileFuncs = []func(context.Context) error{ + r.reconcileServiceAccount, r.reconcileConfigMap, r.reconcileService, r.reconcileDeployment, diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index c5f4c2e6f..1175229b8 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -101,6 +101,7 @@ func deployment(ctx context.Context) *appsv1.Deployment { Annotations: specAnnotations, }, Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountNameFor(ctx), Containers: []corev1.Container{{ Name: "opentelemetry-collector", Image: image, diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index d6792ee79..d101430fe 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -28,6 +28,7 @@ func TestProperDeployment(t *testing.T) { assert.Equal(t, d.Annotations["custom-annotation"], "custom-annotation-value") assert.Equal(t, d.Labels["custom-label"], "custom-value") assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) + assert.Equal(t, ServiceAccountNameFor(ctx), d.Spec.Template.Spec.ServiceAccountName) } func TestProperDeployments(t *testing.T) { diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go new file mode 100644 index 000000000..9f843c0f3 --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go @@ -0,0 +1,148 @@ +package opentelemetrycollector + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +// reconcileServiceAccount reconciles the service(s) required for the instance in the current context +func (r *ReconcileOpenTelemetryCollector) reconcileServiceAccount(ctx context.Context) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + + svcs := []*corev1.ServiceAccount{} + if len(instance.Spec.ServiceAccount) == 0 { + // if there's no Service Account specified we create one and manage it ourselves + svcs = append(svcs, serviceAccount(ctx)) + } + + // first, handle the create/update parts + if err := r.reconcileExpectedServiceAccounts(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the expected service accounts: %v", err) + } + + // then, delete the extra objects + if err := r.deleteServiceAccounts(ctx, svcs); err != nil { + return fmt.Errorf("failed to reconcile the service accounts to be deleted: %v", err) + } + + return nil +} + +func serviceAccount(ctx context.Context) *corev1.ServiceAccount { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + name := resourceName(instance.Name) + + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + + return &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + } +} + +func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceAccounts(ctx context.Context, expected []*corev1.ServiceAccount) error { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + for _, obj := range expected { + desired := obj + + // #nosec G104 (CWE-703): Errors unhandled. + r.setControllerReference(ctx, desired) + + svcs := r.clientset.Kubernetes.CoreV1().ServiceAccounts(desired.Namespace) + + existing, err := svcs.Get(desired.Name, metav1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + if desired, err = svcs.Create(desired); err != nil { + return fmt.Errorf("failed to create: %v", err) + } + + logger.WithValues("serviceAccount.name", desired.Name, "serviceAccount.namespace", desired.Namespace).V(2).Info("created") + continue + } else if err != nil { + return fmt.Errorf("failed to retrieve: %v", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if updated, err = svcs.Update(updated); err != nil { + return fmt.Errorf("failed to apply changes to service account: %v", err) + } + logger.V(2).Info("applied", "serviceAccount.name", desired.Name, "serviceAccount.namespace", desired.Namespace) + } + + return nil +} + +func (r *ReconcileOpenTelemetryCollector) deleteServiceAccounts(ctx context.Context, expected []*corev1.ServiceAccount) error { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + svcs := r.clientset.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace) + + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }).String(), + } + list, err := svcs.List(opts) + if err != nil { + return fmt.Errorf("failed to list: %v", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := svcs.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + return fmt.Errorf("failed to delete: %v", err) + } + logger.V(2).Info("deleted", "serviceAccount.name", existing.Name, "serviceAccount.namespace", existing.Namespace) + } + } + + return nil +} + +// ServiceAccountNameFor returns the name of the service account for the given context +func ServiceAccountNameFor(ctx context.Context) string { + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + if len(instance.Spec.ServiceAccount) == 0 { + return serviceAccount(ctx).Name + } + + return instance.Spec.ServiceAccount +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go new file mode 100644 index 000000000..71bb4e6c4 --- /dev/null +++ b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go @@ -0,0 +1,170 @@ +package opentelemetrycollector + +import ( + "context" + "testing" + + fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes/fake" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/client" + fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" +) + +func TestProperServiceAccount(t *testing.T) { + // test + s := serviceAccount(ctx) + + // verify + assert.Equal(t, s.Name, "my-otelcol-collector") + assert.Equal(t, s.Annotations["custom-annotation"], "custom-annotation-value") + assert.Equal(t, s.Labels["custom-label"], "custom-value") + assert.Equal(t, s.Labels["app.kubernetes.io/name"], s.Name) +} + +func TestOverrideServiceAccountName(t *testing.T) { + // test + overridden := *instance + overridden.Spec.ServiceAccount = "custom-sa" + + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &overridden) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + s := ServiceAccountNameFor(ctx) + + // verify + assert.Equal(t, "custom-sa", s) +} + +func TestUnmanagedServiceAccount(t *testing.T) { + // customize the CR, to override the service account name + overridden := *instance + overridden.Spec.ServiceAccount = "custom-sa" + + // build a context with an instance of our custom CR + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &overridden) + ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) + + c := &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: overridden.Spec.ServiceAccount, + Namespace: instance.Namespace, + Annotations: instance.Annotations, + }, + } + + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), + } + reconciler := New(schem, clients) + + // sanity check + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + assert.NotNil(t, persisted) + + // test + reconciler.reconcileServiceAccount(ctx) + + // verify that the service account still exists and is not with the operator's labels + existing, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + assert.Nil(t, existing.Labels) + + // verify that a service account with the name that the operator would create does *not* exist + managed := serviceAccount(ctx) + managed, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(managed.Name, metav1.GetOptions{}) + assert.Error(t, err) // not found + assert.Nil(t, managed) +} + +func TestProperReconcileServiceAccount(t *testing.T) { + // prepare + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), + } + reconciler := New(schem, clients) + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + + // test + reconciler.Reconcile(req) + + // verify + list, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).List(metav1.ListOptions{}) + assert.NoError(t, err) + + // we assert the correctness of the service account in another test + assert.Len(t, list.Items, 1) + + // we assert the correctness of the reference in another test (TestSetControllerReference) + for _, item := range list.Items { + assert.Len(t, item.OwnerReferences, 1) + } +} + +func TestUpdateServiceAccount(t *testing.T) { + // prepare + c := serviceAccount(ctx) + c.Namespace = instance.Namespace + c.Labels = map[string]string{"some-key": "some-value"} + + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), + } + reconciler := New(schem, clients) + + // sanity check + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + assert.Contains(t, persisted.Labels, "some-key") + assert.NotContains(t, persisted.Labels, "app.kubernetes.io/name") + + // test + reconciler.reconcileServiceAccount(ctx) + + // verify + persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + assert.Contains(t, persisted.Labels, "some-key") + assert.Equal(t, persisted.Name, persisted.Labels["app.kubernetes.io/name"]) +} + +func TestDeleteExtraServiceAccount(t *testing.T) { + // prepare + c := serviceAccount(ctx) + c.Name = "extra-service" + c.Namespace = instance.Namespace + + clients := &client.Clientset{ + Kubernetes: fake.NewSimpleClientset(c), + Monitoring: fakemon.NewSimpleClientset(), + OpenTelemetry: fakeotclient.NewSimpleClientset(instance), + } + reconciler := New(schem, clients) + + // sanity check + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.NoError(t, err) + + // test + err = reconciler.reconcileServiceAccount(ctx) + assert.NoError(t, err) + + // verify + persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(c.Name, metav1.GetOptions{}) + assert.Error(t, err) // not found + assert.Nil(t, persisted) +} From 0dbb96854d78047de2ea3a90bae1c00df845f6bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 9 Mar 2020 11:51:43 +0100 Subject: [PATCH 0044/1234] Added support for volumes (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ...emetry.io_opentelemetrycollectors_crd.yaml | 1218 +++++++++++++++++ examples/with-volumes.yaml | 30 + .../v1alpha1/opentelemetrycollector_types.go | 13 + .../v1alpha1/zz_generated.deepcopy.go | 15 + .../v1alpha1/zz_generated.openapi.go | 38 + .../reconcile_deployment.go | 50 +- .../reconcile_deployment_test.go | 30 + 7 files changed, 1375 insertions(+), 19 deletions(-) create mode 100644 examples/with-volumes.yaml diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index 4c993737a..9b5720df2 100644 --- a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -68,6 +68,1224 @@ spec: description: ServiceAccount indicates the name of an existing service account to use with this instance. type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within a + container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When not + set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false + or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's + volume should be mounted. Behaves similarly to SubPath but environment + variable references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr and + SubPath are mutually exclusive. This field is beta in 1.15. + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may be + accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'The partition in the volume that you want to + mount. If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for /dev/sda is + "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in + AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than + the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data + field of the referenced ConfigMap will be projected into + the volume as a file whose name is the key and content is + the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the + key to. May not be an absolute path. May not contain + the path element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to the + associated CSI driver which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + description: Specifies the output format of the + exposed resources, defaults to "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + description: 'Total amount of local storage required for this + EmptyDir volume. The size limit is also applicable for memory + medium. The maximum usage on memory medium EmptyDir would + be the minimum value between the SizeLimit specified here + and the sum of memory limits of all containers in a pod. + The default is nil which means that the limit is undefined. + More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + type: string + type: object + fc: + description: FC represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be + set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this + volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the plugin + scripts. This may be empty if no secret object is specified. + If the secret object contains more than one secret, all + secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'The partition in the volume that you want to + mount. If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for /dev/sda is + "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start + with '..'. If '.' is supplied, the volume directory will + be the git repository. Otherwise, if specified, the volume + will contain the git repository in the subdirectory with + the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within + the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within the + path are not affected by this setting. This might be in + conflict with other options that affect the file mode, like + fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: information about the configMap data to + project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + description: Specifies the output format + of the exposed resources, defaults to + "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose name + is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with + Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should + be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the + protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO + system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data + field of the referenced Secret will be projected into the + volume as a file whose name is the key and content is the + value. If specified, the listed keys will be projected into + the specified paths, and unlisted keys will not be present. + If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' path + or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the + key to. May not be an absolute path. May not contain + the path element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be + defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to + use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array type: object status: description: OpenTelemetryCollectorStatus defines the observed state of diff --git a/examples/with-volumes.yaml b/examples/with-volumes.yaml new file mode 100644 index 000000000..dfb5a5ff6 --- /dev/null +++ b/examples/with-volumes.yaml @@ -0,0 +1,30 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: with-volumes +spec: + config: | + receivers: + jaeger: + + processors: + queued_retry: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [queued_retry] + exporters: [logging] + + volumeMounts: + - mountPath: /etc/tls-certs + name: tls-certs-volume + + volumes: + - name: tls-certs-volume + secret: + secretName: tls-certs-secret diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index e91c0a4e4..2aecb583f 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -1,6 +1,7 @@ package v1alpha1 import ( + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" @@ -39,6 +40,18 @@ type OpenTelemetryCollectorSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ServiceAccount string `json:"serviceAccount,omitempty"` + + // VolumeMounts represents the mount points to use in the underlying collector deployment(s) + // +optional + // +listType=set + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` + + // Volumes represents which volumes to use in the underlying collector deployment(s). + // +optional + // +listType=set + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Volumes []v1.Volume `json:"volumes,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go index 8dba90527..26ffa8a8a 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go @@ -5,6 +5,7 @@ package v1alpha1 import ( + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -84,6 +85,20 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index b85749ae4..2079d852c 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -120,9 +120,47 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo Format: "", }, }, + "volumeMounts": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "VolumeMounts represents the mount points to use in the underlying collector deployment(s)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.VolumeMount"), + }, + }, + }, + }, + }, + "volumes": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Volumes represents which volumes to use in the underlying collector deployment(s).", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.Volume"), + }, + }, + }, + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index 1175229b8..bad6aff3a 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -83,6 +83,32 @@ func deployment(ctx context.Context) *appsv1.Deployment { args = append(args, fmt.Sprintf("--%s=%s", k, v)) } + configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) + volumeMounts := []corev1.VolumeMount{{ + Name: configMapVolumeName, + MountPath: "/conf", + }} + volumes := []corev1.Volume{{ + Name: configMapVolumeName, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: name}, + Items: []corev1.KeyToPath{{ + Key: opentelemetry.CollectorConfigMapEntry, + Path: opentelemetry.CollectorConfigMapEntry, + }}, + }, + }, + }} + + if len(instance.Spec.VolumeMounts) > 0 { + volumeMounts = append(volumeMounts, instance.Spec.VolumeMounts...) + } + + if len(instance.Spec.Volumes) > 0 { + volumes = append(volumes, instance.Spec.Volumes...) + } + return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -103,26 +129,12 @@ func deployment(ctx context.Context) *appsv1.Deployment { Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountNameFor(ctx), Containers: []corev1.Container{{ - Name: "opentelemetry-collector", - Image: image, - VolumeMounts: []corev1.VolumeMount{{ - Name: name, - MountPath: "/conf", - }}, - Args: args, - }}, - Volumes: []corev1.Volume{{ - Name: name, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: name}, - Items: []corev1.KeyToPath{{ - Key: opentelemetry.CollectorConfigMapEntry, - Path: opentelemetry.CollectorConfigMapEntry, - }}, - }, - }, + Name: "opentelemetry-collector", + Image: image, + VolumeMounts: volumeMounts, + Args: args, }}, + Volumes: volumes, }, }, }, diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index d101430fe..ca894175b 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -7,6 +7,7 @@ import ( fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" "github.com/spf13/viper" "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes/fake" @@ -198,3 +199,32 @@ func TestDeleteExtraDeployment(t *testing.T) { assert.Nil(t, persisted) assert.Error(t, err) // not found } + +func TestDeploymentWithVolumes(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Volumes: []v1.Volume{{ + Name: "tls-certs-volume", + }}, + VolumeMounts: []v1.VolumeMount{{ + Name: "tls-certs-volumemount", + }}, + }, + } + ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) + + // test + d := deployment(ctx) + + // verify + assert.Len(t, d.Spec.Template.Spec.Volumes, 2) // config + the one from the CR + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + assert.Len(t, d.Spec.Template.Spec.Containers[0].VolumeMounts, 2) // config + the one from the CR + + // the deployment should contain the volume we specified + assert.Contains(t, d.Spec.Template.Spec.Volumes, instance.Spec.Volumes[0]) + + // the deployment should contain the volumemount we specified + assert.Contains(t, d.Spec.Template.Spec.Containers[0].VolumeMounts, instance.Spec.VolumeMounts[0]) +} From 720b0a6612bea513ccf8d5d92fb8eecdb58d2d4c Mon Sep 17 00:00:00 2001 From: Gary Brown Date: Thu, 16 Apr 2020 12:18:23 +0100 Subject: [PATCH 0045/1234] Fix example to reference most recent collector image --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 55631f7e2..aa9e6e86b 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,13 @@ kind: OpenTelemetryCollector metadata: name: simplest spec: + image: otel/opentelemetry-collector:latest config: | receivers: jaeger: - + protocols: + grpc: + endpoint: "localhost:14250" processors: queued_retry: @@ -45,6 +48,8 @@ spec: exporters: [logging] EOF ``` +**_WARNING:_** Until the OpenTelemetry Collector format is stable, changes may be required in the above example to remain +compatible with the latest version of the OpenTelemetry Collector image being referenced. This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `logging`, which writes the spans to the console (`stdout`) of the OpenTelemetry Collector instance that receives the span. From 3da285325098334fedf4d28b317225a8e7425b51 Mon Sep 17 00:00:00 2001 From: Gary Brown Date: Fri, 17 Apr 2020 10:55:16 +0100 Subject: [PATCH 0046/1234] Remove unnecessary endpoint, so will default --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index aa9e6e86b..b932295fa 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ spec: jaeger: protocols: grpc: - endpoint: "localhost:14250" processors: queued_retry: From 1746c53b458bb63aef3ed3881f0b0bc7db3ddc73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 15 Jun 2020 16:30:09 +0200 Subject: [PATCH 0047/1234] Upgrade to operator-sdk 0.18.2 (#24) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 4 +- Makefile | 2 +- build/Dockerfile | 2 - cmd/manager/main.go | 72 +- ...emetry.io_opentelemetrycollectors_crd.yaml | 2563 +++++++++-------- deploy/role.yaml | 29 +- go.mod | 42 +- go.sum | 694 +++++ .../v1alpha1/opentelemetrycollector_types.go | 4 +- .../v1alpha1/zz_generated.openapi.go | 4 +- pkg/client/versioned/clientset.go | 2 +- .../fake/fake_opentelemetrycollector.go | 22 +- .../v1alpha1/opentelemetrycollector.go | 72 +- .../opentelemetrycollector/reconcile.go | 11 +- .../reconcile_configmap.go | 10 +- .../reconcile_configmap_test.go | 14 +- .../reconcile_daemonset.go | 10 +- .../reconcile_daemonset_test.go | 14 +- .../reconcile_deployment.go | 10 +- .../reconcile_deployment_test.go | 14 +- .../reconcile_service.go | 10 +- .../reconcile_service_test.go | 13 +- .../reconcile_serviceaccount.go | 10 +- .../reconcile_serviceaccount_test.go | 18 +- .../reconcile_servicemonitor.go | 10 +- .../reconcile_servicemonitor_test.go | 13 +- .../opentelemetrycollector/reconcile_test.go | 3 +- pkg/upgrade/upgrade.go | 4 +- pkg/upgrade/upgrade_test.go | 4 +- 29 files changed, 2223 insertions(+), 1457 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index d66af875d..cd4cf4194 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -7,11 +7,11 @@ jobs: steps: - uses: actions/setup-go@v1 with: - go-version: '1.13.3' + go-version: '1.14.4' - uses: actions/checkout@v1 - uses: jpkrohling/setup-operator-sdk@v1-release with: - operator-sdk-version: v0.15.2 + operator-sdk-version: v0.18.1 - name: "basic checks" run: ./.ci/script.sh diff --git a/Makefile b/Makefile index dcacdcd63..ea32eb48d 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ container: .PHONY: run run: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run --local --namespace="${WATCH_NAMESPACE}" --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} + @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run local --watch-namespace="${WATCH_NAMESPACE}" --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} .PHONY: clean clean: diff --git a/build/Dockerfile b/build/Dockerfile index 8222e0abd..32e2fb838 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -7,8 +7,6 @@ ENV OPERATOR=/usr/local/bin/opentelemetry-operator \ # install operator binary COPY build/_output/bin/opentelemetry-operator ${OPERATOR} -COPY build/bin /usr/local/bin - ENTRYPOINT [${OPERATOR}] USER ${USER_UID} diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 463fd1cc7..ea752dc53 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -2,10 +2,12 @@ package main import ( "context" + "errors" "flag" "fmt" "os" "runtime" + "strings" // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) _ "k8s.io/client-go/plugin/pkg/client/auth" @@ -16,11 +18,11 @@ import ( "github.com/operator-framework/operator-sdk/pkg/leader" "github.com/operator-framework/operator-sdk/pkg/log/zap" "github.com/operator-framework/operator-sdk/pkg/metrics" - "github.com/operator-framework/operator-sdk/pkg/restmapper" "github.com/spf13/pflag" "github.com/spf13/viper" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/controller-runtime/pkg/manager" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" @@ -104,11 +106,22 @@ func main() { } // Create a new Cmd to provide shared dependencies and start components - mgr, err := manager.New(cfg, manager.Options{ + options := manager.Options{ Namespace: namespace, - MapperProvider: restmapper.NewDynamicRESTMapper, MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), - }) + } + + // Add support for MultiNamespace set in WATCH_NAMESPACE (e.g ns1,ns2) + // Note that this is not intended to be used for excluding namespaces, this is better done via a Predicate + // Also note that you may face performance issues when using this with a high number of namespaces. + // More Info: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/cache#MultiNamespacedCacheBuilder + if strings.Contains(namespace, ",") { + options.Namespace = "" + options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(namespace, ",")) + } + + // Create a new manager to provide shared dependencies and start components + mgr, err := manager.New(cfg, options) if err != nil { log.Error(err, "") os.Exit(1) @@ -138,7 +151,29 @@ func main() { os.Exit(1) } - if err = serveCRMetrics(cfg); err != nil { + // Add the Metrics Service + addMetrics(ctx, cfg) + + // Start the Cmd + if err := mgr.Start(signals.SetupSignalHandler()); err != nil { + log.Error(err, "Manager exited non-zero") + os.Exit(1) + } +} + +// addMetrics will create the Services and Service Monitors to allow the operator export the metrics by using +// the Prometheus operator +func addMetrics(ctx context.Context, cfg *rest.Config) { + // Get the namespace the operator is currently deployed in. + operatorNs, err := k8sutil.GetOperatorNamespace() + if err != nil { + if errors.Is(err, k8sutil.ErrRunLocal) { + log.Info("Skipping CR metrics server creation; not running in a cluster.") + return + } + } + + if err := serveCRMetrics(cfg, operatorNs); err != nil { log.Info("Could not generate and serve custom resource metrics", "error", err.Error()) } @@ -147,6 +182,7 @@ func main() { {Port: metricsPort, Name: metrics.OperatorPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: metricsPort}}, {Port: operatorMetricsPort, Name: metrics.CRPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: operatorMetricsPort}}, } + // Create Service object to expose the metrics port(s). service, err := metrics.CreateMetricsService(ctx, cfg, servicePorts) if err != nil { @@ -156,8 +192,10 @@ func main() { // CreateServiceMonitors will automatically create the prometheus-operator ServiceMonitor resources // necessary to configure Prometheus to scrape metrics from this operator. services := []*v1.Service{service} + + // The ServiceMonitor is created in the same namespace where the operator is deployed svcMonitorAvail := true - _, err = metrics.CreateServiceMonitors(cfg, namespace, services) + _, err = metrics.CreateServiceMonitors(cfg, operatorNs, services) if err != nil { log.Info("Could not create ServiceMonitor object", "error", err.Error()) // If this operator is deployed to a cluster without the prometheus-operator running, it will return @@ -168,30 +206,26 @@ func main() { } } viper.Set(opentelemetry.SvcMonitorAvailable, svcMonitorAvail) - - // Start the Cmd - if err := mgr.Start(signals.SetupSignalHandler()); err != nil { - log.Error(err, "Manager exited non-zero") - os.Exit(1) - } } // serveCRMetrics gets the Operator/CustomResource GVKs and generates metrics based on those types. // It serves those metrics on "http://metricsHost:operatorMetricsPort". -func serveCRMetrics(cfg *rest.Config) error { - // Below function returns filtered operator/CustomResource specific GVKs. - // For more control override the below GVK list with your own custom logic. +func serveCRMetrics(cfg *rest.Config, operatorNs string) error { + // The function below returns a list of filtered operator/CR specific GVKs. For more control, override the GVK list below + // with your own custom logic. Note that if you are adding third party API schemas, probably you will need to + // customize this implementation to avoid permissions issues. filteredGVK, err := k8sutil.GetGVKsFromAddToScheme(apis.AddToScheme) if err != nil { return err } - // Get the namespace the operator is currently deployed in. - operatorNs, err := k8sutil.GetOperatorNamespace() + + // The metrics will be generated from the namespaces which are returned here. + // NOTE that passing nil or an empty list of namespaces in GenerateAndServeCRMetrics will result in an error. + ns, err := kubemetrics.GetNamespacesForMetrics(operatorNs) if err != nil { return err } - // To generate metrics in other namespaces, add the values below. - ns := []string{operatorNs} + // Generate and serve custom resource specific metrics. err = kubemetrics.GenerateAndServeCRMetrics(cfg, ns, filteredGVK, metricsHost, operatorMetricsPort) if err != nil { diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index 9b5720df2..f948807d7 100644 --- a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -1,4 +1,4 @@ -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: opentelemetrycollectors.opentelemetry.io @@ -13,1296 +13,1329 @@ spec: - otelcols singular: opentelemetrycollector scope: Namespaced - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - type: string - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - mode: - description: Mode represents how the collector should be deployed (deployment - vs. daemonset) - enum: - - daemonset - - deployment - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector - format: int32 - type: integer - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within a - container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When not - set, MountPropagationNone is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false - or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the container's - volume should be mounted. Behaves similarly to SubPath but environment - variable references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr and - SubPath are mutually exclusive. This field is beta in 1.15. - type: string - required: - - mountPath - - name + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary type: object - type: array - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may be - accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - partition: - description: 'The partition in the volume that you want to - mount. If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for /dev/sda is - "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource in - AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage - Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + mode: + description: Mode represents how the collector should be deployed + (deployment vs. daemonset) + enum: + - daemonset + - deployment + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather than - the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. More - info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and mounted - on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. More - info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph + monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data - field of the referenced ConfigMap will be projected into - the volume as a file whose name is the key and content is - the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the - ConfigMap, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. + type: array + path: + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: - key: - description: The key to project. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the - key to. May not be an absolute path. May not contain - the path element '..'. May not start with the string - '..'. + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - required: - - key - - path type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must - be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents storage - that is handled by an external CSI driver (Alpha feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to the - associated CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the secret - object containing sensitive information to pass to the CSI - driver to complete the CSI NodePublishVolume and NodeUnpublishVolume - calls. This field is optional, and may be empty if no secret - is required. If the secret object contains more than one - secret, all secret references are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field + description: If unspecified, each key-value pair in the + Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the ConfigMap, the volume setup will error unless it is + marked optional. Paths must be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to + the associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name - of the file to be created. Must not be absolute or - contain the ''..'' path. Must be utf-8 encoded. The - first item of the relative path must not start with - ''..''' + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - requests.cpu and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - description: Specifies the output format of the - exposed resources, defaults to "1" - type: string - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that shares - a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - description: 'Total amount of local storage required for this - EmptyDir volume. The size limit is also applicable for memory - medium. The maximum usage on memory medium EmptyDir would - be the minimum value between the SizeLimit specified here - and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - type: string - type: object - fc: - description: FC represents a Fibre Channel resource that is attached - to a kubelet's host machine and then exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' + readOnly: + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be - set, but not both simultaneously.' - items: + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for + this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource that - is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for this - volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the plugin - scripts. This may be empty if no secret object is specified. - If the secret object contains more than one secret, all - secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to a - kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - partition: - description: 'The partition in the volume that you want to - mount. If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for /dev/sda is - "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision a - container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or start - with '..'. If '.' is supplied, the volume directory will - be the git repository. Otherwise, if specified, the volume - will contain the git repository in the subdirectory with - the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the host - that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to false. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the path - is a symlink, it will follow the link to the real path. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to the - pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). - items: + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for + this volume. type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique within - the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to be - mounted with read-only permissions. Defaults to false. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a reference - to a PersistentVolumeClaim in the same namespace. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent - disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, - and downward API - properties: - defaultMode: - description: Mode bits to use on created files by default. - Must be a value between 0 and 0777. Directories within the - path are not affected by this setting. This might be in - conflict with other options that affect the file mode, like - fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with - other supported volume types + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the + plugin scripts. This may be empty if no secret object + is specified. If the secret object contains more than + one secret, all secrets are passed to the plugin scripts.' properties: - configMap: - description: information about the configMap data to - project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file whose - name is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the ConfigMap, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or + start with '..'. If '.' is supplied, the volume directory + will be the git repository. Otherwise, if specified, + the volume will contain the git repository in the subdirectory + with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: information about the configMap data + to project + properties: items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data - to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + properties: items: - description: DownwardAPIVolumeFile represents - information to create the file containing the - pod field - properties: - fieldRef: - description: 'Required: Selects a field of - the pod: only annotations, labels, name - and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' path. - Must be utf-8 encoded. The first item of - the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - description: Specifies the output format - of the exposed resources, defaults to - "1" - type: string - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the Secret, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to + project + properties: items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended audience of - the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested - duration of validity of the service account token. - As the token approaches expiration, the kubelet - volume plugin will proactively rotate the service - account token. The kubelet will start trying to - rotate the token if the token is older than 80 - percent of its time to live or if the token is - older than 24 hours.Defaults to 1 hour and must - be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the mount - point of the file to project the token into. - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host that - shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume to - be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: Volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose + name is the key and content is the value. If + specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. The kubelet will + start trying to rotate the token if the token + is older than 80 percent of its time to live + or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no + group type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is nil. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + readOnly: + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume should - be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the ScaleIO - system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data - field of the referenced Secret will be projected into the - volume as a file whose name is the key and content is the - value. If specified, the listed keys will be projected into - the specified paths, and unlisted keys will not be present. - If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' path - or start with '..'. - items: - description: Maps a string key to a path within a volume. + type: array + pool: + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. properties: - key: - description: The key to project. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the - key to. May not be an absolute path. May not contain - the path element '..'. May not start with the string - '..'. + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with + Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the + protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the + ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the + Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must + be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - required: - - key - - path type: object - type: array - optional: - description: Specify whether the Secret or its keys must be - defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace to - use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within a - namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the volume - within StorageOS. If no namespace is specified then the - Pod's namespace will be used. This allows the Kubernetes - name scoping to be mirrored within StorageOS for tighter - integration. Set VolumeName to any name to override the - default behaviour. Set to "default" if you are not using - namespaces within StorageOS. Namespaces that do not pre-exist - within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector - properties: - replicas: - format: int32 - type: integer - version: - type: string - required: - - replicas - - version - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 + volumeName: + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name to + override the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector + properties: + replicas: + format: int32 + type: integer + version: + type: string + required: + - replicas + - version + type: object + type: object served: true storage: true + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} diff --git a/deploy/role.yaml b/deploy/role.yaml index 11eab3d34..39b35b155 100644 --- a/deploy/role.yaml +++ b/deploy/role.yaml @@ -1,7 +1,6 @@ -apiVersion: rbac.authorization.k8s.io/v1 kind: Role +apiVersion: rbac.authorization.k8s.io/v1 metadata: - creationTimestamp: null name: opentelemetry-operator rules: - apiGroups: @@ -15,8 +14,15 @@ rules: - events - configmaps - secrets + - serviceaccounts verbs: - - '*' + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - apps resources: @@ -25,7 +31,13 @@ rules: - replicasets - statefulsets verbs: - - '*' + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - monitoring.coreos.com resources: @@ -51,6 +63,7 @@ rules: - apps resources: - replicasets + - deployments verbs: - get - apiGroups: @@ -58,4 +71,10 @@ rules: resources: - '*' verbs: - - '*' + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/go.mod b/go.mod index de3fbb0c5..74b294720 100644 --- a/go.mod +++ b/go.mod @@ -3,46 +3,22 @@ module github.com/open-telemetry/opentelemetry-operator go 1.13 require ( - github.com/coreos/prometheus-operator v0.34.0 + github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.4 - github.com/operator-framework/operator-sdk v0.15.2 + github.com/operator-framework/operator-sdk v0.18.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.4.0 - github.com/stretchr/testify v1.4.0 + github.com/stretchr/testify v1.5.1 gotest.tools v2.2.0+incompatible - k8s.io/api v0.0.0 - k8s.io/apimachinery v0.0.0 + k8s.io/api v0.18.2 + k8s.io/apimachinery v0.18.2 k8s.io/client-go v12.0.0+incompatible - k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d - sigs.k8s.io/controller-runtime v0.4.0 + k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c + sigs.k8s.io/controller-runtime v0.6.0 ) -// Pinned to kubernetes-1.16.2 replace ( - k8s.io/api => k8s.io/api v0.0.0-20191016110408-35e52d86657a - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8 - k8s.io/apiserver => k8s.io/apiserver v0.0.0-20191016112112-5190913f932d - k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5 - k8s.io/client-go => k8s.io/client-go v0.0.0-20191016111102-bec269661e48 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42 - k8s.io/code-generator => k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 - k8s.io/component-base => k8s.io/component-base v0.0.0-20191016111319-039242c015a9 - k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df - k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b - k8s.io/kubectl => k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51 - k8s.io/kubelet => k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b - k8s.io/metrics => k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9 + github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM + k8s.io/client-go => k8s.io/client-go v0.18.2 // Required by prometheus-operator ) - -replace github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm - -replace github.com/openshift/api => github.com/openshift/api v0.0.0-20190924102528-32369d4db2ad // Required until https://github.com/operator-framework/operator-lifecycle-manager/pull/1241 is resolved diff --git a/go.sum b/go.sum index 915866b0d..611c84e0e 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -6,19 +7,55 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.49.0 h1:CH+lkubJzcPYB1Ggupcq0+k8Ni2ILdG2lYjDIgavDBQ= +cloud.google.com/go v0.49.0/go.mod h1:hGvAdzcWNbyuxS3nWhD7H2cIJxjRRTRLQVB0bdputVY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= +contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.2.8+incompatible h1:Q2feRPMlcfVcqz3pF87PJzkm5lZrL+x6BDtzhODzNJM= +github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v13.3.2+incompatible h1:VxzPyuhtnlBOzc4IWCZHqpyH2d+QMLQEuy3wREyY4oc= +github.com/Azure/go-autorest v13.3.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503 h1:uUhdsDMg2GbFLF5GfQPtLMWd5vdDZSfqvqQp3waafxQ= +github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503 h1:Hxqlh1uAA8aGpa1dFhDNhll7U/rkWtG8ZItFvRMr7l0= +github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= +github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= +github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= @@ -28,6 +65,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= @@ -35,17 +74,26 @@ github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YH github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig/v3 v3.0.0/go.mod h1:NEUY/Qq8Gdm2xgYA+NwJM6wmfdRV9xkh8h/Rld20R0U= +github.com/Masterminds/sprig/v3 v3.1.0/go.mod h1:ONGMf7UfYGAbMXCZmQLy8x3lCDIPrEZE/rU8pmrbihA= +github.com/Masterminds/squirrel v1.2.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA= github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= +github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -58,68 +106,112 @@ github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkF github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us= github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= +github.com/brancz/gojsontoyaml v0.0.0-20191212081931-bf2969bbd742/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= +github.com/brancz/kube-rbac-proxy v0.5.0/go.mod h1:cL2VjiIFGS90Cjh5ZZ8+It6tMcBt8rwvuw2J6Mamnl0= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v1.5.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= +github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= +github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190823190603-4a2f61c4f2b4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -128,12 +220,19 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/prometheus-operator v0.34.0 h1:TF9qaydNeUamLKs0hniaapa4FBz8U8TIlRRtJX987A4= github.com/coreos/prometheus-operator v0.34.0/go.mod h1:Li6rMllG/hYIyXfMuvUwhyC+hqwJVHdsDdP21hypT1M= +github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc h1:nMbUjGuF7UzVluucix/vsy4973BNdEiT/aX6kFtskKM= +github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc/go.mod h1:erio69w1R/aC14D5nfvAXSlE8FT8jt2Hnavc50Dp33A= +github.com/coreos/prometheus-operator v0.39.0 h1:sXbjqxHhTdfhdbG/Fpls3nArXZZaC66JTpzebZK2ZOc= +github.com/coreos/prometheus-operator v0.39.0/go.mod h1:erio69w1R/aC14D5nfvAXSlE8FT8jt2Hnavc50Dp33A= github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= @@ -151,48 +250,73 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/deislabs/oras v0.7.0/go.mod h1:sqMKPG3tMyIX9xwXUBRLhZ24o+uT4y6jgBD2RzUTKDM= +github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= +github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/docker/cli v0.0.0-20190506213505-d88565df0c2d/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.1/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= +github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.11.1+incompatible h1:CjKsv3uWcCMvySPQYKxO8XX3f9zD4FeZRsW4G0B4ffE= github.com/emicklei/go-restful v2.11.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= +github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -201,7 +325,10 @@ github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -211,6 +338,9 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= +github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -222,13 +352,17 @@ github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -236,53 +370,78 @@ github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm7232 github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.4 h1:i/65mCM9s1h8eCkT07F5Z/C1e/f8VTgEwer+00yevpA= github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= +github.com/gobuffalo/flect v0.2.1/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= +github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= @@ -293,14 +452,18 @@ github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE= github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -311,6 +474,15 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -326,52 +498,103 @@ github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.4.2 h1:uh5EXM/5/ki6d0p/FoUxuiN8KHpo1w572UXQdB2MnTg= +github.com/googleapis/gnostic v0.4.2/go.mod h1:P0d+GwDcJO8XvMi7aihGGl/CkivFa9JX/V/FfjyYzI0= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.6.0 h1:Xb2lcqZtml1XjgYZxbeayEemq7ASbeTp09m36gQFpEU= +github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= +github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uitable v0.0.1/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= +github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -379,8 +602,17 @@ github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/heketi/heketi v9.0.0+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= @@ -389,6 +621,7 @@ github.com/helm/helm-2to3 v0.2.0/go.mod h1:jQUVAWB0bM7zNIqKPIfHFzuFSK0kHYovJrjO+ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -396,25 +629,44 @@ github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/improbable-eng/thanos v0.3.2/go.mod h1:GZewVGILKuJVPNRn7L4Zw+7X96qzFOwj63b22xYGXBE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM= +github.com/jsonnet-bundler/jsonnet-bundler v0.3.1/go.mod h1:/by7P/OoohkI3q4CgSFqcoFsVY+IaNbzOVDknEsKDeU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= @@ -428,17 +680,27 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= +github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= +github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= @@ -454,23 +716,36 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/maorfr/helm-plugin-utils v0.0.0-20181205064038-588190cb5e3b/go.mod h1:p3gwmRSFqbWw6plBpR0sKl3n3vpu8kX70gvCJKMvvCA= github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.1/go.mod h1:F9YacGpnZbLQMzuPI0rR6op21YvNu/RjL705LJJpM3k= @@ -478,17 +753,33 @@ github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88J github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/mikefarah/yaml/v2 v2.4.0/go.mod h1:ahVqZF4n1W4NqwvVnZzC4es67xsW9uR/RRf2RRxieJU= +github.com/mikefarah/yq/v2 v2.4.1/go.mod h1:i8SYf1XdgUvY2OFwSqGAtWOOgimD2McJ6iutoxRm4k0= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= +github.com/minio/minio-go/v6 v6.0.49/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -500,72 +791,123 @@ github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= +github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= github.com/openshift/api v0.0.0-20190924102528-32369d4db2ad/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= +github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/operator-framework/api v0.0.0-20200120235816-80fd2f1a09c9/go.mod h1:S5IdlJvmKkF84K2tBvsrqJbI2FVy03P88R75snpRxJo= +github.com/operator-framework/api v0.3.7-0.20200602203552-431198de9fc2/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q= github.com/operator-framework/operator-lifecycle-manager v0.0.0-20191115003340-16619cd27fa5/go.mod h1:zL34MNy92LPutBH5gQK+gGhtgTUlZZX03I2G12vWHF4= github.com/operator-framework/operator-registry v1.5.1/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= github.com/operator-framework/operator-registry v1.5.3/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= github.com/operator-framework/operator-registry v1.5.7-0.20200121213444-d8e2ec52c19a/go.mod h1:ekexcV4O8YMxdQuPb+Xco7MHfVmRIq7Jvj5e6NU7dHI= +github.com/operator-framework/operator-registry v1.12.6-0.20200605115407-01fa069730e2/go.mod h1:loVINznYhgBIkmv83kU4yee88RS0BBk+hqOw9r4bhJk= github.com/operator-framework/operator-sdk v0.13.0 h1:AWiKOl6ZeAyQgbGVoD8fNd+eCbFuRWgr4hciaaOEBmE= github.com/operator-framework/operator-sdk v0.13.0/go.mod h1:XRnicDD4uZCNbJbMXc0B7eyw7hjO4Xzol7FAkWHa1Nc= github.com/operator-framework/operator-sdk v0.15.2 h1:VlxI0J+HLmMKs5k53drQ/B1AXhyNj0OaD2BbREt8Hnk= github.com/operator-framework/operator-sdk v0.15.2/go.mod h1:RkC5LpluVONa08ORFIIVCYrEr855xG1/NltRL2jQ8qo= +github.com/operator-framework/operator-sdk v0.18.1 h1:AOUOBchkx8r3yYF/MDjH0gdtd13ACENuy2gnsSXQXt0= +github.com/operator-framework/operator-sdk v0.18.1/go.mod h1:QMFHXj8+SxF56tfR1QmIU/tc9FKI73TG8Qw7Iy4D2zY= github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= +github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= +github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= +github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= +github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -574,14 +916,23 @@ github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -592,17 +943,32 @@ github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkp github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.1 h1:/ZKcW+ixpq2dOl4yeH4qvACNXnkiDCp5e/F5Tq07X7o= +github.com/prometheus/procfs v0.1.1/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= +github.com/prometheus/prometheus v1.8.2-0.20200110114423-1e64d757f711/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= @@ -612,39 +978,71 @@ github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uY github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rubenv/sql-migrate v0.0.0-20191025130928-9355dd04f4b3/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= +github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= +github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -653,6 +1051,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -662,15 +1062,30 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= +github.com/thanos-io/thanos v0.11.0/go.mod h1:N/Yes7J68KqvmY+xM6J5CJqEvWIvKSR5sqGtmuD6wDc= github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= @@ -679,35 +1094,65 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xenolf/lego v0.0.0-20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= github.com/xenolf/lego v0.3.2-0.20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/gorelic v0.0.6/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= +go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= +go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= +go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= +go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -717,30 +1162,57 @@ golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152 h1:ZC1Xn5A1nlpSmQCIva4bZ3ob3lmhYIefc+GU+DLg1Ow= golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904 h1:bXoxMPcSLOq08zI3/c5dEBT6lE4eh+jOh886GHrn6V8= +golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= +golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -749,29 +1221,46 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss= golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -780,10 +1269,12 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180117170059-2c42eef0765b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -799,27 +1290,61 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934 h1:u/E0NqCIWRDAo9WCFo6Ko49njPFDLSd3z+X1HgWDMpE= golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200610111108-226ff32320da h1:bGb80FudwxpeucJUjPYJXuJ8Hk91vNtfvrymzwiei38= +golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20170824195420-5d2fd3ccab98/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -827,6 +1352,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -837,30 +1364,71 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191030203535-5e247c9ad0a0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b h1:AFZdJUT7jJYXQEC29hYH/WZkoV7+KhwxQGmdZ19yYoY= +golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= +gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v3 v3.0.1/go.mod h1:CBhndykehEwTOlEfnsfJwvkFQbSN8YZFr9M+cIHAJto= +gomodules.xyz/orderedmap v0.1.0/go.mod h1:g9/TPUCm1t2gwD3j3zfV8uylyYhVdCNSi+xCEIu7yTU= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.0.0-20190710053202-4340aa3071a0/go.mod h1:03dgh78c4UvU1WksguQ/lvJQXbezKQGJSrwwRq5MraQ= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190128161407-8ac453e89fca/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -868,32 +1436,68 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= +gopkg.in/imdario/mergo.v0 v0.3.7/go.mod h1:9qPP6AGrlC1G2PTNXko614FwGZvorN7MiBU0Eppok+U= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v1 v1.1.2/go.mod h1:QpYS+a4WhS+DTlyQIi6Ka7MS3SuR9a055rgXNEe6EiA= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -905,68 +1509,138 @@ gopkg.in/yaml.v2 v2.0.0/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= helm.sh/helm/v3 v3.0.0/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= helm.sh/helm/v3 v3.0.1/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= +helm.sh/helm/v3 v3.2.0/go.mod h1:ZaXz/vzktgwjyGGFbUWtIQkscfE7WYoRGP2szqAFHR0= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= +k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= +k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= k8s.io/api v0.0.0-20191016110408-35e52d86657a h1:VVUE9xTCXP6KUPMf92cQmN88orz600ebexcRRaBTepQ= k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= +k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= +k8s.io/api v0.0.0-20191122220107-b5267f2975e0/go.mod h1:vYpRfxYkMrmPPSesoHEkGNHxNKTk96REAwqm/inQbs0= +k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= +k8s.io/api v0.18.2 h1:wG5g5ZmSVgm5B+eHMIbI9EGATS2L8Z72rda19RIEgY8= +k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY= k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 h1:kThoiqgMsSwBdMK/lPgjtYTsEjbUU9nXCA9DyU3feok= k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65/go.mod h1:5BINdGqggRXXKnDgpwoJ7PyQH8f+Ypp02fvVNcIFy9s= +k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= +k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= +k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= +k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= +k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8 h1:Iieh/ZEgT3BWwbLD5qEKcY06jKuPEl6zC7gPSehoLw4= k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= +k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= +k8s.io/apimachinery v0.0.0-20191121175448-79c2a76c473a/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.2 h1:44CmtbmkzVDAhCpRVSiP2R5PPrC2RtlIv/MoB8xpdRA= +k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= k8s.io/apiserver v0.0.0-20191016112112-5190913f932d/go.mod h1:7OqfAolfWxUM/jJ/HBLyE+cdaWFBUoo5Q5pHgJVj2ws= +k8s.io/apiserver v0.0.0-20191122221311-9d521947b1e1/go.mod h1:RbsZY5zzBIWnz4KbctZsTVjwIuOpTp4Z8oCgFHN4kZQ= +k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= +k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5/go.mod h1:sDl6WKSQkDM6zS1u9F49a0VooQ3ycYFBFLqd2jf2Xfo= +k8s.io/cli-runtime v0.18.0/go.mod h1:1eXfmBsIJosjn9LjEBUd2WVPoPAY9XGTqTFcPMIBsUQ= +k8s.io/cli-runtime v0.18.2/go.mod h1:yfFR2sQQzDsV0VEKGZtrJwEy4hLZ2oj4ZIfodgxAHWQ= k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= +k8s.io/client-go v0.18.2 h1:aLB0iaD4nmwh7arT2wIn+lMnAq7OswjaejkQ8p9bBYE= +k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458/go.mod h1:O5SO5xcgxrjJV9EC9R/47RuBpbk5YX9URDBlg++FA5o= k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42/go.mod h1:MzCL6kLExQuHruGaqibd8cugC8nw8QRxm3+lzR5l8SI= +k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 h1:NMYlxaF7rYQJk2E2IyrUhaX81zX24+dmoZdkPw0gJqI= k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= +k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.2 h1:C1Nn2JiMf244CvBDKVPX0W2mZFJkVBg54T8OV7/Imso= +k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI= +k8s.io/component-base v0.0.0-20191122220729-2684fb322cb9/go.mod h1:NFuUusy/X4Tk21m21tcNUihnmp4OI7lXU7/xA+rYXkc= +k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= +k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q= k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd/go.mod h1:lf1VBseeLanBpSXD0N9tuPx1ylI8sA0j6f+rckCKiIk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f h1:eW/6wVuHNZgQJmFesyAxu0cvj0WAHHUuGaLbPcmNY3Q= k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= +k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= k8s.io/helm v2.16.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.1.0 h1:X3+Mru/L3jy4BI4vcAYkHvL6PyU+QBsuhEqwlI4mgkA= +k8s.io/klog/v2 v2.1.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4/go.mod h1:+aW0UZgSXdTSHTIFnWnueEuXjOqerDUxGIw6Ygr+vYY= k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df/go.mod h1:WgrTcPKYAfNa9C0LV1UeK+XqfbSOUH1WGq/vX5UiW40= +k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY= k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= +k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9 h1:5NC2ITmvg8RoxoH0wgmL4zn4VZqXGsKbxrikjaQx6s4= +k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229/go.mod h1:2Hxci1uzXO5ipP0h9n2+h18fvNkBTpYlckk5dOPu8zg= k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b/go.mod h1:BgDUHHC5Wl0xcBUQgo2XEprE5nG5i9tlRR4iNgEFbL0= k8s.io/kube-state-metrics v1.7.2 h1:6vdtgXrrRRMSgnyDmgua+qvgCYv954JNfxXAtDkeLVQ= k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E= k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51/go.mod h1:gL826ZTIfD4vXTGlmzgTbliCAT9NGiqpCqK2aNYv5MQ= +k8s.io/kubectl v0.18.0/go.mod h1:LOkWx9Z5DXMEg5KtOjHhRiC1fqJPLyCr3KtQgEolCkU= +k8s.io/kubectl v0.18.2/go.mod h1:OdgFa3AlsPKRpFFYE7ICTwulXOcMGXHTc+UKhHKvrb4= k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2/go.mod h1:SBvrtLbuePbJygVXGGCMtWKH07+qrN2dE1iMnteSG8E= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.16.0/go.mod h1:nlP2zevWKRGKuaaVbKIwozU0Rjg9leVDXkL4YTtjmVs= k8s.io/kubernetes v1.16.2/go.mod h1:SmhGgKfQ30imqjFVj8AI+iW+zSyFsswNErKYeTfgoH0= k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b/go.mod h1:tKW3pKqdRW8pMveUTpF5pJuCjQxg6a25iLo+Z9BXVH0= k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e/go.mod h1:ve7/vMWeY5lEBkZf6Bt5TTbGS3b8wAxwGbdXAsufjRs= +k8s.io/metrics v0.18.0/go.mod h1:8aYTW18koXqjLVKL7Ds05RPMX9ipJZI3mywYvBOxXd4= +k8s.io/metrics v0.18.2/go.mod h1:qga8E7QfYNR9Q89cSCAjinC9pTZ7yv1XSVGUB0vJypg= k8s.io/repo-infra v0.0.0-20181204233714-00fe14e3d1a3/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9/go.mod h1:sXltHZrQa4jdKL14nOFRRUhhzpmbnRF0qGuAhRQbaxc= k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= @@ -974,21 +1648,41 @@ k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLK k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191010214722-8d271d903fe4 h1:Gi+/O1saihwDqnlmC8Vhv1M5Sp4+rbOmK9TbsLn8ZEA= k8s.io/utils v0.0.0-20191010214722-8d271d903fe4/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/letsencrypt v0.0.1/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= +rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg= sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns= +sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= +sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= +sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= +sigs.k8s.io/kubebuilder v1.0.9-0.20200513134826-f07a0146a40b/go.mod h1:FGPx0hvP73+bapzWoy5ePuhAJYgJjrFbPxgvWyortM0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= +sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= +sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/testing_frameworks v0.1.2 h1:vK0+tvjF0BZ/RYFeZ1E6BYBwHJJXhjuZ3TdsEKH+UQM= sigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w= sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 2aecb583f..6ad2dbc25 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -43,13 +43,13 @@ type OpenTelemetryCollectorSpec struct { // VolumeMounts represents the mount points to use in the underlying collector deployment(s) // +optional - // +listType=set + // +listType=atomic // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Volumes represents which volumes to use in the underlying collector deployment(s). // +optional - // +listType=set + // +listType=atomic // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Volumes []v1.Volume `json:"volumes,omitempty"` } diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 2079d852c..57c924c66 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -123,7 +123,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo "volumeMounts": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ @@ -141,7 +141,7 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo "volumes": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "set", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ diff --git a/pkg/client/versioned/clientset.go b/pkg/client/versioned/clientset.go index a7dc9d857..8b9733aa4 100644 --- a/pkg/client/versioned/clientset.go +++ b/pkg/client/versioned/clientset.go @@ -44,7 +44,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go index cc41b975e..4b3c5988d 100644 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go @@ -3,6 +3,8 @@ package fake import ( + "context" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,7 +26,7 @@ var opentelemetrycollectorsResource = schema.GroupVersionResource{Group: "opente var opentelemetrycollectorsKind = schema.GroupVersionKind{Group: "opentelemetry.io", Version: "v1alpha1", Kind: "OpenTelemetryCollector"} // Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. -func (c *FakeOpenTelemetryCollectors) Get(name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *FakeOpenTelemetryCollectors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) @@ -35,7 +37,7 @@ func (c *FakeOpenTelemetryCollectors) Get(name string, options v1.GetOptions) (r } // List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. -func (c *FakeOpenTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { +func (c *FakeOpenTelemetryCollectors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(opentelemetrycollectorsResource, opentelemetrycollectorsKind, c.ns, opts), &v1alpha1.OpenTelemetryCollectorList{}) @@ -57,14 +59,14 @@ func (c *FakeOpenTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha } // Watch returns a watch.Interface that watches the requested openTelemetryCollectors. -func (c *FakeOpenTelemetryCollectors) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *FakeOpenTelemetryCollectors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(opentelemetrycollectorsResource, c.ns, opts)) } // Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *FakeOpenTelemetryCollectors) Create(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *FakeOpenTelemetryCollectors) Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) @@ -75,7 +77,7 @@ func (c *FakeOpenTelemetryCollectors) Create(openTelemetryCollector *v1alpha1.Op } // Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *FakeOpenTelemetryCollectors) Update(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *FakeOpenTelemetryCollectors) Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) @@ -87,7 +89,7 @@ func (c *FakeOpenTelemetryCollectors) Update(openTelemetryCollector *v1alpha1.Op // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenTelemetryCollectors) UpdateStatus(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func (c *FakeOpenTelemetryCollectors) UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(opentelemetrycollectorsResource, "status", c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) @@ -98,7 +100,7 @@ func (c *FakeOpenTelemetryCollectors) UpdateStatus(openTelemetryCollector *v1alp } // Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. -func (c *FakeOpenTelemetryCollectors) Delete(name string, options *v1.DeleteOptions) error { +func (c *FakeOpenTelemetryCollectors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) @@ -106,15 +108,15 @@ func (c *FakeOpenTelemetryCollectors) Delete(name string, options *v1.DeleteOpti } // DeleteCollection deletes a collection of objects. -func (c *FakeOpenTelemetryCollectors) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(opentelemetrycollectorsResource, c.ns, listOptions) +func (c *FakeOpenTelemetryCollectors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(opentelemetrycollectorsResource, c.ns, listOpts) _, err := c.Fake.Invokes(action, &v1alpha1.OpenTelemetryCollectorList{}) return err } // Patch applies the patch and returns the patched openTelemetryCollector. -func (c *FakeOpenTelemetryCollectors) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *FakeOpenTelemetryCollectors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(opentelemetrycollectorsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OpenTelemetryCollector{}) diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go index 12b90b968..d00642555 100644 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go +++ b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go @@ -3,6 +3,7 @@ package v1alpha1 import ( + "context" "time" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -22,15 +23,15 @@ type OpenTelemetryCollectorsGetter interface { // OpenTelemetryCollectorInterface has methods to work with OpenTelemetryCollector resources. type OpenTelemetryCollectorInterface interface { - Create(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - Update(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - UpdateStatus(*v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - Delete(name string, options *v1.DeleteOptions) error - DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error - Get(name string, options v1.GetOptions) (*v1alpha1.OpenTelemetryCollector, error) - List(opts v1.ListOptions) (*v1alpha1.OpenTelemetryCollectorList, error) - Watch(opts v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) + Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (*v1alpha1.OpenTelemetryCollector, error) + Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) + UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.OpenTelemetryCollector, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OpenTelemetryCollectorList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) OpenTelemetryCollectorExpansion } @@ -49,20 +50,20 @@ func newOpenTelemetryCollectors(c *OpentelemetryV1alpha1Client, namespace string } // Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. -func (c *openTelemetryCollectors) Get(name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *openTelemetryCollectors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { result = &v1alpha1.OpenTelemetryCollector{} err = c.client.Get(). Namespace(c.ns). Resource("opentelemetrycollectors"). Name(name). VersionedParams(&options, scheme.ParameterCodec). - Do(). + Do(ctx). Into(result) return } // List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. -func (c *openTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { +func (c *openTelemetryCollectors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -73,13 +74,13 @@ func (c *openTelemetryCollectors) List(opts v1.ListOptions) (result *v1alpha1.Op Resource("opentelemetrycollectors"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Do(). + Do(ctx). Into(result) return } // Watch returns a watch.Interface that watches the requested openTelemetryCollectors. -func (c *openTelemetryCollectors) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (c *openTelemetryCollectors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { var timeout time.Duration if opts.TimeoutSeconds != nil { timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -90,87 +91,90 @@ func (c *openTelemetryCollectors) Watch(opts v1.ListOptions) (watch.Interface, e Resource("opentelemetrycollectors"). VersionedParams(&opts, scheme.ParameterCodec). Timeout(timeout). - Watch() + Watch(ctx) } // Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *openTelemetryCollectors) Create(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *openTelemetryCollectors) Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { result = &v1alpha1.OpenTelemetryCollector{} err = c.client.Post(). Namespace(c.ns). Resource("opentelemetrycollectors"). + VersionedParams(&opts, scheme.ParameterCodec). Body(openTelemetryCollector). - Do(). + Do(ctx). Into(result) return } // Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *openTelemetryCollectors) Update(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *openTelemetryCollectors) Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { result = &v1alpha1.OpenTelemetryCollector{} err = c.client.Put(). Namespace(c.ns). Resource("opentelemetrycollectors"). Name(openTelemetryCollector.Name). + VersionedParams(&opts, scheme.ParameterCodec). Body(openTelemetryCollector). - Do(). + Do(ctx). Into(result) return } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *openTelemetryCollectors) UpdateStatus(openTelemetryCollector *v1alpha1.OpenTelemetryCollector) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *openTelemetryCollectors) UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { result = &v1alpha1.OpenTelemetryCollector{} err = c.client.Put(). Namespace(c.ns). Resource("opentelemetrycollectors"). Name(openTelemetryCollector.Name). SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). Body(openTelemetryCollector). - Do(). + Do(ctx). Into(result) return } // Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. -func (c *openTelemetryCollectors) Delete(name string, options *v1.DeleteOptions) error { +func (c *openTelemetryCollectors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("opentelemetrycollectors"). Name(name). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // DeleteCollection deletes a collection of objects. -func (c *openTelemetryCollectors) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { +func (c *openTelemetryCollectors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { var timeout time.Duration - if listOptions.TimeoutSeconds != nil { - timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second } return c.client.Delete(). Namespace(c.ns). Resource("opentelemetrycollectors"). - VersionedParams(&listOptions, scheme.ParameterCodec). + VersionedParams(&listOpts, scheme.ParameterCodec). Timeout(timeout). - Body(options). - Do(). + Body(&opts). + Do(ctx). Error() } // Patch applies the patch and returns the patched openTelemetryCollector. -func (c *openTelemetryCollectors) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { +func (c *openTelemetryCollectors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { result = &v1alpha1.OpenTelemetryCollector{} err = c.client.Patch(pt). Namespace(c.ns). Resource("opentelemetrycollectors"). - SubResource(subresources...). Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). Body(data). - Do(). + Do(ctx). Into(result) return } diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go index e2ed74701..8df60d1a6 100644 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ b/pkg/controller/opentelemetrycollector/reconcile.go @@ -64,6 +64,9 @@ func New(scheme *runtime.Scheme, clientset *client.Clientset) *ReconcileOpenTele // Reconcile reads that state of the cluster for a OpenTelemetryCollector object and makes changes based on the state read // and what is in the OpenTelemetryCollector.Spec func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) (reconcile.Result, error) { + // the base context for this whole reconciliation loop + ctx := context.Background() + reqLogger := log.WithValues( "Request.Namespace", request.Namespace, "Request.Name", request.Name, @@ -74,7 +77,7 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( otelCols := r.clientset.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(request.Namespace) // Fetch the OpenTelemetryCollector instance - instance, err := otelCols.Get(request.Name, v1.GetOptions{}) + instance, err := otelCols.Get(ctx, request.Name, v1.GetOptions{}) if err != nil { if errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -88,7 +91,7 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( } // set the execution context for this reconcile loop - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + ctx = context.WithValue(ctx, opentelemetry.ContextInstance, instance) ctx = context.WithValue(ctx, opentelemetry.ContextLogger, reqLogger) if err := r.applyUpgrades(ctx); err != nil { @@ -102,13 +105,13 @@ func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) ( } // update the status object, which might have also been updated - if instance, err = otelCols.UpdateStatus(instance); err != nil { + if instance, err = otelCols.UpdateStatus(ctx, instance, v1.UpdateOptions{}); err != nil { reqLogger.Error(err, "failed to store the custom resource's status") return reconcile.Result{}, err } // apply it back, as it might have been updated - if _, err := otelCols.Update(instance); err != nil { + if _, err := otelCols.Update(ctx, instance, v1.UpdateOptions{}); err != nil { reqLogger.Error(err, "failed to store back the custom resource") return reconcile.Result{}, err } diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go index 20ad42f7d..3d4864bb0 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap.go @@ -63,9 +63,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex cmaps := r.clientset.Kubernetes.CoreV1().ConfigMaps(desired.Namespace) - existing, err := cmaps.Get(desired.Name, metav1.GetOptions{}) + existing, err := cmaps.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if desired, err = cmaps.Create(desired); err != nil { + if desired, err = cmaps.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -95,7 +95,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx contex updated.ObjectMeta.Labels[k] = v } - if updated, err = cmaps.Update(updated); err != nil { + if updated, err = cmaps.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) @@ -115,7 +115,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, "app.kubernetes.io/managed-by": "opentelemetry-operator", }).String(), } - list, err := cmaps.List(opts) + list, err := cmaps.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -129,7 +129,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, } if del { - if err := cmaps.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := cmaps.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index cfc42f086..0856e8b07 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -37,14 +37,14 @@ func TestProperReconcileConfigMap(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} // test _, err := reconciler.Reconcile(req) assert.NoError(t, err) // verify - list, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).List(context.Background(), metav1.ListOptions{}) assert.NoError(t, err) // we assert the correctness of the service in another test @@ -62,12 +62,12 @@ func TestUpdateConfigMap(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, "the-config-in-yaml-format", persisted.Data[opentelemetry.CollectorConfigMapEntry]) @@ -82,7 +82,7 @@ func TestUpdateConfigMap(t *testing.T) { reconciler.reconcileConfigMap(ctx) // verify - persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, "updated-config-map", persisted.Data[opentelemetry.CollectorConfigMapEntry]) } @@ -101,7 +101,7 @@ func TestDeleteExtraConfigMap(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test @@ -109,7 +109,7 @@ func TestDeleteExtraConfigMap(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go index 9f4b3b2a7..a0c37feb2 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go @@ -137,9 +137,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex dsets := r.clientset.Kubernetes.AppsV1().DaemonSets(desired.Namespace) - existing, err := dsets.Get(desired.Name, metav1.GetOptions{}) + existing, err := dsets.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if existing, err = dsets.Create(desired); err != nil { + if existing, err = dsets.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -168,7 +168,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx contex updated.ObjectMeta.Labels[k] = v } - if updated, err = dsets.Update(updated); err != nil { + if updated, err = dsets.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace) @@ -188,7 +188,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, "app.kubernetes.io/managed-by": "opentelemetry-operator", }).String(), } - list, err := dsets.List(opts) + list, err := dsets.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -202,7 +202,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, } if del { - if err := dsets.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := dsets.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "daemonSet.name", existing.Name, "daemonSet.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go index 86c0a545a..aadf9045b 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go @@ -82,13 +82,13 @@ func TestProperReconcileDaemonSet(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} // test reconciler.Reconcile(req) // verify - list, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).List(context.Background(), metav1.ListOptions{}) assert.NoError(t, err) // we assert the correctness of the service in another test @@ -153,12 +153,12 @@ func TestUpdateDaemonSet(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) // prepare the test object @@ -172,7 +172,7 @@ func TestUpdateDaemonSet(t *testing.T) { reconciler.reconcileDaemonSet(ctx) // verify - persisted, err = clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) @@ -192,7 +192,7 @@ func TestDeleteExtraDaemonSet(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test @@ -200,7 +200,7 @@ func TestDeleteExtraDaemonSet(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go index bad6aff3a..02b0c775a 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment.go @@ -151,9 +151,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte deps := r.clientset.Kubernetes.AppsV1().Deployments(desired.Namespace) - existing, err := deps.Get(desired.Name, metav1.GetOptions{}) + existing, err := deps.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if existing, err = deps.Create(desired); err != nil { + if existing, err = deps.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -182,7 +182,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx conte updated.ObjectMeta.Labels[k] = v } - if updated, err = deps.Update(updated); err != nil { + if updated, err = deps.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes: %v", err) } logger.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) @@ -202,7 +202,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, "app.kubernetes.io/managed-by": "opentelemetry-operator", }).String(), } - list, err := deps.List(opts) + list, err := deps.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -216,7 +216,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, } if del { - if err := deps.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := deps.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go index ca894175b..4668da3e3 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go @@ -80,13 +80,13 @@ func TestProperReconcileDeployment(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} // test reconciler.Reconcile(req) // verify - list, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).List(context.Background(), metav1.ListOptions{}) assert.NoError(t, err) // we assert the correctness of the service in another test @@ -148,12 +148,12 @@ func TestUpdateDeployment(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} reconciler.Reconcile(req) // sanity check name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) // prepare the test object @@ -167,7 +167,7 @@ func TestUpdateDeployment(t *testing.T) { reconciler.reconcileDeployment(ctx) // verify - persisted, err = clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) @@ -187,7 +187,7 @@ func TestDeleteExtraDeployment(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test @@ -195,7 +195,7 @@ func TestDeleteExtraDeployment(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index 5288b0116..e759fcbc1 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -105,9 +105,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. svcs := r.clientset.Kubernetes.CoreV1().Services(desired.Namespace) - existing, err := svcs.Get(desired.Name, metav1.GetOptions{}) + existing, err := svcs.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if desired, err = svcs.Create(desired); err != nil { + if desired, err = svcs.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -140,7 +140,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. updated.ObjectMeta.Labels[k] = v } - if updated, err = svcs.Update(updated); err != nil { + if updated, err = svcs.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes to service: %v", err) } logger.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) @@ -160,7 +160,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex "app.kubernetes.io/managed-by": "opentelemetry-operator", }).String(), } - list, err := svcs.List(opts) + list, err := svcs.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -174,7 +174,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex } if del { - if err := svcs.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := svcs.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go index 22120fb47..311311eca 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service_test.go @@ -1,6 +1,7 @@ package opentelemetrycollector import ( + "context" "testing" fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" @@ -55,13 +56,13 @@ func TestProperReconcileService(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} // test reconciler.Reconcile(req) // verify - list, err := clients.Kubernetes.CoreV1().Services(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Kubernetes.CoreV1().Services(instance.Namespace).List(context.Background(), metav1.ListOptions{}) assert.NoError(t, err) // we assert the correctness of the service in another test @@ -102,7 +103,7 @@ func TestUpdateService(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Len(t, persisted.Spec.Ports, 1) assert.Equal(t, int32(12345), persisted.Spec.Ports[0].Port) @@ -112,7 +113,7 @@ func TestUpdateService(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, int32(14250), persisted.Spec.Ports[0].Port) assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept @@ -132,7 +133,7 @@ func TestDeleteExtraService(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test @@ -140,7 +141,7 @@ func TestDeleteExtraService(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Error(t, err) // not found assert.Nil(t, persisted) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go index 9f843c0f3..f383b28b3 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go +++ b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go @@ -64,9 +64,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceAccounts(ctx c svcs := r.clientset.Kubernetes.CoreV1().ServiceAccounts(desired.Namespace) - existing, err := svcs.Get(desired.Name, metav1.GetOptions{}) + existing, err := svcs.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if desired, err = svcs.Create(desired); err != nil { + if desired, err = svcs.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -93,7 +93,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceAccounts(ctx c updated.ObjectMeta.Labels[k] = v } - if updated, err = svcs.Update(updated); err != nil { + if updated, err = svcs.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes to service account: %v", err) } logger.V(2).Info("applied", "serviceAccount.name", desired.Name, "serviceAccount.namespace", desired.Namespace) @@ -113,7 +113,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceAccounts(ctx context.Cont "app.kubernetes.io/managed-by": "opentelemetry-operator", }).String(), } - list, err := svcs.List(opts) + list, err := svcs.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -127,7 +127,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceAccounts(ctx context.Cont } if del { - if err := svcs.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := svcs.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "serviceAccount.name", existing.Name, "serviceAccount.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go index 71bb4e6c4..55addef02 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go @@ -68,7 +68,7 @@ func TestUnmanagedServiceAccount(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.NotNil(t, persisted) @@ -76,13 +76,13 @@ func TestUnmanagedServiceAccount(t *testing.T) { reconciler.reconcileServiceAccount(ctx) // verify that the service account still exists and is not with the operator's labels - existing, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + existing, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Nil(t, existing.Labels) // verify that a service account with the name that the operator would create does *not* exist managed := serviceAccount(ctx) - managed, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(managed.Name, metav1.GetOptions{}) + managed, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), managed.Name, metav1.GetOptions{}) assert.Error(t, err) // not found assert.Nil(t, managed) } @@ -95,13 +95,13 @@ func TestProperReconcileServiceAccount(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} // test reconciler.Reconcile(req) // verify - list, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).List(context.Background(), metav1.ListOptions{}) assert.NoError(t, err) // we assert the correctness of the service account in another test @@ -127,7 +127,7 @@ func TestUpdateServiceAccount(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Contains(t, persisted.Labels, "some-key") assert.NotContains(t, persisted.Labels, "app.kubernetes.io/name") @@ -136,7 +136,7 @@ func TestUpdateServiceAccount(t *testing.T) { reconciler.reconcileServiceAccount(ctx) // verify - persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Contains(t, persisted.Labels, "some-key") assert.Equal(t, persisted.Name, persisted.Labels["app.kubernetes.io/name"]) @@ -156,7 +156,7 @@ func TestDeleteExtraServiceAccount(t *testing.T) { reconciler := New(schem, clients) // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test @@ -164,7 +164,7 @@ func TestDeleteExtraServiceAccount(t *testing.T) { assert.NoError(t, err) // verify - persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Error(t, err) // not found assert.Nil(t, persisted) } diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go index 9927262dc..909b774d5 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go @@ -80,9 +80,9 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx c svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(desired.Namespace) - existing, err := svcMons.Get(desired.Name, metav1.GetOptions{}) + existing, err := svcMons.Get(ctx, desired.Name, metav1.GetOptions{}) if err != nil && errors.IsNotFound(err) { - if desired, err = svcMons.Create(desired); err != nil { + if desired, err = svcMons.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -111,7 +111,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx c updated.ObjectMeta.Labels[k] = v } - if _, err = svcMons.Update(updated); err != nil { + if _, err = svcMons.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("failed to apply changes to service monitor: %v", err) } logger.V(2).Info("applied", "svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace) @@ -133,7 +133,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Cont svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace) - list, err := svcMons.List(opts) + list, err := svcMons.List(ctx, opts) if err != nil { return fmt.Errorf("failed to list: %v", err) } @@ -147,7 +147,7 @@ func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Cont } if del { - if err := svcMons.Delete(existing.Name, &metav1.DeleteOptions{}); err != nil { + if err := svcMons.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete: %v", err) } logger.V(2).Info("deleted", "svcmon.name", existing.Name, "svcmon.namespace", existing.Namespace) diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go index 8be92c608..0a750509d 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go @@ -1,6 +1,7 @@ package opentelemetrycollector import ( + "context" "testing" fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" @@ -43,12 +44,12 @@ func TestProperReconcileServiceMonitor(t *testing.T) { reconciler := New(schem, clients) // test - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} _, err := reconciler.Reconcile(req) assert.NoError(t, err) // verify - list, err := clients.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace).List(metav1.ListOptions{}) + list, err := clients.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace).List(context.Background(), metav1.ListOptions{}) require.NoError(t, err) // we assert the correctness of the service in another test @@ -78,14 +79,14 @@ func TestUpdateServiceMonitor(t *testing.T) { reconciler := New(schem, clients) // sanity check - _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) // verify - _, err = clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err = clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) } @@ -106,14 +107,14 @@ func TestDeleteExtraServiceMonitor(t *testing.T) { reconciler := New(schem, clients) // sanity check - _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) // test assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) // verify - persisted, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(c.Name, metav1.GetOptions{}) + persisted, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.Nil(t, persisted) assert.Error(t, err) // not found } diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go index e9adaac87..46683f790 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_test.go @@ -35,6 +35,7 @@ func TestProperReconcile(t *testing.T) { } reconciler := New(schem, clients) req.Namespace = instance.Namespace + req.Name = instance.Name called := false reconciler.reconcileFuncs = []func(context.Context) error{ @@ -91,7 +92,7 @@ func TestReconcileFailsFast(t *testing.T) { OpenTelemetry: fakeotclient.NewSimpleClientset(instance), } reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} + req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} reconciler.reconcileFuncs = []func(context.Context) error{ func(context.Context) error { return errors.New("the server made a boo boo") diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go index 09c1da4e7..4a2b87315 100644 --- a/pkg/upgrade/upgrade.go +++ b/pkg/upgrade/upgrade.go @@ -18,7 +18,7 @@ func ManagedInstances(ctx context.Context, c *client.Clientset) error { logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) logger.Info("looking for managed instances to upgrade") - list, err := c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").List(metav1.ListOptions{}) + list, err := c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").List(ctx, metav1.ListOptions{}) if err != nil { return fmt.Errorf("failed to get list of otelcol instances: %v", err) } @@ -32,7 +32,7 @@ func ManagedInstances(ctx context.Context, c *client.Clientset) error { if !reflect.DeepEqual(otelcol, j) { // the CR has changed, store it! - otelcol, err = c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(otelcol.Namespace).Update(otelcol) + otelcol, err = c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(otelcol.Namespace).Update(ctx, otelcol, metav1.UpdateOptions{}) if err != nil { logger.Error(err, "failed to store the upgraded otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return err diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go index 80792704d..334a10046 100644 --- a/pkg/upgrade/upgrade_test.go +++ b/pkg/upgrade/upgrade_test.go @@ -46,7 +46,7 @@ func TestVersionUpgradeToLatest(t *testing.T) { assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(nsn.Name, metav1.GetOptions{}) + persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(context.Background(), nsn.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, latest.v, persisted.Status.Version) } @@ -78,7 +78,7 @@ func TestUnknownVersion(t *testing.T) { assert.NoError(t, ManagedInstances(ctx, cl)) // verify - persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(nsn.Name, metav1.GetOptions{}) + persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(context.Background(), nsn.Name, metav1.GetOptions{}) assert.NoError(t, err) assert.Equal(t, "0.0.0", persisted.Status.Version) } From 9a106d12d30ba95969b74e44e137f3bd0f9f14cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 23 Jun 2020 08:38:55 +0200 Subject: [PATCH 0048/1234] Derive service ports from OpenTelemetry Collector config (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ...emetry.io_opentelemetrycollectors_crd.yaml | 59 ++++++ examples/simplest.yaml | 1 + go.mod | 3 + pkg/adapters/config_from.go | 42 +++++ pkg/adapters/config_from_test.go | 52 ++++++ pkg/adapters/config_to_ports.go | 75 ++++++++ pkg/adapters/config_to_ports_test.go | 175 ++++++++++++++++++ .../v1alpha1/opentelemetrycollector_types.go | 8 + .../v1alpha1/zz_generated.deepcopy.go | 7 + .../v1alpha1/zz_generated.openapi.go | 20 +- .../opentelemetrycollector/main_test.go | 12 +- .../reconcile_configmap_test.go | 4 +- .../reconcile_service.go | 146 +++++++++++---- .../reconcile_service_test.go | 130 ++++++++++++- pkg/parser/receiver.go | 118 ++++++++++++ pkg/parser/receiver_carbon.go | 17 ++ pkg/parser/receiver_carbon_test.go | 3 + pkg/parser/receiver_collectd.go | 17 ++ pkg/parser/receiver_collectd_test.go | 3 + pkg/parser/receiver_generic.go | 50 +++++ pkg/parser/receiver_generic_test.go | 95 ++++++++++ pkg/parser/receiver_jaeger.go | 96 ++++++++++ pkg/parser/receiver_jaeger_test.go | 86 +++++++++ pkg/parser/receiver_oc.go | 17 ++ pkg/parser/receiver_oc_test.go | 3 + pkg/parser/receiver_otlp.go | 17 ++ pkg/parser/receiver_otlp_test.go | 3 + pkg/parser/receiver_sapm.go | 17 ++ pkg/parser/receiver_sapm_test.go | 3 + pkg/parser/receiver_signalfx.go | 17 ++ pkg/parser/receiver_signalfx_test.go | 3 + pkg/parser/receiver_test.go | 145 +++++++++++++++ pkg/parser/receiver_wavefront.go | 17 ++ pkg/parser/receiver_wavefront_test.go | 3 + pkg/parser/receiver_zipkin-scribe.go | 17 ++ pkg/parser/receiver_zipkin-scribe_test.go | 3 + pkg/parser/receiver_zipkin.go | 17 ++ pkg/parser/receiver_zipkin_test.go | 3 + 38 files changed, 1464 insertions(+), 40 deletions(-) create mode 100644 pkg/adapters/config_from.go create mode 100644 pkg/adapters/config_from_test.go create mode 100644 pkg/adapters/config_to_ports.go create mode 100644 pkg/adapters/config_to_ports_test.go create mode 100644 pkg/parser/receiver.go create mode 100644 pkg/parser/receiver_carbon.go create mode 100644 pkg/parser/receiver_carbon_test.go create mode 100644 pkg/parser/receiver_collectd.go create mode 100644 pkg/parser/receiver_collectd_test.go create mode 100644 pkg/parser/receiver_generic.go create mode 100644 pkg/parser/receiver_generic_test.go create mode 100644 pkg/parser/receiver_jaeger.go create mode 100644 pkg/parser/receiver_jaeger_test.go create mode 100644 pkg/parser/receiver_oc.go create mode 100644 pkg/parser/receiver_oc_test.go create mode 100644 pkg/parser/receiver_otlp.go create mode 100644 pkg/parser/receiver_otlp_test.go create mode 100644 pkg/parser/receiver_sapm.go create mode 100644 pkg/parser/receiver_sapm_test.go create mode 100644 pkg/parser/receiver_signalfx.go create mode 100644 pkg/parser/receiver_signalfx_test.go create mode 100644 pkg/parser/receiver_test.go create mode 100644 pkg/parser/receiver_wavefront.go create mode 100644 pkg/parser/receiver_wavefront_test.go create mode 100644 pkg/parser/receiver_zipkin-scribe.go create mode 100644 pkg/parser/receiver_zipkin-scribe_test.go create mode 100644 pkg/parser/receiver_zipkin.go create mode 100644 pkg/parser/receiver_zipkin_test.go diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml index f948807d7..db5129cfe 100644 --- a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ b/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -57,6 +57,65 @@ spec: - daemonset - deployment type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open aditional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and http://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + Field can be enabled with ServiceAppProtocol feature gate. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is + exposed when type=NodePort or LoadBalancer. Usually assigned + by the system. If specified, it will be allocated to the service + if unused or else creation of the service will fail. Default + is to auto-allocate a port if the ServiceType of this Service + requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic replicas: description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector diff --git a/examples/simplest.yaml b/examples/simplest.yaml index 9f885e689..e8f48fc48 100644 --- a/examples/simplest.yaml +++ b/examples/simplest.yaml @@ -6,6 +6,7 @@ spec: config: | receivers: jaeger: + grpc: processors: queued_retry: diff --git a/go.mod b/go.mod index 74b294720..e63b45a98 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,13 @@ require ( github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc github.com/go-logr/logr v0.1.0 github.com/go-openapi/spec v0.19.4 + github.com/magiconair/properties v1.8.0 github.com/operator-framework/operator-sdk v0.18.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.5.1 + go.uber.org/zap v1.14.1 + gopkg.in/yaml.v2 v2.2.8 gotest.tools v2.2.0+incompatible k8s.io/api v0.18.2 k8s.io/apimachinery v0.18.2 diff --git a/pkg/adapters/config_from.go b/pkg/adapters/config_from.go new file mode 100644 index 000000000..1d7380fdd --- /dev/null +++ b/pkg/adapters/config_from.go @@ -0,0 +1,42 @@ +package adapters + +import ( + "context" + "errors" + + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +var ( + // ErrNoInstance represents an error when an instance isn't available in the context + ErrNoInstance = errors.New("couldn't get the opentelemetry-collector instance from the context") + + // ErrInvalidYAML represents an error in the format of the configuration file + ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration to assemble a list of ports for the service") +) + +// ConfigFromCtx extracts a configuration map from the given context. +// If an instance isn't available in the context, ErrNoInstance is returned. +// If the .Spec.Config isn't a valid YAML, ErrInvalidYAML is returned. +func ConfigFromCtx(ctx context.Context) (map[interface{}]interface{}, error) { + switch instance := ctx.Value(opentelemetry.ContextInstance).(type) { + case *v1alpha1.OpenTelemetryCollector: + return ConfigFromString(instance.Spec.Config) + default: + return nil, ErrNoInstance + } +} + +// ConfigFromString extracts a configuration map from the given string. +// If the given string isn't a valid YAML, ErrInvalidYAML is returned. +func ConfigFromString(configStr string) (map[interface{}]interface{}, error) { + config := make(map[interface{}]interface{}) + if err := yaml.Unmarshal([]byte(configStr), &config); err != nil { + return nil, ErrInvalidYAML + } + + return config, nil +} diff --git a/pkg/adapters/config_from_test.go b/pkg/adapters/config_from_test.go new file mode 100644 index 000000000..a5a167a41 --- /dev/null +++ b/pkg/adapters/config_from_test.go @@ -0,0 +1,52 @@ +package adapters + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" +) + +func TestConfigFromCtx(t *testing.T) { + // prepare + instance := &v1alpha1.OpenTelemetryCollector{} + instance.Spec.Config = "mykey: myval" + ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) + + // test + config, err := ConfigFromCtx(ctx) + + // verify + assert.NoError(t, err) + assert.EqualValues(t, "myval", config["mykey"]) +} + +func TestConfigFromCtxNoContext(t *testing.T) { + // test + config, err := ConfigFromCtx(context.Background()) + + // verify + assert.Equal(t, ErrNoInstance, err) + assert.Nil(t, config) +} + +func TestConfigFromStringInvalidYAML(t *testing.T) { + // test + config, err := ConfigFromString("🦄") + + // verify + assert.Equal(t, ErrInvalidYAML, err) + assert.Nil(t, config) +} + +func TestConfigFromStringEmptyMap(t *testing.T) { + // test + config, err := ConfigFromString("") + + // verify + assert.Nil(t, err) + assert.Len(t, config, 0) +} diff --git a/pkg/adapters/config_to_ports.go b/pkg/adapters/config_to_ports.go new file mode 100644 index 000000000..f89286671 --- /dev/null +++ b/pkg/adapters/config_to_ports.go @@ -0,0 +1,75 @@ +package adapters + +import ( + "context" + "errors" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/parser" +) + +var ( + // ErrNoReceivers indicates that there are no receivers in the configuration + ErrNoReceivers = errors.New("no receivers available as part of the configuration") + + // ErrReceiversNotAMap indicates that the receivers property isn't a map of values + ErrReceiversNotAMap = errors.New("receivers property in the configuration doesn't contain valid receivers") +) + +// ConfigToReceiverPorts converts the incoming configuration object into a set of service ports required by the receivers. +func ConfigToReceiverPorts(ctx context.Context, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + + // now, we gather which ports we might need to open + // for that, we get all the receivers and check their `endpoint` properties, + // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: + // ${instance.Name}-${receiver.name}-${receiver.qualifier} + // the receiver-name is typically the node name from the receivers map + // the receiver-qualifier is what comes after the slash in the receiver name, but typically nil + // examples: + // ```yaml + // receivers: + // examplereceiver: + // endpoint: 0.0.0.0:12345 + // examplereceiver/settings: + // endpoint: 0.0.0.0:12346 + // in this case, we have two ports, named: "examplereceiver" and "examplereceiver-settings" + receiversProperty, ok := config["receivers"] + if !ok { + return nil, ErrNoReceivers + } + + receivers, ok := receiversProperty.(map[interface{}]interface{}) + if !ok { + return nil, ErrReceiversNotAMap + } + + ports := []corev1.ServicePort{} + for key, val := range receivers { + receiver, ok := val.(map[interface{}]interface{}) + if !ok { + logger.Info("receiver doesn't seem to be a map of properties") + continue + } + + rcvrName := key.(string) + rcvrParser := parser.For(rcvrName, receiver) + + rcvrPorts, err := rcvrParser.Ports(ctx) + if err != nil { + // should we break the process and return an error, or just ignore this faulty parser + // and let the other parsers add their ports to the service? right now, the best + // option seems to be to log the failures and move on, instead of failing them all + logger.Error(err, "parser for '%s' has returned an error: %v", rcvrName, err) + continue + } + + if len(rcvrPorts) > 0 { + ports = append(ports, rcvrPorts...) + } + } + return ports, nil +} diff --git a/pkg/adapters/config_to_ports_test.go b/pkg/adapters/config_to_ports_test.go new file mode 100644 index 000000000..8fcdfe1ea --- /dev/null +++ b/pkg/adapters/config_to_ports_test.go @@ -0,0 +1,175 @@ +package adapters + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" + "github.com/open-telemetry/opentelemetry-operator/pkg/parser" +) + +var ( + logger = logf.Log.WithName("unit-tests") + ctxWithLogger = context.WithValue(context.Background(), opentelemetry.ContextLogger, logger) +) + +func TestExtractPortsFromConfig(t *testing.T) { + // prepare + configStr := `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" + examplereceiver/invalid-ignored: + endpoint: "0.0.0.0" + examplereceiver/invalid-not-number: + endpoint: "0.0.0.0:not-number" + examplereceiver/without-endpoint: + notendpoint: "0.0.0.0:12347" + jaeger: + grpc: + thrift_compact: + thrift_binary: + endpoint: 0.0.0.0:6833 + jaeger/custom: + thrift_http: + endpoint: 0.0.0.0:15268 +` + + // test + config, err := ConfigFromString(configStr) + require.NoError(t, err) + ports, err := ConfigToReceiverPorts(ctxWithLogger, config) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 6) + + expectedPorts := map[int32]bool{} + expectedPorts[int32(12345)] = false + expectedPorts[int32(12346)] = false + expectedPorts[int32(14250)] = false + expectedPorts[int32(6831)] = false + expectedPorts[int32(6833)] = false + expectedPorts[int32(15268)] = false + + expectedNames := map[string]bool{} + expectedNames["examplereceiver"] = false + expectedNames["examplereceiver-settings"] = false + expectedNames["jaeger-grpc"] = false + expectedNames["jaeger-thrift-compact"] = false + expectedNames["jaeger-thrift-binary"] = false + expectedNames["jaeger-custom-thrift-http"] = false + + // make sure we only have the ports in the set + for _, port := range ports { + assert.Contains(t, expectedPorts, port.Port) + assert.Contains(t, expectedNames, port.Name) + expectedPorts[port.Port] = true + expectedNames[port.Name] = true + } + + // and make sure all the ports from the set are there + for _, val := range expectedPorts { + assert.True(t, val) + } +} + +func TestNoPortsParsed(t *testing.T) { + for _, tt := range []struct { + config string + expected error + }{ + // prepare + { + config: "", + expected: ErrNoReceivers, + }, + { + config: "receivers: some-string", + expected: ErrReceiversNotAMap, + }, + } { + config, err := ConfigFromString(tt.config) + require.NoError(t, err) + + // test + ports, err := ConfigToReceiverPorts(ctxWithLogger, config) + + // verify + assert.Equal(t, tt.expected, err) + assert.Nil(t, ports) + } +} + +func TestInvalidReceiver(t *testing.T) { + for _, tt := range []string{ + // the receiver isn't a map, can't have an endpoint + "receivers:\n some-receiver: string", + + // the receiver's endpoint isn't a string, can't parse the port from it + "receivers:\n some-receiver:\n endpoint: 123", + } { + // test + config, err := ConfigFromString(tt) + require.NoError(t, err) + ports, err := ConfigToReceiverPorts(ctxWithLogger, config) + + // verify + assert.NoError(t, err) + assert.NotNil(t, ports) + assert.Len(t, ports, 0) + } + +} + +func TestParserFailed(t *testing.T) { + // prepare + mockParserCalled := false + mockParser := &mockParser{ + portsFunc: func(context.Context) ([]v1.ServicePort, error) { + mockParserCalled = true + return nil, errors.New("mocked error") + }, + } + parser.Register("mock", func(name string, config map[interface{}]interface{}) parser.ReceiverParser { + return mockParser + }) + + config := map[interface{}]interface{}{ + "receivers": map[interface{}]interface{}{ + "mock": map[interface{}]interface{}{}, + }, + } + + // test + ports, err := ConfigToReceiverPorts(ctxWithLogger, config) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 0) + assert.True(t, mockParserCalled) +} + +type mockParser struct { + portsFunc func(context.Context) ([]corev1.ServicePort, error) +} + +func (m *mockParser) Ports(ctx context.Context) ([]corev1.ServicePort, error) { + if m.portsFunc != nil { + return m.portsFunc(ctx) + } + + return nil, nil +} + +func (m *mockParser) ParserName() string { + return "__mock-adapters" +} diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go index 6ad2dbc25..b75e1a0e4 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go @@ -52,6 +52,14 @@ type OpenTelemetryCollectorSpec struct { // +listType=atomic // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Volumes []v1.Volume `json:"volumes,omitempty"` + + // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator + // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be + // used to open aditional ports that can't be inferred by the operator, like for custom receivers. + // +optional + // +listType=atomic + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Ports []v1.ServicePort `json:"ports,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go index 26ffa8a8a..153f0e1ce 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go @@ -99,6 +99,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1.ServicePort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go index 57c924c66..fe089ef1d 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go @@ -156,11 +156,29 @@ func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref commo }, }, }, + "ports": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + SchemaProps: spec.SchemaProps{ + Description: "Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/api/core/v1.ServicePort"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, + "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, } } diff --git a/pkg/controller/opentelemetrycollector/main_test.go b/pkg/controller/opentelemetrycollector/main_test.go index 71c7b9d24..d1a82dac4 100644 --- a/pkg/controller/opentelemetrycollector/main_test.go +++ b/pkg/controller/opentelemetrycollector/main_test.go @@ -15,9 +15,13 @@ import ( ) var ( - instance *v1alpha1.OpenTelemetryCollector - ctx context.Context - schem *runtime.Scheme + instance *v1alpha1.OpenTelemetryCollector + ctx context.Context + schem *runtime.Scheme + baseTestConfig = `receivers: + first: + endpoint: localhost:1234 +` ) // TestMain ensures that all tests in this package have a fresh and sane instance of the common resources @@ -39,7 +43,7 @@ func TestMain(m *testing.M) { Annotations: map[string]string{"custom-annotation": "custom-annotation-value"}, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: "the-config-in-yaml-format", + Config: baseTestConfig, }, } ctx = context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go index 0856e8b07..82a4106dc 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go @@ -26,7 +26,7 @@ func TestProperConfigMap(t *testing.T) { assert.Equal(t, c.Annotations["custom-annotation"], "custom-annotation-value") assert.Equal(t, c.Labels["custom-label"], "custom-value") assert.Equal(t, c.Labels["app.kubernetes.io/name"], c.Name) - assert.Equal(t, c.Data[opentelemetry.CollectorConfigMapEntry], "the-config-in-yaml-format") + assert.Equal(t, c.Data[opentelemetry.CollectorConfigMapEntry], baseTestConfig) } func TestProperReconcileConfigMap(t *testing.T) { @@ -69,7 +69,7 @@ func TestUpdateConfigMap(t *testing.T) { name := resourceName(instance.Name) persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) assert.NoError(t, err) - assert.Equal(t, "the-config-in-yaml-format", persisted.Data[opentelemetry.CollectorConfigMapEntry]) + assert.Equal(t, baseTestConfig, persisted.Data[opentelemetry.CollectorConfigMapEntry]) // prepare the test object updated := *instance diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go index e759fcbc1..88fff02a0 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service.go @@ -6,21 +6,23 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" + errs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/util/intstr" + "github.com/open-telemetry/opentelemetry-operator/pkg/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" ) // reconcileService reconciles the service(s) required for the instance in the current context func (r *ReconcileOpenTelemetryCollector) reconcileService(ctx context.Context) error { - svcs := []*corev1.Service{ - service(ctx), - monitoringService(ctx), - headless(ctx), + svcs := []*corev1.Service{} + for _, s := range []*corev1.Service{service(ctx), monitoringService(ctx), headless(ctx)} { + // add only the non-nil to the list + if s != nil { + svcs = append(svcs, s) + } } // first, handle the create/update parts @@ -38,15 +40,51 @@ func (r *ReconcileOpenTelemetryCollector) reconcileService(ctx context.Context) func service(ctx context.Context) *corev1.Service { instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := resourceName(instance.Name) + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name + name := resourceName(instance.Name) + labels := serviceLabels(ctx, name) // by coincidence, the selector is the same as the label, but note that the selector points to the deployment // whereas 'labels' refers to the service selector := labels + config, err := adapters.ConfigFromCtx(ctx) + if err != nil { + logger.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(ctx, config) + if err != nil { + logger.Error(err, "couldn't build the service for this instance") + return nil + } + + if len(instance.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(instance.Spec.Ports) + resultingInferredPorts := []corev1.ServicePort{} + for _, inferred := range ports { + if filtered := filterPort(logger, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(instance.Spec.Ports, resultingInferredPorts...) + } + + // if we have no ports, we don't need a service + if len(ports) == 0 { + return nil + } + return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -57,42 +95,42 @@ func service(ctx context.Context) *corev1.Service { Spec: corev1.ServiceSpec{ Selector: selector, ClusterIP: "", - Ports: []corev1.ServicePort{ - { - Name: "jaeger-grpc", - Port: 14250, - TargetPort: intstr.FromInt(14250), - }, - }, + Ports: ports, }, } } func headless(ctx context.Context) *corev1.Service { h := service(ctx) + if h == nil { + return nil + } + h.Name = fmt.Sprintf("%s-headless", h.Name) h.Spec.ClusterIP = "None" return h } func monitoringService(ctx context.Context) *corev1.Service { - h := service(ctx) - h.Name = fmt.Sprintf("%s-monitoring", h.Name) + instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) + name := fmt.Sprintf("%s-monitoring", resourceName(instance.Name)) - // duplicate the map, as we want to change the h.Labels but not the selector - labels := map[string]string{} - for k, v := range h.Labels { - labels[k] = v + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: serviceLabels(ctx, name), + Annotations: instance.Annotations, + }, + Spec: corev1.ServiceSpec{ + Selector: serviceLabels(ctx, resourceName(instance.Name)), + ClusterIP: "", + Ports: []corev1.ServicePort{{ + Name: "monitoring", + Port: 8888, + }}, + }, } - labels["app.kubernetes.io/name"] = h.Name - h.Labels = labels - - h.Spec.Ports = []corev1.ServicePort{{ - Name: "monitoring", - Port: 8888, - TargetPort: intstr.FromInt(8888), - }} - return h } func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context.Context, expected []*corev1.Service) error { @@ -106,7 +144,7 @@ func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context. svcs := r.clientset.Kubernetes.CoreV1().Services(desired.Namespace) existing, err := svcs.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { + if err != nil && errs.IsNotFound(err) { if desired, err = svcs.Create(ctx, desired, metav1.CreateOptions{}); err != nil { return fmt.Errorf("failed to create: %v", err) } @@ -183,3 +221,47 @@ func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, ex return nil } + +func serviceLabels(ctx context.Context, name string) map[string]string { + labels := commonLabels(ctx) + labels["app.kubernetes.io/name"] = name + return labels +} + +func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { + if portNumbers[candidate.Port] { + return nil + } + + // do we have the port name there already? + if portNames[candidate.Name] { + // there's already a port with the same name! do we have a 'port-%d' already? + fallbackName := fmt.Sprintf("port-%d", candidate.Port) + if portNames[fallbackName] { + // that wasn't expected, better skip this port + logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", + "inferred-port-name", candidate.Name, + "fallback-port-name", fallbackName, + ) + return nil + } + + candidate.Name = fallbackName + return &candidate + } + + // this port is unique, return as is + return &candidate +} + +func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { + numbers := map[int32]bool{} + names := map[string]bool{} + + for _, port := range ports { + numbers[port.Port] = true + names[port.Name] = true + } + + return numbers, names +} diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go index 311311eca..6ef3acbe4 100644 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ b/pkg/controller/opentelemetrycollector/reconcile_service_test.go @@ -12,11 +12,15 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/kubernetes/fake" "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" "github.com/open-telemetry/opentelemetry-operator/pkg/client" fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" ) +var logger = logf.Log.WithName("logger") + func TestProperService(t *testing.T) { // test s := service(ctx) @@ -115,7 +119,7 @@ func TestUpdateService(t *testing.T) { // verify persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) assert.NoError(t, err) - assert.Equal(t, int32(14250), persisted.Spec.Ports[0].Port) + assert.Equal(t, int32(1234), persisted.Spec.Ports[0].Port) assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept } @@ -145,3 +149,127 @@ func TestDeleteExtraService(t *testing.T) { assert.Error(t, err) // not found assert.Nil(t, persisted) } + +func TestServiceWithoutPorts(t *testing.T) { + for _, tt := range []string{ + "", + "🦄", + "receivers:\n myreceiver:\n endpoint:", + "receivers:\n myreceiver:\n endpoint: 0.0.0.0", + } { + // prepare + i := *instance + i.Spec.Config = tt + c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) + + // test + s := service(c) + + // verify + assert.Nil(t, s, "expected no ports from a configuration like: %s", tt) + } +} + +func TestOverridePorts(t *testing.T) { + // prepare + i := *instance + i.Spec.Ports = []corev1.ServicePort{{ + Name: "my-port", + Port: int32(1234), + }} + c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) + + // test + s := service(c) + + // verify + assert.NotNil(t, s) + assert.Len(t, s.Spec.Ports, 1) + assert.Equal(t, int32(1234), s.Spec.Ports[0].Port) + assert.Equal(t, "my-port", s.Spec.Ports[0].Name) +} + +func TestAddExplicitPorts(t *testing.T) { + for _, tt := range []struct { + name string // the test case name + instancePorts []corev1.ServicePort + expectedPorts map[int32]bool + expectedNames map[string]bool + }{ + { + name: "NewPort", + instancePorts: []corev1.ServicePort{{ + Name: "my-port", + Port: int32(1235), + }}, + // "first" (1234) comes from a receiver in .Spec.Config + expectedNames: map[string]bool{"first": false, "my-port": false}, + expectedPorts: map[int32]bool{1234: false, 1235: false}, + }, + { + name: "FallbackPortName", + instancePorts: []corev1.ServicePort{{ + Name: "first", // clashes with a receiver from .Spec.Config + Port: int32(1235), + }}, + expectedNames: map[string]bool{"port-1234": false, "first": false}, + expectedPorts: map[int32]bool{1234: false, 1235: false}, + }, + { + name: "FallbackPortNameClashes", + instancePorts: []corev1.ServicePort{ + { + Name: "first", // clashes with the port 1234 from the receiver in .Spec.Config + Port: int32(1235), + }, + { + Name: "port-1234", // the "first" port will be renamed to port-1234, clashes with this one + Port: int32(1236), + }, + }, + expectedNames: map[string]bool{"first": false, "port-1234": false}, + expectedPorts: map[int32]bool{1235: false, 1236: false}, // the inferred port 1234 is skipped + }, + { + name: "SkipExistingPortNumber", + instancePorts: []corev1.ServicePort{{ + Name: "my-port", + Port: int32(1234), + }}, + expectedNames: map[string]bool{"my-port": false}, + expectedPorts: map[int32]bool{1234: false}, + }, + } { + t.Run("TestAddExplicitPorts-"+tt.name, func(t *testing.T) { + // prepare + i := *instance + i.Spec.Ports = tt.instancePorts + c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) + + // test + s := service(c) + + // verify + assert.NotNil(t, s) + + for _, p := range s.Spec.Ports { + if _, ok := tt.expectedPorts[p.Port]; !ok { + assert.Fail(t, "found a port that we didn't expect", "port number: %d", p.Port) + } + tt.expectedPorts[p.Port] = true + + if _, ok := tt.expectedNames[p.Name]; !ok { + assert.Fail(t, "found a port name that we didn't expect", "port name: %s", p.Name) + } + tt.expectedNames[p.Name] = true + } + + for k, v := range tt.expectedPorts { + assert.True(t, v, "the port %s should have been part of the result", k) + } + for k, v := range tt.expectedNames { + assert.True(t, v, "the port name %s should have been part of the result", k) + } + }) + } +} diff --git a/pkg/parser/receiver.go b/pkg/parser/receiver.go new file mode 100644 index 000000000..e8c35e11b --- /dev/null +++ b/pkg/parser/receiver.go @@ -0,0 +1,118 @@ +package parser + +import ( + "context" + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" +) + +var ( + // DNS_LABEL constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names + dnsLabelValidation = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$") +) + +// ReceiverParser is an interface that should be implemented by all receiver parsers +type ReceiverParser interface { + // Ports returns the service ports parsed based on the receiver's configuration + Ports(context.Context) ([]corev1.ServicePort, error) + + // ParserName returns the name of this parser + ParserName() string +} + +// Builder specifies the signature required for parser builders +type Builder func(name string, config map[interface{}]interface{}) ReceiverParser + +// registry holds a record of all known parsers +var registry = make(map[string]Builder) + +// BuilderFor returns a parser builder for the given receiver name +func BuilderFor(name string) Builder { + builder := registry[receiverType(name)] + if builder == nil { + builder = NewGenericReceiverParser + } + + return builder +} + +// For returns a new parser for the given receiver name + config +func For(name string, config map[interface{}]interface{}) ReceiverParser { + builder := BuilderFor(name) + return builder(name, config) +} + +// Register adds a new parser builder to the list of known builders +func Register(name string, builder Builder) { + registry[name] = builder +} + +func singlePortFromConfigEndpoint(ctx context.Context, name string, config map[interface{}]interface{}) *v1.ServicePort { + logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) + endpoint, ok := config["endpoint"] + if !ok { + logger.Info("receiver doesn't have an endpoint") + return nil + } + + switch endpoint := endpoint.(type) { + case string: + port, err := portFromEndpoint(endpoint) + if err != nil { + logger.WithValues("endpoint", endpoint).Info("couldn't parse the endpoint's port") + return nil + } + + return &corev1.ServicePort{ + Name: portName(name, port), + Port: port, + } + default: + logger.Info("receiver's endpoint isn't a string") + } + + return nil +} + +func portName(receiverName string, port int32) string { + if len(receiverName) > 63 { + return fmt.Sprintf("port-%d", port) + } + + candidate := strings.ReplaceAll(receiverName, "/", "-") + candidate = strings.ReplaceAll(candidate, "_", "-") + + if !dnsLabelValidation.MatchString(candidate) { + return fmt.Sprintf("port-%d", port) + } + + // matches the pattern and has less than 63 chars -- the candidate name is good to go! + return candidate +} + +func portFromEndpoint(endpoint string) (int32, error) { + i := strings.LastIndex(endpoint, ":") + 1 + part := endpoint[i:] + port, err := strconv.Atoi(part) + return int32(port), err +} + +func receiverType(name string) string { + // receivers have a name like: + // - myreceiver/custom + // - myreceiver + // we extract the "myreceiver" part and see if we have a parser for the receiver + if strings.Contains(name, "/") { + return name[:strings.Index(name, "/")] + } + + return name +} diff --git a/pkg/parser/receiver_carbon.go b/pkg/parser/receiver_carbon.go new file mode 100644 index 000000000..8c0da5de7 --- /dev/null +++ b/pkg/parser/receiver_carbon.go @@ -0,0 +1,17 @@ +package parser + +const parserNameCarbon = "__carbon" + +// NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository +func NewCarbonReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 2003, + parserName: parserNameCarbon, + } +} + +func init() { + Register("carbon", NewCarbonReceiverParser) +} diff --git a/pkg/parser/receiver_carbon_test.go b/pkg/parser/receiver_carbon_test.go new file mode 100644 index 000000000..233aedfbc --- /dev/null +++ b/pkg/parser/receiver_carbon_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the Carbon parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_collectd.go b/pkg/parser/receiver_collectd.go new file mode 100644 index 000000000..4591e3b19 --- /dev/null +++ b/pkg/parser/receiver_collectd.go @@ -0,0 +1,17 @@ +package parser + +const parserNameCollectd = "__collectd" + +// NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository +func NewCollectdReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 8081, + parserName: parserNameCollectd, + } +} + +func init() { + Register("collectd", NewCollectdReceiverParser) +} diff --git a/pkg/parser/receiver_collectd_test.go b/pkg/parser/receiver_collectd_test.go new file mode 100644 index 000000000..819392f2a --- /dev/null +++ b/pkg/parser/receiver_collectd_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the Collectd parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_generic.go b/pkg/parser/receiver_generic.go new file mode 100644 index 000000000..caf03d898 --- /dev/null +++ b/pkg/parser/receiver_generic.go @@ -0,0 +1,50 @@ +package parser + +import ( + "context" + + corev1 "k8s.io/api/core/v1" +) + +const parserNameGeneric = "__generic" + +var _ ReceiverParser = &GenericReceiver{} + +// GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly +type GenericReceiver struct { + name string + config map[interface{}]interface{} + defaultPort int32 + parserName string +} + +// NewGenericReceiverParser builds a new parser for generic receivers +func NewGenericReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + parserName: parserNameGeneric, + } +} + +// Ports returns all the service ports for all protocols in this parser +func (g *GenericReceiver) Ports(ctx context.Context) ([]corev1.ServicePort, error) { + port := singlePortFromConfigEndpoint(ctx, g.name, g.config) + if port != nil { + return []corev1.ServicePort{*port}, nil + } + + if g.defaultPort > 0 { + return []corev1.ServicePort{{ + Port: g.defaultPort, + Name: portName(g.name, g.defaultPort), + }}, nil + } + + return []corev1.ServicePort{}, nil +} + +// ParserName returns the name of this parser +func (g *GenericReceiver) ParserName() string { + return g.parserName +} diff --git a/pkg/parser/receiver_generic_test.go b/pkg/parser/receiver_generic_test.go new file mode 100644 index 000000000..6d5ada278 --- /dev/null +++ b/pkg/parser/receiver_generic_test.go @@ -0,0 +1,95 @@ +package parser + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGenericReceiverWithEndpoint(t *testing.T) { + builder := NewGenericReceiverParser("myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.Equal(t, int32(1234), ports[0].Port) +} + +func TestGenericReceiverWithInvalidEndpoint(t *testing.T) { + // there's no parser regitered to handle "myreceiver", so, it falls back to the generic parser + builder := NewGenericReceiverParser("myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0", + }) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 0) +} + +func TestDownstreamParsers(t *testing.T) { + for _, tt := range []struct { + receiverName string + parserName string + parserDefaultPort int32 + builder func(string, map[interface{}]interface{}) ReceiverParser + }{ + {"zipkin", parserNameZipkin, 9411, NewZipkinReceiverParser}, + {"opencensus", parserNameOpenCensus, 55678, NewOpenCensusReceiverParser}, + {"otlp", parserNameOTLP, 55680, NewOTLPReceiverParser}, + + // contrib receivers + {"carbon", parserNameCarbon, 2003, NewCarbonReceiverParser}, + {"collectd", parserNameCollectd, 8081, NewCollectdReceiverParser}, + {"sapm", parserNameSAPM, 7276, NewSAPMReceiverParser}, + {"signalfx", parserNameSignalFx, 7276, NewSignalFxReceiverParser}, + {"wavefront", parserNameWavefront, 2003, NewWavefrontReceiverParser}, + {"zipkin-scribe", parserNameZipkinScribe, 9410, NewZipkinScribeReceiverParser}, + } { + + t.Run("Builder", func(t *testing.T) { + // test + builder := tt.builder(tt.receiverName, map[interface{}]interface{}{}) + + // verify + assert.Equal(t, tt.parserName, builder.ParserName()) + }) + + t.Run("DefaultPort", func(t *testing.T) { + // prepare + builder := tt.builder(tt.receiverName, map[interface{}]interface{}{}) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, tt.parserDefaultPort, ports[0].Port) + assert.Equal(t, tt.receiverName, ports[0].Name) + }) + + t.Run("OverridePort", func(t *testing.T) { + // prepare + builder := tt.builder(tt.receiverName, map[interface{}]interface{}{ + "endpoint": "0.0.0.0:65535", + }) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 65535, ports[0].Port) + assert.Equal(t, tt.receiverName, ports[0].Name) + }) + } +} diff --git a/pkg/parser/receiver_jaeger.go b/pkg/parser/receiver_jaeger.go new file mode 100644 index 000000000..e2cad093d --- /dev/null +++ b/pkg/parser/receiver_jaeger.go @@ -0,0 +1,96 @@ +package parser + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" +) + +var _ ReceiverParser = &JaegerReceiverParser{} + +const ( + parserNameJaeger = "__jaeger" + + defaultGRPCPort int32 = 14250 + defaultThriftHTTPPort int32 = 14268 + defaultThriftCompactPort int32 = 6831 + defaultThriftBinaryPort int32 = 6832 +) + +// JaegerReceiverParser parses the configuration for Jaeger-specific receivers +type JaegerReceiverParser struct { + name string + config map[interface{}]interface{} +} + +// NewJaegerReceiverParser builds a new parser for Jaeger receivers +func NewJaegerReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &JaegerReceiverParser{ + name: name, + config: config, + } +} + +// Ports returns all the service ports for all protocols in this parser +func (j *JaegerReceiverParser) Ports(ctx context.Context) ([]corev1.ServicePort, error) { + ports := []corev1.ServicePort{} + + for _, protocol := range []struct { + name string + defaultPort int32 + }{ + { + name: "grpc", + defaultPort: defaultGRPCPort, + }, + { + name: "thrift_http", + defaultPort: defaultThriftHTTPPort, + }, + { + name: "thrift_compact", + defaultPort: defaultThriftCompactPort, + }, + { + name: "thrift_binary", + defaultPort: defaultThriftBinaryPort, + }, + } { + // do we have the protocol specified at all? + if receiverProtocol, ok := j.config[protocol.name]; ok { + // we have the specified protocol, we definitely need a service port + nameWithProtocol := fmt.Sprintf("%s-%s", j.name, protocol.name) + var protocolPort *corev1.ServicePort + + // do we have a configuration block for the protocol? + settings, ok := receiverProtocol.(map[interface{}]interface{}) + if ok { + protocolPort = singlePortFromConfigEndpoint(ctx, nameWithProtocol, settings) + } + + // have we parsed a port based on the configuration block? + // if not, we use the default port + if protocolPort == nil { + protocolPort = &corev1.ServicePort{ + Name: portName(nameWithProtocol, protocol.defaultPort), + Port: protocol.defaultPort, + } + } + + // at this point, we *have* a port specified, add it to the list of ports + ports = append(ports, *protocolPort) + } + } + + return ports, nil +} + +// ParserName returns the name of this parser +func (j *JaegerReceiverParser) ParserName() string { + return parserNameJaeger +} + +func init() { + Register("jaeger", NewJaegerReceiverParser) +} diff --git a/pkg/parser/receiver_jaeger_test.go b/pkg/parser/receiver_jaeger_test.go new file mode 100644 index 000000000..617444949 --- /dev/null +++ b/pkg/parser/receiver_jaeger_test.go @@ -0,0 +1,86 @@ +package parser + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestJaegerParserRegistration(t *testing.T) { + // verify + assert.Contains(t, registry, "jaeger") +} + +func TestJaegerMinimalReceiverConfiguration(t *testing.T) { + builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + }) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.Equal(t, int32(defaultGRPCPort), ports[0].Port) +} + +func TestJaegerOverrideReceiverProtocolPort(t *testing.T) { + builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, + }) + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.Equal(t, int32(1234), ports[0].Port) +} + +func TestJaegerDefaultPorts(t *testing.T) { + builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "thrift_http": map[interface{}]interface{}{}, + "thrift_compact": map[interface{}]interface{}{}, + "thrift_binary": map[interface{}]interface{}{}, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "jaeger-grpc": {portNumber: defaultGRPCPort}, + "jaeger-thrift-http": {portNumber: defaultThriftHTTPPort}, + "jaeger-thrift-compact": {portNumber: defaultThriftCompactPort}, + "jaeger-thrift-binary": {portNumber: defaultThriftBinaryPort}, + } + + // test + ports, err := builder.Ports(ctxWithLogger) + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 4) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + } + + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} + +func TestJaegerParserName(t *testing.T) { + // test + p := For("jaeger", map[interface{}]interface{}{}) + + // verify + assert.Equal(t, parserNameJaeger, p.ParserName()) +} diff --git a/pkg/parser/receiver_oc.go b/pkg/parser/receiver_oc.go new file mode 100644 index 000000000..c7fbcbdf8 --- /dev/null +++ b/pkg/parser/receiver_oc.go @@ -0,0 +1,17 @@ +package parser + +const parserNameOpenCensus = "__opencensus" + +// NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers +func NewOpenCensusReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 55678, + parserName: parserNameOpenCensus, + } +} + +func init() { + Register("opencensus", NewOpenCensusReceiverParser) +} diff --git a/pkg/parser/receiver_oc_test.go b/pkg/parser/receiver_oc_test.go new file mode 100644 index 000000000..74660ed91 --- /dev/null +++ b/pkg/parser/receiver_oc_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the OpenCensus parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_otlp.go b/pkg/parser/receiver_otlp.go new file mode 100644 index 000000000..e6396d405 --- /dev/null +++ b/pkg/parser/receiver_otlp.go @@ -0,0 +1,17 @@ +package parser + +const parserNameOTLP = "__otlp" + +// NewOTLPReceiverParser builds a new parser for OTLP receivers +func NewOTLPReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 55680, + parserName: parserNameOTLP, + } +} + +func init() { + Register("otlp", NewOTLPReceiverParser) +} diff --git a/pkg/parser/receiver_otlp_test.go b/pkg/parser/receiver_otlp_test.go new file mode 100644 index 000000000..5f45a8640 --- /dev/null +++ b/pkg/parser/receiver_otlp_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the OTLP parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_sapm.go b/pkg/parser/receiver_sapm.go new file mode 100644 index 000000000..fcb911ab5 --- /dev/null +++ b/pkg/parser/receiver_sapm.go @@ -0,0 +1,17 @@ +package parser + +const parserNameSAPM = "__sapm" + +// NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository +func NewSAPMReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 7276, + parserName: parserNameSAPM, + } +} + +func init() { + Register("sapm", NewSAPMReceiverParser) +} diff --git a/pkg/parser/receiver_sapm_test.go b/pkg/parser/receiver_sapm_test.go new file mode 100644 index 000000000..b8b8c31f0 --- /dev/null +++ b/pkg/parser/receiver_sapm_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the SAPM parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_signalfx.go b/pkg/parser/receiver_signalfx.go new file mode 100644 index 000000000..cdea7716f --- /dev/null +++ b/pkg/parser/receiver_signalfx.go @@ -0,0 +1,17 @@ +package parser + +const parserNameSignalFx = "__signalfx" + +// NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository +func NewSignalFxReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 7276, + parserName: parserNameSignalFx, + } +} + +func init() { + Register("signalfx", NewSignalFxReceiverParser) +} diff --git a/pkg/parser/receiver_signalfx_test.go b/pkg/parser/receiver_signalfx_test.go new file mode 100644 index 000000000..1ca3809f5 --- /dev/null +++ b/pkg/parser/receiver_signalfx_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the SignalFx parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_test.go b/pkg/parser/receiver_test.go new file mode 100644 index 000000000..7d90a9852 --- /dev/null +++ b/pkg/parser/receiver_test.go @@ -0,0 +1,145 @@ +package parser + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" +) + +var ( + logger = logf.Log.WithName("unit-tests") + ctxWithLogger = context.WithValue(context.Background(), opentelemetry.ContextLogger, logger) +) + +func TestPortName(t *testing.T) { + for _, tt := range []struct { + candidate string + port int32 + expected string + }{ + { + candidate: "my-receiver", + port: 123, + expected: "my-receiver", + }, + { + candidate: "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", + port: 123, + expected: "port-123", + }, + { + candidate: "my-🦄-receiver", + port: 123, + expected: "port-123", + }, + { + candidate: "-my-receiver", + port: 123, + expected: "port-123", + }, + } { + assert.Equal(t, tt.expected, portName(tt.candidate, tt.port)) + } +} + +func TestReceiverType(t *testing.T) { + for _, tt := range []struct { + name string + expected string + }{ + { + name: "myreceiver", + expected: "myreceiver", + }, + { + name: "myreceiver/custom", + expected: "myreceiver", + }, + } { + // test + typ := receiverType(tt.name) + + // assert + assert.Equal(t, tt.expected, typ) + } +} + +func TestParsePortFromEndpoint(t *testing.T) { + for _, tt := range []struct { + endpoint string + expected int32 + errorExpected bool + }{ + // prepare + {"http://localhost:1234", 1234, false}, + {"0.0.0.0:1234", 1234, false}, + {":1234", 1234, false}, + {"no-port", 0, true}, + } { + + // test + val, err := portFromEndpoint(tt.endpoint) + + // verify + if tt.errorExpected { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + assert.Equal(t, tt.expected, val, "wrong port from endpoint %s: %d", tt.endpoint, val) + } +} + +func TestEndpointInConfigurationIsntString(t *testing.T) { + // prepare + config := map[interface{}]interface{}{ + "endpoint": 123, + } + + // test + p := singlePortFromConfigEndpoint(ctxWithLogger, "myreceiver", config) + + // verify + assert.Nil(t, p) +} + +func TestRetrieveGenericParser(t *testing.T) { + // test + parser := For("myreceiver", map[interface{}]interface{}{}) + + // verify + assert.Equal(t, parserNameGeneric, parser.ParserName()) +} + +func TestRetrieveParserFor(t *testing.T) { + // prepare + builderCalled := false + Register("mock", func(name string, config map[interface{}]interface{}) ReceiverParser { + builderCalled = true + return &mockParser{} + }) + + // test + For("mock", map[interface{}]interface{}{}) + + // verify + assert.True(t, builderCalled) +} + +type mockParser struct { + portsFunc func(context.Context) ([]corev1.ServicePort, error) +} + +func (m *mockParser) Ports(context.Context) ([]corev1.ServicePort, error) { + return nil, nil +} + +func (m *mockParser) ParserName() string { + return "__mock" +} diff --git a/pkg/parser/receiver_wavefront.go b/pkg/parser/receiver_wavefront.go new file mode 100644 index 000000000..86358e28d --- /dev/null +++ b/pkg/parser/receiver_wavefront.go @@ -0,0 +1,17 @@ +package parser + +const parserNameWavefront = "__wavefront" + +// NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository +func NewWavefrontReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 2003, + parserName: parserNameWavefront, + } +} + +func init() { + Register("wavefront", NewWavefrontReceiverParser) +} diff --git a/pkg/parser/receiver_wavefront_test.go b/pkg/parser/receiver_wavefront_test.go new file mode 100644 index 000000000..92b777d00 --- /dev/null +++ b/pkg/parser/receiver_wavefront_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the Wavefront parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_zipkin-scribe.go b/pkg/parser/receiver_zipkin-scribe.go new file mode 100644 index 000000000..b7e0f0fbf --- /dev/null +++ b/pkg/parser/receiver_zipkin-scribe.go @@ -0,0 +1,17 @@ +package parser + +const parserNameZipkinScribe = "__zipkinscribe" + +// NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers +func NewZipkinScribeReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 9410, + parserName: parserNameZipkinScribe, + } +} + +func init() { + Register("zipkin-scribe", NewZipkinScribeReceiverParser) +} diff --git a/pkg/parser/receiver_zipkin-scribe_test.go b/pkg/parser/receiver_zipkin-scribe_test.go new file mode 100644 index 000000000..714dac773 --- /dev/null +++ b/pkg/parser/receiver_zipkin-scribe_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the ZipkinScribe parser are currently part of the test TestDownstreamParsers diff --git a/pkg/parser/receiver_zipkin.go b/pkg/parser/receiver_zipkin.go new file mode 100644 index 000000000..7c45edb5c --- /dev/null +++ b/pkg/parser/receiver_zipkin.go @@ -0,0 +1,17 @@ +package parser + +const parserNameZipkin = "__zipkin" + +// NewZipkinReceiverParser builds a new parser for Zipkin receivers +func NewZipkinReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + name: name, + config: config, + defaultPort: 9411, + parserName: parserNameZipkin, + } +} + +func init() { + Register("zipkin", NewZipkinReceiverParser) +} diff --git a/pkg/parser/receiver_zipkin_test.go b/pkg/parser/receiver_zipkin_test.go new file mode 100644 index 000000000..c532a2575 --- /dev/null +++ b/pkg/parser/receiver_zipkin_test.go @@ -0,0 +1,3 @@ +package parser + +// all tests for the Zipkin parser are currently part of the test TestDownstreamParsers From f5bf135ff694d9272598dfceb5ae083c14698e70 Mon Sep 17 00:00:00 2001 From: Gary Brown Date: Wed, 24 Jun 2020 11:11:45 +0100 Subject: [PATCH 0049/1234] Fix signalfx default port (#26) Signed-off-by: Gary Brown --- pkg/parser/receiver_generic_test.go | 2 +- pkg/parser/receiver_signalfx.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/parser/receiver_generic_test.go b/pkg/parser/receiver_generic_test.go index 6d5ada278..1d4e88e29 100644 --- a/pkg/parser/receiver_generic_test.go +++ b/pkg/parser/receiver_generic_test.go @@ -49,7 +49,7 @@ func TestDownstreamParsers(t *testing.T) { {"carbon", parserNameCarbon, 2003, NewCarbonReceiverParser}, {"collectd", parserNameCollectd, 8081, NewCollectdReceiverParser}, {"sapm", parserNameSAPM, 7276, NewSAPMReceiverParser}, - {"signalfx", parserNameSignalFx, 7276, NewSignalFxReceiverParser}, + {"signalfx", parserNameSignalFx, 9943, NewSignalFxReceiverParser}, {"wavefront", parserNameWavefront, 2003, NewWavefrontReceiverParser}, {"zipkin-scribe", parserNameZipkinScribe, 9410, NewZipkinScribeReceiverParser}, } { diff --git a/pkg/parser/receiver_signalfx.go b/pkg/parser/receiver_signalfx.go index cdea7716f..f4f5ec758 100644 --- a/pkg/parser/receiver_signalfx.go +++ b/pkg/parser/receiver_signalfx.go @@ -7,7 +7,7 @@ func NewSignalFxReceiverParser(name string, config map[interface{}]interface{}) return &GenericReceiver{ name: name, config: config, - defaultPort: 7276, + defaultPort: 9943, parserName: parserNameSignalFx, } } From 396310f27c923d8e047261e86b97117c1935015b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 24 Jun 2020 16:59:39 +0200 Subject: [PATCH 0050/1234] Follow-up fixes to the 'derive ports from config' feature (#27) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- pkg/adapters/config_to_ports.go | 4 ++-- pkg/adapters/config_to_ports_test.go | 14 ++++++++------ pkg/parser/receiver.go | 2 +- pkg/parser/receiver_jaeger.go | 9 ++++++++- pkg/parser/receiver_jaeger_test.go | 20 +++++++++++++------- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/pkg/adapters/config_to_ports.go b/pkg/adapters/config_to_ports.go index f89286671..ba7f76002 100644 --- a/pkg/adapters/config_to_ports.go +++ b/pkg/adapters/config_to_ports.go @@ -51,8 +51,8 @@ func ConfigToReceiverPorts(ctx context.Context, config map[interface{}]interface for key, val := range receivers { receiver, ok := val.(map[interface{}]interface{}) if !ok { - logger.Info("receiver doesn't seem to be a map of properties") - continue + logger.Info("receiver doesn't seem to be a map of properties", "receiver", key) + receiver = map[interface{}]interface{}{} } rcvrName := key.(string) diff --git a/pkg/adapters/config_to_ports_test.go b/pkg/adapters/config_to_ports_test.go index 8fcdfe1ea..e877bb5b1 100644 --- a/pkg/adapters/config_to_ports_test.go +++ b/pkg/adapters/config_to_ports_test.go @@ -34,13 +34,15 @@ func TestExtractPortsFromConfig(t *testing.T) { examplereceiver/without-endpoint: notendpoint: "0.0.0.0:12347" jaeger: - grpc: - thrift_compact: - thrift_binary: - endpoint: 0.0.0.0:6833 + protocols: + grpc: + thrift_compact: + thrift_binary: + endpoint: 0.0.0.0:6833 jaeger/custom: - thrift_http: - endpoint: 0.0.0.0:15268 + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 ` // test diff --git a/pkg/parser/receiver.go b/pkg/parser/receiver.go index e8c35e11b..7d6a3fcec 100644 --- a/pkg/parser/receiver.go +++ b/pkg/parser/receiver.go @@ -59,7 +59,7 @@ func singlePortFromConfigEndpoint(ctx context.Context, name string, config map[i logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) endpoint, ok := config["endpoint"] if !ok { - logger.Info("receiver doesn't have an endpoint") + logger.V(2).Info("receiver doesn't have an endpoint") return nil } diff --git a/pkg/parser/receiver_jaeger.go b/pkg/parser/receiver_jaeger.go index e2cad093d..39b168e2d 100644 --- a/pkg/parser/receiver_jaeger.go +++ b/pkg/parser/receiver_jaeger.go @@ -26,9 +26,16 @@ type JaegerReceiverParser struct { // NewJaegerReceiverParser builds a new parser for Jaeger receivers func NewJaegerReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { + if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { + return &JaegerReceiverParser{ + name: name, + config: protocols, + } + } + return &JaegerReceiverParser{ name: name, - config: config, + config: map[interface{}]interface{}{}, } } diff --git a/pkg/parser/receiver_jaeger_test.go b/pkg/parser/receiver_jaeger_test.go index 617444949..e75bb3f5c 100644 --- a/pkg/parser/receiver_jaeger_test.go +++ b/pkg/parser/receiver_jaeger_test.go @@ -13,7 +13,9 @@ func TestJaegerParserRegistration(t *testing.T) { func TestJaegerMinimalReceiverConfiguration(t *testing.T) { builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + }, }) // test @@ -27,8 +29,10 @@ func TestJaegerMinimalReceiverConfiguration(t *testing.T) { func TestJaegerOverrideReceiverProtocolPort(t *testing.T) { builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, }, }) @@ -43,10 +47,12 @@ func TestJaegerOverrideReceiverProtocolPort(t *testing.T) { func TestJaegerDefaultPorts(t *testing.T) { builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "thrift_http": map[interface{}]interface{}{}, - "thrift_compact": map[interface{}]interface{}{}, - "thrift_binary": map[interface{}]interface{}{}, + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "thrift_http": map[interface{}]interface{}{}, + "thrift_compact": map[interface{}]interface{}{}, + "thrift_binary": map[interface{}]interface{}{}, + }, }) expectedResults := map[string]struct { From 0d0cc215308d7190653f2aa02b55a69496a1957a Mon Sep 17 00:00:00 2001 From: OpenTelemetry Operator Release Date: Mon, 17 Aug 2020 14:27:08 +0200 Subject: [PATCH 0051/1234] Release v0.2.0 --- ...operator.v0.2.0.clusterserviceversion.yaml | 206 +++ ...emetry.io_opentelemetrycollectors_crd.yaml | 1400 +++++++++++++++++ .../opentelemetry-operator.package.yaml | 2 +- deploy/operator.yaml | 2 +- opentelemetry.version | 2 +- 5 files changed, 1609 insertions(+), 3 deletions(-) create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml create mode 100644 deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml diff --git a/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml b/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml new file mode 100644 index 000000000..55f155ede --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml @@ -0,0 +1,206 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "opentelemetry.io/v1alpha1", + "kind": "OpenTelemetryCollector", + "metadata": { + "name": "simplest" + }, + "spec": { + "config": "receivers:\n jaeger:\n\nprocessors:\n queued-retry:\n\nexporters:\n logging:\n\npipelines:\n traces:\n receivers: [jaeger]\n processors: [queued-retry]\n exporters: [logging]\n" + } + } + ] + capabilities: Basic Install + name: opentelemetry-operator.v0.2.0 + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + displayName: OpenTelemetry Collector + kind: OpenTelemetryCollector + name: opentelemetrycollectors.opentelemetry.io + specDescriptors: + - description: Args is the set of arguments to pass to the OpenTelemetry Collector + binary + displayName: Args + path: args + - description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. + displayName: Config + path: config + - description: Image indicates the container image to use for the OpenTelemetry + Collector. + displayName: Image + path: image + - description: Mode represents how the collector should be deployed (deployment + vs. daemonset) + displayName: Mode + path: mode + - description: Ports allows a set of ports to be exposed by the underlying v1.Service. + By default, the operator will attempt to infer the required ports by parsing + the .Spec.Config property but this property can be used to open aditional + ports that can't be inferred by the operator, like for custom receivers. + displayName: Ports + path: ports + - description: Replicas is the number of pod instances for the underlying OpenTelemetry + Collector + displayName: Replicas + path: replicas + - description: ServiceAccount indicates the name of an existing service account + to use with this instance. + displayName: Service Account + path: serviceAccount + - description: VolumeMounts represents the mount points to use in the underlying + collector deployment(s) + displayName: Volume Mounts + path: volumeMounts + - description: Volumes represents which volumes to use in the underlying collector + deployment(s). + displayName: Volumes + path: volumes + version: v1alpha1 + description: Placeholder description + displayName: Opentelemetry Operator + install: + spec: + deployments: + - name: opentelemetry-operator + spec: + replicas: 1 + selector: + matchLabels: + name: opentelemetry-operator + strategy: {} + template: + metadata: + labels: + name: opentelemetry-operator + spec: + containers: + - command: + - opentelemetry-operator + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: OPERATOR_NAME + value: opentelemetry-operator + image: quay.io/opentelemetry/opentelemetry-operator:v0.2.0 + imagePullPolicy: Always + name: opentelemetry-operator + resources: {} + serviceAccountName: opentelemetry-operator + permissions: + - rules: + - apiGroups: + - "" + resources: + - pods + - services + - services/finalizers + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments + - daemonsets + - replicasets + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - get + - create + - apiGroups: + - apps + resourceNames: + - opentelemetry-operator + resources: + - deployments/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - apps + resources: + - replicasets + - deployments + verbs: + - get + - apiGroups: + - opentelemetry.io + resources: + - '*' + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + serviceAccountName: opentelemetry-operator + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - tracing + - distributed tracing + - monitoring + - troubleshooting + maintainers: + - email: juraci.github@kroehling.de + name: Juraci Paixão Kröhling + maturity: alpha + provider: + name: OpenTelemetry + replaces: opentelemetry-operator.v0.0.2 + version: 0.2.0 diff --git a/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml new file mode 100644 index 000000000..db5129cfe --- /dev/null +++ b/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml @@ -0,0 +1,1400 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: opentelemetrycollectors.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors + shortNames: + - otelcol + - otelcols + singular: opentelemetrycollector + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + mode: + description: Mode represents how the collector should be deployed + (deployment vs. daemonset) + enum: + - daemonset + - deployment + type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open aditional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and http://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + Field can be enabled with ServiceAppProtocol feature gate. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is + exposed when type=NodePort or LoadBalancer. Usually assigned + by the system. If specified, it will be allocated to the service + if unused or else creation of the service will fail. Default + is to auto-allocate a port if the ServiceType of this Service + requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph + monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the + Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the ConfigMap, the volume setup will error unless it is + marked optional. Paths must be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to + the associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for + this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for + this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the + plugin scripts. This may be empty if no secret object + is specified. If the secret object contains more than + one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or + start with '..'. If '.' is supplied, the volume directory + will be the git repository. Otherwise, if specified, + the volume will contain the git repository in the subdirectory + with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: information about the configMap data + to project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to + project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose + name is the key and content is the value. If + specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use + on this file, must be a value between + 0 and 0777. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. The kubelet will + start trying to rotate the token if the token + is older than 80 percent of its time to live + or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no + group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with + Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the + protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the + ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the + Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must + be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name to + override the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector + properties: + replicas: + format: int32 + type: integer + version: + type: string + required: + - replicas + - version + type: object + type: object + served: true + storage: true + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} diff --git a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml index 0d59dd5d5..374263bec 100644 --- a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml +++ b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml @@ -1,5 +1,5 @@ channels: -- currentCSV: opentelemetry-operator.v0.0.2 +- currentCSV: opentelemetry-operator.v0.2.0 name: alpha defaultChannel: alpha packageName: opentelemetry-operator diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 915eb50c5..b930e37d8 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: opentelemetry-operator containers: - name: opentelemetry-operator - image: quay.io/opentelemetry/opentelemetry-operator:v0.0.2 + image: quay.io/opentelemetry/opentelemetry-operator:v0.2.0 command: - opentelemetry-operator imagePullPolicy: Always diff --git a/opentelemetry.version b/opentelemetry.version index a468e3823..62cab1277 100644 --- a/opentelemetry.version +++ b/opentelemetry.version @@ -6,4 +6,4 @@ opentelemetry-collector=0.2.0 # DO NOT EDIT the next value, it is updated automatically during the release. # Represents the current (latest) release of the OpenTelemetry Operator. -operator=0.0.2 +operator=0.2.0 From 8d336cc82b2fd40ba232dbf0b79b5535d4a54394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 19 Aug 2020 10:02:53 +0200 Subject: [PATCH 0052/1234] Migrated to Operator SDK 0.19 (#31) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/build-container.sh | 17 - .ci/format.sh | 12 - .ci/generate.sh | 55 - .ci/lint.sh | 16 - .ci/publish-images.sh | 49 - .ci/release.sh | 68 - .ci/script.sh | 14 - .ci/upload-test-coverage.sh | 3 - .codecov.yml | 3 - .github/workflows/continuous-integration.yaml | 10 +- .gitignore | 85 +- CONTRIBUTING.md | 61 - Dockerfile | 27 + Makefile | 247 +-- PROJECT | 10 + README.md | 37 +- api/v1alpha1/groupversion_info.go | 34 + api/v1alpha1/mode.go | 29 + .../v1alpha1/opentelemetrycollector_types.go | 34 +- .../v1alpha1/zz_generated.deepcopy.go | 22 +- build/Dockerfile | 12 - cmd/manager/empty_test.go | 2 - cmd/manager/main.go | 235 --- config/certmanager/certificate.yaml | 26 + config/certmanager/kustomization.yaml | 5 + config/certmanager/kustomizeconfig.yaml | 16 + ...ntelemetry.io_opentelemetrycollectors.yaml | 1396 ++++++++++++++++ config/crd/kustomization.yaml | 21 + config/crd/kustomizeconfig.yaml | 17 + ...ainjection_in_opentelemetrycollectors.yaml | 8 + .../webhook_in_opentelemetrycollectors.yaml | 17 + config/default/kustomization.yaml | 70 + config/default/manager_auth_proxy_patch.yaml | 25 + config/default/manager_webhook_patch.yaml | 23 + config/default/webhookcainjection_patch.yaml | 15 + config/manager/kustomization.yaml | 2 + config/manager/manager.yaml | 39 + config/prometheus/kustomization.yaml | 2 + config/prometheus/monitor.yaml | 16 + .../rbac/auth_proxy_client_clusterrole.yaml | 7 + config/rbac/auth_proxy_role.yaml | 13 + config/rbac/auth_proxy_role_binding.yaml | 12 + config/rbac/auth_proxy_service.yaml | 14 + config/rbac/kustomization.yaml | 12 + config/rbac/leader_election_role.yaml | 33 + .../rbac/leader_election_role_binding.yaml | 15 +- ...operator.v0.2.0.clusterserviceversion.yaml | 0 ...emetry.io_opentelemetrycollectors_crd.yaml | 0 .../opentelemetrycollector_editor_role.yaml | 24 + .../opentelemetrycollector_viewer_role.yaml | 20 + config/rbac/role.yaml | 40 + config/rbac/role_binding.yaml | 12 + .../core_v1alpha1_opentelemetrycollector.yaml | 5 +- config/samples/kustomization.yaml | 3 + config/webhook/kustomization.yaml | 6 + config/webhook/kustomizeconfig.yaml | 25 + config/webhook/service.yaml | 12 + .../opentelemetrycollector_controller.go | 156 ++ .../opentelemetrycollector_controller_test.go | 229 +++ controllers/suite_test.go | 79 + deploy/crds/simplest.yaml | 20 - ...operator.v0.0.1.clusterserviceversion.yaml | 127 -- ...try_v1alpha1_opentelemetryservice_crd.yaml | 38 - ...operator.v0.0.2.clusterserviceversion.yaml | 168 -- ...emetry.io_opentelemetrycollectors_crd.yaml | 86 - ...emetry.io_opentelemetrycollectors_crd.yaml | 1400 ----------------- .../opentelemetry-operator.package.yaml | 5 - deploy/operator.yaml | 32 - deploy/role.yaml | 80 - deploy/service_account.yaml | 4 - examples/business-application.yaml | 32 - examples/daemonset.yaml | 21 - examples/with-volumes.yaml | 30 - go.mod | 23 +- go.sum | 1255 +-------------- hack/boilerplate.go.txt | 13 + hack/install-kubebuilder.sh | 7 + internal/config/main.go | 64 + {pkg => internal}/version/main.go | 13 +- internal/version/main_test.go | 23 + internal/version/version_suite_test.go | 13 + main.go | 136 ++ pkg/adapters/config_from.go | 42 - pkg/adapters/config_from_test.go | 52 - pkg/adapters/config_to_ports_test.go | 177 --- .../addtoscheme_opentelemetry_v1alpha1.go | 10 - pkg/apis/apis.go | 13 - pkg/apis/empty_test.go | 2 - pkg/apis/opentelemetry/const.go | 32 - pkg/apis/opentelemetry/empty_test.go | 2 - pkg/apis/opentelemetry/flagset.go | 42 - pkg/apis/opentelemetry/v1alpha1/doc.go | 4 - pkg/apis/opentelemetry/v1alpha1/empty_test.go | 2 - pkg/apis/opentelemetry/v1alpha1/register.go | 17 - .../v1alpha1/zz_generated.openapi.go | 209 --- pkg/client/clientset.go | 40 - pkg/client/versioned/clientset.go | 82 - pkg/client/versioned/doc.go | 4 - .../versioned/fake/clientset_generated.go | 67 - pkg/client/versioned/fake/doc.go | 4 - pkg/client/versioned/fake/register.go | 41 - pkg/client/versioned/scheme/doc.go | 4 - pkg/client/versioned/scheme/register.go | 41 - .../typed/opentelemetry/v1alpha1/doc.go | 4 - .../typed/opentelemetry/v1alpha1/fake/doc.go | 4 - .../fake/fake_opentelemetry_client.go | 25 - .../fake/fake_opentelemetrycollector.go | 127 -- .../v1alpha1/generated_expansion.go | 5 - .../v1alpha1/opentelemetry_client.go | 74 - .../v1alpha1/opentelemetrycollector.go | 180 --- pkg/collector/adapters/adapters_suite_test.go | 13 + pkg/collector/adapters/config_from.go | 23 + pkg/collector/adapters/config_from_test.go | 28 + .../adapters/config_to_ports.go | 12 +- .../adapters/config_to_ports_test.go | 169 ++ pkg/collector/labels.go | 39 + pkg/collector/parser/parser_suite_test.go | 13 + pkg/{ => collector}/parser/receiver.go | 20 +- pkg/{ => collector}/parser/receiver_carbon.go | 5 +- .../parser/receiver_carbon_test.go | 0 .../parser/receiver_collectd.go | 5 +- .../parser/receiver_collectd_test.go | 0 .../parser/receiver_generic.go | 11 +- pkg/collector/parser/receiver_generic_test.go | 100 ++ pkg/{ => collector}/parser/receiver_jaeger.go | 10 +- pkg/collector/parser/receiver_jaeger_test.go | 101 ++ pkg/{ => collector}/parser/receiver_oc.go | 5 +- .../parser/receiver_oc_test.go | 0 pkg/{ => collector}/parser/receiver_otlp.go | 5 +- .../parser/receiver_otlp_test.go | 0 pkg/{ => collector}/parser/receiver_sapm.go | 5 +- .../parser/receiver_sapm_test.go | 0 .../parser/receiver_signalfx.go | 5 +- .../parser/receiver_signalfx_test.go | 0 pkg/collector/parser/receiver_test.go | 100 ++ .../parser/receiver_wavefront.go | 5 +- .../parser/receiver_wavefront_test.go | 0 .../parser/receiver_zipkin-scribe.go | 5 +- .../parser/receiver_zipkin-scribe_test.go | 0 pkg/{ => collector}/parser/receiver_zipkin.go | 5 +- .../parser/receiver_zipkin_test.go | 0 pkg/collector/reconcile/configmap.go | 148 ++ pkg/collector/reconcile/daemonset.go | 225 +++ pkg/collector/reconcile/deployment.go | 225 +++ pkg/collector/reconcile/params.go | 33 + pkg/collector/reconcile/service.go | 273 ++++ pkg/collector/reconcile/serviceaccount.go | 152 ++ pkg/collector/upgrade/upgrade.go | 81 + pkg/collector/upgrade/upgrade_suite_test.go | 57 + pkg/collector/upgrade/upgrade_test.go | 56 + pkg/collector/upgrade/v0_2_0.go | 13 + pkg/collector/upgrade/versions.go | 35 + pkg/controller/add_opentelemetrycollector.go | 10 - pkg/controller/controller.go | 18 - pkg/controller/empty_test.go | 2 - .../opentelemetrycollector/labels.go | 29 - .../opentelemetrycollector/labels_test.go | 52 - .../opentelemetrycollector/main_test.go | 53 - .../opentelemetrycollector_controller.go | 42 - .../opentelemetrycollector/reconcile.go | 147 -- .../reconcile_configmap.go | 140 -- .../reconcile_configmap_test.go | 115 -- .../reconcile_daemonset.go | 213 --- .../reconcile_daemonset_test.go | 206 --- .../reconcile_deployment.go | 227 --- .../reconcile_deployment_test.go | 230 --- .../reconcile_service.go | 267 ---- .../reconcile_service_test.go | 275 ---- .../reconcile_serviceaccount.go | 148 -- .../reconcile_serviceaccount_test.go | 170 -- .../reconcile_servicemonitor.go | 158 -- .../reconcile_servicemonitor_test.go | 120 -- .../opentelemetrycollector/reconcile_test.go | 186 --- .../opentelemetrycollector/upgrade.go | 43 - .../opentelemetrycollector/upgrade_test.go | 42 - pkg/parser/receiver_generic_test.go | 95 -- pkg/parser/receiver_jaeger_test.go | 92 -- pkg/parser/receiver_test.go | 145 -- pkg/upgrade/upgrade.go | 72 - pkg/upgrade/upgrade_test.go | 84 - pkg/upgrade/v0_2_0.go | 12 - pkg/upgrade/versions.go | 30 - pkg/version/main_test.go | 19 - tools.go | 3 - opentelemetry.version => versions.txt | 0 185 files changed, 4950 insertions(+), 8870 deletions(-) delete mode 100755 .ci/build-container.sh delete mode 100755 .ci/format.sh delete mode 100755 .ci/generate.sh delete mode 100755 .ci/lint.sh delete mode 100755 .ci/publish-images.sh delete mode 100755 .ci/release.sh delete mode 100755 .ci/script.sh delete mode 100755 .ci/upload-test-coverage.sh delete mode 100644 .codecov.yml delete mode 100644 CONTRIBUTING.md create mode 100644 Dockerfile create mode 100644 PROJECT create mode 100644 api/v1alpha1/groupversion_info.go create mode 100644 api/v1alpha1/mode.go rename {pkg/apis/opentelemetry => api}/v1alpha1/opentelemetrycollector_types.go (83%) rename {pkg/apis/opentelemetry => api}/v1alpha1/zz_generated.deepcopy.go (85%) delete mode 100644 build/Dockerfile delete mode 100644 cmd/manager/empty_test.go delete mode 100644 cmd/manager/main.go create mode 100644 config/certmanager/certificate.yaml create mode 100644 config/certmanager/kustomization.yaml create mode 100644 config/certmanager/kustomizeconfig.yaml create mode 100644 config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml create mode 100644 config/crd/kustomization.yaml create mode 100644 config/crd/kustomizeconfig.yaml create mode 100644 config/crd/patches/cainjection_in_opentelemetrycollectors.yaml create mode 100644 config/crd/patches/webhook_in_opentelemetrycollectors.yaml create mode 100644 config/default/kustomization.yaml create mode 100644 config/default/manager_auth_proxy_patch.yaml create mode 100644 config/default/manager_webhook_patch.yaml create mode 100644 config/default/webhookcainjection_patch.yaml create mode 100644 config/manager/kustomization.yaml create mode 100644 config/manager/manager.yaml create mode 100644 config/prometheus/kustomization.yaml create mode 100644 config/prometheus/monitor.yaml create mode 100644 config/rbac/auth_proxy_client_clusterrole.yaml create mode 100644 config/rbac/auth_proxy_role.yaml create mode 100644 config/rbac/auth_proxy_role_binding.yaml create mode 100644 config/rbac/auth_proxy_service.yaml create mode 100644 config/rbac/kustomization.yaml create mode 100644 config/rbac/leader_election_role.yaml rename deploy/role_binding.yaml => config/rbac/leader_election_role_binding.yaml (61%) rename {deploy => config/rbac}/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml (100%) rename {deploy/crds => config/rbac/olm-catalog/opentelemetry-operator/0.2.0}/opentelemetry.io_opentelemetrycollectors_crd.yaml (100%) create mode 100644 config/rbac/opentelemetrycollector_editor_role.yaml create mode 100644 config/rbac/opentelemetrycollector_viewer_role.yaml create mode 100644 config/rbac/role.yaml create mode 100644 config/rbac/role_binding.yaml rename examples/simplest.yaml => config/samples/core_v1alpha1_opentelemetrycollector.yaml (81%) create mode 100644 config/samples/kustomization.yaml create mode 100644 config/webhook/kustomization.yaml create mode 100644 config/webhook/kustomizeconfig.yaml create mode 100644 config/webhook/service.yaml create mode 100644 controllers/opentelemetrycollector_controller.go create mode 100644 controllers/opentelemetrycollector_controller_test.go create mode 100644 controllers/suite_test.go delete mode 100644 deploy/crds/simplest.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml delete mode 100644 deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml delete mode 100644 deploy/operator.yaml delete mode 100644 deploy/role.yaml delete mode 100644 deploy/service_account.yaml delete mode 100644 examples/business-application.yaml delete mode 100644 examples/daemonset.yaml delete mode 100644 examples/with-volumes.yaml create mode 100644 hack/boilerplate.go.txt create mode 100755 hack/install-kubebuilder.sh create mode 100644 internal/config/main.go rename {pkg => internal}/version/main.go (69%) create mode 100644 internal/version/main_test.go create mode 100644 internal/version/version_suite_test.go create mode 100644 main.go delete mode 100644 pkg/adapters/config_from.go delete mode 100644 pkg/adapters/config_from_test.go delete mode 100644 pkg/adapters/config_to_ports_test.go delete mode 100644 pkg/apis/addtoscheme_opentelemetry_v1alpha1.go delete mode 100644 pkg/apis/apis.go delete mode 100644 pkg/apis/empty_test.go delete mode 100644 pkg/apis/opentelemetry/const.go delete mode 100644 pkg/apis/opentelemetry/empty_test.go delete mode 100644 pkg/apis/opentelemetry/flagset.go delete mode 100644 pkg/apis/opentelemetry/v1alpha1/doc.go delete mode 100644 pkg/apis/opentelemetry/v1alpha1/empty_test.go delete mode 100644 pkg/apis/opentelemetry/v1alpha1/register.go delete mode 100644 pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go delete mode 100644 pkg/client/clientset.go delete mode 100644 pkg/client/versioned/clientset.go delete mode 100644 pkg/client/versioned/doc.go delete mode 100644 pkg/client/versioned/fake/clientset_generated.go delete mode 100644 pkg/client/versioned/fake/doc.go delete mode 100644 pkg/client/versioned/fake/register.go delete mode 100644 pkg/client/versioned/scheme/doc.go delete mode 100644 pkg/client/versioned/scheme/register.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go delete mode 100644 pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go create mode 100644 pkg/collector/adapters/adapters_suite_test.go create mode 100644 pkg/collector/adapters/config_from.go create mode 100644 pkg/collector/adapters/config_from_test.go rename pkg/{ => collector}/adapters/config_to_ports.go (84%) create mode 100644 pkg/collector/adapters/config_to_ports_test.go create mode 100644 pkg/collector/labels.go create mode 100644 pkg/collector/parser/parser_suite_test.go rename pkg/{ => collector}/parser/receiver.go (83%) rename pkg/{ => collector}/parser/receiver_carbon.go (66%) rename pkg/{ => collector}/parser/receiver_carbon_test.go (100%) rename pkg/{ => collector}/parser/receiver_collectd.go (67%) rename pkg/{ => collector}/parser/receiver_collectd_test.go (100%) rename pkg/{ => collector}/parser/receiver_generic.go (75%) create mode 100644 pkg/collector/parser/receiver_generic_test.go rename pkg/{ => collector}/parser/receiver_jaeger.go (87%) create mode 100644 pkg/collector/parser/receiver_jaeger_test.go rename pkg/{ => collector}/parser/receiver_oc.go (65%) rename pkg/{ => collector}/parser/receiver_oc_test.go (100%) rename pkg/{ => collector}/parser/receiver_otlp.go (63%) rename pkg/{ => collector}/parser/receiver_otlp_test.go (100%) rename pkg/{ => collector}/parser/receiver_sapm.go (65%) rename pkg/{ => collector}/parser/receiver_sapm_test.go (100%) rename pkg/{ => collector}/parser/receiver_signalfx.go (67%) rename pkg/{ => collector}/parser/receiver_signalfx_test.go (100%) create mode 100644 pkg/collector/parser/receiver_test.go rename pkg/{ => collector}/parser/receiver_wavefront.go (67%) rename pkg/{ => collector}/parser/receiver_wavefront_test.go (100%) rename pkg/{ => collector}/parser/receiver_zipkin-scribe.go (66%) rename pkg/{ => collector}/parser/receiver_zipkin-scribe_test.go (100%) rename pkg/{ => collector}/parser/receiver_zipkin.go (64%) rename pkg/{ => collector}/parser/receiver_zipkin_test.go (100%) create mode 100644 pkg/collector/reconcile/configmap.go create mode 100644 pkg/collector/reconcile/daemonset.go create mode 100644 pkg/collector/reconcile/deployment.go create mode 100644 pkg/collector/reconcile/params.go create mode 100644 pkg/collector/reconcile/service.go create mode 100644 pkg/collector/reconcile/serviceaccount.go create mode 100644 pkg/collector/upgrade/upgrade.go create mode 100644 pkg/collector/upgrade/upgrade_suite_test.go create mode 100644 pkg/collector/upgrade/upgrade_test.go create mode 100644 pkg/collector/upgrade/v0_2_0.go create mode 100644 pkg/collector/upgrade/versions.go delete mode 100644 pkg/controller/add_opentelemetrycollector.go delete mode 100644 pkg/controller/controller.go delete mode 100644 pkg/controller/empty_test.go delete mode 100644 pkg/controller/opentelemetrycollector/labels.go delete mode 100644 pkg/controller/opentelemetrycollector/labels_test.go delete mode 100644 pkg/controller/opentelemetrycollector/main_test.go delete mode 100644 pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_configmap.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_configmap_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_daemonset.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_deployment.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_deployment_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_service.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_service_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go delete mode 100644 pkg/controller/opentelemetrycollector/reconcile_test.go delete mode 100644 pkg/controller/opentelemetrycollector/upgrade.go delete mode 100644 pkg/controller/opentelemetrycollector/upgrade_test.go delete mode 100644 pkg/parser/receiver_generic_test.go delete mode 100644 pkg/parser/receiver_jaeger_test.go delete mode 100644 pkg/parser/receiver_test.go delete mode 100644 pkg/upgrade/upgrade.go delete mode 100644 pkg/upgrade/upgrade_test.go delete mode 100644 pkg/upgrade/v0_2_0.go delete mode 100644 pkg/upgrade/versions.go delete mode 100644 pkg/version/main_test.go delete mode 100644 tools.go rename opentelemetry.version => versions.txt (100%) diff --git a/.ci/build-container.sh b/.ci/build-container.sh deleted file mode 100755 index f1971afe0..000000000 --- a/.ci/build-container.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -if [ -z "${BUILD_IMAGE}" ]; then - echo "Build image not provided" - exit 1 -fi - -command -v "buildah" > /dev/null -if [ $? = 0 ]; then - echo "Using buildah" > build/_output/build-container.log - CMD="buildah bud" -else - echo "Using Docker" > build/_output/build-container.log - CMD="docker" -fi - -${CMD} -f build/Dockerfile -t ${BUILD_IMAGE} . >> build/_output/build-container.log 2>&1 \ No newline at end of file diff --git a/.ci/format.sh b/.ci/format.sh deleted file mode 100755 index 3f8fe66e4..000000000 --- a/.ci/format.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -GOFMT=goimports - -command -v ${GOFMT} > /dev/null -if [ $? != 0 ]; then - if [ -n "${GOPATH}" ]; then - GOFMT="${GOPATH}/bin/goimports" - fi -fi - -${GOFMT} -local "github.com/open-telemetry/opentelemetry-operator" -l -w $(git ls-files "*\.go" | grep -v vendor) diff --git a/.ci/generate.sh b/.ci/generate.sh deleted file mode 100755 index 2f429e571..000000000 --- a/.ci/generate.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -OPENAPIGEN=openapi-gen -command -v ${OPENAPIGEN} > /dev/null -if [ $? != 0 ]; then - if [ -n ${GOPATH} ]; then - OPENAPIGEN="${GOPATH}/bin/openapi-gen" - fi -fi - -CLIENTGEN=client-gen -command -v ${OPENAPIGEN} > /dev/null -if [ $? != 0 ]; then - if [ -n ${GOPATH} ]; then - CLIENTGEN="${GOPATH}/bin/client-gen" - fi -fi - -# generate the Kubernetes stubs -operator-sdk generate k8s -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to generate the Kubernetes stubs." - exit ${RT} -fi - -# generate the CRD(s) -operator-sdk generate crds -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to generate CRDs." - exit ${RT} -fi - -# generate the schema validation (openapi) stubs -${OPENAPIGEN} --logtostderr=true -o "" -i ./pkg/apis/opentelemetry/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/opentelemetry/v1alpha1 -h /dev/null -r "-" -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to generate the openapi (schema validation) stubs." - exit ${RT} -fi - -# generate the clients -${CLIENTGEN} \ - --input "opentelemetry/v1alpha1" \ - --input-base github.com/open-telemetry/opentelemetry-operator/pkg/apis \ - --go-header-file /dev/null \ - --output-package github.com/open-telemetry/opentelemetry-operator/pkg/client \ - --clientset-name versioned \ - --output-base ../../../ -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to generate the OpenTelemetry Operator clients." - exit ${RT} -fi diff --git a/.ci/lint.sh b/.ci/lint.sh deleted file mode 100755 index c043be5c8..000000000 --- a/.ci/lint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -GOLINT=golint - -command -v ${GOLINT} > /dev/null -if [ $? != 0 ]; then - if [ -n ${GOPATH} ]; then - GOLINT="${GOPATH}/bin/golint" - fi -fi - -out=$(${GOLINT} ./...) -if [[ $out ]]; then - echo "$out" - exit 1 -fi \ No newline at end of file diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh deleted file mode 100755 index d227aced9..000000000 --- a/.ci/publish-images.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"opentelemetry/opentelemetry-operator"} -OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags)} - -## if we are on a release tag, let's extract the version number -## the other possible value, currently, is 'master' (or another branch name) -## if we are not running in the CI, it fallsback to the `git describe` above -if [[ $OPERATOR_VERSION == v* ]]; then - OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)") - MAJOR_MINOR=$(echo ${OPERATOR_VERSION} | awk -F. '{print $1"."$2}') -fi - -BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} - -echo "Building image ${BUILD_IMAGE}" -make install-tools build container BUILD_IMAGE="${BUILD_IMAGE}" -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to build the operator's container image." - exit ${RT} -fi - -if [ -n "${MAJOR_MINOR}" ]; then - MAJOR_MINOR_IMAGE="${BASE_BUILD_IMAGE}:${MAJOR_MINOR}" - docker tag "${BUILD_IMAGE}" "${MAJOR_MINOR_IMAGE}" - docker push "${MAJOR_MINOR_IMAGE}" -fi - -## now, push to quay.io -if [ -n "${QUAY_USERNAME}" -a -n "${QUAY_PASSWORD}" ]; then - echo "Performing a 'docker login' for Quay" - echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin - - echo "Tagging ${BUILD_IMAGE} as quay.io/${BUILD_IMAGE}" - docker tag "${BUILD_IMAGE}" "quay.io/${BUILD_IMAGE}" - - echo "Pushing 'quay.io/${BUILD_IMAGE}'" - docker push "quay.io/${BUILD_IMAGE}" - - if [ -n "${MAJOR_MINOR_IMAGE}" ]; then - echo "Pushing 'quay.io/${MAJOR_MINOR_IMAGE}' to quay.io" - docker tag "${MAJOR_MINOR_IMAGE}" "quay.io/${MAJOR_MINOR_IMAGE}" - docker push "quay.io/${MAJOR_MINOR_IMAGE}" - fi -else - echo "Couldn't publish images to ${BUILD_IMAGE}, as the credentials aren't set" - exit 1 -fi diff --git a/.ci/release.sh b/.ci/release.sh deleted file mode 100755 index 36116550a..000000000 --- a/.ci/release.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -git diff -s --exit-code -if [[ $? != 0 ]]; then - echo "The repository isn't clean. We won't proceed, as we don't know if we should commit those changes or not." - exit 1 -fi - -BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"quay.io/opentelemetry/opentelemetry-operator"} -BASE_TAG=${BASE_TAG:-$(git describe --tags)} -OPERATOR_VERSION=${OPERATOR_VERSION:-${BASE_TAG}} -OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)") -TAG=${TAG:-"v${OPERATOR_VERSION}"} -BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${TAG}"} -CREATED_AT=$(date -u -Isecond) -PREVIOUS_VERSION=$(grep operator= opentelemetry.version | awk -F= '{print $2}') - -if [[ ${BASE_TAG} =~ ^release/v.[[:digit:].]+(\-.*)?$ ]]; then - echo "Releasing ${OPERATOR_VERSION} from ${BASE_TAG}" -else - echo "The release tag does not match the expected format: ${BASE_TAG}" - exit 1 -fi - -if [ -z "${GH_WRITE_TOKEN}" ]; then - echo "The GitHub write token isn't set. Skipping release process." - exit 1 -fi - -# changes to deploy/operator.yaml -sed "s~image: quay.io/opentelemetry/opentelemetry-operator.*~image: ${BUILD_IMAGE}~gi" -i deploy/operator.yaml - -# change the versions.txt -sed "s~operator=${PREVIOUS_VERSION}~operator=${OPERATOR_VERSION}~gi" -i opentelemetry.version - -operator-sdk olm-catalog gen-csv \ - --csv-channel=alpha \ - --default-channel \ - --operator-name opentelemetry-operator \ - --update-crds \ - --csv-version=${OPERATOR_VERSION} \ - --from-version=${PREVIOUS_VERSION} - -git diff -s --exit-code -if [[ $? == 0 ]]; then - echo "No changes detected. Skipping." -else - git add \ - deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml \ - deploy/operator.yaml \ - opentelemetry.version \ - deploy/olm-catalog/opentelemetry-operator/${OPERATOR_VERSION}/ - - git diff -s --exit-code - if [[ $? != 0 ]]; then - echo "There are more changes than expected. Skipping the release." - git diff - exit 1 - fi - - git config user.email "opentelemetry-operator@opentelemetry.io" - git config user.name "OpenTelemetry Operator Release" - - git commit -qm "Release ${TAG}" - git tag ${TAG} - git push --repo=https://${GH_WRITE_TOKEN}@github.com/open-telemetry/opentelemetry-collector.git --tags - git push https://${GH_WRITE_TOKEN}@github.com/open-telemetry/opentelemetry-collector.git refs/tags/${TAG}:master -fi diff --git a/.ci/script.sh b/.ci/script.sh deleted file mode 100755 index ee09da110..000000000 --- a/.ci/script.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ -z ${GOPATH} ]; then - export PATH="${HOME}/go/bin:${PATH}" -else - export PATH="${GOPATH}/bin:${PATH}" -fi - -make ci -RT=$? -if [ ${RT} != 0 ]; then - echo "Failed to build the operator." - exit ${RT} -fi diff --git a/.ci/upload-test-coverage.sh b/.ci/upload-test-coverage.sh deleted file mode 100755 index 38c878be6..000000000 --- a/.ci/upload-test-coverage.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -bash <(curl -s https://codecov.io/bash) diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index a2ef66ad3..000000000 --- a/.codecov.yml +++ /dev/null @@ -1,3 +0,0 @@ -ignore: - - "./pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go" - - "./pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go" diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index cd4cf4194..2e2727070 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -3,15 +3,15 @@ on: [push, pull_request] jobs: unit-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v1 with: go-version: '1.14.4' - uses: actions/checkout@v1 - - uses: jpkrohling/setup-operator-sdk@v1-release - with: - operator-sdk-version: v0.18.1 + + - name: "install kubebuilder" + run: ./hack/install-kubebuilder.sh - name: "basic checks" - run: ./.ci/script.sh + run: make ci diff --git a/.gitignore b/.gitignore index 6910dae07..37a560510 100644 --- a/.gitignore +++ b/.gitignore @@ -1,78 +1,25 @@ -# Temporary Build Files -build/_output -build/_test -coverage.txt -# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode -### Emacs ### -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* -# Org-mode -.org-id-locations -*_archive -# flymake-mode -*_flymake.* -# eshell files -/eshell/history -/eshell/lastdir -# elpa packages -/elpa/ -# reftex files -*.rel -# AUCTeX auto folder -/auto/ -# cask packages -.cask/ -dist/ -# Flycheck -flycheck_*.el -# server auth directory -/server/ -# projectiles files -.projectile -projectile-bookmarks.eld -# directory configuration -.dir-locals.el -# saveplace -places -# url cache -url/cache/ -# cedet -ede-projects.el -# smex -smex-items -# company-statistics -company-statistics-cache.el -# anaconda-mode -anaconda-mode/ -### Go ### + # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib -# Test binary, build with 'go test -c' +bin + +# Test binary, build with `go test -c` *.test + # Output of the go coverage tool, specifically when used with LiteIDE *.out -### Vim ### -# swap -.sw[a-p] -.*.sw[a-p] -# session -Session.vim -# temporary -.netrwhist -# auto-generated tag files -tags -### VisualStudioCode ### -.vscode/* -.history -# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode +*.coverprofile + +# Kubernetes Generated files - skip generated files, except for vendored files + +!vendor/**/zz_generated.* + +# editor and IDE paraphernalia +.idea +*.swp +*.swo +*~ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 596646b66..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# How to Contribute to the OpenTelemetry Operator for Kubernetes - -We'd love your help! - -This project is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. - -We gratefully welcome improvements to documentation as well as to code. - -## Certificate of Origin - -By contributing to this project you agree to the [Developer Certificate of Origin](https://developercertificate.org/) (DCO). This document was created by the Linux Kernel community and is a simple statement that you, as a contributor, have the legal right to make the contribution. See the [DCO](DCO) file for details. - -## Getting Started - -This project is a regular [Kubernetes Operator](https://coreos.com/operators/) built using the Operator SDK. Refer to the Operator SDK documentation to understand the basic architecture of this operator. - -### Installing the Operator SDK command line tool - -Follow the installation guidelines from [Operator SDK GitHub page](https://github.com/operator-framework/operator-sdk). - -### Developing - -As usual for operators following the Operator SDK in recent versions, the dependencies are managed using [`go modules`](https://golang.org/doc/go1.11#modules). Refer to that project's documentation for instructions on how to add or update dependencies. - -The first step is to get a local Kubernetes instance up and running. The recommended approach is using `minikube`. Refer to the Kubernetes' [documentation](https://kubernetes.io/docs/tasks/tools/install-minikube/) for instructions on how to install it. - -Once `minikube` is installed, it can be started with: - -``` -minikube start -``` - -NOTE: Make sure to read the documentation to learn the performance switches that can be applied to your platform. - -Once minikube has finished starting, get the Operator running: - -``` -make run -``` - -At this point, an OpenTelemetry Collector instance can be installed: - -``` -kubectl apply -f deploy/examples/simplest.yaml -kubectl get otelcols -kubectl get pods -``` - -To remove the instance: - -``` -kubectl delete -f deploy/examples/simplest.yaml -``` - -#### Model changes - -The Operator SDK generates the `pkg/apis/opentelemetry/v1alpha1//zz_generated.*.go` files via the command `make generate`. This should be executed whenever there's a model change (`pkg/apis/opentelemetry/v1alpha1//opentelemetrycollector_types.go`) - -#### Tests - -Right now, there are only unit tests in this repository. They can be executed via `make unit-tests`. End-to-end tests are planned, and should be executed via `make e2e-tests`. All tests, including unit and end-to-end, will be executed when `make test` is called. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..74eb9d741 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Build the manager binary +FROM golang:1.13 as builder + +WORKDIR /workspace +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY main.go main.go +COPY api/ api/ +COPY controllers/ controllers/ + +# Build +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go + +# Use distroless as minimal base image to package the manager binary +# Refer to https://github.com/GoogleContainerTools/distroless for more details +FROM gcr.io/distroless/static:nonroot +WORKDIR / +COPY --from=builder /workspace/manager . +USER nonroot:nonroot + +ENTRYPOINT ["/manager"] diff --git a/Makefile b/Makefile index ea32eb48d..2e0f3bee9 100644 --- a/Makefile +++ b/Makefile @@ -1,106 +1,143 @@ -OPERATOR_NAME ?= opentelemetry-operator -OPERATOR_VERSION ?= "$(shell git describe --tags)" +# Current Operator version +VERSION ?= "$(shell git describe --tags)" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') - -GO_FLAGS ?= GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on -GOPATH ?= $(shell go env GOPATH) -KUBERNETES_CONFIG ?= "${HOME}/.kube/config" -WATCH_NAMESPACE ?= "" -BIN_DIR ?= "build/_output/bin" - -NAMESPACE ?= "quay.io/${USER}" -BUILD_IMAGE ?= "${NAMESPACE}/${OPERATOR_NAME}:latest" -OUTPUT_BINARY ?= "${BIN_DIR}/${OPERATOR_NAME}" -VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/pkg/version" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${OPERATOR_VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" - -OTELSVC_VERSION ?= "$(shell grep -v '\#' opentelemetry.version | grep opentelemetry-collector | awk -F= '{print $$2}')" - -.DEFAULT_GOAL := build - -.PHONY: discard-go-mod-changes -discard-go-mod-changes: - @# 'go list' will update go.mod/go.sum and there's no way to prevent it (not even with -mod=readonly) - @git checkout -- go.mod go.sum - -.PHONY: check -check: ensure-generate-is-noop discard-go-mod-changes - @echo Checking... - @git diff -s --exit-code . || (echo "Build failed: one or more source files aren't properly formatted. Run 'make format' and update your PR." && exit 1) - -.PHONY: ensure-generate-is-noop -ensure-generate-is-noop: generate format - @git diff -s --exit-code pkg/apis/opentelemetry/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the deep copy functions aren't up to date. Run 'make generate' and update your PR." && exit 1) - @git diff -s --exit-code pkg/client/versioned || (echo "Build failed: the versioned clients aren't up to date. Run 'make generate'." && exit 1) - -.PHONY: format -format: - @echo Formatting code... - @GOPATH=${GOPATH} .ci/format.sh - -.PHONY: security -security: - @echo Security... - @gosec -quiet ./... 2>/dev/null - -.PHONY: build -build: format - @echo Building operator binary... - @${GO_FLAGS} go build -o ${OUTPUT_BINARY} -ldflags ${LD_FLAGS} ./cmd/manager/main.go - -.PHONY: container -container: - @echo Building container ${BUILD_IMAGE}... - @mkdir -p build/_output - @BUILD_IMAGE=${BUILD_IMAGE} ./.ci/build-container.sh - -.PHONY: run -run: crd - @OPERATOR_NAME=${OPERATOR_NAME} operator-sdk run local --watch-namespace="${WATCH_NAMESPACE}" --operator-flags "--zap-devel" --go-ldflags ${LD_FLAGS} - -.PHONY: clean -clean: - @echo Cleaning... - -.PHONY: crd -crd: - @kubectl create -f deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml 2>&1 | grep -v "already exists" || true - -.PHONY: generate -generate: internal-generate format - -.PHONY: internal-generate -internal-generate: - @GOPATH=${GOPATH} ./.ci/generate.sh - -.PHONY: lint -lint: - @echo Linting... - @GOPATH=${GOPATH} ./.ci/lint.sh - -.PHONY: test -test: unit-tests - -.PHONY: unit-tests -unit-tests: - @echo Running unit tests... - @go test ./... -cover -coverprofile=coverage.txt -covermode=atomic -race - -.PHONY: all -all: check format lint security build test - -.PHONY: ci -ci: install-tools ensure-generate-is-noop all - -.PHONY: install-tools -install-tools: - @curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b ${GOPATH}/bin 2.0.0 - @go install \ - golang.org/x/tools/cmd/goimports \ - k8s.io/code-generator/cmd/client-gen \ - k8s.io/kube-openapi/cmd/openapi-gen - -.PHONY: install-prometheus-operator -install-prometheus-operator: - @echo Installing Prometheus Operator bundle - @kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/master/bundle.yaml +VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" +OTELSVC_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" + +# Default bundle image tag +BUNDLE_IMG ?= controller-bundle:$(VERSION) +# Options for 'bundle-build' +ifneq ($(origin CHANNELS), undefined) +BUNDLE_CHANNELS := --channels=$(CHANNELS) +endif +ifneq ($(origin DEFAULT_CHANNEL), undefined) +BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) +endif +BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) + +# Image URL to use all building/pushing image targets +IMG ?= controller:latest +# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) +CRD_OPTIONS ?= "crd:trivialVersions=true" + +# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) +ifeq (,$(shell go env GOBIN)) +GOBIN=$(shell go env GOPATH)/bin +else +GOBIN=$(shell go env GOBIN) +endif + +# If we are running in CI, run ginkgo with the recommended CI settings +ifeq (,$(CI)) +GINKGO_OPTS=-r +else +GINKGO_OPTS=-r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress --compilers=2 -v +endif + +all: manager +ci: test + +# Run tests +test: ginkgo generate fmt vet manifests + $(GINKGO) $(GINKGO_OPTS) + +# Build manager binary +manager: generate fmt vet + go build -o bin/manager main.go + +# Run against the configured Kubernetes cluster in ~/.kube/config +run: generate fmt vet manifests + go run -ldflags ${LD_FLAGS} ./main.go + +# Install CRDs into a cluster +install: manifests kustomize + $(KUSTOMIZE) build config/crd | kubectl apply -f - + +# Uninstall CRDs from a cluster +uninstall: manifests kustomize + $(KUSTOMIZE) build config/crd | kubectl delete -f - + +# Deploy controller in the configured Kubernetes cluster in ~/.kube/config +deploy: manifests kustomize + cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + $(KUSTOMIZE) build config/default | kubectl apply -f - + +# Generate manifests e.g. CRD, RBAC etc. +manifests: controller-gen + $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases + +# Run go fmt against code +fmt: + go fmt ./... + +# Run go vet against code +vet: + go vet ./... + +# Generate code +generate: controller-gen + $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." + +# Build the docker image +docker-build: test + docker build . -t ${IMG} + +# Push the docker image +docker-push: + docker push ${IMG} + +# find or download controller-gen +# download controller-gen if necessary +controller-gen: +ifeq (, $(shell which controller-gen)) + @{ \ + set -e ;\ + CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ + cd $$CONTROLLER_GEN_TMP_DIR ;\ + go mod init tmp ;\ + go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\ + rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ + } +CONTROLLER_GEN=$(GOBIN)/controller-gen +else +CONTROLLER_GEN=$(shell which controller-gen) +endif + +# find or download ginkgo +# download ginkgo if necessary +ginkgo: +ifeq (, $(shell which ginkgo)) + @{ \ + set -e ;\ + go get github.com/onsi/ginkgo/ginkgo@v1.11.0 ;\ + } +GINKGO=$(GOBIN)/ginkgo +else +GINKGO=$(shell which ginkgo) +endif + +kustomize: +ifeq (, $(shell which kustomize)) + @{ \ + set -e ;\ + KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\ + cd $$KUSTOMIZE_GEN_TMP_DIR ;\ + go mod init tmp ;\ + go get sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\ + rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\ + } +KUSTOMIZE=$(GOBIN)/kustomize +else +KUSTOMIZE=$(shell which kustomize) +endif + +# Generate bundle manifests and metadata, then validate generated files. +bundle: manifests + operator-sdk generate kustomize manifests -q + kustomize build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) + operator-sdk bundle validate ./bundle + +# Build the bundle image. +bundle-build: + docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . diff --git a/PROJECT b/PROJECT new file mode 100644 index 000000000..80adfdc73 --- /dev/null +++ b/PROJECT @@ -0,0 +1,10 @@ +domain: opentelemetry.io +layout: go.kubebuilder.io/v2 +repo: github.com/open-telemetry/opentelemetry-operator +resources: +- group: core + kind: OpenTelemetryCollector + version: v1alpha1 +version: 3-alpha +plugins: + go.operator-sdk.io/v2-alpha: {} diff --git a/README.md b/README.md index b932295fa..76a42d09f 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,13 @@ The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/). -At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) as the only managed component. +At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) as the only managed component. ## Getting started -To install the operator, run: +To run the operator locally, run: ``` -kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml -kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/service_account.yaml -kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/role.yaml -kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/role_binding.yaml -kubectl create -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-operator/master/deploy/operator.yaml +make install run ``` Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like: @@ -27,7 +23,6 @@ kind: OpenTelemetryCollector metadata: name: simplest spec: - image: otel/opentelemetry-collector:latest config: | receivers: jaeger: @@ -52,7 +47,7 @@ compatible with the latest version of the OpenTelemetry Collector image being re This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `logging`, which writes the spans to the console (`stdout`) of the OpenTelemetry Collector instance that receives the span. -The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-service) documentation for a reference of the possible entries. +The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) documentation for a reference of the possible entries. At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash. @@ -60,30 +55,18 @@ At this point, the Operator does *not* validate the contents of the configuratio The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. -## Prometheus ServiceMonitor objects - -When the Prometheus Operator is available in the same cluster as the OpenTelemetry Operator, the OpenTelemetry Operator will automatically create the relevant `ServiceMonitor` objects: +## Contributing and Developing -* One set for the OpenTelemetry Operator itself -* One set for each managed OpenTelemetry instance +Please see [CONTRIBUTING.md](CONTRIBUTING.md). -Refer to the Prometheus Operator for complete instructions on how to do a production-quality installation. For development purposes, the following will do: +## Testing -```console -$ kubectl apply -f https://raw.githubusercontent.com/coreos/prometheus-operator/v0.33.0/bundle.yaml +With an existing cluster (such as `minikube`), run: ``` - -When deploying the example `simplest.yaml`, the following `ServiceMonitor` will be created once the Prometheus Operator is available: - -```console -$ kubectl get servicemonitors simplest-collector -NAME AGE -simplest-collector 103s +USE_EXISTING_CLUSTER=true make test ``` -## Contributing and Developing - -Please see [CONTRIBUTING.md](CONTRIBUTING.md). +Tests can also be run without an existing cluster. For that, install [`kubebuilder`](https://book.kubebuilder.io/quick-start.html#installation). In this case, the tests will bootstrap `etcd` and `kubernetes-api-server` for the tests. Run against an existing cluster whenever possible, though. ## License diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go new file mode 100644 index 000000000..a04f53bb5 --- /dev/null +++ b/api/v1alpha1/groupversion_info.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=opentelemetry.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/api/v1alpha1/mode.go b/api/v1alpha1/mode.go new file mode 100644 index 000000000..6d896161f --- /dev/null +++ b/api/v1alpha1/mode.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // Mode represents how the collector should be deployed (deployment vs. daemonset) + // +kubebuilder:validation:Enum=daemonset;deployment + Mode string +) + +const ( + // ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet + ModeDaemonSet Mode = "daemonset" + + // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment + ModeDeployment Mode = "deployment" +) diff --git a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go similarity index 83% rename from pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go rename to api/v1alpha1/opentelemetrycollector_types.go index b75e1a0e4..4f5bd144e 100644 --- a/pkg/apis/opentelemetry/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -1,14 +1,25 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package v1alpha1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" ) // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector -// +k8s:openapi-gen=true type OpenTelemetryCollectorSpec struct { // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. // +required @@ -34,7 +45,7 @@ type OpenTelemetryCollectorSpec struct { // +optional // +kubebuilder:validation:Enum=daemonset;deployment // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true - Mode opentelemetry.Mode `json:"mode,omitempty"` + Mode Mode `json:"mode,omitempty"` // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional @@ -63,21 +74,17 @@ type OpenTelemetryCollectorSpec struct { } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector -// +k8s:openapi-gen=true type OpenTelemetryCollectorStatus struct { Replicas int32 `json:"replicas"` Version string `json:"version"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API -// +k8s:openapi-gen=true +// +kubebuilder:object:root=true // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas -// +genclient -// +operator-sdk:gen-csv:customresourcedefinitions.displayName="OpenTelemetry Collector" + +// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API type OpenTelemetryCollector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -86,7 +93,7 @@ type OpenTelemetryCollector struct { Status OpenTelemetryCollectorStatus `json:"status,omitempty"` } -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true // OpenTelemetryCollectorList contains a list of OpenTelemetryCollector type OpenTelemetryCollectorList struct { @@ -98,6 +105,3 @@ type OpenTelemetryCollectorList struct { func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } - -// AddToScheme is an alias to SchemeBuilder.AddToScheme, to please client-gen -var AddToScheme = SchemeBuilder.AddToScheme diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go similarity index 85% rename from pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go rename to api/v1alpha1/zz_generated.deepcopy.go index 153f0e1ce..9d2237d9e 100644 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,11 +1,25 @@ // +build !ignore_autogenerated -// Code generated by operator-sdk. DO NOT EDIT. +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by controller-gen. DO NOT EDIT. package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -16,7 +30,6 @@ func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector. @@ -49,7 +62,6 @@ func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorLi (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList. @@ -106,7 +118,6 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. @@ -122,7 +133,6 @@ func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { *out = *in - return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus. diff --git a/build/Dockerfile b/build/Dockerfile deleted file mode 100644 index 32e2fb838..000000000 --- a/build/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM registry.access.redhat.com/ubi8/ubi-minimal:latest - -ENV OPERATOR=/usr/local/bin/opentelemetry-operator \ - USER_UID=1001 \ - USER_NAME=opentelemetry-operator - -# install operator binary -COPY build/_output/bin/opentelemetry-operator ${OPERATOR} - -ENTRYPOINT [${OPERATOR}] - -USER ${USER_UID} diff --git a/cmd/manager/empty_test.go b/cmd/manager/empty_test.go deleted file mode 100644 index f69931bba..000000000 --- a/cmd/manager/empty_test.go +++ /dev/null @@ -1,2 +0,0 @@ -// this file exists to force the coverage tool to count this directory -package main diff --git a/cmd/manager/main.go b/cmd/manager/main.go deleted file mode 100644 index ea752dc53..000000000 --- a/cmd/manager/main.go +++ /dev/null @@ -1,235 +0,0 @@ -package main - -import ( - "context" - "errors" - "flag" - "fmt" - "os" - "runtime" - "strings" - - // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) - _ "k8s.io/client-go/plugin/pkg/client/auth" - "k8s.io/client-go/rest" - - "github.com/operator-framework/operator-sdk/pkg/k8sutil" - kubemetrics "github.com/operator-framework/operator-sdk/pkg/kube-metrics" - "github.com/operator-framework/operator-sdk/pkg/leader" - "github.com/operator-framework/operator-sdk/pkg/log/zap" - "github.com/operator-framework/operator-sdk/pkg/metrics" - "github.com/spf13/pflag" - "github.com/spf13/viper" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/cache" - "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/manager" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - "sigs.k8s.io/controller-runtime/pkg/runtime/signals" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/pkg/controller" - "github.com/open-telemetry/opentelemetry-operator/pkg/upgrade" - "github.com/open-telemetry/opentelemetry-operator/pkg/version" -) - -// Change below variables to serve metrics on different host or port. -var ( - metricsHost = "0.0.0.0" - metricsPort int32 = 8383 - operatorMetricsPort int32 = 8686 -) -var log = logf.Log.WithName("cmd") - -func printVersion() { - v := version.Get() - log.Info("Starting the OpenTelemetry Operator", - "opentelemetry-operator", v.Operator, - "opentelemetry-collector", v.OpenTelemetryCollector, - "build-date", v.BuildDate, - "go-version", v.Go, - "go-arch", runtime.GOARCH, - "go-os", runtime.GOOS, - "operator-sdk-version", v.OperatorSdk, - ) -} - -func main() { - ctx := context.Background() - - // Add the zap logger flag set to the CLI. The flag set must - // be added before calling pflag.Parse(). - pflag.CommandLine.AddFlagSet(zap.FlagSet()) - - // Add flags registered by imported packages (e.g. glog and - // controller-runtime) - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - - // Add flags related to this operator - pflag.CommandLine.AddFlagSet(opentelemetry.FlagSet()) - - pflag.Parse() - - // Use a zap logr.Logger implementation. If none of the zap - // flags are configured (or if the zap flag set is not being - // used), this defaults to a production zap logger. - // - // The logger instantiated here can be changed to any logger - // implementing the logr.Logger interface. This logger will - // be propagated through the whole operator, generating - // uniform and structured logs. - logf.SetLogger(zap.Logger()) - - printVersion() - - namespace, err := k8sutil.GetWatchNamespace() - if err != nil { - log.Error(err, "Failed to get watch namespace") - os.Exit(1) - } - - // Get a config to talk to the apiserver - cfg, err := config.GetConfig() - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Become the leader before proceeding - err = leader.Become(ctx, "opentelemetry-operator-lock") - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Create a new Cmd to provide shared dependencies and start components - options := manager.Options{ - Namespace: namespace, - MetricsBindAddress: fmt.Sprintf("%s:%d", metricsHost, metricsPort), - } - - // Add support for MultiNamespace set in WATCH_NAMESPACE (e.g ns1,ns2) - // Note that this is not intended to be used for excluding namespaces, this is better done via a Predicate - // Also note that you may face performance issues when using this with a high number of namespaces. - // More Info: https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg/cache#MultiNamespacedCacheBuilder - if strings.Contains(namespace, ",") { - options.Namespace = "" - options.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(namespace, ",")) - } - - // Create a new manager to provide shared dependencies and start components - mgr, err := manager.New(cfg, options) - if err != nil { - log.Error(err, "") - os.Exit(1) - } - - log.Info("Registering Components.") - - // Setup Scheme for all resources - if err := apis.AddToScheme(mgr.GetScheme()); err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Setup client set - if cl, err := client.ForManager(mgr); err == nil { - ctxUpgrade := context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("upgrade_opentelemetrycollector")) - if err := upgrade.ManagedInstances(ctxUpgrade, cl); err != nil { - log.Error(err, "failed to upgrade managed instances") - } - } else { - log.Error(err, "failed to obtain a set of clients to perform the upgrade") - } - - // Setup all Controllers - if err := controller.AddToManager(mgr); err != nil { - log.Error(err, "") - os.Exit(1) - } - - // Add the Metrics Service - addMetrics(ctx, cfg) - - // Start the Cmd - if err := mgr.Start(signals.SetupSignalHandler()); err != nil { - log.Error(err, "Manager exited non-zero") - os.Exit(1) - } -} - -// addMetrics will create the Services and Service Monitors to allow the operator export the metrics by using -// the Prometheus operator -func addMetrics(ctx context.Context, cfg *rest.Config) { - // Get the namespace the operator is currently deployed in. - operatorNs, err := k8sutil.GetOperatorNamespace() - if err != nil { - if errors.Is(err, k8sutil.ErrRunLocal) { - log.Info("Skipping CR metrics server creation; not running in a cluster.") - return - } - } - - if err := serveCRMetrics(cfg, operatorNs); err != nil { - log.Info("Could not generate and serve custom resource metrics", "error", err.Error()) - } - - // Add to the below struct any other metrics ports you want to expose. - servicePorts := []v1.ServicePort{ - {Port: metricsPort, Name: metrics.OperatorPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: metricsPort}}, - {Port: operatorMetricsPort, Name: metrics.CRPortName, Protocol: v1.ProtocolTCP, TargetPort: intstr.IntOrString{Type: intstr.Int, IntVal: operatorMetricsPort}}, - } - - // Create Service object to expose the metrics port(s). - service, err := metrics.CreateMetricsService(ctx, cfg, servicePorts) - if err != nil { - log.Info("Could not create metrics Service", "error", err.Error()) - } - - // CreateServiceMonitors will automatically create the prometheus-operator ServiceMonitor resources - // necessary to configure Prometheus to scrape metrics from this operator. - services := []*v1.Service{service} - - // The ServiceMonitor is created in the same namespace where the operator is deployed - svcMonitorAvail := true - _, err = metrics.CreateServiceMonitors(cfg, operatorNs, services) - if err != nil { - log.Info("Could not create ServiceMonitor object", "error", err.Error()) - // If this operator is deployed to a cluster without the prometheus-operator running, it will return - // ErrServiceMonitorNotPresent, which can be used to safely skip ServiceMonitor creation. - if err == metrics.ErrServiceMonitorNotPresent { - svcMonitorAvail = false - log.Info("Install prometheus-operator in your cluster to create ServiceMonitor objects", "error", err.Error()) - } - } - viper.Set(opentelemetry.SvcMonitorAvailable, svcMonitorAvail) -} - -// serveCRMetrics gets the Operator/CustomResource GVKs and generates metrics based on those types. -// It serves those metrics on "http://metricsHost:operatorMetricsPort". -func serveCRMetrics(cfg *rest.Config, operatorNs string) error { - // The function below returns a list of filtered operator/CR specific GVKs. For more control, override the GVK list below - // with your own custom logic. Note that if you are adding third party API schemas, probably you will need to - // customize this implementation to avoid permissions issues. - filteredGVK, err := k8sutil.GetGVKsFromAddToScheme(apis.AddToScheme) - if err != nil { - return err - } - - // The metrics will be generated from the namespaces which are returned here. - // NOTE that passing nil or an empty list of namespaces in GenerateAndServeCRMetrics will result in an error. - ns, err := kubemetrics.GetNamespacesForMetrics(operatorNs) - if err != nil { - return err - } - - // Generate and serve custom resource specific metrics. - err = kubemetrics.GenerateAndServeCRMetrics(cfg, ns, filteredGVK, metricsHost, operatorMetricsPort) - if err != nil { - return err - } - return nil -} diff --git a/config/certmanager/certificate.yaml b/config/certmanager/certificate.yaml new file mode 100644 index 000000000..58db114fa --- /dev/null +++ b/config/certmanager/certificate.yaml @@ -0,0 +1,26 @@ +# The following manifests contain a self-signed issuer CR and a certificate CR. +# More document can be found at https://docs.cert-manager.io +# WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for +# breaking changes +apiVersion: cert-manager.io/v1alpha2 +kind: Issuer +metadata: + name: selfsigned-issuer + namespace: system +spec: + selfSigned: {} +--- +apiVersion: cert-manager.io/v1alpha2 +kind: Certificate +metadata: + name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml + namespace: system +spec: + # $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize + dnsNames: + - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc + - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local + issuerRef: + kind: Issuer + name: selfsigned-issuer + secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize diff --git a/config/certmanager/kustomization.yaml b/config/certmanager/kustomization.yaml new file mode 100644 index 000000000..bebea5a59 --- /dev/null +++ b/config/certmanager/kustomization.yaml @@ -0,0 +1,5 @@ +resources: +- certificate.yaml + +configurations: +- kustomizeconfig.yaml diff --git a/config/certmanager/kustomizeconfig.yaml b/config/certmanager/kustomizeconfig.yaml new file mode 100644 index 000000000..90d7c313c --- /dev/null +++ b/config/certmanager/kustomizeconfig.yaml @@ -0,0 +1,16 @@ +# This configuration is for teaching kustomize how to update name ref and var substitution +nameReference: +- kind: Issuer + group: cert-manager.io + fieldSpecs: + - kind: Certificate + group: cert-manager.io + path: spec/issuerRef/name + +varReference: +- kind: Certificate + group: cert-manager.io + path: spec/commonName +- kind: Certificate + group: cert-manager.io + path: spec/dnsNames diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml new file mode 100644 index 000000000..1b08c7821 --- /dev/null +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -0,0 +1,1396 @@ + +--- +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.3.0 + creationTimestamp: null + name: opentelemetrycollectors.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors + shortNames: + - otelcol + - otelcols + singular: opentelemetrycollector + scope: Namespaced + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} + validation: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + config: + description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. + type: string + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + mode: + allOf: + - enum: + - daemonset + - deployment + - enum: + - daemonset + - deployment + description: Mode represents how the collector should be deployed (deployment + vs. daemonset) + type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can be + used to open aditional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and http://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + Field can be enabled with ServiceAppProtocol feature gate. + type: string + name: + description: The name of this port within the service. This must + be a DNS_LABEL. All ports within a ServiceSpec must have unique + names. When considering the endpoints for a Service, this must + match the 'name' field in the EndpointPort. Optional if only + one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is exposed + when type=NodePort or LoadBalancer. Usually assigned by the + system. If specified, it will be allocated to the service if + unused or else creation of the service will fail. Default is + to auto-allocate a port if the ServiceType of this Service requires + one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", "UDP", + and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. If this is a string, it will + be looked up as a named port in the target Pod''s container + ports. If this is not specified, the value of the ''port'' field + is used (an identity map). This field is ignored for services + with clusterIP=None, and should be omitted or set equal to the + ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within a + container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When not + set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false + or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's + volume should be mounted. Behaves similarly to SubPath but environment + variable references $(VAR_NAME) are expanded using the container's + environment. Defaults to "" (volume's root). SubPathExpr and + SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may be + accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'The partition in the volume that you want to + mount. If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for /dev/sda is + "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in + AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than + the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted + on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More + info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data + field of the referenced ConfigMap will be projected into + the volume as a file whose name is the key and content is + the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the + ConfigMap, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the + key to. May not be an absolute path. May not contain + the path element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents storage + that is handled by an external CSI driver (Alpha feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to the + associated CSI driver which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret + object containing sensitive information to pass to the CSI + driver to complete the CSI NodePublishVolume and NodeUnpublishVolume + calls. This field is optional, and may be empty if no secret + is required. If the secret object contains more than one + secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name + of the file to be created. Must not be absolute or + contain the ''..'' path. Must be utf-8 encoded. The + first item of the relative path must not start with + ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares + a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this + EmptyDir volume. The size limit is also applicable for memory + medium. The maximum usage on memory medium EmptyDir would + be the minimum value between the SizeLimit specified here + and the sum of memory limits of all containers in a pod. + The default is nil which means that the limit is undefined. + More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + fc: + description: FC represents a Fibre Channel resource that is attached + to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be + set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that + is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this + volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the plugin + scripts. This may be empty if no secret object is specified. + If the secret object contains more than one secret, all + secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a + kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + partition: + description: 'The partition in the volume that you want to + mount. If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition + as "1". Similarly, the volume partition for /dev/sda is + "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision a + container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start + with '..'. If '.' is supplied, the volume directory will + be the git repository. Otherwise, if specified, the volume + will contain the git repository in the subdirectory with + the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host + that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path + is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to the + pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within + the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be + mounted with read-only permissions. Defaults to false. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference + to a PersistentVolumeClaim in the same namespace. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits to use on created files by default. + Must be a value between 0 and 0777. Directories within the + path are not affected by this setting. This might be in + conflict with other options that affect the file mode, like + fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: information about the configMap data to + project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file whose + name is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the ConfigMap, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data + to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing the + pod field + properties: + fieldRef: + description: 'Required: Selects a field of + the pod: only annotations, labels, name + and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' path. + Must be utf-8 encoded. The first item of + the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose name + is the key and content is the value. If specified, + the listed keys will be projected into the specified + paths, and unlisted keys will not be present. + If a key is specified which is not present in + the Secret, the volume setup will error unless + it is marked optional. Paths must be relative + and may not contain the '..' path or start with + '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on + this file, must be a value between 0 and + 0777. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can be + other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element '..'. + May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience of + the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account token. + As the token approaches expiration, the kubelet + volume plugin will proactively rotate the service + account token. The kubelet will start trying to + rotate the token if the token is older than 80 + percent of its time to live or if the token is + older than 24 hours.Defaults to 1 hour and must + be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount + point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + required: + - sources + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that + shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to + be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", "ntfs". + Implicitly inferred to be "ext4" if unspecified. More info: + https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising + the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with + Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should + be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the + protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO + system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a value between 0 and 0777. Defaults + to 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data + field of the referenced Secret will be projected into the + volume as a file whose name is the key and content is the + value. If specified, the listed keys will be projected into + the specified paths, and unlisted keys will not be present. + If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. + Paths must be relative and may not contain the '..' path + or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits to use on this file, + must be a value between 0 and 0777. If not specified, + the volume defaultMode will be used. This might be + in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode + bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the + key to. May not be an absolute path. May not contain + the path element '..'. May not start with the string + '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be + defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to + use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within a + namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume + within StorageOS. If no namespace is specified then the + Pod's namespace will be used. This allows the Kubernetes + name scoping to be mirrored within StorageOS for tighter + integration. Set VolumeName to any name to override the + default behaviour. Set to "default" if you are not using + namespaces within StorageOS. Namespaces that do not pre-exist + within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector + properties: + replicas: + format: int32 + type: integer + version: + type: string + required: + - replicas + - version + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml new file mode 100644 index 000000000..3daa9acd2 --- /dev/null +++ b/config/crd/kustomization.yaml @@ -0,0 +1,21 @@ +# This kustomization.yaml is not intended to be run by itself, +# since it depends on service name and namespace that are out of this kustomize package. +# It should be run by config/default +resources: +- bases/opentelemetry.io_opentelemetrycollectors.yaml +# +kubebuilder:scaffold:crdkustomizeresource + +patchesStrategicMerge: +# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. +# patches here are for enabling the conversion webhook for each CRD +#- patches/webhook_in_opentelemetrycollectors.yaml +# +kubebuilder:scaffold:crdkustomizewebhookpatch + +# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. +# patches here are for enabling the CA injection for each CRD +#- patches/cainjection_in_opentelemetrycollectors.yaml +# +kubebuilder:scaffold:crdkustomizecainjectionpatch + +# the following config is for teaching kustomize how to do kustomization for CRDs. +configurations: +- kustomizeconfig.yaml diff --git a/config/crd/kustomizeconfig.yaml b/config/crd/kustomizeconfig.yaml new file mode 100644 index 000000000..6f83d9a94 --- /dev/null +++ b/config/crd/kustomizeconfig.yaml @@ -0,0 +1,17 @@ +# This file is for teaching kustomize how to substitute name and namespace reference in CRD +nameReference: +- kind: Service + version: v1 + fieldSpecs: + - kind: CustomResourceDefinition + group: apiextensions.k8s.io + path: spec/conversion/webhookClientConfig/service/name + +namespace: +- kind: CustomResourceDefinition + group: apiextensions.k8s.io + path: spec/conversion/webhookClientConfig/service/namespace + create: false + +varReference: +- path: metadata/annotations diff --git a/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml b/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml new file mode 100644 index 000000000..7b7d2f65f --- /dev/null +++ b/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml @@ -0,0 +1,8 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: opentelemetrycollectors.opentelemetry.io diff --git a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml new file mode 100644 index 000000000..a04a64f79 --- /dev/null +++ b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml @@ -0,0 +1,17 @@ +# The following patch enables conversion webhook for CRD +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: opentelemetrycollectors.opentelemetry.io +spec: + conversion: + strategy: Webhook + webhookClientConfig: + # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, + # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml new file mode 100644 index 000000000..89a6a8598 --- /dev/null +++ b/config/default/kustomization.yaml @@ -0,0 +1,70 @@ +# Adds namespace to all resources. +namespace: opentelemetry-operator-system + +# Value of this field is prepended to the +# names of all resources, e.g. a deployment named +# "wordpress" becomes "alices-wordpress". +# Note that it should also match with the prefix (text before '-') of the namespace +# field above. +namePrefix: opentelemetry-operator- + +# Labels to add to all resources and selectors. +#commonLabels: +# someName: someValue + +bases: +- ../crd +- ../rbac +- ../manager +# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in +# crd/kustomization.yaml +#- ../webhook +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. +#- ../certmanager +# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. +#- ../prometheus + +patchesStrategicMerge: + # Protect the /metrics endpoint by putting it behind auth. + # If you want your controller-manager to expose the /metrics + # endpoint w/o any authn/z, please comment the following line. +- manager_auth_proxy_patch.yaml + +# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in +# crd/kustomization.yaml +#- manager_webhook_patch.yaml + +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. +# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. +# 'CERTMANAGER' needs to be enabled to use ca injection +#- webhookcainjection_patch.yaml + +# the following config is for teaching kustomize how to do var substitution +vars: +# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. +#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR +# objref: +# kind: Certificate +# group: cert-manager.io +# version: v1alpha2 +# name: serving-cert # this name should match the one in certificate.yaml +# fieldref: +# fieldpath: metadata.namespace +#- name: CERTIFICATE_NAME +# objref: +# kind: Certificate +# group: cert-manager.io +# version: v1alpha2 +# name: serving-cert # this name should match the one in certificate.yaml +#- name: SERVICE_NAMESPACE # namespace of the service +# objref: +# kind: Service +# version: v1 +# name: webhook-service +# fieldref: +# fieldpath: metadata.namespace +#- name: SERVICE_NAME +# objref: +# kind: Service +# version: v1 +# name: webhook-service diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml new file mode 100644 index 000000000..77e743d1c --- /dev/null +++ b/config/default/manager_auth_proxy_patch.yaml @@ -0,0 +1,25 @@ +# This patch inject a sidecar container which is a HTTP proxy for the +# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=10" + ports: + - containerPort: 8443 + name: https + - name: manager + args: + - "--metrics-addr=127.0.0.1:8080" + - "--enable-leader-election" diff --git a/config/default/manager_webhook_patch.yaml b/config/default/manager_webhook_patch.yaml new file mode 100644 index 000000000..738de350b --- /dev/null +++ b/config/default/manager_webhook_patch.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: webhook-server-cert diff --git a/config/default/webhookcainjection_patch.yaml b/config/default/webhookcainjection_patch.yaml new file mode 100644 index 000000000..7e79bf995 --- /dev/null +++ b/config/default/webhookcainjection_patch.yaml @@ -0,0 +1,15 @@ +# This patch add annotation to admission webhook config and +# the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize. +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingWebhookConfiguration +metadata: + name: mutating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) +--- +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + name: validating-webhook-configuration + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml new file mode 100644 index 000000000..5c5f0b84c --- /dev/null +++ b/config/manager/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- manager.yaml diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml new file mode 100644 index 000000000..b6c85a52d --- /dev/null +++ b/config/manager/manager.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: controller-manager + name: system +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system + labels: + control-plane: controller-manager +spec: + selector: + matchLabels: + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + control-plane: controller-manager + spec: + containers: + - command: + - /manager + args: + - --enable-leader-election + image: controller:latest + name: manager + resources: + limits: + cpu: 100m + memory: 30Mi + requests: + cpu: 100m + memory: 20Mi + terminationGracePeriodSeconds: 10 diff --git a/config/prometheus/kustomization.yaml b/config/prometheus/kustomization.yaml new file mode 100644 index 000000000..ed137168a --- /dev/null +++ b/config/prometheus/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- monitor.yaml diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml new file mode 100644 index 000000000..9b8047b76 --- /dev/null +++ b/config/prometheus/monitor.yaml @@ -0,0 +1,16 @@ + +# Prometheus Monitor Service (Metrics) +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + control-plane: controller-manager + name: controller-manager-metrics-monitor + namespace: system +spec: + endpoints: + - path: /metrics + port: https + selector: + matchLabels: + control-plane: controller-manager diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml new file mode 100644 index 000000000..7d62534c5 --- /dev/null +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -0,0 +1,7 @@ +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: metrics-reader +rules: +- nonResourceURLs: ["/metrics"] + verbs: ["get"] diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml new file mode 100644 index 000000000..618f5e417 --- /dev/null +++ b/config/rbac/auth_proxy_role.yaml @@ -0,0 +1,13 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: proxy-role +rules: +- apiGroups: ["authentication.k8s.io"] + resources: + - tokenreviews + verbs: ["create"] +- apiGroups: ["authorization.k8s.io"] + resources: + - subjectaccessreviews + verbs: ["create"] diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml new file mode 100644 index 000000000..48ed1e4b8 --- /dev/null +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: proxy-role +subjects: +- kind: ServiceAccount + name: default + namespace: system diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml new file mode 100644 index 000000000..6cf656be1 --- /dev/null +++ b/config/rbac/auth_proxy_service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + control-plane: controller-manager + name: controller-manager-metrics-service + namespace: system +spec: + ports: + - name: https + port: 8443 + targetPort: https + selector: + control-plane: controller-manager diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml new file mode 100644 index 000000000..66c28338f --- /dev/null +++ b/config/rbac/kustomization.yaml @@ -0,0 +1,12 @@ +resources: +- role.yaml +- role_binding.yaml +- leader_election_role.yaml +- leader_election_role_binding.yaml +# Comment the following 4 lines if you want to disable +# the auth proxy (https://github.com/brancz/kube-rbac-proxy) +# which protects your /metrics endpoint. +- auth_proxy_service.yaml +- auth_proxy_role.yaml +- auth_proxy_role_binding.yaml +- auth_proxy_client_clusterrole.yaml diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml new file mode 100644 index 000000000..7dc16c420 --- /dev/null +++ b/config/rbac/leader_election_role.yaml @@ -0,0 +1,33 @@ +# permissions to do leader election. +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: leader-election-role +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch diff --git a/deploy/role_binding.yaml b/config/rbac/leader_election_role_binding.yaml similarity index 61% rename from deploy/role_binding.yaml rename to config/rbac/leader_election_role_binding.yaml index 481eff9af..eed16906f 100644 --- a/deploy/role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -1,11 +1,12 @@ -kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding metadata: - name: opentelemetry-operator -subjects: -- kind: ServiceAccount - name: opentelemetry-operator + name: leader-election-rolebinding roleRef: - kind: Role - name: opentelemetry-operator apiGroup: rbac.authorization.k8s.io + kind: Role + name: leader-election-role +subjects: +- kind: ServiceAccount + name: default + namespace: system diff --git a/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml b/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml similarity index 100% rename from deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml rename to config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml diff --git a/deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml b/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml similarity index 100% rename from deploy/crds/opentelemetry.io_opentelemetrycollectors_crd.yaml rename to config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml diff --git a/config/rbac/opentelemetrycollector_editor_role.yaml b/config/rbac/opentelemetrycollector_editor_role.yaml new file mode 100644 index 000000000..ebc8e6a01 --- /dev/null +++ b/config/rbac/opentelemetrycollector_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit opentelemetrycollectors. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opentelemetrycollector-editor-role +rules: +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/status + verbs: + - get diff --git a/config/rbac/opentelemetrycollector_viewer_role.yaml b/config/rbac/opentelemetrycollector_viewer_role.yaml new file mode 100644 index 000000000..4a76c71d1 --- /dev/null +++ b/config/rbac/opentelemetrycollector_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view opentelemetrycollectors. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opentelemetrycollector-viewer-role +rules: +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - get + - list + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/status + verbs: + - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml new file mode 100644 index 000000000..320b1eece --- /dev/null +++ b/config/rbac/role.yaml @@ -0,0 +1,40 @@ + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: manager-role +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/status + verbs: + - get + - patch + - update diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml new file mode 100644 index 000000000..8f2658702 --- /dev/null +++ b/config/rbac/role_binding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: manager-role +subjects: +- kind: ServiceAccount + name: default + namespace: system diff --git a/examples/simplest.yaml b/config/samples/core_v1alpha1_opentelemetrycollector.yaml similarity index 81% rename from examples/simplest.yaml rename to config/samples/core_v1alpha1_opentelemetrycollector.yaml index e8f48fc48..1735fe3fc 100644 --- a/examples/simplest.yaml +++ b/config/samples/core_v1alpha1_opentelemetrycollector.yaml @@ -1,12 +1,13 @@ apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: simplest + name: opentelemetrycollector-sample spec: config: | receivers: jaeger: - grpc: + protocols: + grpc: processors: queued_retry: diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml new file mode 100644 index 000000000..864ff055a --- /dev/null +++ b/config/samples/kustomization.yaml @@ -0,0 +1,3 @@ +## This file is auto-generated, do not modify ## +resources: +- core_v1alpha1_opentelemetrycollector.yaml diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml new file mode 100644 index 000000000..9cf26134e --- /dev/null +++ b/config/webhook/kustomization.yaml @@ -0,0 +1,6 @@ +resources: +- manifests.yaml +- service.yaml + +configurations: +- kustomizeconfig.yaml diff --git a/config/webhook/kustomizeconfig.yaml b/config/webhook/kustomizeconfig.yaml new file mode 100644 index 000000000..25e21e3c9 --- /dev/null +++ b/config/webhook/kustomizeconfig.yaml @@ -0,0 +1,25 @@ +# the following config is for teaching kustomize where to look at when substituting vars. +# It requires kustomize v2.1.0 or newer to work properly. +nameReference: +- kind: Service + version: v1 + fieldSpecs: + - kind: MutatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/name + - kind: ValidatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/name + +namespace: +- kind: MutatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/namespace + create: true +- kind: ValidatingWebhookConfiguration + group: admissionregistration.k8s.io + path: webhooks/clientConfig/service/namespace + create: true + +varReference: +- path: metadata/annotations diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml new file mode 100644 index 000000000..31e0f8295 --- /dev/null +++ b/config/webhook/service.yaml @@ -0,0 +1,12 @@ + +apiVersion: v1 +kind: Service +metadata: + name: webhook-service + namespace: system +spec: + ports: + - port: 443 + targetPort: 9443 + selector: + control-plane: controller-manager diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go new file mode 100644 index 000000000..ae8350739 --- /dev/null +++ b/controllers/opentelemetrycollector_controller.go @@ -0,0 +1,156 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" +) + +// OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object +type OpenTelemetryCollectorReconciler struct { + client.Client + log logr.Logger + scheme *runtime.Scheme + config config.Config + tasks []Task +} + +// Task represents a reconciliation task to be executed by the reconciler +type Task struct { + Name string + Do func(context.Context, reconcile.Params) error + BailOnError bool +} + +// Params is the set of options to build a new openTelemetryCollectorReconciler +type Params struct { + client.Client + Log logr.Logger + Scheme *runtime.Scheme + Config config.Config + Tasks []Task +} + +// NewReconciler creates a new reconciler for OpenTelemetryCollector objects +func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { + if len(p.Tasks) == 0 { + p.Tasks = []Task{ + { + "config maps", + reconcile.ConfigMaps, + true, + }, + { + "service accounts", + reconcile.ServiceAccounts, + true, + }, + { + "services", + reconcile.Services, + true, + }, + { + "deployments", + reconcile.Deployments, + true, + }, + { + "daemon sets", + reconcile.DaemonSets, + true, + }, + } + } + + return &OpenTelemetryCollectorReconciler{ + Client: p.Client, + log: p.Log, + scheme: p.Scheme, + config: p.Config, + tasks: p.Tasks, + } +} + +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch +// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete + +// Reconcile the current state of an OpenTelemetry collector resource with the desired state +func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { + ctx := context.Background() + log := r.log.WithValues("opentelemetrycollector", req.NamespacedName) + + var instance v1alpha1.OpenTelemetryCollector + if err := r.Get(ctx, req.NamespacedName, &instance); err != nil { + log.Error(err, "unable to fetch OpenTelemetryCollector") + // we'll ignore not-found errors, since they can't be fixed by an immediate + // requeue (we'll need to wait for a new notification), and we can get them + // on deleted requests. + return ctrl.Result{}, client.IgnoreNotFound(err) + } + + params := reconcile.Params{ + Config: r.config, + Client: r.Client, + Instance: instance, + Log: log, + Scheme: r.scheme, + } + + if err := r.RunTasks(ctx, params); err != nil { + return ctrl.Result{}, err + } + + return ctrl.Result{}, nil +} + +// RunTasks runs all the tasks associated with this reconciler +func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { + for _, task := range r.tasks { + if err := task.Do(ctx, params); err != nil { + r.log.Error(err, fmt.Sprintf("failed to reconcile %s", task.Name)) + if task.BailOnError { + return err + } + } + } + + return nil +} + +// SetupWithManager tells the manager what our controller is interested in +func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&v1alpha1.OpenTelemetryCollector{}). + Owns(&corev1.ConfigMap{}). + Owns(&corev1.ServiceAccount{}). + Owns(&corev1.Service{}). + Owns(&appsv1.Deployment{}). + Owns(&appsv1.DaemonSet{}). + Complete(r) +} diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go new file mode 100644 index 000000000..6f9138039 --- /dev/null +++ b/controllers/opentelemetrycollector_controller_test.go @@ -0,0 +1,229 @@ +package controllers_test + +import ( + "context" + "errors" + "fmt" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/kubectl/pkg/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" + "sigs.k8s.io/controller-runtime/pkg/manager" + k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" +) + +var _ = Describe("OpenTelemetryCollector controller", func() { + logger := logf.Log.WithName("unit-tests") + cfg := config.DefaultConfig() + cfg.FlagSet().Parse([]string{}) + + It("should generate the underlying objects on reconciliation", func() { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + }) + created := &v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + } + err := k8sClient.Create(context.Background(), created) + Expect(err).ToNot(HaveOccurred()) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(req) + + // verify + Expect(err).ToNot(HaveOccurred()) + + // the base query for the underlying objects + opts := []client.ListOption{ + client.InNamespace(nsn.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + // verify that we have at least one object for each of the types we create + // whether we have the right ones is up to the specific tests for each type + { + list := &corev1.ConfigMapList{} + err = k8sClient.List(context.Background(), list, opts...) + Expect(err).ToNot(HaveOccurred()) + Expect(list.Items).ToNot(BeEmpty()) + } + { + list := &corev1.ServiceAccountList{} + err = k8sClient.List(context.Background(), list, opts...) + Expect(err).ToNot(HaveOccurred()) + Expect(list.Items).ToNot(BeEmpty()) + } + { + list := &corev1.ServiceList{} + err = k8sClient.List(context.Background(), list, opts...) + Expect(err).ToNot(HaveOccurred()) + Expect(list.Items).ToNot(BeEmpty()) + } + { + list := &appsv1.DeploymentList{} + err = k8sClient.List(context.Background(), list, opts...) + Expect(err).ToNot(HaveOccurred()) + Expect(list.Items).ToNot(BeEmpty()) + } + { + list := &appsv1.DaemonSetList{} + err = k8sClient.List(context.Background(), list, opts...) + Expect(err).ToNot(HaveOccurred()) + // attention! we expect daemonsets to be empty in the default configuration + Expect(list.Items).To(BeEmpty()) + } + + // cleanup + Expect(k8sClient.Delete(context.Background(), created)).ToNot(HaveOccurred()) + }) + + It("should continue when a task's failure can be recovered", func() { + // prepare + taskCalled := false + reconciler := controllers.NewReconciler(controllers.Params{ + Log: logger, + Tasks: []controllers.Task{ + { + Name: "should-fail", + Do: func(context.Context, reconcile.Params) error { + return errors.New("should fail!") + }, + BailOnError: false, + }, + { + Name: "should-be-called", + Do: func(context.Context, reconcile.Params) error { + taskCalled = true + return nil + }, + }, + }, + }) + + // test + err := reconciler.RunTasks(context.Background(), reconcile.Params{}) + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(taskCalled).To(BeTrue()) + }) + + It("should not continue when a task's failure can't be recovered", func() { + // prepare + taskCalled := false + expectedErr := errors.New("should fail!") + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + Tasks: []controllers.Task{ + { + Name: "should-fail", + Do: func(context.Context, reconcile.Params) error { + taskCalled = true + return expectedErr + }, + BailOnError: true, + }, + { + Name: "should-not-be-called", + Do: func(context.Context, reconcile.Params) error { + Fail("should not have been called") + return nil + }, + }, + }, + }) + created := &v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + } + err := k8sClient.Create(context.Background(), created) + Expect(err).ToNot(HaveOccurred()) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(req) + + // verify + Expect(err).To(MatchError(expectedErr)) + Expect(taskCalled).To(BeTrue()) + + // cleanup + Expect(k8sClient.Delete(context.Background(), created)).ToNot(HaveOccurred()) + }) + + It("should skip when the instance doesn't exist", func() { + // prepare + nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + Tasks: []controllers.Task{ + { + Name: "should-not-be-called", + Do: func(context.Context, reconcile.Params) error { + Fail("should not have been called") + return nil + }, + }, + }, + }) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err := reconciler.Reconcile(req) + + // verify + Expect(err).ToNot(HaveOccurred()) + }) + + It("should be able to register with the manager", func() { + Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") + // prepare + mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) + reconciler := controllers.NewReconciler(controllers.Params{}) + + // test + err = reconciler.SetupWithManager(mgr) + + // verify + Expect(err).ToNot(HaveOccurred()) + }) +}) diff --git a/controllers/suite_test.go b/controllers/suite_test.go new file mode 100644 index 000000000..27275a022 --- /dev/null +++ b/controllers/suite_test.go @@ -0,0 +1,79 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers_test + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + "sigs.k8s.io/controller-runtime/pkg/envtest/printer" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + // +kubebuilder:scaffold:imports +) + +// These tests use Ginkgo (BDD-style Go testing framework). Refer to +// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestAPIs(t *testing.T) { + RegisterFailHandler(Fail) + + RunSpecsWithDefaultAndCustomReporters(t, + "Controller Suite", + []Reporter{printer.NewlineReporter{}}) +} + +var _ = BeforeSuite(func(done Done) { + logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, + } + + var err error + cfg, err = testEnv.Start() + Expect(err).ToNot(HaveOccurred()) + Expect(cfg).ToNot(BeNil()) + + err = v1alpha1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).ToNot(HaveOccurred()) + Expect(k8sClient).ToNot(BeNil()) + + close(done) +}, 60) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).ToNot(HaveOccurred()) +}) diff --git a/deploy/crds/simplest.yaml b/deploy/crds/simplest.yaml deleted file mode 100644 index fe2297d83..000000000 --- a/deploy/crds/simplest.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - config: | - receivers: - jaeger: - - processors: - queued-retry: - - exporters: - logging: - - pipelines: - traces: - receivers: [jaeger] - processors: [queued-retry] - exporters: [logging] diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml deleted file mode 100644 index 9fdd592e2..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry-operator.v0.0.1.clusterserviceversion.yaml +++ /dev/null @@ -1,127 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: '[{"apiVersion":"opentelemetry.io/v1alpha1","kind":"OpenTelemetryCollector","metadata":{"name":"example-opentelemetrycollector"},"spec":{"size":3}}]' - capabilities: Basic Install - name: opentelemetry-operator.v0.0.1 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: {} - description: Placeholder description - displayName: Opentelemetry Operator - install: - spec: - deployments: - - name: opentelemetry-operator - spec: - replicas: 1 - selector: - matchLabels: - name: opentelemetry-operator - strategy: {} - template: - metadata: - labels: - name: opentelemetry-operator - spec: - containers: - - command: - - opentelemetry-operator - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: opentelemetry-operator - image: REPLACE_IMAGE - imagePullPolicy: Always - name: opentelemetry-operator - resources: {} - serviceAccountName: opentelemetry-operator - permissions: - - rules: - - apiGroups: - - "" - resources: - - pods - - services - - services/finalizers - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets - verbs: - - '*' - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - opentelemetry-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - "" - resources: - - pods - verbs: - - get - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - apiGroups: - - opentelemetry.io - resources: - - '*' - verbs: - - '*' - serviceAccountName: opentelemetry-operator - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - tracing - - distributed tracing - - monitoring - - troubleshooting - maintainers: - - email: juraci.github@kroehling.de - name: Juraci Paixão Kröhling - maturity: alpha - provider: - name: OpenTelemetry - version: 0.0.1 diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml deleted file mode 100644 index c04013f59..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/0.0.1/opentelemetry_v1alpha1_opentelemetryservice_crd.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - singular: opentelemetrycollector - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - type: object - status: - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml deleted file mode 100644 index af68abca9..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry-operator.v0.0.2.clusterserviceversion.yaml +++ /dev/null @@ -1,168 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "opentelemetry.io/v1alpha1", - "kind": "OpenTelemetryCollector", - "metadata": { - "name": "simplest" - }, - "spec": { - "config": "receivers:\n jaeger:\n\nprocessors:\n queued-retry:\n\nexporters:\n logging:\n\npipelines:\n traces:\n receivers: [jaeger]\n processors: [queued-retry]\n exporters: [logging]\n" - } - } - ] - capabilities: Basic Install - name: opentelemetry-operator.v0.0.2 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - displayName: OpenTelemetry Collector - kind: OpenTelemetryCollector - name: opentelemetrycollectors.opentelemetry.io - specDescriptors: - - description: Args is the set of arguments to pass to the OpenTelemetry Collector - binary - displayName: Args - path: args - - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - displayName: Config - path: config - - description: Image indicates the container image to use for the OpenTelemetry - Collector. - displayName: Image - path: image - - description: Mode represents how the collector should be deployed (deployment - vs. daemonset) - displayName: Mode - path: mode - - description: Replicas is the number of pod instances for the underlying OpenTelemetry - Collector - displayName: Replicas - path: replicas - version: v1alpha1 - description: Placeholder description - displayName: Opentelemetry Operator - install: - spec: - deployments: - - name: opentelemetry-operator - spec: - replicas: 1 - selector: - matchLabels: - name: opentelemetry-operator - strategy: {} - template: - metadata: - labels: - name: opentelemetry-operator - spec: - containers: - - command: - - opentelemetry-operator - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: opentelemetry-operator - image: quay.io/opentelemetry/opentelemetry-operator:v0.0.2 - imagePullPolicy: Always - name: opentelemetry-operator - resources: {} - serviceAccountName: opentelemetry-operator - permissions: - - rules: - - apiGroups: - - "" - resources: - - pods - - services - - services/finalizers - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets - verbs: - - '*' - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - '*' - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - opentelemetry-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - "" - resources: - - pods - verbs: - - get - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - apiGroups: - - opentelemetry.io - resources: - - '*' - verbs: - - '*' - serviceAccountName: opentelemetry-operator - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - tracing - - distributed tracing - - monitoring - - troubleshooting - maintainers: - - email: juraci.github@kroehling.de - name: Juraci Paixão Kröhling - maturity: alpha - provider: - name: OpenTelemetry - replaces: opentelemetry-operator.v0.0.1 - version: 0.0.2 diff --git a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml deleted file mode 100644 index c62d155ff..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/0.0.2/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ /dev/null @@ -1,86 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - type: string - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - mode: - description: Mode represents how the collector should be deployed (deployment - vs. daemonset) - enum: - - daemonset - - deployment - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector - format: int32 - type: integer - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector - properties: - replicas: - format: int32 - type: integer - version: - type: string - required: - - replicas - - version - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml b/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml deleted file mode 100644 index db5129cfe..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ /dev/null @@ -1,1400 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - mode: - description: Mode represents how the collector should be deployed - (deployment vs. daemonset) - enum: - - daemonset - - deployment - type: string - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open aditional ports that can't be inferred by the operator, - like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. - Field can be enabled with ServiceAppProtocol feature gate. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is - exposed when type=NodePort or LoadBalancer. Usually assigned - by the system. If specified, it will be allocated to the service - if unused or else creation of the service will fail. Default - is to auto-allocate a port if the ServiceType of this Service - requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector - format: int32 - type: integer - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. Behaves similarly to - SubPath but environment variable references $(VAR_NAME) are - expanded using the container's environment. Defaults to "" - (volume's root). SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage - Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph - monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather - than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the - Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the ConfigMap, the volume setup will error unless it is - marked optional. Paths must be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must - be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents storage - that is handled by an external CSI driver (Alpha feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to - the associated CSI driver which will determine the default - filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the secret - object contains more than one secret, all secret references - are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required for - this EmptyDir volume. The size limit is also applicable - for memory medium. The maximum usage on memory medium - EmptyDir would be the minimum value between the SizeLimit - specified here and the sum of memory limits of all containers - in a pod. The default is nil which means that the limit - is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - fc: - description: FC represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for - this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the - plugin scripts. This may be empty if no secret object - is specified. If the secret object contains more than - one secret, all secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or - start with '..'. If '.' is supplied, the volume directory - will be the git repository. Otherwise, if specified, - the volume will contain the git repository in the subdirectory - with the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent - disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, - and downward API - properties: - defaultMode: - description: Mode bits to use on created files by default. - Must be a value between 0 and 0777. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - configMap: - description: information about the configMap data - to project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data - to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to - project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose - name is the key and content is the value. If - specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. The kubelet will - start trying to rotate the token if the token - is older than 80 percent of its time to live - or if the token is older than 24 hours.Defaults - to 1 hour and must be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no - group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: Volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume - should be ThickProvisioned or ThinProvisioned. Default - is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the - ScaleIO system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the - Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the Secret, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: Specify whether the Secret or its keys must - be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS - for tighter integration. Set VolumeName to any name to - override the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector - properties: - replicas: - format: int32 - type: integer - version: - type: string - required: - - replicas - - version - type: object - type: object - served: true - storage: true - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} diff --git a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml b/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml deleted file mode 100644 index 374263bec..000000000 --- a/deploy/olm-catalog/opentelemetry-operator/opentelemetry-operator.package.yaml +++ /dev/null @@ -1,5 +0,0 @@ -channels: -- currentCSV: opentelemetry-operator.v0.2.0 - name: alpha -defaultChannel: alpha -packageName: opentelemetry-operator diff --git a/deploy/operator.yaml b/deploy/operator.yaml deleted file mode 100644 index b930e37d8..000000000 --- a/deploy/operator.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentelemetry-operator -spec: - replicas: 1 - selector: - matchLabels: - name: opentelemetry-operator - template: - metadata: - labels: - name: opentelemetry-operator - spec: - serviceAccountName: opentelemetry-operator - containers: - - name: opentelemetry-operator - image: quay.io/opentelemetry/opentelemetry-operator:v0.2.0 - command: - - opentelemetry-operator - imagePullPolicy: Always - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: "opentelemetry-operator" diff --git a/deploy/role.yaml b/deploy/role.yaml deleted file mode 100644 index 39b35b155..000000000 --- a/deploy/role.yaml +++ /dev/null @@ -1,80 +0,0 @@ -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: opentelemetry-operator -rules: -- apiGroups: - - "" - resources: - - pods - - services - - services/finalizers - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create -- apiGroups: - - apps - resourceNames: - - opentelemetry-operator - resources: - - deployments/finalizers - verbs: - - update -- apiGroups: - - "" - resources: - - pods - verbs: - - get -- apiGroups: - - apps - resources: - - replicasets - - deployments - verbs: - - get -- apiGroups: - - opentelemetry.io - resources: - - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch diff --git a/deploy/service_account.yaml b/deploy/service_account.yaml deleted file mode 100644 index f97a12acb..000000000 --- a/deploy/service_account.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: opentelemetry-operator diff --git a/examples/business-application.yaml b/examples/business-application.yaml deleted file mode 100644 index 63551e99d..000000000 --- a/examples/business-application.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# when `simplest.yaml` is deployed, this is how an application containing the Jaeger client can be configured to use otelcol -# in this case, we make use of the jaeger-agent as a sidecar, and the jaeger-agent connects to otelcol via gRPC -# this is suitable when the application is already configured to talk to Jaeger via UDP -# for greenfield applications, the OpenTelemetry client should be preferred -apiVersion: apps/v1 -kind: Deployment -metadata: - name: myapp -spec: - selector: - matchLabels: - app: myapp - template: - metadata: - labels: - app: myapp - spec: - containers: - - name: myapp - image: jaegertracing/vertx-create-span:operator-e2e-tests - - name: jaeger-agent - image: jaegertracing/jaeger-agent:1.14.0 - args: - - --reporter.grpc.host-port=dns:///simplest-collector-headless.default:14250 - - --reporter.type=grpc - ports: - - containerPort: 5778 - name: config-rest - protocol: TCP - - containerPort: 6831 - name: jg-compact-trft - protocol: TCP diff --git a/examples/daemonset.yaml b/examples/daemonset.yaml deleted file mode 100644 index 8cb9f529e..000000000 --- a/examples/daemonset.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: otelcol-as-daemonset -spec: - mode: daemonset - config: | - receivers: - jaeger: - - processors: - queued-retry: - - exporters: - logging: - - pipelines: - traces: - receivers: [jaeger] - processors: [queued-retry] - exporters: [logging] diff --git a/examples/with-volumes.yaml b/examples/with-volumes.yaml deleted file mode 100644 index dfb5a5ff6..000000000 --- a/examples/with-volumes.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: with-volumes -spec: - config: | - receivers: - jaeger: - - processors: - queued_retry: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [queued_retry] - exporters: [logging] - - volumeMounts: - - mountPath: /etc/tls-certs - name: tls-certs-volume - - volumes: - - name: tls-certs-volume - secret: - secretName: tls-certs-secret diff --git a/go.mod b/go.mod index e63b45a98..ea0631abc 100644 --- a/go.mod +++ b/go.mod @@ -3,25 +3,14 @@ module github.com/open-telemetry/opentelemetry-operator go 1.13 require ( - github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc github.com/go-logr/logr v0.1.0 - github.com/go-openapi/spec v0.19.4 - github.com/magiconair/properties v1.8.0 - github.com/operator-framework/operator-sdk v0.18.1 + github.com/onsi/ginkgo v1.11.0 // keep the Makefile in sync! + github.com/onsi/gomega v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.4.0 - github.com/stretchr/testify v1.5.1 - go.uber.org/zap v1.14.1 gopkg.in/yaml.v2 v2.2.8 - gotest.tools v2.2.0+incompatible - k8s.io/api v0.18.2 - k8s.io/apimachinery v0.18.2 - k8s.io/client-go v12.0.0+incompatible - k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c + k8s.io/api v0.18.6 + k8s.io/apimachinery v0.18.6 + k8s.io/client-go v0.18.6 + k8s.io/kubectl v0.18.6 sigs.k8s.io/controller-runtime v0.6.0 ) - -replace ( - github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM - k8s.io/client-go => k8s.io/client-go v0.18.2 // Required by prometheus-operator -) diff --git a/go.sum b/go.sum index 611c84e0e..00c8c8d3a 100644 --- a/go.sum +++ b/go.sum @@ -1,1266 +1,348 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bitbucket.org/bertimus9/systemstat v0.0.0-20180207000608-0eeff89b0690/go.mod h1:Ulb78X89vxKYgdL24HMTiXYHlyHEvruOj1ZPlqeNEZM= -bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.49.0 h1:CH+lkubJzcPYB1Ggupcq0+k8Ni2ILdG2lYjDIgavDBQ= -cloud.google.com/go v0.49.0/go.mod h1:hGvAdzcWNbyuxS3nWhD7H2cIJxjRRTRLQVB0bdputVY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= -contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.2.8+incompatible h1:Q2feRPMlcfVcqz3pF87PJzkm5lZrL+x6BDtzhODzNJM= -github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v13.3.2+incompatible h1:VxzPyuhtnlBOzc4IWCZHqpyH2d+QMLQEuy3wREyY4oc= -github.com/Azure/go-autorest v13.3.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503 h1:uUhdsDMg2GbFLF5GfQPtLMWd5vdDZSfqvqQp3waafxQ= -github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503 h1:Hxqlh1uAA8aGpa1dFhDNhll7U/rkWtG8ZItFvRMr7l0= -github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= -github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= -github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= -github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= -github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.0.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig/v3 v3.0.0/go.mod h1:NEUY/Qq8Gdm2xgYA+NwJM6wmfdRV9xkh8h/Rld20R0U= -github.com/Masterminds/sprig/v3 v3.1.0/go.mod h1:ONGMf7UfYGAbMXCZmQLy8x3lCDIPrEZE/rU8pmrbihA= -github.com/Masterminds/squirrel v1.2.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA= -github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= -github.com/Masterminds/vcs v1.13.1/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkFW6gg= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/ant31/crd-validation v0.0.0-20180702145049-30f8a35d0ac2/go.mod h1:X0noFIik9YqfhGYBLEHg8LJKEwy7QIitLQuFMpKLcPk= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= -github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us= -github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/brancz/gojsontoyaml v0.0.0-20190425155809-e8bd32d46b3d/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= -github.com/brancz/gojsontoyaml v0.0.0-20191212081931-bf2969bbd742/go.mod h1:IyUJYN1gvWjtLF5ZuygmxbnsAyP3aJS6cHzIuZY50B0= -github.com/brancz/kube-rbac-proxy v0.5.0/go.mod h1:cL2VjiIFGS90Cjh5ZZ8+It6tMcBt8rwvuw2J6Mamnl0= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/bugsnag-go v1.5.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= -github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= -github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/prettybench v0.0.0-20150116022406-03b8cfe5406c/go.mod h1:Xe6ZsFhtM8HrDku0pxJ3/Lr51rwykrzgFwpmTzleatY= -github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0 h1:yTUvW7Vhb89inJ+8irsUqiWjh8iT6sQPZiQzI6ReGkA= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho= -github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cfssl v0.0.0-20180726162950-56268a613adf/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= -github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0= -github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190823190603-4a2f61c4f2b4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= -github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= -github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/prometheus-operator v0.34.0 h1:TF9qaydNeUamLKs0hniaapa4FBz8U8TIlRRtJX987A4= -github.com/coreos/prometheus-operator v0.34.0/go.mod h1:Li6rMllG/hYIyXfMuvUwhyC+hqwJVHdsDdP21hypT1M= -github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc h1:nMbUjGuF7UzVluucix/vsy4973BNdEiT/aX6kFtskKM= -github.com/coreos/prometheus-operator v0.38.1-0.20200424145508-7e176fda06cc/go.mod h1:erio69w1R/aC14D5nfvAXSlE8FT8jt2Hnavc50Dp33A= -github.com/coreos/prometheus-operator v0.39.0 h1:sXbjqxHhTdfhdbG/Fpls3nArXZZaC66JTpzebZK2ZOc= -github.com/coreos/prometheus-operator v0.39.0/go.mod h1:erio69w1R/aC14D5nfvAXSlE8FT8jt2Hnavc50Dp33A= -github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= -github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= -github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= -github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4= -github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A= -github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE= -github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= -github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= -github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= -github.com/deislabs/oras v0.7.0/go.mod h1:sqMKPG3tMyIX9xwXUBRLhZ24o+uT4y6jgBD2RzUTKDM= -github.com/deislabs/oras v0.8.1/go.mod h1:Mx0rMSbBNaNfY9hjpccEnxkOqJL6KGjtxNHPLC4G4As= -github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v0.0.0-20190506213505-d88565df0c2d/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.1/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libnetwork v0.0.0-20180830151422-a9cd636e3789/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= -github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w= -github.com/emicklei/go-restful v2.9.6+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.11.1+incompatible h1:CjKsv3uWcCMvySPQYKxO8XX3f9zD4FeZRsW4G0B4ffE= -github.com/emicklei/go-restful v2.11.1+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= -github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= -github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= -github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v0.1.1 h1:qXBXPDdNncunGs7XeEpsJt8wCjYBygluzfdLO0G5baE= -github.com/go-logr/zapr v0.1.1/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.4 h1:ixzUSnHTd6hCemgtAJgluaTSGYpLNpJY4mA2DIkdOAo= -github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.4 h1:i/65mCM9s1h8eCkT07F5Z/C1e/f8VTgEwer+00yevpA= -github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= -github.com/gobuffalo/flect v0.1.5/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= -github.com/gobuffalo/flect v0.2.1/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= -github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= -github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= -github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= -github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48 h1:X+zN6RZXsvnrSJaAIQhZezPfAfvsqihKKR8oiLHid34= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang-migrate/migrate/v4 v4.6.2/go.mod h1:JYi6reN3+Z734VZ0akNuyOJNcrg45ZL7LDBMW3WGJL0= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 h1:uHTyIjqVhYRhLbJ8nIiOJHkEZZ+5YoOsAbD3sk82NiE= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cadvisor v0.34.0/go.mod h1:1nql6U13uTHaLYB8rLS5x9IJc2qT6Xd/Tr1sTX6NE48= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.4.2 h1:uh5EXM/5/ki6d0p/FoUxuiN8KHpo1w572UXQdB2MnTg= -github.com/googleapis/gnostic v0.4.2/go.mod h1:P0d+GwDcJO8XvMi7aihGGl/CkivFa9JX/V/FfjyYzI0= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.2.0 h1:lD2Bce2xBAMNNcFZ0dObTpXkGLlVIb33RPVUNVpw6ic= -github.com/gophercloud/gophercloud v0.2.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.6.0 h1:Xb2lcqZtml1XjgYZxbeayEemq7ASbeTp09m36gQFpEU= -github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de h1:F7WD09S8QB4LrkEpka0dFPLSotH11HRpCsLIbIcJ7sU= -github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosuri/uitable v0.0.1/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= -github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/gregjones/httpcache v0.0.0-20190203031600-7a902570cb17/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-health-probe v0.2.1-0.20181220223928-2bf0a5b182db/go.mod h1:uBKkC2RbarFsvS5jMJHpVhTLvGlGQj9JJwkaePE3FWI= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= -github.com/heketi/heketi v9.0.0+incompatible/go.mod h1:bB9ly3RchcQqsQ9CpyaQwvva7RS5ytVoSoholZQON6o= -github.com/heketi/rest v0.0.0-20180404230133-aa6a65207413/go.mod h1:BeS3M108VzVlmAue3lv2WcGuPAX94/KN63MUURzbYSI= -github.com/heketi/tests v0.0.0-20151005000721-f3775cbcefd6/go.mod h1:xGMAM8JLi7UkZt1i4FQeQy0R2T8GLUwQhOP5M1gBhy4= -github.com/heketi/utils v0.0.0-20170317161834-435bc5bdfa64/go.mod h1:RYlF4ghFZPPmk2TC5REt5OFwvfb6lzxFWrTWB+qs28s= -github.com/helm/helm-2to3 v0.2.0/go.mod h1:jQUVAWB0bM7zNIqKPIfHFzuFSK0kHYovJrjO+hqcvRk= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI= -github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/improbable-eng/thanos v0.3.2/go.mod h1:GZewVGILKuJVPNRn7L4Zw+7X96qzFOwj63b22xYGXBE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jsonnet-bundler/jsonnet-bundler v0.1.0/go.mod h1:YKsSFc9VFhhLITkJS3X2PrRqWG9u2Jq99udTdDjQLfM= -github.com/jsonnet-bundler/jsonnet-bundler v0.3.1/go.mod h1:/by7P/OoohkI3q4CgSFqcoFsVY+IaNbzOVDknEsKDeU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34= -github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= -github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= -github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/libopenstorage/openstorage v1.0.0/go.mod h1:Sp1sIObHjat1BeXhfMqLZ14wnOzEhNx2YQedreMcUyc= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= -github.com/lpabon/godbc v0.1.1/go.mod h1:Jo9QV0cf3U6jZABgiJ2skINAXb9j8m51r07g4KI92ZA= -github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= -github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= -github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= -github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= -github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/maorfr/helm-plugin-utils v0.0.0-20181205064038-588190cb5e3b/go.mod h1:p3gwmRSFqbWw6plBpR0sKl3n3vpu8kX70gvCJKMvvCA= -github.com/markbates/inflect v1.0.4/go.mod h1:1fR9+pO2KHEO9ZRtto13gDwwZaAKstQzferVeWqbgNs= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/martinlindhe/base36 v1.0.0/go.mod h1:+AtEs8xrBpCeYgSLoY/aJ6Wf37jtBuR0s35750M27+8= -github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a/go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.6/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.12.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/maxbrunsfeld/counterfeiter/v6 v6.2.1/go.mod h1:F9YacGpnZbLQMzuPI0rR6op21YvNu/RjL705LJJpM3k= -github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= -github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4= -github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= -github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/mikefarah/yaml/v2 v2.4.0/go.mod h1:ahVqZF4n1W4NqwvVnZzC4es67xsW9uR/RRf2RRxieJU= -github.com/mikefarah/yq/v2 v2.4.1/go.mod h1:i8SYf1XdgUvY2OFwSqGAtWOOgimD2McJ6iutoxRm4k0= -github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= -github.com/minio/minio-go/v6 v6.0.49/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= -github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs= -github.com/openshift/api v0.0.0-20190924102528-32369d4db2ad/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b/go.mod h1:6rzn+JTr7+WYS2E1TExP4gByoABxMznR6y2SnUIkmxk= -github.com/openshift/origin v0.0.0-20160503220234-8f127d736703/go.mod h1:0Rox5r9C8aQn6j1oAOQ0c1uC86mYbUFObzjBRvUKHII= -github.com/openshift/prom-label-proxy v0.1.1-0.20191016113035-b8153a7f39f1/go.mod h1:p5MuxzsYP1JPsNGwtjtcgRHHlGziCJJfztff91nNixw= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/operator-framework/api v0.0.0-20200120235816-80fd2f1a09c9/go.mod h1:S5IdlJvmKkF84K2tBvsrqJbI2FVy03P88R75snpRxJo= -github.com/operator-framework/api v0.3.7-0.20200602203552-431198de9fc2/go.mod h1:Xbje9x0SHmh0nihE21kpesB38vk3cyxnE6JdDS8Jo1Q= -github.com/operator-framework/operator-lifecycle-manager v0.0.0-20191115003340-16619cd27fa5/go.mod h1:zL34MNy92LPutBH5gQK+gGhtgTUlZZX03I2G12vWHF4= -github.com/operator-framework/operator-registry v1.5.1/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= -github.com/operator-framework/operator-registry v1.5.3/go.mod h1:agrQlkWOo1q8U1SAaLSS2WQ+Z9vswNT2M2HFib9iuLY= -github.com/operator-framework/operator-registry v1.5.7-0.20200121213444-d8e2ec52c19a/go.mod h1:ekexcV4O8YMxdQuPb+Xco7MHfVmRIq7Jvj5e6NU7dHI= -github.com/operator-framework/operator-registry v1.12.6-0.20200605115407-01fa069730e2/go.mod h1:loVINznYhgBIkmv83kU4yee88RS0BBk+hqOw9r4bhJk= -github.com/operator-framework/operator-sdk v0.13.0 h1:AWiKOl6ZeAyQgbGVoD8fNd+eCbFuRWgr4hciaaOEBmE= -github.com/operator-framework/operator-sdk v0.13.0/go.mod h1:XRnicDD4uZCNbJbMXc0B7eyw7hjO4Xzol7FAkWHa1Nc= -github.com/operator-framework/operator-sdk v0.15.2 h1:VlxI0J+HLmMKs5k53drQ/B1AXhyNj0OaD2BbREt8Hnk= -github.com/operator-framework/operator-sdk v0.15.2/go.mod h1:RkC5LpluVONa08ORFIIVCYrEr855xG1/NltRL2jQ8qo= -github.com/operator-framework/operator-sdk v0.18.1 h1:AOUOBchkx8r3yYF/MDjH0gdtd13ACENuy2gnsSXQXt0= -github.com/operator-framework/operator-sdk v0.18.1/go.mod h1:QMFHXj8+SxF56tfR1QmIU/tc9FKI73TG8Qw7Iy4D2zY= -github.com/otiai10/copy v1.0.1/go.mod h1:8bMCJrAqOtN/d9oyh5HR7HhLQMvcGMpGdwRDYsfOCHc= -github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776/go.mod h1:3HNVkVOU7vZeFXocWuvtcS0XSFLcf2XUSDHkq9t1jU4= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= -github.com/otiai10/mint v1.2.4/go.mod h1:d+b7n/0R3tdyUYYylALXpWQ/kTN+QobSq/4SRGBkR3M= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= -github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= -github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M= -github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= -github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0 h1:BQ53HtBmfOitExawJ6LokA4x8ov/z0SYYb0+HxJfRI8= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.2.1 h1:JnMpQc6ppsNgw9QPAGF6Dod479itz7lvlsMzzNayLOI= -github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0 h1:kRhiuYSXR3+uv2IbVbZhUxK5zVD/2pp3Gd2PpvPkpEo= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3 h1:CTwfnzjQ+8dS6MhHHu4YswVAD99sL2wjPqP+VkURmKE= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.1.1 h1:/ZKcW+ixpq2dOl4yeH4qvACNXnkiDCp5e/F5Tq07X7o= -github.com/prometheus/procfs v0.1.1/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= -github.com/prometheus/prometheus v1.8.2-0.20200110114423-1e64d757f711/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= -github.com/prometheus/prometheus v2.3.2+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.8.0/go.mod h1:fSI0j+IUQrDd7+ZtR9WKIGtoYAYAJUKcKhYLG25tN4g= -github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= -github.com/robfig/cron v0.0.0-20170526150127-736158dc09e1/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.4.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.5.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rubenv/sql-migrate v0.0.0-20191025130928-9355dd04f4b3/go.mod h1:WS0rl9eEliYI8DPnr3TOwz4439pay+qNgzJoVya/DmY= -github.com/rubenv/sql-migrate v0.0.0-20200212082348-64f95ea68aa3/go.mod h1:rtQlpHw+eR6UrqaS3kX1VYeaCxzCVdimDS7g5Ln4pPc= -github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= -github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= -github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.3/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/storageos/go-api v0.0.0-20180912212459-343b3eff91fc/go.mod h1:ZrLn+e0ZuF3Y65PNF6dIwbJPZqfmtCXxFm9ckv0agOY= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/technosophos/moniker v0.0.0-20180509230615-a5dbd03a2245/go.mod h1:O1c8HleITsZqzNZDjSNzirUGsMT0oGu9LhHKoJrqO+A= -github.com/thanos-io/thanos v0.11.0/go.mod h1:N/Yes7J68KqvmY+xM6J5CJqEvWIvKSR5sqGtmuD6wDc= -github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM= -github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vishvananda/netlink v0.0.0-20171020171820-b2de5d10e38e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xenolf/lego v0.0.0-20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= -github.com/xenolf/lego v0.3.2-0.20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= -github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/gorelic v0.0.6/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= -gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= -go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= -go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= -go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= -go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= -go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A= -golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152 h1:ZC1Xn5A1nlpSmQCIva4bZ3ob3lmhYIefc+GU+DLg1Ow= -golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904 h1:bXoxMPcSLOq08zI3/c5dEBT6lE4eh+jOh886GHrn6V8= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM= -golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc h1:gkKoSkUmnU6bpS/VhkuO27bzQeSA51uaEfbOW5dNb68= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 h1:N66aaryRB3Ax92gH0v3hp1QYZ3zWWCCUR/j8Ifh45Ss= -golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1268,420 +350,129 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180117170059-2c42eef0765b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181004145325-8469e314837c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 h1:4y9KwBHBgBNwDbtu44R5o1fdOCQUEXhbk/P4A9WmJq0= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934 h1:u/E0NqCIWRDAo9WCFo6Ko49njPFDLSd3z+X1HgWDMpE= -golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200610111108-226ff32320da h1:bGb80FudwxpeucJUjPYJXuJ8Hk91vNtfvrymzwiei38= -golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 h1:NusfzzA6yGQ+ua51ck7E3omNUX/JuqbFSaRGqU8CcLI= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20170824195420-5d2fd3ccab98/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a h1:UuQ+70Pi/ZdWHuP4v457pkXeOynTdgd/4enxeIO/98k= -golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191030203535-5e247c9ad0a0/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b h1:AFZdJUT7jJYXQEC29hYH/WZkoV7+KhwxQGmdZ19yYoY= -golang.org/x/tools v0.0.0-20200403190813-44a64ad78b9b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v3 v3.0.1/go.mod h1:CBhndykehEwTOlEfnsfJwvkFQbSN8YZFr9M+cIHAJto= -gomodules.xyz/orderedmap v0.1.0/go.mod h1:g9/TPUCm1t2gwD3j3zfV8uylyYhVdCNSi+xCEIu7yTU= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/gonum v0.0.0-20190710053202-4340aa3071a0/go.mod h1:03dgh78c4UvU1WksguQ/lvJQXbezKQGJSrwwRq5MraQ= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190128161407-8ac453e89fca/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gorp.v1 v1.7.2/go.mod h1:Wo3h+DBQZIxATwftsglhdD/62zRFPhGhTiu5jUJmCaw= -gopkg.in/imdario/mergo.v0 v0.3.7/go.mod h1:9qPP6AGrlC1G2PTNXko614FwGZvorN7MiBU0Eppok+U= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.57.0 h1:9unxIsFcTt4I55uWluz+UmL95q4kdJ0buvQ1ZIqVQww= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473/go.mod h1:N1eN2tsCx0Ydtgjl4cqmbRCsY4/+z4cYDeqwZTk6zog= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v1 v1.1.2/go.mod h1:QpYS+a4WhS+DTlyQIi6Ka7MS3SuR9a055rgXNEe6EiA= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.0.0/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.1.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.1.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/gotestsum v0.3.5/go.mod h1:Mnf3e5FUzXbkCfynWBGOwLssY7gTQgCHObK9tMpAriY= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -helm.sh/helm/v3 v3.0.0/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= -helm.sh/helm/v3 v3.0.1/go.mod h1:sI7B9yfvMgxtTPMWdk1jSKJ2aa59UyP9qhPydqW6mgo= -helm.sh/helm/v3 v3.2.0/go.mod h1:ZaXz/vzktgwjyGGFbUWtIQkscfE7WYoRGP2szqAFHR0= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= -k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= -k8s.io/api v0.0.0-20190918155943-95b840bb6a1f/go.mod h1:uWuOHnjmNrtQomJrvEBg0c0HRNyQ+8KTEERVsK0PW48= -k8s.io/api v0.0.0-20191016110408-35e52d86657a h1:VVUE9xTCXP6KUPMf92cQmN88orz600ebexcRRaBTepQ= -k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= -k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= -k8s.io/api v0.0.0-20191122220107-b5267f2975e0/go.mod h1:vYpRfxYkMrmPPSesoHEkGNHxNKTk96REAwqm/inQbs0= -k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8= k8s.io/api v0.18.2 h1:wG5g5ZmSVgm5B+eHMIbI9EGATS2L8Z72rda19RIEgY8= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY= -k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65 h1:kThoiqgMsSwBdMK/lPgjtYTsEjbUU9nXCA9DyU3feok= -k8s.io/apiextensions-apiserver v0.0.0-20191016113550-5357c4baaf65/go.mod h1:5BINdGqggRXXKnDgpwoJ7PyQH8f+Ypp02fvVNcIFy9s= -k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo= +k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= -k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= -k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4= -k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8 h1:Iieh/ZEgT3BWwbLD5qEKcY06jKuPEl6zC7gPSehoLw4= -k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= -k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= -k8s.io/apimachinery v0.0.0-20191121175448-79c2a76c473a/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.2 h1:44CmtbmkzVDAhCpRVSiP2R5PPrC2RtlIv/MoB8xpdRA= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg= -k8s.io/apiserver v0.0.0-20191016112112-5190913f932d/go.mod h1:7OqfAolfWxUM/jJ/HBLyE+cdaWFBUoo5Q5pHgJVj2ws= -k8s.io/apiserver v0.0.0-20191122221311-9d521947b1e1/go.mod h1:RbsZY5zzBIWnz4KbctZsTVjwIuOpTp4Z8oCgFHN4kZQ= -k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw= +k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= -k8s.io/autoscaler v0.0.0-20190607113959-1b4f1855cb8e/go.mod h1:QEXezc9uKPT91dwqhSJq3GNI3B1HxFRQHiku9kmrsSA= -k8s.io/cli-runtime v0.0.0-20191016114015-74ad18325ed5/go.mod h1:sDl6WKSQkDM6zS1u9F49a0VooQ3ycYFBFLqd2jf2Xfo= -k8s.io/cli-runtime v0.18.0/go.mod h1:1eXfmBsIJosjn9LjEBUd2WVPoPAY9XGTqTFcPMIBsUQ= -k8s.io/cli-runtime v0.18.2/go.mod h1:yfFR2sQQzDsV0VEKGZtrJwEy4hLZ2oj4ZIfodgxAHWQ= -k8s.io/client-go v0.0.0-20191016111102-bec269661e48 h1:C2XVy2z0dV94q9hSSoCuTPp1KOG7IegvbdXuz9VGxoU= -k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= +k8s.io/cli-runtime v0.18.6/go.mod h1:+G/WTNqHgUv636e5y7rhOQ7epUbRXnwmPnhOhD6t9uM= k8s.io/client-go v0.18.2 h1:aLB0iaD4nmwh7arT2wIn+lMnAq7OswjaejkQ8p9bBYE= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/cloud-provider v0.0.0-20191016115326-20453efc2458/go.mod h1:O5SO5xcgxrjJV9EC9R/47RuBpbk5YX9URDBlg++FA5o= -k8s.io/cluster-bootstrap v0.0.0-20191016115129-c07a134afb42/go.mod h1:MzCL6kLExQuHruGaqibd8cugC8nw8QRxm3+lzR5l8SI= -k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE= -k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894 h1:NMYlxaF7rYQJk2E2IyrUhaX81zX24+dmoZdkPw0gJqI= -k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894/go.mod h1:mJUgkl06XV4kstAnLHAIzJPVCOzVR+ZcfPIv4fUsFCY= -k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.18.2 h1:C1Nn2JiMf244CvBDKVPX0W2mZFJkVBg54T8OV7/Imso= +k8s.io/client-go v0.18.6 h1:I+oWqJbibLSGsZj8Xs8F0aWVXJVIoUHWaaJV3kUN/Zw= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA= -k8s.io/component-base v0.0.0-20191016111319-039242c015a9/go.mod h1:SuWowIgd/dtU/m/iv8OD9eOxp3QZBBhTIiWMsBQvKjI= -k8s.io/component-base v0.0.0-20191122220729-2684fb322cb9/go.mod h1:NFuUusy/X4Tk21m21tcNUihnmp4OI7lXU7/xA+rYXkc= -k8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/component-base v0.18.2 h1:SJweNZAGcUvsypLGNPNGeJ9UgPZQ6+bW+gEHe8uyh/Y= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= -k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q= -k8s.io/csi-translation-lib v0.0.0-20191016115521-756ffa5af0bd/go.mod h1:lf1VBseeLanBpSXD0N9tuPx1ylI8sA0j6f+rckCKiIk= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f h1:eW/6wVuHNZgQJmFesyAxu0cvj0WAHHUuGaLbPcmNY3Q= -k8s.io/gengo v0.0.0-20191010091904-7fa3014cb28f/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120 h1:RPscN6KhmG54S33L+lr3GS+oD1jmchIU0ll519K6FA4= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/heapster v1.2.0-beta.1/go.mod h1:h1uhptVXMwC8xtZBYsPXKVi8fpdlYkTs6k949KozGrM= -k8s.io/helm v2.16.1+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.3 h1:niceAagH1tzskmaie/icWd7ci1wbG7Bf2c6YGcQv+3c= -k8s.io/klog v0.3.3/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.1.0 h1:X3+Mru/L3jy4BI4vcAYkHvL6PyU+QBsuhEqwlI4mgkA= -k8s.io/klog/v2 v2.1.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/kube-aggregator v0.0.0-20191016112429-9587704a8ad4/go.mod h1:+aW0UZgSXdTSHTIFnWnueEuXjOqerDUxGIw6Ygr+vYY= -k8s.io/kube-controller-manager v0.0.0-20191016114939-2b2b218dc1df/go.mod h1:WgrTcPKYAfNa9C0LV1UeK+XqfbSOUH1WGq/vX5UiW40= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190320154901-5e45bb682580/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d h1:Xpe6sK+RY4ZgCTyZ3y273UmFmURhjtoJiwOMbQsXitY= -k8s.io/kube-openapi v0.0.0-20190918143330-0270cf2f1c1d/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9 h1:5NC2ITmvg8RoxoH0wgmL4zn4VZqXGsKbxrikjaQx6s4= -k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= -k8s.io/kube-proxy v0.0.0-20191016114407-2e83b6f20229/go.mod h1:2Hxci1uzXO5ipP0h9n2+h18fvNkBTpYlckk5dOPu8zg= -k8s.io/kube-scheduler v0.0.0-20191016114748-65049c67a58b/go.mod h1:BgDUHHC5Wl0xcBUQgo2XEprE5nG5i9tlRR4iNgEFbL0= -k8s.io/kube-state-metrics v1.7.2 h1:6vdtgXrrRRMSgnyDmgua+qvgCYv954JNfxXAtDkeLVQ= -k8s.io/kube-state-metrics v1.7.2/go.mod h1:U2Y6DRi07sS85rmVPmBFlmv+2peBcL8IWGjM+IjYA/E= -k8s.io/kubectl v0.0.0-20191016120415-2ed914427d51/go.mod h1:gL826ZTIfD4vXTGlmzgTbliCAT9NGiqpCqK2aNYv5MQ= -k8s.io/kubectl v0.18.0/go.mod h1:LOkWx9Z5DXMEg5KtOjHhRiC1fqJPLyCr3KtQgEolCkU= -k8s.io/kubectl v0.18.2/go.mod h1:OdgFa3AlsPKRpFFYE7ICTwulXOcMGXHTc+UKhHKvrb4= -k8s.io/kubelet v0.0.0-20191016114556-7841ed97f1b2/go.mod h1:SBvrtLbuePbJygVXGGCMtWKH07+qrN2dE1iMnteSG8E= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.16.0/go.mod h1:nlP2zevWKRGKuaaVbKIwozU0Rjg9leVDXkL4YTtjmVs= -k8s.io/kubernetes v1.16.2/go.mod h1:SmhGgKfQ30imqjFVj8AI+iW+zSyFsswNErKYeTfgoH0= -k8s.io/legacy-cloud-providers v0.0.0-20191016115753-cf0698c3a16b/go.mod h1:tKW3pKqdRW8pMveUTpF5pJuCjQxg6a25iLo+Z9BXVH0= -k8s.io/metrics v0.0.0-20191016113814-3b1a734dba6e/go.mod h1:ve7/vMWeY5lEBkZf6Bt5TTbGS3b8wAxwGbdXAsufjRs= -k8s.io/metrics v0.18.0/go.mod h1:8aYTW18koXqjLVKL7Ds05RPMX9ipJZI3mywYvBOxXd4= -k8s.io/metrics v0.18.2/go.mod h1:qga8E7QfYNR9Q89cSCAjinC9pTZ7yv1XSVGUB0vJypg= -k8s.io/repo-infra v0.0.0-20181204233714-00fe14e3d1a3/go.mod h1:+G1xBfZDfVFsm1Tj/HNCvg4QqWx8rJ2Fxpqr1rqp/gQ= -k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9/go.mod h1:sXltHZrQa4jdKL14nOFRRUhhzpmbnRF0qGuAhRQbaxc= -k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191010214722-8d271d903fe4 h1:Gi+/O1saihwDqnlmC8Vhv1M5Sp4+rbOmK9TbsLn8ZEA= -k8s.io/utils v0.0.0-20191010214722-8d271d903fe4/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kubectl v0.18.6 h1:IFPNuLPkZ59vSGQzynXY8XGz9yuOSRpkJupnobdYvO4= +k8s.io/kubectl v0.18.6/go.mod h1:3TLzFOrF9h4mlRPAvdNkDbs5NWspN4e0EnPnEB41CGo= +k8s.io/metrics v0.18.6/go.mod h1:iAwGeabusQNO3duHDM7BBExTUB8L+iq8PM7N9EtQw6g= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7MpmSnvtrOieolJKoE= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/letsencrypt v0.0.1/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= -rsc.io/letsencrypt v0.0.3/go.mod h1:buyQKZ6IXrRnB7TdkHP0RyEybLx18HHyOSoTyoOLqNY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg= -sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns= sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= -sigs.k8s.io/controller-tools v0.2.2/go.mod h1:8SNGuj163x/sMwydREj7ld5mIMJu1cDanIfnx6xsU70= -sigs.k8s.io/controller-tools v0.2.4/go.mod h1:m/ztfQNocGYBgTTCmFdnK94uVvgxeZeE3LtJvd/jIzA= -sigs.k8s.io/controller-tools v0.3.0/go.mod h1:enhtKGfxZD1GFEoMgP8Fdbu+uKQ/cq1/WGJhdVChfvI= -sigs.k8s.io/kubebuilder v1.0.9-0.20200513134826-f07a0146a40b/go.mod h1:FGPx0hvP73+bapzWoy5ePuhAJYgJjrFbPxgvWyortM0= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06 h1:zD2IemQ4LmOcAumeiyDWXKUI2SO0NYDe3H6QGvPOVgU= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/testing_frameworks v0.1.2 h1:vK0+tvjF0BZ/RYFeZ1E6BYBwHJJXhjuZ3TdsEKH+UQM= -sigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w= -sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt new file mode 100644 index 000000000..28a7641a8 --- /dev/null +++ b/hack/boilerplate.go.txt @@ -0,0 +1,13 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. diff --git a/hack/install-kubebuilder.sh b/hack/install-kubebuilder.sh new file mode 100755 index 000000000..0befb55dd --- /dev/null +++ b/hack/install-kubebuilder.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +os=$(go env GOOS) +arch=$(go env GOARCH) +curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/ +sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder +export PATH=$PATH:/usr/local/kubebuilder/bin diff --git a/internal/config/main.go b/internal/config/main.go new file mode 100644 index 000000000..7fc478ea7 --- /dev/null +++ b/internal/config/main.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/spf13/pflag" +) + +// Config holds the static configuration for this operator +type Config struct { + v version.Version + collectorImage string + collectorConfigMapEntry string +} + +// DefaultConfig builds a new configuration populated with the default, immutable values +func DefaultConfig() Config { + return WithVersion(version.Get()) +} + +// WithVersion builds a new configuration using the provided version object +func WithVersion(v version.Version) Config { + return Config{ + v: v, + collectorConfigMapEntry: "collector.yaml", + } +} + +// FlagSet binds the flags to the user-modifiable values of the operator's configuration +func (c *Config) FlagSet() *pflag.FlagSet { + fs := pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) + pflag.StringVar(&c.collectorImage, + "otelcol-image", + fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", c.v.OpenTelemetryCollector), + "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", + ) + + return fs +} + +// CollectorImage represents the flag to override the OpenTelemetry Collector container image. +func (c *Config) CollectorImage() string { + return c.collectorImage +} + +// CollectorConfigMapEntry represents the configuration file name for the collector. Immutable. +func (c *Config) CollectorConfigMapEntry() string { + return c.collectorConfigMapEntry +} diff --git a/pkg/version/main.go b/internal/version/main.go similarity index 69% rename from pkg/version/main.go rename to internal/version/main.go index e8652a220..7036e7d52 100644 --- a/pkg/version/main.go +++ b/internal/version/main.go @@ -3,8 +3,6 @@ package version import ( "fmt" "runtime" - - sdkVersion "github.com/operator-framework/operator-sdk/version" ) var ( @@ -19,7 +17,6 @@ type Version struct { BuildDate string `json:"build-date"` OpenTelemetryCollector string `json:"opentelemetry-collector-version"` Go string `json:"go-version"` - OperatorSdk string `json:"operator-sdk-version"` } // Get returns the Version object with the relevant information @@ -27,25 +24,23 @@ func Get() Version { return Version{ Operator: version, BuildDate: buildDate, - OpenTelemetryCollector: DefaultOpenTelemetryCollector(), + OpenTelemetryCollector: OpenTelemetryCollector(), Go: runtime.Version(), - OperatorSdk: sdkVersion.Version, } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', OperatorSDK='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, v.Go, - v.OperatorSdk, ) } -// DefaultOpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration -func DefaultOpenTelemetryCollector() string { +// OpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration +func OpenTelemetryCollector() string { if len(otelCol) > 0 { // this should always be set, as it's specified during the build return otelCol diff --git a/internal/version/main_test.go b/internal/version/main_test.go new file mode 100644 index 000000000..cb2ec2b0d --- /dev/null +++ b/internal/version/main_test.go @@ -0,0 +1,23 @@ +package version + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("Version management", func() { + It("should have a fallback version", func() { + Expect(OpenTelemetryCollector()).To(Equal("0.0.0")) + }) + + It("should use a version set during the build", func() { + // prepare + otelCol = "0.0.2" // set during the build + defer func() { + otelCol = "" + }() + + Expect(OpenTelemetryCollector()).To(Equal(otelCol)) + Expect(Get()).To(ContainSubstring(otelCol)) + }) +}) diff --git a/internal/version/version_suite_test.go b/internal/version/version_suite_test.go new file mode 100644 index 000000000..fa25d588f --- /dev/null +++ b/internal/version/version_suite_test.go @@ -0,0 +1,13 @@ +package version_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestVersion(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Version Suite") +} diff --git a/main.go b/main.go new file mode 100644 index 000000000..4e4840e25 --- /dev/null +++ b/main.go @@ -0,0 +1,136 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "flag" + "os" + "runtime" + "strings" + + "github.com/spf13/pflag" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + "sigs.k8s.io/controller-runtime/pkg/manager" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + // +kubebuilder:scaffold:imports +) + +var ( + scheme = k8sruntime.NewScheme() + setupLog = ctrl.Log.WithName("setup") +) + +func init() { + utilruntime.Must(clientgoscheme.AddToScheme(scheme)) + + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + // +kubebuilder:scaffold:scheme +} + +func main() { + logger := zap.New(zap.UseDevMode(true)) + + v := version.Get() + logger.Info("Starting the OpenTelemetry Operator", + "opentelemetry-operator", v.Operator, + "opentelemetry-collector", v.OpenTelemetryCollector, + "build-date", v.BuildDate, + "go-version", v.Go, + "go-arch", runtime.GOARCH, + "go-os", runtime.GOOS, + ) + + // registers any flags that underlying libraries might use + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + + var metricsAddr string + var enableLeaderElection bool + pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") + pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, + "Enable leader election for controller manager. "+ + "Enabling this will ensure there is only one active controller manager.") + + // Add flags related to this operator + config := config.WithVersion(v) + pflag.CommandLine.AddFlagSet(config.FlagSet()) + + pflag.Parse() + + ctrl.SetLogger(logger) + + watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") + if found { + setupLog.Info("watching namespace(s)", "namespaces", watchNamespace) + } else { + setupLog.Info("the env var WATCH_NAMESPACE isn't set, watching all namespaces") + } + + mgrOptions := ctrl.Options{ + Scheme: scheme, + MetricsBindAddress: metricsAddr, + Port: 9443, + LeaderElection: enableLeaderElection, + LeaderElectionID: "9f7554c3.opentelemetry.io", + Namespace: watchNamespace, + } + + if strings.Contains(watchNamespace, ",") { + mgrOptions.Namespace = "" + mgrOptions.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(watchNamespace, ",")) + } + + mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), mgrOptions) + if err != nil { + setupLog.Error(err, "unable to start manager") + os.Exit(1) + } + + // adds the upgrade mechanism to be executed once the manager is ready + err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { + return upgrade.ManagedInstances(context.Background(), ctrl.Log.WithName("upgrade"), mgr.GetClient()) + })) + if err != nil { + setupLog.Error(err, "failed to upgrade managed instances") + } + + if err = controllers.NewReconciler(controllers.Params{ + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("OpenTelemetryCollector"), + Scheme: mgr.GetScheme(), + Config: config, + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "OpenTelemetryCollector") + os.Exit(1) + } + // +kubebuilder:scaffold:builder + + setupLog.Info("starting manager") + if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { + setupLog.Error(err, "problem running manager") + os.Exit(1) + } +} diff --git a/pkg/adapters/config_from.go b/pkg/adapters/config_from.go deleted file mode 100644 index 1d7380fdd..000000000 --- a/pkg/adapters/config_from.go +++ /dev/null @@ -1,42 +0,0 @@ -package adapters - -import ( - "context" - "errors" - - "gopkg.in/yaml.v2" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -var ( - // ErrNoInstance represents an error when an instance isn't available in the context - ErrNoInstance = errors.New("couldn't get the opentelemetry-collector instance from the context") - - // ErrInvalidYAML represents an error in the format of the configuration file - ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration to assemble a list of ports for the service") -) - -// ConfigFromCtx extracts a configuration map from the given context. -// If an instance isn't available in the context, ErrNoInstance is returned. -// If the .Spec.Config isn't a valid YAML, ErrInvalidYAML is returned. -func ConfigFromCtx(ctx context.Context) (map[interface{}]interface{}, error) { - switch instance := ctx.Value(opentelemetry.ContextInstance).(type) { - case *v1alpha1.OpenTelemetryCollector: - return ConfigFromString(instance.Spec.Config) - default: - return nil, ErrNoInstance - } -} - -// ConfigFromString extracts a configuration map from the given string. -// If the given string isn't a valid YAML, ErrInvalidYAML is returned. -func ConfigFromString(configStr string) (map[interface{}]interface{}, error) { - config := make(map[interface{}]interface{}) - if err := yaml.Unmarshal([]byte(configStr), &config); err != nil { - return nil, ErrInvalidYAML - } - - return config, nil -} diff --git a/pkg/adapters/config_from_test.go b/pkg/adapters/config_from_test.go deleted file mode 100644 index a5a167a41..000000000 --- a/pkg/adapters/config_from_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package adapters - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -func TestConfigFromCtx(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{} - instance.Spec.Config = "mykey: myval" - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - - // test - config, err := ConfigFromCtx(ctx) - - // verify - assert.NoError(t, err) - assert.EqualValues(t, "myval", config["mykey"]) -} - -func TestConfigFromCtxNoContext(t *testing.T) { - // test - config, err := ConfigFromCtx(context.Background()) - - // verify - assert.Equal(t, ErrNoInstance, err) - assert.Nil(t, config) -} - -func TestConfigFromStringInvalidYAML(t *testing.T) { - // test - config, err := ConfigFromString("🦄") - - // verify - assert.Equal(t, ErrInvalidYAML, err) - assert.Nil(t, config) -} - -func TestConfigFromStringEmptyMap(t *testing.T) { - // test - config, err := ConfigFromString("") - - // verify - assert.Nil(t, err) - assert.Len(t, config, 0) -} diff --git a/pkg/adapters/config_to_ports_test.go b/pkg/adapters/config_to_ports_test.go deleted file mode 100644 index e877bb5b1..000000000 --- a/pkg/adapters/config_to_ports_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package adapters - -import ( - "context" - "errors" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/parser" -) - -var ( - logger = logf.Log.WithName("unit-tests") - ctxWithLogger = context.WithValue(context.Background(), opentelemetry.ContextLogger, logger) -) - -func TestExtractPortsFromConfig(t *testing.T) { - // prepare - configStr := `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" - examplereceiver/settings: - endpoint: "0.0.0.0:12346" - examplereceiver/invalid-ignored: - endpoint: "0.0.0.0" - examplereceiver/invalid-not-number: - endpoint: "0.0.0.0:not-number" - examplereceiver/without-endpoint: - notendpoint: "0.0.0.0:12347" - jaeger: - protocols: - grpc: - thrift_compact: - thrift_binary: - endpoint: 0.0.0.0:6833 - jaeger/custom: - protocols: - thrift_http: - endpoint: 0.0.0.0:15268 -` - - // test - config, err := ConfigFromString(configStr) - require.NoError(t, err) - ports, err := ConfigToReceiverPorts(ctxWithLogger, config) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 6) - - expectedPorts := map[int32]bool{} - expectedPorts[int32(12345)] = false - expectedPorts[int32(12346)] = false - expectedPorts[int32(14250)] = false - expectedPorts[int32(6831)] = false - expectedPorts[int32(6833)] = false - expectedPorts[int32(15268)] = false - - expectedNames := map[string]bool{} - expectedNames["examplereceiver"] = false - expectedNames["examplereceiver-settings"] = false - expectedNames["jaeger-grpc"] = false - expectedNames["jaeger-thrift-compact"] = false - expectedNames["jaeger-thrift-binary"] = false - expectedNames["jaeger-custom-thrift-http"] = false - - // make sure we only have the ports in the set - for _, port := range ports { - assert.Contains(t, expectedPorts, port.Port) - assert.Contains(t, expectedNames, port.Name) - expectedPorts[port.Port] = true - expectedNames[port.Name] = true - } - - // and make sure all the ports from the set are there - for _, val := range expectedPorts { - assert.True(t, val) - } -} - -func TestNoPortsParsed(t *testing.T) { - for _, tt := range []struct { - config string - expected error - }{ - // prepare - { - config: "", - expected: ErrNoReceivers, - }, - { - config: "receivers: some-string", - expected: ErrReceiversNotAMap, - }, - } { - config, err := ConfigFromString(tt.config) - require.NoError(t, err) - - // test - ports, err := ConfigToReceiverPorts(ctxWithLogger, config) - - // verify - assert.Equal(t, tt.expected, err) - assert.Nil(t, ports) - } -} - -func TestInvalidReceiver(t *testing.T) { - for _, tt := range []string{ - // the receiver isn't a map, can't have an endpoint - "receivers:\n some-receiver: string", - - // the receiver's endpoint isn't a string, can't parse the port from it - "receivers:\n some-receiver:\n endpoint: 123", - } { - // test - config, err := ConfigFromString(tt) - require.NoError(t, err) - ports, err := ConfigToReceiverPorts(ctxWithLogger, config) - - // verify - assert.NoError(t, err) - assert.NotNil(t, ports) - assert.Len(t, ports, 0) - } - -} - -func TestParserFailed(t *testing.T) { - // prepare - mockParserCalled := false - mockParser := &mockParser{ - portsFunc: func(context.Context) ([]v1.ServicePort, error) { - mockParserCalled = true - return nil, errors.New("mocked error") - }, - } - parser.Register("mock", func(name string, config map[interface{}]interface{}) parser.ReceiverParser { - return mockParser - }) - - config := map[interface{}]interface{}{ - "receivers": map[interface{}]interface{}{ - "mock": map[interface{}]interface{}{}, - }, - } - - // test - ports, err := ConfigToReceiverPorts(ctxWithLogger, config) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 0) - assert.True(t, mockParserCalled) -} - -type mockParser struct { - portsFunc func(context.Context) ([]corev1.ServicePort, error) -} - -func (m *mockParser) Ports(ctx context.Context) ([]corev1.ServicePort, error) { - if m.portsFunc != nil { - return m.portsFunc(ctx) - } - - return nil, nil -} - -func (m *mockParser) ParserName() string { - return "__mock-adapters" -} diff --git a/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go b/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go deleted file mode 100644 index ee6c25b28..000000000 --- a/pkg/apis/addtoscheme_opentelemetry_v1alpha1.go +++ /dev/null @@ -1,10 +0,0 @@ -package apis - -import ( - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) -} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go deleted file mode 100644 index 07dc96164..000000000 --- a/pkg/apis/apis.go +++ /dev/null @@ -1,13 +0,0 @@ -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/pkg/apis/empty_test.go b/pkg/apis/empty_test.go deleted file mode 100644 index 03fd21c53..000000000 --- a/pkg/apis/empty_test.go +++ /dev/null @@ -1,2 +0,0 @@ -// this file exists to force the coverage tool to count this directory -package apis diff --git a/pkg/apis/opentelemetry/const.go b/pkg/apis/opentelemetry/const.go deleted file mode 100644 index 709896632..000000000 --- a/pkg/apis/opentelemetry/const.go +++ /dev/null @@ -1,32 +0,0 @@ -package opentelemetry - -type ( - // ContextEntry represents a key in the context map - ContextEntry string - - // Mode represents how the collector should be deployed (deployment vs. daemonset) - Mode string -) - -const ( - // ContextInstance is the OpenTelemetryCollector CR (instance) that is the current target of the reconciliation - ContextInstance ContextEntry = "__instance" - - // ContextLogger represents the context entry for the logger instance to be used for context-dependent log entries - ContextLogger ContextEntry = "__logger" - - // ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet - ModeDaemonSet Mode = "daemonset" - - // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment - ModeDeployment Mode = "deployment" - - // CollectorConfigMapEntry represents the configuration file name for the collector - CollectorConfigMapEntry = "collector.yaml" - - // OtelColImageConfigKey represents the key to override the OpenTelemetry Collector container image - OtelColImageConfigKey = "otelcol-image" - - // SvcMonitorAvailable represents the key that indicates whether a ServiceMonitor CRD is known to the cluster - SvcMonitorAvailable = "svc-monitor-avail" -) diff --git a/pkg/apis/opentelemetry/empty_test.go b/pkg/apis/opentelemetry/empty_test.go deleted file mode 100644 index 69082cbb7..000000000 --- a/pkg/apis/opentelemetry/empty_test.go +++ /dev/null @@ -1,2 +0,0 @@ -// this file exists to force the coverage tool to count this directory -package opentelemetry diff --git a/pkg/apis/opentelemetry/flagset.go b/pkg/apis/opentelemetry/flagset.go deleted file mode 100644 index ee015ae48..000000000 --- a/pkg/apis/opentelemetry/flagset.go +++ /dev/null @@ -1,42 +0,0 @@ -package opentelemetry - -import ( - "fmt" - "sync" - - "github.com/spf13/pflag" - "github.com/spf13/viper" - - "github.com/open-telemetry/opentelemetry-operator/pkg/version" -) - -var ( - mu sync.Mutex - fs *pflag.FlagSet -) - -// FlagSet returns this operator's flags -func FlagSet() *pflag.FlagSet { - if nil == fs { - mu.Lock() - defer mu.Unlock() - - otelColVersion := version.Get().OpenTelemetryCollector - - fs = pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) - fs.String( - OtelColImageConfigKey, - fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", otelColVersion), - "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", - ) - // #nosec G104 (CWE-703): Errors unhandled. - viper.BindPFlag(OtelColImageConfigKey, fs.Lookup(OtelColImageConfigKey)) - } - - return fs -} - -// ResetFlagSet will set the cached flagset to nil -func ResetFlagSet() { - fs = nil -} diff --git a/pkg/apis/opentelemetry/v1alpha1/doc.go b/pkg/apis/opentelemetry/v1alpha1/doc.go deleted file mode 100644 index 961c2544a..000000000 --- a/pkg/apis/opentelemetry/v1alpha1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=opentelemetry.io -package v1alpha1 diff --git a/pkg/apis/opentelemetry/v1alpha1/empty_test.go b/pkg/apis/opentelemetry/v1alpha1/empty_test.go deleted file mode 100644 index 64da128b5..000000000 --- a/pkg/apis/opentelemetry/v1alpha1/empty_test.go +++ /dev/null @@ -1,2 +0,0 @@ -// this file exists to force the coverage tool to count this directory -package v1alpha1 diff --git a/pkg/apis/opentelemetry/v1alpha1/register.go b/pkg/apis/opentelemetry/v1alpha1/register.go deleted file mode 100644 index 1f79cf0f0..000000000 --- a/pkg/apis/opentelemetry/v1alpha1/register.go +++ /dev/null @@ -1,17 +0,0 @@ -// Package v1alpha1 contains API Schema definitions for the opentelemetry v1alpha1 API group -// +k8s:deepcopy-gen=package,register -// +groupName=opentelemetry.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/runtime/scheme" -) - -var ( - // SchemeGroupVersion is group version used to register these objects - SchemeGroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} -) diff --git a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go b/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go deleted file mode 100644 index fe089ef1d..000000000 --- a/pkg/apis/opentelemetry/v1alpha1/zz_generated.openapi.go +++ /dev/null @@ -1,209 +0,0 @@ -// +build !ignore_autogenerated - -// Code generated by openapi-gen. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package v1alpha1 - -import ( - spec "github.com/go-openapi/spec" - common "k8s.io/kube-openapi/pkg/common" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollector": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollector(ref), - "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorSpec": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref), - "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorStatus": schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorStatus(ref), - } -} - -func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OpenTelemetryCollector is the Schema for the opentelemetrycollectors API", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Ref: ref("./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorSpec", "./pkg/apis/opentelemetry/v1alpha1.OpenTelemetryCollectorStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "config": { - SchemaProps: spec.SchemaProps{ - Description: "Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.", - Type: []string{"string"}, - Format: "", - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Args is the set of arguments to pass to the OpenTelemetry Collector binary", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of pod instances for the underlying OpenTelemetry Collector", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Image indicates the container image to use for the OpenTelemetry Collector.", - Type: []string{"string"}, - Format: "", - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "Mode represents how the collector should be deployed (deployment vs. daemonset)", - Type: []string{"string"}, - Format: "", - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccount indicates the name of an existing service account to use with this instance.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "VolumeMounts represents the mount points to use in the underlying collector deployment(s)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Volumes represents which volumes to use in the underlying collector deployment(s).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/core/v1.ServicePort"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.Volume", "k8s.io/api/core/v1.VolumeMount"}, - } -} - -func schema_pkg_apis_opentelemetry_v1alpha1_OpenTelemetryCollectorStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"replicas", "version"}, - }, - }, - } -} diff --git a/pkg/client/clientset.go b/pkg/client/clientset.go deleted file mode 100644 index a9f374230..000000000 --- a/pkg/client/clientset.go +++ /dev/null @@ -1,40 +0,0 @@ -package client - -import ( - monclient "github.com/coreos/prometheus-operator/pkg/client/versioned" - "k8s.io/client-go/kubernetes" - "sigs.k8s.io/controller-runtime/pkg/manager" - - otclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned" -) - -// Clientset holds all the clients that the reconciler might need to hold -type Clientset struct { - Kubernetes kubernetes.Interface - Monitoring monclient.Interface - OpenTelemetry otclient.Interface -} - -// ForManager returns a Clientset based on the information from the given manager -func ForManager(mgr manager.Manager) (*Clientset, error) { - cl, err := kubernetes.NewForConfig(mgr.GetConfig()) - if err != nil { - return nil, err - } - - monclient, err := monclient.NewForConfig(mgr.GetConfig()) - if err != nil { - return nil, err - } - - otclient, err := otclient.NewForConfig(mgr.GetConfig()) - if err != nil { - return nil, err - } - - return &Clientset{ - Kubernetes: cl, - Monitoring: monclient, - OpenTelemetry: otclient, - }, nil -} diff --git a/pkg/client/versioned/clientset.go b/pkg/client/versioned/clientset.go deleted file mode 100644 index 8b9733aa4..000000000 --- a/pkg/client/versioned/clientset.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - - opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - opentelemetryV1alpha1 *opentelemetryv1alpha1.OpentelemetryV1alpha1Client -} - -// OpentelemetryV1alpha1 retrieves the OpentelemetryV1alpha1Client -func (c *Clientset) OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface { - return c.opentelemetryV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.opentelemetryV1alpha1, err = opentelemetryv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.opentelemetryV1alpha1 = opentelemetryv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.opentelemetryV1alpha1 = opentelemetryv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/pkg/client/versioned/doc.go b/pkg/client/versioned/doc.go deleted file mode 100644 index 0e0c2a890..000000000 --- a/pkg/client/versioned/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/pkg/client/versioned/fake/clientset_generated.go b/pkg/client/versioned/fake/clientset_generated.go deleted file mode 100644 index 4a15bac24..000000000 --- a/pkg/client/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - - clientset "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned" - opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" - fakeopentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OpentelemetryV1alpha1 retrieves the OpentelemetryV1alpha1Client -func (c *Clientset) OpentelemetryV1alpha1() opentelemetryv1alpha1.OpentelemetryV1alpha1Interface { - return &fakeopentelemetryv1alpha1.FakeOpentelemetryV1alpha1{Fake: &c.Fake} -} diff --git a/pkg/client/versioned/fake/doc.go b/pkg/client/versioned/fake/doc.go deleted file mode 100644 index 3630ed1cd..000000000 --- a/pkg/client/versioned/fake/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/pkg/client/versioned/fake/register.go b/pkg/client/versioned/fake/register.go deleted file mode 100644 index 875ddd768..000000000 --- a/pkg/client/versioned/fake/register.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - - opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - opentelemetryv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/pkg/client/versioned/scheme/doc.go b/pkg/client/versioned/scheme/doc.go deleted file mode 100644 index 14db57a58..000000000 --- a/pkg/client/versioned/scheme/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/pkg/client/versioned/scheme/register.go b/pkg/client/versioned/scheme/register.go deleted file mode 100644 index e16005b08..000000000 --- a/pkg/client/versioned/scheme/register.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - - opentelemetryv1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - opentelemetryv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go deleted file mode 100644 index 93a7ca4e0..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go deleted file mode 100644 index 2b5ba4c8e..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go deleted file mode 100644 index ea6db0066..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetry_client.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - - v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/typed/opentelemetry/v1alpha1" -) - -type FakeOpentelemetryV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOpentelemetryV1alpha1) OpenTelemetryCollectors(namespace string) v1alpha1.OpenTelemetryCollectorInterface { - return &FakeOpenTelemetryCollectors{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOpentelemetryV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go deleted file mode 100644 index 4b3c5988d..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/fake/fake_opentelemetrycollector.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" - - v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// FakeOpenTelemetryCollectors implements OpenTelemetryCollectorInterface -type FakeOpenTelemetryCollectors struct { - Fake *FakeOpentelemetryV1alpha1 - ns string -} - -var opentelemetrycollectorsResource = schema.GroupVersionResource{Group: "opentelemetry.io", Version: "v1alpha1", Resource: "opentelemetrycollectors"} - -var opentelemetrycollectorsKind = schema.GroupVersionKind{Group: "opentelemetry.io", Version: "v1alpha1", Kind: "OpenTelemetryCollector"} - -// Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. -func (c *FakeOpenTelemetryCollectors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OpenTelemetryCollector), err -} - -// List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. -func (c *FakeOpenTelemetryCollectors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(opentelemetrycollectorsResource, opentelemetrycollectorsKind, c.ns, opts), &v1alpha1.OpenTelemetryCollectorList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.OpenTelemetryCollectorList{ListMeta: obj.(*v1alpha1.OpenTelemetryCollectorList).ListMeta} - for _, item := range obj.(*v1alpha1.OpenTelemetryCollectorList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested openTelemetryCollectors. -func (c *FakeOpenTelemetryCollectors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(opentelemetrycollectorsResource, c.ns, opts)) - -} - -// Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *FakeOpenTelemetryCollectors) Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OpenTelemetryCollector), err -} - -// Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *FakeOpenTelemetryCollectors) Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(opentelemetrycollectorsResource, c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OpenTelemetryCollector), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOpenTelemetryCollectors) UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(opentelemetrycollectorsResource, "status", c.ns, openTelemetryCollector), &v1alpha1.OpenTelemetryCollector{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OpenTelemetryCollector), err -} - -// Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. -func (c *FakeOpenTelemetryCollectors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(opentelemetrycollectorsResource, c.ns, name), &v1alpha1.OpenTelemetryCollector{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOpenTelemetryCollectors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(opentelemetrycollectorsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.OpenTelemetryCollectorList{}) - return err -} - -// Patch applies the patch and returns the patched openTelemetryCollector. -func (c *FakeOpenTelemetryCollectors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(opentelemetrycollectorsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OpenTelemetryCollector{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OpenTelemetryCollector), err -} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go deleted file mode 100644 index 4793de80f..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,5 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OpenTelemetryCollectorExpansion interface{} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go deleted file mode 100644 index 7b367e52f..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetry_client.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - rest "k8s.io/client-go/rest" - - v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/scheme" -) - -type OpentelemetryV1alpha1Interface interface { - RESTClient() rest.Interface - OpenTelemetryCollectorsGetter -} - -// OpentelemetryV1alpha1Client is used to interact with features provided by the opentelemetry.io group. -type OpentelemetryV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OpentelemetryV1alpha1Client) OpenTelemetryCollectors(namespace string) OpenTelemetryCollectorInterface { - return newOpenTelemetryCollectors(c, namespace) -} - -// NewForConfig creates a new OpentelemetryV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OpentelemetryV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OpentelemetryV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OpentelemetryV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OpentelemetryV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OpentelemetryV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OpentelemetryV1alpha1Client { - return &OpentelemetryV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *OpentelemetryV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go b/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go deleted file mode 100644 index d00642555..000000000 --- a/pkg/client/versioned/typed/opentelemetry/v1alpha1/opentelemetrycollector.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" - - v1alpha1 "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - scheme "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/scheme" -) - -// OpenTelemetryCollectorsGetter has a method to return a OpenTelemetryCollectorInterface. -// A group's client should implement this interface. -type OpenTelemetryCollectorsGetter interface { - OpenTelemetryCollectors(namespace string) OpenTelemetryCollectorInterface -} - -// OpenTelemetryCollectorInterface has methods to work with OpenTelemetryCollector resources. -type OpenTelemetryCollectorInterface interface { - Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (*v1alpha1.OpenTelemetryCollector, error) - Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) - UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (*v1alpha1.OpenTelemetryCollector, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.OpenTelemetryCollector, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.OpenTelemetryCollectorList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) - OpenTelemetryCollectorExpansion -} - -// openTelemetryCollectors implements OpenTelemetryCollectorInterface -type openTelemetryCollectors struct { - client rest.Interface - ns string -} - -// newOpenTelemetryCollectors returns a OpenTelemetryCollectors -func newOpenTelemetryCollectors(c *OpentelemetryV1alpha1Client, namespace string) *openTelemetryCollectors { - return &openTelemetryCollectors{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the openTelemetryCollector, and returns the corresponding openTelemetryCollector object, and an error if there is any. -func (c *openTelemetryCollectors) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - result = &v1alpha1.OpenTelemetryCollector{} - err = c.client.Get(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of OpenTelemetryCollectors that match those selectors. -func (c *openTelemetryCollectors) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OpenTelemetryCollectorList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.OpenTelemetryCollectorList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested openTelemetryCollectors. -func (c *openTelemetryCollectors) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a openTelemetryCollector and creates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *openTelemetryCollectors) Create(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.CreateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - result = &v1alpha1.OpenTelemetryCollector{} - err = c.client.Post(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(openTelemetryCollector). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a openTelemetryCollector and updates it. Returns the server's representation of the openTelemetryCollector, and an error, if there is any. -func (c *openTelemetryCollectors) Update(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - result = &v1alpha1.OpenTelemetryCollector{} - err = c.client.Put(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - Name(openTelemetryCollector.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(openTelemetryCollector). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *openTelemetryCollectors) UpdateStatus(ctx context.Context, openTelemetryCollector *v1alpha1.OpenTelemetryCollector, opts v1.UpdateOptions) (result *v1alpha1.OpenTelemetryCollector, err error) { - result = &v1alpha1.OpenTelemetryCollector{} - err = c.client.Put(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - Name(openTelemetryCollector.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(openTelemetryCollector). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the openTelemetryCollector and deletes it. Returns an error if one occurs. -func (c *openTelemetryCollectors) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *openTelemetryCollectors) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched openTelemetryCollector. -func (c *openTelemetryCollectors) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OpenTelemetryCollector, err error) { - result = &v1alpha1.OpenTelemetryCollector{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("opentelemetrycollectors"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/collector/adapters/adapters_suite_test.go b/pkg/collector/adapters/adapters_suite_test.go new file mode 100644 index 000000000..75c8c3c76 --- /dev/null +++ b/pkg/collector/adapters/adapters_suite_test.go @@ -0,0 +1,13 @@ +package adapters_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestAdapters(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Adapters Suite") +} diff --git a/pkg/collector/adapters/config_from.go b/pkg/collector/adapters/config_from.go new file mode 100644 index 000000000..5f3466907 --- /dev/null +++ b/pkg/collector/adapters/config_from.go @@ -0,0 +1,23 @@ +package adapters + +import ( + "errors" + + "gopkg.in/yaml.v2" +) + +var ( + // ErrInvalidYAML represents an error in the format of the configuration file + ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration to assemble a list of ports for the service") +) + +// ConfigFromString extracts a configuration map from the given string. +// If the given string isn't a valid YAML, ErrInvalidYAML is returned. +func ConfigFromString(configStr string) (map[interface{}]interface{}, error) { + config := make(map[interface{}]interface{}) + if err := yaml.Unmarshal([]byte(configStr), &config); err != nil { + return nil, ErrInvalidYAML + } + + return config, nil +} diff --git a/pkg/collector/adapters/config_from_test.go b/pkg/collector/adapters/config_from_test.go new file mode 100644 index 000000000..b87fea6fa --- /dev/null +++ b/pkg/collector/adapters/config_from_test.go @@ -0,0 +1,28 @@ +package adapters_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +var _ = Describe("ConfigFromString", func() { + Describe("Invalid YAML", func() { + It("should return an error", func() { + // test + config, err := adapters.ConfigFromString("🦄") + + // verify + Expect(config).To(BeNil()) + Expect(err).To(MatchError(adapters.ErrInvalidYAML)) + }) + }) + + Describe("Empty string", func() { + It("should return an empty config", func() { + // test and verify + Expect(adapters.ConfigFromString("")).To(BeEmpty()) + }) + }) +}) diff --git a/pkg/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go similarity index 84% rename from pkg/adapters/config_to_ports.go rename to pkg/collector/adapters/config_to_ports.go index ba7f76002..b219b2051 100644 --- a/pkg/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -1,14 +1,12 @@ package adapters import ( - "context" "errors" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/parser" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" ) var ( @@ -20,9 +18,7 @@ var ( ) // ConfigToReceiverPorts converts the incoming configuration object into a set of service ports required by the receivers. -func ConfigToReceiverPorts(ctx context.Context, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - +func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { // now, we gather which ports we might need to open // for that, we get all the receivers and check their `endpoint` properties, // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: @@ -56,9 +52,9 @@ func ConfigToReceiverPorts(ctx context.Context, config map[interface{}]interface } rcvrName := key.(string) - rcvrParser := parser.For(rcvrName, receiver) + rcvrParser := parser.For(logger, rcvrName, receiver) - rcvrPorts, err := rcvrParser.Ports(ctx) + rcvrPorts, err := rcvrParser.Ports() if err != nil { // should we break the process and return an error, or just ignore this faulty parser // and let the other parsers add their ports to the service? right now, the best diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go new file mode 100644 index 000000000..afb0ca68f --- /dev/null +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -0,0 +1,169 @@ +package adapters_test + +import ( + "errors" + + "github.com/go-logr/logr" + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" +) + +var _ = Describe("ConfigToReceiverPorts", func() { + logger := logf.Log.WithName("unit-tests") + + Describe("Extract ports from config", func() { + It("extract all known ports", func() { + configStr := `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" + examplereceiver/invalid-ignored: + endpoint: "0.0.0.0" + examplereceiver/invalid-not-number: + endpoint: "0.0.0.0:not-number" + examplereceiver/without-endpoint: + notendpoint: "0.0.0.0:12347" + jaeger: + protocols: + grpc: + thrift_compact: + thrift_binary: + endpoint: 0.0.0.0:6833 + jaeger/custom: + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 +` + + // prepare + config, err := adapters.ConfigFromString(configStr) + Expect(config).ToNot(BeEmpty()) + Expect(err).ToNot(HaveOccurred()) + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + Expect(ports).To(HaveLen(6)) + Expect(err).ToNot(HaveOccurred()) + + // verify + expectedPorts := map[int32]bool{} + expectedPorts[int32(12345)] = false + expectedPorts[int32(12346)] = false + expectedPorts[int32(14250)] = false + expectedPorts[int32(6831)] = false + expectedPorts[int32(6833)] = false + expectedPorts[int32(15268)] = false + + expectedNames := map[string]bool{} + expectedNames["examplereceiver"] = false + expectedNames["examplereceiver-settings"] = false + expectedNames["jaeger-grpc"] = false + expectedNames["jaeger-thrift-compact"] = false + expectedNames["jaeger-thrift-binary"] = false + expectedNames["jaeger-custom-thrift-http"] = false + + // make sure we only have the ports in the set + for _, port := range ports { + Expect(expectedPorts).To(HaveKey(port.Port)) + Expect(expectedNames).To(HaveKey(port.Name)) + expectedPorts[port.Port] = true + expectedNames[port.Name] = true + } + + // and make sure all the ports from the set are there + for _, val := range expectedPorts { + Expect(val).To(BeTrue()) + } + + }) + }) + + DescribeTable("No ports are parsed", + func(configStr string, expected error) { + // prepare + config, err := adapters.ConfigFromString(configStr) + Expect(err).ToNot(HaveOccurred()) + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + + // verify + Expect(ports).To(BeNil()) + Expect(err).To(MatchError(expected)) + }, + Entry("empty", "", adapters.ErrNoReceivers), + Entry("not a map", "receivers: some-string", adapters.ErrReceiversNotAMap), + ) + + DescribeTable("Invalid receivers", + func(configStr string) { + // prepare + config, err := adapters.ConfigFromString(configStr) + Expect(err).ToNot(HaveOccurred()) + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + + // verify + Expect(ports).To(HaveLen(0)) + Expect(err).ToNot(HaveOccurred()) + }, + Entry("receiver isn't a map", "receivers:\n some-receiver: string"), + Entry("receiver's endpoint isn't string", "receivers:\n some-receiver:\n endpoint: 123"), + ) + + Describe("Parser failed", func() { + It("should return an empty list of ports", func() { + // prepare + mockParserCalled := false + mockParser := &mockParser{ + portsFunc: func() ([]v1.ServicePort, error) { + mockParserCalled = true + return nil, errors.New("mocked error") + }, + } + parser.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ReceiverParser { + return mockParser + }) + + config := map[interface{}]interface{}{ + "receivers": map[interface{}]interface{}{ + "mock": map[interface{}]interface{}{}, + }, + } + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + + // verify + Expect(ports).To(HaveLen(0)) + Expect(err).ToNot(HaveOccurred()) + Expect(mockParserCalled).To(BeTrue()) + }) + }) + +}) + +type mockParser struct { + portsFunc func() ([]corev1.ServicePort, error) +} + +func (m *mockParser) Ports() ([]corev1.ServicePort, error) { + if m.portsFunc != nil { + return m.portsFunc() + } + + return nil, nil +} + +func (m *mockParser) ParserName() string { + return "__mock-adapters" +} diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go new file mode 100644 index 000000000..c0deb165d --- /dev/null +++ b/pkg/collector/labels.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector +func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { + // new map every time, so that we don't touch the instance's label + base := map[string]string{} + if nil != instance.Labels { + for k, v := range instance.Labels { + base[k] = v + } + } + + base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) + base["app.kubernetes.io/part-of"] = "opentelemetry" + base["app.kubernetes.io/component"] = "opentelemetry-collector" + + return base +} diff --git a/pkg/collector/parser/parser_suite_test.go b/pkg/collector/parser/parser_suite_test.go new file mode 100644 index 000000000..8c5384c3d --- /dev/null +++ b/pkg/collector/parser/parser_suite_test.go @@ -0,0 +1,13 @@ +package parser_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestParser(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Parser Suite") +} diff --git a/pkg/parser/receiver.go b/pkg/collector/parser/receiver.go similarity index 83% rename from pkg/parser/receiver.go rename to pkg/collector/parser/receiver.go index 7d6a3fcec..466e1f6bc 100644 --- a/pkg/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -1,7 +1,6 @@ package parser import ( - "context" "fmt" "regexp" "strconv" @@ -10,8 +9,6 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" ) var ( @@ -22,14 +19,14 @@ var ( // ReceiverParser is an interface that should be implemented by all receiver parsers type ReceiverParser interface { // Ports returns the service ports parsed based on the receiver's configuration - Ports(context.Context) ([]corev1.ServicePort, error) + Ports() ([]corev1.ServicePort, error) // ParserName returns the name of this parser ParserName() string } // Builder specifies the signature required for parser builders -type Builder func(name string, config map[interface{}]interface{}) ReceiverParser +type Builder func(logr.Logger, string, map[interface{}]interface{}) ReceiverParser // registry holds a record of all known parsers var registry = make(map[string]Builder) @@ -45,9 +42,9 @@ func BuilderFor(name string) Builder { } // For returns a new parser for the given receiver name + config -func For(name string, config map[interface{}]interface{}) ReceiverParser { +func For(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { builder := BuilderFor(name) - return builder(name, config) + return builder(logger, name, config) } // Register adds a new parser builder to the list of known builders @@ -55,8 +52,13 @@ func Register(name string, builder Builder) { registry[name] = builder } -func singlePortFromConfigEndpoint(ctx context.Context, name string, config map[interface{}]interface{}) *v1.ServicePort { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) +// IsRegistered checks whether a parser is registered with the given name +func IsRegistered(name string) bool { + _, ok := registry[name] + return ok +} + +func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *v1.ServicePort { endpoint, ok := config["endpoint"] if !ok { logger.V(2).Info("receiver doesn't have an endpoint") diff --git a/pkg/parser/receiver_carbon.go b/pkg/collector/parser/receiver_carbon.go similarity index 66% rename from pkg/parser/receiver_carbon.go rename to pkg/collector/parser/receiver_carbon.go index 8c0da5de7..29b0daf34 100644 --- a/pkg/parser/receiver_carbon.go +++ b/pkg/collector/parser/receiver_carbon.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameCarbon = "__carbon" // NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository -func NewCarbonReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewCarbonReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 2003, diff --git a/pkg/parser/receiver_carbon_test.go b/pkg/collector/parser/receiver_carbon_test.go similarity index 100% rename from pkg/parser/receiver_carbon_test.go rename to pkg/collector/parser/receiver_carbon_test.go diff --git a/pkg/parser/receiver_collectd.go b/pkg/collector/parser/receiver_collectd.go similarity index 67% rename from pkg/parser/receiver_collectd.go rename to pkg/collector/parser/receiver_collectd.go index 4591e3b19..fa275633a 100644 --- a/pkg/parser/receiver_collectd.go +++ b/pkg/collector/parser/receiver_collectd.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameCollectd = "__collectd" // NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository -func NewCollectdReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewCollectdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 8081, diff --git a/pkg/parser/receiver_collectd_test.go b/pkg/collector/parser/receiver_collectd_test.go similarity index 100% rename from pkg/parser/receiver_collectd_test.go rename to pkg/collector/parser/receiver_collectd_test.go diff --git a/pkg/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go similarity index 75% rename from pkg/parser/receiver_generic.go rename to pkg/collector/parser/receiver_generic.go index caf03d898..a62d719bf 100644 --- a/pkg/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -1,8 +1,7 @@ package parser import ( - "context" - + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" ) @@ -12,6 +11,7 @@ var _ ReceiverParser = &GenericReceiver{} // GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly type GenericReceiver struct { + logger logr.Logger name string config map[interface{}]interface{} defaultPort int32 @@ -19,8 +19,9 @@ type GenericReceiver struct { } // NewGenericReceiverParser builds a new parser for generic receivers -func NewGenericReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, parserName: parserNameGeneric, @@ -28,8 +29,8 @@ func NewGenericReceiverParser(name string, config map[interface{}]interface{}) R } // Ports returns all the service ports for all protocols in this parser -func (g *GenericReceiver) Ports(ctx context.Context) ([]corev1.ServicePort, error) { - port := singlePortFromConfigEndpoint(ctx, g.name, g.config) +func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { + port := singlePortFromConfigEndpoint(g.logger, g.name, g.config) if port != nil { return []corev1.ServicePort{*port}, nil } diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go new file mode 100644 index 000000000..f4e8907dc --- /dev/null +++ b/pkg/collector/parser/receiver_generic_test.go @@ -0,0 +1,100 @@ +package parser_test + +import ( + "github.com/go-logr/logr" + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" +) + +var _ = Describe("Generic receivers", func() { + logger := logf.Log.WithName("unit-tests") + + It("should parse the endpoint", func() { + // prepare + // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser + builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(1)) + Expect(ports[0].Port).To(BeEquivalentTo(1234)) + }) + + It("should have failed to parse the endpoint", func() { + // prepare + // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser + builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0", + }) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(0)) + }) + + DescribeTable("downstream parsers", + func(receiverName, parserName string, defaultPort int, builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser) { + Describe("builds successfully", func() { + // test + builder := builder(logger, receiverName, map[interface{}]interface{}{}) + + // verify + Expect(builder.ParserName()).To(Equal(parserName)) + }) + + Describe("assigns the expected port", func() { + // prepare + builder := builder(logger, receiverName, map[interface{}]interface{}{}) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(1)) + Expect(ports[0].Port).To(BeEquivalentTo(defaultPort)) + Expect(ports[0].Name).To(Equal(receiverName)) + }) + + Describe("allows port to be overridden", func() { + // prepare + builder := builder(logger, receiverName, map[interface{}]interface{}{ + "endpoint": "0.0.0.0:65535", + }) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(1)) + Expect(ports[0].Port).To(BeEquivalentTo(65535)) + Expect(ports[0].Name).To(Equal(receiverName)) + }) + }, + Entry("zipkin", "zipkin", "__zipkin", 9411, parser.NewZipkinReceiverParser), + Entry("opencensus", "opencensus", "__opencensus", 55678, parser.NewOpenCensusReceiverParser), + Entry("otlp", "otlp", "__otlp", 55680, parser.NewOTLPReceiverParser), + + // contrib receivers + Entry("carbon", "carbon", "__carbon", 2003, parser.NewCarbonReceiverParser), + Entry("collectd", "collectd", "__collectd", 8081, parser.NewCollectdReceiverParser), + Entry("sapm", "sapm", "__sapm", 7276, parser.NewSAPMReceiverParser), + Entry("signalfx", "signalfx", "__signalfx", 9943, parser.NewSignalFxReceiverParser), + Entry("wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser), + Entry("zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser), + ) + +}) diff --git a/pkg/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go similarity index 87% rename from pkg/parser/receiver_jaeger.go rename to pkg/collector/parser/receiver_jaeger.go index 39b168e2d..ec3ff16a4 100644 --- a/pkg/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -1,9 +1,9 @@ package parser import ( - "context" "fmt" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" ) @@ -20,14 +20,16 @@ const ( // JaegerReceiverParser parses the configuration for Jaeger-specific receivers type JaegerReceiverParser struct { + logger logr.Logger name string config map[interface{}]interface{} } // NewJaegerReceiverParser builds a new parser for Jaeger receivers -func NewJaegerReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &JaegerReceiverParser{ + logger: logger, name: name, config: protocols, } @@ -40,7 +42,7 @@ func NewJaegerReceiverParser(name string, config map[interface{}]interface{}) Re } // Ports returns all the service ports for all protocols in this parser -func (j *JaegerReceiverParser) Ports(ctx context.Context) ([]corev1.ServicePort, error) { +func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { ports := []corev1.ServicePort{} for _, protocol := range []struct { @@ -73,7 +75,7 @@ func (j *JaegerReceiverParser) Ports(ctx context.Context) ([]corev1.ServicePort, // do we have a configuration block for the protocol? settings, ok := receiverProtocol.(map[interface{}]interface{}) if ok { - protocolPort = singlePortFromConfigEndpoint(ctx, nameWithProtocol, settings) + protocolPort = singlePortFromConfigEndpoint(j.logger, nameWithProtocol, settings) } // have we parsed a port based on the configuration block? diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go new file mode 100644 index 000000000..863771355 --- /dev/null +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -0,0 +1,101 @@ +package parser_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" +) + +var _ = Describe("Jaeger receiver", func() { + logger := logf.Log.WithName("unit-tests") + + It("should have self registered", func() { + // verify + Expect(parser.IsRegistered("jaeger")).To(BeTrue()) + }) + + It("should be found via its parser name", func() { + // test + p := parser.For(logger, "jaeger", map[interface{}]interface{}{}) + + // verify + Expect(p.ParserName()).To(Equal("__jaeger")) + }) + + It("should build with a minimal configuration", func() { + // prepare + builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + }, + }) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(1)) + Expect(ports[0].Port).To(BeEquivalentTo(14250)) + }) + + It("should allow ports to be overridden", func() { + // prepare + builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, + }, + }) + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(1)) + Expect(ports[0].Port).To(BeEquivalentTo(1234)) + }) + + It("should expose the default ports", func() { + // prepare + builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "thrift_http": map[interface{}]interface{}{}, + "thrift_compact": map[interface{}]interface{}{}, + "thrift_binary": map[interface{}]interface{}{}, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "jaeger-grpc": {portNumber: 14250}, + "jaeger-thrift-http": {portNumber: 14268}, + "jaeger-thrift-compact": {portNumber: 6831}, + "jaeger-thrift-binary": {portNumber: 6832}, + } + + // test + ports, err := builder.Ports() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(ports).To(HaveLen(4)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + Expect(port.Port).To(BeEquivalentTo(r.portNumber)) + } + for k, v := range expectedResults { + Expect(v.seen).To(BeTrue(), "the port %s wasn't included in the service ports", k) + } + }) +}) diff --git a/pkg/parser/receiver_oc.go b/pkg/collector/parser/receiver_oc.go similarity index 65% rename from pkg/parser/receiver_oc.go rename to pkg/collector/parser/receiver_oc.go index c7fbcbdf8..ee188dd82 100644 --- a/pkg/parser/receiver_oc.go +++ b/pkg/collector/parser/receiver_oc.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameOpenCensus = "__opencensus" // NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers -func NewOpenCensusReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewOpenCensusReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 55678, diff --git a/pkg/parser/receiver_oc_test.go b/pkg/collector/parser/receiver_oc_test.go similarity index 100% rename from pkg/parser/receiver_oc_test.go rename to pkg/collector/parser/receiver_oc_test.go diff --git a/pkg/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go similarity index 63% rename from pkg/parser/receiver_otlp.go rename to pkg/collector/parser/receiver_otlp.go index e6396d405..acf19b6fa 100644 --- a/pkg/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameOTLP = "__otlp" // NewOTLPReceiverParser builds a new parser for OTLP receivers -func NewOTLPReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 55680, diff --git a/pkg/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go similarity index 100% rename from pkg/parser/receiver_otlp_test.go rename to pkg/collector/parser/receiver_otlp_test.go diff --git a/pkg/parser/receiver_sapm.go b/pkg/collector/parser/receiver_sapm.go similarity index 65% rename from pkg/parser/receiver_sapm.go rename to pkg/collector/parser/receiver_sapm.go index fcb911ab5..ba1cef23f 100644 --- a/pkg/parser/receiver_sapm.go +++ b/pkg/collector/parser/receiver_sapm.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameSAPM = "__sapm" // NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository -func NewSAPMReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewSAPMReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 7276, diff --git a/pkg/parser/receiver_sapm_test.go b/pkg/collector/parser/receiver_sapm_test.go similarity index 100% rename from pkg/parser/receiver_sapm_test.go rename to pkg/collector/parser/receiver_sapm_test.go diff --git a/pkg/parser/receiver_signalfx.go b/pkg/collector/parser/receiver_signalfx.go similarity index 67% rename from pkg/parser/receiver_signalfx.go rename to pkg/collector/parser/receiver_signalfx.go index f4f5ec758..9676aa871 100644 --- a/pkg/parser/receiver_signalfx.go +++ b/pkg/collector/parser/receiver_signalfx.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameSignalFx = "__signalfx" // NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository -func NewSignalFxReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewSignalFxReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 9943, diff --git a/pkg/parser/receiver_signalfx_test.go b/pkg/collector/parser/receiver_signalfx_test.go similarity index 100% rename from pkg/parser/receiver_signalfx_test.go rename to pkg/collector/parser/receiver_signalfx_test.go diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go new file mode 100644 index 000000000..e44b0aa46 --- /dev/null +++ b/pkg/collector/parser/receiver_test.go @@ -0,0 +1,100 @@ +package parser + +import ( + "github.com/go-logr/logr" + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" +) + +var _ = Describe("Receiver", func() { + logger := logf.Log.WithName("unit-tests") + + DescribeTable("port names", + func(candidate string, port int, expected string) { + // test and verify + Expect(portName(candidate, int32(port))).To(Equal(expected)) + }, + Entry("regular case", "my-receiver", 123, "my-receiver"), + Entry("name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", 123, "port-123"), + Entry("name with invalid chars", "my-🦄-receiver", 123, "port-123"), + Entry("name starting with invalid char", "-my-receiver", 123, "port-123"), + ) + + DescribeTable("receiver type", + func(name string, expected string) { + // test and verify + Expect(receiverType(name)).To(Equal(expected)) + }, + Entry("regular case", "myreceiver", "myreceiver"), + Entry("named instance", "myreceiver/custom", "myreceiver"), + ) + + DescribeTable("parse port from endpoint", + func(endpoint string, expected int, errorExpected bool) { + // test + val, err := portFromEndpoint(endpoint) + if errorExpected { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).ToNot(HaveOccurred()) + } + + Expect(val).To(BeEquivalentTo(expected), "wrong port from endpoint %s: %d", endpoint, val) + }, + Entry("regular case", "http://localhost:1234", 1234, false), + Entry("no protocol", "0.0.0.0:1234", 1234, false), + Entry("just port", ":1234", 1234, false), + Entry("no port at all", "http://localhost", 0, true), + ) + + It("should fail when the port isn't a string", func() { + // prepare + config := map[interface{}]interface{}{ + "endpoint": 123, + } + + // test + p := singlePortFromConfigEndpoint(logger, "myreceiver", config) + + // verify + Expect(p).To(BeNil()) + }) + + It("should fallback to generic parser when receiver isn't registered", func() { + // test + p := For(logger, "myreceiver", map[interface{}]interface{}{}) + + // test + Expect(p.ParserName()).To(Equal("__generic")) + }) + + It("should find a registered parser", func() { + // prepare + builderCalled := false + Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + builderCalled = true + return &mockParser{} + }) + + // test + For(logger, "mock", map[interface{}]interface{}{}) + + // verify + Expect(builderCalled).To(BeTrue()) + }) +}) + +type mockParser struct { + portsFunc func() ([]corev1.ServicePort, error) +} + +func (m *mockParser) Ports() ([]corev1.ServicePort, error) { + return nil, nil +} + +func (m *mockParser) ParserName() string { + return "__mock" +} diff --git a/pkg/parser/receiver_wavefront.go b/pkg/collector/parser/receiver_wavefront.go similarity index 67% rename from pkg/parser/receiver_wavefront.go rename to pkg/collector/parser/receiver_wavefront.go index 86358e28d..1b123dcf9 100644 --- a/pkg/parser/receiver_wavefront.go +++ b/pkg/collector/parser/receiver_wavefront.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameWavefront = "__wavefront" // NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository -func NewWavefrontReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewWavefrontReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 2003, diff --git a/pkg/parser/receiver_wavefront_test.go b/pkg/collector/parser/receiver_wavefront_test.go similarity index 100% rename from pkg/parser/receiver_wavefront_test.go rename to pkg/collector/parser/receiver_wavefront_test.go diff --git a/pkg/parser/receiver_zipkin-scribe.go b/pkg/collector/parser/receiver_zipkin-scribe.go similarity index 66% rename from pkg/parser/receiver_zipkin-scribe.go rename to pkg/collector/parser/receiver_zipkin-scribe.go index b7e0f0fbf..075e1196b 100644 --- a/pkg/parser/receiver_zipkin-scribe.go +++ b/pkg/collector/parser/receiver_zipkin-scribe.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameZipkinScribe = "__zipkinscribe" // NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers -func NewZipkinScribeReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewZipkinScribeReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 9410, diff --git a/pkg/parser/receiver_zipkin-scribe_test.go b/pkg/collector/parser/receiver_zipkin-scribe_test.go similarity index 100% rename from pkg/parser/receiver_zipkin-scribe_test.go rename to pkg/collector/parser/receiver_zipkin-scribe_test.go diff --git a/pkg/parser/receiver_zipkin.go b/pkg/collector/parser/receiver_zipkin.go similarity index 64% rename from pkg/parser/receiver_zipkin.go rename to pkg/collector/parser/receiver_zipkin.go index 7c45edb5c..18e1ac660 100644 --- a/pkg/parser/receiver_zipkin.go +++ b/pkg/collector/parser/receiver_zipkin.go @@ -1,10 +1,13 @@ package parser +import "github.com/go-logr/logr" + const parserNameZipkin = "__zipkin" // NewZipkinReceiverParser builds a new parser for Zipkin receivers -func NewZipkinReceiverParser(name string, config map[interface{}]interface{}) ReceiverParser { +func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ + logger: logger, name: name, config: config, defaultPort: 9411, diff --git a/pkg/parser/receiver_zipkin_test.go b/pkg/collector/parser/receiver_zipkin_test.go similarity index 100% rename from pkg/parser/receiver_zipkin_test.go rename to pkg/collector/parser/receiver_zipkin_test.go diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go new file mode 100644 index 000000000..26236238d --- /dev/null +++ b/pkg/collector/reconcile/configmap.go @@ -0,0 +1,148 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// ConfigMaps reconciles the config map(s) required for the instance in the current context +func ConfigMaps(ctx context.Context, params Params) error { + desired := []corev1.ConfigMap{ + desiredConfigMap(ctx, params), + } + + // first, handle the create/update parts + if err := expectedConfigMaps(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected deployments: %v", err) + } + + // then, delete the extra objects + if err := deleteConfigMaps(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + } + + return nil +} + +func desiredConfigMap(ctx context.Context, params Params) corev1.ConfigMap { + name := fmt.Sprintf("%s-collector", params.Instance.Name) + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + return corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Data: map[string]string{ + "collector.yaml": params.Instance.Spec.Config, + }, + } +} + +func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap) error { + for _, obj := range expected { + desired := obj + + controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + + existing := &corev1.ConfigMap{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && errors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Data = desired.Data + updated.BinaryData = desired.BinaryData + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := params.Client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) + } + + return nil +} + +func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &corev1.ConfigMapList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go new file mode 100644 index 000000000..ecbef1ce5 --- /dev/null +++ b/pkg/collector/reconcile/daemonset.go @@ -0,0 +1,225 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// DaemonSets reconciles the daemon set(s) required for the instance in the current context +func DaemonSets(ctx context.Context, params Params) error { + desired := []appsv1.DaemonSet{} + if params.Instance.Spec.Mode == "daemonset" { + desired = append(desired, desiredDaemonSet(ctx, params)) + } + + // first, handle the create/update parts + if err := expectedDaemonSets(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected daemon sets: %v", err) + } + + // then, delete the extra objects + if err := deleteDaemonSets(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the daemon sets to be deleted: %v", err) + } + + return nil +} + +func desiredDaemonSet(ctx context.Context, params Params) appsv1.DaemonSet { + name := fmt.Sprintf("%s-collector", params.Instance.Name) + + image := params.Instance.Spec.Image + if len(image) == 0 { + image = params.Config.CollectorImage() + } + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + annotations := params.Instance.Annotations + if annotations == nil { + annotations = map[string]string{} + } + + annotations["prometheus.io/scrape"] = "true" + annotations["prometheus.io/port"] = "8888" + annotations["prometheus.io/path"] = "/metrics" + + argsMap := params.Instance.Spec.Args + if argsMap == nil { + argsMap = map[string]string{} + } + + if _, exists := argsMap["config"]; exists { + params.Log.Info("the 'config' flag isn't allowed and is being ignored") + } + + // this effectively overrides any 'config' entry that might exist in the CR + argsMap["config"] = fmt.Sprintf("/conf/%s", params.Config.CollectorConfigMapEntry()) + + var args []string + for k, v := range argsMap { + args = append(args, fmt.Sprintf("--%s=%s", k, v)) + } + + configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) + volumeMounts := []corev1.VolumeMount{{ + Name: configMapVolumeName, + MountPath: "/conf", + }} + volumes := []corev1.Volume{{ + Name: configMapVolumeName, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: name}, + Items: []corev1.KeyToPath{{ + Key: params.Config.CollectorConfigMapEntry(), + Path: params.Config.CollectorConfigMapEntry(), + }}, + }, + }, + }} + + if len(params.Instance.Spec.VolumeMounts) > 0 { + volumeMounts = append(volumeMounts, params.Instance.Spec.VolumeMounts...) + } + + if len(params.Instance.Spec.Volumes) > 0 { + volumes = append(volumes, params.Instance.Spec.Volumes...) + } + + return appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Spec: appsv1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountNameFor(params.Instance), + Containers: []corev1.Container{{ + Name: "opentelemetry-collector", + Image: image, + VolumeMounts: volumeMounts, + Args: args, + }}, + Volumes: volumes, + }, + }, + }, + } + +} + +func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { + for _, obj := range expected { + desired := obj + + controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + + existing := &appsv1.DaemonSet{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := params.Client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) + } + + return nil +} + +func deleteDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &appsv1.DaemonSetList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go new file mode 100644 index 000000000..0e29ff406 --- /dev/null +++ b/pkg/collector/reconcile/deployment.go @@ -0,0 +1,225 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// Deployments reconciles the deployment(s) required for the instance in the current context +func Deployments(ctx context.Context, params Params) error { + desired := []appsv1.Deployment{} + if len(params.Instance.Spec.Mode) == 0 || params.Instance.Spec.Mode == "deployment" { + desired = append(desired, desiredDeployment(ctx, params)) + } + + // first, handle the create/update parts + if err := expectedDeployments(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected deployments: %v", err) + } + + // then, delete the extra objects + if err := deleteDeployments(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + } + + return nil +} + +func desiredDeployment(ctx context.Context, params Params) appsv1.Deployment { + name := fmt.Sprintf("%s-collector", params.Instance.Name) + + image := params.Instance.Spec.Image + if len(image) == 0 { + image = params.Config.CollectorImage() + } + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + annotations := params.Instance.Annotations + if annotations == nil { + annotations = map[string]string{} + } + + annotations["prometheus.io/scrape"] = "true" + annotations["prometheus.io/port"] = "8888" + annotations["prometheus.io/path"] = "/metrics" + + argsMap := params.Instance.Spec.Args + if argsMap == nil { + argsMap = map[string]string{} + } + + if _, exists := argsMap["config"]; exists { + params.Log.Info("the 'config' flag isn't allowed and is being ignored") + } + + // this effectively overrides any 'config' entry that might exist in the CR + argsMap["config"] = fmt.Sprintf("/conf/%s", params.Config.CollectorConfigMapEntry()) + + var args []string + for k, v := range argsMap { + args = append(args, fmt.Sprintf("--%s=%s", k, v)) + } + + configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) + volumeMounts := []corev1.VolumeMount{{ + Name: configMapVolumeName, + MountPath: "/conf", + }} + volumes := []corev1.Volume{{ + Name: configMapVolumeName, + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: name}, + Items: []corev1.KeyToPath{{ + Key: params.Config.CollectorConfigMapEntry(), + Path: params.Config.CollectorConfigMapEntry(), + }}, + }, + }, + }} + + if len(params.Instance.Spec.VolumeMounts) > 0 { + volumeMounts = append(volumeMounts, params.Instance.Spec.VolumeMounts...) + } + + if len(params.Instance.Spec.Volumes) > 0 { + volumes = append(volumes, params.Instance.Spec.Volumes...) + } + + return appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: params.Instance.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountNameFor(params.Instance), + Containers: []corev1.Container{{ + Name: "opentelemetry-collector", + Image: image, + VolumeMounts: volumeMounts, + Args: args, + }}, + Volumes: volumes, + }, + }, + }, + } +} + +func expectedDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { + for _, obj := range expected { + desired := obj + + controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + + existing := &appsv1.Deployment{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := params.Client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) + } + + return nil +} + +func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &appsv1.DeploymentList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go new file mode 100644 index 000000000..fea53fcc1 --- /dev/null +++ b/pkg/collector/reconcile/params.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "github.com/go-logr/logr" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +// Params holds the reconciliation-specific parameters +type Params struct { + Config config.Config + Client client.Client + Instance v1alpha1.OpenTelemetryCollector + Log logr.Logger + Scheme *runtime.Scheme +} diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go new file mode 100644 index 000000000..2c20a8cc9 --- /dev/null +++ b/pkg/collector/reconcile/service.go @@ -0,0 +1,273 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/go-logr/logr" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +// Services reconciles the service(s) required for the instance in the current context +func Services(ctx context.Context, params Params) error { + desired := []corev1.Service{} + + type builder func(context.Context, Params) *corev1.Service + for _, builder := range []builder{desiredService, headless, monitoringService} { + svc := builder(ctx, params) + // add only the non-nil to the list + if svc != nil { + desired = append(desired, *svc) + } + } + + // first, handle the create/update parts + if err := expectedServices(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected services: %v", err) + } + + // then, delete the extra objects + if err := deleteServices(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the services to be deleted: %v", err) + } + + return nil +} + +func desiredService(ctx context.Context, params Params) *corev1.Service { + name := fmt.Sprintf("%s-collector", params.Instance.Name) + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + // by coincidence, the selector is the same as the label, but note that the selector points to the deployment + // whereas 'labels' refers to the service + selector := labels + + config, err := adapters.ConfigFromString(params.Instance.Spec.Config) + if err != nil { + params.Log.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(params.Log, config) + if err != nil { + params.Log.Error(err, "couldn't build the service for this instance") + return nil + } + + if len(params.Instance.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) + resultingInferredPorts := []corev1.ServicePort{} + for _, inferred := range ports { + if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) + } + + // if we have no ports, we don't need a service + if len(ports) == 0 { + params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.Instance.Name, "instance.namespace", params.Instance.Namespace) + return nil + } + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + ClusterIP: "", + Ports: ports, + }, + } +} + +func headless(ctx context.Context, params Params) *corev1.Service { + h := desiredService(ctx, params) + if h == nil { + return nil + } + + h.Name = fmt.Sprintf("%s-headless", h.Name) + h.Spec.ClusterIP = "None" + return h +} + +func monitoringService(ctx context.Context, params Params) *corev1.Service { + name := fmt.Sprintf("%s-collector-monitoring", params.Instance.Name) + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + selector := collector.Labels(params.Instance) + selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-collector", params.Instance.Name) + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + ClusterIP: "", + Ports: []corev1.ServicePort{{ + Name: "monitoring", + Port: 8888, + }}, + }, + } +} + +func expectedServices(ctx context.Context, params Params, expected []corev1.Service) error { + for _, obj := range expected { + desired := obj + + controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + + existing := &corev1.Service{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "service.name", desired.Name, "service.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := params.Client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) + } + + return nil +} + +func deleteServices(ctx context.Context, params Params, expected []corev1.Service) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &corev1.ServiceList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) + } + } + + return nil +} + +func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { + if portNumbers[candidate.Port] { + return nil + } + + // do we have the port name there already? + if portNames[candidate.Name] { + // there's already a port with the same name! do we have a 'port-%d' already? + fallbackName := fmt.Sprintf("port-%d", candidate.Port) + if portNames[fallbackName] { + // that wasn't expected, better skip this port + logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", + "inferred-port-name", candidate.Name, + "fallback-port-name", fallbackName, + ) + return nil + } + + candidate.Name = fallbackName + return &candidate + } + + // this port is unique, return as is + return &candidate +} + +func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { + numbers := map[int32]bool{} + names := map[string]bool{} + + for _, port := range ports { + numbers[port.Port] = true + names[port.Name] = true + } + + return numbers, names +} diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go new file mode 100644 index 000000000..a2d67b25d --- /dev/null +++ b/pkg/collector/reconcile/serviceaccount.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// ServiceAccounts reconciles the service account(s) required for the instance in the current context +func ServiceAccounts(ctx context.Context, params Params) error { + desired := []corev1.ServiceAccount{ + desiredServiceAccount(ctx, params), + } + + // first, handle the create/update parts + if err := expectedServiceAccounts(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected service accounts: %v", err) + } + + // then, delete the extra objects + if err := deleteServiceAccounts(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the service accounts to be deleted: %v", err) + } + + return nil +} + +func desiredServiceAccount(ctx context.Context, params Params) corev1.ServiceAccount { + name := fmt.Sprintf("%s-collector", params.Instance.Name) + + labels := collector.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + return corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + } +} + +func expectedServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { + for _, obj := range expected { + desired := obj + + controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + + existing := &corev1.ServiceAccount{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + if err := params.Client.Update(ctx, updated); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) + } + + return nil +} + +func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &corev1.ServiceAccountList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, existing := range list.Items { + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "serviceaccount.name", existing.Name, "serviceaccount.namespace", existing.Namespace) + } + } + + return nil +} + +// ServiceAccountNameFor returns the name of the service account for the given context +func ServiceAccountNameFor(instance v1alpha1.OpenTelemetryCollector) string { + if len(instance.Spec.ServiceAccount) == 0 { + return fmt.Sprintf("%s-collector", instance.Name) + } + + return instance.Spec.ServiceAccount +} diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go new file mode 100644 index 000000000..e1b8b0bd3 --- /dev/null +++ b/pkg/collector/upgrade/upgrade.go @@ -0,0 +1,81 @@ +package upgrade + +import ( + "context" + "fmt" + "reflect" + + "github.com/go-logr/logr" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary +func ManagedInstances(ctx context.Context, logger logr.Logger, cl client.Client) error { + logger.Info("looking for managed instances to upgrade") + + opts := []client.ListOption{ + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &v1alpha1.OpenTelemetryCollectorList{} + if err := cl.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for _, j := range list.Items { + otelcol, err := ManagedInstance(ctx, logger, cl, &j) + if err != nil { + // nothing to do at this level, just go to the next instance + continue + } + + if !reflect.DeepEqual(otelcol, j) { + // the resource update overrides the status, so, keep it so that we can reset it later + st := otelcol.Status + if err := cl.Update(ctx, otelcol); err != nil { + logger.Error(err, "failed to apply changes to instance", "name", otelcol.Name, "namespace", otelcol.Namespace) + continue + } + + // the status object requires its own update + otelcol.Status = st + if err := cl.Status().Update(ctx, otelcol); err != nil { + logger.Error(err, "failed to apply changes to instance's status object", "name", otelcol.Name, "namespace", otelcol.Namespace) + continue + } + + logger.Info("instance upgraded", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + } + } + + if len(list.Items) == 0 { + logger.Info("no instances to upgrade") + } + + return nil +} + +// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version +func ManagedInstance(ctx context.Context, logger logr.Logger, cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if v, ok := versions[otelcol.Status.Version]; ok { + // we don't need to run the upgrade function for the version 'v', only the next ones + for n := v.next; n != nil; n = n.next { + // performs the upgrade to version 'n' + upgraded, err := n.upgrade(cl, otelcol) + if err != nil { + logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) + return otelcol, err + } + + logger.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", n.Tag) + upgraded.Status.Version = n.Tag + otelcol = upgraded + } + } + + logger.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/upgrade_suite_test.go b/pkg/collector/upgrade/upgrade_suite_test.go new file mode 100644 index 000000000..c49710cfe --- /dev/null +++ b/pkg/collector/upgrade/upgrade_suite_test.go @@ -0,0 +1,57 @@ +package upgrade_test + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "k8s.io/client-go/rest" + "k8s.io/kubectl/pkg/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestUpgrade(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Upgrade Suite") +} + +var _ = BeforeSuite(func(done Done) { + logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + } + + var err error + cfg, err = testEnv.Start() + Expect(err).ToNot(HaveOccurred()) + Expect(cfg).ToNot(BeNil()) + + err = v1alpha1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).ToNot(HaveOccurred()) + Expect(k8sClient).ToNot(BeNil()) + + close(done) +}, 60) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).ToNot(HaveOccurred()) +}) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go new file mode 100644 index 000000000..9b61d484b --- /dev/null +++ b/pkg/collector/upgrade/upgrade_test.go @@ -0,0 +1,56 @@ +package upgrade_test + +import ( + "context" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +var _ = Describe("Upgrade", func() { + logger := logf.Log.WithName("unit-tests") + + It("should upgrade to the latest", func() { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } + existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function + err := k8sClient.Create(context.Background(), &existing) + Expect(err).To(Succeed()) + + err = k8sClient.Status().Update(context.Background(), &existing) + Expect(err).To(Succeed()) + + // sanity check + persisted := &v1alpha1.OpenTelemetryCollector{} + err = k8sClient.Get(context.Background(), nsn, persisted) + Expect(err).To(Succeed()) + Expect(persisted.Status.Version).To(Equal("0.0.1")) + + // test + err = upgrade.ManagedInstances(context.Background(), logger, k8sClient) + Expect(err).To(Succeed()) + + // verify + err = k8sClient.Get(context.Background(), nsn, persisted) + Expect(err).To(Succeed()) + Expect(persisted.Status.Version).To(Equal(upgrade.Latest.Tag)) + + // cleanup + Expect(k8sClient.Delete(context.Background(), &existing)) + }) +}) diff --git a/pkg/collector/upgrade/v0_2_0.go b/pkg/collector/upgrade/v0_2_0.go new file mode 100644 index 000000000..e8f01e415 --- /dev/null +++ b/pkg/collector/upgrade/v0_2_0.go @@ -0,0 +1,13 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func upgrade0_2_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + // this has the same content as `noop`, but it's added a separate function + // to serve as template for versions with an actual upgrade procedure + return otelcol, nil +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go new file mode 100644 index 000000000..f1305e05f --- /dev/null +++ b/pkg/collector/upgrade/versions.go @@ -0,0 +1,35 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// Version represents a known OpenTelemetry Collector version +type Version struct { + // Tag represents the tag for this version, like: 0.0.1 + Tag string + + upgrade func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) + next *Version +} + +var ( + v0_0_1 = Version{Tag: "0.0.1", upgrade: noop, next: &v0_0_2} + v0_0_2 = Version{Tag: "0.0.2", upgrade: noop, next: &v0_2_0} + v0_2_0 = Version{Tag: "0.2.0", upgrade: upgrade0_2_0} + + // Latest represents the latest known version for the OpenTelemetry Collector + Latest = &v0_2_0 + + versions = map[string]Version{ + v0_0_1.Tag: v0_0_1, + v0_0_2.Tag: v0_0_2, + v0_2_0.Tag: v0_2_0, + } +) + +func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + return otelcol, nil +} diff --git a/pkg/controller/add_opentelemetrycollector.go b/pkg/controller/add_opentelemetrycollector.go deleted file mode 100644 index bda65864b..000000000 --- a/pkg/controller/add_opentelemetrycollector.go +++ /dev/null @@ -1,10 +0,0 @@ -package controller - -import ( - "github.com/open-telemetry/opentelemetry-operator/pkg/controller/opentelemetrycollector" -) - -func init() { - // AddToManagerFuncs is a list of functions to create controllers and add them to a manager. - AddToManagerFuncs = append(AddToManagerFuncs, opentelemetrycollector.Add) -} diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go deleted file mode 100644 index 7c069f3ee..000000000 --- a/pkg/controller/controller.go +++ /dev/null @@ -1,18 +0,0 @@ -package controller - -import ( - "sigs.k8s.io/controller-runtime/pkg/manager" -) - -// AddToManagerFuncs is a list of functions to add all Controllers to the Manager -var AddToManagerFuncs []func(manager.Manager) error - -// AddToManager adds all Controllers to the Manager -func AddToManager(m manager.Manager) error { - for _, f := range AddToManagerFuncs { - if err := f(m); err != nil { - return err - } - } - return nil -} diff --git a/pkg/controller/empty_test.go b/pkg/controller/empty_test.go deleted file mode 100644 index 6323e14cc..000000000 --- a/pkg/controller/empty_test.go +++ /dev/null @@ -1,2 +0,0 @@ -// this file exists to force the coverage tool to count this directory -package controller diff --git a/pkg/controller/opentelemetrycollector/labels.go b/pkg/controller/opentelemetrycollector/labels.go deleted file mode 100644 index cb03194db..000000000 --- a/pkg/controller/opentelemetrycollector/labels.go +++ /dev/null @@ -1,29 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// commonLabels return the common labels to all objects that are part of a managed OpenTelemetryCollector -func commonLabels(ctx context.Context) map[string]string { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - - // new map every time, so that we don't touch the instance's label - base := map[string]string{} - if nil != instance.Labels { - for k, v := range instance.Labels { - base[k] = v - } - } - - base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) - base["app.kubernetes.io/part-of"] = "opentelemetry" - base["app.kubernetes.io/component"] = "opentelemetry-collector" - - return base -} diff --git a/pkg/controller/opentelemetrycollector/labels_test.go b/pkg/controller/opentelemetrycollector/labels_test.go deleted file mode 100644 index b718aa189..000000000 --- a/pkg/controller/opentelemetrycollector/labels_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -func TestNilLabels(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-otelcol", - Namespace: "observability", - Labels: nil, - }, - } - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - - // test - labels := commonLabels(ctx) - - // verify - assert.NotNil(t, labels) - assert.Contains(t, labels, "app.kubernetes.io/managed-by") - assert.Contains(t, labels, "app.kubernetes.io/instance") - assert.Contains(t, labels, "app.kubernetes.io/part-of") - assert.Contains(t, labels, "app.kubernetes.io/component") -} - -func TestInstanceName(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-otelcol", - Namespace: "observability", - Labels: nil, - }, - } - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - - // test - labels := commonLabels(ctx) - - // verify - assert.Equal(t, labels["app.kubernetes.io/instance"], "observability.my-otelcol") -} diff --git a/pkg/controller/opentelemetrycollector/main_test.go b/pkg/controller/opentelemetrycollector/main_test.go deleted file mode 100644 index d1a82dac4..000000000 --- a/pkg/controller/opentelemetrycollector/main_test.go +++ /dev/null @@ -1,53 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "os" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes/scheme" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -var ( - instance *v1alpha1.OpenTelemetryCollector - ctx context.Context - schem *runtime.Scheme - baseTestConfig = `receivers: - first: - endpoint: localhost:1234 -` -) - -// TestMain ensures that all tests in this package have a fresh and sane instance of the common resources -func TestMain(m *testing.M) { - schem = scheme.Scheme - schem.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.OpenTelemetryCollector{}) - - gvk := v1alpha1.SchemeGroupVersion.WithKind("OpenTelemetryCollector") - instance = &v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - // TypeMeta is added by Kubernetes, there's no need for consumers to set this manually - Kind: gvk.Kind, - APIVersion: gvk.GroupVersion().String(), - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "my-otelcol", - Namespace: "observability", - Labels: map[string]string{"custom-label": "custom-value"}, - Annotations: map[string]string{"custom-annotation": "custom-annotation-value"}, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: baseTestConfig, - }, - } - ctx = context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - os.Exit(m.Run()) -} diff --git a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go b/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go deleted file mode 100644 index 13cc46aec..000000000 --- a/pkg/controller/opentelemetrycollector/opentelemetrycollector_controller.go +++ /dev/null @@ -1,42 +0,0 @@ -package opentelemetrycollector - -import ( - "sigs.k8s.io/controller-runtime/pkg/controller" - "sigs.k8s.io/controller-runtime/pkg/handler" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - "sigs.k8s.io/controller-runtime/pkg/source" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -var log = logf.Log.WithName("controller_opentelemetrycollector") - -// Add creates a new OpenTelemetryCollector Controller and adds it to the Manager. The Manager will set fields on the Controller -// and Start it when the Manager is Started. -func Add(mgr manager.Manager) error { - r, err := WithManager(mgr) - if err != nil { - return err - } - - return add(mgr, r) -} - -// add adds a new Controller to mgr with r as the reconcile.Reconciler -func add(mgr manager.Manager, r reconcile.Reconciler) error { - // Create a new controller - c, err := controller.New("opentelemetrycollector-controller", mgr, controller.Options{Reconciler: r}) - if err != nil { - return err - } - - // Watch for changes to primary resource OpenTelemetryCollector - err = c.Watch(&source.Kind{Type: &v1alpha1.OpenTelemetryCollector{}}, &handler.EnqueueRequestForObject{}) - if err != nil { - return err - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/reconcile.go b/pkg/controller/opentelemetrycollector/reconcile.go deleted file mode 100644 index 8df60d1a6..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile.go +++ /dev/null @@ -1,147 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - "time" - - "k8s.io/apimachinery/pkg/api/errors" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "sigs.k8s.io/controller-runtime/pkg/manager" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" -) - -// blank assignment to verify that ReconcileOpenTelemetryCollector implements reconcile.Reconciler -var _ reconcile.Reconciler = &ReconcileOpenTelemetryCollector{} - -// ReconcileOpenTelemetryCollector reconciles a OpenTelemetryCollector object -type ReconcileOpenTelemetryCollector struct { - // This client, initialized using mgr.Client() above, is a split client - // that reads objects from the cache and writes to the apiserver - scheme *runtime.Scheme - - // the clients that compose this reconciler - clientset *client.Clientset - - // the list of reconciliation functions to execute - reconcileFuncs []func(context.Context) error -} - -// WithManager creates a new reconciler based on the manager information -func WithManager(manager manager.Manager) (*ReconcileOpenTelemetryCollector, error) { - cl, err := client.ForManager(manager) - if err != nil { - return nil, err - } - - return New(manager.GetScheme(), cl), nil -} - -// New constructs a ReconcileOpenTelemetryCollector based on the client and scheme, with the default reconciliation functions -func New(scheme *runtime.Scheme, clientset *client.Clientset) *ReconcileOpenTelemetryCollector { - r := &ReconcileOpenTelemetryCollector{ - scheme: scheme, - clientset: clientset, - } - r.reconcileFuncs = []func(context.Context) error{ - r.reconcileServiceAccount, - r.reconcileConfigMap, - r.reconcileService, - r.reconcileDeployment, - r.reconcileDaemonSet, - r.reconcileServiceMonitor, - } - - return r -} - -// Reconcile reads that state of the cluster for a OpenTelemetryCollector object and makes changes based on the state read -// and what is in the OpenTelemetryCollector.Spec -func (r *ReconcileOpenTelemetryCollector) Reconcile(request reconcile.Request) (reconcile.Result, error) { - // the base context for this whole reconciliation loop - ctx := context.Background() - - reqLogger := log.WithValues( - "Request.Namespace", request.Namespace, - "Request.Name", request.Name, - "Request.ID", time.Now().UTC().UnixNano(), - ) - reqLogger.Info("Reconciling OpenTelemetryCollector") - - otelCols := r.clientset.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(request.Namespace) - - // Fetch the OpenTelemetryCollector instance - instance, err := otelCols.Get(ctx, request.Name, v1.GetOptions{}) - if err != nil { - if errors.IsNotFound(err) { - // Request object not found, could have been deleted after reconcile request. - // Owned objects are automatically garbage collected. For additional cleanup logic use finalizers. - // Return and don't requeue - reqLogger.Info("OpenTelemetryCollector was deleted, reconciliation terminated") - return reconcile.Result{}, nil - } - // Error reading the object - requeue the request. - return reconcile.Result{}, err - } - - // set the execution context for this reconcile loop - ctx = context.WithValue(ctx, opentelemetry.ContextInstance, instance) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, reqLogger) - - if err := r.applyUpgrades(ctx); err != nil { - reqLogger.Error(err, "failed to upgrade the custom resource and its underlying resources, reconciliation aborted") - return reconcile.Result{}, err - } - - if err := r.handleReconcile(ctx); err != nil { - reqLogger.Error(err, "failed to reconcile custom resource") - return reconcile.Result{}, err - } - - // update the status object, which might have also been updated - if instance, err = otelCols.UpdateStatus(ctx, instance, v1.UpdateOptions{}); err != nil { - reqLogger.Error(err, "failed to store the custom resource's status") - return reconcile.Result{}, err - } - - // apply it back, as it might have been updated - if _, err := otelCols.Update(ctx, instance, v1.UpdateOptions{}); err != nil { - reqLogger.Error(err, "failed to store back the custom resource") - return reconcile.Result{}, err - } - - reqLogger.Info("Finished reconciling OpenTelemetryCollector") - return reconcile.Result{}, nil -} - -// handleReconcile compares the existing state vs. the expected state and performs the necessary actions to make the two match -func (r *ReconcileOpenTelemetryCollector) handleReconcile(ctx context.Context) error { - if nil == r.reconcileFuncs { - // nothing to do! - return nil - } - - for _, f := range r.reconcileFuncs { - if err := f(ctx); err != nil { - return fmt.Errorf("reconciliation failed: %v", err) - } - } - - return nil -} - -// setControllerReference should be used by the individual reconcile functions to establish the ownership of the underlying resources -func (r *ReconcileOpenTelemetryCollector) setControllerReference(ctx context.Context, object v1.Object) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - return controllerutil.SetControllerReference(instance, object, r.scheme) -} - -func resourceName(instanceName string) string { - return fmt.Sprintf("%s-collector", instanceName) -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap.go b/pkg/controller/opentelemetrycollector/reconcile_configmap.go deleted file mode 100644 index 3d4864bb0..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap.go +++ /dev/null @@ -1,140 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileConfigMap reconciles the config map(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileConfigMap(ctx context.Context) error { - desired := []*corev1.ConfigMap{ - configMap(ctx), - } - - // first, handle the create/update parts - if err := r.reconcileExpectedConfigMaps(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %v", err) - } - - // then, delete the extra objects - if err := r.deleteConfigMaps(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) - } - - return nil -} - -func configMap(ctx context.Context) *corev1.ConfigMap { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := fmt.Sprintf("%s-collector", instance.Name) - - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - - return &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - Data: map[string]string{ - opentelemetry.CollectorConfigMapEntry: instance.Spec.Config, - }, - } -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedConfigMaps(ctx context.Context, expected []*corev1.ConfigMap) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - cmaps := r.clientset.Kubernetes.CoreV1().ConfigMaps(desired.Namespace) - - existing, err := cmaps.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { - if desired, err = cmaps.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("configmap.name", desired.Name, "configmap.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to get: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Data = desired.Data - updated.BinaryData = desired.BinaryData - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if updated, err = cmaps.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes: %v", err) - } - logger.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteConfigMaps(ctx context.Context, expected []*corev1.ConfigMap) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - cmaps := r.clientset.Kubernetes.CoreV1().ConfigMaps(instance.Namespace) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - list, err := cmaps.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := cmaps.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go b/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go deleted file mode 100644 index 82a4106dc..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_configmap_test.go +++ /dev/null @@ -1,115 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperConfigMap(t *testing.T) { - // test - c := configMap(ctx) - - // verify - assert.Equal(t, c.Name, "my-otelcol-collector") - assert.Equal(t, c.Annotations["custom-annotation"], "custom-annotation-value") - assert.Equal(t, c.Labels["custom-label"], "custom-value") - assert.Equal(t, c.Labels["app.kubernetes.io/name"], c.Name) - assert.Equal(t, c.Data[opentelemetry.CollectorConfigMapEntry], baseTestConfig) -} - -func TestProperReconcileConfigMap(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - - // test - _, err := reconciler.Reconcile(req) - assert.NoError(t, err) - - // verify - list, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - assert.NoError(t, err) - - // we assert the correctness of the service in another test - assert.Len(t, list.Items, 1) - - // we assert the correctness of the reference in another test - assert.Len(t, list.Items[0].OwnerReferences, 1) -} - -func TestUpdateConfigMap(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - reconciler.Reconcile(req) - - // sanity check - name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Equal(t, baseTestConfig, persisted.Data[opentelemetry.CollectorConfigMapEntry]) - - // prepare the test object - updated := *instance - updated.Spec.Config = "updated-config-map" - - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - // test - reconciler.reconcileConfigMap(ctx) - - // verify - persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Equal(t, "updated-config-map", persisted.Data[opentelemetry.CollectorConfigMapEntry]) -} - -func TestDeleteExtraConfigMap(t *testing.T) { - // prepare - c := configMap(ctx) - c.Name = "extra-config-map" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - err = reconciler.reconcileConfigMap(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.CoreV1().ConfigMaps(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Nil(t, persisted) - assert.Error(t, err) // not found -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset.go deleted file mode 100644 index a0c37feb2..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset.go +++ /dev/null @@ -1,213 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - "github.com/spf13/viper" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileDaemonSet reconciles the daemonSet(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileDaemonSet(ctx context.Context) error { - desired := daemonSets(ctx) - - // first, handle the create/update parts - if err := r.reconcileExpectedDaemonSets(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected daemonSets: %v", err) - } - - // then, delete the extra objects - if err := r.deleteDaemonSets(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the daemonSets to be deleted: %v", err) - } - - return nil -} - -func daemonSets(ctx context.Context) []*appsv1.DaemonSet { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - - var desired []*appsv1.DaemonSet - if instance.Spec.Mode == opentelemetry.ModeDaemonSet { - desired = append(desired, daemonSet(ctx)) - } - - return desired -} - -func daemonSet(ctx context.Context) *appsv1.DaemonSet { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - name := resourceName(instance.Name) - - image := instance.Spec.Image - if len(image) == 0 { - image = viper.GetString(opentelemetry.OtelColImageConfigKey) - } - - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - - specAnnotations := instance.Annotations - if specAnnotations == nil { - specAnnotations = map[string]string{} - } - - specAnnotations["prometheus.io/scrape"] = "true" - specAnnotations["prometheus.io/port"] = "8888" - specAnnotations["prometheus.io/path"] = "/metrics" - - argsMap := instance.Spec.Args - if argsMap == nil { - argsMap = map[string]string{} - } - - if _, exists := argsMap["config"]; exists { - logger.Info("the 'config' flag isn't allowed and is being ignored") - } - - // this effectively overrides any 'config' entry that might exist in the CR - argsMap["config"] = fmt.Sprintf("/conf/%s", opentelemetry.CollectorConfigMapEntry) - - var args []string - for k, v := range argsMap { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) - } - - return &appsv1.DaemonSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - Spec: appsv1.DaemonSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: specAnnotations, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "opentelemetry-collector", - Image: image, - VolumeMounts: []corev1.VolumeMount{{ - Name: name, - MountPath: "/conf", - }}, - Args: args, - }}, - Volumes: []corev1.Volume{{ - Name: name, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: name}, - Items: []corev1.KeyToPath{{ - Key: opentelemetry.CollectorConfigMapEntry, - Path: opentelemetry.CollectorConfigMapEntry, - }}, - }, - }, - }}, - }, - }, - }, - } -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDaemonSets(ctx context.Context, expected []*appsv1.DaemonSet) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - dsets := r.clientset.Kubernetes.AppsV1().DaemonSets(desired.Namespace) - - existing, err := dsets.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { - if existing, err = dsets.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to get: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if updated, err = dsets.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes: %v", err) - } - logger.V(2).Info("applied", "daemonSet.name", desired.Name, "daemonSet.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteDaemonSets(ctx context.Context, expected []*appsv1.DaemonSet) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - dsets := r.clientset.Kubernetes.AppsV1().DaemonSets(instance.Namespace) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - list, err := dsets.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := dsets.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "daemonSet.name", existing.Name, "daemonSet.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go b/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go deleted file mode 100644 index aadf9045b..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_daemonset_test.go +++ /dev/null @@ -1,206 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/spf13/viper" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperDaemonSet(t *testing.T) { - // test - d := daemonSet(ctx) - - // verify - assert.Equal(t, d.Name, "my-otelcol-collector") - assert.Equal(t, d.Annotations["custom-annotation"], "custom-annotation-value") - assert.Equal(t, d.Labels["custom-label"], "custom-value") - assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) -} - -func TestProperDaemonSets(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{} - instance.Spec.Mode = opentelemetry.ModeDaemonSet - ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) - - // test - d := daemonSets(ctx) - - // verify - assert.Len(t, d, 1) -} - -func TestNoDaemonSetsWhenModeDaemonSet(t *testing.T) { - // prepare - d := daemonSets(ctx) - - // verify - assert.Len(t, d, 0) -} - -func TestDaemonSetOverridesConfig(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Args: map[string]string{"config": "custom-path"}, - Mode: opentelemetry.ModeDaemonSet, - }, - } - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - // test - d := daemonSet(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Len(t, d.Spec.Template.Spec.Containers[0].Args, 1) - assert.Contains(t, d.Spec.Template.Spec.Containers[0].Args[0], "/conf/collector.yaml") -} - -func TestProperReconcileDaemonSet(t *testing.T) { - // prepare - instance := *instance - instance.Spec.Mode = opentelemetry.ModeDaemonSet - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - - // test - reconciler.Reconcile(req) - - // verify - list, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - assert.NoError(t, err) - - // we assert the correctness of the service in another test - assert.Len(t, list.Items, 1) - - // we assert the correctness of the reference in another test - assert.Len(t, list.Items[0].OwnerReferences, 1) -} - -func TestOverrideDaemonSetImageFromCustomResource(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "myrepo/custom-image:version", - Mode: opentelemetry.ModeDaemonSet, - }, - } - ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) - - // test - d := daemonSet(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "myrepo/custom-image:version", d.Spec.Template.Spec.Containers[0].Image) -} - -func TestOverrideDaemonSetImageFromCLI(t *testing.T) { - // prepare - viper.Set(opentelemetry.OtelColImageConfigKey, "myrepo/custom-image-cli:version") - defer viper.Reset() - defer opentelemetry.ResetFlagSet() - - // test - d := daemonSet(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "myrepo/custom-image-cli:version", d.Spec.Template.Spec.Containers[0].Image) -} - -func TestDefaultDaemonSetImage(t *testing.T) { - // prepare - opentelemetry.FlagSet() - defer opentelemetry.ResetFlagSet() - - // test - d := daemonSet(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Contains(t, d.Spec.Template.Spec.Containers[0].Image, "quay.io/opentelemetry/opentelemetry-collector") -} - -func TestUpdateDaemonSet(t *testing.T) { - // prepare - instance := *instance - instance.Spec.Mode = opentelemetry.ModeDaemonSet - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(&instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - reconciler.Reconcile(req) - - // sanity check - name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - - // prepare the test object - updated := instance - updated.Spec.Image = "custom-image" - - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - // test - reconciler.reconcileDaemonSet(ctx) - - // verify - persisted, err = clients.Kubernetes.AppsV1().DaemonSets(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) -} - -func TestDeleteExtraDaemonSet(t *testing.T) { - // prepare - c := daemonSet(ctx) - c.Name = "extra-daemonSet" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - err = reconciler.reconcileDaemonSet(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.AppsV1().DaemonSets(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Nil(t, persisted) - assert.Error(t, err) // not found -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment.go b/pkg/controller/opentelemetrycollector/reconcile_deployment.go deleted file mode 100644 index 02b0c775a..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment.go +++ /dev/null @@ -1,227 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - "github.com/spf13/viper" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileDeployment reconciles the deployment(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileDeployment(ctx context.Context) error { - desired := deployments(ctx) - - // first, handle the create/update parts - if err := r.reconcileExpectedDeployments(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %v", err) - } - - // then, delete the extra objects - if err := r.deleteDeployments(ctx, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) - } - - return nil -} - -func deployments(ctx context.Context) []*appsv1.Deployment { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - - var desired []*appsv1.Deployment - if len(instance.Spec.Mode) == 0 || instance.Spec.Mode == opentelemetry.ModeDeployment { - desired = append(desired, deployment(ctx)) - } - - return desired -} - -func deployment(ctx context.Context) *appsv1.Deployment { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - name := resourceName(instance.Name) - - image := instance.Spec.Image - if len(image) == 0 { - image = viper.GetString(opentelemetry.OtelColImageConfigKey) - } - - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - - specAnnotations := instance.Annotations - if specAnnotations == nil { - specAnnotations = map[string]string{} - } - - specAnnotations["prometheus.io/scrape"] = "true" - specAnnotations["prometheus.io/port"] = "8888" - specAnnotations["prometheus.io/path"] = "/metrics" - - argsMap := instance.Spec.Args - if argsMap == nil { - argsMap = map[string]string{} - } - - if _, exists := argsMap["config"]; exists { - logger.Info("the 'config' flag isn't allowed and is being ignored") - } - - // this effectively overrides any 'config' entry that might exist in the CR - argsMap["config"] = fmt.Sprintf("/conf/%s", opentelemetry.CollectorConfigMapEntry) - - var args []string - for k, v := range argsMap { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) - } - - configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) - volumeMounts := []corev1.VolumeMount{{ - Name: configMapVolumeName, - MountPath: "/conf", - }} - volumes := []corev1.Volume{{ - Name: configMapVolumeName, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: name}, - Items: []corev1.KeyToPath{{ - Key: opentelemetry.CollectorConfigMapEntry, - Path: opentelemetry.CollectorConfigMapEntry, - }}, - }, - }, - }} - - if len(instance.Spec.VolumeMounts) > 0 { - volumeMounts = append(volumeMounts, instance.Spec.VolumeMounts...) - } - - if len(instance.Spec.Volumes) > 0 { - volumes = append(volumes, instance.Spec.Volumes...) - } - - return &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: instance.Spec.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: specAnnotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountNameFor(ctx), - Containers: []corev1.Container{{ - Name: "opentelemetry-collector", - Image: image, - VolumeMounts: volumeMounts, - Args: args, - }}, - Volumes: volumes, - }, - }, - }, - } -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedDeployments(ctx context.Context, expected []*appsv1.Deployment) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - deps := r.clientset.Kubernetes.AppsV1().Deployments(desired.Namespace) - - existing, err := deps.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { - if existing, err = deps.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("deployment.name", desired.Name, "deployment.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to get: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if updated, err = deps.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes: %v", err) - } - logger.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteDeployments(ctx context.Context, expected []*appsv1.Deployment) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - deps := r.clientset.Kubernetes.AppsV1().Deployments(instance.Namespace) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - list, err := deps.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := deps.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go b/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go deleted file mode 100644 index 4668da3e3..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_deployment_test.go +++ /dev/null @@ -1,230 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/spf13/viper" - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperDeployment(t *testing.T) { - // test - d := deployment(ctx) - - // verify - assert.Equal(t, d.Name, "my-otelcol-collector") - assert.Equal(t, d.Annotations["custom-annotation"], "custom-annotation-value") - assert.Equal(t, d.Labels["custom-label"], "custom-value") - assert.Equal(t, d.Labels["app.kubernetes.io/name"], d.Name) - assert.Equal(t, ServiceAccountNameFor(ctx), d.Spec.Template.Spec.ServiceAccountName) -} - -func TestProperDeployments(t *testing.T) { - // test - d := deployments(ctx) - - // verify - assert.Len(t, d, 1) -} - -func TestNoDeploymentsWhenModeDaemonSet(t *testing.T) { - // test - instance := &v1alpha1.OpenTelemetryCollector{} - instance.Spec.Mode = opentelemetry.ModeDaemonSet - ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) - - // prepare - d := deployments(ctx) - - // verify - assert.Len(t, d, 0) -} - -func TestDeploymentOverridesConfig(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Args: map[string]string{"config": "custom-path"}, - }, - } - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - // test - d := deployment(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Len(t, d.Spec.Template.Spec.Containers[0].Args, 1) - assert.Contains(t, d.Spec.Template.Spec.Containers[0].Args[0], "/conf/collector.yaml") -} - -func TestProperReconcileDeployment(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - - // test - reconciler.Reconcile(req) - - // verify - list, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - assert.NoError(t, err) - - // we assert the correctness of the service in another test - assert.Len(t, list.Items, 1) - - // we assert the correctness of the reference in another test - assert.Len(t, list.Items[0].OwnerReferences, 1) -} - -func TestOverrideDeploymentImageFromCustomResource(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "myrepo/custom-image:version", - }, - } - ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) - - // test - d := deployment(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "myrepo/custom-image:version", d.Spec.Template.Spec.Containers[0].Image) -} - -func TestOverrideDeploymentImageFromCLI(t *testing.T) { - // prepare - viper.Set(opentelemetry.OtelColImageConfigKey, "myrepo/custom-image-cli:version") - defer viper.Reset() - defer opentelemetry.ResetFlagSet() - - // test - d := deployment(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "myrepo/custom-image-cli:version", d.Spec.Template.Spec.Containers[0].Image) -} - -func TestDefaultDeploymentImage(t *testing.T) { - // prepare - opentelemetry.FlagSet() - defer opentelemetry.ResetFlagSet() - - // test - d := deployment(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Contains(t, d.Spec.Template.Spec.Containers[0].Image, "quay.io/opentelemetry/opentelemetry-collector") -} - -func TestUpdateDeployment(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - reconciler.Reconcile(req) - - // sanity check - name := resourceName(instance.Name) - persisted, err := clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - - // prepare the test object - updated := *instance - updated.Spec.Image = "custom-image" - - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &updated) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - // test - reconciler.reconcileDeployment(ctx) - - // verify - persisted, err = clients.Kubernetes.AppsV1().Deployments(instance.Namespace).Get(context.Background(), name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Len(t, persisted.Spec.Template.Spec.Containers, 1) - assert.Equal(t, "custom-image", persisted.Spec.Template.Spec.Containers[0].Image) -} - -func TestDeleteExtraDeployment(t *testing.T) { - // prepare - c := deployment(ctx) - c.Name = "extra-deployment" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - err = reconciler.reconcileDeployment(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.AppsV1().Deployments(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Nil(t, persisted) - assert.Error(t, err) // not found -} - -func TestDeploymentWithVolumes(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Volumes: []v1.Volume{{ - Name: "tls-certs-volume", - }}, - VolumeMounts: []v1.VolumeMount{{ - Name: "tls-certs-volumemount", - }}, - }, - } - ctx := context.WithValue(ctx, opentelemetry.ContextInstance, instance) - - // test - d := deployment(ctx) - - // verify - assert.Len(t, d.Spec.Template.Spec.Volumes, 2) // config + the one from the CR - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - assert.Len(t, d.Spec.Template.Spec.Containers[0].VolumeMounts, 2) // config + the one from the CR - - // the deployment should contain the volume we specified - assert.Contains(t, d.Spec.Template.Spec.Volumes, instance.Spec.Volumes[0]) - - // the deployment should contain the volumemount we specified - assert.Contains(t, d.Spec.Template.Spec.Containers[0].VolumeMounts, instance.Spec.VolumeMounts[0]) -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_service.go b/pkg/controller/opentelemetrycollector/reconcile_service.go deleted file mode 100644 index 88fff02a0..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_service.go +++ /dev/null @@ -1,267 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - errs "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileService reconciles the service(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileService(ctx context.Context) error { - svcs := []*corev1.Service{} - for _, s := range []*corev1.Service{service(ctx), monitoringService(ctx), headless(ctx)} { - // add only the non-nil to the list - if s != nil { - svcs = append(svcs, s) - } - } - - // first, handle the create/update parts - if err := r.reconcileExpectedServices(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the expected services: %v", err) - } - - // then, delete the extra objects - if err := r.deleteServices(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the services to be deleted: %v", err) - } - - return nil -} - -func service(ctx context.Context) *corev1.Service { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - - name := resourceName(instance.Name) - labels := serviceLabels(ctx, name) - - // by coincidence, the selector is the same as the label, but note that the selector points to the deployment - // whereas 'labels' refers to the service - selector := labels - - config, err := adapters.ConfigFromCtx(ctx) - if err != nil { - logger.Error(err, "couldn't extract the configuration from the context") - return nil - } - - ports, err := adapters.ConfigToReceiverPorts(ctx, config) - if err != nil { - logger.Error(err, "couldn't build the service for this instance") - return nil - } - - if len(instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(logger, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(instance.Spec.Ports, resultingInferredPorts...) - } - - // if we have no ports, we don't need a service - if len(ports) == 0 { - return nil - } - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - Selector: selector, - ClusterIP: "", - Ports: ports, - }, - } -} - -func headless(ctx context.Context) *corev1.Service { - h := service(ctx) - if h == nil { - return nil - } - - h.Name = fmt.Sprintf("%s-headless", h.Name) - h.Spec.ClusterIP = "None" - return h -} - -func monitoringService(ctx context.Context) *corev1.Service { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := fmt.Sprintf("%s-monitoring", resourceName(instance.Name)) - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: serviceLabels(ctx, name), - Annotations: instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - Selector: serviceLabels(ctx, resourceName(instance.Name)), - ClusterIP: "", - Ports: []corev1.ServicePort{{ - Name: "monitoring", - Port: 8888, - }}, - }, - } -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServices(ctx context.Context, expected []*corev1.Service) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - svcs := r.clientset.Kubernetes.CoreV1().Services(desired.Namespace) - - existing, err := svcs.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errs.IsNotFound(err) { - if desired, err = svcs.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("service.name", desired.Name, "service.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to retrieve: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - // we keep the ClusterIP that got assigned by the cluster, if it's empty in the "desired" and not empty on the "current" - if desired.Spec.ClusterIP == "" && len(updated.Spec.ClusterIP) > 0 { - desired.Spec.ClusterIP = updated.Spec.ClusterIP - } - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if updated, err = svcs.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes to service: %v", err) - } - logger.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteServices(ctx context.Context, expected []*corev1.Service) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - svcs := r.clientset.Kubernetes.CoreV1().Services(instance.Namespace) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - list, err := svcs.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := svcs.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) - } - } - - return nil -} - -func serviceLabels(ctx context.Context, name string) map[string]string { - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - return labels -} - -func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { - if portNumbers[candidate.Port] { - return nil - } - - // do we have the port name there already? - if portNames[candidate.Name] { - // there's already a port with the same name! do we have a 'port-%d' already? - fallbackName := fmt.Sprintf("port-%d", candidate.Port) - if portNames[fallbackName] { - // that wasn't expected, better skip this port - logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", - "inferred-port-name", candidate.Name, - "fallback-port-name", fallbackName, - ) - return nil - } - - candidate.Name = fallbackName - return &candidate - } - - // this port is unique, return as is - return &candidate -} - -func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { - numbers := map[int32]bool{} - names := map[string]bool{} - - for _, port := range ports { - numbers[port.Port] = true - names[port.Name] = true - } - - return numbers, names -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_service_test.go b/pkg/controller/opentelemetrycollector/reconcile_service_test.go deleted file mode 100644 index 6ef3acbe4..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_service_test.go +++ /dev/null @@ -1,275 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -var logger = logf.Log.WithName("logger") - -func TestProperService(t *testing.T) { - // test - s := service(ctx) - - // verify - assert.Equal(t, s.Name, "my-otelcol-collector") - assert.Equal(t, s.Annotations["custom-annotation"], "custom-annotation-value") - assert.Equal(t, s.Labels["custom-label"], "custom-value") - assert.Equal(t, s.Labels["app.kubernetes.io/name"], s.Name) - assert.Equal(t, s.Spec.Selector, s.Labels) // shortcut, as they are the same at this point -} - -func TestProperHeadlessService(t *testing.T) { - // test - s := headless(ctx) - - // verify - assert.Equal(t, s.Name, "my-otelcol-collector-headless") - assert.Equal(t, s.Spec.ClusterIP, "None") -} - -func TestProperMonitoringService(t *testing.T) { - // test - s := monitoringService(ctx) - - // verify - assert.Equal(t, s.Name, "my-otelcol-collector-monitoring") - assert.Len(t, s.Spec.Ports, 1) - assert.Equal(t, int32(8888), s.Spec.Ports[0].Port) -} - -func TestProperReconcileService(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - - // test - reconciler.Reconcile(req) - - // verify - list, err := clients.Kubernetes.CoreV1().Services(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - assert.NoError(t, err) - - // we assert the correctness of the service in another test - assert.Len(t, list.Items, 3) - - // we assert the correctness of the reference in another test - for _, item := range list.Items { - assert.Len(t, item.OwnerReferences, 1) - } -} - -func TestUpdateService(t *testing.T) { - // prepare - c := service(ctx) - c.Namespace = instance.Namespace - - // right now, there's nothing we can do at the CR level that influences the underlying - // service object, so, we simulate a change made manually by some admin, changing the port - // from 14250 to 12345. Upon reconciliation, this change should be reverted - c.Spec.Ports = []corev1.ServicePort{ - { - Name: "jaeger-grpc", - Port: 12345, - TargetPort: intstr.FromInt(12345), - }, - } - c.Annotations = nil - c.Labels = nil - - // the cluster has assigned an IP to this service already - c.Spec.ClusterIP = "172.172.172.172" - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Len(t, persisted.Spec.Ports, 1) - assert.Equal(t, int32(12345), persisted.Spec.Ports[0].Port) - - // test - err = reconciler.reconcileService(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Equal(t, int32(1234), persisted.Spec.Ports[0].Port) - assert.Equal(t, "172.172.172.172", persisted.Spec.ClusterIP) // the assigned IP is kept -} - -func TestDeleteExtraService(t *testing.T) { - // prepare - c := service(ctx) - c.Name = "extra-service" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - err = reconciler.reconcileService(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.CoreV1().Services(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Error(t, err) // not found - assert.Nil(t, persisted) -} - -func TestServiceWithoutPorts(t *testing.T) { - for _, tt := range []string{ - "", - "🦄", - "receivers:\n myreceiver:\n endpoint:", - "receivers:\n myreceiver:\n endpoint: 0.0.0.0", - } { - // prepare - i := *instance - i.Spec.Config = tt - c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) - - // test - s := service(c) - - // verify - assert.Nil(t, s, "expected no ports from a configuration like: %s", tt) - } -} - -func TestOverridePorts(t *testing.T) { - // prepare - i := *instance - i.Spec.Ports = []corev1.ServicePort{{ - Name: "my-port", - Port: int32(1234), - }} - c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) - - // test - s := service(c) - - // verify - assert.NotNil(t, s) - assert.Len(t, s.Spec.Ports, 1) - assert.Equal(t, int32(1234), s.Spec.Ports[0].Port) - assert.Equal(t, "my-port", s.Spec.Ports[0].Name) -} - -func TestAddExplicitPorts(t *testing.T) { - for _, tt := range []struct { - name string // the test case name - instancePorts []corev1.ServicePort - expectedPorts map[int32]bool - expectedNames map[string]bool - }{ - { - name: "NewPort", - instancePorts: []corev1.ServicePort{{ - Name: "my-port", - Port: int32(1235), - }}, - // "first" (1234) comes from a receiver in .Spec.Config - expectedNames: map[string]bool{"first": false, "my-port": false}, - expectedPorts: map[int32]bool{1234: false, 1235: false}, - }, - { - name: "FallbackPortName", - instancePorts: []corev1.ServicePort{{ - Name: "first", // clashes with a receiver from .Spec.Config - Port: int32(1235), - }}, - expectedNames: map[string]bool{"port-1234": false, "first": false}, - expectedPorts: map[int32]bool{1234: false, 1235: false}, - }, - { - name: "FallbackPortNameClashes", - instancePorts: []corev1.ServicePort{ - { - Name: "first", // clashes with the port 1234 from the receiver in .Spec.Config - Port: int32(1235), - }, - { - Name: "port-1234", // the "first" port will be renamed to port-1234, clashes with this one - Port: int32(1236), - }, - }, - expectedNames: map[string]bool{"first": false, "port-1234": false}, - expectedPorts: map[int32]bool{1235: false, 1236: false}, // the inferred port 1234 is skipped - }, - { - name: "SkipExistingPortNumber", - instancePorts: []corev1.ServicePort{{ - Name: "my-port", - Port: int32(1234), - }}, - expectedNames: map[string]bool{"my-port": false}, - expectedPorts: map[int32]bool{1234: false}, - }, - } { - t.Run("TestAddExplicitPorts-"+tt.name, func(t *testing.T) { - // prepare - i := *instance - i.Spec.Ports = tt.instancePorts - c := context.WithValue(ctx, opentelemetry.ContextInstance, &i) - - // test - s := service(c) - - // verify - assert.NotNil(t, s) - - for _, p := range s.Spec.Ports { - if _, ok := tt.expectedPorts[p.Port]; !ok { - assert.Fail(t, "found a port that we didn't expect", "port number: %d", p.Port) - } - tt.expectedPorts[p.Port] = true - - if _, ok := tt.expectedNames[p.Name]; !ok { - assert.Fail(t, "found a port name that we didn't expect", "port name: %s", p.Name) - } - tt.expectedNames[p.Name] = true - } - - for k, v := range tt.expectedPorts { - assert.True(t, v, "the port %s should have been part of the result", k) - } - for k, v := range tt.expectedNames { - assert.True(t, v, "the port name %s should have been part of the result", k) - } - }) - } -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go deleted file mode 100644 index f383b28b3..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount.go +++ /dev/null @@ -1,148 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileServiceAccount reconciles the service(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileServiceAccount(ctx context.Context) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - - svcs := []*corev1.ServiceAccount{} - if len(instance.Spec.ServiceAccount) == 0 { - // if there's no Service Account specified we create one and manage it ourselves - svcs = append(svcs, serviceAccount(ctx)) - } - - // first, handle the create/update parts - if err := r.reconcileExpectedServiceAccounts(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the expected service accounts: %v", err) - } - - // then, delete the extra objects - if err := r.deleteServiceAccounts(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the service accounts to be deleted: %v", err) - } - - return nil -} - -func serviceAccount(ctx context.Context) *corev1.ServiceAccount { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := resourceName(instance.Name) - - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - - return &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - } -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceAccounts(ctx context.Context, expected []*corev1.ServiceAccount) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - svcs := r.clientset.Kubernetes.CoreV1().ServiceAccounts(desired.Namespace) - - existing, err := svcs.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { - if desired, err = svcs.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("serviceAccount.name", desired.Name, "serviceAccount.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to retrieve: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if updated, err = svcs.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes to service account: %v", err) - } - logger.V(2).Info("applied", "serviceAccount.name", desired.Name, "serviceAccount.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteServiceAccounts(ctx context.Context, expected []*corev1.ServiceAccount) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - svcs := r.clientset.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - list, err := svcs.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := svcs.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "serviceAccount.name", existing.Name, "serviceAccount.namespace", existing.Namespace) - } - } - - return nil -} - -// ServiceAccountNameFor returns the name of the service account for the given context -func ServiceAccountNameFor(ctx context.Context) string { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - if len(instance.Spec.ServiceAccount) == 0 { - return serviceAccount(ctx).Name - } - - return instance.Spec.ServiceAccount -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go b/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go deleted file mode 100644 index 55addef02..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_serviceaccount_test.go +++ /dev/null @@ -1,170 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperServiceAccount(t *testing.T) { - // test - s := serviceAccount(ctx) - - // verify - assert.Equal(t, s.Name, "my-otelcol-collector") - assert.Equal(t, s.Annotations["custom-annotation"], "custom-annotation-value") - assert.Equal(t, s.Labels["custom-label"], "custom-value") - assert.Equal(t, s.Labels["app.kubernetes.io/name"], s.Name) -} - -func TestOverrideServiceAccountName(t *testing.T) { - // test - overridden := *instance - overridden.Spec.ServiceAccount = "custom-sa" - - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &overridden) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - s := ServiceAccountNameFor(ctx) - - // verify - assert.Equal(t, "custom-sa", s) -} - -func TestUnmanagedServiceAccount(t *testing.T) { - // customize the CR, to override the service account name - overridden := *instance - overridden.Spec.ServiceAccount = "custom-sa" - - // build a context with an instance of our custom CR - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, &overridden) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - - c := &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: overridden.Spec.ServiceAccount, - Namespace: instance.Namespace, - Annotations: instance.Annotations, - }, - } - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.NotNil(t, persisted) - - // test - reconciler.reconcileServiceAccount(ctx) - - // verify that the service account still exists and is not with the operator's labels - existing, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Nil(t, existing.Labels) - - // verify that a service account with the name that the operator would create does *not* exist - managed := serviceAccount(ctx) - managed, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), managed.Name, metav1.GetOptions{}) - assert.Error(t, err) // not found - assert.Nil(t, managed) -} - -func TestProperReconcileServiceAccount(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - - // test - reconciler.Reconcile(req) - - // verify - list, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - assert.NoError(t, err) - - // we assert the correctness of the service account in another test - assert.Len(t, list.Items, 1) - - // we assert the correctness of the reference in another test (TestSetControllerReference) - for _, item := range list.Items { - assert.Len(t, item.OwnerReferences, 1) - } -} - -func TestUpdateServiceAccount(t *testing.T) { - // prepare - c := serviceAccount(ctx) - c.Namespace = instance.Namespace - c.Labels = map[string]string{"some-key": "some-value"} - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Contains(t, persisted.Labels, "some-key") - assert.NotContains(t, persisted.Labels, "app.kubernetes.io/name") - - // test - reconciler.reconcileServiceAccount(ctx) - - // verify - persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(instance.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Contains(t, persisted.Labels, "some-key") - assert.Equal(t, persisted.Name, persisted.Labels["app.kubernetes.io/name"]) -} - -func TestDeleteExtraServiceAccount(t *testing.T) { - // prepare - c := serviceAccount(ctx) - c.Name = "extra-service" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(c), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - persisted, err := clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - err = reconciler.reconcileServiceAccount(ctx) - assert.NoError(t, err) - - // verify - persisted, err = clients.Kubernetes.CoreV1().ServiceAccounts(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Error(t, err) // not found - assert.Nil(t, persisted) -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go deleted file mode 100644 index 909b774d5..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor.go +++ /dev/null @@ -1,158 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "fmt" - - monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" - "github.com/go-logr/logr" - "github.com/spf13/viper" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" -) - -// reconcileServiceMonitor reconciles the service monitor(s) required for the instance in the current context -func (r *ReconcileOpenTelemetryCollector) reconcileServiceMonitor(ctx context.Context) error { - if !viper.GetBool(opentelemetry.SvcMonitorAvailable) { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - logger.V(2).Info("skipping reconciliation for service monitor, as the CRD isn't registered with the cluster") - return nil - } - - svcs := []*monitoringv1.ServiceMonitor{ - serviceMonitor(ctx), - } - - // first, handle the create/update parts - if err := r.reconcileExpectedServiceMonitors(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the expected service monitors: %v", err) - } - - // then, delete the extra objects - if err := r.deleteServiceMonitors(ctx, svcs); err != nil { - return fmt.Errorf("failed to reconcile the service monitors to be deleted: %v", err) - } - - return nil -} - -func serviceMonitor(ctx context.Context) *monitoringv1.ServiceMonitor { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - name := resourceName(instance.Name) - - labels := commonLabels(ctx) - labels["app.kubernetes.io/name"] = name - - selector := commonLabels(ctx) - selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-monitoring", name) - - return &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: instance.Namespace, - Labels: labels, - Annotations: instance.Annotations, - }, - Spec: monitoringv1.ServiceMonitorSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: selector, - }, - Endpoints: []monitoringv1.Endpoint{{ - Port: "monitoring", - }}, - }, - } - -} - -func (r *ReconcileOpenTelemetryCollector) reconcileExpectedServiceMonitors(ctx context.Context, expected []*monitoringv1.ServiceMonitor) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - - for _, obj := range expected { - desired := obj - - // #nosec G104 (CWE-703): Errors unhandled. - r.setControllerReference(ctx, desired) - - svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(desired.Namespace) - - existing, err := svcMons.Get(ctx, desired.Name, metav1.GetOptions{}) - if err != nil && errors.IsNotFound(err) { - if desired, err = svcMons.Create(ctx, desired, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("failed to create: %v", err) - } - - logger.WithValues("svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace).V(2).Info("created") - continue - } else if err != nil { - return fmt.Errorf("failed to retrieve: %v", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - if _, err = svcMons.Update(ctx, updated, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("failed to apply changes to service monitor: %v", err) - } - logger.V(2).Info("applied", "svcmon.name", desired.Name, "svcmon.namespace", desired.Namespace) - } - - return nil -} - -func (r *ReconcileOpenTelemetryCollector) deleteServiceMonitors(ctx context.Context, expected []*monitoringv1.ServiceMonitor) error { - instance := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", instance.Namespace, instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }).String(), - } - - svcMons := r.clientset.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace) - - list, err := svcMons.List(ctx, opts) - if err != nil { - return fmt.Errorf("failed to list: %v", err) - } - - for _, existing := range list.Items { - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - } - } - - if del { - if err := svcMons.Delete(ctx, existing.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("failed to delete: %v", err) - } - logger.V(2).Info("deleted", "svcmon.name", existing.Name, "svcmon.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go b/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go deleted file mode 100644 index 0a750509d..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_servicemonitor_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/spf13/viper" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperServiceMonitor(t *testing.T) { - // test - s := serviceMonitor(ctx) - backingSvc := monitoringService(ctx) - - // verify - assert.Equal(t, "my-otelcol-collector", s.Name) - assert.Equal(t, "custom-annotation-value", s.Annotations["custom-annotation"]) - assert.Equal(t, "custom-value", s.Labels["custom-label"]) - assert.Equal(t, s.Name, s.Labels["app.kubernetes.io/name"]) - assert.Equal(t, backingSvc.Labels, s.Spec.Selector.MatchLabels) -} - -func TestProperReconcileServiceMonitor(t *testing.T) { - // prepare - viper.Set(opentelemetry.SvcMonitorAvailable, true) - defer viper.Reset() - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // test - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - _, err := reconciler.Reconcile(req) - assert.NoError(t, err) - - // verify - list, err := clients.Monitoring.MonitoringV1().ServiceMonitors(instance.Namespace).List(context.Background(), metav1.ListOptions{}) - require.NoError(t, err) - - // we assert the correctness of the service in another test - assert.Len(t, list.Items, 1) - - // we assert the correctness of the reference in another test - for _, item := range list.Items { - assert.Len(t, item.OwnerReferences, 1) - } -} - -func TestUpdateServiceMonitor(t *testing.T) { - // prepare - viper.Set(opentelemetry.SvcMonitorAvailable, true) - defer viper.Reset() - - c := serviceMonitor(ctx) - c.Annotations = nil - c.Labels = nil - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(c), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) - - // verify - _, err = clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) -} - -func TestDeleteExtraServiceMonitor(t *testing.T) { - // prepare - viper.Set(opentelemetry.SvcMonitorAvailable, true) - defer viper.Reset() - - c := serviceMonitor(ctx) - c.Name = "extra-service" - c.Namespace = instance.Namespace - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(c), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - - // sanity check - _, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.NoError(t, err) - - // test - assert.NoError(t, reconciler.reconcileServiceMonitor(ctx)) - - // verify - persisted, err := clients.Monitoring.MonitoringV1().ServiceMonitors(c.Namespace).Get(context.Background(), c.Name, metav1.GetOptions{}) - assert.Nil(t, persisted) - assert.Error(t, err) // not found -} diff --git a/pkg/controller/opentelemetrycollector/reconcile_test.go b/pkg/controller/opentelemetrycollector/reconcile_test.go deleted file mode 100644 index 46683f790..000000000 --- a/pkg/controller/opentelemetrycollector/reconcile_test.go +++ /dev/null @@ -1,186 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "errors" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" - appsv1 "k8s.io/api/apps/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestProperReconcile(t *testing.T) { - // prepare - var ( - reconciled *v1alpha1.OpenTelemetryCollector - logger logr.Logger - req reconcile.Request - ) - - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req.Namespace = instance.Namespace - req.Name = instance.Name - - called := false - reconciler.reconcileFuncs = []func(context.Context) error{ - func(ctx context.Context) error { - called = true - reconciled = ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger = ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - return nil - }, - } - - // test - res, err := reconciler.Reconcile(req) - - // verify - assert.NoError(t, err) - assert.False(t, res.Requeue) - assert.True(t, called) - assert.Equal(t, instance.Name, reconciled.Name) - assert.NotNil(t, logger) -} - -func TestReconcileDeletedObject(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), - } - reconciler := New(schem, clients) - - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace}} - reconciler.reconcileFuncs = []func(context.Context) error{ - func(context.Context) error { - assert.Fail(t, "shouldn't have been called") - return nil - }, - } - - // test - res, err := reconciler.Reconcile(req) - - // verify - assert.False(t, res.Requeue) - assert.NoError(t, err) - -} - -func TestReconcileFailsFast(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - req := reconcile.Request{NamespacedName: types.NamespacedName{Namespace: instance.Namespace, Name: instance.Name}} - reconciler.reconcileFuncs = []func(context.Context) error{ - func(context.Context) error { - return errors.New("the server made a boo boo") - }, - func(context.Context) error { - assert.Fail(t, "shouldn't have been called") - return nil - }, - } - - // test - _, err := reconciler.Reconcile(req) - - // verify - assert.Error(t, err) -} - -func TestReconcileFuncsAreCalled(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), - } - reconciler := New(schem, clients) - called := false - reconciler.reconcileFuncs = []func(context.Context) error{ - func(context.Context) error { - called = true - return nil - }, - } - - // test - err := reconciler.handleReconcile(ctx) - - // verify - assert.NoError(t, err) - assert.True(t, called) -} - -func TestNilReconcileFuncs(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), - } - reconciler := New(schem, clients) - reconciler.reconcileFuncs = nil - - // test - err := reconciler.handleReconcile(ctx) - - // verify - assert.NoError(t, err) -} - -func TestSetControllerReference(t *testing.T) { - // prepare - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(instance), - } - reconciler := New(schem, clients) - d := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{ - Namespace: instance.Namespace, - }} - - // sanity check - assert.Len(t, d.OwnerReferences, 0) - - // test - err := reconciler.setControllerReference(ctx, d) - assert.NoError(t, err) - - // verify - assert.Len(t, d.OwnerReferences, 1) - assert.Equal(t, instance.Name, d.OwnerReferences[0].Name) - assert.Equal(t, instance.TypeMeta.APIVersion, d.OwnerReferences[0].APIVersion) - assert.Equal(t, instance.TypeMeta.Kind, d.OwnerReferences[0].Kind) - -} - -func TestNameGeneration(t *testing.T) { - instanceName := "test" - expectedResourceName := "test-collector" - - assert.Equal(t, expectedResourceName, resourceName(instanceName)) -} diff --git a/pkg/controller/opentelemetrycollector/upgrade.go b/pkg/controller/opentelemetrycollector/upgrade.go deleted file mode 100644 index 840c57f76..000000000 --- a/pkg/controller/opentelemetrycollector/upgrade.go +++ /dev/null @@ -1,43 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - - "github.com/go-logr/logr" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/upgrade" - "github.com/open-telemetry/opentelemetry-operator/pkg/version" -) - -func (r *ReconcileOpenTelemetryCollector) applyUpgrades(ctx context.Context) error { - otelcol := ctx.Value(opentelemetry.ContextInstance).(*v1alpha1.OpenTelemetryCollector) - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - - currentVersions := version.Get() - - upgraded := false - if len(otelcol.Status.Version) > 0 { - if otelcol.Status.Version != currentVersions.OpenTelemetryCollector { - // in theory, the version from the Status could be higher than currentVersions.Jaeger, but we let the upgrade routine - // check/handle it - u, err := upgrade.ManagedInstance(ctx, r.clientset, otelcol) - if err != nil { - return err - } - otelcol = u - upgraded = true - } - } - - // at this point, the Jaeger we are managing is in sync with the Operator's version - // if this is a new object, no upgrade was made, so, we just set the version - otelcol.Status.Version = version.Get().OpenTelemetryCollector - - if upgraded { - logger.V(2).Info("managed instance upgraded", "version", otelcol.Status.Version) - } - - return nil -} diff --git a/pkg/controller/opentelemetrycollector/upgrade_test.go b/pkg/controller/opentelemetrycollector/upgrade_test.go deleted file mode 100644 index 01dbe53ce..000000000 --- a/pkg/controller/opentelemetrycollector/upgrade_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package opentelemetrycollector - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/stretchr/testify/assert" - "k8s.io/client-go/kubernetes/fake" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" - "github.com/open-telemetry/opentelemetry-operator/pkg/version" -) - -func TestApplyUpgrades(t *testing.T) { - // prepare - instance := &v1alpha1.OpenTelemetryCollector{ - Status: v1alpha1.OpenTelemetryCollectorStatus{ - Version: "0.0.1", - }, - } - ctx := context.WithValue(context.Background(), opentelemetry.ContextInstance, instance) - ctx = context.WithValue(ctx, opentelemetry.ContextLogger, logf.Log.WithName("unit-tests")) - clients := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(), - } - reconciler := New(schem, clients) - - // test - err := reconciler.applyUpgrades(ctx) - - // verify - assert.NoError(t, err) - assert.NotEqual(t, "0.0.1", instance.Status.Version) - assert.Equal(t, version.Get().OpenTelemetryCollector, instance.Status.Version) -} diff --git a/pkg/parser/receiver_generic_test.go b/pkg/parser/receiver_generic_test.go deleted file mode 100644 index 1d4e88e29..000000000 --- a/pkg/parser/receiver_generic_test.go +++ /dev/null @@ -1,95 +0,0 @@ -package parser - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestGenericReceiverWithEndpoint(t *testing.T) { - builder := NewGenericReceiverParser("myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.Equal(t, int32(1234), ports[0].Port) -} - -func TestGenericReceiverWithInvalidEndpoint(t *testing.T) { - // there's no parser regitered to handle "myreceiver", so, it falls back to the generic parser - builder := NewGenericReceiverParser("myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0", - }) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 0) -} - -func TestDownstreamParsers(t *testing.T) { - for _, tt := range []struct { - receiverName string - parserName string - parserDefaultPort int32 - builder func(string, map[interface{}]interface{}) ReceiverParser - }{ - {"zipkin", parserNameZipkin, 9411, NewZipkinReceiverParser}, - {"opencensus", parserNameOpenCensus, 55678, NewOpenCensusReceiverParser}, - {"otlp", parserNameOTLP, 55680, NewOTLPReceiverParser}, - - // contrib receivers - {"carbon", parserNameCarbon, 2003, NewCarbonReceiverParser}, - {"collectd", parserNameCollectd, 8081, NewCollectdReceiverParser}, - {"sapm", parserNameSAPM, 7276, NewSAPMReceiverParser}, - {"signalfx", parserNameSignalFx, 9943, NewSignalFxReceiverParser}, - {"wavefront", parserNameWavefront, 2003, NewWavefrontReceiverParser}, - {"zipkin-scribe", parserNameZipkinScribe, 9410, NewZipkinScribeReceiverParser}, - } { - - t.Run("Builder", func(t *testing.T) { - // test - builder := tt.builder(tt.receiverName, map[interface{}]interface{}{}) - - // verify - assert.Equal(t, tt.parserName, builder.ParserName()) - }) - - t.Run("DefaultPort", func(t *testing.T) { - // prepare - builder := tt.builder(tt.receiverName, map[interface{}]interface{}{}) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, tt.parserDefaultPort, ports[0].Port) - assert.Equal(t, tt.receiverName, ports[0].Name) - }) - - t.Run("OverridePort", func(t *testing.T) { - // prepare - builder := tt.builder(tt.receiverName, map[interface{}]interface{}{ - "endpoint": "0.0.0.0:65535", - }) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 65535, ports[0].Port) - assert.Equal(t, tt.receiverName, ports[0].Name) - }) - } -} diff --git a/pkg/parser/receiver_jaeger_test.go b/pkg/parser/receiver_jaeger_test.go deleted file mode 100644 index e75bb3f5c..000000000 --- a/pkg/parser/receiver_jaeger_test.go +++ /dev/null @@ -1,92 +0,0 @@ -package parser - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestJaegerParserRegistration(t *testing.T) { - // verify - assert.Contains(t, registry, "jaeger") -} - -func TestJaegerMinimalReceiverConfiguration(t *testing.T) { - builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - }, - }) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.Equal(t, int32(defaultGRPCPort), ports[0].Port) -} - -func TestJaegerOverrideReceiverProtocolPort(t *testing.T) { - builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - }, - }) - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.Equal(t, int32(1234), ports[0].Port) -} - -func TestJaegerDefaultPorts(t *testing.T) { - builder := NewJaegerReceiverParser("jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "thrift_http": map[interface{}]interface{}{}, - "thrift_compact": map[interface{}]interface{}{}, - "thrift_binary": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "jaeger-grpc": {portNumber: defaultGRPCPort}, - "jaeger-thrift-http": {portNumber: defaultThriftHTTPPort}, - "jaeger-thrift-compact": {portNumber: defaultThriftCompactPort}, - "jaeger-thrift-binary": {portNumber: defaultThriftBinaryPort}, - } - - // test - ports, err := builder.Ports(ctxWithLogger) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 4) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - } - - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} - -func TestJaegerParserName(t *testing.T) { - // test - p := For("jaeger", map[interface{}]interface{}{}) - - // verify - assert.Equal(t, parserNameJaeger, p.ParserName()) -} diff --git a/pkg/parser/receiver_test.go b/pkg/parser/receiver_test.go deleted file mode 100644 index 7d90a9852..000000000 --- a/pkg/parser/receiver_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package parser - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" -) - -var ( - logger = logf.Log.WithName("unit-tests") - ctxWithLogger = context.WithValue(context.Background(), opentelemetry.ContextLogger, logger) -) - -func TestPortName(t *testing.T) { - for _, tt := range []struct { - candidate string - port int32 - expected string - }{ - { - candidate: "my-receiver", - port: 123, - expected: "my-receiver", - }, - { - candidate: "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", - port: 123, - expected: "port-123", - }, - { - candidate: "my-🦄-receiver", - port: 123, - expected: "port-123", - }, - { - candidate: "-my-receiver", - port: 123, - expected: "port-123", - }, - } { - assert.Equal(t, tt.expected, portName(tt.candidate, tt.port)) - } -} - -func TestReceiverType(t *testing.T) { - for _, tt := range []struct { - name string - expected string - }{ - { - name: "myreceiver", - expected: "myreceiver", - }, - { - name: "myreceiver/custom", - expected: "myreceiver", - }, - } { - // test - typ := receiverType(tt.name) - - // assert - assert.Equal(t, tt.expected, typ) - } -} - -func TestParsePortFromEndpoint(t *testing.T) { - for _, tt := range []struct { - endpoint string - expected int32 - errorExpected bool - }{ - // prepare - {"http://localhost:1234", 1234, false}, - {"0.0.0.0:1234", 1234, false}, - {":1234", 1234, false}, - {"no-port", 0, true}, - } { - - // test - val, err := portFromEndpoint(tt.endpoint) - - // verify - if tt.errorExpected { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.Equal(t, tt.expected, val, "wrong port from endpoint %s: %d", tt.endpoint, val) - } -} - -func TestEndpointInConfigurationIsntString(t *testing.T) { - // prepare - config := map[interface{}]interface{}{ - "endpoint": 123, - } - - // test - p := singlePortFromConfigEndpoint(ctxWithLogger, "myreceiver", config) - - // verify - assert.Nil(t, p) -} - -func TestRetrieveGenericParser(t *testing.T) { - // test - parser := For("myreceiver", map[interface{}]interface{}{}) - - // verify - assert.Equal(t, parserNameGeneric, parser.ParserName()) -} - -func TestRetrieveParserFor(t *testing.T) { - // prepare - builderCalled := false - Register("mock", func(name string, config map[interface{}]interface{}) ReceiverParser { - builderCalled = true - return &mockParser{} - }) - - // test - For("mock", map[interface{}]interface{}{}) - - // verify - assert.True(t, builderCalled) -} - -type mockParser struct { - portsFunc func(context.Context) ([]corev1.ServicePort, error) -} - -func (m *mockParser) Ports(context.Context) ([]corev1.ServicePort, error) { - return nil, nil -} - -func (m *mockParser) ParserName() string { - return "__mock" -} diff --git a/pkg/upgrade/upgrade.go b/pkg/upgrade/upgrade.go deleted file mode 100644 index 4a2b87315..000000000 --- a/pkg/upgrade/upgrade.go +++ /dev/null @@ -1,72 +0,0 @@ -package upgrade - -import ( - "context" - "fmt" - "reflect" - - "github.com/go-logr/logr" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" -) - -// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary -func ManagedInstances(ctx context.Context, c *client.Clientset) error { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - logger.Info("looking for managed instances to upgrade") - - list, err := c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").List(ctx, metav1.ListOptions{}) - if err != nil { - return fmt.Errorf("failed to get list of otelcol instances: %v", err) - } - - for _, j := range list.Items { - otelcol, err := ManagedInstance(ctx, c, &j) - if err != nil { - // nothing to do at this level, just go to the next instance - continue - } - - if !reflect.DeepEqual(otelcol, j) { - // the CR has changed, store it! - otelcol, err = c.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors(otelcol.Namespace).Update(ctx, otelcol, metav1.UpdateOptions{}) - if err != nil { - logger.Error(err, "failed to store the upgraded otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) - return err - } - - logger.Info("instance upgraded", "name", otelcol.Name, "namespace", otelcol.Namespace) - } - } - - if len(list.Items) == 0 { - logger.Info("no instances to upgrade") - } - - return nil -} - -// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version -func ManagedInstance(ctx context.Context, cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - logger := ctx.Value(opentelemetry.ContextLogger).(logr.Logger) - - if v, ok := versions[otelcol.Status.Version]; ok { - // we don't need to run the upgrade function for the version 'v', only the next ones - for n := v.next; n != nil; n = n.next { - // performs the upgrade to version 'n' - upgraded, err := n.upgrade(cl, otelcol) - if err != nil { - logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) - return otelcol, err - } - - upgraded.Status.Version = n.v - otelcol = upgraded - } - } - - return otelcol, nil -} diff --git a/pkg/upgrade/upgrade_test.go b/pkg/upgrade/upgrade_test.go deleted file mode 100644 index 334a10046..000000000 --- a/pkg/upgrade/upgrade_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package upgrade - -import ( - "context" - "testing" - - fakemon "github.com/coreos/prometheus-operator/pkg/client/versioned/fake" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/kubernetes/scheme" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry" - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" - fakeotclient "github.com/open-telemetry/opentelemetry-operator/pkg/client/versioned/fake" -) - -func TestVersionUpgradeToLatest(t *testing.T) { - // prepare - ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) - - nsn := types.NamespacedName{Name: "my-instance"} - existing := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - } - existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function - - s := scheme.Scheme - s.AddKnownTypes(v1alpha1.SchemeGroupVersion, - &v1alpha1.OpenTelemetryCollector{}, - &v1alpha1.OpenTelemetryCollectorList{}, - ) - cl := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(existing), - } - - // test - assert.NoError(t, ManagedInstances(ctx, cl)) - - // verify - persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(context.Background(), nsn.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Equal(t, latest.v, persisted.Status.Version) -} - -func TestUnknownVersion(t *testing.T) { - // prepare - ctx := context.WithValue(context.Background(), opentelemetry.ContextLogger, logf.Log) - nsn := types.NamespacedName{Name: "my-instance"} - existing := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - } - existing.Status.Version = "0.0.0" // we don't know how to upgrade from 0.0.0 - - s := scheme.Scheme - s.AddKnownTypes(v1alpha1.SchemeGroupVersion, - &v1alpha1.OpenTelemetryCollector{}, - &v1alpha1.OpenTelemetryCollectorList{}, - ) - cl := &client.Clientset{ - Kubernetes: fake.NewSimpleClientset(), - Monitoring: fakemon.NewSimpleClientset(), - OpenTelemetry: fakeotclient.NewSimpleClientset(existing), - } - - // test - assert.NoError(t, ManagedInstances(ctx, cl)) - - // verify - persisted, err := cl.OpenTelemetry.OpentelemetryV1alpha1().OpenTelemetryCollectors("").Get(context.Background(), nsn.Name, metav1.GetOptions{}) - assert.NoError(t, err) - assert.Equal(t, "0.0.0", persisted.Status.Version) -} diff --git a/pkg/upgrade/v0_2_0.go b/pkg/upgrade/v0_2_0.go deleted file mode 100644 index d815490de..000000000 --- a/pkg/upgrade/v0_2_0.go +++ /dev/null @@ -1,12 +0,0 @@ -package upgrade - -import ( - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" -) - -func upgrade0_2_0(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - // this has the same content as `noop`, but it's added a separate function - // to serve as template for versions with an actual upgrade procedure - return otelcol, nil -} diff --git a/pkg/upgrade/versions.go b/pkg/upgrade/versions.go deleted file mode 100644 index f694a88fa..000000000 --- a/pkg/upgrade/versions.go +++ /dev/null @@ -1,30 +0,0 @@ -package upgrade - -import ( - "github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/client" -) - -type version struct { - v string - upgrade func(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - next *version -} - -var ( - v0_0_1 = version{v: "0.0.1", upgrade: noop, next: &v0_0_2} - v0_0_2 = version{v: "0.0.2", upgrade: noop, next: &v0_2_0} - v0_2_0 = version{v: "0.2.0", upgrade: upgrade0_2_0} - - latest = &v0_2_0 - - versions = map[string]version{ - v0_0_1.v: v0_0_1, - v0_0_2.v: v0_0_2, - v0_2_0.v: v0_2_0, - } -) - -func noop(cl *client.Clientset, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - return otelcol, nil -} diff --git a/pkg/version/main_test.go b/pkg/version/main_test.go deleted file mode 100644 index fdd6a8c86..000000000 --- a/pkg/version/main_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package version - -import ( - "testing" - - "gotest.tools/assert" -) - -func TestDefaultOpenTelemetryCollector(t *testing.T) { - assert.Equal(t, "0.0.0", DefaultOpenTelemetryCollector()) -} - -func TestCurrentOpenTelemetryCollector(t *testing.T) { - otelCol = "0.0.2" // set during the build - defer func() { - otelCol = "" - }() - assert.Equal(t, "0.0.2", Get().OpenTelemetryCollector) -} diff --git a/tools.go b/tools.go deleted file mode 100644 index 52a9fac4e..000000000 --- a/tools.go +++ /dev/null @@ -1,3 +0,0 @@ -// +build tools - -package tools diff --git a/opentelemetry.version b/versions.txt similarity index 100% rename from opentelemetry.version rename to versions.txt From 0fecbd546060eefc11f132d9e83c353795407e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 20 Aug 2020 15:27:21 +0200 Subject: [PATCH 0053/1234] Allow logger to be configured via CLI flags (#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #39 Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- main.go | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2e0f3bee9..740a11ec0 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ manager: generate fmt vet # Run against the configured Kubernetes cluster in ~/.kube/config run: generate fmt vet manifests - go run -ldflags ${LD_FLAGS} ./main.go + go run -ldflags ${LD_FLAGS} ./main.go --zap-devel # Install CRDs into a cluster install: manifests kustomize diff --git a/main.go b/main.go index 4e4840e25..f108fee3b 100644 --- a/main.go +++ b/main.go @@ -52,19 +52,9 @@ func init() { } func main() { - logger := zap.New(zap.UseDevMode(true)) - - v := version.Get() - logger.Info("Starting the OpenTelemetry Operator", - "opentelemetry-operator", v.Operator, - "opentelemetry-collector", v.OpenTelemetryCollector, - "build-date", v.BuildDate, - "go-version", v.Go, - "go-arch", runtime.GOARCH, - "go-os", runtime.GOOS, - ) - // registers any flags that underlying libraries might use + opts := zap.Options{} + opts.BindFlags(flag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) var metricsAddr string @@ -75,13 +65,24 @@ func main() { "Enabling this will ensure there is only one active controller manager.") // Add flags related to this operator + v := version.Get() config := config.WithVersion(v) pflag.CommandLine.AddFlagSet(config.FlagSet()) pflag.Parse() + logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) + logger.Info("Starting the OpenTelemetry Operator", + "opentelemetry-operator", v.Operator, + "opentelemetry-collector", v.OpenTelemetryCollector, + "build-date", v.BuildDate, + "go-version", v.Go, + "go-arch", runtime.GOARCH, + "go-os", runtime.GOOS, + ) + watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") if found { setupLog.Info("watching namespace(s)", "namespaces", watchNamespace) From 523f7f3027e3d5388709c41957b91576c32cd32f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 20 Aug 2020 17:40:30 +0200 Subject: [PATCH 0054/1234] Added auto-detection of the platform (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #33 Signed-off-by: Juraci Paixão Kröhling --- .../opentelemetrycollector_controller_test.go | 2 +- go.sum | 14 +-- internal/config/config_suite_test.go | 13 ++ internal/config/main.go | 116 ++++++++++++++++-- internal/config/main_test.go | 112 +++++++++++++++++ internal/config/options.go | 72 +++++++++++ main.go | 22 +++- pkg/autodetect/autodetect_suite_test.go | 13 ++ pkg/autodetect/main.go | 65 ++++++++++ pkg/autodetect/main_test.go | 68 ++++++++++ pkg/platform/main.go | 33 +++++ 11 files changed, 505 insertions(+), 25 deletions(-) create mode 100644 internal/config/config_suite_test.go create mode 100644 internal/config/main_test.go create mode 100644 internal/config/options.go create mode 100644 pkg/autodetect/autodetect_suite_test.go create mode 100644 pkg/autodetect/main.go create mode 100644 pkg/autodetect/main_test.go create mode 100644 pkg/platform/main.go diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 6f9138039..fb62a6a71 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -26,7 +26,7 @@ import ( var _ = Describe("OpenTelemetryCollector controller", func() { logger := logf.Log.WithName("unit-tests") - cfg := config.DefaultConfig() + cfg := config.New() cfg.FlagSet().Parse([]string{}) It("should generate the underlying objects on reconciliation", func() { diff --git a/go.sum b/go.sum index 00c8c8d3a..c34d49969 100644 --- a/go.sum +++ b/go.sum @@ -38,6 +38,7 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -171,7 +172,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -213,7 +213,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -236,7 +235,6 @@ github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -265,13 +263,10 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -295,6 +290,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -425,30 +421,25 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.18.2 h1:wG5g5ZmSVgm5B+eHMIbI9EGATS2L8Z72rda19RIEgY8= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= -k8s.io/apimachinery v0.18.2 h1:44CmtbmkzVDAhCpRVSiP2R5PPrC2RtlIv/MoB8xpdRA= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/cli-runtime v0.18.6/go.mod h1:+G/WTNqHgUv636e5y7rhOQ7epUbRXnwmPnhOhD6t9uM= -k8s.io/client-go v0.18.2 h1:aLB0iaD4nmwh7arT2wIn+lMnAq7OswjaejkQ8p9bBYE= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= k8s.io/client-go v0.18.6 h1:I+oWqJbibLSGsZj8Xs8F0aWVXJVIoUHWaaJV3kUN/Zw= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.18.2 h1:SJweNZAGcUvsypLGNPNGeJ9UgPZQ6+bW+gEHe8uyh/Y= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -457,7 +448,6 @@ k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUc k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c h1:/KUFqjjqAcY4Us6luF5RDNZ16KJtb49HfR3ZHB9qYXM= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= diff --git a/internal/config/config_suite_test.go b/internal/config/config_suite_test.go new file mode 100644 index 000000000..c7d2e82ab --- /dev/null +++ b/internal/config/config_suite_test.go @@ -0,0 +1,13 @@ +package config_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestConfig(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Config Suite") +} diff --git a/internal/config/main.go b/internal/config/main.go index 7fc478ea7..d354bdd08 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -16,28 +16,68 @@ package config import ( "fmt" + "time" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/go-logr/logr" "github.com/spf13/pflag" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" +) + +const ( + defaultAutoDetectFrequency = 5 * time.Second + defaultCollectorConfigMapEntry = "collector.yaml" ) // Config holds the static configuration for this operator type Config struct { - v version.Version + // Registers a callback, to be called once a configuration change happens + OnChange func() error + + logger logr.Logger + autoDetect autodetect.AutoDetect + autoDetectFrequency time.Duration + onChange []func() error + + // config state collectorImage string collectorConfigMapEntry string + platform platform.Platform + version version.Version } -// DefaultConfig builds a new configuration populated with the default, immutable values -func DefaultConfig() Config { - return WithVersion(version.Get()) -} +// New constructs a new configuration based on the given options +func New(opts ...Option) Config { + // initialize with the default values + o := options{ + autoDetectFrequency: defaultAutoDetectFrequency, + collectorConfigMapEntry: defaultCollectorConfigMapEntry, + logger: logf.Log.WithName("config"), + platform: platform.Unknown, + version: version.Get(), + } + for _, opt := range opts { + opt(&o) + } + + // this is derived from another option, so, we need to first parse the options, then set a default + // if there's no explicit value being set + if len(o.collectorImage) == 0 { + o.collectorImage = fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", o.version.OpenTelemetryCollector) + } -// WithVersion builds a new configuration using the provided version object -func WithVersion(v version.Version) Config { return Config{ - v: v, - collectorConfigMapEntry: "collector.yaml", + autoDetect: o.autoDetect, + autoDetectFrequency: o.autoDetectFrequency, + collectorImage: o.collectorImage, + collectorConfigMapEntry: o.collectorConfigMapEntry, + logger: o.logger, + onChange: o.onChange, + platform: o.platform, + version: o.version, } } @@ -46,13 +86,62 @@ func (c *Config) FlagSet() *pflag.FlagSet { fs := pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) pflag.StringVar(&c.collectorImage, "otelcol-image", - fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", c.v.OpenTelemetryCollector), + c.collectorImage, "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", ) return fs } +// StartAutoDetect attempts to automatically detect relevant information for this operator. This will block until the first +// run is executed and will schedule periodic updates. +func (c *Config) StartAutoDetect() error { + err := c.AutoDetect() + go c.periodicAutoDetect() + + return err +} + +func (c *Config) periodicAutoDetect() { + ticker := time.NewTicker(c.autoDetectFrequency) + + for range ticker.C { + c.AutoDetect() + } +} + +// AutoDetect attempts to automatically detect relevant information for this operator. +func (c *Config) AutoDetect() error { + changed := false + c.logger.V(2).Info("auto-detecting the configuration based on the environment") + + // TODO: once new things need to be detected, extract this into individual detection routines + if c.platform == platform.Unknown { + plt, err := c.autoDetect.Platform() + if err != nil { + return err + } + + if c.platform != plt { + c.logger.V(1).Info("platform detected", "platform", plt) + c.platform = plt + changed = true + } + } + + if changed { + for _, callback := range c.onChange { + if err := callback(); err != nil { + // we don't fail if the callback failed, as the auto-detection itself + // did work + c.logger.Error(err, "configuration change notification failed for callback") + } + } + } + + return nil +} + // CollectorImage represents the flag to override the OpenTelemetry Collector container image. func (c *Config) CollectorImage() string { return c.collectorImage @@ -62,3 +151,8 @@ func (c *Config) CollectorImage() string { func (c *Config) CollectorConfigMapEntry() string { return c.collectorConfigMapEntry } + +// Platform represents the type of the platform this operator is running +func (c *Config) Platform() platform.Platform { + return c.platform +} diff --git a/internal/config/main_test.go b/internal/config/main_test.go new file mode 100644 index 000000000..3941acb08 --- /dev/null +++ b/internal/config/main_test.go @@ -0,0 +1,112 @@ +package config_test + +import ( + "sync" + "time" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" +) + +var _ = Describe("Config", func() { + + It("should build new configuration with given options", func() { + // prepare + cfgOpts := config.Options + cfg := config.New( + cfgOpts.CollectorImage("some-image"), + cfgOpts.CollectorConfigMapEntry("some-config.yaml"), + cfgOpts.Platform(platform.Kubernetes), + ) + + // test + Expect(cfg.CollectorImage()).To(Equal("some-image")) + Expect(cfg.CollectorConfigMapEntry()).To(Equal("some-config.yaml")) + Expect(cfg.Platform()).To(Equal(platform.Kubernetes)) + }) + + It("should use the version as part of the default image", func() { + // prepare + v := version.Version{ + OpenTelemetryCollector: "the-version", + } + cfgOpts := config.Options + cfg := config.New(cfgOpts.Version(v)) + + // test + Expect(cfg.CollectorImage()).To(ContainSubstring("the-version")) + }) + + It("should callback when configuration changes happen", func() { + // prepare + calledBack := false + mock := &mockAutoDetect{ + PlatformFunc: func() (platform.Platform, error) { + return platform.OpenShift, nil + }, + } + cfgOpts := config.Options + cfg := config.New( + cfgOpts.AutoDetect(mock), + cfgOpts.OnChange(func() error { + calledBack = true + return nil + }), + ) + + // sanity check + Expect(cfg.Platform()).To(Equal(platform.Unknown)) + + // test + cfg.AutoDetect() + + // verify + Expect(cfg.Platform()).To(Equal(platform.OpenShift)) + Expect(calledBack).To(BeTrue()) + }) + + It("should run the auto-detect routine in the background", func() { + // prepare + wg := &sync.WaitGroup{} + wg.Add(2) + mock := &mockAutoDetect{ + PlatformFunc: func() (platform.Platform, error) { + wg.Done() + // returning Unknown will cause the auto-detection to keep trying to detect the platform + return platform.Unknown, nil + }, + } + cfgOpts := config.Options + cfg := config.New( + cfgOpts.AutoDetect(mock), + cfgOpts.AutoDetectFrequency(100*time.Millisecond), + ) + + // sanity check + Expect(cfg.Platform()).To(Equal(platform.Unknown)) + + // test + cfg.StartAutoDetect() + + // verify + wg.Wait() + }) +}) + +var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) + +type mockAutoDetect struct { + PlatformFunc func() (platform.Platform, error) +} + +func (m *mockAutoDetect) Platform() (platform.Platform, error) { + if m.PlatformFunc != nil { + return m.PlatformFunc() + } + return platform.Unknown, nil +} diff --git a/internal/config/options.go b/internal/config/options.go new file mode 100644 index 000000000..276b5e031 --- /dev/null +++ b/internal/config/options.go @@ -0,0 +1,72 @@ +package config + +import ( + "time" + + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" +) + +// Option represents one specific configuration option +type Option func(c *options) + +// Options represents the possible options for the configuration +var Options options + +type options struct { + autoDetect autodetect.AutoDetect + autoDetectFrequency time.Duration + collectorImage string + collectorConfigMapEntry string + logger logr.Logger + onChange []func() error + platform platform.Platform + version version.Version +} + +func (options) AutoDetect(a autodetect.AutoDetect) Option { + return func(o *options) { + o.autoDetect = a + } +} +func (options) AutoDetectFrequency(t time.Duration) Option { + return func(o *options) { + o.autoDetectFrequency = t + } +} +func (options) CollectorImage(s string) Option { + return func(o *options) { + o.collectorImage = s + } +} +func (options) CollectorConfigMapEntry(s string) Option { + return func(o *options) { + o.collectorConfigMapEntry = s + } +} +func (options) Logger(logger logr.Logger) Option { + return func(o *options) { + o.logger = logger + } +} +func (options) OnChange(f func() error) Option { + return func(o *options) { + if o.onChange == nil { + o.onChange = []func() error{} + } + o.onChange = append(o.onChange, f) + } +} +func (options) Platform(plt platform.Platform) Option { + return func(o *options) { + o.platform = plt + } +} +func (options) Version(v version.Version) Option { + return func(o *options) { + o.version = v + } +} diff --git a/main.go b/main.go index f108fee3b..b0e2c3349 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" // +kubebuilder:scaffold:imports ) @@ -57,6 +58,7 @@ func main() { opts.BindFlags(flag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + // Add flags related to this operator var metricsAddr string var enableLeaderElection bool pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") @@ -66,7 +68,17 @@ func main() { // Add flags related to this operator v := version.Get() - config := config.WithVersion(v) + restConfig := ctrl.GetConfigOrDie() + + // builds the operator's configuration + ad, err := autodetect.New(restConfig) + cfgOpts := config.Options + config := config.New( + cfgOpts.Logger(ctrl.Log.WithName("config")), + cfgOpts.Version(v), + cfgOpts.AutoDetect(ad), + ) + pflag.CommandLine.AddFlagSet(config.FlagSet()) pflag.Parse() @@ -110,6 +122,14 @@ func main() { os.Exit(1) } + // run the auto-detect mechanism for the configuration + err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { + return config.StartAutoDetect() + })) + if err != nil { + setupLog.Error(err, "failed to start the auto-detect mechanism") + } + // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { return upgrade.ManagedInstances(context.Background(), ctrl.Log.WithName("upgrade"), mgr.GetClient()) diff --git a/pkg/autodetect/autodetect_suite_test.go b/pkg/autodetect/autodetect_suite_test.go new file mode 100644 index 000000000..513ad24f6 --- /dev/null +++ b/pkg/autodetect/autodetect_suite_test.go @@ -0,0 +1,13 @@ +package autodetect_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestAutodetect(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Autodetect Suite") +} diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go new file mode 100644 index 000000000..64eaabe8d --- /dev/null +++ b/pkg/autodetect/main.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package autodetect + +import ( + "k8s.io/client-go/discovery" + "k8s.io/client-go/rest" + + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" +) + +var _ AutoDetect = (*autoDetect)(nil) + +// AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. +type AutoDetect interface { + Platform() (platform.Platform, error) +} + +type autoDetect struct { + dcl discovery.DiscoveryInterface +} + +// New creates a new auto-detection worker, using the given client when talking to the current cluster. +func New(restConfig *rest.Config) (AutoDetect, error) { + dcl, err := discovery.NewDiscoveryClientForConfig(restConfig) + if err != nil { + // it's pretty much impossible to get into this problem, as most of the + // code branches from the previous call just won't fail at all, + // but let's handle this error anyway... + return nil, err + } + + return &autoDetect{ + dcl: dcl, + }, nil +} + +// Platform returns the detected platform this operator is running on. Possible values: Kubernetes, OpenShift. +func (a *autoDetect) Platform() (platform.Platform, error) { + apiList, err := a.dcl.ServerGroups() + if err != nil { + return platform.Unknown, err + } + + apiGroups := apiList.Groups + for i := 0; i < len(apiGroups); i++ { + if apiGroups[i].Name == "route.openshift.io" { + return platform.OpenShift, nil + } + } + + return platform.Kubernetes, nil +} diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go new file mode 100644 index 000000000..c051fa8d1 --- /dev/null +++ b/pkg/autodetect/main_test.go @@ -0,0 +1,68 @@ +package autodetect_test + +import ( + "encoding/json" + "net/http" + "net/http/httptest" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/rest" + + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" +) + +var _ = Describe("Autodetect", func() { + DescribeTable("detect platform based on available API groups", + func(expected platform.Platform, apiGroupList *metav1.APIGroupList) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + output, err := json.Marshal(apiGroupList) + Expect(err).ToNot(HaveOccurred()) + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + defer server.Close() + + autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) + Expect(err).ToNot(HaveOccurred()) + + // test + plt, err := autoDetect.Platform() + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(plt).To(Equal(expected)) + }, + + Entry("kubernetes", platform.Kubernetes, &metav1.APIGroupList{}), + Entry("openshift", platform.OpenShift, &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "route.openshift.io", + }, + }, + }), + ) + + It("should return unknown platform when errors occur", func() { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(http.StatusInternalServerError) + })) + defer server.Close() + + autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) + Expect(err).ToNot(HaveOccurred()) + + // test + plt, err := autoDetect.Platform() + + // verify + Expect(err).To(HaveOccurred()) + Expect(plt).To(Equal(platform.Unknown)) + }) +}) diff --git a/pkg/platform/main.go b/pkg/platform/main.go new file mode 100644 index 000000000..c81209ff2 --- /dev/null +++ b/pkg/platform/main.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package platform + +// Platform holds the auto-detected platform type +type Platform int + +const ( + // Unknown is used when the current platform can't be determined + Unknown Platform = iota + + // OpenShift represents a platform of type OpenShift + OpenShift Platform = iota + + // Kubernetes represents a platform of type Kubernetes + Kubernetes +) + +func (p Platform) String() string { + return [...]string{"Unknown", "OpenShift", "Kubernetes"}[p] +} From 74366d808ea513b68490d037e41a555e5f41bb1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 20 Aug 2020 17:41:04 +0200 Subject: [PATCH 0055/1234] Added an example for connecting to a TLS-secured Jaeger collector (#42) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #32 Signed-off-by: Juraci Paixão Kröhling --- config/samples/exporter-with-tls.yaml | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 config/samples/exporter-with-tls.yaml diff --git a/config/samples/exporter-with-tls.yaml b/config/samples/exporter-with-tls.yaml new file mode 100644 index 000000000..f954e3e8b --- /dev/null +++ b/config/samples/exporter-with-tls.yaml @@ -0,0 +1,47 @@ +# this example shows how to connect an OpenTelemetry Collector with a Jaeger instance in OpenShift, +# which is provisioned using TLS automatically. We use the inject-cabundle in the config map to +# get access to the CA that signed the certs, and tell the operator to mount the config map into the +# provisioned deployments and daemonsets +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: cabundle + annotations: + "service.beta.openshift.io/inject-cabundle": "true" +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: opentelemetrycollector-sample +spec: + volumeMounts: + - name: cabundle-volume + mountPath: /etc/pki/ca-trust/source/service-ca + readOnly: true + volumes: + - name: cabundle-volume + configMap: + name: cabundle + + config: | + receivers: + jaeger: + protocols: + grpc: + + processors: + batch: + + exporters: + jaeger: + endpoint: "simplest-collector-headless.default.svc:14250" + ca_file: "/etc/pki/ca-trust/source/service-ca/service-ca.crt" + server_name_override: "simplest-collector-headless.default.svc.cluster.local" + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [batch] + exporters: [jaeger] From c8c425f924a14b009f90ad7a09ca4a417099e666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 24 Aug 2020 12:31:34 +0200 Subject: [PATCH 0056/1234] Fixed the notation for config options (#44) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- internal/config/main_test.go | 20 ++++++++------------ internal/config/options.go | 19 ++++++++----------- main.go | 7 +++---- 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 3941acb08..2d613a424 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -17,11 +17,10 @@ var _ = Describe("Config", func() { It("should build new configuration with given options", func() { // prepare - cfgOpts := config.Options cfg := config.New( - cfgOpts.CollectorImage("some-image"), - cfgOpts.CollectorConfigMapEntry("some-config.yaml"), - cfgOpts.Platform(platform.Kubernetes), + config.WithCollectorImage("some-image"), + config.WithCollectorConfigMapEntry("some-config.yaml"), + config.WithPlatform(platform.Kubernetes), ) // test @@ -35,8 +34,7 @@ var _ = Describe("Config", func() { v := version.Version{ OpenTelemetryCollector: "the-version", } - cfgOpts := config.Options - cfg := config.New(cfgOpts.Version(v)) + cfg := config.New(config.WithVersion(v)) // test Expect(cfg.CollectorImage()).To(ContainSubstring("the-version")) @@ -50,10 +48,9 @@ var _ = Describe("Config", func() { return platform.OpenShift, nil }, } - cfgOpts := config.Options cfg := config.New( - cfgOpts.AutoDetect(mock), - cfgOpts.OnChange(func() error { + config.WithAutoDetect(mock), + config.WithOnChange(func() error { calledBack = true return nil }), @@ -81,10 +78,9 @@ var _ = Describe("Config", func() { return platform.Unknown, nil }, } - cfgOpts := config.Options cfg := config.New( - cfgOpts.AutoDetect(mock), - cfgOpts.AutoDetectFrequency(100*time.Millisecond), + config.WithAutoDetect(mock), + config.WithAutoDetectFrequency(100*time.Millisecond), ) // sanity check diff --git a/internal/config/options.go b/internal/config/options.go index 276b5e031..4e7d60aa5 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -13,9 +13,6 @@ import ( // Option represents one specific configuration option type Option func(c *options) -// Options represents the possible options for the configuration -var Options options - type options struct { autoDetect autodetect.AutoDetect autoDetectFrequency time.Duration @@ -27,32 +24,32 @@ type options struct { version version.Version } -func (options) AutoDetect(a autodetect.AutoDetect) Option { +func WithAutoDetect(a autodetect.AutoDetect) Option { return func(o *options) { o.autoDetect = a } } -func (options) AutoDetectFrequency(t time.Duration) Option { +func WithAutoDetectFrequency(t time.Duration) Option { return func(o *options) { o.autoDetectFrequency = t } } -func (options) CollectorImage(s string) Option { +func WithCollectorImage(s string) Option { return func(o *options) { o.collectorImage = s } } -func (options) CollectorConfigMapEntry(s string) Option { +func WithCollectorConfigMapEntry(s string) Option { return func(o *options) { o.collectorConfigMapEntry = s } } -func (options) Logger(logger logr.Logger) Option { +func WithLogger(logger logr.Logger) Option { return func(o *options) { o.logger = logger } } -func (options) OnChange(f func() error) Option { +func WithOnChange(f func() error) Option { return func(o *options) { if o.onChange == nil { o.onChange = []func() error{} @@ -60,12 +57,12 @@ func (options) OnChange(f func() error) Option { o.onChange = append(o.onChange, f) } } -func (options) Platform(plt platform.Platform) Option { +func WithPlatform(plt platform.Platform) Option { return func(o *options) { o.platform = plt } } -func (options) Version(v version.Version) Option { +func WithVersion(v version.Version) Option { return func(o *options) { o.version = v } diff --git a/main.go b/main.go index b0e2c3349..6cf190a36 100644 --- a/main.go +++ b/main.go @@ -72,11 +72,10 @@ func main() { // builds the operator's configuration ad, err := autodetect.New(restConfig) - cfgOpts := config.Options config := config.New( - cfgOpts.Logger(ctrl.Log.WithName("config")), - cfgOpts.Version(v), - cfgOpts.AutoDetect(ad), + config.WithLogger(ctrl.Log.WithName("config")), + config.WithVersion(v), + config.WithAutoDetect(ad), ) pflag.CommandLine.AddFlagSet(config.FlagSet()) From 696719931ea60a54065ffa16036d5a0d9aa846db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 26 Aug 2020 16:31:24 +0200 Subject: [PATCH 0057/1234] Added validating/defaulter webhooks for OpenTelemetryCollector (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #46 Signed-off-by: Juraci Paixão Kröhling --- Dockerfile | 10 ++- Makefile | 15 ++-- PROJECT | 2 +- README.md | 19 +++++ .../opentelemetrycollector_webhook.go | 62 ++++++++++++++++ api/v1alpha1/zz_generated.deepcopy.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 1 + config/crd/kustomization.yaml | 6 +- config/default/kustomization.yaml | 70 ++++++++----------- config/manager/manager.yaml | 2 +- config/rbac/role.yaml | 15 ++++ config/webhook/manifests.yaml | 53 ++++++++++++++ .../opentelemetrycollector_controller.go | 9 ++- main.go | 11 ++- 14 files changed, 221 insertions(+), 56 deletions(-) create mode 100644 api/v1alpha1/opentelemetrycollector_webhook.go create mode 100644 config/webhook/manifests.yaml diff --git a/Dockerfile b/Dockerfile index 74eb9d741..d33d180c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,17 @@ RUN go mod download COPY main.go main.go COPY api/ api/ COPY controllers/ controllers/ +COPY internal/ internal/ +COPY pkg/ pkg/ +COPY versions.txt versions.txt + +ARG VERSION_PKG +ARG VERSION +ARG VERSION_DATE +ARG OTELSVC_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 740a11ec0..846885a82 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,10 @@ endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # Image URL to use all building/pushing image targets -IMG ?= controller:latest +IMG_PREFIX ?= quay.io/${USER} +IMG ?= ${IMG_PREFIX}/opentelemetry-operator:latest # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) -CRD_OPTIONS ?= "crd:trivialVersions=true" +CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -28,6 +29,9 @@ else GOBIN=$(shell go env GOBIN) endif +# by default, do not run the manager with webhooks enabled. This only affects local runs, not the build or in-cluster deployments. +ENABLE_WEBHOOKS ?= false + # If we are running in CI, run ginkgo with the recommended CI settings ifeq (,$(CI)) GINKGO_OPTS=-r @@ -48,7 +52,7 @@ manager: generate fmt vet # Run against the configured Kubernetes cluster in ~/.kube/config run: generate fmt vet manifests - go run -ldflags ${LD_FLAGS} ./main.go --zap-devel + ENABLE_WEBHOOKS=$(ENABLE_WEBHOOKS) go run -ldflags ${LD_FLAGS} ./main.go --zap-devel # Install CRDs into a cluster install: manifests kustomize @@ -81,12 +85,15 @@ generate: controller-gen # Build the docker image docker-build: test - docker build . -t ${IMG} + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELSVC_VERSION=${OTELSVC_VERSION} . # Push the docker image docker-push: docker push ${IMG} +cert-manager: + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.yaml + # find or download controller-gen # download controller-gen if necessary controller-gen: diff --git a/PROJECT b/PROJECT index 80adfdc73..a4943b95b 100644 --- a/PROJECT +++ b/PROJECT @@ -5,6 +5,6 @@ resources: - group: core kind: OpenTelemetryCollector version: v1alpha1 -version: 3-alpha +version: 2 plugins: go.operator-sdk.io/v2-alpha: {} diff --git a/README.md b/README.md index 76a42d09f..5132e6d10 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,25 @@ At this point, the Operator does *not* validate the contents of the configuratio The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. +## Running with the webhooks + +When running `make run`, the webhooks aren't effective as it starts the manager in the local machine instead of in-cluster. To test the webhooks, you'll need to: + +1. configure a proxy between the Kubernetes API server and your host, so that it can contact the webhook in your local machine +1. create the TLS certificates and place them, by default, on `/tmp/k8s-webhook-server/serving-certs/tls.crt`. The Kubernetes API server has also to be configured to trust the CA used to generate those certs. + +In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: + +```console +make cert-manager +``` + +Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: + +``` +make manifests docker-build docker-push deploy +``` + ## Contributing and Developing Please see [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go new file mode 100644 index 000000000..c87539e3c --- /dev/null +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook" +) + +// log is for logging in this package. +var opentelemetrycollectorlog = logf.Log.WithName("opentelemetrycollector-resource") + +func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error { + return ctrl.NewWebhookManagedBy(mgr). + For(r). + Complete() +} + +// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io + +var _ webhook.Defaulter = &OpenTelemetryCollector{} + +// Default implements webhook.Defaulter so a webhook will be registered for the type +func (r *OpenTelemetryCollector) Default() { + opentelemetrycollectorlog.Info("default", "name", r.Name) +} + +// +kubebuilder:webhook:verbs=create;update;delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollector.kb.io + +var _ webhook.Validator = &OpenTelemetryCollector{} + +// ValidateCreate implements webhook.Validator so a webhook will be registered for the type +func (r *OpenTelemetryCollector) ValidateCreate() error { + opentelemetrycollectorlog.Info("validate create", "name", r.Name) + return nil +} + +// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type +func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error { + opentelemetrycollectorlog.Info("validate update", "name", r.Name) + return nil +} + +// ValidateDelete implements webhook.Validator so a webhook will be registered for the type +func (r *OpenTelemetryCollector) ValidateDelete() error { + opentelemetrycollectorlog.Info("validate delete", "name", r.Name) + return nil +} diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 9d2237d9e..e195c3ca7 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -20,7 +20,7 @@ package v1alpha1 import ( "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 1b08c7821..ab172e71b 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -17,6 +17,7 @@ spec: - otelcol - otelcols singular: opentelemetrycollector + preserveUnknownFields: false scope: Namespaced subresources: scale: diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 3daa9acd2..1010fd582 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -6,14 +6,12 @@ resources: # +kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -#- patches/webhook_in_opentelemetrycollectors.yaml +- patches/webhook_in_opentelemetrycollectors.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch -# [CERTMANAGER] To enable webhook, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD -#- patches/cainjection_in_opentelemetrycollectors.yaml +- patches/cainjection_in_opentelemetrycollectors.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 89a6a8598..0f4c6f4b2 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -16,11 +16,8 @@ bases: - ../crd - ../rbac - ../manager -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -#- ../webhook -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. -#- ../certmanager +- ../webhook +- ../certmanager # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. #- ../prometheus @@ -30,41 +27,34 @@ patchesStrategicMerge: # endpoint w/o any authn/z, please comment the following line. - manager_auth_proxy_patch.yaml -# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in -# crd/kustomization.yaml -#- manager_webhook_patch.yaml - -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. -# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. -# 'CERTMANAGER' needs to be enabled to use ca injection -#- webhookcainjection_patch.yaml +- manager_webhook_patch.yaml +- webhookcainjection_patch.yaml # the following config is for teaching kustomize how to do var substitution vars: -# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. -#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1alpha2 -# name: serving-cert # this name should match the one in certificate.yaml -# fieldref: -# fieldpath: metadata.namespace -#- name: CERTIFICATE_NAME -# objref: -# kind: Certificate -# group: cert-manager.io -# version: v1alpha2 -# name: serving-cert # this name should match the one in certificate.yaml -#- name: SERVICE_NAMESPACE # namespace of the service -# objref: -# kind: Service -# version: v1 -# name: webhook-service -# fieldref: -# fieldpath: metadata.namespace -#- name: SERVICE_NAME -# objref: -# kind: Service -# version: v1 -# name: webhook-service +- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR + objref: + kind: Certificate + group: cert-manager.io + version: v1alpha2 + name: serving-cert # this name should match the one in certificate.yaml + fieldref: + fieldpath: metadata.namespace +- name: CERTIFICATE_NAME + objref: + kind: Certificate + group: cert-manager.io + version: v1alpha2 + name: serving-cert # this name should match the one in certificate.yaml +- name: SERVICE_NAMESPACE # namespace of the service + objref: + kind: Service + version: v1 + name: webhook-service + fieldref: + fieldpath: metadata.namespace +- name: SERVICE_NAME + objref: + kind: Service + version: v1 + name: webhook-service diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index b6c85a52d..f39a57e4d 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -27,7 +27,7 @@ spec: - /manager args: - --enable-leader-election - image: controller:latest + image: controller name: manager resources: limits: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 320b1eece..cd78414f3 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -10,6 +10,21 @@ rules: - "" resources: - configmaps + - serviceaccounts + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - daemonsets + - deployments verbs: - create - delete diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml new file mode 100644 index 000000000..92717de94 --- /dev/null +++ b/config/webhook/manifests.yaml @@ -0,0 +1,53 @@ + +--- +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingWebhookConfiguration +metadata: + creationTimestamp: null + name: mutating-webhook-configuration +webhooks: +- clientConfig: + caBundle: Cg== + service: + name: webhook-service + namespace: system + path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: mopentelemetrycollector.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + +--- +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + creationTimestamp: null + name: validating-webhook-configuration +webhooks: +- clientConfig: + caBundle: Cg== + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: vopentelemetrycollector.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + - DELETE + resources: + - opentelemetrycollectors diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index ae8350739..5f52113b9 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -21,6 +21,7 @@ import ( "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -98,7 +99,8 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch -// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=configmaps;serviceaccounts;services,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="apps",resources=deployments;daemonsets,verbs=get;list;watch;create;update;patch;delete // Reconcile the current state of an OpenTelemetry collector resource with the desired state func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { @@ -107,7 +109,10 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Res var instance v1alpha1.OpenTelemetryCollector if err := r.Get(ctx, req.NamespacedName, &instance); err != nil { - log.Error(err, "unable to fetch OpenTelemetryCollector") + if !apierrors.IsNotFound(err) { + log.Error(err, "unable to fetch OpenTelemetryCollector") + } + // we'll ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them // on deleted requests. diff --git a/main.go b/main.go index 6cf190a36..e0ef4ab7f 100644 --- a/main.go +++ b/main.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -48,7 +48,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(opentelemetryiov1alpha1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } @@ -146,6 +146,13 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "OpenTelemetryCollector") os.Exit(1) } + + if os.Getenv("ENABLE_WEBHOOKS") != "false" { + if err = (&opentelemetryiov1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") + os.Exit(1) + } + } // +kubebuilder:scaffold:builder setupLog.Info("starting manager") From ddbd3140df1fee787c40b8e20a7a9d8691534222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 28 Aug 2020 17:01:40 +0200 Subject: [PATCH 0058/1234] Set default mode via webhook (#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #48 Signed-off-by: Juraci Paixão Kröhling --- api/v1alpha1/opentelemetrycollector_types.go | 1 - api/v1alpha1/opentelemetrycollector_webhook.go | 4 ++++ .../opentelemetry.io_opentelemetrycollectors.yaml | 10 +++------- controllers/opentelemetrycollector_controller_test.go | 3 +++ pkg/collector/reconcile/deployment.go | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 4f5bd144e..82b9354f5 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -43,7 +43,6 @@ type OpenTelemetryCollectorSpec struct { // Mode represents how the collector should be deployed (deployment vs. daemonset) // +optional - // +kubebuilder:validation:Enum=daemonset;deployment // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode Mode `json:"mode,omitempty"` diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index c87539e3c..399183a50 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -36,6 +36,10 @@ var _ webhook.Defaulter = &OpenTelemetryCollector{} // Default implements webhook.Defaulter so a webhook will be registered for the type func (r *OpenTelemetryCollector) Default() { + if len(r.Spec.Mode) == 0 { + r.Spec.Mode = ModeDeployment + } + opentelemetrycollectorlog.Info("default", "name", r.Name) } diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index ab172e71b..a9faee434 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -59,15 +59,11 @@ spec: Collector. type: string mode: - allOf: - - enum: - - daemonset - - deployment - - enum: - - daemonset - - deployment description: Mode represents how the collector should be deployed (deployment vs. daemonset) + enum: + - daemonset + - deployment type: string ports: description: Ports allows a set of ports to be exposed by the underlying diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index fb62a6a71..0db4994d3 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -43,6 +43,9 @@ var _ = Describe("OpenTelemetryCollector controller", func() { Name: nsn.Name, Namespace: nsn.Namespace, }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDeployment, + }, } err := k8sClient.Create(context.Background(), created) Expect(err).ToNot(HaveOccurred()) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 0e29ff406..e747f3bec 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -32,7 +32,7 @@ import ( // Deployments reconciles the deployment(s) required for the instance in the current context func Deployments(ctx context.Context, params Params) error { desired := []appsv1.Deployment{} - if len(params.Instance.Spec.Mode) == 0 || params.Instance.Spec.Mode == "deployment" { + if params.Instance.Spec.Mode == "deployment" { desired = append(desired, desiredDeployment(ctx, params)) } From d509ca42665f1e5d59d4b136d4026a50e4d95437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 31 Aug 2020 11:43:24 +0200 Subject: [PATCH 0059/1234] Unified naming and building of core objects (#51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #50 Signed-off-by: Juraci Paixão Kröhling --- config/rbac/role.yaml | 33 ++++++ .../opentelemetrycollector_controller.go | 2 - pkg/collector/collector_suite_test.go | 13 +++ pkg/collector/container.go | 67 ++++++++++++ pkg/collector/container_test.go | 84 +++++++++++++++ pkg/collector/daemonset.go | 66 ++++++++++++ pkg/collector/daemonset_test.go | 44 ++++++++ pkg/collector/deployment.go | 67 ++++++++++++ pkg/collector/deployment_test.go | 44 ++++++++ pkg/collector/labels_test.go | 48 +++++++++ pkg/collector/reconcile/configmap.go | 6 +- pkg/collector/reconcile/daemonset.go | 101 +----------------- pkg/collector/reconcile/deployment.go | 101 +----------------- pkg/collector/reconcile/service.go | 19 ++-- pkg/collector/reconcile/serviceaccount.go | 31 +----- pkg/collector/serviceaccount.go | 33 ++++++ pkg/collector/serviceaccount_test.go | 60 +++++++++++ pkg/collector/volume.go | 45 ++++++++ pkg/collector/volume_test.go | 51 +++++++++ pkg/naming/main.go | 47 ++++++++ 20 files changed, 724 insertions(+), 238 deletions(-) create mode 100644 pkg/collector/collector_suite_test.go create mode 100644 pkg/collector/container.go create mode 100644 pkg/collector/container_test.go create mode 100644 pkg/collector/daemonset.go create mode 100644 pkg/collector/daemonset_test.go create mode 100644 pkg/collector/deployment.go create mode 100644 pkg/collector/deployment_test.go create mode 100644 pkg/collector/labels_test.go create mode 100644 pkg/collector/serviceaccount.go create mode 100644 pkg/collector/serviceaccount_test.go create mode 100644 pkg/collector/volume.go create mode 100644 pkg/collector/volume_test.go create mode 100644 pkg/naming/main.go diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cd78414f3..1bed2068d 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -10,7 +10,29 @@ rules: - "" resources: - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: - services verbs: - create @@ -24,6 +46,17 @@ rules: - apps resources: - daemonsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: - deployments verbs: - create diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 5f52113b9..3ebcd9e0f 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -99,8 +99,6 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch -// +kubebuilder:rbac:groups="",resources=configmaps;serviceaccounts;services,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups="apps",resources=deployments;daemonsets,verbs=get;list;watch;create;update;patch;delete // Reconcile the current state of an OpenTelemetry collector resource with the desired state func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { diff --git a/pkg/collector/collector_suite_test.go b/pkg/collector/collector_suite_test.go new file mode 100644 index 000000000..4e1cd50d2 --- /dev/null +++ b/pkg/collector/collector_suite_test.go @@ -0,0 +1,13 @@ +package collector_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestCollector(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Collector Suite") +} diff --git a/pkg/collector/container.go b/pkg/collector/container.go new file mode 100644 index 000000000..e9f161ab2 --- /dev/null +++ b/pkg/collector/container.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Container builds a container for the given collector +func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { + image := otelcol.Spec.Image + if len(image) == 0 { + image = cfg.CollectorImage() + } + + argsMap := otelcol.Spec.Args + if argsMap == nil { + argsMap = map[string]string{} + } + + if _, exists := argsMap["config"]; exists { + logger.Info("the 'config' flag isn't allowed and is being ignored") + } + + // this effectively overrides any 'config' entry that might exist in the CR + argsMap["config"] = fmt.Sprintf("/conf/%s", cfg.CollectorConfigMapEntry()) + + var args []string + for k, v := range argsMap { + args = append(args, fmt.Sprintf("--%s=%s", k, v)) + } + + volumeMounts := []corev1.VolumeMount{{ + Name: naming.ConfigMapVolume(), + MountPath: "/conf", + }} + + if len(otelcol.Spec.VolumeMounts) > 0 { + volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) + } + + return corev1.Container{ + Name: naming.Container(), + Image: image, + VolumeMounts: volumeMounts, + Args: args, + } +} diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go new file mode 100644 index 000000000..7599d934a --- /dev/null +++ b/pkg/collector/container_test.go @@ -0,0 +1,84 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +var _ = Describe("Container", func() { + logger := logf.Log.WithName("unit-tests") + + It("should generate a new default container", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New(config.WithCollectorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + Expect(c.Image).To(Equal("default-image")) + }) + + It("should allow image to be overridden", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "overridden-image", + }, + } + cfg := config.New(config.WithCollectorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + Expect(c.Image).To(Equal("overridden-image")) + }) + + It("config flag is ignored", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "key": "value", + "config": "/some-custom-file.yaml", + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + Expect(c.Args).To(HaveLen(2)) + Expect(c.Args).To(ContainElement("--key=value")) // sanity check + Expect(c.Args).ToNot(ContainElement("--config=/some-custom-file.yaml")) + }) + + It("custom volumes are mounted", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + VolumeMounts: []corev1.VolumeMount{{ + Name: "custom-volume-mount", + }}, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + Expect(c.VolumeMounts).To(HaveLen(2)) + Expect(c.VolumeMounts[1].Name).To(Equal("custom-volume-mount")) + }) +}) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go new file mode 100644 index 000000000..06fc5af73 --- /dev/null +++ b/pkg/collector/daemonset.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// DaemonSet builds the deployment for the given instance +func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + + annotations := otelcol.Annotations + if annotations == nil { + annotations = map[string]string{} + } + + annotations["prometheus.io/scrape"] = "true" + annotations["prometheus.io/port"] = "8888" + annotations["prometheus.io/path"] = "/metrics" + + return appsv1.DaemonSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Collector(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: annotations, + }, + Spec: appsv1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), + }, + }, + }, + } +} diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go new file mode 100644 index 000000000..f9053b5bd --- /dev/null +++ b/pkg/collector/daemonset_test.go @@ -0,0 +1,44 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +var _ = Describe("Daemonset", func() { + logger := logf.Log.WithName("unit-tests") + + It("should build a default new daemonset", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + cfg := config.New() + + // test + d := DaemonSet(cfg, logger, otelcol) + + // verify + Expect(d.Name).To(Equal("my-instance-collector")) + Expect(d.Labels["app.kubernetes.io/name"]).To(Equal("my-instance-collector")) + Expect(d.Annotations["prometheus.io/scrape"]).To(Equal("true")) + Expect(d.Annotations["prometheus.io/port"]).To(Equal("8888")) + Expect(d.Annotations["prometheus.io/path"]).To(Equal("/metrics")) + + Expect(d.Spec.Template.Spec.Containers).To(HaveLen(1)) + + // none of the default annotations should propagate down to the pod + Expect(d.Spec.Template.Annotations).To(BeEmpty()) + + // the pod selector should match the pod spec's labels + Expect(d.Spec.Template.Labels).To(Equal(d.Spec.Selector.MatchLabels)) + }) +}) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go new file mode 100644 index 000000000..435124fdd --- /dev/null +++ b/pkg/collector/deployment.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Deployment builds the deployment for the given instance +func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + + annotations := otelcol.Annotations + if annotations == nil { + annotations = map[string]string{} + } + + annotations["prometheus.io/scrape"] = "true" + annotations["prometheus.io/port"] = "8888" + annotations["prometheus.io/path"] = "/metrics" + + return appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Collector(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: annotations, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: otelcol.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), + }, + }, + }, + } +} diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go new file mode 100644 index 000000000..474a06049 --- /dev/null +++ b/pkg/collector/deployment_test.go @@ -0,0 +1,44 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +var _ = Describe("Deployment", func() { + logger := logf.Log.WithName("unit-tests") + + It("should build a default new deployment", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + + // verify + Expect(d.Name).To(Equal("my-instance-collector")) + Expect(d.Labels["app.kubernetes.io/name"]).To(Equal("my-instance-collector")) + Expect(d.Annotations["prometheus.io/scrape"]).To(Equal("true")) + Expect(d.Annotations["prometheus.io/port"]).To(Equal("8888")) + Expect(d.Annotations["prometheus.io/path"]).To(Equal("/metrics")) + + Expect(d.Spec.Template.Spec.Containers).To(HaveLen(1)) + + // none of the default annotations should propagate down to the pod + Expect(d.Spec.Template.Annotations).To(BeEmpty()) + + // the pod selector should match the pod spec's labels + Expect(d.Spec.Template.Labels).To(Equal(d.Spec.Selector.MatchLabels)) + }) +}) diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go new file mode 100644 index 000000000..99911a9bf --- /dev/null +++ b/pkg/collector/labels_test.go @@ -0,0 +1,48 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +var _ = Describe("Labels", func() { + It("should build a common set of labels", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + }, + } + + // test + labels := Labels(otelcol) + + // verify + Expect(labels).To(HaveLen(4)) + Expect(labels["app.kubernetes.io/managed-by"]).To(Equal("opentelemetry-operator")) + Expect(labels["app.kubernetes.io/instance"]).To(Equal("my-ns.my-instance")) + Expect(labels["app.kubernetes.io/part-of"]).To(Equal("opentelemetry")) + Expect(labels["app.kubernetes.io/component"]).To(Equal("opentelemetry-collector")) + }) + + It("should propagate down the instance's labels", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"myapp": "mycomponent"}, + }, + } + + // test + labels := Labels(otelcol) + + // verify + Expect(labels).To(HaveLen(5)) + Expect(labels["myapp"]).To(Equal("mycomponent")) + }) +}) diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 26236238d..4609ae9b3 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -26,8 +26,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) +// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete + // ConfigMaps reconciles the config map(s) required for the instance in the current context func ConfigMaps(ctx context.Context, params Params) error { desired := []corev1.ConfigMap{ @@ -48,8 +51,7 @@ func ConfigMaps(ctx context.Context, params Params) error { } func desiredConfigMap(ctx context.Context, params Params) corev1.ConfigMap { - name := fmt.Sprintf("%s-collector", params.Instance.Name) - + name := naming.ConfigMap(params.Instance) labels := collector.Labels(params.Instance) labels["app.kubernetes.io/name"] = name diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index ecbef1ce5..b1ef4d3d3 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -19,9 +19,7 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -29,11 +27,13 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) +// +kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;list;watch;create;update;patch;delete + // DaemonSets reconciles the daemon set(s) required for the instance in the current context func DaemonSets(ctx context.Context, params Params) error { desired := []appsv1.DaemonSet{} if params.Instance.Spec.Mode == "daemonset" { - desired = append(desired, desiredDaemonSet(ctx, params)) + desired = append(desired, collector.DaemonSet(params.Config, params.Log, params.Instance)) } // first, handle the create/update parts @@ -49,101 +49,6 @@ func DaemonSets(ctx context.Context, params Params) error { return nil } -func desiredDaemonSet(ctx context.Context, params Params) appsv1.DaemonSet { - name := fmt.Sprintf("%s-collector", params.Instance.Name) - - image := params.Instance.Spec.Image - if len(image) == 0 { - image = params.Config.CollectorImage() - } - - labels := collector.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name - - annotations := params.Instance.Annotations - if annotations == nil { - annotations = map[string]string{} - } - - annotations["prometheus.io/scrape"] = "true" - annotations["prometheus.io/port"] = "8888" - annotations["prometheus.io/path"] = "/metrics" - - argsMap := params.Instance.Spec.Args - if argsMap == nil { - argsMap = map[string]string{} - } - - if _, exists := argsMap["config"]; exists { - params.Log.Info("the 'config' flag isn't allowed and is being ignored") - } - - // this effectively overrides any 'config' entry that might exist in the CR - argsMap["config"] = fmt.Sprintf("/conf/%s", params.Config.CollectorConfigMapEntry()) - - var args []string - for k, v := range argsMap { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) - } - - configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) - volumeMounts := []corev1.VolumeMount{{ - Name: configMapVolumeName, - MountPath: "/conf", - }} - volumes := []corev1.Volume{{ - Name: configMapVolumeName, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: name}, - Items: []corev1.KeyToPath{{ - Key: params.Config.CollectorConfigMapEntry(), - Path: params.Config.CollectorConfigMapEntry(), - }}, - }, - }, - }} - - if len(params.Instance.Spec.VolumeMounts) > 0 { - volumeMounts = append(volumeMounts, params.Instance.Spec.VolumeMounts...) - } - - if len(params.Instance.Spec.Volumes) > 0 { - volumes = append(volumes, params.Instance.Spec.Volumes...) - } - - return appsv1.DaemonSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: appsv1.DaemonSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: annotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountNameFor(params.Instance), - Containers: []corev1.Container{{ - Name: "opentelemetry-collector", - Image: image, - VolumeMounts: volumeMounts, - Args: args, - }}, - Volumes: volumes, - }, - }, - }, - } - -} - func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { for _, obj := range expected { desired := obj diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index e747f3bec..04941aa5f 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -19,9 +19,7 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -29,11 +27,13 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) +// +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete + // Deployments reconciles the deployment(s) required for the instance in the current context func Deployments(ctx context.Context, params Params) error { desired := []appsv1.Deployment{} if params.Instance.Spec.Mode == "deployment" { - desired = append(desired, desiredDeployment(ctx, params)) + desired = append(desired, collector.Deployment(params.Config, params.Log, params.Instance)) } // first, handle the create/update parts @@ -49,101 +49,6 @@ func Deployments(ctx context.Context, params Params) error { return nil } -func desiredDeployment(ctx context.Context, params Params) appsv1.Deployment { - name := fmt.Sprintf("%s-collector", params.Instance.Name) - - image := params.Instance.Spec.Image - if len(image) == 0 { - image = params.Config.CollectorImage() - } - - labels := collector.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name - - annotations := params.Instance.Annotations - if annotations == nil { - annotations = map[string]string{} - } - - annotations["prometheus.io/scrape"] = "true" - annotations["prometheus.io/port"] = "8888" - annotations["prometheus.io/path"] = "/metrics" - - argsMap := params.Instance.Spec.Args - if argsMap == nil { - argsMap = map[string]string{} - } - - if _, exists := argsMap["config"]; exists { - params.Log.Info("the 'config' flag isn't allowed and is being ignored") - } - - // this effectively overrides any 'config' entry that might exist in the CR - argsMap["config"] = fmt.Sprintf("/conf/%s", params.Config.CollectorConfigMapEntry()) - - var args []string - for k, v := range argsMap { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) - } - - configMapVolumeName := fmt.Sprintf("otc-internal-%s", name) - volumeMounts := []corev1.VolumeMount{{ - Name: configMapVolumeName, - MountPath: "/conf", - }} - volumes := []corev1.Volume{{ - Name: configMapVolumeName, - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: name}, - Items: []corev1.KeyToPath{{ - Key: params.Config.CollectorConfigMapEntry(), - Path: params.Config.CollectorConfigMapEntry(), - }}, - }, - }, - }} - - if len(params.Instance.Spec.VolumeMounts) > 0 { - volumeMounts = append(volumeMounts, params.Instance.Spec.VolumeMounts...) - } - - if len(params.Instance.Spec.Volumes) > 0 { - volumes = append(volumes, params.Instance.Spec.Volumes...) - } - - return appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: params.Instance.Spec.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: annotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountNameFor(params.Instance), - Containers: []corev1.Container{{ - Name: "opentelemetry-collector", - Image: image, - VolumeMounts: volumeMounts, - Args: args, - }}, - Volumes: volumes, - }, - }, - }, - } -} - func expectedDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { for _, obj := range expected { desired := obj diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 2c20a8cc9..2caedf154 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -18,6 +18,7 @@ import ( "context" "fmt" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -25,11 +26,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/go-logr/logr" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) +// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete + // Services reconciles the service(s) required for the instance in the current context func Services(ctx context.Context, params Params) error { desired := []corev1.Service{} @@ -57,10 +60,8 @@ func Services(ctx context.Context, params Params) error { } func desiredService(ctx context.Context, params Params) *corev1.Service { - name := fmt.Sprintf("%s-collector", params.Instance.Name) - labels := collector.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name + labels["app.kubernetes.io/name"] = naming.Service(params.Instance) // by coincidence, the selector is the same as the label, but note that the selector points to the deployment // whereas 'labels' refers to the service @@ -105,7 +106,7 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: name, + Name: naming.Service(params.Instance), Namespace: params.Instance.Namespace, Labels: labels, Annotations: params.Instance.Annotations, @@ -124,23 +125,21 @@ func headless(ctx context.Context, params Params) *corev1.Service { return nil } - h.Name = fmt.Sprintf("%s-headless", h.Name) + h.Name = naming.HeadlessService(params.Instance) h.Spec.ClusterIP = "None" return h } func monitoringService(ctx context.Context, params Params) *corev1.Service { - name := fmt.Sprintf("%s-collector-monitoring", params.Instance.Name) - labels := collector.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name + labels["app.kubernetes.io/name"] = naming.MonitoringService(params.Instance) selector := collector.Labels(params.Instance) selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-collector", params.Instance.Name) return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: name, + Name: naming.MonitoringService(params.Instance), Namespace: params.Instance.Namespace, Labels: labels, Annotations: params.Instance.Annotations, diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index a2d67b25d..4a60d8054 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -20,19 +20,19 @@ import ( corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) +// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete + // ServiceAccounts reconciles the service account(s) required for the instance in the current context func ServiceAccounts(ctx context.Context, params Params) error { desired := []corev1.ServiceAccount{ - desiredServiceAccount(ctx, params), + collector.ServiceAccount(params.Instance), } // first, handle the create/update parts @@ -48,22 +48,6 @@ func ServiceAccounts(ctx context.Context, params Params) error { return nil } -func desiredServiceAccount(ctx context.Context, params Params) corev1.ServiceAccount { - name := fmt.Sprintf("%s-collector", params.Instance.Name) - - labels := collector.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name - - return corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - } -} - func expectedServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { for _, obj := range expected { desired := obj @@ -141,12 +125,3 @@ func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1 return nil } - -// ServiceAccountNameFor returns the name of the service account for the given context -func ServiceAccountNameFor(instance v1alpha1.OpenTelemetryCollector) string { - if len(instance.Spec.ServiceAccount) == 0 { - return fmt.Sprintf("%s-collector", instance.Name) - } - - return instance.Spec.ServiceAccount -} diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go new file mode 100644 index 000000000..50511bd2f --- /dev/null +++ b/pkg/collector/serviceaccount.go @@ -0,0 +1,33 @@ +package collector + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance +func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { + if len(instance.Spec.ServiceAccount) == 0 { + return naming.ServiceAccount(instance) + } + + return instance.Spec.ServiceAccount +} + +//ServiceAccount returns the service account for the given instance +func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.ServiceAccount(otelcol) + + return corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.ServiceAccount(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: otelcol.Annotations, + }, + } +} diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go new file mode 100644 index 000000000..59513f6a1 --- /dev/null +++ b/pkg/collector/serviceaccount_test.go @@ -0,0 +1,60 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +var _ = Describe("Serviceaccount", func() { + It("should default to an instance-specific service account name", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + Expect(sa).To(Equal("my-instance-collector")) + }) + + It("should allow the serviceaccount to be overridden", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ServiceAccount: "my-special-sa", + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + Expect(sa).To(Equal("my-special-sa")) + }) + + It("should build a new default service account", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + // test + sa := ServiceAccount(otelcol) + + // verify + Expect(sa.Name).To(Equal("my-instance-collector")) + }) +}) diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go new file mode 100644 index 000000000..d21895713 --- /dev/null +++ b/pkg/collector/volume.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Volumes builds the volumes for the given instance, including the config map volume +func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.Volume { + volumes := []corev1.Volume{{ + Name: naming.ConfigMapVolume(), + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: naming.ConfigMap(otelcol)}, + Items: []corev1.KeyToPath{{ + Key: cfg.CollectorConfigMapEntry(), + Path: cfg.CollectorConfigMapEntry(), + }}, + }, + }, + }} + + if len(otelcol.Spec.Volumes) > 0 { + volumes = append(volumes, otelcol.Spec.Volumes...) + } + + return volumes +} diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go new file mode 100644 index 000000000..03e244b12 --- /dev/null +++ b/pkg/collector/volume_test.go @@ -0,0 +1,51 @@ +package collector_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +var _ = Describe("Volume", func() { + It("should build a new default volume", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + Expect(volumes).To(HaveLen(1)) + + // check that it's the otc-internal volume, with the config map + Expect(volumes[0].Name).To(Equal(naming.ConfigMapVolume())) + }) + + It("should allow more volumes to be added", func() { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Volumes: []corev1.Volume{{ + Name: "my-volume", + }}, + }, + } + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + Expect(volumes).To(HaveLen(2)) + + // check that it's the otc-internal volume, with the config map + Expect(volumes[1].Name).To(Equal("my-volume")) + }) + +}) diff --git a/pkg/naming/main.go b/pkg/naming/main.go new file mode 100644 index 000000000..8e9f1039b --- /dev/null +++ b/pkg/naming/main.go @@ -0,0 +1,47 @@ +package naming + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers +func ConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-collector", otelcol.Name) +} + +// ConfigMapVolume returns the name to use for the config map's volume in the pod +func ConfigMapVolume() string { + return "otc-internal" +} + +// Container returns the name to use for the container in the pod +func Container() string { + return "otc-container" +} + +// Collector builds the collector (deployment/daemonset) name based on the instance +func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-collector", otelcol.Name) +} + +// HeadlessService builds the name for the headless service based on the instance +func HeadlessService(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-headless", Service(otelcol)) +} + +// MonitoringService builds the name for the monitoring service based on the instance +func MonitoringService(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-monitoring", Service(otelcol)) +} + +// Service builds the service name based on the instance +func Service(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-collector", otelcol.Name) +} + +// ServiceAccount builds the service account name based on the instance +func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-collector", otelcol.Name) +} From e8d0add2f05bb100209b344c235ae67196ad9eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 1 Sep 2020 17:44:34 +0200 Subject: [PATCH 0060/1234] Implemented pod injector webhook (#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- api/v1alpha1/mode.go | 5 +- api/v1alpha1/opentelemetrycollector_types.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 5 +- config/rbac/role.yaml | 7 + config/samples/sidecar.yaml | 24 ++ config/webhook/manifests.yaml | 18 + internal/podinjector/main.go | 181 ++++++++ internal/podinjector/main_test.go | 408 ++++++++++++++++++ .../podinjector/podinjector_suite_test.go | 57 +++ main.go | 14 +- pkg/collector/reconcile/service.go | 16 +- pkg/collector/reconcile/serviceaccount.go | 6 +- pkg/sidecar/annotation.go | 58 +++ pkg/sidecar/annotation_test.go | 135 ++++++ pkg/sidecar/pod.go | 73 ++++ pkg/sidecar/pod_test.go | 141 ++++++ pkg/sidecar/sidecar_suite_test.go | 27 ++ 17 files changed, 1160 insertions(+), 17 deletions(-) create mode 100644 config/samples/sidecar.yaml create mode 100644 internal/podinjector/main.go create mode 100644 internal/podinjector/main_test.go create mode 100644 internal/podinjector/podinjector_suite_test.go create mode 100644 pkg/sidecar/annotation.go create mode 100644 pkg/sidecar/annotation_test.go create mode 100644 pkg/sidecar/pod.go create mode 100644 pkg/sidecar/pod_test.go create mode 100644 pkg/sidecar/sidecar_suite_test.go diff --git a/api/v1alpha1/mode.go b/api/v1alpha1/mode.go index 6d896161f..72b97a47c 100644 --- a/api/v1alpha1/mode.go +++ b/api/v1alpha1/mode.go @@ -16,7 +16,7 @@ package v1alpha1 type ( // Mode represents how the collector should be deployed (deployment vs. daemonset) - // +kubebuilder:validation:Enum=daemonset;deployment + // +kubebuilder:validation:Enum=daemonset;deployment;sidecar Mode string ) @@ -26,4 +26,7 @@ const ( // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment ModeDeployment Mode = "deployment" + + // ModeSidecar specifies that the collector should be deployed as a sidecar to pods + ModeSidecar Mode = "sidecar" ) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 82b9354f5..618c10caa 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -41,7 +41,7 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` - // Mode represents how the collector should be deployed (deployment vs. daemonset) + // Mode represents how the collector should be deployed (deployment, daemonset or sidecar) // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode Mode `json:"mode,omitempty"` diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index a9faee434..2e420414a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -59,11 +59,12 @@ spec: Collector. type: string mode: - description: Mode represents how the collector should be deployed (deployment - vs. daemonset) + description: Mode represents how the collector should be deployed (deployment, + daemonset or sidecar) enum: - daemonset - deployment + - sidecar type: string ports: description: Ports allows a set of ports to be exposed by the underlying diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 1bed2068d..728e1c9de 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -18,6 +18,13 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - list + - watch - apiGroups: - "" resources: diff --git a/config/samples/sidecar.yaml b/config/samples/sidecar.yaml new file mode 100644 index 000000000..acac0f382 --- /dev/null +++ b/config/samples/sidecar.yaml @@ -0,0 +1,24 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: opentelemetrycollector-as-sidecar +spec: + mode: sidecar + config: | + receivers: + jaeger: + protocols: + grpc: + + processors: + queued_retry: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [queued_retry] + exporters: [logging] diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 92717de94..b38a312a9 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -24,6 +24,24 @@ webhooks: - UPDATE resources: - opentelemetrycollectors +- clientConfig: + caBundle: Cg== + service: + name: webhook-service + namespace: system + path: /mutate-v1-pod + failurePolicy: Ignore + name: mpod.kb.io + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods --- apiVersion: admissionregistration.k8s.io/v1beta1 diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go new file mode 100644 index 000000000..edfee05a8 --- /dev/null +++ b/internal/podinjector/main.go @@ -0,0 +1,181 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package podinjector + +import ( + "context" + "encoding/json" + "errors" + "net/http" + "strings" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" +) + +var ( + ErrMultipleInstancesPossible = errors.New("multiple OpenTelemetry Collector instances available, cannot determine which one to select") + ErrNoInstancesAvailable = errors.New("no OpenTelemetry Collector instances available") + ErrInstanceNotSidecar = errors.New("the OpenTelemetry Collector's mode is not set to sidecar") +) + +// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io +// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch + +var _ PodSidecarInjector = (*podSidecarInjector)(nil) + +// PodSidecarInjector is a webhook handler that analyzes new pods and injects appropriate sidecars into it +type PodSidecarInjector interface { + admission.Handler + admission.DecoderInjector +} + +// the implementation +type podSidecarInjector struct { + config config.Config + logger logr.Logger + client client.Client + decoder *admission.Decoder +} + +// NewPodSidecarInjector creates a new PodSidecarInjector +func NewPodSidecarInjector(cfg config.Config, logger logr.Logger, cl client.Client) PodSidecarInjector { + return &podSidecarInjector{ + config: cfg, + logger: logger, + client: cl, + } +} + +func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) admission.Response { + pod := corev1.Pod{} + err := p.decoder.Decode(req, &pod) + if err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + + // we use the req.Namespace here because the pod might have not been created yet + ns := corev1.Namespace{} + err = p.client.Get(ctx, types.NamespacedName{Name: req.Namespace, Namespace: ""}, &ns) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + pod, err = p.mutate(ctx, ns, pod) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + marshaledPod, err := json.Marshal(pod) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) +} + +func (p *podSidecarInjector) InjectDecoder(d *admission.Decoder) error { + p.decoder = d + return nil +} + +func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { + logger := p.logger.WithValues("namespace", pod.Namespace, "name", pod.Name) + + // if no annotations are found at all, just return the same pod + annValue := sidecar.AnnotationValue(ns, pod) + if len(annValue) == 0 { + logger.V(1).Info("annotation not present in deployment, skipping sidecar injection") + return pod, nil + } + + // is the annotation value 'false'? if so, we need a pod without the sidecar (ie, remove if exists) + if strings.EqualFold(annValue, "false") { + logger.V(1).Info("pod explicitly refuses sidecar injection, attempting to remove sidecar if it exists") + return sidecar.Remove(pod) + } + + // from this point and on, a sidecar is wanted + + // check whether there's a sidecar already -- return the same pod if that's the case. + if sidecar.ExistsIn(pod) { + logger.V(1).Info("pod already has sidecar in it, skipping injection") + return pod, nil + } + + // which instance should it talk to? + otelcol, err := p.getCollectorInstance(ctx, ns, annValue) + if err != nil { + if err == ErrMultipleInstancesPossible || err == ErrNoInstancesAvailable || err == ErrInstanceNotSidecar { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Collector instance for this pod's sidecar") + return pod, nil + } + + // something else happened, better fail here + return pod, err + } + + // once it's been determined that a sidecar is desired, none exists yet, and we know which instance it should talk to, + // we should add the sidecar. + logger.V(1).Info("injecting sidecar into pod", "otelcol-namespace", otelcol.Namespace, "otelcol-name", otelcol.Name) + return sidecar.Add(p.config, p.logger, otelcol, pod) +} + +func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { + if strings.EqualFold(ann, "true") { + return p.selectCollectorInstance(ctx, ns, ann) + } + + otelcol := v1alpha1.OpenTelemetryCollector{} + err := p.client.Get(ctx, types.NamespacedName{Name: ann, Namespace: ns.Name}, &otelcol) + if err != nil { + return otelcol, err + } + + if otelcol.Spec.Mode != v1alpha1.ModeSidecar { + return v1alpha1.OpenTelemetryCollector{}, ErrInstanceNotSidecar + } + + return otelcol, nil +} + +func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { + otelcols := v1alpha1.OpenTelemetryCollectorList{} + if err := p.client.List(ctx, &otelcols, client.InNamespace(ns.Name)); err != nil { + return v1alpha1.OpenTelemetryCollector{}, err + } + + if len(otelcols.Items) == 0 { + return v1alpha1.OpenTelemetryCollector{}, ErrNoInstancesAvailable + } + if len(otelcols.Items) > 1 { + return v1alpha1.OpenTelemetryCollector{}, ErrMultipleInstancesPossible + } + + otelcol := otelcols.Items[0] + if otelcol.Spec.Mode != v1alpha1.ModeSidecar { + return v1alpha1.OpenTelemetryCollector{}, ErrInstanceNotSidecar + } + + return otelcol, nil +} diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go new file mode 100644 index 000000000..ce383dc1e --- /dev/null +++ b/internal/podinjector/main_test.go @@ -0,0 +1,408 @@ +package podinjector_test + +import ( + "context" + "encoding/json" + "net/http" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "k8s.io/api/admission/v1beta1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/kubectl/pkg/scheme" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" +) + +var _ = Describe("PodInjector", func() { + logger := logf.Log.WithName("unit-tests") + + It("should inject an appropriate sidecar", func() { + for _, tt := range []struct { + name string + ns corev1.Namespace + pod corev1.Pod + otelcol v1alpha1.OpenTelemetryCollector + }{ + { + // this is the simplest positive test: a pod is being created with an annotation + // telling the operator to inject an instance, and the annotation's value contains + // the name of an existing otelcol instance with Mode=Sidecar + name: "simplest positive case", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-simplest-positive-case", + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, + }, + }, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-simplest-positive-case", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }, + }, + { + // in this case, the annotation is at the namespace instead of at the pod + name: "namespace is annotated", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-annotated-namespace", + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, + }, + }, + pod: corev1.Pod{}, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-annotated-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }, + }, + { + // now, we automatically select an existing otelcol + name: "auto-select basde on the annotation's value", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-with-autoselect", + Annotations: map[string]string{sidecar.Annotation: "true"}, + }, + }, + pod: corev1.Pod{}, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-with-autoselect", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }, + }, + } { + When(tt.name, func() { + err := k8sClient.Create(context.Background(), &tt.ns) + Expect(err).ToNot(HaveOccurred()) + + err = k8sClient.Create(context.Background(), &tt.otelcol) + Expect(err).ToNot(HaveOccurred()) + + encoded, err := json.Marshal(tt.pod) + Expect(err).ToNot(HaveOccurred()) + + // the actual request we see in the webhook + req := admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: tt.ns.Name, + Object: runtime.RawExtension{ + Raw: encoded, + }, + }, + } + + // the webhook handler + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + Expect(err).ToNot(HaveOccurred()) + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + err = injector.InjectDecoder(decoder) + Expect(err).ToNot(HaveOccurred()) + + // test + res := injector.Handle(context.Background(), req) + + // verify + Expect(res.Allowed).To(BeTrue()) + Expect(res.AdmissionResponse.Result).To(BeNil()) + Expect(res.Patches).To(HaveLen(3)) + + expectedMap := map[string]bool{ + "/metadata/labels": false, + "/spec/volumes": false, + "/spec/containers": false, + } + for _, patch := range res.Patches { + Expect(patch.Operation).To(Equal("add")) + expectedMap[patch.Path] = true + } + for k := range expectedMap { + Expect(expectedMap[k]).To(BeTrue(), "patch with path %s not found", k) + } + + // cleanup + Expect(k8sClient.Delete(context.Background(), &tt.otelcol)).ToNot(HaveOccurred()) + Expect(k8sClient.Delete(context.Background(), &tt.ns)).ToNot(HaveOccurred()) + }) + } + }) + + It("pod should not be changed", func() { + for _, tt := range []struct { + name string + ns corev1.Namespace + pod corev1.Pod + otelcols []v1alpha1.OpenTelemetryCollector + }{ + { + name: "namespace has no annotations", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-annotations", + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-annotations", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }}, + }, + { + name: "multiple possible otelcols", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-multiple-otelcols", + Annotations: map[string]string{sidecar.Annotation: "true"}, + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-1", + Namespace: "my-namespace-multiple-otelcols", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-2", + Namespace: "my-namespace-multiple-otelcols", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }, + }, + }, + { + name: "no otelcols", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-otelcols", + Annotations: map[string]string{sidecar.Annotation: "true"}, + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{}, + }, + { + name: "otelcol is not a sidecar", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-sidecar-otelcol", + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-sidecar-otelcol", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDaemonSet, + }, + }}, + }, + { + name: "automatically injected otelcol is not a sidecar", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-automatic-sidecar-otelcol", + Annotations: map[string]string{sidecar.Annotation: "true"}, + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-automatic-sidecar-otelcol", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDaemonSet, + }, + }}, + }, + { + name: "pod has sidecar already", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-pod-has-sidecar", + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: naming.Container(), + }}, + }, + }, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-pod-has-sidecar", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }}, + }, + { + name: "sidecar not desired", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-sidecar-not-desired", + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "false"}, + }, + }, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-sidecar-not-desired", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }}, + }, + } { + When(tt.name, func() { + err := k8sClient.Create(context.Background(), &tt.ns) + Expect(err).ToNot(HaveOccurred()) + + for _, otelcol := range tt.otelcols { + err = k8sClient.Create(context.Background(), &otelcol) + Expect(err).ToNot(HaveOccurred()) + } + + encoded, err := json.Marshal(tt.pod) + Expect(err).ToNot(HaveOccurred()) + + // the actual request we see in the webhook + req := admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: tt.ns.Name, + Object: runtime.RawExtension{ + Raw: encoded, + }, + }, + } + + // the webhook handler + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + Expect(err).ToNot(HaveOccurred()) + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + err = injector.InjectDecoder(decoder) + Expect(err).ToNot(HaveOccurred()) + + // test + res := injector.Handle(context.Background(), req) + + // verify + Expect(res.Allowed).To(BeTrue()) + Expect(res.AdmissionResponse.Result).To(BeNil()) + Expect(res.Patches).To(HaveLen(0)) + + // cleanup + for _, otelcol := range tt.otelcols { + Expect(k8sClient.Delete(context.Background(), &otelcol)).ToNot(HaveOccurred()) + } + Expect(k8sClient.Delete(context.Background(), &tt.ns)).ToNot(HaveOccurred()) + }) + } + }) + + It("it should fail when the request is invalid", func() { + // we use a typical Go table-test instad of Ginkgo's DescribeTable because we need to + // do an assertion during the declaration of the table params, which isn't supported (yet?) + for _, tt := range []struct { + name string + req admission.Request + expected int32 + }{ + { + "empty payload", + admission.Request{}, + http.StatusBadRequest, + }, + { + "namespace doesn't exist", + func() admission.Request { + pod := corev1.Pod{} + encoded, err := json.Marshal(pod) + Expect(err).ToNot(HaveOccurred()) + + return admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: "non-existing", + Object: runtime.RawExtension{ + Raw: encoded, + }, + }, + } + }(), + http.StatusInternalServerError, + }, + } { + When(tt.name, func() { + // prepare + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + Expect(err).ToNot(HaveOccurred()) + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + injector.InjectDecoder(decoder) + + // test + res := injector.Handle(context.Background(), tt.req) + + // verify + Expect(res.Allowed).To(BeFalse()) + Expect(res.AdmissionResponse.Result).ToNot(BeNil()) + Expect(res.AdmissionResponse.Result.Code).To(Equal(tt.expected)) + }) + } + }) +}) diff --git a/internal/podinjector/podinjector_suite_test.go b/internal/podinjector/podinjector_suite_test.go new file mode 100644 index 000000000..fe179f3f1 --- /dev/null +++ b/internal/podinjector/podinjector_suite_test.go @@ -0,0 +1,57 @@ +package podinjector_test + +import ( + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "k8s.io/client-go/rest" + "k8s.io/kubectl/pkg/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +var cfg *rest.Config +var k8sClient client.Client +var testEnv *envtest.Environment + +func TestPodinjector(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Podinjector Suite") +} + +var _ = BeforeSuite(func(done Done) { + logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) + + By("bootstrapping test environment") + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + } + + var err error + cfg, err = testEnv.Start() + Expect(err).ToNot(HaveOccurred()) + Expect(cfg).ToNot(BeNil()) + + err = v1alpha1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + Expect(err).ToNot(HaveOccurred()) + Expect(k8sClient).ToNot(BeNil()) + + close(done) +}, 60) + +var _ = AfterSuite(func() { + By("tearing down the test environment") + err := testEnv.Stop() + Expect(err).ToNot(HaveOccurred()) +}) diff --git a/main.go b/main.go index e0ef4ab7f..44e4e66cd 100644 --- a/main.go +++ b/main.go @@ -30,10 +30,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" + "sigs.k8s.io/controller-runtime/pkg/webhook" opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" @@ -72,13 +74,13 @@ func main() { // builds the operator's configuration ad, err := autodetect.New(restConfig) - config := config.New( + cfg := config.New( config.WithLogger(ctrl.Log.WithName("config")), config.WithVersion(v), config.WithAutoDetect(ad), ) - pflag.CommandLine.AddFlagSet(config.FlagSet()) + pflag.CommandLine.AddFlagSet(cfg.FlagSet()) pflag.Parse() @@ -123,7 +125,7 @@ func main() { // run the auto-detect mechanism for the configuration err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { - return config.StartAutoDetect() + return cfg.StartAutoDetect() })) if err != nil { setupLog.Error(err, "failed to start the auto-detect mechanism") @@ -141,7 +143,7 @@ func main() { Client: mgr.GetClient(), Log: ctrl.Log.WithName("controllers").WithName("OpenTelemetryCollector"), Scheme: mgr.GetScheme(), - Config: config, + Config: cfg, }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "OpenTelemetryCollector") os.Exit(1) @@ -152,6 +154,10 @@ func main() { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") os.Exit(1) } + + mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{ + Handler: podinjector.NewPodSidecarInjector(cfg, ctrl.Log.WithName("sidecar"), mgr.GetClient()), + }) } // +kubebuilder:scaffold:builder diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 2caedf154..5a5107c27 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -26,6 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" @@ -36,13 +37,14 @@ import ( // Services reconciles the service(s) required for the instance in the current context func Services(ctx context.Context, params Params) error { desired := []corev1.Service{} - - type builder func(context.Context, Params) *corev1.Service - for _, builder := range []builder{desiredService, headless, monitoringService} { - svc := builder(ctx, params) - // add only the non-nil to the list - if svc != nil { - desired = append(desired, *svc) + if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { + type builder func(context.Context, Params) *corev1.Service + for _, builder := range []builder{desiredService, headless, monitoringService} { + svc := builder(ctx, params) + // add only the non-nil to the list + if svc != nil { + desired = append(desired, *svc) + } } } diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 4a60d8054..e6a5b615c 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -24,6 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) @@ -31,8 +32,9 @@ import ( // ServiceAccounts reconciles the service account(s) required for the instance in the current context func ServiceAccounts(ctx context.Context, params Params) error { - desired := []corev1.ServiceAccount{ - collector.ServiceAccount(params.Instance), + desired := []corev1.ServiceAccount{} + if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { + desired = append(desired, collector.ServiceAccount(params.Instance)) } // first, handle the create/update parts diff --git a/pkg/sidecar/annotation.go b/pkg/sidecar/annotation.go new file mode 100644 index 000000000..34a76b747 --- /dev/null +++ b/pkg/sidecar/annotation.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar + +import ( + "strings" + + corev1 "k8s.io/api/core/v1" +) + +const ( + // Annotation contains the annotation name that pods contain, indicating whether a sidecar is desired + Annotation = "sidecar.opentelemetry.io/inject" +) + +// AnnotationValue returns the effective annotation value, based on the annotations from the pod and namespace +func AnnotationValue(ns corev1.Namespace, pod corev1.Pod) string { + // is the pod annotated with instructions to inject sidecars? is the namespace annotated? + // if any of those is true, a sidecar might be desired. + podAnnValue := pod.Annotations[Annotation] + nsAnnValue := ns.Annotations[Annotation] + + // if the namespace value is empty, the pod annotation should be used, whatever it is + if len(nsAnnValue) == 0 { + return podAnnValue + } + + // if the pod value is empty, the annotation annotation should be used (true, false, instance) + if len(podAnnValue) == 0 { + return nsAnnValue + } + + // the pod annotation isn't empty -- if it's an instance name, or false, that's the decision + if !strings.EqualFold(podAnnValue, "true") { + return podAnnValue + } + + // pod annotation is 'true', and if the namespace annotation is false, we just return 'true' + if strings.EqualFold(nsAnnValue, "false") { + return podAnnValue + } + + // by now, the pod annotation is 'true', and the namespace annotation is either true or an instance name + // so, the namespace annotation can be used + return nsAnnValue +} diff --git a/pkg/sidecar/annotation_test.go b/pkg/sidecar/annotation_test.go new file mode 100644 index 000000000..9b1a61f26 --- /dev/null +++ b/pkg/sidecar/annotation_test.go @@ -0,0 +1,135 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" +) + +var _ = Describe("Annotation", func() { + + DescribeTable("determine the right effective annotation value", + func(expected string, pod corev1.Pod, ns corev1.Namespace) { + // test + annValue := sidecar.AnnotationValue(ns, pod) + + // verify + Expect(annValue).To(Equal(expected)) + }, + + Entry("pod-true-overrides-ns", + "true", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "true", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "false", + }, + }, + }, + ), + + Entry("ns-has-concrete-instance", + "some-instance", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "true", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "some-instance", + }, + }, + }, + ), + + Entry("pod-has-concrete-instance", + "some-instance-from-pod", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "some-instance-from-pod", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "some-instance", + }, + }, + }, + ), + + Entry("pod-has-explicit-false", + "false", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "false", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "some-instance", + }, + }, + }, + ), + + Entry("pod-has-no-annotations", + "some-instance", + corev1.Pod{}, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "some-instance", + }, + }, + }, + ), + + Entry("ns-has-no-annotations", + "true", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + sidecar.Annotation: "true", + }, + }, + }, + corev1.Namespace{}, + ), + ) + +}) diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go new file mode 100644 index 000000000..86c1138d5 --- /dev/null +++ b/pkg/sidecar/pod.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +const ( + label = "sidecar.opentelemetry.io/injected" +) + +// Add a new sidecar container to the given pod, based on the given OpenTelemetryCollector +func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { + // add the container + volumes := collector.Volumes(cfg, otelcol) + container := collector.Container(cfg, logger, otelcol) + pod.Spec.Containers = append(pod.Spec.Containers, container) + pod.Spec.Volumes = append(pod.Spec.Volumes, volumes...) + + if pod.Labels == nil { + pod.Labels = map[string]string{} + } + pod.Labels[label] = fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name) + + return pod, nil +} + +// Remove the sidecar container from the given pod +func Remove(pod corev1.Pod) (corev1.Pod, error) { + if !ExistsIn(pod) { + return pod, nil + } + + var containers []corev1.Container + for _, container := range pod.Spec.Containers { + if container.Name != naming.Container() { + containers = append(containers, container) + } + } + pod.Spec.Containers = containers + return pod, nil +} + +// ExistsIn checks whether a sidecar container exists in the given pod +func ExistsIn(pod corev1.Pod) bool { + for _, container := range pod.Spec.Containers { + if container.Name == naming.Container() { + return true + } + } + return false +} diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go new file mode 100644 index 000000000..a5540ee21 --- /dev/null +++ b/pkg/sidecar/pod_test.go @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" +) + +var _ = Describe("Pod", func() { + logger := logf.Log.WithName("unit-tests") + + It("should add sidecar when none exists", func() { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + }, + // cross-test: the pod has a volume already, make sure we don't remove it + Volumes: []corev1.Volume{{}}, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "otelcol-sample", + Namespace: "some-app", + }, + } + cfg := config.New(config.WithCollectorImage("some-default-image")) + + // test + changed, err := sidecar.Add(cfg, logger, otelcol, pod) + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(changed.Spec.Containers).To(HaveLen(2)) + Expect(changed.Spec.Volumes).To(HaveLen(2)) + Expect(changed.Labels["sidecar.opentelemetry.io/injected"]).To(Equal("some-app.otelcol-sample")) + }) + + // this situation should never happen in the current code path, but it should not fail + // if it's asked to add a new sidecar. The caller is expected to have called ExistsIn before. + It("should add sidecar, even when one exists", func() { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, + }, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New(config.WithCollectorImage("some-default-image")) + + // test + changed, err := sidecar.Add(cfg, logger, otelcol, pod) + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(changed.Spec.Containers).To(HaveLen(3)) + }) + + It("should remove the sidecar", func() { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, + {Name: naming.Container()}, // two sidecars! should remove both + }, + }, + } + + // test + changed, err := sidecar.Remove(pod) + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(changed.Spec.Containers).To(HaveLen(1)) + }) + + It("should not fail to remove when sidecar doesn't exist", func() { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + }, + }, + } + + // test + changed, err := sidecar.Remove(pod) + + // verify + Expect(err).ToNot(HaveOccurred()) + Expect(changed.Spec.Containers).To(HaveLen(1)) + }) + + DescribeTable("determine whether the pod has a sidecar already", func(expected bool, pod corev1.Pod) { + Expect(sidecar.ExistsIn(pod)).To(Equal(expected)) + }, + Entry("has-sidecar", true, corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, + }, + }, + }), + Entry("does-not-have-sidecar", false, corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{}, + }, + }), + ) +}) diff --git a/pkg/sidecar/sidecar_suite_test.go b/pkg/sidecar/sidecar_suite_test.go new file mode 100644 index 000000000..ec4acb41d --- /dev/null +++ b/pkg/sidecar/sidecar_suite_test.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar_test + +import ( + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +func TestSidecar(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Sidecar Suite") +} From e62175e4d5244a6d8bdd1483506ecfd90ff97731 Mon Sep 17 00:00:00 2001 From: dengliming Date: Tue, 15 Sep 2020 16:10:54 +0800 Subject: [PATCH 0061/1234] Use otel/opentelemetry-collector image (#53) --- internal/config/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/main.go b/internal/config/main.go index d354bdd08..b8e1c70e1 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -66,7 +66,7 @@ func New(opts ...Option) Config { // this is derived from another option, so, we need to first parse the options, then set a default // if there's no explicit value being set if len(o.collectorImage) == 0 { - o.collectorImage = fmt.Sprintf("quay.io/opentelemetry/opentelemetry-collector:v%s", o.version.OpenTelemetryCollector) + o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:v%s", o.version.OpenTelemetryCollector) } return Config{ From 7f855ce7350c88f84f8834145dd60e59f06856d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 24 Sep 2020 10:33:49 +0200 Subject: [PATCH 0062/1234] Upgrade mechanism up to otelcol 0.10.0 (#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .gitignore | 3 + api/v1alpha1/opentelemetrycollector_types.go | 17 ++++- .../opentelemetrycollector_webhook.go | 7 ++ api/v1alpha1/zz_generated.deepcopy.go | 7 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 26 +++++-- .../opentelemetrycollector_controller.go | 5 ++ go.mod | 1 + go.sum | 2 + internal/config/main.go | 7 +- main.go | 2 +- pkg/collector/adapters/config_from.go | 2 +- pkg/collector/reconcile/configmap.go | 18 +++-- pkg/collector/reconcile/opentelemetry.go | 30 ++++++++ pkg/collector/upgrade/noop.go | 11 +++ pkg/collector/upgrade/upgrade.go | 61 +++++++++++------ pkg/collector/upgrade/upgrade_test.go | 68 ++++++++++++++++++- pkg/collector/upgrade/v0_2_0.go | 13 ---- pkg/collector/upgrade/v0_2_10.go | 13 ++++ pkg/collector/upgrade/v0_9_0.go | 56 +++++++++++++++ pkg/collector/upgrade/v0_9_0_test.go | 55 +++++++++++++++ pkg/collector/upgrade/versions.go | 38 +++++------ versions.txt | 2 +- 22 files changed, 371 insertions(+), 73 deletions(-) create mode 100644 pkg/collector/reconcile/opentelemetry.go create mode 100644 pkg/collector/upgrade/noop.go delete mode 100644 pkg/collector/upgrade/v0_2_0.go create mode 100644 pkg/collector/upgrade/v0_2_10.go create mode 100644 pkg/collector/upgrade/v0_9_0.go create mode 100644 pkg/collector/upgrade/v0_9_0_test.go diff --git a/.gitignore b/.gitignore index 37a560510..eed941219 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ bin *.swp *.swo *~ + +# local resources, not to be committed +local \ No newline at end of file diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 618c10caa..ff9928abe 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -74,14 +74,27 @@ type OpenTelemetryCollectorSpec struct { // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector type OpenTelemetryCollectorStatus struct { - Replicas int32 `json:"replicas"` - Version string `json:"version"` + // Replicas is currently not being set and might be removed in the next version. + // +optional + Replicas int32 `json:"replicas,omitempty"` + + // Version of the managed OpenTelemetry Collector (operand) + // +optional + Version string `json:"version,omitempty"` + + // Messages about actions performed by the operator on this resource. + // +optional + // +listType=atomic + Messages []string `json:"messages,omitempty"` } // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +// +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.mode",description="Deployment Mode" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // OpenTelemetryCollector is the Schema for the opentelemetrycollectors API type OpenTelemetryCollector struct { diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index 399183a50..868042389 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -40,6 +40,13 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.Mode = ModeDeployment } + if r.Labels == nil { + r.Labels = map[string]string{} + } + if r.Labels["app.kubernetes.io/managed-by"] == "" { + r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + } + opentelemetrycollectorlog.Info("default", "name", r.Name) } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index e195c3ca7..acd2a7566 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -29,7 +29,7 @@ func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector. @@ -133,6 +133,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { *out = *in + if in.Messages != nil { + in, out := &in.Messages, &out.Messages + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 2e420414a..deda3b5a0 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -8,6 +8,18 @@ metadata: creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: + additionalPrinterColumns: + - JSONPath: .spec.mode + description: Deployment Mode + name: Mode + type: string + - JSONPath: .status.version + description: OpenTelemetry Version + name: Version + type: string + - JSONPath: .metadata.creationTimestamp + name: Age + type: date group: opentelemetry.io names: kind: OpenTelemetryCollector @@ -1371,14 +1383,16 @@ spec: description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector properties: - replicas: - format: int32 - type: integer + messages: + description: Messages that you should know about actions performed by + the operator on this resource. + items: + type: string + type: array + x-kubernetes-list-type: atomic version: + description: Version of the managed OpenTelemetry Collector (operand) type: string - required: - - replicas - - version type: object type: object version: v1alpha1 diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 3ebcd9e0f..f4f3cf3d7 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -85,6 +85,11 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { reconcile.DaemonSets, true, }, + { + "opentelemetry", + reconcile.Self, + true, + }, } } diff --git a/go.mod b/go.mod index ea0631abc..b9cc60398 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/open-telemetry/opentelemetry-operator go 1.13 require ( + github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.1.0 github.com/onsi/ginkgo v1.11.0 // keep the Makefile in sync! github.com/onsi/gomega v1.8.1 diff --git a/go.sum b/go.sum index c34d49969..a1931c142 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= +github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= diff --git a/internal/config/main.go b/internal/config/main.go index b8e1c70e1..8aee3ed82 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -66,7 +66,7 @@ func New(opts ...Option) Config { // this is derived from another option, so, we need to first parse the options, then set a default // if there's no explicit value being set if len(o.collectorImage) == 0 { - o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:v%s", o.version.OpenTelemetryCollector) + o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:%s", o.version.OpenTelemetryCollector) } return Config{ @@ -156,3 +156,8 @@ func (c *Config) CollectorConfigMapEntry() string { func (c *Config) Platform() platform.Platform { return c.platform } + +// Version holds the versions used by this operator +func (c *Config) Version() version.Version { + return c.version +} diff --git a/main.go b/main.go index 44e4e66cd..81036d111 100644 --- a/main.go +++ b/main.go @@ -133,7 +133,7 @@ func main() { // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { - return upgrade.ManagedInstances(context.Background(), ctrl.Log.WithName("upgrade"), mgr.GetClient()) + return upgrade.ManagedInstances(context.Background(), ctrl.Log.WithName("upgrade"), v, mgr.GetClient()) })) if err != nil { setupLog.Error(err, "failed to upgrade managed instances") diff --git a/pkg/collector/adapters/config_from.go b/pkg/collector/adapters/config_from.go index 5f3466907..5fa8cc2a0 100644 --- a/pkg/collector/adapters/config_from.go +++ b/pkg/collector/adapters/config_from.go @@ -8,7 +8,7 @@ import ( var ( // ErrInvalidYAML represents an error in the format of the configuration file - ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration to assemble a list of ports for the service") + ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration") ) // ConfigFromString extracts a configuration map from the given string. diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 4609ae9b3..ec658891f 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -38,13 +38,13 @@ func ConfigMaps(ctx context.Context, params Params) error { } // first, handle the create/update parts - if err := expectedConfigMaps(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %v", err) + if err := expectedConfigMaps(ctx, params, desired, true); err != nil { + return fmt.Errorf("failed to reconcile the expected configmaps: %v", err) } // then, delete the extra objects if err := deleteConfigMaps(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the configmaps to be deleted: %v", err) } return nil @@ -68,7 +68,7 @@ func desiredConfigMap(ctx context.Context, params Params) corev1.ConfigMap { } } -func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap) error { +func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap, retry bool) error { for _, obj := range expected { desired := obj @@ -79,6 +79,16 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co err := params.Client.Get(ctx, nns, existing) if err != nil && errors.IsNotFound(err) { if err := params.Client.Create(ctx, &desired); err != nil { + if errors.IsAlreadyExists(err) && retry { + // let's try again? we probably had multiple updates at one, and now it exists already + if err := expectedConfigMaps(ctx, params, expected, false); err != nil { + // somethin else happened now... + return err + } + + // we succeeded in the retry, exit this attempt + return nil + } return fmt.Errorf("failed to create: %w", err) } params.Log.V(2).Info("created", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go new file mode 100644 index 000000000..f4e22a79a --- /dev/null +++ b/pkg/collector/reconcile/opentelemetry.go @@ -0,0 +1,30 @@ +package reconcile + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +// Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes +// making params.Instance obsolete. Default values should be set in the Defaulter webhook, this should only be used +// for the Status, which can't be set by the defaulter. +func Self(ctx context.Context, params Params) error { + if params.Instance.Status.Version != "" { + // a version is already set, let the upgrade mechanism take care of it! + return nil + } + + changed := params.Instance + changed.Status.Version = version.OpenTelemetryCollector() + + // this is only a change for new instances: existing instances are reconciled when the operator is first started + statusPatch := client.MergeFrom(¶ms.Instance) + if err := params.Client.Status().Patch(ctx, &changed, statusPatch); err != nil { + return fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) + } + + return nil +} diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go new file mode 100644 index 000000000..06588697c --- /dev/null +++ b/pkg/collector/upgrade/noop.go @@ -0,0 +1,11 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + return otelcol, nil +} diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index e1b8b0bd3..019836c12 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -5,14 +5,16 @@ import ( "fmt" "reflect" + semver "github.com/Masterminds/semver/v3" "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" ) // ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary -func ManagedInstances(ctx context.Context, logger logr.Logger, cl client.Client) error { +func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Version, cl client.Client) error { logger.Info("looking for managed instances to upgrade") opts := []client.ListOption{ @@ -25,29 +27,30 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, cl client.Client) return fmt.Errorf("failed to list: %w", err) } - for _, j := range list.Items { - otelcol, err := ManagedInstance(ctx, logger, cl, &j) + for _, original := range list.Items { + upgraded, err := ManagedInstance(ctx, logger, ver, cl, original) if err != nil { // nothing to do at this level, just go to the next instance continue } - if !reflect.DeepEqual(otelcol, j) { + if !reflect.DeepEqual(upgraded, original) { // the resource update overrides the status, so, keep it so that we can reset it later - st := otelcol.Status - if err := cl.Update(ctx, otelcol); err != nil { - logger.Error(err, "failed to apply changes to instance", "name", otelcol.Name, "namespace", otelcol.Namespace) + st := upgraded.Status + patch := client.MergeFrom(&original) + if err := cl.Patch(ctx, &upgraded, patch); err != nil { + logger.Error(err, "failed to apply changes to instance", "name", upgraded.Name, "namespace", upgraded.Namespace) continue } // the status object requires its own update - otelcol.Status = st - if err := cl.Status().Update(ctx, otelcol); err != nil { - logger.Error(err, "failed to apply changes to instance's status object", "name", otelcol.Name, "namespace", otelcol.Namespace) + upgraded.Status = st + if err := cl.Status().Patch(ctx, &upgraded, patch); err != nil { + logger.Error(err, "failed to apply changes to instance's status object", "name", upgraded.Name, "namespace", upgraded.Namespace) continue } - logger.Info("instance upgraded", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + logger.Info("instance upgraded", "name", upgraded.Name, "namespace", upgraded.Namespace, "version", upgraded.Status.Version) } } @@ -59,23 +62,41 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, cl client.Client) } // ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version -func ManagedInstance(ctx context.Context, logger logr.Logger, cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - if v, ok := versions[otelcol.Status.Version]; ok { - // we don't need to run the upgrade function for the version 'v', only the next ones - for n := v.next; n != nil; n = n.next { - // performs the upgrade to version 'n' - upgraded, err := n.upgrade(cl, otelcol) +func ManagedInstance(ctx context.Context, logger logr.Logger, currentV version.Version, cl client.Client, otelcol v1alpha1.OpenTelemetryCollector) (v1alpha1.OpenTelemetryCollector, error) { + // this is likely a new instance, assume it's already up to date + if otelcol.Status.Version == "" { + return otelcol, nil + } + + instanceV, err := semver.NewVersion(otelcol.Status.Version) + if err != nil { + logger.Error(err, "failed to parse version for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + return otelcol, err + } + + if instanceV.GreaterThan(&Latest.Version) { + logger.Info("skipping upgrade for OpenTelemetry Collector instance, as it's newer than our latest version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) + return otelcol, nil + } + + for _, available := range versions { + if available.GreaterThan(instanceV) { + upgraded, err := available.upgrade(cl, &otelcol) + if err != nil { logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return otelcol, err } - logger.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", n.Tag) - upgraded.Status.Version = n.Tag - otelcol = upgraded + logger.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", available.String()) + upgraded.Status.Version = available.String() + otelcol = *upgraded } } + // at the end of the process, we are up to date with the latest known version, which is what we have from versions.txt + otelcol.Status.Version = currentV.OpenTelemetryCollector + logger.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) return otelcol, nil } diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 9b61d484b..a36938e0e 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -4,12 +4,14 @@ import ( "context" . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) @@ -35,6 +37,9 @@ var _ = Describe("Upgrade", func() { err = k8sClient.Status().Update(context.Background(), &existing) Expect(err).To(Succeed()) + currentV := version.Get() + currentV.OpenTelemetryCollector = upgrade.Latest.String() + // sanity check persisted := &v1alpha1.OpenTelemetryCollector{} err = k8sClient.Get(context.Background(), nsn, persisted) @@ -42,15 +47,74 @@ var _ = Describe("Upgrade", func() { Expect(persisted.Status.Version).To(Equal("0.0.1")) // test - err = upgrade.ManagedInstances(context.Background(), logger, k8sClient) + err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) Expect(err).To(Succeed()) // verify err = k8sClient.Get(context.Background(), nsn, persisted) Expect(err).To(Succeed()) - Expect(persisted.Status.Version).To(Equal(upgrade.Latest.Tag)) + Expect(persisted.Status.Version).To(Equal(upgrade.Latest.String())) // cleanup Expect(k8sClient.Delete(context.Background(), &existing)) }) + + It("should upgrade up to the latest known version", func() { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } + existing.Status.Version = "0.8.0" + + currentV := version.Get() + currentV.OpenTelemetryCollector = "0.10.0" // we don't have a 0.10.0 upgrade, but we have a 0.9.0 + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + + // verify + Expect(err).To(Succeed()) + Expect(res.Status.Version).To(Equal("0.10.0")) + }) + + DescribeTable("versions should not be changed", func(v string, expectedV string, failureExpected bool) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } + existing.Status.Version = v + + currentV := version.Get() + currentV.OpenTelemetryCollector = upgrade.Latest.String() + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + if failureExpected { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).To(Succeed()) + } + + // verify + Expect(res.Status.Version).To(Equal(expectedV)) + }, + Entry("new-instance", "", "", false), + Entry("newer-than-our-newest", "100.0.0", "100.0.0", false), + Entry("unparseable", "unparseable", "unparseable", true), + ) + }) diff --git a/pkg/collector/upgrade/v0_2_0.go b/pkg/collector/upgrade/v0_2_0.go deleted file mode 100644 index e8f01e415..000000000 --- a/pkg/collector/upgrade/v0_2_0.go +++ /dev/null @@ -1,13 +0,0 @@ -package upgrade - -import ( - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" -) - -func upgrade0_2_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - // this has the same content as `noop`, but it's added a separate function - // to serve as template for versions with an actual upgrade procedure - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go new file mode 100644 index 000000000..a6752509c --- /dev/null +++ b/pkg/collector/upgrade/v0_2_10.go @@ -0,0 +1,13 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// this is our first version under otel/opentelemetry-collector +func upgrade0_2_10(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + // this is a no-op, but serves to keep the skeleton here for the future versions + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go new file mode 100644 index 000000000..379fb4eb6 --- /dev/null +++ b/pkg/collector/upgrade/v0_9_0.go @@ -0,0 +1,56 @@ +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_9_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to parse configuration: %w", err) + } + + exporters, ok := cfg["exporters"].(map[interface{}]interface{}) + if !ok { + return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to extract list of exporters from the configuration: %q", cfg["exporters"]) + } + + for k, v := range exporters { + if strings.HasPrefix("opencensus", k.(string)) { + switch exporter := v.(type) { + case map[interface{}]interface{}: + // delete is a noop if there's no such entry + delete(exporter, "reconnection_delay") + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.9.0 removed the property reconnection_delay for exporter %q", k)) + exporters[k] = exporter + case string: + if len(exporter) == 0 { + // this exporter is using the default configuration + continue + } + default: + return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, the exporter %q is invalid (neither a string nor map)", k) + } + } + } + + cfg["exporters"] = exporters + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to marshall back configuration: %w", err) + } + + otelcol.Spec.Config = string(res) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go new file mode 100644 index 000000000..2891380ce --- /dev/null +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -0,0 +1,55 @@ +package upgrade_test + +import ( + "context" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +var _ = Describe("Upgrade to v0.9.0", func() { + logger := logf.Log.WithName("unit-tests") + + It("should remove reconnection_delay", func() { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `exporters: + opencensus: + compression: "on" + reconnection_delay: 15 + num_workers: 123`, + }, + } + existing.Status.Version = "0.8.0" + + // sanity check + Expect(existing.Spec.Config).To(ContainSubstring("reconnection_delay")) + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + Expect(err).To(Succeed()) + + // verify + Expect(res.Spec.Config).To(ContainSubstring("opencensus:")) + Expect(res.Spec.Config).To(ContainSubstring(`compression: "on"`)) + Expect(res.Spec.Config).ToNot(ContainSubstring("reconnection_delay")) + Expect(res.Spec.Config).To(ContainSubstring("num_workers: 123")) + Expect(res.Status.Messages[0]).To(ContainSubstring("upgrade to v0.9.0 removed the property reconnection_delay for exporter")) + }) +}) diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index f1305e05f..81df33be8 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -1,35 +1,31 @@ package upgrade import ( + "github.com/Masterminds/semver/v3" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" ) -// Version represents a known OpenTelemetry Collector version -type Version struct { - // Tag represents the tag for this version, like: 0.0.1 - Tag string +type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - upgrade func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) - next *Version +type otelcolVersion struct { + semver.Version + upgrade upgradeFunc } var ( - v0_0_1 = Version{Tag: "0.0.1", upgrade: noop, next: &v0_0_2} - v0_0_2 = Version{Tag: "0.0.2", upgrade: noop, next: &v0_2_0} - v0_2_0 = Version{Tag: "0.2.0", upgrade: upgrade0_2_0} - - // Latest represents the latest known version for the OpenTelemetry Collector - Latest = &v0_2_0 - - versions = map[string]Version{ - v0_0_1.Tag: v0_0_1, - v0_0_2.Tag: v0_0_2, - v0_2_0.Tag: v0_2_0, + versions = []otelcolVersion{ + { + Version: *semver.MustParse("0.2.10"), + upgrade: upgrade0_2_10, + }, + { + Version: *semver.MustParse("0.9.0"), + upgrade: upgrade0_9_0, + }, } -) -func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { - return otelcol, nil -} + // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. + Latest = versions[len(versions)-1] +) diff --git a/versions.txt b/versions.txt index 62cab1277..dcdbe6e02 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.2.0 +opentelemetry-collector=0.10.0 # DO NOT EDIT the next value, it is updated automatically during the release. # Represents the current (latest) release of the OpenTelemetry Operator. From f54b3d2a9f09fb0f70bdfff7cf6a37f9636440ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 24 Sep 2020 11:01:17 +0200 Subject: [PATCH 0063/1234] Added dependabot (#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..36e9e33c2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: gomod + directory: "/" + schedule: + interval: daily From f9d2170f16ef48b3ebaed8da83eeb73173b01002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 25 Sep 2020 14:01:41 +0200 Subject: [PATCH 0064/1234] 'go mod tidy' + replaced a dependency that isn't resolvable (#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dependency on vbom.nl/util is failing for pristine environments, such as the one used by 'dependabot'. This is a transitive dependency from the operator-sdk -> kubectl. Signed-off-by: Juraci Paixão Kröhling --- ...ntelemetry.io_opentelemetrycollectors.yaml | 358 ++++++++++++++---- go.mod | 15 +- go.sum | 249 +++++++++++- 3 files changed, 534 insertions(+), 88 deletions(-) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index deda3b5a0..c53de5357 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -93,7 +93,8 @@ spec: are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. - Field can be enabled with ServiceAppProtocol feature gate. + This is a beta field that is guarded by the ServiceAppProtocol + feature gate and enabled by default. type: string name: description: The name of this port within the service. This must @@ -353,12 +354,14 @@ spec: this volume properties: defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' format: int32 type: integer items: @@ -378,12 +381,15 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' format: int32 type: integer path: @@ -407,8 +413,9 @@ spec: type: boolean type: object csi: - description: CSI (Container Storage Interface) represents storage - that is handled by an external CSI driver (Alpha feature). + description: CSI (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). properties: driver: description: Driver is the name of the CSI driver that handles @@ -454,11 +461,14 @@ spec: properties: defaultMode: description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + by default. Must be a Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' format: int32 type: integer items: @@ -483,12 +493,15 @@ spec: - fieldPath type: object mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' format: int32 type: integer path: @@ -550,6 +563,197 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object + ephemeral: + description: "Ephemeral represents a volume that is handled by + a cluster storage driver (Alpha feature). The volume's lifecycle + is tied to the pod that defines it - it will be created before + the pod starts, and deleted when the pod is removed. \n Use + this if: a) the volume is only needed while the pod runs, b) + features of normal volumes like restoring from snapshot or capacity + \ tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver supports + dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on the connection + between this volume type and PersistentVolumeClaim). \n Use + PersistentVolumeClaim or one of the vendor-specific APIs for + volumes that persist for longer than the lifecycle of an individual + pod. \n Use CSI for light-weight local ephemeral volumes if + the CSI driver is meant to be used that way - see the documentation + of the driver for more information. \n A pod can use both types + of ephemeral volumes and persistent volumes at the same time." + properties: + readOnly: + description: Specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC will + be deleted together with the pod. The name of the PVC will + be `-` where `` is the + name from the `PodSpec.Volumes` array entry. Pod validation + will reject the pod if the concatenated name is not valid + for a PVC (for example, too long). \n An existing PVC with + that name that is not owned by the pod will *not* be used + for the pod to avoid using an unrelated volume by mistake. + Starting the pod is then blocked until the unrelated PVC + is removed. If such a pre-created PVC is meant to be used + by the pod, the PVC has to updated with an owner reference + to the pod once the pod exists. Normally this should not + be necessary, but it may be useful when manually reconstructing + a broken cluster. \n This field is read-only and no changes + will be made by Kubernetes to the PVC after it has been + created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will + be copied into the PVC when creating it. No other fields + are allowed and will be rejected during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'AccessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot + - Beta) * An existing PVC (PersistentVolumeClaim) + * An existing custom resource/object that implements + data population (Alpha) In order to use VolumeSnapshot + object types, the appropriate feature gate must + be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) + If the provisioner or an external controller can + support the specified data source, it will create + a new volume based on the contents of the specified + data source. If the specified data source is not + supported, the volume will not be created and the + failure will be reported as an event. In the future, + we plan to support more data source types and the + behavior of the provisioner may change.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API group. + For any other third-party types, APIGroup is + required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is + omitted for a container, it defaults to Limits + if that is explicitly specified, otherwise to + an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + selector: + description: A label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement is + a selector that contains values, a key, and + an operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If + the operator is Exists or DoesNotExist, + the values array must be empty. This array + is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by + the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem is + implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to + the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object fc: description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. @@ -881,11 +1085,14 @@ spec: and downward API properties: defaultMode: - description: Mode bits to use on created files by default. - Must be a value between 0 and 0777. Directories within the - path are not affected by this setting. This might be in - conflict with other options that affect the file mode, like - fsGroup, and the result can be other mode bits set. + description: Mode bits used to set permissions on created + files by default. Must be an octal value between 0000 and + 0777 or a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal values + for mode bits. Directories within the path are not affected + by this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set. format: int32 type: integer sources: @@ -918,13 +1125,16 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' format: int32 type: integer path: @@ -978,13 +1188,16 @@ spec: - fieldPath type: object mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file, must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' format: int32 type: integer path: @@ -1047,13 +1260,16 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits to use on - this file, must be a value between 0 and - 0777. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can be - other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file. Must be an + octal value between 0000 and 0777 or a decimal + value between 0 and 511. YAML accepts both + octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This + might be in conflict with other options + that affect the file mode, like fsGroup, + and the result can be other mode bits set.' format: int32 type: integer path: @@ -1258,12 +1474,14 @@ spec: this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' properties: defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might be + in conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits set.' format: int32 type: integer items: @@ -1283,12 +1501,15 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might be - in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode - bits set.' + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, the + volume defaultMode will be used. This might be in + conflict with other options that affect the file mode, + like fsGroup, and the result can be other mode bits + set.' format: int32 type: integer path: @@ -1384,12 +1605,17 @@ spec: OpenTelemetryCollector properties: messages: - description: Messages that you should know about actions performed by - the operator on this resource. + description: Messages about actions performed by the operator on this + resource. items: type: string type: array x-kubernetes-list-type: atomic + replicas: + description: Replicas is currently not being set and might be removed + in the next version. + format: int32 + type: integer version: description: Version of the managed OpenTelemetry Collector (operand) type: string diff --git a/go.mod b/go.mod index b9cc60398..c8a9ad361 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,19 @@ go 1.13 require ( github.com/Masterminds/semver/v3 v3.1.0 - github.com/go-logr/logr v0.1.0 + github.com/go-logr/logr v0.2.1 github.com/onsi/ginkgo v1.11.0 // keep the Makefile in sync! github.com/onsi/gomega v1.8.1 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.2.8 - k8s.io/api v0.18.6 - k8s.io/apimachinery v0.18.6 - k8s.io/client-go v0.18.6 - k8s.io/kubectl v0.18.6 + k8s.io/api v0.19.2 + k8s.io/apimachinery v0.19.2 + k8s.io/client-go v0.19.2 + k8s.io/kubectl v0.19.2 sigs.k8s.io/controller-runtime v0.6.0 ) + +replace ( + github.com/go-logr/zapr => github.com/go-logr/zapr v0.2.0 + vbom.ml/util => github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 +) diff --git a/go.sum b/go.sum index a1931c142..177510295 100644 --- a/go.sum +++ b/go.sum @@ -2,19 +2,36 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -22,7 +39,9 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -30,12 +49,22 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -46,13 +75,16 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -69,21 +101,33 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:AlRx4sdoz6EdWGYPMeunQWYf46cKnq7J4iVvLgyb5cY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/zapr v0.1.0 h1:h+WVe9j6HAA01niTJPA/kKH0i7e0rLZBCwauQFcRE54= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= +github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= +github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -136,13 +180,26 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= @@ -151,25 +208,36 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= @@ -177,6 +245,7 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -186,15 +255,21 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= @@ -213,9 +288,12 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -226,6 +304,7 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -242,33 +321,52 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -276,6 +374,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -285,12 +384,16 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -298,11 +401,14 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -310,15 +416,37 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -331,16 +459,27 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -356,22 +495,40 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -380,34 +537,79 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -421,43 +623,55 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= -k8s.io/api v0.18.6 h1:osqrAXbOQjkKIWDTjrqxWQ3w0GkKb1KA1XkUGHHYpeE= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= -k8s.io/apimachinery v0.18.6 h1:RtFHnfGNfd1N0LeSrKCUznz5xtUP1elRGvHJbL3Ntag= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= -k8s.io/cli-runtime v0.18.6/go.mod h1:+G/WTNqHgUv636e5y7rhOQ7epUbRXnwmPnhOhD6t9uM= +k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= -k8s.io/client-go v0.18.6 h1:I+oWqJbibLSGsZj8Xs8F0aWVXJVIoUHWaaJV3kUN/Zw= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= +k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOECPVeXsVot0UkiaCGVyfGQY= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kubectl v0.18.6 h1:IFPNuLPkZ59vSGQzynXY8XGz9yuOSRpkJupnobdYvO4= -k8s.io/kubectl v0.18.6/go.mod h1:3TLzFOrF9h4mlRPAvdNkDbs5NWspN4e0EnPnEB41CGo= -k8s.io/metrics v0.18.6/go.mod h1:iAwGeabusQNO3duHDM7BBExTUB8L+iq8PM7N9EtQw6g= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kubectl v0.19.2 h1:/Dxz9u7S0GnchLA6Avqi5k1qhZH4Fusgecj8dHsSnbk= +k8s.io/kubectl v0.19.2/go.mod h1:4ib3oj5ma6gF95QukTvC7ZBMxp60+UEAhDPjLuBIrV4= +k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= @@ -465,7 +679,8 @@ sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5 sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= From 00c2e2939980a04cc3f3e74ac49e483eda11fa0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:34:55 +0200 Subject: [PATCH 0065/1234] Bump gopkg.in/yaml.v2 from 2.2.8 to 2.3.0 (#65) Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.8 to 2.3.0. - [Release notes](https://github.com/go-yaml/yaml/releases) - [Commits](https://github.com/go-yaml/yaml/compare/v2.2.8...v2.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c8a9ad361..cc84f8f59 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/onsi/ginkgo v1.11.0 // keep the Makefile in sync! github.com/onsi/gomega v1.8.1 github.com/spf13/pflag v1.0.5 - gopkg.in/yaml.v2 v2.2.8 + gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.2 k8s.io/apimachinery v0.19.2 k8s.io/client-go v0.19.2 diff --git a/go.sum b/go.sum index 177510295..cae885268 100644 --- a/go.sum +++ b/go.sum @@ -626,6 +626,8 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From edc407b7fe8de98051d1c0f6cdcc4263fce7107c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:40:41 +0200 Subject: [PATCH 0066/1234] Bump github.com/onsi/ginkgo from 1.11.0 to 1.14.1 (#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump github.com/onsi/ginkgo from 1.11.0 to 1.14.1 Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.11.0 to 1.14.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.11.0...v1.14.1) Signed-off-by: dependabot[bot] * Sync makefile with go.mod for ginkgo Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- Makefile | 2 +- go.mod | 4 ++-- go.sum | 45 ++++++++++++--------------------------------- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 846885a82..944b971dd 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ ginkgo: ifeq (, $(shell which ginkgo)) @{ \ set -e ;\ - go get github.com/onsi/ginkgo/ginkgo@v1.11.0 ;\ + go get github.com/onsi/ginkgo/ginkgo@v1.14.1 ;\ } GINKGO=$(GOBIN)/ginkgo else diff --git a/go.mod b/go.mod index cc84f8f59..42ca27db7 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.13 require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.2.1 - github.com/onsi/ginkgo v1.11.0 // keep the Makefile in sync! - github.com/onsi/gomega v1.8.1 + github.com/onsi/ginkgo v1.14.1 // keep the Makefile in sync! + github.com/onsi/gomega v1.10.1 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.2 diff --git a/go.sum b/go.sum index cae885268..4c0fe5912 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= @@ -47,7 +46,6 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -69,7 +67,6 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= @@ -99,14 +96,12 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -120,9 +115,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -178,7 +171,6 @@ github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= @@ -189,7 +181,6 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -206,7 +197,6 @@ github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA// github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= @@ -226,7 +216,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -243,7 +232,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -253,7 +241,6 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8 h1:QiWkFLKq0T7mpzwOTu6BzNDbfTE8OLrYhVKYMLF46Ok= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -266,7 +253,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -286,7 +272,6 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -304,22 +289,27 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -328,7 +318,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -339,13 +328,11 @@ github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2 github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -395,7 +382,6 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -422,7 +408,6 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -467,16 +452,15 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -505,27 +489,27 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -556,7 +540,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -570,7 +553,6 @@ google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEn google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= @@ -624,7 +606,6 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -669,7 +650,6 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H k8s.io/kubectl v0.19.2 h1:/Dxz9u7S0GnchLA6Avqi5k1qhZH4Fusgecj8dHsSnbk= k8s.io/kubectl v0.19.2/go.mod h1:4ib3oj5ma6gF95QukTvC7ZBMxp60+UEAhDPjLuBIrV4= k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -679,7 +659,6 @@ sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvO sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From c4ba3b81efc87a797c915fe97f77c6b8bb611cd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:53:21 +0200 Subject: [PATCH 0067/1234] Bump github.com/onsi/gomega from 1.8.1 to 1.10.2 (#64) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.8.1 to 1.10.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.8.1...v1.10.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 42ca27db7..22081e256 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.2.1 github.com/onsi/ginkgo v1.14.1 // keep the Makefile in sync! - github.com/onsi/gomega v1.10.1 + github.com/onsi/gomega v1.10.2 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.2 diff --git a/go.sum b/go.sum index 4c0fe5912..083fd5cb5 100644 --- a/go.sum +++ b/go.sum @@ -305,6 +305,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= From 034adc5f2d67384e7fb079dbd8c9de94dd46a5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 28 Sep 2020 15:59:54 +0200 Subject: [PATCH 0068/1234] Use OpenTelemetry Collector v0.11.0 (#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index dcdbe6e02..e4fb9b880 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.10.0 +opentelemetry-collector=0.11.0 # DO NOT EDIT the next value, it is updated automatically during the release. # Represents the current (latest) release of the OpenTelemetry Operator. From a1e6ba3ad8657e83b3aed0aeb531bd5a8d8b3ced Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2020 16:12:44 +0200 Subject: [PATCH 0069/1234] Bump sigs.k8s.io/controller-runtime from 0.6.0 to 0.6.3 (#63) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.6.0 to 0.6.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.6.0...v0.6.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 22081e256..4ee3b3d92 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( k8s.io/apimachinery v0.19.2 k8s.io/client-go v0.19.2 k8s.io/kubectl v0.19.2 - sigs.k8s.io/controller-runtime v0.6.0 + sigs.k8s.io/controller-runtime v0.6.3 ) replace ( diff --git a/go.sum b/go.sum index 083fd5cb5..048116e27 100644 --- a/go.sum +++ b/go.sum @@ -231,12 +231,16 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= +github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -336,6 +340,7 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -619,21 +624,29 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= +k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= +k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= +k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY= k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= +k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= +k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -647,18 +660,22 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kubectl v0.19.2 h1:/Dxz9u7S0GnchLA6Avqi5k1qhZH4Fusgecj8dHsSnbk= k8s.io/kubectl v0.19.2/go.mod h1:4ib3oj5ma6gF95QukTvC7ZBMxp60+UEAhDPjLuBIrV4= k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= +sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= +sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= From 98d42b1ee269cae512ee358ab28f2e932f04b50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 29 Sep 2020 17:27:46 +0200 Subject: [PATCH 0070/1234] Add release script (#69) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/create-release-github.sh | 10 ++ .ci/publish-bundle-images.sh | 31 ++++++ .ci/publish-images.sh | 29 ++++++ .ci/tagAndPushFunc.sh | 31 ++++++ .github/workflows/release.yaml | 38 ++++++++ .gitignore | 11 ++- CHANGELOG.md | 14 +++ Dockerfile | 4 +- Makefile | 24 +++-- RELEASE.md | 20 ++++ .../webhook_in_opentelemetrycollectors.yaml | 1 + ...emetry-operator.clusterserviceversion.yaml | 94 +++++++++++++++++++ config/manifests/kustomization.yaml | 3 + versions.txt | 5 +- 14 files changed, 301 insertions(+), 14 deletions(-) create mode 100644 .ci/create-release-github.sh create mode 100755 .ci/publish-bundle-images.sh create mode 100755 .ci/publish-images.sh create mode 100644 .ci/tagAndPushFunc.sh create mode 100644 .github/workflows/release.yaml create mode 100644 CHANGELOG.md create mode 100644 RELEASE.md create mode 100644 config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml create mode 100644 config/manifests/kustomization.yaml diff --git a/.ci/create-release-github.sh b/.ci/create-release-github.sh new file mode 100644 index 000000000..84f745713 --- /dev/null +++ b/.ci/create-release-github.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +OPERATOR_VERSION=$(git describe --tags) +echo "${GH_WRITE_TOKEN}" | gh auth login --with-token + +gh config set prompt disabled +gh release create \ + -t "Release ${OPERATOR_VERSION}" \ + "${OPERATOR_VERSION}" \ + 'dist/opentelemetry-operator.yaml#Installation manifest for Kubernetes' 'dist/bundle.tar.gz#Manifest bundle for OLM' diff --git a/.ci/publish-bundle-images.sh b/.ci/publish-bundle-images.sh new file mode 100755 index 000000000..c9e6cabb1 --- /dev/null +++ b/.ci/publish-bundle-images.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags | grep -Po "([\d\.]+)")} + +echo "Building bundle image" +make bundle-build + +## push to Docker Hub +if [ "${DOCKER_PASSWORD}x" != "x" -a "${DOCKER_USERNAME}x" != "x" ]; then + echo "Performing a 'docker login'" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + TARGET_IMAGE="otel/opentelemetry-operator-bundle:${OPERATOR_VERSION}" + docker tag "controller-bundle:${OPERATOR_VERSION}" "${TARGET_IMAGE}" + + echo "Pushing ${TARGET_IMAGE}" + docker push "${TARGET_IMAGE}" +fi + +## push to quay.io +if [ "${QUAY_PASSWORD}x" != "x" -a "${QUAY_USERNAME}x" != "x" ]; then + echo "Performing a 'docker login' for Quay" + echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin + + TARGET_IMAGE="quay.io/opentelemetry/opentelemetry-operator-bundle:${OPERATOR_VERSION}" + docker tag "controller-bundle:${OPERATOR_VERSION}" "${TARGET_IMAGE}" + + echo "Pushing ${TARGET_IMAGE}" + docker push "${TARGET_IMAGE}" +fi + diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh new file mode 100755 index 000000000..6a8b7690d --- /dev/null +++ b/.ci/publish-images.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source ./.ci/tagAndPushFunc.sh + +BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"otel/opentelemetry-operator"} +OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags | grep -Po "([\d\.]+)")} +BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} + +echo "Building image ${BUILD_IMAGE}" +make docker-build IMG="${BUILD_IMAGE}" VERSION=${OPERATOR_VERSION} + +## push to Docker Hub +if [ "${DOCKER_PASSWORD}x" != "x" -a "${DOCKER_USERNAME}x" != "x" ]; then + echo "Performing a 'docker login'" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + BASE_BUILD_IMAGE=${DOCKER_BASE_BUILD_IMAGE:-"otel/opentelemetry-operator"} + tagAndPush ${BUILD_IMAGE} ${BASE_BUILD_IMAGE} ${OPERATOR_VERSION} +fi + +## push to quay.io +if [ "${QUAY_PASSWORD}x" != "x" -a "${QUAY_USERNAME}x" != "x" ]; then + echo "Performing a 'docker login' for Quay" + echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin + + BASE_BUILD_IMAGE=${QUAY_BASE_BUILD_IMAGE:-"quay.io/opentelemetry/opentelemetry-operator"} + tagAndPush ${BUILD_IMAGE} ${BASE_BUILD_IMAGE} ${OPERATOR_VERSION} +fi + diff --git a/.ci/tagAndPushFunc.sh b/.ci/tagAndPushFunc.sh new file mode 100644 index 000000000..9cf1829b3 --- /dev/null +++ b/.ci/tagAndPushFunc.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +function tagAndPush { + buildImage=$1 ## the image that has been built already + baseImageName=$2 ## the host/namespace/image base to use + version=$3 ## the version + targetImage="${baseImageName}:${version}" + + echo "Tagging ${buildImage} as ${targetImage}" + docker tag "${buildImage}" "${targetImage}" + + echo "Pushing ${targetImage}" + docker push "${targetImage}" + + ## if we are on a release tag, let's extract the version number + ## the other possible value, currently, is 'master' (or another branch name) + ## if we are not running in the CI, it fallsback to the `git describe` above + if [[ ${version} =~ ^[0-9]+\.[0-9]+ ]]; then + majorMinor=${BASH_REMATCH[0]} + + if [ "${majorMinor}x" != "x" ]; then + majorMinorImage="${baseImageName}:${majorMinor}" + echo "Pushing '${majorMinorImage}'" + docker tag "${targetImage}" "${majorMinorImage}" + + echo "Pushing ${majorMinorImage}" + docker push "${majorMinorImage}" + fi + fi +} + diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..d701972b6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: "Prepare the release" +on: + push: + tags: + - 'v*' + +jobs: + unit-tests: + runs-on: ubuntu-20.04 + steps: + - uses: actions/setup-go@v1 + with: + go-version: '1.14.4' + - uses: actions/checkout@v1 + + - name: "generate release resources" + run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry/opentelemetry-operator" + + - name: "publish the images" + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + run: ./.ci/publish-images.sh + + - name: "publish the bundle image" + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} + run: ./.ci/publish-bundle-images.sh + + - name: "create the release in GitHub" + env: + GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} + run: ./.ci/create-release-github.sh diff --git a/.gitignore b/.gitignore index eed941219..80d243954 100644 --- a/.gitignore +++ b/.gitignore @@ -15,9 +15,16 @@ bin *.coverprofile # Kubernetes Generated files - skip generated files, except for vendored files - !vendor/**/zz_generated.* +# Operator SDK generated files +bundle +bundle.Dockerfile +bundle.tar.gz + +# Release artifacts +dist + # editor and IDE paraphernalia .idea *.swp @@ -25,4 +32,4 @@ bin *~ # local resources, not to be committed -local \ No newline at end of file +local diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..9facc0da1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +Changes by Version +================== + +0.11.0 (unreleased) +------------------- + +- Initial release after the migration to `kubebuilder` +- Support for OpenTelemetry Collector v0.11.0 +- Features: + - Provisioning of an OpenTelemetry Collector based on the CR definition + - Sidecar injected via webhook + - Deployment modes: `daemonset`, `deployment`, `sidecar` + - Automatic upgrade between collector versions +- CRs from the older version should still work with this operator diff --git a/Dockerfile b/Dockerfile index d33d180c9..7cb33b498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,10 +20,10 @@ COPY versions.txt versions.txt ARG VERSION_PKG ARG VERSION ARG VERSION_DATE -ARG OTELSVC_VERSION +ARG OTELCOL_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 944b971dd..6b7704158 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # Current Operator version -VERSION ?= "$(shell git describe --tags)" +VERSION ?= "$(shell git describe --tags | grep -Po "([\d\.]+)")" ## version, without the 'v' prefix VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" -OTELSVC_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELSVC_VERSION}" +OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION}" # Default bundle image tag BUNDLE_IMG ?= controller-bundle:$(VERSION) @@ -18,7 +18,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # Image URL to use all building/pushing image targets IMG_PREFIX ?= quay.io/${USER} -IMG ?= ${IMG_PREFIX}/opentelemetry-operator:latest +IMG ?= ${IMG_PREFIX}:${VERSION} + # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" @@ -62,11 +63,20 @@ install: manifests kustomize uninstall: manifests kustomize $(KUSTOMIZE) build config/crd | kubectl delete -f - -# Deploy controller in the configured Kubernetes cluster in ~/.kube/config -deploy: manifests kustomize +# Set the controller image parameters +set-image-controller: manifests kustomize cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + +# Deploy controller in the configured Kubernetes cluster in ~/.kube/config +deploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - +# Deploy controller in the configured Kubernetes cluster in ~/.kube/config +release-artifacts: set-image-controller bundle + mkdir -p dist + $(KUSTOMIZE) build config/default -o dist/opentelemetry-operator.yaml + tar czf dist/bundle.tar.gz bundle + # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases @@ -85,7 +95,7 @@ generate: controller-gen # Build the docker image docker-build: test - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELSVC_VERSION=${OTELSVC_VERSION} . + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} . # Push the docker image docker-push: diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..18ba1113e --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,20 @@ +# Release instructions + +Steps to release a new version of the OpenTelemetry Operator: + +1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. +1. Add the changes to the changelog +1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` +1. Once the changes above are merged and available in `master`, tag it with the desired version, prefixed with `v`: `v0.3.0` +1. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images + +## Generating the changelog + +Run this generator: +```console +$ docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator +``` + +Remove the commits that are not relevant to users, like: +* CI or testing-specific commits (e2e, unit test, ...) +* bug fixes for problems that are not part of a release yet diff --git a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml index a04a64f79..73ace5fa2 100644 --- a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml +++ b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml @@ -15,3 +15,4 @@ spec: namespace: system name: webhook-service path: /convert + port: 443 diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml new file mode 100644 index 000000000..65590b108 --- /dev/null +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -0,0 +1,94 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[]' + capabilities: Basic Install + operators.operatorframework.io/builder: operator-sdk-v0.19.0 + operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 + name: opentelemetry-operator.vX.Y.Z + namespace: placeholder +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API + kind: OpenTelemetryCollector + name: opentelemetrycollectors.core.opentelemetry.io + specDescriptors: + - description: Args is the set of arguments to pass to the OpenTelemetry Collector + binary + displayName: Args + path: args + - description: Config is the raw JSON to be used as the collector's configuration. + Refer to the OpenTelemetry Collector documentation for details. + displayName: Config + path: config + - description: Image indicates the container image to use for the OpenTelemetry + Collector. + displayName: Image + path: image + - description: Mode represents how the collector should be deployed (deployment, + daemonset or sidecar) + displayName: Mode + path: mode + - description: Ports allows a set of ports to be exposed by the underlying v1.Service. + By default, the operator will attempt to infer the required ports by parsing + the .Spec.Config property but this property can be used to open aditional + ports that can't be inferred by the operator, like for custom receivers. + displayName: Ports + path: ports + - description: Replicas is the number of pod instances for the underlying OpenTelemetry + Collector + displayName: Replicas + path: replicas + - description: ServiceAccount indicates the name of an existing service account + to use with this instance. + displayName: Service Account + path: serviceAccount + - description: VolumeMounts represents the mount points to use in the underlying + collector deployment(s) + displayName: Volume Mounts + path: volumeMounts + - description: Volumes represents which volumes to use in the underlying collector + deployment(s). + displayName: Volumes + path: volumes + version: v1alpha1 + description: Provides the OpenTelemetry components, including the Collector + displayName: Community OpenTelemetry Operator + icon: + - base64data: "" + mediatype: "" + install: + spec: + deployments: null + strategy: "" + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - opentelemetry + - tracing + - logging + - metrics + - monitoring + - troubleshooting + links: + - name: Opentelemetry Operator + url: https://opentelemetry-operator.domain + maintainers: + - email: jpkroehling@redhat.com + name: Juraci Paixão Kröhling + maturity: alpha + provider: + name: OpenTelemetry Community + url: https://github.com/open-telemetry/opentelemetry-operator + version: 0.0.0 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml new file mode 100644 index 000000000..ec2c16556 --- /dev/null +++ b/config/manifests/kustomization.yaml @@ -0,0 +1,3 @@ +resources: +- ../default +- ../samples diff --git a/versions.txt b/versions.txt index e4fb9b880..87e44604f 100644 --- a/versions.txt +++ b/versions.txt @@ -4,6 +4,5 @@ # the docs as well. opentelemetry-collector=0.11.0 -# DO NOT EDIT the next value, it is updated automatically during the release. -# Represents the current (latest) release of the OpenTelemetry Operator. -operator=0.2.0 +# Represents the next release of the OpenTelemetry Operator. +operator=0.11.0 From 5ebdc5645ccb4af13ef7a83afb276e57ac72a02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 30 Sep 2020 11:33:11 +0200 Subject: [PATCH 0071/1234] Add operator-sdk to release workflow (#72) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d701972b6..74e694679 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,9 @@ jobs: with: go-version: '1.14.4' - uses: actions/checkout@v1 + - uses: jpkrohling/setup-operator-sdk@v1-release + with: + operator-sdk-version: v0.19.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry/opentelemetry-operator" From 1d3f4fd22549d30cb04d243f96eaea4e44c2220c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 30 Sep 2020 12:51:35 +0200 Subject: [PATCH 0072/1234] Add kubebuilder to release workflow (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 74e694679..2be909bd4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,10 @@ jobs: with: go-version: '1.14.4' - uses: actions/checkout@v1 + + - name: "install kubebuilder" + run: ./hack/install-kubebuilder.sh + - uses: jpkrohling/setup-operator-sdk@v1-release with: operator-sdk-version: v0.19.0 From 67430683f26bdda5013cf0b03a55d8934c544cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 30 Sep 2020 13:47:04 +0200 Subject: [PATCH 0073/1234] Mark the .ci/create-release-github.sh as executable (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/create-release-github.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 .ci/create-release-github.sh diff --git a/.ci/create-release-github.sh b/.ci/create-release-github.sh old mode 100644 new mode 100755 From 328acc94c89c37cf6b4d722eeaee6af111c5c147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 1 Oct 2020 09:06:02 +0200 Subject: [PATCH 0074/1234] Update the readme to include installation of released operator (#75) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5132e6d10..466f707f3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,12 @@ At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetr ## Getting started -To run the operator locally, run: +To install the operator in an existing cluster, make sure you have [`cert-manager` installed](https://cert-manager.io/docs/installation/) and run: +``` +kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml +``` + +For development purposes, you might want to run the operator as a local process in your laptop: ``` make install run ``` From 01aa3a5e6f56314062ad82450c699f4311cb70da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 1 Oct 2020 14:14:49 +0200 Subject: [PATCH 0075/1234] Removed older, unused OLM catalog files (#76) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ...operator.v0.2.0.clusterserviceversion.yaml | 206 --- ...emetry.io_opentelemetrycollectors_crd.yaml | 1400 ----------------- 2 files changed, 1606 deletions(-) delete mode 100644 config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml delete mode 100644 config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml diff --git a/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml b/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml deleted file mode 100644 index 55f155ede..000000000 --- a/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry-operator.v0.2.0.clusterserviceversion.yaml +++ /dev/null @@ -1,206 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "opentelemetry.io/v1alpha1", - "kind": "OpenTelemetryCollector", - "metadata": { - "name": "simplest" - }, - "spec": { - "config": "receivers:\n jaeger:\n\nprocessors:\n queued-retry:\n\nexporters:\n logging:\n\npipelines:\n traces:\n receivers: [jaeger]\n processors: [queued-retry]\n exporters: [logging]\n" - } - } - ] - capabilities: Basic Install - name: opentelemetry-operator.v0.2.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - displayName: OpenTelemetry Collector - kind: OpenTelemetryCollector - name: opentelemetrycollectors.opentelemetry.io - specDescriptors: - - description: Args is the set of arguments to pass to the OpenTelemetry Collector - binary - displayName: Args - path: args - - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - displayName: Config - path: config - - description: Image indicates the container image to use for the OpenTelemetry - Collector. - displayName: Image - path: image - - description: Mode represents how the collector should be deployed (deployment - vs. daemonset) - displayName: Mode - path: mode - - description: Ports allows a set of ports to be exposed by the underlying v1.Service. - By default, the operator will attempt to infer the required ports by parsing - the .Spec.Config property but this property can be used to open aditional - ports that can't be inferred by the operator, like for custom receivers. - displayName: Ports - path: ports - - description: Replicas is the number of pod instances for the underlying OpenTelemetry - Collector - displayName: Replicas - path: replicas - - description: ServiceAccount indicates the name of an existing service account - to use with this instance. - displayName: Service Account - path: serviceAccount - - description: VolumeMounts represents the mount points to use in the underlying - collector deployment(s) - displayName: Volume Mounts - path: volumeMounts - - description: Volumes represents which volumes to use in the underlying collector - deployment(s). - displayName: Volumes - path: volumes - version: v1alpha1 - description: Placeholder description - displayName: Opentelemetry Operator - install: - spec: - deployments: - - name: opentelemetry-operator - spec: - replicas: 1 - selector: - matchLabels: - name: opentelemetry-operator - strategy: {} - template: - metadata: - labels: - name: opentelemetry-operator - spec: - containers: - - command: - - opentelemetry-operator - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: opentelemetry-operator - image: quay.io/opentelemetry/opentelemetry-operator:v0.2.0 - imagePullPolicy: Always - name: opentelemetry-operator - resources: {} - serviceAccountName: opentelemetry-operator - permissions: - - rules: - - apiGroups: - - "" - resources: - - pods - - services - - services/finalizers - - endpoints - - persistentvolumeclaims - - events - - configmaps - - secrets - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - - deployments - - daemonsets - - replicasets - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - get - - create - - apiGroups: - - apps - resourceNames: - - opentelemetry-operator - resources: - - deployments/finalizers - verbs: - - update - - apiGroups: - - "" - resources: - - pods - verbs: - - get - - apiGroups: - - apps - resources: - - replicasets - - deployments - verbs: - - get - - apiGroups: - - opentelemetry.io - resources: - - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - serviceAccountName: opentelemetry-operator - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - tracing - - distributed tracing - - monitoring - - troubleshooting - maintainers: - - email: juraci.github@kroehling.de - name: Juraci Paixão Kröhling - maturity: alpha - provider: - name: OpenTelemetry - replaces: opentelemetry-operator.v0.0.2 - version: 0.2.0 diff --git a/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml b/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml deleted file mode 100644 index db5129cfe..000000000 --- a/config/rbac/olm-catalog/opentelemetry-operator/0.2.0/opentelemetry.io_opentelemetrycollectors_crd.yaml +++ /dev/null @@ -1,1400 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - mode: - description: Mode represents how the collector should be deployed - (deployment vs. daemonset) - enum: - - daemonset - - deployment - type: string - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open aditional ports that can't be inferred by the operator, - like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. - Field can be enabled with ServiceAppProtocol feature gate. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is - exposed when type=NodePort or LoadBalancer. Usually assigned - by the system. If specified, it will be allocated to the service - if unused or else creation of the service will fail. Default - is to auto-allocate a port if the ServiceType of this Service - requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector - format: int32 - type: integer - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. Behaves similarly to - SubPath but environment variable references $(VAR_NAME) are - expanded using the container's environment. Defaults to "" - (volume's root). SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage - Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph - monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather - than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the - Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the ConfigMap, the volume setup will error unless it is - marked optional. Paths must be relative and may not contain - the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must - be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents storage - that is handled by an external CSI driver (Alpha feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to - the associated CSI driver which will determine the default - filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the secret - object contains more than one secret, all secret references - are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required for - this EmptyDir volume. The size limit is also applicable - for memory medium. The maximum usage on memory medium - EmptyDir would be the minimum value between the SizeLimit - specified here and the sum of memory limits of all containers - in a pod. The default is nil which means that the limit - is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - fc: - description: FC represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for - this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the - plugin scripts. This may be empty if no secret object - is specified. If the secret object contains more than - one secret, all secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or - start with '..'. If '.' is supplied, the volume directory - will be the git repository. Otherwise, if specified, - the volume will contain the git repository in the subdirectory - with the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent - disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, - and downward API - properties: - defaultMode: - description: Mode bits to use on created files by default. - Must be a value between 0 and 0777. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - configMap: - description: information about the configMap data - to project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data - to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to - project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose - name is the key and content is the value. If - specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use - on this file, must be a value between - 0 and 0777. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. The kubelet will - start trying to rotate the token if the token - is older than 80 percent of its time to live - or if the token is older than 24 hours.Defaults - to 1 hour and must be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - required: - - sources - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no - group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: Volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume - should be ThickProvisioned or ThinProvisioned. Default - is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the - ScaleIO system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a value between 0 and 0777. Defaults - to 0644. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the - Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the Secret, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits to use on this file, - must be a value between 0 and 0777. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: Specify whether the Secret or its keys must - be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS - for tighter integration. Set VolumeName to any name to - override the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector - properties: - replicas: - format: int32 - type: integer - version: - type: string - required: - - replicas - - version - type: object - type: object - served: true - storage: true - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} From 59a5643f037b1fffc263034592148615d00af76d Mon Sep 17 00:00:00 2001 From: Ben Wells Date: Fri, 2 Oct 2020 08:22:17 +0100 Subject: [PATCH 0076/1234] Remove use of deprecated controller runtime log API (#78) --- controllers/opentelemetrycollector_controller_test.go | 2 +- internal/config/main.go | 2 +- pkg/collector/adapters/config_to_ports_test.go | 2 +- pkg/collector/container_test.go | 2 +- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/parser/receiver_generic_test.go | 2 +- pkg/collector/parser/receiver_jaeger_test.go | 2 +- pkg/collector/parser/receiver_test.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 2 +- pkg/sidecar/pod_test.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 0db4994d3..a47ce0aad 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -14,9 +14,9 @@ import ( "k8s.io/kubectl/pkg/scheme" "sigs.k8s.io/controller-runtime/pkg/client" k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" + logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" diff --git a/internal/config/main.go b/internal/config/main.go index 8aee3ed82..776c6b03c 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" "github.com/spf13/pflag" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index afb0ca68f..d36240ad6 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 7599d934a..487cf58e3 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index f9053b5bd..93c88435e 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 474a06049..fad045e2c 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index f4e8907dc..c6a1c4847 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" ) diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 863771355..29e1d9d33 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -3,7 +3,7 @@ package parser_test import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" ) diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index e44b0aa46..f0c5b859f 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" ) var _ = Describe("Receiver", func() { diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index a36938e0e..85ab51d7d 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -8,7 +8,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 2891380ce..9ca667405 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -7,7 +7,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index a5540ee21..950f11189 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -20,7 +20,7 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" + logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" From 80f578a502842a6f93d61c426e1b5700e600cf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 12 Oct 2020 12:17:05 +0200 Subject: [PATCH 0077/1234] Bumped OpenTelemetry Collector to v0.12.0 (#81) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 8 +++++++- versions.txt | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9facc0da1..f1b70d7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ Changes by Version ================== -0.11.0 (unreleased) +0.12.0 (2020-10-12) +------------------- + +* Bumped OpenTelemetry Collector to v0.12.0 ([#81](https://github.com/open-telemetry/opentelemetry-operator/pull/81), [@jpkrohling](https://github.com/jpkrohling)) +* Remove use of deprecated controller runtime log API ([#78](https://github.com/open-telemetry/opentelemetry-operator/pull/78), [@bvwells](https://github.com/bvwells)) + +0.11.0 (2020-09-30) ------------------- - Initial release after the migration to `kubebuilder` diff --git a/versions.txt b/versions.txt index 87e44604f..f49cdc68a 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.11.0 +opentelemetry-collector=0.12.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.11.0 +operator=0.12.0 From 3e58b0be5237e9847f04afc43701e320225984af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2020 09:07:35 +0200 Subject: [PATCH 0078/1234] Bump github.com/onsi/gomega from 1.10.2 to 1.10.3 (#84) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.2 to 1.10.3. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.10.2...v1.10.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 22 ++++++---------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 4ee3b3d92..383737929 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.2.1 github.com/onsi/ginkgo v1.14.1 // keep the Makefile in sync! - github.com/onsi/gomega v1.10.2 + github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.2 diff --git a/go.sum b/go.sum index 048116e27..c01043b01 100644 --- a/go.sum +++ b/go.sum @@ -237,8 +237,6 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -306,11 +304,10 @@ github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -466,6 +463,8 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -509,6 +508,8 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -623,29 +624,21 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/apiextensions-apiserver v0.18.2 h1:I4v3/jAuQC+89L3Z7dDgAiN4EOjN6sbm6iBqQwHTah8= -k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY= k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= -k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY= -k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/component-base v0.18.2/go.mod h1:kqLlMuhJNHQ9lz8Z7V5bxUUtjFZnrypArGl58gmDfUM= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -659,7 +652,6 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= @@ -672,8 +664,6 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.6.0 h1:Fzna3DY7c4BIP6KwfSlrfnj20DJ+SeMBK8HSFvOk9NM= -sigs.k8s.io/controller-runtime v0.6.0/go.mod h1:CpYf5pdNY/B352A1TFLAS2JVSlnGQ5O2cftPHndTroo= sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= From 745d82e1dccae3fdb34deff2f6e71c841d1f9024 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2020 09:39:52 +0200 Subject: [PATCH 0079/1234] Bump github.com/onsi/ginkgo from 1.14.1 to 1.14.2 (#85) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump github.com/onsi/ginkgo from 1.14.1 to 1.14.2 Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.14.1 to 1.14.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.14.1...v1.14.2) Signed-off-by: dependabot[bot] * Updated ginkgo in Makefile Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- Makefile | 2 +- go.mod | 2 +- go.sum | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 6b7704158..34da9872d 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ ginkgo: ifeq (, $(shell which ginkgo)) @{ \ set -e ;\ - go get github.com/onsi/ginkgo/ginkgo@v1.14.1 ;\ + go get github.com/onsi/ginkgo/ginkgo@v1.14.2 ;\ } GINKGO=$(GOBIN)/ginkgo else diff --git a/go.mod b/go.mod index 383737929..7c6d9da17 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.2.1 - github.com/onsi/ginkgo v1.14.1 // keep the Makefile in sync! + github.com/onsi/ginkgo v1.14.2 // keep the Makefile in sync! github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 diff --git a/go.sum b/go.sum index c01043b01..3a0d45237 100644 --- a/go.sum +++ b/go.sum @@ -229,7 +229,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -299,12 +298,11 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= @@ -461,7 +459,6 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -506,7 +503,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -600,7 +596,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogR gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= From cae68d277142737fd09d5336d8044a13c3617adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 13 Oct 2020 11:50:34 +0200 Subject: [PATCH 0080/1234] Add labeler, setting 'needs-triage' to all new issues (#83) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/labeler-needs-triage.yaml | 3 +++ .github/workflows/labeler.yml | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .github/labeler-needs-triage.yaml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler-needs-triage.yaml b/.github/labeler-needs-triage.yaml new file mode 100644 index 000000000..c081f8ffe --- /dev/null +++ b/.github/labeler-needs-triage.yaml @@ -0,0 +1,3 @@ +# Add 'needs-triage' label to all new issues +needs-triage: + - '*' \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..1dce006d5 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,13 @@ +name: "Add needs-triage to new issues" +on: + issues: + types: [opened] + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v2.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler-needs-triage.yaml From 1c0f884a0690b7cb11e28cdf96bea39b166d7fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 13 Oct 2020 13:30:33 +0200 Subject: [PATCH 0081/1234] Added missing config option to issue-labeler (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/labeler.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1dce006d5..050cb6ef2 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -11,3 +11,4 @@ jobs: with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler-needs-triage.yaml + enable-versioned-regex: 0 From 4af927669fcf3cb3aa5485ac66e4acd53455bbb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 13 Oct 2020 13:48:17 +0200 Subject: [PATCH 0082/1234] regex for issue labeler (#89) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/labeler-needs-triage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler-needs-triage.yaml b/.github/labeler-needs-triage.yaml index c081f8ffe..f36d4daba 100644 --- a/.github/labeler-needs-triage.yaml +++ b/.github/labeler-needs-triage.yaml @@ -1,3 +1,3 @@ # Add 'needs-triage' label to all new issues needs-triage: - - '*' \ No newline at end of file + - '.*' \ No newline at end of file From 56d231326a71dfcee2f768b336e0c4fc2a82e392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 14 Oct 2020 18:17:11 +0200 Subject: [PATCH 0083/1234] Added mergify (#82) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/mergify.yml diff --git a/.github/mergify.yml b/.github/mergify.yml new file mode 100644 index 000000000..6214aa1b7 --- /dev/null +++ b/.github/mergify.yml @@ -0,0 +1,11 @@ +pull_request_rules: + - name: Automatic merge when all checks pass and the PR is approved + conditions: + - "#approved-reviews-by>=1" + - "-draft" + - "status-success=unit-tests" + - "status-success=EasyCLA" + actions: + merge: + method: squash + commit_message: title+body From 0b15a54525636c3e472f2e78bfc4eaaffc6d0a94 Mon Sep 17 00:00:00 2001 From: Rafael Ibraim Date: Mon, 19 Oct 2020 10:08:45 -0300 Subject: [PATCH 0084/1234] Added 'operator-sdk' and 'tools' targets to Makefile (#91) * Added 'operator-sdk' and 'tools' targets to Makefile * Changed operator-sdk target to point to official site --- Makefile | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 34da9872d..90618239d 100644 --- a/Makefile +++ b/Makefile @@ -149,12 +149,28 @@ else KUSTOMIZE=$(shell which kustomize) endif +operator-sdk: +ifeq (, $(shell which operator-sdk)) + @{ \ + set -e ;\ + echo "" ;\ + echo "ERROR: operator-sdk not found." ;\ + echo "Please check https://sdk.operatorframework.io for installation instructions and try again." ;\ + echo "" ;\ + exit 1 ;\ + } +else +OPERATOR_SDK=$(shell which operator-sdk) +endif + # Generate bundle manifests and metadata, then validate generated files. -bundle: manifests - operator-sdk generate kustomize manifests -q - kustomize build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) - operator-sdk bundle validate ./bundle +bundle: operator-sdk manifests + $(OPERATOR_SDK) generate kustomize manifests -q + $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) + $(OPERATOR_SDK) bundle validate ./bundle # Build the bundle image. bundle-build: docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . + +tools: ginkgo kustomize controller-gen operator-sdk From cf02ede842450ec4332a7dcb0217ad46a94fde4c Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Tue, 20 Oct 2020 14:25:08 +0200 Subject: [PATCH 0085/1234] Allow for spec.Env to be set on the OTEL Colelctor Spec (#94) * Some of the extensions like Kubernetes Observer requires you to set some ENV vars * Be useful for things like getting API Tokens via Vault etc. --- api/v1alpha1/opentelemetrycollector_types.go | 6 + api/v1alpha1/zz_generated.deepcopy.go | 7 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 105 ++++++++++++++++++ pkg/collector/container.go | 6 + pkg/collector/container_test.go | 35 ++++++ 5 files changed, 159 insertions(+) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index ff9928abe..578915549 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -70,6 +70,12 @@ type OpenTelemetryCollectorSpec struct { // +listType=atomic // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Ports []v1.ServicePort `json:"ports,omitempty"` + + // ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be + // consumed in the config file for the Collector. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Env []v1.EnvVar `json:"env,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index acd2a7566..a0131fcbd 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -118,6 +118,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c53de5357..c299bc87f 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -66,6 +66,111 @@ spec: description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. type: string + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previous defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double $$, ie: + $$(VAR_NAME). Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources + limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, + requests.cpu, requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image indicates the container image to use for the OpenTelemetry Collector. diff --git a/pkg/collector/container.go b/pkg/collector/container.go index e9f161ab2..9fe069a0b 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -58,10 +58,16 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) } + var envVars = otelcol.Spec.Env + if otelcol.Spec.Env == nil { + envVars = []corev1.EnvVar{} + } + return corev1.Container{ Name: naming.Container(), Image: image, VolumeMounts: volumeMounts, Args: args, + Env: envVars, } } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 487cf58e3..d5db42cf7 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -81,4 +81,39 @@ var _ = Describe("Container", func() { Expect(c.VolumeMounts).To(HaveLen(2)) Expect(c.VolumeMounts[1].Name).To(Equal("custom-volume-mount")) }) + + It("should allow for env vars to be overriden", func() { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Env: []corev1.EnvVar{ + { + Name: "foo", + Value: "bar", + }, + }, + }, + } + + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + Expect(c.Env).To(HaveLen(1)) + Expect(c.Env[0].Name).To(Equal("foo")) + Expect(c.Env[0].Value).To(Equal("bar")) + }) + + It("should allow for empty env vars by default", func() { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + Expect(c.Env).To(BeEmpty()) + }) }) From a64b8688a3b289ead97d532c14ff10634a73fdd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 20 Oct 2020 16:25:00 +0200 Subject: [PATCH 0086/1234] Set mergify to dismiss stale reviews (#95) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/mergify.yml b/.github/mergify.yml index 6214aa1b7..645d4b8f0 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,4 +1,10 @@ pull_request_rules: + - name: remove outdated reviews + conditions: + - base=master + actions: + dismiss_reviews: {} + - name: Automatic merge when all checks pass and the PR is approved conditions: - "#approved-reviews-by>=1" From f86cca35ac2b4f72555698d2b97d2704bb0ddf96 Mon Sep 17 00:00:00 2001 From: Amadikwa Joy N Date: Tue, 20 Oct 2020 20:18:45 +0100 Subject: [PATCH 0087/1234] Use Patch instead of Update in the reconciliation (#92) Fixes #54 by changing the reconciliation calls to use Patch instead of Update. --- pkg/collector/reconcile/configmap.go | 4 +++- pkg/collector/reconcile/daemonset.go | 3 ++- pkg/collector/reconcile/deployment.go | 6 ++++-- pkg/collector/reconcile/service.go | 4 +++- pkg/collector/reconcile/serviceaccount.go | 4 +++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index ec658891f..30bfeb7c8 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -117,7 +117,9 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co updated.ObjectMeta.Labels[k] = v } - if err := params.Client.Update(ctx, updated); err != nil { + patch := client.MergeFrom(¶ms.Instance) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index b1ef4d3d3..981e71d1b 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -87,7 +87,8 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da updated.ObjectMeta.Labels[k] = v } - if err := params.Client.Update(ctx, updated); err != nil { + patch := client.MergeFrom(¶ms.Instance) + if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 04941aa5f..9adb7e330 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -87,10 +87,12 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - if err := params.Client.Update(ctx, updated); err != nil { + patch := client.MergeFrom(¶ms.Instance) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } - + params.Log.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) } diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 5a5107c27..75669dd81 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -193,7 +193,9 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv updated.ObjectMeta.Labels[k] = v } - if err := params.Client.Update(ctx, updated); err != nil { + patch := client.MergeFrom(¶ms.Instance) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index e6a5b615c..3452c4504 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -86,7 +86,9 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core updated.ObjectMeta.Labels[k] = v } - if err := params.Client.Update(ctx, updated); err != nil { + patch := client.MergeFrom(¶ms.Instance) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } From 37e0ce93375d639c18f9aa6ba04eb9b4a0bc3506 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 07:57:09 +0000 Subject: [PATCH 0088/1234] Bump k8s.io/api from 0.19.2 to 0.19.3 (#99) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.19.2 to 0.19.3.
Commits
  • 93c4467 Update dependencies to v0.19.3 tag
  • 50fcaa7 Merge pull request #94973 from liggitt/automated-cherry-pick-of-#94936-upstre...
  • 411ee58 Return the Kubernetes version which stopped serving deprecated APIs by default
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/api&package-manager=go_modules&previous-version=0.19.2&new-version=0.19.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 7c6d9da17..cbe503929 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,8 @@ require ( github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.19.2 - k8s.io/apimachinery v0.19.2 + k8s.io/api v0.19.3 + k8s.io/apimachinery v0.19.3 k8s.io/client-go v0.19.2 k8s.io/kubectl v0.19.2 sigs.k8s.io/controller-runtime v0.6.3 diff --git a/go.sum b/go.sum index 3a0d45237..8a1d2f136 100644 --- a/go.sum +++ b/go.sum @@ -622,11 +622,15 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.19.3 h1:GN6ntFnv44Vptj/b+OnMW7FmzkpDoIDLZRvKX3XH9aU= +k8s.io/api v0.19.3/go.mod h1:VF+5FT1B74Pw3KxMdKyinLo+zynBaMBiAfGMuldcNDs= k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc= +k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= From 02cad66fe8794a4659a54fce127d7600182a3b3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 08:11:00 +0000 Subject: [PATCH 0089/1234] Bump k8s.io/client-go from 0.19.2 to 0.19.3 (#96) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.19.2 to 0.19.3.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/client-go&package-manager=go_modules&previous-version=0.19.2&new-version=0.19.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index cbe503929..10d5297e8 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.3 k8s.io/apimachinery v0.19.3 - k8s.io/client-go v0.19.2 + k8s.io/client-go v0.19.3 k8s.io/kubectl v0.19.2 sigs.k8s.io/controller-runtime v0.6.3 ) diff --git a/go.sum b/go.sum index 8a1d2f136..4618ed150 100644 --- a/go.sum +++ b/go.sum @@ -636,6 +636,8 @@ k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= +k8s.io/client-go v0.19.3 h1:ctqR1nQ52NUs6LpI0w+a5U+xjYwflFwA13OJKcicMxg= +k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= From 6330bda0b6652ad8f43bd136a268bc46fc1ae1c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2020 07:06:56 +0000 Subject: [PATCH 0090/1234] Bump k8s.io/kubectl from 0.19.2 to 0.19.3 (#98) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.19.2 to 0.19.3.
Commits
  • 978fd1a Update dependencies to v0.19.3 tag
  • 28d699c Merge pull request #94847 from eddiezane/automated-cherry-pick-of-#94728-upst...
  • 85e6002 Merge pull request #94944 from ialidzhikov/automated-cherry-pick-of-#94666-up...
  • 92ea032 portforward: Fix UDP-only ports calculation
  • c649655 Handle nil elements when sorting, instead of panicking
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/kubectl&package-manager=go_modules&previous-version=0.19.2&new-version=0.19.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 10d5297e8..76f7c8f12 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/api v0.19.3 k8s.io/apimachinery v0.19.3 k8s.io/client-go v0.19.3 - k8s.io/kubectl v0.19.2 + k8s.io/kubectl v0.19.3 sigs.k8s.io/controller-runtime v0.6.3 ) diff --git a/go.sum b/go.sum index 4618ed150..7ecfda3b4 100644 --- a/go.sum +++ b/go.sum @@ -620,28 +620,22 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.19.3 h1:GN6ntFnv44Vptj/b+OnMW7FmzkpDoIDLZRvKX3XH9aU= k8s.io/api v0.19.3/go.mod h1:VF+5FT1B74Pw3KxMdKyinLo+zynBaMBiAfGMuldcNDs= k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc= k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/cli-runtime v0.19.2/go.mod h1:CMynmJM4Yf02TlkbhKxoSzi4Zf518PukJ5xep/NaNeY= +k8s.io/cli-runtime v0.19.3/go.mod h1:q+l845i5/uWzcUpCrl+L4f3XLaJi8ZeLVQ/decwty0A= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc= -k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.19.3 h1:ctqR1nQ52NUs6LpI0w+a5U+xjYwflFwA13OJKcicMxg= k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.19.3/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.19.3/go.mod h1:WhLWSIefQn8W8jxSLl5WNiR6z8oyMe/8Zywg7alOkRc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -656,9 +650,9 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kubectl v0.19.2 h1:/Dxz9u7S0GnchLA6Avqi5k1qhZH4Fusgecj8dHsSnbk= -k8s.io/kubectl v0.19.2/go.mod h1:4ib3oj5ma6gF95QukTvC7ZBMxp60+UEAhDPjLuBIrV4= -k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU= +k8s.io/kubectl v0.19.3 h1:T8IHHpg+uRIfn34wqJ8wHG5bbH+VV5FNPtJ+jKcho1U= +k8s.io/kubectl v0.19.3/go.mod h1:t5cscfrAuHUvEGNyNJjPKt+rGlaJzk8jrKYHXxEsANE= +k8s.io/metrics v0.19.3/go.mod h1:Eap/Lk1FiAIjkaArFuv41v+ph6dbDpVGwAg7jMI+4vg= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= From 8c4255b16dd26e2d03ca5bbb722979fac43f658f Mon Sep 17 00:00:00 2001 From: dengliming Date: Thu, 22 Oct 2020 17:28:26 +0800 Subject: [PATCH 0091/1234] Bumped OpenTelemetry Collector to v0.13.0 (#101) closes [https://github.com/open-telemetry/opentelemetry-operator/issues/93](https://github.com/open-telemetry/opentelemetry-operator/issues/93) --- CHANGELOG.md | 8 ++++++++ versions.txt | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1b70d7f8..669b38987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.13.0 (2020-10-22) +------------------- + +* Bumped OpenTelemetry Collector to v0.13.0 ([#101](https://github.com/open-telemetry/opentelemetry-operator/pull/101), [@dengliming](https://github.com/dengliming)) +* Allow for spec.Env to be set on the OTEL Collector Spec ([#94](https://github.com/open-telemetry/opentelemetry-operator/pull/94), [@ekarlso](https://github.com/ekarlso)) + +_Note: The `groupbytrace` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.13.1, which includes this processor), or remove the processor._ + 0.12.0 (2020-10-12) ------------------- diff --git a/versions.txt b/versions.txt index f49cdc68a..2add194b3 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # this file contains the version of the OpenTelemetry components that will be used -# by default with the OpenTelemetry Operator. This would usually be the latest +# by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.12.0 +opentelemetry-collector=0.13.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.12.0 +operator=0.13.0 From 021d9f3659564a8ac1e1c57a1dc99729f00e61fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 12:03:12 +0100 Subject: [PATCH 0092/1234] Small local dev workflow improvements (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 8 ++++++-- pkg/collector/reconcile/deployment.go | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 90618239d..9a8eb949c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Current Operator version -VERSION ?= "$(shell git describe --tags | grep -Po "([\d\.]+)")" ## version, without the 'v' prefix +VERSION ?= "$(shell git describe --tags | sed 's/^v//')" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" @@ -18,7 +18,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # Image URL to use all building/pushing image targets IMG_PREFIX ?= quay.io/${USER} -IMG ?= ${IMG_PREFIX}:${VERSION} +IMG_REPO ?= opentelemetry-operator +IMG ?= ${IMG_PREFIX}/${IMG_REPO}:${VERSION} # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" @@ -103,6 +104,9 @@ docker-push: cert-manager: kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.yaml + kubectl wait --for=condition=available deployment cert-manager -n cert-manager + kubectl wait --for=condition=available deployment cert-manager-cainjector -n cert-manager + kubectl wait --for=condition=available deployment cert-manager-webhook -n cert-manager # find or download controller-gen # download controller-gen if necessary diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 9adb7e330..767864896 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -92,7 +92,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } - + params.Log.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) } From b6aaa525cdb9ac8fe3c6a3e5236695e719379e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 12:42:35 +0100 Subject: [PATCH 0093/1234] Add CONTRIBUTING.md (#102) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CODEOWNERS | 1 + CONTRIBUTING.md | 127 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 33 ------------- 3 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 CODEOWNERS create mode 100644 CONTRIBUTING.md diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..df52664c2 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @jpkrohling diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..ed36e5f05 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,127 @@ +# How to Contribute to the OpenTelemetry Operator + +We'd love your help! + +This project is [Apache 2.0 licensed](LICENSE) and accepts contributions via GitHub pull requests. This document outlines some of the conventions on development workflow, contact points and other resources to make it easier to get your contribution accepted. + +We gratefully welcome improvements to documentation as well as to code. + +## Getting Started + +### Workflow + +It is recommended to follow the ["GitHub Workflow"](https://guides.github.com/introduction/flow/). When using [GitHub's CLI](https://github.com/cli/cli), here's how it typically looks like: + +``` +$ gh repo fork github.com/open-telemetry/opentelemetry-operator +$ git checkout -b your-feature-branch +# do your changes +$ git commit -sam "Add feature X" +$ gh pr create +``` + +### Pre-requisites +* Install [Go](https://golang.org/doc/install). +* Have a Kubernetes cluster ready for development. We recommend `minikube` or `kind`. + +### Local run + +Build the manifests, install the CRD and run the operator as a local process: +``` +$ make manifests install run +``` + +### Deployment with webhooks + +When running `make run`, the webhooks aren't effective as it starts the manager in the local machine instead of in-cluster. To test the webhooks, you'll need to: + +1. configure a proxy between the Kubernetes API server and your host, so that it can contact the webhook in your local machine +1. create the TLS certificates and place them, by default, on `/tmp/k8s-webhook-server/serving-certs/tls.crt`. The Kubernetes API server has also to be configured to trust the CA used to generate those certs. + +In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: + +```console +make cert-manager +``` + +Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: + +``` +make manifests docker-build docker-push deploy +``` + +By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: + +* `IMG_PREFIX`, to override the registry, namespace and image name (`quay.io`) +* `USER`, to override the namespace +* `IMG_REPO`, to override the repository (`opentelemetry-operator`) +* `VERSION`, to override only the version part +* `IMG`, to override the entire image specification + +Your operator will be available in the `opentelemetry-operator-system` namespace. + +## Testing + +With an existing cluster (such as `minikube`), run: +``` +USE_EXISTING_CLUSTER=true make test +``` + +Tests can also be run without an existing cluster. For that, install [`kubebuilder`](https://book.kubebuilder.io/quick-start.html#installation). In this case, the tests will bootstrap `etcd` and `kubernetes-api-server` for the tests. Run against an existing cluster whenever possible, though. + +## Project Structure + +Here's a general overview of the directories from this operator and what to expect in each one of them: + +``` +. +├── api # the CRDs that are handled by this operator +│   └── v1alpha1 # the (currently) only CRD version we have +├── build # where the binaries are placed after `make manager` +├── config # the Kustomize resources that are used to assemble the operator's deployment units +│   ├── certmanager # Kustomize options dealing with cert-manager +│   ├── crd # Kustomize options for our CRDs +│   │   ├── bases # auto generated based on the code annotations (`make manifests`) +│   │   └── patches # patches to apply to the generated CRD +│   ├── default # Kustomize's "entry point", generating the distribution YAML file +│   ├── manager # the operator's Deployment +│   ├── manifests # the resulting CSV +│   │   └── bases +│   ├── prometheus # ServiceMonitor that exposes our operator's metrics +│   ├── rbac # RBAC rules +│   ├── samples # Set of examples of how to accomplish specific scenarios. Those are bundled in the final CSV +│   └── webhook # Webhook configuration and service +├── controllers # our main controller, where the reconciliation starts +├── hack # utility scripts +├── internal # code shared with our internal packages +│   ├── config # our operator's runtime configuration +│   ├── podinjector # the webhook that injects sidecars into pods +│   └── version # our version, as well as versions of underlying components +├── local # local resources that shouldn't be added to the version control, like CRs used for dev/testing +└── pkg # packages that are exporter and are part of the public API for this module + ├── autodetect # auto detect traits from the environment (platform, APIs, ...) + ├── collector # code that handles OpenTelemetry Collector + │   ├── adapters # data conversion + │   ├── parser # parses the OpenTelemetry Collector configuration + │   ├── reconcile # reconciliation logic for OpenTelemetry Collector components + │   └── upgrade # handles the upgrade routine from one OpenTelemetry Collector to the next + ├── naming # determines the names for components (containers, services, ...) + ├── platform # target platforms this operator might run + └── sidecar # operations related to sidecar manipulation (add, update, remove) +``` + +## Contributing + +Your contribution is welcome! For it to be accepted, we have a few standards that must be followed. + +### New features + +Before starting the development of a new feature, please create an issue and discuss it with the project maintainers. Features should come with documentation and enough tests (unit and/or end-to-end). + +### Bug fixes + +Every bug fix should be accompanied with a unit test, so that we can prevent regressions. + +### Documentation, typos, ... + +They are mostly welcome! diff --git a/README.md b/README.md index 466f707f3..c2c238aa9 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,6 @@ To install the operator in an existing cluster, make sure you have [`cert-manage kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml ``` -For development purposes, you might want to run the operator as a local process in your laptop: -``` -make install run -``` - Once the `opentelemetry-operator` deployment is ready, create an OpenTelemetry Collector (otelcol) instance, like: ```console @@ -60,38 +55,10 @@ At this point, the Operator does *not* validate the contents of the configuratio The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. -## Running with the webhooks - -When running `make run`, the webhooks aren't effective as it starts the manager in the local machine instead of in-cluster. To test the webhooks, you'll need to: - -1. configure a proxy between the Kubernetes API server and your host, so that it can contact the webhook in your local machine -1. create the TLS certificates and place them, by default, on `/tmp/k8s-webhook-server/serving-certs/tls.crt`. The Kubernetes API server has also to be configured to trust the CA used to generate those certs. - -In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: - -```console -make cert-manager -``` - -Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: - -``` -make manifests docker-build docker-push deploy -``` - ## Contributing and Developing Please see [CONTRIBUTING.md](CONTRIBUTING.md). -## Testing - -With an existing cluster (such as `minikube`), run: -``` -USE_EXISTING_CLUSTER=true make test -``` - -Tests can also be run without an existing cluster. For that, install [`kubebuilder`](https://book.kubebuilder.io/quick-start.html#installation). In this case, the tests will bootstrap `etcd` and `kubernetes-api-server` for the tests. Run against an existing cluster whenever possible, though. - ## License [Apache 2.0 License](./LICENSE). From 285ec308b82dd5c25383378bedf40e9495ef1972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 13:54:42 +0100 Subject: [PATCH 0094/1234] Add golangci-lint to CI (#103) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 7 +++++++ controllers/opentelemetrycollector_controller_test.go | 5 +++-- controllers/suite_test.go | 6 ++++-- internal/config/main.go | 4 +++- internal/config/main_test.go | 6 ++++-- internal/podinjector/main_test.go | 11 ++++++----- main.go | 5 +++++ pkg/autodetect/main_test.go | 3 ++- pkg/collector/container_test.go | 2 +- pkg/collector/parser/receiver.go | 2 +- pkg/collector/parser/receiver_test.go | 1 - pkg/collector/reconcile/configmap.go | 7 +++++-- pkg/collector/reconcile/daemonset.go | 7 +++++-- pkg/collector/reconcile/deployment.go | 7 +++++-- pkg/collector/reconcile/service.go | 7 +++++-- pkg/collector/reconcile/serviceaccount.go | 7 +++++-- pkg/collector/upgrade/noop.go | 1 + pkg/collector/upgrade/upgrade.go | 5 +++-- 18 files changed, 65 insertions(+), 28 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 2e2727070..a935adcf6 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -10,6 +10,13 @@ jobs: go-version: '1.14.4' - uses: actions/checkout@v1 + - name: Lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.29 + args: --enable=gosec,maligned,misspell + only-new-issues: true + - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index a47ce0aad..6ec3a2579 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -27,7 +27,7 @@ import ( var _ = Describe("OpenTelemetryCollector controller", func() { logger := logf.Log.WithName("unit-tests") cfg := config.New() - cfg.FlagSet().Parse([]string{}) + cfg.FlagSet().Parse([]string{}) //nolint errcheck It("should generate the underlying objects on reconciliation", func() { // prepare @@ -35,7 +35,7 @@ var _ = Describe("OpenTelemetryCollector controller", func() { reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, Log: logger, - Scheme: scheme.Scheme, + Scheme: testScheme, Config: cfg, }) created := &v1alpha1.OpenTelemetryCollector{ @@ -221,6 +221,7 @@ var _ = Describe("OpenTelemetryCollector controller", func() { Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") // prepare mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) + Expect(err).ToNot(HaveOccurred()) reconciler := controllers.NewReconciler(controllers.Params{}) // test diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 27275a022..3fe32b3fa 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -20,6 +20,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" @@ -38,6 +39,7 @@ import ( var cfg *rest.Config var k8sClient client.Client var testEnv *envtest.Environment +var testScheme *runtime.Scheme = scheme.Scheme func TestAPIs(t *testing.T) { RegisterFailHandler(Fail) @@ -60,12 +62,12 @@ var _ = BeforeSuite(func(done Done) { Expect(err).ToNot(HaveOccurred()) Expect(cfg).ToNot(BeNil()) - err = v1alpha1.AddToScheme(scheme.Scheme) + err = v1alpha1.AddToScheme(testScheme) Expect(err).NotTo(HaveOccurred()) // +kubebuilder:scaffold:scheme - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) Expect(err).ToNot(HaveOccurred()) Expect(k8sClient).ToNot(BeNil()) diff --git a/internal/config/main.go b/internal/config/main.go index 776c6b03c..634ea85c3 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -106,7 +106,9 @@ func (c *Config) periodicAutoDetect() { ticker := time.NewTicker(c.autoDetectFrequency) for range ticker.C { - c.AutoDetect() + if err := c.AutoDetect(); err != nil { + c.logger.Info("auto-detection failed", "error", err) + } } } diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 2d613a424..47a0fae98 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -60,7 +60,8 @@ var _ = Describe("Config", func() { Expect(cfg.Platform()).To(Equal(platform.Unknown)) // test - cfg.AutoDetect() + err := cfg.AutoDetect() + Expect(err).ToNot(HaveOccurred()) // verify Expect(cfg.Platform()).To(Equal(platform.OpenShift)) @@ -87,7 +88,8 @@ var _ = Describe("Config", func() { Expect(cfg.Platform()).To(Equal(platform.Unknown)) // test - cfg.StartAutoDetect() + err := cfg.StartAutoDetect() + Expect(err).ToNot(HaveOccurred()) // verify wg.Wait() diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index ce383dc1e..08163d928 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -312,8 +312,8 @@ var _ = Describe("PodInjector", func() { err := k8sClient.Create(context.Background(), &tt.ns) Expect(err).ToNot(HaveOccurred()) - for _, otelcol := range tt.otelcols { - err = k8sClient.Create(context.Background(), &otelcol) + for i := range tt.otelcols { + err := k8sClient.Create(context.Background(), &tt.otelcols[i]) Expect(err).ToNot(HaveOccurred()) } @@ -347,8 +347,8 @@ var _ = Describe("PodInjector", func() { Expect(res.Patches).To(HaveLen(0)) // cleanup - for _, otelcol := range tt.otelcols { - Expect(k8sClient.Delete(context.Background(), &otelcol)).ToNot(HaveOccurred()) + for i := range tt.otelcols { + Expect(k8sClient.Delete(context.Background(), &tt.otelcols[i])).ToNot(HaveOccurred()) } Expect(k8sClient.Delete(context.Background(), &tt.ns)).ToNot(HaveOccurred()) }) @@ -393,7 +393,8 @@ var _ = Describe("PodInjector", func() { decoder, err := admission.NewDecoder(scheme.Scheme) Expect(err).ToNot(HaveOccurred()) injector := NewPodSidecarInjector(cfg, logger, k8sClient) - injector.InjectDecoder(decoder) + err = injector.InjectDecoder(decoder) + Expect(err).ToNot(HaveOccurred()) // test res := injector.Handle(context.Background(), tt.req) diff --git a/main.go b/main.go index 81036d111..6ee4c0bde 100644 --- a/main.go +++ b/main.go @@ -74,6 +74,11 @@ func main() { // builds the operator's configuration ad, err := autodetect.New(restConfig) + if err != nil { + setupLog.Error(err, "failed to setup auto-detect routine") + os.Exit(1) + } + cfg := config.New( config.WithLogger(ctrl.Log.WithName("config")), config.WithVersion(v), diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index c051fa8d1..a90fbe1f9 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -24,7 +24,8 @@ var _ = Describe("Autodetect", func() { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusOK) - w.Write(output) + _, err = w.Write(output) + Expect(err).ToNot(HaveOccurred()) })) defer server.Close() diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index d5db42cf7..86ad9e770 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -82,7 +82,7 @@ var _ = Describe("Container", func() { Expect(c.VolumeMounts[1].Name).To(Equal("custom-volume-mount")) }) - It("should allow for env vars to be overriden", func() { + It("should allow for env vars to be overridden", func() { otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Env: []corev1.EnvVar{ diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index 466e1f6bc..cabe9994e 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -103,7 +103,7 @@ func portName(receiverName string, port int32) string { func portFromEndpoint(endpoint string) (int32, error) { i := strings.LastIndex(endpoint, ":") + 1 part := endpoint[i:] - port, err := strconv.Atoi(part) + port, err := strconv.ParseInt(part, 10, 0) return int32(port), err } diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index f0c5b859f..e1497d812 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -88,7 +88,6 @@ var _ = Describe("Receiver", func() { }) type mockParser struct { - portsFunc func() ([]corev1.ServicePort, error) } func (m *mockParser) Ports() ([]corev1.ServicePort, error) { diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 30bfeb7c8..c8093c152 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -72,7 +72,9 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co for _, obj := range expected { desired := obj - controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } existing := &corev1.ConfigMap{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} @@ -142,7 +144,8 @@ func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.Conf return fmt.Errorf("failed to list: %w", err) } - for _, existing := range list.Items { + for i := range list.Items { + existing := list.Items[i] del := true for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index 981e71d1b..e99b995e1 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -53,7 +53,9 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da for _, obj := range expected { desired := obj - controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } existing := &appsv1.DaemonSet{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} @@ -111,7 +113,8 @@ func deleteDaemonSets(ctx context.Context, params Params, expected []appsv1.Daem return fmt.Errorf("failed to list: %w", err) } - for _, existing := range list.Items { + for i := range list.Items { + existing := list.Items[i] del := true for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 767864896..59802267e 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -53,7 +53,9 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D for _, obj := range expected { desired := obj - controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } existing := &appsv1.Deployment{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} @@ -112,7 +114,8 @@ func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Dep return fmt.Errorf("failed to list: %w", err) } - for _, existing := range list.Items { + for i := range list.Items { + existing := list.Items[i] del := true for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 75669dd81..1ad41e44d 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -161,7 +161,9 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv for _, obj := range expected { desired := obj - controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } existing := &corev1.Service{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} @@ -218,7 +220,8 @@ func deleteServices(ctx context.Context, params Params, expected []corev1.Servic return fmt.Errorf("failed to list: %w", err) } - for _, existing := range list.Items { + for i := range list.Items { + existing := list.Items[i] del := true for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 3452c4504..4a2251972 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -54,7 +54,9 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core for _, obj := range expected { desired := obj - controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme) + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } existing := &corev1.ServiceAccount{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} @@ -111,7 +113,8 @@ func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1 return fmt.Errorf("failed to list: %w", err) } - for _, existing := range list.Items { + for i := range list.Items { + existing := list.Items[i] del := true for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index 06588697c..e13fbe2c1 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -6,6 +6,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" ) +//nolint unused func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { return otelcol, nil } diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 019836c12..75d16e81e 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -27,14 +27,15 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi return fmt.Errorf("failed to list: %w", err) } - for _, original := range list.Items { + for i := range list.Items { + original := list.Items[i] upgraded, err := ManagedInstance(ctx, logger, ver, cl, original) if err != nil { // nothing to do at this level, just go to the next instance continue } - if !reflect.DeepEqual(upgraded, original) { + if !reflect.DeepEqual(upgraded, list.Items[i]) { // the resource update overrides the status, so, keep it so that we can reset it later st := upgraded.Status patch := client.MergeFrom(&original) From 53d049341a34c580c078cc0c8d4d8a8ddc7aac98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 14:53:04 +0100 Subject: [PATCH 0095/1234] Add CodeQL check (#106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 2 + .github/workflows/continuous-integration.yaml | 52 ++++++++++++++++--- 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 645d4b8f0..c582c10c7 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -10,6 +10,8 @@ pull_request_rules: - "#approved-reviews-by>=1" - "-draft" - "status-success=unit-tests" + - "status-success=lint" + - "status-success=security" - "status-success=EasyCLA" actions: merge: diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a935adcf6..29d35366f 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -1,14 +1,38 @@ name: "Continuous Integration" -on: [push, pull_request] + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: unit-tests: + name: Unit tests runs-on: ubuntu-20.04 steps: - - uses: actions/setup-go@v1 + + - name: Set up Go 1.14 + uses: actions/setup-go@v2 with: - go-version: '1.14.4' - - uses: actions/checkout@v1 + go-version: 1.14 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: "install kubebuilder" + run: ./hack/install-kubebuilder.sh + + - name: "basic checks" + run: make ci + + lint: + name: Code standards (linting) + runs-on: ubuntu-20.04 + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 - name: Lint uses: golangci/golangci-lint-action@v2 @@ -17,8 +41,20 @@ jobs: args: --enable=gosec,maligned,misspell only-new-issues: true - - name: "install kubebuilder" - run: ./hack/install-kubebuilder.sh + security: + name: Security + runs-on: ubuntu-20.04 + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 - - name: "basic checks" - run: make ci + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: go + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 499299511e25a621f5db97d04c02fd27cdaa2e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 16:34:18 +0100 Subject: [PATCH 0096/1234] Fix check names in mergify config (#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index c582c10c7..abe72f5d3 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -9,9 +9,9 @@ pull_request_rules: conditions: - "#approved-reviews-by>=1" - "-draft" - - "status-success=unit-tests" - - "status-success=lint" - - "status-success=security" + - "status-success=Unit tests" + - "status-success=Code standards (linting)" + - "status-success=Security" - "status-success=EasyCLA" actions: merge: From b64c3ada29ba1df86026c7bcdd42febba2701139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 29 Oct 2020 16:35:12 +0100 Subject: [PATCH 0097/1234] Use latest stable cert-manager (#107) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9a8eb949c..7937e98e2 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ docker-push: docker push ${IMG} cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.3/cert-manager.yaml kubectl wait --for=condition=available deployment cert-manager -n cert-manager kubectl wait --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --for=condition=available deployment cert-manager-webhook -n cert-manager From d866a543da6df163727037a6eb82346441bd3ffc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 08:52:52 +0000 Subject: [PATCH 0098/1234] Bump github.com/go-logr/logr from 0.2.1 to 0.3.0 (#110) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 0.2.1 to 0.3.0.
Release notes

Sourced from github.com/go-logr/logr's releases.

v0.3.0

  • Adds support for NewContext, FromContext, and FromContextOrDiscard
  • Documents the "underlier" pattern for implementations
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-logr/logr&package-manager=go_modules&previous-version=0.2.1&new-version=0.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 76f7c8f12..233cdc9fb 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.13 require ( github.com/Masterminds/semver/v3 v3.1.0 - github.com/go-logr/logr v0.2.1 + github.com/go-logr/logr v0.3.0 github.com/onsi/ginkgo v1.14.2 // keep the Makefile in sync! github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 7ecfda3b4..33f376c44 100644 --- a/go.sum +++ b/go.sum @@ -117,8 +117,8 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.2.1 h1:fV3MLmabKIZ383XifUjFSwcoGee0v9qgPp8wy5svibE= -github.com/go-logr/logr v0.2.1/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= +github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= From c3a14a25cfd05924577faa388e18d3c82f8ca4ad Mon Sep 17 00:00:00 2001 From: Jason Jiang Date: Tue, 3 Nov 2020 21:54:12 +1300 Subject: [PATCH 0099/1234] Add package godoc from CONTRIBUTING.md (#109) This PR is for issue https://github.com/open-telemetry/opentelemetry-operator/issues/104 Add the package descriptions from [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-operator/blob/master/CONTRIBUTING.md) to the per-package godoc. Some packages do not contain any Go files, so they are not modified in this PR. --- CONTRIBUTING.md | 39 +------------------ api/v1alpha1/groupversion_info.go | 2 +- config/README.md | 19 +++++++++ .../opentelemetrycollector_controller.go | 1 + internal/config/main.go | 1 + internal/podinjector/main.go | 1 + internal/version/main.go | 1 + pkg/autodetect/main.go | 1 + pkg/collector/adapters/config_from.go | 1 + pkg/collector/parser/receiver.go | 1 + pkg/collector/reconcile/opentelemetry.go | 1 + pkg/collector/upgrade/upgrade.go | 1 + pkg/collector/volume.go | 1 + pkg/naming/main.go | 1 + pkg/platform/main.go | 1 + pkg/sidecar/pod.go | 1 + 16 files changed, 34 insertions(+), 39 deletions(-) create mode 100644 config/README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed36e5f05..fb986ac13 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,44 +71,7 @@ Tests can also be run without an existing cluster. For that, install [`kubebuild ## Project Structure -Here's a general overview of the directories from this operator and what to expect in each one of them: - -``` -. -├── api # the CRDs that are handled by this operator -│   └── v1alpha1 # the (currently) only CRD version we have -├── build # where the binaries are placed after `make manager` -├── config # the Kustomize resources that are used to assemble the operator's deployment units -│   ├── certmanager # Kustomize options dealing with cert-manager -│   ├── crd # Kustomize options for our CRDs -│   │   ├── bases # auto generated based on the code annotations (`make manifests`) -│   │   └── patches # patches to apply to the generated CRD -│   ├── default # Kustomize's "entry point", generating the distribution YAML file -│   ├── manager # the operator's Deployment -│   ├── manifests # the resulting CSV -│   │   └── bases -│   ├── prometheus # ServiceMonitor that exposes our operator's metrics -│   ├── rbac # RBAC rules -│   ├── samples # Set of examples of how to accomplish specific scenarios. Those are bundled in the final CSV -│   └── webhook # Webhook configuration and service -├── controllers # our main controller, where the reconciliation starts -├── hack # utility scripts -├── internal # code shared with our internal packages -│   ├── config # our operator's runtime configuration -│   ├── podinjector # the webhook that injects sidecars into pods -│   └── version # our version, as well as versions of underlying components -├── local # local resources that shouldn't be added to the version control, like CRs used for dev/testing -└── pkg # packages that are exporter and are part of the public API for this module - ├── autodetect # auto detect traits from the environment (platform, APIs, ...) - ├── collector # code that handles OpenTelemetry Collector - │   ├── adapters # data conversion - │   ├── parser # parses the OpenTelemetry Collector configuration - │   ├── reconcile # reconciliation logic for OpenTelemetry Collector components - │   └── upgrade # handles the upgrade routine from one OpenTelemetry Collector to the next - ├── naming # determines the names for components (containers, services, ...) - ├── platform # target platforms this operator might run - └── sidecar # operations related to sidecar manipulation (add, update, remove) -``` +For a general overview of the directories from this operator and what to expect in each one of them, please check out the [official GoDoc](https://godoc.org/github.com/open-telemetry/opentelemetry-operator) or the [locally-hosted GoDoc](http://localhost:6060/pkg/github.com/open-telemetry/opentelemetry-operator/) ## Contributing diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index a04f53bb5..52ce63bf5 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group. // +kubebuilder:object:generate=true // +groupName=opentelemetry.io package v1alpha1 diff --git a/config/README.md b/config/README.md new file mode 100644 index 000000000..03218f233 --- /dev/null +++ b/config/README.md @@ -0,0 +1,19 @@ +## Structure + +The `config` folder contains the Kustomize resources that are used to assemble the operator's deployment units + +``` +. +├── certmanager # Kustomize options dealing with cert-manager +├── crd # Kustomize options for our CRDs +│   ├── bases # auto generated based on the code annotations (`make manifests`) +│   └── patches # patches to apply to the generated CRD +├── default # Kustomize's "entry point", generating the distribution YAML file +├── manager # the operator's Deployment +├── manifests # the resulting CSV +│   └── bases +├── prometheus # ServiceMonitor that exposes our operator's metrics +├── rbac # RBAC rules +├── samples # Set of examples of how to accomplish specific scenarios. Those are bundled in the final CSV +└── webhook # Webhook configuration and service +``` diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index f4f3cf3d7..439f2dbe9 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package controllers contains the main controller, where the reconciliation starts. package controllers import ( diff --git a/internal/config/main.go b/internal/config/main.go index 634ea85c3..74fb5a4c8 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package config contains the operator's runtime configuration. package config import ( diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index edfee05a8..c097aa00c 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package podinjector contains the webhook that injects sidecars into pods. package podinjector import ( diff --git a/internal/version/main.go b/internal/version/main.go index 7036e7d52..e10a8c2c6 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -1,3 +1,4 @@ +// Package version contains the operator's version, as well as versions of underlying components. package version import ( diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go index 64eaabe8d..487d5b4a2 100644 --- a/pkg/autodetect/main.go +++ b/pkg/autodetect/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...). package autodetect import ( diff --git a/pkg/collector/adapters/config_from.go b/pkg/collector/adapters/config_from.go index 5fa8cc2a0..79d83f633 100644 --- a/pkg/collector/adapters/config_from.go +++ b/pkg/collector/adapters/config_from.go @@ -1,3 +1,4 @@ +// Package adapters is for data conversion. package adapters import ( diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index cabe9994e..ffdf3f1fc 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -1,3 +1,4 @@ +// Package parser is for parsing the OpenTelemetry Collector configuration. package parser import ( diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index f4e22a79a..163500dbc 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -1,3 +1,4 @@ +// Package reconcile contains reconciliation logic for OpenTelemetry Collector components. package reconcile import ( diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 75d16e81e..f4c78aa8c 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -1,3 +1,4 @@ +// Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next. package upgrade import ( diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index d21895713..b77cd8359 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package collector handles the OpenTelemetry Collector. package collector import ( diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 8e9f1039b..4fe1505eb 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -1,3 +1,4 @@ +// Package naming is for determining the names for components (containers, services, ...). package naming import ( diff --git a/pkg/platform/main.go b/pkg/platform/main.go index c81209ff2..9c4733798 100644 --- a/pkg/platform/main.go +++ b/pkg/platform/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package platform contains target platforms this operator might run on. package platform // Platform holds the auto-detected platform type diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 86c1138d5..ea4dc05ae 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package sidecar contains operations related to sidecar manipulation (add, update, remove). package sidecar import ( From 70787de27e786841e100602a3e589ae03cd45e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 9 Nov 2020 16:32:01 +0100 Subject: [PATCH 0100/1234] Bumped OpenTelemetry Collector to v0.14.0 (#112) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 6 ++++++ versions.txt | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 669b38987..248705614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changes by Version ================== +0.14.0 (2020-11-09) +------------------- +* Bumped OpenTelemetry Collector to v0.14.0 ([#112](https://github.com/open-telemetry/opentelemetry-operator/pull/112), [@jpkrohling](https://github.com/jpkrohling)) + +_Note: The `tailsampling` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.14.0, which includes this processor), or remove the processor._ + 0.13.0 (2020-10-22) ------------------- diff --git a/versions.txt b/versions.txt index 2add194b3..44820f103 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.13.0 +opentelemetry-collector=0.14.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.13.0 +operator=0.14.0 From ff9afe02977fdf2180e2f3c6f89a76df442f27b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 09:47:17 +0000 Subject: [PATCH 0101/1234] Bump k8s.io/kubectl from 0.19.3 to 0.19.4 (#121) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.19.3 to 0.19.4.
Commits
  • 6c38053 Update dependencies to v0.19.4 tag
  • 0a68e0d Merge pull request #95710 from amandahla/automated-cherry-pick-of-#95260-upst...
  • 578e544 Merge pull request #95591 from soltysh/automated-cherry-pick-of-#94985-upstre...
  • 8ed3722 Fixes high CPU usage in kubectl drain
  • 56d8905 Fix kubectl describe ingress format
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/kubectl&package-manager=go_modules&previous-version=0.19.3&new-version=0.19.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 8 ++++---- go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 233cdc9fb..bb75781c4 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,10 @@ require ( github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 gopkg.in/yaml.v2 v2.3.0 - k8s.io/api v0.19.3 - k8s.io/apimachinery v0.19.3 - k8s.io/client-go v0.19.3 - k8s.io/kubectl v0.19.3 + k8s.io/api v0.19.4 + k8s.io/apimachinery v0.19.4 + k8s.io/client-go v0.19.4 + k8s.io/kubectl v0.19.4 sigs.k8s.io/controller-runtime v0.6.3 ) diff --git a/go.sum b/go.sum index 33f376c44..9464175d3 100644 --- a/go.sum +++ b/go.sum @@ -620,22 +620,22 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.3 h1:GN6ntFnv44Vptj/b+OnMW7FmzkpDoIDLZRvKX3XH9aU= -k8s.io/api v0.19.3/go.mod h1:VF+5FT1B74Pw3KxMdKyinLo+zynBaMBiAfGMuldcNDs= +k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= +k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.3 h1:bpIQXlKjB4cB/oNpnNnV+BybGPR7iP5oYpsOTEJ4hgc= -k8s.io/apimachinery v0.19.3/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= +k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/cli-runtime v0.19.3/go.mod h1:q+l845i5/uWzcUpCrl+L4f3XLaJi8ZeLVQ/decwty0A= +k8s.io/cli-runtime v0.19.4/go.mod h1:m8G32dVbKOeaX1foGhleLEvNd6REvU7YnZyWn5//9rw= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.3 h1:ctqR1nQ52NUs6LpI0w+a5U+xjYwflFwA13OJKcicMxg= -k8s.io/client-go v0.19.3/go.mod h1:+eEMktZM+MG0KO+PTkci8xnbCZHvj9TqR6Q1XDUIJOM= +k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= +k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.19.3/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.3/go.mod h1:WhLWSIefQn8W8jxSLl5WNiR6z8oyMe/8Zywg7alOkRc= +k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -650,9 +650,9 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kubectl v0.19.3 h1:T8IHHpg+uRIfn34wqJ8wHG5bbH+VV5FNPtJ+jKcho1U= -k8s.io/kubectl v0.19.3/go.mod h1:t5cscfrAuHUvEGNyNJjPKt+rGlaJzk8jrKYHXxEsANE= -k8s.io/metrics v0.19.3/go.mod h1:Eap/Lk1FiAIjkaArFuv41v+ph6dbDpVGwAg7jMI+4vg= +k8s.io/kubectl v0.19.4 h1:XFrHibf5fS4Ot8h3EnzdVsKrYj+pndlzKbwPkfra5hI= +k8s.io/kubectl v0.19.4/go.mod h1:XPmlu4DJEYgD83pvZFeKF8+MSvGnYGqunbFSrJsqHv0= +k8s.io/metrics v0.19.4/go.mod h1:a0gvAzrxQPw2ouBqnXI7X9qlggpPkKAFgWU/Py+KZiU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= From 0e20605e48cd5bb775baeab4a7c304f83665d8d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 16 Nov 2020 12:01:55 +0100 Subject: [PATCH 0102/1234] Convert tests to plain go tests (#122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 23 +- .../opentelemetrycollector_controller_test.go | 383 +++++----- controllers/suite_test.go | 63 +- go.mod | 3 +- go.sum | 6 + internal/config/config_suite_test.go | 13 - internal/config/main_test.go | 166 +++-- internal/podinjector/main_test.go | 662 +++++++++--------- .../podinjector/podinjector_suite_test.go | 77 +- internal/version/main_test.go | 31 +- internal/version/version_suite_test.go | 13 - pkg/autodetect/autodetect_suite_test.go | 13 - pkg/autodetect/main_test.go | 91 +-- pkg/collector/adapters/adapters_suite_test.go | 13 - pkg/collector/adapters/config_from_test.go | 35 +- .../adapters/config_to_ports_test.go | 212 +++--- pkg/collector/collector_suite_test.go | 13 - pkg/collector/container_test.go | 197 +++--- pkg/collector/daemonset_test.go | 64 +- pkg/collector/deployment_test.go | 64 +- pkg/collector/labels_test.go | 74 +- pkg/collector/parser/parser_suite_test.go | 13 - pkg/collector/parser/receiver_generic_test.go | 133 ++-- pkg/collector/parser/receiver_jaeger_test.go | 172 +++-- pkg/collector/parser/receiver_test.go | 156 +++-- pkg/collector/serviceaccount_test.go | 86 +-- pkg/collector/upgrade/suite_test.go | 54 ++ pkg/collector/upgrade/upgrade_suite_test.go | 57 -- pkg/collector/upgrade/upgrade_test.go | 212 +++--- pkg/collector/upgrade/v0_9_0_test.go | 70 +- pkg/collector/volume_test.go | 78 +-- pkg/sidecar/annotation_test.go | 65 +- pkg/sidecar/pod_test.go | 207 +++--- pkg/sidecar/sidecar_suite_test.go | 27 - 34 files changed, 1731 insertions(+), 1815 deletions(-) delete mode 100644 internal/config/config_suite_test.go delete mode 100644 internal/version/version_suite_test.go delete mode 100644 pkg/autodetect/autodetect_suite_test.go delete mode 100644 pkg/collector/adapters/adapters_suite_test.go delete mode 100644 pkg/collector/collector_suite_test.go delete mode 100644 pkg/collector/parser/parser_suite_test.go create mode 100644 pkg/collector/upgrade/suite_test.go delete mode 100644 pkg/collector/upgrade/upgrade_suite_test.go delete mode 100644 pkg/sidecar/sidecar_suite_test.go diff --git a/Makefile b/Makefile index 7937e98e2..dc276f9ba 100644 --- a/Makefile +++ b/Makefile @@ -34,19 +34,19 @@ endif # by default, do not run the manager with webhooks enabled. This only affects local runs, not the build or in-cluster deployments. ENABLE_WEBHOOKS ?= false -# If we are running in CI, run ginkgo with the recommended CI settings +# If we are running in CI, run go test in verbose mode ifeq (,$(CI)) -GINKGO_OPTS=-r +GOTEST_OPTS=-race else -GINKGO_OPTS=-r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress --compilers=2 -v +GOTEST_OPTS=-race -v endif all: manager ci: test # Run tests -test: ginkgo generate fmt vet manifests - $(GINKGO) $(GINKGO_OPTS) +test: generate fmt vet manifests + go test ${GOTEST_OPTS} ./... # Build manager binary manager: generate fmt vet @@ -125,19 +125,6 @@ else CONTROLLER_GEN=$(shell which controller-gen) endif -# find or download ginkgo -# download ginkgo if necessary -ginkgo: -ifeq (, $(shell which ginkgo)) - @{ \ - set -e ;\ - go get github.com/onsi/ginkgo/ginkgo@v1.14.2 ;\ - } -GINKGO=$(GOBIN)/ginkgo -else -GINKGO=$(shell which ginkgo) -endif - kustomize: ifeq (, $(shell which kustomize)) @{ \ diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 6ec3a2579..6a8990bb8 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -4,9 +4,10 @@ import ( "context" "errors" "fmt" + "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -24,210 +25,212 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) -var _ = Describe("OpenTelemetryCollector controller", func() { - logger := logf.Log.WithName("unit-tests") +var logger = logf.Log.WithName("unit-tests") + +func TestNewObjectsOnReconciliation(t *testing.T) { + // prepare cfg := config.New() - cfg.FlagSet().Parse([]string{}) //nolint errcheck - - It("should generate the underlying objects on reconciliation", func() { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Config: cfg, - }) - created := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeDeployment, - }, - } - err := k8sClient.Create(context.Background(), created) - Expect(err).ToNot(HaveOccurred()) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(req) - - // verify - Expect(err).ToNot(HaveOccurred()) - - // the base query for the underlying objects - opts := []client.ListOption{ - client.InNamespace(nsn.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - - // verify that we have at least one object for each of the types we create - // whether we have the right ones is up to the specific tests for each type - { - list := &corev1.ConfigMapList{} - err = k8sClient.List(context.Background(), list, opts...) - Expect(err).ToNot(HaveOccurred()) - Expect(list.Items).ToNot(BeEmpty()) - } - { - list := &corev1.ServiceAccountList{} - err = k8sClient.List(context.Background(), list, opts...) - Expect(err).ToNot(HaveOccurred()) - Expect(list.Items).ToNot(BeEmpty()) - } - { - list := &corev1.ServiceList{} - err = k8sClient.List(context.Background(), list, opts...) - Expect(err).ToNot(HaveOccurred()) - Expect(list.Items).ToNot(BeEmpty()) - } - { - list := &appsv1.DeploymentList{} - err = k8sClient.List(context.Background(), list, opts...) - Expect(err).ToNot(HaveOccurred()) - Expect(list.Items).ToNot(BeEmpty()) - } - { - list := &appsv1.DaemonSetList{} - err = k8sClient.List(context.Background(), list, opts...) - Expect(err).ToNot(HaveOccurred()) - // attention! we expect daemonsets to be empty in the default configuration - Expect(list.Items).To(BeEmpty()) - } - - // cleanup - Expect(k8sClient.Delete(context.Background(), created)).ToNot(HaveOccurred()) + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Config: cfg, }) - - It("should continue when a task's failure can be recovered", func() { - // prepare - taskCalled := false - reconciler := controllers.NewReconciler(controllers.Params{ - Log: logger, - Tasks: []controllers.Task{ - { - Name: "should-fail", - Do: func(context.Context, reconcile.Params) error { - return errors.New("should fail!") - }, - BailOnError: false, + created := &v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDeployment, + }, + } + err := k8sClient.Create(context.Background(), created) + require.NoError(t, err) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(req) + + // verify + require.NoError(t, err) + + // the base query for the underlying objects + opts := []client.ListOption{ + client.InNamespace(nsn.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + // verify that we have at least one object for each of the types we create + // whether we have the right ones is up to the specific tests for each type + { + list := &corev1.ConfigMapList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceAccountList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &appsv1.DeploymentList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &appsv1.DaemonSetList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + // attention! we expect daemonsets to be empty in the default configuration + assert.Empty(t, list.Items) + } + + // cleanup + require.NoError(t, k8sClient.Delete(context.Background(), created)) + +} + +func TestContinueOnRecoverableFailure(t *testing.T) { + // prepare + taskCalled := false + reconciler := controllers.NewReconciler(controllers.Params{ + Log: logger, + Tasks: []controllers.Task{ + { + Name: "should-fail", + Do: func(context.Context, reconcile.Params) error { + return errors.New("should fail!") }, - { - Name: "should-be-called", - Do: func(context.Context, reconcile.Params) error { - taskCalled = true - return nil - }, + BailOnError: false, + }, + { + Name: "should-be-called", + Do: func(context.Context, reconcile.Params) error { + taskCalled = true + return nil }, }, - }) + }, + }) - // test - err := reconciler.RunTasks(context.Background(), reconcile.Params{}) + // test + err := reconciler.RunTasks(context.Background(), reconcile.Params{}) - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(taskCalled).To(BeTrue()) - }) + // verify + assert.NoError(t, err) + assert.True(t, taskCalled) +} - It("should not continue when a task's failure can't be recovered", func() { - // prepare - taskCalled := false - expectedErr := errors.New("should fail!") - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: scheme.Scheme, - Config: cfg, - Tasks: []controllers.Task{ - { - Name: "should-fail", - Do: func(context.Context, reconcile.Params) error { - taskCalled = true - return expectedErr - }, - BailOnError: true, - }, - { - Name: "should-not-be-called", - Do: func(context.Context, reconcile.Params) error { - Fail("should not have been called") - return nil - }, +func TestBreakOnUnrecoverableError(t *testing.T) { + // prepare + cfg := config.New() + taskCalled := false + expectedErr := errors.New("should fail!") + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + Tasks: []controllers.Task{ + { + Name: "should-fail", + Do: func(context.Context, reconcile.Params) error { + taskCalled = true + return expectedErr }, + BailOnError: true, }, - }) - created := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, + { + Name: "should-not-be-called", + Do: func(context.Context, reconcile.Params) error { + assert.Fail(t, "should not have been called") + return nil + }, }, - } - err := k8sClient.Create(context.Background(), created) - Expect(err).ToNot(HaveOccurred()) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(req) - - // verify - Expect(err).To(MatchError(expectedErr)) - Expect(taskCalled).To(BeTrue()) - - // cleanup - Expect(k8sClient.Delete(context.Background(), created)).ToNot(HaveOccurred()) + }, }) - - It("should skip when the instance doesn't exist", func() { - // prepare - nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: scheme.Scheme, - Config: cfg, - Tasks: []controllers.Task{ - { - Name: "should-not-be-called", - Do: func(context.Context, reconcile.Params) error { - Fail("should not have been called") - return nil - }, + created := &v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + } + err := k8sClient.Create(context.Background(), created) + require.NoError(t, err) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(req) + + // verify + assert.Equal(t, expectedErr, err) + assert.True(t, taskCalled) + + // cleanup + assert.NoError(t, k8sClient.Delete(context.Background(), created)) +} + +func TestSkipWhenInstanceDoesNotExist(t *testing.T) { + // prepare + cfg := config.New() + nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + Tasks: []controllers.Task{ + { + Name: "should-not-be-called", + Do: func(context.Context, reconcile.Params) error { + assert.Fail(t, "should not have been called") + return nil }, }, - }) + }, + }) - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err := reconciler.Reconcile(req) + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err := reconciler.Reconcile(req) - // verify - Expect(err).ToNot(HaveOccurred()) - }) + // verify + assert.NoError(t, err) +} - It("should be able to register with the manager", func() { - Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") - // prepare - mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) - Expect(err).ToNot(HaveOccurred()) - reconciler := controllers.NewReconciler(controllers.Params{}) +func TestRegisterWithManager(t *testing.T) { + t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") - // test - err = reconciler.SetupWithManager(mgr) + // prepare + mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) + require.NoError(t, err) - // verify - Expect(err).ToNot(HaveOccurred()) - }) -}) + reconciler := controllers.NewReconciler(controllers.Params{}) + + // test + err = reconciler.SetupWithManager(mgr) + + // verify + assert.NoError(t, err) +} diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 3fe32b3fa..7b3cfdcef 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -15,67 +15,54 @@ package controllers_test import ( + "fmt" + "os" "path/filepath" "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" // +kubebuilder:scaffold:imports ) -// These tests use Ginkgo (BDD-style Go testing framework). Refer to -// http://onsi.github.io/ginkgo/ to learn more about Ginkgo. - -var cfg *rest.Config var k8sClient client.Client var testEnv *envtest.Environment var testScheme *runtime.Scheme = scheme.Scheme -func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) - - RunSpecsWithDefaultAndCustomReporters(t, - "Controller Suite", - []Reporter{printer.NewlineReporter{}}) -} - -var _ = BeforeSuite(func(done Done) { - logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) - - By("bootstrapping test environment") +func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, } - var err error - cfg, err = testEnv.Start() - Expect(err).ToNot(HaveOccurred()) - Expect(cfg).ToNot(BeNil()) - - err = v1alpha1.AddToScheme(testScheme) - Expect(err).NotTo(HaveOccurred()) + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } // +kubebuilder:scaffold:scheme k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - Expect(err).ToNot(HaveOccurred()) - Expect(k8sClient).ToNot(BeNil()) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } - close(done) -}, 60) + code := m.Run() -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).ToNot(HaveOccurred()) -}) + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} diff --git a/go.mod b/go.mod index bb75781c4..236e21c26 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,8 @@ go 1.13 require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.3.0 - github.com/onsi/ginkgo v1.14.2 // keep the Makefile in sync! - github.com/onsi/gomega v1.10.3 github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.4.0 gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 diff --git a/go.sum b/go.sum index 9464175d3..7d9db96c3 100644 --- a/go.sum +++ b/go.sum @@ -105,6 +105,7 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 h1:AfLWrOEtyI9WI9aaDF0GN/6FQu+rNvl2YUeizB6FYuk= github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:AlRx4sdoz6EdWGYPMeunQWYf46cKnq7J4iVvLgyb5cY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -297,12 +298,14 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= @@ -459,6 +462,7 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -503,6 +507,7 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -612,6 +617,7 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/config/config_suite_test.go b/internal/config/config_suite_test.go deleted file mode 100644 index c7d2e82ab..000000000 --- a/internal/config/config_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package config_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestConfig(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Config Suite") -} diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 47a0fae98..8159b2280 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -2,10 +2,11 @@ package config_test import ( "sync" + "testing" "time" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -13,88 +14,85 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) -var _ = Describe("Config", func() { - - It("should build new configuration with given options", func() { - // prepare - cfg := config.New( - config.WithCollectorImage("some-image"), - config.WithCollectorConfigMapEntry("some-config.yaml"), - config.WithPlatform(platform.Kubernetes), - ) - - // test - Expect(cfg.CollectorImage()).To(Equal("some-image")) - Expect(cfg.CollectorConfigMapEntry()).To(Equal("some-config.yaml")) - Expect(cfg.Platform()).To(Equal(platform.Kubernetes)) - }) - - It("should use the version as part of the default image", func() { - // prepare - v := version.Version{ - OpenTelemetryCollector: "the-version", - } - cfg := config.New(config.WithVersion(v)) - - // test - Expect(cfg.CollectorImage()).To(ContainSubstring("the-version")) - }) - - It("should callback when configuration changes happen", func() { - // prepare - calledBack := false - mock := &mockAutoDetect{ - PlatformFunc: func() (platform.Platform, error) { - return platform.OpenShift, nil - }, - } - cfg := config.New( - config.WithAutoDetect(mock), - config.WithOnChange(func() error { - calledBack = true - return nil - }), - ) - - // sanity check - Expect(cfg.Platform()).To(Equal(platform.Unknown)) - - // test - err := cfg.AutoDetect() - Expect(err).ToNot(HaveOccurred()) - - // verify - Expect(cfg.Platform()).To(Equal(platform.OpenShift)) - Expect(calledBack).To(BeTrue()) - }) - - It("should run the auto-detect routine in the background", func() { - // prepare - wg := &sync.WaitGroup{} - wg.Add(2) - mock := &mockAutoDetect{ - PlatformFunc: func() (platform.Platform, error) { - wg.Done() - // returning Unknown will cause the auto-detection to keep trying to detect the platform - return platform.Unknown, nil - }, - } - cfg := config.New( - config.WithAutoDetect(mock), - config.WithAutoDetectFrequency(100*time.Millisecond), - ) - - // sanity check - Expect(cfg.Platform()).To(Equal(platform.Unknown)) - - // test - err := cfg.StartAutoDetect() - Expect(err).ToNot(HaveOccurred()) - - // verify - wg.Wait() - }) -}) +func TestNewConfig(t *testing.T) { + // prepare + cfg := config.New( + config.WithCollectorImage("some-image"), + config.WithCollectorConfigMapEntry("some-config.yaml"), + config.WithPlatform(platform.Kubernetes), + ) + + // test + assert.Equal(t, "some-image", cfg.CollectorImage()) + assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) + assert.Equal(t, platform.Kubernetes, cfg.Platform()) +} + +func TestOverrideVersion(t *testing.T) { + // prepare + v := version.Version{ + OpenTelemetryCollector: "the-version", + } + cfg := config.New(config.WithVersion(v)) + + // test + assert.Contains(t, cfg.CollectorImage(), "the-version") +} + +func TestCallbackOnChanges(t *testing.T) { + // prepare + calledBack := false + mock := &mockAutoDetect{ + PlatformFunc: func() (platform.Platform, error) { + return platform.OpenShift, nil + }, + } + cfg := config.New( + config.WithAutoDetect(mock), + config.WithOnChange(func() error { + calledBack = true + return nil + }), + ) + + // sanity check + require.Equal(t, platform.Unknown, cfg.Platform()) + + // test + err := cfg.AutoDetect() + require.NoError(t, err) + + // verify + assert.Equal(t, platform.OpenShift, cfg.Platform()) + assert.True(t, calledBack) +} + +func TestAutoDetectInBackground(t *testing.T) { + // prepare + wg := &sync.WaitGroup{} + wg.Add(2) + mock := &mockAutoDetect{ + PlatformFunc: func() (platform.Platform, error) { + wg.Done() + // returning Unknown will cause the auto-detection to keep trying to detect the platform + return platform.Unknown, nil + }, + } + cfg := config.New( + config.WithAutoDetect(mock), + config.WithAutoDetectFrequency(100*time.Millisecond), + ) + + // sanity check + require.Equal(t, platform.Unknown, cfg.Platform()) + + // test + err := cfg.StartAutoDetect() + require.NoError(t, err) + + // verify + wg.Wait() +} var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 08163d928..836113e5a 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -4,9 +4,10 @@ import ( "context" "encoding/json" "net/http" + "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "k8s.io/api/admission/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -22,388 +23,389 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) -var _ = Describe("PodInjector", func() { - logger := logf.Log.WithName("unit-tests") +var logger = logf.Log.WithName("unit-tests") - It("should inject an appropriate sidecar", func() { - for _, tt := range []struct { - name string - ns corev1.Namespace - pod corev1.Pod - otelcol v1alpha1.OpenTelemetryCollector - }{ - { - // this is the simplest positive test: a pod is being created with an annotation - // telling the operator to inject an instance, and the annotation's value contains - // the name of an existing otelcol instance with Mode=Sidecar - name: "simplest positive case", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-simplest-positive-case", - }, +func TestShouldInjectSidecar(t *testing.T) { + for _, tt := range []struct { + name string + ns corev1.Namespace + pod corev1.Pod + otelcol v1alpha1.OpenTelemetryCollector + }{ + { + // this is the simplest positive test: a pod is being created with an annotation + // telling the operator to inject an instance, and the annotation's value contains + // the name of an existing otelcol instance with Mode=Sidecar + name: "simplest positive case", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-simplest-positive-case", }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, - otelcol: v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-simplest-positive-case", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, + }, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-simplest-positive-case", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, }, }, - { - // in this case, the annotation is at the namespace instead of at the pod - name: "namespace is annotated", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-annotated-namespace", - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, + }, + { + // in this case, the annotation is at the namespace instead of at the pod + name: "namespace is annotated", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-annotated-namespace", + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, - pod: corev1.Pod{}, - otelcol: v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-annotated-namespace", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, + }, + pod: corev1.Pod{}, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-annotated-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, }, }, - { - // now, we automatically select an existing otelcol - name: "auto-select basde on the annotation's value", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-with-autoselect", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, + }, + { + // now, we automatically select an existing otelcol + name: "auto-select based on the annotation's value", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-with-autoselect", + Annotations: map[string]string{sidecar.Annotation: "true"}, }, - pod: corev1.Pod{}, - otelcol: v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-with-autoselect", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, + }, + pod: corev1.Pod{}, + otelcol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-with-autoselect", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, }, }, - } { - When(tt.name, func() { - err := k8sClient.Create(context.Background(), &tt.ns) - Expect(err).ToNot(HaveOccurred()) + }, + } { + t.Run(tt.name, func(t *testing.T) { + err := k8sClient.Create(context.Background(), &tt.ns) + require.NoError(t, err) - err = k8sClient.Create(context.Background(), &tt.otelcol) - Expect(err).ToNot(HaveOccurred()) + err = k8sClient.Create(context.Background(), &tt.otelcol) + require.NoError(t, err) - encoded, err := json.Marshal(tt.pod) - Expect(err).ToNot(HaveOccurred()) + encoded, err := json.Marshal(tt.pod) + require.NoError(t, err) - // the actual request we see in the webhook - req := admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ - Namespace: tt.ns.Name, - Object: runtime.RawExtension{ - Raw: encoded, - }, + // the actual request we see in the webhook + req := admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: tt.ns.Name, + Object: runtime.RawExtension{ + Raw: encoded, }, - } + }, + } - // the webhook handler - cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - Expect(err).ToNot(HaveOccurred()) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) - err = injector.InjectDecoder(decoder) - Expect(err).ToNot(HaveOccurred()) + // the webhook handler + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + require.NoError(t, err) - // test - res := injector.Handle(context.Background(), req) + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + err = injector.InjectDecoder(decoder) + require.NoError(t, err) - // verify - Expect(res.Allowed).To(BeTrue()) - Expect(res.AdmissionResponse.Result).To(BeNil()) - Expect(res.Patches).To(HaveLen(3)) + // test + res := injector.Handle(context.Background(), req) - expectedMap := map[string]bool{ - "/metadata/labels": false, - "/spec/volumes": false, - "/spec/containers": false, - } - for _, patch := range res.Patches { - Expect(patch.Operation).To(Equal("add")) - expectedMap[patch.Path] = true - } - for k := range expectedMap { - Expect(expectedMap[k]).To(BeTrue(), "patch with path %s not found", k) - } + // verify + assert.True(t, res.Allowed) + assert.Nil(t, res.AdmissionResponse.Result) + assert.Len(t, res.Patches, 3) - // cleanup - Expect(k8sClient.Delete(context.Background(), &tt.otelcol)).ToNot(HaveOccurred()) - Expect(k8sClient.Delete(context.Background(), &tt.ns)).ToNot(HaveOccurred()) - }) - } - }) + expectedMap := map[string]bool{ + "/metadata/labels": false, + "/spec/volumes": false, + "/spec/containers": false, + } + for _, patch := range res.Patches { + assert.Equal(t, "add", patch.Operation) + expectedMap[patch.Path] = true + } + for k := range expectedMap { + assert.True(t, expectedMap[k], "patch with path %s not found", k) + } - It("pod should not be changed", func() { - for _, tt := range []struct { - name string - ns corev1.Namespace - pod corev1.Pod - otelcols []v1alpha1.OpenTelemetryCollector - }{ - { - name: "namespace has no annotations", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-annotations", - }, + // cleanup + require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcol)) + require.NoError(t, k8sClient.Delete(context.Background(), &tt.ns)) + }) + } +} + +func TestPodShouldNotBeChanged(t *testing.T) { + for _, tt := range []struct { + name string + ns corev1.Namespace + pod corev1.Pod + otelcols []v1alpha1.OpenTelemetryCollector + }{ + { + name: "namespace has no annotations", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-annotations", + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-annotations", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + }}, + }, + { + name: "multiple possible otelcols", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-multiple-otelcols", + Annotations: map[string]string{sidecar.Annotation: "true"}, + }, + }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{ + { ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-annotations", + Name: "my-instance-1", + Namespace: "my-namespace-multiple-otelcols", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Mode: v1alpha1.ModeSidecar, }, - }}, - }, - { - name: "multiple possible otelcols", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-multiple-otelcols", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-1", - Namespace: "my-namespace-multiple-otelcols", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-2", + Namespace: "my-namespace-multiple-otelcols", }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-2", - Namespace: "my-namespace-multiple-otelcols", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, }, }, }, - { - name: "no otelcols", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-otelcols", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, + }, + { + name: "no otelcols", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-otelcols", + Annotations: map[string]string{sidecar.Annotation: "true"}, }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{}, }, - { - name: "otelcol is not a sidecar", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-sidecar-otelcol", - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{}, + }, + { + name: "otelcol is not a sidecar", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-sidecar-otelcol", + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-sidecar-otelcol", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeDaemonSet, - }, - }}, }, - { - name: "automatically injected otelcol is not a sidecar", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-automatic-sidecar-otelcol", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-sidecar-otelcol", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDaemonSet, + }, + }}, + }, + { + name: "automatically injected otelcol is not a sidecar", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-no-automatic-sidecar-otelcol", + Annotations: map[string]string{sidecar.Annotation: "true"}, }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-automatic-sidecar-otelcol", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeDaemonSet, - }, - }}, }, - { - name: "pod has sidecar already", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-pod-has-sidecar", - }, + pod: corev1.Pod{}, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-no-automatic-sidecar-otelcol", }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: naming.Container(), - }}, - }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDaemonSet, + }, + }}, + }, + { + name: "pod has sidecar already", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-pod-has-sidecar", }, - otelcols: []v1alpha1.OpenTelemetryCollector{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-pod-has-sidecar", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, }, - { - name: "sidecar not desired", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-sidecar-not-desired", - }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "false"}, - }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: naming.Container(), + }}, + }, + }, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-pod-has-sidecar", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }}, + }, + { + name: "sidecar not desired", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-namespace-sidecar-not-desired", }, - otelcols: []v1alpha1.OpenTelemetryCollector{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-sidecar-not-desired", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, }, - } { - When(tt.name, func() { - err := k8sClient.Create(context.Background(), &tt.ns) - Expect(err).ToNot(HaveOccurred()) + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{sidecar.Annotation: "false"}, + }, + }, + otelcols: []v1alpha1.OpenTelemetryCollector{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-sidecar-not-desired", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, + }}, + }, + } { + t.Run(tt.name, func(t *testing.T) { + err := k8sClient.Create(context.Background(), &tt.ns) + require.NoError(t, err) - for i := range tt.otelcols { - err := k8sClient.Create(context.Background(), &tt.otelcols[i]) - Expect(err).ToNot(HaveOccurred()) - } + for i := range tt.otelcols { + err := k8sClient.Create(context.Background(), &tt.otelcols[i]) + require.NoError(t, err) + } - encoded, err := json.Marshal(tt.pod) - Expect(err).ToNot(HaveOccurred()) + encoded, err := json.Marshal(tt.pod) + require.NoError(t, err) - // the actual request we see in the webhook - req := admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ - Namespace: tt.ns.Name, - Object: runtime.RawExtension{ - Raw: encoded, - }, + // the actual request we see in the webhook + req := admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: tt.ns.Name, + Object: runtime.RawExtension{ + Raw: encoded, }, - } + }, + } - // the webhook handler - cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - Expect(err).ToNot(HaveOccurred()) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) - err = injector.InjectDecoder(decoder) - Expect(err).ToNot(HaveOccurred()) + // the webhook handler + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + require.NoError(t, err) - // test - res := injector.Handle(context.Background(), req) + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + err = injector.InjectDecoder(decoder) + require.NoError(t, err) - // verify - Expect(res.Allowed).To(BeTrue()) - Expect(res.AdmissionResponse.Result).To(BeNil()) - Expect(res.Patches).To(HaveLen(0)) + // test + res := injector.Handle(context.Background(), req) - // cleanup - for i := range tt.otelcols { - Expect(k8sClient.Delete(context.Background(), &tt.otelcols[i])).ToNot(HaveOccurred()) - } - Expect(k8sClient.Delete(context.Background(), &tt.ns)).ToNot(HaveOccurred()) - }) - } - }) + // verify + assert.True(t, res.Allowed) + assert.Nil(t, res.AdmissionResponse.Result) + assert.Len(t, res.Patches, 0) - It("it should fail when the request is invalid", func() { - // we use a typical Go table-test instad of Ginkgo's DescribeTable because we need to - // do an assertion during the declaration of the table params, which isn't supported (yet?) - for _, tt := range []struct { - name string - req admission.Request - expected int32 - }{ - { - "empty payload", - admission.Request{}, - http.StatusBadRequest, - }, - { - "namespace doesn't exist", - func() admission.Request { - pod := corev1.Pod{} - encoded, err := json.Marshal(pod) - Expect(err).ToNot(HaveOccurred()) + // cleanup + for i := range tt.otelcols { + require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) + } + require.NoError(t, k8sClient.Delete(context.Background(), &tt.ns)) + }) + } +} + +func TestFailOnInvalidRequest(t *testing.T) { + // we use a typical Go table-test instad of Ginkgo's DescribeTable because we need to + // do an assertion during the declaration of the table params, which isn't supported (yet?) + for _, tt := range []struct { + name string + req admission.Request + expected int32 + }{ + { + "empty payload", + admission.Request{}, + http.StatusBadRequest, + }, + { + "namespace doesn't exist", + func() admission.Request { + pod := corev1.Pod{} + encoded, err := json.Marshal(pod) + require.NoError(t, err) - return admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ - Namespace: "non-existing", - Object: runtime.RawExtension{ - Raw: encoded, - }, + return admission.Request{ + AdmissionRequest: v1beta1.AdmissionRequest{ + Namespace: "non-existing", + Object: runtime.RawExtension{ + Raw: encoded, }, - } - }(), - http.StatusInternalServerError, - }, - } { - When(tt.name, func() { - // prepare - cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - Expect(err).ToNot(HaveOccurred()) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) - err = injector.InjectDecoder(decoder) - Expect(err).ToNot(HaveOccurred()) + }, + } + }(), + http.StatusInternalServerError, + }, + } { + t.Run(tt.name, func(t *testing.T) { + // prepare + cfg := config.New() + decoder, err := admission.NewDecoder(scheme.Scheme) + require.NoError(t, err) + + injector := NewPodSidecarInjector(cfg, logger, k8sClient) + err = injector.InjectDecoder(decoder) + require.NoError(t, err) - // test - res := injector.Handle(context.Background(), tt.req) + // test + res := injector.Handle(context.Background(), tt.req) - // verify - Expect(res.Allowed).To(BeFalse()) - Expect(res.AdmissionResponse.Result).ToNot(BeNil()) - Expect(res.AdmissionResponse.Result.Code).To(Equal(tt.expected)) - }) - } - }) -}) + // verify + assert.False(t, res.Allowed) + assert.NotNil(t, res.AdmissionResponse.Result) + assert.Equal(t, tt.expected, res.AdmissionResponse.Result.Code) + }) + } +} diff --git a/internal/podinjector/podinjector_suite_test.go b/internal/podinjector/podinjector_suite_test.go index fe179f3f1..5ba5b7349 100644 --- a/internal/podinjector/podinjector_suite_test.go +++ b/internal/podinjector/podinjector_suite_test.go @@ -1,57 +1,68 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package podinjector_test import ( + "fmt" + "os" "path/filepath" "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "k8s.io/client-go/rest" - "k8s.io/kubectl/pkg/scheme" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + // +kubebuilder:scaffold:imports ) -var cfg *rest.Config var k8sClient client.Client var testEnv *envtest.Environment +var testScheme *runtime.Scheme = scheme.Scheme -func TestPodinjector(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Podinjector Suite") -} - -var _ = BeforeSuite(func(done Done) { - logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) - - By("bootstrapping test environment") +func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, } - var err error - cfg, err = testEnv.Start() - Expect(err).ToNot(HaveOccurred()) - Expect(cfg).ToNot(BeNil()) - - err = v1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } // +kubebuilder:scaffold:scheme - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) - Expect(err).ToNot(HaveOccurred()) - Expect(k8sClient).ToNot(BeNil()) + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } - close(done) -}, 60) + code := m.Run() -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).ToNot(HaveOccurred()) -}) + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} diff --git a/internal/version/main_test.go b/internal/version/main_test.go index cb2ec2b0d..682a2cfc9 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -1,23 +1,22 @@ package version import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" ) -var _ = Describe("Version management", func() { - It("should have a fallback version", func() { - Expect(OpenTelemetryCollector()).To(Equal("0.0.0")) - }) +func TestFallbackVersion(t *testing.T) { + assert.Equal(t, "0.0.0", OpenTelemetryCollector()) +} - It("should use a version set during the build", func() { - // prepare - otelCol = "0.0.2" // set during the build - defer func() { - otelCol = "" - }() +func TestVersionFromBuild(t *testing.T) { + // prepare + otelCol = "0.0.2" // set during the build + defer func() { + otelCol = "" + }() - Expect(OpenTelemetryCollector()).To(Equal(otelCol)) - Expect(Get()).To(ContainSubstring(otelCol)) - }) -}) + assert.Equal(t, otelCol, OpenTelemetryCollector()) + assert.Contains(t, Get().String(), otelCol) +} diff --git a/internal/version/version_suite_test.go b/internal/version/version_suite_test.go deleted file mode 100644 index fa25d588f..000000000 --- a/internal/version/version_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package version_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestVersion(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Version Suite") -} diff --git a/pkg/autodetect/autodetect_suite_test.go b/pkg/autodetect/autodetect_suite_test.go deleted file mode 100644 index 513ad24f6..000000000 --- a/pkg/autodetect/autodetect_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package autodetect_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestAutodetect(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Autodetect Suite") -} diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index a90fbe1f9..7855315ac 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -4,10 +4,10 @@ import ( "encoding/json" "net/http" "net/http/httptest" + "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" @@ -15,55 +15,62 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) -var _ = Describe("Autodetect", func() { - DescribeTable("detect platform based on available API groups", - func(expected platform.Platform, apiGroupList *metav1.APIGroupList) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - output, err := json.Marshal(apiGroupList) - Expect(err).ToNot(HaveOccurred()) - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - _, err = w.Write(output) - Expect(err).ToNot(HaveOccurred()) - })) - defer server.Close() - - autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) - Expect(err).ToNot(HaveOccurred()) - - // test - plt, err := autoDetect.Platform() - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(plt).To(Equal(expected)) +func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { + for _, tt := range []struct { + apiGroupList *metav1.APIGroupList + expected platform.Platform + }{ + { + &metav1.APIGroupList{}, + platform.Kubernetes, }, - - Entry("kubernetes", platform.Kubernetes, &metav1.APIGroupList{}), - Entry("openshift", platform.OpenShift, &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "route.openshift.io", + { + &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "route.openshift.io", + }, }, }, - }), - ) - - It("should return unknown platform when errors occur", func() { + platform.OpenShift, + }, + } { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(http.StatusInternalServerError) + output, err := json.Marshal(tt.apiGroupList) + require.NoError(t, err) + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, err = w.Write(output) + require.NoError(t, err) })) defer server.Close() autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) - Expect(err).ToNot(HaveOccurred()) + require.NoError(t, err) // test plt, err := autoDetect.Platform() // verify - Expect(err).To(HaveOccurred()) - Expect(plt).To(Equal(platform.Unknown)) - }) -}) + assert.NoError(t, err) + assert.Equal(t, tt.expected, plt) + } +} + +func TestUnknownPlatformOnError(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(http.StatusInternalServerError) + })) + defer server.Close() + + autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) + require.NoError(t, err) + + // test + plt, err := autoDetect.Platform() + + // verify + assert.Error(t, err) + assert.Equal(t, platform.Unknown, plt) +} diff --git a/pkg/collector/adapters/adapters_suite_test.go b/pkg/collector/adapters/adapters_suite_test.go deleted file mode 100644 index 75c8c3c76..000000000 --- a/pkg/collector/adapters/adapters_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package adapters_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestAdapters(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Adapters Suite") -} diff --git a/pkg/collector/adapters/config_from_test.go b/pkg/collector/adapters/config_from_test.go index b87fea6fa..cc2081151 100644 --- a/pkg/collector/adapters/config_from_test.go +++ b/pkg/collector/adapters/config_from_test.go @@ -1,28 +1,25 @@ package adapters_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) -var _ = Describe("ConfigFromString", func() { - Describe("Invalid YAML", func() { - It("should return an error", func() { - // test - config, err := adapters.ConfigFromString("🦄") +func TestInvalidYAML(t *testing.T) { + // test + config, err := adapters.ConfigFromString("🦄") - // verify - Expect(config).To(BeNil()) - Expect(err).To(MatchError(adapters.ErrInvalidYAML)) - }) - }) + // verify + assert.Nil(t, config) + assert.Equal(t, adapters.ErrInvalidYAML, err) +} - Describe("Empty string", func() { - It("should return an empty config", func() { - // test and verify - Expect(adapters.ConfigFromString("")).To(BeEmpty()) - }) - }) -}) +func TestEmptyString(t *testing.T) { + // test and verify + res, err := adapters.ConfigFromString("") + assert.NoError(t, err) + assert.Empty(t, res, 0) +} diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index d36240ad6..f2d0ceb8f 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -2,11 +2,11 @@ package adapters_test import ( "errors" + "testing" "github.com/go-logr/logr" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -15,12 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" ) -var _ = Describe("ConfigToReceiverPorts", func() { - logger := logf.Log.WithName("unit-tests") +var logger = logf.Log.WithName("unit-tests") - Describe("Extract ports from config", func() { - It("extract all known ports", func() { - configStr := `receivers: +func TestExtractPortsFromConfig(t *testing.T) { + configStr := `receivers: examplereceiver: endpoint: "0.0.0.0:12345" examplereceiver/settings: @@ -43,114 +41,136 @@ var _ = Describe("ConfigToReceiverPorts", func() { endpoint: 0.0.0.0:15268 ` - // prepare - config, err := adapters.ConfigFromString(configStr) - Expect(config).ToNot(BeEmpty()) - Expect(err).ToNot(HaveOccurred()) - - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) - Expect(ports).To(HaveLen(6)) - Expect(err).ToNot(HaveOccurred()) - - // verify - expectedPorts := map[int32]bool{} - expectedPorts[int32(12345)] = false - expectedPorts[int32(12346)] = false - expectedPorts[int32(14250)] = false - expectedPorts[int32(6831)] = false - expectedPorts[int32(6833)] = false - expectedPorts[int32(15268)] = false - - expectedNames := map[string]bool{} - expectedNames["examplereceiver"] = false - expectedNames["examplereceiver-settings"] = false - expectedNames["jaeger-grpc"] = false - expectedNames["jaeger-thrift-compact"] = false - expectedNames["jaeger-thrift-binary"] = false - expectedNames["jaeger-custom-thrift-http"] = false - - // make sure we only have the ports in the set - for _, port := range ports { - Expect(expectedPorts).To(HaveKey(port.Port)) - Expect(expectedNames).To(HaveKey(port.Name)) - expectedPorts[port.Port] = true - expectedNames[port.Name] = true - } - - // and make sure all the ports from the set are there - for _, val := range expectedPorts { - Expect(val).To(BeTrue()) - } - - }) - }) + // prepare + config, err := adapters.ConfigFromString(configStr) + require.NoError(t, err) + require.NotEmpty(t, config) + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + assert.NoError(t, err) + assert.Len(t, ports, 6) + + // verify + expectedPorts := map[int32]bool{} + expectedPorts[int32(12345)] = false + expectedPorts[int32(12346)] = false + expectedPorts[int32(14250)] = false + expectedPorts[int32(6831)] = false + expectedPorts[int32(6833)] = false + expectedPorts[int32(15268)] = false + + expectedNames := map[string]bool{} + expectedNames["examplereceiver"] = false + expectedNames["examplereceiver-settings"] = false + expectedNames["jaeger-grpc"] = false + expectedNames["jaeger-thrift-compact"] = false + expectedNames["jaeger-thrift-binary"] = false + expectedNames["jaeger-custom-thrift-http"] = false + + // make sure we only have the ports in the set + for _, port := range ports { + assert.NotNil(t, expectedPorts[port.Port]) + assert.NotNil(t, expectedNames[port.Name]) + expectedPorts[port.Port] = true + expectedNames[port.Name] = true + } - DescribeTable("No ports are parsed", - func(configStr string, expected error) { - // prepare - config, err := adapters.ConfigFromString(configStr) - Expect(err).ToNot(HaveOccurred()) + // and make sure all the ports from the set are there + for _, val := range expectedPorts { + assert.True(t, val) + } - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) +} - // verify - Expect(ports).To(BeNil()) - Expect(err).To(MatchError(expected)) +func TestNoPortsParsed(t *testing.T) { + for _, tt := range []struct { + desc string + configStr string + expected error + }{ + { + "empty", + "", + adapters.ErrNoReceivers, }, - Entry("empty", "", adapters.ErrNoReceivers), - Entry("not a map", "receivers: some-string", adapters.ErrReceiversNotAMap), - ) - - DescribeTable("Invalid receivers", - func(configStr string) { + { + "not a map", + "receivers: some-string", + adapters.ErrReceiversNotAMap, + }, + } { + t.Run(tt.desc, func(t *testing.T) { // prepare - config, err := adapters.ConfigFromString(configStr) - Expect(err).ToNot(HaveOccurred()) + config, err := adapters.ConfigFromString(tt.configStr) + require.NoError(t, err) // test ports, err := adapters.ConfigToReceiverPorts(logger, config) // verify - Expect(ports).To(HaveLen(0)) - Expect(err).ToNot(HaveOccurred()) - }, - Entry("receiver isn't a map", "receivers:\n some-receiver: string"), - Entry("receiver's endpoint isn't string", "receivers:\n some-receiver:\n endpoint: 123"), - ) + assert.Nil(t, ports) + assert.Equal(t, tt.expected, err) + }) + } +} - Describe("Parser failed", func() { - It("should return an empty list of ports", func() { +func TestInvalidReceivers(t *testing.T) { + for _, tt := range []struct { + desc string + configStr string + }{ + { + "receiver isn't a map", + "receivers:\n some-receiver: string", + }, + { + "receiver's endpoint isn't string", + "receivers:\n some-receiver:\n endpoint: 123", + }, + } { + t.Run(tt.desc, func(t *testing.T) { // prepare - mockParserCalled := false - mockParser := &mockParser{ - portsFunc: func() ([]v1.ServicePort, error) { - mockParserCalled = true - return nil, errors.New("mocked error") - }, - } - parser.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ReceiverParser { - return mockParser - }) - - config := map[interface{}]interface{}{ - "receivers": map[interface{}]interface{}{ - "mock": map[interface{}]interface{}{}, - }, - } + config, err := adapters.ConfigFromString(tt.configStr) + require.NoError(t, err) // test ports, err := adapters.ConfigToReceiverPorts(logger, config) // verify - Expect(ports).To(HaveLen(0)) - Expect(err).ToNot(HaveOccurred()) - Expect(mockParserCalled).To(BeTrue()) + assert.NoError(t, err) + assert.Len(t, ports, 0) }) + } +} + +func TestParserFailed(t *testing.T) { + // prepare + mockParserCalled := false + mockParser := &mockParser{ + portsFunc: func() ([]v1.ServicePort, error) { + mockParserCalled = true + return nil, errors.New("mocked error") + }, + } + parser.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ReceiverParser { + return mockParser }) -}) + config := map[interface{}]interface{}{ + "receivers": map[interface{}]interface{}{ + "mock": map[interface{}]interface{}{}, + }, + } + + // test + ports, err := adapters.ConfigToReceiverPorts(logger, config) + + // verify + assert.Len(t, ports, 0) + assert.NoError(t, err) + assert.True(t, mockParserCalled) +} type mockParser struct { portsFunc func() ([]corev1.ServicePort, error) diff --git a/pkg/collector/collector_suite_test.go b/pkg/collector/collector_suite_test.go deleted file mode 100644 index 4e1cd50d2..000000000 --- a/pkg/collector/collector_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package collector_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestCollector(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Collector Suite") -} diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 86ad9e770..69af8b5ec 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -1,119 +1,120 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/stretchr/testify/assert" ) -var _ = Describe("Container", func() { - logger := logf.Log.WithName("unit-tests") - - It("should generate a new default container", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} - cfg := config.New(config.WithCollectorImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - Expect(c.Image).To(Equal("default-image")) - }) - - It("should allow image to be overridden", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "overridden-image", - }, - } - cfg := config.New(config.WithCollectorImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - Expect(c.Image).To(Equal("overridden-image")) - }) - - It("config flag is ignored", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Args: map[string]string{ - "key": "value", - "config": "/some-custom-file.yaml", - }, - }, - } - cfg := config.New() - - // test - c := Container(cfg, logger, otelcol) - - // verify - Expect(c.Args).To(HaveLen(2)) - Expect(c.Args).To(ContainElement("--key=value")) // sanity check - Expect(c.Args).ToNot(ContainElement("--config=/some-custom-file.yaml")) - }) - - It("custom volumes are mounted", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - VolumeMounts: []corev1.VolumeMount{{ - Name: "custom-volume-mount", - }}, +var logger = logf.Log.WithName("unit-tests") + +func TestContainerNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New(config.WithCollectorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "default-image", c.Image) +} + +func TestContainerWithImageOverridden(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "overridden-image", + }, + } + cfg := config.New(config.WithCollectorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "overridden-image", c.Image) +} + +func TestContainerConfigFlagIsIgnored(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "key": "value", + "config": "/some-custom-file.yaml", }, - } - cfg := config.New() - - // test - c := Container(cfg, logger, otelcol) - - // verify - Expect(c.VolumeMounts).To(HaveLen(2)) - Expect(c.VolumeMounts[1].Name).To(Equal("custom-volume-mount")) - }) - - It("should allow for env vars to be overridden", func() { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Env: []corev1.EnvVar{ - { - Name: "foo", - Value: "bar", - }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Len(t, c.Args, 2) + assert.Contains(t, c.Args, "--key=value") + assert.NotContains(t, c.Args, "--config=/some-custom-file.yaml") +} + +func TestContainerCustomVolumes(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + VolumeMounts: []corev1.VolumeMount{{ + Name: "custom-volume-mount", + }}, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Len(t, c.VolumeMounts, 2) + assert.Equal(t, "custom-volume-mount", c.VolumeMounts[1].Name) +} + +func TestContainerEnvVarsOverridden(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Env: []corev1.EnvVar{ + { + Name: "foo", + Value: "bar", }, }, - } + }, + } - cfg := config.New() + cfg := config.New() - // test - c := Container(cfg, logger, otelcol) + // test + c := Container(cfg, logger, otelcol) - Expect(c.Env).To(HaveLen(1)) - Expect(c.Env[0].Name).To(Equal("foo")) - Expect(c.Env[0].Value).To(Equal("bar")) - }) + // verify + assert.Len(t, c.Env, 1) + assert.Equal(t, "foo", c.Env[0].Name) + assert.Equal(t, "bar", c.Env[0].Value) +} - It("should allow for empty env vars by default", func() { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, - } +func TestContainerEmptyEnvVarsByDefault(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } - cfg := config.New() + cfg := config.New() - // test - c := Container(cfg, logger, otelcol) + // test + c := Container(cfg, logger, otelcol) - Expect(c.Env).To(BeEmpty()) - }) -}) + // verify + assert.Empty(t, c.Env) +} diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 93c88435e..53dacf8b6 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -1,44 +1,40 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) -var _ = Describe("Daemonset", func() { - logger := logf.Log.WithName("unit-tests") - - It("should build a default new daemonset", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - cfg := config.New() - - // test - d := DaemonSet(cfg, logger, otelcol) - - // verify - Expect(d.Name).To(Equal("my-instance-collector")) - Expect(d.Labels["app.kubernetes.io/name"]).To(Equal("my-instance-collector")) - Expect(d.Annotations["prometheus.io/scrape"]).To(Equal("true")) - Expect(d.Annotations["prometheus.io/port"]).To(Equal("8888")) - Expect(d.Annotations["prometheus.io/path"]).To(Equal("/metrics")) - - Expect(d.Spec.Template.Spec.Containers).To(HaveLen(1)) - - // none of the default annotations should propagate down to the pod - Expect(d.Spec.Template.Annotations).To(BeEmpty()) - - // the pod selector should match the pod spec's labels - Expect(d.Spec.Template.Labels).To(Equal(d.Spec.Selector.MatchLabels)) - }) -}) +func TestDaemonSetNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + cfg := config.New() + + // test + d := DaemonSet(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + + // none of the default annotations should propagate down to the pod + assert.Empty(t, d.Spec.Template.Annotations) + + // the pod selector should match the pod spec's labels + assert.Equal(t, d.Spec.Selector.MatchLabels, d.Spec.Template.Labels) +} diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index fad045e2c..10ed8f66e 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -1,44 +1,40 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/stretchr/testify/assert" ) -var _ = Describe("Deployment", func() { - logger := logf.Log.WithName("unit-tests") - - It("should build a default new deployment", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - cfg := config.New() - - // test - d := Deployment(cfg, logger, otelcol) - - // verify - Expect(d.Name).To(Equal("my-instance-collector")) - Expect(d.Labels["app.kubernetes.io/name"]).To(Equal("my-instance-collector")) - Expect(d.Annotations["prometheus.io/scrape"]).To(Equal("true")) - Expect(d.Annotations["prometheus.io/port"]).To(Equal("8888")) - Expect(d.Annotations["prometheus.io/path"]).To(Equal("/metrics")) - - Expect(d.Spec.Template.Spec.Containers).To(HaveLen(1)) - - // none of the default annotations should propagate down to the pod - Expect(d.Spec.Template.Annotations).To(BeEmpty()) - - // the pod selector should match the pod spec's labels - Expect(d.Spec.Template.Labels).To(Equal(d.Spec.Selector.MatchLabels)) - }) -}) +func TestDeploymentNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + + // none of the default annotations should propagate down to the pod + assert.Empty(t, d.Spec.Template.Annotations) + + // the pod selector should match the pod spec's labels + assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) +} diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 99911a9bf..bccb00597 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -1,48 +1,44 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) -var _ = Describe("Labels", func() { - It("should build a common set of labels", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-ns", - }, - } - - // test - labels := Labels(otelcol) - - // verify - Expect(labels).To(HaveLen(4)) - Expect(labels["app.kubernetes.io/managed-by"]).To(Equal("opentelemetry-operator")) - Expect(labels["app.kubernetes.io/instance"]).To(Equal("my-ns.my-instance")) - Expect(labels["app.kubernetes.io/part-of"]).To(Equal("opentelemetry")) - Expect(labels["app.kubernetes.io/component"]).To(Equal("opentelemetry-collector")) - }) - - It("should propagate down the instance's labels", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"myapp": "mycomponent"}, - }, - } - - // test - labels := Labels(otelcol) - - // verify - Expect(labels).To(HaveLen(5)) - Expect(labels["myapp"]).To(Equal("mycomponent")) - }) -}) +func TestLabelsCommonSet(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + }, + } + + // test + labels := Labels(otelcol) + assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) +} + +func TestLabelsPropagateDown(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"myapp": "mycomponent"}, + }, + } + + // test + labels := Labels(otelcol) + + // verify + assert.Len(t, labels, 5) + assert.Equal(t, "mycomponent", labels["myapp"]) +} diff --git a/pkg/collector/parser/parser_suite_test.go b/pkg/collector/parser/parser_suite_test.go deleted file mode 100644 index 8c5384c3d..000000000 --- a/pkg/collector/parser/parser_suite_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package parser_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestParser(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Parser Suite") -} diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index c6a1c4847..dba6b7961 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -1,76 +1,93 @@ package parser_test import ( - "github.com/go-logr/logr" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" - logf "sigs.k8s.io/controller-runtime/pkg/log" + "testing" + "github.com/go-logr/logr" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" ) -var _ = Describe("Generic receivers", func() { - logger := logf.Log.WithName("unit-tests") - - It("should parse the endpoint", func() { - // prepare - // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }) - - // test - ports, err := builder.Ports() +var logger = logf.Log.WithName("unit-tests") - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(1)) - Expect(ports[0].Port).To(BeEquivalentTo(1234)) +func TestParseEndpoint(t *testing.T) { + // prepare + // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser + builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", }) - It("should have failed to parse the endpoint", func() { - // prepare - // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0", - }) + // test + ports, err := builder.Ports() - // test - ports, err := builder.Ports() + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 1234, ports[0].Port) +} - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(0)) +func TestFailedToParseEndpoint(t *testing.T) { + // prepare + // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser + builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + "endpoint": "0.0.0.0", }) - DescribeTable("downstream parsers", - func(receiverName, parserName string, defaultPort int, builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser) { - Describe("builds successfully", func() { + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 0) +} + +func TestDownstreamParsers(t *testing.T) { + for _, tt := range []struct { + desc string + receiverName string + parserName string + defaultPort int + builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser + }{ + {"zipkin", "zipkin", "__zipkin", 9411, parser.NewZipkinReceiverParser}, + {"opencensus", "opencensus", "__opencensus", 55678, parser.NewOpenCensusReceiverParser}, + {"otlp", "otlp", "__otlp", 55680, parser.NewOTLPReceiverParser}, + + // contrib receivers + {"carbon", "carbon", "__carbon", 2003, parser.NewCarbonReceiverParser}, + {"collectd", "collectd", "__collectd", 8081, parser.NewCollectdReceiverParser}, + {"sapm", "sapm", "__sapm", 7276, parser.NewSAPMReceiverParser}, + {"signalfx", "signalfx", "__signalfx", 9943, parser.NewSignalFxReceiverParser}, + {"wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser}, + {"zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser}, + } { + t.Run(tt.receiverName, func(t *testing.T) { + t.Run("builds successfully", func(t *testing.T) { // test - builder := builder(logger, receiverName, map[interface{}]interface{}{}) + builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{}) // verify - Expect(builder.ParserName()).To(Equal(parserName)) + assert.Equal(t, tt.parserName, builder.ParserName()) }) - Describe("assigns the expected port", func() { + t.Run("assigns the expected port", func(t *testing.T) { // prepare - builder := builder(logger, receiverName, map[interface{}]interface{}{}) + builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{}) // test ports, err := builder.Ports() // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(1)) - Expect(ports[0].Port).To(BeEquivalentTo(defaultPort)) - Expect(ports[0].Name).To(Equal(receiverName)) + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, tt.defaultPort, ports[0].Port) + assert.Equal(t, tt.receiverName, ports[0].Name) }) - Describe("allows port to be overridden", func() { + t.Run("allows port to be overridden", func(t *testing.T) { // prepare - builder := builder(logger, receiverName, map[interface{}]interface{}{ + builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{ "endpoint": "0.0.0.0:65535", }) @@ -78,23 +95,11 @@ var _ = Describe("Generic receivers", func() { ports, err := builder.Ports() // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(1)) - Expect(ports[0].Port).To(BeEquivalentTo(65535)) - Expect(ports[0].Name).To(Equal(receiverName)) + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 65535, ports[0].Port) + assert.Equal(t, tt.receiverName, ports[0].Name) }) - }, - Entry("zipkin", "zipkin", "__zipkin", 9411, parser.NewZipkinReceiverParser), - Entry("opencensus", "opencensus", "__opencensus", 55678, parser.NewOpenCensusReceiverParser), - Entry("otlp", "otlp", "__otlp", 55680, parser.NewOTLPReceiverParser), - - // contrib receivers - Entry("carbon", "carbon", "__carbon", 2003, parser.NewCarbonReceiverParser), - Entry("collectd", "collectd", "__collectd", 8081, parser.NewCollectdReceiverParser), - Entry("sapm", "sapm", "__sapm", 7276, parser.NewSAPMReceiverParser), - Entry("signalfx", "signalfx", "__signalfx", 9943, parser.NewSignalFxReceiverParser), - Entry("wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser), - Entry("zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser), - ) - -}) + }) + } +} diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 29e1d9d33..46bd0a16e 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -1,101 +1,95 @@ -package parser_test +package parser import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - logf "sigs.k8s.io/controller-runtime/pkg/log" + "testing" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" + "github.com/stretchr/testify/assert" ) -var _ = Describe("Jaeger receiver", func() { - logger := logf.Log.WithName("unit-tests") - - It("should have self registered", func() { - // verify - Expect(parser.IsRegistered("jaeger")).To(BeTrue()) - }) - - It("should be found via its parser name", func() { - // test - p := parser.For(logger, "jaeger", map[interface{}]interface{}{}) - - // verify - Expect(p.ParserName()).To(Equal("__jaeger")) +func TestJaegerSelfRegisters(t *testing.T) { + // verify + assert.True(t, IsRegistered("jaeger")) +} + +func TestJaegerIsFoundByName(t *testing.T) { + // test + p := For(logger, "jaeger", map[interface{}]interface{}{}) + + // verify + assert.Equal(t, "__jaeger", p.ParserName()) +} + +func TestJaegerMinimalConfiguration(t *testing.T) { + // prepare + builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + }, }) - It("should build with a minimal configuration", func() { - // prepare - builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 14250, ports[0].Port) +} + +func TestJaegerPortsOverridden(t *testing.T) { + // prepare + builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", }, - }) - - // test - ports, err := builder.Ports() - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(1)) - Expect(ports[0].Port).To(BeEquivalentTo(14250)) + }, }) - It("should allow ports to be overridden", func() { - // prepare - builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - }, - }) - - // test - ports, err := builder.Ports() - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(1)) - Expect(ports[0].Port).To(BeEquivalentTo(1234)) + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 1234, ports[0].Port) +} + +func TestJaegerExposeDefaultPorts(t *testing.T) { + // prepare + builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "thrift_http": map[interface{}]interface{}{}, + "thrift_compact": map[interface{}]interface{}{}, + "thrift_binary": map[interface{}]interface{}{}, + }, }) - It("should expose the default ports", func() { - // prepare - builder := parser.NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "thrift_http": map[interface{}]interface{}{}, - "thrift_compact": map[interface{}]interface{}{}, - "thrift_binary": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "jaeger-grpc": {portNumber: 14250}, - "jaeger-thrift-http": {portNumber: 14268}, - "jaeger-thrift-compact": {portNumber: 6831}, - "jaeger-thrift-binary": {portNumber: 6832}, - } - - // test - ports, err := builder.Ports() - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(ports).To(HaveLen(4)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - Expect(port.Port).To(BeEquivalentTo(r.portNumber)) - } - for k, v := range expectedResults { - Expect(v.seen).To(BeTrue(), "the port %s wasn't included in the service ports", k) - } - }) -}) + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "jaeger-grpc": {portNumber: 14250}, + "jaeger-thrift-http": {portNumber: 14268}, + "jaeger-thrift-compact": {portNumber: 6831}, + "jaeger-thrift-binary": {portNumber: 6832}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 4) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index e1497d812..fa6030f3e 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -1,91 +1,111 @@ package parser import ( + "testing" + "github.com/go-logr/logr" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" ) -var _ = Describe("Receiver", func() { - logger := logf.Log.WithName("unit-tests") +var logger = logf.Log.WithName("unit-tests") + +func TestReceiverPortNames(t *testing.T) { + for _, tt := range []struct { + desc string + candidate string + port int + expected string + }{ + {"regular case", "my-receiver", 123, "my-receiver"}, + {"name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", 123, "port-123"}, + {"name with invalid chars", "my-🦄-receiver", 123, "port-123"}, + {"name starting with invalid char", "-my-receiver", 123, "port-123"}, + } { + t.Run(tt.desc, func(t *testing.T) { + assert.Equal(t, tt.expected, portName(tt.candidate, int32(tt.port))) + }) + } +} - DescribeTable("port names", - func(candidate string, port int, expected string) { +func TestReceiverType(t *testing.T) { + for _, tt := range []struct { + desc string + name string + expected string + }{ + {"regular case", "myreceiver", "myreceiver"}, + {"named instance", "myreceiver/custom", "myreceiver"}, + } { + t.Run(tt.desc, func(t *testing.T) { // test and verify - Expect(portName(candidate, int32(port))).To(Equal(expected)) - }, - Entry("regular case", "my-receiver", 123, "my-receiver"), - Entry("name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", 123, "port-123"), - Entry("name with invalid chars", "my-🦄-receiver", 123, "port-123"), - Entry("name starting with invalid char", "-my-receiver", 123, "port-123"), - ) - - DescribeTable("receiver type", - func(name string, expected string) { - // test and verify - Expect(receiverType(name)).To(Equal(expected)) - }, - Entry("regular case", "myreceiver", "myreceiver"), - Entry("named instance", "myreceiver/custom", "myreceiver"), - ) - - DescribeTable("parse port from endpoint", - func(endpoint string, expected int, errorExpected bool) { + assert.Equal(t, tt.expected, receiverType(tt.name)) + }) + } +} + +func TestReceiverParsePortFromEndpoint(t *testing.T) { + for _, tt := range []struct { + desc string + endpoint string + expected int + errorExpected bool + }{ + {"regular case", "http://localhost:1234", 1234, false}, + {"no protocol", "0.0.0.0:1234", 1234, false}, + {"just port", ":1234", 1234, false}, + {"no port at all", "http://localhost", 0, true}, + } { + t.Run(tt.desc, func(t *testing.T) { // test - val, err := portFromEndpoint(endpoint) - if errorExpected { - Expect(err).To(HaveOccurred()) + val, err := portFromEndpoint(tt.endpoint) + if tt.errorExpected { + assert.Error(t, err) } else { - Expect(err).ToNot(HaveOccurred()) + assert.NoError(t, err) } - Expect(val).To(BeEquivalentTo(expected), "wrong port from endpoint %s: %d", endpoint, val) - }, - Entry("regular case", "http://localhost:1234", 1234, false), - Entry("no protocol", "0.0.0.0:1234", 1234, false), - Entry("just port", ":1234", 1234, false), - Entry("no port at all", "http://localhost", 0, true), - ) - - It("should fail when the port isn't a string", func() { - // prepare - config := map[interface{}]interface{}{ - "endpoint": 123, - } - - // test - p := singlePortFromConfigEndpoint(logger, "myreceiver", config) - - // verify - Expect(p).To(BeNil()) - }) + assert.EqualValues(t, tt.expected, val, "wrong port from endpoint %s: %d", tt.endpoint, val) + }) + } +} - It("should fallback to generic parser when receiver isn't registered", func() { - // test - p := For(logger, "myreceiver", map[interface{}]interface{}{}) +func TestReceiverFailsWhenPortIsntString(t *testing.T) { + // prepare + config := map[interface{}]interface{}{ + "endpoint": 123, + } - // test - Expect(p.ParserName()).To(Equal("__generic")) - }) + // test + p := singlePortFromConfigEndpoint(logger, "myreceiver", config) - It("should find a registered parser", func() { - // prepare - builderCalled := false - Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { - builderCalled = true - return &mockParser{} - }) + // verify + assert.Nil(t, p) +} - // test - For(logger, "mock", map[interface{}]interface{}{}) +func TestReceiverFallbackWhenNotRegistered(t *testing.T) { + // test + p := For(logger, "myreceiver", map[interface{}]interface{}{}) - // verify - Expect(builderCalled).To(BeTrue()) + // test + assert.Equal(t, "__generic", p.ParserName()) +} + +func TestReceiverShouldFindRegisteredParser(t *testing.T) { + // prepare + builderCalled := false + Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + builderCalled = true + return &mockParser{} }) -}) + + // test + For(logger, "mock", map[interface{}]interface{}{}) + + // verify + assert.True(t, builderCalled) +} type mockParser struct { } diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 59513f6a1..5c8c7249e 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -1,60 +1,44 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) -var _ = Describe("Serviceaccount", func() { - It("should default to an instance-specific service account name", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - // test - sa := ServiceAccountName(otelcol) - - // verify - Expect(sa).To(Equal("my-instance-collector")) - }) - - It("should allow the serviceaccount to be overridden", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - ServiceAccount: "my-special-sa", - }, - } - - // test - sa := ServiceAccountName(otelcol) - - // verify - Expect(sa).To(Equal("my-special-sa")) - }) - - It("should build a new default service account", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - // test - sa := ServiceAccount(otelcol) - - // verify - Expect(sa.Name).To(Equal("my-instance-collector")) - }) -}) +func TestServiceAccountNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + assert.Equal(t, "my-instance-collector", sa) +} + +func TestServiceAccountOverride(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ServiceAccount: "my-special-sa", + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + assert.Equal(t, "my-special-sa", sa) +} diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go new file mode 100644 index 000000000..c8bf1e4ed --- /dev/null +++ b/pkg/collector/upgrade/suite_test.go @@ -0,0 +1,54 @@ +package upgrade_test + +import ( + "fmt" + "os" + "path/filepath" + "testing" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + // +kubebuilder:scaffold:imports +) + +var k8sClient client.Client +var testEnv *envtest.Environment +var testScheme *runtime.Scheme = scheme.Scheme + +func TestMain(m *testing.M) { + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + } + + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} diff --git a/pkg/collector/upgrade/upgrade_suite_test.go b/pkg/collector/upgrade/upgrade_suite_test.go deleted file mode 100644 index c49710cfe..000000000 --- a/pkg/collector/upgrade/upgrade_suite_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package upgrade_test - -import ( - "path/filepath" - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - "k8s.io/client-go/rest" - "k8s.io/kubectl/pkg/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" -) - -var cfg *rest.Config -var k8sClient client.Client -var testEnv *envtest.Environment - -func TestUpgrade(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Upgrade Suite") -} - -var _ = BeforeSuite(func(done Done) { - logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) - - By("bootstrapping test environment") - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, - } - - var err error - cfg, err = testEnv.Start() - Expect(err).ToNot(HaveOccurred()) - Expect(cfg).ToNot(BeNil()) - - err = v1alpha1.AddToScheme(scheme.Scheme) - Expect(err).NotTo(HaveOccurred()) - - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) - Expect(err).ToNot(HaveOccurred()) - Expect(k8sClient).ToNot(BeNil()) - - close(done) -}, 60) - -var _ = AfterSuite(func() { - By("tearing down the test environment") - err := testEnv.Stop() - Expect(err).ToNot(HaveOccurred()) -}) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 85ab51d7d..e2aac5639 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -2,10 +2,10 @@ package upgrade_test import ( "context" + "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -15,106 +15,112 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) -var _ = Describe("Upgrade", func() { - logger := logf.Log.WithName("unit-tests") - - It("should upgrade to the latest", func() { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, +var logger = logf.Log.WithName("unit-tests") + +func TestShouldUpgradeAllToLatest(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", }, - } - existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function - err := k8sClient.Create(context.Background(), &existing) - Expect(err).To(Succeed()) - - err = k8sClient.Status().Update(context.Background(), &existing) - Expect(err).To(Succeed()) - - currentV := version.Get() - currentV.OpenTelemetryCollector = upgrade.Latest.String() - - // sanity check - persisted := &v1alpha1.OpenTelemetryCollector{} - err = k8sClient.Get(context.Background(), nsn, persisted) - Expect(err).To(Succeed()) - Expect(persisted.Status.Version).To(Equal("0.0.1")) - - // test - err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) - Expect(err).To(Succeed()) - - // verify - err = k8sClient.Get(context.Background(), nsn, persisted) - Expect(err).To(Succeed()) - Expect(persisted.Status.Version).To(Equal(upgrade.Latest.String())) - - // cleanup - Expect(k8sClient.Delete(context.Background(), &existing)) - }) - - It("should upgrade up to the latest known version", func() { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, + }, + } + existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function + err := k8sClient.Create(context.Background(), &existing) + require.NoError(t, err) + + err = k8sClient.Status().Update(context.Background(), &existing) + require.NoError(t, err) + + currentV := version.Get() + currentV.OpenTelemetryCollector = upgrade.Latest.String() + + // sanity check + persisted := &v1alpha1.OpenTelemetryCollector{} + err = k8sClient.Get(context.Background(), nsn, persisted) + require.NoError(t, err) + require.Equal(t, "0.0.1", persisted.Status.Version) + + // test + err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) + assert.NoError(t, err) + + // verify + err = k8sClient.Get(context.Background(), nsn, persisted) + assert.NoError(t, err) + assert.Equal(t, upgrade.Latest.String(), persisted.Status.Version) + + // cleanup + assert.NoError(t, k8sClient.Delete(context.Background(), &existing)) +} + +func TestUpgradeUpToLatestKnownVersion(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", }, - } - existing.Status.Version = "0.8.0" - - currentV := version.Get() - currentV.OpenTelemetryCollector = "0.10.0" // we don't have a 0.10.0 upgrade, but we have a 0.9.0 - - // test - res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) - - // verify - Expect(err).To(Succeed()) - Expect(res.Status.Version).To(Equal("0.10.0")) - }) - - DescribeTable("versions should not be changed", func(v string, expectedV string, failureExpected bool) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + } + existing.Status.Version = "0.8.0" + + currentV := version.Get() + currentV.OpenTelemetryCollector = "0.10.0" // we don't have a 0.10.0 upgrade, but we have a 0.9.0 + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + + // verify + assert.NoError(t, err) + assert.Equal(t, "0.10.0", res.Status.Version) +} + +func TestVersionsShouldNotBeChanged(t *testing.T) { + for _, tt := range []struct { + desc string + v string + expectedV string + failureExpected bool + }{ + {"new-instance", "", "", false}, + {"newer-than-our-newest", "100.0.0", "100.0.0", false}, + {"unparseable", "unparseable", "unparseable", true}, + } { + t.Run(tt.desc, func(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, }, - }, - } - existing.Status.Version = v - - currentV := version.Get() - currentV.OpenTelemetryCollector = upgrade.Latest.String() - - // test - res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) - if failureExpected { - Expect(err).To(HaveOccurred()) - } else { - Expect(err).To(Succeed()) - } - - // verify - Expect(res.Status.Version).To(Equal(expectedV)) - }, - Entry("new-instance", "", "", false), - Entry("newer-than-our-newest", "100.0.0", "100.0.0", false), - Entry("unparseable", "unparseable", "unparseable", true), - ) - -}) + } + existing.Status.Version = tt.v + + currentV := version.Get() + currentV.OpenTelemetryCollector = upgrade.Latest.String() + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + if tt.failureExpected { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + + // verify + assert.Equal(t, tt.expectedV, res.Status.Version) + }) + } +} diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 9ca667405..bd70b6632 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -2,54 +2,50 @@ package upgrade_test import ( "context" + "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) -var _ = Describe("Upgrade to v0.9.0", func() { - logger := logf.Log.WithName("unit-tests") - - It("should remove reconnection_delay", func() { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, +func TestRemoveConnectionDelay(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: `exporters: + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `exporters: opencensus: compression: "on" reconnection_delay: 15 num_workers: 123`, - }, - } - existing.Status.Version = "0.8.0" - - // sanity check - Expect(existing.Spec.Config).To(ContainSubstring("reconnection_delay")) - - // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) - Expect(err).To(Succeed()) - - // verify - Expect(res.Spec.Config).To(ContainSubstring("opencensus:")) - Expect(res.Spec.Config).To(ContainSubstring(`compression: "on"`)) - Expect(res.Spec.Config).ToNot(ContainSubstring("reconnection_delay")) - Expect(res.Spec.Config).To(ContainSubstring("num_workers: 123")) - Expect(res.Status.Messages[0]).To(ContainSubstring("upgrade to v0.9.0 removed the property reconnection_delay for exporter")) - }) -}) + }, + } + existing.Status.Version = "0.8.0" + + // sanity check + require.Contains(t, existing.Spec.Config, "reconnection_delay") + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Contains(t, res.Spec.Config, "opencensus:") + assert.Contains(t, res.Spec.Config, `compression: "on"`) + assert.NotContains(t, res.Spec.Config, "reconnection_delay") + assert.Contains(t, res.Spec.Config, "num_workers: 123") + assert.Contains(t, res.Status.Messages[0], "upgrade to v0.9.0 removed the property reconnection_delay for exporter") +} diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index 03e244b12..36b7dcc90 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -1,8 +1,9 @@ package collector_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" @@ -11,41 +12,38 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -var _ = Describe("Volume", func() { - It("should build a new default volume", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} - cfg := config.New() - - // test - volumes := Volumes(cfg, otelcol) - - // verify - Expect(volumes).To(HaveLen(1)) - - // check that it's the otc-internal volume, with the config map - Expect(volumes[0].Name).To(Equal(naming.ConfigMapVolume())) - }) - - It("should allow more volumes to be added", func() { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Volumes: []corev1.Volume{{ - Name: "my-volume", - }}, - }, - } - cfg := config.New() - - // test - volumes := Volumes(cfg, otelcol) - - // verify - Expect(volumes).To(HaveLen(2)) - - // check that it's the otc-internal volume, with the config map - Expect(volumes[1].Name).To(Equal("my-volume")) - }) - -}) +func TestVolumeNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + assert.Len(t, volumes, 1) + + // check that it's the otc-internal volume, with the config map + assert.Equal(t, naming.ConfigMapVolume(), volumes[0].Name) +} + +func TestVolumeAllowsMoreToBeAdded(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Volumes: []corev1.Volume{{ + Name: "my-volume", + }}, + }, + } + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + assert.Len(t, volumes, 2) + + // check that it's the otc-internal volume, with the config map + assert.Equal(t, "my-volume", volumes[1].Name) +} diff --git a/pkg/sidecar/annotation_test.go b/pkg/sidecar/annotation_test.go index 9b1a61f26..0603d4935 100644 --- a/pkg/sidecar/annotation_test.go +++ b/pkg/sidecar/annotation_test.go @@ -15,27 +15,24 @@ package sidecar_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) -var _ = Describe("Annotation", func() { - - DescribeTable("determine the right effective annotation value", - func(expected string, pod corev1.Pod, ns corev1.Namespace) { - // test - annValue := sidecar.AnnotationValue(ns, pod) - - // verify - Expect(annValue).To(Equal(expected)) - }, - - Entry("pod-true-overrides-ns", +func TestEffectiveAnnotationValue(t *testing.T) { + for _, tt := range []struct { + desc string + expected string + pod corev1.Pod + ns corev1.Namespace + }{ + { + "pod-true-overrides-ns", "true", corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -51,9 +48,10 @@ var _ = Describe("Annotation", func() { }, }, }, - ), + }, - Entry("ns-has-concrete-instance", + { + "ns-has-concrete-instance", "some-instance", corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -69,9 +67,10 @@ var _ = Describe("Annotation", func() { }, }, }, - ), + }, - Entry("pod-has-concrete-instance", + { + "pod-has-concrete-instance", "some-instance-from-pod", corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -87,9 +86,10 @@ var _ = Describe("Annotation", func() { }, }, }, - ), + }, - Entry("pod-has-explicit-false", + { + "pod-has-explicit-false", "false", corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -105,9 +105,10 @@ var _ = Describe("Annotation", func() { }, }, }, - ), + }, - Entry("pod-has-no-annotations", + { + "pod-has-no-annotations", "some-instance", corev1.Pod{}, corev1.Namespace{ @@ -117,9 +118,10 @@ var _ = Describe("Annotation", func() { }, }, }, - ), + }, - Entry("ns-has-no-annotations", + { + "ns-has-no-annotations", "true", corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -129,7 +131,14 @@ var _ = Describe("Annotation", func() { }, }, corev1.Namespace{}, - ), - ) + }, + } { + t.Run(tt.desc, func(t *testing.T) { + // test + annValue := sidecar.AnnotationValue(tt.ns, tt.pod) -}) + // verify + assert.Equal(t, tt.expected, annValue) + }) + } +} diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 950f11189..d7c8795dc 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -15,9 +15,9 @@ package sidecar_test import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/ginkgo/extensions/table" - . "github.com/onsi/gomega" + "testing" + + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -28,114 +28,121 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) -var _ = Describe("Pod", func() { - logger := logf.Log.WithName("unit-tests") +var logger = logf.Log.WithName("unit-tests") - It("should add sidecar when none exists", func() { - // prepare - pod := corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - {Name: "my-app"}, - }, - // cross-test: the pod has a volume already, make sure we don't remove it - Volumes: []corev1.Volume{{}}, +func TestAddSidecarWhenNoSidecarExists(t *testing.T) { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, }, - } - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "otelcol-sample", - Namespace: "some-app", + // cross-test: the pod has a volume already, make sure we don't remove it + Volumes: []corev1.Volume{{}}, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "otelcol-sample", + Namespace: "some-app", + }, + } + cfg := config.New(config.WithCollectorImage("some-default-image")) + + // test + changed, err := sidecar.Add(cfg, logger, otelcol, pod) + + // verify + assert.NoError(t, err) + assert.Len(t, changed.Spec.Containers, 2) + assert.Len(t, changed.Spec.Volumes, 2) + assert.Equal(t, "some-app.otelcol-sample", changed.Labels["sidecar.opentelemetry.io/injected"]) +} + +// this situation should never happen in the current code path, but it should not fail +// if it's asked to add a new sidecar. The caller is expected to have called ExistsIn before. +func TestAddSidecarWhenOneExistsAlready(t *testing.T) { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, }, - } - cfg := config.New(config.WithCollectorImage("some-default-image")) - - // test - changed, err := sidecar.Add(cfg, logger, otelcol, pod) - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(changed.Spec.Containers).To(HaveLen(2)) - Expect(changed.Spec.Volumes).To(HaveLen(2)) - Expect(changed.Labels["sidecar.opentelemetry.io/injected"]).To(Equal("some-app.otelcol-sample")) - }) - - // this situation should never happen in the current code path, but it should not fail - // if it's asked to add a new sidecar. The caller is expected to have called ExistsIn before. - It("should add sidecar, even when one exists", func() { - // prepare - pod := corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - {Name: "my-app"}, - {Name: naming.Container()}, - }, - }, - } - otelcol := v1alpha1.OpenTelemetryCollector{} - cfg := config.New(config.WithCollectorImage("some-default-image")) - - // test - changed, err := sidecar.Add(cfg, logger, otelcol, pod) - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(changed.Spec.Containers).To(HaveLen(3)) - }) - - It("should remove the sidecar", func() { - // prepare - pod := corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - {Name: "my-app"}, - {Name: naming.Container()}, - {Name: naming.Container()}, // two sidecars! should remove both - }, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New(config.WithCollectorImage("some-default-image")) + + // test + changed, err := sidecar.Add(cfg, logger, otelcol, pod) + + // verify + assert.NoError(t, err) + assert.Len(t, changed.Spec.Containers, 3) +} + +func TestRemoveSidecar(t *testing.T) { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, + {Name: naming.Container()}, // two sidecars! should remove both }, - } - - // test - changed, err := sidecar.Remove(pod) - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(changed.Spec.Containers).To(HaveLen(1)) - }) - - It("should not fail to remove when sidecar doesn't exist", func() { - // prepare - pod := corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - {Name: "my-app"}, - }, + }, + } + + // test + changed, err := sidecar.Remove(pod) + + // verify + assert.NoError(t, err) + assert.Len(t, changed.Spec.Containers, 1) +} + +func TestRemoveNonExistingSidecar(t *testing.T) { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, }, - } - - // test - changed, err := sidecar.Remove(pod) - - // verify - Expect(err).ToNot(HaveOccurred()) - Expect(changed.Spec.Containers).To(HaveLen(1)) - }) - - DescribeTable("determine whether the pod has a sidecar already", func(expected bool, pod corev1.Pod) { - Expect(sidecar.ExistsIn(pod)).To(Equal(expected)) - }, - Entry("has-sidecar", true, corev1.Pod{ + }, + } + + // test + changed, err := sidecar.Remove(pod) + + // verify + assert.NoError(t, err) + assert.Len(t, changed.Spec.Containers, 1) +} + +func TestExistsIn(t *testing.T) { + for _, tt := range []struct { + desc string + expected bool + pod corev1.Pod + }{ + {"has-sidecar", true, corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ {Name: "my-app"}, {Name: naming.Container()}, }, }, - }), - Entry("does-not-have-sidecar", false, corev1.Pod{ + }}, + + {"does-not-have-sidecar", false, corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{}, }, - }), - ) -}) + }}, + } { + t.Run(tt.desc, func(t *testing.T) { + assert.Equal(t, tt.expected, sidecar.ExistsIn(tt.pod)) + }) + } +} diff --git a/pkg/sidecar/sidecar_suite_test.go b/pkg/sidecar/sidecar_suite_test.go deleted file mode 100644 index ec4acb41d..000000000 --- a/pkg/sidecar/sidecar_suite_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sidecar_test - -import ( - "testing" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func TestSidecar(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Sidecar Suite") -} From 27b247db85b9834b6cc1758dfde6d4c23cb7ffeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2020 19:54:33 +0000 Subject: [PATCH 0103/1234] Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 (#123) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.6.1.
Release notes

Sourced from github.com/stretchr/testify's releases.

Fixes breaking change with HTTPBodyContains

A breaking change was accidentally released in v1.6.0 which breaks the API for the HTTPBodyContains and HTTPBodyNotContains, this release reverts that change.

v1.6.0

Latest release of testify. This includes many fixes and enhancements. Please view the v1.6.0 milestone for a list of changes.

HOTFIX: Revert suite interface type

This is a hotfix which reverts the suite package's interface type to use testing.T

v1.5.0

Latest, non-breaking changes merged into master. Please peruse the git log for a detailed changelist

Commits
  • f654a91 Update Go versions in Travis
  • 3184a9e This reverts commit 0a813b5898c0ee8d00b4f13fae21ea5df8b35e74.
  • e2b269e This reverts commit 2adb7b54b75da2c74e9342ed115957fe0b07e0b4.
  • 6353e56 This reverts commit 9d083cac4a26c76f8d92dff41d459f3f2fc0b911.
  • 6561324 This reverts commit 484fff1ace1f0acb84676a548b53477685c16414.
  • 46420cf This reverts commit 1a43b8334acb9df58064b765cd16675cc7c2c8b3.
  • 303198d Revert "allow body for HTTPBodyContains and HTTPBodyNotContains for
  • e7cc868 Update TravisCI config
  • 004e3cb commit generated files
  • ac1463f Implement NotEqualValues
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.4.0&new-version=1.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 236e21c26..745236e2f 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.0 github.com/go-logr/logr v0.3.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.4.0 + github.com/stretchr/testify v1.6.1 gopkg.in/yaml.v2 v2.3.0 k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 diff --git a/go.sum b/go.sum index 7d9db96c3..237686d40 100644 --- a/go.sum +++ b/go.sum @@ -300,15 +300,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= -github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -374,6 +370,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -464,8 +462,6 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0 h1:wBouT66WTYFXdxfVdz9sVWARVd/2vfGcmI45D2gj45M= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -505,12 +501,9 @@ golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -617,6 +610,8 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= From 95594db74c1975a6fa0a9de0c5bbbbdc02d27200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 23 Nov 2020 11:39:04 +0100 Subject: [PATCH 0104/1234] Auto-merge dependabot PRs when they pass CI (#126) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/mergify.yml b/.github/mergify.yml index abe72f5d3..2f7aba8a3 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -12,6 +12,20 @@ pull_request_rules: - "status-success=Unit tests" - "status-success=Code standards (linting)" - "status-success=Security" + - "status-success=CodeQL" + - "status-success=EasyCLA" + actions: + merge: + method: squash + commit_message: title+body + + - name: automatic merge for Dependabot pull requests + conditions: + - author~=^dependabot(|-preview)\[bot\]$ + - "status-success=Unit tests" + - "status-success=Code standards (linting)" + - "status-success=Security" + - "status-success=CodeQL" - "status-success=EasyCLA" actions: merge: From 0e5a5661a00d81a28696fa77c3b23941602f0eda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2020 10:51:42 +0000 Subject: [PATCH 0105/1234] Bump sigs.k8s.io/controller-runtime from 0.6.3 to 0.6.4 (#124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.6.3 to 0.6.4.
Release notes

Sourced from sigs.k8s.io/controller-runtime's releases.

v0.6.4

Changes since v0.6.3

:sparkles: New Features

  • Support for metadata-only watches (#1248)

    ⚠️ If you're upgrading from v0.5.12 metadata only watch functionality has breaking changes, in particular the OnlyMetadata wrapper introduced in v0.5.12 is now deprecated.

    Migration example If one has a controller that reconciles Deployments and owns ReplicaSets and only watches their metadata, with v0.5.12 the controller can be created with something like the following:

    ControllerManagedBy(mgr).
    For(OnlyMetadata(&appsv1.Deployment{})).
    Owns(OnlyMetadata(&appsv1.ReplicaSet{})).
    

    With this release, the code must be changed as shown below:

    ControllerManagedBy(mgr).
    For(&appsv1.Deployment{}, OnlyMetadata).
    Owns(&appsv1.ReplicaSet{}, OnlyMetadata)
    

:bug: Bug Fixes

  • Ensure that webhook server is thread/start-safe (#1225)

Thanks to all our contributors! 😊

Commits
  • 7fc9110 Merge pull request #1248 from ncdc/0.6/metadata-only-watch
  • b3d7cf1 Merge pull request #1225 from adrianludwin/release-0.6
  • fa91e1b :sparkles: Allow to use builder.OnlyMetadata option with Watches
  • dbc25a8 Support metadata-only watches
  • 0f11ed4 Ensure that webhook server is thread/start-safe
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigs.k8s.io/controller-runtime&package-manager=go_modules&previous-version=0.6.3&new-version=0.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 745236e2f..f20b08d15 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 k8s.io/kubectl v0.19.4 - sigs.k8s.io/controller-runtime v0.6.3 + sigs.k8s.io/controller-runtime v0.6.4 ) replace ( diff --git a/go.sum b/go.sum index 237686d40..2e2141a40 100644 --- a/go.sum +++ b/go.sum @@ -660,8 +660,8 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhvlJtrvDcwIpm+uhDvp63Bl72xYJtoOE= -sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= +sigs.k8s.io/controller-runtime v0.6.4 h1:4013CKsBs5bEqo+LevzDett+LLxag/FjQWG94nVZ/9g= +sigs.k8s.io/controller-runtime v0.6.4/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= From 535391f3e293461636f632096077da53536ee5f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Nov 2020 09:39:43 +0000 Subject: [PATCH 0106/1234] Bump github.com/Masterminds/semver/v3 from 3.1.0 to 3.1.1 (#127) Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.1.0 to 3.1.1.
Release notes

Sourced from github.com/Masterminds/semver/v3's releases.

v3.1.1

Fixed

  • #158: Fixed issue with generated regex operation order that could cause problem
Changelog

Sourced from github.com/Masterminds/semver/v3's changelog.

3.1.1 (2020-11-23)

Fixed

  • #158: Fixed issue with generated regex operation order that could cause problem
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/Masterminds/semver/v3&package-manager=go_modules&previous-version=3.1.0&new-version=3.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f20b08d15..2feb2f10f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-operator go 1.13 require ( - github.com/Masterminds/semver/v3 v3.1.0 + github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v0.3.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 diff --git a/go.sum b/go.sum index 2e2141a40..94c0bd7e2 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= -github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= From 737dc028b69615f4cf750ee606b35465925724ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Nov 2020 06:50:25 +0000 Subject: [PATCH 0107/1234] Bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0 (#130) Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.3.0 to 2.4.0.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gopkg.in/yaml.v2&package-manager=go_modules&previous-version=2.3.0&new-version=2.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2feb2f10f..a4bca49d9 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/go-logr/logr v0.3.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 - gopkg.in/yaml.v2 v2.3.0 + gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.19.4 k8s.io/apimachinery v0.19.4 k8s.io/client-go v0.19.4 diff --git a/go.sum b/go.sum index 94c0bd7e2..278aec80b 100644 --- a/go.sum +++ b/go.sum @@ -610,6 +610,8 @@ gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= From 0989f312863022527427456fc3462805268755c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 30 Nov 2020 10:24:45 +0100 Subject: [PATCH 0108/1234] Bumped OpenTelemetry Collector to v0.15.0 (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 4 +++ pkg/collector/upgrade/v0_15_0.go | 13 +++++++ pkg/collector/upgrade/v0_15_0_test.go | 49 +++++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 +++ versions.txt | 4 +-- 5 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 pkg/collector/upgrade/v0_15_0.go create mode 100644 pkg/collector/upgrade/v0_15_0_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 248705614..141213cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.15.0 (2020-11-27) +------------------- +* Bumped OpenTelemetry Collector to v0.15.0 ([#131](https://github.com/open-telemetry/opentelemetry-operator/pull/131), [@jpkrohling](https://github.com/jpkrohling)) + 0.14.0 (2020-11-09) ------------------- * Bumped OpenTelemetry Collector to v0.14.0 ([#112](https://github.com/open-telemetry/opentelemetry-operator/pull/112), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go new file mode 100644 index 000000000..188888b9e --- /dev/null +++ b/pkg/collector/upgrade/v0_15_0.go @@ -0,0 +1,13 @@ +package upgrade + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + delete(otelcol.Spec.Args, "--new-metrics") + delete(otelcol.Spec.Args, "--legacy-metrics") + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go new file mode 100644 index 000000000..90e021835 --- /dev/null +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -0,0 +1,49 @@ +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func TestRemoveMetricsTypeFlags(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + // this would not happen in the real world, as it's either one or another, but we aren't going that far + "--new-metrics": "true", + "--legacy-metrics": "true", + }, + }, + } + existing.Status.Version = "0.9.0" + + // sanity check + require.Contains(t, existing.Spec.Args, "--new-metrics") + require.Contains(t, existing.Spec.Args, "--legacy-metrics") + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.NotContains(t, res.Spec.Args, "--new-metrics") + assert.NotContains(t, res.Spec.Args, "--legacy-metrics") +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 81df33be8..da3feedce 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -24,6 +24,10 @@ var ( Version: *semver.MustParse("0.9.0"), upgrade: upgrade0_9_0, }, + { + Version: *semver.MustParse("0.15.0"), + upgrade: upgrade0_15_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/versions.txt b/versions.txt index 44820f103..eb4d9a395 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.14.0 +opentelemetry-collector=0.15.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.14.0 +operator=0.15.0 From 24f972645a631e62393ffb67a987b23207353d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 30 Nov 2020 16:46:34 +0100 Subject: [PATCH 0109/1234] Bump setup-operator-sdk to v1.0.2 (#132) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2be909bd4..138fa336b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh - - uses: jpkrohling/setup-operator-sdk@v1-release + - uses: jpkrohling/setup-operator-sdk@v1.0.2 with: operator-sdk-version: v0.19.0 From 0924b54702bef4d555a642fff24a756df5ebea63 Mon Sep 17 00:00:00 2001 From: KingJ Date: Tue, 1 Dec 2020 09:27:45 +0000 Subject: [PATCH 0110/1234] Explicitly set Service Port Protocol for Jaeger Receivers (#117) The service port created for each Jaeger receiver does not currently set a Protocol, and therefore defaults to TCP. Some Jaeger receiver protocols (i.e. thrift_binary and thrift_compact) are UDP based rather than TCP, and therefore the operator currently creates service port entries that cannot be used due to the protocol mismatch. For example, the following manifest will currently create service port entries with the wrong protocol for thrift_compact and thrift_binary protocols; ``` apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: simplest spec: config: | receivers: jaeger: protocols: grpc: thrift_compact: thrift_binary: thrift_http: processors: queued_retry: exporters: logging: loglevel: debug service: pipelines: traces: receivers: [jaeger] processors: [queued_retry] exporters: [logging] ``` ``` Type: ClusterIP IP: 10.233.59.118 Port: jaeger-grpc 14250/TCP TargetPort: 14250/TCP Endpoints: 10.233.110.188:14250 Port: jaeger-thrift-http 14268/TCP TargetPort: 14268/TCP Endpoints: 10.233.110.188:14268 Port: jaeger-thrift-compact 6831/TCP TargetPort: 6831/TCP Endpoints: 10.233.110.188:6831 Port: jaeger-thrift-binary 6832/TCP TargetPort: 6832/TCP Endpoints: 10.233.110.188:6832 ``` This PR fixes this behavior by extending the protocol struct to also include each Jaeger receiver protocol's protocol and set the service port's protocol when a new Jaeger receiver is created. I have also updated the Jaeger receiver test cases to expect the correct service port protocol for each Jaeger receiver protocol, and they all pass. I have also tested this manually against my own cluster and confirmed that the service port protocol is set for UDP for thrift_binary and thrift_compact both when an endpoint is explicitly defined and when left unset. I'm still quite new to OpenTelemetry, so i'm open to feedback if i've misunderstood things! --- pkg/collector/parser/receiver_jaeger.go | 28 +++++++++++++------- pkg/collector/parser/receiver_jaeger_test.go | 17 +++++++----- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/pkg/collector/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go index ec3ff16a4..9ca3e3a03 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -46,24 +46,29 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { ports := []corev1.ServicePort{} for _, protocol := range []struct { - name string - defaultPort int32 + name string + defaultPort int32 + transportProtocol corev1.Protocol }{ { - name: "grpc", - defaultPort: defaultGRPCPort, + name: "grpc", + defaultPort: defaultGRPCPort, + transportProtocol: corev1.ProtocolTCP, }, { - name: "thrift_http", - defaultPort: defaultThriftHTTPPort, + name: "thrift_http", + defaultPort: defaultThriftHTTPPort, + transportProtocol: corev1.ProtocolTCP, }, { - name: "thrift_compact", - defaultPort: defaultThriftCompactPort, + name: "thrift_compact", + defaultPort: defaultThriftCompactPort, + transportProtocol: corev1.ProtocolUDP, }, { - name: "thrift_binary", - defaultPort: defaultThriftBinaryPort, + name: "thrift_binary", + defaultPort: defaultThriftBinaryPort, + transportProtocol: corev1.ProtocolUDP, }, } { // do we have the protocol specified at all? @@ -87,6 +92,9 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { } } + // set the appropriate transport protocol (i.e. TCP/UDP) for this kind of receiver protocol + protocolPort.Protocol = protocol.transportProtocol + // at this point, we *have* a port specified, add it to the list of ports ports = append(ports, *protocolPort) } diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 46bd0a16e..3c1b12450 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" ) func TestJaegerSelfRegisters(t *testing.T) { @@ -34,6 +35,7 @@ func TestJaegerMinimalConfiguration(t *testing.T) { assert.NoError(t, err) assert.Len(t, ports, 1) assert.EqualValues(t, 14250, ports[0].Port) + assert.EqualValues(t, corev1.ProtocolTCP, ports[0].Protocol) } func TestJaegerPortsOverridden(t *testing.T) { @@ -53,6 +55,7 @@ func TestJaegerPortsOverridden(t *testing.T) { assert.NoError(t, err) assert.Len(t, ports, 1) assert.EqualValues(t, 1234, ports[0].Port) + assert.EqualValues(t, corev1.ProtocolTCP, ports[0].Protocol) } func TestJaegerExposeDefaultPorts(t *testing.T) { @@ -67,13 +70,14 @@ func TestJaegerExposeDefaultPorts(t *testing.T) { }) expectedResults := map[string]struct { - portNumber int32 - seen bool + portNumber int32 + seen bool + transportProtocol corev1.Protocol }{ - "jaeger-grpc": {portNumber: 14250}, - "jaeger-thrift-http": {portNumber: 14268}, - "jaeger-thrift-compact": {portNumber: 6831}, - "jaeger-thrift-binary": {portNumber: 6832}, + "jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP}, + "jaeger-thrift-http": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP}, + "jaeger-thrift-compact": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP}, + "jaeger-thrift-binary": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP}, } // test @@ -88,6 +92,7 @@ func TestJaegerExposeDefaultPorts(t *testing.T) { r.seen = true expectedResults[port.Name] = r assert.EqualValues(t, r.portNumber, port.Port) + assert.EqualValues(t, r.transportProtocol, port.Protocol) } for k, v := range expectedResults { assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) From f0ea1b803192de4bc7417f81c6830a3edb34478e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 2 Dec 2020 11:43:32 +0100 Subject: [PATCH 0111/1234] Fix image prefix for release image (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 138fa336b..1fab8f6b4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: operator-sdk-version: v0.19.0 - name: "generate release resources" - run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry/opentelemetry-operator" + run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" - name: "publish the images" env: From 844ae6e8260db60d68e0f7bb4ae50dfb8c21df9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 4 Dec 2020 13:27:48 +0100 Subject: [PATCH 0112/1234] Bumped OpenTelemetry Collector to v0.16.0 (#135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 8 ++ pkg/collector/parser/receiver_generic_test.go | 1 - pkg/collector/parser/receiver_otlp.go | 104 ++++++++++++++++-- pkg/collector/parser/receiver_otlp_test.go | 72 +++++++++++- versions.txt | 4 +- 5 files changed, 177 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 141213cd7..a0468295b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.16.0 (2020-12-03) +------------------- +* Bumped OpenTelemetry Collector to v0.16.0 ([#135](https://github.com/open-telemetry/opentelemetry-operator/pull/135), [@jpkrohling](https://github.com/jpkrohling)) +* Fix image prefix for release image ([#133](https://github.com/open-telemetry/opentelemetry-operator/pull/133), [@jpkrohling](https://github.com/jpkrohling)) +* Explicitly set Service Port Protocol for Jaeger Receivers ([#117](https://github.com/open-telemetry/opentelemetry-operator/pull/117), [@KingJ](https://github.com/KingJ)) + +_Note: The default port for the OTLP receiver has been changed from 55680 to 4317. To keep compatibility with your existing workload, the operator is now generating a service with the two port numbers by default. Both have 4317 as the target port._ + 0.15.0 (2020-11-27) ------------------- * Bumped OpenTelemetry Collector to v0.15.0 ([#131](https://github.com/open-telemetry/opentelemetry-operator/pull/131), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index dba6b7961..bf05cc342 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -52,7 +52,6 @@ func TestDownstreamParsers(t *testing.T) { }{ {"zipkin", "zipkin", "__zipkin", 9411, parser.NewZipkinReceiverParser}, {"opencensus", "opencensus", "__opencensus", 55678, parser.NewOpenCensusReceiverParser}, - {"otlp", "otlp", "__otlp", 55680, parser.NewOTLPReceiverParser}, // contrib receivers {"carbon", "carbon", "__carbon", 2003, parser.NewCarbonReceiverParser}, diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index acf19b6fa..57bd2706c 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -1,18 +1,106 @@ package parser -import "github.com/go-logr/logr" +import ( + "fmt" -const parserNameOTLP = "__otlp" + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +var _ ReceiverParser = &OTLPReceiverParser{} + +const ( + parserNameOTLP = "__otlp" + + defaultOTLPGRPCPort int32 = 4317 + defaultOTLPGRPCLegacyPort int32 = 55680 + defaultOTLPHTTPPort int32 = 55681 +) + +// OTLPReceiverParser parses the configuration for OTLP receivers +type OTLPReceiverParser struct { + logger logr.Logger + name string + config map[interface{}]interface{} +} // NewOTLPReceiverParser builds a new parser for OTLP receivers func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 55680, - parserName: parserNameOTLP, + if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { + return &OTLPReceiverParser{ + logger: logger, + name: name, + config: protocols, + } + } + + return &OTLPReceiverParser{ + name: name, + config: map[interface{}]interface{}{}, + } +} + +// Ports returns all the service ports for all protocols in this parser +func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { + ports := []corev1.ServicePort{} + + for _, protocol := range []struct { + name string + defaultPorts []corev1.ServicePort + }{ + { + name: "grpc", + defaultPorts: []corev1.ServicePort{ + { + Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), + Port: defaultOTLPGRPCPort, + TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), + }, + { + Name: portName(fmt.Sprintf("%s-grpc-legacy", o.name), defaultOTLPGRPCLegacyPort), + Port: defaultOTLPGRPCLegacyPort, + TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), // we target the official port, not the legacy + }, + }, + }, + { + name: "http", + defaultPorts: []corev1.ServicePort{{ + Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), + Port: defaultOTLPHTTPPort, + TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), + }}, + }, + } { + // do we have the protocol specified at all? + if receiverProtocol, ok := o.config[protocol.name]; ok { + // we have the specified protocol, we definitely need a service port + nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) + var protocolPort *corev1.ServicePort + + // do we have a configuration block for the protocol? + settings, ok := receiverProtocol.(map[interface{}]interface{}) + if ok { + protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) + } + + // have we parsed a port based on the configuration block? + // if not, we use the default port + if protocolPort == nil { + ports = append(ports, protocol.defaultPorts...) + } else { + ports = append(ports, *protocolPort) + } + } } + + return ports, nil +} + +// ParserName returns the name of this parser +func (o *OTLPReceiverParser) ParserName() string { + return parserNameOTLP } func init() { diff --git a/pkg/collector/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go index 5f45a8640..6d2154a8e 100644 --- a/pkg/collector/parser/receiver_otlp_test.go +++ b/pkg/collector/parser/receiver_otlp_test.go @@ -1,3 +1,73 @@ package parser -// all tests for the OTLP parser are currently part of the test TestDownstreamParsers +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestOTLPSelfRegisters(t *testing.T) { + // verify + assert.True(t, IsRegistered("otlp")) +} + +func TestOTLPIsFoundByName(t *testing.T) { + // test + p := For(logger, "otlp", map[interface{}]interface{}{}) + + // verify + assert.Equal(t, "__otlp", p.ParserName()) +} + +func TestOTLPPortsOverridden(t *testing.T) { + // prepare + builder := NewOTLPReceiverParser(logger, "otlp", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, + }, + }) + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 1) + assert.EqualValues(t, 1234, ports[0].Port) +} + +func TestOTLPExposeDefaultPorts(t *testing.T) { + // prepare + builder := NewOTLPReceiverParser(logger, "otlp", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "otlp-grpc": {portNumber: 4317}, + "otlp-grpc-legacy": {portNumber: 55680}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 2) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} diff --git a/versions.txt b/versions.txt index eb4d9a395..345e87053 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.15.0 +opentelemetry-collector=0.16.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.15.0 +operator=0.16.0 From b88d18200cb516ed2dfe4d18d36007d2c0d4c584 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 06:38:24 +0000 Subject: [PATCH 0113/1234] Bump k8s.io/apimachinery from 0.19.4 to 0.20.0 (#137) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.19.4 to 0.20.0.
Commits
  • 2456ebd Merge pull request #95981 from caesarxuchao/http2-healthcheck
  • 859536f Merge pull request #96317 from Jefftree/test-ssa
  • e8cd3b1 Update kube-openapi
  • 65a627a Merge pull request #96425 from bobbypage/vendor-cadvisor-v0.38
  • bd89392 vendor: cadvisor v0.38.4
  • 3231570 Merge pull request #96549 from caesarxuchao/net-sys-dep-update
  • 88452b9 update golang.org/x/net and golang.org/x/sys
  • 671277b Merge pull request #94866 from smarterclayton/scheduling_metrics
  • 5ff8662 allow configuring ReadIdelTimeout and PingTimeout via env var
  • f364803 configure the ReadIdleTimeout and PingTimeout of the h2 transport
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/apimachinery&package-manager=go_modules&previous-version=0.19.4&new-version=0.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index a4bca49d9..de322be8c 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/stretchr/testify v1.6.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.19.4 - k8s.io/apimachinery v0.19.4 + k8s.io/apimachinery v0.20.0 k8s.io/client-go v0.19.4 k8s.io/kubectl v0.19.4 sigs.k8s.io/controller-runtime v0.6.4 diff --git a/go.sum b/go.sum index 278aec80b..f7de6c8a1 100644 --- a/go.sum +++ b/go.sum @@ -176,6 +176,8 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -192,6 +194,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= @@ -202,6 +206,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -213,6 +220,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= @@ -462,6 +471,8 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -504,12 +515,17 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -546,6 +562,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -587,6 +605,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -630,6 +650,8 @@ k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKi k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= +k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/cli-runtime v0.19.4/go.mod h1:m8G32dVbKOeaX1foGhleLEvNd6REvU7YnZyWn5//9rw= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= @@ -650,9 +672,13 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.19.4 h1:XFrHibf5fS4Ot8h3EnzdVsKrYj+pndlzKbwPkfra5hI= k8s.io/kubectl v0.19.4/go.mod h1:XPmlu4DJEYgD83pvZFeKF8+MSvGnYGqunbFSrJsqHv0= k8s.io/metrics v0.19.4/go.mod h1:a0gvAzrxQPw2ouBqnXI7X9qlggpPkKAFgWU/Py+KZiU= @@ -669,6 +695,8 @@ sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From ceb92c89243769809e6c848dfd42bd862e5f21b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Dec 2020 07:27:42 +0000 Subject: [PATCH 0114/1234] Bump k8s.io/kubectl from 0.19.4 to 0.20.0 (#136) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.19.4 to 0.20.0.
Commits
  • 977e733 Update dependencies to v0.20.0 tag
  • 9e67abf Integrate defaults marker and remove ContainerPort defaulter
  • 36f4fcc Update kube-openapi
  • f39294d Merge pull request #96425 from bobbypage/vendor-cadvisor-v0.38
  • c6e9728 vendor: cadvisor v0.38.4
  • 7255401 Merge pull request #96549 from caesarxuchao/net-sys-dep-update
  • e505548 update golang.org/x/net and golang.org/x/sys
  • c6f5a3d Merge pull request #95256 from Git-Jiro/remove_generator_from_service
  • a81b1e4 Merge pull request #96190 from soltysh/kubectl_staging
  • cfb4414 Merge pull request #94663 from soltysh/fatal_level
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/kubectl&package-manager=go_modules&previous-version=0.19.4&new-version=0.20.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 6 +- go.sum | 201 +++++++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 163 insertions(+), 44 deletions(-) diff --git a/go.mod b/go.mod index de322be8c..4dbc73e23 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.19.4 + k8s.io/api v0.20.0 k8s.io/apimachinery v0.20.0 - k8s.io/client-go v0.19.4 - k8s.io/kubectl v0.19.4 + k8s.io/client-go v0.20.0 + k8s.io/kubectl v0.20.0 sigs.k8s.io/controller-runtime v0.6.4 ) diff --git a/go.sum b/go.sum index f7de6c8a1..e396cdd21 100644 --- a/go.sum +++ b/go.sum @@ -5,25 +5,41 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= @@ -42,7 +58,10 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -50,7 +69,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -64,6 +85,7 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -102,16 +124,18 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 h1:AfLWrOEtyI9WI9aaDF0GN/6FQu+rNvl2YUeizB6FYuk= -github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:AlRx4sdoz6EdWGYPMeunQWYf46cKnq7J4iVvLgyb5cY= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -181,11 +205,14 @@ github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4er github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -216,6 +243,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= @@ -230,19 +259,38 @@ github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1a github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -257,6 +305,7 @@ github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -274,6 +323,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -281,13 +331,21 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -314,7 +372,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -324,6 +383,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -346,16 +406,22 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= @@ -363,7 +429,7 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -371,7 +437,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -381,15 +447,14 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -401,6 +466,7 @@ go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -410,6 +476,7 @@ go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -419,15 +486,21 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -436,12 +509,16 @@ golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -449,7 +526,9 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -458,19 +537,21 @@ golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -478,6 +559,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -485,9 +568,11 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -502,23 +587,29 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -531,6 +622,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -541,6 +634,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -554,9 +648,23 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -570,7 +678,12 @@ google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -585,16 +698,25 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -603,8 +725,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -617,6 +737,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -642,29 +763,29 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.19.4 h1:I+1I4cgJYuCDgiLNjKx7SLmIbwgj9w7N7Zr5vSIdwpo= -k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.19.4 h1:+ZoddM7nbzrDCp0T3SWnyxqf8cbWPT2fkZImoyvHUG0= -k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= -k8s.io/cli-runtime v0.19.4/go.mod h1:m8G32dVbKOeaX1foGhleLEvNd6REvU7YnZyWn5//9rw= +k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s= k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.19.4 h1:85D3mDNoLF+xqpyE9Dh/OtrJDyJrSRKkHmDXIbEzer8= -k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= +k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= -k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70= +k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= +k8s.io/component-helpers v0.20.0/go.mod h1:nx6NOtfSfGOxnSZsDJxpGbnsVuUA1UXpwDvZIrtigNk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= @@ -675,26 +796,24 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.19.4 h1:XFrHibf5fS4Ot8h3EnzdVsKrYj+pndlzKbwPkfra5hI= -k8s.io/kubectl v0.19.4/go.mod h1:XPmlu4DJEYgD83pvZFeKF8+MSvGnYGqunbFSrJsqHv0= -k8s.io/metrics v0.19.4/go.mod h1:a0gvAzrxQPw2ouBqnXI7X9qlggpPkKAFgWU/Py+KZiU= +k8s.io/kubectl v0.20.0 h1:q6HH6jILYi2lkzFqBhs63M4bKLxYlM0HpFJ///MgARA= +k8s.io/kubectl v0.20.0/go.mod h1:8x5GzQkgikz7M2eFGGuu6yOfrenwnw5g4RXOUgbjR1M= +k8s.io/metrics v0.20.0/go.mod h1:9yiRhfr8K8sjdj2EthQQE9WvpYDvsXIV3CjN4Ruq4Jw= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/controller-runtime v0.6.4 h1:4013CKsBs5bEqo+LevzDett+LLxag/FjQWG94nVZ/9g= sigs.k8s.io/controller-runtime v0.6.4/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From 06bfecde8c9be6473f6af27c6ca611d5195c6054 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Dec 2020 09:44:31 +0000 Subject: [PATCH 0115/1234] Bump sigs.k8s.io/controller-runtime from 0.6.4 to 0.7.0 (#139) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.6.4 to 0.7.0.
Release notes

Sourced from sigs.k8s.io/controller-runtime's releases.

v0.7.0

Changes since v0.6.4

:warning: Breaking Changes

Use client.Object & client.ObjectList

A number of methods that previously took runtime.Object & internally type-asserted them to metav1.Object now take client.Object (for non-list objects) or client.ObjectList (for lists). The practical upshot of this is more type-safety and clarity around what's required for particular methods.

All concrete API types (anything that implements runtime.Object & has a metadata field) already implement client.Object or client.ObjectList, so practical impact should be limited to folks who pass around runtime.Object values instead of concrete types.

  • Introduce and use client.Object and client.ObjectList (#1195)
  • Use client.Object for event handlers (#1118)
  • Fakeclient: Allow to pass ObjectLists to constructors (#1259)
  • client.ObjectKeyFromObject now uses client.Object (#1224)
  • Handler: Remove MapObject type and use client.Object directly (#1207)
  • Use client.Object interface in envtest (#1200)

High-Impact

  • pkg/webhook/admission: upgrade v1beta1 admission types to v1 (#1284)

    Impact: construct v1 Go types instead of v1beta1. Both versions are supported on the wire.

  • Change leaderlock from ConfigMap to ConfigMapsLeasesResourceLock (#1144)

    Impact: New RBAC permissions are needed by default for leaderelection (for the coordination/v1 API). The new lock will automatically deal with existing configmap locks (e.g. during upgrades). The can be set to its previous value ("configmaps") in manager.Options.

  • Propagate context.Context throughout the codebase (#1116)

    Impact: update various methods to accept a context.Context object, which can be used to structure timeouts and stopping loops/operations in lieu of channels

  • Change default webhook port to 9443 (#1076)

    Impact: update your deployment configuration to use port 9443, or manually configure the webhook port in manager Options.

  • Remove logs from internal controller (#1096)

    Impact: automatic logs for "succesful reconcile" no longer exist (it tended to duplicate manual logs that folks had in place).

  • Remove deprecated "--master" flag (#1039)

... (truncated)

Commits
  • f7a3dc6 Merge pull request #1293 from estroz/bugfix/webhook-admissionreview-version
  • 27ef229 pkg/webhook/admission: set GVK on AdmissionReview responses
  • 3410e75 Merge pull request #1289 from timebertt/fix/inject-manager-logger
  • b9197ef :bug: Inject manager's logger instead of internal one
  • 43331a6 Merge pull request #1288 from vincepri/add-test-unstrucutred-list
  • 52ba546 Add test that checks List works on UnstructuredList not in Scheme
  • 758d268 Merge pull request #1284 from estroz/feature/wh-admissionreview-v1
  • 8161d1c pkg/webhook/admission: upgrade v1beta1 admission types to v1
  • f349d96 Merge pull request #1281 from vincepri/fake-client-builder
  • d915eb1 :sparkles: Add fake.NewClientBuilder to build new fake clients
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigs.k8s.io/controller-runtime&package-manager=go_modules&previous-version=0.6.4&new-version=0.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- ...ntelemetry.io_opentelemetrycollectors.yaml | 38 +++--- .../opentelemetrycollector_controller.go | 2 +- .../opentelemetrycollector_controller_test.go | 6 +- go.mod | 2 +- go.sum | 122 ++++++++++-------- internal/podinjector/main_test.go | 8 +- main.go | 6 +- 7 files changed, 97 insertions(+), 87 deletions(-) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c299bc87f..f726c1658 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -210,11 +210,14 @@ spec: type: string nodePort: description: 'The port on each node on which this service is exposed - when type=NodePort or LoadBalancer. Usually assigned by the - system. If specified, it will be allocated to the service if - unused or else creation of the service will fail. Default is - to auto-allocate a port if the ServiceType of this Service requires - one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + when type is NodePort or LoadBalancer. Usually assigned by + the system. If a value is specified, in-range, and not in use + it will be used, otherwise the operation will fail. If not + specified, a port will be allocated if this Service requires + one. If this field is specified when creating a Service which + does not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' format: int32 type: integer port: @@ -730,20 +733,15 @@ spec: type: array dataSource: description: 'This field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) - * An existing custom resource/object that implements - data population (Alpha) In order to use VolumeSnapshot - object types, the appropriate feature gate must - be enabled (VolumeSnapshotDataSource or AnyVolumeDataSource) - If the provisioner or an external controller can - support the specified data source, it will create - a new volume based on the contents of the specified - data source. If the specified data source is not - supported, the volume will not be created and the - failure will be reported as an event. In the future, - we plan to support more data source types and the - behavior of the provisioner may change.' + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) * An existing + custom resource that implements data population + (Alpha) In order to use custom resource types that + implement data population, the AnyVolumeDataSource + feature gate must be enabled. If the provisioner + or an external controller can support the specified + data source, it will create a new volume based on + the contents of the specified data source.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1431,8 +1429,6 @@ spec: type: object type: object type: array - required: - - sources type: object quobyte: description: Quobyte represents a Quobyte mount on the host that diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 439f2dbe9..1e9d0b242 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -107,7 +107,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state -func (r *OpenTelemetryCollectorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { +func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) { ctx := context.Background() log := r.log.WithValues("opentelemetrycollector", req.NamespacedName) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 6a8990bb8..34f20902b 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -53,7 +53,7 @@ func TestNewObjectsOnReconciliation(t *testing.T) { req := k8sreconcile.Request{ NamespacedName: nsn, } - _, err = reconciler.Reconcile(req) + _, err = reconciler.Reconcile(context.Background(), req) // verify require.NoError(t, err) @@ -179,7 +179,7 @@ func TestBreakOnUnrecoverableError(t *testing.T) { req := k8sreconcile.Request{ NamespacedName: nsn, } - _, err = reconciler.Reconcile(req) + _, err = reconciler.Reconcile(context.Background(), req) // verify assert.Equal(t, expectedErr, err) @@ -213,7 +213,7 @@ func TestSkipWhenInstanceDoesNotExist(t *testing.T) { req := k8sreconcile.Request{ NamespacedName: nsn, } - _, err := reconciler.Reconcile(req) + _, err := reconciler.Reconcile(context.Background(), req) // verify assert.NoError(t, err) diff --git a/go.mod b/go.mod index 4dbc73e23..bfb15e5c7 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.0 k8s.io/client-go v0.20.0 k8s.io/kubectl v0.20.0 - sigs.k8s.io/controller-runtime v0.6.4 + sigs.k8s.io/controller-runtime v0.7.0 ) replace ( diff --git a/go.sum b/go.sum index e396cdd21..c635b69dd 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,7 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= @@ -26,20 +27,25 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= @@ -86,16 +92,13 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -105,7 +108,6 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= @@ -117,7 +119,6 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -207,7 +208,6 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -253,12 +253,10 @@ github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -294,13 +292,12 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -367,11 +364,15 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -403,7 +404,6 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= @@ -428,7 +428,7 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -436,8 +436,9 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -445,13 +446,14 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -459,7 +461,8 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -470,15 +473,23 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -486,7 +497,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= @@ -512,6 +523,7 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -520,8 +532,8 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -537,13 +549,13 @@ golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -552,6 +564,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -567,7 +580,6 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -575,8 +587,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -592,7 +602,6 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -604,11 +613,12 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -646,8 +656,10 @@ golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -665,6 +677,7 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8= golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -672,8 +685,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IV golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1 h1:xyiBuvkD2g5n7cYzx6u2sxQvsAy4QJsZFCzGVdzOXZ0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= +gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -690,6 +703,8 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -711,9 +726,9 @@ google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -725,6 +740,7 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -755,6 +771,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= @@ -763,57 +781,53 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= -k8s.io/apiextensions-apiserver v0.18.6 h1:vDlk7cyFsDyfwn2rNAO2DbmUbvXy5yT5GE3rrqOzaMo= -k8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= +k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= +k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= +k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.20.0 h1:BXGL8iitIQD+0NgW49UsM7MraNUUGDU3FBmrfUAtmVQ= k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= k8s.io/component-helpers v0.20.0/go.mod h1:nx6NOtfSfGOxnSZsDJxpGbnsVuUA1UXpwDvZIrtigNk= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.20.0 h1:q6HH6jILYi2lkzFqBhs63M4bKLxYlM0HpFJ///MgARA= k8s.io/kubectl v0.20.0/go.mod h1:8x5GzQkgikz7M2eFGGuu6yOfrenwnw5g4RXOUgbjR1M= k8s.io/metrics v0.20.0/go.mod h1:9yiRhfr8K8sjdj2EthQQE9WvpYDvsXIV3CjN4Ruq4Jw= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= -sigs.k8s.io/controller-runtime v0.6.4 h1:4013CKsBs5bEqo+LevzDett+LLxag/FjQWG94nVZ/9g= -sigs.k8s.io/controller-runtime v0.6.4/go.mod h1:WlZNXcM0++oyaQt4B7C2lEE5JYRs8vJUzRP4N4JpdAY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= +sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 836113e5a..4f542ba03 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "k8s.io/api/admission/v1beta1" + admv1 "k8s.io/api/admission/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -110,7 +110,7 @@ func TestShouldInjectSidecar(t *testing.T) { // the actual request we see in the webhook req := admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ + AdmissionRequest: admv1.AdmissionRequest{ Namespace: tt.ns.Name, Object: runtime.RawExtension{ Raw: encoded, @@ -323,7 +323,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { // the actual request we see in the webhook req := admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ + AdmissionRequest: admv1.AdmissionRequest{ Namespace: tt.ns.Name, Object: runtime.RawExtension{ Raw: encoded, @@ -378,7 +378,7 @@ func TestFailOnInvalidRequest(t *testing.T) { require.NoError(t, err) return admission.Request{ - AdmissionRequest: v1beta1.AdmissionRequest{ + AdmissionRequest: admv1.AdmissionRequest{ Namespace: "non-existing", Object: runtime.RawExtension{ Raw: encoded, diff --git a/main.go b/main.go index 6ee4c0bde..120ae5083 100644 --- a/main.go +++ b/main.go @@ -129,7 +129,7 @@ func main() { } // run the auto-detect mechanism for the configuration - err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { + err = mgr.Add(manager.RunnableFunc(func(_ context.Context) error { return cfg.StartAutoDetect() })) if err != nil { @@ -137,8 +137,8 @@ func main() { } // adds the upgrade mechanism to be executed once the manager is ready - err = mgr.Add(manager.RunnableFunc(func(<-chan struct{}) error { - return upgrade.ManagedInstances(context.Background(), ctrl.Log.WithName("upgrade"), v, mgr.GetClient()) + err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { + return upgrade.ManagedInstances(c, ctrl.Log.WithName("upgrade"), v, mgr.GetClient()) })) if err != nil { setupLog.Error(err, "failed to upgrade managed instances") From 3a39ff640f917c81c2da8de09e7bfbb6431067bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 14 Dec 2020 14:30:34 +0100 Subject: [PATCH 0116/1234] Publish images for releases and main branch with Actions (#138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/publish-bundle-images.sh | 31 -------------- .ci/publish-images.sh | 29 -------------- .ci/tagAndPushFunc.sh | 31 -------------- .github/dependabot.yml | 5 +++ .github/workflows/publish-images.yaml | 58 +++++++++++++++++++++++++++ .github/workflows/release.yaml | 16 -------- CONTRIBUTING.md | 2 +- Makefile | 15 ++++--- 8 files changed, 71 insertions(+), 116 deletions(-) delete mode 100755 .ci/publish-bundle-images.sh delete mode 100755 .ci/publish-images.sh delete mode 100644 .ci/tagAndPushFunc.sh create mode 100644 .github/workflows/publish-images.yaml diff --git a/.ci/publish-bundle-images.sh b/.ci/publish-bundle-images.sh deleted file mode 100755 index c9e6cabb1..000000000 --- a/.ci/publish-bundle-images.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags | grep -Po "([\d\.]+)")} - -echo "Building bundle image" -make bundle-build - -## push to Docker Hub -if [ "${DOCKER_PASSWORD}x" != "x" -a "${DOCKER_USERNAME}x" != "x" ]; then - echo "Performing a 'docker login'" - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - TARGET_IMAGE="otel/opentelemetry-operator-bundle:${OPERATOR_VERSION}" - docker tag "controller-bundle:${OPERATOR_VERSION}" "${TARGET_IMAGE}" - - echo "Pushing ${TARGET_IMAGE}" - docker push "${TARGET_IMAGE}" -fi - -## push to quay.io -if [ "${QUAY_PASSWORD}x" != "x" -a "${QUAY_USERNAME}x" != "x" ]; then - echo "Performing a 'docker login' for Quay" - echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin - - TARGET_IMAGE="quay.io/opentelemetry/opentelemetry-operator-bundle:${OPERATOR_VERSION}" - docker tag "controller-bundle:${OPERATOR_VERSION}" "${TARGET_IMAGE}" - - echo "Pushing ${TARGET_IMAGE}" - docker push "${TARGET_IMAGE}" -fi - diff --git a/.ci/publish-images.sh b/.ci/publish-images.sh deleted file mode 100755 index 6a8b7690d..000000000 --- a/.ci/publish-images.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -source ./.ci/tagAndPushFunc.sh - -BASE_BUILD_IMAGE=${BASE_BUILD_IMAGE:-"otel/opentelemetry-operator"} -OPERATOR_VERSION=${OPERATOR_VERSION:-$(git describe --tags | grep -Po "([\d\.]+)")} -BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"} - -echo "Building image ${BUILD_IMAGE}" -make docker-build IMG="${BUILD_IMAGE}" VERSION=${OPERATOR_VERSION} - -## push to Docker Hub -if [ "${DOCKER_PASSWORD}x" != "x" -a "${DOCKER_USERNAME}x" != "x" ]; then - echo "Performing a 'docker login'" - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - - BASE_BUILD_IMAGE=${DOCKER_BASE_BUILD_IMAGE:-"otel/opentelemetry-operator"} - tagAndPush ${BUILD_IMAGE} ${BASE_BUILD_IMAGE} ${OPERATOR_VERSION} -fi - -## push to quay.io -if [ "${QUAY_PASSWORD}x" != "x" -a "${QUAY_USERNAME}x" != "x" ]; then - echo "Performing a 'docker login' for Quay" - echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" quay.io --password-stdin - - BASE_BUILD_IMAGE=${QUAY_BASE_BUILD_IMAGE:-"quay.io/opentelemetry/opentelemetry-operator"} - tagAndPush ${BUILD_IMAGE} ${BASE_BUILD_IMAGE} ${OPERATOR_VERSION} -fi - diff --git a/.ci/tagAndPushFunc.sh b/.ci/tagAndPushFunc.sh deleted file mode 100644 index 9cf1829b3..000000000 --- a/.ci/tagAndPushFunc.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -function tagAndPush { - buildImage=$1 ## the image that has been built already - baseImageName=$2 ## the host/namespace/image base to use - version=$3 ## the version - targetImage="${baseImageName}:${version}" - - echo "Tagging ${buildImage} as ${targetImage}" - docker tag "${buildImage}" "${targetImage}" - - echo "Pushing ${targetImage}" - docker push "${targetImage}" - - ## if we are on a release tag, let's extract the version number - ## the other possible value, currently, is 'master' (or another branch name) - ## if we are not running in the CI, it fallsback to the `git describe` above - if [[ ${version} =~ ^[0-9]+\.[0-9]+ ]]; then - majorMinor=${BASH_REMATCH[0]} - - if [ "${majorMinor}x" != "x" ]; then - majorMinorImage="${baseImageName}:${majorMinor}" - echo "Pushing '${majorMinorImage}'" - docker tag "${targetImage}" "${majorMinorImage}" - - echo "Pushing ${majorMinorImage}" - docker push "${majorMinorImage}" - fi - fi -} - diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 36e9e33c2..effa59c4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,8 @@ updates: directory: "/" schedule: interval: daily + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml new file mode 100644 index 000000000..2dbb06375 --- /dev/null +++ b/.github/workflows/publish-images.yaml @@ -0,0 +1,58 @@ +name: "Publish images" + +on: + push: + branches: [master] + release: + types: [published] + +jobs: + publish-containers: + name: Publish container images + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: Set env vars for the job + run: | + grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV + echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV + + - name: Docker meta + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 + with: + images: otel/opentelemetry-operator,quay.io/opentelemetry/opentelemetry-operator + tag-sha: true + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Build and push Operator image + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} + build-args: | + VERSION_PKG=github.com/open-telemetry/opentelemetry-operator/internal/version + VERSION=${VERSION} + VERSION_DATE=${VERSION_DATE} + OTELCOL_VERSION=${OTELCOL_VERSION} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1fab8f6b4..1b4ccda71 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,22 +23,6 @@ jobs: - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" - - name: "publish the images" - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - run: ./.ci/publish-images.sh - - - name: "publish the bundle image" - env: - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} - QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} - run: ./.ci/publish-bundle-images.sh - - name: "create the release in GitHub" env: GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb986ac13..fb35b54c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,7 +47,7 @@ make cert-manager Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: ``` -make manifests docker-build docker-push deploy +make manifests container container-push deploy ``` By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: diff --git a/Makefile b/Makefile index dc276f9ba..02c82a2f4 100644 --- a/Makefile +++ b/Makefile @@ -72,11 +72,10 @@ set-image-controller: manifests kustomize deploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - -# Deploy controller in the configured Kubernetes cluster in ~/.kube/config -release-artifacts: set-image-controller bundle +# Generates the released manifests +release-artifacts: set-image-controller mkdir -p dist $(KUSTOMIZE) build config/default -o dist/opentelemetry-operator.yaml - tar czf dist/bundle.tar.gz bundle # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen @@ -94,12 +93,12 @@ vet: generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." -# Build the docker image -docker-build: test +# Build the container image, used only for local dev purposes +container: test docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} . -# Push the docker image -docker-push: +# Push the container image, used only for local dev purposes +container-push: docker push ${IMG} cert-manager: @@ -160,7 +159,7 @@ bundle: operator-sdk manifests $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(OPERATOR_SDK) bundle validate ./bundle -# Build the bundle image. +# Build the bundle image, used only for local dev purposes bundle-build: docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . From 207e962aa3363b484f14829150e457e6ae90d188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 14 Dec 2020 14:53:23 +0100 Subject: [PATCH 0117/1234] Add login step to publishing of images (#141) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/publish-images.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 2dbb06375..4d62dead1 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -23,7 +23,7 @@ jobs: id: docker_meta uses: crazy-max/ghaction-docker-meta@v1 with: - images: otel/opentelemetry-operator,quay.io/opentelemetry/opentelemetry-operator + images: quay.io/opentelemetry/opentelemetry-operator tag-sha: true - name: Set up QEMU @@ -40,6 +40,13 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Login to Quay + uses: docker/login-action@v1 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: Build and push Operator image uses: docker/build-push-action@v2 with: From b0abc11b7f8befbb07753be82ce7f6d55a636fde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Dec 2020 14:56:08 +0100 Subject: [PATCH 0118/1234] Bump github/issue-labeler from v2.0 to v2.2 (#140) Bumps [github/issue-labeler](https://github.com/github/issue-labeler) from v2.0 to v2.2. - [Release notes](https://github.com/github/issue-labeler/releases) - [Commits](https://github.com/github/issue-labeler/compare/v2.0...9fb265174234e6e5ee3f12de6c646697994329f9) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 050cb6ef2..09d45a5ba 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -7,7 +7,7 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.0 + - uses: github/issue-labeler@v2.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler-needs-triage.yaml From 564180540906d034dcb3890552d31602d80e8d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 16 Dec 2020 11:39:56 +0100 Subject: [PATCH 0119/1234] Bumped OpenTelemetry Collector to v0.17.0 (#144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 +++++ RELEASE.md | 1 + versions.txt | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0468295b..beb63fdc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.17.0 (2020-12-16) +------------------- +* Bumped OpenTelemetry Collector to v0.17.0 ([#144](https://github.com/open-telemetry/opentelemetry-operator/pull/144), [@jpkrohling](https://github.com/jpkrohling)) +* Refactor how images are pushed ([#138](https://github.com/open-telemetry/opentelemetry-operator/pull/138), [@jpkrohling](https://github.com/jpkrohling)) + 0.16.0 (2020-12-03) ------------------- * Bumped OpenTelemetry Collector to v0.16.0 ([#135](https://github.com/open-telemetry/opentelemetry-operator/pull/135), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/RELEASE.md b/RELEASE.md index 18ba1113e..e9fa773fc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,3 +18,4 @@ $ docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WR Remove the commits that are not relevant to users, like: * CI or testing-specific commits (e2e, unit test, ...) * bug fixes for problems that are not part of a release yet +* version bumps for internal dependencies diff --git a/versions.txt b/versions.txt index 345e87053..1ee476fcc 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.16.0 +opentelemetry-collector=0.17.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.16.0 +operator=0.17.0 From eb549cea898a53b84017cab05c6b51b3022df9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 16 Dec 2020 14:49:06 +0100 Subject: [PATCH 0120/1234] Add local golint-ci lint config file (#146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 3 +- .golangci.yaml | 24 +++++++++++++++ api/v1alpha1/groupversion_info.go | 4 +-- api/v1alpha1/mode.go | 6 ++-- api/v1alpha1/opentelemetrycollector_types.go | 8 ++--- .../opentelemetrycollector_webhook.go | 8 ++--- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++-- .../opentelemetrycollector_controller.go | 14 ++++----- .../opentelemetrycollector_controller_test.go | 14 +++++++++ header.txt | 13 ++++++++ internal/config/main.go | 10 +++---- internal/config/main_test.go | 14 +++++++++ internal/config/options.go | 16 +++++++++- internal/podinjector/main.go | 10 +++---- internal/podinjector/main_test.go | 14 +++++++++ internal/version/main.go | 20 +++++++++++-- internal/version/main_test.go | 14 +++++++++ pkg/autodetect/main_test.go | 14 +++++++++ pkg/collector/adapters/config_from.go | 16 +++++++++- pkg/collector/adapters/config_from_test.go | 14 +++++++++ pkg/collector/adapters/config_to_ports.go | 18 +++++++++-- .../adapters/config_to_ports_test.go | 14 +++++++++ pkg/collector/container.go | 2 +- pkg/collector/container_test.go | 17 ++++++++++- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 14 +++++++++ pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 17 ++++++++++- pkg/collector/labels.go | 2 +- pkg/collector/labels_test.go | 14 +++++++++ pkg/collector/parser/receiver.go | 28 ++++++++++++----- pkg/collector/parser/receiver_carbon.go | 16 +++++++++- pkg/collector/parser/receiver_carbon_test.go | 14 +++++++++ pkg/collector/parser/receiver_collectd.go | 16 +++++++++- .../parser/receiver_collectd_test.go | 14 +++++++++ pkg/collector/parser/receiver_generic.go | 22 +++++++++++--- pkg/collector/parser/receiver_generic_test.go | 17 ++++++++++- pkg/collector/parser/receiver_jaeger.go | 22 +++++++++++--- pkg/collector/parser/receiver_jaeger_test.go | 14 +++++++++ pkg/collector/parser/receiver_oc.go | 16 +++++++++- pkg/collector/parser/receiver_oc_test.go | 14 +++++++++ pkg/collector/parser/receiver_otlp.go | 22 +++++++++++--- pkg/collector/parser/receiver_otlp_test.go | 14 +++++++++ pkg/collector/parser/receiver_sapm.go | 16 +++++++++- pkg/collector/parser/receiver_sapm_test.go | 14 +++++++++ pkg/collector/parser/receiver_signalfx.go | 16 +++++++++- .../parser/receiver_signalfx_test.go | 14 +++++++++ pkg/collector/parser/receiver_test.go | 14 +++++++++ pkg/collector/parser/receiver_wavefront.go | 16 +++++++++- .../parser/receiver_wavefront_test.go | 14 +++++++++ .../parser/receiver_zipkin-scribe.go | 16 +++++++++- .../parser/receiver_zipkin-scribe_test.go | 14 +++++++++ pkg/collector/parser/receiver_zipkin.go | 16 +++++++++- pkg/collector/parser/receiver_zipkin_test.go | 14 +++++++++ pkg/collector/reconcile/configmap.go | 4 +-- pkg/collector/reconcile/daemonset.go | 2 +- pkg/collector/reconcile/deployment.go | 2 +- pkg/collector/reconcile/opentelemetry.go | 17 ++++++++++- pkg/collector/reconcile/params.go | 2 +- pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/serviceaccount.go | 2 +- pkg/collector/serviceaccount.go | 18 +++++++++-- pkg/collector/serviceaccount_test.go | 14 +++++++++ pkg/collector/upgrade/noop.go | 14 +++++++++ pkg/collector/upgrade/suite_test.go | 14 +++++++++ pkg/collector/upgrade/upgrade.go | 18 +++++++++-- pkg/collector/upgrade/upgrade_test.go | 14 +++++++++ pkg/collector/upgrade/v0_15_0.go | 14 +++++++++ pkg/collector/upgrade/v0_15_0_test.go | 14 +++++++++ pkg/collector/upgrade/v0_2_10.go | 16 +++++++++- pkg/collector/upgrade/v0_9_0.go | 14 +++++++++ pkg/collector/upgrade/v0_9_0_test.go | 14 +++++++++ pkg/collector/upgrade/versions.go | 14 +++++++++ pkg/collector/volume.go | 2 +- pkg/collector/volume_test.go | 14 +++++++++ pkg/naming/main.go | 30 ++++++++++++++----- pkg/platform/main.go | 8 ++--- pkg/sidecar/annotation.go | 4 +-- pkg/sidecar/pod.go | 6 ++-- 79 files changed, 903 insertions(+), 107 deletions(-) create mode 100644 .golangci.yaml create mode 100644 header.txt diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 29d35366f..5d3019b38 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -37,9 +37,8 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v2 with: + args: -v version: v1.29 - args: --enable=gosec,maligned,misspell - only-new-issues: true security: name: Security diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 000000000..09c1d7f7d --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,24 @@ +run: + timeout: 5m + +# all available settings of specific linters +linters-settings: + goheader: + template-path: header.txt + goimports: + local-prefixes: github.com/open-telemetry/opentelemetry-operator + maligned: + suggest-new: true + misspell: + locale: US + +linters: + enable: + - goheader + - goimports + - maligned + - misspell + - gosec + - exhaustive + - godot + - unparam \ No newline at end of file diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 52ce63bf5..ef6601ea7 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -23,10 +23,10 @@ import ( ) var ( - // GroupVersion is group version used to register these objects + // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} - // SchemeBuilder is used to add go types to the GroupVersionKind scheme + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. diff --git a/api/v1alpha1/mode.go b/api/v1alpha1/mode.go index 72b97a47c..16929a6c5 100644 --- a/api/v1alpha1/mode.go +++ b/api/v1alpha1/mode.go @@ -21,12 +21,12 @@ type ( ) const ( - // ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet + // ModeDaemonSet specifies that the collector should be deployed as a Kubernetes DaemonSet. ModeDaemonSet Mode = "daemonset" - // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment + // ModeDeployment specifies that the collector should be deployed as a Kubernetes Deployment. ModeDeployment Mode = "deployment" - // ModeSidecar specifies that the collector should be deployed as a sidecar to pods + // ModeSidecar specifies that the collector should be deployed as a sidecar to pods. ModeSidecar Mode = "sidecar" ) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 578915549..93c42a5c0 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -19,7 +19,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector +// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. type OpenTelemetryCollectorSpec struct { // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. // +required @@ -78,7 +78,7 @@ type OpenTelemetryCollectorSpec struct { Env []v1.EnvVar `json:"env,omitempty"` } -// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector +// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. type OpenTelemetryCollectorStatus struct { // Replicas is currently not being set and might be removed in the next version. // +optional @@ -102,7 +102,7 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API +// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. type OpenTelemetryCollector struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -113,7 +113,7 @@ type OpenTelemetryCollector struct { // +kubebuilder:object:root=true -// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector +// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector. type OpenTelemetryCollectorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index 868042389..0a51b0788 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -34,7 +34,7 @@ func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error var _ webhook.Defaulter = &OpenTelemetryCollector{} -// Default implements webhook.Defaulter so a webhook will be registered for the type +// Default implements webhook.Defaulter so a webhook will be registered for the type. func (r *OpenTelemetryCollector) Default() { if len(r.Spec.Mode) == 0 { r.Spec.Mode = ModeDeployment @@ -54,19 +54,19 @@ func (r *OpenTelemetryCollector) Default() { var _ webhook.Validator = &OpenTelemetryCollector{} -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type +// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateCreate() error { opentelemetrycollectorlog.Info("validate create", "name", r.Name) return nil } -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type +// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error { opentelemetrycollectorlog.Info("validate update", "name", r.Name) return nil } -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type +// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateDelete() error { opentelemetrycollectorlog.Info("validate delete", "name", r.Name) return nil diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index f726c1658..75bc0ce2a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -39,7 +39,7 @@ spec: validation: openAPIV3Schema: description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -54,7 +54,7 @@ spec: metadata: type: object spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: args: additionalProperties: @@ -1703,7 +1703,7 @@ spec: type: object status: description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector + OpenTelemetryCollector. properties: messages: description: Messages about actions performed by the operator on this diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 1e9d0b242..0a6955cdb 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -32,7 +32,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) -// OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object +// OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. type OpenTelemetryCollectorReconciler struct { client.Client log logr.Logger @@ -41,14 +41,14 @@ type OpenTelemetryCollectorReconciler struct { tasks []Task } -// Task represents a reconciliation task to be executed by the reconciler +// Task represents a reconciliation task to be executed by the reconciler. type Task struct { Name string Do func(context.Context, reconcile.Params) error BailOnError bool } -// Params is the set of options to build a new openTelemetryCollectorReconciler +// Params is the set of options to build a new openTelemetryCollectorReconciler. type Params struct { client.Client Log logr.Logger @@ -57,7 +57,7 @@ type Params struct { Tasks []Task } -// NewReconciler creates a new reconciler for OpenTelemetryCollector objects +// NewReconciler creates a new reconciler for OpenTelemetryCollector objects. func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { if len(p.Tasks) == 0 { p.Tasks = []Task{ @@ -106,7 +106,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch -// Reconcile the current state of an OpenTelemetry collector resource with the desired state +// Reconcile the current state of an OpenTelemetry collector resource with the desired state. func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) { ctx := context.Background() log := r.log.WithValues("opentelemetrycollector", req.NamespacedName) @@ -138,7 +138,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl return ctrl.Result{}, nil } -// RunTasks runs all the tasks associated with this reconciler +// RunTasks runs all the tasks associated with this reconciler. func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { for _, task := range r.tasks { if err := task.Do(ctx, params); err != nil { @@ -152,7 +152,7 @@ func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params return nil } -// SetupWithManager tells the manager what our controller is interested in +// SetupWithManager tells the manager what our controller is interested in. func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&v1alpha1.OpenTelemetryCollector{}). diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 34f20902b..8a0944812 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package controllers_test import ( diff --git a/header.txt b/header.txt new file mode 100644 index 000000000..3881885f3 --- /dev/null +++ b/header.txt @@ -0,0 +1,13 @@ +Copyright The OpenTelemetry Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/internal/config/main.go b/internal/config/main.go index 74fb5a4c8..52b9e4958 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -33,7 +33,7 @@ const ( defaultCollectorConfigMapEntry = "collector.yaml" ) -// Config holds the static configuration for this operator +// Config holds the static configuration for this operator. type Config struct { // Registers a callback, to be called once a configuration change happens OnChange func() error @@ -50,7 +50,7 @@ type Config struct { version version.Version } -// New constructs a new configuration based on the given options +// New constructs a new configuration based on the given options. func New(opts ...Option) Config { // initialize with the default values o := options{ @@ -82,7 +82,7 @@ func New(opts ...Option) Config { } } -// FlagSet binds the flags to the user-modifiable values of the operator's configuration +// FlagSet binds the flags to the user-modifiable values of the operator's configuration. func (c *Config) FlagSet() *pflag.FlagSet { fs := pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) pflag.StringVar(&c.collectorImage, @@ -155,12 +155,12 @@ func (c *Config) CollectorConfigMapEntry() string { return c.collectorConfigMapEntry } -// Platform represents the type of the platform this operator is running +// Platform represents the type of the platform this operator is running. func (c *Config) Platform() platform.Platform { return c.platform } -// Version holds the versions used by this operator +// Version holds the versions used by this operator. func (c *Config) Version() version.Version { return c.version } diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 8159b2280..c586e6f0d 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config_test import ( diff --git a/internal/config/options.go b/internal/config/options.go index 4e7d60aa5..41d39bfe3 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( @@ -10,7 +24,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) -// Option represents one specific configuration option +// Option represents one specific configuration option. type Option func(c *options) type options struct { diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index c097aa00c..db4ed051e 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -45,13 +45,13 @@ var ( var _ PodSidecarInjector = (*podSidecarInjector)(nil) -// PodSidecarInjector is a webhook handler that analyzes new pods and injects appropriate sidecars into it +// PodSidecarInjector is a webhook handler that analyzes new pods and injects appropriate sidecars into it. type PodSidecarInjector interface { admission.Handler admission.DecoderInjector } -// the implementation +// the implementation. type podSidecarInjector struct { config config.Config logger logr.Logger @@ -59,7 +59,7 @@ type podSidecarInjector struct { decoder *admission.Decoder } -// NewPodSidecarInjector creates a new PodSidecarInjector +// NewPodSidecarInjector creates a new PodSidecarInjector. func NewPodSidecarInjector(cfg config.Config, logger logr.Logger, cl client.Client) PodSidecarInjector { return &podSidecarInjector{ config: cfg, @@ -144,7 +144,7 @@ func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, po func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { if strings.EqualFold(ann, "true") { - return p.selectCollectorInstance(ctx, ns, ann) + return p.selectCollectorInstance(ctx, ns) } otelcol := v1alpha1.OpenTelemetryCollector{} @@ -160,7 +160,7 @@ func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1 return otelcol, nil } -func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { +func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.OpenTelemetryCollector, error) { otelcols := v1alpha1.OpenTelemetryCollectorList{} if err := p.client.List(ctx, &otelcols, client.InNamespace(ns.Name)); err != nil { return v1alpha1.OpenTelemetryCollector{}, err diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 4f542ba03..9fa74e716 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package podinjector_test import ( diff --git a/internal/version/main.go b/internal/version/main.go index e10a8c2c6..c0080a4b2 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package version contains the operator's version, as well as versions of underlying components. package version @@ -12,7 +26,7 @@ var ( otelCol string ) -// Version holds this Operator's version as well as the version of some of the components it uses +// Version holds this Operator's version as well as the version of some of the components it uses. type Version struct { Operator string `json:"opentelemetry-operator"` BuildDate string `json:"build-date"` @@ -20,7 +34,7 @@ type Version struct { Go string `json:"go-version"` } -// Get returns the Version object with the relevant information +// Get returns the Version object with the relevant information. func Get() Version { return Version{ Operator: version, @@ -40,7 +54,7 @@ func (v Version) String() string { ) } -// OpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration +// OpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration. func OpenTelemetryCollector() string { if len(otelCol) > 0 { // this should always be set, as it's specified during the build diff --git a/internal/version/main_test.go b/internal/version/main_test.go index 682a2cfc9..ec9a02860 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package version import ( diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index 7855315ac..6ffc1b9e7 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package autodetect_test import ( diff --git a/pkg/collector/adapters/config_from.go b/pkg/collector/adapters/config_from.go index 79d83f633..0f9883ce2 100644 --- a/pkg/collector/adapters/config_from.go +++ b/pkg/collector/adapters/config_from.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package adapters is for data conversion. package adapters @@ -8,7 +22,7 @@ import ( ) var ( - // ErrInvalidYAML represents an error in the format of the configuration file + // ErrInvalidYAML represents an error in the format of the configuration file. ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration") ) diff --git a/pkg/collector/adapters/config_from_test.go b/pkg/collector/adapters/config_from_test.go index cc2081151..92fb0569b 100644 --- a/pkg/collector/adapters/config_from_test.go +++ b/pkg/collector/adapters/config_from_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package adapters_test import ( diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go index b219b2051..70f12a388 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package adapters import ( @@ -10,10 +24,10 @@ import ( ) var ( - // ErrNoReceivers indicates that there are no receivers in the configuration + // ErrNoReceivers indicates that there are no receivers in the configuration. ErrNoReceivers = errors.New("no receivers available as part of the configuration") - // ErrReceiversNotAMap indicates that the receivers property isn't a map of values + // ErrReceiversNotAMap indicates that the receivers property isn't a map of values. ErrReceiversNotAMap = errors.New("receivers property in the configuration doesn't contain valid receivers") ) diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index f2d0ceb8f..f13db7b86 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package adapters_test import ( diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 9fe069a0b..e86d01902 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -25,7 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -// Container builds a container for the given collector +// Container builds a container for the given collector. func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { image := otelcol.Spec.Image if len(image) == 0 { diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 69af8b5ec..cfddf0642 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( @@ -6,10 +20,11 @@ import ( corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" + "github.com/stretchr/testify/assert" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/stretchr/testify/assert" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 06fc5af73..270e6650e 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -25,7 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -// DaemonSet builds the deployment for the given instance +// DaemonSet builds the deployment for the given instance. func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 53dacf8b6..59702eece 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 435124fdd..87105d317 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -25,7 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -// Deployment builds the deployment for the given instance +// Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 10ed8f66e..05f54e972 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( @@ -5,10 +19,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/stretchr/testify/assert" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/stretchr/testify/assert" ) func TestDeploymentNewDefault(t *testing.T) { diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index c0deb165d..0d62e2270 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" ) -// Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector +// Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { // new map every time, so that we don't touch the instance's label base := map[string]string{} diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index bccb00597..3a6a1e0d4 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index ffdf3f1fc..37cb6e55d 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package parser is for parsing the OpenTelemetry Collector configuration. package parser @@ -17,7 +31,7 @@ var ( dnsLabelValidation = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$") ) -// ReceiverParser is an interface that should be implemented by all receiver parsers +// ReceiverParser is an interface that should be implemented by all receiver parsers. type ReceiverParser interface { // Ports returns the service ports parsed based on the receiver's configuration Ports() ([]corev1.ServicePort, error) @@ -26,13 +40,13 @@ type ReceiverParser interface { ParserName() string } -// Builder specifies the signature required for parser builders +// Builder specifies the signature required for parser builders. type Builder func(logr.Logger, string, map[interface{}]interface{}) ReceiverParser -// registry holds a record of all known parsers +// registry holds a record of all known parsers. var registry = make(map[string]Builder) -// BuilderFor returns a parser builder for the given receiver name +// BuilderFor returns a parser builder for the given receiver name. func BuilderFor(name string) Builder { builder := registry[receiverType(name)] if builder == nil { @@ -42,18 +56,18 @@ func BuilderFor(name string) Builder { return builder } -// For returns a new parser for the given receiver name + config +// For returns a new parser for the given receiver name + config. func For(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { builder := BuilderFor(name) return builder(logger, name, config) } -// Register adds a new parser builder to the list of known builders +// Register adds a new parser builder to the list of known builders. func Register(name string, builder Builder) { registry[name] = builder } -// IsRegistered checks whether a parser is registered with the given name +// IsRegistered checks whether a parser is registered with the given name. func IsRegistered(name string) bool { _, ok := registry[name] return ok diff --git a/pkg/collector/parser/receiver_carbon.go b/pkg/collector/parser/receiver_carbon.go index 29b0daf34..26f073ebe 100644 --- a/pkg/collector/parser/receiver_carbon.go +++ b/pkg/collector/parser/receiver_carbon.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameCarbon = "__carbon" -// NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository +// NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository. func NewCarbonReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_carbon_test.go b/pkg/collector/parser/receiver_carbon_test.go index 233aedfbc..22a5cb927 100644 --- a/pkg/collector/parser/receiver_carbon_test.go +++ b/pkg/collector/parser/receiver_carbon_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the Carbon parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_collectd.go b/pkg/collector/parser/receiver_collectd.go index fa275633a..9426399a4 100644 --- a/pkg/collector/parser/receiver_collectd.go +++ b/pkg/collector/parser/receiver_collectd.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameCollectd = "__collectd" -// NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository +// NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository. func NewCollectdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_collectd_test.go b/pkg/collector/parser/receiver_collectd_test.go index 819392f2a..fe63c75cf 100644 --- a/pkg/collector/parser/receiver_collectd_test.go +++ b/pkg/collector/parser/receiver_collectd_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the Collectd parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go index a62d719bf..c4e4e1ae0 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( @@ -9,7 +23,7 @@ const parserNameGeneric = "__generic" var _ ReceiverParser = &GenericReceiver{} -// GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly +// GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly. type GenericReceiver struct { logger logr.Logger name string @@ -18,7 +32,7 @@ type GenericReceiver struct { parserName string } -// NewGenericReceiverParser builds a new parser for generic receivers +// NewGenericReceiverParser builds a new parser for generic receivers. func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, @@ -28,7 +42,7 @@ func NewGenericReceiverParser(logger logr.Logger, name string, config map[interf } } -// Ports returns all the service ports for all protocols in this parser +// Ports returns all the service ports for all protocols in this parser. func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { port := singlePortFromConfigEndpoint(g.logger, g.name, g.config) if port != nil { @@ -45,7 +59,7 @@ func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { return []corev1.ServicePort{}, nil } -// ParserName returns the name of this parser +// ParserName returns the name of this parser. func (g *GenericReceiver) ParserName() string { return g.parserName } diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index bf05cc342..93c290c5f 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -1,12 +1,27 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser_test import ( "testing" "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go index 9ca3e3a03..460c0b6ad 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( @@ -18,14 +32,14 @@ const ( defaultThriftBinaryPort int32 = 6832 ) -// JaegerReceiverParser parses the configuration for Jaeger-specific receivers +// JaegerReceiverParser parses the configuration for Jaeger-specific receivers. type JaegerReceiverParser struct { logger logr.Logger name string config map[interface{}]interface{} } -// NewJaegerReceiverParser builds a new parser for Jaeger receivers +// NewJaegerReceiverParser builds a new parser for Jaeger receivers. func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &JaegerReceiverParser{ @@ -41,7 +55,7 @@ func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interfa } } -// Ports returns all the service ports for all protocols in this parser +// Ports returns all the service ports for all protocols in this parser. func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { ports := []corev1.ServicePort{} @@ -103,7 +117,7 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { return ports, nil } -// ParserName returns the name of this parser +// ParserName returns the name of this parser. func (j *JaegerReceiverParser) ParserName() string { return parserNameJaeger } diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 3c1b12450..92897a92c 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( diff --git a/pkg/collector/parser/receiver_oc.go b/pkg/collector/parser/receiver_oc.go index ee188dd82..5deb0fe5f 100644 --- a/pkg/collector/parser/receiver_oc.go +++ b/pkg/collector/parser/receiver_oc.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameOpenCensus = "__opencensus" -// NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers +// NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers. func NewOpenCensusReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_oc_test.go b/pkg/collector/parser/receiver_oc_test.go index 74660ed91..b14b4f9b1 100644 --- a/pkg/collector/parser/receiver_oc_test.go +++ b/pkg/collector/parser/receiver_oc_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the OpenCensus parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index 57bd2706c..292df6862 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( @@ -18,14 +32,14 @@ const ( defaultOTLPHTTPPort int32 = 55681 ) -// OTLPReceiverParser parses the configuration for OTLP receivers +// OTLPReceiverParser parses the configuration for OTLP receivers. type OTLPReceiverParser struct { logger logr.Logger name string config map[interface{}]interface{} } -// NewOTLPReceiverParser builds a new parser for OTLP receivers +// NewOTLPReceiverParser builds a new parser for OTLP receivers. func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &OTLPReceiverParser{ @@ -41,7 +55,7 @@ func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface } } -// Ports returns all the service ports for all protocols in this parser +// Ports returns all the service ports for all protocols in this parser. func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { ports := []corev1.ServicePort{} @@ -98,7 +112,7 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { return ports, nil } -// ParserName returns the name of this parser +// ParserName returns the name of this parser. func (o *OTLPReceiverParser) ParserName() string { return parserNameOTLP } diff --git a/pkg/collector/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go index 6d2154a8e..c5132060e 100644 --- a/pkg/collector/parser/receiver_otlp_test.go +++ b/pkg/collector/parser/receiver_otlp_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( diff --git a/pkg/collector/parser/receiver_sapm.go b/pkg/collector/parser/receiver_sapm.go index ba1cef23f..a9b8b574c 100644 --- a/pkg/collector/parser/receiver_sapm.go +++ b/pkg/collector/parser/receiver_sapm.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameSAPM = "__sapm" -// NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository +// NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository. func NewSAPMReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_sapm_test.go b/pkg/collector/parser/receiver_sapm_test.go index b8b8c31f0..6a0c3de59 100644 --- a/pkg/collector/parser/receiver_sapm_test.go +++ b/pkg/collector/parser/receiver_sapm_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the SAPM parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_signalfx.go b/pkg/collector/parser/receiver_signalfx.go index 9676aa871..f4140c470 100644 --- a/pkg/collector/parser/receiver_signalfx.go +++ b/pkg/collector/parser/receiver_signalfx.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameSignalFx = "__signalfx" -// NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository +// NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository. func NewSignalFxReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_signalfx_test.go b/pkg/collector/parser/receiver_signalfx_test.go index 1ca3809f5..cd196ee5d 100644 --- a/pkg/collector/parser/receiver_signalfx_test.go +++ b/pkg/collector/parser/receiver_signalfx_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the SignalFx parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index fa6030f3e..10252e801 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import ( diff --git a/pkg/collector/parser/receiver_wavefront.go b/pkg/collector/parser/receiver_wavefront.go index 1b123dcf9..00c3f17e1 100644 --- a/pkg/collector/parser/receiver_wavefront.go +++ b/pkg/collector/parser/receiver_wavefront.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameWavefront = "__wavefront" -// NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository +// NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository. func NewWavefrontReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_wavefront_test.go b/pkg/collector/parser/receiver_wavefront_test.go index 92b777d00..6bea4d91e 100644 --- a/pkg/collector/parser/receiver_wavefront_test.go +++ b/pkg/collector/parser/receiver_wavefront_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the Wavefront parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_zipkin-scribe.go b/pkg/collector/parser/receiver_zipkin-scribe.go index 075e1196b..1c6fa3631 100644 --- a/pkg/collector/parser/receiver_zipkin-scribe.go +++ b/pkg/collector/parser/receiver_zipkin-scribe.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameZipkinScribe = "__zipkinscribe" -// NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers +// NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers. func NewZipkinScribeReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_zipkin-scribe_test.go b/pkg/collector/parser/receiver_zipkin-scribe_test.go index 714dac773..dc057612b 100644 --- a/pkg/collector/parser/receiver_zipkin-scribe_test.go +++ b/pkg/collector/parser/receiver_zipkin-scribe_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the ZipkinScribe parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_zipkin.go b/pkg/collector/parser/receiver_zipkin.go index 18e1ac660..0aa9eb7ed 100644 --- a/pkg/collector/parser/receiver_zipkin.go +++ b/pkg/collector/parser/receiver_zipkin.go @@ -1,10 +1,24 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser import "github.com/go-logr/logr" const parserNameZipkin = "__zipkin" -// NewZipkinReceiverParser builds a new parser for Zipkin receivers +// NewZipkinReceiverParser builds a new parser for Zipkin receivers. func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ logger: logger, diff --git a/pkg/collector/parser/receiver_zipkin_test.go b/pkg/collector/parser/receiver_zipkin_test.go index c532a2575..87bfecc08 100644 --- a/pkg/collector/parser/receiver_zipkin_test.go +++ b/pkg/collector/parser/receiver_zipkin_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package parser // all tests for the Zipkin parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index c8093c152..dcb33ed15 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -31,7 +31,7 @@ import ( // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete -// ConfigMaps reconciles the config map(s) required for the instance in the current context +// ConfigMaps reconciles the config map(s) required for the instance in the current context. func ConfigMaps(ctx context.Context, params Params) error { desired := []corev1.ConfigMap{ desiredConfigMap(ctx, params), @@ -50,7 +50,7 @@ func ConfigMaps(ctx context.Context, params Params) error { return nil } -func desiredConfigMap(ctx context.Context, params Params) corev1.ConfigMap { +func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { name := naming.ConfigMap(params.Instance) labels := collector.Labels(params.Instance) labels["app.kubernetes.io/name"] = name diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index e99b995e1..8b01af432 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -29,7 +29,7 @@ import ( // +kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;list;watch;create;update;patch;delete -// DaemonSets reconciles the daemon set(s) required for the instance in the current context +// DaemonSets reconciles the daemon set(s) required for the instance in the current context. func DaemonSets(ctx context.Context, params Params) error { desired := []appsv1.DaemonSet{} if params.Instance.Spec.Mode == "daemonset" { diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 59802267e..399b74e80 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -29,7 +29,7 @@ import ( // +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete -// Deployments reconciles the deployment(s) required for the instance in the current context +// Deployments reconciles the deployment(s) required for the instance in the current context. func Deployments(ctx context.Context, params Params) error { desired := []appsv1.Deployment{} if params.Instance.Spec.Mode == "deployment" { diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index 163500dbc..9e9f3eaa9 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package reconcile contains reconciliation logic for OpenTelemetry Collector components. package reconcile @@ -5,8 +19,9 @@ import ( "context" "fmt" - "github.com/open-telemetry/opentelemetry-operator/internal/version" "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/version" ) // Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index fea53fcc1..e9e6fa3db 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -23,7 +23,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" ) -// Params holds the reconciliation-specific parameters +// Params holds the reconciliation-specific parameters. type Params struct { Config config.Config Client client.Client diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 1ad41e44d..c7004e5ba 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -34,7 +34,7 @@ import ( // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete -// Services reconciles the service(s) required for the instance in the current context +// Services reconciles the service(s) required for the instance in the current context. func Services(ctx context.Context, params Params) error { desired := []corev1.Service{} if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 4a2251972..570f80e28 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -30,7 +30,7 @@ import ( // +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete -// ServiceAccounts reconciles the service account(s) required for the instance in the current context +// ServiceAccounts reconciles the service account(s) required for the instance in the current context. func ServiceAccounts(ctx context.Context, params Params) error { desired := []corev1.ServiceAccount{} if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index 50511bd2f..17ba39a7c 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector import ( @@ -8,7 +22,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance +// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { if len(instance.Spec.ServiceAccount) == 0 { return naming.ServiceAccount(instance) @@ -17,7 +31,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { return instance.Spec.ServiceAccount } -//ServiceAccount returns the service account for the given instance +//ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.ServiceAccount(otelcol) diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 5c8c7249e..1430811a4 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index e13fbe2c1..bf0598cf3 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade import ( diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index c8bf1e4ed..47ca3150c 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade_test import ( diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index f4c78aa8c..fd4495b16 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next. package upgrade @@ -14,7 +28,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/version" ) -// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary +// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary. func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Version, cl client.Client) error { logger.Info("looking for managed instances to upgrade") @@ -63,7 +77,7 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi return nil } -// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version +// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version. func ManagedInstance(ctx context.Context, logger logr.Logger, currentV version.Version, cl client.Client, otelcol v1alpha1.OpenTelemetryCollector) (v1alpha1.OpenTelemetryCollector, error) { // this is likely a new instance, assume it's already up to date if otelcol.Status.Version == "" { diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index e2aac5639..449246b67 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade_test import ( diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 188888b9e..4fbac3ea2 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade import ( diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 90e021835..dd4c4bea0 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade_test import ( diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index a6752509c..c4e7c5c6b 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade import ( @@ -6,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" ) -// this is our first version under otel/opentelemetry-collector +// this is our first version under otel/opentelemetry-collector. func upgrade0_2_10(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // this is a no-op, but serves to keep the skeleton here for the future versions return otelcol, nil diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 379fb4eb6..5747282c1 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade import ( diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index bd70b6632..9d71715e8 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade_test import ( diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index da3feedce..25df1a8ec 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package upgrade import ( diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index b77cd8359..292326e7c 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -23,7 +23,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -// Volumes builds the volumes for the given instance, including the config map volume +// Volumes builds the volumes for the given instance, including the config map volume. func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.Volume { volumes := []corev1.Volume{{ Name: naming.ConfigMapVolume(), diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index 36b7dcc90..ecc3aa808 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector_test import ( diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 4fe1505eb..cf18051a4 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package naming is for determining the names for components (containers, services, ...). package naming @@ -7,42 +21,42 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" ) -// ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers +// ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. func ConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } -// ConfigMapVolume returns the name to use for the config map's volume in the pod +// ConfigMapVolume returns the name to use for the config map's volume in the pod. func ConfigMapVolume() string { return "otc-internal" } -// Container returns the name to use for the container in the pod +// Container returns the name to use for the container in the pod. func Container() string { return "otc-container" } -// Collector builds the collector (deployment/daemonset) name based on the instance +// Collector builds the collector (deployment/daemonset) name based on the instance. func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } -// HeadlessService builds the name for the headless service based on the instance +// HeadlessService builds the name for the headless service based on the instance. func HeadlessService(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-headless", Service(otelcol)) } -// MonitoringService builds the name for the monitoring service based on the instance +// MonitoringService builds the name for the monitoring service based on the instance. func MonitoringService(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-monitoring", Service(otelcol)) } -// Service builds the service name based on the instance +// Service builds the service name based on the instance. func Service(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } -// ServiceAccount builds the service account name based on the instance +// ServiceAccount builds the service account name based on the instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } diff --git a/pkg/platform/main.go b/pkg/platform/main.go index 9c4733798..e4791a28e 100644 --- a/pkg/platform/main.go +++ b/pkg/platform/main.go @@ -15,17 +15,17 @@ // Package platform contains target platforms this operator might run on. package platform -// Platform holds the auto-detected platform type +// Platform holds the auto-detected platform type. type Platform int const ( - // Unknown is used when the current platform can't be determined + // Unknown is used when the current platform can't be determined. Unknown Platform = iota - // OpenShift represents a platform of type OpenShift + // OpenShift represents a platform of type OpenShift. OpenShift Platform = iota - // Kubernetes represents a platform of type Kubernetes + // Kubernetes represents a platform of type Kubernetes. Kubernetes ) diff --git a/pkg/sidecar/annotation.go b/pkg/sidecar/annotation.go index 34a76b747..8225976c2 100644 --- a/pkg/sidecar/annotation.go +++ b/pkg/sidecar/annotation.go @@ -21,11 +21,11 @@ import ( ) const ( - // Annotation contains the annotation name that pods contain, indicating whether a sidecar is desired + // Annotation contains the annotation name that pods contain, indicating whether a sidecar is desired. Annotation = "sidecar.opentelemetry.io/inject" ) -// AnnotationValue returns the effective annotation value, based on the annotations from the pod and namespace +// AnnotationValue returns the effective annotation value, based on the annotations from the pod and namespace. func AnnotationValue(ns corev1.Namespace, pod corev1.Pod) string { // is the pod annotated with instructions to inject sidecars? is the namespace annotated? // if any of those is true, a sidecar might be desired. diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index ea4dc05ae..0dd4a79bf 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -31,7 +31,7 @@ const ( label = "sidecar.opentelemetry.io/injected" ) -// Add a new sidecar container to the given pod, based on the given OpenTelemetryCollector +// Add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { // add the container volumes := collector.Volumes(cfg, otelcol) @@ -47,7 +47,7 @@ func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCo return pod, nil } -// Remove the sidecar container from the given pod +// Remove the sidecar container from the given pod. func Remove(pod corev1.Pod) (corev1.Pod, error) { if !ExistsIn(pod) { return pod, nil @@ -63,7 +63,7 @@ func Remove(pod corev1.Pod) (corev1.Pod, error) { return pod, nil } -// ExistsIn checks whether a sidecar container exists in the given pod +// ExistsIn checks whether a sidecar container exists in the given pod. func ExistsIn(pod corev1.Pod) bool { for _, container := range pod.Spec.Containers { if container.Name == naming.Container() { From 97a281aa976f0b2eb03d72088cbc1136b9e45f5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 16 Dec 2020 14:58:43 +0100 Subject: [PATCH 0121/1234] Remove OpenShift bundle from release (#145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .ci/create-release-github.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/create-release-github.sh b/.ci/create-release-github.sh index 84f745713..8af5424ff 100755 --- a/.ci/create-release-github.sh +++ b/.ci/create-release-github.sh @@ -7,4 +7,4 @@ gh config set prompt disabled gh release create \ -t "Release ${OPERATOR_VERSION}" \ "${OPERATOR_VERSION}" \ - 'dist/opentelemetry-operator.yaml#Installation manifest for Kubernetes' 'dist/bundle.tar.gz#Manifest bundle for OLM' + 'dist/opentelemetry-operator.yaml#Installation manifest for Kubernetes' From 10f3fb2c237c9f6d65d7e9a6c87a1fee3d1e00f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 17 Dec 2020 10:23:36 +0100 Subject: [PATCH 0122/1234] Adjust container image tags (#148) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/publish-images.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 4d62dead1..b0b886ad6 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -6,6 +6,8 @@ on: release: types: [published] + workflow_dispatch: + jobs: publish-containers: name: Publish container images @@ -24,7 +26,10 @@ jobs: uses: crazy-max/ghaction-docker-meta@v1 with: images: quay.io/opentelemetry/opentelemetry-operator - tag-sha: true + tag-semver: | + {{raw}} + {{version}} + {{major}}.{{minor}} - name: Set up QEMU uses: docker/setup-qemu-action@v1 From e616b656e5ebb5de7866cd5a8bf9d3492bca03e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 17 Dec 2020 11:10:23 +0100 Subject: [PATCH 0123/1234] Add permissions for leases.coordination.k8s.io (#151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- config/rbac/role.yaml | 9 +++++++++ controllers/opentelemetrycollector_controller.go | 1 + 2 files changed, 10 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 728e1c9de..131ae3e7c 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -73,6 +73,15 @@ rules: - patch - update - watch +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - update - apiGroups: - opentelemetry.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 0a6955cdb..36ca7738f 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -105,6 +105,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // Reconcile the current state of an OpenTelemetry collector resource with the desired state. func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) { From 26bb32b7a4c46e82d5de7e9b0ddc14d06d1bdf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 17 Dec 2020 12:14:59 +0100 Subject: [PATCH 0124/1234] Set env vars correctly in workflow steps (#152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/publish-images.yaml | 12 +++++++++--- main.go | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index b0b886ad6..122479a30 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -15,6 +15,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow + + - name: Describe the current state + run: git describe --tags + - name: Set env vars for the job run: | grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV @@ -63,8 +69,8 @@ jobs: labels: ${{ steps.docker_meta.outputs.labels }} build-args: | VERSION_PKG=github.com/open-telemetry/opentelemetry-operator/internal/version - VERSION=${VERSION} - VERSION_DATE=${VERSION_DATE} - OTELCOL_VERSION=${OTELCOL_VERSION} + VERSION=${{ env.VERSION }} + VERSION_DATE=${{ env.VERSION_DATE }} + OTELCOL_VERSION=${{ env.OTELCOL_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/main.go b/main.go index 120ae5083..3fe73dbe2 100644 --- a/main.go +++ b/main.go @@ -70,6 +70,18 @@ func main() { // Add flags related to this operator v := version.Get() + logger := zap.New(zap.UseFlagOptions(&opts)) + ctrl.SetLogger(logger) + + logger.Info("Starting the OpenTelemetry Operator", + "opentelemetry-operator", v.Operator, + "opentelemetry-collector", v.OpenTelemetryCollector, + "build-date", v.BuildDate, + "go-version", v.Go, + "go-arch", runtime.GOARCH, + "go-os", runtime.GOOS, + ) + restConfig := ctrl.GetConfigOrDie() // builds the operator's configuration @@ -89,18 +101,6 @@ func main() { pflag.Parse() - logger := zap.New(zap.UseFlagOptions(&opts)) - ctrl.SetLogger(logger) - - logger.Info("Starting the OpenTelemetry Operator", - "opentelemetry-operator", v.Operator, - "opentelemetry-collector", v.OpenTelemetryCollector, - "build-date", v.BuildDate, - "go-version", v.Go, - "go-arch", runtime.GOARCH, - "go-os", runtime.GOOS, - ) - watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") if found { setupLog.Info("watching namespace(s)", "namespaces", watchNamespace) From 0a173017ed2644bfd5145285abc8fa4a03fc9f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 17 Dec 2020 12:28:44 +0100 Subject: [PATCH 0125/1234] Release v0.17.1 (#153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 6 ++++++ versions.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index beb63fdc4..0f989e507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changes by Version ================== +0.17.1 (2020-12-17) +------------------- +* Set env vars correctly in workflow steps ([#152](https://github.com/open-telemetry/opentelemetry-operator/pull/152), [@jpkrohling](https://github.com/jpkrohling)) +* Add permissions for leases.coordination.k8s.io ([#151](https://github.com/open-telemetry/opentelemetry-operator/pull/151), [@jpkrohling](https://github.com/jpkrohling)) +* Adjust container image tags ([#148](https://github.com/open-telemetry/opentelemetry-operator/pull/148), [@jpkrohling](https://github.com/jpkrohling)) + 0.17.0 (2020-12-16) ------------------- * Bumped OpenTelemetry Collector to v0.17.0 ([#144](https://github.com/open-telemetry/opentelemetry-operator/pull/144), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/versions.txt b/versions.txt index 1ee476fcc..d6853c931 100644 --- a/versions.txt +++ b/versions.txt @@ -5,4 +5,4 @@ opentelemetry-collector=0.17.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.17.0 +operator=0.17.1 From 3039640222b4e6d56a1cbce2d89c61b1418793b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 18 Dec 2020 16:27:23 +0100 Subject: [PATCH 0126/1234] Update operator-sdk to 1.2.0 (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/release.yaml | 2 +- .gitignore | 6 +- CONTRIBUTING.md | 63 + Makefile | 17 +- RELEASE.md | 3 + api/v1alpha1/opentelemetrycollector_types.go | 1 + bundle.Dockerfile | 14 + ...er-manager-metrics-service_v1_service.yaml | 16 + ...horization.k8s.io_v1beta1_clusterrole.yaml | 10 + ...y-operator-webhook-service_v1_service.yaml | 13 + ...emetry-operator.clusterserviceversion.yaml | 334 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 1162 +++++++++++++++++ bundle/metadata/annotations.yaml | 12 + config/certmanager/certificate.yaml | 2 +- config/default/manager_webhook_patch.yaml | 2 +- ...emetry-operator.clusterserviceversion.yaml | 73 +- 16 files changed, 1664 insertions(+), 66 deletions(-) create mode 100644 bundle.Dockerfile create mode 100644 bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml create mode 100644 bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml create mode 100644 bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml create mode 100644 bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml create mode 100644 bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml create mode 100644 bundle/metadata/annotations.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b4ccda71..bf2915a76 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.0.2 with: - operator-sdk-version: v0.19.0 + operator-sdk-version: v1.2.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" diff --git a/.gitignore b/.gitignore index 80d243954..ab1cdba9b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,13 +17,9 @@ bin # Kubernetes Generated files - skip generated files, except for vendored files !vendor/**/zz_generated.* -# Operator SDK generated files -bundle -bundle.Dockerfile -bundle.tar.gz - # Release artifacts dist +bundle.tar.gz # editor and IDE paraphernalia .idea diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb35b54c9..93322dccf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,3 +88,66 @@ Every bug fix should be accompanied with a unit test, so that we can prevent reg ### Documentation, typos, ... They are mostly welcome! + +## Operator Lifecycle Manager (OLM) + +For production environments, it is recommended to use the [Operator Lifecycle Manager (OLM)](https://github.com/operator-framework/operator-lifecycle-manager) to provision and update the OpenTelemetry Operator. Our operator is available in the [Operator Hub](https://operatorhub.io/operator/opentelemetry-operator), and when making changes involving those manifests the following steps can be used for testing. Refer to the [OLM documentation](https://sdk.operatorframework.io/docs/olm-integration/quickstart-bundle/) for more complete information. + +### Setup OLM + +When using Kubernetes, install OLM following the [official instructions](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md). At the moment of this writing, it involves the following: + +``` +kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml +kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml +kubectl wait --for=condition=available deployment packageserver -n olm +kubectl wait --for=condition=available deployment olm-operator -n olm +kubectl wait --for=condition=available deployment catalog-operator -n olm +``` + +When using OpenShift, OLM is already installed. + +### Create the bundle and related images + +The following commands will generate a bundle under `bundle/` and build an image with its contents. It will then generate and publish an index image with the [Operator Package Manager (OPM)](https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md#opm) + +``` +export VERSION=x.y.z +make set-image-controller bundle bundle-build +podman push quay.io/${USER}/opentelemetry-operator-bundle:${VERSION} +opm index add --bundles quay.io/${USER}/opentelemetry-operator-bundle:${VERSION} --tag quay.io/${USER}/opentelemetry-operator-index:${VERSION} +podman push quay.io/${USER}/opentelemetry-operator-index:${VERSION} +``` + +### Install the operator + +To install our operator, create a `CatalogSource` for our index image, wait for OLM to synchronize and finally create a `Subscription`. Make sure to replace `${USER}` with your username and `${VERSION}` with the version used in the previous step. The namespace for both should be `operators` on Kubernetes, while `openshift-operators` should be used for OpenShift. + +``` +kubectl apply -f - <'']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image indicates the container image to use for the OpenTelemetry Collector. + type: string + mode: + description: Mode represents how the collector should be deployed (deployment, daemonset or sidecar) + enum: + - daemonset + - deployment + - sidecar + type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default. + type: string + name: + description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying collector deployment(s). + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." + properties: + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + selector: + description: A label query over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. + properties: + messages: + description: Messages about actions performed by the operator on this resource. + items: + type: string + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is currently not being set and might be removed in the next version. + format: int32 + type: integer + version: + description: Version of the managed OpenTelemetry Collector (operand) + type: string + type: object + type: object + version: v1alpha1 + versions: + - name: v1alpha1 + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml new file mode 100644 index 000000000..5250ce2db --- /dev/null +++ b/bundle/metadata/annotations.yaml @@ -0,0 +1,12 @@ +annotations: + operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.bundle.manifests.v1: manifests/ + operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.metadata.v1: metadata/ + operators.operatorframework.io.bundle.package.v1: opentelemetry-operator + operators.operatorframework.io.metrics.builder: operator-sdk-v1.2.0 + operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 + operators.operatorframework.io.metrics.project_layout: go + operators.operatorframework.io.test.config.v1: tests/scorecard/ + operators.operatorframework.io.test.mediatype.v1: scorecard+v1 + operators.operatorframework.io.bundle.channel.default.v1: alpha diff --git a/config/certmanager/certificate.yaml b/config/certmanager/certificate.yaml index 58db114fa..4b64202a9 100644 --- a/config/certmanager/certificate.yaml +++ b/config/certmanager/certificate.yaml @@ -23,4 +23,4 @@ spec: issuerRef: kind: Issuer name: selfsigned-issuer - secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize + secretName: opentelemetry-operator-controller-manager-service-cert # this secret will not be prefixed, since it's not managed by kustomize diff --git a/config/default/manager_webhook_patch.yaml b/config/default/manager_webhook_patch.yaml index 738de350b..d91f2ac54 100644 --- a/config/default/manager_webhook_patch.yaml +++ b/config/default/manager_webhook_patch.yaml @@ -20,4 +20,4 @@ spec: - name: cert secret: defaultMode: 420 - secretName: webhook-server-cert + secretName: opentelemetry-operator-controller-manager-service-cert diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 65590b108..07e0c0df8 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -4,63 +4,39 @@ metadata: annotations: alm-examples: '[]' capabilities: Basic Install - operators.operatorframework.io/builder: operator-sdk-v0.19.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 + categories: Logging & Tracing + certified: "false" + containerImage: quay.io/opentelemetry/opentelemetry-operator + createdAt: "2020-12-16T13:37:00+00:00" + description: Provides the OpenTelemetry components, including the Collector + operators.operatorframework.io/builder: operator-sdk-v1.2.0 + operators.operatorframework.io/project_layout: go + repository: github.com/open-telemetry/opentelemetry-operator + support: OpenTelemetry Community name: opentelemetry-operator.vX.Y.Z namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + displayName: OpenTelemetry Collector kind: OpenTelemetryCollector name: opentelemetrycollectors.core.opentelemetry.io - specDescriptors: - - description: Args is the set of arguments to pass to the OpenTelemetry Collector - binary - displayName: Args - path: args - - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - displayName: Config - path: config - - description: Image indicates the container image to use for the OpenTelemetry - Collector. - displayName: Image - path: image - - description: Mode represents how the collector should be deployed (deployment, - daemonset or sidecar) - displayName: Mode - path: mode - - description: Ports allows a set of ports to be exposed by the underlying v1.Service. - By default, the operator will attempt to infer the required ports by parsing - the .Spec.Config property but this property can be used to open aditional - ports that can't be inferred by the operator, like for custom receivers. - displayName: Ports - path: ports - - description: Replicas is the number of pod instances for the underlying OpenTelemetry - Collector - displayName: Replicas - path: replicas - - description: ServiceAccount indicates the name of an existing service account - to use with this instance. - displayName: Service Account - path: serviceAccount - - description: VolumeMounts represents the mount points to use in the underlying - collector deployment(s) - displayName: Volume Mounts - path: volumeMounts - - description: Volumes represents which volumes to use in the underlying collector - deployment(s). - displayName: Volumes - path: volumes version: v1alpha1 - description: Provides the OpenTelemetry components, including the Collector + description: |- + OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. + + ### Operator features + + * **Sidecar injection** - annotate your pods and let the operator inject a sidecar. + * **Managed upgrades** - updating the operator will automatically update your OpenTelemetry collectors. + * **Deployment modes** - your collector can be deployed as sidecar, daemon set, or regular deployment. + * **Service port management** - the operator detects which ports need to be exposed based on the provided configuration. displayName: Community OpenTelemetry Operator icon: - - base64data: "" - mediatype: "" + - base64data: PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHJvbGU9ImltZyIgdmlld0JveD0iLTEyLjcwIC0xMi43MCAxMDI0LjQwIDEwMjQuNDAiPjxzdHlsZT5zdmcge2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAwMCAxMDAwfTwvc3R5bGU+PHBhdGggZmlsbD0iI2Y1YTgwMCIgZD0iTTUyOC43IDU0NS45Yy00MiA0Mi00MiAxMTAuMSAwIDE1Mi4xczExMC4xIDQyIDE1Mi4xIDAgNDItMTEwLjEgMC0xNTIuMS0xMTAuMS00Mi0xNTIuMSAwem0xMTMuNyAxMTMuOGMtMjAuOCAyMC44LTU0LjUgMjAuOC03NS4zIDAtMjAuOC0yMC44LTIwLjgtNTQuNSAwLTc1LjMgMjAuOC0yMC44IDU0LjUtMjAuOCA3NS4zIDAgMjAuOCAyMC43IDIwLjggNTQuNSAwIDc1LjN6bTM2LjYtNjQzbC02NS45IDY1LjljLTEyLjkgMTIuOS0xMi45IDM0LjEgMCA0N2wyNTcuMyAyNTcuM2MxMi45IDEyLjkgMzQuMSAxMi45IDQ3IDBsNjUuOS02NS45YzEyLjktMTIuOSAxMi45LTM0LjEgMC00N0w3MjUuOSAxNi43Yy0xMi45LTEyLjktMzQtMTIuOS00Ni45IDB6TTIxNy4zIDg1OC44YzExLjctMTEuNyAxMS43LTMwLjggMC00Mi41bC0zMy41LTMzLjVjLTExLjctMTEuNy0zMC44LTExLjctNDIuNSAwTDcyLjEgODUybC0uMS4xLTE5LTE5Yy0xMC41LTEwLjUtMjcuNi0xMC41LTM4IDAtMTAuNSAxMC41LTEwLjUgMjcuNiAwIDM4bDExNCAxMTRjMTAuNSAxMC41IDI3LjYgMTAuNSAzOCAwczEwLjUtMjcuNiAwLTM4bC0xOS0xOSAuMS0uMSA2OS4yLTY5LjJ6Ii8+PHBhdGggZmlsbD0iIzQyNWNjNyIgZD0iTTU2NS45IDIwNS45TDQxOS41IDM1Mi4zYy0xMyAxMy0xMyAzNC40IDAgNDcuNGw5MC40IDkwLjRjNjMuOS00NiAxNTMuNS00MC4zIDIxMSAxNy4ybDczLjItNzMuMmMxMy0xMyAxMy0zNC40IDAtNDcuNEw2MTMuMyAyMDUuOWMtMTMtMTMuMS0zNC40LTEzLjEtNDcuNCAwem0tOTQgMzIyLjNsLTUzLjQtNTMuNGMtMTIuNS0xMi41LTMzLTEyLjUtNDUuNSAwTDE4NC43IDY2My4yYy0xMi41IDEyLjUtMTIuNSAzMyAwIDQ1LjVsMTA2LjcgMTA2LjdjMTIuNSAxMi41IDMzIDEyLjUgNDUuNSAwTDQ1OCA2OTQuMWMtMjUuNi01Mi45LTIxLTExNi44IDEzLjktMTY1Ljl6Ii8+PC9zdmc+ + mediatype: image/svg+xml install: spec: deployments: null @@ -82,13 +58,12 @@ spec: - monitoring - troubleshooting links: - - name: Opentelemetry Operator - url: https://opentelemetry-operator.domain + - name: OpenTelemetry Operator + url: https://github.com/open-telemetry/opentelemetry-operator maintainers: - email: jpkroehling@redhat.com name: Juraci Paixão Kröhling maturity: alpha provider: name: OpenTelemetry Community - url: https://github.com/open-telemetry/opentelemetry-operator version: 0.0.0 From 8fc8b28b94fbf8b81152d3d5d0b70d61fd4f9fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 18 Dec 2020 17:25:56 +0100 Subject: [PATCH 0127/1234] Add e2e tests (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/e2e.yaml | 22 ++++++++++ .gitignore | 4 ++ CONTRIBUTING.md | 8 ++++ Makefile | 52 ++++++++++++++++++++++-- hack/install-kuttl.sh | 5 +++ kuttl-test.yaml | 14 +++++++ tests/e2e/smoke-simplest/00-assert.yaml | 6 +++ tests/e2e/smoke-simplest/00-install.yaml | 22 ++++++++++ 8 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/e2e.yaml create mode 100755 hack/install-kuttl.sh create mode 100644 kuttl-test.yaml create mode 100644 tests/e2e/smoke-simplest/00-assert.yaml create mode 100644 tests/e2e/smoke-simplest/00-install.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 000000000..d955dce84 --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,22 @@ +name: "End-to-end tests" + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + e2e-tests: + name: End-to-end tests + runs-on: ubuntu-20.04 + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: "install kuttl" + run: ./hack/install-kuttl.sh + + - name: "run tests" + run: make prepare-e2e e2e diff --git a/.gitignore b/.gitignore index ab1cdba9b..b0e1ac71e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ bundle.tar.gz # local resources, not to be committed local + +# test resources +kubeconfig +tests/_build/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93322dccf..400f1c3f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,6 +69,14 @@ USE_EXISTING_CLUSTER=true make test Tests can also be run without an existing cluster. For that, install [`kubebuilder`](https://book.kubebuilder.io/quick-start.html#installation). In this case, the tests will bootstrap `etcd` and `kubernetes-api-server` for the tests. Run against an existing cluster whenever possible, though. +### End to end tests + +To run the end-to-end tests, you'll need [`kind`](https://kind.sigs.k8s.io) and [`kuttl`](https://kuttl.dev). Refer to their documentation for installation instructions. + +Once they are installed, the tests can be executed with `make prepare-e2e`, which will build an image to use with the tests, followed by `make e2e`. Each call to the `e2e` target will setup a fresh `kind` cluster, making it safe to be executed multiple times with a single `prepare-e2e` step. + +The tests are located under `tests/e2e` and are written to be used with `kuttl`. Refer to their documentation to understand how tests are written. + ## Project Structure For a general overview of the directories from this operator and what to expect in each one of them, please check out the [official GoDoc](https://godoc.org/github.com/open-telemetry/opentelemetry-operator) or the [locally-hosted GoDoc](http://localhost:6060/pkg/github.com/open-telemetry/opentelemetry-operator/) diff --git a/Makefile b/Makefile index ac6278dac..9ecf37143 100644 --- a/Makefile +++ b/Makefile @@ -92,8 +92,20 @@ vet: generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." +# end-to-tests +e2e: + $(KUTTL) test + +prepare-e2e: kuttl set-test-image-vars set-image-controller container + mkdir -p tests/_build/crds tests/_build/manifests + $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml + $(KUSTOMIZE) build config/crd -o tests/_build/crds/ + +set-test-image-vars: +IMG=local/opentelemetry-operator:e2e + # Build the container image, used only for local dev purposes -container: test +container: docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} . # Push the container image, used only for local dev purposes @@ -102,9 +114,9 @@ container-push: cert-manager: kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.3/cert-manager.yaml - kubectl wait --for=condition=available deployment cert-manager -n cert-manager - kubectl wait --for=condition=available deployment cert-manager-cainjector -n cert-manager - kubectl wait --for=condition=available deployment cert-manager-webhook -n cert-manager + kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager + kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager + kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager # find or download controller-gen # download controller-gen if necessary @@ -138,6 +150,38 @@ else KUSTOMIZE=$(shell which kustomize) endif +kuttl: +ifeq (, $(shell which kubectl-kuttl)) + echo ${PATH} + ls -l /usr/local/bin + which kubectl-kuttl + + @{ \ + set -e ;\ + echo "" ;\ + echo "ERROR: kuttl not found." ;\ + echo "Please check https://kuttl.dev/docs/cli.html for installation instructions and try again." ;\ + echo "" ;\ + exit 1 ;\ + } +else +KUTTL=$(shell which kubectl-kuttl) +endif + +kind: +ifeq (, $(shell which kind)) + @{ \ + set -e ;\ + echo "" ;\ + echo "ERROR: kind not found." ;\ + echo "Please check https://kind.sigs.k8s.io/docs/user/quick-start/#installation for installation instructions and try again." ;\ + echo "" ;\ + exit 1 ;\ + } +else +KIND=$(shell which kind) +endif + operator-sdk: ifeq (, $(shell which operator-sdk)) @{ \ diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh new file mode 100755 index 000000000..f8e4123e0 --- /dev/null +++ b/hack/install-kuttl.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.7.2/kubectl-kuttl_0.7.2_linux_x86_64 +sudo chmod +x /usr/local/bin/kubectl-kuttl +export PATH=$PATH:/usr/local/bin diff --git a/kuttl-test.yaml b/kuttl-test.yaml new file mode 100644 index 000000000..1e22a50ad --- /dev/null +++ b/kuttl-test.yaml @@ -0,0 +1,14 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +startKIND: true +crdDir: ./tests/_build/crds/ +artifactsDir: ./tests/_build/artifacts/ +kindContainers: +- local/opentelemetry-operator:e2e +commands: +- command: make cert-manager +- command: kubectl apply -f ./tests/_build/manifests/01-opentelemetry-operator.yaml +- command: kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system +- command: sleep 5s +testDirs: +- ./tests/e2e/ diff --git a/tests/e2e/smoke-simplest/00-assert.yaml b/tests/e2e/smoke-simplest/00-assert.yaml new file mode 100644 index 000000000..507217d9c --- /dev/null +++ b/tests/e2e/smoke-simplest/00-assert.yaml @@ -0,0 +1,6 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 \ No newline at end of file diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml new file mode 100644 index 000000000..0988cc0fb --- /dev/null +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -0,0 +1,22 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + queued_retry: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [queued_retry] + exporters: [logging] From 970e4f63ab58b8d17c9d9db3fc6fdbc64c87477b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Dec 2020 07:31:29 +0000 Subject: [PATCH 0128/1234] Bump k8s.io/api from 0.20.0 to 0.20.1 (#158) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.20.0 to 0.20.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/api&package-manager=go_modules&previous-version=0.20.0&new-version=0.20.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index bfb15e5c7..47e72a1ea 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.0 - k8s.io/apimachinery v0.20.0 + k8s.io/api v0.20.1 + k8s.io/apimachinery v0.20.1 k8s.io/client-go v0.20.0 k8s.io/kubectl v0.20.0 sigs.k8s.io/controller-runtime v0.7.0 diff --git a/go.sum b/go.sum index c635b69dd..e22a030da 100644 --- a/go.sum +++ b/go.sum @@ -786,11 +786,15 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= From f487db5326f948b13c08223bf4d1e58aae4ebd75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Dec 2020 08:33:53 +0000 Subject: [PATCH 0129/1234] Bump k8s.io/client-go from 0.20.0 to 0.20.1 (#159) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.20.0 to 0.20.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/client-go&package-manager=go_modules&previous-version=0.20.0&new-version=0.20.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 47e72a1ea..3cc8b11a8 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.20.1 k8s.io/apimachinery v0.20.1 - k8s.io/client-go v0.20.0 + k8s.io/client-go v0.20.1 k8s.io/kubectl v0.20.0 sigs.k8s.io/controller-runtime v0.7.0 ) diff --git a/go.sum b/go.sum index e22a030da..196dac22c 100644 --- a/go.sum +++ b/go.sum @@ -800,6 +800,8 @@ k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= From 7a93e7a6f6fb2eb1a3174c197d80691408d1b6d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Dec 2020 08:44:35 +0000 Subject: [PATCH 0130/1234] Bump k8s.io/kubectl from 0.20.0 to 0.20.1 (#157) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.0 to 0.20.1.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/kubectl&package-manager=go_modules&previous-version=0.20.0&new-version=0.20.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 3cc8b11a8..88a7cdf80 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( k8s.io/api v0.20.1 k8s.io/apimachinery v0.20.1 k8s.io/client-go v0.20.1 - k8s.io/kubectl v0.20.0 + k8s.io/kubectl v0.20.1 sigs.k8s.io/controller-runtime v0.7.0 ) diff --git a/go.sum b/go.sum index 196dac22c..f941928de 100644 --- a/go.sum +++ b/go.sum @@ -784,30 +784,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= -k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= -k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= -k8s.io/cli-runtime v0.20.0/go.mod h1:C5tewU1SC1t09D7pmkk83FT4lMAw+bvMDuRxA7f0t2s= +k8s.io/cli-runtime v0.20.1/go.mod h1:6wkMM16ZXTi7Ow3JLYPe10bS+XBnIkL6V9dmEz0mbuY= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= -k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= -k8s.io/component-base v0.20.0 h1:BXGL8iitIQD+0NgW49UsM7MraNUUGDU3FBmrfUAtmVQ= -k8s.io/component-base v0.20.0/go.mod h1:wKPj+RHnAr8LW2EIBIK7AxOHPde4gme2lzXwVSoRXeA= -k8s.io/component-helpers v0.20.0/go.mod h1:nx6NOtfSfGOxnSZsDJxpGbnsVuUA1UXpwDvZIrtigNk= +k8s.io/component-base v0.20.1 h1:6OQaHr205NSl24t5wOF2IhdrlxZTWEZwuGlLvBgaeIg= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-helpers v0.20.1/go.mod h1:Q8trCj1zyLNdeur6pD2QvsF8d/nWVfK71YjN5+qVXy4= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -819,9 +813,9 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.0 h1:q6HH6jILYi2lkzFqBhs63M4bKLxYlM0HpFJ///MgARA= -k8s.io/kubectl v0.20.0/go.mod h1:8x5GzQkgikz7M2eFGGuu6yOfrenwnw5g4RXOUgbjR1M= -k8s.io/metrics v0.20.0/go.mod h1:9yiRhfr8K8sjdj2EthQQE9WvpYDvsXIV3CjN4Ruq4Jw= +k8s.io/kubectl v0.20.1 h1:7h1vSrL/B3hLrhlCJhbTADElPKDbx+oVUt3+QDSXxBo= +k8s.io/kubectl v0.20.1/go.mod h1:2bE0JLYTRDVKDiTREFsjLAx4R2GvUtL/mGYFXfFFMzY= +k8s.io/metrics v0.20.1/go.mod h1:JhpBE/fad3yRGsgEpiZz5FQQM5wJ18OTLkD7Tv40c0s= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= From c2e2bff295b383d59420d0642c93d61e45b752d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 06:30:15 +0000 Subject: [PATCH 0131/1234] Bump k8s.io/client-go from 0.20.1 to 0.20.2 (#162) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.20.1 to 0.20.2.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/client-go&package-manager=go_modules&previous-version=0.20.1&new-version=0.20.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 6 +++--- go.sum | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 88a7cdf80..984e7a0e5 100644 --- a/go.mod +++ b/go.mod @@ -8,9 +8,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.1 - k8s.io/apimachinery v0.20.1 - k8s.io/client-go v0.20.1 + k8s.io/api v0.20.2 + k8s.io/apimachinery v0.20.2 + k8s.io/client-go v0.20.2 k8s.io/kubectl v0.20.1 sigs.k8s.io/controller-runtime v0.7.0 ) diff --git a/go.sum b/go.sum index f941928de..664b40c7c 100644 --- a/go.sum +++ b/go.sum @@ -786,16 +786,22 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= k8s.io/cli-runtime v0.20.1/go.mod h1:6wkMM16ZXTi7Ow3JLYPe10bS+XBnIkL6V9dmEz0mbuY= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= From cc1655fd3ff3991aa924cd21b6b425006f9977bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 06:30:22 +0000 Subject: [PATCH 0132/1234] Bump github.com/stretchr/testify from 1.6.1 to 1.7.0 (#161) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
Release notes

Sourced from github.com/stretchr/testify's releases.

Minor improvements and bug fixes

Minor feature improvements and bug fixes

Commits
  • acba37e Only use repeatability if no repeatability left
  • eb8c41e Add more tests to mock package
  • a5830c5 Extract method to evaluate closest match
  • 1962448 Use Repeatability as tie-breaker for closest match
  • 92707c0 Fixed the link to not point to assert only
  • 05dd0b2 Updated the readme to point to pkg.dev
  • c26b7f3 Update assertions.go
  • 8fb4b24 [Fix] The most recent changes to golang/protobuf breaks the spew Circular dat...
  • dc8af72 add generated code for positive/negative assertion
  • 1544508 add assert positive/negative
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.6.1&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 984e7a0e5..b09729260 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v0.3.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.6.1 + github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 diff --git a/go.sum b/go.sum index 664b40c7c..00a219b8a 100644 --- a/go.sum +++ b/go.sum @@ -449,6 +449,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= From a011403e54949e201319412017ca538aa7ae731f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Jan 2021 07:35:41 +0000 Subject: [PATCH 0133/1234] Bump k8s.io/kubectl from 0.20.1 to 0.20.2 (#163) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.1 to 0.20.2.
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=k8s.io/kubectl&package-manager=go_modules&previous-version=0.20.1&new-version=0.20.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 22 ++++++++-------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index b09729260..1aa4a6bf1 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( k8s.io/api v0.20.2 k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.20.2 - k8s.io/kubectl v0.20.1 + k8s.io/kubectl v0.20.2 sigs.k8s.io/controller-runtime v0.7.0 ) diff --git a/go.sum b/go.sum index 00a219b8a..772b77a86 100644 --- a/go.sum +++ b/go.sum @@ -786,30 +786,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= -k8s.io/cli-runtime v0.20.1/go.mod h1:6wkMM16ZXTi7Ow3JLYPe10bS+XBnIkL6V9dmEz0mbuY= +k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/client-go v0.20.1 h1:Qquik0xNFbK9aUG92pxHYsyfea5/RPO9o9bSywNor+M= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= -k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= -k8s.io/component-base v0.20.1 h1:6OQaHr205NSl24t5wOF2IhdrlxZTWEZwuGlLvBgaeIg= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-helpers v0.20.1/go.mod h1:Q8trCj1zyLNdeur6pD2QvsF8d/nWVfK71YjN5+qVXy4= +k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= +k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= +k8s.io/component-helpers v0.20.2/go.mod h1:qeM6iAWGqIr+WE8n2QW2OK9XkpZkPNTxAoEv9jl40/I= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -821,9 +815,9 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.1 h1:7h1vSrL/B3hLrhlCJhbTADElPKDbx+oVUt3+QDSXxBo= -k8s.io/kubectl v0.20.1/go.mod h1:2bE0JLYTRDVKDiTREFsjLAx4R2GvUtL/mGYFXfFFMzY= -k8s.io/metrics v0.20.1/go.mod h1:JhpBE/fad3yRGsgEpiZz5FQQM5wJ18OTLkD7Tv40c0s= +k8s.io/kubectl v0.20.2 h1:mXExF6N4eQUYmlfXJmfWIheCBLF6/n4VnwQKbQki5iE= +k8s.io/kubectl v0.20.2/go.mod h1:/bchZw5fZWaGZxaRxxfDQKej/aDEtj/Tf9YSS4Jl0es= +k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= From 0ea829a0270cbb0c067135d975f636c2f91a898d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Jan 2021 06:28:37 +0000 Subject: [PATCH 0134/1234] Bump sigs.k8s.io/controller-runtime from 0.7.0 to 0.8.0 (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.7.0 to 0.8.0.
Release notes

Sourced from sigs.k8s.io/controller-runtime's releases.

v0.8.0

Changes since v0.7.1

:warning: Breaking changes

  • Fakeclient: Set ResourceVersion when adding objects to the tracker (#1306)

:sparkles: New Features

  • Checking configfile examples on check_everything.sh (#1336)
  • Adding WithContextFunc for webhook server to pass info to the handler (#1334)
  • Deprecate Inject interface (#1322)
  • initialize reconciler metrics when controller is started (#1324)
  • Allow configuring cache sync timeouts (#1247)
  • Bump Kubernetes dependencies to 1.20.1 (#1268, #1318)
  • Move cluster-specifics from Manager into new pkg/cluster (#1307)
  • Use anonymous function for locking when serving health probes (#1313)
  • Support for using both an external control plane and automatic webhooks together (#1265)

:bug: Bug Fixes

  • pkg/client: optionally allow caching of unstructured objects (#1332)
  • Ignore namespace key when getting cluster-scoped resources (#1326)
  • pkg/log: Set Log to NullLogger after 30 seconds (#1309)
  • Do not set PatchType if patch is empty (#1299)
  • Cache bypass should take into account List types (#1297)

:book: Documentation

  • Fix IntoContext() documentation (#1320)

Thanks to all our contributors! 😊

v0.7.1

Changes since v0.7.0

:bug: Bug Fixes

  • Cache bypass should take into account List types (#1298)
  • pkg/log: Set Log to NullLogger after 30 seconds (#1329)
  • Do not set PatchType if patch is empty (#1329)

Thanks to all our contributors! 😊

Commits
  • 818a2ce Merge pull request #1332 from joelanford/fix/allow-cached-unstructured-reads
  • f527a55 Merge pull request #1336 from christopherhein/check-everything-examples
  • d1a29ee Merge pull request #1334 from christopherhein/add-request-context-func
  • df6570c checking configfile examples on check_everything.sh
  • 925c552 adding WithContextFunc for webhook server to pass info to the handler
  • eb0f1d4 pkg/client: optionally allow caching of unstructured objects
  • 17b28b4 Merge pull request #1322 from varshaprasad96/deprecate/injectClient
  • 63e597b Merge pull request #1326 from joelanford/bug/ignore-namespace-cluster-scoped-get
  • 2c0bd8f feat: ignore namespace key when getting cluster-scoped resources
  • fe4a67a ✨ introduce LabelChangedPredicate to trigger event on label change (#1315)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigs.k8s.io/controller-runtime&package-manager=go_modules&previous-version=0.7.0&new-version=0.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 120 +++++++-------------------------------------------------- 2 files changed, 14 insertions(+), 108 deletions(-) diff --git a/go.mod b/go.mod index 1aa4a6bf1..5b67e3145 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.20.2 k8s.io/kubectl v0.20.2 - sigs.k8s.io/controller-runtime v0.7.0 + sigs.k8s.io/controller-runtime v0.8.0 ) replace ( diff --git a/go.sum b/go.sum index 772b77a86..d1e9a3efa 100644 --- a/go.sum +++ b/go.sum @@ -6,7 +6,6 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= @@ -26,24 +25,13 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -53,22 +41,15 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -76,7 +57,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -90,7 +70,6 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -108,8 +87,6 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -132,8 +109,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -147,49 +122,13 @@ github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -259,7 +198,6 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -319,11 +257,7 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -375,7 +309,6 @@ github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -415,7 +348,6 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -428,7 +360,6 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -436,7 +367,6 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -452,22 +382,15 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -493,13 +416,10 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= @@ -539,7 +459,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -547,11 +466,9 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -566,7 +483,6 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -591,7 +507,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -617,7 +532,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -638,10 +552,8 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjTo golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -652,7 +564,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -726,9 +637,9 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -785,51 +696,46 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= -k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= +k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= -k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-helpers v0.20.2/go.mod h1:qeM6iAWGqIr+WE8n2QW2OK9XkpZkPNTxAoEv9jl40/I= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.20.2 h1:mXExF6N4eQUYmlfXJmfWIheCBLF6/n4VnwQKbQki5iE= k8s.io/kubectl v0.20.2/go.mod h1:/bchZw5fZWaGZxaRxxfDQKej/aDEtj/Tf9YSS4Jl0es= k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= -sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.8.0 h1:s0dYdo7lQgJiAf+alP82PRwbz+oAqL3oSyMQ18XRDOc= +sigs.k8s.io/controller-runtime v0.8.0/go.mod h1:v9Lbj5oX443uR7GXYY46E0EE2o7k2YxQ58GxVNeXSW4= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From d28814ce91c7f8544ed9c80b457060e742848f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 22 Jan 2021 09:27:06 +0100 Subject: [PATCH 0135/1234] Revert change to controller-runtime, require e2e before automatic merge (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/mergify.yml | 2 ++ go.mod | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 2f7aba8a3..326e18339 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -9,6 +9,7 @@ pull_request_rules: conditions: - "#approved-reviews-by>=1" - "-draft" + - "status-success=End-to-end tests" - "status-success=Unit tests" - "status-success=Code standards (linting)" - "status-success=Security" @@ -22,6 +23,7 @@ pull_request_rules: - name: automatic merge for Dependabot pull requests conditions: - author~=^dependabot(|-preview)\[bot\]$ + - "status-success=End-to-end tests" - "status-success=Unit tests" - "status-success=Code standards (linting)" - "status-success=Security" diff --git a/go.mod b/go.mod index 5b67e3145..1aa4a6bf1 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.20.2 k8s.io/kubectl v0.20.2 - sigs.k8s.io/controller-runtime v0.8.0 + sigs.k8s.io/controller-runtime v0.7.0 ) replace ( From e23224ee92ac86d9b31d70dc580a25c1883d2d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 22 Jan 2021 13:13:14 +0100 Subject: [PATCH 0136/1234] Bumped OpenTelemetry Collector to v0.18.0 (#169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 +++++ versions.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f989e507..6f124cc92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.18.0 (2021-01-22) +------------------- +* Bumped OpenTelemetry Collector to v0.18.0 ([#169](https://github.com/open-telemetry/opentelemetry-operator/pull/169), [@jpkrohling](https://github.com/jpkrohling)) + + 0.17.1 (2020-12-17) ------------------- * Set env vars correctly in workflow steps ([#152](https://github.com/open-telemetry/opentelemetry-operator/pull/152), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/versions.txt b/versions.txt index d6853c931..09c1aa826 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.17.0 +opentelemetry-collector=0.18.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.17.1 +operator=0.18.0 From 2d4486e78f40a18ee418fb9b7f4c6c7467ab4805 Mon Sep 17 00:00:00 2001 From: Granville Schmidt <1246157+gramidt@users.noreply.github.com> Date: Mon, 25 Jan 2021 01:18:52 -0700 Subject: [PATCH 0137/1234] Fixed testing image from being used in non-test artifacts (fixes #170) (#171) Signed-off-by: Granville Schmidt <1246157+gramidt@users.noreply.github.com> Resolves Issue: #170 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9ecf37143..9af4b85f5 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ prepare-e2e: kuttl set-test-image-vars set-image-controller container $(KUSTOMIZE) build config/crd -o tests/_build/crds/ set-test-image-vars: -IMG=local/opentelemetry-operator:e2e + $(eval IMG=local/opentelemetry-operator:e2e) # Build the container image, used only for local dev purposes container: From a1c6f8a08e580c55f3b27e765f7eaf3c5489aa40 Mon Sep 17 00:00:00 2001 From: Max Neverov <1296281+mneverov@users.noreply.github.com> Date: Mon, 25 Jan 2021 15:05:30 +0100 Subject: [PATCH 0138/1234] Added project name to the PROJECT config file (#172) Added project name to the PROJECT config file projectName field is needed for operator-sdk to deduct the metadata name for the project. When the bundle command reads input files from the stdin and no --project argument is provided, and projectName is absent the generated metadata name has invalid pattern: '.v0.18.0'. This commit adds the projectName field so metadata.name is correctly generated. Fixes #37 --- PROJECT | 1 + ...emetry-operator.clusterserviceversion.yaml | 2 +- go.sum | 143 +++++++++++++----- 3 files changed, 109 insertions(+), 37 deletions(-) diff --git a/PROJECT b/PROJECT index a4943b95b..dbd0499e5 100644 --- a/PROJECT +++ b/PROJECT @@ -1,3 +1,4 @@ +projectName: opentelemetry-operator domain: opentelemetry.io layout: go.kubebuilder.io/v2 repo: github.com/open-telemetry/opentelemetry-operator diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 07e0c0df8..dc6e92828 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -13,7 +13,7 @@ metadata: operators.operatorframework.io/project_layout: go repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.vX.Y.Z + name: opentelemetry-operator.v0.0.0 namespace: placeholder spec: apiservicedefinitions: {} diff --git a/go.sum b/go.sum index d1e9a3efa..76b72d6f5 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,7 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= @@ -25,13 +26,24 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -41,15 +53,22 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -57,6 +76,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -70,6 +90,7 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -87,6 +108,8 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -109,6 +132,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -122,13 +147,49 @@ github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -138,7 +199,6 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7 h1:5ZkaAPbicIKTF2I64qf5Fh8Aa83Q/dnOafMYV0OMwjA= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -158,7 +218,6 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= @@ -170,7 +229,6 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= @@ -186,18 +244,17 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -257,7 +314,11 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -296,19 +357,18 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -337,7 +397,6 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= @@ -348,6 +407,7 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -360,6 +420,7 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -367,6 +428,7 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -374,53 +436,57 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -459,6 +525,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -466,9 +533,11 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -483,12 +552,12 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 h1:pE8b58s1HRDMi8RDc79m0HISf9D4TzseP40cEA6IGfs= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -507,6 +576,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -532,6 +602,7 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -539,21 +610,21 @@ golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fq golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -564,6 +635,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -594,7 +666,6 @@ golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGg golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -614,7 +685,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -637,9 +707,9 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -678,15 +748,12 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -696,46 +763,50 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= -k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= +k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-helpers v0.20.2/go.mod h1:qeM6iAWGqIr+WE8n2QW2OK9XkpZkPNTxAoEv9jl40/I= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.20.2 h1:mXExF6N4eQUYmlfXJmfWIheCBLF6/n4VnwQKbQki5iE= k8s.io/kubectl v0.20.2/go.mod h1:/bchZw5fZWaGZxaRxxfDQKej/aDEtj/Tf9YSS4Jl0es= k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.8.0 h1:s0dYdo7lQgJiAf+alP82PRwbz+oAqL3oSyMQ18XRDOc= -sigs.k8s.io/controller-runtime v0.8.0/go.mod h1:v9Lbj5oX443uR7GXYY46E0EE2o7k2YxQ58GxVNeXSW4= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= +sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= +sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From 543ff618e40cc035648bf3569a522d3559562034 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 15:22:43 +0100 Subject: [PATCH 0139/1234] Bump sigs.k8s.io/controller-runtime from 0.7.0 to 0.8.1 (#173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump sigs.k8s.io/controller-runtime from 0.7.0 to 0.8.1 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.7.0 to 0.8.1. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.7.0...v0.8.1) Signed-off-by: dependabot[bot] * Update go version to 1.15 Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 4 +- Dockerfile | 2 +- go.mod | 4 +- go.sum | 123 +++--------------- 4 files changed, 20 insertions(+), 113 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 5d3019b38..b82f49da3 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-20.04 steps: - - name: Set up Go 1.14 + - name: Set up Go 1.15 uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.15 id: go - name: Check out code into the Go module directory diff --git a/Dockerfile b/Dockerfile index 7cb33b498..9add19a63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.13 as builder +FROM golang:1.15 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/go.mod b/go.mod index 1aa4a6bf1..4b63a1fb2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.13 +go 1.15 require ( github.com/Masterminds/semver/v3 v3.1.1 @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.20.2 k8s.io/kubectl v0.20.2 - sigs.k8s.io/controller-runtime v0.7.0 + sigs.k8s.io/controller-runtime v0.8.1 ) replace ( diff --git a/go.sum b/go.sum index 76b72d6f5..d7b31e7c6 100644 --- a/go.sum +++ b/go.sum @@ -6,7 +6,6 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= @@ -26,24 +25,13 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -53,22 +41,15 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -76,7 +57,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -90,7 +70,6 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -108,8 +87,6 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -132,8 +109,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -147,49 +122,13 @@ github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -254,7 +193,6 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -314,11 +252,7 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= @@ -368,7 +302,6 @@ github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -407,7 +340,6 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -420,7 +352,6 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -428,7 +359,6 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -442,22 +372,15 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -480,13 +403,10 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -525,7 +445,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -533,11 +452,9 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -552,7 +469,6 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -576,7 +492,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -602,7 +517,6 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -621,10 +535,8 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjTo golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -635,7 +547,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -707,9 +618,9 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -763,50 +674,46 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA= -k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= +k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= -k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= +k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= k8s.io/component-helpers v0.20.2/go.mod h1:qeM6iAWGqIr+WE8n2QW2OK9XkpZkPNTxAoEv9jl40/I= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.20.2 h1:mXExF6N4eQUYmlfXJmfWIheCBLF6/n4VnwQKbQki5iE= k8s.io/kubectl v0.20.2/go.mod h1:/bchZw5fZWaGZxaRxxfDQKej/aDEtj/Tf9YSS4Jl0es= k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= +k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= -sigs.k8s.io/controller-runtime v0.7.0 h1:bU20IBBEPccWz5+zXpLnpVsgBYxqclaHu1pVDl/gEt8= -sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.8.1 h1:O0K2CJ2JavK8/Tf4LfcpAwRxOFBhv8DjyrbmE6Qw59s= +sigs.k8s.io/controller-runtime v0.8.1/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From 47a2ff49e394b286f24ba4aafde1f400668413cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 26 Jan 2021 09:46:59 +0100 Subject: [PATCH 0140/1234] Release 0.18.1 (#174) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 +++++ versions.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f124cc92..bfdc7af36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.18.1 (2021-01-25) +------------------- +* Fixed testing image from being used in non-test artifacts (fixes #170) ([#171](https://github.com/open-telemetry/opentelemetry-operator/pull/171), [@gramidt](https://github.com/gramidt)) + + 0.18.0 (2021-01-22) ------------------- * Bumped OpenTelemetry Collector to v0.18.0 ([#169](https://github.com/open-telemetry/opentelemetry-operator/pull/169), [@jpkrohling](https://github.com/jpkrohling)) diff --git a/versions.txt b/versions.txt index 09c1aa826..3775b8ea9 100644 --- a/versions.txt +++ b/versions.txt @@ -5,4 +5,4 @@ opentelemetry-collector=0.18.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.18.0 +operator=0.18.1 From b70d1e7f45638a0a3ab06b51a26e56437faeffeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Jan 2021 06:28:13 +0000 Subject: [PATCH 0141/1234] Bump github.com/go-logr/logr from 0.3.0 to 0.4.0 (#175) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 0.3.0 to 0.4.0.
Release notes

Sourced from github.com/go-logr/logr's releases.

v0.4.0

  • Adds logr.WithCallDepth()

  • Deprecate logr/testing.NullLogger in favor of logr.Discard()

Commits
  • 8fc6c73 Merge pull request #36 from thockin/eol-null-logger
  • 9721152 Merge pull request #31 from thockin/with-call-depth
  • 52a0608 Add optional CallDepth support
  • 85b0f8d Effectively EOL testing.NullLogger
  • 3dceec2 Merge pull request #35 from thockin/test-context
  • 7efc461 Add tests for context funcs
  • a9c9b25 Merge pull request #34 from thockin/godoc-and-headers
  • 4eabc2e Move comments arount for cleaner godoc
  • 6a4674c Add missing header comments
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-logr/logr&package-manager=go_modules&previous-version=0.3.0&new-version=0.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4b63a1fb2..2d060e3ba 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.15 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/go-logr/logr v0.3.0 + github.com/go-logr/logr v0.4.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index d7b31e7c6..7b3d1e8f2 100644 --- a/go.sum +++ b/go.sum @@ -120,6 +120,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= From 5281b5acaa7bd971c384c1cad1126751d16922a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 28 Jan 2021 11:24:48 +0100 Subject: [PATCH 0142/1234] Bumped OpenTelemetry Collector to v0.19.0 (#179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 + pkg/collector/upgrade/v0_19_0.go | 121 +++++++++++++++++++ pkg/collector/upgrade/v0_19_0_test.go | 143 +++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + tests/e2e/smoke-simplest/00-install.yaml | 3 +- versions.txt | 4 +- 6 files changed, 276 insertions(+), 4 deletions(-) create mode 100644 pkg/collector/upgrade/v0_19_0.go create mode 100644 pkg/collector/upgrade/v0_19_0_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index bfdc7af36..f44b8a0fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.19.0 (2021-01-27) +------------------- +* Bumped OpenTelemetry Collector to v0.19.0 + + 0.18.1 (2021-01-25) ------------------- * Fixed testing image from being used in non-test artifacts (fixes #170) ([#171](https://github.com/open-telemetry/opentelemetry-operator/pull/171), [@gramidt](https://github.com/gramidt)) diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go new file mode 100644 index 000000000..ad69d09b5 --- /dev/null +++ b/pkg/collector/upgrade/v0_19_0.go @@ -0,0 +1,121 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_19_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, failed to parse configuration: %w", err) + } + + processors, ok := cfg["processors"].(map[interface{}]interface{}) + if !ok { + // no processors? no need to fail because of that + return otelcol, nil + } + + for k, v := range processors { + // from the changelog https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.19.0 + + // Remove deprecated queued_retry processor + if strings.HasPrefix(k.(string), "queued_retry") { + delete(processors, k) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 removed the processor %q", k)) + continue + } + + // Remove deprecated configs from resource processor: type (set "opencensus.type" key in "attributes.upsert" map instead) and labels (use "attributes.upsert" instead). + if strings.HasPrefix(k.(string), "resource") { + switch processor := v.(type) { + case map[interface{}]interface{}: + // type becomes an attribute.upsert with key opencensus.type + if typ, found := processor["type"]; found { + var attributes []map[string]string + if attrs, found := processor["attributes"]; found { + if attributes, ok = attrs.([]map[string]string); !ok { + return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the attributes list for processors %q couldn't be parsed based on the previous value. Type: %t, value: %v", k, attrs, attrs) + } + } + attr := map[string]string{} + attr["key"] = "opencensus.type" + attr["value"] = typ.(string) + attr["action"] = "upsert" + attributes = append(attributes, attr) + + processor["attributes"] = attributes + delete(processor, "type") + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 migrated the property 'type' for processor %q", k)) + } + + // handle labels + if labels, found := processor["labels"]; found { + var attributes []map[string]string + if attrs, found := processor["attributes"]; found { + if attributes, ok = attrs.([]map[string]string); !ok { + return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the attributes list for processors %q couldn't be parsed based on the previous value. Type: %t, value: %v", k, attrs, attrs) + } + } + + if ls, ok := labels.(map[interface{}]interface{}); ok { + for labelK, labelV := range ls { + attr := map[string]string{} + attr["key"] = labelK.(string) + attr["value"] = labelV.(string) + attr["action"] = "upsert" + attributes = append(attributes, attr) + } + } + + processor["attributes"] = attributes + delete(processor, "labels") + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 migrated the property 'labels' for processor %q", k)) + } + + processors[k] = processor + case string: + if len(processor) == 0 { + // this processor is using the default configuration + continue + } + default: + return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the processor %q is invalid (neither a string nor map)", k) + } + } + } + + cfg["processors"] = processors + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, failed to marshall back configuration: %w", err) + } + + otelcol.Spec.Config = string(res) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go new file mode 100644 index 000000000..0bb2acda5 --- /dev/null +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -0,0 +1,143 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func TestRemoveQueuedRetryProcessor(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `processors: + queued_retry: + otherprocessor: + queued_retry/second: + compression: "on" + reconnection_delay: 15 + num_workers: 123`, + }, + } + existing.Status.Version = "0.18.0" + + // sanity check + require.Contains(t, existing.Spec.Config, "queued_retry") + require.Contains(t, existing.Spec.Config, "queued_retry/second") + require.Contains(t, existing.Spec.Config, "num_workers: 123") // checking one property is sufficient + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.NotContains(t, res.Spec.Config, "queued_retry:") + assert.Contains(t, res.Spec.Config, "otherprocessor:") + assert.NotContains(t, res.Spec.Config, "queued_retry/second:") + assert.NotContains(t, res.Spec.Config, "num_workers: 123") // checking one property is sufficient + assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 removed the processor") +} + +func TestMigrateResourceType(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `processors: + resource: + type: some-type +`, + }, + } + existing.Status.Version = "0.18.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, `processors: + resource: + attributes: + - action: upsert + key: opencensus.type + value: some-type +`, res.Spec.Config) + assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 migrated the property 'type' for processor") +} + +func TestMigrateLabels(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `processors: + resource: + labels: + cloud.zone: zone-1 + host.name: k8s-node +`, + }, + } + existing.Status.Version = "0.18.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + actual, err := adapters.ConfigFromString(res.Spec.Config) + require.NoError(t, err) + actualProcessors := actual["processors"].(map[interface{}]interface{}) + actualProcessor := actualProcessors["resource"].(map[interface{}]interface{}) + actualAttrs := actualProcessor["attributes"].([]interface{}) + + // verify + assert.Len(t, actualAttrs, 2) + assert.Nil(t, actualProcessor["labels"]) + assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 migrated the property 'labels' for processor") +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 25df1a8ec..4e2bddec4 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -42,6 +42,10 @@ var ( Version: *semver.MustParse("0.15.0"), upgrade: upgrade0_15_0, }, + { + Version: *semver.MustParse("0.19.0"), + upgrade: upgrade0_19_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml index 0988cc0fb..581acc6b3 100644 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -9,7 +9,6 @@ spec: protocols: grpc: processors: - queued_retry: exporters: logging: @@ -18,5 +17,5 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [queued_retry] + processors: [] exporters: [logging] diff --git a/versions.txt b/versions.txt index 3775b8ea9..6055eff51 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.18.0 +opentelemetry-collector=0.19.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.18.1 +operator=0.19.0 From b5e9c3c93aadf6c312a7b0b9a81771af20a449a7 Mon Sep 17 00:00:00 2001 From: Sheetal Singala Date: Thu, 28 Jan 2021 05:45:12 -0500 Subject: [PATCH 0143/1234] Bump to Operator SDK 1.3.0 (#180) Signed-off-by: sheetalsingala --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bf2915a76..b6662359e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.0.2 with: - operator-sdk-version: v1.2.0 + operator-sdk-version: v1.3.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" From 0152d475f0e6d4b082bcc5d9b59b43a107d262a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 28 Jan 2021 12:39:29 +0100 Subject: [PATCH 0144/1234] Added contributors to the readme, as well as a list of approvers and maintainers (#183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #181 Signed-off-by: Juraci Paixão Kröhling --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index c2c238aa9..4476b6dd6 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,21 @@ The `CustomResource` for the `OpenTelemetryCollector` exposes a property named ` Please see [CONTRIBUTING.md](CONTRIBUTING.md). +Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): + +- [@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers) + +Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): + +- [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) +- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Red Hat + +Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md). + +Thanks to all the people who already contributed! + +[![Contributors][contributors-img]][contributors] + ## License [Apache 2.0 License](./LICENSE). @@ -73,3 +88,5 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). [code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability [codecov]: https://codecov.io/gh/open-telemetry/opentelemetry-operator [codecov-img]: https://codecov.io/gh/open-telemetry/opentelemetry-operator/branch/master/graph/badge.svg +[contributors]: https://github.com/open-telemetry/opentelemetry-operator/graphs/contributors +[contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator From 6ea3676f18f48bf6eff67856dfe38f6edde19027 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 28 Jan 2021 09:31:45 -0800 Subject: [PATCH 0145/1234] Update CODEOWNERS with latest changes Per @jpkrohling request add collector-approvers as well to help with reviews, and collector-maintainers as maintainers until this sig grows by itself. --- CODEOWNERS | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index df52664c2..5aa8e1541 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,16 @@ -* @jpkrohling +##################################################### +# +# List of approvers for OpenTelemetry Collector Contrib +# +##################################################### +# +# Learn about membership in OpenTelemetry community: +# https://github.com/open-telemetry/community/blob/master/community-membership.md +# +# +# Learn about CODEOWNERS file format: +# https://help.github.com/en/articles/about-code-owners +# + + +* @open-telemetry/collector-approvers @open-telemetry/operator-approvers From 4eb7599e098f9e21e5e55ac67a9bd062b4b130aa Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Thu, 28 Jan 2021 11:57:21 -0800 Subject: [PATCH 0146/1234] Update and rename CODEOWNERS to .github/CODEOWNERS (#184) * Update and rename CODEOWNERS to .github/CODEOWNERS * Update CODEOWNERS --- CODEOWNERS => .github/CODEOWNERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename CODEOWNERS => .github/CODEOWNERS (86%) diff --git a/CODEOWNERS b/.github/CODEOWNERS similarity index 86% rename from CODEOWNERS rename to .github/CODEOWNERS index 5aa8e1541..ef7db42b7 100644 --- a/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ ##################################################### # -# List of approvers for OpenTelemetry Collector Contrib +# List of approvers for OpenTelemetry Collector Kubernetes Operator # ##################################################### # @@ -12,5 +12,4 @@ # https://help.github.com/en/articles/about-code-owners # - * @open-telemetry/collector-approvers @open-telemetry/operator-approvers From 5beb0dcfdbba9ed87ec67f09db728aa51f070305 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Fri, 29 Jan 2021 10:21:45 -0800 Subject: [PATCH 0147/1234] Update links after master -> main branch change (#185) Signed-off-by: Bogdan Drutu --- .github/CODEOWNERS | 2 +- .github/mergify.yml | 2 +- .github/workflows/continuous-integration.yaml | 4 ++-- .github/workflows/e2e.yaml | 4 ++-- .github/workflows/publish-images.yaml | 4 ++-- README.md | 4 ++-- RELEASE.md | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ef7db42b7..398c814bd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,7 +5,7 @@ ##################################################### # # Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/master/community-membership.md +# https://github.com/open-telemetry/community/blob/main/community-membership.md # # # Learn about CODEOWNERS file format: diff --git a/.github/mergify.yml b/.github/mergify.yml index 326e18339..f7b38d2fd 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -1,7 +1,7 @@ pull_request_rules: - name: remove outdated reviews conditions: - - base=master + - base=main actions: dismiss_reviews: {} diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index b82f49da3..a5a07571d 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -2,9 +2,9 @@ name: "Continuous Integration" on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: unit-tests: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index d955dce84..82426c1b0 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -2,9 +2,9 @@ name: "End-to-end tests" on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] jobs: e2e-tests: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 122479a30..3d29f2d5b 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -2,9 +2,9 @@ name: "Publish images" on: push: - branches: [master] + branches: [ main ] release: - types: [published] + types: [ published ] workflow_dispatch: diff --git a/README.md b/README.md index 4476b6dd6..f18eecba1 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open - [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Red Hat -Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md). +Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). Thanks to all the people who already contributed! @@ -87,6 +87,6 @@ Thanks to all the people who already contributed! [code-climate]: https://codeclimate.com/github/open-telemetry/opentelemetry-operator/maintainability [code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability [codecov]: https://codecov.io/gh/open-telemetry/opentelemetry-operator -[codecov-img]: https://codecov.io/gh/open-telemetry/opentelemetry-operator/branch/master/graph/badge.svg +[codecov-img]: https://codecov.io/gh/open-telemetry/opentelemetry-operator/branch/main/graph/badge.svg [contributors]: https://github.com/open-telemetry/opentelemetry-operator/graphs/contributors [contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator diff --git a/RELEASE.md b/RELEASE.md index e8d0b05b6..c5543a103 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,7 +5,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. 1. Add the changes to the changelog 1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` -1. Once the changes above are merged and available in `master`, tag it with the desired version, prefixed with `v`: `v0.3.0` +1. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.3.0` 1. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images 1. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the [Operator Hub Community Operators repository](https://github.com/operator-framework/community-operators): 1. one for the `upstream-community-operators`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators#2880`](operator-framework/community-operators/pull/2880) From 930f7d3a20d61c8489245f3fad1b989d35050f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 3 Feb 2021 16:02:33 +0100 Subject: [PATCH 0148/1234] Add correct boundary to integer parsing (#187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #178 Signed-off-by: Juraci Paixão Kröhling --- pkg/collector/parser/receiver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index 37cb6e55d..9f3fcc98c 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -118,7 +118,7 @@ func portName(receiverName string, port int32) string { func portFromEndpoint(endpoint string) (int32, error) { i := strings.LastIndex(endpoint, ":") + 1 part := endpoint[i:] - port, err := strconv.ParseInt(part, 10, 0) + port, err := strconv.ParseInt(part, 10, 32) return int32(port), err } From 78a1da9d817c2a0c16c2cf383797412ead8e1812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 5 Feb 2021 20:27:00 +0100 Subject: [PATCH 0149/1234] Remove the issue labeler workflow (#190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The needs-triage label isn't bringing any benefits. Signed-off-by: Juraci Paixão Kröhling --- .github/labeler-needs-triage.yaml | 3 --- .github/workflows/labeler.yml | 14 -------------- 2 files changed, 17 deletions(-) delete mode 100644 .github/labeler-needs-triage.yaml delete mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler-needs-triage.yaml b/.github/labeler-needs-triage.yaml deleted file mode 100644 index f36d4daba..000000000 --- a/.github/labeler-needs-triage.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# Add 'needs-triage' label to all new issues -needs-triage: - - '.*' \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 09d45a5ba..000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Add needs-triage to new issues" -on: - issues: - types: [opened] - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: github/issue-labeler@v2.2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler-needs-triage.yaml - enable-versioned-regex: 0 From 06f72f023badba47bffa3ddb02c55185ef9bea38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Feb 2021 10:58:10 +0100 Subject: [PATCH 0150/1234] Bump actions/cache from v2 to v2.1.4 (#192) Bumps [actions/cache](https://github.com/actions/cache) from v2 to v2.1.4. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2...26968a09c0ea4f3e233fdddbafd1166051a095f6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 3d29f2d5b..41d7aa1f4 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v2.1.4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From 43e6497763b785682d8a48d761676675b076495c Mon Sep 17 00:00:00 2001 From: Santosh Kumar Bhiravabhatla <36130219+bhiravabhatla@users.noreply.github.com> Date: Mon, 8 Feb 2021 15:30:21 +0530 Subject: [PATCH 0151/1234] Bump up operator SDK to 1.4.0 (#191) Signed-off-by: santosh --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b6662359e..647d2c737 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.0.2 with: - operator-sdk-version: v1.3.0 + operator-sdk-version: v1.4.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" From 6fa19358c26d404a12af9303cfb4b9e650703ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Feb 2021 14:53:47 +0100 Subject: [PATCH 0152/1234] Bump sigs.k8s.io/controller-runtime from 0.8.1 to 0.8.2 (#194) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.8.1 to 0.8.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.8.1...v0.8.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 2d060e3ba..e1437e8f3 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.2 k8s.io/client-go v0.20.2 k8s.io/kubectl v0.20.2 - sigs.k8s.io/controller-runtime v0.8.1 + sigs.k8s.io/controller-runtime v0.8.2 ) replace ( diff --git a/go.sum b/go.sum index 7b3d1e8f2..a82b70634 100644 --- a/go.sum +++ b/go.sum @@ -713,8 +713,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.8.1 h1:O0K2CJ2JavK8/Tf4LfcpAwRxOFBhv8DjyrbmE6Qw59s= -sigs.k8s.io/controller-runtime v0.8.1/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= +sigs.k8s.io/controller-runtime v0.8.2 h1:SBWmI0b3uzMIUD/BIXWNegrCeZmPJ503pOtwxY0LPHM= +sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From d32ec0f5711eed53efeb8347c128664200eb3b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Feb 2021 15:24:08 +0100 Subject: [PATCH 0153/1234] Bump OpenTelemetry Collector to v0.20.0 (#195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 +++++ versions.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f44b8a0fc..9e5e5def3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.20.0 (2021-02-11) +------------------- +* Bumped OpenTelemetry Collector to v0.20.0 +* Add correct boundary to integer parsing ([#187](https://github.com/open-telemetry/opentelemetry-operator/pull/187), [@jpkrohling](https://github.com/jpkrohling)) + 0.19.0 (2021-01-27) ------------------- * Bumped OpenTelemetry Collector to v0.19.0 diff --git a/versions.txt b/versions.txt index 6055eff51..cc973a9df 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.19.0 +opentelemetry-collector=0.20.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.19.0 +operator=0.20.0 From 70e854ca7a9482e08d8d3ab6ac7f9459e44dfffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Feb 2021 16:50:48 +0100 Subject: [PATCH 0154/1234] Use Go 1.15 for the build/test/release (#196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 4 +--- .github/workflows/e2e.yaml | 5 +++++ .github/workflows/release.yaml | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a5a07571d..39111fbab 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -11,12 +11,10 @@ jobs: name: Unit tests runs-on: ubuntu-20.04 steps: - - - name: Set up Go 1.15 + - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.15 - id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 82426c1b0..7dd8573a9 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -12,6 +12,11 @@ jobs: runs-on: ubuntu-20.04 steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 647d2c737..43f5d39a2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,15 +8,17 @@ jobs: unit-tests: runs-on: ubuntu-20.04 steps: - - uses: actions/setup-go@v1 + - name: Set up Go + uses: actions/setup-go@v2 with: - go-version: '1.14.4' + go-version: 1.15 + - uses: actions/checkout@v1 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh - - uses: jpkrohling/setup-operator-sdk@v1.0.2 + - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: operator-sdk-version: v1.4.0 From 9bb8cd16290a5fe589ef52305b0a0513dc3a7db1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Feb 2021 10:42:37 +0100 Subject: [PATCH 0155/1234] Bump golangci/golangci-lint-action from v2 to v2.4.0 (#198) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v2 to v2.4.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...544d2efb307b3f205f34886f2787046abe7fb26e) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 39111fbab..8d85bddf2 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v2 - name: Lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v2.4.0 with: args: -v version: v1.29 From 16ca4cbd96126eb01d37e0c55ad63ce2b2bcffbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Feb 2021 10:56:34 +0100 Subject: [PATCH 0156/1234] Bump k8s.io/kubectl from 0.20.2 to 0.20.3 (#205) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.2 to 0.20.3. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.20.2...v0.20.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 20 ++++++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index e1437e8f3..631956be5 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.2 - k8s.io/apimachinery v0.20.2 - k8s.io/client-go v0.20.2 - k8s.io/kubectl v0.20.2 + k8s.io/api v0.20.3 + k8s.io/apimachinery v0.20.3 + k8s.io/client-go v0.20.3 + k8s.io/kubectl v0.20.3 sigs.k8s.io/controller-runtime v0.8.2 ) diff --git a/go.sum b/go.sum index a82b70634..3d744c2bb 100644 --- a/go.sum +++ b/go.sum @@ -679,22 +679,30 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/api v0.20.3 h1:rGtKGUSo7Do4dxFKS4ju77GovaSGT5Zze25PS5HhqgE= +k8s.io/api v0.20.3/go.mod h1:9/N1PKffb5ioImFknLewyktqAKCAh6xnhc7JFMhX6zg= k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.3 h1:P0heYNTI2km9gTUAb0PX5qRd8oHAaesICvkg13k97y4= +k8s.io/apimachinery v0.20.3/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/cli-runtime v0.20.2/go.mod h1:FjH6uIZZZP3XmwrXWeeYCbgxcrD6YXxoAykBaWH0VdM= +k8s.io/cli-runtime v0.20.3/go.mod h1:Jiu/JWK581aLFN62t5Mb9ZF8h+qbYJERqJ1j/EeZCG4= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= +k8s.io/client-go v0.20.3 h1:6ofV+ycm6X/5DfSTo1aJ9C8jloi2nJTzFgRMXJcrK4I= +k8s.io/client-go v0.20.3/go.mod h1:tRUgITfrhGECV2MGpZPr1Db3pNv9k5coAn89asDm/YE= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/code-generator v0.20.2/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.3/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= -k8s.io/component-helpers v0.20.2/go.mod h1:qeM6iAWGqIr+WE8n2QW2OK9XkpZkPNTxAoEv9jl40/I= +k8s.io/component-base v0.20.3 h1:gzMrbr5U0d1QWO/xwz/txIuOJGVOpHfiYOSalfo2dus= +k8s.io/component-base v0.20.3/go.mod h1:Sru/qMz6MCSxPntXfuU0xwz/cizjBAnLFvG5fNq9ydw= +k8s.io/component-helpers v0.20.3/go.mod h1:lzvq5RJII1xUWb24jO2E0bq2nJpWcJbtRAEcuzBmtFg= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -703,9 +711,9 @@ k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.2 h1:mXExF6N4eQUYmlfXJmfWIheCBLF6/n4VnwQKbQki5iE= -k8s.io/kubectl v0.20.2/go.mod h1:/bchZw5fZWaGZxaRxxfDQKej/aDEtj/Tf9YSS4Jl0es= -k8s.io/metrics v0.20.2/go.mod h1:yTck5nl5wt/lIeLcU6g0b8/AKJf2girwe0PQiaM4Mwk= +k8s.io/kubectl v0.20.3 h1:DC71sMB8k2ortrdWcbdrDoI0VzUIUP+cp4ifwVvuTSE= +k8s.io/kubectl v0.20.3/go.mod h1:PiYPt2bkfjOGxvq9df9AUVMfHv8gYgPVg+Bv5QO2Cqw= +k8s.io/metrics v0.20.3/go.mod h1:XRoc7kX96+w9nuSfU/i2iASyDXaYlQLkLHPlMebBqpA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 67a3403247a7d02e837c4fc4f321eed5a0b6ab55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 11:38:45 +0100 Subject: [PATCH 0157/1234] Bump k8s.io/kubectl from 0.20.3 to 0.20.4 (#209) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.3 to 0.20.4. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.20.3...v0.20.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 631956be5..f0a736086 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.3 - k8s.io/apimachinery v0.20.3 - k8s.io/client-go v0.20.3 - k8s.io/kubectl v0.20.3 + k8s.io/api v0.20.4 + k8s.io/apimachinery v0.20.4 + k8s.io/client-go v0.20.4 + k8s.io/kubectl v0.20.4 sigs.k8s.io/controller-runtime v0.8.2 ) diff --git a/go.sum b/go.sum index 3d744c2bb..0352b5a56 100644 --- a/go.sum +++ b/go.sum @@ -679,30 +679,30 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/api v0.20.3 h1:rGtKGUSo7Do4dxFKS4ju77GovaSGT5Zze25PS5HhqgE= -k8s.io/api v0.20.3/go.mod h1:9/N1PKffb5ioImFknLewyktqAKCAh6xnhc7JFMhX6zg= +k8s.io/api v0.20.4 h1:xZjKidCirayzX6tHONRQyTNDVIR55TYVqgATqo6ZULY= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.3 h1:P0heYNTI2km9gTUAb0PX5qRd8oHAaesICvkg13k97y4= -k8s.io/apimachinery v0.20.3/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4 h1:vhxQ0PPUUU2Ns1b9r4/UFp13UPs8cw2iOoTjnY9faa0= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/cli-runtime v0.20.3/go.mod h1:Jiu/JWK581aLFN62t5Mb9ZF8h+qbYJERqJ1j/EeZCG4= +k8s.io/cli-runtime v0.20.4/go.mod h1:dz38e1CM4uuIhy8PMFUZv7qsvIdoE3ByZYlmbHNCkt4= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/client-go v0.20.3 h1:6ofV+ycm6X/5DfSTo1aJ9C8jloi2nJTzFgRMXJcrK4I= -k8s.io/client-go v0.20.3/go.mod h1:tRUgITfrhGECV2MGpZPr1Db3pNv9k5coAn89asDm/YE= +k8s.io/client-go v0.20.4 h1:85crgh1IotNkLpKYKZHVNI1JT86nr/iDCvq2iWKsql4= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/code-generator v0.20.3/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.4/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= -k8s.io/component-base v0.20.3 h1:gzMrbr5U0d1QWO/xwz/txIuOJGVOpHfiYOSalfo2dus= -k8s.io/component-base v0.20.3/go.mod h1:Sru/qMz6MCSxPntXfuU0xwz/cizjBAnLFvG5fNq9ydw= -k8s.io/component-helpers v0.20.3/go.mod h1:lzvq5RJII1xUWb24jO2E0bq2nJpWcJbtRAEcuzBmtFg= +k8s.io/component-base v0.20.4 h1:gdvPs4G11e99meQnW4zN+oYOjH8qkLz1sURrAzvKWqc= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-helpers v0.20.4/go.mod h1:S7jGg8zQp3kwvSzfuGtNaQAMVmvzomXDioTm5vABn9g= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -711,9 +711,9 @@ k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.3 h1:DC71sMB8k2ortrdWcbdrDoI0VzUIUP+cp4ifwVvuTSE= -k8s.io/kubectl v0.20.3/go.mod h1:PiYPt2bkfjOGxvq9df9AUVMfHv8gYgPVg+Bv5QO2Cqw= -k8s.io/metrics v0.20.3/go.mod h1:XRoc7kX96+w9nuSfU/i2iASyDXaYlQLkLHPlMebBqpA= +k8s.io/kubectl v0.20.4 h1:Y1gUiigiZM+ulcrnWeqSHlTd0/7xWcQIXjuMnjtHyoo= +k8s.io/kubectl v0.20.4/go.mod h1:yCC5lUQyXRmmtwyxfaakryh9ezzp/bT0O14LeoFLbGo= +k8s.io/metrics v0.20.4/go.mod h1:DDXS+Ls+2NAxRcVhXKghRPa3csljyJRjDRjPe6EOg/g= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From a13ca07271dc86c2c03a0acd0a7113f84b915d1c Mon Sep 17 00:00:00 2001 From: Vincent Behar Date: Tue, 23 Feb 2021 13:53:32 +0100 Subject: [PATCH 0158/1234] fix: collector selection should not fail if there is a single sidecar (#210) fixes #200 if there are multiple collectors, but a single sidecar, the collector selection should not fail. this fix ensure we filter the list of collectors first. Signed-off-by: Vincent Behar --- internal/podinjector/main.go | 28 ++++++++++------- internal/podinjector/main_test.go | 51 ++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index db4ed051e..3a2d0056d 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -161,22 +161,28 @@ func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1 } func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.OpenTelemetryCollector, error) { - otelcols := v1alpha1.OpenTelemetryCollectorList{} + var ( + otelcols = v1alpha1.OpenTelemetryCollectorList{} + sidecars []v1alpha1.OpenTelemetryCollector + ) + if err := p.client.List(ctx, &otelcols, client.InNamespace(ns.Name)); err != nil { return v1alpha1.OpenTelemetryCollector{}, err } - if len(otelcols.Items) == 0 { - return v1alpha1.OpenTelemetryCollector{}, ErrNoInstancesAvailable - } - if len(otelcols.Items) > 1 { - return v1alpha1.OpenTelemetryCollector{}, ErrMultipleInstancesPossible + for i := range otelcols.Items { + coll := otelcols.Items[i] + if coll.Spec.Mode == v1alpha1.ModeSidecar { + sidecars = append(sidecars, coll) + } } - otelcol := otelcols.Items[0] - if otelcol.Spec.Mode != v1alpha1.ModeSidecar { - return v1alpha1.OpenTelemetryCollector{}, ErrInstanceNotSidecar + switch { + case len(sidecars) == 0: + return v1alpha1.OpenTelemetryCollector{}, ErrNoInstancesAvailable + case len(sidecars) > 1: + return v1alpha1.OpenTelemetryCollector{}, ErrMultipleInstancesPossible + default: + return sidecars[0], nil } - - return otelcol, nil } diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 9fa74e716..33c3110f7 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -41,10 +41,10 @@ var logger = logf.Log.WithName("unit-tests") func TestShouldInjectSidecar(t *testing.T) { for _, tt := range []struct { - name string - ns corev1.Namespace - pod corev1.Pod - otelcol v1alpha1.OpenTelemetryCollector + name string + ns corev1.Namespace + pod corev1.Pod + otelcols []v1alpha1.OpenTelemetryCollector }{ { // this is the simplest positive test: a pod is being created with an annotation @@ -61,7 +61,7 @@ func TestShouldInjectSidecar(t *testing.T) { Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, }, - otelcol: v1alpha1.OpenTelemetryCollector{ + otelcols: []v1alpha1.OpenTelemetryCollector{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-simplest-positive-case", @@ -69,7 +69,7 @@ func TestShouldInjectSidecar(t *testing.T) { Spec: v1alpha1.OpenTelemetryCollectorSpec{ Mode: v1alpha1.ModeSidecar, }, - }, + }}, }, { // in this case, the annotation is at the namespace instead of at the pod @@ -81,7 +81,7 @@ func TestShouldInjectSidecar(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcol: v1alpha1.OpenTelemetryCollector{ + otelcols: []v1alpha1.OpenTelemetryCollector{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-annotated-namespace", @@ -89,10 +89,10 @@ func TestShouldInjectSidecar(t *testing.T) { Spec: v1alpha1.OpenTelemetryCollectorSpec{ Mode: v1alpha1.ModeSidecar, }, - }, + }}, }, { - // now, we automatically select an existing otelcol + // now, we automatically select an existing sidecar otelcol name: "auto-select based on the annotation's value", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -101,13 +101,24 @@ func TestShouldInjectSidecar(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcol: v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-with-autoselect", + otelcols: []v1alpha1.OpenTelemetryCollector{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace-with-autoselect", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeSidecar, + }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeSidecar, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "a-deployment-instance", + Namespace: "my-namespace-with-autoselect", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeDeployment, + }, }, }, }, @@ -116,8 +127,10 @@ func TestShouldInjectSidecar(t *testing.T) { err := k8sClient.Create(context.Background(), &tt.ns) require.NoError(t, err) - err = k8sClient.Create(context.Background(), &tt.otelcol) - require.NoError(t, err) + for i := range tt.otelcols { + err := k8sClient.Create(context.Background(), &tt.otelcols[i]) + require.NoError(t, err) + } encoded, err := json.Marshal(tt.pod) require.NoError(t, err) @@ -163,7 +176,9 @@ func TestShouldInjectSidecar(t *testing.T) { } // cleanup - require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcol)) + for i := range tt.otelcols { + require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) + } require.NoError(t, k8sClient.Delete(context.Background(), &tt.ns)) }) } From ea579e0d1f8fd2308d7af6d6d04615ea77be1f05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Feb 2021 09:25:33 +0100 Subject: [PATCH 0159/1234] Bump golangci/golangci-lint-action from v2.4.0 to v2.5.1 (#213) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v2.4.0 to v2.5.1. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v2.4.0...d9f0e73c0497685d68af8c58280f49fcaf0545ff) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 8d85bddf2..a12ea0f98 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v2 - name: Lint - uses: golangci/golangci-lint-action@v2.4.0 + uses: golangci/golangci-lint-action@v2.5.1 with: args: -v version: v1.29 From 0eec32d96669b674481f05cd1c8e36ab8a0139ac Mon Sep 17 00:00:00 2001 From: Ruben Vargas Palma Date: Mon, 1 Mar 2021 08:17:10 -0600 Subject: [PATCH 0160/1234] Add permissions for opentelemetry finalizer resource (#212) Signed-off-by: Ruben Vargas --- config/rbac/role.yaml | 8 ++++++++ controllers/opentelemetrycollector_controller.go | 1 + 2 files changed, 9 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 131ae3e7c..ae6a38711 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -94,6 +94,14 @@ rules: - patch - update - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/finalizers + verbs: + - get + - patch + - update - apiGroups: - opentelemetry.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 36ca7738f..c687dd37e 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -105,6 +105,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // Reconcile the current state of an OpenTelemetry collector resource with the desired state. From ab48ea17d00133ec44a7af1c897c3dde2d093c8e Mon Sep 17 00:00:00 2001 From: Santosh Kumar Bhiravabhatla <36130219+bhiravabhatla@users.noreply.github.com> Date: Wed, 3 Mar 2021 14:34:46 +0530 Subject: [PATCH 0161/1234] Upgrade controller-gen to v0.4.0 and change CRDs apiVersion to v1 (#218) Signed-off-by: santosh --- Makefile | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 3348 +++++++++-------- ...ainjection_in_opentelemetrycollectors.yaml | 2 +- .../webhook_in_opentelemetrycollectors.yaml | 20 +- 4 files changed, 1702 insertions(+), 1670 deletions(-) diff --git a/Makefile b/Makefile index 9af4b85f5..335ee3074 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ ifeq (, $(shell which controller-gen)) CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ cd $$CONTROLLER_GEN_TMP_DIR ;\ go mod init tmp ;\ - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 ;\ + go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\ rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ } CONTROLLER_GEN=$(GOBIN)/controller-gen diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 75bc0ce2a..017548c16 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1,25 +1,13 @@ --- -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.4.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: - additionalPrinterColumns: - - JSONPath: .spec.mode - description: Deployment Mode - name: Mode - type: string - - JSONPath: .status.version - description: OpenTelemetry Version - name: Version - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date group: opentelemetry.io names: kind: OpenTelemetryCollector @@ -29,1704 +17,1744 @@ spec: - otelcol - otelcols singular: opentelemetrycollector - preserveUnknownFields: false scope: Namespaced - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's configuration. - Refer to the OpenTelemetry Collector documentation for details. - type: string - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. - These can then in certain cases be consumed in the config file for - the Collector. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previous defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - The $(VAR_NAME) syntax can be escaped with a double $$, ie: - $$(VAR_NAME). Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written - in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources - limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, - requests.cpu, requests.memory and requests.ephemeral-storage) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - mode: - description: Mode represents how the collector should be deployed (deployment, - daemonset or sidecar) - enum: - - daemonset - - deployment - - sidecar - type: string - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can be - used to open aditional ports that can't be inferred by the operator, - like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. - This is a beta field that is guarded by the ServiceAppProtocol - feature gate and enabled by default. - type: string - name: - description: The name of this port within the service. This must - be a DNS_LABEL. All ports within a ServiceSpec must have unique - names. When considering the endpoints for a Service, this must - match the 'name' field in the EndpointPort. Optional if only - one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is exposed - when type is NodePort or LoadBalancer. Usually assigned by - the system. If a value is specified, in-range, and not in use - it will be used, otherwise the operation will fail. If not - specified, a port will be allocated if this Service requires - one. If this field is specified when creating a Service which - does not need it, creation will fail. This field will be wiped - when updating a Service to no longer need it (e.g. changing - type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - description: The IP protocol for this port. Supports "TCP", "UDP", - and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. If this is a string, it will - be looked up as a named port in the target Pod''s container - ports. If this is not specified, the value of the ''port'' field - is used (an identity map). This field is ignored for services - with clusterIP=None, and should be omitted or set equal to the - ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector - format: int32 - type: integer - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within a - container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When not - set, MountPropagationNone is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false - or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the container's - volume should be mounted. Behaves similarly to SubPath but environment - variable references $(VAR_NAME) are expanded using the container's - environment. Defaults to "" (volume's root). SubPathExpr and - SubPath are mutually exclusive. - type: string - required: - - mountPath - - name + versions: + - additionalPrinterColumns: + - description: Deployment Mode + jsonPath: .spec.mode + name: Mode + type: string + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may be - accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - partition: - description: 'The partition in the volume that you want to - mount. If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for /dev/sda is - "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource in - AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage - Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather than - the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. More - info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and mounted - on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. More - info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might be - in conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data - field of the referenced ConfigMap will be projected into - the volume as a file whose name is the key and content is - the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in the - ConfigMap, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previous defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double $$, ie: + $$(VAR_NAME). Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace properties: key: - description: The key to project. + description: The key of the secret to select from. Must + be a valid secret key. type: string - mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, the - volume defaultMode will be used. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the - key to. May not be an absolute path. May not contain - the path element '..'. May not start with the string - '..'. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean required: - key - - path type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must - be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to the - associated CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the secret - object containing sensitive information to pass to the CSI - driver to complete the CSI NodePublishVolume and NodeUnpublishVolume - calls. This field is optional, and may be empty if no secret - is required. If the secret object contains more than one - secret, all secret references are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + type: object + required: + - name + type: object + type: array + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + mode: + description: Mode represents how the collector should be deployed + (deployment, daemonset or sidecar) + enum: + - daemonset + - deployment + - sidecar + type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open aditional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and http://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + This is a beta field that is guarded by the ServiceAppProtocol + feature gate and enabled by default. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. If a value is specified, in-range, and not + in use it will be used, otherwise the operation will fail. If + not specified, a port will be allocated if this Service requires + one. If this field is specified when creating a Service which + does not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage + Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph + monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: type: string - type: object - readOnly: - description: Specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might be - in conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file + type: array + path: + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field + description: If unspecified, each key-value pair in the + Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the ConfigMap, the volume setup will error unless it is + marked optional. Paths must be relative and may not contain + the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must + be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to + the associated CSI driver which will determine the default + filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, the - volume defaultMode will be used. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name - of the file to be created. Must not be absolute or - contain the ''..'' path. Must be utf-8 encoded. The - first item of the relative path must not start with - ''..''' + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - requests.cpu and requests.memory) are currently supported.' + type: object + readOnly: + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for + this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "Ephemeral represents a volume that is handled + by a cluster storage driver (Alpha feature). The volume's + lifecycle is tied to the pod that defines it - it will be + created before the pod starts, and deleted when the pod is + removed. \n Use this if: a) the volume is only needed while + the pod runs, b) features of normal volumes like restoring + from snapshot or capacity tracking are needed, c) the storage + driver is specified through a storage class, and d) the storage + driver supports dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on the + connection between this volume type and PersistentVolumeClaim). + \n Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. \n Use CSI for light-weight local ephemeral + volumes if the CSI driver is meant to be used that way - see + the documentation of the driver for more information. \n A + pod can use both types of ephemeral volumes and persistent + volumes at the same time." + properties: + readOnly: + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). + type: boolean + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC + will be deleted together with the pod. The name of the + PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. + Pod validation will reject the pod if the concatenated + name is not valid for a PVC (for example, too long). \n + An existing PVC with that name that is not owned by the + pod will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC + is meant to be used by the pod, the PVC has to updated + with an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may be useful + when manually reconstructing a broken cluster. \n This + field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. \n Required, must + not be nil." + properties: + metadata: + description: May contain labels and annotations that + will be copied into the PVC when creating it. No other + fields are allowed and will be rejected during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + accessModes: + description: 'AccessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) * An + existing custom resource that implements data + population (Alpha) In order to use custom resource + types that implement data population, the AnyVolumeDataSource + feature gate must be enabled. If the provisioner + or an external controller can support the specified + data source, it will create a new volume based + on the contents of the specified data source.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum + amount of compute resources required. If Requests + is omitted for a container, it defaults to + Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + selector: + description: A label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required + by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference + to the PersistentVolume backing this claim. type: string - required: - - resource type: object required: - - path + - spec type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that shares - a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required for this - EmptyDir volume. The size limit is also applicable for memory - medium. The maximum usage on memory medium EmptyDir would - be the minimum value between the SizeLimit specified here - and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "Ephemeral represents a volume that is handled by - a cluster storage driver (Alpha feature). The volume's lifecycle - is tied to the pod that defines it - it will be created before - the pod starts, and deleted when the pod is removed. \n Use - this if: a) the volume is only needed while the pod runs, b) - features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver supports - dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on the connection - between this volume type and PersistentVolumeClaim). \n Use - PersistentVolumeClaim or one of the vendor-specific APIs for - volumes that persist for longer than the lifecycle of an individual - pod. \n Use CSI for light-weight local ephemeral volumes if - the CSI driver is meant to be used that way - see the documentation - of the driver for more information. \n A pod can use both types - of ephemeral volumes and persistent volumes at the same time." - properties: - readOnly: - description: Specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the PVC will - be deleted together with the pod. The name of the PVC will - be `-` where `` is the - name from the `PodSpec.Volumes` array entry. Pod validation - will reject the pod if the concatenated name is not valid - for a PVC (for example, too long). \n An existing PVC with - that name that is not owned by the pod will *not* be used - for the pod to avoid using an unrelated volume by mistake. - Starting the pod is then blocked until the unrelated PVC - is removed. If such a pre-created PVC is meant to be used - by the pod, the PVC has to updated with an owner reference - to the pod once the pod exists. Normally this should not - be necessary, but it may be useful when manually reconstructing - a broken cluster. \n This field is read-only and no changes - will be made by Kubernetes to the PVC after it has been - created. \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations that will - be copied into the PVC when creating it. No other fields - are allowed and will be rejected during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. The same fields - as in a PersistentVolumeClaim are also valid here. + type: object + fc: + description: FC represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for + this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the + plugin scripts. This may be empty if no secret object + is specified. If the secret object contains more than + one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or + start with '..'. If '.' is supplied, the volume directory + will be the git repository. Otherwise, if specified, + the volume will contain the git repository in the subdirectory + with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator + authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent + disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, + and downward API + properties: + defaultMode: + description: Mode bits used to set permissions on created + files by default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal values + for mode bits. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with + other supported volume types properties: - accessModes: - description: 'AccessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population - (Alpha) In order to use custom resource types that - implement data population, the AnyVolumeDataSource - feature gate must be enabled. If the provisioner - or an external controller can support the specified - data source, it will create a new volume based on - the contents of the specified data source.' + configMap: + description: information about the configMap data + to project properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API group. - For any other third-party types, APIGroup is - required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string + items: + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to + set permissions on this file. Must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array name: - description: Name is the name of resource being - referenced + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string - required: - - kind - - name + optional: + description: Specify whether the ConfigMap or + its keys must be defined + type: boolean type: object - resources: - description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + downwardAPI: + description: information about the downwardAPI data + to project properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount - of compute resources required. If Requests is - omitted for a container, it defaults to Limits - if that is explicitly specified, otherwise to - an implementation-defined value. More info: - https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array type: object - selector: - description: A label query over volumes to consider - for binding. + secret: + description: information about the secret data to + project properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. + items: + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose + name is the key and content is the value. If + specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. + description: Maps a string key to a path within + a volume. properties: key: - description: key is the label key that the - selector applies to. + description: The key to project. type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. + mode: + description: 'Optional: mode bits used to + set permissions on this file. Must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array required: - key - - operator + - path type: object type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". - The requirements are ANDed. - type: object + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken + data to project + properties: + audience: + description: Audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. The kubelet will + start trying to rotate the token if the token + is older than 80 percent of its time to live + or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path type: object - storageClassName: - description: 'Name of the StorageClass required by - the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem is - implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to - the PersistentVolume backing this claim. - type: string type: object - required: - - spec - type: object - type: object - fc: - description: FC represents a Fibre Channel resource that is attached - to a kubelet's host machine and then exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' - items: + type: array + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no + group type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be - set, but not both simultaneously.' - items: + readOnly: + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource that - is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for this - volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the plugin - scripts. This may be empty if no secret object is specified. - If the secret object contains more than one secret, all - secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to a - kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - partition: - description: 'The partition in the volume that you want to - mount. If omitted, the default is to mount by volume name. - Examples: For volume /dev/sda1, you specify the partition - as "1". Similarly, the volume partition for /dev/sda is - "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision a - container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or start - with '..'. If '.' is supplied, the volume directory will - be the git repository. Otherwise, if specified, the volume - will contain the git repository in the subdirectory with - the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the host - that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to false. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the path - is a symlink, it will follow the link to the real path. - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to the - pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). - items: + tenant: + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: Volume is a string that references an already + created Quobyte volume by name. type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique within - the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to be - mounted with read-only permissions. Defaults to false. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a reference - to a PersistentVolumeClaim in the same namespace. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent - disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, - and downward API - properties: - defaultMode: - description: Mode bits used to set permissions on created - files by default. Must be an octal value between 0000 and - 0777 or a decimal value between 0 and 511. YAML accepts - both octal and decimal values, JSON requires decimal values - for mode bits. Directories within the path are not affected - by this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with - other supported volume types + type: array + pool: + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: - configMap: - description: information about the configMap data to - project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap - will be projected into the volume as a file whose - name is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the ConfigMap, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both - octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This - might be in conflict with other options - that affect the file mode, like fsGroup, - and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data - to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing the - pod field - properties: - fieldRef: - description: 'Required: Selects a field of - the pod: only annotations, labels, name - and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both - octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This - might be in conflict with other options - that affect the file mode, like fsGroup, - and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' path. - Must be utf-8 encoded. The first item of - the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to project - properties: - items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose name - is the key and content is the value. If specified, - the listed keys will be projected into the specified - paths, and unlisted keys will not be present. - If a key is specified which is not present in - the Secret, the volume setup will error unless - it is marked optional. Paths must be relative - and may not contain the '..' path or start with - '..'. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be an - octal value between 0000 and 0777 or a decimal - value between 0 and 511. YAML accepts both - octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This - might be in conflict with other options - that affect the file mode, like fsGroup, - and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element '..'. - May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken - data to project - properties: - audience: - description: Audience is the intended audience of - the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested - duration of validity of the service account token. - As the token approaches expiration, the kubelet - volume plugin will proactively rotate the service - account token. The kubelet will start trying to - rotate the token if the token is older than 80 - percent of its time to live or if the token is - older than 24 hours.Defaults to 1 hour and must - be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the mount - point of the file to project the token into. - type: string - required: - - path - type: object + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string type: object - type: array - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host that - shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume to - be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: Volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", "ntfs". - Implicitly inferred to be "ext4" if unspecified. More info: - https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from compromising - the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: + user: + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is nil. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume should - be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. - type: string - system: - description: The name of the storage system as configured - in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the ScaleIO - system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might be - in conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data - field of the referenced Secret will be projected into the - volume as a file whose name is the key and content is the - value. If specified, the listed keys will be projected into - the specified paths, and unlisted keys will not be present. - If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. - Paths must be relative and may not contain the '..' path - or start with '..'. - items: - description: Maps a string key to a path within a volume. + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. properties: - key: - description: The key to project. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, the - volume defaultMode will be used. This might be in - conflict with other options that affect the file mode, - like fsGroup, and the result can be other mode bits - set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the - key to. May not be an absolute path. May not contain - the path element '..'. May not start with the string - '..'. + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with + Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the + protection domain. + type: string + system: + description: The name of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the + ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the + Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must + be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - required: - - key - - path type: object - type: array - optional: - description: Specify whether the Secret or its keys must be - defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace to - use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within a - namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the volume - within StorageOS. If no namespace is specified then the - Pod's namespace will be used. This allows the Kubernetes - name scoping to be mirrored within StorageOS for tighter - integration. Set VolumeName to any name to override the - default behaviour. Set to "default" if you are not using - namespaces within StorageOS. Namespaces that do not pre-exist - within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector. - properties: - messages: - description: Messages about actions performed by the operator on this - resource. - items: + volumeName: + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name to + override the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile + name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector. + properties: + messages: + description: Messages about actions performed by the operator on this + resource. + items: + type: string + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is currently not being set and might be removed + in the next version. + format: int32 + type: integer + version: + description: Version of the managed OpenTelemetry Collector (operand) type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is currently not being set and might be removed - in the next version. - format: int32 - type: integer - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 + type: object + type: object served: true storage: true + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} status: acceptedNames: kind: "" diff --git a/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml b/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml index 7b7d2f65f..69f8ccd72 100644 --- a/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml +++ b/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml @@ -1,6 +1,6 @@ # The following patch adds a directive for certmanager to inject CA into the CRD # CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: diff --git a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml index 73ace5fa2..9842691ef 100644 --- a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml +++ b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml @@ -1,18 +1,22 @@ # The following patch enables conversion webhook for CRD # CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: opentelemetrycollectors.opentelemetry.io spec: conversion: strategy: Webhook - webhookClientConfig: + webhook: + clientConfig: # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) - caBundle: Cg== - service: - namespace: system - name: webhook-service - path: /convert - port: 443 + caBundle: Cg== + service: + namespace: system + name: webhook-service + path: /convert + port: 443 + conversionReviewVersions: + - v1 + - v1beta1 \ No newline at end of file From c1ac1df2bf06cc84265ab6df99bbf37fd313338c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 3 Mar 2021 14:53:08 +0100 Subject: [PATCH 0162/1234] Add doc and e2e for sidecar (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 93 ++++++++++++++++++++- tests/e2e/smoke-sidecar/00-install.yaml | 22 +++++ tests/e2e/smoke-sidecar/01-assert.yaml | 13 +++ tests/e2e/smoke-sidecar/01-install-app.yaml | 19 +++++ tests/e2e/smoke-simplest/00-assert.yaml | 2 +- 5 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 tests/e2e/smoke-sidecar/00-install.yaml create mode 100644 tests/e2e/smoke-sidecar/01-assert.yaml create mode 100644 tests/e2e/smoke-sidecar/01-install-app.yaml diff --git a/README.md b/README.md index f18eecba1..5fadfa33b 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ spec: protocols: grpc: processors: - queued_retry: exporters: logging: @@ -38,10 +37,11 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [queued_retry] + processors: [] exporters: [logging] EOF ``` + **_WARNING:_** Until the OpenTelemetry Collector format is stable, changes may be required in the above example to remain compatible with the latest version of the OpenTelemetry Collector image being referenced. @@ -53,7 +53,94 @@ At this point, the Operator does *not* validate the contents of the configuratio ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet` or as a `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. + +#### Sidecar injection + +A sidecar with the OpenTelemetry Collector can be injected into pod-based workloads by setting the pod annotation `sidecar.opentelemetry.io/inject` to either `"true"`, or to the name of a concrete `OpenTelemetryCollector` from the same namespace, like in the following example: + +```console +$ kubectl apply -f - < Date: Thu, 4 Mar 2021 16:29:24 +0530 Subject: [PATCH 0163/1234] Restart collector pod when config is updated (#215) Signed-off-by: santosh --- config/rbac/role.yaml | 7 ++ .../opentelemetrycollector_controller.go | 32 ++++--- main.go | 9 +- pkg/collector/annotations.go | 49 ++++++++++ pkg/collector/annotations_test.go | 89 +++++++++++++++++++ pkg/collector/daemonset.go | 9 +- pkg/collector/deployment.go | 9 +- pkg/collector/reconcile/configmap.go | 9 ++ pkg/collector/reconcile/params.go | 2 + 9 files changed, 182 insertions(+), 33 deletions(-) create mode 100644 pkg/collector/annotations.go create mode 100644 pkg/collector/annotations_test.go diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ae6a38711..cceb866b1 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -18,6 +18,13 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch - apiGroups: - "" resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index c687dd37e..9a055a00c 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -24,6 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -35,10 +36,11 @@ import ( // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. type OpenTelemetryCollectorReconciler struct { client.Client - log logr.Logger - scheme *runtime.Scheme - config config.Config - tasks []Task + log logr.Logger + scheme *runtime.Scheme + config config.Config + tasks []Task + recorder record.EventRecorder } // Task represents a reconciliation task to be executed by the reconciler. @@ -51,10 +53,11 @@ type Task struct { // Params is the set of options to build a new openTelemetryCollectorReconciler. type Params struct { client.Client - Log logr.Logger - Scheme *runtime.Scheme - Config config.Config - Tasks []Task + Log logr.Logger + Scheme *runtime.Scheme + Config config.Config + Tasks []Task + Recorder record.EventRecorder } // NewReconciler creates a new reconciler for OpenTelemetryCollector objects. @@ -95,11 +98,12 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { } return &OpenTelemetryCollectorReconciler{ - Client: p.Client, - log: p.Log, - scheme: p.Scheme, - config: p.Config, - tasks: p.Tasks, + Client: p.Client, + log: p.Log, + scheme: p.Scheme, + config: p.Config, + tasks: p.Tasks, + recorder: p.Recorder, } } @@ -107,6 +111,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update +// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state. func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -131,6 +136,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl Instance: instance, Log: log, Scheme: r.scheme, + Recorder: r.recorder, } if err := r.RunTasks(ctx, params); err != nil { diff --git a/main.go b/main.go index 3fe73dbe2..0e2aa7ee9 100644 --- a/main.go +++ b/main.go @@ -145,10 +145,11 @@ func main() { } if err = controllers.NewReconciler(controllers.Params{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("OpenTelemetryCollector"), - Scheme: mgr.GetScheme(), - Config: cfg, + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("OpenTelemetryCollector"), + Scheme: mgr.GetScheme(), + Config: cfg, + Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "OpenTelemetryCollector") os.Exit(1) diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go new file mode 100644 index 000000000..1d7cc9b4b --- /dev/null +++ b/pkg/collector/annotations.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "crypto/sha256" + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// Annotations return the annotations for OpenTelemetryCollector pod. +func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { + // new map every time, so that we don't touch the instance's annotations + annotations := map[string]string{} + + // set default prometheus annotations + annotations["prometheus.io/scrape"] = "true" + annotations["prometheus.io/port"] = "8888" + annotations["prometheus.io/path"] = "/metrics" + + // allow override of prometheus annotations + if nil != instance.Annotations { + for k, v := range instance.Annotations { + annotations[k] = v + } + } + // make sure sha256 for configMap is always calculated + annotations["opentelemetry-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) + + return annotations +} + +func getConfigMapSHA(config string) string { + h := sha256.Sum256([]byte(config)) + return fmt.Sprintf("%x", h) +} diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go new file mode 100644 index 000000000..2e5adf0ce --- /dev/null +++ b/pkg/collector/annotations_test.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func TestDefaultAnnotations(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "test", + }, + } + + // test + annotations := Annotations(otelcol) + + //verify + assert.Equal(t, "true", annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", annotations["prometheus.io/path"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) +} + +func TestUserAnnotations(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + Annotations: map[string]string{"prometheus.io/scrape": "false", + "prometheus.io/port": "1234", + "prometheus.io/path": "/test", + "opentelemetry-operator-config/sha256": "shouldBeOverwritten", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "test", + }, + } + + // test + annotations := Annotations(otelcol) + + //verify + assert.Equal(t, "false", annotations["prometheus.io/scrape"]) + assert.Equal(t, "1234", annotations["prometheus.io/port"]) + assert.Equal(t, "/test", annotations["prometheus.io/path"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) +} + +func TestAnnotationsPropagateDown(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{"myapp": "mycomponent"}, + }, + } + + // test + annotations := Annotations(otelcol) + + // verify + assert.Len(t, annotations, 5) + assert.Equal(t, "mycomponent", annotations["myapp"]) +} diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 270e6650e..8d6636364 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -30,14 +30,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) - annotations := otelcol.Annotations - if annotations == nil { - annotations = map[string]string{} - } - - annotations["prometheus.io/scrape"] = "true" - annotations["prometheus.io/port"] = "8888" - annotations["prometheus.io/path"] = "/metrics" + annotations := Annotations(otelcol) return appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 87105d317..0f0f55346 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -30,14 +30,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) - annotations := otelcol.Annotations - if annotations == nil { - annotations = map[string]string{} - } - - annotations["prometheus.io/scrape"] = "true" - annotations["prometheus.io/port"] = "8888" - annotations["prometheus.io/path"] = "/metrics" + annotations := Annotations(otelcol) return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index dcb33ed15..0b07db968 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -17,6 +17,7 @@ package reconcile import ( "context" "fmt" + "reflect" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -124,6 +125,9 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } + if configMapChanged(&desired, existing) { + params.Recorder.Event(updated, "Normal", "ConfigUpdate ", fmt.Sprintf("OpenTelemetry Config changed - %s/%s", desired.Namespace, desired.Name)) + } params.Log.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) } @@ -163,3 +167,8 @@ func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.Conf return nil } + +func configMapChanged(desired *corev1.ConfigMap, actual *corev1.ConfigMap) bool { + return !reflect.DeepEqual(desired.Data, actual.Data) + +} diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index e9e6fa3db..6fcbf8dc0 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -17,6 +17,7 @@ package reconcile import ( "github.com/go-logr/logr" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" @@ -30,4 +31,5 @@ type Params struct { Instance v1alpha1.OpenTelemetryCollector Log logr.Logger Scheme *runtime.Scheme + Recorder record.EventRecorder } From ea631fda9d511a10293bb7441706a7879de1c3ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Mar 2021 10:23:29 +0100 Subject: [PATCH 0164/1234] Bump sigs.k8s.io/controller-runtime from 0.8.2 to 0.8.3 (#221) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.8.2...v0.8.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f0a736086..05b946baa 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.20.4 k8s.io/client-go v0.20.4 k8s.io/kubectl v0.20.4 - sigs.k8s.io/controller-runtime v0.8.2 + sigs.k8s.io/controller-runtime v0.8.3 ) replace ( diff --git a/go.sum b/go.sum index 0352b5a56..ebdaea590 100644 --- a/go.sum +++ b/go.sum @@ -721,8 +721,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.8.2 h1:SBWmI0b3uzMIUD/BIXWNegrCeZmPJ503pOtwxY0LPHM= -sigs.k8s.io/controller-runtime v0.8.2/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= +sigs.k8s.io/controller-runtime v0.8.3 h1:GMHvzjTmaWHQB8HadW+dIvBoJuLvZObYJ5YoZruPRao= +sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From e3c3e72f71c2fe7baf5928423fe5dc82af352c9a Mon Sep 17 00:00:00 2001 From: Santosh Kumar Bhiravabhatla <36130219+bhiravabhatla@users.noreply.github.com> Date: Tue, 9 Mar 2021 14:54:09 +0530 Subject: [PATCH 0165/1234] Change apiVersion for wehbhook manifests & patches. Update apiVersion for metrics-reader clusterRole to rbac.authorization.k8s.io/v1 (#220) Signed-off-by: santosh --- config/default/webhookcainjection_patch.yaml | 4 ++-- config/rbac/auth_proxy_client_clusterrole.yaml | 2 +- config/webhook/manifests.yaml | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/config/default/webhookcainjection_patch.yaml b/config/default/webhookcainjection_patch.yaml index 7e79bf995..02ab515d4 100644 --- a/config/default/webhookcainjection_patch.yaml +++ b/config/default/webhookcainjection_patch.yaml @@ -1,13 +1,13 @@ # This patch add annotation to admission webhook config and # the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize. -apiVersion: admissionregistration.k8s.io/v1beta1 +apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: name: mutating-webhook-configuration annotations: cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) --- -apiVersion: admissionregistration.k8s.io/v1beta1 +apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: name: validating-webhook-configuration diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index 7d62534c5..bd4af137a 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -1,4 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: metrics-reader diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index b38a312a9..264a09bc2 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,6 +1,6 @@ --- -apiVersion: admissionregistration.k8s.io/v1beta1 +apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: creationTimestamp: null @@ -24,6 +24,8 @@ webhooks: - UPDATE resources: - opentelemetrycollectors + admissionReviewVersions: ["v1","v1beta1"] + sideEffects: None - clientConfig: caBundle: Cg== service: @@ -42,9 +44,11 @@ webhooks: - UPDATE resources: - pods + admissionReviewVersions: ["v1","v1beta1"] + sideEffects: None --- -apiVersion: admissionregistration.k8s.io/v1beta1 +apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: creationTimestamp: null @@ -69,3 +73,5 @@ webhooks: - DELETE resources: - opentelemetrycollectors + admissionReviewVersions: ["v1","v1beta1"] + sideEffects: None From 295d4690f25be0c86829245ef146f96867faa0b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 9 Mar 2021 17:45:42 +0100 Subject: [PATCH 0166/1234] Update to collector v0.21.0 (#223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #216 Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 6 ++++++ RELEASE.md | 2 +- versions.txt | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e5e5def3..9b4f21b50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changes by Version ================== +0.21.0 (2021-03-09) +------------------- +* Restart collector pod when config is updated ([#215](https://github.com/open-telemetry/opentelemetry-operator/pull/215), [@bhiravabhatla](https://github.com/bhiravabhatla)) +* Add permissions for opentelemetry finalizer resource ([#212](https://github.com/open-telemetry/opentelemetry-operator/pull/212), [@rubenvp8510](https://github.com/rubenvp8510)) +* fix: collector selection should not fail if there is a single sidecar ([#210](https://github.com/open-telemetry/opentelemetry-operator/pull/210), [@vbehar](https://github.com/vbehar)) + 0.20.0 (2021-02-11) ------------------- * Bumped OpenTelemetry Collector to v0.20.0 diff --git a/RELEASE.md b/RELEASE.md index c5543a103..0a22a0bbe 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,7 +15,7 @@ Steps to release a new version of the OpenTelemetry Operator: Run this generator: ```console -$ docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator +$ docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator --branch main ``` Remove the commits that are not relevant to users, like: diff --git a/versions.txt b/versions.txt index cc973a9df..8ed81c93f 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.20.0 +opentelemetry-collector=0.21.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.20.0 +operator=0.21.0 From b270a0eae5543603276fe35d9e44bd4db201424d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Mar 2021 15:50:42 +0100 Subject: [PATCH 0167/1234] Update bundle to 0.21.0 (#224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- ....authorization.k8s.io_v1_clusterrole.yaml} | 2 +- ...emetry-operator.clusterserviceversion.yaml | 26 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 2174 +++++++++-------- 3 files changed, 1111 insertions(+), 1091 deletions(-) rename bundle/manifests/{opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml => opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml} (77%) diff --git a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml b/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml similarity index 77% rename from bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml rename to bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml index 91f6b256b..1cf126194 100644 --- a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1beta1_clusterrole.yaml +++ b/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -1,4 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0a71eaeea..6a5dc50e8 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,11 +21,11 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.2.0 + operators.operatorframework.io/builder: operator-sdk-v1.3.0 operators.operatorframework.io/project_layout: go repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.17.1 + name: opentelemetry-operator.v0.21.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -63,6 +63,13 @@ spec: - patch - update - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch - apiGroups: - "" resources: @@ -139,6 +146,14 @@ spec: - patch - update - watch + - apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/finalizers + verbs: + - get + - patch + - update - apiGroups: - opentelemetry.io resources: @@ -179,7 +194,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:0.17.1 + image: controller name: manager ports: - containerPort: 9443 @@ -269,9 +284,10 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.17.1 + version: 0.21.0 webhookdefinitions: - admissionReviewVersions: + - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager @@ -293,6 +309,7 @@ spec: type: ValidatingAdmissionWebhook webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: + - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager @@ -313,6 +330,7 @@ spec: type: MutatingAdmissionWebhook webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: + - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 28e073585..16f499c68 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1,33 +1,25 @@ -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.3.0 + controller-gen.kubebuilder.io/version: v0.4.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: - additionalPrinterColumns: - - JSONPath: .spec.mode - description: Deployment Mode - name: Mode - type: string - - JSONPath: .status.version - description: OpenTelemetry Version - name: Version - type: string - - JSONPath: .metadata.creationTimestamp - name: Age - type: date conversion: strategy: Webhook - webhookClientConfig: - caBundle: Cg== - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /convert - port: 443 + webhook: + clientConfig: + caBundle: Cg== + service: + name: webhook-service + namespace: system + path: /convert + port: 443 + conversionReviewVersions: + - v1 + - v1beta1 group: opentelemetry.io names: kind: OpenTelemetryCollector @@ -37,1123 +29,1133 @@ spec: - otelcol - otelcols singular: opentelemetrycollector - preserveUnknownFields: false scope: Namespaced - subresources: - scale: - specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas - status: {} - validation: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. - type: string - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - description: Image indicates the container image to use for the OpenTelemetry Collector. - type: string - mode: - description: Mode represents how the collector should be deployed (deployment, daemonset or sidecar) - enum: - - daemonset - - deployment - - sidecar - type: string - ports: - description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default. - type: string - name: - description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector - format: int32 - type: integer - serviceAccount: - description: ServiceAccount indicates the name of an existing service account to use with this instance. - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within a container. - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name + versions: + - additionalPrinterColumns: + - description: Deployment Mode + jsonPath: .spec.mode + name: Mode + type: string + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry Collector binary type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying collector deployment(s). - items: - description: Volume represents a named volume in a pod that may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. + config: + description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + type: string + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace properties: key: - description: The key to project. + description: The key of the secret to select from. Must be a valid secret key. type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean required: - key - - path type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: object + required: + - name + type: object + type: array + image: + description: Image indicates the container image to use for the OpenTelemetry Collector. + type: string + mode: + description: Mode represents how the collector should be deployed (deployment, daemonset or sidecar) + enum: + - daemonset + - deployment + - sidecar + type: string + ports: + description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default. + type: string + name: + description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector + format: int32 + type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service account to use with this instance. + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying collector deployment(s). + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: type: string - type: object - readOnly: - description: Specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." + properties: + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + type: object + spec: + description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' + accessModes: + description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + selector: + description: A label query over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + volumeMode: + description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the PersistentVolume backing this claim. type: string - required: - - resource type: object required: - - path + - spec type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." - properties: - readOnly: - description: Specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. - type: object - spec: - description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.' + configMap: + description: information about the configMap data to project properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array name: - description: Name is the name of resource being referenced + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - required: - - kind - - name + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean type: object - resources: - description: 'Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + downwardAPI: + description: information about the downwardAPI data to project properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array type: object - selector: - description: A label query over volumes to consider for binding. + secret: + description: information about the secret data to project properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + description: Maps a string key to a path within a volume. properties: key: - description: key is the label key that the selector applies to. + description: The key to project. type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array required: - key - - operator + - path type: object type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string type: object - required: - - spec - type: object - type: object - fc: - description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' - items: + type: array + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' - items: + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). - items: + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, and downward API - properties: - defaultMode: - description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with other supported volume types + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: - configMap: - description: information about the configMap data to project - properties: - items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume file - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to project - properties: - items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken data to project - properties: - audience: - description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the mount point of the file to project the token into. - type: string - required: - - path - type: object + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string type: object - type: array - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount user - type: string - volume: - description: Volume is a string that references an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the protection domain. - type: string - system: - description: The name of the storage system as configured in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the ScaleIO system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. properties: - key: - description: The key to project. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string - required: - - key - - path type: object - type: array - optional: - description: Specify whether the Secret or its keys must be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. - properties: - messages: - description: Messages about actions performed by the operator on this resource. - items: + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. + properties: + messages: + description: Messages about actions performed by the operator on this resource. + items: + type: string + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is currently not being set and might be removed in the next version. + format: int32 + type: integer + version: + description: Version of the managed OpenTelemetry Collector (operand) type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is currently not being set and might be removed in the next version. - format: int32 - type: integer - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - version: v1alpha1 - versions: - - name: v1alpha1 + type: object + type: object served: true storage: true + subresources: + scale: + specReplicasPath: .spec.replicas + statusReplicasPath: .status.replicas + status: {} status: acceptedNames: kind: "" From 9ef08431c6282d4aabac4ee9f2f091f1a631e6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 11 Mar 2021 15:51:02 +0100 Subject: [PATCH 0168/1234] Update to collector v0.22.0 (#225) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #222 Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 5 +++++ versions.txt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4f21b50..fb78de0e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ Changes by Version ================== +0.22.0 (2021-03-11) +------------------- +* Bumped OpenTelemetry Collector to v0.22.0 + 0.21.0 (2021-03-09) ------------------- +* Bumped OpenTelemetry Collector to v0.21.0 * Restart collector pod when config is updated ([#215](https://github.com/open-telemetry/opentelemetry-operator/pull/215), [@bhiravabhatla](https://github.com/bhiravabhatla)) * Add permissions for opentelemetry finalizer resource ([#212](https://github.com/open-telemetry/opentelemetry-operator/pull/212), [@rubenvp8510](https://github.com/rubenvp8510)) * fix: collector selection should not fail if there is a single sidecar ([#210](https://github.com/open-telemetry/opentelemetry-operator/pull/210), [@vbehar](https://github.com/vbehar)) diff --git a/versions.txt b/versions.txt index 8ed81c93f..bee189be9 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.21.0 +opentelemetry-collector=0.22.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.21.0 +operator=0.22.0 From e92497e992ca08e4a0330a41ddee05225143e786 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:17:42 +0100 Subject: [PATCH 0169/1234] Bump k8s.io/kubectl from 0.20.4 to 0.20.5 (#229) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.4 to 0.20.5. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.20.4...v0.20.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 33 ++++++++++++++------------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index 05b946baa..5330beee7 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.4 - k8s.io/apimachinery v0.20.4 - k8s.io/client-go v0.20.4 - k8s.io/kubectl v0.20.4 + k8s.io/api v0.20.5 + k8s.io/apimachinery v0.20.5 + k8s.io/client-go v0.20.5 + k8s.io/kubectl v0.20.5 sigs.k8s.io/controller-runtime v0.8.3 ) diff --git a/go.sum b/go.sum index ebdaea590..0d43acb9e 100644 --- a/go.sum +++ b/go.sum @@ -118,7 +118,6 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.3.0 h1:q4c+kbcR0d5rSurhBR8dIgieOaYpXtsdTYfx22Cu6rs= github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -677,32 +676,28 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw= k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/api v0.20.4 h1:xZjKidCirayzX6tHONRQyTNDVIR55TYVqgATqo6ZULY= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.5 h1:zsMTffV0Le2EiI0aKvlTHEnXGxk1HiqGRhJcCPiI7JI= +k8s.io/api v0.20.5/go.mod h1:FQjAceXnVaWDeov2YUWhOb6Yt+5UjErkp6UO3nczO1Y= k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4 h1:vhxQ0PPUUU2Ns1b9r4/UFp13UPs8cw2iOoTjnY9faa0= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.5 h1:wO/FxMVRn223rAKxnBbwCyuN96bS9MFTIvP0e/V7cps= +k8s.io/apimachinery v0.20.5/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/cli-runtime v0.20.4/go.mod h1:dz38e1CM4uuIhy8PMFUZv7qsvIdoE3ByZYlmbHNCkt4= +k8s.io/cli-runtime v0.20.5/go.mod h1:ihjPeQWDk7NGVIkNEvpwxA3gJvqtU+LtkDj11TvyXn4= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ= k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/client-go v0.20.4 h1:85crgh1IotNkLpKYKZHVNI1JT86nr/iDCvq2iWKsql4= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.5 h1:dJGtYUvFrFGjQ+GjXEIby0gZWdlAOc0xJBJqY3VyDxA= +k8s.io/client-go v0.20.5/go.mod h1:Ee5OOMMYvlH8FCZhDsacjMlCBwetbGZETwo1OA+e6Zw= k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/code-generator v0.20.4/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= +k8s.io/code-generator v0.20.5/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.2 h1:LMmu5I0pLtwjpp5009KLuMGFqSc2S2isGw8t1hpYKLE= k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= -k8s.io/component-base v0.20.4 h1:gdvPs4G11e99meQnW4zN+oYOjH8qkLz1sURrAzvKWqc= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-helpers v0.20.4/go.mod h1:S7jGg8zQp3kwvSzfuGtNaQAMVmvzomXDioTm5vABn9g= +k8s.io/component-base v0.20.5 h1:8BZQKLJGhWrxtB7kIOEejKDtAKr1HOYvB0PZNeTyLS0= +k8s.io/component-base v0.20.5/go.mod h1:l0isoBLGyQKwRoTWbPHR6jNDd3/VqQD43cNlsjddGng= +k8s.io/component-helpers v0.20.5/go.mod h1:AzTdoPj6YAN2SUfhBX/FUUU3ntfFuse03q/VMLovEsE= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -711,9 +706,9 @@ k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.4 h1:Y1gUiigiZM+ulcrnWeqSHlTd0/7xWcQIXjuMnjtHyoo= -k8s.io/kubectl v0.20.4/go.mod h1:yCC5lUQyXRmmtwyxfaakryh9ezzp/bT0O14LeoFLbGo= -k8s.io/metrics v0.20.4/go.mod h1:DDXS+Ls+2NAxRcVhXKghRPa3csljyJRjDRjPe6EOg/g= +k8s.io/kubectl v0.20.5 h1:/wndy8hw5TsL8G8KWPDJrtPKS8D34uSdWS0BMRmtzWs= +k8s.io/kubectl v0.20.5/go.mod h1:mlNQgyV18D4XFt5BmfSkrxQNS+arT2pXDQxxnH5lMiw= +k8s.io/metrics v0.20.5/go.mod h1:vsptOayjKWKWHvWR1vFQY++vxydzaEo/2+JC7kSDKPU= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 3d57af49665c79d378cda3e86bd0b1d30ec6bb01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 22:19:55 +0200 Subject: [PATCH 0170/1234] Bump crazy-max/ghaction-docker-meta from v1 to v2.1.0 (#232) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v1 to v2.1.0. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v1...72654174f7b8de453d12757cef7fa93774555cbd) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 41d7aa1f4..5282614d5 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v1 + uses: crazy-max/ghaction-docker-meta@v2.1.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 700190eae574acebeb3123f34bb39bed6a900b06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 18:09:41 +0200 Subject: [PATCH 0171/1234] Bump crazy-max/ghaction-docker-meta from v2.1.0 to v2.1.1 (#233) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.1.0 to v2.1.1. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.1.0...ac90ddf06eee55fbe48897eeec38bba2f7948e7e) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 5282614d5..e0b9e7cdc 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.1.0 + uses: crazy-max/ghaction-docker-meta@v2.1.1 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 55f44f5ffc2e03cfa0a06cd547a5b38e602131f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:32:54 +0200 Subject: [PATCH 0172/1234] Bump crazy-max/ghaction-docker-meta from v2.1.1 to v2.2.1 (#237) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.1.1 to v2.2.1. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.1.1...f39f06a624f9ca2c5d27758aa88932d443e9eda2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index e0b9e7cdc..6a6032124 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.1.1 + uses: crazy-max/ghaction-docker-meta@v2.2.1 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From c2207d6d9a4623a0f3cc653e57d50c9782bb0d3b Mon Sep 17 00:00:00 2001 From: "sicong.huang" Date: Wed, 7 Apr 2021 16:33:55 +0800 Subject: [PATCH 0173/1234] Update to collector v0.23.0 (#234) Signed-off-by: lastchiliarch --- CHANGELOG.md | 4 ++++ versions.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb78de0e5..0f9b8ccd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.23.0 (2021-04-04) +------------------- +* Bumped OpenTelemetry Collector to v0.23.0 + 0.22.0 (2021-03-11) ------------------- * Bumped OpenTelemetry Collector to v0.22.0 diff --git a/versions.txt b/versions.txt index bee189be9..517a7798e 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.22.0 +opentelemetry-collector=0.23.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.22.0 +operator=0.23.0 From d598b1e740abf79b4990b5cb0e8811c2a3be7590 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:35:13 +0200 Subject: [PATCH 0174/1234] Bump golangci/golangci-lint-action from v2.5.1 to v2.5.2 (#235) Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v2.5.1 to v2.5.2. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v2.5.1...5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a12ea0f98..7e174be34 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ jobs: uses: actions/checkout@v2 - name: Lint - uses: golangci/golangci-lint-action@v2.5.1 + uses: golangci/golangci-lint-action@v2.5.2 with: args: -v version: v1.29 From a8f3d4aa131127c4664ebeaa763e3553310bd0c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:50:58 +0200 Subject: [PATCH 0175/1234] Bump crazy-max/ghaction-docker-meta from v2.2.1 to v2.3.0 (#241) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.2.1 to v2.3.0. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.2.1...2e1a5c7fa42123697f82d479b551a1bbdb1bef88) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 6a6032124..b57715e50 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.2.1 + uses: crazy-max/ghaction-docker-meta@v2.3.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 33f21cc8292f98c0a0170dde340ef571ff837008 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Apr 2021 11:32:05 +0200 Subject: [PATCH 0176/1234] Bump actions/cache from v2.1.4 to v2.1.5 (#246) Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index b57715e50..8958726da 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2.1.4 + uses: actions/cache@v2.1.5 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From ea688b527a5b1323413d18d6843ec02486c46350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 13 Apr 2021 22:48:26 +0200 Subject: [PATCH 0177/1234] Bumped cert-manager to v1.1.1 (#242) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 335ee3074..c0e3a0422 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ container-push: docker push ${IMG} cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.3/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.1.1/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager From 0a2c3f9521df292f39882d513ea5f2458cb84117 Mon Sep 17 00:00:00 2001 From: Julian Nodorp Date: Mon, 19 Apr 2021 14:20:04 +0200 Subject: [PATCH 0178/1234] Allow resource configuration on collector spec (#248) Fixes #247 --- api/v1alpha1/opentelemetrycollector_types.go | 5 +++ api/v1alpha1/zz_generated.deepcopy.go | 1 + ...ntelemetry.io_opentelemetrycollectors.yaml | 26 +++++++++++ pkg/collector/container.go | 1 + pkg/collector/container_test.go | 43 +++++++++++++++++++ 5 files changed, 76 insertions(+) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index c2d728b09..604a14057 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -76,6 +76,11 @@ type OpenTelemetryCollectorSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Env []v1.EnvVar `json:"env,omitempty"` + + // Resources to set on the OpenTelemetry Collector pods. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Resources v1.ResourceRequirements `json:"resources,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index a0131fcbd..0afdc20e3 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -125,6 +125,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 017548c16..5c220111c 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -248,6 +248,32 @@ spec: OpenTelemetry Collector format: int32 type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. diff --git a/pkg/collector/container.go b/pkg/collector/container.go index e86d01902..8646e3343 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -69,5 +69,6 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem VolumeMounts: volumeMounts, Args: args, Env: envVars, + Resources: otelcol.Spec.Resources, } } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index cfddf0642..7315ffa29 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -18,6 +18,7 @@ import ( "testing" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/stretchr/testify/assert" @@ -133,3 +134,45 @@ func TestContainerEmptyEnvVarsByDefault(t *testing.T) { // verify assert.Empty(t, c.Env) } + +func TestContainerResourceRequirements(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Resources: corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("128M"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("200m"), + corev1.ResourceMemory: resource.MustParse("256M"), + }, + }, + }, + } + + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, resource.MustParse("100m"), *c.Resources.Limits.Cpu()) + assert.Equal(t, resource.MustParse("128M"), *c.Resources.Limits.Memory()) + assert.Equal(t, resource.MustParse("200m"), *c.Resources.Requests.Cpu()) + assert.Equal(t, resource.MustParse("256M"), *c.Resources.Requests.Memory()) +} + +func TestContainerDefaultResourceRequirements(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Empty(t, c.Resources) +} From 720400e6bc69db6d85406dc932d6c66e5443acd5 Mon Sep 17 00:00:00 2001 From: Amila Kumaranayaka Date: Wed, 21 Apr 2021 16:46:28 +0200 Subject: [PATCH 0179/1234] Bump operator-sdk version to 1.6.1 (#249) --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43f5d39a2..db8e499bc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.4.0 + operator-sdk-version: v1.6.1 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" From 41e5738e706669e5f7bcee3e95a5de345a8698f5 Mon Sep 17 00:00:00 2001 From: Julian Nodorp Date: Thu, 22 Apr 2021 15:10:05 +0200 Subject: [PATCH 0180/1234] Update to collector v0.24.0 (#251) Fixes #238 --- CHANGELOG.md | 4 ++ pkg/collector/upgrade/v0_24_0.go | 74 +++++++++++++++++++++++++++ pkg/collector/upgrade/v0_24_0_test.go | 68 ++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 ++ versions.txt | 4 +- 5 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 pkg/collector/upgrade/v0_24_0.go create mode 100644 pkg/collector/upgrade/v0_24_0_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f9b8ccd2..2a2bbba7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.24.0 (2021-04-20) +------------------- +* Bumped OpenTelemetry Collector to v0.24.0 + 0.23.0 (2021-04-04) ------------------- * Bumped OpenTelemetry Collector to v0.23.0 diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go new file mode 100644 index 000000000..3eddfaaee --- /dev/null +++ b/pkg/collector/upgrade/v0_24_0.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_24_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, failed to parse configuration: %w", err) + } + + extensions, ok := cfg["extensions"].(map[interface{}]interface{}) + if !ok { + // We do not need an upgrade if there are no extensions. + return otelcol, nil + } + + for k, v := range extensions { + if strings.HasPrefix(k.(string), "health_check") { + switch extension := v.(type) { + case map[interface{}]interface{}: + if port, ok := extension["port"]; ok { + delete(extension, "port") + extension["endpoint"] = fmt.Sprintf("0.0.0.0:%d", port) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension %q", k)) + } + case string: + if len(extension) == 0 { + // This extension is using the default configuration. + continue + } + case nil: + // This extension is using the default configuration. + continue + default: + return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, the extension %q is invalid (expected string or map but was %t)", k, v) + } + } + } + + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, failed to marshall back configuration: %w", err) + } + + otelcol.Spec.Config = string(res) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go new file mode 100644 index 000000000..861a6b374 --- /dev/null +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func TestHealthCheckEndpointMigration(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `extensions: + health_check: + health_check/1: "" + health_check/2: + endpoint: "localhost:13133" + health_check/3: + port: 13133 +`, + }, + } + existing.Status.Version = "0.23.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, `extensions: + health_check: null + health_check/1: "" + health_check/2: + endpoint: localhost:13133 + health_check/3: + endpoint: 0.0.0.0:13133 +`, res.Spec.Config) + assert.Equal(t, "upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension \"health_check/3\"", res.Status.Messages[0]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 4e2bddec4..b4c37fac0 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -46,6 +46,10 @@ var ( Version: *semver.MustParse("0.19.0"), upgrade: upgrade0_19_0, }, + { + Version: *semver.MustParse("0.24.0"), + upgrade: upgrade0_24_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/versions.txt b/versions.txt index 517a7798e..a7fa68ac4 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.23.0 +opentelemetry-collector=0.24.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.23.0 +operator=0.24.0 From db40230d99040201ba7b85a64700788392e96b62 Mon Sep 17 00:00:00 2001 From: Julian Nodorp Date: Fri, 23 Apr 2021 12:04:42 +0200 Subject: [PATCH 0181/1234] Fix changelog (#253) --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a2bbba7c..7af3b9448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ Changes by Version 0.24.0 (2021-04-20) ------------------- -* Bumped OpenTelemetry Collector to v0.24.0 +* Bumped OpenTelemetry Collector to v0.24.0 ([#251](https://github.com/open-telemetry/opentelemetry-operator/pull/251), [@jnodorp-jaconi](https://github.com/jnodorp-jaconi)) +* Allow resource configuration on collector spec ([#248](https://github.com/open-telemetry/opentelemetry-operator/pull/248), [@jnodorp-jaconi](https://github.com/jnodorp-jaconi)) 0.23.0 (2021-04-04) ------------------- From 11cf7ec1c1e59413e55b1137bfeb8c4ab10d891d Mon Sep 17 00:00:00 2001 From: RichieSams Date: Thu, 29 Apr 2021 04:44:02 -0400 Subject: [PATCH 0182/1234] Force a dummy subject for the self-signed Issuer (#258) This prevents cert-manager from creating a certificate with an empty DN, which is invalid according to RFC 5280. See: https://github.com/jetstack/cert-manager/issues/3634#issuecomment-773894638 Fixes #255 --- config/certmanager/certificate.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/certmanager/certificate.yaml b/config/certmanager/certificate.yaml index 4b64202a9..2a68d4d23 100644 --- a/config/certmanager/certificate.yaml +++ b/config/certmanager/certificate.yaml @@ -24,3 +24,6 @@ spec: kind: Issuer name: selfsigned-issuer secretName: opentelemetry-operator-controller-manager-service-cert # this secret will not be prefixed, since it's not managed by kustomize + subject: + organizationalUnits: + - "opentelemetry-operator" From 66af9771a93ae161500a52755cb85401e7114794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 09:46:12 +0200 Subject: [PATCH 0183/1234] Bump crazy-max/ghaction-docker-meta from v2.3.0 to v2.4.0 (#260) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.3.0 to v2.4.0. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.3.0...e09df4df3ce0f1198fcfa91b72743b2cb7969430) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 8958726da..c49202ac4 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.3.0 + uses: crazy-max/ghaction-docker-meta@v2.4.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 292626dbda36dfdfbf5972acbeeaa87ca300f9bc Mon Sep 17 00:00:00 2001 From: Chase <80980072+chasekiefer@users.noreply.github.com> Date: Tue, 4 May 2021 03:29:45 -0500 Subject: [PATCH 0184/1234] Fix manifests being updated with a wrong version pattern (#262) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c0e3a0422..d6b755068 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${ # Image URL to use all building/pushing image targets IMG_PREFIX ?= quay.io/${USER} IMG_REPO ?= opentelemetry-operator -IMG ?= ${IMG_PREFIX}/${IMG_REPO}:${VERSION} +IMG ?= ${IMG_PREFIX}/${IMG_REPO}:$(addprefix v,${VERSION}) BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} # Options for 'bundle-build' From 70d7920dfc06281d6c6081790137f5ebfae0eaad Mon Sep 17 00:00:00 2001 From: Santosh Kumar Bhiravabhatla <36130219+bhiravabhatla@users.noreply.github.com> Date: Tue, 4 May 2021 21:02:22 +0530 Subject: [PATCH 0185/1234] Add unit tests for reconcile methods - part 1 (#250) Signed-off-by: santosh --- .gitignore | 1 + pkg/collector/reconcile/configmap.go | 2 +- pkg/collector/reconcile/configmap_test.go | 141 +++++++++++++++++ pkg/collector/reconcile/daemonset.go | 2 +- pkg/collector/reconcile/daemonset_test.go | 133 ++++++++++++++++ pkg/collector/reconcile/deployment.go | 2 +- pkg/collector/reconcile/deployment_test.go | 130 ++++++++++++++++ pkg/collector/reconcile/opentelemetry_test.go | 42 +++++ pkg/collector/reconcile/suite_test.go | 145 ++++++++++++++++++ 9 files changed, 595 insertions(+), 3 deletions(-) create mode 100644 pkg/collector/reconcile/configmap_test.go create mode 100644 pkg/collector/reconcile/daemonset_test.go create mode 100644 pkg/collector/reconcile/deployment_test.go create mode 100644 pkg/collector/reconcile/opentelemetry_test.go create mode 100644 pkg/collector/reconcile/suite_test.go diff --git a/.gitignore b/.gitignore index b0e1ac71e..86b6e0d63 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ bin # Release artifacts dist bundle.tar.gz +vendor # editor and IDE paraphernalia .idea diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 0b07db968..82d57b539 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -120,7 +120,7 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co updated.ObjectMeta.Labels[k] = v } - patch := client.MergeFrom(¶ms.Instance) + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go new file mode 100644 index 000000000..7eaee37fc --- /dev/null +++ b/pkg/collector/reconcile/configmap_test.go @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +func TestDesiredConfigMap(t *testing.T) { + t.Run("should return expected config map", func(t *testing.T) { + expectedLables := map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/name": "test-collector", + } + + expectedData := map[string]string{ + "collector.yaml": ` + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + +`, + } + + actual := desiredConfigMap(context.Background(), params()) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + +} + +func TestExpectedConfigMap(t *testing.T) { + t.Run("should create config map", func(t *testing.T) { + err := expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}, true) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + }) + + t.Run("should update config map", func(t *testing.T) { + + param := Params{ + Config: config.New(), + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } + cm := desiredConfigMap(context.Background(), param) + createObjectIfNotExists(t, "test-collector", &cm) + + err := expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}, true) + assert.NoError(t, err) + + actual := v1.ConfigMap{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + assert.Equal(t, params().Instance.Spec.Config, actual.Data["collector.yaml"]) + }) + + t.Run("should delete config map", func(t *testing.T) { + + deletecm := v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-delete-collector", + Namespace: "default", + Labels: map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } + createObjectIfNotExists(t, "test-delete-collector", &deletecm) + + exists, _ := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.True(t, exists) + + err := deleteConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}) + assert.NoError(t, err) + + exists, _ = populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.False(t, exists) + }) +} diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index 8b01af432..fa6a1a6f8 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -89,7 +89,7 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da updated.ObjectMeta.Labels[k] = v } - patch := client.MergeFrom(¶ms.Instance) + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } diff --git a/pkg/collector/reconcile/daemonset_test.go b/pkg/collector/reconcile/daemonset_test.go new file mode 100644 index 000000000..8a4751e8b --- /dev/null +++ b/pkg/collector/reconcile/daemonset_test.go @@ -0,0 +1,133 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExpectedDaemonsets(t *testing.T) { + param := params() + expectedDs := collector.DaemonSet(param.Config, logger, param.Instance) + + t.Run("should create Daemonset", func(t *testing.T) { + err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + + }) + t.Run("should update Daemonset", func(t *testing.T) { + createObjectIfNotExists(t, "test-collector", &expectedDs) + err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + assert.NoError(t, err) + + actual := v1.DaemonSet{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + }) + + t.Run("should delete daemonset", func(t *testing.T) { + + labels := map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + } + ds := v1.DaemonSet{} + ds.Name = "dummy" + ds.Namespace = "default" + ds.Labels = labels + ds.Spec = v1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + + createObjectIfNotExists(t, "dummy", &ds) + + err := deleteDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + assert.NoError(t, err) + + actual := v1.DaemonSet{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.False(t, exists) + + }) + + t.Run("should not delete daemonset", func(t *testing.T) { + + labels := map[string]string{ + "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", + } + ds := v1.DaemonSet{} + ds.Name = "dummy" + ds.Namespace = "default" + ds.Labels = labels + ds.Spec = v1.DaemonSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + + createObjectIfNotExists(t, "dummy", &ds) + + err := deleteDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + assert.NoError(t, err) + + actual := v1.DaemonSet{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.True(t, exists) + + }) +} diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 399b74e80..41b0f0de6 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -89,7 +89,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - patch := client.MergeFrom(¶ms.Instance) + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go new file mode 100644 index 000000000..7295ef05f --- /dev/null +++ b/pkg/collector/reconcile/deployment_test.go @@ -0,0 +1,130 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExpectedDeployments(t *testing.T) { + param := params() + expectedDeploy := collector.Deployment(param.Config, logger, param.Instance) + + t.Run("should create deployment", func(t *testing.T) { + err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + + }) + t.Run("should update deployment", func(t *testing.T) { + createObjectIfNotExists(t, "test-collector", &expectedDeploy) + err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + assert.Equal(t, int32(2), *actual.Spec.Replicas) + }) + + t.Run("should delete deployment", func(t *testing.T) { + labels := map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + } + deploy := v1.Deployment{} + deploy.Name = "dummy" + deploy.Namespace = "default" + deploy.Labels = labels + deploy.Spec = v1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + createObjectIfNotExists(t, "dummy", &deploy) + + err := deleteDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.False(t, exists) + + }) + + t.Run("should not delete deployment", func(t *testing.T) { + labels := map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", + } + deploy := v1.Deployment{} + deploy.Name = "dummy" + deploy.Namespace = "default" + deploy.Spec = v1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + createObjectIfNotExists(t, "dummy", &deploy) + + err := deleteDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.True(t, exists) + + }) +} diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go new file mode 100644 index 000000000..50c08d78e --- /dev/null +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func TestSelf(t *testing.T) { + t.Run("should add version to the status", func(t *testing.T) { + instance := params().Instance + createObjectIfNotExists(t, "test", &instance) + err := Self(context.Background(), params()) + assert.NoError(t, err) + + actual := v1alpha1.OpenTelemetryCollector{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test"}) + assert.NoError(t, err) + assert.True(t, exists) + + assert.Equal(t, actual.Status.Version, "0.0.0") + + }) +} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go new file mode 100644 index 000000000..af41e0b39 --- /dev/null +++ b/pkg/collector/reconcile/suite_test.go @@ -0,0 +1,145 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/tools/record" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +var k8sClient client.Client +var testEnv *envtest.Environment +var testScheme *runtime.Scheme = scheme.Scheme +var logger = logf.Log.WithName("unit-tests") + +var instanceUID = uuid.NewUUID() + +func TestMain(m *testing.M) { + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + } + + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} + +func params() Params { + replicas := int32(2) + return Params{ + Config: config.New(), + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &replicas, + Config: ` + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + +`, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + +func createObjectIfNotExists(tb testing.TB, name string, object client.Object) { + tb.Helper() + err := k8sClient.Get(context.Background(), client.ObjectKey{Namespace: "default", Name: name}, object) + if errors.IsNotFound(err) { + err := k8sClient.Create(context.Background(), + object) + assert.NoError(tb, err) + } +} + +func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { + t.Helper() + err := k8sClient.Get(context.Background(), namespacedName, object) + if errors.IsNotFound(err) { + return false, nil + } + if err != nil { + return false, err + } + return true, nil + +} From b6ac997b1ba13d756f8679870d49ee497b699c6f Mon Sep 17 00:00:00 2001 From: Santosh Kumar Bhiravabhatla <36130219+bhiravabhatla@users.noreply.github.com> Date: Wed, 5 May 2021 14:12:45 +0530 Subject: [PATCH 0186/1234] Add unit tests for reconcile methods - part 2 (#261) Signed-off-by: santosh --- .gitignore | 1 + pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/service_test.go | 231 ++++++++++++++++++ pkg/collector/reconcile/serviceaccount.go | 2 +- .../reconcile/serviceaccount_test.go | 113 +++++++++ pkg/collector/reconcile/suite_test.go | 11 + 6 files changed, 358 insertions(+), 2 deletions(-) create mode 100644 pkg/collector/reconcile/service_test.go create mode 100644 pkg/collector/reconcile/serviceaccount_test.go diff --git a/.gitignore b/.gitignore index 86b6e0d63..374dd36ea 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.so *.dylib bin +vendor # Test binary, build with `go test -c` *.test diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index c7004e5ba..821d39dfd 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -195,7 +195,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv updated.ObjectMeta.Labels[k] = v } - patch := client.MergeFrom(¶ms.Instance) + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go new file mode 100644 index 000000000..dc15acb49 --- /dev/null +++ b/pkg/collector/reconcile/service_test.go @@ -0,0 +1,231 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExtractPortNumbersAndNames(t *testing.T) { + t.Run("should return extracted port names and numbers", func(t *testing.T) { + ports := []v1.ServicePort{{Name: "web", Port: 8080}, {Name: "tcp", Port: 9200}} + expectedPortNames := map[string]bool{"web": true, "tcp": true} + expectedPortNumbers := map[int32]bool{8080: true, 9200: true} + + actualPortNumbers, actualPortNames := extractPortNumbersAndNames(ports) + assert.Equal(t, expectedPortNames, actualPortNames) + assert.Equal(t, expectedPortNumbers, actualPortNumbers) + + }) +} + +func TestFilterPort(t *testing.T) { + + tests := []struct { + name string + candidate v1.ServicePort + portNumbers map[int32]bool + portNames map[string]bool + expected v1.ServicePort + }{ + { + name: "should filter out duplicate port", + candidate: v1.ServicePort{Name: "web", Port: 8080}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"test": true, "metrics": true}, + }, + + { + name: "should not filter unique port", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"test": true, "metrics": true}, + expected: v1.ServicePort{Name: "web", Port: 8090}, + }, + + { + name: "should change the duplicate portName", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"web": true, "metrics": true}, + expected: v1.ServicePort{Name: "port-8090", Port: 8090}, + }, + + { + name: "should return nil if fallback name clashes with existing portName", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"web": true, "port-8090": true}, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + actual := filterPort(logger, test.candidate, test.portNumbers, test.portNames) + if test.expected != (v1.ServicePort{}) { + assert.Equal(t, test.expected, *actual) + return + } + assert.Nil(t, actual) + + }) + + } +} + +func TestDesiredService(t *testing.T) { + t.Run("should return nil service for unknown receiver and protocol", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `receivers: + test: + protocols: + unknown:`}, + }, + } + + actual := desiredService(context.Background(), params) + assert.Nil(t, actual) + + }) + t.Run("should return service with port mentioned in Instance.Spec.Ports and inferred ports", func(t *testing.T) { + + jaegerPorts := v1.ServicePort{ + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + } + ports := append(params().Instance.Spec.Ports, jaegerPorts) + expected := service("test-collector", ports) + actual := desiredService(context.Background(), params()) + + assert.Equal(t, expected, *actual) + + }) + +} + +func TestExpectedServices(t *testing.T) { + t.Run("should create the service", func(t *testing.T) { + err := expectedServices(context.Background(), params(), []v1.Service{service("test-collector", params().Instance.Spec.Ports)}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + + }) + t.Run("should update service", func(t *testing.T) { + serviceInstance := service("test-collector", params().Instance.Spec.Ports) + createObjectIfNotExists(t, "test-collector", &serviceInstance) + + extraPorts := v1.ServicePort{ + Name: "port-web", + Protocol: "TCP", + Port: 8080, + } + + ports := append(params().Instance.Spec.Ports, extraPorts) + err := expectedServices(context.Background(), params(), []v1.Service{service("test-collector", ports)}) + assert.NoError(t, err) + + actual := v1.Service{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + // issue# https://github.com/open-telemetry/opentelemetry-operator/issues/256 + // Would uncomment once above issue is resolved + //assert.Contains(t, actual.Spec.Ports, extraPorts) + + }) +} + +func TestDeleteServices(t *testing.T) { + t.Run("should delete excess services", func(t *testing.T) { + ports := []v1.ServicePort{{ + Port: 80, + Name: "web", + }} + deleteService := service("delete-service-collector", ports) + createObjectIfNotExists(t, "delete-service-collector", &deleteService) + + exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + desired := desiredService(context.Background(), params()) + err = deleteServices(context.Background(), params(), []v1.Service{*desired}) + assert.NoError(t, err) + + exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) + assert.NoError(t, err) + assert.False(t, exists) + + }) +} + +func TestHeadlessService(t *testing.T) { + t.Run("should return headless service", func(t *testing.T) { + actual := headless(context.Background(), params()) + assert.Equal(t, actual.Spec.ClusterIP, "None") + }) +} + +func TestMonitoringService(t *testing.T) { + t.Run("returned service should expose monitoring port", func(t *testing.T) { + expected := []v1.ServicePort{{ + Name: "monitoring", + Port: 8888, + }} + actual := monitoringService(context.Background(), params()) + assert.Equal(t, expected, actual.Spec.Ports) + + }) +} + +func service(name string, ports []v1.ServicePort) v1.Service { + labels := collector.Labels(params().Instance) + labels["app.kubernetes.io/name"] = name + + selector := labels + return v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + Labels: labels, + Annotations: params().Instance.Annotations, + }, + Spec: v1.ServiceSpec{ + Selector: selector, + ClusterIP: "", + Ports: ports, + }, + } +} diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 570f80e28..9bdbaf544 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -88,7 +88,7 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core updated.ObjectMeta.Labels[k] = v } - patch := client.MergeFrom(¶ms.Instance) + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/serviceaccount_test.go b/pkg/collector/reconcile/serviceaccount_test.go new file mode 100644 index 000000000..2886fae93 --- /dev/null +++ b/pkg/collector/reconcile/serviceaccount_test.go @@ -0,0 +1,113 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExpectedServiceAccounts(t *testing.T) { + t.Run("should create service account", func(t *testing.T) { + desired := collector.ServiceAccount(params().Instance) + err := expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{desired}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + }) + + t.Run("should update existing service account", func(t *testing.T) { + existing := v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "default", + }, + } + createObjectIfNotExists(t, "test-collector", &existing) + exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + err = expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + assert.NoError(t, err) + + actual := v1.ServiceAccount{} + _, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, err) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + }) +} + +func TestDeleteServiceAccounts(t *testing.T) { + t.Run("should delete the managed service account", func(t *testing.T) { + existing := v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-delete-collector", + Namespace: "default", + Labels: map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } + createObjectIfNotExists(t, "test-delete-collector", &existing) + exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + err = deleteServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + assert.NoError(t, err) + + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.NoError(t, err) + assert.False(t, exists) + + }) + t.Run("should not delete unrelated service account", func(t *testing.T) { + existing := v1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-delete-collector", + Namespace: "default", + Labels: map[string]string{ + "app.kubernetes.io/instance": "default.testing", + "app.kubernetes.io/managed-by": "helm-opentelemetry", + }, + }, + } + createObjectIfNotExists(t, "test-delete-collector", &existing) + exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + err = deleteServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + assert.NoError(t, err) + + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + + }) + +} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index af41e0b39..d2469ad44 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -22,10 +22,12 @@ import ( "testing" "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" @@ -94,6 +96,15 @@ func params() Params { UID: instanceUID, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, Replicas: &replicas, Config: ` receivers: From b194e05284bfc58fc393ea24561bd3f9dc94e400 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 12:15:08 +0200 Subject: [PATCH 0187/1234] Bump crazy-max/ghaction-docker-meta from v2.4.0 to v2.5.0 (#269) Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.4.0 to v2.5.0. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Changelog](https://github.com/crazy-max/ghaction-docker-meta/blob/master/CHANGELOG.md) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.4.0...f02d9f4f9bdea946298d7cf0a0567c289af7bbda) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index c49202ac4..2d44ca00c 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.4.0 + uses: crazy-max/ghaction-docker-meta@v2.5.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From a936c6858a2ebc4540c8d27f45a8bc7fce287e0c Mon Sep 17 00:00:00 2001 From: Chase <80980072+chasekiefer@users.noreply.github.com> Date: Mon, 10 May 2021 05:17:39 -0500 Subject: [PATCH 0188/1234] Update to collector v0.25.0 (#267) --- CHANGELOG.md | 4 ++++ versions.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7af3b9448..962b43d6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.25.0 (2021-05-06) +------------------- +* Bumped OpenTelemetry Collector to v0.25.0 + 0.24.0 (2021-04-20) ------------------- * Bumped OpenTelemetry Collector to v0.24.0 ([#251](https://github.com/open-telemetry/opentelemetry-operator/pull/251), [@jnodorp-jaconi](https://github.com/jnodorp-jaconi)) diff --git a/versions.txt b/versions.txt index a7fa68ac4..17b345705 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.24.0 +opentelemetry-collector=0.25.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.24.0 +operator=0.25.0 From 14c2e4743cf871e7f3b4e79235e90aa15ff77640 Mon Sep 17 00:00:00 2001 From: Iris Song <73505006+IrisTuntun@users.noreply.github.com> Date: Tue, 11 May 2021 01:37:40 -0700 Subject: [PATCH 0189/1234] Add StatefulSet support in OpenTelemetry Operator (#265) * Add StatefulSet mode and volumeClaimTemplates * Add unit tests for StatefulSet * Fix bug in unit test * Fix metadata bug and add tests for volumeclaims * Get rid of local changes * Add StatefulSet mode and volumeClaimTemplates * Add unit tests for StatefulSet * Fix bug in unit test * Fix metadata bug and add tests for volumeclaims * Get rid of local changes * Add statefulset reconcile test and controller test * Add kuttl test for statefulset * Add a line at the end * Change default access mode of inital volume claim to ReadWriteOnce * Make edits from the comments on naming * Change accessmode to ReadWriteOnce in volumeclaim test * Change to readwriteonce in statefulset_test too * Fix volumeclaim function and small bugs * Add readyReplicas assertions * Add validation in webhook to ensure volumeClaimTemplates is only used in statefulsets Co-authored-by: Huy Vo --- Makefile | 6 +- api/v1alpha1/mode.go | 5 +- api/v1alpha1/opentelemetrycollector_types.go | 8 +- .../opentelemetrycollector_webhook.go | 12 +- api/v1alpha1/zz_generated.deepcopy.go | 7 + ...ntelemetry.io_opentelemetrycollectors.yaml | 254 +++++++++++++++++- config/rbac/role.yaml | 12 + config/webhook/manifests.yaml | 21 +- .../opentelemetrycollector_controller.go | 6 + .../opentelemetrycollector_controller_test.go | 93 +++++++ go.mod | 1 + go.sum | 38 +++ internal/podinjector/main.go | 2 +- pkg/collector/container.go | 5 + pkg/collector/reconcile/statefulset.go | 135 ++++++++++ pkg/collector/reconcile/statefulset_test.go | 135 ++++++++++ pkg/collector/statefulset.go | 63 +++++ pkg/collector/statefulset_test.go | 123 +++++++++ pkg/collector/volumeclaim.go | 56 ++++ pkg/collector/volumeclaim_test.go | 116 ++++++++ tests/e2e/smoke-statefulset/00-assert.yaml | 7 + tests/e2e/smoke-statefulset/00-install.yaml | 20 ++ tests/e2e/statefulset-features/00-assert.yaml | 41 +++ .../e2e/statefulset-features/00-install.yaml | 34 +++ 24 files changed, 1181 insertions(+), 19 deletions(-) create mode 100644 pkg/collector/reconcile/statefulset.go create mode 100644 pkg/collector/reconcile/statefulset_test.go create mode 100644 pkg/collector/statefulset.go create mode 100644 pkg/collector/statefulset_test.go create mode 100644 pkg/collector/volumeclaim.go create mode 100644 pkg/collector/volumeclaim_test.go create mode 100644 tests/e2e/smoke-statefulset/00-assert.yaml create mode 100644 tests/e2e/smoke-statefulset/00-install.yaml create mode 100644 tests/e2e/statefulset-features/00-assert.yaml create mode 100644 tests/e2e/statefulset-features/00-install.yaml diff --git a/Makefile b/Makefile index d6b755068..245d6072a 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) -CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" +CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false,generateEmbeddedObjectMeta=true" # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -113,7 +113,7 @@ container-push: docker push ${IMG} cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.1.1/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager @@ -127,7 +127,7 @@ ifeq (, $(shell which controller-gen)) CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ cd $$CONTROLLER_GEN_TMP_DIR ;\ go mod init tmp ;\ - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\ + go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0-beta.0 ;\ rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ } CONTROLLER_GEN=$(GOBIN)/controller-gen diff --git a/api/v1alpha1/mode.go b/api/v1alpha1/mode.go index 16929a6c5..37747e73f 100644 --- a/api/v1alpha1/mode.go +++ b/api/v1alpha1/mode.go @@ -16,7 +16,7 @@ package v1alpha1 type ( // Mode represents how the collector should be deployed (deployment vs. daemonset) - // +kubebuilder:validation:Enum=daemonset;deployment;sidecar + // +kubebuilder:validation:Enum=daemonset;deployment;sidecar;statefulset Mode string ) @@ -29,4 +29,7 @@ const ( // ModeSidecar specifies that the collector should be deployed as a sidecar to pods. ModeSidecar Mode = "sidecar" + + // ModeStatefulSet specifies that the collector should be deployed as a Kubernetes StatefulSet. + ModeStatefulSet Mode = "statefulset" ) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 604a14057..826316c42 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -41,7 +41,7 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` - // Mode represents how the collector should be deployed (deployment, daemonset or sidecar) + // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode Mode `json:"mode,omitempty"` @@ -51,6 +51,12 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ServiceAccount string `json:"serviceAccount,omitempty"` + // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. + // +optional + // +listType=atomic + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` + // VolumeMounts represents the mount points to use in the underlying collector deployment(s) // +optional // +listType=atomic diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index 0a51b0788..061dd3745 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -15,6 +15,8 @@ package v1alpha1 import ( + "errors" + "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -30,7 +32,7 @@ func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error Complete() } -// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io +// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 var _ webhook.Defaulter = &OpenTelemetryCollector{} @@ -50,19 +52,25 @@ func (r *OpenTelemetryCollector) Default() { opentelemetrycollectorlog.Info("default", "name", r.Name) } -// +kubebuilder:webhook:verbs=create;update;delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollector.kb.io +// +kubebuilder:webhook:verbs=create;update;delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &OpenTelemetryCollector{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateCreate() error { opentelemetrycollectorlog.Info("validate create", "name", r.Name) + if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { + return errors.New("Can only specify VolumeClaimTemplates for statefulsets") + } return nil } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error { opentelemetrycollectorlog.Info("validate update", "name", r.Name) + if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { + return errors.New("Can only specify VolumeClaimTemplates for statefulsets") + } return nil } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 0afdc20e3..3d7374db0 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -97,6 +97,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]v1.VolumeMount, len(*in)) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 5c220111c..d4cd28094 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.6.0-beta.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -174,11 +174,12 @@ spec: type: string mode: description: Mode represents how the collector should be deployed - (deployment, daemonset or sidecar) + (deployment, daemonset, statefulset or sidecar) enum: - daemonset - deployment - sidecar + - statefulset type: string ports: description: Ports allows a set of ports to be exposed by the underlying @@ -222,6 +223,7 @@ spec: format: int32 type: integer protocol: + default: TCP description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. type: string @@ -278,6 +280,237 @@ spec: description: ServiceAccount indicates the name of an existing service account to use with this instance. type: string + volumeClaimTemplates: + description: VolumeClaimTemplates will provide stable storage using + PersistentVolumes. Only available when the mode=statefulset. + items: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'Spec defines the desired characteristics of a + volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the desired access modes + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) * An existing + custom resource that implements data population (Alpha) + In order to use custom resource types that implement data + population, the AnyVolumeDataSource feature gate must + be enabled. If the provisioner or an external controller + can support the specified data source, it will create + a new volume based on the contents of the specified data + source.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + selector: + description: A label query over volumes to consider for + binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not + included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the + PersistentVolume backing this claim. + type: string + type: object + status: + description: 'Status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the actual access modes + the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Represents the actual resources of the underlying + volume. + type: object + conditions: + description: Current Condition of persistent volume claim. + If underlying persistent volume is being resized then + the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contails details + about state of pvc + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned + from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details + about last transition. + type: string + reason: + description: Unique, this should be a short, machine + understandable string that gives the reason for + condition's last transition. If it reports "ResizeStarted" + that means the underlying persistent volume is being + resized. + type: string + status: + type: string + type: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: Phase represents the current phase of PersistentVolumeClaim. + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic volumeMounts: description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) @@ -750,6 +983,23 @@ spec: description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string type: object spec: description: The specification for the PersistentVolumeClaim. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cceb866b1..cebff2bba 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -80,6 +80,18 @@ rules: - patch - update - watch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - coordination.k8s.io resources: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 264a09bc2..d4e9130a8 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -6,8 +6,10 @@ metadata: creationTimestamp: null name: mutating-webhook-configuration webhooks: -- clientConfig: - caBundle: Cg== +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: service: name: webhook-service namespace: system @@ -24,10 +26,11 @@ webhooks: - UPDATE resources: - opentelemetrycollectors - admissionReviewVersions: ["v1","v1beta1"] sideEffects: None -- clientConfig: - caBundle: Cg== +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: service: name: webhook-service namespace: system @@ -44,7 +47,6 @@ webhooks: - UPDATE resources: - pods - admissionReviewVersions: ["v1","v1beta1"] sideEffects: None --- @@ -54,8 +56,10 @@ metadata: creationTimestamp: null name: validating-webhook-configuration webhooks: -- clientConfig: - caBundle: Cg== +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: service: name: webhook-service namespace: system @@ -73,5 +77,4 @@ webhooks: - DELETE resources: - opentelemetrycollectors - admissionReviewVersions: ["v1","v1beta1"] sideEffects: None diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 9a055a00c..27a54ff62 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -89,6 +89,11 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { reconcile.DaemonSets, true, }, + { + "stateful sets", + reconcile.StatefulSets, + true, + }, { "opentelemetry", reconcile.Self, @@ -169,5 +174,6 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er Owns(&corev1.Service{}). Owns(&appsv1.Deployment{}). Owns(&appsv1.DaemonSet{}). + Owns(&appsv1.StatefulSet{}). Complete(r) } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 8a0944812..7f2d20390 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -114,6 +114,99 @@ func TestNewObjectsOnReconciliation(t *testing.T) { // attention! we expect daemonsets to be empty in the default configuration assert.Empty(t, list.Items) } + { + list := &appsv1.StatefulSetList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + // attention! we expect statefulsets to be empty in the default configuration + assert.Empty(t, list.Items) + } + + // cleanup + require.NoError(t, k8sClient.Delete(context.Background(), created)) + +} + +func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { + // prepare + cfg := config.New() + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Config: cfg, + }) + created := &v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + }, + } + err := k8sClient.Create(context.Background(), created) + require.NoError(t, err) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(context.Background(), req) + + // verify + require.NoError(t, err) + + // the base query for the underlying objects + opts := []client.ListOption{ + client.InNamespace(nsn.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + // verify that we have at least one object for each of the types we create + // whether we have the right ones is up to the specific tests for each type + { + list := &corev1.ConfigMapList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceAccountList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &appsv1.StatefulSetList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &appsv1.DeploymentList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + // attention! we expect deployments to be empty when starting in the statefulset mode. + assert.Empty(t, list.Items) + } + { + list := &appsv1.DaemonSetList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + // attention! we expect daemonsets to be empty when starting in the statefulset mode. + assert.Empty(t, list.Items) + } // cleanup require.NoError(t, k8sClient.Delete(context.Background(), created)) diff --git a/go.mod b/go.mod index 5330beee7..43da45724 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( k8s.io/client-go v0.20.5 k8s.io/kubectl v0.20.5 sigs.k8s.io/controller-runtime v0.8.3 + sigs.k8s.io/kind v0.10.0 // indirect ) replace ( diff --git a/go.sum b/go.sum index 0d43acb9e..401c09c62 100644 --- a/go.sum +++ b/go.sum @@ -41,13 +41,18 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alessio/shellescape v1.2.2 h1:8LnL+ncxhWT2TR00dfJRT25JWWrhkMZXneHVWnetDZg= +github.com/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -70,6 +75,7 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -99,6 +105,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= +github.com/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -123,11 +131,15 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -194,6 +206,7 @@ github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwu github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -228,7 +241,9 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -253,13 +268,17 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= @@ -304,6 +323,8 @@ github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -353,6 +374,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -360,6 +383,7 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -375,8 +399,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -456,6 +482,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -470,6 +497,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -510,6 +538,7 @@ golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -518,6 +547,8 @@ golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200928205150-006507a75852/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -536,6 +567,7 @@ golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjTo golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -622,6 +654,7 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -681,6 +714,7 @@ k8s.io/api v0.20.5 h1:zsMTffV0Le2EiI0aKvlTHEnXGxk1HiqGRhJcCPiI7JI= k8s.io/api v0.20.5/go.mod h1:FQjAceXnVaWDeov2YUWhOb6Yt+5UjErkp6UO3nczO1Y= k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.5 h1:wO/FxMVRn223rAKxnBbwCyuN96bS9MFTIvP0e/V7cps= @@ -704,6 +738,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kubectl v0.20.5 h1:/wndy8hw5TsL8G8KWPDJrtPKS8D34uSdWS0BMRmtzWs= @@ -718,7 +753,10 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.8.3 h1:GMHvzjTmaWHQB8HadW+dIvBoJuLvZObYJ5YoZruPRao= sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= +sigs.k8s.io/kind v0.10.0 h1:Tm+QITIqdRd+efLOsxZHMAfLnr5K4e3/RH8MePspEXs= +sigs.k8s.io/kind v0.10.0/go.mod h1:fb32zUw7ewC47bPwLnwhf47wd/vADtv3c38KP7sjIlo= sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index 3a2d0056d..e9d99473c 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -39,7 +39,7 @@ var ( ErrInstanceNotSidecar = errors.New("the OpenTelemetry Collector's mode is not set to sidecar") ) -// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io +// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 // +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 8646e3343..3384b0b8e 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -56,6 +56,11 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if len(otelcol.Spec.VolumeMounts) > 0 { volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) + } else if otelcol.Spec.Mode == "statefulset" { + volumeMounts = append(volumeMounts, corev1.VolumeMount{ + Name: "default-volume", + MountPath: "/usr/share/default-volume", + }) } var envVars = otelcol.Spec.Env diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go new file mode 100644 index 000000000..046858698 --- /dev/null +++ b/pkg/collector/reconcile/statefulset.go @@ -0,0 +1,135 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// +kubebuilder:rbac:groups="apps",resources=statefulsets,verbs=get;list;watch;create;update;patch;delete + +// StatefulSets reconciles the stateful set(s) required for the instance in the current context. +func StatefulSets(ctx context.Context, params Params) error { + + desired := []appsv1.StatefulSet{} + if params.Instance.Spec.Mode == "statefulset" { + desired = append(desired, collector.StatefulSet(params.Config, params.Log, params.Instance)) + } + + // first, handle the create/update parts + if err := expectedStatefulSets(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected stateful sets: %v", err) + } + + // then, delete the extra objects + if err := deleteStatefulSets(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the stateful sets to be deleted: %v", err) + } + + return nil +} + +func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1.StatefulSet) error { + for _, obj := range expected { + desired := obj + + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } + + existing := &appsv1.StatefulSet{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.Spec = desired.Spec + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + patch := client.MergeFrom(existing) + if err := params.Client.Patch(ctx, updated, patch); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) + } + + return nil +} + +func deleteStatefulSets(ctx context.Context, params Params, expected []appsv1.StatefulSet) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &appsv1.StatefulSetList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/statefulset_test.go b/pkg/collector/reconcile/statefulset_test.go new file mode 100644 index 000000000..4a0de27f2 --- /dev/null +++ b/pkg/collector/reconcile/statefulset_test.go @@ -0,0 +1,135 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExpectedStatefulsets(t *testing.T) { + param := params() + expectedSs := collector.StatefulSet(param.Config, logger, param.Instance) + + t.Run("should create StatefulSet", func(t *testing.T) { + err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + assert.NoError(t, err) + + actual := v1.StatefulSet{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(2), *actual.Spec.Replicas) + + }) + t.Run("should update statefulset", func(t *testing.T) { + createObjectIfNotExists(t, "test-collector", &expectedSs) + err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + assert.NoError(t, err) + + actual := v1.StatefulSet{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + }) + + t.Run("should delete statefulset", func(t *testing.T) { + + labels := map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + } + ds := v1.StatefulSet{} + ds.Name = "dummy" + ds.Namespace = "default" + ds.Labels = labels + ds.Spec = v1.StatefulSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + + createObjectIfNotExists(t, "dummy", &ds) + + err := deleteStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + assert.NoError(t, err) + + actual := v1.StatefulSet{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.False(t, exists) + + }) + + t.Run("should not delete statefulset", func(t *testing.T) { + + labels := map[string]string{ + "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", + } + ds := v1.StatefulSet{} + ds.Name = "dummy" + ds.Namespace = "default" + ds.Labels = labels + ds.Spec = v1.StatefulSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{ + Name: "dummy", + Image: "busybox", + }}, + }, + }, + } + + createObjectIfNotExists(t, "dummy", &ds) + + err := deleteStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + assert.NoError(t, err) + + actual := v1.StatefulSet{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) + + assert.True(t, exists) + + }) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go new file mode 100644 index 000000000..ba6bca10f --- /dev/null +++ b/pkg/collector/statefulset.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// StatefulSet builds the statefulset for the given instance. +func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.StatefulSet { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + + annotations := Annotations(otelcol) + + return appsv1.StatefulSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Collector(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: annotations, + }, + Spec: appsv1.StatefulSetSpec{ + ServiceName: naming.Service(otelcol), + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), + }, + }, + Replicas: otelcol.Spec.Replicas, + PodManagementPolicy: "Parallel", + VolumeClaimTemplates: VolumeClaimTemplates(cfg, otelcol), + }, + } +} diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go new file mode 100644 index 000000000..88c6206ad --- /dev/null +++ b/pkg/collector/statefulset_test.go @@ -0,0 +1,123 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestStatefulSetNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "statefulset", + }, + } + cfg := config.New() + + // test + ss := StatefulSet(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", ss.Name) + assert.Equal(t, "my-instance-collector", ss.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", ss.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", ss.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", ss.Annotations["prometheus.io/path"]) + + assert.Len(t, ss.Spec.Template.Spec.Containers, 1) + + // none of the default annotations should propagate down to the pod + assert.Empty(t, ss.Spec.Template.Annotations) + + // the pod selector should match the pod spec's labels + assert.Equal(t, ss.Spec.Selector.MatchLabels, ss.Spec.Template.Labels) + + // assert correct service name + assert.Equal(t, "my-instance-collector", ss.Spec.ServiceName) + + // assert correct pod management policy + assert.Equal(t, appsv1.ParallelPodManagement, ss.Spec.PodManagementPolicy) +} + +func TestStatefulSetReplicas(t *testing.T) { + // prepare + replicaInt := int32(3) + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "statefulset", + Replicas: &replicaInt, + }, + } + cfg := config.New() + + // test + ss := StatefulSet(cfg, logger, otelcol) + + // assert correct number of replicas + assert.Equal(t, int32(3), *ss.Spec.Replicas) +} + +func TestStatefulSetVolumeClaimTemplates(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "statefulset", + VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "added-volume", + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, + }, + }, + }}, + }, + } + cfg := config.New() + + // test + ss := StatefulSet(cfg, logger, otelcol) + + // assert correct pvc name + assert.Equal(t, "added-volume", ss.Spec.VolumeClaimTemplates[0].Name) + + // assert correct pvc access mode + assert.Equal(t, corev1.PersistentVolumeAccessMode("ReadWriteOnce"), ss.Spec.VolumeClaimTemplates[0].Spec.AccessModes[0]) + + // assert correct pvc storage + assert.Equal(t, resource.MustParse("1Gi"), ss.Spec.VolumeClaimTemplates[0].Spec.Resources.Requests["storage"]) +} diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go new file mode 100644 index 000000000..421d71ce9 --- /dev/null +++ b/pkg/collector/volumeclaim.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package collector handles the OpenTelemetry Collector. +package collector + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +// VolumeClaimTemplates builds the volumeClaimTemplates for the given instance, +// including the config map volume mount. +func VolumeClaimTemplates(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.PersistentVolumeClaim { + + var volumeClaimTemplates []corev1.PersistentVolumeClaim + + if otelcol.Spec.Mode != "statefulset" { + return volumeClaimTemplates + } + + // Add all user specified claims or use default. + if len(otelcol.Spec.VolumeClaimTemplates) > 0 { + volumeClaimTemplates = append(volumeClaimTemplates, + otelcol.Spec.VolumeClaimTemplates...) + } else { + volumeClaimTemplates = []corev1.PersistentVolumeClaim{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default-volume", + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{"storage": resource.MustParse("50Mi")}, + }, + }, + }} + } + + return volumeClaimTemplates +} diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go new file mode 100644 index 000000000..7f17c285a --- /dev/null +++ b/pkg/collector/volumeclaim_test.go @@ -0,0 +1,116 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestVolumeClaimNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "statefulset", + }, + } + cfg := config.New() + + // test + volumeClaims := VolumeClaimTemplates(cfg, otelcol) + + // verify + assert.Len(t, volumeClaims, 1) + + // check that it's the initial-volume + assert.Equal(t, "default-volume", volumeClaims[0].Name) + + // check the access mode is correct + assert.Equal(t, corev1.PersistentVolumeAccessMode("ReadWriteOnce"), volumeClaims[0].Spec.AccessModes[0]) + + //check the storage is correct + assert.Equal(t, resource.MustParse("50Mi"), volumeClaims[0].Spec.Resources.Requests["storage"]) +} + +func TestVolumeClaimAllowsUserToAdd(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "statefulset", + VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "added-volume", + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, + }, + }, + }}, + }, + } + cfg := config.New() + + // test + volumeClaims := VolumeClaimTemplates(cfg, otelcol) + + // verify that volume claim replaces + assert.Len(t, volumeClaims, 1) + + // check that it's the added volume + assert.Equal(t, "added-volume", volumeClaims[0].Name) + + // check the access mode is correct + assert.Equal(t, corev1.PersistentVolumeAccessMode("ReadWriteOnce"), volumeClaims[0].Spec.AccessModes[0]) + + //check the storage is correct + assert.Equal(t, resource.MustParse("1Gi"), volumeClaims[0].Spec.Resources.Requests["storage"]) +} + +func TestVolumeClaimChecksForStatefulset(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: "daemonset", + VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "added-volume", + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, + }, + }, + }}, + }, + } + cfg := config.New() + + // test + volumeClaims := VolumeClaimTemplates(cfg, otelcol) + + // verify that volume claim replaces + assert.Len(t, volumeClaims, 0) +} diff --git a/tests/e2e/smoke-statefulset/00-assert.yaml b/tests/e2e/smoke-statefulset/00-assert.yaml new file mode 100644 index 000000000..05d4c0b14 --- /dev/null +++ b/tests/e2e/smoke-statefulset/00-assert.yaml @@ -0,0 +1,7 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-collector +status: + replicas: 1 + readyReplicas: 1 \ No newline at end of file diff --git a/tests/e2e/smoke-statefulset/00-install.yaml b/tests/e2e/smoke-statefulset/00-install.yaml new file mode 100644 index 000000000..99f1f3b59 --- /dev/null +++ b/tests/e2e/smoke-statefulset/00-install.yaml @@ -0,0 +1,20 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/statefulset-features/00-assert.yaml b/tests/e2e/statefulset-features/00-assert.yaml new file mode 100644 index 000000000..744ba76e2 --- /dev/null +++ b/tests/e2e/statefulset-features/00-assert.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-collector +spec: + podManagementPolicy: Parallel + template: + spec: + containers: + - args: + - --config=/conf/collector.yaml + name: otc-container + volumeMounts: + - mountPath: /conf + name: otc-internal + - mountPath: /usr/share/testvolume + name: testvolume + volumes: + - configMap: + items: + - key: collector.yaml + path: collector.yaml + name: stateful-collector + name: otc-internal + - emptyDir: {} + name: testvolume + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: testvolume + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + volumeMode: Filesystem +status: + replicas: 3 + readyReplicas: 3 diff --git a/tests/e2e/statefulset-features/00-install.yaml b/tests/e2e/statefulset-features/00-install.yaml new file mode 100644 index 000000000..695d3a378 --- /dev/null +++ b/tests/e2e/statefulset-features/00-install.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + replicas: 3 + volumes: + - name: testvolume + volumeMounts: + - name: testvolume + mountPath: /usr/share/testvolume + volumeClaimTemplates: + - metadata: + name: testvolume + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] From 8d22dd40c58143eed443fe8e9ad732a72b3db5a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 10:50:24 +0200 Subject: [PATCH 0190/1234] Bump crazy-max/ghaction-docker-meta from v2.5.0 to v3 (#270) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump crazy-max/ghaction-docker-meta from v2.5.0 to v3 Bumps [crazy-max/ghaction-docker-meta](https://github.com/crazy-max/ghaction-docker-meta) from v2.5.0 to v3. - [Release notes](https://github.com/crazy-max/ghaction-docker-meta/releases) - [Commits](https://github.com/crazy-max/ghaction-docker-meta/compare/v2.5.0...2af9c6a52b5431eea749f0e923b7503b84813f77) Signed-off-by: dependabot[bot] * Good bye crazy-max Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 2d44ca00c..575eebefe 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2.5.0 + uses: docker/metadata-action@v3 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From fc9f95bdb8ef602dc63ded9eb41f94d8b51e5e79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:32:57 +0200 Subject: [PATCH 0191/1234] Bump actions/checkout from 2 to 2.3.4 (#275) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/release.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7e174be34..7fabcc110 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -17,7 +17,7 @@ jobs: go-version: 1.15 - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Lint uses: golangci/golangci-lint-action@v2.5.2 @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7dd8573a9..89518bcad 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -18,7 +18,7 @@ jobs: go-version: 1.15 - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 575eebefe..e8ca431ac 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -13,7 +13,7 @@ jobs: name: Publish container images runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2.3.4 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db8e499bc..b0f38b8b8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.15 - - uses: actions/checkout@v1 + - uses: actions/checkout@v2.3.4 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh From 089eaf5d69b76746e97741fbcdeac742574a1bf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:33:24 +0200 Subject: [PATCH 0192/1234] Bump docker/metadata-action from 3 to 3.1.0 (#274) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 3.1.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3...v3.1.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index e8ca431ac..0247c0ae6 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v3.1.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 00b1ebbfb7353c909e4fe56bdf543a9c9854b0aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:33:50 +0200 Subject: [PATCH 0193/1234] Bump docker/setup-buildx-action from 1 to 1.3.0 (#273) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 1.3.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v1.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 0247c0ae6..2979edc53 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -41,7 +41,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v1.3.0 - name: Cache Docker layers uses: actions/cache@v2.1.5 From 6233d872687dfd521c96ca433686b8eeefc079ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:34:13 +0200 Subject: [PATCH 0194/1234] Bump docker/build-push-action from 2 to 2.4.0 (#272) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 2.4.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v2.4.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 2979edc53..f5bb223bb 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -59,7 +59,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - name: Build and push Operator image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v2.4.0 with: context: . file: ./Dockerfile From 13b793337387f43d06883868863758a1401fa600 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:34:31 +0200 Subject: [PATCH 0195/1234] Bump docker/setup-qemu-action from 1 to 1.1.0 (#271) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 1.1.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v1.1.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index f5bb223bb..6e16b37fe 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -38,7 +38,7 @@ jobs: {{major}}.{{minor}} - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v1.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1.3.0 From 463e01417c6c491f2e0fef7214ddc35571ca65cf Mon Sep 17 00:00:00 2001 From: Kelvin Lo Date: Fri, 14 May 2021 01:36:48 -0700 Subject: [PATCH 0196/1234] Update to collector v0.26.0 (#278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bump collector version * Update CHANGELOG.md Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Juraci Paixão Kröhling --- CHANGELOG.md | 4 ++++ versions.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 962b43d6c..4b701e53f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.26.0 (2021-05-12) +------------------- +* Bumped OpenTelemetry Collector to v0.26.0 + 0.25.0 (2021-05-06) ------------------- * Bumped OpenTelemetry Collector to v0.25.0 diff --git a/versions.txt b/versions.txt index 17b345705..086fdc79d 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.25.0 +opentelemetry-collector=0.26.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.25.0 +operator=0.26.0 From 92716d6d3ca79135015bcc291eca852c98305c16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 09:33:57 +0200 Subject: [PATCH 0197/1234] Bump k8s.io/kubectl from 0.20.5 to 0.21.0 (#245) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump k8s.io/kubectl from 0.20.5 to 0.21.0 Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.20.5 to 0.21.0. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.20.5...v0.21.0) Signed-off-by: dependabot[bot] * Changes to controller-gen Signed-off-by: Juraci Paixão Kröhling * Use go 1.16 Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- Makefile | 14 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 36 +- go.mod | 13 +- go.sum | 376 +++++++++++++----- 7 files changed, 302 insertions(+), 143 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7fabcc110..7fc5fc1b7 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Check out code into the Go module directory uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 89518bcad..25ef70d5b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - name: Check out code into the Go module directory uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b0f38b8b8..c7b638dd4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.16 - uses: actions/checkout@v2.3.4 diff --git a/Makefile b/Makefile index 245d6072a..d77cfa8d5 100644 --- a/Makefile +++ b/Makefile @@ -123,12 +123,7 @@ cert-manager: controller-gen: ifeq (, $(shell which controller-gen)) @{ \ - set -e ;\ - CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ - cd $$CONTROLLER_GEN_TMP_DIR ;\ - go mod init tmp ;\ - go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0-beta.0 ;\ - rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ + go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0-beta.0 ;\ } CONTROLLER_GEN=$(GOBIN)/controller-gen else @@ -138,12 +133,7 @@ endif kustomize: ifeq (, $(shell which kustomize)) @{ \ - set -e ;\ - KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\ - cd $$KUSTOMIZE_GEN_TMP_DIR ;\ - go mod init tmp ;\ - go get sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\ - rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\ + go install sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\ } KUSTOMIZE=$(GOBIN)/kustomize else diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index d4cd28094..2a43e669d 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -261,7 +261,7 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object requests: additionalProperties: @@ -273,7 +273,7 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceAccount: @@ -369,7 +369,7 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of - compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object requests: additionalProperties: @@ -382,7 +382,7 @@ spec: of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined - value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: @@ -936,14 +936,14 @@ spec: type: object ephemeral: description: "Ephemeral represents a volume that is handled - by a cluster storage driver (Alpha feature). The volume's - lifecycle is tied to the pod that defines it - it will be - created before the pod starts, and deleted when the pod is - removed. \n Use this if: a) the volume is only needed while - the pod runs, b) features of normal volumes like restoring - from snapshot or capacity tracking are needed, c) the storage - driver is specified through a storage class, and d) the storage - driver supports dynamic volume provisioning through a PersistentVolumeClaim + by a cluster storage driver. The volume's lifecycle is tied + to the pod that defines it - it will be created before the + pod starts, and deleted when the pod is removed. \n Use this + if: a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity + \ tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver supports + dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific @@ -952,12 +952,10 @@ spec: volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent - volumes at the same time." + volumes at the same time. \n This is a beta feature and only + available when the GenericEphemeralVolume feature gate is + enabled." properties: - readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). - type: boolean volumeClaimTemplate: description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource @@ -1056,7 +1054,7 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object requests: additionalProperties: @@ -1070,7 +1068,7 @@ spec: is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: - https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: diff --git a/go.mod b/go.mod index 43da45724..1415a1a0d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.15 +go 1.16 require ( github.com/Masterminds/semver/v3 v3.1.1 @@ -8,12 +8,11 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.20.5 - k8s.io/apimachinery v0.20.5 - k8s.io/client-go v0.20.5 - k8s.io/kubectl v0.20.5 - sigs.k8s.io/controller-runtime v0.8.3 - sigs.k8s.io/kind v0.10.0 // indirect + k8s.io/api v0.21.0 + k8s.io/apimachinery v0.21.0 + k8s.io/client-go v0.21.0 + k8s.io/kubectl v0.21.0 + sigs.k8s.io/controller-runtime v0.9.0-beta.1 ) replace ( diff --git a/go.sum b/go.sum index 401c09c62..f3f3c03ee 100644 --- a/go.sum +++ b/go.sum @@ -25,37 +25,48 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alessio/shellescape v1.2.2 h1:8LnL+ncxhWT2TR00dfJRT25JWWrhkMZXneHVWnetDZg= -github.com/alessio/shellescape v1.2.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -63,6 +74,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -72,8 +85,10 @@ github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -84,8 +99,11 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -93,60 +111,104 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.1.0 h1:B0aXl1o/1cP8NbviYiBMkcHBtUjIJ1/Ccg6b+SwCLQg= -github.com/evanphx/json-patch/v5 v5.1.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.3.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -173,8 +235,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= -github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -195,6 +256,7 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= @@ -202,9 +264,12 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1 h1:A8Yhf6EtqTv9RMsU6MQTyrtV1TjWlR6xU9BsZIwuTCM= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.4 h1:ynbQIWjLw7iv6HAFdixb30U7Uvcmx+f4KlLJpmhkTK0= +github.com/googleapis/gnostic v0.5.4/go.mod h1:TRWw1s4gxBGjSe301Dai3c7wXJAZy57+/6tawkOvqHQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -215,7 +280,9 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -226,6 +293,7 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -237,49 +305,58 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10 h1:6q5mVkdH/vYmqngx7kZQTjJ5HRsx+ImorDIEQ+beJgc= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -293,89 +370,134 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= +github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= +github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -386,6 +508,9 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -397,46 +522,64 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -467,18 +610,22 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ= +golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -497,9 +644,12 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -512,6 +662,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -519,8 +670,10 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -532,26 +685,35 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200928205150-006507a75852/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -563,13 +725,14 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -580,6 +743,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -597,6 +761,7 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -606,8 +771,11 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054 h1:HHeAlu5H9b71C+Fx0K+1dGgVFN1DM1/wz4aoGOA5qS8= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -615,6 +783,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -626,17 +795,19 @@ google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -651,12 +822,17 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -674,11 +850,13 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -687,11 +865,13 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -699,8 +879,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -708,57 +889,48 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/api v0.20.5 h1:zsMTffV0Le2EiI0aKvlTHEnXGxk1HiqGRhJcCPiI7JI= -k8s.io/api v0.20.5/go.mod h1:FQjAceXnVaWDeov2YUWhOb6Yt+5UjErkp6UO3nczO1Y= -k8s.io/apiextensions-apiserver v0.20.1 h1:ZrXQeslal+6zKM/HjDXLzThlz/vPSxrfK3OqL8txgVQ= -k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.5 h1:wO/FxMVRn223rAKxnBbwCyuN96bS9MFTIvP0e/V7cps= -k8s.io/apimachinery v0.20.5/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/cli-runtime v0.20.5/go.mod h1:ihjPeQWDk7NGVIkNEvpwxA3gJvqtU+LtkDj11TvyXn4= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/client-go v0.20.5 h1:dJGtYUvFrFGjQ+GjXEIby0gZWdlAOc0xJBJqY3VyDxA= -k8s.io/client-go v0.20.5/go.mod h1:Ee5OOMMYvlH8FCZhDsacjMlCBwetbGZETwo1OA+e6Zw= -k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/code-generator v0.20.5/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.2/go.mod h1:pzFtCiwe/ASD0iV7ySMu8SYVJjCapNM9bjvk7ptpKh0= -k8s.io/component-base v0.20.5 h1:8BZQKLJGhWrxtB7kIOEejKDtAKr1HOYvB0PZNeTyLS0= -k8s.io/component-base v0.20.5/go.mod h1:l0isoBLGyQKwRoTWbPHR6jNDd3/VqQD43cNlsjddGng= -k8s.io/component-helpers v0.20.5/go.mod h1:AzTdoPj6YAN2SUfhBX/FUUU3ntfFuse03q/VMLovEsE= +k8s.io/api v0.21.0 h1:gu5iGF4V6tfVCQ/R+8Hc0h7H1JuEhzyEi9S4R5LM8+Y= +k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= +k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= +k8s.io/apimachinery v0.21.0 h1:3Fx+41if+IRavNcKOz09FwEXDBG6ORh6iMsTSelhkMA= +k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= +k8s.io/cli-runtime v0.21.0/go.mod h1:XoaHP93mGPF37MkLbjGVYqg3S1MnsFdKtiA/RZzzxOo= +k8s.io/client-go v0.21.0 h1:n0zzzJsAQmJngpC0IhgFcApZyoGXPrDIAD601HD09ag= +k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= +k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/component-base v0.21.0 h1:tLLGp4BBjQaCpS/KiuWh7m2xqvAdsxLm4ATxHSe5Zpg= +k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= +k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubectl v0.20.5 h1:/wndy8hw5TsL8G8KWPDJrtPKS8D34uSdWS0BMRmtzWs= -k8s.io/kubectl v0.20.5/go.mod h1:mlNQgyV18D4XFt5BmfSkrxQNS+arT2pXDQxxnH5lMiw= -k8s.io/metrics v0.20.5/go.mod h1:vsptOayjKWKWHvWR1vFQY++vxydzaEo/2+JC7kSDKPU= +k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg= +k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks= +k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.8.3 h1:GMHvzjTmaWHQB8HadW+dIvBoJuLvZObYJ5YoZruPRao= -sigs.k8s.io/controller-runtime v0.8.3/go.mod h1:U/l+DUopBc1ecfRZ5aviA9JDmGFQKvLf5YkZNx2e0sU= -sigs.k8s.io/kind v0.10.0 h1:Tm+QITIqdRd+efLOsxZHMAfLnr5K4e3/RH8MePspEXs= -sigs.k8s.io/kind v0.10.0/go.mod h1:fb32zUw7ewC47bPwLnwhf47wd/vADtv3c38KP7sjIlo= -sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.9.0-beta.1 h1:pmJVlNQeVMtkszjrRP59XT55Ny7+1it7ri3yyukwYTE= +sigs.k8s.io/controller-runtime v0.9.0-beta.1/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY= +sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0= +sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk= +sigs.k8s.io/kustomize/kyaml v0.10.15/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 36906af61400b90417fefed89c03a189ef70649e Mon Sep 17 00:00:00 2001 From: ruibinghao Date: Mon, 17 May 2021 03:34:47 -0400 Subject: [PATCH 0198/1234] Increase memory resource requests and limits (#280) --- config/manager/manager.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index f39a57e4d..27f8c8f4e 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -32,8 +32,8 @@ spec: resources: limits: cpu: 100m - memory: 30Mi + memory: 128Mi requests: cpu: 100m - memory: 20Mi + memory: 64Mi terminationGracePeriodSeconds: 10 From f694f32600d314928995e413dd678a628e3527cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 08:27:21 +0000 Subject: [PATCH 0199/1234] Bump sigs.k8s.io/controller-runtime from 0.9.0-beta.1 to 0.9.0-beta.2 (#281) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.0-beta.1 to 0.9.0-beta.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.0-beta.1...v0.9.0-beta.2) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 1415a1a0d..7c73c5acf 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.21.0 k8s.io/client-go v0.21.0 k8s.io/kubectl v0.21.0 - sigs.k8s.io/controller-runtime v0.9.0-beta.1 + sigs.k8s.io/controller-runtime v0.9.0-beta.2 ) replace ( diff --git a/go.sum b/go.sum index f3f3c03ee..efdde3a0a 100644 --- a/go.sum +++ b/go.sum @@ -921,8 +921,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.0-beta.1 h1:pmJVlNQeVMtkszjrRP59XT55Ny7+1it7ri3yyukwYTE= -sigs.k8s.io/controller-runtime v0.9.0-beta.1/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/controller-runtime v0.9.0-beta.2 h1:T2sG4AGBWKRsUJyEeMRsIpAdn/1Tqk+3J7KSJB4pWPo= +sigs.k8s.io/controller-runtime v0.9.0-beta.2/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY= sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0= sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk= From 398bc716ac1f33f4dc245a593f64ca435aafbc95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 May 2021 10:28:26 +0200 Subject: [PATCH 0200/1234] Bump sigs.k8s.io/controller-runtime from 0.9.0-beta.2 to 0.9.0-beta.3 (#285) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.0-beta.2 to 0.9.0-beta.3. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.0-beta.2...v0.9.0-beta.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7c73c5acf..23faf3974 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.21.0 k8s.io/client-go v0.21.0 k8s.io/kubectl v0.21.0 - sigs.k8s.io/controller-runtime v0.9.0-beta.2 + sigs.k8s.io/controller-runtime v0.9.0-beta.3 ) replace ( diff --git a/go.sum b/go.sum index efdde3a0a..d619d8def 100644 --- a/go.sum +++ b/go.sum @@ -921,8 +921,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.0-beta.2 h1:T2sG4AGBWKRsUJyEeMRsIpAdn/1Tqk+3J7KSJB4pWPo= -sigs.k8s.io/controller-runtime v0.9.0-beta.2/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/controller-runtime v0.9.0-beta.3 h1:PW2kKHg0r28TDB7EBrVLEtq5EsXgEr2eVhxFKdUQjks= +sigs.k8s.io/controller-runtime v0.9.0-beta.3/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY= sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0= sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk= From 83459924145870a677c9a1b580e56e6fc90cde41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 May 2021 12:02:43 +0200 Subject: [PATCH 0201/1234] Bump k8s.io/kubectl from 0.21.0 to 0.21.1 (#284) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.21.0 to 0.21.1. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.21.0...v0.21.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 31 ++++++++++++++++++------------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 23faf3974..86dfcd267 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.21.0 - k8s.io/apimachinery v0.21.0 - k8s.io/client-go v0.21.0 - k8s.io/kubectl v0.21.0 + k8s.io/api v0.21.1 + k8s.io/apimachinery v0.21.1 + k8s.io/client-go v0.21.1 + k8s.io/kubectl v0.21.1 sigs.k8s.io/controller-runtime v0.9.0-beta.3 ) diff --git a/go.sum b/go.sum index d619d8def..fd6bde11e 100644 --- a/go.sum +++ b/go.sum @@ -889,20 +889,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.21.0 h1:gu5iGF4V6tfVCQ/R+8Hc0h7H1JuEhzyEi9S4R5LM8+Y= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= -k8s.io/apimachinery v0.21.0 h1:3Fx+41if+IRavNcKOz09FwEXDBG6ORh6iMsTSelhkMA= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.21.1 h1:Q6XuHGlj2xc+hlMCvqyYfbv3H7SRGn2c8NycxJquDVs= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= -k8s.io/cli-runtime v0.21.0/go.mod h1:XoaHP93mGPF37MkLbjGVYqg3S1MnsFdKtiA/RZzzxOo= -k8s.io/client-go v0.21.0 h1:n0zzzJsAQmJngpC0IhgFcApZyoGXPrDIAD601HD09ag= +k8s.io/cli-runtime v0.21.1/go.mod h1:TI9Bvl8lQWZB2KqE91QLCp9AZE4l29zNFnj/x4IX4Fw= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= +k8s.io/client-go v0.21.1 h1:bhblWYLZKUu+pm50plvQF8WpY6TXdRRtcS/K9WauOj4= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= -k8s.io/component-base v0.21.0 h1:tLLGp4BBjQaCpS/KiuWh7m2xqvAdsxLm4ATxHSe5Zpg= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= -k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U= +k8s.io/component-base v0.21.1 h1:iLpj2btXbR326s/xNQWmPNGu0gaYSjzn7IN/5i28nQw= +k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA= +k8s.io/component-helpers v0.21.1/go.mod h1:FtC1flbiQlosHQrLrRUulnKxE4ajgWCGy/67fT2GRlQ= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -911,9 +916,9 @@ k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kubectl v0.21.0 h1:WZXlnG/yjcE4LWO2g6ULjFxtzK6H1TKzsfaBFuVIhNg= -k8s.io/kubectl v0.21.0/go.mod h1:EU37NukZRXn1TpAkMUoy8Z/B2u6wjHDS4aInsDzVvks= -k8s.io/metrics v0.21.0/go.mod h1:L3Ji9EGPP1YBbfm9sPfEXSpnj8i24bfQbAFAsW0NueQ= +k8s.io/kubectl v0.21.1 h1:ySEusoeSgSDSiSBncDMsNrthSa3OSlXqT4R2rf1VFTw= +k8s.io/kubectl v0.21.1/go.mod h1:PMYR88MqESuysBM/MX+Vu4JbX/50nY4d4kny+SPEI2U= +k8s.io/metrics v0.21.1/go.mod h1:pyDVLsLe++FIGDBFU80NcW4xMFsuiVTWL8Zfi7+PpNo= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -923,10 +928,10 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.9.0-beta.3 h1:PW2kKHg0r28TDB7EBrVLEtq5EsXgEr2eVhxFKdUQjks= sigs.k8s.io/controller-runtime v0.9.0-beta.3/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= -sigs.k8s.io/kustomize/api v0.8.5/go.mod h1:M377apnKT5ZHJS++6H4rQoCHmWtt6qTpp3mbe7p6OLY= -sigs.k8s.io/kustomize/cmd/config v0.9.7/go.mod h1:MvXCpHs77cfyxRmCNUQjIqCmZyYsbn5PyQpWiq44nW0= -sigs.k8s.io/kustomize/kustomize/v4 v4.0.5/go.mod h1:C7rYla7sI8EnxHE/xEhRBSHMNfcL91fx0uKmUlUhrBk= -sigs.k8s.io/kustomize/kyaml v0.10.15/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= +sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY= +sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIMgYrEDfwOeFdMK0= +sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo= +sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From 1fcd5ec4dea9b3c56367091e324bb7451046180b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 May 2021 16:27:02 +0200 Subject: [PATCH 0202/1234] Bump sigs.k8s.io/controller-runtime from 0.9.0-beta.3 to 0.9.0-beta.5 (#288) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.0-beta.3 to 0.9.0-beta.5. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.0-beta.3...v0.9.0-beta.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 86dfcd267..46d159b22 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.21.1 k8s.io/client-go v0.21.1 k8s.io/kubectl v0.21.1 - sigs.k8s.io/controller-runtime v0.9.0-beta.3 + sigs.k8s.io/controller-runtime v0.9.0-beta.5 ) replace ( diff --git a/go.sum b/go.sum index fd6bde11e..cf03fbadb 100644 --- a/go.sum +++ b/go.sum @@ -926,8 +926,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.0-beta.3 h1:PW2kKHg0r28TDB7EBrVLEtq5EsXgEr2eVhxFKdUQjks= -sigs.k8s.io/controller-runtime v0.9.0-beta.3/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/controller-runtime v0.9.0-beta.5 h1:yteq8am8lUFvlI/bfIgySMp/MqAPXiAghxX+XrMCifE= +sigs.k8s.io/controller-runtime v0.9.0-beta.5/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY= sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIMgYrEDfwOeFdMK0= sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo= From d4f9c2448b239379a7b2731f0ec1a9c820b10715 Mon Sep 17 00:00:00 2001 From: Iris Song <73505006+IrisTuntun@users.noreply.github.com> Date: Fri, 21 May 2021 04:36:59 -0700 Subject: [PATCH 0203/1234] Update to collector v0.27.0 (#290) --- CHANGELOG.md | 4 ++++ versions.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b701e53f..ccaab47f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.27.0 (2021-05-20) +------------------- +* Bumped OpenTelemetry Collector to v0.27.0 + 0.26.0 (2021-05-12) ------------------- * Bumped OpenTelemetry Collector to v0.26.0 diff --git a/versions.txt b/versions.txt index 086fdc79d..037d09a67 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.26.0 +opentelemetry-collector=0.27.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.26.0 +operator=0.27.0 From d5258c5c51f11bcddcef9a034a69d2e04a248654 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 16:20:11 +0200 Subject: [PATCH 0204/1234] Bump docker/metadata-action from 3.1.0 to 3.2.0 (#292) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.1.0...v3.2.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 6e16b37fe..6708caeb5 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.1.0 + uses: docker/metadata-action@v3.2.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 36d59730af234c2bfc4f909fa2ff8a4659b90c86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 May 2021 12:37:44 +0200 Subject: [PATCH 0205/1234] Bump docker/metadata-action from 3.2.0 to 3.3.0 (#294) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.2.0...v3.3.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 6708caeb5..f032e7c46 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.2.0 + uses: docker/metadata-action@v3.3.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 8adcf5828a546a2a3db3af40356b2340a796a658 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 10:05:51 +0200 Subject: [PATCH 0206/1234] Bump docker/setup-qemu-action from 1.1.0 to 1.2.0 (#297) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1.1.0...v1.2.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index f032e7c46..d76456a30 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -38,7 +38,7 @@ jobs: {{major}}.{{minor}} - name: Set up QEMU - uses: docker/setup-qemu-action@v1.1.0 + uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1.3.0 From eea22df56be584f7a5b3e58f2b47843dd4536f8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 10:06:29 +0200 Subject: [PATCH 0207/1234] Bump docker/build-push-action from 2.4.0 to 2.5.0 (#296) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.4.0...v2.5.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index d76456a30..f1963b1fa 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -59,7 +59,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - name: Build and push Operator image - uses: docker/build-push-action@v2.4.0 + uses: docker/build-push-action@v2.5.0 with: context: . file: ./Dockerfile From 2ba155782e61f8ae5b5add99d2790642f0fc8466 Mon Sep 17 00:00:00 2001 From: Min Xia Date: Thu, 27 May 2021 01:07:15 -0700 Subject: [PATCH 0208/1234] Remove the OTLP receiver legacy gRPC port references (#293) --- pkg/collector/parser/receiver_otlp.go | 10 ++-------- pkg/collector/parser/receiver_otlp_test.go | 5 ++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index 292df6862..5e46ac345 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -27,9 +27,8 @@ var _ ReceiverParser = &OTLPReceiverParser{} const ( parserNameOTLP = "__otlp" - defaultOTLPGRPCPort int32 = 4317 - defaultOTLPGRPCLegacyPort int32 = 55680 - defaultOTLPHTTPPort int32 = 55681 + defaultOTLPGRPCPort int32 = 4317 + defaultOTLPHTTPPort int32 = 55681 ) // OTLPReceiverParser parses the configuration for OTLP receivers. @@ -71,11 +70,6 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { Port: defaultOTLPGRPCPort, TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), }, - { - Name: portName(fmt.Sprintf("%s-grpc-legacy", o.name), defaultOTLPGRPCLegacyPort), - Port: defaultOTLPGRPCLegacyPort, - TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), // we target the official port, not the legacy - }, }, }, { diff --git a/pkg/collector/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go index c5132060e..51ca014d2 100644 --- a/pkg/collector/parser/receiver_otlp_test.go +++ b/pkg/collector/parser/receiver_otlp_test.go @@ -64,8 +64,7 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { portNumber int32 seen bool }{ - "otlp-grpc": {portNumber: 4317}, - "otlp-grpc-legacy": {portNumber: 55680}, + "otlp-grpc": {portNumber: 4317}, } // test @@ -73,7 +72,7 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { // verify assert.NoError(t, err) - assert.Len(t, ports, 2) + assert.Len(t, ports, 1) for _, port := range ports { r := expectedResults[port.Name] From d97d94ae73ee15c8e146f6287c7e7052c89c05af Mon Sep 17 00:00:00 2001 From: Thibault HENRY Date: Thu, 27 May 2021 14:40:05 +0200 Subject: [PATCH 0209/1234] Copy desired Service ports when reconciling (#299) * Copy desired Service ports when reconciling * Fix update service test --- pkg/collector/reconcile/service.go | 1 + pkg/collector/reconcile/service_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 821d39dfd..4f5f09813 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -194,6 +194,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv for k, v := range desired.ObjectMeta.Labels { updated.ObjectMeta.Labels[k] = v } + updated.Spec.Ports = desired.Spec.Ports patch := client.MergeFrom(existing) diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index dc15acb49..461f5f69a 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -22,6 +22,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -145,9 +146,10 @@ func TestExpectedServices(t *testing.T) { createObjectIfNotExists(t, "test-collector", &serviceInstance) extraPorts := v1.ServicePort{ - Name: "port-web", - Protocol: "TCP", - Port: 8080, + Name: "port-web", + Protocol: "TCP", + Port: 8080, + TargetPort: intstr.FromInt(8080), } ports := append(params().Instance.Spec.Ports, extraPorts) @@ -160,9 +162,7 @@ func TestExpectedServices(t *testing.T) { assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - // issue# https://github.com/open-telemetry/opentelemetry-operator/issues/256 - // Would uncomment once above issue is resolved - //assert.Contains(t, actual.Spec.Ports, extraPorts) + assert.Contains(t, actual.Spec.Ports, extraPorts) }) } From 2347053ea5750819029dccc53ae2ec5405792ee7 Mon Sep 17 00:00:00 2001 From: Chase <80980072+chasekiefer@users.noreply.github.com> Date: Wed, 2 Jun 2021 05:24:18 -0500 Subject: [PATCH 0210/1234] bump operator-sdk version to 1.8.0 (#301) --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c7b638dd4..a8223d919 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.6.1 + operator-sdk-version: v1.8.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" From 4ead5fe1079b6d83c5c1796ee45ef93c6f88671f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Jun 2021 12:24:38 +0200 Subject: [PATCH 0211/1234] Bump actions/cache from 2.1.5 to 2.1.6 (#300) Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index f1963b1fa..953620416 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -44,7 +44,7 @@ jobs: uses: docker/setup-buildx-action@v1.3.0 - name: Cache Docker layers - uses: actions/cache@v2.1.5 + uses: actions/cache@v2.1.6 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From 8ae4f7a539e6557e20a1629660be283e7875d14a Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 7 Jun 2021 17:45:33 +0530 Subject: [PATCH 0212/1234] Tolerations support in otelcol CRD (#302) Signed-off-by: Vineeth Pothulapati --- api/v1alpha1/opentelemetrycollector_types.go | 6 +++ .../opentelemetrycollector_webhook.go | 31 +++++++++----- api/v1alpha1/zz_generated.deepcopy.go | 7 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 40 +++++++++++++++++++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 4 ++ pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 17 +++++++- pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 4 +- 10 files changed, 100 insertions(+), 12 deletions(-) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 826316c42..48c53b6fc 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -87,6 +87,12 @@ type OpenTelemetryCollectorSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Resources v1.ResourceRequirements `json:"resources,omitempty"` + + // Toleration to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonsets, statefulsets and deployments + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Tolerations []v1.Toleration `json:"tolerations,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index 061dd3745..04b90aa2b 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -15,7 +15,7 @@ package v1alpha1 import ( - "errors" + "fmt" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" @@ -59,19 +59,13 @@ var _ webhook.Validator = &OpenTelemetryCollector{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateCreate() error { opentelemetrycollectorlog.Info("validate create", "name", r.Name) - if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { - return errors.New("Can only specify VolumeClaimTemplates for statefulsets") - } - return nil + return r.validateCRDSpec() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error { opentelemetrycollectorlog.Info("validate update", "name", r.Name) - if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { - return errors.New("Can only specify VolumeClaimTemplates for statefulsets") - } - return nil + return r.validateCRDSpec() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. @@ -79,3 +73,22 @@ func (r *OpenTelemetryCollector) ValidateDelete() error { opentelemetrycollectorlog.Info("validate delete", "name", r.Name) return nil } + +func (r *OpenTelemetryCollector) validateCRDSpec() error { + // validate volumeClaimTemplates + if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'volumeClaimTemplates'", r.Spec.Mode) + } + + // validate replicas + if (r.Spec.Mode == ModeSidecar || r.Spec.Mode == ModeDaemonSet) && r.Spec.Replicas != nil { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'replicas'", r.Spec.Mode) + } + + // validate tolerations + if r.Spec.Mode == ModeSidecar && len(r.Spec.Tolerations) > 0 { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) + } + + return nil +} diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3d7374db0..caee6f0b0 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -133,6 +133,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp } } in.Resources.DeepCopyInto(&out.Resources) + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 2a43e669d..333106088 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -280,6 +280,46 @@ spec: description: ServiceAccount indicates the name of an existing service account to use with this instance. type: string + tolerations: + description: Toleration to schedule OpenTelemetry Collector pods. + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array volumeClaimTemplates: description: VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 8d6636364..7c981ee10 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -52,6 +52,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), + Tolerations: otelcol.Spec.Tolerations, }, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 59702eece..79bf9cffd 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -31,6 +31,9 @@ func TestDaemonSetNewDefault(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Tolerations: testTolerationValues, + }, } cfg := config.New() @@ -43,6 +46,7 @@ func TestDaemonSetNewDefault(t *testing.T) { assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Equal(t, testTolerationValues, d.Spec.Template.Spec.Tolerations) assert.Len(t, d.Spec.Template.Spec.Containers, 1) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 0f0f55346..4d79a2b1c 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -53,6 +53,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), + Tolerations: otelcol.Spec.Tolerations, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 05f54e972..dea1c308c 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -17,21 +17,33 @@ package collector_test import ( "testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) +var testTolerationValues = []v1.Toleration{ + { + Key: "hii", + Value: "greeting", + Effect: "NoSchedule", + }, +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Tolerations: testTolerationValues, + }, } cfg := config.New() @@ -44,6 +56,7 @@ func TestDeploymentNewDefault(t *testing.T) { assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Equal(t, testTolerationValues, d.Spec.Template.Spec.Tolerations) assert.Len(t, d.Spec.Template.Spec.Containers, 1) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index ba6bca10f..925dc66c1 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -53,6 +53,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), + Tolerations: otelcol.Spec.Tolerations, }, }, Replicas: otelcol.Spec.Replicas, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 88c6206ad..4262a6202 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -35,7 +35,8 @@ func TestStatefulSetNewDefault(t *testing.T) { Name: "my-instance", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: "statefulset", + Mode: "statefulset", + Tolerations: testTolerationValues, }, } cfg := config.New() @@ -49,6 +50,7 @@ func TestStatefulSetNewDefault(t *testing.T) { assert.Equal(t, "true", ss.Annotations["prometheus.io/scrape"]) assert.Equal(t, "8888", ss.Annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", ss.Annotations["prometheus.io/path"]) + assert.Equal(t, testTolerationValues, ss.Spec.Template.Spec.Tolerations) assert.Len(t, ss.Spec.Template.Spec.Containers, 1) From aaabe4ef12e9e445c165f19385dfc5b431c781ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Tue, 8 Jun 2021 17:33:41 +0200 Subject: [PATCH 0213/1234] Add compatibility matrix (#304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/e2e.yaml | 11 ++++++++++- Makefile | 9 ++++++++- README.md | 21 +++++++++++++++++++++ kind-1.19.yaml | 5 +++++ kind-1.20.yaml | 5 +++++ kind-1.21.yaml | 5 +++++ kuttl-test.yaml | 13 ++++++------- 7 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 kind-1.19.yaml create mode 100644 kind-1.20.yaml create mode 100644 kind-1.21.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 25ef70d5b..72c610152 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -10,6 +10,13 @@ jobs: e2e-tests: name: End-to-end tests runs-on: ubuntu-20.04 + strategy: + matrix: + kube-version: + - "1.19" + - "1.20" + - "1.21" + steps: - name: Set up Go @@ -24,4 +31,6 @@ jobs: run: ./hack/install-kuttl.sh - name: "run tests" - run: make prepare-e2e e2e + env: + KUBE_VERSION: ${{ matrix.kube-version }} + run: make prepare-e2e e2e KUBE_VERSION=$KUBE_VERSION diff --git a/Makefile b/Makefile index d77cfa8d5..44ea9ef1e 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,9 @@ else GOTEST_OPTS=-race -v endif +KUBE_VERSION ?= 1.21 +KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml + all: manager ci: test @@ -96,7 +99,7 @@ generate: controller-gen e2e: $(KUTTL) test -prepare-e2e: kuttl set-test-image-vars set-image-controller container +prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind mkdir -p tests/_build/crds tests/_build/manifests $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ @@ -112,6 +115,10 @@ container: container-push: docker push ${IMG} +start-kind: + kind create cluster --config $(KIND_CONFIG) + kind load docker-image local/opentelemetry-operator:e2e + cert-manager: kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager diff --git a/README.md b/README.md index 5fadfa33b..f8ba9171a 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,27 @@ spec: EOF ``` +## Compatibility matrix + +### OpenTelemetry Operator vs. OpenTelemetry Collector + +The OpenTelemetry Operator follows the same versioning as the operand (OpenTelemetry Collector) up to the minor part of the version. For example, the OpenTelemetry Operator v0.18.1 tracks OpenTelemetry Collector 0.18.0. The patch part of the version indicates the patch level of the operator itself, not that of OpenTelemetry Collector. Whenever a new patch version is released for OpenTelemetry Collector, we'll release a new patch version of the operator. + +### OpenTelemetry Operator vs. Kubernetes + +We strive to be compatible with the widest range of Kubernetes versions as possible, but some changes to Kubernetes itself require us to break compatibility with older Kubernetes versions, be it because of code incompatibilities, or in the name of maintainability. + +Our promise is that we'll follow what's common practice in the Kubernetes world and support N-2 versions, based on the release date of the OpenTelemetry Operator. + +For instance, when we released v0.27.0, the latest Kubernetes version was v1.21.1. As such, the minimum version of Kubernetes we support for OpenTelemetry Operator v0.27.0 is v1.19 and we tested it with up to 1.21. + +The OpenTelemetry Operator *might* work on versions outside of the given range, but when opening new issues, please make sure to test your scenario on a supported version. + +| OpenTelemetry Operator | Kubernetes | +|------------------------|----------------------| +| v1.23 | v1.19+ | +| v1.22 | v1.18 to v1.20 | + ## Contributing and Developing Please see [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/kind-1.19.yaml b/kind-1.19.yaml new file mode 100644 index 000000000..ab3d9585c --- /dev/null +++ b/kind-1.19.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729 diff --git a/kind-1.20.yaml b/kind-1.20.yaml new file mode 100644 index 000000000..5fa94edc1 --- /dev/null +++ b/kind-1.20.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9 diff --git a/kind-1.21.yaml b/kind-1.21.yaml new file mode 100644 index 000000000..8120034b8 --- /dev/null +++ b/kind-1.21.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.21.1@sha256:80773e2069dd4a80a4929fdef050c1e463e1d5578c2cd9af3962cfbc230e1500 diff --git a/kuttl-test.yaml b/kuttl-test.yaml index 1e22a50ad..a2073cb81 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -1,14 +1,13 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite -startKIND: true crdDir: ./tests/_build/crds/ artifactsDir: ./tests/_build/artifacts/ kindContainers: -- local/opentelemetry-operator:e2e + - local/opentelemetry-operator:e2e commands: -- command: make cert-manager -- command: kubectl apply -f ./tests/_build/manifests/01-opentelemetry-operator.yaml -- command: kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system -- command: sleep 5s + - command: make cert-manager + - command: kubectl apply -f ./tests/_build/manifests/01-opentelemetry-operator.yaml + - command: kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system + - command: sleep 5s testDirs: -- ./tests/e2e/ + - ./tests/e2e/ From 9351d1ad739cc9beb4a255883cc54b42c3f9c6d0 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 9 Jun 2021 16:50:50 +0530 Subject: [PATCH 0214/1234] Add go lint rule in Makefile (#307) --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 44ea9ef1e..6e62ad82f 100644 --- a/Makefile +++ b/Makefile @@ -91,6 +91,10 @@ fmt: vet: go vet ./... +# Run go lint against code +lint: + golangci-lint run + # Generate code generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." From 2f1df9ac09144abaf630bacf695b4d2ddf98eb3f Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Wed, 9 Jun 2021 16:56:20 +0530 Subject: [PATCH 0215/1234] Update project to use operator-sdk v1.8.0 (#306) --- PROJECT | 10 +- ...-controller-manager_v1_serviceaccount.yaml | 5 + ...emetry-operator.clusterserviceversion.yaml | 33 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 1428 ++++++++++++++--- ...ntelemetry.io_opentelemetrycollectors.yaml | 1 + config/manager/kustomization.yaml | 6 + config/manager/manager.yaml | 1 + ...emetry-operator.clusterserviceversion.yaml | 3 +- config/manifests/kustomization.yaml | 2 +- config/prometheus/monitor.yaml | 4 + config/rbac/auth_proxy_role_binding.yaml | 2 +- config/rbac/kustomization.yaml | 1 + config/rbac/leader_election_role_binding.yaml | 2 +- config/rbac/role_binding.yaml | 2 +- config/rbac/service_account.yaml | 5 + .../core_v1alpha1_opentelemetrycollector.yaml | 4 - config/samples/sidecar.yaml | 4 - 17 files changed, 1236 insertions(+), 277 deletions(-) create mode 100644 bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml create mode 100644 config/rbac/service_account.yaml diff --git a/PROJECT b/PROJECT index dbd0499e5..89485dd8c 100644 --- a/PROJECT +++ b/PROJECT @@ -3,9 +3,13 @@ domain: opentelemetry.io layout: go.kubebuilder.io/v2 repo: github.com/open-telemetry/opentelemetry-operator resources: -- group: core +- + controller: true + group: core kind: OpenTelemetryCollector + path: k8s.io/api/core/v1alpha1 version: v1alpha1 -version: 2 +version: "3" plugins: - go.operator-sdk.io/v2-alpha: {} + manifests.sdk.operatorframework.io/v2: {} + scorecard.sdk.operatorframework.io/v2: {} diff --git a/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml b/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml new file mode 100644 index 000000000..bda92e5a1 --- /dev/null +++ b/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + creationTimestamp: null + name: opentelemetry-operator-controller-manager diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 6a5dc50e8..72c95d96b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -11,7 +11,7 @@ metadata: "name": "opentelemetrycollector-sample" }, "spec": { - "config": "receivers:\n jaeger:\n protocols: \n grpc:\n\nprocessors:\n queued_retry:\n\nexporters:\n logging:\n\nservice:\n pipelines:\n traces:\n receivers: [jaeger]\n processors: [queued_retry]\n exporters: [logging]\n" + "config": "receivers:\n jaeger:\n protocols: \n grpc:\n\nexporters:\n logging:\n\nservice:\n pipelines:\n traces:\n receivers: [jaeger]\n exporters: [logging]\n" } } ] @@ -21,11 +21,11 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.3.0 - operators.operatorframework.io/project_layout: go + operators.operatorframework.io/builder: operator-sdk-v1.8.0 + operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.21.0 + name: opentelemetry-operator.v0.27.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -125,6 +125,18 @@ spec: - patch - update - watch + - apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - coordination.k8s.io resources: @@ -174,7 +186,7 @@ spec: - subjectaccessreviews verbs: - create - serviceAccountName: default + serviceAccountName: opentelemetry-operator-controller-manager deployments: - name: opentelemetry-operator-controller-manager spec: @@ -194,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: controller + image: quay.io/opentelemetry/opentelemetry-operator:v0.27.0 name: manager ports: - containerPort: 9443 @@ -203,10 +215,10 @@ spec: resources: limits: cpu: 100m - memory: 30Mi + memory: 128Mi requests: cpu: 100m - memory: 20Mi + memory: 64Mi volumeMounts: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert @@ -222,6 +234,7 @@ spec: - containerPort: 8443 name: https resources: {} + serviceAccountName: opentelemetry-operator-controller-manager terminationGracePeriodSeconds: 10 volumes: - name: cert @@ -257,7 +270,7 @@ spec: verbs: - create - patch - serviceAccountName: default + serviceAccountName: opentelemetry-operator-controller-manager strategy: deployment installModes: - supported: true @@ -284,7 +297,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.21.0 + version: 0.27.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 16f499c68..b4f7d902e 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.6.0-beta.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -14,7 +14,7 @@ spec: caBundle: Cg== service: name: webhook-service - namespace: system + namespace: opentelemetry-operator-system path: /convert port: 443 conversionReviewVersions: @@ -46,13 +46,18 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -62,24 +67,37 @@ spec: args: additionalProperties: type: string - description: Args is the set of arguments to pass to the OpenTelemetry Collector binary + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary type: object config: - description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. type: string env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. items: - description: EnvVar represents an environment variable present in a Container. + description: EnvVar represents an environment variable present in + a Container. properties: name: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + description: 'Variable references $(VAR_NAME) are expanded using + the previous defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double $$, ie: + $$(VAR_NAME). Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' type: string valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. + description: Source for the environment variable's value. Cannot + be used if value is not empty. properties: configMapKeyRef: description: Selects a key of a ConfigMap. @@ -88,37 +106,49 @@ spec: description: The key to select. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or its key must be defined + description: Specify whether the ConfigMap or its key + must be defined type: boolean required: - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' properties: apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in the specified API version. + description: Path of the field to select in the specified + API version. type: string required: - fieldPath type: object resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' properties: containerName: - description: 'Container name: required for volumes, optional for env vars' + description: 'Container name: required for volumes, + optional for env vars' type: string divisor: anyOf: - type: integer - type: string - description: Specifies the output format of the exposed resources, defaults to "1" + description: Specifies the output format of the exposed + resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: @@ -131,13 +161,16 @@ spec: description: Selects a key of a secret in the pod's namespace properties: key: - description: The key of the secret to select from. Must be a valid secret key. + description: The key of the secret to select from. Must + be a valid secret key. type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or its key must be defined + description: Specify whether the Secret or its key must + be defined type: boolean required: - key @@ -148,28 +181,53 @@ spec: type: object type: array image: - description: Image indicates the container image to use for the OpenTelemetry Collector. + description: Image indicates the container image to use for the OpenTelemetry + Collector. type: string mode: - description: Mode represents how the collector should be deployed (deployment, daemonset or sidecar) + description: Mode represents how the collector should be deployed + (deployment, daemonset, statefulset or sidecar) enum: - daemonset - deployment - sidecar + - statefulset type: string ports: - description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open aditional ports that can't be inferred by the operator, + like for custom receivers. items: description: ServicePort contains information on service's port. properties: appProtocol: - description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default. + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and http://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + This is a beta field that is guarded by the ServiceAppProtocol + feature gate and enabled by default. type: string name: - description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. type: string nodePort: - description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + description: 'The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. If a value is specified, in-range, and not + in use it will be used, otherwise the operation will fail. If + not specified, a port will be allocated if this Service requires + one. If this field is specified when creating a Service which + does not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' format: int32 type: integer port: @@ -177,13 +235,22 @@ spec: format: int32 type: integer protocol: - description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. type: string targetPort: anyOf: - type: integer - type: string - description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' x-kubernetes-int-or-string: true required: - port @@ -191,34 +258,346 @@ spec: type: array x-kubernetes-list-type: atomic replicas: - description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector format: int32 type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object serviceAccount: - description: ServiceAccount indicates the name of an existing service account to use with this instance. + description: ServiceAccount indicates the name of an existing service + account to use with this instance. type: string + tolerations: + description: Toleration to schedule OpenTelemetry Collector pods. + This is only relevant to daemonsets, statefulsets and deployments + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + volumeClaimTemplates: + description: VolumeClaimTemplates will provide stable storage using + PersistentVolumes. Only available when the mode=statefulset. + items: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'Spec defines the desired characteristics of a + volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the desired access modes + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) * An existing + custom resource that implements data population (Alpha) + In order to use custom resource types that implement data + population, the AnyVolumeDataSource feature gate must + be enabled. If the provisioner or an external controller + can support the specified data source, it will create + a new volume based on the contents of the specified data + source.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: A label query over volumes to consider for + binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not + included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the + PersistentVolume backing this claim. + type: string + type: object + status: + description: 'Status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the actual access modes + the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Represents the actual resources of the underlying + volume. + type: object + conditions: + description: Current Condition of persistent volume claim. + If underlying persistent volume is being resized then + the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contails details + about state of pvc + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned + from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details + about last transition. + type: string + reason: + description: Unique, this should be a short, machine + understandable string that gives the reason for + condition's last transition. If it reports "ResizeStarted" + that means the underlying persistent volume is being + resized. + type: string + status: + type: string + type: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: Phase represents the current phase of PersistentVolumeClaim. + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic volumeMounts: - description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) items: - description: VolumeMount describes a mounting of a Volume within a container. + description: VolumeMount describes a mounting of a Volume within + a container. properties: mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. + description: Path within the container at which the volume should + be mounted. Must not contain ':'. type: string mountPropagation: - description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. type: string name: description: This must match the Name of a Volume. type: string readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. type: boolean subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath @@ -227,31 +606,49 @@ spec: type: array x-kubernetes-list-type: atomic volumes: - description: Volumes represents which volumes to use in the underlying collector deployment(s). + description: Volumes represents which volumes to use in the underlying + collector deployment(s). items: - description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. properties: awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'AWSElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' properties: fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty).' format: int32 type: integer readOnly: - description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'Specify "true" to force and set the ReadOnly + property in VolumeMounts to "true". If omitted, the default + is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: boolean volumeID: - description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'Unique ID of the persistent disk resource + in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: string required: - volumeID type: object azureDisk: - description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + description: AzureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. properties: cachingMode: description: 'Host Caching mode: None, Read Only, Read Write.' @@ -263,26 +660,35 @@ spec: description: The URI the data disk in the blob storage type: string fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string kind: - description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + description: 'Expected values Shared: multiple blob disks + per storage account Dedicated: single blob disk per storage + account Managed: azure managed data disk (only in managed + availability set). defaults to shared' type: string readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. type: boolean required: - diskName - diskURI type: object azureFile: - description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + description: AzureFile represents an Azure File Service mount + on the host and bind mount to the pod. properties: readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. type: boolean secretName: - description: the name of secret that contains Azure Storage Account Name and Key + description: the name of secret that contains Azure Storage + Account Name and Key type: string shareName: description: Share Name @@ -292,66 +698,102 @@ spec: - shareName type: object cephfs: - description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + description: CephFS represents a Ceph FS mount on the host that + shares a pod's lifetime properties: monitors: - description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'Required: Monitors is a collection of Ceph + monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' items: type: string type: array path: - description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + description: 'Optional: Used as the mounted root, rather + than the full Ceph tree, default is /' type: string readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: boolean secretFile: - description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'Optional: SecretFile is the path to key ring + for User, default is /etc/ceph/user.secret More info: + https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string secretRef: - description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'Optional: SecretRef is reference to the authentication + secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object user: - description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'Optional: User is the rados user name, default + is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string required: - monitors type: object cinder: - description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'Cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: boolean secretRef: - description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + description: 'Optional: points to a secret object containing + parameters used to connect to OpenStack.' properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object volumeID: - description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string required: - volumeID type: object configMap: - description: ConfigMap represents a configMap that should populate this volume + description: ConfigMap represents a configMap that should populate + this volume properties: defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + description: If unspecified, each key-value pair in the + Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the ConfigMap, the volume setup will error unless it is + marked optional. Paths must be relative and may not contain + the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: @@ -359,11 +801,22 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. type: string required: - key @@ -371,81 +824,132 @@ spec: type: object type: array name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or its keys must be defined + description: Specify whether the ConfigMap or its keys must + be defined type: boolean type: object csi: - description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + description: CSI (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). properties: driver: - description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + description: Driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. type: string fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + description: Filesystem type to mount. Ex. "ext4", "xfs", + "ntfs". If not provided, the empty value is passed to + the associated CSI driver which will determine the default + filesystem to apply. type: string nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + description: NodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object readOnly: - description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + description: Specifies a read-only configuration for the + volume. Defaults to false (read/write). type: boolean volumeAttributes: additionalProperties: type: string - description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + description: VolumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. type: object required: - driver type: object downwardAPI: - description: DownwardAPI represents downward API about the pod that should populate this volume + description: DownwardAPI represents downward API about the pod + that should populate this volume properties: defaultMode: - description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: description: Items is a list of downward API volume file items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field properties: fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' properties: apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". type: string fieldPath: - description: Path of the field to select in the specified API version. + description: Path of the field to select in the + specified API version. type: string required: - fieldPath type: object mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' format: int32 type: integer path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' type: string resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' properties: containerName: - description: 'Container name: required for volumes, optional for env vars' + description: 'Container name: required for volumes, + optional for env vars' type: string divisor: anyOf: - type: integer - type: string - description: Specifies the output format of the exposed resources, defaults to "1" + description: Specifies the output format of the + exposed resources, defaults to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: @@ -460,57 +964,140 @@ spec: type: array type: object emptyDir: - description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + description: 'EmptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + description: 'What type of storage medium should back this + directory. The default is "" which means to use the node''s + default medium. Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: anyOf: - type: integer - type: string - description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + description: 'Total amount of local storage required for + this EmptyDir volume. The size limit is also applicable + for memory medium. The maximum usage on memory medium + EmptyDir would be the minimum value between the SizeLimit + specified here and the sum of memory limits of all containers + in a pod. The default is nil which means that the limit + is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." + description: "Ephemeral represents a volume that is handled + by a cluster storage driver. The volume's lifecycle is tied + to the pod that defines it - it will be created before the + pod starts, and deleted when the pod is removed. \n Use this + if: a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity + \ tracking are needed, c) the storage driver is specified + through a storage class, and d) the storage driver supports + dynamic volume provisioning through a PersistentVolumeClaim + (see EphemeralVolumeSource for more information on the + connection between this volume type and PersistentVolumeClaim). + \n Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. \n Use CSI for light-weight local ephemeral + volumes if the CSI driver is meant to be used that way - see + the documentation of the driver for more information. \n A + pod can use both types of ephemeral volumes and persistent + volumes at the same time. \n This is a beta feature and only + available when the GenericEphemeralVolume feature gate is + enabled." properties: - readOnly: - description: Specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." + description: "Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. the PVC + will be deleted together with the pod. The name of the + PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. + Pod validation will reject the pod if the concatenated + name is not valid for a PVC (for example, too long). \n + An existing PVC with that name that is not owned by the + pod will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC + is meant to be used by the pod, the PVC has to updated + with an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may be useful + when manually reconstructing a broken cluster. \n This + field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. \n Required, must + not be nil." properties: metadata: - description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + description: May contain labels and annotations that + will be copied into the PVC when creating it. No other + fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string type: object spec: - description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. properties: accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + description: 'AccessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.' + description: 'This field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) * An + existing custom resource that implements data + population (Alpha) In order to use custom resource + types that implement data population, the AnyVolumeDataSource + feature gate must be enabled. If the provisioner + or an external controller can support the specified + data source, it will create a new volume based + on the contents of the specified data source.' properties: apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. type: string kind: - description: Kind is the type of resource being referenced + description: Kind is the type of resource being + referenced type: string name: - description: Name is the name of resource being referenced + description: Name is the name of resource being + referenced type: string required: - kind - name type: object resources: - description: 'Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: 'Resources represents the minimum resources + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: @@ -519,7 +1106,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object requests: additionalProperties: @@ -528,25 +1116,46 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Requests describes the minimum + amount of compute resources required. If Requests + is omitted for a container, it defaults to + Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: + https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: - description: A label query over volumes to consider for binding. + description: A label query over volumes to consider + for binding. properties: matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. properties: key: - description: key is the label key that the selector applies to. + description: key is the label key that + the selector applies to. type: string operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. type: string values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. items: type: string type: array @@ -558,17 +1167,26 @@ spec: matchLabels: additionalProperties: type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. type: object type: object storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'Name of the StorageClass required + by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. type: string volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. + description: VolumeName is the binding reference + to the PersistentVolume backing this claim. type: string type: object required: @@ -576,17 +1194,24 @@ spec: type: object type: object fc: - description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + description: FC represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + description: 'Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string lun: description: 'Optional: FC target lun number' format: int32 type: integer readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean targetWWNs: description: 'Optional: FC target worldwide names (WWNs)' @@ -594,19 +1219,26 @@ spec: type: string type: array wwids: - description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + description: 'Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' items: type: string type: array type: object flexVolume: - description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + description: FlexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. properties: driver: - description: Driver is the name of the driver to use for this volume. + description: Driver is the name of the driver to use for + this volume. type: string fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". The default filesystem depends on FlexVolume + script. type: string options: additionalProperties: @@ -614,52 +1246,85 @@ spec: description: 'Optional: Extra command options if any.' type: object readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + description: 'Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean secretRef: - description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + description: 'Optional: SecretRef is reference to the secret + object containing sensitive information to pass to the + plugin scripts. This may be empty if no secret object + is specified. If the secret object contains more than + one secret, all secrets are passed to the plugin scripts.' properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object required: - driver type: object flocker: - description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + description: Flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running properties: datasetName: - description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + description: Name of the dataset stored as metadata -> name + on the dataset for Flocker should be considered as deprecated type: string datasetUUID: - description: UUID of the dataset. This is unique identifier of a Flocker dataset + description: UUID of the dataset. This is unique identifier + of a Flocker dataset type: string type: object gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'GCEPersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' properties: fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'The partition in the volume that you want + to mount. If omitted, the default is to mount by volume + name. Examples: For volume /dev/sda1, you specify the + partition as "1". Similarly, the volume partition for + /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' format: int32 type: integer pdName: - description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'Unique name of the PD resource in GCE. Used + to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: boolean required: - pdName type: object gitRepo: - description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + description: 'GitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' properties: directory: - description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + description: Target directory name. Must not contain or + start with '..'. If '.' is supplied, the volume directory + will be the git repository. Otherwise, if specified, + the volume will contain the git repository in the subdirectory + with the given name. type: string repository: description: Repository URL @@ -671,35 +1336,51 @@ spec: - repository type: object glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + description: 'Glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' properties: endpoints: - description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + description: 'EndpointsName is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string path: - description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + description: 'Path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string readOnly: - description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + description: 'ReadOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: boolean required: - endpoints - path type: object hostPath: - description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + description: 'HostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' properties: path: - description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + description: 'Path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string type: - description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + description: 'Type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string required: - path type: object iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + description: 'ISCSI represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' properties: chapAuthDiscovery: description: whether support iSCSI Discovery CHAP authentication @@ -708,38 +1389,55 @@ spec: description: whether support iSCSI Session CHAP authentication type: boolean fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + description: Custom iSCSI Initiator Name. If initiatorName + is specified with iscsiInterface simultaneously, new iSCSI + interface : will be created + for the connection. type: string iqn: description: Target iSCSI Qualified Name. type: string iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + description: iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). type: string lun: description: iSCSI Target Lun number. format: int32 type: integer portals: - description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + description: iSCSI Target Portal List. The portal is either + an IP or ip_addr:port if the port is other than default + (typically TCP ports 860 and 3260). items: type: string type: array readOnly: - description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + description: ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. type: boolean secretRef: - description: CHAP Secret for iSCSI target and initiator authentication + description: CHAP Secret for iSCSI target and initiator + authentication properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object targetPortal: - description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + description: iSCSI Target Portal. The Portal is either an + IP or ip_addr:port if the port is other than default (typically + TCP ports 860 and 3260). type: string required: - iqn @@ -747,56 +1445,76 @@ spec: - targetPortal type: object name: - description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + description: 'Volume''s name. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string nfs: - description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + description: 'NFS represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' properties: path: - description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + description: 'Path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string readOnly: - description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + description: 'ReadOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: boolean server: - description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + description: 'Server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string required: - path - server type: object persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'PersistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'ClaimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string readOnly: - description: Will force the ReadOnly setting in VolumeMounts. Default false. + description: Will force the ReadOnly setting in VolumeMounts. + Default false. type: boolean required: - claimName type: object photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + description: PhotonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string pdID: - description: ID that identifies Photon Controller persistent disk + description: ID that identifies Photon Controller persistent + disk type: string required: - pdID type: object portworxVolume: - description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + description: PortworxVolume represents a portworx volume attached + and mounted on kubelets host machine properties: fsType: - description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + description: FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. type: boolean volumeID: description: VolumeID uniquely identifies a Portworx volume @@ -805,34 +1523,68 @@ spec: - volumeID type: object projected: - description: Items for all in one resources secrets, configmaps, and downward API + description: Items for all in one resources secrets, configmaps, + and downward API properties: defaultMode: - description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + description: Mode bits used to set permissions on created + files by default. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML accepts + both octal and decimal values, JSON requires decimal values + for mode bits. Directories within the path are not affected + by this setting. This might be in conflict with other + options that affect the file mode, like fsGroup, and the + result can be other mode bits set. format: int32 type: integer sources: description: list of volume projections items: - description: Projection that may be projected along with other supported volume types + description: Projection that may be projected along with + other supported volume types properties: configMap: - description: information about the configMap data to project + description: information about the configMap data + to project properties: items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + description: If unspecified, each key-value pair + in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. items: - description: Maps a string key to a path within a volume. + description: Maps a string key to a path within + a volume. properties: key: description: The key to project. type: string mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file. Must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. type: string required: - key @@ -840,54 +1592,89 @@ spec: type: object type: array name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string optional: - description: Specify whether the ConfigMap or its keys must be defined + description: Specify whether the ConfigMap or + its keys must be defined type: boolean type: object downwardAPI: - description: information about the downwardAPI data to project + description: information about the downwardAPI data + to project properties: items: - description: Items is a list of DownwardAPIVolume file + description: Items is a list of DownwardAPIVolume + file items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field properties: fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' properties: apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". type: string fieldPath: - description: Path of the field to select in the specified API version. + description: Path of the field to select + in the specified API version. type: string required: - fieldPath type: object mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' format: int32 type: integer path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' type: string resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' properties: containerName: - description: 'Container name: required for volumes, optional for env vars' + description: 'Container name: required + for volumes, optional for env vars' type: string divisor: anyOf: - type: integer - type: string - description: Specifies the output format of the exposed resources, defaults to "1" + description: Specifies the output format + of the exposed resources, defaults + to "1" pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true resource: - description: 'Required: resource to select' + description: 'Required: resource to + select' type: string required: - resource @@ -898,22 +1685,47 @@ spec: type: array type: object secret: - description: information about the secret data to project + description: information about the secret data to + project properties: items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + description: If unspecified, each key-value pair + in the Data field of the referenced Secret will + be projected into the volume as a file whose + name is the key and content is the value. If + specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. items: - description: Maps a string key to a path within a volume. + description: Maps a string key to a path within + a volume. properties: key: description: The key to project. type: string mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to + set permissions on this file. Must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + description: The relative path of the file + to map the key to. May not be an absolute + path. May not contain the path element + '..'. May not start with the string '..'. type: string required: - key @@ -921,24 +1733,44 @@ spec: type: object type: array name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' type: string optional: - description: Specify whether the Secret or its key must be defined + description: Specify whether the Secret or its + key must be defined type: boolean type: object serviceAccountToken: - description: information about the serviceAccountToken data to project + description: information about the serviceAccountToken + data to project properties: audience: - description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + description: Audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. The audience defaults to the identifier + of the apiserver. type: string expirationSeconds: - description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + description: ExpirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. The kubelet will + start trying to rotate the token if the token + is older than 80 percent of its time to live + or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. format: int64 type: integer path: - description: Path is the path relative to the mount point of the file to project the token into. + description: Path is the path relative to the + mount point of the file to project the token + into. type: string required: - path @@ -947,103 +1779,143 @@ spec: type: array type: object quobyte: - description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + description: Quobyte represents a Quobyte mount on the host + that shares a pod's lifetime properties: group: - description: Group to map volume access to Default is no group + description: Group to map volume access to Default is no + group type: string readOnly: - description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + description: ReadOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. type: boolean registry: - description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + description: Registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes type: string tenant: - description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + description: Tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin type: string user: - description: User to map volume access to Defaults to serivceaccount user + description: User to map volume access to Defaults to serivceaccount + user type: string volume: - description: Volume is a string that references an already created Quobyte volume by name. + description: Volume is a string that references an already + created Quobyte volume by name. type: string required: - registry - volume type: object rbd: - description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + description: 'RBD represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' properties: fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + description: 'Filesystem type of the volume that you want + to mount. Tip: Ensure that the filesystem type is supported + by the host operating system. Examples: "ext4", "xfs", + "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string image: description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string keyring: - description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string monitors: - description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'A collection of Ceph monitors. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array pool: - description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'The rados pool name. Default is rbd. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'ReadOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: boolean secretRef: - description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'SecretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object user: - description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'The rados user name. Default is admin. More + info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string required: - image - monitors type: object scaleIO: - description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + description: ScaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Default is "xfs". type: string gateway: description: The host address of the ScaleIO API Gateway. type: string protectionDomain: - description: The name of the ScaleIO Protection Domain for the configured storage. + description: The name of the ScaleIO Protection Domain for + the configured storage. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + description: SecretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object sslEnabled: - description: Flag to enable/disable SSL communication with Gateway, default false + description: Flag to enable/disable SSL communication with + Gateway, default false type: boolean storageMode: - description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + description: Indicates whether the storage for a volume + should be ThickProvisioned or ThinProvisioned. Default + is ThinProvisioned. type: string storagePool: - description: The ScaleIO Storage Pool associated with the protection domain. + description: The ScaleIO Storage Pool associated with the + protection domain. type: string system: - description: The name of the storage system as configured in ScaleIO. + description: The name of the storage system as configured + in ScaleIO. type: string volumeName: - description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + description: The name of a volume already created in the + ScaleIO system that is associated with this volume source. type: string required: - gateway @@ -1051,14 +1923,31 @@ spec: - system type: object secret: - description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + description: 'Secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' properties: defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Defaults to 0644. Directories within + the path are not affected by this setting. This might + be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits + set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + description: If unspecified, each key-value pair in the + Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: @@ -1066,11 +1955,22 @@ spec: description: The key to project. type: string mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + description: 'Optional: mode bits used to set permissions + on this file. Must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + description: The relative path of the file to map + the key to. May not be an absolute path. May not + contain the path element '..'. May not start with + the string '..'. type: string required: - key @@ -1078,46 +1978,69 @@ spec: type: object type: array optional: - description: Specify whether the Secret or its keys must be defined + description: Specify whether the Secret or its keys must + be defined type: boolean secretName: - description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + description: 'Name of the secret in the pod''s namespace + to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string type: object storageos: - description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + description: StorageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: Defaults to false (read/write). ReadOnly here + will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + description: SecretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object volumeName: - description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + description: VolumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. type: string volumeNamespace: - description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + description: VolumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name to + override the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. type: string type: object vsphereVolume: - description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + description: VsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: Filesystem type to mount. Must be a filesystem + type supported by the host operating system. Ex. "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. type: string storagePolicyID: - description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + description: Storage Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. type: string storagePolicyName: - description: Storage Policy Based Management (SPBM) profile name. + description: Storage Policy Based Management (SPBM) profile + name. type: string volumePath: description: Path that identifies vSphere volume vmdk @@ -1132,16 +2055,19 @@ spec: x-kubernetes-list-type: atomic type: object status: - description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector. properties: messages: - description: Messages about actions performed by the operator on this resource. + description: Messages about actions performed by the operator on this + resource. items: type: string type: array x-kubernetes-list-type: atomic replicas: - description: Replicas is currently not being set and might be removed in the next version. + description: Replicas is currently not being set and might be removed + in the next version. format: int32 type: integer version: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 333106088..15ce2e9b8 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -282,6 +282,7 @@ spec: type: string tolerations: description: Toleration to schedule OpenTelemetry Collector pods. + This is only relevant to daemonsets, statefulsets and deployments items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..0ff1f893e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: quay.io/opentelemetry/opentelemetry-operator + newTag: v0.27.0 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 27f8c8f4e..8045a0e44 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,4 +36,5 @@ spec: requests: cpu: 100m memory: 64Mi + serviceAccountName: controller-manager terminationGracePeriodSeconds: 10 diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index dc6e92828..5034fc39e 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -19,7 +19,8 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. displayName: OpenTelemetry Collector kind: OpenTelemetryCollector name: opentelemetrycollectors.core.opentelemetry.io diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index ec2c16556..1544af673 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,3 +1,3 @@ resources: - ../default -- ../samples +- ../samples \ No newline at end of file diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 9b8047b76..d19136ae7 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -11,6 +11,10 @@ spec: endpoints: - path: /metrics port: https + scheme: https + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + tlsConfig: + insecureSkipVerify: true selector: matchLabels: control-plane: controller-manager diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 48ed1e4b8..ec7acc0a1 100644 --- a/config/rbac/auth_proxy_role_binding.yaml +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -8,5 +8,5 @@ roleRef: name: proxy-role subjects: - kind: ServiceAccount - name: default + name: controller-manager namespace: system diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml index 66c28338f..27cb1d17f 100644 --- a/config/rbac/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -1,4 +1,5 @@ resources: +- service_account.yaml - role.yaml - role_binding.yaml - leader_election_role.yaml diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index eed16906f..1d1321ed4 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -8,5 +8,5 @@ roleRef: name: leader-election-role subjects: - kind: ServiceAccount - name: default + name: controller-manager namespace: system diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 8f2658702..2070ede44 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -8,5 +8,5 @@ roleRef: name: manager-role subjects: - kind: ServiceAccount - name: default + name: controller-manager namespace: system diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml new file mode 100644 index 000000000..00336028c --- /dev/null +++ b/config/rbac/service_account.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: controller-manager + namespace: system \ No newline at end of file diff --git a/config/samples/core_v1alpha1_opentelemetrycollector.yaml b/config/samples/core_v1alpha1_opentelemetrycollector.yaml index 1735fe3fc..bb682ad47 100644 --- a/config/samples/core_v1alpha1_opentelemetrycollector.yaml +++ b/config/samples/core_v1alpha1_opentelemetrycollector.yaml @@ -9,9 +9,6 @@ spec: protocols: grpc: - processors: - queued_retry: - exporters: logging: @@ -19,5 +16,4 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [queued_retry] exporters: [logging] diff --git a/config/samples/sidecar.yaml b/config/samples/sidecar.yaml index acac0f382..80fd12899 100644 --- a/config/samples/sidecar.yaml +++ b/config/samples/sidecar.yaml @@ -10,9 +10,6 @@ spec: protocols: grpc: - processors: - queued_retry: - exporters: logging: @@ -20,5 +17,4 @@ spec: pipelines: traces: receivers: [jaeger] - processors: [queued_retry] exporters: [logging] From f4a9504d846718eb2873353e18450b01f1e4d4ec Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Thu, 10 Jun 2021 18:08:57 +0530 Subject: [PATCH 0216/1234] Fix bundle (#311) * Removed scorecard references as we don't use it to test yet * Fix bundle metadata: correct operator-sdk version --- bundle.Dockerfile | 4 +--- bundle/metadata/annotations.yaml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 63fc4075e..1c1303516 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,10 +5,8 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.2.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.8.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 5250ce2db..fa1f80f82 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,9 +4,7 @@ annotations: operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v1.2.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.8.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go - operators.operatorframework.io.test.config.v1: tests/scorecard/ - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 operators.operatorframework.io.bundle.channel.default.v1: alpha From af398389a1936c0fef3d4e5c94685da71184b9ac Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 23 Jun 2021 20:56:45 +0530 Subject: [PATCH 0217/1234] Bumps collector to v0.28.0 (#312) --- CHANGELOG.md | 4 ++++ versions.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ccaab47f2..47ad04e3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.28.0 (2021-06-12) +------------------- +* Bumped OpenTelemetry Collector to v0.28.0 + 0.27.0 (2021-05-20) ------------------- * Bumped OpenTelemetry Collector to v0.27.0 diff --git a/versions.txt b/versions.txt index 037d09a67..0e95699a9 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.27.0 +opentelemetry-collector=0.28.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.27.0 +operator=0.28.0 From 649a2710e49ac799944f66fc88095e2e417d3401 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 17:32:00 +0200 Subject: [PATCH 0218/1234] Bump k8s.io/kubectl from 0.21.1 to 0.21.2 (#316) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.21.1 to 0.21.2. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.21.1...v0.21.2) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 34 ++++++++++++++++++---------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 46d159b22..7f5e03e57 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.21.1 - k8s.io/apimachinery v0.21.1 - k8s.io/client-go v0.21.1 - k8s.io/kubectl v0.21.1 + k8s.io/api v0.21.2 + k8s.io/apimachinery v0.21.2 + k8s.io/client-go v0.21.2 + k8s.io/kubectl v0.21.2 sigs.k8s.io/controller-runtime v0.9.0-beta.5 ) diff --git a/go.sum b/go.sum index cf03fbadb..f1bf7d880 100644 --- a/go.sum +++ b/go.sum @@ -244,8 +244,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -708,8 +709,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -890,24 +892,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= -k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c= -k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/api v0.21.2 h1:vz7DqmRsXTCSa6pNxXwQ1IYeAZgdIsua+DZU+o+SX3Y= +k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.21.1 h1:Q6XuHGlj2xc+hlMCvqyYfbv3H7SRGn2c8NycxJquDVs= -k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.21.2 h1:vezUc/BHqWlQDnZ+XkrpXSmnANSLbpnlpwo0Lhk0gpc= +k8s.io/apimachinery v0.21.2/go.mod h1:CdTY8fU/BlvAbJ2z/8kBwimGki5Zp8/fbVuLY8gJumM= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= -k8s.io/cli-runtime v0.21.1/go.mod h1:TI9Bvl8lQWZB2KqE91QLCp9AZE4l29zNFnj/x4IX4Fw= +k8s.io/cli-runtime v0.21.2/go.mod h1:8u/jFcM0QpoI28f6sfrAAIslLCXUYKD5SsPPMWiHYrI= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= -k8s.io/client-go v0.21.1 h1:bhblWYLZKUu+pm50plvQF8WpY6TXdRRtcS/K9WauOj4= -k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= +k8s.io/client-go v0.21.2 h1:Q1j4L/iMN4pTw6Y4DWppBoUxgKO8LbffEMVEV00MUp0= +k8s.io/client-go v0.21.2/go.mod h1:HdJ9iknWpbl3vMGtib6T2PyI/VYxiZfq936WNVHBRrA= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= -k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= -k8s.io/component-base v0.21.1 h1:iLpj2btXbR326s/xNQWmPNGu0gaYSjzn7IN/5i28nQw= -k8s.io/component-base v0.21.1/go.mod h1:NgzFZ2qu4m1juby4TnrmpR8adRk6ka62YdH5DkIIyKA= -k8s.io/component-helpers v0.21.1/go.mod h1:FtC1flbiQlosHQrLrRUulnKxE4ajgWCGy/67fT2GRlQ= +k8s.io/component-base v0.21.2 h1:EsnmFFoJ86cEywC0DoIkAUiEV6fjgauNugiw1lmIjs4= +k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc= +k8s.io/component-helpers v0.21.2/go.mod h1:DbyFt/A0p6Cv+R5+QOGSJ5f5t4xDfI8Yb89a57DgJlQ= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -916,9 +918,9 @@ k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kubectl v0.21.1 h1:ySEusoeSgSDSiSBncDMsNrthSa3OSlXqT4R2rf1VFTw= -k8s.io/kubectl v0.21.1/go.mod h1:PMYR88MqESuysBM/MX+Vu4JbX/50nY4d4kny+SPEI2U= -k8s.io/metrics v0.21.1/go.mod h1:pyDVLsLe++FIGDBFU80NcW4xMFsuiVTWL8Zfi7+PpNo= +k8s.io/kubectl v0.21.2 h1:9XPCetvOMDqrIZZXb1Ei+g8t6KrIp9ENJaysQjUuLiE= +k8s.io/kubectl v0.21.2/go.mod h1:PgeUclpG8VVmmQIl8zpLar3IQEpFc9mrmvlwY3CK1xo= +k8s.io/metrics v0.21.2/go.mod h1:wzlOINZMCtWq8dR9gHlyaOemmYlOpAoldEIXE82gAhI= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 4076026ffb56c37aaf72808949f8f9ee3025afbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 24 Jun 2021 09:28:58 +0200 Subject: [PATCH 0219/1234] Add v0.28.0 to the compat matrix (#321) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 5 +++-- RELEASE.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8ba9171a..7d9cdce06 100644 --- a/README.md +++ b/README.md @@ -160,8 +160,9 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| -| v1.23 | v1.19+ | -| v1.22 | v1.18 to v1.20 | +| v0.28.0 | v1.19 to v1.21 | +| v0.27.0 | v1.19 to v1.21 | +| v0.26.0 | v1.18 to v1.20 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 0a22a0bbe..43a6f54c0 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,6 +3,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. +1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! 1. Add the changes to the changelog 1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` 1. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.3.0` From 606a44272b7781a24574d5d43b7a5f70adc57a09 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 24 Jun 2021 17:17:58 +0530 Subject: [PATCH 0220/1234] Refresh go proxy module info on release (#315) --- .github/workflows/release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a8223d919..d95c45bec 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,3 +29,8 @@ jobs: env: GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} run: ./.ci/create-release-github.sh + + - name: "refresh go proxy module info on release" + run: | + OPERATOR_VERSION=$(git describe --tags) + curl https://proxy.golang.org/github.com/open-telemetry/opentelemetry-operator/@v/${OPERATOR_VERSION}.info From 2042114bef9a577453f5691954a45b1d6c991daa Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 24 Jun 2021 17:20:56 +0530 Subject: [PATCH 0221/1234] Add unit, e2e tests for args that are passed from otelcol CR spec to otelcol container args. (#314) --- README.md | 4 ++ docs/otelcol_cr_spec.md | 68 ++++++++++++++++++++++++ pkg/collector/container_test.go | 20 +++++++ tests/e2e/smoke-sidecar/00-install.yaml | 3 ++ tests/e2e/smoke-simplest/00-install.yaml | 3 ++ 5 files changed, 98 insertions(+) create mode 100644 docs/otelcol_cr_spec.md diff --git a/README.md b/README.md index 7d9cdce06..0376ecb31 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) as the only managed component. +## Documentation + +* [OpenTelemetryCollector Custom Resource Specification](./docs/otelcol_cr_spec.md) + ## Getting started To install the operator in an existing cluster, make sure you have [`cert-manager` installed](https://cert-manager.io/docs/installation/) and run: diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md new file mode 100644 index 000000000..4c6484cad --- /dev/null +++ b/docs/otelcol_cr_spec.md @@ -0,0 +1,68 @@ +# OpenTelemetryCollector Custom Resource Specification + +The below `OpenTelemetryCollector` custom resource contains all the specification that can be configured. + +``` +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: example_collector +spec: + // +optional Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) + mode: "" + + // +required Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + + // +optional Args is the set of arguments to pass to the OpenTelemetry Collector binary + args: + metrics-level: detailed + log-level: debug + + // +optional Replicas is the number of pod instances for the underlying OpenTelemetry Collector + replicas: 1 + + // +optional Image indicates the container image to use for the OpenTelemetry Collector. + image: "" + + // +optional ServiceAccount indicates the name of an existing service account to use with this instance. + serviceAccount: "" + + // +optional VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. + volumeClaimTemplates: [] + + // +optional VolumeMounts represents the mount points to use in the underlying collector deployment(s) + volumeMounts: [] + + // +optional Volumes represents which volumes to use in the underlying collector deployment(s). + volumes: [] + + // +optional Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator + // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be + // used to open aditional ports that can't be inferred by the operator, like for custom receivers. + ports: [] + + // +optional ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be + // consumed in the config file for the Collector. + env: [] + + // +optional Resources to set on the OpenTelemetry Collector pods. + resources: {} + + // +optional Toleration to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonsets, statefulsets and deployments + tolerations: [] +``` \ No newline at end of file diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 7315ffa29..172d13c13 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -176,3 +176,23 @@ func TestContainerDefaultResourceRequirements(t *testing.T) { // verify assert.Empty(t, c.Resources) } + +func TestContainerArgs(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "metrics-level": "detailed", + "log-level": "debug", + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Contains(t, c.Args, "--metrics-level=detailed") + assert.Contains(t, c.Args, "--log-level=debug") +} diff --git a/tests/e2e/smoke-sidecar/00-install.yaml b/tests/e2e/smoke-sidecar/00-install.yaml index 1d498c626..d70726c61 100644 --- a/tests/e2e/smoke-sidecar/00-install.yaml +++ b/tests/e2e/smoke-sidecar/00-install.yaml @@ -4,6 +4,9 @@ metadata: name: sidecar-for-my-app spec: mode: sidecar + args: + metrics-level: detailed + log-level: debug config: | receivers: jaeger: diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml index 581acc6b3..f0d60d694 100644 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -19,3 +19,6 @@ spec: receivers: [jaeger] processors: [] exporters: [logging] + args: + metrics-level: detailed + log-level: debug \ No newline at end of file From 6d76f00573c5a6a00d33d6f8bf2dac6ba107f295 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 24 Jun 2021 19:19:25 +0530 Subject: [PATCH 0222/1234] Allow deletion of CRs when the operator isn't available (#313) --- .../opentelemetrycollector_webhook.go | 3 ++- config/webhook/manifests.yaml | 21 ++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index 04b90aa2b..d0ace6187 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -52,7 +52,8 @@ func (r *OpenTelemetryCollector) Default() { opentelemetrycollectorlog.Info("default", "name", r.Name) } -// +kubebuilder:webhook:verbs=create;update;delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 var _ webhook.Validator = &OpenTelemetryCollector{} diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index d4e9130a8..93bf5041f 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -65,7 +65,7 @@ webhooks: namespace: system path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector failurePolicy: Fail - name: vopentelemetrycollector.kb.io + name: vopentelemetrycollectorcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -74,6 +74,25 @@ webhooks: operations: - CREATE - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Ignore + name: vopentelemetrycollectordelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: - DELETE resources: - opentelemetrycollectors From 81f3ded9d09ce92581ebcfc7db3c0e6a77c29291 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 25 Jun 2021 14:48:12 +0530 Subject: [PATCH 0223/1234] Bump operator-sdk to v1.9.0, change v0.27.0 tags to v0.28.0 (#327) --- .github/workflows/release.yaml | 2 +- bundle.Dockerfile | 2 +- ...emetry-operator.clusterserviceversion.yaml | 29 +++++++++++++++---- bundle/metadata/annotations.yaml | 2 +- config/manager/kustomization.yaml | 2 +- 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d95c45bec..45beb35ee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.8.0 + operator-sdk-version: v1.9.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 1c1303516..7f940b437 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,7 +5,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.8.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.9.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go COPY bundle/manifests /manifests/ diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 72c95d96b..b3bf8fc0b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,11 +21,11 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.8.0 + operators.operatorframework.io/builder: operator-sdk-v1.9.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.27.0 + name: opentelemetry-operator.v0.28.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -206,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:v0.27.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.28.0 name: manager ports: - containerPort: 9443 @@ -297,7 +297,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.27.0 + version: 0.28.0 webhookdefinitions: - admissionReviewVersions: - v1 @@ -305,7 +305,7 @@ spec: containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Fail - generateName: vopentelemetrycollector.kb.io + generateName: vopentelemetrycollectorcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -314,6 +314,25 @@ spec: operations: - CREATE - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None + targetPort: 9443 + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + - admissionReviewVersions: + - v1 + - v1beta1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Ignore + generateName: vopentelemetrycollectordelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: - DELETE resources: - opentelemetrycollectors diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index fa1f80f82..867a7c080 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,7 +4,7 @@ annotations: operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v1.8.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.9.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go operators.operatorframework.io.bundle.channel.default.v1: alpha diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 0ff1f893e..82419396c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/opentelemetry/opentelemetry-operator - newTag: v0.27.0 + newTag: v0.28.0 From a1aacb3b9c64f74650ce4836cfc75bb0da5ad949 Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Fri, 25 Jun 2021 12:28:51 -0700 Subject: [PATCH 0224/1234] Bumps collector version to v0.29.0 (#328) * Bump collector version to 0.29 * Added changelog entry * Updated changelog to reflect previous changes --- CHANGELOG.md | 8 ++++++++ versions.txt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47ad04e3a..4a52b4dcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,17 @@ Changes by Version ================== +0.29.0 (2021-06-25) +------------------- +* Bumped OpenTelemetry Collector to v0.29.0 +* Add delete webhook ([#313](https://github.com/open-telemetry/opentelemetry-operator/pull/313), [@VineethReddy02](https://github.com/VineethReddy02)) + 0.28.0 (2021-06-12) ------------------- * Bumped OpenTelemetry Collector to v0.28.0 +* Tolerations support in OpenTelemetryCollector CRD ([#302](https://github.com/open-telemetry/opentelemetry-operator/pull/302), [@VineethReddy02](https://github.com/VineethReddy02)) +* Copy desired service ports when reconciling ([#299](https://github.com/open-telemetry/opentelemetry-operator/pull/299), [@thib92](https://github.com/thib92)) +* Remove the OTLP receiver legacy gRPC port(55680) references ([#293](https://github.com/open-telemetry/opentelemetry-operator/pull/293), [@mxiamxia](https://github.com/mxiamxia)) 0.27.0 (2021-05-20) ------------------- diff --git a/versions.txt b/versions.txt index 0e95699a9..75954252f 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.28.0 +opentelemetry-collector=0.29.0 # Represents the next release of the OpenTelemetry Operator. -operator=0.28.0 +operator=0.29.0 From ac6c23b9c7879b72d831baae8fd75eb813aa2af8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 28 Jun 2021 10:00:50 +0200 Subject: [PATCH 0225/1234] Small manual adjusts for docs and bundle for v0.29.0 (#329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 1 + RELEASE.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0376ecb31..e8d1667af 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.29.0 | v1.19 to v1.21 | | v0.28.0 | v1.19 to v1.21 | | v0.27.0 | v1.19 to v1.21 | | v0.26.0 | v1.18 to v1.20 | diff --git a/RELEASE.md b/RELEASE.md index 43a6f54c0..9016b0187 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,6 +3,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. +1. Run `make bundle VERSION=0.29.0`, using the version that will be released. 1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! 1. Add the changes to the changelog 1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b3bf8fc0b..1f0d52853 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,11 +21,11 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.9.0 + operators.operatorframework.io/builder: operator-sdk-v1.8.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.28.0 + name: opentelemetry-operator.v0.29.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.28.0 + version: 0.29.0 webhookdefinitions: - admissionReviewVersions: - v1 From 7faf809f82f11cab9d7d50745e07f81456cdef02 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 11:12:24 +0200 Subject: [PATCH 0226/1234] Bump docker/setup-buildx-action from 1.3.0 to 1.4.1 (#330) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.3.0 to 1.4.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 953620416..f8237da4e 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -41,7 +41,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.3.0 + uses: docker/setup-buildx-action@v1.4.1 - name: Cache Docker layers uses: actions/cache@v2.1.6 From aff74858930ceaddf8a972db455c716906f1bf39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 10:09:26 +0200 Subject: [PATCH 0227/1234] Bump docker/build-push-action from 2.5.0 to 2.6.1 (#334) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 2.6.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.5.0...v2.6.1) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index f8237da4e..626ed0424 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -59,7 +59,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD }} - name: Build and push Operator image - uses: docker/build-push-action@v2.5.0 + uses: docker/build-push-action@v2.6.1 with: context: . file: ./Dockerfile From ed25cb2079226a94630eed1f3a848d39cbcc3cc0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jul 2021 09:59:47 +0200 Subject: [PATCH 0228/1234] Bump docker/setup-buildx-action from 1.4.1 to 1.5.0 (#335) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 626ed0424..9718a9bab 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -41,7 +41,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.4.1 + uses: docker/setup-buildx-action@v1.5.0 - name: Cache Docker layers uses: actions/cache@v2.1.6 From f6a55f6cbc8d26bf6a18c74afdfc79c37b183c13 Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Tue, 6 Jul 2021 20:30:27 +0530 Subject: [PATCH 0229/1234] Container Security Context (#332) Allow setting a custom security context on containers. --- PROJECT | 1 - api/v1alpha1/opentelemetrycollector_types.go | 5 + api/v1alpha1/zz_generated.deepcopy.go | 5 + ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 139 ++++++++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 139 ++++++++++++++++++ docs/otelcol_cr_spec.md | 3 + pkg/collector/container.go | 13 +- pkg/collector/container_test.go | 27 ++++ 9 files changed, 326 insertions(+), 8 deletions(-) diff --git a/PROJECT b/PROJECT index 89485dd8c..948fffc49 100644 --- a/PROJECT +++ b/PROJECT @@ -12,4 +12,3 @@ resources: version: "3" plugins: manifests.sdk.operatorframework.io/v2: {} - scorecard.sdk.operatorframework.io/v2: {} diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 48c53b6fc..d8528fdb3 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -51,6 +51,11 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ServiceAccount string `json:"serviceAccount,omitempty"` + // SecurityContext will be set as the container security context. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. // +optional // +listType=atomic diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index caee6f0b0..3a2e11fa6 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -97,6 +97,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates *out = make([]v1.PersistentVolumeClaim, len(*in)) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1f0d52853..651f8041a 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,7 +21,7 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.8.0+git + operators.operatorframework.io/builder: operator-sdk-v1.9.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index b4f7d902e..414326175 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -288,6 +288,145 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object + securityContext: + description: SecurityContext will be set as the container security + context. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 15ce2e9b8..c3d3e613a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -276,6 +276,145 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object + securityContext: + description: SecurityContext will be set as the container security + context. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index 4c6484cad..79538808c 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -61,6 +61,9 @@ spec: // +optional Resources to set on the OpenTelemetry Collector pods. resources: {} + + // +optional SecurityContext will be set as the container security context. + securityContext: {} // +optional Toleration to schedule OpenTelemetry Collector pods. // This is only relevant to daemonsets, statefulsets and deployments diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 3384b0b8e..bf70d6ffa 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -69,11 +69,12 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } return corev1.Container{ - Name: naming.Container(), - Image: image, - VolumeMounts: volumeMounts, - Args: args, - Env: envVars, - Resources: otelcol.Spec.Resources, + Name: naming.Container(), + Image: image, + VolumeMounts: volumeMounts, + Args: args, + Env: envVars, + Resources: otelcol.Spec.Resources, + SecurityContext: otelcol.Spec.SecurityContext, } } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 172d13c13..5ada9ec80 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -98,6 +98,33 @@ func TestContainerCustomVolumes(t *testing.T) { assert.Equal(t, "custom-volume-mount", c.VolumeMounts[1].Name) } +func TestContainerCustomSecurityContext(t *testing.T) { + // default config without security context + c1 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{Spec: v1alpha1.OpenTelemetryCollectorSpec{}}) + + // verify + assert.Nil(t, c1.SecurityContext) + + // prepare + isPrivileged := true + uid := int64(1234) + + // test + c2 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + SecurityContext: &corev1.SecurityContext{ + Privileged: &isPrivileged, + RunAsUser: &uid, + }, + }, + }) + + // verify + assert.NotNil(t, c2.SecurityContext) + assert.True(t, *c2.SecurityContext.Privileged) + assert.Equal(t, *c2.SecurityContext.RunAsUser, uid) +} + func TestContainerEnvVarsOverridden(t *testing.T) { otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ From 0d58f28995555ad041209ba3b4fa33338ae6c7bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 10:46:04 +0200 Subject: [PATCH 0230/1234] Bump docker/metadata-action from 3.3.0 to 3.4.0 (#337) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.3.0...v3.4.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 9718a9bab..b8b17be22 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.3.0 + uses: docker/metadata-action@v3.4.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 5bb7132d955d7055fab020e9a38d9a8a1748643b Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 7 Jul 2021 17:27:07 +0530 Subject: [PATCH 0231/1234] Add CI check for auto-generated files (#336) * add CI validation check to make sure all generated files are part of the PR * seaprate out set default operator VERSION to 'ensure-generate-is-noop' target --- .github/workflows/continuous-integration.yaml | 4 ++++ CONTRIBUTING.md | 4 ++-- Makefile | 8 +++++++- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- versions.txt | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7fc5fc1b7..f455037c9 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -22,6 +22,10 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh + - uses: jpkrohling/setup-operator-sdk@v1.1.0 + with: + operator-sdk-version: v1.9.0 + - name: "basic checks" run: make ci diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 400f1c3f5..2b940d8ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ $ gh pr create Build the manifests, install the CRD and run the operator as a local process: ``` -$ make manifests install run +$ make bundle install run ``` ### Deployment with webhooks @@ -47,7 +47,7 @@ make cert-manager Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: ``` -make manifests container container-push deploy +make bundle container container-push deploy ``` By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: diff --git a/Makefile b/Makefile index 6e62ad82f..0ed09be21 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ VERSION ?= "$(shell git describe --tags | sed 's/^v//')" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" +OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator | awk -F= '{print $$2}')" LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION}" # Image URL to use all building/pushing image targets @@ -43,11 +44,16 @@ endif KUBE_VERSION ?= 1.21 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml +ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) +ensure-generate-is-noop: generate bundle + @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) + @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && exit 1) + all: manager ci: test # Run tests -test: generate fmt vet manifests +test: generate fmt vet ensure-generate-is-noop go test ${GOTEST_OPTS} ./... # Build manager binary diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 651f8041a..1f0d52853 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,7 +21,7 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.9.0 + operators.operatorframework.io/builder: operator-sdk-v1.8.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community diff --git a/versions.txt b/versions.txt index 75954252f..112c322e5 100644 --- a/versions.txt +++ b/versions.txt @@ -4,5 +4,5 @@ # the docs as well. opentelemetry-collector=0.29.0 -# Represents the next release of the OpenTelemetry Operator. +# Represents the current release of the OpenTelemetry Operator. operator=0.29.0 From 902b5f60b93e5f8cce99ea67a6c8f8716c4ca65d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 09:38:58 +0200 Subject: [PATCH 0232/1234] Bump docker/setup-buildx-action from 1.5.0 to 1.5.1 (#338) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.0...v1.5.1) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index b8b17be22..eafd96fcc 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -41,7 +41,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.5.0 + uses: docker/setup-buildx-action@v1.5.1 - name: Cache Docker layers uses: actions/cache@v2.1.6 From a560f32203e51f14d631de45e319c1bcecd2ffef Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 15 Jul 2021 18:31:51 +0530 Subject: [PATCH 0233/1234] Bumps collector version to v0.30.0 (#342) --- CHANGELOG.md | 5 +++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 4 ++-- versions.txt | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a52b4dcc..1b8c2b2ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.30.0 (2021-07-15) +------------------- +* Bumped OpenTelemetry Collector to v0.30.0 +* Container Security Context ([#332](https://github.com/open-telemetry/opentelemetry-operator/pull/332), [@owais](https://github.com/owais)) + 0.29.0 (2021-06-25) ------------------- * Bumped OpenTelemetry Collector to v0.29.0 diff --git a/README.md b/README.md index e8d1667af..bc6d78b9b 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.30.0 | v1.19 to v1.21 | | v0.29.0 | v1.19 to v1.21 | | v0.28.0 | v1.19 to v1.21 | | v0.27.0 | v1.19 to v1.21 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1f0d52853..e08422b1b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.29.0 + name: opentelemetry-operator.v0.30.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.29.0 + version: 0.30.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 112c322e5..ac1ff236e 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.29.0 +opentelemetry-collector=0.30.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.29.0 +operator=0.30.0 From 1fb8688447f3e70df1ab75de4fff2de0eb19c8b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 15:53:37 +0200 Subject: [PATCH 0234/1234] Bump k8s.io/kubectl from 0.21.2 to 0.21.3 (#348) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.21.2 to 0.21.3. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.21.2...v0.21.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 31 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 7f5e03e57..e54e6c82c 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.21.2 - k8s.io/apimachinery v0.21.2 - k8s.io/client-go v0.21.2 - k8s.io/kubectl v0.21.2 + k8s.io/api v0.21.3 + k8s.io/apimachinery v0.21.3 + k8s.io/client-go v0.21.3 + k8s.io/kubectl v0.21.3 sigs.k8s.io/controller-runtime v0.9.0-beta.5 ) diff --git a/go.sum b/go.sum index f1bf7d880..076b9c44f 100644 --- a/go.sum +++ b/go.sum @@ -892,24 +892,24 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= -k8s.io/api v0.21.2 h1:vz7DqmRsXTCSa6pNxXwQ1IYeAZgdIsua+DZU+o+SX3Y= -k8s.io/api v0.21.2/go.mod h1:Lv6UGJZ1rlMI1qusN8ruAp9PUBFyBwpEHAdG24vIsiU= +k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ= +k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.21.2 h1:vezUc/BHqWlQDnZ+XkrpXSmnANSLbpnlpwo0Lhk0gpc= -k8s.io/apimachinery v0.21.2/go.mod h1:CdTY8fU/BlvAbJ2z/8kBwimGki5Zp8/fbVuLY8gJumM= +k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= +k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= -k8s.io/cli-runtime v0.21.2/go.mod h1:8u/jFcM0QpoI28f6sfrAAIslLCXUYKD5SsPPMWiHYrI= +k8s.io/cli-runtime v0.21.3/go.mod h1:h65y0uXIXDnNjd5J+F3CvQU3ZNplH4+rjqbII7JkD4A= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= -k8s.io/client-go v0.21.2 h1:Q1j4L/iMN4pTw6Y4DWppBoUxgKO8LbffEMVEV00MUp0= -k8s.io/client-go v0.21.2/go.mod h1:HdJ9iknWpbl3vMGtib6T2PyI/VYxiZfq936WNVHBRrA= +k8s.io/client-go v0.21.3 h1:J9nxZTOmvkInRDCzcSNQmPJbDYN/PjlxXT9Mos3HcLg= +k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= -k8s.io/code-generator v0.21.2/go.mod h1:8mXJDCB7HcRo1xiEQstcguZkbxZaqeUOrO9SsicWs3U= +k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= -k8s.io/component-base v0.21.2 h1:EsnmFFoJ86cEywC0DoIkAUiEV6fjgauNugiw1lmIjs4= -k8s.io/component-base v0.21.2/go.mod h1:9lvmIThzdlrJj5Hp8Z/TOgIkdfsNARQ1pT+3PByuiuc= -k8s.io/component-helpers v0.21.2/go.mod h1:DbyFt/A0p6Cv+R5+QOGSJ5f5t4xDfI8Yb89a57DgJlQ= +k8s.io/component-base v0.21.3 h1:4WuuXY3Npa+iFfi2aDRiOz+anhNvRfye0859ZgfC5Og= +k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= +k8s.io/component-helpers v0.21.3/go.mod h1:FJCpEhM9fkKvNN0QAl33ozmMj+Bx8R64wcOBqhng0oQ= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -918,9 +918,9 @@ k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kubectl v0.21.2 h1:9XPCetvOMDqrIZZXb1Ei+g8t6KrIp9ENJaysQjUuLiE= -k8s.io/kubectl v0.21.2/go.mod h1:PgeUclpG8VVmmQIl8zpLar3IQEpFc9mrmvlwY3CK1xo= -k8s.io/metrics v0.21.2/go.mod h1:wzlOINZMCtWq8dR9gHlyaOemmYlOpAoldEIXE82gAhI= +k8s.io/kubectl v0.21.3 h1:RmHvvz7tLnFmVqUzJuR44D8oE5zv1iyDojxSQllY+II= +k8s.io/kubectl v0.21.3/go.mod h1:/x/kzrhfL1h1W07z6a1UTbd8SWZUYAWXskigkG4OBCg= +k8s.io/metrics v0.21.3/go.mod h1:mN3Klf203Lw1hOsfg1MG7DR/kKUhwiyu8GSFCXZdz+o= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -935,8 +935,9 @@ sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIM sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo= sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= From c15e672aaccef0e78f4d1bd1485d2197f3ed804f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 15:53:57 +0200 Subject: [PATCH 0235/1234] Bump docker/metadata-action from 3.4.0 to 3.4.1 (#344) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.4.0...v3.4.1) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index eafd96fcc..1d0e012f1 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.4.0 + uses: docker/metadata-action@v3.4.1 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 7250758d04076b0e011b196d10bdea885b84fe80 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 16 Jul 2021 19:24:31 +0530 Subject: [PATCH 0236/1234] Bump kubectl-kuttl to v0.11.0 (#343) --- hack/install-kuttl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh index f8e4123e0..ebe791def 100755 --- a/hack/install-kuttl.sh +++ b/hack/install-kuttl.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.7.2/kubectl-kuttl_0.7.2_linux_x86_64 +sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.11.0/kubectl-kuttl_0.11.0_linux_x86_64 sudo chmod +x /usr/local/bin/kubectl-kuttl export PATH=$PATH:/usr/local/bin From 76535a9d59c6559e217d0ee4dbb1552f33bc6a7a Mon Sep 17 00:00:00 2001 From: "sicong.huang" Date: Tue, 27 Jul 2021 20:47:46 +0800 Subject: [PATCH 0237/1234] Update gcr.io/kubebuilder/kube-rbac-proxy to v0.8.0 (#355) (#360) Signed-off-by: lastchiliarch --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- config/default/manager_auth_proxy_patch.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e08422b1b..18320408a 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -228,7 +228,7 @@ spec: - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 77e743d1c..a2dc7c413 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -10,7 +10,7 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" From e3ef815b0c26ffe9667c752a831a00ca09f5362f Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 29 Jul 2021 20:56:14 +0530 Subject: [PATCH 0238/1234] Add v0.31.0 upgrade routine (#368) --- pkg/collector/upgrade/v0_31_0.go | 73 ++++++++++++++++++++++++ pkg/collector/upgrade/v0_31_0_test.go | 82 +++++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 ++ 3 files changed, 159 insertions(+) create mode 100644 pkg/collector/upgrade/v0_31_0.go create mode 100644 pkg/collector/upgrade/v0_31_0_test.go diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go new file mode 100644 index 000000000..1fb3e5d44 --- /dev/null +++ b/pkg/collector/upgrade/v0_31_0.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_31_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.31.0, failed to parse configuration: %w", err) + } + + receivers, ok := cfg["receivers"].(map[interface{}]interface{}) + if !ok { + // no receivers? no need to fail because of that + return otelcol, nil + } + + for k, v := range receivers { + // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#v0310-beta + // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/4277 + + // Remove deprecated field metrics_schema from influxdb receiver + if strings.HasPrefix(k.(string), "influxdb") { + influxdbConfig, ok := v.(map[interface{}]interface{}) + if !ok { + // no influxdbConfig? no need to fail because of that + return otelcol, nil + } + for fieldKey := range influxdbConfig { + if strings.HasPrefix(fieldKey.(string), "metrics_schema") { + delete(influxdbConfig, fieldKey) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.31.0 dropped the 'metrics_schema' field from %q receiver", k)) + continue + } + } + } + } + + cfg["receivers"] = receivers + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.31.0, failed to marshall back configuration: %w", err) + } + + otelcol.Spec.Config = string(res) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go new file mode 100644 index 000000000..eeaf6fd87 --- /dev/null +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func TestInfluxdbReceiverPropertyDrop(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: + influxdb: + endpoint: 0.0.0.0:8080 + metrics_schema: telegraf-prometheus-v1 + +exporters: + prometheusremotewrite: + endpoint: "http:hello:4555/hii" + +service: + pipelines: + metrics: + receivers: [influxdb] + exporters: [prometheusremotewrite] +`, + }, + } + existing.Status.Version = "0.30.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, `exporters: + prometheusremotewrite: + endpoint: http:hello:4555/hii +receivers: + influxdb: + endpoint: 0.0.0.0:8080 +service: + pipelines: + metrics: + exporters: + - prometheusremotewrite + receivers: + - influxdb +`, res.Spec.Config) + assert.Equal(t, "upgrade to v0.31.0 dropped the 'metrics_schema' field from \"influxdb\" receiver", res.Status.Messages[0]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index b4c37fac0..63372d999 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -50,6 +50,10 @@ var ( Version: *semver.MustParse("0.24.0"), upgrade: upgrade0_24_0, }, + { + Version: *semver.MustParse("0.31.0"), + upgrade: upgrade0_31_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From 12890f9d8a036ee31c9b843bb905a21057dcc185 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 30 Jul 2021 16:36:26 +0530 Subject: [PATCH 0239/1234] Bump collector to v0.31.0 (#369) * Bump collector to v0.31.0 * fix kustimization with image name, version * fix bundle image name * add set-image-controller to target ensure-generate-is-noop --- CHANGELOG.md | 4 ++++ Makefile | 5 ++++- README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- config/manager/kustomization.yaml | 6 ------ versions.txt | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b8c2b2ff..b50e83146 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.31.0 (2021-07-29) +------------------- +* Bumped OpenTelemetry Collector to v0.31.0 + 0.30.0 (2021-07-15) ------------------- * Bumped OpenTelemetry Collector to v0.30.0 diff --git a/Makefile b/Makefile index 0ed09be21..775a2a6cd 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,10 @@ KUBE_VERSION ?= 1.21 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) -ensure-generate-is-noop: generate bundle +ensure-generate-is-noop: USER=opentelemetry +ensure-generate-is-noop: set-image-controller generate bundle + # on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check + @git restore config/manager/kustomization.yaml @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && exit 1) diff --git a/README.md b/README.md index bc6d78b9b..ba610f82d 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.31.0 | v1.19 to v1.21 | | v0.30.0 | v1.19 to v1.21 | | v0.29.0 | v1.19 to v1.21 | | v0.28.0 | v1.19 to v1.21 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 18320408a..aeb344e88 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.30.0 + name: opentelemetry-operator.v0.31.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -206,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:v0.28.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.31.0 name: manager ports: - containerPort: 9443 @@ -297,7 +297,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.30.0 + version: 0.31.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 82419396c..5c5f0b84c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,8 +1,2 @@ resources: - manager.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: quay.io/opentelemetry/opentelemetry-operator - newTag: v0.28.0 diff --git a/versions.txt b/versions.txt index ac1ff236e..0ed4e12ba 100644 --- a/versions.txt +++ b/versions.txt @@ -2,7 +2,7 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.30.0 +opentelemetry-collector=0.31.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.30.0 +operator=0.31.0 From 31c49b6c72181749fa26f5e99f0798277bdfadb1 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 4 Aug 2021 14:41:49 +0530 Subject: [PATCH 0240/1234] Add fluentforward receiver (#367) --- .../parser/receiver_fluent-forward.go | 34 +++++++++++++++++++ .../parser/receiver_fluent-forward_test.go | 17 ++++++++++ pkg/collector/parser/receiver_generic_test.go | 1 + 3 files changed, 52 insertions(+) create mode 100644 pkg/collector/parser/receiver_fluent-forward.go create mode 100644 pkg/collector/parser/receiver_fluent-forward_test.go diff --git a/pkg/collector/parser/receiver_fluent-forward.go b/pkg/collector/parser/receiver_fluent-forward.go new file mode 100644 index 000000000..94170fa05 --- /dev/null +++ b/pkg/collector/parser/receiver_fluent-forward.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import "github.com/go-logr/logr" + +const parserNameFluentForward = "__fluentforward" + +// NewFluentForwardReceiverParser builds a new parser for FluentForward receivers, from the contrib repository. +func NewFluentForwardReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + logger: logger, + name: name, + config: config, + defaultPort: 8006, + parserName: parserNameFluentForward, + } +} + +func init() { + Register("fluentforward", NewFluentForwardReceiverParser) +} diff --git a/pkg/collector/parser/receiver_fluent-forward_test.go b/pkg/collector/parser/receiver_fluent-forward_test.go new file mode 100644 index 000000000..ee8959260 --- /dev/null +++ b/pkg/collector/parser/receiver_fluent-forward_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +// all tests for the FluentForward parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 93c290c5f..985343e29 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -75,6 +75,7 @@ func TestDownstreamParsers(t *testing.T) { {"signalfx", "signalfx", "__signalfx", 9943, parser.NewSignalFxReceiverParser}, {"wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser}, {"zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser}, + {"fluentforward", "fluentforward", "__fluentforward", 8006, parser.NewFluentForwardReceiverParser}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { From 6f88e55e89b6c9808cc21a1b7c09069bacdb6b92 Mon Sep 17 00:00:00 2001 From: Shibo Wang <33282704+Saber-W@users.noreply.github.com> Date: Thu, 5 Aug 2021 00:28:48 -0700 Subject: [PATCH 0241/1234] Add `protocol: TCP` value under `ports` key to avoid the known limitation for Kubernetes 1.19 (#372) * Add `protocol: TCP` value under `ports` key * Update version --- ...y-operator-controller-manager-metrics-service_v1_service.yaml | 1 + .../opentelemetry-operator-webhook-service_v1_service.yaml | 1 + .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 1 + config/default/manager_auth_proxy_patch.yaml | 1 + config/rbac/auth_proxy_service.yaml | 1 + config/webhook/service.yaml | 1 + 6 files changed, 6 insertions(+) diff --git a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml index 6dba7e0d0..9e8b2cbd9 100644 --- a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml @@ -9,6 +9,7 @@ spec: ports: - name: https port: 8443 + protocol: TCP targetPort: https selector: control-plane: controller-manager diff --git a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml index 7017d35ae..653d80ef1 100644 --- a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml +++ b/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml @@ -6,6 +6,7 @@ metadata: spec: ports: - port: 443 + protocol: TCP targetPort: 9443 selector: control-plane: controller-manager diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index aeb344e88..7559d3e56 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -233,6 +233,7 @@ spec: ports: - containerPort: 8443 name: https + protocol: TCP resources: {} serviceAccountName: opentelemetry-operator-controller-manager terminationGracePeriodSeconds: 10 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index a2dc7c413..6f8c02fdd 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -19,6 +19,7 @@ spec: ports: - containerPort: 8443 name: https + protocol: TCP - name: manager args: - "--metrics-addr=127.0.0.1:8080" diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 6cf656be1..65e99c69f 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -10,5 +10,6 @@ spec: - name: https port: 8443 targetPort: https + protocol: TCP selector: control-plane: controller-manager diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml index 31e0f8295..a95890856 100644 --- a/config/webhook/service.yaml +++ b/config/webhook/service.yaml @@ -8,5 +8,6 @@ spec: ports: - port: 443 targetPort: 9443 + protocol: TCP selector: control-plane: controller-manager From 70202d317aaa1b709461aa9cd30e81865910f26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 5 Aug 2021 12:33:54 +0200 Subject: [PATCH 0242/1234] Bump operator-sdk to v1.10.0 (#381) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/release.yaml | 2 +- Makefile | 2 +- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index f455037c9..a1fcb801c 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -24,7 +24,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.9.0 + operator-sdk-version: v1.10.0 - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 45beb35ee..635b8000b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.9.0 + operator-sdk-version: v1.10.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" diff --git a/Makefile b/Makefile index 775a2a6cd..302fbdb30 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=opentelemetry ensure-generate-is-noop: set-image-controller generate bundle - # on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check + @# on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check @git restore config/manager/kustomization.yaml @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && exit 1) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7559d3e56..c859fec31 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,7 +21,7 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.8.0+git + operators.operatorframework.io/builder: operator-sdk-v1.9.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community From ab02e20b34946f3b9ecd4e1137c20d48ff97922e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 5 Aug 2021 12:34:07 +0200 Subject: [PATCH 0243/1234] Download and install kustomize binary (#380) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Download and install kustomize binary Signed-off-by: Juraci Paixão Kröhling * Make hack/install-kustomize.sh executable Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 3 +++ .github/workflows/release.yaml | 3 +++ Makefile | 7 ++++++- hack/install-kustomize.sh | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 hack/install-kustomize.sh diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a1fcb801c..73b531cd7 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -22,6 +22,9 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh + - name: "install kustomize" + run: ./hack/install-kustomize.sh + - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: operator-sdk-version: v1.10.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 635b8000b..ef974bc8b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,9 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh + - name: "install kustomize" + run: ./hack/install-kustomize.sh + - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: operator-sdk-version: v1.10.0 diff --git a/Makefile b/Makefile index 302fbdb30..7d52c2abe 100644 --- a/Makefile +++ b/Makefile @@ -153,7 +153,12 @@ endif kustomize: ifeq (, $(shell which kustomize)) @{ \ - go install sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\ + set -e ;\ + echo "" ;\ + echo "ERROR: kustomize not found." ;\ + echo "Please check https://kubectl.docs.kubernetes.io/installation/kustomize/ for installation instructions and try again." ;\ + echo "" ;\ + exit 1 ;\ } KUSTOMIZE=$(GOBIN)/kustomize else diff --git a/hack/install-kustomize.sh b/hack/install-kustomize.sh new file mode 100755 index 000000000..0b0405b43 --- /dev/null +++ b/hack/install-kustomize.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.2.0/kustomize_v4.2.0_linux_amd64.tar.gz | tar xvz -C /usr/local/bin/ +export PATH=$PATH:/usr/local/bin From 7d8c3c4750558cf87c18b161f629bf153bb1e8ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Aug 2021 14:27:33 +0200 Subject: [PATCH 0244/1234] Bump k8s.io/kubectl from 0.21.3 to 0.22.0 (#374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump k8s.io/kubectl from 0.21.3 to 0.22.0 Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.21.3 to 0.22.0. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.21.3...v0.22.0) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update generated CRD Signed-off-by: Juraci Paixão Kröhling * Bump golang in the builder Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- Dockerfile | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 135 ++++++++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 135 ++++++++-- go.mod | 8 +- go.sum | 233 ++++++++++-------- 5 files changed, 358 insertions(+), 155 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9add19a63..bde3f4b0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.15 as builder +FROM golang:1.16 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 414326175..817fa2573 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -88,12 +88,14 @@ spec: type: string value: description: 'Variable references $(VAR_NAME) are expanded using - the previous defined environment variables in the container + the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. - The $(VAR_NAME) syntax can be escaped with a double $$, ie: - $$(VAR_NAME). Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -208,8 +210,6 @@ spec: are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. - This is a beta field that is guarded by the ServiceAppProtocol - feature gate and enabled by default. type: string name: description: The name of this port within the service. This @@ -418,6 +418,17 @@ spec: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified @@ -524,14 +535,50 @@ spec: dataSource: description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must - be enabled. If the provisioner or an external controller - can support the specified data source, it will create - a new volume based on the contents of the specified data - source.' + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data + source, it will create a new volume based on the contents + of the specified data source. If the AnyVolumeDataSource + feature gate is enabled, this field will always have the + same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to populate + the volume with data, if a non-empty volume is desired. + This may be any local object from a non-empty API group + (non core object) or a PersistentVolumeClaim object. When + this field is specified, volume binding will only succeed + if the type of the specified object matches some installed + volume populator or dynamic provisioner. This field will + replace the functionality of the DataSource field and + as such if both fields are non-empty, they must have the + same value. For backwards compatibility, both fields (DataSource + and DataSourceRef) will be set to the same value automatically + if one of them is empty and the other is non-empty. There + are two important differences between DataSource and DataSourceRef: + * While DataSource only allows two specific types of objects, + DataSourceRef allows any non-core object, as well as + PersistentVolumeClaim objects. * While DataSource ignores + disallowed values (dropping them), DataSourceRef preserves + all values, and generates an error if a disallowed value + is specified. (Alpha) Using this field requires the + AnyVolumeDataSource feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1206,14 +1253,58 @@ spec: dataSource: description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An - existing custom resource that implements data - population (Alpha) In order to use custom resource - types that implement data population, the AnyVolumeDataSource - feature gate must be enabled. If the provisioner - or an external controller can support the specified - data source, it will create a new volume based - on the contents of the specified data source.' + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified + data source. If the AnyVolumeDataSource feature + gate is enabled, this field will always have the + same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to + populate the volume with data, if a non-empty + volume is desired. This may be any local object + from a non-empty API group (non core object) or + a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. + This field will replace the functionality of the + DataSource field and as such if both fields are + non-empty, they must have the same value. For + backwards compatibility, both fields (DataSource + and DataSourceRef) will be set to the same value + automatically if one of them is empty and the + other is non-empty. There are two important differences + between DataSource and DataSourceRef: * While + DataSource only allows two specific types of objects, + DataSourceRef allows any non-core object, as + well as PersistentVolumeClaim objects. * While + DataSource ignores disallowed values (dropping + them), DataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + (Alpha) Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c3d3e613a..13ef39a70 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -76,12 +76,14 @@ spec: type: string value: description: 'Variable references $(VAR_NAME) are expanded using - the previous defined environment variables in the container + the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. - The $(VAR_NAME) syntax can be escaped with a double $$, ie: - $$(VAR_NAME). Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -196,8 +198,6 @@ spec: are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. - This is a beta field that is guarded by the ServiceAppProtocol - feature gate and enabled by default. type: string name: description: The name of this port within the service. This @@ -406,6 +406,17 @@ spec: description: GMSACredentialSpecName is the name of the GMSA credential spec to use. type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified @@ -512,14 +523,50 @@ spec: dataSource: description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must - be enabled. If the provisioner or an external controller - can support the specified data source, it will create - a new volume based on the contents of the specified data - source.' + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data + source, it will create a new volume based on the contents + of the specified data source. If the AnyVolumeDataSource + feature gate is enabled, this field will always have the + same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to populate + the volume with data, if a non-empty volume is desired. + This may be any local object from a non-empty API group + (non core object) or a PersistentVolumeClaim object. When + this field is specified, volume binding will only succeed + if the type of the specified object matches some installed + volume populator or dynamic provisioner. This field will + replace the functionality of the DataSource field and + as such if both fields are non-empty, they must have the + same value. For backwards compatibility, both fields (DataSource + and DataSourceRef) will be set to the same value automatically + if one of them is empty and the other is non-empty. There + are two important differences between DataSource and DataSourceRef: + * While DataSource only allows two specific types of objects, + DataSourceRef allows any non-core object, as well as + PersistentVolumeClaim objects. * While DataSource ignores + disallowed values (dropping them), DataSourceRef preserves + all values, and generates an error if a disallowed value + is specified. (Alpha) Using this field requires the + AnyVolumeDataSource feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1194,14 +1241,58 @@ spec: dataSource: description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An - existing custom resource that implements data - population (Alpha) In order to use custom resource - types that implement data population, the AnyVolumeDataSource - feature gate must be enabled. If the provisioner - or an external controller can support the specified - data source, it will create a new volume based - on the contents of the specified data source.' + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified + data source. If the AnyVolumeDataSource feature + gate is enabled, this field will always have the + same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to + populate the volume with data, if a non-empty + volume is desired. This may be any local object + from a non-empty API group (non core object) or + a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. + This field will replace the functionality of the + DataSource field and as such if both fields are + non-empty, they must have the same value. For + backwards compatibility, both fields (DataSource + and DataSourceRef) will be set to the same value + automatically if one of them is empty and the + other is non-empty. There are two important differences + between DataSource and DataSourceRef: * While + DataSource only allows two specific types of objects, + DataSourceRef allows any non-core object, as + well as PersistentVolumeClaim objects. * While + DataSource ignores disallowed values (dropping + them), DataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + (Alpha) Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource diff --git a/go.mod b/go.mod index e54e6c82c..7c66570c6 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.21.3 - k8s.io/apimachinery v0.21.3 - k8s.io/client-go v0.21.3 - k8s.io/kubectl v0.21.3 + k8s.io/api v0.22.0 + k8s.io/apimachinery v0.22.0 + k8s.io/client-go v0.22.0 + k8s.io/kubectl v0.22.0 sigs.k8s.io/controller-runtime v0.9.0-beta.5 ) diff --git a/go.sum b/go.sum index 076b9c44f..e128c857c 100644 --- a/go.sum +++ b/go.sum @@ -24,14 +24,18 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -41,20 +45,18 @@ github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -62,11 +64,11 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -87,6 +89,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -111,8 +115,6 @@ github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -124,15 +126,22 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= +github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -140,8 +149,6 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -149,6 +156,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -158,50 +166,19 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -214,8 +191,9 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -233,20 +211,24 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -265,8 +247,10 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.4 h1:ynbQIWjLw7iv6HAFdixb30U7Uvcmx+f4KlLJpmhkTK0= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.4/go.mod h1:TRWw1s4gxBGjSe301Dai3c7wXJAZy57+/6tawkOvqHQ= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -280,6 +264,7 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -298,7 +283,6 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -315,12 +299,15 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -347,12 +334,10 @@ github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -373,6 +358,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -406,6 +392,7 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -448,8 +435,9 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -463,26 +451,28 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -500,6 +490,7 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -523,59 +514,66 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.16.0 h1:uFRZXykJGK9lLY4HtgSw44DnIcAM+kRBP7x5m+NpAOM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -602,8 +600,9 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -612,12 +611,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449 h1:xUIPaMhvROX9dhPvRCenIJtU78+lbEenGbgqB5hfHCQ= golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -626,7 +624,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -646,11 +643,14 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -664,6 +664,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -674,7 +676,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -701,6 +702,7 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -709,9 +711,14 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 h1:dXfMednGJh/SUUFjTLsWJz3P+TQt9qnR11GgeI3vWKs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -721,20 +728,22 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -745,7 +754,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -776,8 +784,9 @@ golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -823,9 +832,11 @@ google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4 google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -835,9 +846,14 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -847,8 +863,10 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -871,16 +889,17 @@ gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRN gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -889,51 +908,53 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= -k8s.io/api v0.21.3 h1:cblWILbLO8ar+Fj6xdDGr603HRsf8Wu9E9rngJeprZQ= -k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= +k8s.io/api v0.22.0 h1:elCpMZ9UE8dLdYxr55E06TmSeji9I3KH494qH70/y+c= +k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.21.3 h1:3Ju4nvjCngxxMYby0BimUk+pQHPOQp3eCGChk5kfVII= -k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= +k8s.io/apimachinery v0.22.0 h1:CqH/BdNAzZl+sr3tc0D3VsK3u6ARVSo3GWyLmfIjbP0= +k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= -k8s.io/cli-runtime v0.21.3/go.mod h1:h65y0uXIXDnNjd5J+F3CvQU3ZNplH4+rjqbII7JkD4A= +k8s.io/cli-runtime v0.22.0/go.mod h1:An6zELQ7udUI0GaXvkuMqyopPA14dIgNqpH8cZu1vig= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= -k8s.io/client-go v0.21.3 h1:J9nxZTOmvkInRDCzcSNQmPJbDYN/PjlxXT9Mos3HcLg= -k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= +k8s.io/client-go v0.22.0 h1:sD6o9O6tCwUKCENw8v+HFsuAbq2jCu8cWC61/ydwA50= +k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg= k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= -k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= +k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= -k8s.io/component-base v0.21.3 h1:4WuuXY3Npa+iFfi2aDRiOz+anhNvRfye0859ZgfC5Og= -k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-helpers v0.21.3/go.mod h1:FJCpEhM9fkKvNN0QAl33ozmMj+Bx8R64wcOBqhng0oQ= +k8s.io/component-base v0.22.0 h1:ZTmX8hUqH9T9gc0mM42O+KDgtwTYbVTt2MwmLP0eK8A= +k8s.io/component-base v0.22.0/go.mod h1:SXj6Z+V6P6GsBhHZVbWCw9hFjUdUYnJerlhhPnYCBCg= +k8s.io/component-helpers v0.22.0/go.mod h1:YNIbQI59ayNiU8JHlPIxVkOUYycbKhk5Niy0pcyJOEY= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.8.0 h1:Q3gmuM9hKEjefWFFYF0Mat+YyFJvsUyYuwyNNJ5C9Ts= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 h1:vEx13qjvaZ4yfObSSXW7BrMc/KQBBT/Jyee8XtLf4x0= +k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kubectl v0.21.3 h1:RmHvvz7tLnFmVqUzJuR44D8oE5zv1iyDojxSQllY+II= -k8s.io/kubectl v0.21.3/go.mod h1:/x/kzrhfL1h1W07z6a1UTbd8SWZUYAWXskigkG4OBCg= -k8s.io/metrics v0.21.3/go.mod h1:mN3Klf203Lw1hOsfg1MG7DR/kKUhwiyu8GSFCXZdz+o= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kubectl v0.22.0 h1:EBb7xLUaidG/YXAI5AXam3lK2VlnoFShhlMjnJVTbGA= +k8s.io/kubectl v0.22.0/go.mod h1:eeuP92uZbVL2UnOaf0nj9OjtI0hi/nekHU+0isURer0= +k8s.io/metrics v0.22.0/go.mod h1:eYnwafAUNLLpVmY/msoq0RKIKH5C4TzfjKnMZ0Xrt3A= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 h1:imL9YgXQ9p7xmPzHFm/vVd/cF78jad+n4wK1ABwYtMM= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.9.0-beta.5 h1:yteq8am8lUFvlI/bfIgySMp/MqAPXiAghxX+XrMCifE= sigs.k8s.io/controller-runtime v0.9.0-beta.5/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= -sigs.k8s.io/kustomize/api v0.8.8/go.mod h1:He1zoK0nk43Pc6NlV085xDXDXTNprtcyKZVm3swsdNY= -sigs.k8s.io/kustomize/cmd/config v0.9.10/go.mod h1:Mrby0WnRH7hA6OwOYnYpfpiY0WJIMgYrEDfwOeFdMK0= -sigs.k8s.io/kustomize/kustomize/v4 v4.1.2/go.mod h1:PxBvo4WGYlCLeRPL+ziT64wBXqbgfcalOS/SXa/tcyo= -sigs.k8s.io/kustomize/kyaml v0.10.17/go.mod h1:mlQFagmkm1P+W4lZJbJ/yaxMd8PqMRSC4cPcfUVt5Hg= +sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= +sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= +sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= +sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= From ad8d67b2cdcfb8af71b413ae7fb78f452a69b63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 5 Aug 2021 15:50:09 +0200 Subject: [PATCH 0245/1234] Add Kubernetes 1.22 to the test matrix (#382) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/e2e.yaml | 1 + kind-1.21.yaml | 2 +- kind-1.22.yaml | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 kind-1.22.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 72c610152..f289a8d97 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -16,6 +16,7 @@ jobs: - "1.19" - "1.20" - "1.21" + - "1.22" steps: diff --git a/kind-1.21.yaml b/kind-1.21.yaml index 8120034b8..64c6f7163 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.21.1@sha256:80773e2069dd4a80a4929fdef050c1e463e1d5578c2cd9af3962cfbc230e1500 + image: kindest/node:v1.21.2@sha256:9d07ff05e4afefbba983fac311807b3c17a5f36e7061f6cb7e2ba756255b2be4 diff --git a/kind-1.22.yaml b/kind-1.22.yaml new file mode 100644 index 000000000..407478273 --- /dev/null +++ b/kind-1.22.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.22.0@sha256:f97edf7f7ed53c57762b24f90a34fad101386c5bd4d93baeb45449557148c717 From 90b4e811e0ded3ef6287f887a581ef93defc7c0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Aug 2021 16:01:08 +0200 Subject: [PATCH 0246/1234] Bump sigs.k8s.io/controller-runtime from 0.9.0-beta.5 to 0.9.5 (#365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump sigs.k8s.io/controller-runtime from 0.9.0-beta.5 to 0.9.5 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.0-beta.5 to 0.9.5. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.0-beta.5...v0.9.5) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix unit test Signed-off-by: Juraci Paixão Kröhling Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juraci Paixão Kröhling --- go.mod | 2 +- go.sum | 180 ++++++------------------------ internal/podinjector/main_test.go | 14 ++- 3 files changed, 45 insertions(+), 151 deletions(-) diff --git a/go.mod b/go.mod index 7c66570c6..f5063e4f2 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.22.0 k8s.io/client-go v0.22.0 k8s.io/kubectl v0.22.0 - sigs.k8s.io/controller-runtime v0.9.0-beta.5 + sigs.k8s.io/controller-runtime v0.9.5 ) replace ( diff --git a/go.sum b/go.sum index e128c857c..a959900ea 100644 --- a/go.sum +++ b/go.sum @@ -38,7 +38,6 @@ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -47,28 +46,20 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -76,8 +67,6 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -87,12 +76,10 @@ github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -103,7 +90,6 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -118,21 +104,16 @@ github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -142,8 +123,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -155,7 +134,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -177,13 +155,10 @@ github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHK github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -215,7 +190,6 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -248,13 +222,9 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.4/go.mod h1:TRWw1s4gxBGjSe301Dai3c7wXJAZy57+/6tawkOvqHQ= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -266,9 +236,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -279,7 +247,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -290,21 +257,18 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -314,7 +278,6 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -328,10 +291,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -371,107 +331,70 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= -github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= -github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= +github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -482,7 +405,6 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -500,9 +422,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -518,7 +437,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -528,10 +446,7 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -550,31 +465,24 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -621,7 +529,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -646,9 +553,9 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -673,7 +580,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -692,7 +598,6 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -708,17 +613,17 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 h1:RqytpXGR1iVNX7psjB3ff8y7sNFinVFvkx1c8SjBkio= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -740,9 +645,7 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -760,8 +663,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -771,7 +672,6 @@ golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -792,9 +692,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.1.0 h1:Phva6wqu+xR//Njw6iorylFFgn/z547tw5Ne3HZPQ+k= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -806,7 +705,6 @@ google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -818,7 +716,6 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -837,15 +734,11 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -876,7 +769,6 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -885,7 +777,6 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -902,29 +793,28 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/api v0.22.0 h1:elCpMZ9UE8dLdYxr55E06TmSeji9I3KH494qH70/y+c= k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= -k8s.io/apiextensions-apiserver v0.21.0 h1:Nd4uBuweg6ImzbxkC1W7xUNZcCV/8Vt10iTdTIVF3hw= -k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= -k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= +k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apimachinery v0.22.0 h1:CqH/BdNAzZl+sr3tc0D3VsK3u6ARVSo3GWyLmfIjbP0= k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apiserver v0.21.0/go.mod h1:w2YSn4/WIwYuxG5zJmcqtRdtqgW/J2JRgFAqps3bBpg= +k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= k8s.io/cli-runtime v0.22.0/go.mod h1:An6zELQ7udUI0GaXvkuMqyopPA14dIgNqpH8cZu1vig= -k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= +k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/client-go v0.22.0 h1:sD6o9O6tCwUKCENw8v+HFsuAbq2jCu8cWC61/ydwA50= k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg= -k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= -k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= +k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= k8s.io/component-base v0.22.0 h1:ZTmX8hUqH9T9gc0mM42O+KDgtwTYbVTt2MwmLP0eK8A= k8s.io/component-base v0.22.0/go.mod h1:SXj6Z+V6P6GsBhHZVbWCw9hFjUdUYnJerlhhPnYCBCg= k8s.io/component-helpers v0.22.0/go.mod h1:YNIbQI59ayNiU8JHlPIxVkOUYycbKhk5Niy0pcyJOEY= @@ -942,24 +832,22 @@ k8s.io/kubectl v0.22.0 h1:EBb7xLUaidG/YXAI5AXam3lK2VlnoFShhlMjnJVTbGA= k8s.io/kubectl v0.22.0/go.mod h1:eeuP92uZbVL2UnOaf0nj9OjtI0hi/nekHU+0isURer0= k8s.io/metrics v0.22.0/go.mod h1:eYnwafAUNLLpVmY/msoq0RKIKH5C4TzfjKnMZ0Xrt3A= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 h1:imL9YgXQ9p7xmPzHFm/vVd/cF78jad+n4wK1ABwYtMM= k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= +k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.0-beta.5 h1:yteq8am8lUFvlI/bfIgySMp/MqAPXiAghxX+XrMCifE= -sigs.k8s.io/controller-runtime v0.9.0-beta.5/go.mod h1:ufPDuvefw2Y1KnBgHQrLdOjueYlj+XJV2AszbT+WTxs= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.9.5 h1:WThcFE6cqctTn2jCZprLICO6BaKZfhsT37uAapTNfxc= +sigs.k8s.io/controller-runtime v0.9.5/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 33c3110f7..bc1bd72f8 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -163,12 +163,18 @@ func TestShouldInjectSidecar(t *testing.T) { assert.Len(t, res.Patches, 3) expectedMap := map[string]bool{ - "/metadata/labels": false, - "/spec/volumes": false, - "/spec/containers": false, + "/metadata/labels": false, // add a new label + "/spec/volumes": false, // add a new volume with the configmap + "/spec/containers": false, // replace the containers, adding one new container } for _, patch := range res.Patches { - assert.Equal(t, "add", patch.Operation) + // quick and dirty solution + if patch.Path == "/spec/containers" { + assert.Equal(t, "replace", patch.Operation) + } else { + assert.Equal(t, "add", patch.Operation) + } + expectedMap[patch.Path] = true } for k := range expectedMap { From 3eae0e5a96403dad8274e1f503dfe31e56ceafe4 Mon Sep 17 00:00:00 2001 From: Joao Grassi Date: Fri, 6 Aug 2021 09:52:44 +0200 Subject: [PATCH 0247/1234] Change the default port for OLTP HTTP (#373) * Change the default port for OLTP http And marking the existing as legacy. * Fix tests --- pkg/collector/parser/receiver_otlp.go | 22 ++++++++++----- pkg/collector/parser/receiver_otlp_test.go | 31 +++++++++++++++++++--- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index 5e46ac345..45eab11ed 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -27,8 +27,9 @@ var _ ReceiverParser = &OTLPReceiverParser{} const ( parserNameOTLP = "__otlp" - defaultOTLPGRPCPort int32 = 4317 - defaultOTLPHTTPPort int32 = 55681 + defaultOTLPGRPCPort int32 = 4317 + defaultOTLPHTTPLegacyPort int32 = 55681 + defaultOTLPHTTPPort int32 = 4318 ) // OTLPReceiverParser parses the configuration for OTLP receivers. @@ -74,11 +75,18 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { }, { name: "http", - defaultPorts: []corev1.ServicePort{{ - Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), - Port: defaultOTLPHTTPPort, - TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), - }}, + defaultPorts: []corev1.ServicePort{ + { + Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), + Port: defaultOTLPHTTPPort, + TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), + }, + { + Name: portName(fmt.Sprintf("%s-http-legacy", o.name), defaultOTLPHTTPLegacyPort), + Port: defaultOTLPHTTPLegacyPort, + TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), // we target the official port, not the legacy + }, + }, }, } { // do we have the protocol specified at all? diff --git a/pkg/collector/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go index 51ca014d2..6abca3b5d 100644 --- a/pkg/collector/parser/receiver_otlp_test.go +++ b/pkg/collector/parser/receiver_otlp_test.go @@ -40,16 +40,36 @@ func TestOTLPPortsOverridden(t *testing.T) { "grpc": map[interface{}]interface{}{ "endpoint": "0.0.0.0:1234", }, + "http": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1235", + }, }, }) + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "otlp-grpc": {portNumber: 1234}, + "otlp-http": {portNumber: 1235}, + } + // test ports, err := builder.Ports() // verify assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 1234, ports[0].Port) + assert.Len(t, ports, len(expectedResults)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } } func TestOTLPExposeDefaultPorts(t *testing.T) { @@ -57,6 +77,7 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { builder := NewOTLPReceiverParser(logger, "otlp", map[interface{}]interface{}{ "protocols": map[interface{}]interface{}{ "grpc": map[interface{}]interface{}{}, + "http": map[interface{}]interface{}{}, }, }) @@ -64,7 +85,9 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { portNumber int32 seen bool }{ - "otlp-grpc": {portNumber: 4317}, + "otlp-grpc": {portNumber: 4317}, + "otlp-http": {portNumber: 4318}, + "otlp-http-legacy": {portNumber: 55681}, } // test @@ -72,7 +95,7 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { // verify assert.NoError(t, err) - assert.Len(t, ports, 1) + assert.Len(t, ports, len(expectedResults)) for _, port := range ports { r := expectedResults[port.Name] From 8215a0dcf89b29f95f4210afd9736eb34639c553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 6 Aug 2021 13:15:09 +0200 Subject: [PATCH 0248/1234] Bump operator-sdk to v1.10.1 (#387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/release.yaml | 2 +- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 73b531cd7..38ff9a4f4 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -27,7 +27,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.10.0 + operator-sdk-version: v1.10.1 - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ef974bc8b..1f378f57a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.10.0 + operator-sdk-version: v1.10.1 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c859fec31..cfa252920 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,7 +21,7 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.9.0+git + operators.operatorframework.io/builder: operator-sdk-v1.10.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community From a254e70b432722cbe02ddd24c241cb0ed0f49940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Mon, 9 Aug 2021 13:39:43 +0200 Subject: [PATCH 0249/1234] Update cert-manager to v1.4.3 (#388) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #356 Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d52c2abe..2e3fd4745 100644 --- a/Makefile +++ b/Makefile @@ -133,7 +133,7 @@ start-kind: kind load docker-image local/opentelemetry-operator:e2e cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.4.3/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager From e31d09575f3900ecc0f2cd92c85affd38250192f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 11 Aug 2021 11:34:45 +0200 Subject: [PATCH 0250/1234] Bump kuttl to v0.11.1 (#392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- hack/install-kuttl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh index ebe791def..2cc772172 100755 --- a/hack/install-kuttl.sh +++ b/hack/install-kuttl.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.11.0/kubectl-kuttl_0.11.0_linux_x86_64 +sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.11.1/kubectl-kuttl_0.11.1_linux_x86_64 sudo chmod +x /usr/local/bin/kubectl-kuttl export PATH=$PATH:/usr/local/bin From f7b7b9385c302e5d2f73dfd2700ef3cee6a49506 Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Fri, 13 Aug 2021 11:12:58 -0400 Subject: [PATCH 0251/1234] Target Allocator implementation (Part 1 - OTEL Operator Enhancements) (#351) Co-authored-by: Alexis Perez Co-authored-by: Anthony Mirabella --- .github/workflows/publish-images.yaml | 2 + Dockerfile | 3 +- Makefile | 5 +- api/v1alpha1/opentelemetrycollector_types.go | 16 ++ .../opentelemetrycollector_webhook.go | 15 ++ api/v1alpha1/zz_generated.deepcopy.go | 16 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 13 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 13 ++ internal/config/main.go | 58 ++++-- internal/config/options.go | 29 ++- internal/version/main.go | 23 ++- internal/version/main_test.go | 15 ++ main.go | 1 + pkg/collector/adapters/config_to_ports.go | 2 +- pkg/collector/container_test.go | 3 +- pkg/collector/deployment_test.go | 1 - pkg/collector/reconcile/configmap.go | 50 +++++- pkg/collector/reconcile/configmap_test.go | 167 +++++++++++++++--- pkg/collector/reconcile/daemonset.go | 4 +- pkg/collector/reconcile/deployment.go | 15 +- pkg/collector/reconcile/deployment_test.go | 108 ++++++++++- pkg/collector/reconcile/service.go | 34 +++- pkg/collector/reconcile/serviceaccount.go | 4 +- pkg/collector/reconcile/statefulset.go | 4 +- pkg/collector/reconcile/suite_test.go | 70 ++++++-- pkg/collector/reconcile/test.yaml | 22 +++ pkg/naming/main.go | 25 +++ .../adapters/config_to_prom_config.go | 69 ++++++++ .../adapters/config_to_prom_config_test.go | 78 ++++++++ pkg/targetallocator/container.go | 55 ++++++ pkg/targetallocator/container_test.go | 79 +++++++++ pkg/targetallocator/deployment.go | 58 ++++++ pkg/targetallocator/deployment_test.go | 50 ++++++ pkg/targetallocator/labels.go | 39 ++++ pkg/targetallocator/labels_test.go | 57 ++++++ pkg/targetallocator/volume.go | 42 +++++ pkg/targetallocator/volume_test.go | 43 +++++ .../e2e/smoke-targetallocator/00-install.yaml | 8 + .../e2e/smoke-targetallocator/01-install.yaml | 4 + .../e2e/smoke-targetallocator/02-assert.yaml | 21 +++ .../e2e/smoke-targetallocator/02-install.yaml | 33 ++++ .../targetallocator-features/00-install.yaml | 8 + .../targetallocator-features/01-install.yaml | 4 + .../targetallocator-features/02-assert.yaml | 74 ++++++++ .../targetallocator-features/02-install.yaml | 46 +++++ versions.txt | 3 + 46 files changed, 1390 insertions(+), 99 deletions(-) create mode 100644 pkg/collector/reconcile/test.yaml create mode 100644 pkg/targetallocator/adapters/config_to_prom_config.go create mode 100644 pkg/targetallocator/adapters/config_to_prom_config_test.go create mode 100644 pkg/targetallocator/container.go create mode 100644 pkg/targetallocator/container_test.go create mode 100644 pkg/targetallocator/deployment.go create mode 100644 pkg/targetallocator/deployment_test.go create mode 100644 pkg/targetallocator/labels.go create mode 100644 pkg/targetallocator/labels_test.go create mode 100644 pkg/targetallocator/volume.go create mode 100644 pkg/targetallocator/volume_test.go create mode 100644 tests/e2e/smoke-targetallocator/00-install.yaml create mode 100644 tests/e2e/smoke-targetallocator/01-install.yaml create mode 100644 tests/e2e/smoke-targetallocator/02-assert.yaml create mode 100644 tests/e2e/smoke-targetallocator/02-install.yaml create mode 100644 tests/e2e/targetallocator-features/00-install.yaml create mode 100644 tests/e2e/targetallocator-features/01-install.yaml create mode 100644 tests/e2e/targetallocator-features/02-assert.yaml create mode 100644 tests/e2e/targetallocator-features/02-install.yaml diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 1d0e012f1..d81713c05 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -24,6 +24,7 @@ jobs: - name: Set env vars for the job run: | grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "TARGETALLOCATOR_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -72,5 +73,6 @@ jobs: VERSION=${{ env.VERSION }} VERSION_DATE=${{ env.VERSION_DATE }} OTELCOL_VERSION=${{ env.OTELCOL_VERSION }} + TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index bde3f4b0d..b056cb2c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,10 @@ ARG VERSION_PKG ARG VERSION ARG VERSION_DATE ARG OTELCOL_VERSION +ARG TARGETALLOCATOR_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 2e3fd4745..20cdca3a6 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION}" +TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION}" # Image URL to use all building/pushing image targets IMG_PREFIX ?= quay.io/${USER} @@ -122,7 +123,7 @@ set-test-image-vars: # Build the container image, used only for local dev purposes container: - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} . + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} . # Push the container image, used only for local dev purposes container-push: diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index d8528fdb3..63921453a 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -41,6 +41,11 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` + // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + TargetAllocator OpenTelemetryTargetAllocatorSpec `json:"targetAllocator,omitempty"` + // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true @@ -116,6 +121,17 @@ type OpenTelemetryCollectorStatus struct { Messages []string `json:"messages,omitempty"` } +// OpenTelemetryTargetAllocatorSpec defines the configurations for the Prometheus target allocator. +type OpenTelemetryTargetAllocatorSpec struct { + // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // Image indicates the container image to use for the OpenTelemetry TargetAllocator. + // +optional + Image string `json:"image,omitempty"` +} + // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/v1alpha1/opentelemetrycollector_webhook.go index d0ace6187..77499d11d 100644 --- a/api/v1alpha1/opentelemetrycollector_webhook.go +++ b/api/v1alpha1/opentelemetrycollector_webhook.go @@ -21,6 +21,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) // log is for logging in this package. @@ -91,5 +93,18 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) } + // validate target allocation + if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) + } + + // validate Prometheus config for target allocation + if r.Spec.TargetAllocator.Enabled { + _, err := ta.ConfigToPromConfig(r.Spec.Config) + if err != nil { + return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %s", err) + } + } + return nil } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3a2e11fa6..9a0fffd24 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -97,6 +97,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + out.TargetAllocator = in.TargetAllocator if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(v1.SecurityContext) @@ -176,3 +177,18 @@ func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryTargetAllocatorSpec) DeepCopyInto(out *OpenTelemetryTargetAllocatorSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocatorSpec. +func (in *OpenTelemetryTargetAllocatorSpec) DeepCopy() *OpenTelemetryTargetAllocatorSpec { + if in == nil { + return nil + } + out := new(OpenTelemetryTargetAllocatorSpec) + in.DeepCopyInto(out) + return out +} diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 817fa2573..56ac10808 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -442,6 +442,19 @@ spec: description: ServiceAccount indicates the name of an existing service account to use with this instance. type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether + to spawn a target allocation resource or not. + properties: + enabled: + description: Enabled indicates whether to use a target allocation + mechanism for Prometheus targets or not. + type: boolean + image: + description: Image indicates the container image to use for the + OpenTelemetry TargetAllocator. + type: string + type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonsets, statefulsets and deployments diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 13ef39a70..462f10a99 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -430,6 +430,19 @@ spec: description: ServiceAccount indicates the name of an existing service account to use with this instance. type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether + to spawn a target allocation resource or not. + properties: + enabled: + description: Enabled indicates whether to use a target allocation + mechanism for Prometheus targets or not. + type: boolean + image: + description: Image indicates the container image to use for the + OpenTelemetry TargetAllocator. + type: string + type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonsets, statefulsets and deployments diff --git a/internal/config/main.go b/internal/config/main.go index 52b9e4958..d5f2be2d4 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -29,8 +29,9 @@ import ( ) const ( - defaultAutoDetectFrequency = 5 * time.Second - defaultCollectorConfigMapEntry = "collector.yaml" + defaultAutoDetectFrequency = 5 * time.Second + defaultCollectorConfigMapEntry = "collector.yaml" + defaultTargetAllocatorConfigMapEntry = "targetallocator.yaml" ) // Config holds the static configuration for this operator. @@ -44,21 +45,24 @@ type Config struct { onChange []func() error // config state - collectorImage string - collectorConfigMapEntry string - platform platform.Platform - version version.Version + collectorImage string + collectorConfigMapEntry string + targetAllocatorImage string + targetAllocatorConfigMapEntry string + platform platform.Platform + version version.Version } // New constructs a new configuration based on the given options. func New(opts ...Option) Config { // initialize with the default values o := options{ - autoDetectFrequency: defaultAutoDetectFrequency, - collectorConfigMapEntry: defaultCollectorConfigMapEntry, - logger: logf.Log.WithName("config"), - platform: platform.Unknown, - version: version.Get(), + autoDetectFrequency: defaultAutoDetectFrequency, + collectorConfigMapEntry: defaultCollectorConfigMapEntry, + targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, + logger: logf.Log.WithName("config"), + platform: platform.Unknown, + version: version.Get(), } for _, opt := range opts { opt(&o) @@ -70,15 +74,21 @@ func New(opts ...Option) Config { o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:%s", o.version.OpenTelemetryCollector) } + if len(o.targetAllocatorImage) == 0 { + o.targetAllocatorImage = fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", o.version.TargetAllocator) + } + return Config{ - autoDetect: o.autoDetect, - autoDetectFrequency: o.autoDetectFrequency, - collectorImage: o.collectorImage, - collectorConfigMapEntry: o.collectorConfigMapEntry, - logger: o.logger, - onChange: o.onChange, - platform: o.platform, - version: o.version, + autoDetect: o.autoDetect, + autoDetectFrequency: o.autoDetectFrequency, + collectorImage: o.collectorImage, + collectorConfigMapEntry: o.collectorConfigMapEntry, + targetAllocatorImage: o.targetAllocatorImage, + targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, + logger: o.logger, + onChange: o.onChange, + platform: o.platform, + version: o.version, } } @@ -155,6 +165,16 @@ func (c *Config) CollectorConfigMapEntry() string { return c.collectorConfigMapEntry } +// TargetAllocatorImage represents the flag to override the OpenTelemetry TargetAllocator container image. +func (c *Config) TargetAllocatorImage() string { + return c.targetAllocatorImage +} + +// TargetAllocatorConfigMapEntry represents the configuration file name for the TargetAllocator. Immutable. +func (c *Config) TargetAllocatorConfigMapEntry() string { + return c.targetAllocatorConfigMapEntry +} + // Platform represents the type of the platform this operator is running. func (c *Config) Platform() platform.Platform { return c.platform diff --git a/internal/config/options.go b/internal/config/options.go index 41d39bfe3..b8a282145 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -28,14 +28,16 @@ import ( type Option func(c *options) type options struct { - autoDetect autodetect.AutoDetect - autoDetectFrequency time.Duration - collectorImage string - collectorConfigMapEntry string - logger logr.Logger - onChange []func() error - platform platform.Platform - version version.Version + autoDetect autodetect.AutoDetect + autoDetectFrequency time.Duration + targetAllocatorImage string + collectorImage string + collectorConfigMapEntry string + targetAllocatorConfigMapEntry string + logger logr.Logger + onChange []func() error + platform platform.Platform + version version.Version } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -48,6 +50,12 @@ func WithAutoDetectFrequency(t time.Duration) Option { o.autoDetectFrequency = t } } +func WithTargetAllocatorImage(s string) Option { + return func(o *options) { + o.targetAllocatorImage = s + } +} + func WithCollectorImage(s string) Option { return func(o *options) { o.collectorImage = s @@ -58,6 +66,11 @@ func WithCollectorConfigMapEntry(s string) Option { o.collectorConfigMapEntry = s } } +func WithTargetAllocatorConfigMapEntry(s string) Option { + return func(o *options) { + o.targetAllocatorConfigMapEntry = s + } +} func WithLogger(logger logr.Logger) Option { return func(o *options) { o.logger = logger diff --git a/internal/version/main.go b/internal/version/main.go index c0080a4b2..9966a3f6a 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -21,9 +21,10 @@ import ( ) var ( - version string - buildDate string - otelCol string + version string + buildDate string + otelCol string + targetAllocator string ) // Version holds this Operator's version as well as the version of some of the components it uses. @@ -32,6 +33,7 @@ type Version struct { BuildDate string `json:"build-date"` OpenTelemetryCollector string `json:"opentelemetry-collector-version"` Go string `json:"go-version"` + TargetAllocator string `json:"target-allocator-version"` } // Get returns the Version object with the relevant information. @@ -41,16 +43,18 @@ func Get() Version { BuildDate: buildDate, OpenTelemetryCollector: OpenTelemetryCollector(), Go: runtime.Version(), + TargetAllocator: TargetAllocator(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, v.Go, + v.TargetAllocator, ) } @@ -64,3 +68,14 @@ func OpenTelemetryCollector() string { // fallback value, useful for tests return "0.0.0" } + +// TargetAllocator returns the default TargetAllocator to use when no versions are specified via CLI or configuration. +func TargetAllocator() string { + if len(targetAllocator) > 0 { + // this should always be set, as it's specified during the build + return targetAllocator + } + + // fallback value, useful for tests + return "0.0.0" +} diff --git a/internal/version/main_test.go b/internal/version/main_test.go index ec9a02860..785599195 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -34,3 +34,18 @@ func TestVersionFromBuild(t *testing.T) { assert.Equal(t, otelCol, OpenTelemetryCollector()) assert.Contains(t, Get().String(), otelCol) } + +func TestTargetAllocatorFallbackVersion(t *testing.T) { + assert.Equal(t, "0.0.0", TargetAllocator()) +} + +func TestTargetAllocatorVersionFromBuild(t *testing.T) { + // prepare + targetAllocator = "0.0.2" // set during the build + defer func() { + targetAllocator = "" + }() + + assert.Equal(t, targetAllocator, TargetAllocator()) + assert.Contains(t, Get().String(), targetAllocator) +} diff --git a/main.go b/main.go index 0e2aa7ee9..194dc0043 100644 --- a/main.go +++ b/main.go @@ -76,6 +76,7 @@ func main() { logger.Info("Starting the OpenTelemetry Operator", "opentelemetry-operator", v.Operator, "opentelemetry-collector", v.OpenTelemetryCollector, + "opentelemetry-targetallocator", v.TargetAllocator, "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go index 70f12a388..a3fc2822c 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -73,7 +73,7 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ // should we break the process and return an error, or just ignore this faulty parser // and let the other parsers add their ports to the service? right now, the best // option seems to be to log the failures and move on, instead of failing them all - logger.Error(err, "parser for '%s' has returned an error: %v", rcvrName, err) + logger.Error(err, "parser for '%s' has returned an error: %w", rcvrName, err) continue } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 5ada9ec80..82c70aab9 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -17,12 +17,11 @@ package collector_test import ( "testing" + "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index dea1c308c..1cfe13594 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -18,7 +18,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 82d57b539..c628165db 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -19,6 +19,7 @@ import ( "fmt" "reflect" + "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,6 +29,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete @@ -38,14 +41,22 @@ func ConfigMaps(ctx context.Context, params Params) error { desiredConfigMap(ctx, params), } + if params.Instance.Spec.TargetAllocator.Enabled { + cm, err := desiredTAConfigMap(params) + if err != nil { + return fmt.Errorf("failed to parse config: %w", err) + } + desired = append(desired, cm) + } + // first, handle the create/update parts if err := expectedConfigMaps(ctx, params, desired, true); err != nil { - return fmt.Errorf("failed to reconcile the expected configmaps: %v", err) + return fmt.Errorf("failed to reconcile the expected configmaps: %w", err) } // then, delete the extra objects if err := deleteConfigMaps(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the configmaps to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the configmaps to be deleted: %w", err) } return nil @@ -69,6 +80,41 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { } } +func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { + name := naming.TAConfigMap(params.Instance) + labels := targetallocator.Labels(params.Instance) + labels["app.kubernetes.io/name"] = name + + promConfig, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) + if err != nil { + return corev1.ConfigMap{}, err + } + + taConfig := make(map[interface{}]interface{}) + taConfig["label_selector"] = map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", + } + taConfig["config"] = promConfig + taConfigYAML, err := yaml.Marshal(taConfig) + if err != nil { + return corev1.ConfigMap{}, err + } + + return corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.Instance.Namespace, + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Data: map[string]string{ + "targetallocator.yaml": string(taConfigYAML), + }, + }, nil +} + func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap, retry bool) error { for _, obj := range expected { desired := obj diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 7eaee37fc..01747b082 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -19,44 +19,52 @@ import ( "testing" "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) func TestDesiredConfigMap(t *testing.T) { - t.Run("should return expected config map", func(t *testing.T) { - expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/name": "test-collector", - } + expectedLables := map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/part-of": "opentelemetry", + } - expectedData := map[string]string{ - "collector.yaml": ` - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] + t.Run("should return expected collector config map", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" -`, + expectedData := map[string]string{ + "collector.yaml": `processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging]`, } actual := desiredConfigMap(context.Background(), params()) @@ -67,20 +75,56 @@ func TestDesiredConfigMap(t *testing.T) { }) + t.Run("should return expected target allocator config map", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + expectedLables["app.kubernetes.io/name"] = "test-targetallocator" + + expectedData := map[string]string{ + "targetallocator.yaml": `config: + scrape_configs: + job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: + - 0.0.0.0:8888 + - 0.0.0.0:9999 +label_selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +`, + } + + actual, err := desiredTAConfigMap(params()) + assert.NoError(t, err) + + assert.Equal(t, "test-targetallocator", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + } func TestExpectedConfigMap(t *testing.T) { - t.Run("should create config map", func(t *testing.T) { - err := expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}, true) + t.Run("should create collector and target allocator config maps", func(t *testing.T) { + configMap, err := desiredTAConfigMap(params()) + assert.NoError(t, err) + err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params()), configMap}, true) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) assert.NoError(t, err) assert.True(t, exists) + + exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) }) - t.Run("should update config map", func(t *testing.T) { + t.Run("should update collector config map", func(t *testing.T) { param := Params{ Config: config.New(), @@ -115,6 +159,71 @@ func TestExpectedConfigMap(t *testing.T) { assert.Equal(t, params().Instance.Spec.Config, actual.Data["collector.yaml"]) }) + t.Run("should update target allocator config map", func(t *testing.T) { + + param := Params{ + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + Enabled: true, + }, + Config: "", + }, + }, + Scheme: testScheme, + Log: logger, + } + cm, err := desiredTAConfigMap(param) + assert.EqualError(t, err, "no receivers available as part of the configuration") + createObjectIfNotExists(t, "test-targetallocator", &cm) + + configMap, err := desiredTAConfigMap(params()) + assert.NoError(t, err) + err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{configMap}, true) + assert.NoError(t, err) + + actual := v1.ConfigMap{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + + parmConfig, err := ta.ConfigToPromConfig(params().Instance.Spec.Config) + assert.NoError(t, err) + + taConfig := make(map[interface{}]interface{}) + taConfig["label_selector"] = map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", + } + taConfig["config"] = parmConfig + taConfigYAML, _ := yaml.Marshal(taConfig) + + assert.Equal(t, string(taConfigYAML), actual.Data["targetallocator.yaml"]) + }) + t.Run("should delete config map", func(t *testing.T) { deletecm := v1.ConfigMap{ diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index fa6a1a6f8..8acbfa222 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -38,12 +38,12 @@ func DaemonSets(ctx context.Context, params Params) error { // first, handle the create/update parts if err := expectedDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected daemon sets: %v", err) + return fmt.Errorf("failed to reconcile the expected daemon sets: %w", err) } // then, delete the extra objects if err := deleteDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the daemon sets to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the daemon sets to be deleted: %w", err) } return nil diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 41b0f0de6..817639094 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -25,6 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) // +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete @@ -36,14 +37,18 @@ func Deployments(ctx context.Context, params Params) error { desired = append(desired, collector.Deployment(params.Config, params.Log, params.Instance)) } + if params.Instance.Spec.TargetAllocator.Enabled { + desired = append(desired, targetallocator.Deployment(params.Config, params.Log, params.Instance)) + } + // first, handle the create/update parts if err := expectedDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %v", err) + return fmt.Errorf("failed to reconcile the expected deployments: %w", err) } // then, delete the extra objects if err := deleteDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the deployments to be deleted: %w", err) } return nil @@ -79,7 +84,11 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.Labels = map[string]string{} } - updated.Spec = desired.Spec + if desired.Labels["app.kubernetes.io/component"] == "opentelemetry-targetallocator" { + updated.Spec.Template.Spec.Containers[0].Image = desired.Spec.Template.Spec.Containers[0].Image + } else { + updated.Spec = desired.Spec + } updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences for k, v := range desired.ObjectMeta.Annotations { diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 7295ef05f..668cb9319 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -24,14 +24,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) func TestExpectedDeployments(t *testing.T) { param := params() expectedDeploy := collector.Deployment(param.Config, logger, param.Instance) + expectedTADeploy := targetallocator.Deployment(param.Config, logger, param.Instance) - t.Run("should create deployment", func(t *testing.T) { + t.Run("should create collector deployment", func(t *testing.T) { err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) assert.NoError(t, err) @@ -41,6 +44,64 @@ func TestExpectedDeployments(t *testing.T) { assert.True(t, exists) }) + + t.Run("should create target allocator deployment", func(t *testing.T) { + err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedTADeploy}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) + + }) + + t.Run("should not create target allocator deployment when targetallocator is not enabled", func(t *testing.T) { + param := Params{ + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Config: ` + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + + `, + }, + }, + Scheme: testScheme, + Log: logger, + } + expected := []v1.Deployment{} + if param.Instance.Spec.TargetAllocator.Enabled { + expected = append(expected, targetallocator.Deployment(param.Config, param.Log, param.Instance)) + } + + assert.Len(t, expected, 0) + }) + t.Run("should update deployment", func(t *testing.T) { createObjectIfNotExists(t, "test-collector", &expectedDeploy) err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) @@ -55,6 +116,51 @@ func TestExpectedDeployments(t *testing.T) { assert.Equal(t, int32(2), *actual.Spec.Replicas) }) + t.Run("should not update target allocator deployment when the container image is not updated", func(t *testing.T) { + ctx := context.Background() + createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) + orgUID := expectedTADeploy.OwnerReferences[0].UID + + updatedParam, err := newParams("test/test-img") + assert.NoError(t, err) + updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, param.Instance) + *updatedDeploy.Spec.Replicas = int32(3) + + err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) + assert.Equal(t, expectedTADeploy.Spec.Template.Spec.Containers[0].Image, actual.Spec.Template.Spec.Containers[0].Image) + assert.Equal(t, int32(1), *actual.Spec.Replicas) + }) + + t.Run("should update target allocator deployment when the container image is updated", func(t *testing.T) { + ctx := context.Background() + createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) + orgUID := expectedTADeploy.OwnerReferences[0].UID + + updatedParam, err := newParams("test/test-img") + assert.NoError(t, err) + updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) + + err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) + assert.NotEqual(t, expectedTADeploy.Spec.Template.Spec.Containers[0].Image, actual.Spec.Template.Spec.Containers[0].Image) + assert.Equal(t, int32(1), *actual.Spec.Replicas) + }) + t.Run("should delete deployment", func(t *testing.T) { labels := map[string]string{ "app.kubernetes.io/instance": "default.test", diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 4f5f09813..b1c923944 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -23,6 +23,7 @@ import ( k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -30,6 +31,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete @@ -48,14 +50,18 @@ func Services(ctx context.Context, params Params) error { } } + if params.Instance.Spec.TargetAllocator.Enabled { + desired = append(desired, desiredTAService(params)) + } + // first, handle the create/update parts if err := expectedServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected services: %v", err) + return fmt.Errorf("failed to reconcile the expected services: %w", err) } // then, delete the extra objects if err := deleteServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the services to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the services to be deleted: %w", err) } return nil @@ -121,6 +127,30 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { } } +func desiredTAService(params Params) corev1.Service { + labels := targetallocator.Labels(params.Instance) + labels["app.kubernetes.io/name"] = naming.TAService(params.Instance) + + selector := targetallocator.Labels(params.Instance) + selector["app.kubernetes.io/name"] = naming.TargetAllocator(params.Instance) + + return corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.TAService(params.Instance), + Namespace: params.Instance.Namespace, + Labels: labels, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + Ports: []corev1.ServicePort{{ + Name: "targetallocation", + Port: 80, + TargetPort: intstr.FromInt(8080), + }}, + }, + } +} + func headless(ctx context.Context, params Params) *corev1.Service { h := desiredService(ctx, params) if h == nil { diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 9bdbaf544..ecf140b3d 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -39,12 +39,12 @@ func ServiceAccounts(ctx context.Context, params Params) error { // first, handle the create/update parts if err := expectedServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected service accounts: %v", err) + return fmt.Errorf("failed to reconcile the expected service accounts: %w", err) } // then, delete the extra objects if err := deleteServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the service accounts to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the service accounts to be deleted: %w", err) } return nil diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index 046858698..e1ab648b1 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -39,12 +39,12 @@ func StatefulSets(ctx context.Context, params Params) error { // first, handle the create/update parts if err := expectedStatefulSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected stateful sets: %v", err) + return fmt.Errorf("failed to reconcile the expected stateful sets: %w", err) } // then, delete the extra objects if err := deleteStatefulSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the stateful sets to be deleted: %v", err) + return fmt.Errorf("failed to reconcile the stateful sets to be deleted: %w", err) } return nil diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index d2469ad44..7fbb84c52 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -17,6 +17,7 @@ package reconcile import ( "context" "fmt" + "io/ioutil" "os" "path/filepath" "testing" @@ -82,6 +83,10 @@ func TestMain(m *testing.M) { func params() Params { replicas := int32(2) + configYAML, err := ioutil.ReadFile("test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } return Params{ Config: config.New(), Client: k8sClient, @@ -106,24 +111,7 @@ func params() Params { NodePort: 0, }}, Replicas: &replicas, - Config: ` - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] - -`, + Config: string(configYAML), }, }, Scheme: testScheme, @@ -132,6 +120,52 @@ func params() Params { } } +func newParams(containerImage string) (Params, error) { + replicas := int32(1) + configYAML, err := ioutil.ReadFile("test.yaml") + if err != nil { + return Params{}, fmt.Errorf("Error getting yaml file: %w", err) + } + + cfg := config.New() + + return Params{ + Config: cfg, + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + Enabled: true, + Image: containerImage, + }, + Replicas: &replicas, + Config: string(configYAML), + }, + }, + Scheme: testScheme, + Log: logger, + }, nil +} + func createObjectIfNotExists(tb testing.TB, name string, object client.Object) { tb.Helper() err := k8sClient.Get(context.Background(), client.ObjectKey{Namespace: "default", Name: name}, object) diff --git a/pkg/collector/reconcile/test.yaml b/pkg/collector/reconcile/test.yaml new file mode 100644 index 000000000..e88b11024 --- /dev/null +++ b/pkg/collector/reconcile/test.yaml @@ -0,0 +1,22 @@ +processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/pkg/naming/main.go b/pkg/naming/main.go index cf18051a4..49970f4ec 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -26,21 +26,41 @@ func ConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } +// TAConfigMap returns the name for the config map used in the TargetAllocator. +func TAConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-targetallocator", otelcol.Name) +} + // ConfigMapVolume returns the name to use for the config map's volume in the pod. func ConfigMapVolume() string { return "otc-internal" } +// TAConfigMapVolume returns the name to use for the config map's volume in the TargetAllocator pod. +func TAConfigMapVolume() string { + return "ta-internal" +} + // Container returns the name to use for the container in the pod. func Container() string { return "otc-container" } +// TAContainer returns the name to use for the container in the TargetAllocator pod. +func TAContainer() string { + return "ta-container" +} + // Collector builds the collector (deployment/daemonset) name based on the instance. func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } +// TargetAllocator returns the TargetAllocator deployment resource name. +func TargetAllocator(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-targetallocator", otelcol.Name) +} + // HeadlessService builds the name for the headless service based on the instance. func HeadlessService(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-headless", Service(otelcol)) @@ -56,6 +76,11 @@ func Service(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) } +// TAService returns the name to use for the TargetAllocator service. +func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { + return fmt.Sprintf("%s-targetallocator", otelcol.Name) +} + // ServiceAccount builds the service account name based on the instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { return fmt.Sprintf("%s-collector", otelcol.Name) diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/pkg/targetallocator/adapters/config_to_prom_config.go new file mode 100644 index 000000000..b4ba5f4d5 --- /dev/null +++ b/pkg/targetallocator/adapters/config_to_prom_config.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func errorNoComponent(component string) error { + return fmt.Errorf("no %s available as part of the configuration", component) +} + +func errorNotAMap(component string) error { + return fmt.Errorf("%s property in the configuration doesn't contain valid %s", component, component) +} + +// ConfigToPromConfig converts the incoming configuration object into a the Prometheus receiver config. +func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { + config, err := adapters.ConfigFromString(cfg) + if err != nil { + return nil, err + } + + receiversProperty, ok := config["receivers"] + if !ok { + return nil, errorNoComponent("receivers") + } + + receivers, ok := receiversProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("receivers") + } + + prometheusProperty, ok := receivers["prometheus"] + if !ok { + return nil, errorNoComponent("prometheus") + } + + prometheus, ok := prometheusProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheus") + } + + prometheusConfigProperty, ok := prometheus["config"] + if !ok { + return nil, errorNoComponent("prometheusConfig") + } + + prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheusConfig") + } + + return prometheusConfig, nil +} diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/pkg/targetallocator/adapters/config_to_prom_config_test.go new file mode 100644 index 000000000..ba5cc2978 --- /dev/null +++ b/pkg/targetallocator/adapters/config_to_prom_config_test.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters_test + +import ( + "fmt" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" +) + +func TestExtractPromConfigFromConfig(t *testing.T) { + configStr := `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" + prometheus: + config: + scrape_config: + job_name: otel-collector + scrape_interval: 10s + jaeger/custom: + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 +` + expectedData := map[interface{}]interface{}{ + "scrape_config": map[interface{}]interface{}{ + "job_name": "otel-collector", + "scrape_interval": "10s", + }, + } + + // test + promConfig, err := ta.ConfigToPromConfig(configStr) + assert.NoError(t, err) + + // verify + assert.Equal(t, expectedData, promConfig) +} + +func TestExtractPromConfigFromNullConfig(t *testing.T) { + configStr := `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" + prometheus: + config: + jaeger/custom: + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 +` + + // test + promConfig, err := ta.ConfigToPromConfig(configStr) + assert.Equal(t, err, fmt.Errorf("%s property in the configuration doesn't contain valid %s", "prometheusConfig", "prometheusConfig")) + + // verify + assert.True(t, reflect.ValueOf(promConfig).IsNil()) +} diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go new file mode 100644 index 000000000..139f9126e --- /dev/null +++ b/pkg/targetallocator/container.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Container builds a container for the given TargetAllocator. +func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { + image := otelcol.Spec.TargetAllocator.Image + if len(image) == 0 { + image = cfg.TargetAllocatorImage() + } + + volumeMounts := []corev1.VolumeMount{{ + Name: naming.TAConfigMapVolume(), + MountPath: "/conf", + }} + + envVars := []corev1.EnvVar{} + + envVars = append(envVars, corev1.EnvVar{ + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }) + + return corev1.Container{ + Name: naming.TAContainer(), + Image: image, + Env: envVars, + VolumeMounts: volumeMounts, + } +} diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go new file mode 100644 index 000000000..70314f3b6 --- /dev/null +++ b/pkg/targetallocator/container_test.go @@ -0,0 +1,79 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +var logger = logf.Log.WithName("unit-tests") + +func TestContainerNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New(config.WithTargetAllocatorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "default-image", c.Image) +} + +func TestContainerWithImageOverridden(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + Enabled: true, + Image: "overridden-image", + }, + }, + } + cfg := config.New(config.WithTargetAllocatorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "overridden-image", c.Image) +} + +func TestContainerVolumes(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + Enabled: true, + Image: "default-image", + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Len(t, c.VolumeMounts, 1) + assert.Equal(t, naming.TAConfigMapVolume(), c.VolumeMounts[0].Name) +} diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go new file mode 100644 index 000000000..d05052dae --- /dev/null +++ b/pkg/targetallocator/deployment.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Deployment builds the deployment for the given instance. +func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.TargetAllocator(otelcol) + + var replicas int32 = 1 + + return appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.TargetAllocator(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), + }, + }, + }, + } +} diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go new file mode 100644 index 000000000..302c78ac7 --- /dev/null +++ b/pkg/targetallocator/deployment_test.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +func TestDeploymentNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-targetallocator", d.Name) + assert.Equal(t, "my-instance-targetallocator", d.Labels["app.kubernetes.io/name"]) + + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + + // none of the default annotations should propagate down to the pod + assert.Empty(t, d.Spec.Template.Annotations) + + // the pod selector should match the pod spec's labels + assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) +} diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go new file mode 100644 index 000000000..f825d633d --- /dev/null +++ b/pkg/targetallocator/labels.go @@ -0,0 +1,39 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +// Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. +func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { + // new map every time, so that we don't touch the instance's label + base := map[string]string{} + if nil != instance.Labels { + for k, v := range instance.Labels { + base[k] = v + } + } + + base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) + base["app.kubernetes.io/part-of"] = "opentelemetry" + base["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + + return base +} diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go new file mode 100644 index 000000000..83accd55f --- /dev/null +++ b/pkg/targetallocator/labels_test.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" +) + +func TestLabelsCommonSet(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + }, + } + + // test + labels := Labels(otelcol) + assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) +} + +func TestLabelsPropagateDown(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"myapp": "mycomponent"}, + }, + } + + // test + labels := Labels(otelcol) + + // verify + assert.Len(t, labels, 5) + assert.Equal(t, "mycomponent", labels["myapp"]) +} diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go new file mode 100644 index 000000000..33f901ff6 --- /dev/null +++ b/pkg/targetallocator/volume.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// Volumes builds the volumes for the given instance, including the config map volume. +func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.Volume { + volumes := []corev1.Volume{{ + Name: naming.TAConfigMapVolume(), + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: naming.TAConfigMap(otelcol)}, + Items: []corev1.KeyToPath{ + { + Key: cfg.TargetAllocatorConfigMapEntry(), + Path: cfg.TargetAllocatorConfigMapEntry(), + }}, + }, + }, + }} + + return volumes +} diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go new file mode 100644 index 000000000..11b0da1f2 --- /dev/null +++ b/pkg/targetallocator/volume_test.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +func TestVolumeNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{} + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + assert.Len(t, volumes, 1) + + //check if the number of elements in the volume source items list is 1 + assert.Len(t, volumes[0].VolumeSource.ConfigMap.Items, 1) + + // check that it's the ta-internal volume, with the config map + assert.Equal(t, naming.TAConfigMapVolume(), volumes[0].Name) +} diff --git a/tests/e2e/smoke-targetallocator/00-install.yaml b/tests/e2e/smoke-targetallocator/00-install.yaml new file mode 100644 index 000000000..9e5058d82 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/00-install.yaml @@ -0,0 +1,8 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: pod-view +rules: +- apiGroups: [""] + resources: [ "pods" ] + verbs: [ "get", "list", "watch"] diff --git a/tests/e2e/smoke-targetallocator/01-install.yaml b/tests/e2e/smoke-targetallocator/01-install.yaml new file mode 100644 index 000000000..d0ccd9086 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/01-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/02-assert.yaml new file mode 100644 index 000000000..20e774ce9 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/02-assert.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-collector +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: stateful-targetallocator +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: stateful-targetallocator + \ No newline at end of file diff --git a/tests/e2e/smoke-targetallocator/02-install.yaml b/tests/e2e/smoke-targetallocator/02-install.yaml new file mode 100644 index 000000000..36eb9c9b1 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/02-install.yaml @@ -0,0 +1,33 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + targetAllocator: + enabled: true + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + processors: + + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml new file mode 100644 index 000000000..aeffa74b7 --- /dev/null +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -0,0 +1,8 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: pod-view +rules: +- apiGroups: [""] + resources: [ "pods" ] + verbs: [ "get", "list", "watch"] \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/01-install.yaml b/tests/e2e/targetallocator-features/01-install.yaml new file mode 100644 index 000000000..d0ccd9086 --- /dev/null +++ b/tests/e2e/targetallocator-features/01-install.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/02-assert.yaml new file mode 100644 index 000000000..cca13596e --- /dev/null +++ b/tests/e2e/targetallocator-features/02-assert.yaml @@ -0,0 +1,74 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-collector +spec: + podManagementPolicy: Parallel + template: + spec: + containers: + - args: + - --config=/conf/collector.yaml + name: otc-container + volumeMounts: + - mountPath: /conf + name: otc-internal + - mountPath: /usr/share/testvolume + name: testvolume + volumes: + - configMap: + items: + - key: collector.yaml + path: collector.yaml + name: stateful-collector + name: otc-internal + - emptyDir: {} + name: testvolume + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: testvolume + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + volumeMode: Filesystem +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: stateful-targetallocator +spec: + template: + spec: + containers: + - name: ta-container + env: + - name: OTELCOL_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - mountPath: /conf + name: ta-internal + volumes: + - configMap: + items: + - key: targetallocator.yaml + path: targetallocator.yaml + name: stateful-targetallocator + name: ta-internal +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: stateful-targetallocator \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/02-install.yaml b/tests/e2e/targetallocator-features/02-install.yaml new file mode 100644 index 000000000..fc30d5d3e --- /dev/null +++ b/tests/e2e/targetallocator-features/02-install.yaml @@ -0,0 +1,46 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + volumes: + - name: testvolume + volumeMounts: + - name: testvolume + mountPath: /usr/share/testvolume + volumeClaimTemplates: + - metadata: + name: testvolume + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi + targetAllocator: + enabled: true + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + processors: + + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/versions.txt b/versions.txt index 0ed4e12ba..efc8a1110 100644 --- a/versions.txt +++ b/versions.txt @@ -6,3 +6,6 @@ opentelemetry-collector=0.31.0 # Represents the current release of the OpenTelemetry Operator. operator=0.31.0 + +# Represents the current release of the Target Allocator. +targetallocator=0.1.0 From 2f4fe38e163b53d980bc2843c2af79698d76fbad Mon Sep 17 00:00:00 2001 From: Owais Lone Date: Thu, 19 Aug 2021 12:58:08 +0530 Subject: [PATCH 0252/1234] Allow running daemonset in hostNetwork mode (#393) * Allow running daemonset in hostNetwork mode * Added daemonset e2e tests --- api/v1alpha1/opentelemetrycollector_types.go | 5 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 ++++ docs/otelcol_cr_spec.md | 3 +++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 16 ++++++++++++++ tests/e2e/daemonset-features/00-assert.yaml | 14 +++++++++++++ tests/e2e/daemonset-features/00-install.yaml | 21 +++++++++++++++++++ 8 files changed, 68 insertions(+) create mode 100644 tests/e2e/daemonset-features/00-assert.yaml create mode 100644 tests/e2e/daemonset-features/00-install.yaml diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 63921453a..4df302853 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -61,6 +61,11 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + // HostNetwork indicates if the pod should run in the host networking namespace. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + HostNetwork bool `json:"hostNetwork,omitempty"` + // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. // +optional // +listType=atomic diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 56ac10808..cdeb69596 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -182,6 +182,10 @@ spec: - name type: object type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean image: description: Image indicates the container image to use for the OpenTelemetry Collector. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 462f10a99..80da91227 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -170,6 +170,10 @@ spec: - name type: object type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean image: description: Image indicates the container image to use for the OpenTelemetry Collector. diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index 79538808c..fbca33397 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -64,6 +64,9 @@ spec: // +optional SecurityContext will be set as the container security context. securityContext: {} + + // +optional HostNetwork indicates if the pod should run in the host networking namespace. + hostNetwork: false // +optional Toleration to schedule OpenTelemetry Collector pods. // This is only relevant to daemonsets, statefulsets and deployments diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 7c981ee10..719e1e6af 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -53,6 +53,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, + HostNetwork: otelcol.Spec.HostNetwork, }, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 79bf9cffd..35791574a 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -56,3 +56,19 @@ func TestDaemonSetNewDefault(t *testing.T) { // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Selector.MatchLabels, d.Spec.Template.Labels) } + +func TestDaemonsetHostNetwork(t *testing.T) { + // test + d1 := DaemonSet(config.New(), logger, v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + }) + assert.False(t, d1.Spec.Template.Spec.HostNetwork) + + // verify custom + d2 := DaemonSet(config.New(), logger, v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + }, + }) + assert.True(t, d2.Spec.Template.Spec.HostNetwork) +} diff --git a/tests/e2e/daemonset-features/00-assert.yaml b/tests/e2e/daemonset-features/00-assert.yaml new file mode 100644 index 000000000..d862c1f6a --- /dev/null +++ b/tests/e2e/daemonset-features/00-assert.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: daemonset-collector +spec: + template: + spec: + hostNetwork: true + containers: + - args: + - --config=/conf/collector.yaml + name: otc-container +status: + numberReady: 1 diff --git a/tests/e2e/daemonset-features/00-install.yaml b/tests/e2e/daemonset-features/00-install.yaml new file mode 100644 index 000000000..3dde940cf --- /dev/null +++ b/tests/e2e/daemonset-features/00-install.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: daemonset +spec: + mode: daemonset + hostNetwork: true + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] From 9e8b6132d1e8a797b483b22e8ea5a16665964139 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Aug 2021 07:31:43 +0000 Subject: [PATCH 0253/1234] Bump sigs.k8s.io/controller-runtime from 0.9.5 to 0.9.6 (#390) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.9.5 to 0.9.6. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.9.5...v0.9.6) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f5063e4f2..1124c7744 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( k8s.io/apimachinery v0.22.0 k8s.io/client-go v0.22.0 k8s.io/kubectl v0.22.0 - sigs.k8s.io/controller-runtime v0.9.5 + sigs.k8s.io/controller-runtime v0.9.6 ) replace ( diff --git a/go.sum b/go.sum index a959900ea..a1bc415fb 100644 --- a/go.sum +++ b/go.sum @@ -839,8 +839,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.5 h1:WThcFE6cqctTn2jCZprLICO6BaKZfhsT37uAapTNfxc= -sigs.k8s.io/controller-runtime v0.9.5/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= +sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew= +sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= From a5bdca1ad725b0325eb63d83517748b31d5c72d7 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 19 Aug 2021 20:35:54 +0530 Subject: [PATCH 0254/1234] Add statsd receiver (#364) * add statsd receiver * update notes on syncing up receivers in CONTRIBUTING.md --- CONTRIBUTING.md | 2 ++ pkg/collector/parser/receiver_generic.go | 3 ++ pkg/collector/parser/receiver_generic_test.go | 1 + pkg/collector/parser/receiver_statsd.go | 34 +++++++++++++++++++ pkg/collector/parser/receiver_statsd_test.go | 17 ++++++++++ 5 files changed, 57 insertions(+) create mode 100644 pkg/collector/parser/receiver_statsd.go create mode 100644 pkg/collector/parser/receiver_statsd_test.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b940d8ce..edef46487 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,6 +85,8 @@ For a general overview of the directories from this operator and what to expect Your contribution is welcome! For it to be accepted, we have a few standards that must be followed. +If you are contributing to sync the receivers from [otel-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib), note that the operator only synchronizes receivers that aren't scrapers, as there's no need to open ports in services for this case. In general, receivers would open a UDP/TCP port and the operator should be adding an entry in the Kubernetes Service resource accordingly. + ### New features Before starting the development of a new feature, please create an issue and discuss it with the project maintainers. Features should come with documentation and enough tests (unit and/or end-to-end). diff --git a/pkg/collector/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go index c4e4e1ae0..da6a2e666 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -32,6 +32,9 @@ type GenericReceiver struct { parserName string } +// NOTE: Operator will sync with only receivers that aren't scrapers. Operator sync up receivers +// so that it can expose the required port based on the receiver's config. Receiver scrapers are ignored. + // NewGenericReceiverParser builds a new parser for generic receivers. func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 985343e29..82c52de6b 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -76,6 +76,7 @@ func TestDownstreamParsers(t *testing.T) { {"wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser}, {"zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser}, {"fluentforward", "fluentforward", "__fluentforward", 8006, parser.NewFluentForwardReceiverParser}, + {"statsd", "statsd", "__statsd", 8125, parser.NewStatsdReceiverParser}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { diff --git a/pkg/collector/parser/receiver_statsd.go b/pkg/collector/parser/receiver_statsd.go new file mode 100644 index 000000000..c8603c26d --- /dev/null +++ b/pkg/collector/parser/receiver_statsd.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import "github.com/go-logr/logr" + +const parserNameStatsd = "__statsd" + +// NewStatsdReceiverParser builds a new parser for Statsd receivers, from the contrib repository. +func NewStatsdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + logger: logger, + name: name, + config: config, + defaultPort: 8125, + parserName: parserNameStatsd, + } +} + +func init() { + Register("statsd", NewStatsdReceiverParser) +} diff --git a/pkg/collector/parser/receiver_statsd_test.go b/pkg/collector/parser/receiver_statsd_test.go new file mode 100644 index 000000000..0ab151935 --- /dev/null +++ b/pkg/collector/parser/receiver_statsd_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +// all tests for the Statsd parser are currently part of the test TestDownstreamParsers From a334b2335990bf45eb2dd9a4cdc245d563df128e Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Thu, 19 Aug 2021 11:41:34 -0400 Subject: [PATCH 0255/1234] Increased StatefulSet timeout (#397) --- tests/e2e/smoke-statefulset/00-assert.yaml | 4 ++++ tests/e2e/smoke-targetallocator/02-assert.yaml | 4 ++++ tests/e2e/statefulset-features/00-assert.yaml | 4 ++++ tests/e2e/targetallocator-features/02-assert.yaml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/tests/e2e/smoke-statefulset/00-assert.yaml b/tests/e2e/smoke-statefulset/00-assert.yaml index 05d4c0b14..a66621b36 100644 --- a/tests/e2e/smoke-statefulset/00-assert.yaml +++ b/tests/e2e/smoke-statefulset/00-assert.yaml @@ -1,3 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/02-assert.yaml index 20e774ce9..f24c3ca28 100644 --- a/tests/e2e/smoke-targetallocator/02-assert.yaml +++ b/tests/e2e/smoke-targetallocator/02-assert.yaml @@ -1,3 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/statefulset-features/00-assert.yaml b/tests/e2e/statefulset-features/00-assert.yaml index 744ba76e2..9d1f25c3b 100644 --- a/tests/e2e/statefulset-features/00-assert.yaml +++ b/tests/e2e/statefulset-features/00-assert.yaml @@ -1,3 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/02-assert.yaml index cca13596e..7c79e7447 100644 --- a/tests/e2e/targetallocator-features/02-assert.yaml +++ b/tests/e2e/targetallocator-features/02-assert.yaml @@ -1,3 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 150 +--- apiVersion: apps/v1 kind: StatefulSet metadata: From 3cfc069aee11110b935b56d4616e86880115075c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 07:37:59 +0000 Subject: [PATCH 0256/1234] Bump k8s.io/kubectl from 0.22.0 to 0.22.1 (#400) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.22.0 to 0.22.1. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.22.0...v0.22.1) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 28 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 1124c7744..590ee6e78 100644 --- a/go.mod +++ b/go.mod @@ -8,10 +8,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.0 - k8s.io/apimachinery v0.22.0 - k8s.io/client-go v0.22.0 - k8s.io/kubectl v0.22.0 + k8s.io/api v0.22.1 + k8s.io/apimachinery v0.22.1 + k8s.io/client-go v0.22.1 + k8s.io/kubectl v0.22.1 sigs.k8s.io/controller-runtime v0.9.6 ) diff --git a/go.sum b/go.sum index a1bc415fb..e37f125bc 100644 --- a/go.sum +++ b/go.sum @@ -800,24 +800,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.0 h1:elCpMZ9UE8dLdYxr55E06TmSeji9I3KH494qH70/y+c= -k8s.io/api v0.22.0/go.mod h1:0AoXXqst47OI/L0oGKq9DG61dvGRPXs7X4/B7KyjBCU= +k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= +k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.0 h1:CqH/BdNAzZl+sr3tc0D3VsK3u6ARVSo3GWyLmfIjbP0= -k8s.io/apimachinery v0.22.0/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= +k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/cli-runtime v0.22.0/go.mod h1:An6zELQ7udUI0GaXvkuMqyopPA14dIgNqpH8cZu1vig= +k8s.io/cli-runtime v0.22.1/go.mod h1:YqwGrlXeEk15Yn3em2xzr435UGwbrCw5x+COQoTYfoo= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.0 h1:sD6o9O6tCwUKCENw8v+HFsuAbq2jCu8cWC61/ydwA50= -k8s.io/client-go v0.22.0/go.mod h1:GUjIuXR5PiEv/RVK5OODUsm6eZk7wtSWZSaSJbpFdGg= +k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= +k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.0 h1:ZTmX8hUqH9T9gc0mM42O+KDgtwTYbVTt2MwmLP0eK8A= -k8s.io/component-base v0.22.0/go.mod h1:SXj6Z+V6P6GsBhHZVbWCw9hFjUdUYnJerlhhPnYCBCg= -k8s.io/component-helpers v0.22.0/go.mod h1:YNIbQI59ayNiU8JHlPIxVkOUYycbKhk5Niy0pcyJOEY= +k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= +k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= +k8s.io/component-helpers v0.22.1/go.mod h1:QvBcDbX+qU5I2tMZABBF5fRwAlQwiv771IGBHK9WYh4= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= @@ -828,9 +828,9 @@ k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kubectl v0.22.0 h1:EBb7xLUaidG/YXAI5AXam3lK2VlnoFShhlMjnJVTbGA= -k8s.io/kubectl v0.22.0/go.mod h1:eeuP92uZbVL2UnOaf0nj9OjtI0hi/nekHU+0isURer0= -k8s.io/metrics v0.22.0/go.mod h1:eYnwafAUNLLpVmY/msoq0RKIKH5C4TzfjKnMZ0Xrt3A= +k8s.io/kubectl v0.22.1 h1:kpXO+ajPNTzAVLDM9pAzCsWH9MtCMr92zpcvXMt7P6E= +k8s.io/kubectl v0.22.1/go.mod h1:mjAOgEbMNMtZWxnfM6jd+nPjPsaoLqO5xanc78WcSbw= +k8s.io/metrics v0.22.1/go.mod h1:i/ZNap89UkV1gLa26dn7fhKAdheJaKy+moOqJbiif7E= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= From ffeab47e049680b1bd61f44c3c39a5aeb7030206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 20 Aug 2021 11:55:01 +0200 Subject: [PATCH 0257/1234] Bump Go to 1.17, remove mergify (#403) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- .github/dependabot.yml | 13 +++-- .github/mergify.yml | 35 ------------- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- Dockerfile | 2 +- api/v1alpha1/zz_generated.deepcopy.go | 1 + go.mod | 52 +++++++++++++++++-- go.sum | 5 +- 9 files changed, 64 insertions(+), 50 deletions(-) delete mode 100644 .github/mergify.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index effa59c4e..04278f7ed 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,16 @@ version: 2 updates: - package-ecosystem: gomod - directory: "/" + directory: / schedule: interval: daily - - package-ecosystem: "github-actions" - directory: "/" + - package-ecosystem: github-actions + directory: / schedule: - interval: "daily" + interval: daily + + - package-ecosystem: docker + directory: / + schedule: + interval: daily \ No newline at end of file diff --git a/.github/mergify.yml b/.github/mergify.yml deleted file mode 100644 index f7b38d2fd..000000000 --- a/.github/mergify.yml +++ /dev/null @@ -1,35 +0,0 @@ -pull_request_rules: - - name: remove outdated reviews - conditions: - - base=main - actions: - dismiss_reviews: {} - - - name: Automatic merge when all checks pass and the PR is approved - conditions: - - "#approved-reviews-by>=1" - - "-draft" - - "status-success=End-to-end tests" - - "status-success=Unit tests" - - "status-success=Code standards (linting)" - - "status-success=Security" - - "status-success=CodeQL" - - "status-success=EasyCLA" - actions: - merge: - method: squash - commit_message: title+body - - - name: automatic merge for Dependabot pull requests - conditions: - - author~=^dependabot(|-preview)\[bot\]$ - - "status-success=End-to-end tests" - - "status-success=Unit tests" - - "status-success=Code standards (linting)" - - "status-success=Security" - - "status-success=CodeQL" - - "status-success=EasyCLA" - actions: - merge: - method: squash - commit_message: title+body diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 38ff9a4f4..21a311ef2 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f289a8d97..09b70184e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -23,7 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1f378f57a..4d572cfc7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,7 +11,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 + go-version: 1.17 - uses: actions/checkout@v2.3.4 diff --git a/Dockerfile b/Dockerfile index b056cb2c2..1c3719cd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.16 as builder +FROM golang:1.17 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 9a0fffd24..091428561 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Copyright The OpenTelemetry Authors diff --git a/go.mod b/go.mod index 590ee6e78..106501a11 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.16 +go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 @@ -15,7 +15,51 @@ require ( sigs.k8s.io/controller-runtime v0.9.6 ) -replace ( - github.com/go-logr/zapr => github.com/go-logr/zapr v0.2.0 - vbom.ml/util => github.com/fvbommel/util v0.0.0-20180919145318-efcd4e0f9787 +require ( + cloud.google.com/go v0.54.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-logr/zapr v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.5 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.18.1 // indirect + golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect + golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apiextensions-apiserver v0.21.3 // indirect + k8s.io/component-base v0.22.1 // indirect + k8s.io/klog/v2 v2.9.0 // indirect + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum index e37f125bc..15eadfa31 100644 --- a/go.sum +++ b/go.sum @@ -142,8 +142,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.2.0 h1:v6Ji8yBW77pva6NkJKQdHLAJKrIJKRHz0RXwPqCHSR4= -github.com/go-logr/zapr v0.2.0/go.mod h1:qhKdvif7YF5GI9NWEpyxTSSBdGmzkNguibrdCNVPunU= +github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -472,7 +472,6 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= From 305ab73717fb9efd377545053c003fa75f4c0280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 20 Aug 2021 11:56:08 +0200 Subject: [PATCH 0258/1234] Update to collector v0.33.0 (#404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #395 Signed-off-by: Juraci Paixão Kröhling --- CHANGELOG.md | 15 +++++++++++++++ README.md | 2 ++ ...ntelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b50e83146..a7f17f808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,21 @@ Changes by Version ================== +0.33.0 (2021-08-20) +------------------- +* Bumped OpenTelemetry Collector to v0.33.0 +* Add statsd receiver ([#364](https://github.com/open-telemetry/opentelemetry-operator/pull/364), [@VineethReddy02](https://github.com/VineethReddy02)) +* Allow running daemonset in hostNetwork mode ([#393](https://github.com/open-telemetry/opentelemetry-operator/pull/393), [@owais](https://github.com/owais)) +* Target Allocator implementation (Part 1 - OTEL Operator Enhancements) ([#351](https://github.com/open-telemetry/opentelemetry-operator/pull/351), [@]()) +* Change the default port for OTLP HTTP ([#373](https://github.com/open-telemetry/opentelemetry-operator/pull/373), [@joaopgrassi](https://github.com/joaopgrassi)) +* Add Kubernetes 1.22 to the test matrix ([#382](https://github.com/open-telemetry/opentelemetry-operator/pull/382), [@jpkrohling](https://github.com/jpkrohling)) +* Add `protocol: TCP` value under `ports` key to avoid the known limitation for Kubernetes 1.19 ([#372](https://github.com/open-telemetry/opentelemetry-operator/pull/372), [@Saber-W](https://github.com/Saber-W)) +* Add fluentforward receiver ([#367](https://github.com/open-telemetry/opentelemetry-operator/pull/367), [@VineethReddy02](https://github.com/VineethReddy02)) + +0.32.0 +------------------- +* We skipped this release. + 0.31.0 (2021-07-29) ------------------- * Bumped OpenTelemetry Collector to v0.31.0 diff --git a/README.md b/README.md index ba610f82d..f8065b2cc 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,8 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.33.0 | v1.20 to v1.22 | +| v0.32.0 (skipped) | n/a | | v0.31.0 | v1.19 to v1.21 | | v0.30.0 | v1.19 to v1.21 | | v0.29.0 | v1.19 to v1.21 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index cfa252920..92b6ecf28 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.31.0 + name: opentelemetry-operator.v0.33.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -206,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:v0.31.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.33.0 name: manager ports: - containerPort: 9443 @@ -298,7 +298,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.31.0 + version: 0.33.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index efc8a1110..f16669f28 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.31.0 +opentelemetry-collector=0.33.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.31.0 +operator=0.33.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 402be272e17c43f7139de14f6b19dabd7cb5c96d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Aug 2021 10:01:37 +0000 Subject: [PATCH 0259/1234] Bump docker/metadata-action from 3.4.1 to 3.5.0 (#405) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.4.1...v3.5.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index d81713c05..557139a7d 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.4.1 + uses: docker/metadata-action@v3.5.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From 63805b216382dfb9c4b9b170d2c699a3c9692e4b Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Wed, 25 Aug 2021 01:27:25 -0700 Subject: [PATCH 0260/1234] Update install-kubebuilder.sh (#410) --- hack/install-kubebuilder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install-kubebuilder.sh b/hack/install-kubebuilder.sh index 0befb55dd..216de0a32 100755 --- a/hack/install-kubebuilder.sh +++ b/hack/install-kubebuilder.sh @@ -2,6 +2,6 @@ os=$(go env GOOS) arch=$(go env GOARCH) -curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/ +curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_${os}_${arch}.tar.gz | tar -xz -C /tmp/ sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder export PATH=$PATH:/usr/local/kubebuilder/bin From 663f49924a93cc631a121a83a961691233d5d9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 25 Aug 2021 10:35:36 +0200 Subject: [PATCH 0261/1234] Update cert-manager to v1.5.2 (#409) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #408 Signed-off-by: Juraci Paixão Kröhling --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 20cdca3a6..2384cc3e7 100644 --- a/Makefile +++ b/Makefile @@ -134,7 +134,7 @@ start-kind: kind load docker-image local/opentelemetry-operator:e2e cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.4.3/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.5.2/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager From 4621407343aaf9cd325d642bf12985783657a679 Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Wed, 25 Aug 2021 01:36:42 -0700 Subject: [PATCH 0262/1234] Added global timeout (#406) --- kuttl-test.yaml | 1 + tests/e2e/smoke-statefulset/00-assert.yaml | 4 ---- tests/e2e/smoke-targetallocator/02-assert.yaml | 4 ---- tests/e2e/statefulset-features/00-assert.yaml | 4 ---- tests/e2e/targetallocator-features/02-assert.yaml | 4 ---- 5 files changed, 1 insertion(+), 16 deletions(-) diff --git a/kuttl-test.yaml b/kuttl-test.yaml index a2073cb81..fe9805a5c 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -11,3 +11,4 @@ commands: - command: sleep 5s testDirs: - ./tests/e2e/ +timeout: 150 diff --git a/tests/e2e/smoke-statefulset/00-assert.yaml b/tests/e2e/smoke-statefulset/00-assert.yaml index a66621b36..05d4c0b14 100644 --- a/tests/e2e/smoke-statefulset/00-assert.yaml +++ b/tests/e2e/smoke-statefulset/00-assert.yaml @@ -1,7 +1,3 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 150 ---- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/02-assert.yaml index f24c3ca28..20e774ce9 100644 --- a/tests/e2e/smoke-targetallocator/02-assert.yaml +++ b/tests/e2e/smoke-targetallocator/02-assert.yaml @@ -1,7 +1,3 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 150 ---- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/statefulset-features/00-assert.yaml b/tests/e2e/statefulset-features/00-assert.yaml index 9d1f25c3b..744ba76e2 100644 --- a/tests/e2e/statefulset-features/00-assert.yaml +++ b/tests/e2e/statefulset-features/00-assert.yaml @@ -1,7 +1,3 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 150 ---- apiVersion: apps/v1 kind: StatefulSet metadata: diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/02-assert.yaml index 7c79e7447..cca13596e 100644 --- a/tests/e2e/targetallocator-features/02-assert.yaml +++ b/tests/e2e/targetallocator-features/02-assert.yaml @@ -1,7 +1,3 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 150 ---- apiVersion: apps/v1 kind: StatefulSet metadata: From 036d6780a3293f06c90058639f6b76a4735526ba Mon Sep 17 00:00:00 2001 From: mmatache <89529881+mmatache@users.noreply.github.com> Date: Thu, 26 Aug 2021 18:43:37 +0300 Subject: [PATCH 0263/1234] Added imagePullPolicy option to CRD (#413) * Added imagePullPolicy option to CRD Signed-off-by: Mihai Matache * updated container test * Ran make bundle * reverted changes to bundle --- api/v1alpha1/opentelemetrycollector_types.go | 5 +++++ ...opentelemetry.io_opentelemetrycollectors.yaml | 4 ++++ ...opentelemetry.io_opentelemetrycollectors.yaml | 4 ++++ docs/otelcol_cr_spec.md | 3 +++ pkg/collector/container.go | 1 + pkg/collector/container_test.go | 16 ++++++++++++++++ 6 files changed, 33 insertions(+) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index 4df302853..eff35f842 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -36,6 +36,11 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Replicas *int32 `json:"replicas,omitempty"` + // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` + // Image indicates the container image to use for the OpenTelemetry Collector. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index cdeb69596..e30f13fbb 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -190,6 +190,10 @@ spec: description: Image indicates the container image to use for the OpenTelemetry Collector. type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 80da91227..3fc5dc89a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -178,6 +178,10 @@ spec: description: Image indicates the container image to use for the OpenTelemetry Collector. type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index fbca33397..fd59381a4 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -37,6 +37,9 @@ spec: // +optional Image indicates the container image to use for the OpenTelemetry Collector. image: "" + + // +optional ImagePullPolicy indicates what image pull policy to be used to retrieve the container image to use for the OpenTelemetry Collector. + imagePullPolicy: "" // +optional ServiceAccount indicates the name of an existing service account to use with this instance. serviceAccount: "" diff --git a/pkg/collector/container.go b/pkg/collector/container.go index bf70d6ffa..9f3aecfb8 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -71,6 +71,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem return corev1.Container{ Name: naming.Container(), Image: image, + ImagePullPolicy: otelcol.Spec.ImagePullPolicy, VolumeMounts: volumeMounts, Args: args, Env: envVars, diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 82c70aab9..cb10e4bc2 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -222,3 +222,19 @@ func TestContainerArgs(t *testing.T) { assert.Contains(t, c.Args, "--metrics-level=detailed") assert.Contains(t, c.Args, "--log-level=debug") } + +func TestContainerImagePullPolicy(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ImagePullPolicy: corev1.PullIfNotPresent, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, c.ImagePullPolicy, corev1.PullIfNotPresent) +} From f23c393ad3c1d8b150ad366de0e96acd097c7ea8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Sep 2021 11:39:44 +0200 Subject: [PATCH 0264/1234] Bump docker/setup-buildx-action from 1.5.1 to 1.6.0 (#418) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.1...v1.6.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 557139a7d..80cffba5c 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -42,7 +42,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.5.1 + uses: docker/setup-buildx-action@v1.6.0 - name: Cache Docker layers uses: actions/cache@v2.1.6 From 55787a8c073fcfa7cfa72025552a1a0e60d120d8 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 8 Sep 2021 15:01:45 +0530 Subject: [PATCH 0265/1234] Add influxdb receiver (#423) --- pkg/collector/parser/receiver_generic_test.go | 1 + pkg/collector/parser/receiver_influxdb.go | 34 +++++++++++++++++++ .../parser/receiver_influxdb_test.go | 17 ++++++++++ 3 files changed, 52 insertions(+) create mode 100644 pkg/collector/parser/receiver_influxdb.go create mode 100644 pkg/collector/parser/receiver_influxdb_test.go diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 82c52de6b..704fa76d2 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -77,6 +77,7 @@ func TestDownstreamParsers(t *testing.T) { {"zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser}, {"fluentforward", "fluentforward", "__fluentforward", 8006, parser.NewFluentForwardReceiverParser}, {"statsd", "statsd", "__statsd", 8125, parser.NewStatsdReceiverParser}, + {"influxdb", "influxdb", "__influxdb", 8086, parser.NewInfluxdbReceiverParser}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { diff --git a/pkg/collector/parser/receiver_influxdb.go b/pkg/collector/parser/receiver_influxdb.go new file mode 100644 index 000000000..55e393f2f --- /dev/null +++ b/pkg/collector/parser/receiver_influxdb.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import "github.com/go-logr/logr" + +const parserNameInfluxdb = "__influxdb" + +// NewInfluxdbReceiverParser builds a new parser for Influxdb receivers, from the contrib repository. +func NewInfluxdbReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + logger: logger, + name: name, + config: config, + defaultPort: 8086, + parserName: parserNameInfluxdb, + } +} + +func init() { + Register("influxdb", NewInfluxdbReceiverParser) +} diff --git a/pkg/collector/parser/receiver_influxdb_test.go b/pkg/collector/parser/receiver_influxdb_test.go new file mode 100644 index 000000000..859720448 --- /dev/null +++ b/pkg/collector/parser/receiver_influxdb_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +// all tests for the Influxdb parser are currently part of the test TestDownstreamParsers From 8b000529fc7ae307ad707d4981fc5d09c0985397 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 9 Sep 2021 09:28:33 +0530 Subject: [PATCH 0266/1234] Add Splunk Hec receiver (#422) --- pkg/collector/parser/receiver_generic_test.go | 1 + pkg/collector/parser/receiver_splunk-hec.go | 34 +++++++++++++++++++ .../parser/receiver_splunk-hec_test.go | 17 ++++++++++ 3 files changed, 52 insertions(+) create mode 100644 pkg/collector/parser/receiver_splunk-hec.go create mode 100644 pkg/collector/parser/receiver_splunk-hec_test.go diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 704fa76d2..0bb6b845b 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -78,6 +78,7 @@ func TestDownstreamParsers(t *testing.T) { {"fluentforward", "fluentforward", "__fluentforward", 8006, parser.NewFluentForwardReceiverParser}, {"statsd", "statsd", "__statsd", 8125, parser.NewStatsdReceiverParser}, {"influxdb", "influxdb", "__influxdb", 8086, parser.NewInfluxdbReceiverParser}, + {"splunk-hec", "splunk-hec", "__splunk_hec", 8088, parser.NewSplunkHecReceiverParser}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { diff --git a/pkg/collector/parser/receiver_splunk-hec.go b/pkg/collector/parser/receiver_splunk-hec.go new file mode 100644 index 000000000..09f75a123 --- /dev/null +++ b/pkg/collector/parser/receiver_splunk-hec.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import "github.com/go-logr/logr" + +const parserNameSplunkHec = "__splunk_hec" + +// NewSplunkHecReceiverParser builds a new parser for Splunk Hec receivers, from the contrib repository. +func NewSplunkHecReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + logger: logger, + name: name, + config: config, + defaultPort: 8088, + parserName: parserNameSplunkHec, + } +} + +func init() { + Register("splunk_hec", NewSplunkHecReceiverParser) +} diff --git a/pkg/collector/parser/receiver_splunk-hec_test.go b/pkg/collector/parser/receiver_splunk-hec_test.go new file mode 100644 index 000000000..3ffc6c0ee --- /dev/null +++ b/pkg/collector/parser/receiver_splunk-hec_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +// all tests for the Splunk Hec parser are currently part of the test TestDownstreamParsers From 145a7163aec3fbd383e7aa4daacdf427e0f9e55c Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 13 Sep 2021 16:31:29 +0530 Subject: [PATCH 0267/1234] Add syslog tcplog and udplog receivers (#425) --- pkg/collector/parser/receiver.go | 43 ++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index 9f3fcc98c..2fcf0209b 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -73,18 +73,42 @@ func IsRegistered(name string) bool { return ok } +var ( + endpointKey = "endpoint" + listenAddressKey = "listen_address" +) + func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *v1.ServicePort { - endpoint, ok := config["endpoint"] - if !ok { - logger.V(2).Info("receiver doesn't have an endpoint") - return nil + var endpoint interface{} + switch { + // syslog receiver contains the endpoint + // that needs to be exposed one level down inside config + // i.e. either in tcp or udp section with field key + // as `listen_address` + case name == "syslog": + var c map[interface{}]interface{} + if udp, isUDP := config["udp"]; isUDP && udp != nil { + c = udp.(map[interface{}]interface{}) + endpoint = getAddressFromConfig(logger, name, listenAddressKey, c) + } else if tcp, isTCP := config["tcp"]; isTCP && tcp != nil { + c = tcp.(map[interface{}]interface{}) + endpoint = getAddressFromConfig(logger, name, listenAddressKey, c) + } + + // tcplog and udplog receivers hold the endpoint + // value in `listen_address` field + case name == "tcplog" || name == "udplog": + endpoint = getAddressFromConfig(logger, name, listenAddressKey, config) + + default: + endpoint = getAddressFromConfig(logger, name, endpointKey, config) } switch endpoint := endpoint.(type) { case string: port, err := portFromEndpoint(endpoint) if err != nil { - logger.WithValues("endpoint", endpoint).Info("couldn't parse the endpoint's port") + logger.WithValues(endpointKey, endpoint).Info("couldn't parse the endpoint's port") return nil } @@ -99,6 +123,15 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in return nil } +func getAddressFromConfig(logger logr.Logger, name, key string, config map[interface{}]interface{}) interface{} { + endpoint, ok := config[key] + if !ok { + logger.V(2).Info("%s receiver doesn't have an %s", name, key) + return nil + } + return endpoint +} + func portName(receiverName string, port int32) string { if len(receiverName) > 63 { return fmt.Sprintf("port-%d", port) From 7fba99655b90a746ca21d76e3ee2af4ffd74a115 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 13 Sep 2021 17:33:14 +0530 Subject: [PATCH 0268/1234] Add aws xray receiver (#421) --- pkg/collector/parser/receiver_aws-xray.go | 34 +++++++++++++++++++ .../parser/receiver_aws-xray_test.go | 17 ++++++++++ pkg/collector/parser/receiver_generic_test.go | 1 + 3 files changed, 52 insertions(+) create mode 100644 pkg/collector/parser/receiver_aws-xray.go create mode 100644 pkg/collector/parser/receiver_aws-xray_test.go diff --git a/pkg/collector/parser/receiver_aws-xray.go b/pkg/collector/parser/receiver_aws-xray.go new file mode 100644 index 000000000..6d8f92c7b --- /dev/null +++ b/pkg/collector/parser/receiver_aws-xray.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import "github.com/go-logr/logr" + +const parserNameAWSXRAY = "__awsxray" + +// NewAWSXrayReceiverParser builds a new parser for AWS xray receivers, from the contrib repository. +func NewAWSXrayReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + return &GenericReceiver{ + logger: logger, + name: name, + config: config, + defaultPort: 2000, + parserName: parserNameAWSXRAY, + } +} + +func init() { + Register("awsxray", NewAWSXrayReceiverParser) +} diff --git a/pkg/collector/parser/receiver_aws-xray_test.go b/pkg/collector/parser/receiver_aws-xray_test.go new file mode 100644 index 000000000..bbd752f08 --- /dev/null +++ b/pkg/collector/parser/receiver_aws-xray_test.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +// all tests for the AWS XRAY parser are currently part of the test TestDownstreamParsers diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 0bb6b845b..7c0766dd6 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -79,6 +79,7 @@ func TestDownstreamParsers(t *testing.T) { {"statsd", "statsd", "__statsd", 8125, parser.NewStatsdReceiverParser}, {"influxdb", "influxdb", "__influxdb", 8086, parser.NewInfluxdbReceiverParser}, {"splunk-hec", "splunk-hec", "__splunk_hec", 8088, parser.NewSplunkHecReceiverParser}, + {"awsxray", "awsxray", "__awsxray", 2000, parser.NewAWSXrayReceiverParser}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { From 095afd053837b1b5ba3cb649be7b1fe1d99c4b24 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 13 Sep 2021 20:29:48 +0530 Subject: [PATCH 0269/1234] Update to collector v0.34.0 (#429) --- CHANGELOG.md | 9 +++++++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f17f808..c088f4901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changes by Version ================== +0.34.0 +------------------- +* Bumped OpenTelemetry Collector to v0.34.0 +* Add AWS xray receiver ([#421](https://github.com/open-telemetry/opentelemetry-operator/pull/421)) +* Add syslog, tcplog and udplog receivers ([#425](https://github.com/open-telemetry/opentelemetry-operator/pull/425)) +* Add splunk hec receiver ([#422](https://github.com/open-telemetry/opentelemetry-operator/pull/422)) +* Add influxdb receiver ([#423](https://github.com/open-telemetry/opentelemetry-operator/pull/423)) +* Added imagePullPolicy option to CRD ([#413](https://github.com/open-telemetry/opentelemetry-operator/pull/413)) + 0.33.0 (2021-08-20) ------------------- * Bumped OpenTelemetry Collector to v0.33.0 diff --git a/README.md b/README.md index f8065b2cc..a93bdfcc2 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.34.0 | v1.20 to v1.22 | | v0.33.0 | v1.20 to v1.22 | | v0.32.0 (skipped) | n/a | | v0.31.0 | v1.19 to v1.21 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 92b6ecf28..b85b7b373 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.33.0 + name: opentelemetry-operator.v0.34.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -206,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:v0.33.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.34.0 name: manager ports: - containerPort: 9443 @@ -298,7 +298,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.33.0 + version: 0.34.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index f16669f28..ed80712bf 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.33.0 +opentelemetry-collector=0.34.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.33.0 +operator=0.34.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 46209517cb08527a773a922de145417972bfd273 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Tue, 14 Sep 2021 14:57:21 +0530 Subject: [PATCH 0270/1234] Add contributors names to chnagelog (#430) --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c088f4901..cec419e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,11 +4,11 @@ Changes by Version 0.34.0 ------------------- * Bumped OpenTelemetry Collector to v0.34.0 -* Add AWS xray receiver ([#421](https://github.com/open-telemetry/opentelemetry-operator/pull/421)) -* Add syslog, tcplog and udplog receivers ([#425](https://github.com/open-telemetry/opentelemetry-operator/pull/425)) -* Add splunk hec receiver ([#422](https://github.com/open-telemetry/opentelemetry-operator/pull/422)) -* Add influxdb receiver ([#423](https://github.com/open-telemetry/opentelemetry-operator/pull/423)) -* Added imagePullPolicy option to CRD ([#413](https://github.com/open-telemetry/opentelemetry-operator/pull/413)) +* Add AWS xray receiver ([#421](https://github.com/open-telemetry/opentelemetry-operator/pull/421), [@VineethReddy02](https://github.com/VineethReddy02)) +* Add syslog, tcplog and udplog receivers ([#425](https://github.com/open-telemetry/opentelemetry-operator/pull/425), [@VineethReddy02](https://github.com/VineethReddy02)) +* Add splunk hec receiver ([#422](https://github.com/open-telemetry/opentelemetry-operator/pull/422), [@VineethReddy02](https://github.com/VineethReddy02)) +* Add influxdb receiver ([#423](https://github.com/open-telemetry/opentelemetry-operator/pull/423), [@VineethReddy02](https://github.com/VineethReddy02)) +* Added imagePullPolicy option to CRD ([#413](https://github.com/open-telemetry/opentelemetry-operator/pull/413), [@mmatache](https://github.com/mmatache)) 0.33.0 (2021-08-20) ------------------- From acab291c603f662b2d62cb19eece685eaf455287 Mon Sep 17 00:00:00 2001 From: Alexis Perez <50466397+alexperez52@users.noreply.github.com> Date: Wed, 15 Sep 2021 03:40:56 -0400 Subject: [PATCH 0271/1234] Target Allocator implementation (Part 2 - Target Allocator Image logic) (#354) * Target Allocation server logic Co-Authored-By: Alexis Perez <50466397+alexperez52@users.noreply.github.com> Co-Authored-By: JBD <108380+rakyll@users.noreply.github.com> * Added cmd to indicate executable * Update cmd/otel-allocator/allocation/allocator.go Co-authored-by: Anthony Mirabella * Update cmd/otel-allocator/allocation/allocator.go Co-authored-by: Anthony Mirabella * Updated discovery manager, collector component and added testing file for collector.go Updated code to parse config using default Prometheus config and added testing file for collector component. * Removed unnecessary struct in config.go * Added load testing * Update cmd/otel-allocator/allocation/allocator.go Co-authored-by: Anthony Mirabella * Update cmd/otel-allocator/allocation/allocator.go Co-authored-by: Anthony Mirabella * Update cmd/otel-allocator/allocation/allocator.go Co-authored-by: Anthony Mirabella * Update cmd/otel-allocator/allocation/allocator.go * Update cmd/otel-allocator/allocation/allocator.go * Removed nextCollector and modified locks * Updated collector.go to reflect new namespace * Refactored display map logic & updated locking convention * Updated container port * Change initialized empty collector to nil collector Co-authored-by: Anthony Mirabella * Updated collector test logic * Updated allocation files * Updated allocation import in main.go * Updated collector & discovery files * Updated unit tallocator unit tests * Updated runWatch to prevent panic * Seperated http logic from allocator logic * Integrated logr * Updated collector test to use channels * Update use of logger and fix error messages * Update test files Co-authored-by: Rahul Varma Co-authored-by: JBD <108380+rakyll@users.noreply.github.com> Co-authored-by: Anthony Mirabella Co-authored-by: Rahul Varma --- cmd/otel-allocator/Dockerfile | 26 + cmd/otel-allocator/allocation/allocator.go | 153 ++ .../allocation/allocator_test.go | 154 ++ cmd/otel-allocator/allocation/http.go | 75 + cmd/otel-allocator/collector/collector.go | 141 ++ .../collector/collector_test.go | 98 + cmd/otel-allocator/config/config.go | 47 + cmd/otel-allocator/config/config_test.go | 47 + .../config/testdata/config_test.yaml | 15 + .../config/testdata/file_sd_test.json | 18 + cmd/otel-allocator/discovery/discovery.go | 77 + .../discovery/discovery_test.go | 82 + .../discovery/testdata/test.yaml | 15 + cmd/otel-allocator/go.mod | 21 + cmd/otel-allocator/go.sum | 1665 +++++++++++++++++ cmd/otel-allocator/main.go | 209 +++ 16 files changed, 2843 insertions(+) create mode 100644 cmd/otel-allocator/Dockerfile create mode 100644 cmd/otel-allocator/allocation/allocator.go create mode 100644 cmd/otel-allocator/allocation/allocator_test.go create mode 100644 cmd/otel-allocator/allocation/http.go create mode 100644 cmd/otel-allocator/collector/collector.go create mode 100644 cmd/otel-allocator/collector/collector_test.go create mode 100644 cmd/otel-allocator/config/config.go create mode 100644 cmd/otel-allocator/config/config_test.go create mode 100644 cmd/otel-allocator/config/testdata/config_test.yaml create mode 100644 cmd/otel-allocator/config/testdata/file_sd_test.json create mode 100644 cmd/otel-allocator/discovery/discovery.go create mode 100644 cmd/otel-allocator/discovery/discovery_test.go create mode 100644 cmd/otel-allocator/discovery/testdata/test.yaml create mode 100644 cmd/otel-allocator/go.mod create mode 100644 cmd/otel-allocator/go.sum create mode 100644 cmd/otel-allocator/main.go diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile new file mode 100644 index 000000000..f87d54e62 --- /dev/null +++ b/cmd/otel-allocator/Dockerfile @@ -0,0 +1,26 @@ +# Build the target allocator binary +FROM golang:1.17 as builder + +WORKDIR /app + +# Copy go mod and sum files +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . . + +# Build the Go app +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . + +######## Start a new stage from scratch ####### +FROM alpine:latest + +RUN apk --no-cache add ca-certificates + +WORKDIR /root/ + +# Copy the pre-built binary file from the previous stage +COPY --from=builder /app/main . + +CMD ["./main"] \ No newline at end of file diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go new file mode 100644 index 000000000..f7280e2cd --- /dev/null +++ b/cmd/otel-allocator/allocation/allocator.go @@ -0,0 +1,153 @@ +package allocation + +import ( + "fmt" + "sync" + + "github.com/go-logr/logr" + "github.com/prometheus/common/model" +) + +/* + Load balancer will serve on an HTTP server exposing /jobs//targets <- these are configured using least connection + Load balancer will need information about the collectors in order to set the URLs + Keep a Map of what each collector currently holds and update it based on new scrape target updates +*/ + +type TargetItem struct { + JobName string + Link LinkJSON + TargetURL string + Label model.LabelSet + Collector *collector +} + +// Create a struct that holds collector - and jobs for that collector +// This struct will be parsed into endpoint with collector and jobs info + +type collector struct { + Name string + NumTargets int +} + +// Allocator makes decisions to distribute work among +// a number of OpenTelemetry collectors based on the number of targets. +// Users need to call SetTargets when they have new targets in their +// clusters and call Reshard to process the new targets and reshard. +type Allocator struct { + m sync.Mutex + + targetsWaiting map[string]TargetItem // temp buffer to keep targets that are waiting to be processed + + collectors map[string]*collector // all current collectors + + TargetItems map[string]*TargetItem + + log logr.Logger +} + +// findNextCollector finds the next collector with less number of targets. +func (allocator *Allocator) findNextCollector() *collector { + var col *collector + for _, v := range allocator.collectors { + // If the initial collector is empty, set the initial collector to the first element of map + if col == nil { + col = v + } else { + if v.NumTargets < col.NumTargets { + col = v + } + } + + } + return col +} + +// SetTargets accepts the a list of targets that will be used to make +// load balancing decisions. This method should be called when where are +// new targets discovered or existing targets are shutdown. +func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { + // Dump old data + allocator.m.Lock() + defer allocator.m.Unlock() + allocator.targetsWaiting = make(map[string]TargetItem, len(targets)) + // Set new data + for _, i := range targets { + allocator.targetsWaiting[i.JobName+i.TargetURL] = i + } +} + +// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. +// SetCollectors is called when Collectors are added or removed +func (allocator *Allocator) SetCollectors(collectors []string) { + log := allocator.log.WithValues("opentelemetry-targetallocator") + + allocator.m.Lock() + defer allocator.m.Unlock() + if len(collectors) == 0 { + log.Info("No collector instances present") + return + } + for k := range allocator.collectors { + delete(allocator.collectors, k) + } + + for _, i := range collectors { + allocator.collectors[i] = &collector{Name: i, NumTargets: 0} + } +} + +// Reallocate needs to be called to process the new target updates. +// Until Reallocate is called, old targets will be served. +func (allocator *Allocator) AllocateTargets() { + allocator.m.Lock() + defer allocator.m.Unlock() + allocator.removeOutdatedTargets() + allocator.processWaitingTargets() +} + +// ReallocateCollectors reallocates the targets among the new collector instances +func (allocator *Allocator) ReallocateCollectors() { + allocator.m.Lock() + defer allocator.m.Unlock() + allocator.TargetItems = make(map[string]*TargetItem) + allocator.processWaitingTargets() +} + +// removeOutdatedTargets removes targets that are no longer available. +func (allocator *Allocator) removeOutdatedTargets() { + for k := range allocator.TargetItems { + if _, ok := allocator.targetsWaiting[k]; !ok { + allocator.collectors[allocator.TargetItems[k].Collector.Name].NumTargets-- + delete(allocator.TargetItems, k) + } + } +} + +// processWaitingTargets processes the newly set targets. +func (allocator *Allocator) processWaitingTargets() { + for k, v := range allocator.targetsWaiting { + if _, ok := allocator.TargetItems[k]; !ok { + col := allocator.findNextCollector() + allocator.TargetItems[k] = &v + targetItem := TargetItem{ + JobName: v.JobName, + Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", v.JobName)}, + TargetURL: v.TargetURL, + Label: v.Label, + Collector: col, + } + col.NumTargets++ + allocator.TargetItems[v.JobName+v.TargetURL] = &targetItem + } + } +} + +func NewAllocator(log logr.Logger) *Allocator { + return &Allocator{ + log: log, + targetsWaiting: make(map[string]TargetItem), + collectors: make(map[string]*collector), + TargetItems: make(map[string]*TargetItem), + } +} diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go new file mode 100644 index 000000000..99b5f34f1 --- /dev/null +++ b/cmd/otel-allocator/allocation/allocator_test.go @@ -0,0 +1,154 @@ +package allocation + +import ( + "math" + "testing" + + "github.com/go-logr/logr" + "github.com/prometheus/common/model" + "github.com/stretchr/testify/assert" +) + +// Tests least connection - The expected collector after running findNextCollector should be the collector with the least amount of workload +func TestFindNextCollector(t *testing.T) { + var log logr.Logger + s := NewAllocator(log) + + defaultCol := collector{Name: "default-col", NumTargets: 1} + maxCol := collector{Name: "max-col", NumTargets: 2} + leastCol := collector{Name: "least-col", NumTargets: 0} + s.collectors[maxCol.Name] = &maxCol + s.collectors[leastCol.Name] = &leastCol + s.collectors[defaultCol.Name] = &defaultCol + + assert.Equal(t, "least-col", s.findNextCollector().Name) +} + +func TestSetCollectors(t *testing.T) { + + var log logr.Logger + s := NewAllocator(log) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + + excpectedColLen := len(cols) + assert.Len(t, s.collectors, excpectedColLen) + + for _, i := range cols { + assert.NotNil(t, s.collectors[i]) + } +} + +func TestAddingAndRemovingTargets(t *testing.T) { + // prepare allocator with initial targets and collectors + var log logr.Logger + s := NewAllocator(log) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + + initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} + var targetList []TargetItem + for _, i := range initTargets { + targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + } + + // test that targets and collectors are added properly + s.SetWaitingTargets(targetList) + s.AllocateTargets() + + // verify + expectedTargetLen := len(initTargets) + assert.Len(t, s.TargetItems, expectedTargetLen) + + // prepare second round of targets + tar := []string{"prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004"} + var newTargetList []TargetItem + for _, i := range tar { + newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + } + + // test that less targets are found - removed + s.SetWaitingTargets(newTargetList) + s.AllocateTargets() + + // verify + expectedNewTargetLen := len(tar) + assert.Len(t, s.TargetItems, expectedNewTargetLen) + + // verify results map + for _, i := range tar { + _, ok := s.TargetItems["sample-name"+i] + assert.True(t, ok) + } +} + +// Tests that the delta in number of targets per collector is less than 15% of an even distribution +func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { + + // prepare allocator with 3 collectors and 'random' amount of targets + var log logr.Logger + s := NewAllocator(log) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + + targets := []string{"prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005", "prometheus:1006", + "prometheus:1011", "prometheus:1012", "prometheus:1013", "prometheus:1014", "prometheus:1015", "prometheus:1016", + "prometheus:1021", "prometheus:1022", "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1026"} + var newTargetList []TargetItem + for _, i := range targets { + newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + } + s.SetWaitingTargets(newTargetList) + s.AllocateTargets() + + // Divisor needed to get 15% + divisor := 6.7 + + count := len(s.TargetItems) / len(s.collectors) + percent := float64(len(s.TargetItems)) / divisor + + // test + for _, i := range s.collectors { + assert.InDelta(t, i.NumTargets, count, percent) + } + + // removing targets at 'random' + targets = []string{"prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1006", + "prometheus:1011", "prometheus:1012", "prometheus:1013", "prometheus:1014", "prometheus:1016", + "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1026"} + newTargetList = []TargetItem{} + for _, i := range targets { + newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + } + s.SetWaitingTargets(newTargetList) + s.AllocateTargets() + + count = len(s.TargetItems) / len(s.collectors) + percent = float64(len(s.TargetItems)) / divisor + + // test + for _, i := range s.collectors { + assert.InDelta(t, i.NumTargets, count, math.Round(percent)) + } + // adding targets at 'random' + targets = []string{"prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1006", + "prometheus:1011", "prometheus:1012", "prometheus:1001", "prometheus:1014", "prometheus:1016", + "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1126", "prometheus:1227"} + newTargetList = []TargetItem{} + for _, i := range targets { + newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + } + s.SetWaitingTargets(newTargetList) + s.AllocateTargets() + + count = len(s.TargetItems) / len(s.collectors) + percent = float64(len(s.TargetItems)) / divisor + + // test + for _, i := range s.collectors { + assert.InDelta(t, i.NumTargets, count, math.Round(percent)) + } +} diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go new file mode 100644 index 000000000..7d850018b --- /dev/null +++ b/cmd/otel-allocator/allocation/http.go @@ -0,0 +1,75 @@ +package allocation + +import ( + "fmt" + + "github.com/prometheus/common/model" +) + +type LinkJSON struct { + Link string `json:"_link"` +} + +type collectorJSON struct { + Link string `json:"_link"` + Jobs []targetGroupJSON `json:"targets"` +} + +type targetGroupJSON struct { + Targets []string `json:"targets"` + Labels model.LabelSet `json:"labels"` +} + +func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *Allocator) map[string]collectorJSON { + displayData := make(map[string]collectorJSON) + for _, j := range allocator.TargetItems { + if j.JobName == job { + var targetList []TargetItem + targetList = append(targetList, cMap[j.Collector.Name+j.JobName]...) + + var targetGroupList []targetGroupJSON + + trg := make(map[string][]TargetItem) + for _, t := range targetList { + trg[t.JobName+t.Label.String()] = append(trg[t.JobName+t.Label.String()], t) + } + labelSetMap := make(map[string]model.LabelSet) + for _, tArr := range trg { + var targets []string + for _, t := range tArr { + labelSetMap[t.TargetURL] = t.Label + targets = append(targets, t.TargetURL) + } + targetGroupList = append(targetGroupList, targetGroupJSON{Targets: targets, Labels: labelSetMap[targets[0]]}) + + } + displayData[j.Collector.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", j.JobName, j.Collector.Name), Jobs: targetGroupList} + + } + } + return displayData +} + +func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator *Allocator) []targetGroupJSON { + var tgs []targetGroupJSON + group := make(map[string][]string) + labelSet := make(map[string]model.LabelSet) + for _, col := range allocator.collectors { + if col.Name == collector { + for _, targetItemArr := range cMap { + for _, targetItem := range targetItemArr { + if targetItem.Collector.Name == collector && targetItem.JobName == job { + group[targetItem.Label.String()] = append(group[targetItem.Label.String()], targetItem.TargetURL) + labelSet[targetItem.TargetURL] = targetItem.Label + } + } + } + } + } + + for _, v := range group { + tgs = append(tgs, targetGroupJSON{Targets: v, Labels: labelSet[v[0]]}) + } + + return tgs +} diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go new file mode 100644 index 000000000..c7162042d --- /dev/null +++ b/cmd/otel-allocator/collector/collector.go @@ -0,0 +1,141 @@ +package collector + +import ( + "context" + "os" + "strconv" + "time" + + "github.com/go-logr/logr" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" +) + +const ( + watcherTimeout = 15 * time.Minute +) + +var ( + ns = os.Getenv("OTELCOL_NAMESPACE") +) + +type Client struct { + log logr.Logger + k8sClient kubernetes.Interface + collectorChan chan []string + close chan struct{} +} + +func NewClient(logger logr.Logger) (*Client, error) { + config, err := rest.InClusterConfig() + if err != nil { + return &Client{}, err + } + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return &Client{}, err + } + + return &Client{ + log: logger, + k8sClient: clientset, + close: make(chan struct{}), + }, nil +} + +func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors []string)) { + collectorMap := map[string]bool{} + log := k.log.WithValues("opentelemetry-targetallocator") + + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(labelMap).String(), + } + pods, err := k.k8sClient.CoreV1().Pods(ns).List(ctx, opts) + if err != nil { + log.Error(err, "Pod failure") + os.Exit(1) + } + for i := range pods.Items { + pod := pods.Items[i] + if pod.GetObjectMeta().GetDeletionTimestamp() == nil { + collectorMap[pod.Name] = true + } + } + + collectorKeys := make([]string, len(collectorMap)) + i := 0 + for keys := range collectorMap { + collectorKeys[i] = keys + i++ + } + fn(collectorKeys) + + go func() { + for { + watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) + if err != nil { + log.Error(err, "unable to create collector pod watcher") + return + } + if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { + log.Info("Collector pod watch event stopped", msg) + return + } + } + }() +} + +func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]bool, fn func(collectors []string)) string { + log := k.log.WithValues("opentelemetry-targetallocator") + for { + select { + case <-k.close: + return "kubernetes client closed" + case <-ctx.Done(): + return "context done" + case event, ok := <-c: + if !ok { + log.Info(strconv.FormatBool(ok)) + return "no event" + } + + pod, ok := event.Object.(*v1.Pod) + if !ok { + log.Info(strconv.FormatBool(ok)) + return "no event" + } + + switch event.Type { + case watch.Added: + collectorMap[pod.Name] = true + case watch.Deleted: + delete(collectorMap, pod.Name) + } + + collectorKeys := make([]string, len(collectorMap)) + i := 0 + for keys := range collectorMap { + collectorKeys[i] = keys + i++ + } + fn(collectorKeys) + select { + case k.collectorChan <- collectorKeys: + default: + fn(collectorKeys) + } + case <-time.After(watcherTimeout): + log.Info("Restarting watch routine") + return "" + } + } +} + +func (k *Client) Close() { + close(k.close) +} diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go new file mode 100644 index 000000000..5ba5b0fb1 --- /dev/null +++ b/cmd/otel-allocator/collector/collector_test.go @@ -0,0 +1,98 @@ +package collector + +import ( + "context" + "fmt" + "os" + "sort" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/kubernetes/fake" +) + +var client Client +var collectors = []string{} + +func TestMain(m *testing.M) { + client = Client{ + k8sClient: fake.NewSimpleClientset(), + collectorChan: make(chan []string, 3), + close: make(chan struct{}), + } + + labelMap := map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + } + + opts := metav1.ListOptions{ + LabelSelector: labels.SelectorFromSet(labelMap).String(), + } + + watcher, err := client.k8sClient.CoreV1().Pods("test-ns").Watch(context.Background(), opts) + if err != nil { + fmt.Printf("failed to setup a Collector Pod watcher: %v", err) + os.Exit(1) + } + + go runWatch(context.Background(), &client, watcher.ResultChan(), map[string]bool{}, func(collectorList []string) { getCollectors(collectorList) }) + + code := m.Run() + + close(client.close) + + os.Exit(code) +} + +func TestWatchPodAddition(t *testing.T) { + expected := []string{"test-pod1", "test-pod2", "test-pod3"} + + for _, k := range []string{"test-pod1", "test-pod2", "test-pod3"} { + expected := pod(k) + _, err := client.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), expected, metav1.CreateOptions{}) + assert.NoError(t, err) + collectors = <-client.collectorChan + } + + assert.Len(t, collectors, 3) + + sort.Strings(collectors) + assert.Equal(t, collectors, expected) +} + +func TestWatchPodDeletion(t *testing.T) { + expected := []string{"test-pod1"} + + for _, k := range []string{"test-pod2", "test-pod3"} { + err := client.k8sClient.CoreV1().Pods("test-ns").Delete(context.Background(), k, metav1.DeleteOptions{}) + assert.NoError(t, err) + collectors = <-client.collectorChan + } + + assert.Len(t, collectors, 1) + + sort.Strings(collectors) + assert.Equal(t, collectors, expected) +} + +func getCollectors(c []string) { + collectors = c +} + +func pod(name string) *v1.Pod { + labels := make(map[string]string) + labels["app.kubernetes.io/instance"] = "default.test" + labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "test-ns", + Labels: labels, + }, + } +} diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go new file mode 100644 index 000000000..a88dbd68c --- /dev/null +++ b/cmd/otel-allocator/config/config.go @@ -0,0 +1,47 @@ +package config + +import ( + "errors" + "fmt" + "io/ioutil" + + promconfig "github.com/prometheus/prometheus/config" + _ "github.com/prometheus/prometheus/discovery/install" + "gopkg.in/yaml.v2" +) + +// ErrInvalidYAML represents an error in the format of the original YAML configuration file. +var ( + ErrInvalidYAML = errors.New("couldn't parse the loadbalancer configuration") +) + +const defaultConfigFile string = "/conf/targetallocator.yaml" + +type Config struct { + LabelSelector map[string]string `yaml:"label_selector,omitempty"` + Config *promconfig.Config `yaml:"config"` +} + +func Load(file string) (Config, error) { + if file == "" { + file = defaultConfigFile + } + + var cfg Config + if err := unmarshal(&cfg, file); err != nil { + return Config{}, err + } + return cfg, nil +} + +func unmarshal(cfg *Config, configFile string) error { + + yamlFile, err := ioutil.ReadFile(configFile) + if err != nil { + return err + } + if err = yaml.UnmarshalStrict(yamlFile, cfg); err != nil { + return fmt.Errorf("error unmarshaling YAML: %w", err) + } + return nil +} diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go new file mode 100644 index 000000000..09ed11a27 --- /dev/null +++ b/cmd/otel-allocator/config/config_test.go @@ -0,0 +1,47 @@ +package config + +import ( + "testing" + + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/discovery/file" + "github.com/stretchr/testify/assert" +) + +const testFile = "./testdata/config_test.yaml" + +func TestConfigLoad(t *testing.T) { + expectedFileSDConfig := &file.SDConfig{ + Files: []string{"./file_sd_test.json"}, + RefreshInterval: model.Duration(300000000000), + } + expectedStaticSDConfig := discovery.StaticConfig{ + { + Targets: []model.LabelSet{ + {model.AddressLabel: "prom.domain:9001"}, + {model.AddressLabel: "prom.domain:9002"}, + {model.AddressLabel: "prom.domain:9003"}, + }, + Labels: model.LabelSet{ + "my": "label", + }, + Source: "0", + }, + } + + cfg := Config{} + err := unmarshal(&cfg, testFile) + assert.NoError(t, err) + + scrapeConfig := *cfg.Config.ScrapeConfigs[0] + actualFileSDConfig := scrapeConfig.ServiceDiscoveryConfigs[0] + actulaStaticSDConfig := scrapeConfig.ServiceDiscoveryConfigs[1] + t.Log(actulaStaticSDConfig) + + assert.Equal(t, cfg.LabelSelector["app.kubernetes.io/instance"], "default.test") + assert.Equal(t, cfg.LabelSelector["app.kubernetes.io/managed-by"], "opentelemetry-operator") + assert.Equal(t, scrapeConfig.JobName, "prometheus") + assert.Equal(t, expectedFileSDConfig, actualFileSDConfig) + assert.Equal(t, expectedStaticSDConfig, actulaStaticSDConfig) +} diff --git a/cmd/otel-allocator/config/testdata/config_test.yaml b/cmd/otel-allocator/config/testdata/config_test.yaml new file mode 100644 index 000000000..67670f26f --- /dev/null +++ b/cmd/otel-allocator/config/testdata/config_test.yaml @@ -0,0 +1,15 @@ +label_selector: + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +config: + scrape_configs: + - job_name: prometheus + + file_sd_configs: + - files: + - ./file_sd_test.json + + static_configs: + - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] + labels: + my: label \ No newline at end of file diff --git a/cmd/otel-allocator/config/testdata/file_sd_test.json b/cmd/otel-allocator/config/testdata/file_sd_test.json new file mode 100644 index 000000000..7114e6246 --- /dev/null +++ b/cmd/otel-allocator/config/testdata/file_sd_test.json @@ -0,0 +1,18 @@ +[ + { + "labels": { + "job": "node" + }, + "targets": [ + "promfile.domain:1001" + ] + }, + { + "labels": { + "foo1": "bar1" + }, + "targets": [ + "promfile.domain:3000" + ] + } +] diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go new file mode 100644 index 000000000..96eb74969 --- /dev/null +++ b/cmd/otel-allocator/discovery/discovery.go @@ -0,0 +1,77 @@ +package discovery + +import ( + "context" + + "github.com/go-kit/log" + "github.com/go-logr/logr" + "github.com/otel-allocator/allocation" + "github.com/otel-allocator/config" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/discovery" +) + +type Manager struct { + log logr.Logger + manager *discovery.Manager + logger log.Logger + close chan struct{} +} + +func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options ...func(*discovery.Manager)) *Manager { + manager := discovery.NewManager(ctx, logger, options...) + + go func() { + if err := manager.Run(); err != nil { + logger.Log("Discovery manager failed", err) + } + }() + return &Manager{ + log: log, + manager: manager, + logger: logger, + close: make(chan struct{}), + } +} + +func (m *Manager) ApplyConfig(cfg config.Config) error { + discoveryCfg := make(map[string]discovery.Configs) + + for _, scrapeConfig := range cfg.Config.ScrapeConfigs { + discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs + } + return m.manager.ApplyConfig(discoveryCfg) +} + +func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { + log := m.log.WithValues("opentelemetry-targetallocator") + + go func() { + for { + select { + case <-m.close: + log.Info("Service Discovery watch event stopped: discovery manager closed") + return + case tsets := <-m.manager.SyncCh(): + targets := []allocation.TargetItem{} + + for jobName, tgs := range tsets { + for _, tg := range tgs { + for _, t := range tg.Targets { + targets = append(targets, allocation.TargetItem{ + JobName: jobName, + TargetURL: string(t[model.AddressLabel]), + Label: tg.Labels, + }) + } + } + } + fn(targets) + } + } + }() +} + +func (m *Manager) Close() { + close(m.close) +} diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go new file mode 100644 index 000000000..872651cc1 --- /dev/null +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -0,0 +1,82 @@ +package discovery + +import ( + "context" + "fmt" + "os" + "sort" + "testing" + + gokitlog "github.com/go-kit/log" + "github.com/otel-allocator/allocation" + "github.com/otel-allocator/config" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/discovery" + "github.com/stretchr/testify/assert" +) + +var cfg config.Config +var manager *Manager +var results chan []string + +func TestMain(m *testing.M) { + var err error + cfg, err = config.Load("./testdata/test.yaml") + if err != nil { + fmt.Printf("failed to load config file: %v", err) + os.Exit(1) + } + manager = NewManager(context.Background(), gokitlog.NewNopLogger()) + + results = make(chan []string) + manager.Watch(func(targets []allocation.TargetItem) { + var result []string + for _, t := range targets { + result = append(result, t.TargetURL) + } + results <- result + }) + + code := m.Run() + + close(manager.close) + + os.Exit(code) +} + +func TestTargetDiscovery(t *testing.T) { + err := manager.ApplyConfig(cfg) + assert.NoError(t, err) + + gotTargets := <-results + wantTargets := []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "promfile.domain:1001", "promfile.domain:3000"} + + sort.Strings(gotTargets) + sort.Strings(wantTargets) + assert.Equal(t, gotTargets, wantTargets) +} + +func TestTargetUpdate(t *testing.T) { + cfg.Config.ScrapeConfigs[0].ServiceDiscoveryConfigs[1] = discovery.StaticConfig{ + { + Targets: []model.LabelSet{ + {model.AddressLabel: "prom.domain:9004"}, + {model.AddressLabel: "prom.domain:9005"}, + }, + Labels: model.LabelSet{ + "my": "label", + }, + Source: "0", + }, + } + + err := manager.ApplyConfig(cfg) + assert.NoError(t, err) + + gotTargets := <-results + wantTargets := []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"} + + sort.Strings(gotTargets) + sort.Strings(wantTargets) + assert.Equal(t, gotTargets, wantTargets) +} diff --git a/cmd/otel-allocator/discovery/testdata/test.yaml b/cmd/otel-allocator/discovery/testdata/test.yaml new file mode 100644 index 000000000..54902342c --- /dev/null +++ b/cmd/otel-allocator/discovery/testdata/test.yaml @@ -0,0 +1,15 @@ +label_selector: + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +config: + scrape_configs: + - job_name: prometheus + + static_configs: + - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] + labels: + my: label + + file_sd_configs: + - files: + - ../config/testdata/file_sd_test.json diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod new file mode 100644 index 000000000..58e213075 --- /dev/null +++ b/cmd/otel-allocator/go.mod @@ -0,0 +1,21 @@ +module github.com/otel-allocator + +go 1.17 + +require ( + github.com/fsnotify/fsnotify v1.5.1 + github.com/go-kit/log v0.1.0 + github.com/go-logr/logr v0.4.0 + github.com/gorilla/mux v1.8.0 + github.com/prometheus/common v0.30.0 + github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 + github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.7.0 + go.uber.org/zap v1.19.0 // indirect + gopkg.in/yaml.v2 v2.4.0 + k8s.io/api v0.22.1 + k8s.io/apimachinery v0.22.1 + k8s.io/client-go v0.22.1 + k8s.io/component-base v0.22.1 // indirect + sigs.k8s.io/controller-runtime v0.9.6 +) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum new file mode 100644 index 000000000..ee673f9ce --- /dev/null +++ b/cmd/otel-allocator/go.sum @@ -0,0 +1,1665 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0 h1:bAMqZidYkmIsUqe6PtkEPT7Q+vfizScn+jfNA6jwK9c= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= +github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= +github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= +github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= +github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= +github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= +github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= +github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= +github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.19.28/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= +github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= +github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= +github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= +github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= +github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= +github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= +github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.12.2 h1:F1fdYblUEsxKiailtkhCCG2g4bipEgaHiDc8vffNpD4= +github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.2.0 h1:l6UW37iCXwZkZoAbEYnptSHVE/cQ5bOTPYG5W3vf9+8= +github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.2.3 h1:BwZa5IjREr75J0am7nblP+X5i95Rmp8EEbMI5vkUWdA= +github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= +github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hetznercloud/hcloud-go v1.26.2 h1:fI8BXAGJI4EFeCDd2a/I4EhqyK32cDdxGeWfYMGUi50= +github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= +github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= +github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= +github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= +github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= +github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= +github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= +github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= +github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= +github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= +github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= +github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= +github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= +github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= +github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= +github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= +go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= +go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= +go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 h1:pc16UedxnxXXtGxHCSUhafAoVHQZ0yXl8ZelMH4EETc= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= +k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= +k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= +k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= +k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= +k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= +k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= +k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= +k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= +k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= +k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= +k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= +k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= +k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= +k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= +k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= +k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= +k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew= +sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= +sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= +sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go new file mode 100644 index 000000000..a3ee0be4e --- /dev/null +++ b/cmd/otel-allocator/main.go @@ -0,0 +1,209 @@ +package main + +import ( + "context" + "encoding/json" + "flag" + "net/http" + "os" + "os/signal" + "syscall" + + "github.com/fsnotify/fsnotify" + gokitlog "github.com/go-kit/log" + "github.com/go-logr/logr" + "github.com/gorilla/mux" + "github.com/otel-allocator/allocation" + "github.com/otel-allocator/collector" + "github.com/otel-allocator/config" + lbdiscovery "github.com/otel-allocator/discovery" + "github.com/spf13/pflag" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/log/zap" +) + +var ( + setupLog = ctrl.Log.WithName("setup") +) + +func main() { + // Trying zap logger + opts := zap.Options{} + opts.BindFlags(flag.CommandLine) + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + var listenAddr string + var configDir string + pflag.StringVar(&listenAddr, "listen-addr", ":8080", "The address where this service serves.") + pflag.StringVar(&configDir, "config-dir", "/conf/", "The directory for the config file.") + logger := zap.New(zap.UseFlagOptions(&opts)) + ctrl.SetLogger(logger) + + logger.Info("Starting the Target Allocator") + + // + + ctx := context.Background() + + // watcher to monitor file changes in ConfigMap + watcher, err := fsnotify.NewWatcher() + if err != nil { + setupLog.Error(err, "Can't start the watcher") + os.Exit(1) + } + defer watcher.Close() + + if err := watcher.Add(configDir); err != nil { + setupLog.Error(err, "Can't add directory to watcher") + } + log := ctrl.Log.WithName("allocator") + srv, err := newServer(log, listenAddr) + if err != nil { + setupLog.Error(err, "Can't start the server") + } + + interrupts := make(chan os.Signal, 1) + signal.Notify(interrupts, os.Interrupt, syscall.SIGTERM) + + go func() { + if err := srv.Start(); err != http.ErrServerClosed { + setupLog.Error(err, "Can't start the server") + } + }() + + for { + select { + case <-interrupts: + if err := srv.Shutdown(ctx); err != nil { + setupLog.Error(err, "Error on server shutdown") + os.Exit(1) + } + os.Exit(0) + case event := <-watcher.Events: + switch event.Op { + case fsnotify.Create: + setupLog.Info("ConfigMap updated!") + // Restart the server to pickup the new config. + if err := srv.Shutdown(ctx); err != nil { + setupLog.Error(err, "Cannot shutdown the server") + } + srv, err = newServer(log, listenAddr) + if err != nil { + setupLog.Error(err, "Error restarting the server with new config") + } + go func() { + if err := srv.Start(); err != http.ErrServerClosed { + setupLog.Error(err, "Can't restart the server") + } + }() + } + case err := <-watcher.Errors: + setupLog.Error(err, "Watcher error") + } + } +} + +type server struct { + logger logr.Logger + allocator *allocation.Allocator + discoveryManager *lbdiscovery.Manager + k8sClient *collector.Client + server *http.Server +} + +func newServer(log logr.Logger, addr string) (*server, error) { + allocator, discoveryManager, k8sclient, err := newAllocator(log, context.Background()) + if err != nil { + return nil, err + } + s := &server{ + logger: log, + allocator: allocator, + discoveryManager: discoveryManager, + k8sClient: k8sclient, + } + router := mux.NewRouter() + router.HandleFunc("/jobs", s.JobHandler).Methods("GET") + router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") + s.server = &http.Server{Addr: addr, Handler: router} + return s, nil +} + +func newAllocator(log logr.Logger, ctx context.Context) (*allocation.Allocator, *lbdiscovery.Manager, *collector.Client, error) { + cfg, err := config.Load("") + if err != nil { + return nil, nil, nil, err + } + + k8sClient, err := collector.NewClient(log) + if err != nil { + return nil, nil, nil, err + } + + // creates a new discovery manager + discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) + + // returns the list of targets + if err := discoveryManager.ApplyConfig(cfg); err != nil { + return nil, nil, nil, err + } + + allocator := allocation.NewAllocator(log) + discoveryManager.Watch(func(targets []allocation.TargetItem) { + allocator.SetWaitingTargets(targets) + allocator.AllocateTargets() + }) + k8sClient.Watch(ctx, cfg.LabelSelector, func(collectors []string) { + allocator.SetCollectors(collectors) + allocator.ReallocateCollectors() + }) + return allocator, discoveryManager, k8sClient, nil +} + +func (s *server) Start() error { + setupLog.Info("Starting server...") + return s.server.ListenAndServe() +} + +func (s *server) Shutdown(ctx context.Context) error { + s.logger.Info("Shutting down server...") + s.k8sClient.Close() + s.discoveryManager.Close() + return s.server.Shutdown(ctx) +} + +func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { + displayData := make(map[string]allocation.LinkJSON) + for _, v := range s.allocator.TargetItems { + displayData[v.JobName] = allocation.LinkJSON{v.Link.Link} + } + jsonHandler(w, r, displayData) +} + +func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { + q := r.URL.Query()["collector_id"] + + var compareMap = make(map[string][]allocation.TargetItem) // CollectorName+jobName -> TargetItem + for _, v := range s.allocator.TargetItems { + compareMap[v.Collector.Name+v.JobName] = append(compareMap[v.Collector.Name+v.JobName], *v) + } + params := mux.Vars(r) + + if len(q) == 0 { + displayData := allocation.GetAllTargetsByJob(params["job_id"], compareMap, s.allocator) + jsonHandler(w, r, displayData) + + } else { + tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], params["job_id"], compareMap, s.allocator) + // Displays empty list if nothing matches + if len(tgs) == 0 { + jsonHandler(w, r, []interface{}{}) + return + } + jsonHandler(w, r, tgs) + } +} + +func jsonHandler(w http.ResponseWriter, r *http.Request, data interface{}) { + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(data) +} From 7455eede6ae9347cf86cfc39cb2c90a6648ced0f Mon Sep 17 00:00:00 2001 From: Rahul Varma Date: Wed, 15 Sep 2021 00:44:31 -0700 Subject: [PATCH 0272/1234] Target Allocator implementation (Part 3 - Collector Enhancement for Prometheus Config Update) (#389) * load balancer deployment implementation & controller & e2e tests * Load balancer crd update, reconcile logic and e2e tests * Reset last commit and only uploading changes to main.go * Updated bundle and api with new autogenerated resources * Updated code with lint fixes * Updated code to include minor fixes * Update helper.go to add header * Updated comment and bundles * Updated lb reconcile helper function and its invocations * Updated naming scheme and changed CR config * Updated bundle files * Minor changes * Lint and default file fixes * Added rolebinding to automate manual setting * Update opentelemetry-operator.clusterserviceversion.yaml * Removed role/rolebinding files & Minor changes * Minor changes * Added error check in configmap reconcile & spelling correction * Updated target allocator KUTTL tests & renamed folder * Updated folder structure to reduce code duplication between collector and targetallocator & Minor changes * Updated kuttl tests to use namespace-scope resources * Revert part of "Updated folder structure to reduce code duplication between collector and targetallocator & Minor changes" This reverts commit 367c6237b9c0e9c77d141229748d91429ff31791 - only the folder structure change * Removed separate controller for target allocation * Added additional label for collector pod selection and removed test-step * Minor changes * Added collector enhancement for prometheus config update * Update config_replace.go * Squashed commit of the following: commit a7764b97a208aa268864f298dd81268584407344 Author: Rahul Varma Date: Tue Aug 10 20:20:32 2021 -0700 Added version management & Minor fixes * Updated port and protocol * Lint fixes * Removed unnecessary structs * Squashed commit of the following: commit a4968257e812ddba69068a29b965674c8c455c48 Author: Rahul Varma Date: Wed Aug 11 14:53:36 2021 -0400 Update api/v1alpha1/opentelemetrycollector_webhook.go Co-authored-by: Anthony Mirabella commit 3d37148696742ed1a2cda7c23357834b1bc803f5 Author: Rahul Varma Date: Wed Aug 11 10:34:44 2021 -0700 Added validation in webhook to validate prometheus config commit 33cb04253bb223613f4a26e2b36ce52a960a912f Author: Rahul Varma Date: Wed Aug 11 07:16:45 2021 -0700 Updated docker image to quay.io image commit a7764b97a208aa268864f298dd81268584407344 Author: Rahul Varma Date: Tue Aug 10 20:20:32 2021 -0700 Added version management & Minor fixes * Updated structure to reflect new changes in first part * Squashed commit of the following: commit 98acb2fc8ed3793051e76e8b21648f696053a9bd Author: Rahul Varma Date: Thu Aug 12 05:35:53 2021 -0700 Updated struct name & minor changes commit a4968257e812ddba69068a29b965674c8c455c48 Author: Rahul Varma Date: Wed Aug 11 14:53:36 2021 -0400 Update api/v1alpha1/opentelemetrycollector_webhook.go Co-authored-by: Anthony Mirabella commit 3d37148696742ed1a2cda7c23357834b1bc803f5 Author: Rahul Varma Date: Wed Aug 11 10:34:44 2021 -0700 Added validation in webhook to validate prometheus config commit 33cb04253bb223613f4a26e2b36ce52a960a912f Author: Rahul Varma Date: Wed Aug 11 07:16:45 2021 -0700 Updated docker image to quay.io image commit a7764b97a208aa268864f298dd81268584407344 Author: Rahul Varma Date: Tue Aug 10 20:20:32 2021 -0700 Added version management & Minor fixes * Merged with main branch * Minor changes * Updated go.sum * Updated go.mod Co-authored-by: Alexis Perez Co-authored-by: Rahul Varma --- go.mod | 68 +- go.sum | 865 +++++++++++++++++- pkg/collector/container.go | 9 + pkg/collector/container_test.go | 7 +- pkg/collector/reconcile/config_replace.go | 84 ++ .../reconcile/config_replace_test.go | 98 ++ pkg/collector/reconcile/configmap.go | 6 +- pkg/collector/reconcile/configmap_test.go | 54 +- pkg/collector/reconcile/deployment_test.go | 4 +- pkg/collector/reconcile/suite_test.go | 13 +- .../testdata/http_sd_config_test.yaml | 36 + pkg/collector/testdata/test.yaml | 22 + 12 files changed, 1242 insertions(+), 24 deletions(-) create mode 100644 pkg/collector/reconcile/config_replace.go create mode 100644 pkg/collector/reconcile/config_replace_test.go create mode 100644 pkg/collector/testdata/http_sd_config_test.yaml create mode 100644 pkg/collector/testdata/test.yaml diff --git a/go.mod b/go.mod index 106501a11..34c661ff5 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,8 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v0.4.0 + github.com/mitchellh/mapstructure v1.4.1 + github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 @@ -16,43 +18,97 @@ require ( ) require ( - cloud.google.com/go v0.54.0 // indirect + cloud.google.com/go v0.83.0 // indirect + github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.19 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect + github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect + github.com/armon/go-metrics v0.3.3 // indirect + github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/containerd/containerd v1.4.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/digitalocean/godo v1.62.0 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v20.10.7+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/fatih/color v1.9.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-kit/log v0.1.0 // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect github.com/go-logr/zapr v0.4.0 // indirect + github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.5 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gophercloud/gophercloud v0.18.0 // indirect + github.com/hashicorp/consul/api v1.8.1 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-hclog v0.12.2 // indirect + github.com/hashicorp/go-immutable-radix v1.2.0 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/serf v0.9.5 // indirect + github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.11 // indirect + github.com/linode/linodego v0.28.5 // indirect + github.com/mattn/go-colorable v0.1.6 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/miekg/dns v1.1.42 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.11.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.26.0 // indirect + github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect - go.uber.org/atomic v1.7.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect + github.com/sirupsen/logrus v1.7.0 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.18.1 // indirect - golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect - golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect + golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect + golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect golang.org/x/text v0.3.6 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/api v0.48.0 // indirect google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 // indirect + google.golang.org/grpc v1.38.0 // indirect google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.21.3 // indirect diff --git a/go.sum b/go.sum index 15eadfa31..b047f299e 100644 --- a/go.sum +++ b/go.sum @@ -1,65 +1,170 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0 h1:bAMqZidYkmIsUqe6PtkEPT7Q+vfizScn+jfNA6jwK9c= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= +cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= +github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= +github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= +github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= +github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= +github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= +github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= +github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= +github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -67,19 +172,36 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= +github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -90,53 +212,99 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= +github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= +github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= +github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= +github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= +github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -144,23 +312,146 @@ github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.19.28/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= +github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -174,11 +465,16 @@ github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -188,30 +484,54 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -219,12 +539,23 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= +github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= +github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -234,53 +565,136 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= +github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= +github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= +github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.12.2 h1:F1fdYblUEsxKiailtkhCCG2g4bipEgaHiDc8vffNpD4= +github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.2.0 h1:l6UW37iCXwZkZoAbEYnptSHVE/cQ5bOTPYG5W3vf9+8= +github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.2.3 h1:BwZa5IjREr75J0am7nblP+X5i95Rmp8EEbMI5vkUWdA= +github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= +github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hetznercloud/hcloud-go v1.26.2 h1:fI8BXAGJI4EFeCDd2a/I4EhqyK32cDdxGeWfYMGUi50= +github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= +github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= +github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= +github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= +github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= +github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= +github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= +github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= +github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= +github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= +github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= +github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= +github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= +github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -290,34 +704,75 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= +github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= +github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -326,85 +781,185 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= +github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= +github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= +github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= +github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= +github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -422,9 +977,13 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -433,24 +992,65 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= +github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= +github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= +github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= @@ -465,28 +1065,60 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= +go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -496,6 +1128,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -508,6 +1141,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= @@ -519,17 +1153,23 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -537,9 +1177,14 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -547,31 +1192,61 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -579,47 +1254,85 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -627,6 +1340,7 @@ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXR golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -640,28 +1354,45 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -669,8 +1400,12 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -678,14 +1413,34 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -693,6 +1448,13 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -702,12 +1464,28 @@ google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsb google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -715,37 +1493,83 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 h1:pc16UedxnxXXtGxHCSUhafAoVHQZ0yXl8ZelMH4EETc= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -768,6 +1592,9 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= +gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -776,38 +1603,50 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= k8s.io/cli-runtime v0.22.1/go.mod h1:YqwGrlXeEk15Yn3em2xzr435UGwbrCw5x+COQoTYfoo= +k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= @@ -817,24 +1656,33 @@ k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrw k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= k8s.io/component-helpers v0.22.1/go.mod h1:QvBcDbX+qU5I2tMZABBF5fRwAlQwiv771IGBHK9WYh4= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kubectl v0.22.1 h1:kpXO+ajPNTzAVLDM9pAzCsWH9MtCMr92zpcvXMt7P6E= k8s.io/kubectl v0.22.1/go.mod h1:mjAOgEbMNMtZWxnfM6jd+nPjPsaoLqO5xanc78WcSbw= k8s.io/metrics v0.22.1/go.mod h1:i/ZNap89UkV1gLa26dn7fhKAdheJaKy+moOqJbiif7E= +k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= @@ -844,9 +1692,12 @@ sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH8 sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= +sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 9f3aecfb8..2a984550e 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -68,6 +68,15 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem envVars = []corev1.EnvVar{} } + envVars = append(envVars, corev1.EnvVar{ + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }) + return corev1.Container{ Name: naming.Container(), Image: image, diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index cb10e4bc2..750ae767c 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -142,12 +142,12 @@ func TestContainerEnvVarsOverridden(t *testing.T) { c := Container(cfg, logger, otelcol) // verify - assert.Len(t, c.Env, 1) + assert.Len(t, c.Env, 2) assert.Equal(t, "foo", c.Env[0].Name) assert.Equal(t, "bar", c.Env[0].Value) } -func TestContainerEmptyEnvVarsByDefault(t *testing.T) { +func TestContainerDefaultEnvVars(t *testing.T) { otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{}, } @@ -158,7 +158,8 @@ func TestContainerEmptyEnvVarsByDefault(t *testing.T) { c := Container(cfg, logger, otelcol) // verify - assert.Empty(t, c.Env) + assert.Len(t, c.Env, 1) + assert.Equal(t, c.Env[0].Name, "POD_NAME") } func TestContainerResourceRequirements(t *testing.T) { diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go new file mode 100644 index 000000000..ece080549 --- /dev/null +++ b/pkg/collector/reconcile/config_replace.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "fmt" + + "github.com/mitchellh/mapstructure" + promconfig "github.com/prometheus/prometheus/config" + "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/discovery/http" + _ "github.com/prometheus/prometheus/discovery/install" + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" +) + +type Config struct { + PromConfig *promconfig.Config `yaml:"config"` +} + +func ReplaceConfig(params Params) (string, error) { + if !params.Instance.Spec.TargetAllocator.Enabled { + return params.Instance.Spec.Config, nil + } + config, err := adapters.ConfigFromString(params.Instance.Spec.Config) + if err != nil { + return "", err + } + + promCfgMap, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) + if err != nil { + return "", err + } + + // yaml marshaling/unsmarshaling is preferred because of the problems associated with the conversion of map to a struct using mapstructure + promCfg, err := yaml.Marshal(map[string]interface{}{ + "config": promCfgMap, + }) + if err != nil { + return "", err + } + + var cfg Config + if err = yaml.UnmarshalStrict(promCfg, &cfg); err != nil { + return "", fmt.Errorf("error unmarshaling YAML: %w", err) + } + + for i := range cfg.PromConfig.ScrapeConfigs { + cfg.PromConfig.ScrapeConfigs[i].ServiceDiscoveryConfigs = discovery.Configs{ + &http.SDConfig{ + URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(params.Instance), cfg.PromConfig.ScrapeConfigs[i].JobName), + }, + } + } + + updPromCfgMap := make(map[string]interface{}) + if err := mapstructure.Decode(cfg, &updPromCfgMap); err != nil { + return "", err + } + + // type coercion checks are handled in the ConfigToPromConfig method above + config["receivers"].(map[interface{}]interface{})["prometheus"].(map[interface{}]interface{})["config"] = updPromCfgMap["PromConfig"] + + out, err := yaml.Marshal(config) + if err != nil { + return "", err + } + return string(out), nil +} diff --git a/pkg/collector/reconcile/config_replace_test.go b/pkg/collector/reconcile/config_replace_test.go new file mode 100644 index 000000000..0d867492b --- /dev/null +++ b/pkg/collector/reconcile/config_replace_test.go @@ -0,0 +1,98 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "testing" + + "github.com/prometheus/prometheus/discovery/http" + "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v2" + + ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" +) + +func TestPrometheusParser(t *testing.T) { + param, err := newParams("test/test-img", "../testdata/http_sd_config_test.yaml") + assert.NoError(t, err) + + t.Run("should update config with http_sd_config", func(t *testing.T) { + actualConfig, err := ReplaceConfig(param) + assert.NoError(t, err) + + // prepare + var cfg Config + promCfgMap, err := ta.ConfigToPromConfig(actualConfig) + assert.NoError(t, err) + + promCfg, err := yaml.Marshal(map[string]interface{}{ + "config": promCfgMap, + }) + assert.NoError(t, err) + + err = yaml.UnmarshalStrict(promCfg, &cfg) + assert.NoError(t, err) + + // test + expectedMap := map[string]bool{ + "prometheus": false, + "service-x": false, + } + for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { + assert.Len(t, scrapeConfig.ServiceDiscoveryConfigs, 1) + assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].Name(), "http") + assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].(*http.SDConfig).URL, "http://test-targetallocator:80/jobs/"+scrapeConfig.JobName+"/targets?collector_id=$POD_NAME") + expectedMap[scrapeConfig.JobName] = true + } + for k := range expectedMap { + assert.True(t, expectedMap[k], k) + } + }) + + t.Run("should not update config with http_sd_config", func(t *testing.T) { + param.Instance.Spec.TargetAllocator.Enabled = false + actualConfig, err := ReplaceConfig(param) + assert.NoError(t, err) + + // prepare + var cfg Config + promCfgMap, err := ta.ConfigToPromConfig(actualConfig) + assert.NoError(t, err) + + promCfg, err := yaml.Marshal(map[string]interface{}{ + "config": promCfgMap, + }) + assert.NoError(t, err) + + err = yaml.UnmarshalStrict(promCfg, &cfg) + assert.NoError(t, err) + + // test + expectedMap := map[string]bool{ + "prometheus": false, + "service-x": false, + } + for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { + assert.Len(t, scrapeConfig.ServiceDiscoveryConfigs, 2) + assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].Name(), "file") + assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[1].Name(), "static") + expectedMap[scrapeConfig.JobName] = true + } + for k := range expectedMap { + assert.True(t, expectedMap[k], k) + } + }) + +} diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index c628165db..d3d8010f1 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -66,6 +66,10 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { name := naming.ConfigMap(params.Instance) labels := collector.Labels(params.Instance) labels["app.kubernetes.io/name"] = name + config, err := ReplaceConfig(params) + if err != nil { + params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", err) + } return corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ @@ -75,7 +79,7 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { Annotations: params.Instance.Annotations, }, Data: map[string]string{ - "collector.yaml": params.Instance.Spec.Config, + "collector.yaml": config, }, } } diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 01747b082..8ee8775b5 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -51,7 +51,7 @@ receivers: prometheus: config: scrape_configs: - job_name: otel-collector + - job_name: otel-collector scrape_interval: 10s static_configs: - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] @@ -75,6 +75,56 @@ service: }) + t.Run("should return expected collector config map with http_sd_config", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + jaeger: + protocols: + grpc: null + prometheus: + config: + global: + scrape_interval: 1m + scrape_timeout: 10s + evaluation_interval: 1m + scrape_configs: + - job_name: otel-collector + honor_timestamps: true + scrape_interval: 10s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + http_sd_configs: + - follow_redirects: false + url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus +`, + } + + param := params() + param.Instance.Spec.TargetAllocator.Enabled = true + actual := desiredConfigMap(context.Background(), param) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + t.Run("should return expected target allocator config map", func(t *testing.T) { expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" expectedLables["app.kubernetes.io/name"] = "test-targetallocator" @@ -82,7 +132,7 @@ service: expectedData := map[string]string{ "targetallocator.yaml": `config: scrape_configs: - job_name: otel-collector + - job_name: otel-collector scrape_interval: 10s static_configs: - targets: diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 668cb9319..5069c2b15 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -121,7 +121,7 @@ func TestExpectedDeployments(t *testing.T) { createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) orgUID := expectedTADeploy.OwnerReferences[0].UID - updatedParam, err := newParams("test/test-img") + updatedParam, err := newParams("test/test-img", "") assert.NoError(t, err) updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, param.Instance) *updatedDeploy.Spec.Replicas = int32(3) @@ -144,7 +144,7 @@ func TestExpectedDeployments(t *testing.T) { createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) orgUID := expectedTADeploy.OwnerReferences[0].UID - updatedParam, err := newParams("test/test-img") + updatedParam, err := newParams("test/test-img", "") assert.NoError(t, err) updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 7fbb84c52..89441c2c6 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -83,7 +83,7 @@ func TestMain(m *testing.M) { func params() Params { replicas := int32(2) - configYAML, err := ioutil.ReadFile("test.yaml") + configYAML, err := ioutil.ReadFile("../testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } @@ -120,9 +120,16 @@ func params() Params { } } -func newParams(containerImage string) (Params, error) { +func newParams(containerImage string, file string) (Params, error) { replicas := int32(1) - configYAML, err := ioutil.ReadFile("test.yaml") + var configYAML []byte + var err error + + if file == "" { + configYAML, err = ioutil.ReadFile("../testdata/test.yaml") + } else { + configYAML, err = ioutil.ReadFile(file) + } if err != nil { return Params{}, fmt.Errorf("Error getting yaml file: %w", err) } diff --git a/pkg/collector/testdata/http_sd_config_test.yaml b/pkg/collector/testdata/http_sd_config_test.yaml new file mode 100644 index 000000000..0b82c74e5 --- /dev/null +++ b/pkg/collector/testdata/http_sd_config_test.yaml @@ -0,0 +1,36 @@ +processors: +receivers: + prometheus: + config: + scrape_configs: + - job_name: prometheus + + static_configs: + - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] + labels: + my: label + + file_sd_configs: + - files: + - file1.json + + - job_name: service-x + + static_configs: + - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] + labels: + my: label + + file_sd_configs: + - files: + - file2.json + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/pkg/collector/testdata/test.yaml b/pkg/collector/testdata/test.yaml new file mode 100644 index 000000000..a14808f3b --- /dev/null +++ b/pkg/collector/testdata/test.yaml @@ -0,0 +1,22 @@ +processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] \ No newline at end of file From 23f7bfac787921748083f71c94bde79486805321 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Sep 2021 11:33:33 +0200 Subject: [PATCH 0273/1234] Bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2 (#431) Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/mitchellh/mapstructure/releases) - [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.1...v1.4.2) --- updated-dependencies: - dependency-name: github.com/mitchellh/mapstructure dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 34c661ff5..5763991ba 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v0.4.0 - github.com/mitchellh/mapstructure v1.4.1 + github.com/mitchellh/mapstructure v1.4.2 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 diff --git a/go.sum b/go.sum index b047f299e..c35688c0b 100644 --- a/go.sum +++ b/go.sum @@ -768,8 +768,9 @@ github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= From b37349fe1c63a99d1d6fe2bb6e4835dbc444ae46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Sep 2021 13:13:02 +0300 Subject: [PATCH 0274/1234] Bump k8s.io/kubectl from 0.22.1 to 0.22.2 (#435) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.22.1 to 0.22.2. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.22.1...v0.22.2) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 32 ++++++++++++++++---------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 5763991ba..5534ad835 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.1 - k8s.io/apimachinery v0.22.1 - k8s.io/client-go v0.22.1 - k8s.io/kubectl v0.22.1 + k8s.io/api v0.22.2 + k8s.io/apimachinery v0.22.2 + k8s.io/client-go v0.22.2 + k8s.io/kubectl v0.22.2 sigs.k8s.io/controller-runtime v0.9.6 ) @@ -112,10 +112,10 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.21.3 // indirect - k8s.io/component-base v0.22.1 // indirect + k8s.io/component-base v0.22.2 // indirect k8s.io/klog/v2 v2.9.0 // indirect k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect - k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 // indirect + k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect sigs.k8s.io/yaml v1.2.0 // indirect ) diff --git a/go.sum b/go.sum index c35688c0b..404bab29a 100644 --- a/go.sum +++ b/go.sum @@ -1635,28 +1635,28 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= -k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= +k8s.io/api v0.22.2 h1:M8ZzAD0V6725Fjg53fKeTJxGsJvRbk4TEm/fexHMtfw= +k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= -k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.22.2 h1:ejz6y/zNma8clPVfNDLnPbleBo6MpoFy/HBiBqCouVk= +k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/cli-runtime v0.22.1/go.mod h1:YqwGrlXeEk15Yn3em2xzr435UGwbrCw5x+COQoTYfoo= +k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= -k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= +k8s.io/client-go v0.22.2 h1:DaSQgs02aCC1QcwUdkKZWOeaVsQjYvWv8ZazcZ6JcHc= +k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= -k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= -k8s.io/component-helpers v0.22.1/go.mod h1:QvBcDbX+qU5I2tMZABBF5fRwAlQwiv771IGBHK9WYh4= +k8s.io/component-base v0.22.2 h1:vNIvE0AIrLhjX8drH0BgCNJcR4QZxMXcJzBsDplDx9M= +k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= +k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1673,15 +1673,15 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kubectl v0.22.1 h1:kpXO+ajPNTzAVLDM9pAzCsWH9MtCMr92zpcvXMt7P6E= -k8s.io/kubectl v0.22.1/go.mod h1:mjAOgEbMNMtZWxnfM6jd+nPjPsaoLqO5xanc78WcSbw= -k8s.io/metrics v0.22.1/go.mod h1:i/ZNap89UkV1gLa26dn7fhKAdheJaKy+moOqJbiif7E= +k8s.io/kubectl v0.22.2 h1:KMyYNZoBshaL3XKx04X07DtpoD4vMrdkfiN/G2Qx/PU= +k8s.io/kubectl v0.22.2/go.mod h1:BApg2j0edxLArCOfO0ievI27EeTQqBDMNU9VQH734iQ= +k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a h1:8dYfu/Fc9Gz2rNJKB9IQRGgQOh2clmRzNIPPY1xLY5g= +k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= From 8f13c802dfae92708e396778bac73b66ca5fc820 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Tue, 28 Sep 2021 01:06:13 +0530 Subject: [PATCH 0275/1234] Update to collector v0.35.0 (#434) --- CHANGELOG.md | 6 ++++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cec419e89..53cc4e4c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changes by Version ================== +0.35.0 +------------------- +* Bumped OpenTelemetry Collector to v0.35.0 +* Target Allocator implementation (Part 3 - OTEL Operator Enhancements) ([#389](https://github.com/open-telemetry/opentelemetry-operator/pull/389), [@Raul9595](https://github.com/Raul9595)) +* Target Allocator implementation (Part 2 - OTEL Operator Enhancements) ([#354](https://github.com/open-telemetry/opentelemetry-operator/pull/354), [@alexperez52](https://github.com/alexperez52)) + 0.34.0 ------------------- * Bumped OpenTelemetry Collector to v0.34.0 diff --git a/README.md b/README.md index a93bdfcc2..d1099b5cb 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.35.0 | v1.20 to v1.22 | | v0.34.0 | v1.20 to v1.22 | | v0.33.0 | v1.20 to v1.22 | | v0.32.0 (skipped) | n/a | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b85b7b373..96daf0ea8 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.34.0 + name: opentelemetry-operator.v0.35.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -206,7 +206,7 @@ spec: - --enable-leader-election command: - /manager - image: quay.io/opentelemetry/opentelemetry-operator:v0.34.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.35.0 name: manager ports: - containerPort: 9443 @@ -298,7 +298,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.34.0 + version: 0.35.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index ed80712bf..2c9dbbe13 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.34.0 +opentelemetry-collector=0.35.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.34.0 +operator=0.35.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From e86fd5c58bd13daafbc7d46ae76ab614c0bd1dbd Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 4 Oct 2021 11:11:52 +0200 Subject: [PATCH 0276/1234] Remove cmd from CSV (#442) * Remove cmd from CSV The command in CSV is not needed because the dockerfile uses entrypoint. It is useful to rely on the default conventions to allow easy override of the operator image - e.g. a productized version with vendor specific functionality. Signed-off-by: Pavol Loffay * Remove manager Signed-off-by: Pavol Loffay --- .../opentelemetry-operator.clusterserviceversion.yaml | 2 -- config/manager/manager.yaml | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 96daf0ea8..20b493461 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -204,8 +204,6 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - command: - - /manager image: quay.io/opentelemetry/opentelemetry-operator:v0.35.0 name: manager ports: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 8045a0e44..18993a0ce 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -23,9 +23,7 @@ spec: control-plane: controller-manager spec: containers: - - command: - - /manager - args: + - args: - --enable-leader-election image: controller name: manager From 05081b840177972c127f255f0a7dcf609aeef8c0 Mon Sep 17 00:00:00 2001 From: Charles Tison Date: Mon, 4 Oct 2021 11:20:02 +0200 Subject: [PATCH 0277/1234] feat: add `envFrom` to collector spec (#419) * feat: add `envFrom` to collector spec * chore: add docs and tests --- api/v1alpha1/opentelemetrycollector_types.go | 6 ++++ api/v1alpha1/zz_generated.deepcopy.go | 7 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 35 +++++++++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 35 +++++++++++++++++++ docs/otelcol_cr_spec.md | 4 +++ pkg/collector/container.go | 1 + pkg/collector/container_test.go | 34 ++++++++++++++++++ 7 files changed, 122 insertions(+) diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index eff35f842..ff94b8d7e 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -103,6 +103,12 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Env []v1.EnvVar `json:"env,omitempty"` + // List of sources to populate environment variables on the OpenTelemetry Collector's Pods. + // These can then in certain cases be consumed in the config file for the Collector. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` + // Resources to set on the OpenTelemetry Collector pods. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 091428561..1b0dd399f 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -139,6 +139,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]v1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } in.Resources.DeepCopyInto(&out.Resources) if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index e30f13fbb..ff6ab740e 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -182,6 +182,41 @@ spec: - name type: object type: array + envFrom: + description: List of sources to populate environment variables on + the OpenTelemetry Collector's Pods. These can then in certain cases + be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array hostNetwork: description: HostNetwork indicates if the pod should run in the host networking namespace. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 3fc5dc89a..ea627cba0 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -170,6 +170,41 @@ spec: - name type: object type: array + envFrom: + description: List of sources to populate environment variables on + the OpenTelemetry Collector's Pods. These can then in certain cases + be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array hostNetwork: description: HostNetwork indicates if the pod should run in the host networking namespace. diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index fd59381a4..434d69f3f 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -62,6 +62,10 @@ spec: // consumed in the config file for the Collector. env: [] + // +optional List of sources to populate environment variables on the OpenTelemetry Collector's Pods. + // These can then in certain cases be consumed in the config file for the Collector. + envFrom: [] + // +optional Resources to set on the OpenTelemetry Collector pods. resources: {} diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 2a984550e..17db54389 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -84,6 +84,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem VolumeMounts: volumeMounts, Args: args, Env: envVars, + EnvFrom: otelcol.Spec.EnvFrom, Resources: otelcol.Spec.Resources, SecurityContext: otelcol.Spec.SecurityContext, } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 750ae767c..2ec9e8f61 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -239,3 +239,37 @@ func TestContainerImagePullPolicy(t *testing.T) { // verify assert.Equal(t, c.ImagePullPolicy, corev1.PullIfNotPresent) } + +func TestContainerEnvFrom(t *testing.T) { + //prepare + envFrom1 := corev1.EnvFromSource{ + SecretRef: &corev1.SecretEnvSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "env-as-secret", + }, + }, + } + envFrom2 := corev1.EnvFromSource{ + ConfigMapRef: &corev1.ConfigMapEnvSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "env-as-configmap", + }, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + EnvFrom: []corev1.EnvFromSource{ + envFrom1, + envFrom2, + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Contains(t, c.EnvFrom, envFrom1) + assert.Contains(t, c.EnvFrom, envFrom2) +} From 53281c770b8b23f800b9aa8b66033e5e50b64acc Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Tue, 5 Oct 2021 13:22:47 +0530 Subject: [PATCH 0278/1234] Update approvers list, Juraci company affiliation (#446) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1099b5cb..b25ada2d4 100644 --- a/README.md +++ b/README.md @@ -182,11 +182,12 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): - [@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers) +- [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): - [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) -- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Red Hat +- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). From a3e5026f59e6a27d35033ee0fb29e881380991e4 Mon Sep 17 00:00:00 2001 From: Indrek Juhkam Date: Wed, 6 Oct 2021 13:42:08 +0300 Subject: [PATCH 0279/1234] Support changing pod collector annotations (#451) This allows setting podAnnotations, e.g: ``` --- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: opentelemetry annotations: foo: "this won't be applied to pods" spec: mode: deployment podAnnotations: ad.datadoghq.com/otc-container.check_names: '["openmetrics"]' ad.datadoghq.com/otc-container.init_configs: '[{}]' ad.datadoghq.com/otc-container.instances: |- [ { "prometheus_url": "http://%%host%%:8888/metrics", "namespace": "opentelemetry.collector", "metrics": [ {"otelcol_exporter_queue_size": "exporter.queue_size"}, {"otelcol_exporter_send_failed_spans": "exporter.send_failed_spans"}, {"otelcol_exporter_sent_spans": "exporter.sent_spans"}, ] } ] # ... ``` Fixes #426 --- CHANGELOG.md | 4 +++ api/v1alpha1/opentelemetrycollector_types.go | 6 ++++ api/v1alpha1/zz_generated.deepcopy.go | 7 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 21 ++++++++++++++ pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 21 ++++++++++++++ pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 21 ++++++++++++++ pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/deployment_test.go | 21 ++++++++++++++ .../e2e/smoke-pod-annotations/00-assert.yaml | 14 +++++++++ .../e2e/smoke-pod-annotations/00-install.yaml | 29 +++++++++++++++++++ 15 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 tests/e2e/smoke-pod-annotations/00-assert.yaml create mode 100644 tests/e2e/smoke-pod-annotations/00-install.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 53cc4e4c9..e512c3fcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +Unreleased +------------------- +* Allow changing Pod annotations using `podAnnotations` ([#451](https://github.com/open-telemetry/opentelemetry-operator/pull/451), [@indrekj](https://github.com/indrekj)) + 0.35.0 ------------------- * Bumped OpenTelemetry Collector to v0.35.0 diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/v1alpha1/opentelemetrycollector_types.go index ff94b8d7e..05c557f34 100644 --- a/api/v1alpha1/opentelemetrycollector_types.go +++ b/api/v1alpha1/opentelemetrycollector_types.go @@ -119,6 +119,12 @@ type OpenTelemetryCollectorSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Tolerations []v1.Toleration `json:"tolerations,omitempty"` + + // PodAnnotations is the set of annotations that will be attached to + // Collector and Target Allocator pods. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 1b0dd399f..c3fe7b0b3 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -154,6 +154,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index ff6ab740e..663a9b354 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -238,6 +238,12 @@ spec: - sidecar - statefulset type: string + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index ea627cba0..6f91cf34e 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -226,6 +226,12 @@ spec: - sidecar - statefulset type: string + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 719e1e6af..0a85b7ad0 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -46,7 +46,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Annotations, + Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 35791574a..ce236707a 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -72,3 +72,24 @@ func TestDaemonsetHostNetwork(t *testing.T) { }) assert.True(t, d2.Spec.Template.Spec.HostNetwork) } + +func TestDaemonsetPodAnnotations(t *testing.T) { + // prepare + testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodAnnotations: testPodAnnotationValues, + }, + } + cfg := config.New() + + // test + ds := DaemonSet(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", ds.Name) + assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 4d79a2b1c..f0508218a 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -47,7 +47,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Annotations, + Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 1cfe13594..6bc08e377 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -65,3 +65,24 @@ func TestDeploymentNewDefault(t *testing.T) { // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) } + +func TestDeploymentPodAnnotations(t *testing.T) { + // prepare + testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodAnnotations: testPodAnnotationValues, + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 925dc66c1..5751b0fcf 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -47,7 +47,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Annotations, + Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 4262a6202..372359696 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -123,3 +123,24 @@ func TestStatefulSetVolumeClaimTemplates(t *testing.T) { // assert correct pvc storage assert.Equal(t, resource.MustParse("1Gi"), ss.Spec.VolumeClaimTemplates[0].Spec.Resources.Requests["storage"]) } + +func TestStatefulSetPodAnnotations(t *testing.T) { + // prepare + testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodAnnotations: testPodAnnotationValues, + }, + } + cfg := config.New() + + // test + ss := StatefulSet(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", ss.Name) + assert.Equal(t, testPodAnnotationValues, ss.Spec.Template.Annotations) +} diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index d05052dae..1b79b9d3c 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -46,7 +46,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Annotations, + Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{Container(cfg, logger, otelcol)}, diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index 302c78ac7..11e2b05db 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -48,3 +48,24 @@ func TestDeploymentNewDefault(t *testing.T) { // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) } + +func TestDeploymentPodAnnotations(t *testing.T) { + // prepare + testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodAnnotations: testPodAnnotationValues, + }, + } + cfg := config.New() + + // test + ds := Deployment(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-targetallocator", ds.Name) + assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) +} diff --git a/tests/e2e/smoke-pod-annotations/00-assert.yaml b/tests/e2e/smoke-pod-annotations/00-assert.yaml new file mode 100644 index 000000000..a8d1af4fc --- /dev/null +++ b/tests/e2e/smoke-pod-annotations/00-assert.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: pa-collector + annotations: + regular-annotation: regular-value +spec: + template: + metadata: + annotations: + pod-annotation1: value1 + pod-annotation2: value2 +status: + readyReplicas: 1 diff --git a/tests/e2e/smoke-pod-annotations/00-install.yaml b/tests/e2e/smoke-pod-annotations/00-install.yaml new file mode 100644 index 000000000..6313db887 --- /dev/null +++ b/tests/e2e/smoke-pod-annotations/00-install.yaml @@ -0,0 +1,29 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: pa + annotations: + regular-annotation: regular-value +spec: + podAnnotations: + pod-annotation1: value1 + pod-annotation2: value2 + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + args: + metrics-level: detailed + log-level: debug From 6ddfbedc20b003b5431cae20f7014cdecd2cbc94 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 7 Oct 2021 09:54:51 +0200 Subject: [PATCH 0280/1234] Add flags to override hardcoded images (#449) * Add flags to override hardcoded images Signed-off-by: Pavol Loffay * Fix typos Signed-off-by: Pavol Loffay * Remove version from config Signed-off-by: Pavol Loffay * Fix tests Signed-off-by: Pavol Loffay --- .../opentelemetrycollector_controller_test.go | 2 +- internal/config/main.go | 18 ------------------ internal/config/main_test.go | 12 ------------ main.go | 15 +++++++++++---- pkg/collector/reconcile/suite_test.go | 13 +++++++++---- 5 files changed, 21 insertions(+), 39 deletions(-) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 7f2d20390..b4ad9b3f0 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -43,7 +43,7 @@ var logger = logf.Log.WithName("unit-tests") func TestNewObjectsOnReconciliation(t *testing.T) { // prepare - cfg := config.New() + cfg := config.New(config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator")) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, diff --git a/internal/config/main.go b/internal/config/main.go index d5f2be2d4..f0e1bf5ef 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -16,7 +16,6 @@ package config import ( - "fmt" "time" "github.com/go-logr/logr" @@ -50,7 +49,6 @@ type Config struct { targetAllocatorImage string targetAllocatorConfigMapEntry string platform platform.Platform - version version.Version } // New constructs a new configuration based on the given options. @@ -68,16 +66,6 @@ func New(opts ...Option) Config { opt(&o) } - // this is derived from another option, so, we need to first parse the options, then set a default - // if there's no explicit value being set - if len(o.collectorImage) == 0 { - o.collectorImage = fmt.Sprintf("otel/opentelemetry-collector:%s", o.version.OpenTelemetryCollector) - } - - if len(o.targetAllocatorImage) == 0 { - o.targetAllocatorImage = fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", o.version.TargetAllocator) - } - return Config{ autoDetect: o.autoDetect, autoDetectFrequency: o.autoDetectFrequency, @@ -88,7 +76,6 @@ func New(opts ...Option) Config { logger: o.logger, onChange: o.onChange, platform: o.platform, - version: o.version, } } @@ -179,8 +166,3 @@ func (c *Config) TargetAllocatorConfigMapEntry() string { func (c *Config) Platform() platform.Platform { return c.platform } - -// Version holds the versions used by this operator. -func (c *Config) Version() version.Version { - return c.version -} diff --git a/internal/config/main_test.go b/internal/config/main_test.go index c586e6f0d..ba981ab2d 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -23,7 +23,6 @@ import ( "github.com/stretchr/testify/require" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) @@ -42,17 +41,6 @@ func TestNewConfig(t *testing.T) { assert.Equal(t, platform.Kubernetes, cfg.Platform()) } -func TestOverrideVersion(t *testing.T) { - // prepare - v := version.Version{ - OpenTelemetryCollector: "the-version", - } - cfg := config.New(config.WithVersion(v)) - - // test - assert.Contains(t, cfg.CollectorImage(), "the-version") -} - func TestCallbackOnChanges(t *testing.T) { // prepare calledBack := false diff --git a/main.go b/main.go index 194dc0043..f8feb9aa4 100644 --- a/main.go +++ b/main.go @@ -17,6 +17,7 @@ package main import ( "context" "flag" + "fmt" "os" "runtime" "strings" @@ -60,23 +61,27 @@ func main() { opts.BindFlags(flag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + v := version.Get() + // Add flags related to this operator var metricsAddr string var enableLeaderElection bool + var collectorImage string + var targetAllocatorImage string pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") + pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("otel/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") - // Add flags related to this operator - v := version.Get() logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) logger.Info("Starting the OpenTelemetry Operator", "opentelemetry-operator", v.Operator, - "opentelemetry-collector", v.OpenTelemetryCollector, - "opentelemetry-targetallocator", v.TargetAllocator, + "opentelemetry-collector", collectorImage, + "opentelemetry-targetallocator", targetAllocatorImage, "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, @@ -95,6 +100,8 @@ func main() { cfg := config.New( config.WithLogger(ctrl.Log.WithName("config")), config.WithVersion(v), + config.WithCollectorImage(collectorImage), + config.WithTargetAllocatorImage(targetAllocatorImage), config.WithAutoDetect(ad), ) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 89441c2c6..bc91d64c0 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -47,6 +47,11 @@ var logger = logf.Log.WithName("unit-tests") var instanceUID = uuid.NewUUID() +const ( + defaultCollectorImage = "default-collector" + defaultTaAllocationImage = "default-ta-allocator" +) + func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, @@ -88,7 +93,7 @@ func params() Params { fmt.Printf("Error getting yaml file: %v", err) } return Params{ - Config: config.New(), + Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ @@ -120,7 +125,7 @@ func params() Params { } } -func newParams(containerImage string, file string) (Params, error) { +func newParams(taContainerImage string, file string) (Params, error) { replicas := int32(1) var configYAML []byte var err error @@ -134,7 +139,7 @@ func newParams(containerImage string, file string) (Params, error) { return Params{}, fmt.Errorf("Error getting yaml file: %w", err) } - cfg := config.New() + cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) return Params{ Config: cfg, @@ -162,7 +167,7 @@ func newParams(containerImage string, file string) (Params, error) { }}, TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ Enabled: true, - Image: containerImage, + Image: taContainerImage, }, Replicas: &replicas, Config: string(configYAML), From 1ad695d94926fb2c896cf62b97bdd7e24f430120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Lu=C3=ADs=20da=20Silva?= Date: Thu, 7 Oct 2021 05:03:59 -0300 Subject: [PATCH 0281/1234] Increase resource limits (#440) --- .../opentelemetry-operator.clusterserviceversion.yaml | 4 ++-- config/manager/manager.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 20b493461..99bfc9ac6 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -212,8 +212,8 @@ spec: protocol: TCP resources: limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: cpu: 100m memory: 64Mi diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 18993a0ce..fbb8654dd 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -29,8 +29,8 @@ spec: name: manager resources: limits: - cpu: 100m - memory: 128Mi + cpu: 200m + memory: 256Mi requests: cpu: 100m memory: 64Mi From 9aa016b21b2168ca4facf5867b3aaeb09df8b45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Fri, 8 Oct 2021 12:38:24 +0200 Subject: [PATCH 0282/1234] Promote @VineethReddy02 to maintainer of the operator (#454) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #445 Signed-off-by: Juraci Paixão Kröhling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b25ada2d4..a7789a9a7 100644 --- a/README.md +++ b/README.md @@ -182,12 +182,12 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): - [@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers) -- [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): - [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs +- [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). From 23736f9a72223b8831bea240b6d35b9ffcdde40d Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 14 Oct 2021 13:17:47 +0530 Subject: [PATCH 0283/1234] Update Otel collector to 0.36.0 (#453) --- CHANGELOG.md | 4 +++- README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e512c3fcc..a32d9c519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ Changes by Version ================== -Unreleased +0.36.0 ------------------- +* Bumped OpenTelemetry Collector to v0.36.0 +* Add `envFrom` to collector spec ([#419](https://github.com/open-telemetry/opentelemetry-operator/pull/419), [@ctison](https://github.com/ctison)) * Allow changing Pod annotations using `podAnnotations` ([#451](https://github.com/open-telemetry/opentelemetry-operator/pull/451), [@indrekj](https://github.com/indrekj)) 0.35.0 diff --git a/README.md b/README.md index a7789a9a7..ddaa612a0 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.36.0 | v1.20 to v1.22 | | v0.35.0 | v1.20 to v1.22 | | v0.34.0 | v1.20 to v1.22 | | v0.33.0 | v1.20 to v1.22 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 99bfc9ac6..61a07c72e 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.35.0 + name: opentelemetry-operator.v0.36.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -204,7 +204,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: quay.io/opentelemetry/opentelemetry-operator:v0.35.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.36.0 name: manager ports: - containerPort: 9443 @@ -296,7 +296,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.35.0 + version: 0.36.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 2c9dbbe13..4e138cd75 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.35.0 +opentelemetry-collector=0.36.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.35.0 +operator=0.36.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From fb2778b7d701f52202b904e94c84d53dfdcd558e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 10:30:50 +0200 Subject: [PATCH 0284/1234] Bump actions/checkout from 2.3.4 to 2.3.5 (#459) Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.3.5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/release.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 21a311ef2..c990bf5ac 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -17,7 +17,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Lint uses: golangci/golangci-lint-action@v2.5.2 @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 09b70184e..adc0cc904 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -26,7 +26,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v2.3.5 - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 80cffba5c..fb89a1e0c 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -13,7 +13,7 @@ jobs: name: Publish container images runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4d572cfc7..539c24565 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.17 - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.5 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh From 43904c41a3ff6e7863a836fa1ce044a795ddb9d3 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 18 Oct 2021 14:03:07 +0530 Subject: [PATCH 0285/1234] Update opentelemetry collector to 0.37.0 (#458) --- CHANGELOG.md | 4 ++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a32d9c519..1258bcb16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.37.0 +------------------- +* Bumped OpenTelemetry Collector to v0.37.0 + 0.36.0 ------------------- * Bumped OpenTelemetry Collector to v0.36.0 diff --git a/README.md b/README.md index ddaa612a0..958a102c0 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.37.0 | v1.20 to v1.22 | | v0.36.0 | v1.20 to v1.22 | | v0.35.0 | v1.20 to v1.22 | | v0.34.0 | v1.20 to v1.22 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 61a07c72e..aed06c32f 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.36.0 + name: opentelemetry-operator.v0.37.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -204,7 +204,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: quay.io/opentelemetry/opentelemetry-operator:v0.36.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.37.0 name: manager ports: - containerPort: 9443 @@ -296,7 +296,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.36.0 + version: 0.37.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 4e138cd75..ae9b34de4 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.36.0 +opentelemetry-collector=0.37.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.36.0 +operator=0.37.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From a45ce3d72b4df52f8e76a02abbfa83f30c1858e1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 22 Oct 2021 10:41:26 +0200 Subject: [PATCH 0286/1234] Move otelcol api into api/otelcol (#462) Signed-off-by: Pavol Loffay --- api/{ => otelcol}/v1alpha1/groupversion_info.go | 0 api/{ => otelcol}/v1alpha1/mode.go | 0 api/{ => otelcol}/v1alpha1/opentelemetrycollector_types.go | 0 api/{ => otelcol}/v1alpha1/opentelemetrycollector_webhook.go | 0 api/{ => otelcol}/v1alpha1/zz_generated.deepcopy.go | 0 controllers/opentelemetrycollector_controller.go | 2 +- controllers/opentelemetrycollector_controller_test.go | 2 +- controllers/suite_test.go | 2 +- internal/podinjector/main.go | 2 +- internal/podinjector/main_test.go | 2 +- internal/podinjector/podinjector_suite_test.go | 2 +- main.go | 2 +- pkg/collector/annotations.go | 2 +- pkg/collector/annotations_test.go | 2 +- pkg/collector/container.go | 2 +- pkg/collector/container_test.go | 2 +- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/labels.go | 2 +- pkg/collector/labels_test.go | 2 +- pkg/collector/reconcile/configmap_test.go | 2 +- pkg/collector/reconcile/deployment_test.go | 2 +- pkg/collector/reconcile/opentelemetry_test.go | 2 +- pkg/collector/reconcile/params.go | 2 +- pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/service_test.go | 2 +- pkg/collector/reconcile/serviceaccount.go | 2 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/collector/serviceaccount.go | 2 +- pkg/collector/serviceaccount_test.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 2 +- pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/suite_test.go | 2 +- pkg/collector/upgrade/upgrade.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 2 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 2 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_24_0_test.go | 2 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_31_0_test.go | 2 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 2 +- pkg/collector/upgrade/versions.go | 2 +- pkg/collector/volume.go | 2 +- pkg/collector/volume_test.go | 2 +- pkg/collector/volumeclaim.go | 2 +- pkg/collector/volumeclaim_test.go | 2 +- pkg/naming/main.go | 2 +- pkg/sidecar/pod.go | 2 +- pkg/sidecar/pod_test.go | 2 +- pkg/targetallocator/container.go | 2 +- pkg/targetallocator/container_test.go | 2 +- pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/deployment_test.go | 2 +- pkg/targetallocator/labels.go | 2 +- pkg/targetallocator/labels_test.go | 2 +- pkg/targetallocator/volume.go | 2 +- pkg/targetallocator/volume_test.go | 2 +- 65 files changed, 60 insertions(+), 60 deletions(-) rename api/{ => otelcol}/v1alpha1/groupversion_info.go (100%) rename api/{ => otelcol}/v1alpha1/mode.go (100%) rename api/{ => otelcol}/v1alpha1/opentelemetrycollector_types.go (100%) rename api/{ => otelcol}/v1alpha1/opentelemetrycollector_webhook.go (100%) rename api/{ => otelcol}/v1alpha1/zz_generated.deepcopy.go (100%) diff --git a/api/v1alpha1/groupversion_info.go b/api/otelcol/v1alpha1/groupversion_info.go similarity index 100% rename from api/v1alpha1/groupversion_info.go rename to api/otelcol/v1alpha1/groupversion_info.go diff --git a/api/v1alpha1/mode.go b/api/otelcol/v1alpha1/mode.go similarity index 100% rename from api/v1alpha1/mode.go rename to api/otelcol/v1alpha1/mode.go diff --git a/api/v1alpha1/opentelemetrycollector_types.go b/api/otelcol/v1alpha1/opentelemetrycollector_types.go similarity index 100% rename from api/v1alpha1/opentelemetrycollector_types.go rename to api/otelcol/v1alpha1/opentelemetrycollector_types.go diff --git a/api/v1alpha1/opentelemetrycollector_webhook.go b/api/otelcol/v1alpha1/opentelemetrycollector_webhook.go similarity index 100% rename from api/v1alpha1/opentelemetrycollector_webhook.go rename to api/otelcol/v1alpha1/opentelemetrycollector_webhook.go diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/otelcol/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from api/v1alpha1/zz_generated.deepcopy.go rename to api/otelcol/v1alpha1/zz_generated.deepcopy.go diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 27a54ff62..63d294f0f 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -28,7 +28,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index b4ad9b3f0..56fdd43e2 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 7b3cfdcef..4530ad1ec 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index e9d99473c..1c91f0d50 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index bc1bd72f8..55050ea8a 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/internal/podinjector/podinjector_suite_test.go b/internal/podinjector/podinjector_suite_test.go index 5ba5b7349..7a13da217 100644 --- a/internal/podinjector/podinjector_suite_test.go +++ b/internal/podinjector/podinjector_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/main.go b/main.go index f8feb9aa4..2a865d132 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" - opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index 1d7cc9b4b..28c1e23c1 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -18,7 +18,7 @@ import ( "crypto/sha256" "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) // Annotations return the annotations for OpenTelemetryCollector pod. diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index 2e5adf0ce..33d9d320d 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) func TestDefaultAnnotations(t *testing.T) { diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 17db54389..11c197862 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 2ec9e8f61..70065793e 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 0a85b7ad0..8e5555bc6 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index ce236707a..11c670cbc 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index f0508218a..57f284703 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 6bc08e377..0e19b68a9 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 0d62e2270..b31d4da26 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -17,7 +17,7 @@ package collector import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 3a6a1e0d4..37ab773e0 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 8ee8775b5..d855760fc 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 5069c2b15..e6c8188de 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go index 50c08d78e..f4d7d81ad 100644 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) func TestSelf(t *testing.T) { diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index 6fcbf8dc0..8ff833f1f 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -20,7 +20,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index b1c923944..98a39a44c 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 461f5f69a..223b26557 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index ecf140b3d..8bdd53774 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index bc91d64c0..112759d23 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index 17ba39a7c..b1aeffb86 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -18,7 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 1430811a4..6cce1184c 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 5751b0fcf..c49509d28 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 372359696..b29834a60 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index bf0598cf3..af294a8c7 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) //nolint unused diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index 47ca3150c..df1d123bf 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index fd4495b16..514112b12 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 449246b67..f7ff3aea4 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 4fbac3ea2..66da57afd 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index dd4c4bea0..5ddfdefb2 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index ad69d09b5..a7193ba17 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index 0bb2acda5..ea3dd8409 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 3eddfaaee..8c1dfe3f1 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 861a6b374..552e6191e 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index c4e7c5c6b..c87cb0b4a 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 1fb3e5d44..8914e3a02 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index eeaf6fd87..e6efaa031 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 5747282c1..6094ccc37 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 9d71715e8..70d84797c 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 63372d999..f280081ee 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -18,7 +18,7 @@ import ( "github.com/Masterminds/semver/v3" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index 292326e7c..77f8d6a42 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -18,7 +18,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index ecc3aa808..d7f41e97e 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index 421d71ce9..ef8a274d7 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index 7f17c285a..85cc40b4d 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 49970f4ec..86b82d1cc 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -18,7 +18,7 @@ package naming import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 0dd4a79bf..4b582b0cf 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index d7c8795dc..4a0e98b95 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index 139f9126e..50c16aa71 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 70314f3b6..ad113dcf7 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 1b79b9d3c..1dd5d6f5c 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index 11e2b05db..c087687ac 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index f825d633d..a64bfea2b 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -17,7 +17,7 @@ package targetallocator import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go index 83accd55f..8475a592f 100644 --- a/pkg/targetallocator/labels_test.go +++ b/pkg/targetallocator/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" ) func TestLabelsCommonSet(t *testing.T) { diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go index 33f901ff6..22cfc65ef 100644 --- a/pkg/targetallocator/volume.go +++ b/pkg/targetallocator/volume.go @@ -17,7 +17,7 @@ package targetallocator import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go index 11b0da1f2..0e9b4462e 100644 --- a/pkg/targetallocator/volume_test.go +++ b/pkg/targetallocator/volume_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/api/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) From 02dc4901d7ceefa630539374226665969f3191f2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 25 Oct 2021 15:32:06 +0200 Subject: [PATCH 0287/1234] Rename API package otelcol to collector (#471) Signed-off-by: Pavol Loffay --- api/{otelcol => collector}/v1alpha1/groupversion_info.go | 0 api/{otelcol => collector}/v1alpha1/mode.go | 0 .../v1alpha1/opentelemetrycollector_types.go | 0 .../v1alpha1/opentelemetrycollector_webhook.go | 0 api/{otelcol => collector}/v1alpha1/zz_generated.deepcopy.go | 0 controllers/opentelemetrycollector_controller.go | 2 +- controllers/opentelemetrycollector_controller_test.go | 2 +- controllers/suite_test.go | 2 +- internal/podinjector/main.go | 2 +- internal/podinjector/main_test.go | 2 +- internal/podinjector/podinjector_suite_test.go | 2 +- main.go | 2 +- pkg/collector/annotations.go | 2 +- pkg/collector/annotations_test.go | 2 +- pkg/collector/container.go | 2 +- pkg/collector/container_test.go | 2 +- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/labels.go | 2 +- pkg/collector/labels_test.go | 2 +- pkg/collector/reconcile/configmap_test.go | 2 +- pkg/collector/reconcile/deployment_test.go | 2 +- pkg/collector/reconcile/opentelemetry_test.go | 2 +- pkg/collector/reconcile/params.go | 2 +- pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/service_test.go | 2 +- pkg/collector/reconcile/serviceaccount.go | 2 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/collector/serviceaccount.go | 2 +- pkg/collector/serviceaccount_test.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 2 +- pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/suite_test.go | 2 +- pkg/collector/upgrade/upgrade.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 2 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 2 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_24_0_test.go | 2 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_31_0_test.go | 2 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 2 +- pkg/collector/upgrade/versions.go | 2 +- pkg/collector/volume.go | 2 +- pkg/collector/volume_test.go | 2 +- pkg/collector/volumeclaim.go | 2 +- pkg/collector/volumeclaim_test.go | 2 +- pkg/naming/main.go | 2 +- pkg/sidecar/pod.go | 2 +- pkg/sidecar/pod_test.go | 2 +- pkg/targetallocator/container.go | 2 +- pkg/targetallocator/container_test.go | 2 +- pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/deployment_test.go | 2 +- pkg/targetallocator/labels.go | 2 +- pkg/targetallocator/labels_test.go | 2 +- pkg/targetallocator/volume.go | 2 +- pkg/targetallocator/volume_test.go | 2 +- 65 files changed, 60 insertions(+), 60 deletions(-) rename api/{otelcol => collector}/v1alpha1/groupversion_info.go (100%) rename api/{otelcol => collector}/v1alpha1/mode.go (100%) rename api/{otelcol => collector}/v1alpha1/opentelemetrycollector_types.go (100%) rename api/{otelcol => collector}/v1alpha1/opentelemetrycollector_webhook.go (100%) rename api/{otelcol => collector}/v1alpha1/zz_generated.deepcopy.go (100%) diff --git a/api/otelcol/v1alpha1/groupversion_info.go b/api/collector/v1alpha1/groupversion_info.go similarity index 100% rename from api/otelcol/v1alpha1/groupversion_info.go rename to api/collector/v1alpha1/groupversion_info.go diff --git a/api/otelcol/v1alpha1/mode.go b/api/collector/v1alpha1/mode.go similarity index 100% rename from api/otelcol/v1alpha1/mode.go rename to api/collector/v1alpha1/mode.go diff --git a/api/otelcol/v1alpha1/opentelemetrycollector_types.go b/api/collector/v1alpha1/opentelemetrycollector_types.go similarity index 100% rename from api/otelcol/v1alpha1/opentelemetrycollector_types.go rename to api/collector/v1alpha1/opentelemetrycollector_types.go diff --git a/api/otelcol/v1alpha1/opentelemetrycollector_webhook.go b/api/collector/v1alpha1/opentelemetrycollector_webhook.go similarity index 100% rename from api/otelcol/v1alpha1/opentelemetrycollector_webhook.go rename to api/collector/v1alpha1/opentelemetrycollector_webhook.go diff --git a/api/otelcol/v1alpha1/zz_generated.deepcopy.go b/api/collector/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from api/otelcol/v1alpha1/zz_generated.deepcopy.go rename to api/collector/v1alpha1/zz_generated.deepcopy.go diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 63d294f0f..70d157354 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -28,7 +28,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 56fdd43e2..b289a2a12 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 4530ad1ec..a45d487d7 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/internal/podinjector/main.go b/internal/podinjector/main.go index 1c91f0d50..6611638a7 100644 --- a/internal/podinjector/main.go +++ b/internal/podinjector/main.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) diff --git a/internal/podinjector/main_test.go b/internal/podinjector/main_test.go index 55050ea8a..4e6b65235 100644 --- a/internal/podinjector/main_test.go +++ b/internal/podinjector/main_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/internal/podinjector/podinjector_suite_test.go b/internal/podinjector/podinjector_suite_test.go index 7a13da217..f5b20de7f 100644 --- a/internal/podinjector/podinjector_suite_test.go +++ b/internal/podinjector/podinjector_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/main.go b/main.go index 2a865d132..278fa6e7f 100644 --- a/main.go +++ b/main.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" - opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index 28c1e23c1..004242235 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -18,7 +18,7 @@ import ( "crypto/sha256" "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) // Annotations return the annotations for OpenTelemetryCollector pod. diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index 33d9d320d..b9fc1e4ff 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) func TestDefaultAnnotations(t *testing.T) { diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 11c197862..9ba75c108 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 70065793e..bbc4ca3f3 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 8e5555bc6..31997d4b5 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 11c670cbc..912fe41e5 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 57f284703..70f565532 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 0e19b68a9..20019845c 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index b31d4da26..18138dc8d 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -17,7 +17,7 @@ package collector import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 37ab773e0..a7cc8a8b5 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index d855760fc..ccbb8fbe6 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index e6c8188de..c3fcc858c 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go index f4d7d81ad..925d6a288 100644 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) func TestSelf(t *testing.T) { diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index 8ff833f1f..ef437005f 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -20,7 +20,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 98a39a44c..d7cbedfb3 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 223b26557..8eee53e08 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 8bdd53774..ca66af4c9 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 112759d23..cab81e21d 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index b1aeffb86..06a7ae788 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -18,7 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 6cce1184c..387045b7e 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index c49509d28..f20d92603 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index b29834a60..1718689b8 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index af294a8c7..fcca7effb 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) //nolint unused diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index df1d123bf..a058bb7d9 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 514112b12..ab551c49a 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index f7ff3aea4..592e17537 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 66da57afd..8cff80781 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 5ddfdefb2..2ace5c2e3 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index a7193ba17..71bf9ac34 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index ea3dd8409..c1dda68d5 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 8c1dfe3f1..953ba2b69 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 552e6191e..0272b44ee 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index c87cb0b4a..bd9425e46 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 8914e3a02..3f1ceda50 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index e6efaa031..1fd8deb6d 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 6094ccc37..bd94858ca 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 70d84797c..80d0b4e2f 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index f280081ee..e98c64890 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -18,7 +18,7 @@ import ( "github.com/Masterminds/semver/v3" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index 77f8d6a42..a634bb6ac 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -18,7 +18,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index d7f41e97e..2594ad36e 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index ef8a274d7..2d97697a1 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index 85cc40b4d..f7d1ce209 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 86b82d1cc..762eb8c68 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -18,7 +18,7 @@ package naming import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 4b582b0cf..043009924 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 4a0e98b95..64946f626 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index 50c16aa71..39fb3f3bc 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index ad113dcf7..64e2ee238 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 1dd5d6f5c..4dd10d0c4 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index c087687ac..06df61c90 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index a64bfea2b..8202b63f8 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -17,7 +17,7 @@ package targetallocator import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go index 8475a592f..12f9fd5ab 100644 --- a/pkg/targetallocator/labels_test.go +++ b/pkg/targetallocator/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" ) func TestLabelsCommonSet(t *testing.T) { diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go index 22cfc65ef..6efcbff91 100644 --- a/pkg/targetallocator/volume.go +++ b/pkg/targetallocator/volume.go @@ -17,7 +17,7 @@ package targetallocator import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go index 0e9b4462e..67d2c571e 100644 --- a/pkg/targetallocator/volume_test.go +++ b/pkg/targetallocator/volume_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/api/otelcol/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) From 3dc08689cf6bc465c7f70c940f12836d06f24623 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 25 Oct 2021 16:21:11 +0200 Subject: [PATCH 0288/1234] Apply nicer code formatting in readmes (#470) * Apply nicer code formatting in readmes Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- CONTRIBUTING.md | 28 ++++++++++++++-------------- README.md | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edef46487..80fd94419 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,12 +12,12 @@ We gratefully welcome improvements to documentation as well as to code. It is recommended to follow the ["GitHub Workflow"](https://guides.github.com/introduction/flow/). When using [GitHub's CLI](https://github.com/cli/cli), here's how it typically looks like: -``` -$ gh repo fork github.com/open-telemetry/opentelemetry-operator -$ git checkout -b your-feature-branch +```bash +gh repo fork github.com/open-telemetry/opentelemetry-operator +git checkout -b your-feature-branch # do your changes -$ git commit -sam "Add feature X" -$ gh pr create +git commit -sam "Add feature X" +gh pr create ``` ### Pre-requisites @@ -27,8 +27,8 @@ $ gh pr create ### Local run Build the manifests, install the CRD and run the operator as a local process: -``` -$ make bundle install run +```bash +make bundle install run ``` ### Deployment with webhooks @@ -40,13 +40,13 @@ When running `make run`, the webhooks aren't effective as it starts the manager In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: -```console +```bash make cert-manager ``` Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: -``` +```bash make bundle container container-push deploy ``` @@ -63,7 +63,7 @@ Your operator will be available in the `opentelemetry-operator-system` namespace ## Testing With an existing cluster (such as `minikube`), run: -``` +```bash USE_EXISTING_CLUSTER=true make test ``` @@ -107,7 +107,7 @@ For production environments, it is recommended to use the [Operator Lifecycle Ma When using Kubernetes, install OLM following the [official instructions](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md). At the moment of this writing, it involves the following: -``` +```bash kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml kubectl wait --for=condition=available deployment packageserver -n olm @@ -121,7 +121,7 @@ When using OpenShift, OLM is already installed. The following commands will generate a bundle under `bundle/` and build an image with its contents. It will then generate and publish an index image with the [Operator Package Manager (OPM)](https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md#opm) -``` +```bash export VERSION=x.y.z make set-image-controller bundle bundle-build podman push quay.io/${USER}/opentelemetry-operator-bundle:${VERSION} @@ -133,7 +133,7 @@ podman push quay.io/${USER}/opentelemetry-operator-index:${VERSION} To install our operator, create a `CatalogSource` for our index image, wait for OLM to synchronize and finally create a `Subscription`. Make sure to replace `${USER}` with your username and `${VERSION}` with the version used in the previous step. The namespace for both should be `operators` on Kubernetes, while `openshift-operators` should be used for OpenShift. -``` +```yaml kubectl apply -f - < Date: Tue, 26 Oct 2021 10:35:09 +0200 Subject: [PATCH 0289/1234] Bump docker/metadata-action from 3.5.0 to 3.6.0 (#472) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.5.0 to 3.6.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.5.0...v3.6.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index fb89a1e0c..512ffefec 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.5.0 + uses: docker/metadata-action@v3.6.0 with: images: quay.io/opentelemetry/opentelemetry-operator tag-semver: | From ca4c187e440a01d6e16d955bf5e36ef59720f4e7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 26 Oct 2021 11:59:44 +0200 Subject: [PATCH 0290/1234] Bump operator-sdk to 1.13.1 (#450) * Bump operator-sdk to 1.13.0 Signed-off-by: Pavol Loffay * Add diff Signed-off-by: Pavol Loffay * Add diff Signed-off-by: Pavol Loffay * Add diff Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/release.yaml | 2 +- Makefile | 4 +- ...-controller-manager_v1_serviceaccount.yaml | 5 --- ...emetry-operator.clusterserviceversion.yaml | 44 +++++++++---------- 5 files changed, 26 insertions(+), 31 deletions(-) delete mode 100644 bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index c990bf5ac..208ee2ca9 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -27,7 +27,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.10.1 + operator-sdk-version: v1.13.1 - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 539c24565..11ebec50f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.10.1 + operator-sdk-version: v1.13.1 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" diff --git a/Makefile b/Makefile index 2384cc3e7..6bbf6d68a 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ ensure-generate-is-noop: set-image-controller generate bundle @# on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check @git restore config/manager/kustomization.yaml @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) - @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && exit 1) + @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && git diff && exit 1) all: manager ci: test @@ -213,7 +213,7 @@ OPERATOR_SDK=$(shell which operator-sdk) endif # Generate bundle manifests and metadata, then validate generated files. -bundle: kustomize operator-sdk manifests +bundle: kustomize operator-sdk manifests set-image-controller $(OPERATOR_SDK) generate kustomize manifests -q $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --manifests --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(OPERATOR_SDK) bundle validate ./bundle diff --git a/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml b/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml deleted file mode 100644 index bda92e5a1..000000000 --- a/bundle/manifests/opentelemetry-operator-controller-manager_v1_serviceaccount.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - creationTimestamp: null - name: opentelemetry-operator-controller-manager diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index aed06c32f..7b32ec8c1 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -21,7 +21,7 @@ metadata: containerImage: quay.io/opentelemetry/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git + operators.operatorframework.io/builder: operator-sdk-v1.13.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community @@ -304,7 +304,7 @@ spec: containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Fail - generateName: vopentelemetrycollectorcreateupdate.kb.io + generateName: mopentelemetrycollector.kb.io rules: - apiGroups: - opentelemetry.io @@ -317,35 +317,36 @@ spec: - opentelemetrycollectors sideEffects: None targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + type: MutatingAdmissionWebhook + webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Ignore - generateName: vopentelemetrycollectordelete.kb.io + generateName: mpod.kb.io rules: - apiGroups: - - opentelemetry.io + - "" apiVersions: - - v1alpha1 + - v1 operations: - - DELETE + - CREATE + - UPDATE resources: - - opentelemetrycollectors + - pods sideEffects: None targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + type: MutatingAdmissionWebhook + webhookPath: /mutate-v1-pod - admissionReviewVersions: - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Fail - generateName: mopentelemetrycollector.kb.io + generateName: vopentelemetrycollectorcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -358,26 +359,25 @@ spec: - opentelemetrycollectors sideEffects: None targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: - v1 - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Ignore - generateName: mpod.kb.io + generateName: vopentelemetrycollectordelete.kb.io rules: - apiGroups: - - "" + - opentelemetry.io apiVersions: - - v1 + - v1alpha1 operations: - - CREATE - - UPDATE + - DELETE resources: - - pods + - opentelemetrycollectors sideEffects: None targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-v1-pod + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector From f6e2932615e2088ddb5fc045ad7d0f00c747d380 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 27 Oct 2021 18:02:47 +0530 Subject: [PATCH 0291/1234] Add 0.36.0 upgrade routine (#465) * Add 0.36.0 upgrade routine --- pkg/collector/upgrade/v0_36_0.go | 126 ++++++++++++++++++++++++++ pkg/collector/upgrade/v0_36_0_test.go | 122 +++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + 3 files changed, 252 insertions(+) create mode 100644 pkg/collector/upgrade/v0_36_0.go create mode 100644 pkg/collector/upgrade/v0_36_0_test.go diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go new file mode 100644 index 000000000..502a516cc --- /dev/null +++ b/pkg/collector/upgrade/v0_36_0.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_36_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.36.0, failed to parse configuration: %w", err) + } + + // upgrading the receivers + receivers, ok := cfg["receivers"].(map[interface{}]interface{}) + if !ok { + // no receivers? no need to fail because of that + return otelcol, nil + } + + for k1, v1 := range receivers { + // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#-breaking-changes--2 + // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector/pull/4063 + + // Change tls config key from tls_settings to tls in otlp.protocols.grpc + if strings.HasPrefix(k1.(string), "otlp") { + otlpConfig, ok := v1.(map[interface{}]interface{}) + if !ok { + // no otlpConfig? no need to fail because of that + return otelcol, nil + } + for k2, v2 := range otlpConfig { + // protocols config + if k2 == "protocols" { + protocConfig, ok := v2.(map[interface{}]interface{}) + if !ok { + // no protocolConfig? no need to fail because of that + return otelcol, nil + } + for k3, v3 := range protocConfig { + // grpc config + if k3 == "grpc" || k3 == "http" { + grpcHttpConfig, ok := v3.(map[interface{}]interface{}) + if !ok { + // no grpcHttpConfig? no need to fail because of that + return otelcol, nil + } + for k4, v4 := range grpcHttpConfig { + // change tls_settings to tls + if k4.(string) == "tls_settings" { + grpcHttpConfig["tls"] = v4 + delete(grpcHttpConfig, "tls_settings") + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", k3, k1)) + } + } + } + } + } + } + } + } + cfg["receivers"] = receivers + + // upgrading the exporters + exporters, ok := cfg["exporters"].(map[interface{}]interface{}) + if !ok { + // no exporters? no need to fail because of that + return otelcol, nil + } + + for k1, v1 := range exporters { + // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#-breaking-changes--2 + // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector/pull/4063 + + // Move all tls config into separate field i,e, tls.* + if strings.HasPrefix(k1.(string), "otlp") { + otlpConfig, ok := v1.(map[interface{}]interface{}) + if !ok { + // no otlpConfig? no need to fail because of that + return otelcol, nil + } + tlsConfig := make(map[interface{}]interface{}, 5) + for key, value := range otlpConfig { + if key == "ca_file" || key == "cert_file" || key == "key_file" || key == "min_version" || key == "max_version" || + key == "insecure" || key == "insecure_skip_verify" || key == "server_name_override" { + tlsConfig[key] = value + delete(otlpConfig, key) + } + otlpConfig["tls"] = tlsConfig + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", k1)) + } + } + } + cfg["exporters"] = exporters + + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.36.0, failed to marshall back configuration: %w", err) + } + otelcol.Spec.Config = string(res) + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go new file mode 100644 index 000000000..d8ace5140 --- /dev/null +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -0,0 +1,122 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_36_0Upgrade(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: + otlp/mtls: + protocols: + grpc: + endpoint: mysite.local:55690 + tls_settings: + client_ca_file: client.pem + cert_file: server.crt + key_file: server.key + http: + endpoint: mysite.local:55690 + tls_settings: + client_ca_file: client.pem + cert_file: server.crt + key_file: server.key +exporters: + otlp: + endpoint: "example.com" + ca_file: /var/lib/mycert.pem + insecure: true + key_file: keyfile + min_version: "1.0.0" + max_version: "2.0.2" + insecure_skip_verify: true + server_name_override: hii + +service: + pipelines: + traces: + receivers: [otlp/mtls] + exporters: [otlp] +`, + }, + } + existing.Status.Version = "0.35.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, `exporters: + otlp: + endpoint: example.com + tls: + ca_file: /var/lib/mycert.pem + insecure: true + insecure_skip_verify: true + key_file: keyfile + max_version: 2.0.2 + min_version: 1.0.0 + server_name_override: hii +receivers: + otlp/mtls: + protocols: + grpc: + endpoint: mysite.local:55690 + tls: + cert_file: server.crt + client_ca_file: client.pem + key_file: server.key + http: + endpoint: mysite.local:55690 + tls: + cert_file: server.crt + client_ca_file: client.pem + key_file: server.key +service: + pipelines: + traces: + exporters: + - otlp + receivers: + - otlp/mtls +`, res.Spec.Config) + assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "grpc", "otlp/mtls"), res.Status.Messages[0]) + assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "http", "otlp/mtls"), res.Status.Messages[1]) + assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", "otlp"), res.Status.Messages[2]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index e98c64890..2e23ef197 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -54,6 +54,10 @@ var ( Version: *semver.MustParse("0.31.0"), upgrade: upgrade0_31_0, }, + { + Version: *semver.MustParse("0.36.0"), + upgrade: upgrade0_36_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From f4273b84f9da6f8ec0a296bdf67653e3a8da69d4 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 27 Oct 2021 18:07:45 +0530 Subject: [PATCH 0292/1234] Update collector to 0.37.1 (#467) --- CHANGELOG.md | 4 ++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1258bcb16..2c5b7d575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changes by Version ================== +0.37.1 +------------------- +* Bumped OpenTelemetry Collector to v0.37.1 + 0.37.0 ------------------- * Bumped OpenTelemetry Collector to v0.37.0 diff --git a/README.md b/README.md index 9d52a46ec..3398fa151 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | |------------------------|----------------------| +| v0.37.1 | v1.20 to v1.22 | | v0.37.0 | v1.20 to v1.22 | | v0.36.0 | v1.20 to v1.22 | | v0.35.0 | v1.20 to v1.22 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7b32ec8c1..2ec8cca14 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.37.0 + name: opentelemetry-operator.v0.37.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -204,7 +204,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: quay.io/opentelemetry/opentelemetry-operator:v0.37.0 + image: quay.io/opentelemetry/opentelemetry-operator:v0.37.1 name: manager ports: - containerPort: 9443 @@ -296,7 +296,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.37.0 + version: 0.37.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index ae9b34de4..326396595 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.37.0 +opentelemetry-collector=0.37.1 # Represents the current release of the OpenTelemetry Operator. -operator=0.37.0 +operator=0.37.1 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 56a86fb234eb9be0d735e75fde0693e3e32ae7c7 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 28 Oct 2021 10:57:48 +0200 Subject: [PATCH 0293/1234] Fix pre-requisites of contributing doc (#476) * Fix pre-requisites of contributing doc * Including public visibility procedure as alternative --- CONTRIBUTING.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 80fd94419..ec090132b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,8 +22,10 @@ gh pr create ### Pre-requisites * Install [Go](https://golang.org/doc/install). +* Install [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/). * Have a Kubernetes cluster ready for development. We recommend `minikube` or `kind`. + ### Local run Build the manifests, install the CRD and run the operator as a local process: @@ -44,12 +46,6 @@ In general, it's just easier to deploy the manager in a Kubernetes cluster inste make cert-manager ``` -Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: - -```bash -make bundle container container-push deploy -``` - By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: * `IMG_PREFIX`, to override the registry, namespace and image name (`quay.io`) @@ -58,6 +54,20 @@ By default, it will generate an image following the format `quay.io/${USER}/open * `VERSION`, to override only the version part * `IMG`, to override the entire image specification +Ensure the secret [regcred](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) has been created to enable opentelemetry-operator-controller-manager deployment to pull images from your private `quay.io` registry. + +```bash +kubectl create secret docker-registry regcred --docker-server=quay.io --docker-username=${USER} --docker-password=${PASSWORD} -n opentelemetry-operator-system +``` + +Alternatively, you could create your repository with [Public Visibility](https://docs.projectquay.io/use_quay.html#creating-an-image-repository-via-the-ui). + +Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: + +```bash +make bundle container container-push deploy +``` + Your operator will be available in the `opentelemetry-operator-system` namespace. ## Testing From 38472624b8c76b37229495587d45302c240971b1 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 28 Oct 2021 14:37:08 +0200 Subject: [PATCH 0294/1234] Including undeploy feature on Makefile (#480) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Including undeploy feature on Makefile * Update CONTRIBUTING.md Co-authored-by: Juraci Paixão Kröhling Co-authored-by: Juraci Paixão Kröhling --- CONTRIBUTING.md | 6 ++++++ Makefile | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec090132b..759229d61 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -87,6 +87,12 @@ Once they are installed, the tests can be executed with `make prepare-e2e`, whic The tests are located under `tests/e2e` and are written to be used with `kuttl`. Refer to their documentation to understand how tests are written. +### Undeploying the operator from the local cluster + +```bash +make undeploy +``` + ## Project Structure For a general overview of the directories from this operator and what to expect in each one of them, please check out the [official GoDoc](https://godoc.org/github.com/open-telemetry/opentelemetry-operator) or the [locally-hosted GoDoc](http://localhost:6060/pkg/github.com/open-telemetry/opentelemetry-operator/) diff --git a/Makefile b/Makefile index 6bbf6d68a..048bc2217 100644 --- a/Makefile +++ b/Makefile @@ -80,10 +80,14 @@ uninstall: manifests kustomize set-image-controller: manifests kustomize cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} -# Deploy controller in the configured Kubernetes cluster in ~/.kube/config +# Deploy controller in the current Kubernetes context, configured in ~/.kube/config deploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - +# Undeploy controller in the current Kubernetes context, configured in ~/.kube/config +undeploy: set-image-controller + $(KUSTOMIZE) build config/default | kubectl delete -f - + # Generates the released manifests release-artifacts: set-image-controller mkdir -p dist From 619b626bbffbef82d6ebcb9f460ded583fd4c0a6 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 28 Oct 2021 15:05:44 +0200 Subject: [PATCH 0295/1234] Updated kuttl file to new kubernetes patch version 1.22.2 (#481) --- kind-1.22.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 407478273..25ea3bb7e 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.0@sha256:f97edf7f7ed53c57762b24f90a34fad101386c5bd4d93baeb45449557148c717 + image: kindest/node:v1.22.2@sha256:e8d14d3575e6135cb364127c9cf4d8da7f3f76a58aaceb971a345cbfef972c31 From eedf44e1c0f3731f59a1b614c9cec6211c3f3b67 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 28 Oct 2021 06:29:06 -0700 Subject: [PATCH 0296/1234] Update used apiVersion of cert-manager components from v1alpha2 to v1 (#479) Signed-off-by: Adam Crowder --- Makefile | 2 +- config/certmanager/certificate.yaml | 4 ++-- config/default/kustomization.yaml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 048bc2217..4613ab5c8 100644 --- a/Makefile +++ b/Makefile @@ -138,7 +138,7 @@ start-kind: kind load docker-image local/opentelemetry-operator:e2e cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.5.2/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.0/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager diff --git a/config/certmanager/certificate.yaml b/config/certmanager/certificate.yaml index 2a68d4d23..de1bdad6e 100644 --- a/config/certmanager/certificate.yaml +++ b/config/certmanager/certificate.yaml @@ -2,7 +2,7 @@ # More document can be found at https://docs.cert-manager.io # WARNING: Targets CertManager 0.11 check https://docs.cert-manager.io/en/latest/tasks/upgrading/index.html for # breaking changes -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: Issuer metadata: name: selfsigned-issuer @@ -10,7 +10,7 @@ metadata: spec: selfSigned: {} --- -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: Certificate metadata: name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 0f4c6f4b2..ef6a8cd16 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -36,7 +36,7 @@ vars: objref: kind: Certificate group: cert-manager.io - version: v1alpha2 + version: v1 name: serving-cert # this name should match the one in certificate.yaml fieldref: fieldpath: metadata.namespace @@ -44,7 +44,7 @@ vars: objref: kind: Certificate group: cert-manager.io - version: v1alpha2 + version: v1 name: serving-cert # this name should match the one in certificate.yaml - name: SERVICE_NAMESPACE # namespace of the service objref: From 1b702c7f510d253a812de18b9086ef42229fc4ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Oct 2021 08:19:25 +0000 Subject: [PATCH 0297/1234] Bump k8s.io/kubectl from 0.22.2 to 0.22.3 (#485) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.22.2 to 0.22.3. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.22.2...v0.22.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 5534ad835..d7a2d56d0 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.2 - k8s.io/apimachinery v0.22.2 - k8s.io/client-go v0.22.2 - k8s.io/kubectl v0.22.2 + k8s.io/api v0.22.3 + k8s.io/apimachinery v0.22.3 + k8s.io/client-go v0.22.3 + k8s.io/kubectl v0.22.3 sigs.k8s.io/controller-runtime v0.9.6 ) @@ -112,7 +112,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.21.3 // indirect - k8s.io/component-base v0.22.2 // indirect + k8s.io/component-base v0.22.3 // indirect k8s.io/klog/v2 v2.9.0 // indirect k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect diff --git a/go.sum b/go.sum index 404bab29a..f7e18d7c1 100644 --- a/go.sum +++ b/go.sum @@ -1635,28 +1635,28 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.2 h1:M8ZzAD0V6725Fjg53fKeTJxGsJvRbk4TEm/fexHMtfw= -k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= +k8s.io/api v0.22.3 h1:wOoES2GoSkUsdped2RB4zYypPqWtvprGoKCENTOOjP4= +k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs= k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.2 h1:ejz6y/zNma8clPVfNDLnPbleBo6MpoFy/HBiBqCouVk= -k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.22.3 h1:mrvBG5CZnEfwgpVqWcrRKvdsYECTrhAR6cApAgdsflk= +k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= +k8s.io/cli-runtime v0.22.3/go.mod h1:um6JvCxV9Hrhq0zCUxcqYoY7/wF64g6IYgOViI8sg6Q= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.2 h1:DaSQgs02aCC1QcwUdkKZWOeaVsQjYvWv8ZazcZ6JcHc= -k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= +k8s.io/client-go v0.22.3 h1:6onkOSc+YNdwq5zXE0wFXicq64rrym+mXwHu/CPVGO4= +k8s.io/client-go v0.22.3/go.mod h1:ElDjYf8gvZsKDYexmsmnMQ0DYO8W9RwBjfQ1PI53yow= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.22.3/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.2 h1:vNIvE0AIrLhjX8drH0BgCNJcR4QZxMXcJzBsDplDx9M= -k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= -k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= +k8s.io/component-base v0.22.3 h1:/+hryAW03u3FpJQww+GSMsArJNUbGjH66lrgxaRynLU= +k8s.io/component-base v0.22.3/go.mod h1:kuybv1miLCMoOk3ebrqF93GbQHQx6W2287FC0YEQY6s= +k8s.io/component-helpers v0.22.3/go.mod h1:7OVySVH5elhHKuJKUOxZEfpT1Bm3ChmBQZHmuFfbGHk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1673,9 +1673,9 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kubectl v0.22.2 h1:KMyYNZoBshaL3XKx04X07DtpoD4vMrdkfiN/G2Qx/PU= -k8s.io/kubectl v0.22.2/go.mod h1:BApg2j0edxLArCOfO0ievI27EeTQqBDMNU9VQH734iQ= -k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= +k8s.io/kubectl v0.22.3 h1:xziSHHyFHg2nt9vE6A0XqW5dOePNSlzxG8z3z+IY63E= +k8s.io/kubectl v0.22.3/go.mod h1:gcpQHPOx+Jke9Og6Li7YxR/ZuaOtFUeJw7xHH617tHs= +k8s.io/metrics v0.22.3/go.mod h1:HbLFLRKtXzoC/6tHLQAlO9AeOBXZp2eB6SsgkbujoNI= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 1a6c95f4de4243a784f57d5807eb218675ca697e Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 29 Oct 2021 18:35:24 +0200 Subject: [PATCH 0298/1234] Fix reference to DaemonSet example in the readme (#487) Closes #352 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3398fa151..a44de1e03 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ At this point, the Operator does *not* validate the contents of the configuratio ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at the `examples/daemonset.yaml` for reference. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/00-install.yaml) for reference. #### Sidecar injection From c3f411cb6f839443354a2039a0d1190d269147bd Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 1 Nov 2021 09:15:22 +0100 Subject: [PATCH 0299/1234] Apply nicer formatting to code blocks, update CR to use OTLP in examples (#474) Signed-off-by: Pavol Loffay --- README.md | 13 +++++++++---- RELEASE.md | 4 ++-- docs/otelcol_cr_spec.md | 13 +++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a44de1e03..8baa00604 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetr ## Getting started To install the operator in an existing cluster, make sure you have [`cert-manager` installed](https://cert-manager.io/docs/installation/) and run: -``` +```bash kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml ``` @@ -29,9 +29,10 @@ metadata: spec: config: | receivers: - jaeger: + otlp: protocols: grpc: + http: processors: exporters: @@ -40,7 +41,7 @@ spec: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp] processors: [] exporters: [logging] EOF @@ -76,6 +77,10 @@ spec: jaeger: protocols: grpc: + otlp: + protocols: + grpc: + http: processors: exporters: @@ -84,7 +89,7 @@ spec: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp, jaeger] processors: [] exporters: [logging] EOF diff --git a/RELEASE.md b/RELEASE.md index 9016b0187..0d7efc4cf 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,8 +16,8 @@ Steps to release a new version of the OpenTelemetry Operator: ## Generating the changelog Run this generator: -```console -$ docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator --branch main +```bash +docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator --branch main ``` Remove the commits that are not relevant to users, like: diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index 434d69f3f..a38526af5 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -2,11 +2,11 @@ The below `OpenTelemetryCollector` custom resource contains all the specification that can be configured. -``` +```yaml apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: example_collector + name: example-collector spec: // +optional Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) mode: "" @@ -14,16 +14,17 @@ spec: // +required Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. config: | receivers: - jaeger: + otlp: protocols: grpc: + http: processors: exporters: logging: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp] processors: [] exporters: [logging] @@ -63,7 +64,7 @@ spec: env: [] // +optional List of sources to populate environment variables on the OpenTelemetry Collector's Pods. - // These can then in certain cases be consumed in the config file for the Collector. + // These can then in certain cases be consumed in the config file for the Collector. envFrom: [] // +optional Resources to set on the OpenTelemetry Collector pods. @@ -78,4 +79,4 @@ spec: // +optional Toleration to schedule OpenTelemetry Collector pods. // This is only relevant to daemonsets, statefulsets and deployments tolerations: [] -``` \ No newline at end of file +``` From dd248a328fd020dc387df79ffba4ddde3a90598c Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 2 Nov 2021 11:13:51 +0100 Subject: [PATCH 0300/1234] Add initial support for auto-instrumentation (#464) * Initial support for auto-instrumentation Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay * Fix bundle Signed-off-by: Pavol Loffay * Add docs Signed-off-by: Pavol Loffay * make a nonsense change Signed-off-by: Pavol Loffay * Add link Signed-off-by: Pavol Loffay --- README.md | 45 ++- .../v1alpha1/groupversion_info.go | 34 ++ .../v1alpha1/instrumentation_types.go | 79 +++++ .../v1alpha1/zz_generated.deepcopy.go | 145 ++++++++ ...emetry-operator.clusterserviceversion.yaml | 11 + .../opentelemetry.io_instrumentations.yaml | 74 ++++ .../opentelemetry.io_instrumentations.yaml | 76 +++++ config/crd/kustomization.yaml | 1 + config/manager/kustomization.yaml | 2 +- config/rbac/role.yaml | 8 + docs/otelinst_cr_spec.md | 20 ++ internal/webhookhandler/webhookhandler.go | 100 ++++++ .../webhookhandler_suite_test.go} | 2 +- .../webhookhandler_test.go} | 10 +- main.go | 20 +- pkg/instrumentation/annotation.go | 59 ++++ pkg/instrumentation/annotation_test.go | 142 ++++++++ pkg/instrumentation/javaagent.go | 68 ++++ pkg/instrumentation/javaagent_test.go | 181 ++++++++++ pkg/instrumentation/podmutator.go | 113 +++++++ pkg/instrumentation/podmutator_test.go | 320 ++++++++++++++++++ pkg/instrumentation/sdk.go | 74 ++++ pkg/instrumentation/sdk_test.go | 196 +++++++++++ pkg/sidecar/annotation_test.go | 26 +- pkg/sidecar/pod.go | 4 +- pkg/sidecar/pod_test.go | 15 +- .../main.go => pkg/sidecar/podmutator.go | 98 ++---- 27 files changed, 1812 insertions(+), 111 deletions(-) create mode 100644 api/instrumentation/v1alpha1/groupversion_info.go create mode 100644 api/instrumentation/v1alpha1/instrumentation_types.go create mode 100644 api/instrumentation/v1alpha1/zz_generated.deepcopy.go create mode 100644 bundle/manifests/opentelemetry.io_instrumentations.yaml create mode 100644 config/crd/bases/opentelemetry.io_instrumentations.yaml create mode 100644 docs/otelinst_cr_spec.md create mode 100644 internal/webhookhandler/webhookhandler.go rename internal/{podinjector/podinjector_suite_test.go => webhookhandler/webhookhandler_suite_test.go} (98%) rename internal/{podinjector/main_test.go => webhookhandler/webhookhandler_test.go} (96%) create mode 100644 pkg/instrumentation/annotation.go create mode 100644 pkg/instrumentation/annotation_test.go create mode 100644 pkg/instrumentation/javaagent.go create mode 100644 pkg/instrumentation/javaagent_test.go create mode 100644 pkg/instrumentation/podmutator.go create mode 100644 pkg/instrumentation/podmutator_test.go create mode 100644 pkg/instrumentation/sdk.go create mode 100644 pkg/instrumentation/sdk_test.go rename internal/podinjector/main.go => pkg/sidecar/podmutator.go (51%) diff --git a/README.md b/README.md index 8baa00604..fcbf3ba96 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,14 @@ The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/). -At this point, it has [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) as the only managed component. +The operator manages: +* [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) +* auto-instrumentation of the workloads using OpenTelemetry instrumentation libraries ## Documentation * [OpenTelemetryCollector Custom Resource Specification](./docs/otelcol_cr_spec.md) +* [Instrumentation Custom Resource Specification](./docs/otelinst_cr_spec.md) ## Getting started @@ -151,6 +154,46 @@ spec: EOF ``` +### OpenTelemetry auto-instrumentation injection + +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. At this moment, the operator can inject only +OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). + +The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that +namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part +of Deployment, Statefulset, and other resources. + +```console +instrumentation.opentelemetry.io/inject-java: "true" +``` + +The value can be +* `false` - do not inject +* `true` - inject +* `java-instrumentation` - name of `Instrumentation` CR instance. + +In the addition to the annotation the following `CR` has to be created. The `Instrumentation` +provides configuration for OpenTelemetry SDK and auto-instrumentation. + +```yaml +kubectl apply -f - < +EOF +``` + +1. Container image with [OpenTelemetry Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). + The image has to contain Java agent JAR `/javaagent.jar` and the JAR is copied to a shared volume mounted to the application container. + +The above CR can be queried by `kubectl get otelinst`. + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/api/instrumentation/v1alpha1/groupversion_info.go b/api/instrumentation/v1alpha1/groupversion_info.go new file mode 100644 index 000000000..ef6601ea7 --- /dev/null +++ b/api/instrumentation/v1alpha1/groupversion_info.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group. +// +kubebuilder:object:generate=true +// +groupName=opentelemetry.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/api/instrumentation/v1alpha1/instrumentation_types.go b/api/instrumentation/v1alpha1/instrumentation_types.go new file mode 100644 index 000000000..2e20111b2 --- /dev/null +++ b/api/instrumentation/v1alpha1/instrumentation_types.go @@ -0,0 +1,79 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. +type InstrumentationSpec struct { + // Exporter defines exporter configuration. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Exporter `json:"exporter,omitempty"` + + // Java defines configuration for java auto-instrumentation. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Java JavaSpec `json:"java,omitempty"` +} + +// JavaSpec defines Java SDK and instrumentation configuration. +type JavaSpec struct { + // Image is a container image with javaagent JAR. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Image string `json:"image,omitempty"` +} + +// Exporter defines OTLP exporter configuration. +type Exporter struct { + // Endpoint is address of the collector with OTLP endpoint. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Endpoint string `json:"endpoint,omitempty"` +} + +// InstrumentationStatus defines status of the instrumentation. +type InstrumentationStatus struct { +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=otelinst;otelinsts +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" + +// Instrumentation is the spec for OpenTelemetry instrumentation. +// nolint: maligned +type Instrumentation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec InstrumentationSpec `json:"spec,omitempty"` + Status InstrumentationStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// InstrumentationList contains a list of Instrumentation. +type InstrumentationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Instrumentation `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Instrumentation{}, &InstrumentationList{}) +} diff --git a/api/instrumentation/v1alpha1/zz_generated.deepcopy.go b/api/instrumentation/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..23ecbabcf --- /dev/null +++ b/api/instrumentation/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,145 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Exporter) DeepCopyInto(out *Exporter) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter. +func (in *Exporter) DeepCopy() *Exporter { + if in == nil { + return nil + } + out := new(Exporter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation. +func (in *Instrumentation) DeepCopy() *Instrumentation { + if in == nil { + return nil + } + out := new(Instrumentation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Instrumentation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Instrumentation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList. +func (in *InstrumentationList) DeepCopy() *InstrumentationList { + if in == nil { + return nil + } + out := new(InstrumentationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InstrumentationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { + *out = *in + out.Exporter = in.Exporter + out.Java = in.Java +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. +func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec { + if in == nil { + return nil + } + out := new(InstrumentationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus. +func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { + if in == nil { + return nil + } + out := new(InstrumentationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JavaSpec) DeepCopyInto(out *JavaSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JavaSpec. +func (in *JavaSpec) DeepCopy() *JavaSpec { + if in == nil { + return nil + } + out := new(JavaSpec) + in.DeepCopyInto(out) + return out +} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 2ec8cca14..30533b886 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,6 +31,9 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: + - kind: Instrumentation + name: instrumentations.opentelemetry.io + version: v1alpha1 - kind: OpenTelemetryCollector name: opentelemetrycollectors.opentelemetry.io version: v1alpha1 @@ -146,6 +149,14 @@ spec: - get - list - update + - apiGroups: + - opentelemetry.io + resources: + - instrumentations + verbs: + - get + - list + - watch - apiGroups: - opentelemetry.io resources: diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml new file mode 100644 index 000000000..9cf9e406e --- /dev/null +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -0,0 +1,74 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + creationTimestamp: null + name: instrumentations.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: Instrumentation + listKind: InstrumentationList + plural: instrumentations + shortNames: + - otelinst + - otelinsts + singular: instrumentation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: 'Instrumentation is the spec for OpenTelemetry instrumentation. + nolint: maligned' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: InstrumentationSpec defines the desired state of OpenTelemetry + SDK and instrumentation. + properties: + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + image: + description: Image is a container image with javaagent JAR. + type: string + type: object + type: object + status: + description: InstrumentationStatus defines status of the instrumentation. + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml new file mode 100644 index 000000000..ade599959 --- /dev/null +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -0,0 +1,76 @@ + +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + creationTimestamp: null + name: instrumentations.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: Instrumentation + listKind: InstrumentationList + plural: instrumentations + shortNames: + - otelinst + - otelinsts + singular: instrumentation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: 'Instrumentation is the spec for OpenTelemetry instrumentation. + nolint: maligned' + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: InstrumentationSpec defines the desired state of OpenTelemetry + SDK and instrumentation. + properties: + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + image: + description: Image is a container image with javaagent JAR. + type: string + type: object + type: object + status: + description: InstrumentationStatus defines status of the instrumentation. + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 1010fd582..9426d4121 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -3,6 +3,7 @@ # It should be run by config/default resources: - bases/opentelemetry.io_opentelemetrycollectors.yaml +- bases/opentelemetry.io_instrumentations.yaml # +kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..7394a6d05 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml + - manager.yaml diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cebff2bba..328ef1e58 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -101,6 +101,14 @@ rules: - get - list - update +- apiGroups: + - opentelemetry.io + resources: + - instrumentations + verbs: + - get + - list + - watch - apiGroups: - opentelemetry.io resources: diff --git a/docs/otelinst_cr_spec.md b/docs/otelinst_cr_spec.md new file mode 100644 index 000000000..00fa2c07c --- /dev/null +++ b/docs/otelinst_cr_spec.md @@ -0,0 +1,20 @@ +# Instrumentation Custom Resource Specification + +The below `Instrumentation` custom resource contains all the specification that can be configured. + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: example-instrumentation +spec: + // +optional Exporter defines exporter configuration. + exporter: + // +optional Endpoint is address of the collector with OTLP endpoint. + endpoint: + + // +optional Java defines configuration for java auto-instrumentation. + java: + // +optional Image is a container image with javaagent JAR. + image: +``` diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go new file mode 100644 index 000000000..147907589 --- /dev/null +++ b/internal/webhookhandler/webhookhandler.go @@ -0,0 +1,100 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package webhookhandler contains the webhook that injects sidecars into pods. +package webhookhandler + +import ( + "context" + "encoding/json" + "net/http" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch + +var _ WebhookHandler = (*podSidecarInjector)(nil) + +// WebhookHandler is a webhook handler that analyzes new pods and injects appropriate sidecars into it. +type WebhookHandler interface { + admission.Handler + admission.DecoderInjector +} + +// the implementation. +type podSidecarInjector struct { + config config.Config + logger logr.Logger + client client.Client + decoder *admission.Decoder + podMutators []PodMutator +} + +// PodMutator mutates a pod. +type PodMutator interface { + Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) +} + +// NewWebhookHandler creates a new WebhookHandler. +func NewWebhookHandler(cfg config.Config, logger logr.Logger, cl client.Client, podMutators []PodMutator) WebhookHandler { + return &podSidecarInjector{ + config: cfg, + logger: logger, + client: cl, + podMutators: podMutators, + } +} + +func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) admission.Response { + pod := corev1.Pod{} + err := p.decoder.Decode(req, &pod) + if err != nil { + return admission.Errored(http.StatusBadRequest, err) + } + + // we use the req.Namespace here because the pod might have not been created yet + ns := corev1.Namespace{} + err = p.client.Get(ctx, types.NamespacedName{Name: req.Namespace, Namespace: ""}, &ns) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + + for _, m := range p.podMutators { + pod, err = m.Mutate(ctx, ns, pod) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + } + + marshaledPod, err := json.Marshal(pod) + if err != nil { + return admission.Errored(http.StatusInternalServerError, err) + } + return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) +} + +func (p *podSidecarInjector) InjectDecoder(d *admission.Decoder) error { + p.decoder = d + return nil +} diff --git a/internal/podinjector/podinjector_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go similarity index 98% rename from internal/podinjector/podinjector_suite_test.go rename to internal/webhookhandler/webhookhandler_suite_test.go index f5b20de7f..4e3972cf3 100644 --- a/internal/podinjector/podinjector_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package podinjector_test +package webhookhandler_test import ( "fmt" diff --git a/internal/podinjector/main_test.go b/internal/webhookhandler/webhookhandler_test.go similarity index 96% rename from internal/podinjector/main_test.go rename to internal/webhookhandler/webhookhandler_test.go index 4e6b65235..a5dcc0304 100644 --- a/internal/podinjector/main_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package podinjector_test +package webhookhandler_test import ( "context" @@ -32,7 +32,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" + . "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) @@ -150,7 +150,7 @@ func TestShouldInjectSidecar(t *testing.T) { decoder, err := admission.NewDecoder(scheme.Scheme) require.NoError(t, err) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) + injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) err = injector.InjectDecoder(decoder) require.NoError(t, err) @@ -371,7 +371,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { decoder, err := admission.NewDecoder(scheme.Scheme) require.NoError(t, err) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) + injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) err = injector.InjectDecoder(decoder) require.NoError(t, err) @@ -430,7 +430,7 @@ func TestFailOnInvalidRequest(t *testing.T) { decoder, err := admission.NewDecoder(scheme.Scheme) require.NoError(t, err) - injector := NewPodSidecarInjector(cfg, logger, k8sClient) + injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) err = injector.InjectDecoder(decoder) require.NoError(t, err) diff --git a/main.go b/main.go index 278fa6e7f..a330e7f45 100644 --- a/main.go +++ b/main.go @@ -33,13 +33,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" - opentelemetryiov1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + otelcolv1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + otelinstv1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/podinjector" "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation" + "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" // +kubebuilder:scaffold:imports ) @@ -51,7 +54,8 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(opentelemetryiov1alpha1.AddToScheme(scheme)) + utilruntime.Must(otelcolv1alpha1.AddToScheme(scheme)) + utilruntime.Must(otelinstv1alpha1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } @@ -63,7 +67,7 @@ func main() { v := version.Get() - // Add flags related to this operator + // add flags related to this operator var metricsAddr string var enableLeaderElection bool var collectorImage string @@ -164,13 +168,17 @@ func main() { } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&opentelemetryiov1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&otelcolv1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") os.Exit(1) } mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{ - Handler: podinjector.NewPodSidecarInjector(cfg, ctrl.Log.WithName("sidecar"), mgr.GetClient()), + Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), mgr.GetClient(), + []webhookhandler.PodMutator{ + sidecar.NewMutator(logger, cfg, mgr.GetClient()), + instrumentation.NewMutator(logger, mgr.GetClient()), + }), }) } // +kubebuilder:scaffold:builder diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go new file mode 100644 index 000000000..fd063f8a3 --- /dev/null +++ b/pkg/instrumentation/annotation.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + // annotationInjectJava indicates whether java auto-instrumentation should be injected or not. + // Possible values are "true", "false" or "" name. + annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" +) + +// annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. +func annotationValue(ns metav1.ObjectMeta, pod metav1.ObjectMeta) string { + // is the pod annotated with instructions to inject sidecars? is the namespace annotated? + // if any of those is true, a sidecar might be desired. + podAnnValue := pod.Annotations[annotationInjectJava] + nsAnnValue := ns.Annotations[annotationInjectJava] + + // if the namespace value is empty, the pod annotation should be used, whatever it is + if len(nsAnnValue) == 0 { + return podAnnValue + } + + // if the pod value is empty, the annotation should be used (true, false, instance) + if len(podAnnValue) == 0 { + return nsAnnValue + } + + // the pod annotation isn't empty -- if it's an instance name, or false, that's the decision + if !strings.EqualFold(podAnnValue, "true") { + return podAnnValue + } + + // pod annotation is 'true', and if the namespace annotation is false, we just return 'true' + if strings.EqualFold(nsAnnValue, "false") { + return podAnnValue + } + + // by now, the pod annotation is 'true', and the namespace annotation is either true or an instance name + // so, the namespace annotation can be used + return nsAnnValue +} diff --git a/pkg/instrumentation/annotation_test.go b/pkg/instrumentation/annotation_test.go new file mode 100644 index 000000000..d8f2ac2b5 --- /dev/null +++ b/pkg/instrumentation/annotation_test.go @@ -0,0 +1,142 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestEffectiveAnnotationValue(t *testing.T) { + for _, tt := range []struct { + desc string + expected string + pod corev1.Pod + ns corev1.Namespace + }{ + { + "pod-true-overrides-ns", + "true", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + }, + }, + + { + "ns-has-concrete-instance", + "some-instance", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "some-instance", + }, + }, + }, + }, + + { + "pod-has-concrete-instance", + "some-instance-from-pod", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "some-instance-from-pod", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "some-instance", + }, + }, + }, + }, + + { + "pod-has-explicit-false", + "false", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + }, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "some-instance", + }, + }, + }, + }, + + { + "pod-has-no-annotations", + "some-instance", + corev1.Pod{}, + corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "some-instance", + }, + }, + }, + }, + + { + "ns-has-no-annotations", + "true", + corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + }, + corev1.Namespace{}, + }, + } { + t.Run(tt.desc, func(t *testing.T) { + // test + annValue := annotationValue(tt.ns.ObjectMeta, tt.pod.ObjectMeta) + + // verify + assert.Equal(t, tt.expected, annValue) + }) + } +} diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go new file mode 100644 index 000000000..0cd547935 --- /dev/null +++ b/pkg/instrumentation/javaagent.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" +) + +const ( + envJavaToolsOptions = "JAVA_TOOL_OPTIONS" + javaJVMArgument = " -javaagent:/otel-auto-instrumentation/javaagent.jar" +) + +func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.JavaSpec, pod corev1.Pod) corev1.Pod { + // caller checks if there is at least one container + container := &pod.Spec.Containers[0] + idx := getIndexOfEnv(container.Env, envJavaToolsOptions) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envJavaToolsOptions, + Value: javaJVMArgument, + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping javaagent injection, the container defines JAVA_TOOL_OPTIONS env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = container.Env[idx].Value + javaJVMArgument + } + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }) + + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: javaSpec.Image, + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + + return pod +} diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go new file mode 100644 index 000000000..08a00cf98 --- /dev/null +++ b/pkg/instrumentation/javaagent_test.go @@ -0,0 +1,181 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" +) + +func TestInjectJavaagent(t *testing.T) { + tests := []struct { + name string + v1alpha1.JavaSpec + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "JAVA_TOOL_OPTIONS not defined", + JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + }, + }, + }, + }, + }, + }, + { + name: "JAVA_TOOL_OPTIONS defined", + JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + Value: "-Dbaz=bar", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + Value: "-Dbaz=bar" + javaJVMArgument, + }, + }, + }, + }, + }, + }, + }, + { + name: "JAVA_TOOL_OPTIONS defined as ValueFrom", + JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectJavaagent(logr.Discard(), test.JavaSpec, test.pod) + assert.Equal(t, test.expected, pod) + }) + } +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go new file mode 100644 index 000000000..cc358249b --- /dev/null +++ b/pkg/instrumentation/podmutator.go @@ -0,0 +1,113 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "context" + "errors" + "strings" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" +) + +var ( + errMultipleInstancesPossible = errors.New("multiple OpenTelemetry Instrumentation instances available, cannot determine which one to select") + errNoInstancesAvailable = errors.New("no OpenTelemetry Instrumentation instances available") +) + +type instPodMutator struct { + Logger logr.Logger + Client client.Client +} + +var _ webhookhandler.PodMutator = (*instPodMutator)(nil) + +func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { + return &instPodMutator{ + Logger: logger, + Client: client, + } +} + +func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { + logger := pm.Logger.WithValues("namespace", pod.Namespace, "name", pod.Name) + + // if no annotations are found at all, just return the same pod + annValue := annotationValue(ns.ObjectMeta, pod.ObjectMeta) + if len(annValue) == 0 { + logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") + return pod, nil + } + + // is the annotation value 'false'? if so, we need a pod without the instrumentation + if strings.EqualFold(annValue, "false") { + logger.V(1).Info("pod explicitly refuses instrumentation injection, attempting to remove instrumentation if it exists") + return pod, nil + } + + // which instance should it talk to? + otelinst, err := pm.getInstrumentationInstance(ctx, ns, annValue) + if err != nil { + if err == errNoInstancesAvailable || err == errMultipleInstancesPossible { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, nil + } + + // something else happened, better fail here + return pod, err + } + + // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, + // we should inject the instrumentation. + logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + return inject(pm.Logger, otelinst, pod), nil +} + +func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.Instrumentation, error) { + if strings.EqualFold(ann, "true") { + return pm.selectInstrumentationInstanceFromNamespace(ctx, ns) + } + + otelInst := v1alpha1.Instrumentation{} + err := pm.Client.Get(ctx, types.NamespacedName{Name: ann, Namespace: ns.Name}, &otelInst) + if err != nil { + return otelInst, err + } + + return otelInst, nil +} + +func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context.Context, ns corev1.Namespace) (v1alpha1.Instrumentation, error) { + var otelInsts v1alpha1.InstrumentationList + if err := pm.Client.List(ctx, &otelInsts, client.InNamespace(ns.Name)); err != nil { + return v1alpha1.Instrumentation{}, err + } + + switch s := len(otelInsts.Items); { + case s == 0: + return v1alpha1.Instrumentation{}, errNoInstancesAvailable + case s > 1: + return v1alpha1.Instrumentation{}, errMultipleInstancesPossible + default: + return otelInsts.Items[0], nil + } +} diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go new file mode 100644 index 000000000..e16a9ffc7 --- /dev/null +++ b/pkg/instrumentation/podmutator_test.go @@ -0,0 +1,320 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "context" + "fmt" + "os" + "path/filepath" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" +) + +var k8sClient client.Client +var testEnv *envtest.Environment +var testScheme *runtime.Scheme = scheme.Scheme + +func TestMain(m *testing.M) { + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + } + + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} + +func TestMutatePod(t *testing.T) { + mutator := NewMutator(logr.Discard(), k8sClient) + require.NotNil(t, mutator) + + tests := []struct { + name string + ns corev1.Namespace + pod corev1.Pod + inst v1alpha1.Instrumentation + expected corev1.Pod + err string + }{ + { + name: "javaagent injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "javaagent", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "javaagent", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.JavaSpec{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "opentelemetry-auto-instrumentation", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "otel/java:1", + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation", + MountPath: "/otel-auto-instrumentation", + }, + }, + }, + }, + }, + }, + }, + { + name: "missing annotation", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "missing-annotation", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "missing-annotation", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.JavaSpec{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "annotation set to false", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "annotation-false", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "annotation-false", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.JavaSpec{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "annotation set to non existing instance", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "non-existing-instance", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "non-existing-instance", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.JavaSpec{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "doesnotexists", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + err: `instrumentations.opentelemetry.io "doesnotexists" not found`, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := k8sClient.Create(context.Background(), &test.ns) + require.NoError(t, err) + err = k8sClient.Create(context.Background(), &test.inst) + require.NoError(t, err) + + pod, err := mutator.Mutate(context.Background(), test.ns, test.pod) + if test.err == "" { + require.NoError(t, err) + assert.Equal(t, test.expected, pod) + } else { + assert.Contains(t, err.Error(), test.err) + } + }) + } +} diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go new file mode 100644 index 000000000..013a67650 --- /dev/null +++ b/pkg/instrumentation/sdk.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" +) + +const ( + volumeName = "opentelemetry-auto-instrumentation" + initContainerName = "opentelemetry-auto-instrumentation" + + envOTELServiceName = "OTEL_SERVICE_NAME" + envOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" +) + +// inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. +func inject(logger logr.Logger, otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { + if len(pod.Spec.Containers) < 1 { + return pod + } + + // inject only to the first container for now + // in the future we can define an annotation to configure this + pod = injectCommonSDKConfig(otelinst, pod) + pod = injectJavaagent(logger, otelinst.Spec.Java, pod) + return pod +} + +func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { + container := &pod.Spec.Containers[0] + idx := getIndexOfEnv(container.Env, envOTELServiceName) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELServiceName, + // TODO use more meaningful service name - e.g. deployment name + Value: container.Name, + }) + } + + idx = getIndexOfEnv(container.Env, envOTELExporterOTLPEndpoint) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELExporterOTLPEndpoint, + Value: otelinst.Spec.Endpoint, + }) + } + + return pod +} + +func getIndexOfEnv(envs []corev1.EnvVar, name string) int { + for i := range envs { + if envs[i].Name == name { + return i + } + } + return -1 +} diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go new file mode 100644 index 000000000..a71d38174 --- /dev/null +++ b/pkg/instrumentation/sdk_test.go @@ -0,0 +1,196 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" +) + +func TestSDKInjection(t *testing.T) { + tests := []struct { + name string + inst v1alpha1.Instrumentation + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "SDK env vars not defined", + inst: v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "application-name", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "application-name", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "application-name", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + }, + }, + }, + }, + }, + }, + { + name: "SDK env vars defined", + inst: v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "explicitly_set", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "explicitly_set", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "explicitly_set", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "explicitly_set", + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectCommonSDKConfig(test.inst, test.pod) + assert.Equal(t, test.expected, pod) + }) + } +} + +func TestInjection(t *testing.T) { + inst := v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.JavaSpec{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + } + pod := inject(logr.Discard(), inst, corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }) + assert.Equal(t, corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "img:1", + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + }, + }, + }, + }, + }, pod) +} diff --git a/pkg/sidecar/annotation_test.go b/pkg/sidecar/annotation_test.go index 0603d4935..44141fb2f 100644 --- a/pkg/sidecar/annotation_test.go +++ b/pkg/sidecar/annotation_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package sidecar_test +package sidecar import ( "testing" @@ -20,8 +20,6 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) func TestEffectiveAnnotationValue(t *testing.T) { @@ -37,14 +35,14 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "true", + Annotation: "true", }, }, }, corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "false", + Annotation: "false", }, }, }, @@ -56,14 +54,14 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "true", + Annotation: "true", }, }, }, corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "some-instance", + Annotation: "some-instance", }, }, }, @@ -75,14 +73,14 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "some-instance-from-pod", + Annotation: "some-instance-from-pod", }, }, }, corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "some-instance", + Annotation: "some-instance", }, }, }, @@ -94,14 +92,14 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "false", + Annotation: "false", }, }, }, corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "some-instance", + Annotation: "some-instance", }, }, }, @@ -114,7 +112,7 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "some-instance", + Annotation: "some-instance", }, }, }, @@ -126,7 +124,7 @@ func TestEffectiveAnnotationValue(t *testing.T) { corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - sidecar.Annotation: "true", + Annotation: "true", }, }, }, @@ -135,7 +133,7 @@ func TestEffectiveAnnotationValue(t *testing.T) { } { t.Run(tt.desc, func(t *testing.T) { // test - annValue := sidecar.AnnotationValue(tt.ns, tt.pod) + annValue := AnnotationValue(tt.ns, tt.pod) // verify assert.Equal(t, tt.expected, annValue) diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 043009924..a2bc1aa09 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package sidecar contains operations related to sidecar manipulation (add, update, remove). +// Package sidecar contains operations related to sidecar manipulation (Add, update, remove). package sidecar import ( @@ -33,7 +33,7 @@ const ( // Add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { - // add the container + // Add the container volumes := collector.Volumes(cfg, otelcol) container := collector.Container(cfg, logger, otelcol) pod.Spec.Containers = append(pod.Spec.Containers, container) diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 64946f626..7e24ce3d7 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package sidecar_test +package sidecar import ( "testing" @@ -25,7 +25,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) var logger = logf.Log.WithName("unit-tests") @@ -50,7 +49,7 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := sidecar.Add(cfg, logger, otelcol, pod) + changed, err := Add(cfg, logger, otelcol, pod) // verify assert.NoError(t, err) @@ -60,7 +59,7 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { } // this situation should never happen in the current code path, but it should not fail -// if it's asked to add a new sidecar. The caller is expected to have called ExistsIn before. +// if it's asked to add a new sidecar. The caller is expected to have called existsIn before. func TestAddSidecarWhenOneExistsAlready(t *testing.T) { // prepare pod := corev1.Pod{ @@ -75,7 +74,7 @@ func TestAddSidecarWhenOneExistsAlready(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := sidecar.Add(cfg, logger, otelcol, pod) + changed, err := Add(cfg, logger, otelcol, pod) // verify assert.NoError(t, err) @@ -95,7 +94,7 @@ func TestRemoveSidecar(t *testing.T) { } // test - changed, err := sidecar.Remove(pod) + changed, err := Remove(pod) // verify assert.NoError(t, err) @@ -113,7 +112,7 @@ func TestRemoveNonExistingSidecar(t *testing.T) { } // test - changed, err := sidecar.Remove(pod) + changed, err := Remove(pod) // verify assert.NoError(t, err) @@ -142,7 +141,7 @@ func TestExistsIn(t *testing.T) { }}, } { t.Run(tt.desc, func(t *testing.T) { - assert.Equal(t, tt.expected, sidecar.ExistsIn(tt.pod)) + assert.Equal(t, tt.expected, ExistsIn(tt.pod)) }) } } diff --git a/internal/podinjector/main.go b/pkg/sidecar/podmutator.go similarity index 51% rename from internal/podinjector/main.go rename to pkg/sidecar/podmutator.go index 6611638a7..e9bdac6a1 100644 --- a/internal/podinjector/main.go +++ b/pkg/sidecar/podmutator.go @@ -12,98 +12,50 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package podinjector contains the webhook that injects sidecars into pods. -package podinjector +package sidecar import ( "context" - "encoding/json" "errors" - "net/http" "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" + "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" ) var ( - ErrMultipleInstancesPossible = errors.New("multiple OpenTelemetry Collector instances available, cannot determine which one to select") - ErrNoInstancesAvailable = errors.New("no OpenTelemetry Collector instances available") - ErrInstanceNotSidecar = errors.New("the OpenTelemetry Collector's mode is not set to sidecar") + errMultipleInstancesPossible = errors.New("multiple OpenTelemetry Collector instances available, cannot determine which one to select") + errNoInstancesAvailable = errors.New("no OpenTelemetry Collector instances available") + errInstanceNotSidecar = errors.New("the OpenTelemetry Collector's mode is not set to sidecar") ) -// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch - -var _ PodSidecarInjector = (*podSidecarInjector)(nil) - -// PodSidecarInjector is a webhook handler that analyzes new pods and injects appropriate sidecars into it. -type PodSidecarInjector interface { - admission.Handler - admission.DecoderInjector +type sidecarPodMutator struct { + config config.Config + logger logr.Logger + client client.Client } -// the implementation. -type podSidecarInjector struct { - config config.Config - logger logr.Logger - client client.Client - decoder *admission.Decoder -} +var _ webhookhandler.PodMutator = (*sidecarPodMutator)(nil) -// NewPodSidecarInjector creates a new PodSidecarInjector. -func NewPodSidecarInjector(cfg config.Config, logger logr.Logger, cl client.Client) PodSidecarInjector { - return &podSidecarInjector{ - config: cfg, +func NewMutator(logger logr.Logger, config config.Config, client client.Client) *sidecarPodMutator { + return &sidecarPodMutator{ + config: config, logger: logger, - client: cl, - } -} - -func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) admission.Response { - pod := corev1.Pod{} - err := p.decoder.Decode(req, &pod) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - - // we use the req.Namespace here because the pod might have not been created yet - ns := corev1.Namespace{} - err = p.client.Get(ctx, types.NamespacedName{Name: req.Namespace, Namespace: ""}, &ns) - if err != nil { - return admission.Errored(http.StatusInternalServerError, err) + client: client, } - - pod, err = p.mutate(ctx, ns, pod) - if err != nil { - return admission.Errored(http.StatusInternalServerError, err) - } - - marshaledPod, err := json.Marshal(pod) - if err != nil { - return admission.Errored(http.StatusInternalServerError, err) - } - return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) -} - -func (p *podSidecarInjector) InjectDecoder(d *admission.Decoder) error { - p.decoder = d - return nil } -func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { +func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { logger := p.logger.WithValues("namespace", pod.Namespace, "name", pod.Name) // if no annotations are found at all, just return the same pod - annValue := sidecar.AnnotationValue(ns, pod) + annValue := AnnotationValue(ns, pod) if len(annValue) == 0 { logger.V(1).Info("annotation not present in deployment, skipping sidecar injection") return pod, nil @@ -112,13 +64,13 @@ func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, po // is the annotation value 'false'? if so, we need a pod without the sidecar (ie, remove if exists) if strings.EqualFold(annValue, "false") { logger.V(1).Info("pod explicitly refuses sidecar injection, attempting to remove sidecar if it exists") - return sidecar.Remove(pod) + return Remove(pod) } // from this point and on, a sidecar is wanted // check whether there's a sidecar already -- return the same pod if that's the case. - if sidecar.ExistsIn(pod) { + if ExistsIn(pod) { logger.V(1).Info("pod already has sidecar in it, skipping injection") return pod, nil } @@ -126,7 +78,7 @@ func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, po // which instance should it talk to? otelcol, err := p.getCollectorInstance(ctx, ns, annValue) if err != nil { - if err == ErrMultipleInstancesPossible || err == ErrNoInstancesAvailable || err == ErrInstanceNotSidecar { + if err == errMultipleInstancesPossible || err == errNoInstancesAvailable || err == errInstanceNotSidecar { // we still allow the pod to be created, but we log a message to the operator's logs logger.Error(err, "failed to select an OpenTelemetry Collector instance for this pod's sidecar") return pod, nil @@ -139,10 +91,10 @@ func (p *podSidecarInjector) mutate(ctx context.Context, ns corev1.Namespace, po // once it's been determined that a sidecar is desired, none exists yet, and we know which instance it should talk to, // we should add the sidecar. logger.V(1).Info("injecting sidecar into pod", "otelcol-namespace", otelcol.Namespace, "otelcol-name", otelcol.Name) - return sidecar.Add(p.config, p.logger, otelcol, pod) + return Add(p.config, p.logger, otelcol, pod) } -func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { +func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { if strings.EqualFold(ann, "true") { return p.selectCollectorInstance(ctx, ns) } @@ -154,13 +106,13 @@ func (p *podSidecarInjector) getCollectorInstance(ctx context.Context, ns corev1 } if otelcol.Spec.Mode != v1alpha1.ModeSidecar { - return v1alpha1.OpenTelemetryCollector{}, ErrInstanceNotSidecar + return v1alpha1.OpenTelemetryCollector{}, errInstanceNotSidecar } return otelcol, nil } -func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.OpenTelemetryCollector, error) { +func (p *sidecarPodMutator) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.OpenTelemetryCollector, error) { var ( otelcols = v1alpha1.OpenTelemetryCollectorList{} sidecars []v1alpha1.OpenTelemetryCollector @@ -179,9 +131,9 @@ func (p *podSidecarInjector) selectCollectorInstance(ctx context.Context, ns cor switch { case len(sidecars) == 0: - return v1alpha1.OpenTelemetryCollector{}, ErrNoInstancesAvailable + return v1alpha1.OpenTelemetryCollector{}, errNoInstancesAvailable case len(sidecars) > 1: - return v1alpha1.OpenTelemetryCollector{}, ErrMultipleInstancesPossible + return v1alpha1.OpenTelemetryCollector{}, errMultipleInstancesPossible default: return sidecars[0], nil } From e009daf8345de39eb5ebe119aa7ff5688efe5ac6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Nov 2021 09:43:15 +0100 Subject: [PATCH 0301/1234] Bump actions/checkout from 2.3.5 to 2.4.0 (#493) Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.3.5...v2.4.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/release.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 208ee2ca9..bf42bbb0b 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -17,7 +17,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: Lint uses: golangci/golangci-lint-action@v2.5.2 @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index adc0cc904..3d6e6b495 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -26,7 +26,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.3.5 + uses: actions/checkout@v2.4.0 - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 512ffefec..321e3ab68 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -13,7 +13,7 @@ jobs: name: Publish container images runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v2.4.0 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 11ebec50f..85002cca8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.17 - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v2.4.0 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh From 1e3a4898e556502ceed73eeca4d6160e1ffe4eeb Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 3 Nov 2021 14:48:22 +0100 Subject: [PATCH 0302/1234] Fix flaky 0.36.0 upgrade test (#494) Signed-off-by: Pavol Loffay --- pkg/collector/upgrade/v0_36_0_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index d8ace5140..056215913 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -116,7 +116,7 @@ service: receivers: - otlp/mtls `, res.Spec.Config) - assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "grpc", "otlp/mtls"), res.Status.Messages[0]) - assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "http", "otlp/mtls"), res.Status.Messages[1]) - assert.Equal(t, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", "otlp"), res.Status.Messages[2]) + assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "grpc", "otlp/mtls")) + assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "http", "otlp/mtls")) + assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", "otlp")) } From 680635a1d13069835ebd39a459238f2f59f92caf Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 3 Nov 2021 16:44:55 +0100 Subject: [PATCH 0303/1234] Use OTLP receiver in alm-examples in CSV (#496) * Use OTLP receiver in alm-examples in CSV Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- config/samples/core_v1alpha1_opentelemetrycollector.yaml | 5 +++-- config/samples/sidecar.yaml | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 30533b886..df3c81613 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -11,7 +11,7 @@ metadata: "name": "opentelemetrycollector-sample" }, "spec": { - "config": "receivers:\n jaeger:\n protocols: \n grpc:\n\nexporters:\n logging:\n\nservice:\n pipelines:\n traces:\n receivers: [jaeger]\n exporters: [logging]\n" + "config": "receivers:\n otlp:\n protocols: \n grpc:\n http:\n\nexporters:\n logging:\n\nservice:\n pipelines:\n traces:\n receivers: [otlp]\n exporters: [logging]\n" } } ] diff --git a/config/samples/core_v1alpha1_opentelemetrycollector.yaml b/config/samples/core_v1alpha1_opentelemetrycollector.yaml index bb682ad47..025abd74a 100644 --- a/config/samples/core_v1alpha1_opentelemetrycollector.yaml +++ b/config/samples/core_v1alpha1_opentelemetrycollector.yaml @@ -5,9 +5,10 @@ metadata: spec: config: | receivers: - jaeger: + otlp: protocols: grpc: + http: exporters: logging: @@ -15,5 +16,5 @@ spec: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp] exporters: [logging] diff --git a/config/samples/sidecar.yaml b/config/samples/sidecar.yaml index 80fd12899..55c2ed486 100644 --- a/config/samples/sidecar.yaml +++ b/config/samples/sidecar.yaml @@ -6,9 +6,10 @@ spec: mode: sidecar config: | receivers: - jaeger: + otlp: protocols: grpc: + http: exporters: logging: @@ -16,5 +17,5 @@ spec: service: pipelines: traces: - receivers: [jaeger] + receivers: [otlp] exporters: [logging] From eb307e62803f995896c8b43f24dac07dd45ccda0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 3 Nov 2021 16:47:26 +0100 Subject: [PATCH 0304/1234] Make some APIs in the sidecar package private (#495) Signed-off-by: Pavol Loffay --- pkg/sidecar/annotation.go | 4 ++-- pkg/sidecar/annotation_test.go | 2 +- pkg/sidecar/pod.go | 16 ++++++++-------- pkg/sidecar/pod_test.go | 10 +++++----- pkg/sidecar/podmutator.go | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pkg/sidecar/annotation.go b/pkg/sidecar/annotation.go index 8225976c2..f7558add7 100644 --- a/pkg/sidecar/annotation.go +++ b/pkg/sidecar/annotation.go @@ -25,8 +25,8 @@ const ( Annotation = "sidecar.opentelemetry.io/inject" ) -// AnnotationValue returns the effective annotation value, based on the annotations from the pod and namespace. -func AnnotationValue(ns corev1.Namespace, pod corev1.Pod) string { +// annotationValue returns the effective annotation value, based on the annotations from the pod and namespace. +func annotationValue(ns corev1.Namespace, pod corev1.Pod) string { // is the pod annotated with instructions to inject sidecars? is the namespace annotated? // if any of those is true, a sidecar might be desired. podAnnValue := pod.Annotations[Annotation] diff --git a/pkg/sidecar/annotation_test.go b/pkg/sidecar/annotation_test.go index 44141fb2f..d292be77d 100644 --- a/pkg/sidecar/annotation_test.go +++ b/pkg/sidecar/annotation_test.go @@ -133,7 +133,7 @@ func TestEffectiveAnnotationValue(t *testing.T) { } { t.Run(tt.desc, func(t *testing.T) { // test - annValue := AnnotationValue(tt.ns, tt.pod) + annValue := annotationValue(tt.ns, tt.pod) // verify assert.Equal(t, tt.expected, annValue) diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index a2bc1aa09..61b518e90 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -31,9 +31,9 @@ const ( label = "sidecar.opentelemetry.io/injected" ) -// Add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { - // Add the container +// add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. +func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { + // add the container volumes := collector.Volumes(cfg, otelcol) container := collector.Container(cfg, logger, otelcol) pod.Spec.Containers = append(pod.Spec.Containers, container) @@ -47,9 +47,9 @@ func Add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCo return pod, nil } -// Remove the sidecar container from the given pod. -func Remove(pod corev1.Pod) (corev1.Pod, error) { - if !ExistsIn(pod) { +// remove the sidecar container from the given pod. +func remove(pod corev1.Pod) (corev1.Pod, error) { + if !existsIn(pod) { return pod, nil } @@ -63,8 +63,8 @@ func Remove(pod corev1.Pod) (corev1.Pod, error) { return pod, nil } -// ExistsIn checks whether a sidecar container exists in the given pod. -func ExistsIn(pod corev1.Pod) bool { +// existsIn checks whether a sidecar container exists in the given pod. +func existsIn(pod corev1.Pod) bool { for _, container := range pod.Spec.Containers { if container.Name == naming.Container() { return true diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 7e24ce3d7..34a148f84 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -49,7 +49,7 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := Add(cfg, logger, otelcol, pod) + changed, err := add(cfg, logger, otelcol, pod) // verify assert.NoError(t, err) @@ -74,7 +74,7 @@ func TestAddSidecarWhenOneExistsAlready(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := Add(cfg, logger, otelcol, pod) + changed, err := add(cfg, logger, otelcol, pod) // verify assert.NoError(t, err) @@ -94,7 +94,7 @@ func TestRemoveSidecar(t *testing.T) { } // test - changed, err := Remove(pod) + changed, err := remove(pod) // verify assert.NoError(t, err) @@ -112,7 +112,7 @@ func TestRemoveNonExistingSidecar(t *testing.T) { } // test - changed, err := Remove(pod) + changed, err := remove(pod) // verify assert.NoError(t, err) @@ -141,7 +141,7 @@ func TestExistsIn(t *testing.T) { }}, } { t.Run(tt.desc, func(t *testing.T) { - assert.Equal(t, tt.expected, ExistsIn(tt.pod)) + assert.Equal(t, tt.expected, existsIn(tt.pod)) }) } } diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index e9bdac6a1..3acc004bc 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -55,7 +55,7 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod logger := p.logger.WithValues("namespace", pod.Namespace, "name", pod.Name) // if no annotations are found at all, just return the same pod - annValue := AnnotationValue(ns, pod) + annValue := annotationValue(ns, pod) if len(annValue) == 0 { logger.V(1).Info("annotation not present in deployment, skipping sidecar injection") return pod, nil @@ -64,13 +64,13 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod // is the annotation value 'false'? if so, we need a pod without the sidecar (ie, remove if exists) if strings.EqualFold(annValue, "false") { logger.V(1).Info("pod explicitly refuses sidecar injection, attempting to remove sidecar if it exists") - return Remove(pod) + return remove(pod) } // from this point and on, a sidecar is wanted // check whether there's a sidecar already -- return the same pod if that's the case. - if ExistsIn(pod) { + if existsIn(pod) { logger.V(1).Info("pod already has sidecar in it, skipping injection") return pod, nil } @@ -91,7 +91,7 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod // once it's been determined that a sidecar is desired, none exists yet, and we know which instance it should talk to, // we should add the sidecar. logger.V(1).Info("injecting sidecar into pod", "otelcol-namespace", otelcol.Namespace, "otelcol-name", otelcol.Name) - return Add(p.config, p.logger, otelcol, pod) + return add(p.config, p.logger, otelcol, pod) } func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { From 9e1676758b917396dd2620902def9ad8c39410a3 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Thu, 4 Nov 2021 04:38:15 +0900 Subject: [PATCH 0305/1234] Publish a docker image containing Java autoinstrumentation files. (#475) * Publish a docker image containing Java autoinstrumentation files. * Push to anuraaga temporarily * Push to open-telemetry * Allow yaml files for autoinstrumentation to be grouped together * Add reference to java instrumentation version for use in operator * Quay --- .../publish-autoinstrumentation-java.yaml | 44 +++++++++++++++++++ autoinstrumentation/java/Dockerfile | 5 +++ autoinstrumentation/java/version.txt | 1 + versions.txt | 4 ++ 4 files changed, 54 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-java.yaml create mode 100644 autoinstrumentation/java/Dockerfile create mode 100644 autoinstrumentation/java/version.txt diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml new file mode 100644 index 000000000..e03cae302 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -0,0 +1,44 @@ +name: "Publish Java Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/java/**' + - '.github/workflows/publish-autoinstrumentation-java.yaml' + branches: + - main + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2.3.5 + + - name: Read version + run: echo "VERSION=$(cat autoinstrumentation/java/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3.6.0 + with: + images: quay.io/opentelemetry/opentelemetry-operator-autoinstrumentation-java + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Login to Quay + uses: docker/login-action@v1.10.0 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v2.7.0 + with: + context: autoinstrumentation/java + push: true + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile new file mode 100644 index 000000000..145d940cc --- /dev/null +++ b/autoinstrumentation/java/Dockerfile @@ -0,0 +1,5 @@ +FROM busybox + +ARG version + +ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /javaagent.jar diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt new file mode 100644 index 000000000..9dbb0c005 --- /dev/null +++ b/autoinstrumentation/java/version.txt @@ -0,0 +1 @@ +1.7.0 \ No newline at end of file diff --git a/versions.txt b/versions.txt index 326396595..9be8583f7 100644 --- a/versions.txt +++ b/versions.txt @@ -9,3 +9,7 @@ operator=0.37.1 # Represents the current release of the Target Allocator. targetallocator=0.1.0 + +# Represents the current release of Java instrumentation. +# Should match autoinstrumentation/java/version.txt +autoinstrumentation-java=1.7.0 From debb52381f9f8618debef4ac7bf0b0ef27817a87 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 4 Nov 2021 09:43:46 +0100 Subject: [PATCH 0306/1234] Change publishing java auto-instrumentation image to GHCR (#501) Signed-off-by: Pavol Loffay --- .../workflows/publish-autoinstrumentation-java.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index e03cae302..9ae84a066 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -23,16 +23,16 @@ jobs: id: meta uses: docker/metadata-action@v3.6.0 with: - images: quay.io/opentelemetry/opentelemetry-operator-autoinstrumentation-java + images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - name: Login to Quay + - name: Login to GitHub Package Registry uses: docker/login-action@v1.10.0 with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v2.7.0 From 87e65e21cb51b6fdf00dbe0ebebd79873dc394ad Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 4 Nov 2021 10:07:37 +0100 Subject: [PATCH 0307/1234] Change javaagent image to upstream (#502) Signed-off-by: Pavol Loffay --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fcbf3ba96..91cba6328 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ spec: exporter: endpoint: http://otel-collector:4318 java: - image: ghcr.io/pavolloffay/otel-javaagent:1.5.3 # <1> + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest # <1> EOF ``` From 640e53101ce28253d34c128c585e3f66d3020a0f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 4 Nov 2021 10:19:05 +0100 Subject: [PATCH 0308/1234] Fix typos in Readme for auto-instrumentation (#499) * Fix typos in Readme for auto-instrumentation Signed-off-by: Pavol Loffay * do not wrap lines Signed-off-by: Pavol Loffay --- README.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 91cba6328..04b8f5fa7 100644 --- a/README.md +++ b/README.md @@ -156,24 +156,20 @@ EOF ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. At this moment, the operator can inject only -OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. At this moment, the operator can inject only OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). -The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that -namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part -of Deployment, Statefulset, and other resources. +The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources. ```console instrumentation.opentelemetry.io/inject-java: "true" ``` The value can be -* `false` - do not inject -* `true` - inject -* `java-instrumentation` - name of `Instrumentation` CR instance. +* `"false"` - do not inject +* `"true"` - inject and `Instrumentation` resource from the namespace. +* `"java-instrumentation"` - name of `Instrumentation` CR instance. -In the addition to the annotation the following `CR` has to be created. The `Instrumentation` -provides configuration for OpenTelemetry SDK and auto-instrumentation. +In addition to the annotation, the following `CR` has to be created. The `Instrumentation` resource provides configuration for OpenTelemetry SDK and auto-instrumentation. ```yaml kubectl apply -f - < Date: Thu, 4 Nov 2021 11:54:48 +0100 Subject: [PATCH 0309/1234] Publish images to GHCR (#504) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 321e3ab68..3ffb8f90c 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -32,7 +32,7 @@ jobs: id: docker_meta uses: docker/metadata-action@v3.6.0 with: - images: quay.io/opentelemetry/opentelemetry-operator + images: quay.io/opentelemetry/opentelemetry-operator,ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tag-semver: | {{raw}} {{version}} @@ -59,6 +59,13 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} + - name: Login to GitHub Package Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push Operator image uses: docker/build-push-action@v2.6.1 with: From d115a3704d44ef87a6f4be4b741a85e8cc224fbd Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 5 Nov 2021 10:24:13 +0100 Subject: [PATCH 0310/1234] Compatibility matrix cert manager (#503) * Removing tag v0.26.0 because it doesn't exist. * Enabling users to choose the cert-manager version * Adding Compatibility Matrix between Opentelemetry and Cert-manager * Adding third column on Compatibility Matrix --- CONTRIBUTING.md | 5 +++++ Makefile | 4 +++- README.md | 33 +++++++++++++++++---------------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 759229d61..40e768608 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,6 +46,11 @@ In general, it's just easier to deploy the manager in a Kubernetes cluster inste make cert-manager ``` +In pursuit of continuous improvement, a variable named `CERTMANAGER_VERSION` which can be run: +```bash +CERTMANAGER_VERSION=1.60 make cert-manager +``` + By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: * `IMG_PREFIX`, to override the registry, namespace and image name (`quay.io`) diff --git a/Makefile b/Makefile index 4613ab5c8..deb6c1455 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,8 @@ endif KUBE_VERSION ?= 1.21 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml +CERTMANAGER_VERSION ?= 1.6.0 + ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=opentelemetry ensure-generate-is-noop: set-image-controller generate bundle @@ -138,7 +140,7 @@ start-kind: kind load docker-image local/opentelemetry-operator:e2e cert-manager: - kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.6.0/cert-manager.yaml + kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v${CERTMANAGER_VERSION}/cert-manager.yaml kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager diff --git a/README.md b/README.md index 04b8f5fa7..cc38cef4a 100644 --- a/README.md +++ b/README.md @@ -195,7 +195,7 @@ The above CR can be queried by `kubectl get otelinst`. The OpenTelemetry Operator follows the same versioning as the operand (OpenTelemetry Collector) up to the minor part of the version. For example, the OpenTelemetry Operator v0.18.1 tracks OpenTelemetry Collector 0.18.0. The patch part of the version indicates the patch level of the operator itself, not that of OpenTelemetry Collector. Whenever a new patch version is released for OpenTelemetry Collector, we'll release a new patch version of the operator. -### OpenTelemetry Operator vs. Kubernetes +### OpenTelemetry Operator vs. Kubernetes vs. Cert Manager We strive to be compatible with the widest range of Kubernetes versions as possible, but some changes to Kubernetes itself require us to break compatibility with older Kubernetes versions, be it because of code incompatibilities, or in the name of maintainability. @@ -203,23 +203,24 @@ Our promise is that we'll follow what's common practice in the Kubernetes world For instance, when we released v0.27.0, the latest Kubernetes version was v1.21.1. As such, the minimum version of Kubernetes we support for OpenTelemetry Operator v0.27.0 is v1.19 and we tested it with up to 1.21. +We use `cert-manager` for some features of this operator and the third column shows the versions of the `cert-manager` that are known to work with this operator's versions. + The OpenTelemetry Operator *might* work on versions outside of the given range, but when opening new issues, please make sure to test your scenario on a supported version. -| OpenTelemetry Operator | Kubernetes | -|------------------------|----------------------| -| v0.37.1 | v1.20 to v1.22 | -| v0.37.0 | v1.20 to v1.22 | -| v0.36.0 | v1.20 to v1.22 | -| v0.35.0 | v1.20 to v1.22 | -| v0.34.0 | v1.20 to v1.22 | -| v0.33.0 | v1.20 to v1.22 | -| v0.32.0 (skipped) | n/a | -| v0.31.0 | v1.19 to v1.21 | -| v0.30.0 | v1.19 to v1.21 | -| v0.29.0 | v1.19 to v1.21 | -| v0.28.0 | v1.19 to v1.21 | -| v0.27.0 | v1.19 to v1.21 | -| v0.26.0 | v1.18 to v1.20 | +| OpenTelemetry Operator | Kubernetes | Cert-Manager | +|------------------------|----------------------|----------------------| +| v0.37.1 | v1.20 to v1.22 | v1.4.0 to v1.6.1 | +| v0.37.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.36.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.35.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.34.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.33.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.32.0 (skipped) | n/a | n/a | +| v0.31.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | +| v0.30.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | +| v0.29.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | +| v0.28.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | +| v0.27.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing From c842ede023ccc493a6ca3aa7d2ebba762fe73bb9 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 5 Nov 2021 10:27:47 +0100 Subject: [PATCH 0311/1234] Add e2e tests for java auto-instrumentation (#498) * Add e2e tests for java auto-instrumentation Signed-off-by: Pavol Loffay --- .../00-install-collector.yaml | 26 ++++++++++++++++++ .../00-install-instrumentation.yaml | 9 +++++++ tests/e2e/instrumentation-java/01-assert.yaml | 27 +++++++++++++++++++ .../instrumentation-java/01-install-app.yaml | 20 ++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 tests/e2e/instrumentation-java/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-java/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-java/01-assert.yaml create mode 100644 tests/e2e/instrumentation-java/01-install-app.yaml diff --git a/tests/e2e/instrumentation-java/00-install-collector.yaml b/tests/e2e/instrumentation-java/00-install-collector.yaml new file mode 100644 index 000000000..6581d8935 --- /dev/null +++ b/tests/e2e/instrumentation-java/00-install-collector.yaml @@ -0,0 +1,26 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + args: + metrics-level: detailed + log-level: debug + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml new file mode 100644 index 000000000..2235a3a1c --- /dev/null +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -0,0 +1,9 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: java +spec: + exporter: + endpoint: http://localhost:4318 + java: + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml new file mode 100644 index 000000000..2d92b46d5 --- /dev/null +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_SERVICE_NAME + value: myapp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318 + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation +status: + phase: Running diff --git a/tests/e2e/instrumentation-java/01-install-app.yaml b/tests/e2e/instrumentation-java/01-install-app.yaml new file mode 100644 index 000000000..b66ffa759 --- /dev/null +++ b/tests/e2e/instrumentation-java/01-install-app.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "true" + spec: + containers: + - name: myapp + image: ghcr.io/pavolloffay/spring-petclinic:latest From 2527252d8260c0244a6fa62e6707cc60922105cd Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 5 Nov 2021 20:32:50 +0530 Subject: [PATCH 0312/1234] Add upgrade routine for 0.38.0 (#491) * Add upgrade routine for 0.38.0 --- pkg/collector/upgrade/v0_38_0.go | 94 ++++++++++++++++ pkg/collector/upgrade/v0_38_0_test.go | 152 ++++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + 3 files changed, 250 insertions(+) create mode 100644 pkg/collector/upgrade/v0_38_0.go create mode 100644 pkg/collector/upgrade/v0_38_0_test.go diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go new file mode 100644 index 000000000..98e1ff27f --- /dev/null +++ b/pkg/collector/upgrade/v0_38_0.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "reflect" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_38_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + // return if args exist + if len(otelcol.Spec.Args) == 0 { + return otelcol, nil + } + + // Remove otelcol args --log-level, --log-profile, --log-format + // are deprecated in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4213 + foundLoggingArgs := make(map[string]string) + for argKey, argValue := range otelcol.Spec.Args { + if argKey == "--log-level" || argKey == "--log-profile" || argKey == "--log-format" { + foundLoggingArgs[argKey] = argValue + delete(otelcol.Spec.Args, argKey) + } + } + + if len(foundLoggingArgs) > 0 { + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.38.0, failed to parse configuration: %w", err) + } + + serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) + if !ok { + // no serviceConfig? create one as we need to configure logging parameters + cfg["service"] = make(map[interface{}]interface{}) + serviceConfig, _ = cfg["service"].(map[interface{}]interface{}) + } + + telemetryConfig, ok := serviceConfig["telemetry"].(map[interface{}]interface{}) + if !ok { + // no telemetryConfig? create one as we need to configure logging parameters + serviceConfig["telemetry"] = make(map[interface{}]interface{}) + telemetryConfig, _ = serviceConfig["telemetry"].(map[interface{}]interface{}) + } + + logsConfig, ok := telemetryConfig["logs"].(map[interface{}]interface{}) + if !ok { + // no logsConfig? create one as we need to configure logging parameters + telemetryConfig["logs"] = make(map[interface{}]interface{}) + logsConfig, _ = telemetryConfig["logs"].(map[interface{}]interface{}) + } + + // if there is already loggingConfig + // do not override it with values from deprecated args + if len(logsConfig) == 0 { + if val, ok := foundLoggingArgs["--log-level"]; ok { + logsConfig["level"] = val + } + if _, ok := foundLoggingArgs["--log-profile"]; ok { + logsConfig["development"] = true + } + if val, ok := foundLoggingArgs["--log-format"]; ok { + logsConfig["encoding"] = val + } + } + cfg["service"] = serviceConfig + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.38.0, failed to marshall back configuration: %w", err) + } + otelcol.Spec.Config = string(res) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.38.0 dropped the deprecated logging arguments "+ + "i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", reflect.ValueOf(foundLoggingArgs).MapKeys())) + } + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go new file mode 100644 index 000000000..cdc524534 --- /dev/null +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_38_0Upgrade(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "--hii": "hello", + "--log-profile": "", + "--log-format": "hii", + "--log-level": "debug", + "--arg1": "", + }, + Config: ` +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 + +exporters: + otlp: + endpoint: "example.com" + +service: + pipelines: + traces: + receivers: [otlp/mtls] + exporters: [otlp] +`, + }, + } + existing.Status.Version = "0.37.0" + + // TESTCASE 1: verify logging args exist and no config logging parameters + // EXPECTED: drop logging args and configure logging parameters into config from args + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, map[string]string{ + "--hii": "hello", + "--arg1": "", + }, res.Spec.Args) + + // verify + assert.Equal(t, `exporters: + otlp: + endpoint: example.com +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + traces: + exporters: + - otlp + receivers: + - otlp/mtls + telemetry: + logs: + development: true + encoding: hii + level: debug +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ + "i.e. [--log-profile --log-format --log-level] from otelcol custom resource otelcol.spec.args and "+ + "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) + + // TESTCASE 2: verify logging args exist and also config logging parameters exist + // EXPECTED: drop logging args and persist logging parameters as configured in config + configWithLogging := `exporters: + otlp: + endpoint: example.com +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + traces: + exporters: + - otlp + receivers: + - otlp/mtls + telemetry: + logs: + development: true + encoding: hii + level: debug +` + existing.Spec.Config = configWithLogging + existing.Spec.Args = map[string]string{ + "--hii": "hello", + "--log-profile": "", + "--log-format": "hii", + "--log-level": "debug", + "--arg1": "", + } + res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, configWithLogging, res.Spec.Config) + assert.Equal(t, map[string]string{ + "--hii": "hello", + "--arg1": "", + }, res.Spec.Args) + + assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ + "i.e. [--log-profile --log-format --log-level] from otelcol custom resource otelcol.spec.args and "+ + "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 2e23ef197..ddeed449b 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -58,6 +58,10 @@ var ( Version: *semver.MustParse("0.36.0"), upgrade: upgrade0_36_0, }, + { + Version: *semver.MustParse("0.38.0"), + upgrade: upgrade0_38_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From 3bc2c6b643fede0d44e3a07df00ed35bea988d01 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 8 Nov 2021 06:30:02 +0100 Subject: [PATCH 0313/1234] Fix flaky upgrade test by sorting flags in status message (#513) * Fix flaky upgrade test by sorting flags in status message Signed-off-by: Pavol Loffay --- pkg/collector/upgrade/v0_38_0.go | 9 ++++++++- pkg/collector/upgrade/v0_38_0_test.go | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 98e1ff27f..49a9d0bc5 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -17,6 +17,8 @@ package upgrade import ( "fmt" "reflect" + "sort" + "strings" "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" @@ -87,8 +89,13 @@ func upgrade0_38_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( return otelcol, fmt.Errorf("couldn't upgrade to v0.38.0, failed to marshall back configuration: %w", err) } otelcol.Spec.Config = string(res) + keys := reflect.ValueOf(foundLoggingArgs).MapKeys() + // sort keys to get always the same message + sort.Slice(keys, func(i, j int) bool { + return strings.Compare(keys[i].String(), keys[j].String()) <= 0 + }) otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", reflect.ValueOf(foundLoggingArgs).MapKeys())) + "i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", keys)) } return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index cdc524534..b24534aea 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -102,7 +102,7 @@ service: `, res.Spec.Config) assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. [--log-profile --log-format --log-level] from otelcol custom resource otelcol.spec.args and "+ + "i.e. [--log-format --log-level --log-profile] from otelcol custom resource otelcol.spec.args and "+ "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) // TESTCASE 2: verify logging args exist and also config logging parameters exist @@ -147,6 +147,6 @@ service: }, res.Spec.Args) assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. [--log-profile --log-format --log-level] from otelcol custom resource otelcol.spec.args and "+ + "i.e. [--log-format --log-level --log-profile] from otelcol custom resource otelcol.spec.args and "+ "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) } From d22c804aa1164fe741b5380ff234d25087e4695f Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 8 Nov 2021 16:00:47 +0530 Subject: [PATCH 0314/1234] Update collector to 0.38.0 (#510) * Update collector to 0.38.0 * update cert-manager version --- CHANGELOG.md | 5 +++++ Makefile | 2 +- README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- docs/otelcol_cr_spec.md | 1 - tests/e2e/instrumentation-java/00-install-collector.yaml | 1 - tests/e2e/smoke-pod-annotations/00-install.yaml | 1 - tests/e2e/smoke-sidecar/00-install.yaml | 1 - tests/e2e/smoke-simplest/00-install.yaml | 3 +-- versions.txt | 4 ++-- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5b7d575..5ab9aa804 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.38.0 +------------------- +* Bumped OpenTelemetry Collector to v0.38.0 +* Initial support for auto-instrumentation at the moment supported only for Java ([#464](https://github.com/open-telemetry/opentelemetry-operator/pull/464), [@pavolloffay](https://github.com/pavolloffay)) + 0.37.1 ------------------- * Bumped OpenTelemetry Collector to v0.37.1 diff --git a/Makefile b/Makefile index deb6c1455..321ac7a90 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ endif KUBE_VERSION ?= 1.21 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml -CERTMANAGER_VERSION ?= 1.6.0 +CERTMANAGER_VERSION ?= 1.6.1 ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=opentelemetry diff --git a/README.md b/README.md index cc38cef4a..f4392bf72 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.38.0 | v1.20 to v1.22 | 1.6.1 | | v0.37.1 | v1.20 to v1.22 | v1.4.0 to v1.6.1 | | v0.37.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.36.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index df3c81613..8155ccec6 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -25,7 +25,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.37.1 + name: opentelemetry-operator.v0.38.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -215,7 +215,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: quay.io/opentelemetry/opentelemetry-operator:v0.37.1 + image: quay.io/opentelemetry/opentelemetry-operator:v0.38.0 name: manager ports: - containerPort: 9443 @@ -307,7 +307,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.37.1 + version: 0.38.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md index a38526af5..d132022e6 100644 --- a/docs/otelcol_cr_spec.md +++ b/docs/otelcol_cr_spec.md @@ -31,7 +31,6 @@ spec: // +optional Args is the set of arguments to pass to the OpenTelemetry Collector binary args: metrics-level: detailed - log-level: debug // +optional Replicas is the number of pod instances for the underlying OpenTelemetry Collector replicas: 1 diff --git a/tests/e2e/instrumentation-java/00-install-collector.yaml b/tests/e2e/instrumentation-java/00-install-collector.yaml index 6581d8935..b82308636 100644 --- a/tests/e2e/instrumentation-java/00-install-collector.yaml +++ b/tests/e2e/instrumentation-java/00-install-collector.yaml @@ -6,7 +6,6 @@ spec: mode: sidecar args: metrics-level: detailed - log-level: debug config: | receivers: otlp: diff --git a/tests/e2e/smoke-pod-annotations/00-install.yaml b/tests/e2e/smoke-pod-annotations/00-install.yaml index 6313db887..ee3dac548 100644 --- a/tests/e2e/smoke-pod-annotations/00-install.yaml +++ b/tests/e2e/smoke-pod-annotations/00-install.yaml @@ -26,4 +26,3 @@ spec: exporters: [logging] args: metrics-level: detailed - log-level: debug diff --git a/tests/e2e/smoke-sidecar/00-install.yaml b/tests/e2e/smoke-sidecar/00-install.yaml index d70726c61..33d080521 100644 --- a/tests/e2e/smoke-sidecar/00-install.yaml +++ b/tests/e2e/smoke-sidecar/00-install.yaml @@ -6,7 +6,6 @@ spec: mode: sidecar args: metrics-level: detailed - log-level: debug config: | receivers: jaeger: diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml index f0d60d694..205c59226 100644 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -20,5 +20,4 @@ spec: processors: [] exporters: [logging] args: - metrics-level: detailed - log-level: debug \ No newline at end of file + metrics-level: detailed \ No newline at end of file diff --git a/versions.txt b/versions.txt index 9be8583f7..06fb40f62 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.37.1 +opentelemetry-collector=0.38.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.37.1 +operator=0.38.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 00ad4cbe7b8d39da2cf42b8e1f74a1bd611aad20 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 8 Nov 2021 12:49:03 +0100 Subject: [PATCH 0315/1234] Fix project structure to allow multiple kinds (#512) * Align project structure to multiple kinds Signed-off-by: Pavol Loffay * Fix project Signed-off-by: Pavol Loffay --- Dockerfile | 2 +- PROJECT | 25 +++++++++++++------ .../collector/v1alpha1/groupversion_info.go | 0 {api => apis}/collector/v1alpha1/mode.go | 0 .../v1alpha1/opentelemetrycollector_types.go | 0 .../opentelemetrycollector_webhook.go | 0 .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/groupversion_info.go | 0 .../v1alpha1/instrumentation_types.go | 0 .../v1alpha1/zz_generated.deepcopy.go | 0 .../opentelemetrycollector_controller.go | 2 +- .../opentelemetrycollector_controller_test.go | 2 +- controllers/suite_test.go | 2 +- .../webhookhandler_suite_test.go | 2 +- .../webhookhandler/webhookhandler_test.go | 2 +- main.go | 4 +-- pkg/collector/annotations.go | 2 +- pkg/collector/annotations_test.go | 2 +- pkg/collector/container.go | 2 +- pkg/collector/container_test.go | 2 +- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/labels.go | 2 +- pkg/collector/labels_test.go | 2 +- pkg/collector/reconcile/configmap_test.go | 2 +- pkg/collector/reconcile/deployment_test.go | 2 +- pkg/collector/reconcile/opentelemetry_test.go | 2 +- pkg/collector/reconcile/params.go | 2 +- pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/service_test.go | 2 +- pkg/collector/reconcile/serviceaccount.go | 2 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/collector/serviceaccount.go | 2 +- pkg/collector/serviceaccount_test.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 2 +- pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/suite_test.go | 2 +- pkg/collector/upgrade/upgrade.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 2 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 2 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_24_0_test.go | 2 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_31_0_test.go | 2 +- pkg/collector/upgrade/v0_36_0.go | 2 +- pkg/collector/upgrade/v0_36_0_test.go | 2 +- pkg/collector/upgrade/v0_38_0.go | 2 +- pkg/collector/upgrade/v0_38_0_test.go | 2 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 2 +- pkg/collector/upgrade/versions.go | 2 +- pkg/collector/volume.go | 2 +- pkg/collector/volume_test.go | 2 +- pkg/collector/volumeclaim.go | 2 +- pkg/collector/volumeclaim_test.go | 2 +- pkg/instrumentation/javaagent.go | 2 +- pkg/instrumentation/javaagent_test.go | 2 +- pkg/instrumentation/podmutator.go | 2 +- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- pkg/naming/main.go | 2 +- pkg/sidecar/pod.go | 2 +- pkg/sidecar/pod_test.go | 2 +- pkg/sidecar/podmutator.go | 2 +- pkg/targetallocator/container.go | 2 +- pkg/targetallocator/container_test.go | 2 +- pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/deployment_test.go | 2 +- pkg/targetallocator/labels.go | 2 +- pkg/targetallocator/labels_test.go | 2 +- pkg/targetallocator/volume.go | 2 +- pkg/targetallocator/volume_test.go | 2 +- 80 files changed, 89 insertions(+), 80 deletions(-) rename {api => apis}/collector/v1alpha1/groupversion_info.go (100%) rename {api => apis}/collector/v1alpha1/mode.go (100%) rename {api => apis}/collector/v1alpha1/opentelemetrycollector_types.go (100%) rename {api => apis}/collector/v1alpha1/opentelemetrycollector_webhook.go (100%) rename {api => apis}/collector/v1alpha1/zz_generated.deepcopy.go (100%) rename {api => apis}/instrumentation/v1alpha1/groupversion_info.go (100%) rename {api => apis}/instrumentation/v1alpha1/instrumentation_types.go (100%) rename {api => apis}/instrumentation/v1alpha1/zz_generated.deepcopy.go (100%) diff --git a/Dockerfile b/Dockerfile index 1c3719cd0..e6c375eb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN go mod download # Copy the go source COPY main.go main.go -COPY api/ api/ +COPY apis/ apis/ COPY controllers/ controllers/ COPY internal/ internal/ COPY pkg/ pkg/ diff --git a/PROJECT b/PROJECT index 948fffc49..1a22ed02c 100644 --- a/PROJECT +++ b/PROJECT @@ -1,14 +1,23 @@ -projectName: opentelemetry-operator domain: opentelemetry.io -layout: go.kubebuilder.io/v2 +layout: +- go.kubebuilder.io/v2 +multigroup: true +plugins: + manifests.sdk.operatorframework.io/v2: {} +projectName: opentelemetry-operator repo: github.com/open-telemetry/opentelemetry-operator resources: -- - controller: true - group: core +- controller: true + group: collector kind: OpenTelemetryCollector - path: k8s.io/api/core/v1alpha1 + path: github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1 + version: v1alpha1 +- api: + crdVersion: v1beta1 + namespaced: true + domain: opentelemetry.io + group: instrumentation + kind: Instrumentation + path: github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1 version: v1alpha1 version: "3" -plugins: - manifests.sdk.operatorframework.io/v2: {} diff --git a/api/collector/v1alpha1/groupversion_info.go b/apis/collector/v1alpha1/groupversion_info.go similarity index 100% rename from api/collector/v1alpha1/groupversion_info.go rename to apis/collector/v1alpha1/groupversion_info.go diff --git a/api/collector/v1alpha1/mode.go b/apis/collector/v1alpha1/mode.go similarity index 100% rename from api/collector/v1alpha1/mode.go rename to apis/collector/v1alpha1/mode.go diff --git a/api/collector/v1alpha1/opentelemetrycollector_types.go b/apis/collector/v1alpha1/opentelemetrycollector_types.go similarity index 100% rename from api/collector/v1alpha1/opentelemetrycollector_types.go rename to apis/collector/v1alpha1/opentelemetrycollector_types.go diff --git a/api/collector/v1alpha1/opentelemetrycollector_webhook.go b/apis/collector/v1alpha1/opentelemetrycollector_webhook.go similarity index 100% rename from api/collector/v1alpha1/opentelemetrycollector_webhook.go rename to apis/collector/v1alpha1/opentelemetrycollector_webhook.go diff --git a/api/collector/v1alpha1/zz_generated.deepcopy.go b/apis/collector/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from api/collector/v1alpha1/zz_generated.deepcopy.go rename to apis/collector/v1alpha1/zz_generated.deepcopy.go diff --git a/api/instrumentation/v1alpha1/groupversion_info.go b/apis/instrumentation/v1alpha1/groupversion_info.go similarity index 100% rename from api/instrumentation/v1alpha1/groupversion_info.go rename to apis/instrumentation/v1alpha1/groupversion_info.go diff --git a/api/instrumentation/v1alpha1/instrumentation_types.go b/apis/instrumentation/v1alpha1/instrumentation_types.go similarity index 100% rename from api/instrumentation/v1alpha1/instrumentation_types.go rename to apis/instrumentation/v1alpha1/instrumentation_types.go diff --git a/api/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from api/instrumentation/v1alpha1/zz_generated.deepcopy.go rename to apis/instrumentation/v1alpha1/zz_generated.deepcopy.go diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 70d157354..9c54df2ae 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -28,7 +28,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index b289a2a12..c61aa3712 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index a45d487d7..623a95987 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go index 4e3972cf3..bf8cc6c64 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index a5dcc0304..81310b8f6 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/main.go b/main.go index a330e7f45..cb8f075af 100644 --- a/main.go +++ b/main.go @@ -33,8 +33,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" - otelcolv1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" - otelinstv1alpha1 "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + otelcolv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + otelinstv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index 004242235..311e0ae38 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -18,7 +18,7 @@ import ( "crypto/sha256" "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) // Annotations return the annotations for OpenTelemetryCollector pod. diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index b9fc1e4ff..f49ad3a85 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) func TestDefaultAnnotations(t *testing.T) { diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 9ba75c108..adcf1a48f 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index bbc4ca3f3..92b1555d6 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 31997d4b5..aad7a6ec2 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 912fe41e5..3d895942c 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 70f565532..41d6ce4c3 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 20019845c..392f9023d 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 18138dc8d..7dd03bb55 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -17,7 +17,7 @@ package collector import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index a7cc8a8b5..f373c9113 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index ccbb8fbe6..0bd73489d 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index c3fcc858c..ff95ac8b6 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go index 925d6a288..51c9911eb 100644 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) func TestSelf(t *testing.T) { diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index ef437005f..ac346f246 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -20,7 +20,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index d7cbedfb3..276e906a6 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 8eee53e08..354a6b99e 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index ca66af4c9..80c6222b2 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index cab81e21d..d5f274d74 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index 06a7ae788..b896abb18 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -18,7 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 387045b7e..3d34d4468 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index f20d92603..189a6d1b3 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 1718689b8..cbb07e063 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index fcca7effb..b5e373816 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) //nolint unused diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index a058bb7d9..5d6d9877b 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index ab551c49a..16d4ccb2e 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 592e17537..0ea0f627d 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 8cff80781..7a1ed88ed 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 2ace5c2e3..6fb4ffe9d 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index 71bf9ac34..aa6a93358 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index c1dda68d5..9191e1c71 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 953ba2b69..899315482 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 0272b44ee..88f3b7b4b 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index bd9425e46..12e80ff93 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 3f1ceda50..d7823f7b6 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index 1fd8deb6d..dfcb995bd 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 502a516cc..f0321056d 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index 056215913..52c4bb740 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 49a9d0bc5..bd7d68d9c 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -23,7 +23,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index b24534aea..46bc103fe 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index bd94858ca..27d21b097 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 80d0b4e2f..5548c0487 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index ddeed449b..74b76dde3 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -18,7 +18,7 @@ import ( "github.com/Masterminds/semver/v3" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index a634bb6ac..465508351 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -18,7 +18,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index 2594ad36e..3602aea3d 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index 2d97697a1..94b50440c 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index f7d1ce209..522fa67fc 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 0cd547935..3bcf82746 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) const ( diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 08a00cf98..5093e05cc 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) func TestInjectJavaagent(t *testing.T) { diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index cc358249b..eb582c33e 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" ) diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index e16a9ffc7..da96a54f0 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) var k8sClient client.Client diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 013a67650..c76db4d30 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) const ( diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index a71d38174..88687a17d 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) func TestSDKInjection(t *testing.T) { diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 762eb8c68..19c58c623 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -18,7 +18,7 @@ package naming import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 61b518e90..b5f3530f0 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 34a148f84..73482ea4e 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 3acc004bc..01ae0d39a 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" ) diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index 39fb3f3bc..0c73f675f 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 64e2ee238..1478b554c 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 4dd10d0c4..771edac4a 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index 06df61c90..ea8d1c823 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index 8202b63f8..1a2f98672 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -17,7 +17,7 @@ package targetallocator import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go index 12f9fd5ab..54cccffad 100644 --- a/pkg/targetallocator/labels_test.go +++ b/pkg/targetallocator/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" ) func TestLabelsCommonSet(t *testing.T) { diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go index 6efcbff91..f5d7c8096 100644 --- a/pkg/targetallocator/volume.go +++ b/pkg/targetallocator/volume.go @@ -17,7 +17,7 @@ package targetallocator import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go index 67d2c571e..0192fd762 100644 --- a/pkg/targetallocator/volume_test.go +++ b/pkg/targetallocator/volume_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/api/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) From 9025a236625a738ebd76cb850940b36d4a5c3383 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 8 Nov 2021 12:50:16 +0100 Subject: [PATCH 0316/1234] Fix code block type in readme (#511) Signed-off-by: Pavol Loffay --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4392bf72..15148c3c7 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ The operator can inject and configure OpenTelemetry auto-instrumentation librari The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources. -```console +```bash instrumentation.opentelemetry.io/inject-java: "true" ``` From 72ba88cb530458feb7aeed3e30bbd75e56d181e5 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Mon, 8 Nov 2021 20:53:40 +0900 Subject: [PATCH 0317/1234] Add docker image containing nodejs auto instrumentation (#508) --- .../publish-autoinstrumentation-nodejs.yaml | 44 +++++++++++++++++++ .gitignore | 5 +++ autoinstrumentation/nodejs/.dockerignore | 2 + autoinstrumentation/nodejs/Dockerfile | 10 +++++ autoinstrumentation/nodejs/package.json | 22 ++++++++++ .../nodejs/src/autoinstrumentation.ts | 12 +++++ autoinstrumentation/nodejs/tsconfig.json | 33 ++++++++++++++ versions.txt | 4 ++ 8 files changed, 132 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-nodejs.yaml create mode 100644 autoinstrumentation/nodejs/.dockerignore create mode 100644 autoinstrumentation/nodejs/Dockerfile create mode 100644 autoinstrumentation/nodejs/package.json create mode 100644 autoinstrumentation/nodejs/src/autoinstrumentation.ts create mode 100644 autoinstrumentation/nodejs/tsconfig.json diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml new file mode 100644 index 000000000..157ffd5bb --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -0,0 +1,44 @@ +name: "Publish NodeJS Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/nodejs/**' + - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' + branches: + - main + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2.3.5 + + - name: Read version + run: echo VERSION=$(cat autoinstrumentation/nodejs/package.json | jq -r '.dependencies."@opentelemetry/sdk-node"') >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3.6.0 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v1.10.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2.7.0 + with: + context: autoinstrumentation/nodejs + push: true + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore index 374dd36ea..5ec29864b 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,8 @@ local # test resources kubeconfig tests/_build/ + +# autoinstrumentation artifacts +build +node_modules +package-lock.json diff --git a/autoinstrumentation/nodejs/.dockerignore b/autoinstrumentation/nodejs/.dockerignore new file mode 100644 index 000000000..48912d244 --- /dev/null +++ b/autoinstrumentation/nodejs/.dockerignore @@ -0,0 +1,2 @@ +build +node_modules \ No newline at end of file diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile new file mode 100644 index 000000000..85bc9f4c0 --- /dev/null +++ b/autoinstrumentation/nodejs/Dockerfile @@ -0,0 +1,10 @@ +FROM node:16 AS build + +WORKDIR /operator-build +COPY . . + +RUN npm install + +FROM busybox + +COPY --from=build /operator-build/build/workspace /autoinstrumentation diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json new file mode 100644 index 000000000..17853ed49 --- /dev/null +++ b/autoinstrumentation/nodejs/package.json @@ -0,0 +1,22 @@ +{ + "name": "@opentelemetry/k8s-autoinstrumentation", + "version": "0.0.1", + "private": true, + "scripts": { + "clean": "rimraf build/*", + "prepare": "npm run compile", + "compile": "tsc -p .", + "postcompile": "copyfiles -f 'build/src/**' build/workspace/ && copyfiles 'node_modules/**' build/workspace/" + }, + "devDependencies": { + "copyfiles": "^2.4.1", + "rimraf": "^3.0.2", + "typescript": "^4.4.4" + }, + "dependencies": { + "@opentelemetry/api": "1.0.3", + "@opentelemetry/auto-instrumentations-node": "0.26.0", + "@opentelemetry/exporter-otlp-grpc": "0.26.0", + "@opentelemetry/sdk-node": "0.26.0" + } +} diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts new file mode 100644 index 000000000..e03b533e3 --- /dev/null +++ b/autoinstrumentation/nodejs/src/autoinstrumentation.ts @@ -0,0 +1,12 @@ +import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-otlp-grpc'; + +import { NodeSDK } from '@opentelemetry/sdk-node'; + +const sdk = new NodeSDK({ + autoDetectResources: true, + instrumentations: [getNodeAutoInstrumentations()], + traceExporter: new OTLPTraceExporter(), +}); + +sdk.start(); diff --git a/autoinstrumentation/nodejs/tsconfig.json b/autoinstrumentation/nodejs/tsconfig.json new file mode 100644 index 000000000..83d94c8d1 --- /dev/null +++ b/autoinstrumentation/nodejs/tsconfig.json @@ -0,0 +1,33 @@ +{ + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "composite": true, + "declaration": true, + "declarationMap": true, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "inlineSources": true, + "module": "commonjs", + "newLine": "LF", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "pretty": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "target": "es2017" + }, + "include": [ + "src/**/*.ts", + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/versions.txt b/versions.txt index 06fb40f62..3da233d34 100644 --- a/versions.txt +++ b/versions.txt @@ -13,3 +13,7 @@ targetallocator=0.1.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt autoinstrumentation-java=1.7.0 + +# Represents the current release of NodeJS instrumentation. +# Should match value in autoinstrumentation/nodejs/package.json +autoinstrumentation-nodejs=0.26.0 \ No newline at end of file From f0bafbbec2de08a3243b04e6fc774ac9d3bff5b4 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 9 Nov 2021 10:07:28 +0100 Subject: [PATCH 0318/1234] Add opentelemetry sample to CSV (#519) Signed-off-by: Pavol Loffay --- ...entelemetry-operator.clusterserviceversion.yaml | 14 +++++++++++++- .../core_v1alpha1_opentelemetrycollector.yaml | 2 +- .../instrumentation_v1alpha1_instrumentation.yaml | 7 +++++++ config/samples/kustomization.yaml | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 config/samples/instrumentation_v1alpha1_instrumentation.yaml diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8155ccec6..137ef5439 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -4,11 +4,23 @@ metadata: annotations: alm-examples: |- [ + { + "apiVersion": "opentelemetry.io/v1alpha1", + "kind": "Instrumentation", + "metadata": { + "name": "instrumentation" + }, + "spec": { + "exporter": { + "endpoint": "http://otel-collector-headless:4317" + } + } + }, { "apiVersion": "opentelemetry.io/v1alpha1", "kind": "OpenTelemetryCollector", "metadata": { - "name": "opentelemetrycollector-sample" + "name": "otel" }, "spec": { "config": "receivers:\n otlp:\n protocols: \n grpc:\n http:\n\nexporters:\n logging:\n\nservice:\n pipelines:\n traces:\n receivers: [otlp]\n exporters: [logging]\n" diff --git a/config/samples/core_v1alpha1_opentelemetrycollector.yaml b/config/samples/core_v1alpha1_opentelemetrycollector.yaml index 025abd74a..2bd048caf 100644 --- a/config/samples/core_v1alpha1_opentelemetrycollector.yaml +++ b/config/samples/core_v1alpha1_opentelemetrycollector.yaml @@ -1,7 +1,7 @@ apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: opentelemetrycollector-sample + name: otel spec: config: | receivers: diff --git a/config/samples/instrumentation_v1alpha1_instrumentation.yaml b/config/samples/instrumentation_v1alpha1_instrumentation.yaml new file mode 100644 index 000000000..7fc3b1cc7 --- /dev/null +++ b/config/samples/instrumentation_v1alpha1_instrumentation.yaml @@ -0,0 +1,7 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: instrumentation +spec: + exporter: + endpoint: http://otel-collector-headless:4317 diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 864ff055a..6bdf18d21 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,3 +1,4 @@ ## This file is auto-generated, do not modify ## resources: - core_v1alpha1_opentelemetrycollector.yaml +- instrumentation_v1alpha1_instrumentation.yaml From bb210f556ef00f98824885cb72db0cd3f9ff3073 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 9 Nov 2021 10:10:10 +0100 Subject: [PATCH 0319/1234] Add resources to instrumentation CR (#509) Signed-off-by: Pavol Loffay --- .../v1alpha1/instrumentation_types.go | 5 ++ .../v1alpha1/zz_generated.deepcopy.go | 9 +- .../opentelemetry.io_instrumentations.yaml | 6 ++ .../opentelemetry.io_instrumentations.yaml | 6 ++ pkg/instrumentation/javaagent.go | 2 +- pkg/instrumentation/podmutator.go | 2 +- pkg/instrumentation/podmutator_test.go | 7 +- pkg/instrumentation/sdk.go | 82 ++++++++++++++++++- pkg/instrumentation/sdk_test.go | 54 ++++++++++-- tests/e2e/instrumentation-java/01-assert.yaml | 1 + 10 files changed, 158 insertions(+), 16 deletions(-) diff --git a/apis/instrumentation/v1alpha1/instrumentation_types.go b/apis/instrumentation/v1alpha1/instrumentation_types.go index 2e20111b2..ed7f541ec 100644 --- a/apis/instrumentation/v1alpha1/instrumentation_types.go +++ b/apis/instrumentation/v1alpha1/instrumentation_types.go @@ -23,6 +23,11 @@ type InstrumentationSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Exporter `json:"exporter,omitempty"` + // ResourceAttributes defines attributes that are added to resource. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` + // Java defines configuration for java auto-instrumentation. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true diff --git a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go index 23ecbabcf..de0d80401 100644 --- a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go +++ b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go @@ -43,7 +43,7 @@ func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status } @@ -101,6 +101,13 @@ func (in *InstrumentationList) DeepCopyObject() runtime.Object { func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { *out = *in out.Exporter = in.Exporter + if in.ResourceAttributes != nil { + in, out := &in.ResourceAttributes, &out.ResourceAttributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } out.Java = in.Java } diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 9cf9e406e..c2a955e3d 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -57,6 +57,12 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + resourceAttributes: + additionalProperties: + type: string + description: ResourceAttributes defines attributes that are added + to resource. + type: object type: object status: description: InstrumentationStatus defines status of the instrumentation. diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index ade599959..9b3c1e87d 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -59,6 +59,12 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + resourceAttributes: + additionalProperties: + type: string + description: ResourceAttributes defines attributes that are added + to resource. + type: object type: object status: description: InstrumentationStatus defines status of the instrumentation. diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 3bcf82746..f2af206ae 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -35,7 +35,7 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.JavaSpec, pod corev1. Name: envJavaToolsOptions, Value: javaJVMArgument, }) - } else if idx > -1 { + } else { if container.Env[idx].ValueFrom != nil { // TODO add to status object or submit it as an event logger.Info("Skipping javaagent injection, the container defines JAVA_TOOL_OPTIONS env var value via ValueFrom", "container", container.Name) diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index eb582c33e..691dca1aa 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -79,7 +79,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, // we should inject the instrumentation. logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - return inject(pm.Logger, otelinst, pod), nil + return inject(pm.Logger, otelinst, ns, pod), nil } func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.Instrumentation, error) { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index da96a54f0..46fff2e3c 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -26,7 +26,6 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes/scheme" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -36,7 +35,7 @@ import ( var k8sClient client.Client var testEnv *envtest.Environment -var testScheme *runtime.Scheme = scheme.Scheme +var testScheme = scheme.Scheme func TestMain(m *testing.M) { testEnv = &envtest.Environment{ @@ -156,6 +155,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://collector:12345", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=javaagent", + }, { Name: "JAVA_TOOL_OPTIONS", Value: javaJVMArgument, diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index c76db4d30..5e4cebd8e 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -15,6 +15,10 @@ package instrumentation import ( + "fmt" + "sort" + "strings" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -27,22 +31,23 @@ const ( envOTELServiceName = "OTEL_SERVICE_NAME" envOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" + envOTELResourceAttrs = "OTEL_RESOURCE_ATTRIBUTES" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func inject(logger logr.Logger, otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { +func inject(logger logr.Logger, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { if len(pod.Spec.Containers) < 1 { return pod } // inject only to the first container for now // in the future we can define an annotation to configure this - pod = injectCommonSDKConfig(otelinst, pod) + pod = injectCommonSDKConfig(otelinst, ns, pod) pod = injectJavaagent(logger, otelinst.Spec.Java, pod) return pod } -func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { +func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { container := &pod.Spec.Containers[0] idx := getIndexOfEnv(container.Env, envOTELServiceName) if idx == -1 { @@ -60,10 +65,81 @@ func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, pod corev1.Pod) co Value: otelinst.Spec.Endpoint, }) } + idx = getIndexOfEnv(container.Env, envOTELResourceAttrs) + resourceMap := createResourceMap(otelinst, ns, pod) + resStr := resourceMapToStr(resourceMap) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELResourceAttrs, + Value: resStr, + }) + } else { + if !strings.HasSuffix(container.Env[idx].Value, ",") { + resStr = "," + resStr + } + container.Env[idx].Value += resStr + } return pod } +// createResourceMap creates resource attribute map. +// User defined attributes (in explicitly set env var) have higher precedence. +func createResourceMap(otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) map[string]string { + // get existing resources env var and parse it into a map + existingRes := map[string]bool{} + existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[0].Env, envOTELResourceAttrs) + if existingResourceEnvIdx > -1 { + existingResArr := strings.Split(pod.Spec.Containers[0].Env[existingResourceEnvIdx].Value, ",") + for _, kv := range existingResArr { + keyValueArr := strings.Split(strings.TrimSpace(kv), "=") + if len(keyValueArr) != 2 { + continue + } + existingRes[keyValueArr[0]] = true + } + } + + res := map[string]string{} + for k, v := range otelinst.Spec.ResourceAttributes { + if !existingRes[k] { + res[k] = v + } + } + if !existingRes["k8s.namespace.name"] { + res["k8s.namespace.name"] = ns.Name + } + if pod.Name != "" { + // The pod name might be empty if the pod is created form deployment template + if !existingRes["k8s.pod.name"] { + res["k8s.pod.name"] = pod.Name + } + } + if !existingRes["k8s.container.name"] { + res["k8s.container.name"] = pod.Spec.Containers[0].Name + } + // TODO add more attributes once the parent object (deployment) is accessible here + return res +} + +func resourceMapToStr(res map[string]string) string { + keys := make([]string, 0, len(res)) + for k := range res { + keys = append(keys, k) + } + sort.Strings(keys) + + var str = "" + for _, k := range keys { + if str != "" { + str += "," + } + str += fmt.Sprintf("%s=%s", k, res[k]) + } + + return str +} + func getIndexOfEnv(envs []corev1.EnvVar, name string) int { for i := range envs { if envs[i].Name == name { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 88687a17d..e649347c2 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -20,6 +20,7 @@ import ( "github.com/go-logr/logr" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" ) @@ -41,6 +42,10 @@ func TestSDKInjection(t *testing.T) { }, }, pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { @@ -50,6 +55,10 @@ func TestSDKInjection(t *testing.T) { }, }, expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { @@ -63,6 +72,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4318", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=application-name,k8s.namespace.name=project1,k8s.pod.name=app", + }, }, }, }, @@ -76,9 +89,16 @@ func TestSDKInjection(t *testing.T) { Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4318", }, + ResourceAttributes: map[string]string{ + "fromcr": "val", + }, }, }, pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { @@ -91,12 +111,20 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "explicitly_set", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "foo=bar,k8s.container.name=other,", + }, }, }, }, }, }, expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { @@ -109,6 +137,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "explicitly_set", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.pod.name=app", + }, }, }, }, @@ -119,7 +151,7 @@ func TestSDKInjection(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectCommonSDKConfig(test.inst, test.pod) + pod := injectCommonSDKConfig(test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) assert.Equal(t, test.expected, pod) }) } @@ -136,15 +168,17 @@ func TestInjection(t *testing.T) { }, }, } - pod := inject(logr.Discard(), inst, corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Name: "app", + pod := inject(logr.Discard(), inst, + corev1.Namespace{}, + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, }, }, - }, - }) + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ @@ -184,6 +218,10 @@ func TestInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4318", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=", + }, { Name: "JAVA_TOOL_OPTIONS", Value: javaJVMArgument, diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index 2d92b46d5..fc10dfe54 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -14,6 +14,7 @@ spec: value: myapp - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4318 + - name: OTEL_RESOURCE_ATTRIBUTES - name: JAVA_TOOL_OPTIONS value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" volumeMounts: From f6607c99e40d128805d737d64930804958a1d437 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 9 Nov 2021 12:50:41 +0100 Subject: [PATCH 0320/1234] Fix port in Instrumentation exporter to 4317 to use grpc (#516) Signed-off-by: Pavol Loffay --- README.md | 2 +- pkg/instrumentation/sdk_test.go | 10 +++++----- .../00-install-instrumentation.yaml | 2 +- tests/e2e/instrumentation-java/01-assert.yaml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 15148c3c7..c5c926105 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ metadata: name: java-instrumentation spec: exporter: - endpoint: http://otel-collector:4318 + endpoint: http://otel-collector:4317 java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest # <1> EOF diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index e649347c2..d4dda4845 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -37,7 +37,7 @@ func TestSDKInjection(t *testing.T) { inst: v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Exporter: v1alpha1.Exporter{ - Endpoint: "https://collector:4318", + Endpoint: "https://collector:4317", }, }, }, @@ -70,7 +70,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "https://collector:4318", + Value: "https://collector:4317", }, { Name: "OTEL_RESOURCE_ATTRIBUTES", @@ -87,7 +87,7 @@ func TestSDKInjection(t *testing.T) { inst: v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Exporter: v1alpha1.Exporter{ - Endpoint: "https://collector:4318", + Endpoint: "https://collector:4317", }, ResourceAttributes: map[string]string{ "fromcr": "val", @@ -164,7 +164,7 @@ func TestInjection(t *testing.T) { Image: "img:1", }, Exporter: v1alpha1.Exporter{ - Endpoint: "https://collector:4318", + Endpoint: "https://collector:4317", }, }, } @@ -216,7 +216,7 @@ func TestInjection(t *testing.T) { }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "https://collector:4318", + Value: "https://collector:4317", }, { Name: "OTEL_RESOURCE_ATTRIBUTES", diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index 2235a3a1c..a767440de 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -4,6 +4,6 @@ metadata: name: java spec: exporter: - endpoint: http://localhost:4318 + endpoint: http://localhost:4317 java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index fc10dfe54..3a1d79f86 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -13,7 +13,7 @@ spec: - name: OTEL_SERVICE_NAME value: myapp - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 + value: http://localhost:4317 - name: OTEL_RESOURCE_ATTRIBUTES - name: JAVA_TOOL_OPTIONS value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" From de6219f576b1af2e88c9119452ae8ef1db67cb7a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 9 Nov 2021 17:22:53 +0100 Subject: [PATCH 0321/1234] Add propagators configuration to the Instrumentation kind (#515) Signed-off-by: Pavol Loffay --- README.md | 4 ++ .../v1alpha1/instrumentation_types.go | 5 +++ apis/instrumentation/v1alpha1/propagation.go | 40 +++++++++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 5 +++ .../opentelemetry.io_instrumentations.yaml | 16 ++++++++ .../opentelemetry.io_instrumentations.yaml | 16 ++++++++ pkg/instrumentation/sdk.go | 10 +++++ pkg/instrumentation/sdk_test.go | 14 +++++++ .../00-install-instrumentation.yaml | 3 ++ tests/e2e/instrumentation-java/01-assert.yaml | 2 + 10 files changed, 115 insertions(+) create mode 100644 apis/instrumentation/v1alpha1/propagation.go diff --git a/README.md b/README.md index c5c926105..66b71ed83 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,10 @@ metadata: spec: exporter: endpoint: http://otel-collector:4317 + propagators: + - tracecontext + - baggage + - b3 java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest # <1> EOF diff --git a/apis/instrumentation/v1alpha1/instrumentation_types.go b/apis/instrumentation/v1alpha1/instrumentation_types.go index ed7f541ec..405c09112 100644 --- a/apis/instrumentation/v1alpha1/instrumentation_types.go +++ b/apis/instrumentation/v1alpha1/instrumentation_types.go @@ -28,6 +28,11 @@ type InstrumentationSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` + // Propagators defines inter-process context propagation configuration. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Propagators []Propagator `json:"propagators,omitempty"` + // Java defines configuration for java auto-instrumentation. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true diff --git a/apis/instrumentation/v1alpha1/propagation.go b/apis/instrumentation/v1alpha1/propagation.go new file mode 100644 index 000000000..ed759b442 --- /dev/null +++ b/apis/instrumentation/v1alpha1/propagation.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // Propagator represents the propagation type. + // +kubebuilder:validation:Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;no + Propagator string +) + +const ( + // TraceContext represents W3C Trace Context. + TraceContext Propagator = "tracecontext" + // Baggage represents W3C Baggage. + Baggage Propagator = "baggage" + // B3 represents B3 Single. + B3 Propagator = "b3" + // B3Multi represents B3 Multi. + B3Multi Propagator = "b3multi" + // Jaeger represents Jaeger. + Jaeger Propagator = "jaeger" + // XRay represents AWS X-Ray. + XRay Propagator = "xray" + // OTTrace represents OT Trace. + OTTrace Propagator = "ottrace" + // No represents automatically configured propagator. + None Propagator = "no" +) diff --git a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go index de0d80401..e57ababe4 100644 --- a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go +++ b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go @@ -108,6 +108,11 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { (*out)[key] = val } } + if in.Propagators != nil { + in, out := &in.Propagators, &out.Propagators + *out = make([]Propagator, len(*in)) + copy(*out, *in) + } out.Java = in.Java } diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index c2a955e3d..cc7519069 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -57,6 +57,22 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + propagators: + description: Propagators defines inter-process context propagation + configuration. + items: + description: Propagator represents the propagation type. + enum: + - tracecontext + - baggage + - b3 + - b3multi + - jaeger + - xray + - ottrace + - "no" + type: string + type: array resourceAttributes: additionalProperties: type: string diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 9b3c1e87d..0eef55716 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -59,6 +59,22 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + propagators: + description: Propagators defines inter-process context propagation + configuration. + items: + description: Propagator represents the propagation type. + enum: + - tracecontext + - baggage + - b3 + - b3multi + - jaeger + - xray + - ottrace + - "no" + type: string + type: array resourceAttributes: additionalProperties: type: string diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 5e4cebd8e..54971731a 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -18,6 +18,7 @@ import ( "fmt" "sort" "strings" + "unsafe" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -32,6 +33,7 @@ const ( envOTELServiceName = "OTEL_SERVICE_NAME" envOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" envOTELResourceAttrs = "OTEL_RESOURCE_ATTRIBUTES" + envOTELPropagators = "OTEL_PROPAGATORS" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -79,6 +81,14 @@ func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespac } container.Env[idx].Value += resStr } + idx = getIndexOfEnv(container.Env, envOTELPropagators) + if idx == -1 && len(otelinst.Spec.Propagators) > 0 { + propagators := *(*[]string)((unsafe.Pointer(&otelinst.Spec.Propagators))) + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELPropagators, + Value: strings.Join(propagators, ","), + }) + } return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index d4dda4845..e73660506 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -39,6 +39,7 @@ func TestSDKInjection(t *testing.T) { Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4317", }, + Propagators: []v1alpha1.Propagator{"b3", "jaeger"}, }, }, pod: corev1.Pod{ @@ -76,6 +77,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=application-name,k8s.namespace.name=project1,k8s.pod.name=app", }, + { + Name: "OTEL_PROPAGATORS", + Value: "b3,jaeger", + }, }, }, }, @@ -92,6 +97,7 @@ func TestSDKInjection(t *testing.T) { ResourceAttributes: map[string]string{ "fromcr": "val", }, + Propagators: []v1alpha1.Propagator{"jaeger"}, }, }, pod: corev1.Pod{ @@ -115,6 +121,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "foo=bar,k8s.container.name=other,", }, + { + Name: "OTEL_PROPAGATORS", + Value: "b3", + }, }, }, }, @@ -141,6 +151,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.pod.name=app", }, + { + Name: "OTEL_PROPAGATORS", + Value: "b3", + }, }, }, }, diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index a767440de..48091c25e 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -5,5 +5,8 @@ metadata: spec: exporter: endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index 3a1d79f86..704989307 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -15,6 +15,8 @@ spec: - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 - name: JAVA_TOOL_OPTIONS value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" volumeMounts: From e788064f2c2142cd91c87df51ffd34c11433fc96 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 10 Nov 2021 10:33:51 +0100 Subject: [PATCH 0322/1234] Remove badges from readme (#525) Signed-off-by: Pavol Loffay --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index 66b71ed83..e641a94e5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] [![Maintainability][code-climate-img]][code-climate] [![codecov][codecov-img]][codecov] -[![Repository on Quay](https://quay.io/repository/opentelemetry/opentelemetry-operator/status "Repository on Quay")](https://quay.io/repository/opentelemetry/opentelemetry-operator) +[![Continuous Integration][github-workflow-img]][github-workflow] [![Go Report Card][goreport-img]][goreport] [![GoDoc][godoc-img]][godoc] # OpenTelemetry Operator for Kubernetes @@ -257,9 +256,5 @@ Thanks to all the people who already contributed! [goreport]: https://goreportcard.com/report/github.com/open-telemetry/opentelemetry-operator [godoc-img]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator?status.svg [godoc]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector -[code-climate]: https://codeclimate.com/github/open-telemetry/opentelemetry-operator/maintainability -[code-climate-img]: https://api.codeclimate.com/v1/badges/7bb215eea77fc9c24484/maintainability -[codecov]: https://codecov.io/gh/open-telemetry/opentelemetry-operator -[codecov-img]: https://codecov.io/gh/open-telemetry/opentelemetry-operator/branch/main/graph/badge.svg [contributors]: https://github.com/open-telemetry/opentelemetry-operator/graphs/contributors [contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator From 178d96a97b421cb7caf9c38126e6f76b879fae93 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 10 Nov 2021 10:37:02 +0100 Subject: [PATCH 0323/1234] Update OLM instructions (#520) Signed-off-by: Pavol Loffay --- CONTRIBUTING.md | 58 ++++++++++++++----------------------------------- Makefile | 3 +++ 2 files changed, 19 insertions(+), 42 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40e768608..2b8d09649 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -126,59 +126,33 @@ For production environments, it is recommended to use the [Operator Lifecycle Ma ### Setup OLM -When using Kubernetes, install OLM following the [official instructions](https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md). At the moment of this writing, it involves the following: +When using Kubernetes, install OLM following the [official instructions](https://sdk.operatorframework.io/docs/olm-integration/). At the moment of this writing, it involves the following: ```bash -kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml -kubectl create -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml -kubectl wait --for=condition=available deployment packageserver -n olm -kubectl wait --for=condition=available deployment olm-operator -n olm -kubectl wait --for=condition=available deployment catalog-operator -n olm +operator-sdk olm install ``` -When using OpenShift, OLM is already installed. +When using OpenShift, the OLM is already installed. ### Create the bundle and related images -The following commands will generate a bundle under `bundle/` and build an image with its contents. It will then generate and publish an index image with the [Operator Package Manager (OPM)](https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md#opm) +The following commands will generate a bundle under `bundle/`, build an image with its contents, build and publish the operator image. ```bash -export VERSION=x.y.z -make set-image-controller bundle bundle-build -podman push quay.io/${USER}/opentelemetry-operator-bundle:${VERSION} -opm index add --bundles quay.io/${USER}/opentelemetry-operator-bundle:${VERSION} --tag quay.io/${USER}/opentelemetry-operator-index:${VERSION} -podman push quay.io/${USER}/opentelemetry-operator-index:${VERSION} +BUNDLE_IMG=docker.io/${USER}/opentelemetry-operator-bundle:latest IMG=docker.io/${USER}/opentelemetry-operator:latest make bundle container container-push bundle-build bundle-push ``` ### Install the operator -To install our operator, create a `CatalogSource` for our index image, wait for OLM to synchronize and finally create a `Subscription`. Make sure to replace `${USER}` with your username and `${VERSION}` with the version used in the previous step. The namespace for both should be `operators` on Kubernetes, while `openshift-operators` should be used for OpenShift. - -```yaml -kubectl apply -f - < Date: Wed, 10 Nov 2021 10:37:21 +0100 Subject: [PATCH 0324/1234] Add sampler configuration to instrumentation kind (#514) * Add sampler configuration to instrumentation kind Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- README.md | 3 ++ .../v1alpha1/instrumentation_types.go | 21 ++++++++++ .../{propagation.go => propagators.go} | 0 apis/instrumentation/v1alpha1/samplers.go | 40 +++++++++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 16 ++++++++ .../opentelemetry.io_instrumentations.yaml | 22 ++++++++++ .../opentelemetry.io_instrumentations.yaml | 22 ++++++++++ pkg/instrumentation/sdk.go | 20 ++++++++++ pkg/instrumentation/sdk_test.go | 24 +++++++++++ .../00-install-instrumentation.yaml | 3 ++ tests/e2e/instrumentation-java/01-assert.yaml | 4 ++ 11 files changed, 175 insertions(+) rename apis/instrumentation/v1alpha1/{propagation.go => propagators.go} (100%) create mode 100644 apis/instrumentation/v1alpha1/samplers.go diff --git a/README.md b/README.md index e641a94e5..d85b94a64 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,9 @@ spec: - tracecontext - baggage - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest # <1> EOF diff --git a/apis/instrumentation/v1alpha1/instrumentation_types.go b/apis/instrumentation/v1alpha1/instrumentation_types.go index 405c09112..48b29748f 100644 --- a/apis/instrumentation/v1alpha1/instrumentation_types.go +++ b/apis/instrumentation/v1alpha1/instrumentation_types.go @@ -33,6 +33,11 @@ type InstrumentationSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Propagators []Propagator `json:"propagators,omitempty"` + // Sampler defines sampling configuration. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Sampler `json:"sampler,omitempty"` + // Java defines configuration for java auto-instrumentation. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true @@ -55,6 +60,22 @@ type Exporter struct { Endpoint string `json:"endpoint,omitempty"` } +// Sampler defines sampling configuration. +type Sampler struct { + // Type defines sampler type. + // The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Type SamplerType `json:"type,omitempty"` + + // Argument defines sampler argument. + // The value depends on the sampler type. + // For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Argument string `json:"argument,omitempty"` +} + // InstrumentationStatus defines status of the instrumentation. type InstrumentationStatus struct { } diff --git a/apis/instrumentation/v1alpha1/propagation.go b/apis/instrumentation/v1alpha1/propagators.go similarity index 100% rename from apis/instrumentation/v1alpha1/propagation.go rename to apis/instrumentation/v1alpha1/propagators.go diff --git a/apis/instrumentation/v1alpha1/samplers.go b/apis/instrumentation/v1alpha1/samplers.go new file mode 100644 index 000000000..beb01b7ce --- /dev/null +++ b/apis/instrumentation/v1alpha1/samplers.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // SamplerType represents sampler type. + // +kubebuilder:validation:Enum=always_on;always_off;traceidratio;parentbased_always_on;parentbased_always_off;parentbased_traceidratio;jaeger_remote;xray + SamplerType string +) + +const ( + // AlwaysOn represents AlwaysOnSampler. + AlwaysOn SamplerType = "always_on" + // AlwaysOff represents AlwaysOffSampler. + AlwaysOff SamplerType = "always_off" + // TraceIDRatio represents TraceIdRatioBased. + TraceIDRatio SamplerType = "traceidratio" + // ParentBasedAlwaysOn represents ParentBased(root=AlwaysOnSampler). + ParentBasedAlwaysOn SamplerType = "parentbased_always_on" + // ParentBasedAlwaysOff represents ParentBased(root=AlwaysOffSampler). + ParentBasedAlwaysOff SamplerType = "parentbased_always_off" + // ParentBasedTraceIDRatio represents ParentBased(root=TraceIdRatioBased). + ParentBasedTraceIDRatio SamplerType = "parentbased_traceidratio" + // JaegerRemote represents JaegerRemoteSampler. + JaegerRemote SamplerType = "jaeger_remote" + // XRay represents AWS X-Ray Centralized Sampling. + XRaySampler SamplerType = "xray" +) diff --git a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go index e57ababe4..ff2ec2573 100644 --- a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go +++ b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go @@ -113,6 +113,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { *out = make([]Propagator, len(*in)) copy(*out, *in) } + out.Sampler = in.Sampler out.Java = in.Java } @@ -155,3 +156,18 @@ func (in *JavaSpec) DeepCopy() *JavaSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sampler) DeepCopyInto(out *Sampler) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler. +func (in *Sampler) DeepCopy() *Sampler { + if in == nil { + return nil + } + out := new(Sampler) + in.DeepCopyInto(out) + return out +} diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index cc7519069..94072224a 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -79,6 +79,28 @@ spec: description: ResourceAttributes defines attributes that are added to resource. type: object + sampler: + description: Sampler defines sampling configuration. + properties: + argument: + description: Argument defines sampler argument. The value depends + on the sampler type. For instance for parentbased_traceidratio + sampler type it is a number in range [0..1] e.g. 0.25. + type: string + type: + description: Type defines sampler type. The value can be for instance + parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + enum: + - always_on + - always_off + - traceidratio + - parentbased_always_on + - parentbased_always_off + - parentbased_traceidratio + - jaeger_remote + - xray + type: string + type: object type: object status: description: InstrumentationStatus defines status of the instrumentation. diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 0eef55716..bcd0cc196 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -81,6 +81,28 @@ spec: description: ResourceAttributes defines attributes that are added to resource. type: object + sampler: + description: Sampler defines sampling configuration. + properties: + argument: + description: Argument defines sampler argument. The value depends + on the sampler type. For instance for parentbased_traceidratio + sampler type it is a number in range [0..1] e.g. 0.25. + type: string + type: + description: Type defines sampler type. The value can be for instance + parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + enum: + - always_on + - always_off + - traceidratio + - parentbased_always_on + - parentbased_always_off + - parentbased_traceidratio + - jaeger_remote + - xray + type: string + type: object type: object status: description: InstrumentationStatus defines status of the instrumentation. diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 54971731a..bf32506ca 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -34,6 +34,8 @@ const ( envOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" envOTELResourceAttrs = "OTEL_RESOURCE_ATTRIBUTES" envOTELPropagators = "OTEL_PROPAGATORS" + envOTELTracesSampler = "OTEL_TRACES_SAMPLER" + envOTELTracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -90,6 +92,24 @@ func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespac }) } + idx = getIndexOfEnv(container.Env, envOTELTracesSampler) + // configure sampler only if it is configured in the CR + if idx == -1 && otelinst.Spec.Sampler.Type != "" { + idxSamplerArg := getIndexOfEnv(container.Env, envOTELTracesSamplerArg) + if idxSamplerArg == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELTracesSampler, + Value: string(otelinst.Spec.Sampler.Type), + }) + if otelinst.Spec.Sampler.Argument != "" { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELTracesSamplerArg, + Value: otelinst.Spec.Sampler.Argument, + }) + } + } + } + return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index e73660506..f421f69c0 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -40,6 +40,10 @@ func TestSDKInjection(t *testing.T) { Endpoint: "https://collector:4317", }, Propagators: []v1alpha1.Propagator{"b3", "jaeger"}, + Sampler: v1alpha1.Sampler{ + Type: "parentbased_traceidratio", + Argument: "0.25", + }, }, }, pod: corev1.Pod{ @@ -81,6 +85,14 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_PROPAGATORS", Value: "b3,jaeger", }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.25", + }, }, }, }, @@ -98,6 +110,10 @@ func TestSDKInjection(t *testing.T) { "fromcr": "val", }, Propagators: []v1alpha1.Propagator{"jaeger"}, + Sampler: v1alpha1.Sampler{ + Type: "parentbased_traceidratio", + Argument: "0.25", + }, }, }, pod: corev1.Pod{ @@ -125,6 +141,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_PROPAGATORS", Value: "b3", }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "always_on", + }, }, }, }, @@ -155,6 +175,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_PROPAGATORS", Value: "b3", }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "always_on", + }, }, }, }, diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index 48091c25e..df59a6951 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -8,5 +8,8 @@ spec: propagators: - jaeger - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" java: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index 704989307..a6da38d36 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -17,6 +17,10 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" - name: JAVA_TOOL_OPTIONS value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" volumeMounts: From 15b2f70b137409435a3c0b5d3f738e53e8663704 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 10 Nov 2021 21:49:07 +0900 Subject: [PATCH 0325/1234] Add autoinstrumentation of NodeJS (#507) * Add autoinstrumentation of NodeJS * Drift * Switch to single annotation * Fix merge * Fix * Hurts * Format * Revert autogen * Drift * Revert autogen * autogen * Drift * Add doc * e2e * Less doc * Cleanup --- README.md | 42 ++-- .../v1alpha1/instrumentation_types.go | 13 ++ .../v1alpha1/zz_generated.deepcopy.go | 16 ++ .../opentelemetry.io_instrumentations.yaml | 7 + .../opentelemetry.io_instrumentations.yaml | 7 + pkg/instrumentation/annotation.go | 9 +- pkg/instrumentation/annotation_test.go | 2 +- pkg/instrumentation/nodejs.go | 68 +++++++ pkg/instrumentation/nodejs_test.go | 181 ++++++++++++++++++ pkg/instrumentation/podmutator.go | 74 +++---- pkg/instrumentation/podmutator_test.go | 93 +++++++++ pkg/instrumentation/sdk.go | 16 +- pkg/instrumentation/sdk_test.go | 86 ++++++++- .../00-install-collector.yaml | 25 +++ .../00-install-instrumentation.yaml | 12 ++ .../e2e/instrumentation-nodejs/01-assert.yaml | 30 +++ .../01-install-app.yaml | 20 ++ 17 files changed, 642 insertions(+), 59 deletions(-) create mode 100644 pkg/instrumentation/nodejs.go create mode 100644 pkg/instrumentation/nodejs_test.go create mode 100644 tests/e2e/instrumentation-nodejs/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-nodejs/01-assert.yaml create mode 100644 tests/e2e/instrumentation-nodejs/01-install-app.yaml diff --git a/README.md b/README.md index d85b94a64..0e9d9ab10 100644 --- a/README.md +++ b/README.md @@ -155,27 +155,16 @@ EOF ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. At this moment, the operator can inject only OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Java and NodeJS are supported. -The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources. - -```bash -instrumentation.opentelemetry.io/inject-java: "true" -``` - -The value can be -* `"false"` - do not inject -* `"true"` - inject and `Instrumentation` resource from the namespace. -* `"java-instrumentation"` - name of `Instrumentation` CR instance. - -In addition to the annotation, the following `CR` has to be created. The `Instrumentation` resource provides configuration for OpenTelemetry SDK and auto-instrumentation. +To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. ```yaml kubectl apply -f - < + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest + nodejs: + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest EOF ``` -1. Container image with [OpenTelemetry Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). The image must contain the Java agent JAR `/javaagent.jar`, and the operator will copy it to a shared volume mounted to the application container. - The above CR can be queried by `kubectl get otelinst`. +Then add an annotation to a pod to enable injection. The annotation can be added to a namespace, so that all pods within +that namespace wil get instrumentation, or by adding the annotation to individual PodSpec objects, available as part of +Deployment, Statefulset, and other resources. + +Java: +```bash +instrumentation.opentelemetry.io/inject-java: "true" +``` + +NodeJS: +```bash +instrumentation.opentelemetry.io/inject-nodejs: "true" +``` + +The possible values for the annotation can be +* `"true"` - inject and `Instrumentation` resource from the namespace. +* `"my-instrumentation"` - name of `Instrumentation` CR instance. +* `"false"` - do not inject + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/apis/instrumentation/v1alpha1/instrumentation_types.go b/apis/instrumentation/v1alpha1/instrumentation_types.go index 48b29748f..c38ee1de4 100644 --- a/apis/instrumentation/v1alpha1/instrumentation_types.go +++ b/apis/instrumentation/v1alpha1/instrumentation_types.go @@ -42,6 +42,11 @@ type InstrumentationSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Java JavaSpec `json:"java,omitempty"` + + // NodeJS defines configuration for nodejs auto-instrumentation. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + NodeJS NodeJSSpec `json:"nodejs,omitempty"` } // JavaSpec defines Java SDK and instrumentation configuration. @@ -52,6 +57,14 @@ type JavaSpec struct { Image string `json:"image,omitempty"` } +// NodeJSSpec defines NodeJS SDK and instrumentation configuration. +type NodeJSSpec struct { + // Image is a container image with NodeJS SDK and autoinstrumentation. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Image string `json:"image,omitempty"` +} + // Exporter defines OTLP exporter configuration. type Exporter struct { // Endpoint is address of the collector with OTLP endpoint. diff --git a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go index ff2ec2573..03c55c9ec 100644 --- a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go +++ b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go @@ -115,6 +115,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { } out.Sampler = in.Sampler out.Java = in.Java + out.NodeJS = in.NodeJS } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. @@ -157,6 +158,21 @@ func (in *JavaSpec) DeepCopy() *JavaSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeJSSpec) DeepCopyInto(out *NodeJSSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJSSpec. +func (in *NodeJSSpec) DeepCopy() *NodeJSSpec { + if in == nil { + return nil + } + out := new(NodeJSSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sampler) DeepCopyInto(out *Sampler) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 94072224a..56417bd77 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -57,6 +57,13 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. + properties: + image: + description: Image is a container image with NodeJS SDK and autoinstrumentation. + type: string + type: object propagators: description: Propagators defines inter-process context propagation configuration. diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index bcd0cc196..c3cbe5bf7 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -59,6 +59,13 @@ spec: description: Image is a container image with javaagent JAR. type: string type: object + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. + properties: + image: + description: Image is a container image with NodeJS SDK and autoinstrumentation. + type: string + type: object propagators: description: Propagators defines inter-process context propagation configuration. diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index fd063f8a3..6cc252a03 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -23,15 +23,16 @@ import ( const ( // annotationInjectJava indicates whether java auto-instrumentation should be injected or not. // Possible values are "true", "false" or "" name. - annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" + annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" + annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. -func annotationValue(ns metav1.ObjectMeta, pod metav1.ObjectMeta) string { +func annotationValue(ns metav1.ObjectMeta, pod metav1.ObjectMeta, annotation string) string { // is the pod annotated with instructions to inject sidecars? is the namespace annotated? // if any of those is true, a sidecar might be desired. - podAnnValue := pod.Annotations[annotationInjectJava] - nsAnnValue := ns.Annotations[annotationInjectJava] + podAnnValue := pod.Annotations[annotation] + nsAnnValue := ns.Annotations[annotation] // if the namespace value is empty, the pod annotation should be used, whatever it is if len(nsAnnValue) == 0 { diff --git a/pkg/instrumentation/annotation_test.go b/pkg/instrumentation/annotation_test.go index d8f2ac2b5..511a71ade 100644 --- a/pkg/instrumentation/annotation_test.go +++ b/pkg/instrumentation/annotation_test.go @@ -133,7 +133,7 @@ func TestEffectiveAnnotationValue(t *testing.T) { } { t.Run(tt.desc, func(t *testing.T) { // test - annValue := annotationValue(tt.ns.ObjectMeta, tt.pod.ObjectMeta) + annValue := annotationValue(tt.ns.ObjectMeta, tt.pod.ObjectMeta, annotationInjectJava) // verify assert.Equal(t, tt.expected, annValue) diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go new file mode 100644 index 000000000..86a2cc20c --- /dev/null +++ b/pkg/instrumentation/nodejs.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" +) + +const ( + envNodeOptions = "NODE_OPTIONS" + nodeRequireArgument = " --require /otel-auto-instrumentation/autoinstrumentation.js" +) + +func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJSSpec, pod corev1.Pod) corev1.Pod { + // caller checks if there is at least one container + container := &pod.Spec.Containers[0] + idx := getIndexOfEnv(container.Env, envNodeOptions) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envNodeOptions, + Value: nodeRequireArgument, + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping NodeJS SDK injection, the container defines NODE_OPTIONS env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = container.Env[idx].Value + nodeRequireArgument + } + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }) + + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: nodeJSSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + + return pod +} diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go new file mode 100644 index 000000000..37722ae32 --- /dev/null +++ b/pkg/instrumentation/nodejs_test.go @@ -0,0 +1,181 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" +) + +func TestInjectNodeJSSDK(t *testing.T) { + tests := []struct { + name string + v1alpha1.NodeJSSpec + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "NODE_OPTIONS not defined", + NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + }, + }, + }, + }, + }, + }, + { + name: "NODE_OPTIONS defined", + NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + Value: "-Dbaz=bar", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + Value: "-Dbaz=bar" + nodeRequireArgument, + }, + }, + }, + }, + }, + }, + }, + { + name: "NODE_OPTIONS defined as ValueFrom", + NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectNodeJSSDK(logr.Discard(), test.NodeJSSpec, test.pod) + assert.Equal(t, test.expected, pod) + }) + } +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 691dca1aa..151a546a7 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -38,6 +38,11 @@ type instPodMutator struct { Client client.Client } +type languageInstrumentations struct { + Java *v1alpha1.Instrumentation + NodeJS *v1alpha1.Instrumentation +} + var _ webhookhandler.PodMutator = (*instPodMutator)(nil) func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { @@ -50,64 +55,69 @@ func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { logger := pm.Logger.WithValues("namespace", pod.Namespace, "name", pod.Name) - // if no annotations are found at all, just return the same pod - annValue := annotationValue(ns.ObjectMeta, pod.ObjectMeta) - if len(annValue) == 0 { - logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") - return pod, nil - } + var inst *v1alpha1.Instrumentation + var err error - // is the annotation value 'false'? if so, we need a pod without the instrumentation - if strings.EqualFold(annValue, "false") { - logger.V(1).Info("pod explicitly refuses instrumentation injection, attempting to remove instrumentation if it exists") - return pod, nil - } + insts := languageInstrumentations{} - // which instance should it talk to? - otelinst, err := pm.getInstrumentationInstance(ctx, ns, annValue) - if err != nil { - if err == errNoInstancesAvailable || err == errMultipleInstancesPossible { - // we still allow the pod to be created, but we log a message to the operator's logs - logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") - return pod, nil - } + // We bail out if any annotation fails to process. + + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectJava); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + insts.Java = inst - // something else happened, better fail here + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectNodeJS); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } + insts.NodeJS = inst + + if insts.Java == nil && insts.NodeJS == nil { + logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") + return pod, nil + } // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, // we should inject the instrumentation. - logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - return inject(pm.Logger, otelinst, ns, pod), nil + return inject(pm.Logger, insts, ns, pod), nil } -func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.Instrumentation, error) { - if strings.EqualFold(ann, "true") { +func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, pod corev1.Pod, instAnnotation string) (*v1alpha1.Instrumentation, error) { + instValue := annotationValue(ns.ObjectMeta, pod.ObjectMeta, instAnnotation) + + if len(instValue) == 0 || strings.EqualFold(instValue, "false") { + return nil, nil + } + + if strings.EqualFold(instValue, "true") { return pm.selectInstrumentationInstanceFromNamespace(ctx, ns) } - otelInst := v1alpha1.Instrumentation{} - err := pm.Client.Get(ctx, types.NamespacedName{Name: ann, Namespace: ns.Name}, &otelInst) + otelInst := &v1alpha1.Instrumentation{} + err := pm.Client.Get(ctx, types.NamespacedName{Name: instValue, Namespace: ns.Name}, otelInst) if err != nil { - return otelInst, err + return nil, err } return otelInst, nil } -func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context.Context, ns corev1.Namespace) (v1alpha1.Instrumentation, error) { +func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context.Context, ns corev1.Namespace) (*v1alpha1.Instrumentation, error) { var otelInsts v1alpha1.InstrumentationList if err := pm.Client.List(ctx, &otelInsts, client.InNamespace(ns.Name)); err != nil { - return v1alpha1.Instrumentation{}, err + return nil, err } switch s := len(otelInsts.Items); { case s == 0: - return v1alpha1.Instrumentation{}, errNoInstancesAvailable + return nil, errNoInstancesAvailable case s > 1: - return v1alpha1.Instrumentation{}, errMultipleInstancesPossible + return nil, errMultipleInstancesPossible default: - return otelInsts.Items[0], nil + return &otelInsts.Items[0], nil } } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 46fff2e3c..247beec78 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -175,6 +175,99 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "nodejs injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "nodejs", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "nodejs", + }, + Spec: v1alpha1.InstrumentationSpec{ + NodeJS: v1alpha1.NodeJSSpec{ + Image: "otel/nodejs:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "opentelemetry-auto-instrumentation", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "otel/nodejs:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=nodejs", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation", + MountPath: "/otel-auto-instrumentation", + }, + }, + }, + }, + }, + }, + }, { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index bf32506ca..1b46fd350 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -39,15 +39,25 @@ const ( ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func inject(logger logr.Logger, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { +func inject(logger logr.Logger, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { if len(pod.Spec.Containers) < 1 { return pod } // inject only to the first container for now // in the future we can define an annotation to configure this - pod = injectCommonSDKConfig(otelinst, ns, pod) - pod = injectJavaagent(logger, otelinst.Spec.Java, pod) + if insts.Java != nil { + otelinst := *insts.Java + logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = injectCommonSDKConfig(otelinst, ns, pod) + pod = injectJavaagent(logger, otelinst.Spec.Java, pod) + } + if insts.NodeJS != nil { + otelinst := *insts.NodeJS + logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = injectCommonSDKConfig(otelinst, ns, pod) + pod = injectNodeJSSDK(logger, otelinst.Spec.NodeJS, pod) + } return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index f421f69c0..1b8cf98fc 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -195,7 +195,7 @@ func TestSDKInjection(t *testing.T) { } } -func TestInjection(t *testing.T) { +func TestInjectJava(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Java: v1alpha1.JavaSpec{ @@ -206,7 +206,10 @@ func TestInjection(t *testing.T) { }, }, } - pod := inject(logr.Discard(), inst, + insts := languageInstrumentations{ + Java: &inst, + } + pod := inject(logr.Discard(), insts, corev1.Namespace{}, corev1.Pod{ Spec: corev1.PodSpec{ @@ -270,3 +273,82 @@ func TestInjection(t *testing.T) { }, }, pod) } + +func TestInjectNodeJS(t *testing.T) { + inst := v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + NodeJS: v1alpha1.NodeJSSpec{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + } + insts := languageInstrumentations{ + NodeJS: &inst, + } + pod := inject(logr.Discard(), insts, + corev1.Namespace{}, + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }) + assert.Equal(t, corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "img:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + }, + }, + }, + }, + }, pod) +} diff --git a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml new file mode 100644 index 000000000..b82308636 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml @@ -0,0 +1,25 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + args: + metrics-level: detailed + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml new file mode 100644 index 000000000..a17642f74 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml @@ -0,0 +1,12 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: nodejs +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + nodejs: + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml new file mode 100644 index 000000000..db5ff8355 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_SERVICE_NAME + value: myapp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: NODE_OPTIONS + value: " --require /otel-auto-instrumentation/autoinstrumentation.js" + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation +status: + phase: Running diff --git a/tests/e2e/instrumentation-nodejs/01-install-app.yaml b/tests/e2e/instrumentation-nodejs/01-install-app.yaml new file mode 100644 index 000000000..7514b5986 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs/01-install-app.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/express-hello-world:latest From bfe8637c67432a6f43ce2208cb20b6a842263108 Mon Sep 17 00:00:00 2001 From: Bob Kukura Date: Wed, 10 Nov 2021 12:07:07 -0500 Subject: [PATCH 0326/1234] Fix collector CRD for kube 1.22 (#521) Fix collector CRD for kube 1.22 Signed-off-by: Robert Kukura --- ...ntelemetry.io_opentelemetrycollectors.yaml | 13 ----------- config/crd/kustomization.yaml | 1 - .../webhook_in_opentelemetrycollectors.yaml | 22 ------------------- 3 files changed, 36 deletions(-) delete mode 100644 config/crd/patches/webhook_in_opentelemetrycollectors.yaml diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 663a9b354..4b8793621 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -7,19 +7,6 @@ metadata: creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - caBundle: Cg== - service: - name: webhook-service - namespace: opentelemetry-operator-system - path: /convert - port: 443 - conversionReviewVersions: - - v1 - - v1beta1 group: opentelemetry.io names: kind: OpenTelemetryCollector diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 9426d4121..09cc1462e 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -8,7 +8,6 @@ resources: patchesStrategicMerge: # patches here are for enabling the conversion webhook for each CRD -- patches/webhook_in_opentelemetrycollectors.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # patches here are for enabling the CA injection for each CRD diff --git a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml b/config/crd/patches/webhook_in_opentelemetrycollectors.yaml deleted file mode 100644 index 9842691ef..000000000 --- a/config/crd/patches/webhook_in_opentelemetrycollectors.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# The following patch enables conversion webhook for CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: opentelemetrycollectors.opentelemetry.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - # this is "\n" used as a placeholder, otherwise it will be rejected by the apiserver for being blank, - # but we're going to set it later using the cert-manager (or potentially a patch if not using cert-manager) - caBundle: Cg== - service: - namespace: system - name: webhook-service - path: /convert - port: 443 - conversionReviewVersions: - - v1 - - v1beta1 \ No newline at end of file From ca3376c89358af7fb37decd5cd46c34708998b32 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 11 Nov 2021 10:56:41 +0100 Subject: [PATCH 0327/1234] Set default auto-instrumentation java image (#518) Signed-off-by: Pavol Loffay --- Dockerfile | 3 +- Makefile | 5 ++-- internal/version/main.go | 38 ++++++++++++++++---------- internal/version/main_test.go | 4 +++ main.go | 5 +++- pkg/instrumentation/podmutator.go | 25 +++++++++++++---- pkg/instrumentation/podmutator_test.go | 8 ++---- 7 files changed, 59 insertions(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6c375eb1..98b250aee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,10 @@ ARG VERSION ARG VERSION_DATE ARG OTELCOL_VERSION ARG TARGETALLOCATOR_VERSION +ARG AUTO_INSTRUMENTATION_JAVA_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 22dba0c28..6a8e293f4 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/versio OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator | awk -F= '{print $$2}')" TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION}" +AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" # Image URL to use all building/pushing image targets IMG_PREFIX ?= quay.io/${USER} @@ -129,7 +130,7 @@ set-test-image-vars: # Build the container image, used only for local dev purposes container: - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} . + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} . # Push the container image, used only for local dev purposes container-push: diff --git a/internal/version/main.go b/internal/version/main.go index 9966a3f6a..d16ea683c 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -21,29 +21,32 @@ import ( ) var ( - version string - buildDate string - otelCol string - targetAllocator string + version string + buildDate string + otelCol string + targetAllocator string + autoInstrumentationJava string ) // Version holds this Operator's version as well as the version of some of the components it uses. type Version struct { - Operator string `json:"opentelemetry-operator"` - BuildDate string `json:"build-date"` - OpenTelemetryCollector string `json:"opentelemetry-collector-version"` - Go string `json:"go-version"` - TargetAllocator string `json:"target-allocator-version"` + Operator string `json:"opentelemetry-operator"` + BuildDate string `json:"build-date"` + OpenTelemetryCollector string `json:"opentelemetry-collector-version"` + Go string `json:"go-version"` + TargetAllocator string `json:"target-allocator-version"` + JavaAutoInstrumentation string `json:"auto-instrumentation-java"` } // Get returns the Version object with the relevant information. func Get() Version { return Version{ - Operator: version, - BuildDate: buildDate, - OpenTelemetryCollector: OpenTelemetryCollector(), - Go: runtime.Version(), - TargetAllocator: TargetAllocator(), + Operator: version, + BuildDate: buildDate, + OpenTelemetryCollector: OpenTelemetryCollector(), + Go: runtime.Version(), + TargetAllocator: TargetAllocator(), + JavaAutoInstrumentation: javaAutoInstrumentation(), } } @@ -79,3 +82,10 @@ func TargetAllocator() string { // fallback value, useful for tests return "0.0.0" } + +func javaAutoInstrumentation() string { + if len(autoInstrumentationJava) > 0 { + return autoInstrumentationJava + } + return "0.0.0" +} diff --git a/internal/version/main_test.go b/internal/version/main_test.go index 785599195..fdc282dd9 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -49,3 +49,7 @@ func TestTargetAllocatorVersionFromBuild(t *testing.T) { assert.Equal(t, targetAllocator, TargetAllocator()) assert.Contains(t, Get().String(), targetAllocator) } + +func TestAutoInstrumentationJavaFallbackVersion(t *testing.T) { + assert.Equal(t, "0.0.0", javaAutoInstrumentation()) +} diff --git a/main.go b/main.go index cb8f075af..eeb8cc6ae 100644 --- a/main.go +++ b/main.go @@ -72,12 +72,14 @@ func main() { var enableLeaderElection bool var collectorImage string var targetAllocatorImage string + var autoInstrumentationJava string pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("otel/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.JavaAutoInstrumentation), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) @@ -86,6 +88,7 @@ func main() { "opentelemetry-operator", v.Operator, "opentelemetry-collector", collectorImage, "opentelemetry-targetallocator", targetAllocatorImage, + "auto-instrumentation-java", autoInstrumentationJava, "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, @@ -177,7 +180,7 @@ func main() { Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), mgr.GetClient(), []webhookhandler.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), - instrumentation.NewMutator(logger, mgr.GetClient()), + instrumentation.NewMutator(logger, mgr.GetClient(), autoInstrumentationJava), }), }) } diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 151a546a7..8d8be131b 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -34,8 +34,9 @@ var ( ) type instPodMutator struct { - Logger logr.Logger - Client client.Client + Logger logr.Logger + Client client.Client + autoInstrumentationJava string } type languageInstrumentations struct { @@ -45,10 +46,11 @@ type languageInstrumentations struct { var _ webhookhandler.PodMutator = (*instPodMutator)(nil) -func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { +func NewMutator(logger logr.Logger, client client.Client, autoInstrumentationJava string) *instPodMutator { return &instPodMutator{ - Logger: logger, - Client: client, + Logger: logger, + Client: client, + autoInstrumentationJava: autoInstrumentationJava, } } @@ -67,7 +69,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.Java = inst + insts.Java = pm.applyDefaults(inst) if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectNodeJS); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs @@ -121,3 +123,14 @@ func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context return &otelInsts.Items[0], nil } } + +func (pm *instPodMutator) applyDefaults(otelinst *v1alpha1.Instrumentation) *v1alpha1.Instrumentation { + if otelinst == nil { + return nil + } + + if otelinst.Spec.Java.Image == "" { + otelinst.Spec.Java.Image = pm.autoInstrumentationJava + } + return otelinst +} diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 247beec78..95857a237 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -71,7 +71,7 @@ func TestMain(m *testing.M) { } func TestMutatePod(t *testing.T) { - mutator := NewMutator(logr.Discard(), k8sClient) + mutator := NewMutator(logr.Discard(), k8sClient, "defaultimage:latest") require.NotNil(t, mutator) tests := []struct { @@ -95,9 +95,7 @@ func TestMutatePod(t *testing.T) { Namespace: "javaagent", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{ - Image: "otel/java:1", - }, + Java: v1alpha1.JavaSpec{}, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", }, @@ -135,7 +133,7 @@ func TestMutatePod(t *testing.T) { InitContainers: []corev1.Container{ { Name: initContainerName, - Image: "otel/java:1", + Image: "defaultimage:latest", Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, From f0818d797ed06e9d27436bf65b43abe0a0cf9625 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 11 Nov 2021 11:13:53 +0100 Subject: [PATCH 0328/1234] Generate docs from CRD spec (#505) Signed-off-by: Israel Blancas --- Makefile | 30 +- README.md | 3 +- docs/api.md | 4751 ++++++++++++++++++++++++++++++++++++++ docs/otelcol_cr_spec.md | 81 - docs/otelinst_cr_spec.md | 20 - 5 files changed, 4780 insertions(+), 105 deletions(-) create mode 100644 docs/api.md delete mode 100644 docs/otelcol_cr_spec.md delete mode 100644 docs/otelinst_cr_spec.md diff --git a/Makefile b/Makefile index 6a8e293f4..cbe7c3723 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ ensure-generate-is-noop: set-image-controller generate bundle @git restore config/manager/kustomization.yaml @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && git diff && exit 1) + @git diff -s --exit-code docs/api.md || (echo "Build failed: the api.md file has been changed but the generated api.md file isn't up to date. Run 'make api-docs' and update your PR." && git diff && exit 1) all: manager ci: test @@ -113,7 +114,7 @@ lint: golangci-lint run # Generate code -generate: controller-gen +generate: controller-gen api-docs $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." # end-to-tests @@ -136,7 +137,7 @@ container: container-push: docker push ${IMG} -start-kind: +start-kind: kind create cluster --config $(KIND_CONFIG) kind load docker-image local/opentelemetry-operator:e2e @@ -233,3 +234,28 @@ bundle-push: docker push $(BUNDLE_IMG) tools: ginkgo kustomize controller-gen operator-sdk + + +api-docs: crdoc kustomize + @{ \ + set -e ;\ + TMP_DIR=$$(mktemp -d) ; \ + $(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\ + $(API_REF_GEN) crdoc --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\ + } + +# Find or download crdoc +crdoc: +ifeq (, $(shell which crdoc)) + @{ \ + set -e ;\ + API_REF_GEN_TMP_DIR=$$(mktemp -d) ;\ + cd $$API_REF_GEN_TMP_DIR ;\ + go mod init tmp ;\ + go get fybrik.io/crdoc@v0.5.2 ;\ + rm -rf $$API_REF_GEN_TMP_DIR ;\ + } +API_REF_GEN=$(GOBIN)/crdoc +else +API_REF_GEN=$(shell which crdoc) +endif \ No newline at end of file diff --git a/README.md b/README.md index 0e9d9ab10..5eeb765f7 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ The operator manages: ## Documentation -* [OpenTelemetryCollector Custom Resource Specification](./docs/otelcol_cr_spec.md) -* [Instrumentation Custom Resource Specification](./docs/otelinst_cr_spec.md) +* [API docs](./docs/api.md) ## Getting started diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 000000000..4c95bf16c --- /dev/null +++ b/docs/api.md @@ -0,0 +1,4751 @@ +# API Reference + +Packages: + +- [opentelemetry.io/v1alpha1](#opentelemetryiov1alpha1) + +# opentelemetry.io/v1alpha1 + +Resource Types: + +- [Instrumentation](#instrumentation) + +- [OpenTelemetryCollector](#opentelemetrycollector) + + + + +## Instrumentation +[↩ Parent](#opentelemetryiov1alpha1 ) + + + + + + +Instrumentation is the spec for OpenTelemetry instrumentation. nolint: maligned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringopentelemetry.io/v1alpha1true
kindstringInstrumentationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation.
+
false
statusobject + InstrumentationStatus defines status of the instrumentation.
+
false
+ + +### Instrumentation.spec +[↩ Parent](#instrumentation) + + + +InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
exporterobject + Exporter defines exporter configuration.
+
false
javaobject + Java defines configuration for java auto-instrumentation.
+
false
nodejsobject + NodeJS defines configuration for nodejs auto-instrumentation.
+
false
propagators[]enum + Propagators defines inter-process context propagation configuration.
+
false
resourceAttributesmap[string]string + ResourceAttributes defines attributes that are added to resource.
+
false
samplerobject + Sampler defines sampling configuration.
+
false
+ + +### Instrumentation.spec.exporter +[↩ Parent](#instrumentationspec) + + + +Exporter defines exporter configuration. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endpointstring + Endpoint is address of the collector with OTLP endpoint.
+
false
+ + +### Instrumentation.spec.java +[↩ Parent](#instrumentationspec) + + + +Java defines configuration for java auto-instrumentation. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
imagestring + Image is a container image with javaagent JAR.
+
false
+ + +### Instrumentation.spec.nodejs +[↩ Parent](#instrumentationspec) + + + +NodeJS defines configuration for nodejs auto-instrumentation. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
imagestring + Image is a container image with NodeJS SDK and autoinstrumentation.
+
false
+ + +### Instrumentation.spec.sampler +[↩ Parent](#instrumentationspec) + + + +Sampler defines sampling configuration. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
argumentstring + Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
+
false
typeenum + Type defines sampler type. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...
+
+ Enum: always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio, jaeger_remote, xray
+
false
+ +## OpenTelemetryCollector +[↩ Parent](#opentelemetryiov1alpha1 ) + + + + + + +OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringopentelemetry.io/v1alpha1true
kindstringOpenTelemetryCollectortrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
+
false
statusobject + OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector.
+
false
+ + +### OpenTelemetryCollector.spec +[↩ Parent](#opentelemetrycollector) + + + +OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
argsmap[string]string + Args is the set of arguments to pass to the OpenTelemetry Collector binary
+
false
configstring + Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.
+
false
env[]object + ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector.
+
false
envFrom[]object + List of sources to populate environment variables on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector.
+
false
hostNetworkboolean + HostNetwork indicates if the pod should run in the host networking namespace.
+
false
imagestring + Image indicates the container image to use for the OpenTelemetry Collector.
+
false
imagePullPolicystring + ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
+
false
modeenum + Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar)
+
+ Enum: daemonset, deployment, sidecar, statefulset
+
false
podAnnotationsmap[string]string + PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods.
+
false
ports[]object + Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers.
+
false
replicasinteger + Replicas is the number of pod instances for the underlying OpenTelemetry Collector
+
+ Format: int32
+
false
resourcesobject + Resources to set on the OpenTelemetry Collector pods.
+
false
securityContextobject + SecurityContext will be set as the container security context.
+
false
serviceAccountstring + ServiceAccount indicates the name of an existing service account to use with this instance.
+
false
targetAllocatorobject + TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not.
+
false
tolerations[]object + Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonsets, statefulsets and deployments
+
false
volumeClaimTemplates[]object + VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset.
+
false
volumeMounts[]object + VolumeMounts represents the mount points to use in the underlying collector deployment(s)
+
false
volumes[]object + Volumes represents which volumes to use in the underlying collector deployment(s).
+
false
+ + +### OpenTelemetryCollector.spec.env[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### OpenTelemetryCollector.spec.env[index].valueFrom +[↩ Parent](#opentelemetrycollectorspecenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### OpenTelemetryCollector.spec.env[index].valueFrom.configMapKeyRef +[↩ Parent](#opentelemetrycollectorspecenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.env[index].valueFrom.fieldRef +[↩ Parent](#opentelemetrycollectorspecenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.env[index].valueFrom.resourceFieldRef +[↩ Parent](#opentelemetrycollectorspecenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.env[index].valueFrom.secretKeyRef +[↩ Parent](#opentelemetrycollectorspecenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.envFrom[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +EnvFromSource represents the source of a set of ConfigMaps + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapRefobject + The ConfigMap to select from
+
false
prefixstring + An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+
false
secretRefobject + The Secret to select from
+
false
+ + +### OpenTelemetryCollector.spec.envFrom[index].configMapRef +[↩ Parent](#opentelemetrycollectorspecenvfromindex) + + + +The ConfigMap to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap must be defined
+
false
+ + +### OpenTelemetryCollector.spec.envFrom[index].secretRef +[↩ Parent](#opentelemetrycollectorspecenvfromindex) + + + +The Secret to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret must be defined
+
false
+ + +### OpenTelemetryCollector.spec.ports[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +ServicePort contains information on service's port. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + The port that will be exposed by this service.
+
+ Format: int32
+
true
appProtocolstring + The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
+
false
namestring + The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.
+
false
nodePortinteger + The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+
+ Format: int32
+
false
protocolstring + The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
+
+ Default: TCP
+
false
targetPortint or string + Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+
false
+ + +### OpenTelemetryCollector.spec.resources +[↩ Parent](#opentelemetrycollectorspec) + + + +Resources to set on the OpenTelemetry Collector pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.securityContext +[↩ Parent](#opentelemetrycollectorspec) + + + +SecurityContext will be set as the container security context. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowPrivilegeEscalationboolean + AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN
+
false
capabilitiesobject + The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
+
false
privilegedboolean + Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
+
false
procMountstring + procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.
+
false
readOnlyRootFilesystemboolean + Whether this container has a read-only root filesystem. Default is false.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
seccompProfileobject + The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + +### OpenTelemetryCollector.spec.securityContext.capabilities +[↩ Parent](#opentelemetrycollectorspecsecuritycontext) + + + +The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
add[]string + Added capabilities
+
false
drop[]string + Removed capabilities
+
false
+ + +### OpenTelemetryCollector.spec.securityContext.seLinuxOptions +[↩ Parent](#opentelemetrycollectorspecsecuritycontext) + + + +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpenTelemetryCollector.spec.securityContext.seccompProfile +[↩ Parent](#opentelemetrycollectorspecsecuritycontext) + + + +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+
false
+ + +### OpenTelemetryCollector.spec.securityContext.windowsOptions +[↩ Parent](#opentelemetrycollectorspecsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator +[↩ Parent](#opentelemetrycollectorspec) + + + +TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
enabledboolean + Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not.
+
false
imagestring + Image indicates the container image to use for the OpenTelemetry TargetAllocator.
+
false
+ + +### OpenTelemetryCollector.spec.tolerations[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
effectstring + Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+
false
keystring + Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+
false
operatorstring + Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
+
false
tolerationSecondsinteger + TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
+
+ Format: int64
+
false
valuestring + Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +PersistentVolumeClaim is a user's request for and claim to a persistent volume + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstring + APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+
false
kindstring + Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+
false
metadataobject + Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
+
false
specobject + Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+
false
statusobject + Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].metadata +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindex) + + + +Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
finalizers[]string +
+
false
labelsmap[string]string +
+
false
namestring +
+
false
namespacestring +
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindex) + + + +Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
accessModes[]string + AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+
false
dataSourceobject + This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+
false
dataSourceRefobject + Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+
false
resourcesobject + Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+
false
selectorobject + A label query over volumes to consider for binding.
+
false
storageClassNamestring + Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+
false
volumeModestring + volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
+
false
volumeNamestring + VolumeName is the binding reference to the PersistentVolume backing this claim.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.dataSource +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) + + + +This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.dataSourceRef +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) + + + +Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.resources +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) + + + +Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.selector +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) + + + +A label query over volumes to consider for binding. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.selector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspecselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].status +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindex) + + + +Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
accessModes[]string + AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+
false
capacitymap[string]int or string + Represents the actual resources of the underlying volume.
+
false
conditions[]object + Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.
+
false
phasestring + Phase represents the current phase of PersistentVolumeClaim.
+
false
+ + +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].status.conditions[index] +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexstatus) + + + +PersistentVolumeClaimCondition contails details about state of pvc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
statusstring +
+
true
typestring + PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
+
true
lastProbeTimestring + Last time we probed the condition.
+
+ Format: date-time
+
false
lastTransitionTimestring + Last time the condition transitioned from one status to another.
+
+ Format: date-time
+
false
messagestring + Human-readable message indicating details about last transition.
+
false
reasonstring + Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized.
+
false
+ + +### OpenTelemetryCollector.spec.volumeMounts[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +VolumeMount describes a mounting of a Volume within a container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mountPathstring + Path within the container at which the volume should be mounted. Must not contain ':'.
+
true
namestring + This must match the Name of a Volume.
+
true
mountPropagationstring + mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
+
false
readOnlyboolean + Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
+
false
subPathstring + Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
+
false
subPathExprstring + Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +Volume represents a named volume in a pod that may be accessed by any container in the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+
true
awsElasticBlockStoreobject + AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+
false
azureDiskobject + AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+
false
azureFileobject + AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+
false
cephfsobject + CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+
false
cinderobject + Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
false
configMapobject + ConfigMap represents a configMap that should populate this volume
+
false
csiobject + CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
+
false
downwardAPIobject + DownwardAPI represents downward API about the pod that should populate this volume
+
false
emptyDirobject + EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+
false
ephemeralobject + Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). + Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. + A pod can use both types of ephemeral volumes and persistent volumes at the same time. + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.
+
false
fcobject + FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+
false
flexVolumeobject + FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
+
false
flockerobject + Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+
false
gcePersistentDiskobject + GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
false
gitRepoobject + GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
+
false
glusterfsobject + Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
+
false
hostPathobject + HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
+
false
iscsiobject + ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
+
false
nfsobject + NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
false
persistentVolumeClaimobject + PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+
false
photonPersistentDiskobject + PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+
false
portworxVolumeobject + PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+
false
projectedobject + Items for all in one resources secrets, configmaps, and downward API
+
false
quobyteobject + Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+
false
rbdobject + RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
+
false
scaleIOobject + ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+
false
secretobject + Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+
false
storageosobject + StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+
false
vsphereVolumeobject + VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].awsElasticBlockStore +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+
true
fsTypestring + Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine
+
false
partitioninteger + The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+
+ Format: int32
+
false
readOnlyboolean + Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].azureDisk +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
diskNamestring + The Name of the data disk in the blob storage
+
true
diskURIstring + The URI the data disk in the blob storage
+
true
cachingModestring + Host Caching mode: None, Read Only, Read Write.
+
false
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
kindstring + Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+
false
readOnlyboolean + Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].azureFile +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secretNamestring + the name of secret that contains Azure Storage Account Name and Key
+
true
shareNamestring + Share Name
+
true
readOnlyboolean + Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].cephfs +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
monitors[]string + Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
true
pathstring + Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+
false
readOnlyboolean + Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
secretFilestring + Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
secretRefobject + Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
userstring + Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].cephfs.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexcephfs) + + + +Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].cinder +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
true
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
false
readOnlyboolean + Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
false
secretRefobject + Optional: points to a secret object containing parameters used to connect to OpenStack.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].cinder.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexcinder) + + + +Optional: points to a secret object containing parameters used to connect to OpenStack. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].configMap +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +ConfigMap represents a configMap that should populate this volume + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
items[]object + If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its keys must be defined
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].configMap.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexconfigmap) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to project.
+
true
pathstring + The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].csi +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
driverstring + Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
+
true
fsTypestring + Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
+
false
nodePublishSecretRefobject + NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
+
false
readOnlyboolean + Specifies a read-only configuration for the volume. Defaults to false (read/write).
+
false
volumeAttributesmap[string]string + VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].csi.nodePublishSecretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexcsi) + + + +NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].downwardAPI +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +DownwardAPI represents downward API about the pod that should populate this volume + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
items[]object + Items is a list of downward API volume file
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].downwardAPI.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexdownwardapi) + + + +DownwardAPIVolumeFile represents information to create the file containing the pod field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+
true
fieldRefobject + Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+
false
modeinteger + Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].downwardAPI.items[index].fieldRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexdownwardapiitemsindex) + + + +Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].downwardAPI.items[index].resourceFieldRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexdownwardapiitemsindex) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].emptyDir +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mediumstring + What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+
false
sizeLimitint or string + Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). + Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. + A pod can use both types of ephemeral volumes and persistent volumes at the same time. + This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeClaimTemplateobject + Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). + An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. + This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. + Required, must not be nil.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeral) + + + +Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). + An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. + This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. + Required, must not be nil. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
specobject + The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.
+
true
metadataobject + May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplate) + + + +The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
accessModes[]string + AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+
false
dataSourceobject + This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+
false
dataSourceRefobject + Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+
false
resourcesobject + Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+
false
selectorobject + A label query over volumes to consider for binding.
+
false
storageClassNamestring + Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+
false
volumeModestring + volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
+
false
volumeNamestring + VolumeName is the binding reference to the PersistentVolume backing this claim.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSource +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) + + + +This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSourceRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) + + + +Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) + + + +Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) + + + +A label query over volumes to consider for binding. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespecselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.metadata +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplate) + + + +May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
finalizers[]string +
+
false
labelsmap[string]string +
+
false
namestring +
+
false
namespacestring +
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].fc +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine
+
false
luninteger + Optional: FC target lun number
+
+ Format: int32
+
false
readOnlyboolean + Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
targetWWNs[]string + Optional: FC target worldwide names (WWNs)
+
false
wwids[]string + Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].flexVolume +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
driverstring + Driver is the name of the driver to use for this volume.
+
true
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+
false
optionsmap[string]string + Optional: Extra command options if any.
+
false
readOnlyboolean + Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
secretRefobject + Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].flexVolume.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexflexvolume) + + + +Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].flocker +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
datasetNamestring + Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated
+
false
datasetUUIDstring + UUID of the dataset. This is unique identifier of a Flocker dataset
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].gcePersistentDisk +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pdNamestring + Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
true
fsTypestring + Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine
+
false
partitioninteger + The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
+ Format: int32
+
false
readOnlyboolean + ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].gitRepo +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
repositorystring + Repository URL
+
true
directorystring + Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
+
false
revisionstring + Commit hash for the specified revision.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].glusterfs +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endpointsstring + EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
true
pathstring + Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
true
readOnlyboolean + ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].hostPath +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+
true
typestring + Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].iscsi +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
iqnstring + Target iSCSI Qualified Name.
+
true
luninteger + iSCSI Target Lun number.
+
+ Format: int32
+
true
targetPortalstring + iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+
true
chapAuthDiscoveryboolean + whether support iSCSI Discovery CHAP authentication
+
false
chapAuthSessionboolean + whether support iSCSI Session CHAP authentication
+
false
fsTypestring + Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine
+
false
initiatorNamestring + Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
+
false
iscsiInterfacestring + iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
+
false
portals[]string + iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+
false
readOnlyboolean + ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
+
false
secretRefobject + CHAP Secret for iSCSI target and initiator authentication
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].iscsi.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexiscsi) + + + +CHAP Secret for iSCSI target and initiator authentication + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].nfs +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
true
serverstring + Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
true
readOnlyboolean + ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].persistentVolumeClaim +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claimNamestring + ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+
true
readOnlyboolean + Will force the ReadOnly setting in VolumeMounts. Default false.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].photonPersistentDisk +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pdIDstring + ID that identifies Photon Controller persistent disk
+
true
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].portworxVolume +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + VolumeID uniquely identifies a Portworx volume
+
true
fsTypestring + FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+
false
readOnlyboolean + Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Items for all in one resources secrets, configmaps, and downward API + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
sources[]object + list of volume projections
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojected) + + + +Projection that may be projected along with other supported volume types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapobject + information about the configMap data to project
+
false
downwardAPIobject + information about the downwardAPI data to project
+
false
secretobject + information about the secret data to project
+
false
serviceAccountTokenobject + information about the serviceAccountToken data to project
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].configMap +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) + + + +information about the configMap data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its keys must be defined
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].configMap.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexconfigmap) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to project.
+
true
pathstring + The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].downwardAPI +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) + + + +information about the downwardAPI data to project + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + Items is a list of DownwardAPIVolume file
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].downwardAPI.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexdownwardapi) + + + +DownwardAPIVolumeFile represents information to create the file containing the pod field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+
true
fieldRefobject + Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+
false
modeinteger + Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].downwardAPI.items[index].fieldRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexdownwardapiitemsindex) + + + +Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].downwardAPI.items[index].resourceFieldRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexdownwardapiitemsindex) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].secret +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) + + + +information about the secret data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].secret.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexsecret) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to project.
+
true
pathstring + The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].serviceAccountToken +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) + + + +information about the serviceAccountToken data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Path is the path relative to the mount point of the file to project the token into.
+
true
audiencestring + Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
+
false
expirationSecondsinteger + ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.
+
+ Format: int64
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].quobyte +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
registrystring + Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
+
true
volumestring + Volume is a string that references an already created Quobyte volume by name.
+
true
groupstring + Group to map volume access to Default is no group
+
false
readOnlyboolean + ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
+
false
tenantstring + Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
+
false
userstring + User to map volume access to Defaults to serivceaccount user
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].rbd +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
imagestring + The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
true
monitors[]string + A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
true
fsTypestring + Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine
+
false
keyringstring + Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
poolstring + The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
readOnlyboolean + ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
secretRefobject + SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
userstring + The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].rbd.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexrbd) + + + +SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].scaleIO +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gatewaystring + The host address of the ScaleIO API Gateway.
+
true
secretRefobject + SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
+
true
systemstring + The name of the storage system as configured in ScaleIO.
+
true
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+
false
protectionDomainstring + The name of the ScaleIO Protection Domain for the configured storage.
+
false
readOnlyboolean + Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
sslEnabledboolean + Flag to enable/disable SSL communication with Gateway, default false
+
false
storageModestring + Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
+
false
storagePoolstring + The ScaleIO Storage Pool associated with the protection domain.
+
false
volumeNamestring + The name of a volume already created in the ScaleIO system that is associated with this volume source.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].scaleIO.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexscaleio) + + + +SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].secret +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
items[]object + If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+
false
optionalboolean + Specify whether the Secret or its keys must be defined
+
false
secretNamestring + Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].secret.items[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexsecret) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to project.
+
true
pathstring + The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].storageos +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
readOnlyboolean + Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
secretRefobject + SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
+
false
volumeNamestring + VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
+
false
volumeNamespacestring + VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].storageos.secretRef +[↩ Parent](#opentelemetrycollectorspecvolumesindexstorageos) + + + +SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].vsphereVolume +[↩ Parent](#opentelemetrycollectorspecvolumesindex) + + + +VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumePathstring + Path that identifies vSphere volume vmdk
+
true
fsTypestring + Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
storagePolicyIDstring + Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+
false
storagePolicyNamestring + Storage Policy Based Management (SPBM) profile name.
+
false
+ + +### OpenTelemetryCollector.status +[↩ Parent](#opentelemetrycollector) + + + +OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
messages[]string + Messages about actions performed by the operator on this resource.
+
false
replicasinteger + Replicas is currently not being set and might be removed in the next version.
+
+ Format: int32
+
false
versionstring + Version of the managed OpenTelemetry Collector (operand)
+
false
\ No newline at end of file diff --git a/docs/otelcol_cr_spec.md b/docs/otelcol_cr_spec.md deleted file mode 100644 index d132022e6..000000000 --- a/docs/otelcol_cr_spec.md +++ /dev/null @@ -1,81 +0,0 @@ -# OpenTelemetryCollector Custom Resource Specification - -The below `OpenTelemetryCollector` custom resource contains all the specification that can be configured. - -```yaml -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: example-collector -spec: - // +optional Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) - mode: "" - - // +required Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] - - // +optional Args is the set of arguments to pass to the OpenTelemetry Collector binary - args: - metrics-level: detailed - - // +optional Replicas is the number of pod instances for the underlying OpenTelemetry Collector - replicas: 1 - - // +optional Image indicates the container image to use for the OpenTelemetry Collector. - image: "" - - // +optional ImagePullPolicy indicates what image pull policy to be used to retrieve the container image to use for the OpenTelemetry Collector. - imagePullPolicy: "" - - // +optional ServiceAccount indicates the name of an existing service account to use with this instance. - serviceAccount: "" - - // +optional VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. - volumeClaimTemplates: [] - - // +optional VolumeMounts represents the mount points to use in the underlying collector deployment(s) - volumeMounts: [] - - // +optional Volumes represents which volumes to use in the underlying collector deployment(s). - volumes: [] - - // +optional Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator - // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be - // used to open aditional ports that can't be inferred by the operator, like for custom receivers. - ports: [] - - // +optional ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be - // consumed in the config file for the Collector. - env: [] - - // +optional List of sources to populate environment variables on the OpenTelemetry Collector's Pods. - // These can then in certain cases be consumed in the config file for the Collector. - envFrom: [] - - // +optional Resources to set on the OpenTelemetry Collector pods. - resources: {} - - // +optional SecurityContext will be set as the container security context. - securityContext: {} - - // +optional HostNetwork indicates if the pod should run in the host networking namespace. - hostNetwork: false - - // +optional Toleration to schedule OpenTelemetry Collector pods. - // This is only relevant to daemonsets, statefulsets and deployments - tolerations: [] -``` diff --git a/docs/otelinst_cr_spec.md b/docs/otelinst_cr_spec.md deleted file mode 100644 index 00fa2c07c..000000000 --- a/docs/otelinst_cr_spec.md +++ /dev/null @@ -1,20 +0,0 @@ -# Instrumentation Custom Resource Specification - -The below `Instrumentation` custom resource contains all the specification that can be configured. - -```yaml -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: example-instrumentation -spec: - // +optional Exporter defines exporter configuration. - exporter: - // +optional Endpoint is address of the collector with OTLP endpoint. - endpoint: - - // +optional Java defines configuration for java auto-instrumentation. - java: - // +optional Image is a container image with javaagent JAR. - image: -``` From 57abb4df547ca6346bde7bd0cc8c1fe02e4c016e Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 11 Nov 2021 14:02:27 +0100 Subject: [PATCH 0329/1234] Fix project structure to align with kubebuilder scaffolding (#533) Signed-off-by: Pavol Loffay --- PROJECT | 20 +- .../v1alpha1/groupversion_info.go | 34 ---- .../v1alpha1/zz_generated.deepcopy.go | 189 ------------------ .../v1alpha1/groupversion_info.go | 0 .../v1alpha1/instrumentation_types.go | 8 +- apis/{collector => }/v1alpha1/mode.go | 0 .../v1alpha1/opentelemetrycollector_types.go | 0 .../opentelemetrycollector_webhook.go | 0 .../v1alpha1/propagators.go | 0 .../v1alpha1/samplers.go | 0 .../v1alpha1/zz_generated.deepcopy.go | 165 +++++++++++++++ ...emetry-operator.clusterserviceversion.yaml | 11 +- .../opentelemetry.io_instrumentations.yaml | 3 +- .../opentelemetry.io_instrumentations.yaml | 3 +- ...emetry-operator.clusterserviceversion.yaml | 11 + .../opentelemetrycollector_controller.go | 2 +- .../opentelemetrycollector_controller_test.go | 2 +- controllers/suite_test.go | 2 +- docs/api.md | 2 +- .../webhookhandler_suite_test.go | 2 +- .../webhookhandler/webhookhandler_test.go | 2 +- main.go | 8 +- pkg/collector/annotations.go | 2 +- pkg/collector/annotations_test.go | 2 +- pkg/collector/container.go | 2 +- pkg/collector/container_test.go | 2 +- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/labels.go | 2 +- pkg/collector/labels_test.go | 2 +- pkg/collector/reconcile/configmap_test.go | 2 +- pkg/collector/reconcile/deployment_test.go | 2 +- pkg/collector/reconcile/opentelemetry_test.go | 2 +- pkg/collector/reconcile/params.go | 2 +- pkg/collector/reconcile/service.go | 2 +- pkg/collector/reconcile/service_test.go | 2 +- pkg/collector/reconcile/serviceaccount.go | 2 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/collector/serviceaccount.go | 2 +- pkg/collector/serviceaccount_test.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 2 +- pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/suite_test.go | 2 +- pkg/collector/upgrade/upgrade.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 2 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 2 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_24_0_test.go | 2 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_31_0_test.go | 2 +- pkg/collector/upgrade/v0_36_0.go | 2 +- pkg/collector/upgrade/v0_36_0_test.go | 2 +- pkg/collector/upgrade/v0_38_0.go | 2 +- pkg/collector/upgrade/v0_38_0_test.go | 2 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 2 +- pkg/collector/upgrade/versions.go | 2 +- pkg/collector/volume.go | 2 +- pkg/collector/volume_test.go | 2 +- pkg/collector/volumeclaim.go | 2 +- pkg/collector/volumeclaim_test.go | 2 +- pkg/instrumentation/javaagent.go | 2 +- pkg/instrumentation/javaagent_test.go | 2 +- pkg/instrumentation/nodejs.go | 2 +- pkg/instrumentation/nodejs_test.go | 2 +- pkg/instrumentation/podmutator.go | 2 +- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- pkg/naming/main.go | 2 +- pkg/sidecar/pod.go | 2 +- pkg/sidecar/pod_test.go | 2 +- pkg/sidecar/podmutator.go | 2 +- pkg/targetallocator/container.go | 2 +- pkg/targetallocator/container_test.go | 2 +- pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/deployment_test.go | 2 +- pkg/targetallocator/labels.go | 2 +- pkg/targetallocator/labels_test.go | 2 +- pkg/targetallocator/volume.go | 2 +- pkg/targetallocator/volume_test.go | 2 +- 88 files changed, 277 insertions(+), 319 deletions(-) delete mode 100644 apis/instrumentation/v1alpha1/groupversion_info.go delete mode 100644 apis/instrumentation/v1alpha1/zz_generated.deepcopy.go rename apis/{collector => }/v1alpha1/groupversion_info.go (100%) rename apis/{instrumentation => }/v1alpha1/instrumentation_types.go (97%) rename apis/{collector => }/v1alpha1/mode.go (100%) rename apis/{collector => }/v1alpha1/opentelemetrycollector_types.go (100%) rename apis/{collector => }/v1alpha1/opentelemetrycollector_webhook.go (100%) rename apis/{instrumentation => }/v1alpha1/propagators.go (100%) rename apis/{instrumentation => }/v1alpha1/samplers.go (100%) rename apis/{collector => }/v1alpha1/zz_generated.deepcopy.go (56%) diff --git a/PROJECT b/PROJECT index 1a22ed02c..a2bba54d7 100644 --- a/PROJECT +++ b/PROJECT @@ -1,23 +1,29 @@ domain: opentelemetry.io layout: -- go.kubebuilder.io/v2 +- go.kubebuilder.io/v3 multigroup: true plugins: manifests.sdk.operatorframework.io/v2: {} projectName: opentelemetry-operator repo: github.com/open-telemetry/opentelemetry-operator resources: -- controller: true - group: collector +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: opentelemetry.io kind: OpenTelemetryCollector - path: github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1 + path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 version: v1alpha1 + webhooks: + defaulting: true + validation: true + webhookVersion: v1 - api: - crdVersion: v1beta1 + crdVersion: v1 namespaced: true domain: opentelemetry.io - group: instrumentation kind: Instrumentation - path: github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1 + path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 version: v1alpha1 version: "3" diff --git a/apis/instrumentation/v1alpha1/groupversion_info.go b/apis/instrumentation/v1alpha1/groupversion_info.go deleted file mode 100644 index ef6601ea7..000000000 --- a/apis/instrumentation/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group. -// +kubebuilder:object:generate=true -// +groupName=opentelemetry.io -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go b/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 03c55c9ec..000000000 --- a/apis/instrumentation/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,189 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Exporter) DeepCopyInto(out *Exporter) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter. -func (in *Exporter) DeepCopy() *Exporter { - if in == nil { - return nil - } - out := new(Exporter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation. -func (in *Instrumentation) DeepCopy() *Instrumentation { - if in == nil { - return nil - } - out := new(Instrumentation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Instrumentation) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Instrumentation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList. -func (in *InstrumentationList) DeepCopy() *InstrumentationList { - if in == nil { - return nil - } - out := new(InstrumentationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InstrumentationList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { - *out = *in - out.Exporter = in.Exporter - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Propagators != nil { - in, out := &in.Propagators, &out.Propagators - *out = make([]Propagator, len(*in)) - copy(*out, *in) - } - out.Sampler = in.Sampler - out.Java = in.Java - out.NodeJS = in.NodeJS -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. -func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec { - if in == nil { - return nil - } - out := new(InstrumentationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus. -func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { - if in == nil { - return nil - } - out := new(InstrumentationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JavaSpec) DeepCopyInto(out *JavaSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JavaSpec. -func (in *JavaSpec) DeepCopy() *JavaSpec { - if in == nil { - return nil - } - out := new(JavaSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeJSSpec) DeepCopyInto(out *NodeJSSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJSSpec. -func (in *NodeJSSpec) DeepCopy() *NodeJSSpec { - if in == nil { - return nil - } - out := new(NodeJSSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sampler) DeepCopyInto(out *Sampler) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler. -func (in *Sampler) DeepCopy() *Sampler { - if in == nil { - return nil - } - out := new(Sampler) - in.DeepCopyInto(out) - return out -} diff --git a/apis/collector/v1alpha1/groupversion_info.go b/apis/v1alpha1/groupversion_info.go similarity index 100% rename from apis/collector/v1alpha1/groupversion_info.go rename to apis/v1alpha1/groupversion_info.go diff --git a/apis/instrumentation/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go similarity index 97% rename from apis/instrumentation/v1alpha1/instrumentation_types.go rename to apis/v1alpha1/instrumentation_types.go index c38ee1de4..f65639f74 100644 --- a/apis/instrumentation/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -100,13 +100,11 @@ type InstrumentationStatus struct { // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" // Instrumentation is the spec for OpenTelemetry instrumentation. -// nolint: maligned type Instrumentation struct { - metav1.TypeMeta `json:",inline"` + Status InstrumentationStatus `json:"status,omitempty"` metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec InstrumentationSpec `json:"spec,omitempty"` - Status InstrumentationStatus `json:"status,omitempty"` + Spec InstrumentationSpec `json:"spec,omitempty"` + metav1.TypeMeta `json:",inline"` } // +kubebuilder:object:root=true diff --git a/apis/collector/v1alpha1/mode.go b/apis/v1alpha1/mode.go similarity index 100% rename from apis/collector/v1alpha1/mode.go rename to apis/v1alpha1/mode.go diff --git a/apis/collector/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go similarity index 100% rename from apis/collector/v1alpha1/opentelemetrycollector_types.go rename to apis/v1alpha1/opentelemetrycollector_types.go diff --git a/apis/collector/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go similarity index 100% rename from apis/collector/v1alpha1/opentelemetrycollector_webhook.go rename to apis/v1alpha1/opentelemetrycollector_webhook.go diff --git a/apis/instrumentation/v1alpha1/propagators.go b/apis/v1alpha1/propagators.go similarity index 100% rename from apis/instrumentation/v1alpha1/propagators.go rename to apis/v1alpha1/propagators.go diff --git a/apis/instrumentation/v1alpha1/samplers.go b/apis/v1alpha1/samplers.go similarity index 100% rename from apis/instrumentation/v1alpha1/samplers.go rename to apis/v1alpha1/samplers.go diff --git a/apis/collector/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go similarity index 56% rename from apis/collector/v1alpha1/zz_generated.deepcopy.go rename to apis/v1alpha1/zz_generated.deepcopy.go index c3fe7b0b3..bf1c6ff83 100644 --- a/apis/collector/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -24,6 +24,156 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Exporter) DeepCopyInto(out *Exporter) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter. +func (in *Exporter) DeepCopy() *Exporter { + if in == nil { + return nil + } + out := new(Exporter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { + *out = *in + out.Status = in.Status + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.TypeMeta = in.TypeMeta +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation. +func (in *Instrumentation) DeepCopy() *Instrumentation { + if in == nil { + return nil + } + out := new(Instrumentation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Instrumentation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Instrumentation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList. +func (in *InstrumentationList) DeepCopy() *InstrumentationList { + if in == nil { + return nil + } + out := new(InstrumentationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InstrumentationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { + *out = *in + out.Exporter = in.Exporter + if in.ResourceAttributes != nil { + in, out := &in.ResourceAttributes, &out.ResourceAttributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Propagators != nil { + in, out := &in.Propagators, &out.Propagators + *out = make([]Propagator, len(*in)) + copy(*out, *in) + } + out.Sampler = in.Sampler + out.Java = in.Java + out.NodeJS = in.NodeJS +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. +func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec { + if in == nil { + return nil + } + out := new(InstrumentationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus. +func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { + if in == nil { + return nil + } + out := new(InstrumentationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JavaSpec) DeepCopyInto(out *JavaSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JavaSpec. +func (in *JavaSpec) DeepCopy() *JavaSpec { + if in == nil { + return nil + } + out := new(JavaSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeJSSpec) DeepCopyInto(out *NodeJSSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJSSpec. +func (in *NodeJSSpec) DeepCopy() *NodeJSSpec { + if in == nil { + return nil + } + out := new(NodeJSSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { *out = *in @@ -207,3 +357,18 @@ func (in *OpenTelemetryTargetAllocatorSpec) DeepCopy() *OpenTelemetryTargetAlloc in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sampler) DeepCopyInto(out *Sampler) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler. +func (in *Sampler) DeepCopy() *Sampler { + if in == nil { + return nil + } + out := new(Sampler) + in.DeepCopyInto(out) + return out +} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 137ef5439..f27ac070a 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -34,7 +34,7 @@ metadata: createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.13.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 + operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community name: opentelemetry-operator.v0.38.0 @@ -43,10 +43,15 @@ spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - kind: Instrumentation + - description: Instrumentation is the spec for OpenTelemetry instrumentation. + displayName: OpenTelemetry Instrumentation + kind: Instrumentation name: instrumentations.opentelemetry.io version: v1alpha1 - - kind: OpenTelemetryCollector + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. + displayName: OpenTelemetry Collector + kind: OpenTelemetryCollector name: opentelemetrycollectors.opentelemetry.io version: v1alpha1 description: |- diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 56417bd77..29b275798 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -24,8 +24,7 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: 'Instrumentation is the spec for OpenTelemetry instrumentation. - nolint: maligned' + description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index c3cbe5bf7..a1237cf1b 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -26,8 +26,7 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: 'Instrumentation is the spec for OpenTelemetry instrumentation. - nolint: maligned' + description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 5034fc39e..8b906bc46 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -25,6 +25,17 @@ spec: kind: OpenTelemetryCollector name: opentelemetrycollectors.core.opentelemetry.io version: v1alpha1 + - description: Instrumentation is the spec for OpenTelemetry instrumentation. + displayName: OpenTelemetry Instrumentation + kind: Instrumentation + name: instrumentations.opentelemetry.io + version: v1alpha1 + - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. + displayName: OpenTelemetry Collector + kind: OpenTelemetryCollector + name: opentelemetrycollectors.opentelemetry.io + version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 9c54df2ae..5beb60f8f 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -28,7 +28,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index c61aa3712..981449f7e 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 623a95987..a07dc75b9 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/docs/api.md b/docs/api.md index 4c95bf16c..261b8abb2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -23,7 +23,7 @@ Resource Types: -Instrumentation is the spec for OpenTelemetry instrumentation. nolint: maligned +Instrumentation is the spec for OpenTelemetry instrumentation. diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go index bf8cc6c64..a6fffe952 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index 81310b8f6..211bba22b 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/main.go b/main.go index eeb8cc6ae..94a12b677 100644 --- a/main.go +++ b/main.go @@ -33,8 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" - otelcolv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" - otelinstv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -54,8 +53,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(otelcolv1alpha1.AddToScheme(scheme)) - utilruntime.Must(otelinstv1alpha1.AddToScheme(scheme)) + utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } @@ -171,7 +169,7 @@ func main() { } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&otelcolv1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&otelv1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") os.Exit(1) } diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index 311e0ae38..ada126c79 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -18,7 +18,7 @@ import ( "crypto/sha256" "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // Annotations return the annotations for OpenTelemetryCollector pod. diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index f49ad3a85..a89724fd7 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestDefaultAnnotations(t *testing.T) { diff --git a/pkg/collector/container.go b/pkg/collector/container.go index adcf1a48f..c97f8db54 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 92b1555d6..76dd1c827 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index aad7a6ec2..d84a3cf86 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 3d895942c..60ec91a75 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 41d6ce4c3..64b688a01 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 392f9023d..d89d39c4e 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 7dd03bb55..7f4867a3f 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -17,7 +17,7 @@ package collector import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index f373c9113..38585950d 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 0bd73489d..e0ebac828 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -26,7 +26,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index ff95ac8b6..aa955af3a 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -24,7 +24,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go index 51c9911eb..59f5d7eba 100644 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestSelf(t *testing.T) { diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index ac346f246..c38c167ab 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -20,7 +20,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 276e906a6..2143e77df 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 354a6b99e..4bfafee6f 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 80c6222b2..7d5cfefe9 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index d5f274d74..ba7c2c0dd 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -36,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index b896abb18..fa1efea86 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -18,7 +18,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/serviceaccount_test.go b/pkg/collector/serviceaccount_test.go index 3d34d4468..33b82f172 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/pkg/collector/serviceaccount_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 189a6d1b3..8b02501c6 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index cbb07e063..eba62de74 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index b5e373816..1061bb046 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) //nolint unused diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index 5d6d9877b..b7fdb25b3 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" // +kubebuilder:scaffold:imports ) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 16d4ccb2e..a48cf29cd 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -24,7 +24,7 @@ import ( "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 0ea0f627d..ddf4fc2d4 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 7a1ed88ed..ca738c813 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 6fb4ffe9d..0ca4abc94 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index aa6a93358..6f53420ed 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index 9191e1c71..082a8084e 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 899315482..2cfba940a 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 88f3b7b4b..db314e8dc 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index 12e80ff93..651512bfc 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index d7823f7b6..5ae98356d 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index dfcb995bd..0d531c98f 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index f0321056d..abc90a1d5 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index 52c4bb740..b17f47141 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index bd7d68d9c..5c44c15f6 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -23,7 +23,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index 46bc103fe..f85db1d20 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 27d21b097..576a24079 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 5548c0487..7f50fded0 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 74b76dde3..7b5537f7a 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -18,7 +18,7 @@ import ( "github.com/Masterminds/semver/v3" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index 465508351..b6fb467fa 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -18,7 +18,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/collector/volume_test.go b/pkg/collector/volume_test.go index 3602aea3d..44ae84395 100644 --- a/pkg/collector/volume_test.go +++ b/pkg/collector/volume_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index 94b50440c..b35d830b0 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -20,7 +20,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index 522fa67fc..360ba906c 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index f2af206ae..706599a0c 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 5093e05cc..938746a1a 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestInjectJavaagent(t *testing.T) { diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 86a2cc20c..900da584a 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 37722ae32..5882251af 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestInjectNodeJSSDK(t *testing.T) { diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 8d8be131b..8c76d8ae7 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" ) diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 95857a237..d23a05877 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) var k8sClient client.Client diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 1b46fd350..9b36203c3 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -23,7 +23,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 1b8cf98fc..a41a96b9e 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/instrumentation/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestSDKInjection(t *testing.T) { diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 19c58c623..380bc53d5 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -18,7 +18,7 @@ package naming import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index b5f3530f0..475b5828a 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 73482ea4e..a0e36e979 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -22,7 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 01ae0d39a..e951dd6d1 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" ) diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index 0c73f675f..202adbae1 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 1478b554c..359a799d2 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 771edac4a..6a68e33bc 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index ea8d1c823..46b232262 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index 1a2f98672..96720215f 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -17,7 +17,7 @@ package targetallocator import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go index 54cccffad..abb56d35c 100644 --- a/pkg/targetallocator/labels_test.go +++ b/pkg/targetallocator/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestLabelsCommonSet(t *testing.T) { diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go index f5d7c8096..7e1b6d1e0 100644 --- a/pkg/targetallocator/volume.go +++ b/pkg/targetallocator/volume.go @@ -17,7 +17,7 @@ package targetallocator import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go index 0192fd762..aeaef7c92 100644 --- a/pkg/targetallocator/volume_test.go +++ b/pkg/targetallocator/volume_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/apis/collector/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) From 9d09b22561951b9e862b5aae2a8c9c98b3c13925 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Fri, 12 Nov 2021 19:16:57 +0900 Subject: [PATCH 0330/1234] Create Docker image for Python auto-instrumentation. (#524) --- .../publish-autoinstrumentation-python.yaml | 44 +++++++++++++++++++ autoinstrumentation/python/Dockerfile | 11 +++++ autoinstrumentation/python/requirements.txt | 43 ++++++++++++++++++ versions.txt | 6 ++- 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-autoinstrumentation-python.yaml create mode 100644 autoinstrumentation/python/Dockerfile create mode 100644 autoinstrumentation/python/requirements.txt diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml new file mode 100644 index 000000000..85efd2034 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -0,0 +1,44 @@ +name: "Publish Python Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/python/**' + - '.github/workflows/publish-autoinstrumentation-python.yaml' + branches: + - main + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2.3.5 + + - name: Read version + run: echo VERSION=$(head -n 1 autoinstrumentation/python/requirements.txt | cut -d '=' -f3) >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3.6.0 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v1.10.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2.7.0 + with: + context: autoinstrumentation/python + push: true + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile new file mode 100644 index 000000000..19c5217f7 --- /dev/null +++ b/autoinstrumentation/python/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.10-alpine AS build + +WORKDIR /operator-build + +ADD requirements.txt . + +RUN mkdir workspace && pip install --target workspace -r requirements.txt + +FROM busybox + +COPY --from=build /operator-build/workspace /autoinstrumentation diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt new file mode 100644 index 000000000..04eabf7b2 --- /dev/null +++ b/autoinstrumentation/python/requirements.txt @@ -0,0 +1,43 @@ +opentelemetry-distro==0.25b2 +# We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for +# injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. +opentelemetry-exporter-otlp-proto-http==1.6.2 + +opentelemetry-instrumentation==0.25b2 + +# Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation +# except for aws-lambda +opentelemetry-instrumentation-aiohttp-client==0.25b2 +opentelemetry-instrumentation-aiopg==0.25b2 +opentelemetry-instrumentation-asgi==0.25b2 +opentelemetry-instrumentation-asyncpg==0.25b2 +opentelemetry-instrumentation-boto==0.25b2 +opentelemetry-instrumentation-botocore==0.25b2 +opentelemetry-instrumentation-celery==0.25b2 +opentelemetry-instrumentation-dbapi==0.25b2 +opentelemetry-instrumentation-django==0.25b2 +opentelemetry-instrumentation-elasticsearch==0.25b2 +opentelemetry-instrumentation-falcon==0.25b2 +opentelemetry-instrumentation-fastapi==0.25b2 +opentelemetry-instrumentation-flask==0.25b2 +opentelemetry-instrumentation-grpc==0.25b2 +opentelemetry-instrumentation-httpx==0.25b2 +opentelemetry-instrumentation-jinja2==0.25b2 +opentelemetry-instrumentation-logging==0.25b2 +opentelemetry-instrumentation-mysql==0.25b2 +opentelemetry-instrumentation-pika==0.25b2 +opentelemetry-instrumentation-psycopg2==0.25b2 +opentelemetry-instrumentation-pymemcache==0.25b2 +opentelemetry-instrumentation-pymongo==0.25b2 +opentelemetry-instrumentation-pymysql==0.25b2 +opentelemetry-instrumentation-pyramid==0.25b2 +opentelemetry-instrumentation-redis==0.25b2 +opentelemetry-instrumentation-requests==0.25b2 +opentelemetry-instrumentation-sklearn==0.25b2 +opentelemetry-instrumentation-sqlalchemy==0.25b2 +opentelemetry-instrumentation-sqlite3==0.25b2 +opentelemetry-instrumentation-starlette==0.25b2 +opentelemetry-instrumentation-tornado==0.25b2 +opentelemetry-instrumentation-urllib==0.25b2 +opentelemetry-instrumentation-urllib3==0.25b2 +opentelemetry-instrumentation-wsgi==0.25b2 diff --git a/versions.txt b/versions.txt index 3da233d34..ac6145bd5 100644 --- a/versions.txt +++ b/versions.txt @@ -16,4 +16,8 @@ autoinstrumentation-java=1.7.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.26.0 \ No newline at end of file +autoinstrumentation-nodejs=0.26.0 + +# Represents the current release of Python instrumentation. +# Should match value in autoinstrumentation/python/requirements.txt +autoinstrumentation-python=0.25b2 From cf2e7e1063b9c16176e2ab86ed18e44c28cc2fe7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 12 Nov 2021 11:32:20 +0100 Subject: [PATCH 0331/1234] Use operator image from GHCR (#536) Signed-off-by: Pavol Loffay --- .github/workflows/release.yaml | 2 +- Makefile | 6 +++--- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 85002cca8..b5e01fe85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: operator-sdk-version: v1.13.1 - name: "generate release resources" - run: make release-artifacts IMG_PREFIX="quay.io/opentelemetry" + run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator/" - name: "create the release in GitHub" env: diff --git a/Makefile b/Makefile index cbe7c3723..b69d870c7 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep a LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" # Image URL to use all building/pushing image targets -IMG_PREFIX ?= quay.io/${USER} +IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator IMG_REPO ?= opentelemetry-operator IMG ?= ${IMG_PREFIX}/${IMG_REPO}:$(addprefix v,${VERSION}) BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} @@ -49,7 +49,7 @@ KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml CERTMANAGER_VERSION ?= 1.6.1 ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) -ensure-generate-is-noop: USER=opentelemetry +ensure-generate-is-noop: USER=open-telemetry ensure-generate-is-noop: set-image-controller generate bundle @# on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check @git restore config/manager/kustomization.yaml @@ -258,4 +258,4 @@ ifeq (, $(shell which crdoc)) API_REF_GEN=$(GOBIN)/crdoc else API_REF_GEN=$(shell which crdoc) -endif \ No newline at end of file +endif diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index f27ac070a..57a589be7 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -232,7 +232,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: quay.io/opentelemetry/opentelemetry-operator:v0.38.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.38.0 name: manager ports: - containerPort: 9443 From 07cbab2609f2a4bd546bc27c604882a23a938c3f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 15 Nov 2021 17:00:29 +0100 Subject: [PATCH 0332/1234] Update contributing guide (#537) * Update contributing guide Signed-off-by: Pavol Loffay --- CONTRIBUTING.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b8d09649..c1570d184 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,8 +23,14 @@ gh pr create ### Pre-requisites * Install [Go](https://golang.org/doc/install). * Install [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/). +* Install [Operator SDK](https://sdk.operatorframework.io/docs/installation/). * Have a Kubernetes cluster ready for development. We recommend `minikube` or `kind`. +### Adding new components - webhook, API + +The repository structure MUST be compliant with `operator-sdk` scaffolding, which uses `kubebuilder` behind the scenes. This is to ensure a valid bundle generation and it makes it easy to maintain the project and add new components. + +Refer to the [Operator SDK documentation](https://sdk.operatorframework.io/docs/building-operators/golang/) how to generate new APIs, Webhook and other parts of the project. ### Local run @@ -40,41 +46,39 @@ When running `make run`, the webhooks aren't effective as it starts the manager 1. configure a proxy between the Kubernetes API server and your host, so that it can contact the webhook in your local machine 1. create the TLS certificates and place them, by default, on `/tmp/k8s-webhook-server/serving-certs/tls.crt`. The Kubernetes API server has also to be configured to trust the CA used to generate those certs. -In general, it's just easier to deploy the manager in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: +In general, it's just easier to deploy the operator in a Kubernetes cluster instead. For that, you'll need the `cert-manager` installed. You can install it by running: ```bash make cert-manager ``` -In pursuit of continuous improvement, a variable named `CERTMANAGER_VERSION` which can be run: +The environment variable `CERTMANAGER_VERSION` can be used to override the cert-manager version: ```bash CERTMANAGER_VERSION=1.60 make cert-manager ``` -By default, it will generate an image following the format `quay.io/${USER}/opentelemetry-operator:${VERSION}`. You can set the following env vars in front of the `make` command to override parts or the entirety of the image: +When deploying the operator into the cluster using `make deploy`, an image in the format `ghcr.io/${USER}/opentelemetry-operator` is generated. If this format isn't suitable, it can be overridden by: -* `IMG_PREFIX`, to override the registry, namespace and image name (`quay.io`) +* `IMG_PREFIX`, to override the registry, namespace and image name * `USER`, to override the namespace * `IMG_REPO`, to override the repository (`opentelemetry-operator`) * `VERSION`, to override only the version part * `IMG`, to override the entire image specification -Ensure the secret [regcred](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) has been created to enable opentelemetry-operator-controller-manager deployment to pull images from your private `quay.io` registry. - ```bash -kubectl create secret docker-registry regcred --docker-server=quay.io --docker-username=${USER} --docker-password=${PASSWORD} -n opentelemetry-operator-system +IMG=docker.io/${USER}/opentelemetry-operator:latest make generate bundle container container-push deploy ``` -Alternatively, you could create your repository with [Public Visibility](https://docs.projectquay.io/use_quay.html#creating-an-image-repository-via-the-ui). +Your operator will be available in the `opentelemetry-operator-system` namespace. -Once it's ready, the following can be used to build and deploy a manager, along with the required webhook configuration: +#### Using a private container registry + +Ensure the secret [regcred](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) has been created to enable opentelemetry-operator-controller-manager deployment to pull images from your private registry. ```bash -make bundle container container-push deploy +kubectl create secret docker-registry regcred --docker-server= --docker-username=${USER} --docker-password=${PASSWORD} -n opentelemetry-operator-system ``` -Your operator will be available in the `opentelemetry-operator-system` namespace. - ## Testing With an existing cluster (such as `minikube`), run: From 85d5b13d9525d6be17d627adb4c1d5d4ece1781f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 15 Nov 2021 17:18:04 +0100 Subject: [PATCH 0333/1234] Fix no propagator to none (#541) Signed-off-by: Pavol Loffay --- apis/v1alpha1/propagators.go | 6 +++--- bundle/manifests/opentelemetry.io_instrumentations.yaml | 2 +- config/crd/bases/opentelemetry.io_instrumentations.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apis/v1alpha1/propagators.go b/apis/v1alpha1/propagators.go index ed759b442..07f005ecb 100644 --- a/apis/v1alpha1/propagators.go +++ b/apis/v1alpha1/propagators.go @@ -16,7 +16,7 @@ package v1alpha1 type ( // Propagator represents the propagation type. - // +kubebuilder:validation:Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;no + // +kubebuilder:validation:Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none Propagator string ) @@ -35,6 +35,6 @@ const ( XRay Propagator = "xray" // OTTrace represents OT Trace. OTTrace Propagator = "ottrace" - // No represents automatically configured propagator. - None Propagator = "no" + // None represents automatically configured propagator. + None Propagator = "none" ) diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 29b275798..4233a322c 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -76,7 +76,7 @@ spec: - jaeger - xray - ottrace - - "no" + - none type: string type: array resourceAttributes: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index a1237cf1b..dbcf99985 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -78,7 +78,7 @@ spec: - jaeger - xray - ottrace - - "no" + - none type: string type: array resourceAttributes: From 3a8fb40be53e9c61be54e5cd42edbb9dfe5b94ac Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 15 Nov 2021 20:15:38 +0100 Subject: [PATCH 0334/1234] Add defaulter for instrumentation kind and set javaagent image (#535) * Add defaulting webhook for instrumentation Signed-off-by: Pavol Loffay --- PROJECT | 3 + apis/v1alpha1/instrumentation_webhook.go | 55 +++++++++++++++++++ apis/v1alpha1/instrumentation_webhook_test.go | 32 +++++++++++ ...emetry-operator.clusterserviceversion.yaml | 21 +++++++ config/webhook/manifests.yaml | 21 +++++++ main.go | 11 +++- pkg/instrumentation/podmutator.go | 25 ++------- pkg/instrumentation/podmutator_test.go | 3 +- .../00-install-instrumentation.yaml | 2 - 9 files changed, 149 insertions(+), 24 deletions(-) create mode 100644 apis/v1alpha1/instrumentation_webhook.go create mode 100644 apis/v1alpha1/instrumentation_webhook_test.go diff --git a/PROJECT b/PROJECT index a2bba54d7..169912880 100644 --- a/PROJECT +++ b/PROJECT @@ -26,4 +26,7 @@ resources: kind: Instrumentation path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 version: v1alpha1 + webhooks: + defaulting: true + webhookVersion: v1 version: "3" diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go new file mode 100644 index 000000000..0db375d49 --- /dev/null +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + ctrl "sigs.k8s.io/controller-runtime" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook" +) + +const ( + AnnotationDefaultAutoInstrumentationJava = "opentelemetry.io/default-auto-instrumentation-java-image" +) + +// log is for logging in this package. +var instrumentationlog = logf.Log.WithName("instrumentation-resource") + +func (r *Instrumentation) SetupWebhookWithManager(mgr ctrl.Manager) error { + return ctrl.NewWebhookManagedBy(mgr). + For(r). + Complete() +} + +//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions={v1,v1beta1} + +var _ webhook.Defaulter = &Instrumentation{} + +// Default implements webhook.Defaulter so a webhook will be registered for the type. +func (r *Instrumentation) Default() { + instrumentationlog.Info("default", "name", r.Name) + if r.Labels == nil { + r.Labels = map[string]string{} + } + if r.Labels["app.kubernetes.io/managed-by"] == "" { + r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + } + + if r.Spec.Java.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationJava]; ok { + r.Spec.Java.Image = val + } + } +} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go new file mode 100644 index 000000000..7bc61b445 --- /dev/null +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestInstrumentationWebhook(t *testing.T) { + inst := &Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{AnnotationDefaultAutoInstrumentationJava: "img:1"}, + }, + } + inst.Default() + assert.Equal(t, "img:1", inst.Spec.Java.Image) +} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 57a589be7..8b47a71b2 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -326,6 +326,27 @@ spec: name: OpenTelemetry Community version: 0.38.0 webhookdefinitions: + - admissionReviewVersions: + - v1 + - v1beta1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Fail + generateName: minstrumentation.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None + targetPort: 9443 + type: MutatingAdmissionWebhook + webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation - admissionReviewVersions: - v1 - v1beta1 diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 93bf5041f..c9b4cacfc 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -6,6 +6,27 @@ metadata: creationTimestamp: null name: mutating-webhook-configuration webhooks: +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /mutate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: minstrumentation.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None - admissionReviewVersions: - v1 - v1beta1 diff --git a/main.go b/main.go index 94a12b677..5d9d5b46b 100644 --- a/main.go +++ b/main.go @@ -23,6 +23,7 @@ import ( "strings" "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" @@ -173,12 +174,20 @@ func main() { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") os.Exit(1) } + if err = (&otelv1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava}, + }, + }).SetupWebhookWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create webhook", "webhook", "Instrumentation") + os.Exit(1) + } mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{ Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), mgr.GetClient(), []webhookhandler.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), - instrumentation.NewMutator(logger, mgr.GetClient(), autoInstrumentationJava), + instrumentation.NewMutator(logger, mgr.GetClient()), }), }) } diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 8c76d8ae7..29e473463 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -34,9 +34,8 @@ var ( ) type instPodMutator struct { - Logger logr.Logger - Client client.Client - autoInstrumentationJava string + Logger logr.Logger + Client client.Client } type languageInstrumentations struct { @@ -46,11 +45,10 @@ type languageInstrumentations struct { var _ webhookhandler.PodMutator = (*instPodMutator)(nil) -func NewMutator(logger logr.Logger, client client.Client, autoInstrumentationJava string) *instPodMutator { +func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { return &instPodMutator{ - Logger: logger, - Client: client, - autoInstrumentationJava: autoInstrumentationJava, + Logger: logger, + Client: client, } } @@ -69,7 +67,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.Java = pm.applyDefaults(inst) + insts.Java = inst if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectNodeJS); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs @@ -123,14 +121,3 @@ func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context return &otelInsts.Items[0], nil } } - -func (pm *instPodMutator) applyDefaults(otelinst *v1alpha1.Instrumentation) *v1alpha1.Instrumentation { - if otelinst == nil { - return nil - } - - if otelinst.Spec.Java.Image == "" { - otelinst.Spec.Java.Image = pm.autoInstrumentationJava - } - return otelinst -} diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index d23a05877..9b6bcaead 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -71,7 +71,7 @@ func TestMain(m *testing.M) { } func TestMutatePod(t *testing.T) { - mutator := NewMutator(logr.Discard(), k8sClient, "defaultimage:latest") + mutator := NewMutator(logr.Discard(), k8sClient) require.NotNil(t, mutator) tests := []struct { @@ -133,7 +133,6 @@ func TestMutatePod(t *testing.T) { InitContainers: []corev1.Container{ { Name: initContainerName, - Image: "defaultimage:latest", Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index df59a6951..6c1347b13 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -11,5 +11,3 @@ spec: sampler: type: parentbased_traceidratio argument: "0.25" - java: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest From a98cb4e31df2a658eea976f62e16ce0553aaa839 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 16 Nov 2021 12:05:41 +0100 Subject: [PATCH 0335/1234] Add validating webhook for Instrumentation kind (#543) Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_types.go | 4 +- apis/v1alpha1/instrumentation_webhook.go | 44 ++++++++++++ apis/v1alpha1/instrumentation_webhook_test.go | 69 ++++++++++++++++++- ...emetry-operator.clusterserviceversion.yaml | 57 ++++++++++++--- config/webhook/manifests.yaml | 41 +++++++++++ 5 files changed, 205 insertions(+), 10 deletions(-) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index f65639f74..2083d0403 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -14,7 +14,9 @@ package v1alpha1 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) // InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. type InstrumentationSpec struct { diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 0db375d49..f80dffc35 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -15,6 +15,10 @@ package v1alpha1 import ( + "fmt" + "strconv" + + "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -53,3 +57,43 @@ func (r *Instrumentation) Default() { } } } + +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions={v1,v1beta1} +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions={v1,v1beta1} + +var _ webhook.Validator = &Instrumentation{} + +// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. +func (in *Instrumentation) ValidateCreate() error { + opentelemetrycollectorlog.Info("validate create", "name", in.Name) + return in.validate() +} + +// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. +func (in *Instrumentation) ValidateUpdate(old runtime.Object) error { + opentelemetrycollectorlog.Info("validate update", "name", in.Name) + return in.validate() +} + +// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. +func (in *Instrumentation) ValidateDelete() error { + opentelemetrycollectorlog.Info("validate delete", "name", in.Name) + return nil +} + +func (in *Instrumentation) validate() error { + switch in.Spec.Sampler.Type { + case TraceIDRatio, ParentBasedTraceIDRatio: + if in.Spec.Sampler.Argument != "" { + rate, err := strconv.ParseFloat(in.Spec.Sampler.Argument, 64) + if err != nil { + return fmt.Errorf("spec.sampler.argument is not a number: %s", in.Spec.Sampler.Argument) + } + if rate < 0 || rate > 1 { + return fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", in.Spec.Sampler.Argument) + } + } + case AlwaysOn, AlwaysOff, JaegerRemote, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: + } + return nil +} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 7bc61b445..1f60652a7 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func TestInstrumentationWebhook(t *testing.T) { +func TestInstrumentationDefaultingWebhook(t *testing.T) { inst := &Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{AnnotationDefaultAutoInstrumentationJava: "img:1"}, @@ -30,3 +30,70 @@ func TestInstrumentationWebhook(t *testing.T) { inst.Default() assert.Equal(t, "img:1", inst.Spec.Java.Image) } + +func TestInstrumentationValidatingWebhook(t *testing.T) { + tests := []struct { + name string + inst Instrumentation + err string + }{ + { + name: "argument is not a number", + err: "spec.sampler.argument is not a number", + inst: Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{ + Type: ParentBasedTraceIDRatio, + Argument: "abc", + }, + }, + }, + }, + { + name: "argument is a wrong number", + err: "spec.sampler.argument should be in rage [0..1]", + inst: Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{ + Type: ParentBasedTraceIDRatio, + Argument: "1.99", + }, + }, + }, + }, + { + name: "argument is a number", + inst: Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{ + Type: ParentBasedTraceIDRatio, + Argument: "0.99", + }, + }, + }, + }, + { + name: "argument is missing", + inst: Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{ + Type: ParentBasedTraceIDRatio, + }, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + if test.err == "" { + assert.Nil(t, test.inst.ValidateCreate()) + assert.Nil(t, test.inst.ValidateUpdate(nil)) + } else { + err := test.inst.ValidateCreate() + assert.Contains(t, err.Error(), test.err) + err = test.inst.ValidateUpdate(nil) + assert.Contains(t, err.Error(), test.err) + } + }) + } +} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8b47a71b2..b765fbb75 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -326,6 +326,27 @@ spec: name: OpenTelemetry Community version: 0.38.0 webhookdefinitions: + - admissionReviewVersions: + - v1 + - v1beta1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Ignore + generateName: mpod.kb.io + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods + sideEffects: None + targetPort: 9443 + type: MutatingAdmissionWebhook + webhookPath: /mutate-v1-pod - admissionReviewVersions: - v1 - v1beta1 @@ -374,21 +395,20 @@ spec: containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Ignore - generateName: mpod.kb.io + generateName: vinstrumentationdelete.kb.io rules: - apiGroups: - - "" + - opentelemetry.io apiVersions: - - v1 + - v1alpha1 operations: - - CREATE - - UPDATE + - DELETE resources: - - pods + - instrumentations sideEffects: None targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-v1-pod + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation - admissionReviewVersions: - v1 - v1beta1 @@ -430,3 +450,24 @@ spec: targetPort: 9443 type: ValidatingAdmissionWebhook webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + - admissionReviewVersions: + - v1 + - v1beta1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Fail + generateName: vinstrumentationcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None + targetPort: 9443 + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index c9b4cacfc..2072a4fbd 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -77,6 +77,47 @@ metadata: creationTimestamp: null name: validating-webhook-configuration webhooks: +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: vinstrumentationcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Ignore + name: vinstrumentationdelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - instrumentations + sideEffects: None - admissionReviewVersions: - v1 - v1beta1 From 0bb2b52d146d72a62ed3f96479fbd1dee91f96ee Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 16 Nov 2021 19:07:34 +0100 Subject: [PATCH 0336/1234] Publish Java auto-instrumentation 1.7.2 (#545) * Upgrade auto-instrumentation java version Signed-off-by: Pavol Loffay --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 9dbb0c005..f8a696c8d 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.7.0 \ No newline at end of file +1.7.2 From 40f746621e6516afb7199c44b3a78425f284612a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 16 Nov 2021 19:10:32 +0100 Subject: [PATCH 0337/1234] Upgrade python auto-instrumentation to 0.26b1 (#547) Signed-off-by: Pavol Loffay --- autoinstrumentation/python/requirements.txt | 74 ++++++++++----------- versions.txt | 2 +- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 04eabf7b2..cf3dab98f 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,43 +1,43 @@ -opentelemetry-distro==0.25b2 +opentelemetry-distro==0.26b1 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.6.2 +opentelemetry-exporter-otlp-proto-http==1.7.1 -opentelemetry-instrumentation==0.25b2 +opentelemetry-instrumentation==0.26b1 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.25b2 -opentelemetry-instrumentation-aiopg==0.25b2 -opentelemetry-instrumentation-asgi==0.25b2 -opentelemetry-instrumentation-asyncpg==0.25b2 -opentelemetry-instrumentation-boto==0.25b2 -opentelemetry-instrumentation-botocore==0.25b2 -opentelemetry-instrumentation-celery==0.25b2 -opentelemetry-instrumentation-dbapi==0.25b2 -opentelemetry-instrumentation-django==0.25b2 -opentelemetry-instrumentation-elasticsearch==0.25b2 -opentelemetry-instrumentation-falcon==0.25b2 -opentelemetry-instrumentation-fastapi==0.25b2 -opentelemetry-instrumentation-flask==0.25b2 -opentelemetry-instrumentation-grpc==0.25b2 -opentelemetry-instrumentation-httpx==0.25b2 -opentelemetry-instrumentation-jinja2==0.25b2 -opentelemetry-instrumentation-logging==0.25b2 -opentelemetry-instrumentation-mysql==0.25b2 -opentelemetry-instrumentation-pika==0.25b2 -opentelemetry-instrumentation-psycopg2==0.25b2 -opentelemetry-instrumentation-pymemcache==0.25b2 -opentelemetry-instrumentation-pymongo==0.25b2 -opentelemetry-instrumentation-pymysql==0.25b2 -opentelemetry-instrumentation-pyramid==0.25b2 -opentelemetry-instrumentation-redis==0.25b2 -opentelemetry-instrumentation-requests==0.25b2 -opentelemetry-instrumentation-sklearn==0.25b2 -opentelemetry-instrumentation-sqlalchemy==0.25b2 -opentelemetry-instrumentation-sqlite3==0.25b2 -opentelemetry-instrumentation-starlette==0.25b2 -opentelemetry-instrumentation-tornado==0.25b2 -opentelemetry-instrumentation-urllib==0.25b2 -opentelemetry-instrumentation-urllib3==0.25b2 -opentelemetry-instrumentation-wsgi==0.25b2 +opentelemetry-instrumentation-aiohttp-client==0.26b1 +opentelemetry-instrumentation-aiopg==0.26b1 +opentelemetry-instrumentation-asgi==0.26b1 +opentelemetry-instrumentation-asyncpg==0.26b1 +opentelemetry-instrumentation-boto==0.26b1 +opentelemetry-instrumentation-botocore==0.26b1 +opentelemetry-instrumentation-celery==0.26b1 +opentelemetry-instrumentation-dbapi==0.26b1 +opentelemetry-instrumentation-django==0.26b1 +opentelemetry-instrumentation-elasticsearch==0.26b1 +opentelemetry-instrumentation-falcon==0.26b1 +opentelemetry-instrumentation-fastapi==0.26b1 +opentelemetry-instrumentation-flask==0.26b1 +opentelemetry-instrumentation-grpc==0.26b1 +opentelemetry-instrumentation-httpx==0.26b1 +opentelemetry-instrumentation-jinja2==0.26b1 +opentelemetry-instrumentation-logging==0.26b1 +opentelemetry-instrumentation-mysql==0.26b1 +opentelemetry-instrumentation-pika==0.26b1 +opentelemetry-instrumentation-psycopg2==0.26b1 +opentelemetry-instrumentation-pymemcache==0.26b1 +opentelemetry-instrumentation-pymongo==0.26b1 +opentelemetry-instrumentation-pymysql==0.26b1 +opentelemetry-instrumentation-pyramid==0.26b1 +opentelemetry-instrumentation-redis==0.26b1 +opentelemetry-instrumentation-requests==0.26b1 +opentelemetry-instrumentation-sklearn==0.26b1 +opentelemetry-instrumentation-sqlalchemy==0.26b1 +opentelemetry-instrumentation-sqlite3==0.26b1 +opentelemetry-instrumentation-starlette==0.26b1 +opentelemetry-instrumentation-tornado==0.26b1 +opentelemetry-instrumentation-urllib==0.26b1 +opentelemetry-instrumentation-urllib3==0.26b1 +opentelemetry-instrumentation-wsgi==0.26b1 diff --git a/versions.txt b/versions.txt index ac6145bd5..a24b46bf9 100644 --- a/versions.txt +++ b/versions.txt @@ -20,4 +20,4 @@ autoinstrumentation-nodejs=0.26.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.25b2 +autoinstrumentation-python=0.26b1 From b64c1abec128cd2c1540249813a68c7fe25980e0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 16 Nov 2021 19:10:59 +0100 Subject: [PATCH 0338/1234] Upgrade nodejs auto instrumentation to 1.27.0 (#546) Signed-off-by: Pavol Loffay --- autoinstrumentation/nodejs/package.json | 6 +++--- versions.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 17853ed49..6c4569404 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,8 +15,8 @@ }, "dependencies": { "@opentelemetry/api": "1.0.3", - "@opentelemetry/auto-instrumentations-node": "0.26.0", - "@opentelemetry/exporter-otlp-grpc": "0.26.0", - "@opentelemetry/sdk-node": "0.26.0" + "@opentelemetry/auto-instrumentations-node": "0.27.0", + "@opentelemetry/exporter-otlp-grpc": "0.27.0", + "@opentelemetry/sdk-node": "0.27.0" } } diff --git a/versions.txt b/versions.txt index a24b46bf9..4183c5ca5 100644 --- a/versions.txt +++ b/versions.txt @@ -16,7 +16,7 @@ autoinstrumentation-java=1.7.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.26.0 +autoinstrumentation-nodejs=0.27.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt From 76f14a116b7e1547b519e8e9b631cba3b91841a8 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 17 Nov 2021 06:34:52 +0100 Subject: [PATCH 0339/1234] Use java auto-instrumentation 1.7.2 by default (#549) Signed-off-by: Pavol Loffay --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index 4183c5ca5..a1a3ca829 100644 --- a/versions.txt +++ b/versions.txt @@ -12,7 +12,7 @@ targetallocator=0.1.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.7.0 +autoinstrumentation-java=1.7.2 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From 41a0c1e0b9abb30ee47ab7d49f9f66525a528c5f Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 17 Nov 2021 14:43:15 +0900 Subject: [PATCH 0340/1234] Revert "Upgrade nodejs auto instrumentation to 1.27.0 (#546)" (#551) This reverts commit b64c1abec128cd2c1540249813a68c7fe25980e0. --- autoinstrumentation/nodejs/package.json | 6 +++--- versions.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 6c4569404..17853ed49 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,8 +15,8 @@ }, "dependencies": { "@opentelemetry/api": "1.0.3", - "@opentelemetry/auto-instrumentations-node": "0.27.0", - "@opentelemetry/exporter-otlp-grpc": "0.27.0", - "@opentelemetry/sdk-node": "0.27.0" + "@opentelemetry/auto-instrumentations-node": "0.26.0", + "@opentelemetry/exporter-otlp-grpc": "0.26.0", + "@opentelemetry/sdk-node": "0.26.0" } } diff --git a/versions.txt b/versions.txt index a1a3ca829..3ca3b0219 100644 --- a/versions.txt +++ b/versions.txt @@ -16,7 +16,7 @@ autoinstrumentation-java=1.7.2 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.27.0 +autoinstrumentation-nodejs=0.26.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt From 7814baf5b0ca16ca663b0a2f756bda7095943bd9 Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Wed, 17 Nov 2021 10:52:48 +0100 Subject: [PATCH 0341/1234] Add support for podSecurity (#469) --- apis/v1alpha1/opentelemetrycollector_types.go | 2 + apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 157 ++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 157 ++++++++++ docs/api.md | 270 ++++++++++++++++++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 28 ++ pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 27 ++ pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 28 ++ 11 files changed, 677 insertions(+) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 05c557f34..b4b8a6380 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -66,6 +66,8 @@ type OpenTelemetryCollectorSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` + // HostNetwork indicates if the pod should run in the host networking namespace. // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index bf1c6ff83..13b2daf15 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -254,6 +254,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(v1.SecurityContext) (*in).DeepCopyInto(*out) } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates *out = make([]v1.PersistentVolumeClaim, len(*in)) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 4b8793621..e475e4928 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -231,6 +231,163 @@ spec: description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. type: object + podSecurityContext: + description: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present in container.securityContext. Field + values of container.securityContext take precedence over field values + of PodSecurityContext. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1. The owning GID will be the FSGroup 2. The setgid bit is + set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- \n If unset, + the Kubelet will not modify the ownership and permissions of + any volume." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. This field will only apply to volume types which + support fsGroup based ownership(and permissions). It will have + no effect on ephemeral volume types such as: secret, configmaps + and emptydir. Valid values are "OnRootMismatch" and "Always". + If not specified, "Always" is used.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID. If + unspecified, no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 6f91cf34e..ce55cbdc7 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -232,6 +232,163 @@ spec: description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. type: object + podSecurityContext: + description: PodSecurityContext holds pod-level security attributes + and common container settings. Some fields are also present in container.securityContext. Field + values of container.securityContext take precedence over field values + of PodSecurityContext. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1. The owning GID will be the FSGroup 2. The setgid bit is + set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- \n If unset, + the Kubelet will not modify the ownership and permissions of + any volume." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. This field will only apply to volume types which + support fsGroup based ownership(and permissions). It will have + no effect on ephemeral volume types such as: secret, configmaps + and emptydir. Valid values are "OnRootMismatch" and "Always". + If not specified, "Always" is used.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID. If + unspecified, no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is alpha-level + and will only be honored by components that enable the WindowsHostProcessContainers + feature flag. Setting this field without the feature flag + will result in errors when validating the Pod. All of a + Pod's containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess containers + and non-HostProcess containers). In addition, if HostProcess + is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required diff --git a/docs/api.md b/docs/api.md index 261b8abb2..2ec51c49e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -382,6 +382,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods.
+ + + + + @@ -813,6 +820,269 @@ The Secret to select from
false
podSecurityContextobject + PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
+
false
ports []object
+### OpenTelemetryCollector.spec.podSecurityContext +[↩ Parent](#opentelemetrycollectorspec) + + + +PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsGroupinteger + A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- + If unset, the Kubelet will not modify the ownership and permissions of any volume.
+
+ Format: int64
+
false
fsGroupChangePolicystring + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+
false
seccompProfileobject + The seccomp options to use by the containers in this pod.
+
false
supplementalGroups[]integer + A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.
+
false
sysctls[]object + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + +### OpenTelemetryCollector.spec.podSecurityContext.seLinuxOptions +[↩ Parent](#opentelemetrycollectorspecpodsecuritycontext) + + + +The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpenTelemetryCollector.spec.podSecurityContext.seccompProfile +[↩ Parent](#opentelemetrycollectorspecpodsecuritycontext) + + + +The seccomp options to use by the containers in this pod. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+
false
+ + +### OpenTelemetryCollector.spec.podSecurityContext.sysctls[index] +[↩ Parent](#opentelemetrycollectorspecpodsecuritycontext) + + + +Sysctl defines a kernel parameter to be set + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of a property to set
+
true
valuestring + Value of a property to set
+
true
+ + +### OpenTelemetryCollector.spec.podSecurityContext.windowsOptions +[↩ Parent](#opentelemetrycollectorspecpodsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + ### OpenTelemetryCollector.spec.ports[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index d84a3cf86..97780df12 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -54,6 +54,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, HostNetwork: otelcol.Spec.HostNetwork, + SecurityContext: otelcol.Spec.PodSecurityContext, }, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 60ec91a75..9d84abfe3 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -93,3 +94,30 @@ func TestDaemonsetPodAnnotations(t *testing.T) { assert.Equal(t, "my-instance-collector", ds.Name) assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) } + +func TestDaemonstPodSecurityContext(t *testing.T) { + runAsNonRoot := true + runAsUser := int64(1337) + runasGroup := int64(1338) + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodSecurityContext: &v1.PodSecurityContext{ + RunAsNonRoot: &runAsNonRoot, + RunAsUser: &runAsUser, + RunAsGroup: &runasGroup, + }, + }, + } + + cfg := config.New() + + d := DaemonSet(cfg, logger, otelcol) + + assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) + assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) + assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 64b688a01..9e027d4f8 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -54,6 +54,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, + SecurityContext: otelcol.Spec.PodSecurityContext, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index d89d39c4e..fb119e441 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -86,3 +86,30 @@ func TestDeploymentPodAnnotations(t *testing.T) { assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) } + +func TestDeploymenttPodSecurityContext(t *testing.T) { + runAsNonRoot := true + runAsUser := int64(1337) + runasGroup := int64(1338) + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodSecurityContext: &v1.PodSecurityContext{ + RunAsNonRoot: &runAsNonRoot, + RunAsUser: &runAsUser, + RunAsGroup: &runasGroup, + }, + }, + } + + cfg := config.New() + + d := Deployment(cfg, logger, otelcol) + + assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) + assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) + assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 8b02501c6..d8ee3b720 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -54,6 +54,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, + SecurityContext: otelcol.Spec.PodSecurityContext, }, }, Replicas: otelcol.Spec.Replicas, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index eba62de74..8cc4e9d3f 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -20,6 +20,7 @@ import ( "github.com/stretchr/testify/assert" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -144,3 +145,30 @@ func TestStatefulSetPodAnnotations(t *testing.T) { assert.Equal(t, "my-instance-collector", ss.Name) assert.Equal(t, testPodAnnotationValues, ss.Spec.Template.Annotations) } + +func TestStatefulSetPodSecurityContext(t *testing.T) { + runAsNonRoot := true + runAsUser := int64(1337) + runasGroup := int64(1338) + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodSecurityContext: &v1.PodSecurityContext{ + RunAsNonRoot: &runAsNonRoot, + RunAsUser: &runAsUser, + RunAsGroup: &runasGroup, + }, + }, + } + + cfg := config.New() + + d := StatefulSet(cfg, logger, otelcol) + + assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) + assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) + assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) +} From ba5e75ea180f29464f608322c64834735a19bc14 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 17 Nov 2021 10:54:41 +0100 Subject: [PATCH 0342/1234] Enable generating of annotations and add scorecard (#534) * Enable generating of annotations and add scorecard Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * Fix workflow Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay * Add manifests Signed-off-by: Pavol Loffay --- .github/workflows/scorecard.yaml | 47 ++++++++++++++++++++++ Makefile | 5 ++- PROJECT | 1 + bundle.Dockerfile | 12 +++++- bundle/metadata/annotations.yaml | 14 ++++--- bundle/tests/scorecard/config.yaml | 40 ++++++++++++++++++ config/manifests/kustomization.yaml | 3 +- config/scorecard/bases/config.yaml | 7 ++++ config/scorecard/kustomization.yaml | 16 ++++++++ config/scorecard/patches/basic.config.yaml | 10 +++++ config/scorecard/patches/olm.config.yaml | 20 +++++++++ 11 files changed, 166 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/scorecard.yaml create mode 100644 bundle/tests/scorecard/config.yaml create mode 100644 config/scorecard/bases/config.yaml create mode 100644 config/scorecard/kustomization.yaml create mode 100644 config/scorecard/patches/basic.config.yaml create mode 100644 config/scorecard/patches/olm.config.yaml diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml new file mode 100644 index 000000000..4706a8557 --- /dev/null +++ b/.github/workflows/scorecard.yaml @@ -0,0 +1,47 @@ +name: "Scorecard tests" + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + scorecard-tests: + name: test on k8s + runs-on: ubuntu-20.04 + strategy: + matrix: + kube-version: + - "1.19" + - "1.20" + - "1.21" + - "1.22" + + steps: + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Check out code into the Go module directory + uses: actions/checkout@v2.4.0 + + - name: "install kuttl and kind" + run: ./hack/install-kuttl.sh + + - name: "start kind" + env: + KUBE_VERSION: ${{ matrix.kube-version }} + run: kind create cluster --config kind-$KUBE_VERSION.yaml + + - name: "wait until cluster is ready" + run: kubectl wait --timeout=5m --for=condition=available deployment/coredns -n kube-system + + - uses: jpkrohling/setup-operator-sdk@v1.1.0 + with: + operator-sdk-version: v1.13.1 + + - name: "run scorecard test" + run: make scorecard-tests diff --git a/Makefile b/Makefile index b69d870c7..210b4d640 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,9 @@ prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ +scorecard-tests: + $(OPERATOR_SDK) scorecard bundle || (echo "scorecard test failed" && exit 1) + set-test-image-vars: $(eval IMG=local/opentelemetry-operator:e2e) @@ -223,7 +226,7 @@ endif # Generate bundle manifests and metadata, then validate generated files. bundle: kustomize operator-sdk manifests set-image-controller $(OPERATOR_SDK) generate kustomize manifests -q - $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --manifests --version $(VERSION) $(BUNDLE_METADATA_OPTS) + $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(OPERATOR_SDK) bundle validate ./bundle # Build the bundle image, used only for local dev purposes diff --git a/PROJECT b/PROJECT index 169912880..bd15742a0 100644 --- a/PROJECT +++ b/PROJECT @@ -4,6 +4,7 @@ layout: multigroup: true plugins: manifests.sdk.operatorframework.io/v2: {} + scorecard.sdk.operatorframework.io/v2: {} projectName: opentelemetry-operator repo: github.com/open-telemetry/opentelemetry-operator resources: diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 7f940b437..7996432a7 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -1,12 +1,20 @@ FROM scratch +# Core bundle labels. LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.9.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.13.0+git LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go +LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 + +# Labels for testing. +LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 +LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ + +# Copy files to locations specified by labels. COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ +COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 867a7c080..963e2b6a1 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -1,10 +1,14 @@ annotations: - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.bundle.manifests.v1: manifests/ + # Core bundle annotations. operators.operatorframework.io.bundle.mediatype.v1: registry+v1 + operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v1.9.0 + operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.metrics.builder: operator-sdk-v1.13.0+git operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go - operators.operatorframework.io.bundle.channel.default.v1: alpha + operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 + + # Annotations for testing. + operators.operatorframework.io.test.mediatype.v1: scorecard+v1 + operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml new file mode 100644 index 000000000..ea869c4f2 --- /dev/null +++ b/bundle/tests/scorecard/config.yaml @@ -0,0 +1,40 @@ +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: + - entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: basic + test: basic-check-spec-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-bundle-validation-test + storage: + spec: + mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-crds-have-validation-test + storage: + spec: + mountPath: {} +storage: + spec: + mountPath: {} diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 1544af673..63ca74d72 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,3 +1,4 @@ resources: - ../default -- ../samples \ No newline at end of file +- ../samples +- ../scorecard diff --git a/config/scorecard/bases/config.yaml b/config/scorecard/bases/config.yaml new file mode 100644 index 000000000..c77047841 --- /dev/null +++ b/config/scorecard/bases/config.yaml @@ -0,0 +1,7 @@ +apiVersion: scorecard.operatorframework.io/v1alpha3 +kind: Configuration +metadata: + name: config +stages: +- parallel: true + tests: [] diff --git a/config/scorecard/kustomization.yaml b/config/scorecard/kustomization.yaml new file mode 100644 index 000000000..50cd2d084 --- /dev/null +++ b/config/scorecard/kustomization.yaml @@ -0,0 +1,16 @@ +resources: +- bases/config.yaml +patchesJson6902: +- path: patches/basic.config.yaml + target: + group: scorecard.operatorframework.io + version: v1alpha3 + kind: Configuration + name: config +- path: patches/olm.config.yaml + target: + group: scorecard.operatorframework.io + version: v1alpha3 + kind: Configuration + name: config +#+kubebuilder:scaffold:patchesJson6902 diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml new file mode 100644 index 000000000..ebd7145ca --- /dev/null +++ b/config/scorecard/patches/basic.config.yaml @@ -0,0 +1,10 @@ +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - basic-check-spec + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: basic + test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml new file mode 100644 index 000000000..cafc0feac --- /dev/null +++ b/config/scorecard/patches/olm.config.yaml @@ -0,0 +1,20 @@ +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - olm-bundle-validation + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-bundle-validation-test +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - olm-crds-have-validation + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-crds-have-validation-test From e4967f66469af63417a881f88426f60c3675cf77 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 17 Nov 2021 18:55:39 +0900 Subject: [PATCH 0343/1234] Delete namespaces created in tests. (#528) * Delete namespaces created in tests. * Lint --- internal/webhookhandler/webhookhandler_test.go | 8 ++++++-- pkg/instrumentation/podmutator_test.go | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index 211bba22b..c439d40d4 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -126,6 +126,9 @@ func TestShouldInjectSidecar(t *testing.T) { t.Run(tt.name, func(t *testing.T) { err := k8sClient.Create(context.Background(), &tt.ns) require.NoError(t, err) + defer func() { + _ = k8sClient.Delete(context.Background(), &tt.ns) + }() for i := range tt.otelcols { err := k8sClient.Create(context.Background(), &tt.otelcols[i]) @@ -185,7 +188,6 @@ func TestShouldInjectSidecar(t *testing.T) { for i := range tt.otelcols { require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) } - require.NoError(t, k8sClient.Delete(context.Background(), &tt.ns)) }) } } @@ -347,6 +349,9 @@ func TestPodShouldNotBeChanged(t *testing.T) { t.Run(tt.name, func(t *testing.T) { err := k8sClient.Create(context.Background(), &tt.ns) require.NoError(t, err) + defer func() { + _ = k8sClient.Delete(context.Background(), &tt.ns) + }() for i := range tt.otelcols { err := k8sClient.Create(context.Background(), &tt.otelcols[i]) @@ -387,7 +392,6 @@ func TestPodShouldNotBeChanged(t *testing.T) { for i := range tt.otelcols { require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) } - require.NoError(t, k8sClient.Delete(context.Background(), &tt.ns)) }) } } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 9b6bcaead..7c9b84d3c 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -398,6 +398,9 @@ func TestMutatePod(t *testing.T) { t.Run(test.name, func(t *testing.T) { err := k8sClient.Create(context.Background(), &test.ns) require.NoError(t, err) + defer func() { + _ = k8sClient.Delete(context.Background(), &test.ns) + }() err = k8sClient.Create(context.Background(), &test.inst) require.NoError(t, err) From c8053c6686bb2603fb764423e304cc62937cacf7 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 17 Nov 2021 19:23:30 +0900 Subject: [PATCH 0344/1234] Add autoinstrumentation for Python (#532) * Add autoinstrumentation for Python * Better log * Fix merge --- README.md | 9 +- apis/v1alpha1/instrumentation_types.go | 13 + apis/v1alpha1/zz_generated.deepcopy.go | 16 ++ .../opentelemetry.io_instrumentations.yaml | 7 + .../opentelemetry.io_instrumentations.yaml | 7 + docs/api.md | 34 +++ pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/podmutator.go | 10 +- pkg/instrumentation/podmutator_test.go | 97 +++++++ pkg/instrumentation/python.go | 82 ++++++ pkg/instrumentation/python_test.go | 251 ++++++++++++++++++ pkg/instrumentation/sdk.go | 10 +- pkg/instrumentation/sdk_test.go | 84 ++++++ .../00-install-collector.yaml | 25 ++ .../00-install-instrumentation.yaml | 12 + .../e2e/instrumentation-python/01-assert.yaml | 32 +++ .../01-install-app.yaml | 20 ++ 17 files changed, 706 insertions(+), 4 deletions(-) create mode 100644 pkg/instrumentation/python.go create mode 100644 pkg/instrumentation/python_test.go create mode 100644 tests/e2e/instrumentation-python/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-python/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-python/01-assert.yaml create mode 100644 tests/e2e/instrumentation-python/01-install-app.yaml diff --git a/README.md b/README.md index 5eeb765f7..c202f531e 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ EOF ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Java and NodeJS are supported. +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Java, NodeJS and Python are supported. To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. @@ -178,6 +178,8 @@ spec: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest nodejs: image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest + python: + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:latest EOF ``` @@ -197,6 +199,11 @@ NodeJS: instrumentation.opentelemetry.io/inject-nodejs: "true" ``` +Python: +```bash +instrumentation.opentelemetry.io/inject-python: "true" +``` + The possible values for the annotation can be * `"true"` - inject and `Instrumentation` resource from the namespace. * `"my-instrumentation"` - name of `Instrumentation` CR instance. diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 2083d0403..90e3dcef5 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -49,6 +49,11 @@ type InstrumentationSpec struct { // +optional // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true NodeJS NodeJSSpec `json:"nodejs,omitempty"` + + // Python defines configuration for python auto-instrumentation. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Python PythonSpec `json:"python,omitempty"` } // JavaSpec defines Java SDK and instrumentation configuration. @@ -67,6 +72,14 @@ type NodeJSSpec struct { Image string `json:"image,omitempty"` } +// PythonSpec defines Python SDK and instrumentation configuration. +type PythonSpec struct { + // Image is a container image with Python SDK and autoinstrumentation. + // +optional + // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true + Image string `json:"image,omitempty"` +} + // Exporter defines OTLP exporter configuration. type Exporter struct { // Endpoint is address of the collector with OTLP endpoint. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 13b2daf15..c1cf95434 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -117,6 +117,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { out.Sampler = in.Sampler out.Java = in.Java out.NodeJS = in.NodeJS + out.Python = in.Python } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. @@ -363,6 +364,21 @@ func (in *OpenTelemetryTargetAllocatorSpec) DeepCopy() *OpenTelemetryTargetAlloc return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PythonSpec) DeepCopyInto(out *PythonSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PythonSpec. +func (in *PythonSpec) DeepCopy() *PythonSpec { + if in == nil { + return nil + } + out := new(PythonSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sampler) DeepCopyInto(out *Sampler) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 4233a322c..63980e35d 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -79,6 +79,13 @@ spec: - none type: string type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + image: + description: Image is a container image with Python SDK and autoinstrumentation. + type: string + type: object resourceAttributes: additionalProperties: type: string diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index dbcf99985..121410599 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -81,6 +81,13 @@ spec: - none type: string type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + image: + description: Image is a container image with Python SDK and autoinstrumentation. + type: string + type: object resourceAttributes: additionalProperties: type: string diff --git a/docs/api.md b/docs/api.md index 2ec51c49e..e4f7f74d2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -113,6 +113,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen Propagators defines inter-process context propagation configuration.
false + + python + object + + Python defines configuration for python auto-instrumentation.
+ + false resourceAttributes map[string]string @@ -212,6 +219,33 @@ NodeJS defines configuration for nodejs auto-instrumentation. +### Instrumentation.spec.python +[↩ Parent](#instrumentationspec) + + + +Python defines configuration for python auto-instrumentation. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
imagestring + Image is a container image with Python SDK and autoinstrumentation.
+
false
+ + ### Instrumentation.spec.sampler [↩ Parent](#instrumentationspec) diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 6cc252a03..8ce17a7c6 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -25,6 +25,7 @@ const ( // Possible values are "true", "false" or "" name. annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" + annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 29e473463..49545c3f5 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -41,6 +41,7 @@ type instPodMutator struct { type languageInstrumentations struct { Java *v1alpha1.Instrumentation NodeJS *v1alpha1.Instrumentation + Python *v1alpha1.Instrumentation } var _ webhookhandler.PodMutator = (*instPodMutator)(nil) @@ -76,7 +77,14 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } insts.NodeJS = inst - if insts.Java == nil && insts.NodeJS == nil { + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectPython); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + insts.Python = inst + + if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 7c9b84d3c..3cb05520f 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -265,6 +265,103 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "python injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "python", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "python", + }, + Spec: v1alpha1.InstrumentationSpec{ + Python: v1alpha1.PythonSpec{ + Image: "otel/python:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "opentelemetry-auto-instrumentation", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "otel/python:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=python", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation", + MountPath: "/otel-auto-instrumentation", + }, + }, + }, + }, + }, + }, + }, { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go new file mode 100644 index 000000000..a87ebe3b2 --- /dev/null +++ b/pkg/instrumentation/python.go @@ -0,0 +1,82 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + envPythonPath = "PYTHONPATH" + envOtelTracesExporter = "OTEL_TRACES_EXPORTER" + pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" + pythonPathSuffix = "/otel-auto-instrumentation" +) + +func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.PythonSpec, pod corev1.Pod) corev1.Pod { + // caller checks if there is at least one container + container := &pod.Spec.Containers[0] + idx := getIndexOfEnv(container.Env, envPythonPath) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envPythonPath, + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping Python SDK injection, the container defines PYTHONPATH env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = fmt.Sprintf("%s:%s:%s", pythonPathPrefix, container.Env[idx].Value, pythonPathSuffix) + } + + // Set OTEL_TRACES_EXPORTER to HTTP exporter if not set by user because it is what our autoinstrumentation supports. + idx = getIndexOfEnv(container.Env, envOtelTracesExporter) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOtelTracesExporter, + Value: "otlp_proto_http", + }) + } + + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }) + + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: pythonSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + + return pod +} diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go new file mode 100644 index 000000000..c57fcd861 --- /dev/null +++ b/pkg/instrumentation/python_test.go @@ -0,0 +1,251 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestInjectPythonSDK(t *testing.T) { + tests := []struct { + name string + v1alpha1.PythonSpec + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "PYTHONPATH not defined", + PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, + }, + }, + }, + }, + }, + }, + { + name: "PYTHONPATH defined", + PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: "/foo:/bar", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s:%s", pythonPathPrefix, "/foo:/bar", pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, + }, + }, + }, + }, + }, + }, + { + name: "OTEL_TRACES_EXPORTER defined", + PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "zipkin", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "zipkin", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + }, + }, + }, + }, + }, + }, + { + name: "PYTHONPATH defined as ValueFrom", + PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectPythonSDK(logr.Discard(), test.PythonSpec, test.pod) + assert.Equal(t, test.expected, pod) + }) + } +} diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 9b36203c3..430ef2146 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -48,16 +48,22 @@ func inject(logger logr.Logger, insts languageInstrumentations, ns corev1.Namesp // in the future we can define an annotation to configure this if insts.Java != nil { otelinst := *insts.Java - logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) pod = injectCommonSDKConfig(otelinst, ns, pod) pod = injectJavaagent(logger, otelinst.Spec.Java, pod) } if insts.NodeJS != nil { otelinst := *insts.NodeJS - logger.V(1).Info("injecting instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) pod = injectCommonSDKConfig(otelinst, ns, pod) pod = injectNodeJSSDK(logger, otelinst.Spec.NodeJS, pod) } + if insts.Python != nil { + otelinst := *insts.Python + logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = injectCommonSDKConfig(otelinst, ns, pod) + pod = injectPythonSDK(logger, otelinst.Spec.Python, pod) + } return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index a41a96b9e..d4afe0127 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -15,6 +15,7 @@ package instrumentation import ( + "fmt" "testing" "github.com/go-logr/logr" @@ -352,3 +353,86 @@ func TestInjectNodeJS(t *testing.T) { }, }, pod) } + +func TestInjectPython(t *testing.T) { + inst := v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Python: v1alpha1.PythonSpec{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + } + insts := languageInstrumentations{ + Python: &inst, + } + pod := inject(logr.Discard(), insts, + corev1.Namespace{}, + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }) + assert.Equal(t, corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "img:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, + }, + }, + }, + }, + }, pod) +} diff --git a/tests/e2e/instrumentation-python/00-install-collector.yaml b/tests/e2e/instrumentation-python/00-install-collector.yaml new file mode 100644 index 000000000..b82308636 --- /dev/null +++ b/tests/e2e/instrumentation-python/00-install-collector.yaml @@ -0,0 +1,25 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + args: + metrics-level: detailed + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml new file mode 100644 index 000000000..786a4ba9e --- /dev/null +++ b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml @@ -0,0 +1,12 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: python +spec: + exporter: + endpoint: http://localhost:4318/v1/traces + propagators: + - jaeger + - b3 + python: + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:latest diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml new file mode 100644 index 000000000..c4a4e54fe --- /dev/null +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -0,0 +1,32 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-python: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_SERVICE_NAME + value: myapp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: PYTHONPATH + value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation +status: + phase: Running diff --git a/tests/e2e/instrumentation-python/01-install-app.yaml b/tests/e2e/instrumentation-python/01-install-app.yaml new file mode 100644 index 000000000..8f3ba8d3b --- /dev/null +++ b/tests/e2e/instrumentation-python/01-install-app.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-python: "true" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/flask-hello-world:latest From 45627a7dad0bde53f5951445b94c2afaa510e46a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 17 Nov 2021 14:44:44 +0100 Subject: [PATCH 0345/1234] Remove unused operator-sdk annotations from kinds (#556) Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_types.go | 13 ------------- apis/v1alpha1/opentelemetrycollector_types.go | 19 ------------------- 2 files changed, 32 deletions(-) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 90e3dcef5..57bef1fd9 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -22,37 +22,30 @@ import ( type InstrumentationSpec struct { // Exporter defines exporter configuration. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Exporter `json:"exporter,omitempty"` // ResourceAttributes defines attributes that are added to resource. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` // Propagators defines inter-process context propagation configuration. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Propagators []Propagator `json:"propagators,omitempty"` // Sampler defines sampling configuration. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Sampler `json:"sampler,omitempty"` // Java defines configuration for java auto-instrumentation. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Java JavaSpec `json:"java,omitempty"` // NodeJS defines configuration for nodejs auto-instrumentation. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true NodeJS NodeJSSpec `json:"nodejs,omitempty"` // Python defines configuration for python auto-instrumentation. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Python PythonSpec `json:"python,omitempty"` } @@ -60,7 +53,6 @@ type InstrumentationSpec struct { type JavaSpec struct { // Image is a container image with javaagent JAR. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` } @@ -68,7 +60,6 @@ type JavaSpec struct { type NodeJSSpec struct { // Image is a container image with NodeJS SDK and autoinstrumentation. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` } @@ -76,7 +67,6 @@ type NodeJSSpec struct { type PythonSpec struct { // Image is a container image with Python SDK and autoinstrumentation. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` } @@ -84,7 +74,6 @@ type PythonSpec struct { type Exporter struct { // Endpoint is address of the collector with OTLP endpoint. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Endpoint string `json:"endpoint,omitempty"` } @@ -93,14 +82,12 @@ type Sampler struct { // Type defines sampler type. // The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Type SamplerType `json:"type,omitempty"` // Argument defines sampler argument. // The value depends on the sampler type. // For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Argument string `json:"argument,omitempty"` } diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index b4b8a6380..fca4fed48 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -23,72 +23,59 @@ import ( type OpenTelemetryCollectorSpec struct { // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. // +required - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Config string `json:"config,omitempty"` // Args is the set of arguments to pass to the OpenTelemetry Collector binary // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Args map[string]string `json:"args,omitempty"` // Replicas is the number of pod instances for the underlying OpenTelemetry Collector // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Replicas *int32 `json:"replicas,omitempty"` // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` // Image indicates the container image to use for the OpenTelemetry Collector. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Image string `json:"image,omitempty"` // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true TargetAllocator OpenTelemetryTargetAllocatorSpec `json:"targetAllocator,omitempty"` // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Mode Mode `json:"mode,omitempty"` // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true ServiceAccount string `json:"serviceAccount,omitempty"` // SecurityContext will be set as the container security context. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` // HostNetwork indicates if the pod should run in the host networking namespace. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true HostNetwork bool `json:"hostNetwork,omitempty"` // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. // +optional // +listType=atomic - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // VolumeMounts represents the mount points to use in the underlying collector deployment(s) // +optional // +listType=atomic - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Volumes represents which volumes to use in the underlying collector deployment(s). // +optional // +listType=atomic - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Volumes []v1.Volume `json:"volumes,omitempty"` // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator @@ -96,36 +83,30 @@ type OpenTelemetryCollectorSpec struct { // used to open aditional ports that can't be inferred by the operator, like for custom receivers. // +optional // +listType=atomic - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Ports []v1.ServicePort `json:"ports,omitempty"` // ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be // consumed in the config file for the Collector. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Env []v1.EnvVar `json:"env,omitempty"` // List of sources to populate environment variables on the OpenTelemetry Collector's Pods. // These can then in certain cases be consumed in the config file for the Collector. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` // Resources to set on the OpenTelemetry Collector pods. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Resources v1.ResourceRequirements `json:"resources,omitempty"` // Toleration to schedule OpenTelemetry Collector pods. // This is only relevant to daemonsets, statefulsets and deployments // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Tolerations []v1.Toleration `json:"tolerations,omitempty"` // PodAnnotations is the set of annotations that will be attached to // Collector and Target Allocator pods. // +optional - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true PodAnnotations map[string]string `json:"podAnnotations,omitempty"` } From 0844ee2bd40e5b9798354433d5f3c78f37373959 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 17 Nov 2021 16:25:40 +0100 Subject: [PATCH 0346/1234] Add scorecard resources test (#555) * Add scorecard resources test Signed-off-by: Pavol Loffay * Add fields Signed-off-by: Pavol Loffay * add comment Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_types.go | 1 + apis/v1alpha1/opentelemetrycollector_types.go | 3 +++ ...emetry-operator.clusterserviceversion.yaml | 23 +++++++++++++++++++ bundle/tests/scorecard/config.yaml | 10 ++++++++ ...emetry-operator.clusterserviceversion.yaml | 23 +++++++++++++++++++ config/scorecard/patches/olm.config.yaml | 10 ++++++++ 6 files changed, 70 insertions(+) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 57bef1fd9..f4d87b8ff 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -100,6 +100,7 @@ type InstrumentationStatus struct { // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" +// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1}} // Instrumentation is the spec for OpenTelemetry instrumentation. type Instrumentation struct { diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index fca4fed48..7e06a9a39 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -145,6 +145,9 @@ type OpenTelemetryTargetAllocatorSpec struct { // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Collector" +// This annotation provides a hint for OLM which resources are managed by OpenTelemetryCollector kind. +// It's not mandatory to list all resources. +// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{DaemonSets,apps/v1},{StatefulSets,apps/v1},{ConfigMaps,v1},{Service,v1}} // OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. type OpenTelemetryCollector struct { diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b765fbb75..0bfb819ae 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -47,12 +47,35 @@ spec: displayName: OpenTelemetry Instrumentation kind: Instrumentation name: instrumentations.opentelemetry.io + resources: + - kind: Pod + name: "" + version: v1 version: v1alpha1 - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. displayName: OpenTelemetry Collector kind: OpenTelemetryCollector name: opentelemetrycollectors.opentelemetry.io + resources: + - kind: ConfigMaps + name: "" + version: v1 + - kind: DaemonSets + name: "" + version: apps/v1 + - kind: Deployment + name: "" + version: apps/v1 + - kind: Pod + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + - kind: StatefulSets + name: "" + version: apps/v1 version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index ea869c4f2..a7b368967 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -35,6 +35,16 @@ stages: storage: spec: mountPath: {} + - entrypoint: + - scorecard-test + - olm-crds-have-resources + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-crds-have-resources-test + storage: + spec: + mountPath: {} storage: spec: mountPath: {} diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 8b906bc46..eacd3faeb 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -29,12 +29,35 @@ spec: displayName: OpenTelemetry Instrumentation kind: Instrumentation name: instrumentations.opentelemetry.io + resources: + - kind: Pod + name: "" + version: v1 version: v1alpha1 - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. displayName: OpenTelemetry Collector kind: OpenTelemetryCollector name: opentelemetrycollectors.opentelemetry.io + resources: + - kind: ConfigMaps + name: "" + version: v1 + - kind: DaemonSets + name: "" + version: apps/v1 + - kind: Deployment + name: "" + version: apps/v1 + - kind: Pod + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + - kind: StatefulSets + name: "" + version: apps/v1 version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index cafc0feac..46d59c619 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -18,3 +18,13 @@ labels: suite: olm test: olm-crds-have-validation-test +- op: add + path: /stages/0/tests/- + value: + entrypoint: + - scorecard-test + - olm-crds-have-resources + image: quay.io/operator-framework/scorecard-test:v1.13.1 + labels: + suite: olm + test: olm-crds-have-resources-test From 8182c54b1ce492be285d224b37cd39216eef50a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Nov 2021 09:47:03 +0100 Subject: [PATCH 0347/1234] Bump k8s.io/kubectl from 0.22.3 to 0.22.4 (#561) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.22.3 to 0.22.4. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.22.3...v0.22.4) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 31 ++++++++++++++++--------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index d7a2d56d0..215848bad 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.3 - k8s.io/apimachinery v0.22.3 - k8s.io/client-go v0.22.3 - k8s.io/kubectl v0.22.3 + k8s.io/api v0.22.4 + k8s.io/apimachinery v0.22.4 + k8s.io/client-go v0.22.4 + k8s.io/kubectl v0.22.4 sigs.k8s.io/controller-runtime v0.9.6 ) @@ -112,9 +112,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.21.3 // indirect - k8s.io/component-base v0.22.3 // indirect + k8s.io/component-base v0.22.4 // indirect k8s.io/klog/v2 v2.9.0 // indirect - k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect sigs.k8s.io/yaml v1.2.0 // indirect diff --git a/go.sum b/go.sum index f7e18d7c1..9603e0a30 100644 --- a/go.sum +++ b/go.sum @@ -1635,28 +1635,28 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.3 h1:wOoES2GoSkUsdped2RB4zYypPqWtvprGoKCENTOOjP4= -k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs= +k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw= +k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.3 h1:mrvBG5CZnEfwgpVqWcrRKvdsYECTrhAR6cApAgdsflk= -k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck= +k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/cli-runtime v0.22.3/go.mod h1:um6JvCxV9Hrhq0zCUxcqYoY7/wF64g6IYgOViI8sg6Q= +k8s.io/cli-runtime v0.22.4/go.mod h1:x35r0ERHXr/MrbR1C6MPJxQ3xKG6+hXi9m2xLzlMPZA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.3 h1:6onkOSc+YNdwq5zXE0wFXicq64rrym+mXwHu/CPVGO4= -k8s.io/client-go v0.22.3/go.mod h1:ElDjYf8gvZsKDYexmsmnMQ0DYO8W9RwBjfQ1PI53yow= +k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg= +k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/code-generator v0.22.3/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= +k8s.io/code-generator v0.22.4/go.mod h1:qjYl54pQ/emhkT0UxbufbREYJMWsHNNV/jSVwhYZQGw= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.3 h1:/+hryAW03u3FpJQww+GSMsArJNUbGjH66lrgxaRynLU= -k8s.io/component-base v0.22.3/go.mod h1:kuybv1miLCMoOk3ebrqF93GbQHQx6W2287FC0YEQY6s= -k8s.io/component-helpers v0.22.3/go.mod h1:7OVySVH5elhHKuJKUOxZEfpT1Bm3ChmBQZHmuFfbGHk= +k8s.io/component-base v0.22.4 h1:7qwLJnua2ppGNZrRGDQ0vhsFebI39VGbZ4zdR5ArViI= +k8s.io/component-base v0.22.4/go.mod h1:MrSaQy4a3tFVViff8TZL6JHYSewNCLshZCwHYM58v5A= +k8s.io/component-helpers v0.22.4/go.mod h1:A50qTyczDFbhZDifIfS2zFrHuPk9UNOWPpvNZ+3RSIs= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1671,11 +1671,12 @@ k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kubectl v0.22.3 h1:xziSHHyFHg2nt9vE6A0XqW5dOePNSlzxG8z3z+IY63E= -k8s.io/kubectl v0.22.3/go.mod h1:gcpQHPOx+Jke9Og6Li7YxR/ZuaOtFUeJw7xHH617tHs= -k8s.io/metrics v0.22.3/go.mod h1:HbLFLRKtXzoC/6tHLQAlO9AeOBXZp2eB6SsgkbujoNI= +k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82qaFC0H/NKxv2e5mbqsgR80= +k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kubectl v0.22.4 h1:ECUO1QWyZ70DiIKEfgBx+8i9D98uspVOwgc1APs/07w= +k8s.io/kubectl v0.22.4/go.mod h1:ok2qRT6y2Gy4+y+mniJVyUMKeBHP4OWS9Rdtf/QTM5I= +k8s.io/metrics v0.22.4/go.mod h1:6F/iwuYb1w2QDCoHkeMFLf4pwHBcYKLm4mPtVHKYrIw= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 057ac77952f488ce55472ca18189406914c5047c Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 19 Nov 2021 11:27:11 +0100 Subject: [PATCH 0348/1234] Refactor instrumentation types (#557) * Refactor instrymentation types Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_types.go | 48 +++++++++---------- apis/v1alpha1/zz_generated.deepcopy.go | 24 +++++----- .../opentelemetry.io_instrumentations.yaml | 7 +-- .../opentelemetry.io_instrumentations.yaml | 7 +-- docs/api.md | 6 +-- pkg/instrumentation/javaagent.go | 2 +- pkg/instrumentation/javaagent_test.go | 16 +++---- pkg/instrumentation/nodejs.go | 2 +- pkg/instrumentation/nodejs_test.go | 16 +++---- pkg/instrumentation/podmutator_test.go | 12 ++--- pkg/instrumentation/python.go | 2 +- pkg/instrumentation/python_test.go | 20 ++++---- pkg/instrumentation/sdk_test.go | 6 +-- 13 files changed, 85 insertions(+), 83 deletions(-) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index f4d87b8ff..2514eeb59 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -38,36 +38,15 @@ type InstrumentationSpec struct { // Java defines configuration for java auto-instrumentation. // +optional - Java JavaSpec `json:"java,omitempty"` + Java Java `json:"java,omitempty"` // NodeJS defines configuration for nodejs auto-instrumentation. // +optional - NodeJS NodeJSSpec `json:"nodejs,omitempty"` + NodeJS NodeJS `json:"nodejs,omitempty"` // Python defines configuration for python auto-instrumentation. // +optional - Python PythonSpec `json:"python,omitempty"` -} - -// JavaSpec defines Java SDK and instrumentation configuration. -type JavaSpec struct { - // Image is a container image with javaagent JAR. - // +optional - Image string `json:"image,omitempty"` -} - -// NodeJSSpec defines NodeJS SDK and instrumentation configuration. -type NodeJSSpec struct { - // Image is a container image with NodeJS SDK and autoinstrumentation. - // +optional - Image string `json:"image,omitempty"` -} - -// PythonSpec defines Python SDK and instrumentation configuration. -type PythonSpec struct { - // Image is a container image with Python SDK and autoinstrumentation. - // +optional - Image string `json:"image,omitempty"` + Python Python `json:"python,omitempty"` } // Exporter defines OTLP exporter configuration. @@ -91,6 +70,27 @@ type Sampler struct { Argument string `json:"argument,omitempty"` } +// Java defines Java SDK and instrumentation configuration. +type Java struct { + // Image is a container image with javaagent auto-instrumentation JAR. + // +optional + Image string `json:"image,omitempty"` +} + +// NodeJS defines NodeJS SDK and instrumentation configuration. +type NodeJS struct { + // Image is a container image with NodeJS SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` +} + +// Python defines Python SDK and instrumentation configuration. +type Python struct { + // Image is a container image with Python SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` +} + // InstrumentationStatus defines status of the instrumentation. type InstrumentationStatus struct { } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index c1cf95434..54fdb8d1e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -146,31 +146,31 @@ func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JavaSpec) DeepCopyInto(out *JavaSpec) { +func (in *Java) DeepCopyInto(out *Java) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JavaSpec. -func (in *JavaSpec) DeepCopy() *JavaSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java. +func (in *Java) DeepCopy() *Java { if in == nil { return nil } - out := new(JavaSpec) + out := new(Java) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeJSSpec) DeepCopyInto(out *NodeJSSpec) { +func (in *NodeJS) DeepCopyInto(out *NodeJS) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJSSpec. -func (in *NodeJSSpec) DeepCopy() *NodeJSSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS. +func (in *NodeJS) DeepCopy() *NodeJS { if in == nil { return nil } - out := new(NodeJSSpec) + out := new(NodeJS) in.DeepCopyInto(out) return out } @@ -365,16 +365,16 @@ func (in *OpenTelemetryTargetAllocatorSpec) DeepCopy() *OpenTelemetryTargetAlloc } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PythonSpec) DeepCopyInto(out *PythonSpec) { +func (in *Python) DeepCopyInto(out *Python) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PythonSpec. -func (in *PythonSpec) DeepCopy() *PythonSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python. +func (in *Python) DeepCopy() *Python { if in == nil { return nil } - out := new(PythonSpec) + out := new(Python) in.DeepCopyInto(out) return out } diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 63980e35d..b278d75fb 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -53,14 +53,15 @@ spec: description: Java defines configuration for java auto-instrumentation. properties: image: - description: Image is a container image with javaagent JAR. + description: Image is a container image with javaagent auto-instrumentation + JAR. type: string type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: image: - description: Image is a container image with NodeJS SDK and autoinstrumentation. + description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string type: object propagators: @@ -83,7 +84,7 @@ spec: description: Python defines configuration for python auto-instrumentation. properties: image: - description: Image is a container image with Python SDK and autoinstrumentation. + description: Image is a container image with Python SDK and auto-instrumentation. type: string type: object resourceAttributes: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 121410599..bc9541c3b 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -55,14 +55,15 @@ spec: description: Java defines configuration for java auto-instrumentation. properties: image: - description: Image is a container image with javaagent JAR. + description: Image is a container image with javaagent auto-instrumentation + JAR. type: string type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: image: - description: Image is a container image with NodeJS SDK and autoinstrumentation. + description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string type: object propagators: @@ -85,7 +86,7 @@ spec: description: Python defines configuration for python auto-instrumentation. properties: image: - description: Image is a container image with Python SDK and autoinstrumentation. + description: Image is a container image with Python SDK and auto-instrumentation. type: string type: object resourceAttributes: diff --git a/docs/api.md b/docs/api.md index e4f7f74d2..3c045ae26 100644 --- a/docs/api.md +++ b/docs/api.md @@ -185,7 +185,7 @@ Java defines configuration for java auto-instrumentation. image string - Image is a container image with javaagent JAR.
+ Image is a container image with javaagent auto-instrumentation JAR.
false @@ -212,7 +212,7 @@ NodeJS defines configuration for nodejs auto-instrumentation. image string - Image is a container image with NodeJS SDK and autoinstrumentation.
+ Image is a container image with NodeJS SDK and auto-instrumentation.
false @@ -239,7 +239,7 @@ Python defines configuration for python auto-instrumentation. image string - Image is a container image with Python SDK and autoinstrumentation.
+ Image is a container image with Python SDK and auto-instrumentation.
false diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 706599a0c..463639589 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -26,7 +26,7 @@ const ( javaJVMArgument = " -javaagent:/otel-auto-instrumentation/javaagent.jar" ) -func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.JavaSpec, pod corev1.Pod) corev1.Pod { +func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] idx := getIndexOfEnv(container.Env, envJavaToolsOptions) diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 938746a1a..28573d34f 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -27,13 +27,13 @@ import ( func TestInjectJavaagent(t *testing.T) { tests := []struct { name string - v1alpha1.JavaSpec + v1alpha1.Java pod corev1.Pod expected corev1.Pod }{ { - name: "JAVA_TOOL_OPTIONS not defined", - JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + name: "JAVA_TOOL_OPTIONS not defined", + Java: v1alpha1.Java{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -82,8 +82,8 @@ func TestInjectJavaagent(t *testing.T) { }, }, { - name: "JAVA_TOOL_OPTIONS defined", - JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + name: "JAVA_TOOL_OPTIONS defined", + Java: v1alpha1.Java{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -139,8 +139,8 @@ func TestInjectJavaagent(t *testing.T) { }, }, { - name: "JAVA_TOOL_OPTIONS defined as ValueFrom", - JavaSpec: v1alpha1.JavaSpec{Image: "foo/bar:1"}, + name: "JAVA_TOOL_OPTIONS defined as ValueFrom", + Java: v1alpha1.Java{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -174,7 +174,7 @@ func TestInjectJavaagent(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectJavaagent(logr.Discard(), test.JavaSpec, test.pod) + pod := injectJavaagent(logr.Discard(), test.Java, test.pod) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 900da584a..5830481c6 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -26,7 +26,7 @@ const ( nodeRequireArgument = " --require /otel-auto-instrumentation/autoinstrumentation.js" ) -func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJSSpec, pod corev1.Pod) corev1.Pod { +func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] idx := getIndexOfEnv(container.Env, envNodeOptions) diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 5882251af..f5a8bf93a 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -27,13 +27,13 @@ import ( func TestInjectNodeJSSDK(t *testing.T) { tests := []struct { name string - v1alpha1.NodeJSSpec + v1alpha1.NodeJS pod corev1.Pod expected corev1.Pod }{ { - name: "NODE_OPTIONS not defined", - NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + name: "NODE_OPTIONS not defined", + NodeJS: v1alpha1.NodeJS{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -82,8 +82,8 @@ func TestInjectNodeJSSDK(t *testing.T) { }, }, { - name: "NODE_OPTIONS defined", - NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + name: "NODE_OPTIONS defined", + NodeJS: v1alpha1.NodeJS{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -139,8 +139,8 @@ func TestInjectNodeJSSDK(t *testing.T) { }, }, { - name: "NODE_OPTIONS defined as ValueFrom", - NodeJSSpec: v1alpha1.NodeJSSpec{Image: "foo/bar:1"}, + name: "NODE_OPTIONS defined as ValueFrom", + NodeJS: v1alpha1.NodeJS{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -174,7 +174,7 @@ func TestInjectNodeJSSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectNodeJSSDK(logr.Discard(), test.NodeJSSpec, test.pod) + pod := injectNodeJSSDK(logr.Discard(), test.NodeJS, test.pod) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 3cb05520f..b68feed13 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -95,7 +95,7 @@ func TestMutatePod(t *testing.T) { Namespace: "javaagent", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{}, + Java: v1alpha1.Java{}, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", }, @@ -185,7 +185,7 @@ func TestMutatePod(t *testing.T) { Namespace: "nodejs", }, Spec: v1alpha1.InstrumentationSpec{ - NodeJS: v1alpha1.NodeJSSpec{ + NodeJS: v1alpha1.NodeJS{ Image: "otel/nodejs:1", }, Exporter: v1alpha1.Exporter{ @@ -278,7 +278,7 @@ func TestMutatePod(t *testing.T) { Namespace: "python", }, Spec: v1alpha1.InstrumentationSpec{ - Python: v1alpha1.PythonSpec{ + Python: v1alpha1.Python{ Image: "otel/python:1", }, Exporter: v1alpha1.Exporter{ @@ -375,7 +375,7 @@ func TestMutatePod(t *testing.T) { Namespace: "missing-annotation", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{ + Java: v1alpha1.Java{ Image: "otel/java:1", }, Exporter: v1alpha1.Exporter{ @@ -415,7 +415,7 @@ func TestMutatePod(t *testing.T) { Namespace: "annotation-false", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{ + Java: v1alpha1.Java{ Image: "otel/java:1", }, Exporter: v1alpha1.Exporter{ @@ -465,7 +465,7 @@ func TestMutatePod(t *testing.T) { Namespace: "non-existing-instance", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{ + Java: v1alpha1.Java{ Image: "otel/java:1", }, Exporter: v1alpha1.Exporter{ diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index a87ebe3b2..5c9f3b1de 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -30,7 +30,7 @@ const ( pythonPathSuffix = "/otel-auto-instrumentation" ) -func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.PythonSpec, pod corev1.Pod) corev1.Pod { +func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] idx := getIndexOfEnv(container.Env, envPythonPath) diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index c57fcd861..3fa6d68b2 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -28,13 +28,13 @@ import ( func TestInjectPythonSDK(t *testing.T) { tests := []struct { name string - v1alpha1.PythonSpec + v1alpha1.Python pod corev1.Pod expected corev1.Pod }{ { - name: "PYTHONPATH not defined", - PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + name: "PYTHONPATH not defined", + Python: v1alpha1.Python{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -87,8 +87,8 @@ func TestInjectPythonSDK(t *testing.T) { }, }, { - name: "PYTHONPATH defined", - PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + name: "PYTHONPATH defined", + Python: v1alpha1.Python{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -148,8 +148,8 @@ func TestInjectPythonSDK(t *testing.T) { }, }, { - name: "OTEL_TRACES_EXPORTER defined", - PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + name: "OTEL_TRACES_EXPORTER defined", + Python: v1alpha1.Python{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -209,8 +209,8 @@ func TestInjectPythonSDK(t *testing.T) { }, }, { - name: "PYTHONPATH defined as ValueFrom", - PythonSpec: v1alpha1.PythonSpec{Image: "foo/bar:1"}, + name: "PYTHONPATH defined as ValueFrom", + Python: v1alpha1.Python{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -244,7 +244,7 @@ func TestInjectPythonSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectPythonSDK(logr.Discard(), test.PythonSpec, test.pod) + pod := injectPythonSDK(logr.Discard(), test.Python, test.pod) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index d4afe0127..8d465a01b 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -199,7 +199,7 @@ func TestSDKInjection(t *testing.T) { func TestInjectJava(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.JavaSpec{ + Java: v1alpha1.Java{ Image: "img:1", }, Exporter: v1alpha1.Exporter{ @@ -278,7 +278,7 @@ func TestInjectJava(t *testing.T) { func TestInjectNodeJS(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ - NodeJS: v1alpha1.NodeJSSpec{ + NodeJS: v1alpha1.NodeJS{ Image: "img:1", }, Exporter: v1alpha1.Exporter{ @@ -357,7 +357,7 @@ func TestInjectNodeJS(t *testing.T) { func TestInjectPython(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ - Python: v1alpha1.PythonSpec{ + Python: v1alpha1.Python{ Image: "img:1", }, Exporter: v1alpha1.Exporter{ From 4851c336f3baddf08e90b6160cdd0df21cb5ed69 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 22 Nov 2021 11:12:18 +0100 Subject: [PATCH 0349/1234] Add upgrade for Instrumentation kind (#548) * Add upgrade procedure for Instrumentation Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_webhook.go | 2 +- ...emetry-operator.clusterserviceversion.yaml | 2 + config/rbac/role.yaml | 2 + main.go | 17 +++- pkg/instrumentation/upgrade/upgrade.go | 78 +++++++++++++++++++ .../upgrade/upgrade_suite_test.go | 67 ++++++++++++++++ pkg/instrumentation/upgrade/upgrade_test.go | 76 ++++++++++++++++++ 7 files changed, 241 insertions(+), 3 deletions(-) create mode 100644 pkg/instrumentation/upgrade/upgrade.go create mode 100644 pkg/instrumentation/upgrade/upgrade_suite_test.go create mode 100644 pkg/instrumentation/upgrade/upgrade_test.go diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index f80dffc35..b1a8267d5 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -25,7 +25,7 @@ import ( ) const ( - AnnotationDefaultAutoInstrumentationJava = "opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" ) // log is for logging in this package. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0bfb819ae..6fc6d98d7 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -196,6 +196,8 @@ spec: verbs: - get - list + - patch + - update - watch - apiGroups: - opentelemetry.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 328ef1e58..bba28bd15 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -108,6 +108,8 @@ rules: verbs: - get - list + - patch + - update - watch - apiGroups: - opentelemetry.io diff --git a/main.go b/main.go index 5d9d5b46b..f70438c09 100644 --- a/main.go +++ b/main.go @@ -40,8 +40,9 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation" + instrumentationupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" // +kubebuilder:scaffold:imports ) @@ -152,7 +153,19 @@ func main() { // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { - return upgrade.ManagedInstances(c, ctrl.Log.WithName("upgrade"), v, mgr.GetClient()) + return collectorupgrade.ManagedInstances(c, ctrl.Log.WithName("collector-upgrade"), v, mgr.GetClient()) + })) + if err != nil { + setupLog.Error(err, "failed to upgrade managed instances") + } + // adds the upgrade mechanism to be executed once the manager is ready + err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { + u := &instrumentationupgrade.InstrumentationUpgrade{ + Logger: ctrl.Log.WithName("instrumentation-upgrade"), + DefaultAutoInstrJava: autoInstrumentationJava, + Client: mgr.GetClient(), + } + return u.ManagedInstances(c) })) if err != nil { setupLog.Error(err, "failed to upgrade managed instances") diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go new file mode 100644 index 000000000..e15aaab15 --- /dev/null +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "context" + "fmt" + "reflect" + + "github.com/go-logr/logr" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +type InstrumentationUpgrade struct { + Logger logr.Logger + DefaultAutoInstrJava string + Client client.Client +} + +//+kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch + +// ManagedInstances upgrades managed instances by the opentelemetry-operator. +func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { + u.Logger.Info("looking for managed Instrumentation instances to upgrade") + + opts := []client.ListOption{ + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &v1alpha1.InstrumentationList{} + if err := u.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + toUpgrade := list.Items[i] + upgraded := u.upgrade(ctx, toUpgrade) + if !reflect.DeepEqual(upgraded, toUpgrade) { + // use update instead of patch because the patch does not upgrade annotations + if err := u.Client.Update(ctx, &upgraded); err != nil { + u.Logger.Error(err, "failed to apply changes to instance", "name", upgraded.Name, "namespace", upgraded.Namespace) + continue + } + } + } + + if len(list.Items) == 0 { + u.Logger.Info("no instances to upgrade") + } + return nil +} + +func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) v1alpha1.Instrumentation { + autoInstJava := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] + if autoInstJava != "" { + // upgrade the image only if the image matches the annotation + if inst.Spec.Java.Image == autoInstJava { + inst.Spec.Java.Image = u.DefaultAutoInstrJava + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstrJava + } + } + return inst +} diff --git a/pkg/instrumentation/upgrade/upgrade_suite_test.go b/pkg/instrumentation/upgrade/upgrade_suite_test.go new file mode 100644 index 000000000..fb3891f9e --- /dev/null +++ b/pkg/instrumentation/upgrade/upgrade_suite_test.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "os" + "path/filepath" + "testing" + + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var k8sClient client.Client +var testEnv *envtest.Environment +var testScheme = scheme.Scheme + +func TestMain(m *testing.M) { + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{ + filepath.Join("..", "..", "..", "config", "crd", "bases"), + }, + } + + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go new file mode 100644 index 000000000..5baa97d9a --- /dev/null +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "context" + "strings" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestUpgrade(t *testing.T) { + nsName := strings.ToLower(t.Name()) + err := k8sClient.Create(context.Background(), &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsName, + }, + }) + require.NoError(t, err) + + inst := &v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-inst", + Namespace: nsName, + Annotations: map[string]string{ + v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", + }, + }, + Spec: v1alpha1.InstrumentationSpec{ + Sampler: v1alpha1.Sampler{ + Type: v1alpha1.ParentBasedAlwaysOff, + }, + }, + } + inst.Default() + assert.Equal(t, "java:1", inst.Spec.Java.Image) + err = k8sClient.Create(context.Background(), inst) + require.NoError(t, err) + + up := &InstrumentationUpgrade{ + Logger: logr.Discard(), + DefaultAutoInstrJava: "java:2", + Client: k8sClient, + } + err = up.ManagedInstances(context.Background()) + require.NoError(t, err) + + updated := v1alpha1.Instrumentation{} + err = k8sClient.Get(context.Background(), types.NamespacedName{ + Namespace: nsName, + Name: "my-inst", + }, &updated) + require.NoError(t, err) + assert.Equal(t, "java:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava]) + assert.Equal(t, "java:2", updated.Spec.Java.Image) +} From cb2472adcb8ca1e86091b750655c118a0c1df9e9 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 22 Nov 2021 16:08:53 +0100 Subject: [PATCH 0350/1234] Add support for better service name and k8s resource attrs (#542) * Add support for better service name and k8s resource attrs Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Update comment Signed-off-by: Pavol Loffay * Update comment Signed-off-by: Pavol Loffay * Update comment Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Rename Signed-off-by: Pavol Loffay * Rename Signed-off-by: Pavol Loffay * Fix type Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_types.go | 17 ++- apis/v1alpha1/zz_generated.deepcopy.go | 30 +++- ...emetry-operator.clusterserviceversion.yaml | 8 ++ .../opentelemetry.io_instrumentations.yaml | 19 ++- .../opentelemetry.io_instrumentations.yaml | 19 ++- config/rbac/role.yaml | 8 ++ docs/api.md | 40 +++++- go.mod | 1 + go.sum | 3 + internal/webhookhandler/webhookhandler.go | 1 + .../instrumentation_suite_test.go | 65 +++++++++ pkg/instrumentation/podmutator.go | 11 +- pkg/instrumentation/podmutator_test.go | 42 ------ pkg/instrumentation/sdk.go | 136 ++++++++++++++---- pkg/instrumentation/sdk_test.go | 121 ++++++++++++++-- tests/e2e/instrumentation-java/01-assert.yaml | 2 +- .../e2e/instrumentation-nodejs/01-assert.yaml | 2 +- .../e2e/instrumentation-python/01-assert.yaml | 2 +- 18 files changed, 417 insertions(+), 110 deletions(-) create mode 100644 pkg/instrumentation/instrumentation_suite_test.go diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 2514eeb59..de60bdfc5 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -24,9 +24,9 @@ type InstrumentationSpec struct { // +optional Exporter `json:"exporter,omitempty"` - // ResourceAttributes defines attributes that are added to resource. + // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. // +optional - ResourceAttributes map[string]string `json:"resourceAttributes,omitempty"` + Resource Resource `json:"resource,omitempty"` // Propagators defines inter-process context propagation configuration. // +optional @@ -49,6 +49,19 @@ type InstrumentationSpec struct { Python Python `json:"python,omitempty"` } +// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. +// See also: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/overview.md#resources +type Resource struct { + // Attributes defines attributes that are added to the resource. + // For example environment: dev + // +optional + Attributes map[string]string `json:"resourceAttributes,omitempty"` + + // AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid). + // +optional + AddK8sUIDAttributes bool `json:"addK8sUIDAttributes,omitempty"` +} + // Exporter defines OTLP exporter configuration. type Exporter struct { // Endpoint is address of the collector with OTLP endpoint. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 54fdb8d1e..33b64ad55 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -102,13 +102,7 @@ func (in *InstrumentationList) DeepCopyObject() runtime.Object { func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { *out = *in out.Exporter = in.Exporter - if in.ResourceAttributes != nil { - in, out := &in.ResourceAttributes, &out.ResourceAttributes - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } + in.Resource.DeepCopyInto(&out.Resource) if in.Propagators != nil { in, out := &in.Propagators, &out.Propagators *out = make([]Propagator, len(*in)) @@ -379,6 +373,28 @@ func (in *Python) DeepCopy() *Python { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Resource) DeepCopyInto(out *Resource) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. +func (in *Resource) DeepCopy() *Resource { + if in == nil { + return nil + } + out := new(Resource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sampler) DeepCopyInto(out *Sampler) { *out = *in diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 6fc6d98d7..b774f8c4f 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -168,6 +168,14 @@ spec: - patch - update - watch + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - list + - watch - apiGroups: - apps resources: diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index b278d75fb..aa70aabcd 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -87,11 +87,20 @@ spec: description: Image is a container image with Python SDK and auto-instrumentation. type: string type: object - resourceAttributes: - additionalProperties: - type: string - description: ResourceAttributes defines attributes that are added - to resource. + resource: + description: Resource defines the configuration for the resource attributes, + as defined by the OpenTelemetry specification. + properties: + addK8sUIDAttributes: + description: AddK8sUIDAttributes defines whether K8s UID attributes + should be collected (e.g. k8s.deployment.uid). + type: boolean + resourceAttributes: + additionalProperties: + type: string + description: 'Attributes defines attributes that are added to + the resource. For example environment: dev' + type: object type: object sampler: description: Sampler defines sampling configuration. diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index bc9541c3b..4626ce2c2 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -89,11 +89,20 @@ spec: description: Image is a container image with Python SDK and auto-instrumentation. type: string type: object - resourceAttributes: - additionalProperties: - type: string - description: ResourceAttributes defines attributes that are added - to resource. + resource: + description: Resource defines the configuration for the resource attributes, + as defined by the OpenTelemetry specification. + properties: + addK8sUIDAttributes: + description: AddK8sUIDAttributes defines whether K8s UID attributes + should be collected (e.g. k8s.deployment.uid). + type: boolean + resourceAttributes: + additionalProperties: + type: string + description: 'Attributes defines attributes that are added to + the resource. For example environment: dev' + type: object type: object sampler: description: Sampler defines sampling configuration. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index bba28bd15..f4ab647d8 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -80,6 +80,14 @@ rules: - patch - update - watch +- apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - list + - watch - apiGroups: - apps resources: diff --git a/docs/api.md b/docs/api.md index 3c045ae26..84abec6d1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -121,10 +121,10 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen false - resourceAttributes - map[string]string + resource + object - ResourceAttributes defines attributes that are added to resource.
+ Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
false @@ -246,6 +246,40 @@ Python defines configuration for python auto-instrumentation. +### Instrumentation.spec.resource +[↩ Parent](#instrumentationspec) + + + +Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
addK8sUIDAttributesboolean + AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid).
+
false
resourceAttributesmap[string]string + Attributes defines attributes that are added to the resource. For example environment: dev
+
false
+ + ### Instrumentation.spec.sampler [↩ Parent](#instrumentationspec) diff --git a/go.mod b/go.mod index 215848bad..70fe8fe3e 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 + go.opentelemetry.io/otel v1.2.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.22.4 k8s.io/apimachinery v0.22.4 diff --git a/go.sum b/go.sum index 9603e0a30..c641e8778 100644 --- a/go.sum +++ b/go.sum @@ -1055,6 +1055,8 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel v1.2.0 h1:YOQDvxO1FayUcT9MIhJhgMyNO1WqoduiyvQHzGN0kUQ= +go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1062,6 +1064,7 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go index 147907589..c9aba7a6b 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhookhandler/webhookhandler.go @@ -33,6 +33,7 @@ import ( // +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch +// +kubebuilder:rbac:groups="apps",resources=replicasets,verbs=get;list;watch var _ WebhookHandler = (*podSidecarInjector)(nil) diff --git a/pkg/instrumentation/instrumentation_suite_test.go b/pkg/instrumentation/instrumentation_suite_test.go new file mode 100644 index 000000000..a5fb3c46b --- /dev/null +++ b/pkg/instrumentation/instrumentation_suite_test.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "os" + "path/filepath" + "testing" + + "k8s.io/client-go/kubernetes/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var k8sClient client.Client +var testEnv *envtest.Environment +var testScheme = scheme.Scheme + +func TestMain(m *testing.M) { + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + } + + cfg, err := testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 49545c3f5..ba40d73b5 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -34,8 +34,9 @@ var ( ) type instPodMutator struct { - Logger logr.Logger - Client client.Client + Logger logr.Logger + Client client.Client + sdkInjector *sdkInjector } type languageInstrumentations struct { @@ -50,6 +51,10 @@ func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { return &instPodMutator{ Logger: logger, Client: client, + sdkInjector: &sdkInjector{ + logger: logger, + client: client, + }, } } @@ -91,7 +96,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, // we should inject the instrumentation. - return inject(pm.Logger, insts, ns, pod), nil + return pm.sdkInjector.inject(ctx, insts, ns, pod), nil } func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, pod corev1.Pod, instAnnotation string) (*v1alpha1.Instrumentation, error) { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index b68feed13..a3a194d9d 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -17,8 +17,6 @@ package instrumentation import ( "context" "fmt" - "os" - "path/filepath" "testing" "github.com/go-logr/logr" @@ -26,50 +24,10 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme = scheme.Scheme - -func TestMain(m *testing.M) { - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, - } - - cfg, err := testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err := v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} - func TestMutatePod(t *testing.T) { mutator := NewMutator(logr.Discard(), k8sClient) require.NotNil(t, mutator) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 430ef2146..d31308579 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -15,13 +15,20 @@ package instrumentation import ( + "context" "fmt" "sort" "strings" "unsafe" "github.com/go-logr/logr" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -39,7 +46,13 @@ const ( ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func inject(logger logr.Logger, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { + +type sdkInjector struct { + logger logr.Logger + client client.Client +} + +func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { if len(pod.Spec.Containers) < 1 { return pod } @@ -48,36 +61,35 @@ func inject(logger logr.Logger, insts languageInstrumentations, ns corev1.Namesp // in the future we can define an annotation to configure this if insts.Java != nil { otelinst := *insts.Java - logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectCommonSDKConfig(otelinst, ns, pod) - pod = injectJavaagent(logger, otelinst.Spec.Java, pod) + i.logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectJavaagent(i.logger, otelinst.Spec.Java, pod) } if insts.NodeJS != nil { otelinst := *insts.NodeJS - logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectCommonSDKConfig(otelinst, ns, pod) - pod = injectNodeJSSDK(logger, otelinst.Spec.NodeJS, pod) + i.logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectNodeJSSDK(i.logger, otelinst.Spec.NodeJS, pod) } if insts.Python != nil { otelinst := *insts.Python - logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectCommonSDKConfig(otelinst, ns, pod) - pod = injectPythonSDK(logger, otelinst.Spec.Python, pod) + i.logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectPythonSDK(i.logger, otelinst.Spec.Python, pod) } return pod } -func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { +func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { container := &pod.Spec.Containers[0] + resourceMap := i.createResourceMap(ctx, otelinst, ns, pod) idx := getIndexOfEnv(container.Env, envOTELServiceName) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELServiceName, - // TODO use more meaningful service name - e.g. deployment name - Value: container.Name, + Name: envOTELServiceName, + Value: chooseServiceName(pod, resourceMap), }) } - idx = getIndexOfEnv(container.Env, envOTELExporterOTLPEndpoint) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ @@ -86,7 +98,6 @@ func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespac }) } idx = getIndexOfEnv(container.Env, envOTELResourceAttrs) - resourceMap := createResourceMap(otelinst, ns, pod) resStr := resourceMapToStr(resourceMap) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ @@ -129,9 +140,28 @@ func injectCommonSDKConfig(otelinst v1alpha1.Instrumentation, ns corev1.Namespac return pod } +func chooseServiceName(pod corev1.Pod, resources map[string]string) string { + if name := resources[string(semconv.K8SDeploymentNameKey)]; name != "" { + return name + } + if name := resources[string(semconv.K8SStatefulSetNameKey)]; name != "" { + return name + } + if name := resources[string(semconv.K8SJobNameKey)]; name != "" { + return name + } + if name := resources[string(semconv.K8SCronJobNameKey)]; name != "" { + return name + } + if name := resources[string(semconv.K8SPodNameKey)]; name != "" { + return name + } + return pod.Spec.Containers[0].Name +} + // createResourceMap creates resource attribute map. // User defined attributes (in explicitly set env var) have higher precedence. -func createResourceMap(otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) map[string]string { +func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) map[string]string { // get existing resources env var and parse it into a map existingRes := map[string]bool{} existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[0].Env, envOTELResourceAttrs) @@ -147,27 +177,75 @@ func createResourceMap(otelinst v1alpha1.Instrumentation, ns corev1.Namespace, p } res := map[string]string{} - for k, v := range otelinst.Spec.ResourceAttributes { + for k, v := range otelinst.Spec.Resource.Attributes { if !existingRes[k] { res[k] = v } } - if !existingRes["k8s.namespace.name"] { - res["k8s.namespace.name"] = ns.Name - } - if pod.Name != "" { - // The pod name might be empty if the pod is created form deployment template - if !existingRes["k8s.pod.name"] { - res["k8s.pod.name"] = pod.Name + + k8sResources := map[attribute.Key]string{} + k8sResources[semconv.K8SNamespaceNameKey] = ns.Name + k8sResources[semconv.K8SContainerNameKey] = pod.Spec.Containers[0].Name + // Some fields might be empty - node name, pod name + // The pod name might be empty if the pod is created form deployment template + k8sResources[semconv.K8SPodNameKey] = pod.Name + k8sResources[semconv.K8SPodUIDKey] = string(pod.UID) + k8sResources[semconv.K8SNodeNameKey] = pod.Spec.NodeName + i.addParentResourceLabels(ctx, otelinst.Spec.Resource.AddK8sUIDAttributes, ns, pod.ObjectMeta, k8sResources) + for k, v := range k8sResources { + if !existingRes[string(k)] && v != "" { + res[string(k)] = v } } - if !existingRes["k8s.container.name"] { - res["k8s.container.name"] = pod.Spec.Containers[0].Name - } - // TODO add more attributes once the parent object (deployment) is accessible here return res } +func (i *sdkInjector) addParentResourceLabels(ctx context.Context, uid bool, ns corev1.Namespace, objectMeta metav1.ObjectMeta, resources map[attribute.Key]string) { + for _, owner := range objectMeta.OwnerReferences { + switch strings.ToLower(owner.Kind) { + case "replicaset": + resources[semconv.K8SReplicaSetNameKey] = owner.Name + if uid { + resources[semconv.K8SReplicaSetUIDKey] = string(owner.UID) + } + // parent of ReplicaSet is e.g. Deployment which we are interested to know + rs := appsv1.ReplicaSet{} + // ignore the error. The object might not exist, the error is not important, getting labels is just the best effort + //nolint:errcheck + i.client.Get(ctx, types.NamespacedName{ + Namespace: ns.Name, + Name: owner.Name, + }, &rs) + i.addParentResourceLabels(ctx, uid, ns, rs.ObjectMeta, resources) + case "deployment": + resources[semconv.K8SDeploymentNameKey] = owner.Name + if uid { + resources[semconv.K8SDeploymentUIDKey] = string(owner.UID) + } + case "statefulset": + resources[semconv.K8SStatefulSetNameKey] = owner.Name + if uid { + resources[semconv.K8SStatefulSetUIDKey] = string(owner.UID) + } + case "daemonset": + resources[semconv.K8SDaemonSetNameKey] = owner.Name + if uid { + resources[semconv.K8SDaemonSetUIDKey] = string(owner.UID) + } + case "job": + resources[semconv.K8SJobNameKey] = owner.Name + if uid { + resources[semconv.K8SJobUIDKey] = string(owner.UID) + } + case "cronjob": + resources[semconv.K8SCronJobNameKey] = owner.Name + if uid { + resources[semconv.K8SCronJobUIDKey] = string(owner.UID) + } + } + } +} + func resourceMapToStr(res map[string]string) string { keys := make([]string, 0, len(res)) for k := range res { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 8d465a01b..30005f7b8 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -15,11 +15,14 @@ package instrumentation import ( + "context" "fmt" "testing" "github.com/go-logr/logr" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -27,6 +30,66 @@ import ( ) func TestSDKInjection(t *testing.T) { + ns := corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "project1", + }, + } + err := k8sClient.Create(context.Background(), &ns) + require.NoError(t, err) + dep := appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "my-deployment", + UID: "depuid", + }, + Spec: appsv1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{"app": "my"}, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"app": "my"}, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{Name: "app", Image: "foo:bar"}}, + }, + }, + }, + } + err = k8sClient.Create(context.Background(), &dep) + require.NoError(t, err) + rs := appsv1.ReplicaSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-replicaset", + Namespace: "project1", + UID: "rsuid", + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "Deployment", + APIVersion: "apps/v1", + Name: "my-deployment", + UID: "depuid", + }, + }, + }, + Spec: appsv1.ReplicaSetSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{"app": "my"}, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"app": "my"}, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{{Name: "app", Image: "foo:bar"}}, + }, + }, + }, + } + err = k8sClient.Create(context.Background(), &rs) + require.NoError(t, err) + tests := []struct { name string inst v1alpha1.Instrumentation @@ -40,6 +103,9 @@ func TestSDKInjection(t *testing.T) { Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4317", }, + Resource: v1alpha1.Resource{ + AddK8sUIDAttributes: true, + }, Propagators: []v1alpha1.Propagator{"b3", "jaeger"}, Sampler: v1alpha1.Sampler{ Type: "parentbased_traceidratio", @@ -51,6 +117,15 @@ func TestSDKInjection(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Namespace: "project1", Name: "app", + UID: "pod-uid", + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "ReplicaSet", + Name: "my-replicaset", + UID: "rsuid", + APIVersion: "apps/v1", + }, + }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -64,6 +139,15 @@ func TestSDKInjection(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Namespace: "project1", Name: "app", + UID: "pod-uid", + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "ReplicaSet", + Name: "my-replicaset", + UID: "rsuid", + APIVersion: "apps/v1", + }, + }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -72,7 +156,7 @@ func TestSDKInjection(t *testing.T) { Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", - Value: "application-name", + Value: "my-deployment", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", @@ -80,7 +164,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.namespace.name=project1,k8s.pod.name=app", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", }, { Name: "OTEL_PROPAGATORS", @@ -107,8 +191,10 @@ func TestSDKInjection(t *testing.T) { Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4317", }, - ResourceAttributes: map[string]string{ - "fromcr": "val", + Resource: v1alpha1.Resource{ + Attributes: map[string]string{ + "fromcr": "val", + }, }, Propagators: []v1alpha1.Propagator{"jaeger"}, Sampler: v1alpha1.Sampler{ @@ -190,7 +276,10 @@ func TestSDKInjection(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectCommonSDKConfig(test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) + inj := sdkInjector{ + client: k8sClient, + } + pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) assert.Equal(t, test.expected, pod) }) } @@ -210,7 +299,10 @@ func TestInjectJava(t *testing.T) { insts := languageInstrumentations{ Java: &inst, } - pod := inject(logr.Discard(), insts, + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), insts, corev1.Namespace{}, corev1.Pod{ Spec: corev1.PodSpec{ @@ -262,7 +354,7 @@ func TestInjectJava(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=", + Value: "k8s.container.name=app", }, { Name: "JAVA_TOOL_OPTIONS", @@ -289,7 +381,10 @@ func TestInjectNodeJS(t *testing.T) { insts := languageInstrumentations{ NodeJS: &inst, } - pod := inject(logr.Discard(), insts, + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), insts, corev1.Namespace{}, corev1.Pod{ Spec: corev1.PodSpec{ @@ -341,7 +436,7 @@ func TestInjectNodeJS(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=", + Value: "k8s.container.name=app", }, { Name: "NODE_OPTIONS", @@ -368,7 +463,11 @@ func TestInjectPython(t *testing.T) { insts := languageInstrumentations{ Python: &inst, } - pod := inject(logr.Discard(), insts, + + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), insts, corev1.Namespace{}, corev1.Pod{ Spec: corev1.PodSpec{ @@ -420,7 +519,7 @@ func TestInjectPython(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=", + Value: "k8s.container.name=app", }, { Name: "PYTHONPATH", diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index a6da38d36..b1eb77405 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -11,7 +11,7 @@ spec: - name: myapp env: - name: OTEL_SERVICE_NAME - value: myapp + value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_RESOURCE_ATTRIBUTES diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index db5ff8355..08c340bb5 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -11,7 +11,7 @@ spec: - name: myapp env: - name: OTEL_SERVICE_NAME - value: myapp + value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_RESOURCE_ATTRIBUTES diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index c4a4e54fe..4fa089764 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -11,7 +11,7 @@ spec: - name: myapp env: - name: OTEL_SERVICE_NAME - value: myapp + value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4318/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES From 10325b06aed0c2533e7c916afe07ef9442dcb3dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 00:21:43 +0530 Subject: [PATCH 0351/1234] Bump actions/cache from 2.1.6 to 2.1.7 (#572) Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.6...v2.1.7) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 3ffb8f90c..7c23b4766 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -45,7 +45,7 @@ jobs: uses: docker/setup-buildx-action@v1.6.0 - name: Cache Docker layers - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From 47e990d0a1ef6da2088ef5a4fab3fe11ccadef74 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 24 Nov 2021 09:36:49 +0100 Subject: [PATCH 0352/1234] Add some resource attributes via k8s downward API (#570) * Add some resource attributes via k8s downward API Pod name, UID, and node name might not be set in pod object in webhook. Signed-off-by: Pavol Loffay --- pkg/instrumentation/podmutator_test.go | 54 ++++++++++++- pkg/instrumentation/sdk.go | 43 +++++++++++ pkg/instrumentation/sdk_test.go | 77 +++++++++++++++++-- tests/e2e/instrumentation-java/01-assert.yaml | 2 + .../e2e/instrumentation-nodejs/01-assert.yaml | 2 + .../e2e/instrumentation-python/01-assert.yaml | 2 + 6 files changed, 172 insertions(+), 8 deletions(-) diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index a3a194d9d..2512fd832 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -110,9 +110,25 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://collector:12345", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=javaagent", + Value: "k8s.container.name=app,k8s.namespace.name=javaagent,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "JAVA_TOOL_OPTIONS", @@ -203,9 +219,25 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://collector:12345", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=nodejs", + Value: "k8s.container.name=app,k8s.namespace.name=nodejs,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "NODE_OPTIONS", @@ -296,9 +328,25 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://collector:12345", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=python", + Value: "k8s.container.name=app,k8s.namespace.name=python,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "PYTHONPATH", diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index d31308579..9668b9130 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -43,6 +43,10 @@ const ( envOTELPropagators = "OTEL_PROPAGATORS" envOTELTracesSampler = "OTEL_TRACES_SAMPLER" envOTELTracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG" + + envPodName = "OTEL_RESOURCE_ATTRIBUTES_POD_NAME" + envPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID" + envNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -97,6 +101,44 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph Value: otelinst.Spec.Endpoint, }) } + + // Some attributes might be empty, we should get them via k8s downward API + if resourceMap[string(semconv.K8SPodNameKey)] == "" { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envPodName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }) + resourceMap[string(semconv.K8SPodNameKey)] = fmt.Sprintf("$(%s)", envPodName) + } + if otelinst.Spec.Resource.AddK8sUIDAttributes { + if resourceMap[string(semconv.K8SPodUIDKey)] == "" { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envPodUID, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.uid", + }, + }, + }) + resourceMap[string(semconv.K8SPodUIDKey)] = fmt.Sprintf("$(%s)", envPodUID) + } + } + if resourceMap[string(semconv.K8SNodeNameKey)] == "" { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envNodeName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }) + resourceMap[string(semconv.K8SNodeNameKey)] = fmt.Sprintf("$(%s)", envNodeName) + } + idx = getIndexOfEnv(container.Env, envOTELResourceAttrs) resStr := resourceMapToStr(resourceMap) if idx == -1 { @@ -110,6 +152,7 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph } container.Env[idx].Value += resStr } + idx = getIndexOfEnv(container.Env, envOTELPropagators) if idx == -1 && len(otelinst.Spec.Propagators) > 0 { propagators := *(*[]string)((unsafe.Pointer(&otelinst.Spec.Propagators))) diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 30005f7b8..6f6c089d7 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -16,6 +16,7 @@ package instrumentation import ( "context" + "encoding/json" "fmt" "testing" @@ -162,9 +163,17 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4317", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", }, { Name: "OTEL_PROPAGATORS", @@ -256,7 +265,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.pod.name=app", + Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app", }, { Name: "OTEL_PROPAGATORS", @@ -266,6 +275,14 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_TRACES_SAMPLER", Value: "always_on", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, }, }, }, @@ -280,6 +297,8 @@ func TestSDKInjection(t *testing.T) { client: k8sClient, } pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) + b, _ := json.MarshalIndent(pod, "", " ") + fmt.Println(string(b)) assert.Equal(t, test.expected, pod) }) } @@ -352,9 +371,25 @@ func TestInjectJava(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4317", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "JAVA_TOOL_OPTIONS", @@ -434,9 +469,25 @@ func TestInjectNodeJS(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4318", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "NODE_OPTIONS", @@ -517,9 +568,25 @@ func TestInjectPython(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "https://collector:4318", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, { Name: "PYTHONPATH", diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index b1eb77405..63b4bd833 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -14,6 +14,8 @@ spec: value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index 08c340bb5..b796a5b8e 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -14,6 +14,8 @@ spec: value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index 4fa089764..35ea2acb8 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -14,6 +14,8 @@ spec: value: my-deployment-with-sidecar - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4318/v1/traces + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 From b021b182c03cb2dbb0b7c62d9d3855b3dd871824 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 24 Nov 2021 09:37:38 +0100 Subject: [PATCH 0353/1234] Refactor collector types to align with k8s naming conventions (#564) The Spec suffix is used only for the first object in the kind. Signed-off-by: Pavol Loffay --- apis/v1alpha1/opentelemetrycollector_types.go | 24 +++++++++---------- apis/v1alpha1/zz_generated.deepcopy.go | 8 +++---- pkg/collector/reconcile/configmap_test.go | 2 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/targetallocator/container_test.go | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 7e06a9a39..04f35c07d 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -43,7 +43,7 @@ type OpenTelemetryCollectorSpec struct { // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. // +optional - TargetAllocator OpenTelemetryTargetAllocatorSpec `json:"targetAllocator,omitempty"` + TargetAllocator OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"` // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional @@ -110,6 +110,17 @@ type OpenTelemetryCollectorSpec struct { PodAnnotations map[string]string `json:"podAnnotations,omitempty"` } +// OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. +type OpenTelemetryTargetAllocator struct { + // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. + // +optional + Enabled bool `json:"enabled,omitempty"` + + // Image indicates the container image to use for the OpenTelemetry TargetAllocator. + // +optional + Image string `json:"image,omitempty"` +} + // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. type OpenTelemetryCollectorStatus struct { // Replicas is currently not being set and might be removed in the next version. @@ -126,17 +137,6 @@ type OpenTelemetryCollectorStatus struct { Messages []string `json:"messages,omitempty"` } -// OpenTelemetryTargetAllocatorSpec defines the configurations for the Prometheus target allocator. -type OpenTelemetryTargetAllocatorSpec struct { - // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. - // +optional - Enabled bool `json:"enabled,omitempty"` - - // Image indicates the container image to use for the OpenTelemetry TargetAllocator. - // +optional - Image string `json:"image,omitempty"` -} - // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 33b64ad55..20b2a4e64 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -344,16 +344,16 @@ func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryTargetAllocatorSpec) DeepCopyInto(out *OpenTelemetryTargetAllocatorSpec) { +func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocatorSpec. -func (in *OpenTelemetryTargetAllocatorSpec) DeepCopy() *OpenTelemetryTargetAllocatorSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. +func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator { if in == nil { return nil } - out := new(OpenTelemetryTargetAllocatorSpec) + out := new(OpenTelemetryTargetAllocator) in.DeepCopyInto(out) return out } diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index e0ebac828..607c651ea 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -234,7 +234,7 @@ func TestExpectedConfigMap(t *testing.T) { }, NodePort: 0, }}, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, }, Config: "", diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index ba7c2c0dd..623f7dd53 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -165,7 +165,7 @@ func newParams(taContainerImage string, file string) (Params, error) { }, NodePort: 0, }}, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: taContainerImage, }, diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 359a799d2..504e6526c 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -43,7 +43,7 @@ func TestContainerWithImageOverridden(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: "overridden-image", }, @@ -62,7 +62,7 @@ func TestContainerVolumes(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocatorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: "default-image", }, From 1a4ff8f50094aca80b39f66456832efcc48b1d8d Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 25 Nov 2021 23:56:41 +0530 Subject: [PATCH 0354/1234] Add 0.39.0 upgrade routine (#578) Add 0.39.0 upgrade routine --- pkg/collector/upgrade/v0_24_0_test.go | 2 +- pkg/collector/upgrade/v0_39_0.go | 120 ++++++++++++++++++++ pkg/collector/upgrade/v0_39_0_test.go | 157 ++++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + 4 files changed, 282 insertions(+), 1 deletion(-) create mode 100644 pkg/collector/upgrade/v0_39_0.go create mode 100644 pkg/collector/upgrade/v0_39_0_test.go diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index db314e8dc..87e1c6ef9 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -57,7 +57,7 @@ func TestHealthCheckEndpointMigration(t *testing.T) { // verify assert.Equal(t, `extensions: - health_check: null + health_check: health_check/1: "" health_check/2: endpoint: localhost:13133 diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go new file mode 100644 index 000000000..11ec6e789 --- /dev/null +++ b/pkg/collector/upgrade/v0_39_0.go @@ -0,0 +1,120 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_39_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to parse configuration: %w", err) + } + + // Remove processors.memory_limiter.ballast_size_mib + // as it is deprecated in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4365 + processors, _ := cfg["processors"].(map[interface{}]interface{}) + + for k1, v1 := range processors { + // Drop the deprecated field ballast_size_mib from memory_limiter + if strings.HasPrefix(k1.(string), "memory_limiter") { + memoryLimiter, _ := v1.(map[interface{}]interface{}) + for k2 := range memoryLimiter { + if k2 == "ballast_size_mib" { + delete(memoryLimiter, k2) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", k1)) + } + } + } + } + + otelcol, err = updateConfig(otelcol, cfg) + if err != nil { + return otelcol, err + } + + // Rename httpd receiver to apache receiver + // in reference to https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/6207 + receivers, _ := cfg["receivers"].(map[interface{}]interface{}) + + for k1, v1 := range receivers { + if strings.HasPrefix(k1.(string), "httpd") { + // Rename httpd with apache + apacheKey := strings.Replace(k1.(string), "httpd", "apache", 1) + receivers[apacheKey] = v1 + delete(receivers, k1) + + // rename receiver name in service pipelines config + serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) + if !ok { + // no serviceConfig? + return otelcol, nil + } + + pipelinesConfig, ok := serviceConfig["pipelines"].(map[interface{}]interface{}) + if !ok { + // no pipelinesConfig? + return otelcol, nil + } + + for k2, v2 := range pipelinesConfig { + if k2.(string) == "metrics" { + metricsConfig, ok := v2.(map[interface{}]interface{}) + if !ok { + // no metricsConfig in service pipelines? + return otelcol, nil + } + for k3, v3 := range metricsConfig { + if k3.(string) == "receivers" { + receiversList, ok := v3.([]interface{}) + if !ok { + // no receivers list in service pipeline? + return otelcol, nil + } + for i, k4 := range receiversList { + if strings.HasPrefix(k4.(string), "httpd") { + receiversList[i] = strings.Replace(k4.(string), "httpd", "apache", 1) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.39.0 has renamed the %s to %s receiver", k4.(string), receiversList[i])) + } + } + } + } + } + } + } + } + + return updateConfig(otelcol, cfg) +} + +func updateConfig(otelcol *v1alpha1.OpenTelemetryCollector, cfg map[interface{}]interface{}) (*v1alpha1.OpenTelemetryCollector, error) { + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to marshall back configuration: %w", err) + } + + // Note: This is a hack to drop null occurrences from our config parsing above in upgrade routine + otelcol.Spec.Config = strings.ReplaceAll(string(res), " null", "") + + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go new file mode 100644 index 000000000..fd529f339 --- /dev/null +++ b/pkg/collector/upgrade/v0_39_0_test.go @@ -0,0 +1,157 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_39_0Upgrade(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: + httpd/mtls: + protocols: + http: + endpoint: mysite.local:55690 + + httpd: + +processors: + memory_limiter: + memory_limiter/with-settings: + check_interval: 5s + limit_mib: 4000 + spike_limit_mib: 500 + ballast_size_mib: 2000 + +service: + pipelines: + metrics: + receivers: [httpd/mtls, httpd] + exporters: [nop] +`, + }, + } + existing.Status.Version = "0.38.0" + + // TESTCASE 1: verify httpd receiver renamed to apache + // drop processors.memory_limiter field 'ballast_size_mib' + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + assert.Equal(t, `processors: + memory_limiter: + memory_limiter/with-settings: + check_interval: 5s + limit_mib: 4000 + spike_limit_mib: 500 +receivers: + apache: + apache/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + metrics: + exporters: + - nop + receivers: + - apache/mtls + - apache +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.39.0 has dropped the ballast_size_mib field name from memory_limiter/with-settings processor", res.Status.Messages[0]) + assert.Equal(t, "upgrade to v0.39.0 has renamed the httpd/mtls to apache/mtls receiver", res.Status.Messages[1]) + assert.Equal(t, "upgrade to v0.39.0 has renamed the httpd to apache receiver", res.Status.Messages[2]) + + // TESTCASE 2: Drop ballast_size_mib from memory_limiter processor + existing1 := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 + + otlp: + +processors: + memory_limiter: + memory_limiter/with-settings: + check_interval: 5s + limit_mib: 4000 + spike_limit_mib: 500 + ballast_size_mib: 2000 + +service: + pipelines: + traces: + receivers: [otlp/mtls, otlp] + exporters: [nop] +`, + }, + } + + existing1.Status.Version = "0.38.0" + res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing1) + assert.NoError(t, err) + + // verify + assert.Equal(t, `processors: + memory_limiter: + memory_limiter/with-settings: + check_interval: 5s + limit_mib: 4000 + spike_limit_mib: 500 +receivers: + otlp: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + traces: + exporters: + - nop + receivers: + - otlp/mtls + - otlp +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.39.0 has dropped the ballast_size_mib field name from memory_limiter/with-settings processor", res.Status.Messages[0]) + +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 7b5537f7a..061dc0e1b 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -62,6 +62,10 @@ var ( Version: *semver.MustParse("0.38.0"), upgrade: upgrade0_38_0, }, + { + Version: *semver.MustParse("0.39.0"), + upgrade: upgrade0_39_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From 70271c1997183c9ab292d7841c8d9a2fc14db189 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 25 Nov 2021 23:57:04 +0530 Subject: [PATCH 0355/1234] Bump otel collector to 0.39.0 (#579) --- CHANGELOG.md | 10 ++++++++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ab9aa804..1d71fc40a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ Changes by Version ================== +0.39.0 +------------------- +* Bumped OpenTelemetry Collector to v0.39.0 +* Upgrade path for Instrumentation kind ([#548](https://github.com/open-telemetry/opentelemetry-operator/pull/548)) +* Auto-instrumentation support for python ([#532](https://github.com/open-telemetry/opentelemetry-operator/pull/532)) +* Support for `PodSecurityContext` in OpenTelemetry collector ([#469](https://github.com/open-telemetry/opentelemetry-operator/pull/469)) +* Java auto-instrumentation support is bumped to `1.7.2` ([#549](https://github.com/open-telemetry/opentelemetry-operator/pull/549)) +* Auto-instrumentation support for nodejs ([#507](https://github.com/open-telemetry/opentelemetry-operator/pull/507)) +* Sampler configuration support in instrumentation kind ([#514](https://github.com/open-telemetry/opentelemetry-operator/pull/514)) + 0.38.0 ------------------- * Bumped OpenTelemetry Collector to v0.38.0 diff --git a/README.md b/README.md index c202f531e..e3d6c7a8e 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.39.0 | v1.20 to v1.22 | 1.6.1 | | v0.38.0 | v1.20 to v1.22 | 1.6.1 | | v0.37.1 | v1.20 to v1.22 | v1.4.0 to v1.6.1 | | v0.37.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b774f8c4f..b511d3946 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.38.0 + name: opentelemetry-operator.v0.39.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -265,7 +265,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.38.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.39.0 name: manager ports: - containerPort: 9443 @@ -357,7 +357,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.38.0 + version: 0.39.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 3ca3b0219..64b87d6e7 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.38.0 +opentelemetry-collector=0.39.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.38.0 +operator=0.39.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 5d6a8aadd9ae1df94d76c94ad5876dcfc2ef647c Mon Sep 17 00:00:00 2001 From: Romain Dauby Date: Fri, 26 Nov 2021 03:21:51 -0500 Subject: [PATCH 0356/1234] Fix release image prefix (#581) --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b5e01fe85..e3966c984 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: operator-sdk-version: v1.13.1 - name: "generate release resources" - run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator/" + run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" - name: "create the release in GitHub" env: From f4d74d6dad443bcafb1d7f3654331e6b4006b0a6 Mon Sep 17 00:00:00 2001 From: Adrian Kostrubiak <72626345+adriankostrubiak-tomtom@users.noreply.github.com> Date: Fri, 26 Nov 2021 03:28:16 -0500 Subject: [PATCH 0357/1234] Add liveness probe to created container if otelcol configuration supports a health_check. (#574) * Add liveness probe to created container if otelcol configuration supports a health_check. Fixes #571 Signed-off-by: Adrian Kostrubiak --- pkg/collector/adapters/config_to_probe.go | 158 +++++++++++++++ .../adapters/config_to_probe_test.go | 187 ++++++++++++++++++ pkg/collector/container.go | 9 + pkg/collector/container_test.go | 21 ++ 4 files changed, 375 insertions(+) create mode 100644 pkg/collector/adapters/config_to_probe.go create mode 100644 pkg/collector/adapters/config_to_probe_test.go diff --git a/pkg/collector/adapters/config_to_probe.go b/pkg/collector/adapters/config_to_probe.go new file mode 100644 index 000000000..b01be9712 --- /dev/null +++ b/pkg/collector/adapters/config_to_probe.go @@ -0,0 +1,158 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters + +import ( + "errors" + "strings" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +var ( + errNoService = errors.New("no service available as part of the configuration") + errNoExtensions = errors.New("no extensions available as part of the configuration") + + errServiceNotAMap = errors.New("service property in the configuration doesn't contain valid services") + errExtensionsNotAMap = errors.New("extensions property in the configuration doesn't contain valid extensions") + + errNoExtensionHealthCheck = errors.New("extensions property in the configuration does not contain the expected health_check extension") + + errNoServiceExtensions = errors.New("service property in the configuration doesn't contain extensions") + + errServiceExtensionsNotSlice = errors.New("service extensions property in the configuration does not contain valid extensions") + errNoServiceExtensionHealthCheck = errors.New("no healthcheck extension available in service extension configuration") +) + +type probeConfiguration struct { + path string + port intstr.IntOrString +} + +const ( + defaultHealthCheckPath = "/" + defaultHealthCheckPort = 13133 +) + +// ConfigToContainerProbe converts the incoming configuration object into a container probe or returns an error. +func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, error) { + serviceProperty, ok := config["service"] + if !ok { + return nil, errNoService + } + service, ok := serviceProperty.(map[interface{}]interface{}) + if !ok { + return nil, errServiceNotAMap + } + + serviceExtensionsProperty, ok := service["extensions"] + if !ok { + return nil, errNoServiceExtensions + } + + serviceExtensions, ok := serviceExtensionsProperty.([]interface{}) + if !ok { + return nil, errServiceExtensionsNotSlice + } + healthCheckServiceExtensions := make([]string, 0) + for _, ext := range serviceExtensions { + parsedExt, ok := ext.(string) + if ok && strings.HasPrefix(parsedExt, "health_check") { + healthCheckServiceExtensions = append(healthCheckServiceExtensions, parsedExt) + } + } + + if len(healthCheckServiceExtensions) == 0 { + return nil, errNoServiceExtensionHealthCheck + } + + extensionsProperty, ok := config["extensions"] + if !ok { + return nil, errNoExtensions + } + extensions, ok := extensionsProperty.(map[interface{}]interface{}) + if !ok { + return nil, errExtensionsNotAMap + } + // in the event of multiple health_check service extensions defined, we arbitrarily take the first one found + for _, healthCheckForProbe := range healthCheckServiceExtensions { + healthCheckExtension, ok := extensions[healthCheckForProbe] + if ok { + return createProbeFromExtension(healthCheckExtension) + } + } + + return nil, errNoExtensionHealthCheck +} + +func createProbeFromExtension(extension interface{}) (*corev1.Probe, error) { + probeCfg := extractProbeConfigurationFromExtension(extension) + return &corev1.Probe{ + Handler: corev1.Handler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: probeCfg.path, + Port: probeCfg.port, + }, + }, + }, nil +} + +func extractProbeConfigurationFromExtension(ext interface{}) probeConfiguration { + extensionCfg, ok := ext.(map[interface{}]interface{}) + if !ok { + return defaultProbeConfiguration() + } + return probeConfiguration{ + path: extractPathFromExtensionConfig(extensionCfg), + port: extractPortFromExtensionConfig(extensionCfg), + } +} + +func defaultProbeConfiguration() probeConfiguration { + return probeConfiguration{ + path: defaultHealthCheckPath, + port: intstr.FromInt(defaultHealthCheckPort), + } +} + +func extractPathFromExtensionConfig(cfg map[interface{}]interface{}) string { + if path, ok := cfg["path"]; ok { + if parsedPath, ok := path.(string); ok { + return parsedPath + } + } + return defaultHealthCheckPath +} + +func extractPortFromExtensionConfig(cfg map[interface{}]interface{}) intstr.IntOrString { + endpoint, ok := cfg["endpoint"] + if !ok { + return defaultHealthCheckEndpoint() + } + parsedEndpoint, ok := endpoint.(string) + if !ok { + return defaultHealthCheckEndpoint() + } + endpointComponents := strings.Split(parsedEndpoint, ":") + if len(endpointComponents) != 2 { + return defaultHealthCheckEndpoint() + } + return intstr.Parse(endpointComponents[1]) +} + +func defaultHealthCheckEndpoint() intstr.IntOrString { + return intstr.FromInt(defaultHealthCheckPort) +} diff --git a/pkg/collector/adapters/config_to_probe_test.go b/pkg/collector/adapters/config_to_probe_test.go new file mode 100644 index 000000000..65a6a609b --- /dev/null +++ b/pkg/collector/adapters/config_to_probe_test.go @@ -0,0 +1,187 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestConfigToProbeShouldCreateProbeFor(t *testing.T) { + tests := []struct { + desc string + config string + expectedPort int32 + expectedPath string + }{ + { + desc: "SimpleHappyPath", + expectedPort: int32(13133), + expectedPath: "/", + config: `extensions: + health_check: +service: + extensions: [health_check]`, + }, { + desc: "CustomEndpointAndPath", + expectedPort: int32(1234), + expectedPath: "/checkit", + config: `extensions: + health_check: + endpoint: localhost:1234 + path: /checkit +service: + extensions: [health_check]`, + }, { + desc: "CustomEndpointAndDefaultPath", + expectedPort: int32(1234), + expectedPath: "/", + config: `extensions: + health_check: + endpoint: localhost:1234 +service: + extensions: [health_check]`, + }, { + desc: "CustomEndpointWithJustPortAndDefaultPath", + expectedPort: int32(1234), + expectedPath: "/", + config: `extensions: + health_check: + endpoint: :1234 +service: + extensions: [health_check]`, + }, { + desc: "DefaultEndpointAndCustomPath", + expectedPort: int32(13133), + expectedPath: "/checkit", + config: `extensions: + health_check: + path: /checkit +service: + extensions: [health_check]`, + }, { + desc: "DefaultEndpointForUnexpectedEndpoint", + expectedPort: int32(13133), + expectedPath: "/", + config: `extensions: + health_check: + endpoint: 0:0:0" +service: + extensions: [health_check]`, + }, { + desc: "DefaultEndpointForUnparseablendpoint", + expectedPort: int32(13133), + expectedPath: "/", + config: `extensions: + health_check: + endpoint: + this: should-not-be-a-map" +service: + extensions: [health_check]`, + }, { + desc: "WillUseSecondServiceExtension", + config: `extensions: + health_check: +service: + extensions: [health_check/1, health_check]`, + expectedPort: int32(13133), + expectedPath: "/", + }, + } + + for _, test := range tests { + // prepare + config, err := ConfigFromString(test.config) + require.NoError(t, err, test.desc) + require.NotEmpty(t, config, test.desc) + + // test + actualProbe, err := ConfigToContainerProbe(config) + assert.NoError(t, err) + assert.Equal(t, test.expectedPath, actualProbe.HTTPGet.Path, test.desc) + assert.Equal(t, test.expectedPort, actualProbe.HTTPGet.Port.IntVal, test.desc) + assert.Equal(t, "", actualProbe.HTTPGet.Host, test.desc) + } +} + +func TestConfigToProbeShouldErrorIf(t *testing.T) { + tests := []struct { + desc string + config string + expectedErr error + }{ + { + desc: "NoHealthCheckExtension", + config: `extensions: + pprof: +service: + extensions: [health_check]`, + expectedErr: errNoExtensionHealthCheck, + }, { + desc: "BadlyFormattedExtensions", + config: `extensions: [hi] +service: + extensions: [health_check]`, + expectedErr: errExtensionsNotAMap, + }, { + desc: "NoExtensions", + config: `service: + extensions: [health_check]`, + expectedErr: errNoExtensions, + }, { + desc: "NoHealthCheckInServiceExtensions", + config: `service: + extensions: [pprof]`, + expectedErr: errNoServiceExtensionHealthCheck, + }, { + desc: "BadlyFormattedServiceExtensions", + config: `service: + extensions: + this: should-not-be-a-map`, + expectedErr: errServiceExtensionsNotSlice, + }, { + desc: "NoServiceExtensions", + config: `service: + pipelines: + traces: + receivers: [otlp]`, + expectedErr: errNoServiceExtensions, + }, { + desc: "BadlyFormattedService", + config: `extensions: + health_check: +service: [hi]`, + expectedErr: errServiceNotAMap, + }, { + desc: "NoService", + config: `extensions: + health_check:`, + expectedErr: errNoService, + }, + } + + for _, test := range tests { + // prepare + config, err := ConfigFromString(test.config) + require.NoError(t, err, test.desc) + require.NotEmpty(t, config, test.desc) + + // test + _, err = ConfigToContainerProbe(config) + assert.Equal(t, test.expectedErr, err, test.desc) + } +} diff --git a/pkg/collector/container.go b/pkg/collector/container.go index c97f8db54..5c0548feb 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -22,6 +22,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) @@ -77,6 +78,13 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, }) + var livenessProbe *corev1.Probe + if config, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { + if probe, err := adapters.ConfigToContainerProbe(config); err == nil { + livenessProbe = probe + } + } + return corev1.Container{ Name: naming.Container(), Image: image, @@ -87,5 +95,6 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem EnvFrom: otelcol.Spec.EnvFrom, Resources: otelcol.Spec.Resources, SecurityContext: otelcol.Spec.SecurityContext, + LivenessProbe: livenessProbe, } } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 76dd1c827..60820c9c2 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -273,3 +273,24 @@ func TestContainerEnvFrom(t *testing.T) { assert.Contains(t, c.EnvFrom, envFrom1) assert.Contains(t, c.EnvFrom, envFrom2) } + +func TestContainerProbe(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `extensions: + health_check: +service: + extensions: [health_check]`, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "/", c.LivenessProbe.HTTPGet.Path) + assert.Equal(t, int32(13133), c.LivenessProbe.HTTPGet.Port.IntVal) + assert.Equal(t, "", c.LivenessProbe.HTTPGet.Host) +} From 5478e5b0ed73a2db46d745eec2910ce100f9f895 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Sat, 27 Nov 2021 11:51:47 +0100 Subject: [PATCH 0358/1234] Enabling kind version 1.22.4 (#563) * Enabling kind version 1.22.4 * Updating sha256 to the new 1.22.4 image --- kind-1.22.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 25ea3bb7e..cd065a3cd 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.2@sha256:e8d14d3575e6135cb364127c9cf4d8da7f3f76a58aaceb971a345cbfef972c31 + image: kindest/node:v1.22.4@sha256:ca3587e6e545a96c07bf82e2c46503d9ef86fc704f44c17577fca7bcabf5f978 From 1275f2e262c998879fc6f79ea88b55b9984cd1a1 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 29 Nov 2021 15:16:23 +0100 Subject: [PATCH 0359/1234] Bump otel collector to 0.40.0 (#585) * Bump otel collector to 0.40.0 * Fixed some typos * Fixed some typos * Including PR reference on changelog * Update CHANGELOG.md typo fix Co-authored-by: Vineeth Pothulapati --- CHANGELOG.md | 5 +++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d71fc40a..e7b6e3283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.40.0 +------------------- +* Bumped OpenTelemetry Collector to v0.40.0 +* Support K8s liveness probe to otel collector, if health_check extension is defined in otel collector config ([#574](https://github.com/open-telemetry/opentelemetry-operator/pull/574)) + 0.39.0 ------------------- * Bumped OpenTelemetry Collector to v0.39.0 diff --git a/README.md b/README.md index e3d6c7a8e..9c4b415aa 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.40.0 | v1.20 to v1.22 | 1.6.1 | | v0.39.0 | v1.20 to v1.22 | 1.6.1 | | v0.38.0 | v1.20 to v1.22 | 1.6.1 | | v0.37.1 | v1.20 to v1.22 | v1.4.0 to v1.6.1 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b511d3946..b8c0d3999 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.39.0 + name: opentelemetry-operator.v0.40.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -265,7 +265,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.39.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.40.0 name: manager ports: - containerPort: 9443 @@ -357,7 +357,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.39.0 + version: 0.40.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 64b87d6e7..89fbbe78f 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.39.0 +opentelemetry-collector=0.40.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.39.0 +operator=0.40.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From f4dc7a95a7da5b471870dedc9ff47d03d29346ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 14:13:22 +0100 Subject: [PATCH 0360/1234] Bump docker/metadata-action from 3.6.0 to 3.6.1 (#589) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.6.0 to 3.6.1. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.6.0...v3.6.1) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 9ae84a066..0a93e57f9 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.0 + uses: docker/metadata-action@v3.6.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 157ffd5bb..867c4c11b 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.0 + uses: docker/metadata-action@v3.6.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 85efd2034..ff5521d9c 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.0 + uses: docker/metadata-action@v3.6.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 7c23b4766..60b6643ee 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.6.0 + uses: docker/metadata-action@v3.6.1 with: images: quay.io/opentelemetry/opentelemetry-operator,ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tag-semver: | From fb41f22799363c383d642542a2217da5b407f4ee Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 1 Dec 2021 15:52:11 +0100 Subject: [PATCH 0361/1234] Use cmctl to test if cert-manager is ready (#583) * Use cmctl to test if cert-manager is ready The current approach is flaky and cert-manager docs suggests to use cmctl to test if the cert-manager is ready. Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay --- Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 210b4d640..d44342247 100644 --- a/Makefile +++ b/Makefile @@ -144,11 +144,23 @@ start-kind: kind create cluster --config $(KIND_CONFIG) kind load docker-image local/opentelemetry-operator:e2e -cert-manager: +cert-manager: cmctl + # Consider using cmctl to install the cert-manager once install command is not experimental kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v${CERTMANAGER_VERSION}/cert-manager.yaml - kubectl wait --timeout=5m --for=condition=available deployment cert-manager -n cert-manager - kubectl wait --timeout=5m --for=condition=available deployment cert-manager-cainjector -n cert-manager - kubectl wait --timeout=5m --for=condition=available deployment cert-manager-webhook -n cert-manager + cmctl check api --wait=5m + +cmctl: +ifeq (, $(shell which cmctl)) + @{ \ + curl -L -o /tmp/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\ + cd /tmp ;\ + tar xzf cmctl.tar.gz ;\ + mv cmctl $(GOBIN) ;\ + } +CTL=$(GOBIN)/cmctl +else +CTL=$(shell which cmctl) +endif # find or download controller-gen # download controller-gen if necessary From 8393ee73f443f8bb5da2b124ded316e8b7a7140e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 09:18:13 +0100 Subject: [PATCH 0362/1234] Bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3 (#594) Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.2 to 1.4.3. - [Release notes](https://github.com/mitchellh/mapstructure/releases) - [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.2...v1.4.3) --- updated-dependencies: - dependency-name: github.com/mitchellh/mapstructure dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 70fe8fe3e..f684b3816 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v0.4.0 - github.com/mitchellh/mapstructure v1.4.2 + github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 diff --git a/go.sum b/go.sum index c641e8778..92e756222 100644 --- a/go.sum +++ b/go.sum @@ -769,8 +769,8 @@ github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= From be1df5622f348d430b7296421d56bb6823cc2615 Mon Sep 17 00:00:00 2001 From: Sebastian Poxhofer Date: Thu, 2 Dec 2021 13:29:30 +0100 Subject: [PATCH 0363/1234] [target-allocator] add missing command line parsing (#590) * fix(target-allocator): add missing parse command to interpret command line flags * chore(target-allocator): tidy go mod --- cmd/otel-allocator/go.mod | 103 ++++++++++++++++++++++++++++++++++++- cmd/otel-allocator/main.go | 1 + 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 58e213075..53df37a7c 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -11,11 +11,110 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - go.uber.org/zap v1.19.0 // indirect gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.22.1 k8s.io/apimachinery v0.22.1 k8s.io/client-go v0.22.1 - k8s.io/component-base v0.22.1 // indirect sigs.k8s.io/controller-runtime v0.9.6 ) + +require ( + cloud.google.com/go v0.83.0 // indirect + github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect + github.com/Azure/go-autorest/autorest v0.11.19 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect + github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect + github.com/Azure/go-autorest/logger v0.2.1 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect + github.com/armon/go-metrics v0.3.3 // indirect + github.com/aws/aws-sdk-go v1.38.60 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/containerd/containerd v1.4.3 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/digitalocean/godo v1.62.0 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v20.10.7+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/fatih/color v1.9.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/go-logr/zapr v0.4.0 // indirect + github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-zookeeper/zk v1.0.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-querystring v1.0.0 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gophercloud/gophercloud v0.18.0 // indirect + github.com/hashicorp/consul/api v1.8.1 // indirect + github.com/hashicorp/go-cleanhttp v0.5.1 // indirect + github.com/hashicorp/go-hclog v0.12.2 // indirect + github.com/hashicorp/go-immutable-radix v1.2.0 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/serf v0.9.5 // indirect + github.com/hetznercloud/hcloud-go v1.26.2 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect + github.com/linode/linodego v0.28.5 // indirect + github.com/mattn/go-colorable v0.1.6 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/miekg/dns v1.1.42 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect + github.com/sirupsen/logrus v1.7.0 // indirect + go.opencensus.io v0.23.0 // indirect + go.uber.org/atomic v1.8.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.19.0 // indirect + golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect + golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect + golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect + golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect + golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/api v0.48.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 // indirect + google.golang.org/grpc v1.38.0 // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/apiextensions-apiserver v0.21.3 // indirect + k8s.io/component-base v0.22.1 // indirect + k8s.io/klog/v2 v2.9.0 // indirect + k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect + k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index a3ee0be4e..49b82ac1f 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -35,6 +35,7 @@ func main() { var configDir string pflag.StringVar(&listenAddr, "listen-addr", ":8080", "The address where this service serves.") pflag.StringVar(&configDir, "config-dir", "/conf/", "The directory for the config file.") + pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) From a94a13888165ec688a5f83d4e444e9fbc934fca2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 2 Dec 2021 19:50:28 +0100 Subject: [PATCH 0364/1234] Do not set exporter endpoint if it is empty (#587) Signed-off-by: Pavol Loffay --- pkg/instrumentation/sdk.go | 14 ++++--- pkg/instrumentation/sdk_test.go | 68 +++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 9668b9130..ad7275741 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -94,12 +94,14 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph Value: chooseServiceName(pod, resourceMap), }) } - idx = getIndexOfEnv(container.Env, envOTELExporterOTLPEndpoint) - if idx == -1 { - container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELExporterOTLPEndpoint, - Value: otelinst.Spec.Endpoint, - }) + if otelinst.Spec.Exporter.Endpoint != "" { + idx = getIndexOfEnv(container.Env, envOTELExporterOTLPEndpoint) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOTELExporterOTLPEndpoint, + Value: otelinst.Spec.Endpoint, + }) + } } // Some attributes might be empty, we should get them via k8s downward API diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 6f6c089d7..aca097318 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -289,6 +289,74 @@ func TestSDKInjection(t *testing.T) { }, }, }, + { + name: "Empty instrumentation spec", + inst: v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{}, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + UID: "pod-uid", + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "ReplicaSet", + Name: "my-replicaset", + UID: "rsuid", + APIVersion: "apps/v1", + }, + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "application-name", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "project1", + Name: "app", + UID: "pod-uid", + OwnerReferences: []metav1.OwnerReference{ + { + Kind: "ReplicaSet", + Name: "my-replicaset", + UID: "rsuid", + APIVersion: "apps/v1", + }, + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "application-name", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "my-deployment", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset", + }, + }, + }, + }, + }, + }, + }, } for _, test := range tests { From 6fada2c2ae579a21daa00f1859a544b1ae4365fd Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 3 Dec 2021 16:43:14 +0100 Subject: [PATCH 0365/1234] Fix container image field in CSV (#600) Signed-off-by: Pavol Loffay --- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- .../bases/opentelemetry-operator.clusterserviceversion.yaml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b8c0d3999..a022f288e 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -30,7 +30,7 @@ metadata: capabilities: Basic Install categories: Logging & Tracing certified: "false" - containerImage: quay.io/opentelemetry/opentelemetry-operator + containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.13.0+git diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index eacd3faeb..b36f42e8e 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -6,11 +6,9 @@ metadata: capabilities: Basic Install categories: Logging & Tracing certified: "false" - containerImage: quay.io/opentelemetry/opentelemetry-operator + containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.2.0 - operators.operatorframework.io/project_layout: go repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community name: opentelemetry-operator.v0.0.0 From d63c9422683c933d32dc9a55922850ab92f84957 Mon Sep 17 00:00:00 2001 From: Adrian Kostrubiak <72626345+adriankostrubiak-tomtom@users.noreply.github.com> Date: Mon, 6 Dec 2021 06:37:56 -0500 Subject: [PATCH 0366/1234] add healthz, readyz probes to controller manager. (#603) * add healthz, readyz probes to controller manager. fixes #602 Signed-off-by: Adrian Kostrubiak adrian.kostrubiak@tomtom.com * fix manager port * run `make bundle' to update csv * nitty change flag naming to be more consistent with existing flags * fix import ordering --- ...emetry-operator.clusterserviceversion.yaml | 12 ++++++ config/manager/manager.yaml | 12 ++++++ main.go | 37 +++++++++++++------ 3 files changed, 50 insertions(+), 11 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index a022f288e..9ec503968 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -266,11 +266,23 @@ spec: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.40.0 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 name: manager ports: - containerPort: 9443 name: webhook-server protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 resources: limits: cpu: 200m diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index fbb8654dd..4057084d4 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -27,6 +27,18 @@ spec: - --enable-leader-election image: controller name: manager + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 resources: limits: cpu: 200m diff --git a/main.go b/main.go index f70438c09..e09f8928f 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,7 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -68,12 +69,16 @@ func main() { v := version.Get() // add flags related to this operator - var metricsAddr string - var enableLeaderElection bool - var collectorImage string - var targetAllocatorImage string - var autoInstrumentationJava string + var ( + metricsAddr string + probeAddr string + enableLeaderElection bool + collectorImage string + targetAllocatorImage string + autoInstrumentationJava string + ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") + flag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") @@ -124,12 +129,13 @@ func main() { } mgrOptions := ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: 9443, - LeaderElection: enableLeaderElection, - LeaderElectionID: "9f7554c3.opentelemetry.io", - Namespace: watchNamespace, + Scheme: scheme, + MetricsBindAddress: metricsAddr, + Port: 9443, + HealthProbeBindAddress: probeAddr, + LeaderElection: enableLeaderElection, + LeaderElectionID: "9f7554c3.opentelemetry.io", + Namespace: watchNamespace, } if strings.Contains(watchNamespace, ",") { @@ -206,6 +212,15 @@ func main() { } // +kubebuilder:scaffold:builder + if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { + setupLog.Error(err, "unable to set up health check") + os.Exit(1) + } + if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { + setupLog.Error(err, "unable to set up ready check") + os.Exit(1) + } + setupLog.Info("starting manager") if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { setupLog.Error(err, "problem running manager") From e0a5a5a89b454c0b7dc07dcd31336cdaadeeeabb Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 6 Dec 2021 16:08:33 +0100 Subject: [PATCH 0367/1234] Extract component dependencies to a separate function (#569) Signed-off-by: Pavol Loffay --- internal/config/main.go | 7 +++++ internal/config/options.go | 7 +++++ main.go | 64 ++++++++++++++++++++++---------------- 3 files changed, 52 insertions(+), 26 deletions(-) diff --git a/internal/config/main.go b/internal/config/main.go index f0e1bf5ef..e54b1f2bc 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -49,6 +49,7 @@ type Config struct { targetAllocatorImage string targetAllocatorConfigMapEntry string platform platform.Platform + autoInstrumentationJavaImage string } // New constructs a new configuration based on the given options. @@ -76,6 +77,7 @@ func New(opts ...Option) Config { logger: o.logger, onChange: o.onChange, platform: o.platform, + autoInstrumentationJavaImage: o.autoInstrumentationjavaImage, } } @@ -166,3 +168,8 @@ func (c *Config) TargetAllocatorConfigMapEntry() string { func (c *Config) Platform() platform.Platform { return c.platform } + +// AutoInstrumentationJavaImage returns OpenTelemetry auto-instrumentation container image. +func (c *Config) AutoInstrumentationJavaImage() string { + return c.autoInstrumentationJavaImage +} diff --git a/internal/config/options.go b/internal/config/options.go index b8a282145..997c12775 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -32,6 +32,7 @@ type options struct { autoDetectFrequency time.Duration targetAllocatorImage string collectorImage string + autoInstrumentationjavaImage string collectorConfigMapEntry string targetAllocatorConfigMapEntry string logger logr.Logger @@ -94,3 +95,9 @@ func WithVersion(v version.Version) Option { o.version = v } } + +func WithAutoInstrumentationJavaImage(s string) Option { + return func(o *options) { + o.autoInstrumentationjavaImage = s + } +} diff --git a/main.go b/main.go index e09f8928f..53fa9e9d4 100644 --- a/main.go +++ b/main.go @@ -114,6 +114,7 @@ func main() { config.WithVersion(v), config.WithCollectorImage(collectorImage), config.WithTargetAllocatorImage(targetAllocatorImage), + config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), config.WithAutoDetect(ad), ) @@ -149,32 +150,11 @@ func main() { os.Exit(1) } - // run the auto-detect mechanism for the configuration - err = mgr.Add(manager.RunnableFunc(func(_ context.Context) error { - return cfg.StartAutoDetect() - })) - if err != nil { - setupLog.Error(err, "failed to start the auto-detect mechanism") - } - - // adds the upgrade mechanism to be executed once the manager is ready - err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { - return collectorupgrade.ManagedInstances(c, ctrl.Log.WithName("collector-upgrade"), v, mgr.GetClient()) - })) + ctx := ctrl.SetupSignalHandler() + err = addDependencies(ctx, mgr, cfg, v) if err != nil { - setupLog.Error(err, "failed to upgrade managed instances") - } - // adds the upgrade mechanism to be executed once the manager is ready - err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { - u := &instrumentationupgrade.InstrumentationUpgrade{ - Logger: ctrl.Log.WithName("instrumentation-upgrade"), - DefaultAutoInstrJava: autoInstrumentationJava, - Client: mgr.GetClient(), - } - return u.ManagedInstances(c) - })) - if err != nil { - setupLog.Error(err, "failed to upgrade managed instances") + setupLog.Error(err, "failed to add/run bootstrap dependencies to the controller manager") + os.Exit(1) } if err = controllers.NewReconciler(controllers.Params{ @@ -222,8 +202,40 @@ func main() { } setupLog.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { + if err := mgr.Start(ctx); err != nil { setupLog.Error(err, "problem running manager") os.Exit(1) } } + +func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v version.Version) error { + // run the auto-detect mechanism for the configuration + err := mgr.Add(manager.RunnableFunc(func(_ context.Context) error { + return cfg.StartAutoDetect() + })) + if err != nil { + return fmt.Errorf("failed to start the auto-detect mechanism: %w", err) + } + + // adds the upgrade mechanism to be executed once the manager is ready + err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { + return collectorupgrade.ManagedInstances(c, ctrl.Log.WithName("collector-upgrade"), v, mgr.GetClient()) + })) + if err != nil { + return fmt.Errorf("failed to upgrade OpenTelemetryCollector instances: %w", err) + } + + // adds the upgrade mechanism to be executed once the manager is ready + err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { + u := &instrumentationupgrade.InstrumentationUpgrade{ + Logger: ctrl.Log.WithName("instrumentation-upgrade"), + DefaultAutoInstrJava: cfg.AutoInstrumentationJavaImage(), + Client: mgr.GetClient(), + } + return u.ManagedInstances(c) + })) + if err != nil { + return fmt.Errorf("failed to upgrade Instrumentation instances: %w", err) + } + return nil +} From 7f1a5adde18996d0105ceb4b7e1b8acca8e92b2c Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 7 Dec 2021 14:15:13 +0000 Subject: [PATCH 0368/1234] Fixing links on RELEASE doc (#610) --- RELEASE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 0d7efc4cf..efaa830d1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,15 +3,15 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. -1. Run `make bundle VERSION=0.29.0`, using the version that will be released. +1. Run `make bundle VERSION=0.38.0`, using the version that will be released. 1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! 1. Add the changes to the changelog 1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` -1. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.3.0` +1. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` 1. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images -1. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the [Operator Hub Community Operators repository](https://github.com/operator-framework/community-operators): - 1. one for the `upstream-community-operators`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators#2880`](operator-framework/community-operators/pull/2880) - 1. one for the `community-operators` directory, used by OpenShift. Example: [`operator-framework/community-operators#2878`](operator-framework/community-operators/pull/2878) +1. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the `Community Operators repositories`: + 1. one for the `community-operators-prod`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) + 1. one for the `community-operators` directory, used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) ## Generating the changelog From d2b91cfac1e1ca4609f41296d110c380bc81b081 Mon Sep 17 00:00:00 2001 From: mmatache <89529881+mmatache@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:22:34 +0200 Subject: [PATCH 0369/1234] Limit names and labels to 63 characters (#609) * added naming formaters from jaeger project * updated naming to use name formatters * update labels to conform with kubernetes rules * fixed linting issues * added Jaeger copyright * updated Jaeger copyright --- pkg/collector/labels.go | 5 +- pkg/naming/dns.go | 49 ++++++++++++++++ pkg/naming/dns_test.go | 50 ++++++++++++++++ pkg/naming/main.go | 20 +++---- pkg/naming/triming.go | 75 ++++++++++++++++++++++++ pkg/naming/triming_test.go | 104 ++++++++++++++++++++++++++++++++++ pkg/targetallocator/labels.go | 5 +- 7 files changed, 291 insertions(+), 17 deletions(-) create mode 100644 pkg/naming/dns.go create mode 100644 pkg/naming/dns_test.go create mode 100644 pkg/naming/triming.go create mode 100644 pkg/naming/triming_test.go diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 7f4867a3f..06fc02bb7 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -15,9 +15,8 @@ package collector import ( - "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. @@ -31,7 +30,7 @@ func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { } base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) + base["app.kubernetes.io/instance"] = naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name) base["app.kubernetes.io/part-of"] = "opentelemetry" base["app.kubernetes.io/component"] = "opentelemetry-collector" diff --git a/pkg/naming/dns.go b/pkg/naming/dns.go new file mode 100644 index 000000000..4f78d9ebe --- /dev/null +++ b/pkg/naming/dns.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Additional copyrights: +// Copyright The Jaeger Authors + +package naming + +import ( + "regexp" + "strings" + "unicode/utf8" +) + +var regex = regexp.MustCompile(`[a-z0-9]`) + +// DNSName returns a dns-safe string for the given name. +// Any char that is not [a-z0-9] is replaced by "-" or "a". +// Replacement character "a" is used only at the beginning or at the end of the name. +// The function does not change length of the string. +// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/dns_name.go#L15 +func DNSName(name string) string { + var d []rune + + for i, x := range strings.ToLower(name) { + if regex.Match([]byte(string(x))) { + d = append(d, x) + } else { + if i == 0 || i == utf8.RuneCountInString(name)-1 { + d = append(d, 'a') + } else { + d = append(d, '-') + } + } + } + + return string(d) +} diff --git a/pkg/naming/dns_test.go b/pkg/naming/dns_test.go new file mode 100644 index 000000000..ad53e9b08 --- /dev/null +++ b/pkg/naming/dns_test.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Additional copyrights: +// Copyright The Jaeger Authors + +package naming + +import ( + "regexp" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDnsName(t *testing.T) { + var tests = []struct { + in string + out string + }{ + {"simplest", "simplest"}, + {"instance.with.dots-collector-headless", "instance-with-dots-collector-headless"}, + {"TestQueryDottedServiceName.With.Dots", "testquerydottedservicename-with-dots"}, + {"Service🦄", "servicea"}, + {"📈Stock-Tracker", "astock-tracker"}, + {"-📈Stock-Tracker", "a-stock-tracker"}, + {"📈", "a"}, + {"foo-", "fooa"}, + {"-foo", "afoo"}, + } + rule, err := regexp.Compile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`) + assert.NoError(t, err) + + for _, tt := range tests { + assert.Equal(t, tt.out, DNSName(tt.in)) + matched := rule.Match([]byte(tt.out)) + assert.True(t, matched, "%v is not a valid name", tt.out) + } +} diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 380bc53d5..d81b9130c 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -16,19 +16,17 @@ package naming import ( - "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. func ConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-collector", otelcol.Name) + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } // TAConfigMap returns the name for the config map used in the TargetAllocator. func TAConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-targetallocator", otelcol.Name) + return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) } // ConfigMapVolume returns the name to use for the config map's volume in the pod. @@ -53,35 +51,35 @@ func TAContainer() string { // Collector builds the collector (deployment/daemonset) name based on the instance. func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-collector", otelcol.Name) + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } // TargetAllocator returns the TargetAllocator deployment resource name. func TargetAllocator(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-targetallocator", otelcol.Name) + return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) } // HeadlessService builds the name for the headless service based on the instance. func HeadlessService(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-headless", Service(otelcol)) + return DNSName(Truncate("%s-headless", 63, Service(otelcol))) } // MonitoringService builds the name for the monitoring service based on the instance. func MonitoringService(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-monitoring", Service(otelcol)) + return DNSName(Truncate("%s-monitoring", 63, Service(otelcol))) } // Service builds the service name based on the instance. func Service(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-collector", otelcol.Name) + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } // TAService returns the name to use for the TargetAllocator service. func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-targetallocator", otelcol.Name) + return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) } // ServiceAccount builds the service account name based on the instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { - return fmt.Sprintf("%s-collector", otelcol.Name) + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } diff --git a/pkg/naming/triming.go b/pkg/naming/triming.go new file mode 100644 index 000000000..152025478 --- /dev/null +++ b/pkg/naming/triming.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Additional copyrights: +// Copyright The Jaeger Authors + +package naming + +import ( + "fmt" + "regexp" +) + +var regexpEndReplace, regexpBeginReplace *regexp.Regexp + +func init() { + regexpEndReplace, _ = regexp.Compile("[^A-Za-z0-9]+$") + regexpBeginReplace, _ = regexp.Compile("^[^A-Za-z0-9]+") +} + +// Truncate will shorten the length of the instance name so that it contains at most max chars when combined with the fixed part +// If the fixed part is already bigger than the max, this function is noop. +// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/truncate.go#L17 +func Truncate(format string, max int, values ...interface{}) string { + var truncated []interface{} + result := fmt.Sprintf(format, values...) + + if excess := len(result) - max; excess > 0 { + // we try to reduce the first string we find + for _, value := range values { + if excess == 0 { + continue + } + + if s, ok := value.(string); ok { + if len(s) > excess { + value = s[:len(s)-excess] + excess = 0 + } else { + value = "" // skip this value entirely + excess = excess - len(s) + } + } + + truncated = append(truncated, value) + } + + result = fmt.Sprintf(format, truncated...) + } + + // if at this point, the result is still bigger than max, apply a hard cap: + if len(result) > max { + return result[:max] + } + + return trimNonAlphaNumeric(result) +} + +// trimNonAlphaNumeric remove all non-alphanumeric values from start and end of the string +// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/truncate.go#L53 +func trimNonAlphaNumeric(text string) string { + newText := regexpEndReplace.ReplaceAllString(text, "") + return regexpBeginReplace.ReplaceAllString(newText, "") +} diff --git a/pkg/naming/triming_test.go b/pkg/naming/triming_test.go new file mode 100644 index 000000000..90fccd7fd --- /dev/null +++ b/pkg/naming/triming_test.go @@ -0,0 +1,104 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Additional copyrights: +// Copyright The Jaeger Authors + +package naming + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestTruncate(t *testing.T) { + for _, tt := range []struct { + format string + max int + values []interface{} + expected string + cap string + }{ + { + format: "%s-collector", + max: 63, + values: []interface{}{"simplest"}, + expected: "simplest-collector", + cap: "the standard case", + }, + { + format: "d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85b7644b6b5", + max: 63, + values: []interface{}{}, + expected: "d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85", + cap: "first N case", + }, + { + format: "%s-collector", + max: 63, + values: []interface{}{"d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85b7644b6b5"}, + expected: "d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11e-collector", + cap: "instance + fixed within bounds", + }, + { + format: "%s-%s-collector", + max: 63, + values: []interface{}{"d0c1e62", "4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85b7644b6b5"}, + expected: "4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174--collector", + cap: "first value gets dropped, second truncated", + }, + { + format: "%d-%s-collector", + max: 63, + values: []interface{}{42, "d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85b7644b6b5"}, + expected: "42-d0c1e62-4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96--collector", + cap: "first value gets passed, second truncated", + }, + } { + assert.Equal(t, tt.expected, Truncate(tt.format, tt.max, tt.values...)) + } +} + +func TestTrimNonAlphaNumeric(t *testing.T) { + tests := []struct { + input string + expected string + }{ + { + input: "-%$#ThisIsALabel", + expected: "ThisIsALabel", + }, + + { + input: "label-invalid--_truncated-.", + expected: "label-invalid--_truncated", + }, + + { + input: "--(label-invalid--_truncated-#.1.", + expected: "label-invalid--_truncated-#.1", + }, + + { + input: "12ValidLabel3", + expected: "12ValidLabel3", + }, + } + + for _, test := range tests { + output := trimNonAlphaNumeric(test.input) + assert.Equal(t, test.expected, output) + } +} diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index 96720215f..5cd4f5373 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -15,9 +15,8 @@ package targetallocator import ( - "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. @@ -31,7 +30,7 @@ func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { } base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - base["app.kubernetes.io/instance"] = fmt.Sprintf("%s.%s", instance.Namespace, instance.Name) + base["app.kubernetes.io/instance"] = naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name) base["app.kubernetes.io/part-of"] = "opentelemetry" base["app.kubernetes.io/component"] = "opentelemetry-targetallocator" From ae8f3a852623f465a6c1802d03ffa31651bf0888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Wed, 8 Dec 2021 14:42:34 +0100 Subject: [PATCH 0370/1234] Remove fmt.Println from test (#616) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- pkg/instrumentation/sdk_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index aca097318..c667e7361 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -365,8 +365,8 @@ func TestSDKInjection(t *testing.T) { client: k8sClient, } pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) - b, _ := json.MarshalIndent(pod, "", " ") - fmt.Println(string(b)) + _, err = json.MarshalIndent(pod, "", " ") + assert.NoError(t, err) assert.Equal(t, test.expected, pod) }) } From 5cf7e24f87b30e0c49c9f5ffe16201a0d44201b3 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 9 Dec 2021 11:19:39 +0100 Subject: [PATCH 0371/1234] Add read permissions to other users for instrumentation files (#622) * Add read permissions to other users for instrumentation files Signed-off-by: Pavol Loffay * revert Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- autoinstrumentation/java/Dockerfile | 2 ++ autoinstrumentation/nodejs/Dockerfile | 2 ++ autoinstrumentation/python/Dockerfile | 2 ++ 3 files changed, 6 insertions(+) diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile index 145d940cc..fbf535ac1 100644 --- a/autoinstrumentation/java/Dockerfile +++ b/autoinstrumentation/java/Dockerfile @@ -3,3 +3,5 @@ FROM busybox ARG version ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /javaagent.jar + +RUN chmod -R o+r /javaagent.jar diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 85bc9f4c0..8677e49ea 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -8,3 +8,5 @@ RUN npm install FROM busybox COPY --from=build /operator-build/build/workspace /autoinstrumentation + +RUN chmod -R o+r /autoinstrumentation diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index 19c5217f7..cdbf40c41 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -9,3 +9,5 @@ RUN mkdir workspace && pip install --target workspace -r requirements.txt FROM busybox COPY --from=build /operator-build/workspace /autoinstrumentation + +RUN chmod -R o+r /autoinstrumentation From 0617cf7c75734930deebb951bf39dde1bfef48a5 Mon Sep 17 00:00:00 2001 From: Adrian Kostrubiak <72626345+adriankostrubiak-tomtom@users.noreply.github.com> Date: Fri, 10 Dec 2021 10:38:50 -0500 Subject: [PATCH 0372/1234] Add OpenTelemetryCollector.Spec.UpgradeStrategy (#620) * Add OpenTelemetryCollector.Spec.UpgradeStrategy with allowable values: 'automatic', 'none' fixes #598 Signed-off-by: Adrian Kostrubiak adrian.kostrubiak@tomtom.com lint Add read permissions to other users for instrumentation files (#622) * Add read permissions to other users for instrumentation files Signed-off-by: Pavol Loffay * revert Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay PR feedback; adjust test suites to start up / spin down webhook server so that defaulting works as expected. TODO for another time to extract much of the duplicated logic across the varying suite_test.go TestMain funcs * adjust docs per PR comment --- README.md | 17 +++ apis/v1alpha1/opentelemetrycollector_types.go | 4 + .../opentelemetrycollector_webhook.go | 3 + apis/v1alpha1/upgrade_strategy.go | 29 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 7 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 7 ++ controllers/suite_test.go | 84 ++++++++++++++- docs/api.md | 9 ++ .../webhookhandler_suite_test.go | 84 ++++++++++++++- pkg/collector/reconcile/suite_test.go | 88 +++++++++++++-- pkg/collector/upgrade/suite_test.go | 84 ++++++++++++++- pkg/collector/upgrade/upgrade.go | 11 +- pkg/collector/upgrade/upgrade_test.go | 100 +++++++++--------- 13 files changed, 457 insertions(+), 70 deletions(-) create mode 100644 apis/v1alpha1/upgrade_strategy.go diff --git a/README.md b/README.md index 9c4b415aa..7aa9ec025 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,18 @@ The `config` node holds the `YAML` that should be passed down as-is to the under At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash. + +### Upgrades + +As noted above, the OpenTelemetry Collector format is continuing to evolve. However, a best-effort attempt is made to upgrade all managed `OpenTelemetryCollector` resources. + +In certain scenarios, it may be desirable to prevent the operator from upgrading certain `OpenTelemetryCollector` resources. For example, when a resource is configured with a custom `.Spec.Image`, end users may wish to manage configuration themselves as opposed to having the operator upgrade it. This can be configured on a resource by resource basis with the exposed property `.Spec.UpgradeStrategy`. + +By configuring a resource's `.Spec.UpgradeStrategy` to `none`, the operator will skip the given instance during the upgrade routine. + +The default and only other acceptable value for `.Spec.UpgradeStrategy` is `automatic`. + + ### Deployment modes The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/00-install.yaml) for reference. @@ -215,6 +227,11 @@ The possible values for the annotation can be The OpenTelemetry Operator follows the same versioning as the operand (OpenTelemetry Collector) up to the minor part of the version. For example, the OpenTelemetry Operator v0.18.1 tracks OpenTelemetry Collector 0.18.0. The patch part of the version indicates the patch level of the operator itself, not that of OpenTelemetry Collector. Whenever a new patch version is released for OpenTelemetry Collector, we'll release a new patch version of the operator. +By default, the OpenTelemetry Operator ensures consistent versioning between itself and the managed `OpenTelemetryCollector` resources. That is, if the OpenTelemetry Operator is based on version `0.40.0`, it will create resources with an underlying OpenTelemetry Collector at version `0.40.0`. + +When a custom `Spec.Image` is used with an `OpenTelemetryCollector` resource, the OpenTelemetry Operator will not manage this versioning and upgrading. In this scenario, it is best practice that the OpenTelemetry Operator version should match the underlying core version. Given a `OpenTelemetryCollector` resource with a `Spec.Image` configured to a custom image based on underlying OpenTelemetry Collector at version `0.40.0`, it is recommended that the OpenTelemetry Operator is kept at version `0.40.0`. + + ### OpenTelemetry Operator vs. Kubernetes vs. Cert Manager We strive to be compatible with the widest range of Kubernetes versions as possible, but some changes to Kubernetes itself require us to break compatibility with older Kubernetes versions, be it because of code incompatibilities, or in the name of maintainability. diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 04f35c07d..170e2463c 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -25,6 +25,10 @@ type OpenTelemetryCollectorSpec struct { // +required Config string `json:"config,omitempty"` + // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + // +optional + UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` + // Args is the set of arguments to pass to the OpenTelemetry Collector binary // +optional Args map[string]string `json:"args,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 77499d11d..e6296121f 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -43,6 +43,9 @@ func (r *OpenTelemetryCollector) Default() { if len(r.Spec.Mode) == 0 { r.Spec.Mode = ModeDeployment } + if len(r.Spec.UpgradeStrategy) == 0 { + r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic + } if r.Labels == nil { r.Labels = map[string]string{} diff --git a/apis/v1alpha1/upgrade_strategy.go b/apis/v1alpha1/upgrade_strategy.go new file mode 100644 index 000000000..95e16f121 --- /dev/null +++ b/apis/v1alpha1/upgrade_strategy.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + // +kubebuilder:validation:Enum=automatic;none + UpgradeStrategy string +) + +const ( + // UpgradeStrategyAutomatic specifies that the operator will automatically apply upgrades to the CR. + UpgradeStrategyAutomatic UpgradeStrategy = "automatic" + + // UpgradeStrategyNone specifies that the operator will not apply any upgrades to the CR. + UpgradeStrategyNone UpgradeStrategy = "none" +) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index e475e4928..edd8d3ad2 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -689,6 +689,13 @@ spec: type: string type: object type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle + upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string volumeClaimTemplates: description: VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index ce55cbdc7..e5c7760fb 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -690,6 +690,13 @@ spec: type: string type: object type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle + upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string volumeClaimTemplates: description: VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. diff --git a/controllers/suite_test.go b/controllers/suite_test.go index a07dc75b9..1068a79be 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -15,13 +15,21 @@ package controllers_test import ( + "context" + "crypto/tls" "fmt" + "net" "os" "path/filepath" + "sync" "testing" + "time" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -29,15 +37,24 @@ import ( // +kubebuilder:scaffold:imports ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme *runtime.Scheme = scheme.Scheme +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme *runtime.Scheme = scheme.Scheme + ctx context.Context + cancel context.CancelFunc +) func TestMain(m *testing.M) { + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, + WebhookInstallOptions: envtest.WebhookInstallOptions{ + Paths: []string{filepath.Join("..", "config", "webhook")}, + }, } - cfg, err := testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) @@ -56,6 +73,65 @@ func TestMain(m *testing.M) { os.Exit(1) } + // start webhook server using Manager + webhookInstallOptions := &testEnv.WebhookInstallOptions + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: testScheme, + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + LeaderElection: false, + MetricsBindAddress: "0", + }) + if err != nil { + fmt.Printf("failed to start webhook server: %v", err) + os.Exit(1) + } + + if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + go func() { + if err = mgr.Start(ctx); err != nil { + fmt.Printf("failed to start manager: %v", err) + os.Exit(1) + } + }() + + // wait for the webhook server to get ready + wg := &sync.WaitGroup{} + wg.Add(1) + dialer := &net.Dialer{Timeout: time.Second} + addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) + go func(wg *sync.WaitGroup) { + defer wg.Done() + if err = retry.OnError(wait.Backoff{ + Steps: 20, + Duration: 10 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: time.Second * 30, + }, func(error) bool { + return true + }, func() error { + // #nosec G402 + conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if err != nil { + return err + } + _ = conn.Close() + return nil + }); err != nil { + fmt.Printf("failed to wait for webhook server to be ready: %v", err) + os.Exit(1) + } + }(wg) + wg.Wait() + code := m.Run() err = testEnv.Stop() diff --git a/docs/api.md b/docs/api.md index 84abec6d1..0e756e3f9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -508,6 +508,15 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonsets, statefulsets and deployments
false + + upgradeStrategy + enum + + UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
+
+ Enum: automatic, none
+ + false volumeClaimTemplates []object diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go index a6fffe952..4c0b1c681 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -15,13 +15,21 @@ package webhookhandler_test import ( + "context" + "crypto/tls" "fmt" + "net" "os" "path/filepath" + "sync" "testing" + "time" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -29,15 +37,24 @@ import ( // +kubebuilder:scaffold:imports ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme *runtime.Scheme = scheme.Scheme +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme *runtime.Scheme = scheme.Scheme + ctx context.Context + cancel context.CancelFunc +) func TestMain(m *testing.M) { + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + WebhookInstallOptions: envtest.WebhookInstallOptions{ + Paths: []string{filepath.Join("..", "..", "config", "webhook")}, + }, } - cfg, err := testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) @@ -56,6 +73,65 @@ func TestMain(m *testing.M) { os.Exit(1) } + // start webhook server using Manager + webhookInstallOptions := &testEnv.WebhookInstallOptions + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: testScheme, + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + LeaderElection: false, + MetricsBindAddress: "0", + }) + if err != nil { + fmt.Printf("failed to start webhook server: %v", err) + os.Exit(1) + } + + if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + go func() { + if err = mgr.Start(ctx); err != nil { + fmt.Printf("failed to start manager: %v", err) + os.Exit(1) + } + }() + + // wait for the webhook server to get ready + wg := &sync.WaitGroup{} + wg.Add(1) + dialer := &net.Dialer{Timeout: time.Second} + addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) + go func(wg *sync.WaitGroup) { + defer wg.Done() + if err = retry.OnError(wait.Backoff{ + Steps: 20, + Duration: 10 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: time.Second * 30, + }, func(error) bool { + return true + }, func() error { + // #nosec G402 + conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if err != nil { + return err + } + _ = conn.Close() + return nil + }); err != nil { + fmt.Printf("failed to wait for webhook server to be ready: %v", err) + os.Exit(1) + } + }(wg) + wg.Wait() + code := m.Run() err = testEnv.Stop() diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 623f7dd53..9bd26991f 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -16,11 +16,15 @@ package reconcile import ( "context" + "crypto/tls" "fmt" "io/ioutil" + "net" "os" "path/filepath" + "sync" "testing" + "time" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" @@ -30,8 +34,11 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -40,12 +47,17 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme *runtime.Scheme = scheme.Scheme -var logger = logf.Log.WithName("unit-tests") +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme *runtime.Scheme = scheme.Scheme + ctx context.Context + cancel context.CancelFunc -var instanceUID = uuid.NewUUID() + logger = logf.Log.WithName("unit-tests") + + instanceUID = uuid.NewUUID() +) const ( defaultCollectorImage = "default-collector" @@ -53,10 +65,15 @@ const ( ) func TestMain(m *testing.M) { + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + WebhookInstallOptions: envtest.WebhookInstallOptions{ + Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, + }, } - cfg, err := testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) @@ -75,6 +92,65 @@ func TestMain(m *testing.M) { os.Exit(1) } + // start webhook server using Manager + webhookInstallOptions := &testEnv.WebhookInstallOptions + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: testScheme, + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + LeaderElection: false, + MetricsBindAddress: "0", + }) + if err != nil { + fmt.Printf("failed to start webhook server: %v", err) + os.Exit(1) + } + + if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + go func() { + if err = mgr.Start(ctx); err != nil { + fmt.Printf("failed to start manager: %v", err) + os.Exit(1) + } + }() + + // wait for the webhook server to get ready + wg := &sync.WaitGroup{} + wg.Add(1) + dialer := &net.Dialer{Timeout: time.Second} + addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) + go func(wg *sync.WaitGroup) { + defer wg.Done() + if err = retry.OnError(wait.Backoff{ + Steps: 20, + Duration: 10 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: time.Second * 30, + }, func(error) bool { + return true + }, func() error { + // #nosec G402 + conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if err != nil { + return err + } + _ = conn.Close() + return nil + }); err != nil { + fmt.Printf("failed to wait for webhook server to be ready: %v", err) + os.Exit(1) + } + }(wg) + wg.Wait() + code := m.Run() err = testEnv.Stop() diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index b7fdb25b3..84b3e43e7 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -15,13 +15,21 @@ package upgrade_test import ( + "context" + "crypto/tls" "fmt" + "net" "os" "path/filepath" + "sync" "testing" + "time" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -29,13 +37,23 @@ import ( // +kubebuilder:scaffold:imports ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme *runtime.Scheme = scheme.Scheme +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme *runtime.Scheme = scheme.Scheme + ctx context.Context + cancel context.CancelFunc +) func TestMain(m *testing.M) { + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + WebhookInstallOptions: envtest.WebhookInstallOptions{ + Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, + }, } cfg, err := testEnv.Start() @@ -56,6 +74,66 @@ func TestMain(m *testing.M) { os.Exit(1) } + // start webhook server using Manager + webhookInstallOptions := &testEnv.WebhookInstallOptions + mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: testScheme, + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + LeaderElection: false, + MetricsBindAddress: "0", + }) + if err != nil { + fmt.Printf("failed to start webhook server: %v", err) + os.Exit(1) + } + + if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + + //+kubebuilder:scaffold:webhook + + go func() { + if err = mgr.Start(ctx); err != nil { + fmt.Printf("failed to start manager: %v", err) + os.Exit(1) + } + }() + + // wait for the webhook server to get ready + wg := &sync.WaitGroup{} + wg.Add(1) + dialer := &net.Dialer{Timeout: time.Second} + addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) + go func(wg *sync.WaitGroup) { + defer wg.Done() + if err = retry.OnError(wait.Backoff{ + Steps: 20, + Duration: 10 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: time.Second * 30, + }, func(error) bool { + return true + }, func() error { + // #nosec G402 + conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if err != nil { + return err + } + _ = conn.Close() + return nil + }); err != nil { + fmt.Printf("failed to wait for webhook server to be ready: %v", err) + os.Exit(1) + } + + }(wg) + wg.Wait() + code := m.Run() err = testEnv.Stop() diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index a48cf29cd..efb00c023 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -44,6 +44,11 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi for i := range list.Items { original := list.Items[i] + itemLogger := logger.WithValues("name", original.Name, "namespace", original.Namespace) + if original.Spec.UpgradeStrategy == v1alpha1.UpgradeStrategyNone { + itemLogger.Info("skipping instance upgrade due to UpgradeStrategy") + continue + } upgraded, err := ManagedInstance(ctx, logger, ver, cl, original) if err != nil { // nothing to do at this level, just go to the next instance @@ -55,18 +60,18 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi st := upgraded.Status patch := client.MergeFrom(&original) if err := cl.Patch(ctx, &upgraded, patch); err != nil { - logger.Error(err, "failed to apply changes to instance", "name", upgraded.Name, "namespace", upgraded.Namespace) + itemLogger.Error(err, "failed to apply changes to instance") continue } // the status object requires its own update upgraded.Status = st if err := cl.Status().Patch(ctx, &upgraded, patch); err != nil { - logger.Error(err, "failed to apply changes to instance's status object", "name", upgraded.Name, "namespace", upgraded.Namespace) + itemLogger.Error(err, "failed to apply changes to instance's status object") continue } - logger.Info("instance upgraded", "name", upgraded.Name, "namespace", upgraded.Namespace, "version", upgraded.Status.Version) + itemLogger.Info("instance upgraded", "version", upgraded.Status.Version) } } diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index ddf4fc2d4..e99fd6f31 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -31,59 +31,55 @@ import ( var logger = logf.Log.WithName("unit-tests") -func TestShouldUpgradeAllToLatest(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - } - existing.Status.Version = "0.0.1" // this is the first version we have an upgrade function - err := k8sClient.Create(context.Background(), &existing) - require.NoError(t, err) - - err = k8sClient.Status().Update(context.Background(), &existing) - require.NoError(t, err) +func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { + const beginV = "0.0.1" // this is the first version we have an upgrade function currentV := version.Get() currentV.OpenTelemetryCollector = upgrade.Latest.String() - // sanity check - persisted := &v1alpha1.OpenTelemetryCollector{} - err = k8sClient.Get(context.Background(), nsn, persisted) - require.NoError(t, err) - require.Equal(t, "0.0.1", persisted.Status.Version) + for _, tt := range []struct { + strategy v1alpha1.UpgradeStrategy + expectedV string + }{ + {v1alpha1.UpgradeStrategyAutomatic, upgrade.Latest.String()}, + {v1alpha1.UpgradeStrategyNone, beginV}, + } { + t.Run("spec.UpgradeStrategy = "+string(tt.strategy), func(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := makeOtelcol(nsn) + existing.Status.Version = beginV + err := k8sClient.Create(context.Background(), &existing) + require.NoError(t, err) - // test - err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) - assert.NoError(t, err) + err = k8sClient.Status().Update(context.Background(), &existing) + require.NoError(t, err) - // verify - err = k8sClient.Get(context.Background(), nsn, persisted) - assert.NoError(t, err) - assert.Equal(t, upgrade.Latest.String(), persisted.Status.Version) + // sanity check + persisted := &v1alpha1.OpenTelemetryCollector{} + err = k8sClient.Get(context.Background(), nsn, persisted) + require.NoError(t, err) + require.Equal(t, beginV, persisted.Status.Version) - // cleanup - assert.NoError(t, k8sClient.Delete(context.Background(), &existing)) + // test + err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) + assert.NoError(t, err) + + // verify + err = k8sClient.Get(context.Background(), nsn, persisted) + assert.NoError(t, err) + assert.Equal(t, upgrade.Latest.String(), persisted.Status.Version) + + // cleanup + assert.NoError(t, k8sClient.Delete(context.Background(), &existing)) + }) + } } func TestUpgradeUpToLatestKnownVersion(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - } + existing := makeOtelcol(nsn) existing.Status.Version = "0.8.0" currentV := version.Get() @@ -111,15 +107,7 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { t.Run(tt.desc, func(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - } + existing := makeOtelcol(nsn) existing.Status.Version = tt.v currentV := version.Get() @@ -138,3 +126,15 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { }) } } + +func makeOtelcol(nsn types.NamespacedName) v1alpha1.OpenTelemetryCollector { + return v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + } +} From 7cb65fc8a761f7266e0abdc5b77c66fd6997f791 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 10 Dec 2021 21:15:43 +0530 Subject: [PATCH 0373/1234] Add 0.41.0 upgrade routine (#624) * Add 0.41.0 upgrade routine --- pkg/collector/upgrade/v0_41_0.go | 59 ++++++++++++ pkg/collector/upgrade/v0_41_0_test.go | 134 ++++++++++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + 3 files changed, 197 insertions(+) create mode 100644 pkg/collector/upgrade/v0_41_0.go create mode 100644 pkg/collector/upgrade/v0_41_0_test.go diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go new file mode 100644 index 000000000..88e62b962 --- /dev/null +++ b/pkg/collector/upgrade/v0_41_0.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_41_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.41.0, failed to parse configuration: %w", err) + } + + // Re-structure the cors section in otlp receiver + // in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4492 + receivers, _ := cfg["receivers"].(map[interface{}]interface{}) + + for k1, v1 := range receivers { + if strings.HasPrefix(k1.(string), "otlp") { + otlpReceiver, _ := v1.(map[interface{}]interface{}) + var createdCors bool + for k2, v2 := range otlpReceiver { + if k2.(string) == "cors_allowed_origins" || k2.(string) == "cors_allowed_headers" { + if !createdCors { + otlpReceiver["cors"] = make(map[interface{}]interface{}) + createdCors = true + } + newsCorsKey := strings.Replace(k2.(string), "cors_", "", 1) + otlpCors, _ := otlpReceiver["cors"].(map[interface{}]interface{}) + otlpCors[newsCorsKey] = v2 + delete(otlpReceiver, k2) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.41.0 has re-structured the %s inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release", k2)) + } + } + } + } + + return updateConfig(otelcol, cfg) +} diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go new file mode 100644 index 000000000..7448b5a94 --- /dev/null +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -0,0 +1,134 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_41_0Upgrade(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: + otlp: + cors_allowed_origins: + - https://foo.bar.com + - https://*.test.com + cors_allowed_headers: + - ExampleHeader + +service: + pipelines: + metrics: + receivers: [otlp] + exporters: [nop] +`, + }, + } + existing.Status.Version = "0.40.0" + + // TESTCASE 1: restructure cors for both allowed_origin & allowed_headers + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + assert.Equal(t, `receivers: + otlp: + cors: + allowed_headers: + - ExampleHeader + allowed_origins: + - https://foo.bar.com + - https://*.test.com +service: + pipelines: + metrics: + exporters: + - nop + receivers: + - otlp +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[0]) + assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_headers inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[1]) + + // TESTCASE 2: re-structure cors for allowed_origins + existing = v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: + otlp: + cors_allowed_origins: + - https://foo.bar.com + - https://*.test.com + +service: + pipelines: + metrics: + receivers: [otlp] + exporters: [nop] +`, + }, + } + + existing.Status.Version = "0.40.0" + res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + assert.Equal(t, `receivers: + otlp: + cors: + allowed_origins: + - https://foo.bar.com + - https://*.test.com +service: + pipelines: + metrics: + exporters: + - nop + receivers: + - otlp +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[0]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 061dc0e1b..067686330 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -66,6 +66,10 @@ var ( Version: *semver.MustParse("0.39.0"), upgrade: upgrade0_39_0, }, + { + Version: *semver.MustParse("0.41.0"), + upgrade: upgrade0_41_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From e8a86231c22610da4a7b0e6f685d7c2b29f4f4fb Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 10 Dec 2021 21:52:54 +0530 Subject: [PATCH 0374/1234] Bump otel collector to 0.41.0 (#625) * Bump otel collector to 0.41.0 --- CHANGELOG.md | 8 ++++++++ README.md | 1 + .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b6e3283..2a2658f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.41.0 +------------------- +* Bumped OpenTelemetry Collector to v0.41.0 +* Support `OpenTelemetryCollector.Spec.UpgradeStrategy` with allowable values: automatic, none ([#620](https://github.com/open-telemetry/opentelemetry-operator/pull/620), [@adriankostrubiak-tomtom](https://github.com/adriankostrubiak-tomtom)) +* Limit names and labels to 63 characters ([#609](https://github.com/open-telemetry/opentelemetry-operator/pull/609), [@mmatache](https://github.com/mmatache)) +* Support `healthz` and `readyz` probes to controller manager ([#603](https://github.com/open-telemetry/opentelemetry-operator/pull/603), [@adriankostrubiak-tomtom](https://github.com/adriankostrubiak-tomtom)) + + 0.40.0 ------------------- * Bumped OpenTelemetry Collector to v0.40.0 diff --git a/README.md b/README.md index 7aa9ec025..35702decb 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.41.0 | v1.20 to v1.22 | 1.6.1 | | v0.40.0 | v1.20 to v1.22 | 1.6.1 | | v0.39.0 | v1.20 to v1.22 | 1.6.1 | | v0.38.0 | v1.20 to v1.22 | 1.6.1 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 9ec503968..928489012 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.40.0 + name: opentelemetry-operator.v0.41.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -265,7 +265,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.40.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.41.0 livenessProbe: httpGet: path: /healthz @@ -369,7 +369,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.40.0 + version: 0.41.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 89fbbe78f..01515c0a4 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.40.0 +opentelemetry-collector=0.41.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.40.0 +operator=0.41.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 74a12e3ee247dbe26e4b48474cc55de149e449aa Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Mon, 13 Dec 2021 14:21:23 +0530 Subject: [PATCH 0375/1234] Fix flaky tests (#630) --- pkg/collector/upgrade/v0_41_0_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go index 7448b5a94..ab88e3eff 100644 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -79,10 +79,10 @@ service: - otlp `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[0]) - assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_headers inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[1]) + assert.Contains(t, res.Status.Messages, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release") + assert.Contains(t, res.Status.Messages, "upgrade to v0.41.0 has re-structured the cors_allowed_headers inside otlp "+ + "receiver config according to the upstream otlp receiver changes in 0.41.0 release") // TESTCASE 2: re-structure cors for allowed_origins existing = v1alpha1.OpenTelemetryCollector{ From ef17e195299b31b9354849f092978386e99b5ae2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 13 Dec 2021 11:53:09 +0100 Subject: [PATCH 0376/1234] Make scorecard tests more reliable (#627) Signed-off-by: Pavol Loffay --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d44342247..386bc02cf 100644 --- a/Makefile +++ b/Makefile @@ -127,7 +127,7 @@ prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind $(KUSTOMIZE) build config/crd -o tests/_build/crds/ scorecard-tests: - $(OPERATOR_SDK) scorecard bundle || (echo "scorecard test failed" && exit 1) + $(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1) set-test-image-vars: $(eval IMG=local/opentelemetry-operator:e2e) From 467baa6ade937c2c74d577e6bc4b18a5c96ebeaf Mon Sep 17 00:00:00 2001 From: Shree Prakash Date: Tue, 14 Dec 2021 23:37:59 +0530 Subject: [PATCH 0377/1234] Update comp matrix to include Kubernetes 1.23 --- .github/workflows/e2e.yaml | 3 +-- README.md | 1 + kind-1.23.yaml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 kind-1.23.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 3d6e6b495..afd8ecbad 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -13,10 +13,9 @@ jobs: strategy: matrix: kube-version: - - "1.19" - - "1.20" - "1.21" - "1.22" + - "1.23" steps: diff --git a/README.md b/README.md index 35702decb..2e2e23287 100644 --- a/README.md +++ b/README.md @@ -246,6 +246,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.42.0 (unreleased) | v1.21 to v1.23 | 1.6.1 | v0.41.0 | v1.20 to v1.22 | 1.6.1 | | v0.40.0 | v1.20 to v1.22 | 1.6.1 | | v0.39.0 | v1.20 to v1.22 | 1.6.1 | diff --git a/kind-1.23.yaml b/kind-1.23.yaml new file mode 100644 index 000000000..2d0b936e4 --- /dev/null +++ b/kind-1.23.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + image: kindest/node:v1.23.0@sha256:2f93d3c7b12a3e93e6c1f34f331415e105979961fcddbe69a4e3ab5a93ccbb35 From 9e2c3c393ad2694c637114fe2be75522a6ca977f Mon Sep 17 00:00:00 2001 From: Mritunjay Kumar Sharma Date: Tue, 14 Dec 2021 23:49:50 +0530 Subject: [PATCH 0378/1234] [FIX]: adds case to handle kubeletstats reciever to ignore endpoint (#558) * adds case to handle kubeletstats receiver to ignore endpoint --- pkg/collector/parser/receiver.go | 6 ++++++ pkg/collector/parser/receiver_test.go | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index 2fcf0209b..fb37ae9a5 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -100,6 +100,12 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in case name == "tcplog" || name == "udplog": endpoint = getAddressFromConfig(logger, name, listenAddressKey, config) + // ignore kubeletstats receiver as it holds the field key endpoint, and it + // is a scraper, we only expose endpoint through k8s service objects for + // receivers that aren't scrapers. + case name == "kubeletstats": + return nil + default: endpoint = getAddressFromConfig(logger, name, endpointKey, config) } diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index 10252e801..b706987ae 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -98,6 +98,21 @@ func TestReceiverFailsWhenPortIsntString(t *testing.T) { assert.Nil(t, p) } +func TestIgnorekubeletstatsEndpoint(t *testing.T) { + // ignore "kubeletstats" receiver endpoint field, this is special case + // as this receiver gets parsed by generic receiver parser + builder := NewGenericReceiverParser(logger, "kubeletstats", map[interface{}]interface{}{ + "endpoint": "0.0.0.0:9000", + }) + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, 0) +} + func TestReceiverFallbackWhenNotRegistered(t *testing.T) { // test p := For(logger, "myreceiver", map[interface{}]interface{}{}) From 53b62cabeb86844fffd4c1cb0cba736eaf3acbb0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 15 Dec 2021 11:33:26 +0100 Subject: [PATCH 0379/1234] Add support for nodejs and python image defaulting and upgrade (#607) * Add support nodejs and python image defaulting and upgrade Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix typo Signed-off-by: Pavol Loffay --- Dockerfile | 4 +- Makefile | 6 +- README.md | 6 -- apis/v1alpha1/instrumentation_webhook.go | 14 ++++- apis/v1alpha1/instrumentation_webhook_test.go | 10 ++- internal/config/main.go | 48 +++++++++------ internal/config/options.go | 38 ++++++++---- internal/version/main.go | 61 +++++++++++++------ internal/version/main_test.go | 10 ++- main.go | 35 +++++++---- pkg/instrumentation/upgrade/upgrade.go | 28 +++++++-- pkg/instrumentation/upgrade/upgrade_test.go | 18 ++++-- .../00-install-instrumentation.yaml | 2 - .../00-install-instrumentation.yaml | 2 - 14 files changed, 197 insertions(+), 85 deletions(-) diff --git a/Dockerfile b/Dockerfile index 98b250aee..ddfa75f24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,11 @@ ARG VERSION_DATE ARG OTELCOL_VERSION ARG TARGETALLOCATOR_VERSION ARG AUTO_INSTRUMENTATION_JAVA_VERSION +ARG AUTO_INSTRUMENTATION_NODEJS_VERSION +ARG AUTO_INSTRUMENTATION_PYTHON_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 386bc02cf..588648283 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,9 @@ OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-colle OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator | awk -F= '{print $$2}')" TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" +AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" +AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" # Image URL to use all building/pushing image targets IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator @@ -134,7 +136,7 @@ set-test-image-vars: # Build the container image, used only for local dev purposes container: - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} . + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} . # Push the container image, used only for local dev purposes container-push: diff --git a/README.md b/README.md index 2e2e23287..44a695fcb 100644 --- a/README.md +++ b/README.md @@ -186,12 +186,6 @@ spec: sampler: type: parentbased_traceidratio argument: "0.25" - java: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest - nodejs: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest - python: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:latest EOF ``` diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index b1a8267d5..fd71daada 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -25,7 +25,9 @@ import ( ) const ( - AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" + AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" ) // log is for logging in this package. @@ -56,6 +58,16 @@ func (r *Instrumentation) Default() { r.Spec.Java.Image = val } } + if r.Spec.NodeJS.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationNodeJS]; ok { + r.Spec.NodeJS.Image = val + } + } + if r.Spec.Python.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationPython]; ok { + r.Spec.Python.Image = val + } + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions={v1,v1beta1} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 1f60652a7..622e3ce8e 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -24,11 +24,17 @@ import ( func TestInstrumentationDefaultingWebhook(t *testing.T) { inst := &Instrumentation{ ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{AnnotationDefaultAutoInstrumentationJava: "img:1"}, + Annotations: map[string]string{ + AnnotationDefaultAutoInstrumentationJava: "java-img:1", + AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", + AnnotationDefaultAutoInstrumentationPython: "python-img:1", + }, }, } inst.Default() - assert.Equal(t, "img:1", inst.Spec.Java.Image) + assert.Equal(t, "java-img:1", inst.Spec.Java.Image) + assert.Equal(t, "nodejs-img:1", inst.Spec.NodeJS.Image) + assert.Equal(t, "python-img:1", inst.Spec.Python.Image) } func TestInstrumentationValidatingWebhook(t *testing.T) { diff --git a/internal/config/main.go b/internal/config/main.go index e54b1f2bc..359d583df 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -44,12 +44,14 @@ type Config struct { onChange []func() error // config state - collectorImage string - collectorConfigMapEntry string - targetAllocatorImage string - targetAllocatorConfigMapEntry string - platform platform.Platform - autoInstrumentationJavaImage string + collectorImage string + collectorConfigMapEntry string + targetAllocatorImage string + targetAllocatorConfigMapEntry string + platform platform.Platform + autoInstrumentationJavaImage string + autoInstrumentationNodeJSImage string + autoInstrumentationPythonImage string } // New constructs a new configuration based on the given options. @@ -68,16 +70,18 @@ func New(opts ...Option) Config { } return Config{ - autoDetect: o.autoDetect, - autoDetectFrequency: o.autoDetectFrequency, - collectorImage: o.collectorImage, - collectorConfigMapEntry: o.collectorConfigMapEntry, - targetAllocatorImage: o.targetAllocatorImage, - targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, - logger: o.logger, - onChange: o.onChange, - platform: o.platform, - autoInstrumentationJavaImage: o.autoInstrumentationjavaImage, + autoDetect: o.autoDetect, + autoDetectFrequency: o.autoDetectFrequency, + collectorImage: o.collectorImage, + collectorConfigMapEntry: o.collectorConfigMapEntry, + targetAllocatorImage: o.targetAllocatorImage, + targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, + logger: o.logger, + onChange: o.onChange, + platform: o.platform, + autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, + autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, + autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, } } @@ -169,7 +173,17 @@ func (c *Config) Platform() platform.Platform { return c.platform } -// AutoInstrumentationJavaImage returns OpenTelemetry auto-instrumentation container image. +// AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. func (c *Config) AutoInstrumentationJavaImage() string { return c.autoInstrumentationJavaImage } + +// AutoInstrumentationNodeJSImage returns OpenTelemetry NodeJS auto-instrumentation container image. +func (c *Config) AutoInstrumentationNodeJSImage() string { + return c.autoInstrumentationNodeJSImage +} + +// AutoInstrumentationPythonImage returns OpenTelemetry Python auto-instrumentation container image. +func (c *Config) AutoInstrumentationPythonImage() string { + return c.autoInstrumentationPythonImage +} diff --git a/internal/config/options.go b/internal/config/options.go index 997c12775..727c88094 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -28,17 +28,19 @@ import ( type Option func(c *options) type options struct { - autoDetect autodetect.AutoDetect - autoDetectFrequency time.Duration - targetAllocatorImage string - collectorImage string - autoInstrumentationjavaImage string - collectorConfigMapEntry string - targetAllocatorConfigMapEntry string - logger logr.Logger - onChange []func() error - platform platform.Platform - version version.Version + autoDetect autodetect.AutoDetect + autoDetectFrequency time.Duration + targetAllocatorImage string + collectorImage string + autoInstrumentationJavaImage string + autoInstrumentationNodeJSImage string + autoInstrumentationPythonImage string + collectorConfigMapEntry string + targetAllocatorConfigMapEntry string + logger logr.Logger + onChange []func() error + platform platform.Platform + version version.Version } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -98,6 +100,18 @@ func WithVersion(v version.Version) Option { func WithAutoInstrumentationJavaImage(s string) Option { return func(o *options) { - o.autoInstrumentationjavaImage = s + o.autoInstrumentationJavaImage = s + } +} + +func WithAutoInstrumentationNodeJSImage(s string) Option { + return func(o *options) { + o.autoInstrumentationNodeJSImage = s + } +} + +func WithAutoInstrumentationPythonImage(s string) Option { + return func(o *options) { + o.autoInstrumentationPythonImage = s } } diff --git a/internal/version/main.go b/internal/version/main.go index d16ea683c..5b2dcc539 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -21,43 +21,52 @@ import ( ) var ( - version string - buildDate string - otelCol string - targetAllocator string - autoInstrumentationJava string + version string + buildDate string + otelCol string + targetAllocator string + autoInstrumentationJava string + autoInstrumentationNodeJS string + autoInstrumentationPython string ) // Version holds this Operator's version as well as the version of some of the components it uses. type Version struct { - Operator string `json:"opentelemetry-operator"` - BuildDate string `json:"build-date"` - OpenTelemetryCollector string `json:"opentelemetry-collector-version"` - Go string `json:"go-version"` - TargetAllocator string `json:"target-allocator-version"` - JavaAutoInstrumentation string `json:"auto-instrumentation-java"` + Operator string `json:"opentelemetry-operator"` + BuildDate string `json:"build-date"` + OpenTelemetryCollector string `json:"opentelemetry-collector-version"` + Go string `json:"go-version"` + TargetAllocator string `json:"target-allocator-version"` + AutoInstrumentationJava string `json:"auto-instrumentation-java"` + AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` + AutoInstrumentationPython string `json:"auto-instrumentation-python"` } // Get returns the Version object with the relevant information. func Get() Version { return Version{ - Operator: version, - BuildDate: buildDate, - OpenTelemetryCollector: OpenTelemetryCollector(), - Go: runtime.Version(), - TargetAllocator: TargetAllocator(), - JavaAutoInstrumentation: javaAutoInstrumentation(), + Operator: version, + BuildDate: buildDate, + OpenTelemetryCollector: OpenTelemetryCollector(), + Go: runtime.Version(), + TargetAllocator: TargetAllocator(), + AutoInstrumentationJava: AutoInstrumentationJava(), + AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), + AutoInstrumentationPython: AutoInstrumentationPython(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, v.Go, v.TargetAllocator, + v.AutoInstrumentationJava, + v.AutoInstrumentationNodeJS, + v.AutoInstrumentationPython, ) } @@ -83,9 +92,23 @@ func TargetAllocator() string { return "0.0.0" } -func javaAutoInstrumentation() string { +func AutoInstrumentationJava() string { if len(autoInstrumentationJava) > 0 { return autoInstrumentationJava } return "0.0.0" } + +func AutoInstrumentationNodeJS() string { + if len(autoInstrumentationNodeJS) > 0 { + return autoInstrumentationNodeJS + } + return "0.0.0" +} + +func AutoInstrumentationPython() string { + if len(autoInstrumentationPython) > 0 { + return autoInstrumentationPython + } + return "0.0.0" +} diff --git a/internal/version/main_test.go b/internal/version/main_test.go index fdc282dd9..65d194337 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -51,5 +51,13 @@ func TestTargetAllocatorVersionFromBuild(t *testing.T) { } func TestAutoInstrumentationJavaFallbackVersion(t *testing.T) { - assert.Equal(t, "0.0.0", javaAutoInstrumentation()) + assert.Equal(t, "0.0.0", AutoInstrumentationJava()) +} + +func TestAutoInstrumentationNodeJSFallbackVersion(t *testing.T) { + assert.Equal(t, "0.0.0", AutoInstrumentationNodeJS()) +} + +func TestAutoInstrumentationPythonFallbackVersion(t *testing.T) { + assert.Equal(t, "0.0.0", AutoInstrumentationPython()) } diff --git a/main.go b/main.go index 53fa9e9d4..62e2bfb38 100644 --- a/main.go +++ b/main.go @@ -70,12 +70,14 @@ func main() { // add flags related to this operator var ( - metricsAddr string - probeAddr string - enableLeaderElection bool - collectorImage string - targetAllocatorImage string - autoInstrumentationJava string + metricsAddr string + probeAddr string + enableLeaderElection bool + collectorImage string + targetAllocatorImage string + autoInstrumentationJava string + autoInstrumentationNodeJS string + autoInstrumentationPython string ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") flag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") @@ -84,7 +86,9 @@ func main() { "Enabling this will ensure there is only one active controller manager.") pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("otel/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.JavaAutoInstrumentation), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) @@ -94,6 +98,8 @@ func main() { "opentelemetry-collector", collectorImage, "opentelemetry-targetallocator", targetAllocatorImage, "auto-instrumentation-java", autoInstrumentationJava, + "auto-instrumentation-nodejs", autoInstrumentationNodeJS, + "auto-instrumentation-python", autoInstrumentationPython, "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, @@ -115,6 +121,8 @@ func main() { config.WithCollectorImage(collectorImage), config.WithTargetAllocatorImage(targetAllocatorImage), config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), + config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), + config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), config.WithAutoDetect(ad), ) @@ -175,7 +183,11 @@ func main() { } if err = (&otelv1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava}, + Annotations: map[string]string{ + otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava, + otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, + otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, + }, }, }).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "Instrumentation") @@ -228,9 +240,10 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { u := &instrumentationupgrade.InstrumentationUpgrade{ - Logger: ctrl.Log.WithName("instrumentation-upgrade"), - DefaultAutoInstrJava: cfg.AutoInstrumentationJavaImage(), - Client: mgr.GetClient(), + Logger: ctrl.Log.WithName("instrumentation-upgrade"), + DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), + DefaultAutoInstNodeJS: cfg.AutoInstrumentationJavaImage(), + Client: mgr.GetClient(), } return u.ManagedInstances(c) })) diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index e15aaab15..9a702cbf3 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -26,9 +26,11 @@ import ( ) type InstrumentationUpgrade struct { - Logger logr.Logger - DefaultAutoInstrJava string - Client client.Client + Logger logr.Logger + DefaultAutoInstJava string + DefaultAutoInstNodeJS string + DefaultAutoInstPython string + Client client.Client } //+kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch @@ -70,8 +72,24 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru if autoInstJava != "" { // upgrade the image only if the image matches the annotation if inst.Spec.Java.Image == autoInstJava { - inst.Spec.Java.Image = u.DefaultAutoInstrJava - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstrJava + inst.Spec.Java.Image = u.DefaultAutoInstJava + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstJava + } + } + autoInstNodeJS := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] + if autoInstNodeJS != "" { + // upgrade the image only if the image matches the annotation + if inst.Spec.NodeJS.Image == autoInstNodeJS { + inst.Spec.NodeJS.Image = u.DefaultAutoInstNodeJS + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] = u.DefaultAutoInstNodeJS + } + } + autoInstPython := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] + if autoInstPython != "" { + // upgrade the image only if the image matches the annotation + if inst.Spec.Python.Image == autoInstPython { + inst.Spec.Python.Image = u.DefaultAutoInstPython + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] = u.DefaultAutoInstPython } } return inst diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 5baa97d9a..07eb0a933 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -43,7 +43,9 @@ func TestUpgrade(t *testing.T) { Name: "my-inst", Namespace: nsName, Annotations: map[string]string{ - v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", + v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", + v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", + v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", }, }, Spec: v1alpha1.InstrumentationSpec{ @@ -54,13 +56,17 @@ func TestUpgrade(t *testing.T) { } inst.Default() assert.Equal(t, "java:1", inst.Spec.Java.Image) + assert.Equal(t, "nodejs:1", inst.Spec.NodeJS.Image) + assert.Equal(t, "python:1", inst.Spec.Python.Image) err = k8sClient.Create(context.Background(), inst) require.NoError(t, err) up := &InstrumentationUpgrade{ - Logger: logr.Discard(), - DefaultAutoInstrJava: "java:2", - Client: k8sClient, + Logger: logr.Discard(), + DefaultAutoInstJava: "java:2", + DefaultAutoInstNodeJS: "nodejs:2", + DefaultAutoInstPython: "python:2", + Client: k8sClient, } err = up.ManagedInstances(context.Background()) require.NoError(t, err) @@ -73,4 +79,8 @@ func TestUpgrade(t *testing.T) { require.NoError(t, err) assert.Equal(t, "java:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava]) assert.Equal(t, "java:2", updated.Spec.Java.Image) + assert.Equal(t, "nodejs:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS]) + assert.Equal(t, "nodejs:2", updated.Spec.NodeJS.Image) + assert.Equal(t, "python:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython]) + assert.Equal(t, "python:2", updated.Spec.Python.Image) } diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml index a17642f74..9ea4358b9 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml @@ -8,5 +8,3 @@ spec: propagators: - jaeger - b3 - nodejs: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml index 786a4ba9e..d41827bf8 100644 --- a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml @@ -8,5 +8,3 @@ spec: propagators: - jaeger - b3 - python: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:latest From e6b64eef4bd7f3d98dc46c59dde73eeeeb5e3979 Mon Sep 17 00:00:00 2001 From: mmatache <89529881+mmatache@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:11:00 +0200 Subject: [PATCH 0380/1234] fix issue in name trimming not adding all values (#641) --- pkg/naming/triming.go | 3 +-- pkg/naming/triming_test.go | 11 ++++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/naming/triming.go b/pkg/naming/triming.go index 152025478..4b2dde37e 100644 --- a/pkg/naming/triming.go +++ b/pkg/naming/triming.go @@ -35,11 +35,11 @@ func init() { func Truncate(format string, max int, values ...interface{}) string { var truncated []interface{} result := fmt.Sprintf(format, values...) - if excess := len(result) - max; excess > 0 { // we try to reduce the first string we find for _, value := range values { if excess == 0 { + truncated = append(truncated, value) continue } @@ -55,7 +55,6 @@ func Truncate(format string, max int, values ...interface{}) string { truncated = append(truncated, value) } - result = fmt.Sprintf(format, truncated...) } diff --git a/pkg/naming/triming_test.go b/pkg/naming/triming_test.go index 90fccd7fd..e1396d478 100644 --- a/pkg/naming/triming_test.go +++ b/pkg/naming/triming_test.go @@ -59,6 +59,13 @@ func TestTruncate(t *testing.T) { expected: "4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174--collector", cap: "first value gets dropped, second truncated", }, + { + format: "%s-%s-collector", + max: 63, + values: []interface{}{"4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11ea-b174-c85b7644b6b5", "d0c1e62"}, + expected: "4d96-11ea-b174-c85b7644b6b5-5d0c1e62-4d96-11e-d0c1e62-collector", + cap: "first value gets truncated, second added", + }, { format: "%d-%s-collector", max: 63, @@ -67,7 +74,9 @@ func TestTruncate(t *testing.T) { cap: "first value gets passed, second truncated", }, } { - assert.Equal(t, tt.expected, Truncate(tt.format, tt.max, tt.values...)) + t.Run(tt.cap, func(t *testing.T) { + assert.Equal(t, tt.expected, Truncate(tt.format, tt.max, tt.values...)) + }) } } From 7f70d010561be1d8b73d5dabcf6844f7e5c2fb67 Mon Sep 17 00:00:00 2001 From: luigibk <41112628+luigibk@users.noreply.github.com> Date: Fri, 17 Dec 2021 12:57:14 +0000 Subject: [PATCH 0381/1234] Add read permission to 'group' for java autoinstrumentation JAR (#640) * Fix: 636 Java autoinstrumentation group permissions * Node + Python auto-instrumentation group permissions --- autoinstrumentation/java/Dockerfile | 2 +- autoinstrumentation/nodejs/Dockerfile | 2 +- autoinstrumentation/python/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile index fbf535ac1..5f143336e 100644 --- a/autoinstrumentation/java/Dockerfile +++ b/autoinstrumentation/java/Dockerfile @@ -4,4 +4,4 @@ ARG version ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /javaagent.jar -RUN chmod -R o+r /javaagent.jar +RUN chmod -R go+r /javaagent.jar diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 8677e49ea..cd648ccea 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -9,4 +9,4 @@ FROM busybox COPY --from=build /operator-build/build/workspace /autoinstrumentation -RUN chmod -R o+r /autoinstrumentation +RUN chmod -R go+r /autoinstrumentation diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index cdbf40c41..8086afe0a 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -10,4 +10,4 @@ FROM busybox COPY --from=build /operator-build/workspace /autoinstrumentation -RUN chmod -R o+r /autoinstrumentation +RUN chmod -R go+r /autoinstrumentation From 16b49188edee8aa753474ae7a87ec99fca38b238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 09:57:00 +0100 Subject: [PATCH 0382/1234] Bump docker/login-action from 1.10.0 to 1.12.0 (#645) Bumps [docker/login-action](https://github.com/docker/login-action) from 1.10.0 to 1.12.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1.10.0...v1.12.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0a93e57f9..c0115e554 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.10.0 + uses: docker/login-action@v1.12.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 867c4c11b..97169ad4c 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.10.0 + uses: docker/login-action@v1.12.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index ff5521d9c..80886e40b 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.10.0 + uses: docker/login-action@v1.12.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 60b6643ee..9caefb011 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -53,14 +53,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to Quay - uses: docker/login-action@v1 + uses: docker/login-action@v1.12.0 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1 + uses: docker/login-action@v1.12.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From d2c41edfd7af597d89c36414cc346a9264dc112a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 22 Dec 2021 10:59:21 +0100 Subject: [PATCH 0383/1234] Set instrumentation versions when building official image (#649) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 9caefb011..6977fb6d2 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -25,6 +25,9 @@ jobs: run: | grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "TARGETALLOCATOR_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print "AUTO_INSTRUMENTATION_JAVA_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -81,5 +84,8 @@ jobs: VERSION_DATE=${{ env.VERSION_DATE }} OTELCOL_VERSION=${{ env.OTELCOL_VERSION }} TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }} + AUTO_INSTRUMENTATION_JAVA_VERSION=${{ env.AUTO_INSTRUMENTATION_JAVA_VERSION }} + AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} + AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env. AUTO_INSTRUMENTATION_PYTHON_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache From e7bb958d0f8a8956f1e32f84f13f376bfbda3afa Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 22 Dec 2021 17:56:58 +0530 Subject: [PATCH 0384/1234] Operator patch release (#650) --- CHANGELOG.md | 5 +++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a2658f09..069494196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changes by Version ================== +0.41.1 +------------------- +* Add support for nodejs and python image defaulting and upgrade ([#607](https://github.com/open-telemetry/opentelemetry-operator/pull/607), [@pavolloffay](https://github.com/pavolloffay)) +* Bugfix for `kubeletstats` receiver operator is exposing the service port, ignore port exposition as it is a scraper ([#558](https://github.com/open-telemetry/opentelemetry-operator/pull/558), [@mritunjaysharma394](https://github.com/mritunjaysharma394)) + 0.41.0 ------------------- * Bumped OpenTelemetry Collector to v0.41.0 diff --git a/README.md b/README.md index 44a695fcb..1cc84cb8e 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| -| v0.42.0 (unreleased) | v1.21 to v1.23 | 1.6.1 +| v0.41.1 | v1.21 to v1.23 | 1.6.1 | v0.41.0 | v1.20 to v1.22 | 1.6.1 | | v0.40.0 | v1.20 to v1.22 | 1.6.1 | | v0.39.0 | v1.20 to v1.22 | 1.6.1 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 928489012..25f3dcc5c 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.41.0 + name: opentelemetry-operator.v0.41.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -265,7 +265,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.41.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.41.1 livenessProbe: httpGet: path: /healthz @@ -369,7 +369,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.41.0 + version: 0.41.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 01515c0a4..176852ee8 100644 --- a/versions.txt +++ b/versions.txt @@ -5,7 +5,7 @@ opentelemetry-collector=0.41.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.41.0 +operator=0.41.1 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 139fb694879d2651309f538e94a2842d273a17b0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 11 Jan 2022 16:20:24 +0100 Subject: [PATCH 0385/1234] Add Github action to publish target allocator (#659) Signed-off-by: Pavol Loffay --- .../workflows/publish-target-allocator.yaml | 44 +++++++++++++++++++ cmd/otel-allocator/version.txt | 1 + 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/publish-target-allocator.yaml create mode 100644 cmd/otel-allocator/version.txt diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml new file mode 100644 index 000000000..d3eea66f5 --- /dev/null +++ b/.github/workflows/publish-target-allocator.yaml @@ -0,0 +1,44 @@ +name: "Publish target allocator" + +on: + push: + paths: + - 'cmd/otel-allocator/**' + - '.github/workflows/publish-target-allocator.yaml' + branches: + - main + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2.4.0 + + - name: Read version + run: echo "VERSION=$(cat cmd/otel-allocator/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3.6.1 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v1.12.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2.7.0 + with: + context: cmd/otel-allocator + push: true + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/cmd/otel-allocator/version.txt b/cmd/otel-allocator/version.txt new file mode 100644 index 000000000..6e8bf73aa --- /dev/null +++ b/cmd/otel-allocator/version.txt @@ -0,0 +1 @@ +0.1.0 From 70e04659bf1f060bc262bc793a49741a7c347348 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 11 Jan 2022 17:13:41 +0100 Subject: [PATCH 0386/1234] Use target allocator for GHCR (#660) Signed-off-by: Pavol Loffay --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 62e2bfb38..62f7a664d 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func main() { "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("otel/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("quay.io/opentelemetry/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") From 06c3d0c5545f4e7da08c7eec8759efe0a364ad7b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 11 Jan 2022 19:05:56 +0100 Subject: [PATCH 0387/1234] Remove publishing operator image to quay.io (#661) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 6977fb6d2..618f581d3 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -35,7 +35,7 @@ jobs: id: docker_meta uses: docker/metadata-action@v3.6.1 with: - images: quay.io/opentelemetry/opentelemetry-operator,ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator + images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tag-semver: | {{raw}} {{version}} @@ -55,13 +55,6 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - - name: Login to Quay - uses: docker/login-action@v1.12.0 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_PASSWORD }} - - name: Login to GitHub Package Registry uses: docker/login-action@v1.12.0 with: From 1f1fa71c5fa493d6d8e870b72de207c37af98fb5 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 11 Jan 2022 16:14:12 -0300 Subject: [PATCH 0388/1234] Fix port derivation (#651) * Fix port derivation --- pkg/collector/parser/receiver.go | 21 ++++++++++++++++++--- pkg/collector/parser/receiver_test.go | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index fb37ae9a5..156a6928b 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -16,6 +16,7 @@ package parser import ( + "errors" "fmt" "regexp" "strconv" @@ -155,9 +156,23 @@ func portName(receiverName string, port int32) string { } func portFromEndpoint(endpoint string) (int32, error) { - i := strings.LastIndex(endpoint, ":") + 1 - part := endpoint[i:] - port, err := strconv.ParseInt(part, 10, 32) + var err error + var port int64 + + r := regexp.MustCompile(":[0-9]+") + + if r.MatchString(endpoint) { + port, err = strconv.ParseInt(strings.Replace(r.FindString(endpoint), ":", "", -1), 10, 32) + + if err != nil { + return 0, err + } + } + + if port == 0 { + return 0, errors.New("Port should not be empty") + } + return int32(port), err } diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index b706987ae..47f741ea8 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -67,6 +67,7 @@ func TestReceiverParsePortFromEndpoint(t *testing.T) { errorExpected bool }{ {"regular case", "http://localhost:1234", 1234, false}, + {"absolute with path", "http://localhost:1234/server-status?auto", 1234, false}, {"no protocol", "0.0.0.0:1234", 1234, false}, {"just port", ":1234", 1234, false}, {"no port at all", "http://localhost", 0, true}, From 7101339a6b346ec929e81cacfdbd270f04824356 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Wed, 12 Jan 2022 07:12:52 -0600 Subject: [PATCH 0389/1234] Parse arguments before using it in config (#662) --- internal/config/main.go | 13 ------------- main.go | 5 +---- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/internal/config/main.go b/internal/config/main.go index 359d583df..dae27bb72 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -19,7 +19,6 @@ import ( "time" "github.com/go-logr/logr" - "github.com/spf13/pflag" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -85,18 +84,6 @@ func New(opts ...Option) Config { } } -// FlagSet binds the flags to the user-modifiable values of the operator's configuration. -func (c *Config) FlagSet() *pflag.FlagSet { - fs := pflag.NewFlagSet("opentelemetry-operator", pflag.ExitOnError) - pflag.StringVar(&c.collectorImage, - "otelcol-image", - c.collectorImage, - "The default image to use for OpenTelemetry Collector when not specified in the individual custom resource (CR)", - ) - - return fs -} - // StartAutoDetect attempts to automatically detect relevant information for this operator. This will block until the first // run is executed and will schedule periodic updates. func (c *Config) StartAutoDetect() error { diff --git a/main.go b/main.go index 62f7a664d..6c0011916 100644 --- a/main.go +++ b/main.go @@ -89,6 +89,7 @@ func main() { pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) @@ -126,10 +127,6 @@ func main() { config.WithAutoDetect(ad), ) - pflag.CommandLine.AddFlagSet(cfg.FlagSet()) - - pflag.Parse() - watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") if found { setupLog.Info("watching namespace(s)", "namespaces", watchNamespace) From b22798eb9337bde872b09359be61f4279cb6a350 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 12 Jan 2022 16:29:03 +0100 Subject: [PATCH 0390/1234] Create 1.9.2 Java auto-instrumentation image (#663) Signed-off-by: Pavol Loffay --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index f8a696c8d..8fdcf3869 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.7.2 +1.9.2 From 55a0dc2e86a930ff72aac54391f369520c0d8064 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 13 Jan 2022 11:59:35 +0100 Subject: [PATCH 0391/1234] Bump OTEL collector to 0.42.0 (#664) * Bump OTEL collector to 0.42.0 Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay --- CHANGELOG.md | 8 ++++++++ README.md | 3 ++- RELEASE.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 069494196..a689ed081 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.42.0 +------------------- +* Bumped OpenTelemetry Collector to v0.42.0 +* Parse flags before using them in config ([#662](https://github.com/open-telemetry/opentelemetry-operator/pull/662), [@rubenvp8510](https://github.com/rubenvp8510)) +* Fix port derivation ([#651](https://github.com/open-telemetry/opentelemetry-operator/pull/651), [@yuriolisa](https://github.com/yuriolisa)) +* Remove publishing operator image to quay.io ([#661](https://github.com/open-telemetry/opentelemetry-operator/pull/661), [@pavolloffay](https://github.com/pavolloffay)) +* Use target allocator from GHCR ([#660](https://github.com/open-telemetry/opentelemetry-operator/pull/660), [@pavolloffay](https://github.com/pavolloffay)) + 0.41.1 ------------------- * Add support for nodejs and python image defaulting and upgrade ([#607](https://github.com/open-telemetry/opentelemetry-operator/pull/607), [@pavolloffay](https://github.com/pavolloffay)) diff --git a/README.md b/README.md index 1cc84cb8e..6a10a962f 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,8 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| -| v0.41.1 | v1.21 to v1.23 | 1.6.1 +| v0.42.0 | v1.21 to v1.23 | 1.6.1 | +| v0.41.1 | v1.21 to v1.23 | 1.6.1 | | v0.41.0 | v1.20 to v1.22 | 1.6.1 | | v0.40.0 | v1.20 to v1.22 | 1.6.1 | | v0.39.0 | v1.20 to v1.22 | 1.6.1 | diff --git a/RELEASE.md b/RELEASE.md index efaa830d1..6ed6fd670 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. -1. Run `make bundle VERSION=0.38.0`, using the version that will be released. +1. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. 1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! 1. Add the changes to the changelog 1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 25f3dcc5c..2882f8159 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.41.1 + name: opentelemetry-operator.v0.42.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -265,7 +265,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.41.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.42.0 livenessProbe: httpGet: path: /healthz @@ -369,7 +369,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.41.1 + version: 0.42.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 176852ee8..6e90ed47c 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.41.0 +opentelemetry-collector=0.42.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.41.1 +operator=0.42.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 3985efb06e7c309ec05304ced1d7e78ebec1326a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 11:57:46 +0530 Subject: [PATCH 0392/1234] Bump docker/build-push-action from 2.7.0 to 2.8.0 (#669) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.7.0...v2.8.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index c0115e554..00b287f20 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.7.0 + uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/java push: true diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 97169ad4c..6b4c0ecd1 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.7.0 + uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/nodejs push: true diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 80886e40b..9e483f20e 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.7.0 + uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/python push: true diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 618f581d3..34d973ed8 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v2.6.1 + uses: docker/build-push-action@v2.8.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index d3eea66f5..c875999e9 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.7.0 + uses: docker/build-push-action@v2.8.0 with: context: cmd/otel-allocator push: true From 8f3dc64cc18a5826e92993bbd9680a41795c09bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 11:58:32 +0530 Subject: [PATCH 0393/1234] Bump docker/metadata-action from 3.6.1 to 3.6.2 (#608) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.6.1 to 3.6.2. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.6.1...v3.6.2) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 00b287f20..100c9a87c 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.1 + uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 6b4c0ecd1..abb2339e7 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.1 + uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 9e483f20e..c5a51046a 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.1 + uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 34d973ed8..de769794f 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.6.1 + uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tag-semver: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index c875999e9..e7f98f1a3 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.1 + uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From 7c69ad5bea42ad52846f70a5417f5c12cc6fb952 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 25 Jan 2022 15:09:03 +0100 Subject: [PATCH 0394/1234] Test file permissions for auto-instrumentations (#643) * Test file permissions for auto-instrumentations Signed-off-by: Pavol Loffay * Revert Signed-off-by: Pavol Loffay --- tests/e2e/instrumentation-java/01-install-app.yaml | 4 ++++ tests/e2e/instrumentation-nodejs/01-install-app.yaml | 4 ++++ tests/e2e/instrumentation-python/01-install-app.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/tests/e2e/instrumentation-java/01-install-app.yaml b/tests/e2e/instrumentation-java/01-install-app.yaml index b66ffa759..093bb8b4c 100644 --- a/tests/e2e/instrumentation-java/01-install-app.yaml +++ b/tests/e2e/instrumentation-java/01-install-app.yaml @@ -15,6 +15,10 @@ spec: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-java: "true" spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 containers: - name: myapp image: ghcr.io/pavolloffay/spring-petclinic:latest diff --git a/tests/e2e/instrumentation-nodejs/01-install-app.yaml b/tests/e2e/instrumentation-nodejs/01-install-app.yaml index 7514b5986..1a1a29888 100644 --- a/tests/e2e/instrumentation-nodejs/01-install-app.yaml +++ b/tests/e2e/instrumentation-nodejs/01-install-app.yaml @@ -15,6 +15,10 @@ spec: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-nodejs: "true" spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 containers: - name: myapp image: ghcr.io/anuraaga/express-hello-world:latest diff --git a/tests/e2e/instrumentation-python/01-install-app.yaml b/tests/e2e/instrumentation-python/01-install-app.yaml index 8f3ba8d3b..e8e9e0f94 100644 --- a/tests/e2e/instrumentation-python/01-install-app.yaml +++ b/tests/e2e/instrumentation-python/01-install-app.yaml @@ -15,6 +15,10 @@ spec: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-python: "true" spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 containers: - name: myapp image: ghcr.io/anuraaga/flask-hello-world:latest From d965ac3127a61338418a17567de24bb971cc1a15 Mon Sep 17 00:00:00 2001 From: Macaria Constantin <97953311+mcariapas@users.noreply.github.com> Date: Thu, 27 Jan 2022 14:39:14 +0200 Subject: [PATCH 0395/1234] Fix collector config update (#670) * fix/460 : Added opentelemetry-operator-config/sha256 annotaton to pod annotations * PR comments fixes * Created e2e test --- apis/v1alpha1/zz_generated.deepcopy.go | 1 - pkg/collector/annotations.go | 16 +++++++++++ pkg/collector/annotations_test.go | 9 +++++++ pkg/collector/daemonset.go | 3 ++- pkg/collector/daemonset_test.go | 10 +++++-- pkg/collector/deployment.go | 3 ++- pkg/collector/deployment_test.go | 10 +++++-- pkg/collector/statefulset.go | 3 ++- pkg/collector/statefulset_test.go | 10 +++++-- .../00-assert.yaml | 26 ++++++++++++++++++ .../00-errors.yaml | 7 +++++ .../00-install.yaml | 21 +++++++++++++++ .../01-assert-second-config.yaml | 27 +++++++++++++++++++ .../01-install-second-config.yaml | 24 +++++++++++++++++ 14 files changed, 160 insertions(+), 10 deletions(-) create mode 100644 tests/e2e/smoke-restarting-deployment/00-assert.yaml create mode 100644 tests/e2e/smoke-restarting-deployment/00-errors.yaml create mode 100644 tests/e2e/smoke-restarting-deployment/00-install.yaml create mode 100644 tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml create mode 100644 tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 20b2a4e64..a09543780 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Copyright The OpenTelemetry Authors diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index ada126c79..578f235dc 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -43,6 +43,22 @@ func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { return annotations } +// PodAnnotations return the spec annotations for OpenTelemetryCollector pod. +func PodAnnotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { + // new map every time, so that we don't touch the instance's annotations + podAnnotations := map[string]string{} + + // allow override of pod annotations + for k, v := range instance.Spec.PodAnnotations { + podAnnotations[k] = v + } + + // make sure sha256 for configMap is always calculated + podAnnotations["opentelemetry-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) + + return podAnnotations +} + func getConfigMapSHA(config string) string { h := sha256.Sum256([]byte(config)) return fmt.Sprintf("%x", h) diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index a89724fd7..dfd2246cd 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -37,12 +37,14 @@ func TestDefaultAnnotations(t *testing.T) { // test annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) //verify assert.Equal(t, "true", annotations["prometheus.io/scrape"]) assert.Equal(t, "8888", annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", annotations["prometheus.io/path"]) assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["opentelemetry-operator-config/sha256"]) } func TestUserAnnotations(t *testing.T) { @@ -64,12 +66,14 @@ func TestUserAnnotations(t *testing.T) { // test annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) //verify assert.Equal(t, "false", annotations["prometheus.io/scrape"]) assert.Equal(t, "1234", annotations["prometheus.io/port"]) assert.Equal(t, "/test", annotations["prometheus.io/path"]) assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["opentelemetry-operator-config/sha256"]) } func TestAnnotationsPropagateDown(t *testing.T) { @@ -78,12 +82,17 @@ func TestAnnotationsPropagateDown(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"myapp": "mycomponent"}, }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PodAnnotations: map[string]string{"pod_annotation": "pod_annotation_value"}, + }, } // test annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) // verify assert.Len(t, annotations, 5) assert.Equal(t, "mycomponent", annotations["myapp"]) + assert.Equal(t, "pod_annotation_value", podAnnotations["pod_annotation"]) } diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 97780df12..ef48b0593 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -31,6 +31,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) return appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ @@ -46,7 +47,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Spec.PodAnnotations, + Annotations: podAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 9d84abfe3..81a66cc5f 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -51,8 +51,11 @@ func TestDaemonSetNewDefault(t *testing.T) { assert.Len(t, d.Spec.Template.Spec.Containers, 1) - // none of the default annotations should propagate down to the pod - assert.Empty(t, d.Spec.Template.Annotations) + // verify sha256 podAnnotation + expectedAnnotations := map[string]string{ + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + } + assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Selector.MatchLabels, d.Spec.Template.Labels) @@ -90,6 +93,9 @@ func TestDaemonsetPodAnnotations(t *testing.T) { // test ds := DaemonSet(cfg, logger, otelcol) + //Add sha256 podAnnotation + testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + // verify assert.Equal(t, "my-instance-collector", ds.Name) assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 9e027d4f8..35533c628 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -31,6 +31,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ @@ -47,7 +48,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Spec.PodAnnotations, + Annotations: podAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index fb119e441..e88a42742 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -59,8 +59,11 @@ func TestDeploymentNewDefault(t *testing.T) { assert.Len(t, d.Spec.Template.Spec.Containers, 1) - // none of the default annotations should propagate down to the pod - assert.Empty(t, d.Spec.Template.Annotations) + // verify sha256 podAnnotation + expectedAnnotations := map[string]string{ + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + } + assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) @@ -82,6 +85,9 @@ func TestDeploymentPodAnnotations(t *testing.T) { // test d := Deployment(cfg, logger, otelcol) + //Add sha256 podAnnotation + testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + // verify assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index d8ee3b720..f100054cf 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -31,6 +31,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) + podAnnotations := PodAnnotations(otelcol) return appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ @@ -47,7 +48,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Spec.PodAnnotations, + Annotations: podAnnotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 8cc4e9d3f..d19c50603 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -55,8 +55,11 @@ func TestStatefulSetNewDefault(t *testing.T) { assert.Len(t, ss.Spec.Template.Spec.Containers, 1) - // none of the default annotations should propagate down to the pod - assert.Empty(t, ss.Spec.Template.Annotations) + // verify sha256 podAnnotation + expectedAnnotations := map[string]string{ + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + } + assert.Equal(t, expectedAnnotations, ss.Spec.Template.Annotations) // the pod selector should match the pod spec's labels assert.Equal(t, ss.Spec.Selector.MatchLabels, ss.Spec.Template.Labels) @@ -141,6 +144,9 @@ func TestStatefulSetPodAnnotations(t *testing.T) { // test ss := StatefulSet(cfg, logger, otelcol) + //Add sha256 podAnnotation + testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + // verify assert.Equal(t, "my-instance-collector", ss.Name) assert.Equal(t, testPodAnnotationValues, ss.Spec.Template.Annotations) diff --git a/tests/e2e/smoke-restarting-deployment/00-assert.yaml b/tests/e2e/smoke-restarting-deployment/00-assert.yaml new file mode 100644 index 000000000..0e8b1adeb --- /dev/null +++ b/tests/e2e/smoke-restarting-deployment/00-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: restarting-collector +status: + readyReplicas: 1 + +--- + +apiVersion: v1 +kind: Pod +spec: + containers: + - name: otc-container +status: + phase: Running + +--- + +apiVersion: v1 +kind: Service +metadata: + name: restarting-collector +spec: + ports: + - targetPort: 14250 diff --git a/tests/e2e/smoke-restarting-deployment/00-errors.yaml b/tests/e2e/smoke-restarting-deployment/00-errors.yaml new file mode 100644 index 000000000..6f6df7501 --- /dev/null +++ b/tests/e2e/smoke-restarting-deployment/00-errors.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Service +metadata: + name: restarting-collector +spec: + ports: + - targetPort: 4317 diff --git a/tests/e2e/smoke-restarting-deployment/00-install.yaml b/tests/e2e/smoke-restarting-deployment/00-install.yaml new file mode 100644 index 000000000..fbc93e109 --- /dev/null +++ b/tests/e2e/smoke-restarting-deployment/00-install.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: restarting +spec: + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + args: + metrics-level: detailed diff --git a/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml b/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml new file mode 100644 index 000000000..765697d02 --- /dev/null +++ b/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: restarting-collector +status: + readyReplicas: 1 + +--- + +apiVersion: v1 +kind: Pod +spec: + containers: + - name: otc-container +status: + phase: Running + +--- + +apiVersion: v1 +kind: Service +metadata: + name: restarting-collector +spec: + ports: + - targetPort: 14250 + - targetPort: 4317 diff --git a/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml b/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml new file mode 100644 index 000000000..bc9362af9 --- /dev/null +++ b/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml @@ -0,0 +1,24 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: restarting +spec: + config: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger, otlp] + processors: [] + exporters: [logging] + args: + metrics-level: detailed From 2105dad4b4905f0d9e5c2e2fc1c36b41b15a15a1 Mon Sep 17 00:00:00 2001 From: Duncan Zhou <5753266+Duncan-tree-zhou@users.noreply.github.com> Date: Fri, 28 Jan 2022 21:36:38 +0800 Subject: [PATCH 0396/1234] Add env support to instrumentation kind (#674) * allow config customized envs on common and language specific node. * only env name start with "OTEL_" is allowed. * deployment env > language spec customzied env > language spec config type> common customized env > common config type * api docs gen and code fmt * use corev1.EnvVar instead of Env * fixing wrong change. * update e2e testcases * fix unit tests --- apis/v1alpha1/instrumentation_types.go | 25 + apis/v1alpha1/instrumentation_webhook.go | 27 + apis/v1alpha1/zz_generated.deepcopy.go | 34 +- .../opentelemetry.io_instrumentations.yaml | 451 +++++++ .../opentelemetry.io_instrumentations.yaml | 451 +++++++ docs/api.md | 1044 ++++++++++++++++- pkg/instrumentation/javaagent.go | 9 + pkg/instrumentation/nodejs.go | 9 + pkg/instrumentation/podmutator_test.go | 201 +++- pkg/instrumentation/python.go | 9 + pkg/instrumentation/sdk.go | 20 +- pkg/instrumentation/sdk_test.go | 32 +- .../00-install-instrumentation.yaml | 17 + tests/e2e/instrumentation-java/01-assert.yaml | 24 +- .../00-install-instrumentation.yaml | 19 + .../e2e/instrumentation-nodejs/01-assert.yaml | 18 +- .../00-install-instrumentation.yaml | 20 +- .../e2e/instrumentation-python/01-assert.yaml | 20 +- 18 files changed, 2347 insertions(+), 83 deletions(-) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index de60bdfc5..1c066a229 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -15,6 +15,7 @@ package v1alpha1 import ( + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -36,6 +37,12 @@ type InstrumentationSpec struct { // +optional Sampler `json:"sampler,omitempty"` + // Env defines common env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + // Java defines configuration for java auto-instrumentation. // +optional Java Java `json:"java,omitempty"` @@ -88,6 +95,12 @@ type Java struct { // Image is a container image with javaagent auto-instrumentation JAR. // +optional Image string `json:"image,omitempty"` + + // Env defines java specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` } // NodeJS defines NodeJS SDK and instrumentation configuration. @@ -95,6 +108,12 @@ type NodeJS struct { // Image is a container image with NodeJS SDK and auto-instrumentation. // +optional Image string `json:"image,omitempty"` + + // Env defines nodejs specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` } // Python defines Python SDK and instrumentation configuration. @@ -102,6 +121,12 @@ type Python struct { // Image is a container image with Python SDK and auto-instrumentation. // +optional Image string `json:"image,omitempty"` + + // Env defines python specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` } // InstrumentationStatus defines status of the instrumentation. diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index fd71daada..1a977ee19 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -17,7 +17,9 @@ package v1alpha1 import ( "fmt" "strconv" + "strings" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -28,6 +30,7 @@ const ( AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" + envPrefix = "OTEL_" ) // log is for logging in this package. @@ -107,5 +110,29 @@ func (in *Instrumentation) validate() error { } case AlwaysOn, AlwaysOff, JaegerRemote, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: } + + // validate env vars + if err := in.validateEnv(in.Spec.Env); err != nil { + return err + } + if err := in.validateEnv(in.Spec.Java.Env); err != nil { + return err + } + if err := in.validateEnv(in.Spec.NodeJS.Env); err != nil { + return err + } + if err := in.validateEnv(in.Spec.Python.Env); err != nil { + return err + } + + return nil +} + +func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error { + for _, env := range envs { + if !strings.HasPrefix(env.Name, envPrefix) { + return fmt.Errorf("env name should start with \"OTEL_\": %s", env.Name) + } + } return nil } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index a09543780..d21b1f660 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -108,9 +108,16 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { copy(*out, *in) } out.Sampler = in.Sampler - out.Java = in.Java - out.NodeJS = in.NodeJS - out.Python = in.Python + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Java.DeepCopyInto(&out.Java) + in.NodeJS.DeepCopyInto(&out.NodeJS) + in.Python.DeepCopyInto(&out.Python) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. @@ -141,6 +148,13 @@ func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Java) DeepCopyInto(out *Java) { *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java. @@ -156,6 +170,13 @@ func (in *Java) DeepCopy() *Java { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeJS) DeepCopyInto(out *NodeJS) { *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS. @@ -360,6 +381,13 @@ func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Python) DeepCopyInto(out *Python) { *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python. diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index aa70aabcd..13321f7c8 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -42,6 +42,115 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + env: + description: 'Env defines common env vars. There are four layers for + env vars'' definitions and the precedence order is: `original container + env vars` > `language specific env vars` > `common env vars` > `instrument + spec configs'' vars`. If the former var had been defined, then the + other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array exporter: description: Exporter defines exporter configuration. properties: @@ -52,6 +161,120 @@ spec: java: description: Java defines configuration for java auto-instrumentation. properties: + env: + description: 'Env defines java specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with javaagent auto-instrumentation JAR. @@ -60,6 +283,120 @@ spec: nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: + env: + description: 'Env defines nodejs specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string @@ -83,6 +420,120 @@ spec: python: description: Python defines configuration for python auto-instrumentation. properties: + env: + description: 'Env defines python specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with Python SDK and auto-instrumentation. type: string diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 4626ce2c2..32bc99b9a 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -44,6 +44,115 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + env: + description: 'Env defines common env vars. There are four layers for + env vars'' definitions and the precedence order is: `original container + env vars` > `language specific env vars` > `common env vars` > `instrument + spec configs'' vars`. If the former var had been defined, then the + other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array exporter: description: Exporter defines exporter configuration. properties: @@ -54,6 +163,120 @@ spec: java: description: Java defines configuration for java auto-instrumentation. properties: + env: + description: 'Env defines java specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with javaagent auto-instrumentation JAR. @@ -62,6 +285,120 @@ spec: nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: + env: + description: 'Env defines nodejs specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string @@ -85,6 +422,120 @@ spec: python: description: Python defines configuration for python auto-instrumentation. properties: + env: + description: 'Env defines python specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with Python SDK and auto-instrumentation. type: string diff --git a/docs/api.md b/docs/api.md index 0e756e3f9..c057c7f0d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -86,6 +86,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen + env + []object + + Env defines common env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ + false + exporter object @@ -138,12 +145,12 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen -### Instrumentation.spec.exporter +### Instrumentation.spec.env[index] [↩ Parent](#instrumentationspec) -Exporter defines exporter configuration. +EnvVar represents an environment variable present in a Container. @@ -155,22 +162,36 @@ Exporter defines exporter configuration. - + + + + + + + + + + +
endpointname string - Endpoint is address of the collector with OTLP endpoint.
+ Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
false
-### Instrumentation.spec.java -[↩ Parent](#instrumentationspec) +### Instrumentation.spec.env[index].valueFrom +[↩ Parent](#instrumentationspecenvindex) -Java defines configuration for java auto-instrumentation. +Source for the environment variable's value. Cannot be used if value is not empty. @@ -182,22 +203,200 @@ Java defines configuration for java auto-instrumentation. - + + + + + + + + + + + + + + + + + + + + +
imageconfigMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
key string - Image is a container image with javaagent auto-instrumentation JAR.
+ The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
false
-### Instrumentation.spec.nodejs +### Instrumentation.spec.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.exporter [↩ Parent](#instrumentationspec) -NodeJS defines configuration for nodejs auto-instrumentation. +Exporter defines exporter configuration. @@ -209,22 +408,22 @@ NodeJS defines configuration for nodejs auto-instrumentation. - +
imageendpoint string - Image is a container image with NodeJS SDK and auto-instrumentation.
+ Endpoint is address of the collector with OTLP endpoint.
false
-### Instrumentation.spec.python +### Instrumentation.spec.java [↩ Parent](#instrumentationspec) -Python defines configuration for python auto-instrumentation. +Java defines configuration for java auto-instrumentation. @@ -236,10 +435,823 @@ Python defines configuration for python auto-instrumentation. + + + + + + + +
env[]object + Env defines java specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
image string - Image is a container image with Python SDK and auto-instrumentation.
+ Image is a container image with javaagent auto-instrumentation JAR.
+
false
+ + +### Instrumentation.spec.java.env[index] +[↩ Parent](#instrumentationspecjava) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.java.env[index].valueFrom +[↩ Parent](#instrumentationspecjavaenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.java.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.java.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.java.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.java.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.nodejs +[↩ Parent](#instrumentationspec) + + + +NodeJS defines configuration for nodejs auto-instrumentation. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
env[]object + Env defines nodejs specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with NodeJS SDK and auto-instrumentation.
+
false
+ + +### Instrumentation.spec.nodejs.env[index] +[↩ Parent](#instrumentationspecnodejs) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.nodejs.env[index].valueFrom +[↩ Parent](#instrumentationspecnodejsenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.nodejs.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecnodejsenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.nodejs.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecnodejsenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.nodejs.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecnodejsenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.nodejs.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecnodejsenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.python +[↩ Parent](#instrumentationspec) + + + +Python defines configuration for python auto-instrumentation. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
env[]object + Env defines python specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with Python SDK and auto-instrumentation.
+
false
+ + +### Instrumentation.spec.python.env[index] +[↩ Parent](#instrumentationspecpython) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.python.env[index].valueFrom +[↩ Parent](#instrumentationspecpythonenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.python.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecpythonenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.python.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecpythonenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.python.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecpythonenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.python.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecpythonenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 463639589..aba550110 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -29,6 +29,15 @@ const ( func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] + + // inject env vars + for _, env := range javaSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + idx := getIndexOfEnv(container.Env, envJavaToolsOptions) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 5830481c6..810866a0a 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -29,6 +29,15 @@ const ( func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] + + // inject env vars + for _, env := range nodeJSSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + idx := getIndexOfEnv(container.Env, envNodeOptions) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 2512fd832..15766b7a4 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -53,7 +53,40 @@ func TestMutatePod(t *testing.T) { Namespace: "javaagent", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.Java{}, + Java: v1alpha1.Java{ + Env: []corev1.EnvVar{ + { + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", }, @@ -103,12 +136,40 @@ func TestMutatePod(t *testing.T) { Name: "app", Env: []corev1.EnvVar{ { - Name: "OTEL_SERVICE_NAME", - Value: "app", + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://collector:12345", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", }, { Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", @@ -130,10 +191,6 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.namespace.name=javaagent,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "JAVA_TOOL_OPTIONS", - Value: javaJVMArgument, - }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -161,6 +218,34 @@ func TestMutatePod(t *testing.T) { Spec: v1alpha1.InstrumentationSpec{ NodeJS: v1alpha1.NodeJS{ Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", @@ -212,12 +297,36 @@ func TestMutatePod(t *testing.T) { Name: "app", Env: []corev1.EnvVar{ { - Name: "OTEL_SERVICE_NAME", - Value: "app", + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://collector:12345", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", }, { Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", @@ -239,10 +348,6 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.namespace.name=nodejs,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "NODE_OPTIONS", - Value: nodeRequireArgument, - }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -270,10 +375,38 @@ func TestMutatePod(t *testing.T) { Spec: v1alpha1.InstrumentationSpec{ Python: v1alpha1.Python{ Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + }, }, }, pod: corev1.Pod{ @@ -321,12 +454,36 @@ func TestMutatePod(t *testing.T) { Name: "app", Env: []corev1.EnvVar{ { - Name: "OTEL_SERVICE_NAME", - Value: "app", + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://collector:12345", + Value: "http://localhost:4317", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", }, { Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", @@ -348,14 +505,6 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.namespace.name=python,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), - }, - { - Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", - }, }, VolumeMounts: []corev1.VolumeMount{ { diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 5c9f3b1de..d6ebdddb9 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -33,6 +33,15 @@ const ( func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod) corev1.Pod { // caller checks if there is at least one container container := &pod.Spec.Containers[0] + + // inject env vars + for _, env := range pythonSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + idx := getIndexOfEnv(container.Env, envPythonPath) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index ad7275741..161e08ad2 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -66,20 +66,34 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations if insts.Java != nil { otelinst := *insts.Java i.logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) pod = injectJavaagent(i.logger, otelinst.Spec.Java, pod) + pod = i.injectCommonEnvVar(otelinst, pod) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) } if insts.NodeJS != nil { otelinst := *insts.NodeJS i.logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) pod = injectNodeJSSDK(i.logger, otelinst.Spec.NodeJS, pod) + pod = i.injectCommonEnvVar(otelinst, pod) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) } if insts.Python != nil { otelinst := *insts.Python i.logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) pod = injectPythonSDK(i.logger, otelinst.Spec.Python, pod) + pod = i.injectCommonEnvVar(otelinst, pod) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + } + return pod +} + +func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { + container := &pod.Spec.Containers[0] + for _, env := range otelinst.Spec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } } return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index c667e7361..4ee0e63c0 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -431,6 +431,10 @@ func TestInjectJava(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, { Name: "OTEL_SERVICE_NAME", Value: "app", @@ -459,10 +463,6 @@ func TestInjectJava(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "JAVA_TOOL_OPTIONS", - Value: javaJVMArgument, - }, }, }, }, @@ -529,6 +529,10 @@ func TestInjectNodeJS(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, { Name: "OTEL_SERVICE_NAME", Value: "app", @@ -557,10 +561,6 @@ func TestInjectNodeJS(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "NODE_OPTIONS", - Value: nodeRequireArgument, - }, }, }, }, @@ -628,6 +628,14 @@ func TestInjectPython(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, { Name: "OTEL_SERVICE_NAME", Value: "app", @@ -656,14 +664,6 @@ func TestInjectPython(t *testing.T) { Name: "OTEL_RESOURCE_ATTRIBUTES", Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, - { - Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), - }, - { - Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", - }, }, }, }, diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index 6c1347b13..793f5a87f 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -3,6 +3,17 @@ kind: Instrumentation metadata: name: java spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" exporter: endpoint: http://localhost:4317 propagators: @@ -11,3 +22,9 @@ spec: sampler: type: parentbased_traceidratio argument: "0.25" + java: + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index 63b4bd833..cdc33dcc3 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -10,21 +10,29 @@ spec: containers: - name: myapp env: - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + - name: OTEL_TRACES_EXPORTER + value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml index 9ea4358b9..40459f483 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml @@ -3,8 +3,27 @@ kind: Instrumentation metadata: name: nodejs spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" exporter: endpoint: http://localhost:4317 propagators: - jaeger - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + nodejs: + env: + - name: OTEL_NODEJS_DEBUG + value: "true" + diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index b796a5b8e..d327e8596 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -10,17 +10,27 @@ spec: containers: - name: myapp env: - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar + - name: OTEL_NODEJS_DEBUG + value: "true" + - name: NODE_OPTIONS + value: " --require /otel-auto-instrumentation/autoinstrumentation.js" + - name: OTEL_TRACES_EXPORTER + value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 - - name: NODE_OPTIONS - value: " --require /otel-auto-instrumentation/autoinstrumentation.js" volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml index d41827bf8..fa1fff235 100644 --- a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml @@ -3,8 +3,26 @@ kind: Instrumentation metadata: name: python spec: + env: + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" exporter: - endpoint: http://localhost:4318/v1/traces + endpoint: http://localhost:4317 propagators: - jaeger - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + python: + env: + - name: OTEL_LOG_LEVEL + value: "debug" + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 \ No newline at end of file diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index 35ea2acb8..105cfd30c 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -10,19 +10,27 @@ spec: containers: - name: myapp env: + - name: OTEL_LOG_LEVEL + value: "debug" + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: PYTHONPATH + value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" - name: OTEL_SERVICE_NAME value: my-deployment-with-sidecar - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318/v1/traces - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 - - name: PYTHONPATH - value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" - - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation From 9575b313619f289d0c15cc3a152af5b7d1065898 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 2 Feb 2022 13:27:15 +0900 Subject: [PATCH 0397/1234] Add b3, jaeger, ottrace propagators to python instrumentation (#684) * Add b3 and jaeger propagators to python instrumentation --- autoinstrumentation/python/requirements.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index cf3dab98f..e07e7a587 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -3,7 +3,11 @@ opentelemetry-distro==0.26b1 # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. opentelemetry-exporter-otlp-proto-http==1.7.1 +opentelemetry-propagator-b3==1.7.1 +opentelemetry-propagator-jaeger==1.7.1 + opentelemetry-instrumentation==0.26b1 +opentelemetry-propagator-ot-trace==0.26b1 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda From 1f39ce4b5a0c618ae54521526c107c1d66f43eea Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Thu, 3 Feb 2022 21:54:45 +0900 Subject: [PATCH 0398/1234] Update nodejs instrumentation to 0.27.0 (#687) --- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 6 +++++- autoinstrumentation/nodejs/package.json | 8 ++++---- autoinstrumentation/nodejs/src/autoinstrumentation.ts | 2 +- autoinstrumentation/nodejs/tsconfig.json | 1 + 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index abb2339e7..cf2698e35 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -7,6 +7,10 @@ on: - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' branches: - main + pull_request: + paths: + - 'autoinstrumentation/nodejs/**' + - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' workflow_dispatch: jobs: @@ -38,7 +42,7 @@ jobs: uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/nodejs - push: true + push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 17853ed49..1d134eecb 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,9 +14,9 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.0.3", - "@opentelemetry/auto-instrumentations-node": "0.26.0", - "@opentelemetry/exporter-otlp-grpc": "0.26.0", - "@opentelemetry/sdk-node": "0.26.0" + "@opentelemetry/api": "1.0.4", + "@opentelemetry/auto-instrumentations-node": "0.27.2", + "@opentelemetry/exporter-trace-otlp-grpc": "0.27.0", + "@opentelemetry/sdk-node": "0.27.0" } } diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts index e03b533e3..3b0d9d225 100644 --- a/autoinstrumentation/nodejs/src/autoinstrumentation.ts +++ b/autoinstrumentation/nodejs/src/autoinstrumentation.ts @@ -1,5 +1,5 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; -import { OTLPTraceExporter } from '@opentelemetry/exporter-otlp-grpc'; +import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; import { NodeSDK } from '@opentelemetry/sdk-node'; diff --git a/autoinstrumentation/nodejs/tsconfig.json b/autoinstrumentation/nodejs/tsconfig.json index 83d94c8d1..38012118d 100644 --- a/autoinstrumentation/nodejs/tsconfig.json +++ b/autoinstrumentation/nodejs/tsconfig.json @@ -19,6 +19,7 @@ "noImplicitReturns": true, "noUnusedLocals": true, "pretty": true, + "skipLibCheck": true, "sourceMap": true, "strict": true, "strictNullChecks": true, From f715c612161fd952d805c44577ba42b3222c2846 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Thu, 3 Feb 2022 21:54:57 +0900 Subject: [PATCH 0399/1234] Update python instrumentation (#686) --- .../publish-autoinstrumentation-python.yaml | 6 +- autoinstrumentation/python/requirements.txt | 81 ++++++++++--------- 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index c5a51046a..9aad0c414 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -7,6 +7,10 @@ on: - '.github/workflows/publish-autoinstrumentation-python.yaml' branches: - main + pull_request: + paths: + - 'autoinstrumentation/python/**' + - '.github/workflows/publish-autoinstrumentation-python.yaml' workflow_dispatch: jobs: @@ -38,7 +42,7 @@ jobs: uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/python - push: true + push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index e07e7a587..9847142c9 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,47 +1,48 @@ -opentelemetry-distro==0.26b1 +opentelemetry-distro==0.28b1 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.7.1 +opentelemetry-exporter-otlp-proto-http==1.9.1 -opentelemetry-propagator-b3==1.7.1 -opentelemetry-propagator-jaeger==1.7.1 +opentelemetry-propagator-b3==1.9.1 +opentelemetry-propagator-jaeger==1.9.1 -opentelemetry-instrumentation==0.26b1 -opentelemetry-propagator-ot-trace==0.26b1 +opentelemetry-instrumentation==0.28b1 +opentelemetry-propagator-ot-trace==0.28b1 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.26b1 -opentelemetry-instrumentation-aiopg==0.26b1 -opentelemetry-instrumentation-asgi==0.26b1 -opentelemetry-instrumentation-asyncpg==0.26b1 -opentelemetry-instrumentation-boto==0.26b1 -opentelemetry-instrumentation-botocore==0.26b1 -opentelemetry-instrumentation-celery==0.26b1 -opentelemetry-instrumentation-dbapi==0.26b1 -opentelemetry-instrumentation-django==0.26b1 -opentelemetry-instrumentation-elasticsearch==0.26b1 -opentelemetry-instrumentation-falcon==0.26b1 -opentelemetry-instrumentation-fastapi==0.26b1 -opentelemetry-instrumentation-flask==0.26b1 -opentelemetry-instrumentation-grpc==0.26b1 -opentelemetry-instrumentation-httpx==0.26b1 -opentelemetry-instrumentation-jinja2==0.26b1 -opentelemetry-instrumentation-logging==0.26b1 -opentelemetry-instrumentation-mysql==0.26b1 -opentelemetry-instrumentation-pika==0.26b1 -opentelemetry-instrumentation-psycopg2==0.26b1 -opentelemetry-instrumentation-pymemcache==0.26b1 -opentelemetry-instrumentation-pymongo==0.26b1 -opentelemetry-instrumentation-pymysql==0.26b1 -opentelemetry-instrumentation-pyramid==0.26b1 -opentelemetry-instrumentation-redis==0.26b1 -opentelemetry-instrumentation-requests==0.26b1 -opentelemetry-instrumentation-sklearn==0.26b1 -opentelemetry-instrumentation-sqlalchemy==0.26b1 -opentelemetry-instrumentation-sqlite3==0.26b1 -opentelemetry-instrumentation-starlette==0.26b1 -opentelemetry-instrumentation-tornado==0.26b1 -opentelemetry-instrumentation-urllib==0.26b1 -opentelemetry-instrumentation-urllib3==0.26b1 -opentelemetry-instrumentation-wsgi==0.26b1 +opentelemetry-instrumentation-aiohttp-client==0.28b1 +opentelemetry-instrumentation-aiopg==0.28b1 +opentelemetry-instrumentation-asgi==0.28b1 +opentelemetry-instrumentation-asyncpg==0.28b1 +opentelemetry-instrumentation-boto==0.28b1 +opentelemetry-instrumentation-botocore==0.28b1 +opentelemetry-instrumentation-celery==0.28b1 +opentelemetry-instrumentation-dbapi==0.28b1 +opentelemetry-instrumentation-django==0.28b1 +opentelemetry-instrumentation-elasticsearch==0.28b1 +opentelemetry-instrumentation-falcon==0.28b1 +opentelemetry-instrumentation-fastapi==0.28b1 +opentelemetry-instrumentation-flask==0.28b1 +opentelemetry-instrumentation-grpc==0.28b1 +opentelemetry-instrumentation-httpx==0.28b1 +opentelemetry-instrumentation-jinja2==0.28b1 +opentelemetry-instrumentation-kafka-python==0.28b1 +opentelemetry-instrumentation-logging==0.28b1 +opentelemetry-instrumentation-mysql==0.28b1 +opentelemetry-instrumentation-pika==0.28b1 +opentelemetry-instrumentation-psycopg2==0.28b1 +opentelemetry-instrumentation-pymemcache==0.28b1 +opentelemetry-instrumentation-pymongo==0.28b1 +opentelemetry-instrumentation-pymysql==0.28b1 +opentelemetry-instrumentation-pyramid==0.28b1 +opentelemetry-instrumentation-redis==0.28b1 +opentelemetry-instrumentation-requests==0.28b1 +opentelemetry-instrumentation-sklearn==0.28b1 +opentelemetry-instrumentation-sqlalchemy==0.28b1 +opentelemetry-instrumentation-sqlite3==0.28b1 +opentelemetry-instrumentation-starlette==0.28b1 +opentelemetry-instrumentation-tornado==0.28b1 +opentelemetry-instrumentation-urllib==0.28b1 +opentelemetry-instrumentation-urllib3==0.28b1 +opentelemetry-instrumentation-wsgi==0.28b1 From 7892b58f64b072c39f7e8bcf7e3b25015fb521de Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Thu, 3 Feb 2022 21:55:08 +0900 Subject: [PATCH 0400/1234] Update java instrumentation to 1.10.1 (#688) --- .github/workflows/publish-autoinstrumentation-java.yaml | 6 +++++- autoinstrumentation/java/version.txt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 100c9a87c..658723fbe 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -7,6 +7,10 @@ on: - '.github/workflows/publish-autoinstrumentation-java.yaml' branches: - main + pull_request: + paths: + - 'autoinstrumentation/java/**' + - '.github/workflows/publish-autoinstrumentation-java.yaml' workflow_dispatch: jobs: @@ -38,7 +42,7 @@ jobs: uses: docker/build-push-action@v2.8.0 with: context: autoinstrumentation/java - push: true + push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 8fdcf3869..4dae2985b 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.9.2 +1.10.1 From e8d6f8bf5acc656d02dbed366dc4ef3832b1f087 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 13:55:21 +0100 Subject: [PATCH 0401/1234] Bump docker/build-push-action from 2.8.0 to 2.9.0 (#685) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 658723fbe..678b117f3 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: autoinstrumentation/java push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index cf2698e35..8767f8098 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: autoinstrumentation/nodejs push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 9aad0c414..b8525513c 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: autoinstrumentation/python push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index de769794f..18f98028f 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index e7f98f1a3..5c8552bfe 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: cmd/otel-allocator push: true From 22c3ccf578e67b4b22df98513dcf2fc97414802e Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 8 Feb 2022 17:41:57 +0100 Subject: [PATCH 0402/1234] Bump operator-sdk to 1.17 (#692) * Bump operator-sdk to 1.14 * Remove admissionregistration.k8s.io/v1beta1 removed from 1.22, v1 was added in 1.16 * Remove crd:trivialVersions=true,preserveUnknownFields=false" that produce CRDs compatible with 1.11 Signed-off-by: Pavol Loffay * Bump operator-sdk to 1.17.0 Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * remove wait Signed-off-by: Pavol Loffay * fix lint Signed-off-by: Pavol Loffay * Add phony Signed-off-by: Pavol Loffay * install tools only to ./bin Signed-off-by: Pavol Loffay * use go install Signed-off-by: Pavol Loffay * guide Signed-off-by: Pavol Loffay * remove ech Signed-off-by: Pavol Loffay * remvoe deprecation Signed-off-by: Pavol Loffay * Remove comment Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- CONTRIBUTING.md | 11 ++ Makefile | 149 ++++++++------ apis/v1alpha1/instrumentation_webhook.go | 6 +- .../opentelemetrycollector_webhook.go | 6 +- apis/v1alpha1/zz_generated.deepcopy.go | 1 + bundle.Dockerfile | 2 +- ...emetry-operator.clusterserviceversion.yaml | 105 +++++----- .../opentelemetry.io_instrumentations.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 143 +++++++++----- bundle/metadata/annotations.yaml | 2 +- .../opentelemetry.io_instrumentations.yaml | 3 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 144 +++++++++----- config/default/manager_auth_proxy_patch.yaml | 9 +- config/rbac/role.yaml | 1 - config/webhook/manifests.yaml | 9 - docs/api.md | 92 +++++---- go.mod | 59 +++--- go.sum | 184 ++++++++++++------ internal/webhookhandler/webhookhandler.go | 2 +- pkg/collector/adapters/config_to_probe.go | 2 +- pkg/collector/upgrade/upgrade_test.go | 2 +- 24 files changed, 583 insertions(+), 357 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index bf42bbb0b..4d0dc98fb 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -27,7 +27,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.13.1 + operator-sdk-version: v1.17.0 - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e3966c984..129307286 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.13.1 + operator-sdk-version: v1.17.0 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 4706a8557..cefb8ac21 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -41,7 +41,7 @@ jobs: - uses: jpkrohling/setup-operator-sdk@v1.1.0 with: - operator-sdk-version: v1.13.1 + operator-sdk-version: v1.17.0 - name: "run scorecard test" run: make scorecard-tests diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1570d184..bce58b96f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,6 +88,17 @@ USE_EXISTING_CLUSTER=true make test Tests can also be run without an existing cluster. For that, install [`kubebuilder`](https://book.kubebuilder.io/quick-start.html#installation). In this case, the tests will bootstrap `etcd` and `kubernetes-api-server` for the tests. Run against an existing cluster whenever possible, though. +### Unit tests + +Some unit tests use [envtest](https://book.kubebuilder.io/reference/envtest.html) which requires Kubernetes binaries (e.g. `api-server`, `etcd` and `kubectl`) to be present on the host filesystem. Makefile takes care of installing all dependent binaries, however running the tests from IDE or via `go test` might not work out-of-the-box. The `envtest` uses env variable `KUBEBUILDER_ASSETS` that points to a directory with these binaries. To make the test work in IDE or `go test` the environment variable has to be correctly set. + +Example how to run test that use `envtest`: + +```bash +make envtest +KUBEBUILDER_ASSETS=$(./bin/setup-envtest use -p path 1.23) go test ./pkg... +``` + ### End to end tests To run the end-to-end tests, you'll need [`kind`](https://kind.sigs.k8s.io) and [`kuttl`](https://kuttl.dev). Refer to their documentation for installation instructions. diff --git a/Makefile b/Makefile index 588648283..b457120ce 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,7 @@ BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) -# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) -CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false,generateEmbeddedObjectMeta=true" +CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true" # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -50,6 +49,11 @@ KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml CERTMANAGER_VERSION ?= 1.6.1 +ifndef ignore-not-found + ignore-not-found = false +endif + +.PHONY: ensure-generate-is-noop ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=open-telemetry ensure-generate-is-noop: set-image-controller generate bundle @@ -59,138 +63,173 @@ ensure-generate-is-noop: set-image-controller generate bundle @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && git diff && exit 1) @git diff -s --exit-code docs/api.md || (echo "Build failed: the api.md file has been changed but the generated api.md file isn't up to date. Run 'make api-docs' and update your PR." && git diff && exit 1) +.PHONY: all all: manager +.PHONY: ci ci: test # Run tests -test: generate fmt vet ensure-generate-is-noop - go test ${GOTEST_OPTS} ./... +# setup-envtest uses KUBEBUILDER_ASSETS which points to a directory with binaries (api-server, etcd and kubectl) +.PHONY: test +test: generate fmt vet ensure-generate-is-noop envtest + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... # Build manager binary +.PHONY: manager manager: generate fmt vet go build -o bin/manager main.go # Run against the configured Kubernetes cluster in ~/.kube/config +.PHONY: run run: generate fmt vet manifests ENABLE_WEBHOOKS=$(ENABLE_WEBHOOKS) go run -ldflags ${LD_FLAGS} ./main.go --zap-devel # Install CRDs into a cluster +.PHONY: install install: manifests kustomize $(KUSTOMIZE) build config/crd | kubectl apply -f - # Uninstall CRDs from a cluster +.PHONY: uninstall uninstall: manifests kustomize - $(KUSTOMIZE) build config/crd | kubectl delete -f - + $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - # Set the controller image parameters +.PHONY: set-image-controller set-image-controller: manifests kustomize cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} # Deploy controller in the current Kubernetes context, configured in ~/.kube/config +.PHONY: deploy deploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - # Undeploy controller in the current Kubernetes context, configured in ~/.kube/config +.PHONY: undeploy undeploy: set-image-controller - $(KUSTOMIZE) build config/default | kubectl delete -f - + $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - # Generates the released manifests +.PHONY: release-artifacts release-artifacts: set-image-controller mkdir -p dist $(KUSTOMIZE) build config/default -o dist/opentelemetry-operator.yaml # Generate manifests e.g. CRD, RBAC etc. +.PHONY: manifests manifests: controller-gen $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases # Run go fmt against code +.PHONY: fmt fmt: go fmt ./... # Run go vet against code +.PHONY: vet vet: go vet ./... # Run go lint against code +.PHONY: lint lint: golangci-lint run # Generate code +.PHONY: generate generate: controller-gen api-docs $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." # end-to-tests +.PHONY: e2e e2e: $(KUTTL) test +.PHONY: prepare-e2e prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind mkdir -p tests/_build/crds tests/_build/manifests $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ +.PHONY: scorecard-tests scorecard-tests: $(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1) +.PHONY: set-test-image-vars set-test-image-vars: $(eval IMG=local/opentelemetry-operator:e2e) # Build the container image, used only for local dev purposes +.PHONY: container container: docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} . # Push the container image, used only for local dev purposes +.PHONY: container-push container-push: docker push ${IMG} +.PHONY: start-kind start-kind: kind create cluster --config $(KIND_CONFIG) kind load docker-image local/opentelemetry-operator:e2e +.PHONY: cert-manager cert-manager: cmctl # Consider using cmctl to install the cert-manager once install command is not experimental kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v${CERTMANAGER_VERSION}/cert-manager.yaml - cmctl check api --wait=5m + $(CMCTL) check api --wait=5m +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) +CMCTL = $(shell pwd)/bin/cmctl +.PHONY: cmctl cmctl: -ifeq (, $(shell which cmctl)) - @{ \ - curl -L -o /tmp/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\ - cd /tmp ;\ - tar xzf cmctl.tar.gz ;\ - mv cmctl $(GOBIN) ;\ - } -CTL=$(GOBIN)/cmctl -else -CTL=$(shell which cmctl) -endif - -# find or download controller-gen -# download controller-gen if necessary -controller-gen: -ifeq (, $(shell which controller-gen)) - @{ \ - go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0-beta.0 ;\ - } -CONTROLLER_GEN=$(GOBIN)/controller-gen -else -CONTROLLER_GEN=$(shell which controller-gen) -endif - -kustomize: -ifeq (, $(shell which kustomize)) @{ \ set -e ;\ - echo "" ;\ - echo "ERROR: kustomize not found." ;\ - echo "Please check https://kubectl.docs.kubernetes.io/installation/kustomize/ for installation instructions and try again." ;\ - echo "" ;\ - exit 1 ;\ + TMP_DIR=$$(mktemp -d) ;\ + curl -L -o $$TMP_DIR/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\ + tar xzf $$TMP_DIR/cmctl.tar.gz -C $$TMP_DIR ;\ + [ -d bin ] || mkdir bin ;\ + mv $$TMP_DIR/cmctl $(CMCTL) ;\ + rm -rf $$TMP_DIR ;\ } -KUSTOMIZE=$(GOBIN)/kustomize -else -KUSTOMIZE=$(shell which kustomize) -endif +CONTROLLER_GEN = $(shell pwd)/bin/controller-gen +.PHONY: controller-gen +controller-gen: ## Download controller-gen locally if necessary. + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.8.0) + +KUSTOMIZE = $(shell pwd)/bin/kustomize +.PHONY: kustomize +kustomize: ## Download kustomize locally if necessary. + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3,v3.8.7) + +ENVTEST = $(shell pwd)/bin/setup-envtest +.PHONY: envtest +envtest: ## Download envtest-setup locally if necessary. + $(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,latest) + +CRDOC = $(shell pwd)/bin/crdoc +.PHONY: crdoc +crdoc: ## Download crdoc locally if necessary. + $(call go-get-tool,$(CRDOC), fybrik.io/crdoc,v0.5.2) + +# go-get-tool will 'go get' any package $2 and install it to $1. +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) +define go-get-tool +@[ -f $(1) ] || { \ +set -e ;\ +TMP_DIR=$$(mktemp -d) ;\ +cd $$TMP_DIR ;\ +go mod init tmp ;\ +echo "Downloading $(2)" ;\ +go get -d $(2)@$(3) ;\ +GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\ +rm -rf $$TMP_DIR ;\ +} +endef + +.PHONY: kuttl kuttl: ifeq (, $(shell which kubectl-kuttl)) echo ${PATH} @@ -209,6 +248,7 @@ else KUTTL=$(shell which kubectl-kuttl) endif +.PHONY: kind kind: ifeq (, $(shell which kind)) @{ \ @@ -223,6 +263,7 @@ else KIND=$(shell which kind) endif +.PHONY: operator-sdk operator-sdk: ifeq (, $(shell which operator-sdk)) @{ \ @@ -238,41 +279,29 @@ OPERATOR_SDK=$(shell which operator-sdk) endif # Generate bundle manifests and metadata, then validate generated files. +.PHONY: bundle bundle: kustomize operator-sdk manifests set-image-controller $(OPERATOR_SDK) generate kustomize manifests -q $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(OPERATOR_SDK) bundle validate ./bundle # Build the bundle image, used only for local dev purposes +.PHONY: bundle-build bundle-build: docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . +.PHONY: bundle-push bundle-push: docker push $(BUNDLE_IMG) +.PHONY: tools tools: ginkgo kustomize controller-gen operator-sdk - +.PHONY: api-docs api-docs: crdoc kustomize @{ \ set -e ;\ TMP_DIR=$$(mktemp -d) ; \ $(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\ - $(API_REF_GEN) crdoc --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\ + $(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\ } - -# Find or download crdoc -crdoc: -ifeq (, $(shell which crdoc)) - @{ \ - set -e ;\ - API_REF_GEN_TMP_DIR=$$(mktemp -d) ;\ - cd $$API_REF_GEN_TMP_DIR ;\ - go mod init tmp ;\ - go get fybrik.io/crdoc@v0.5.2 ;\ - rm -rf $$API_REF_GEN_TMP_DIR ;\ - } -API_REF_GEN=$(GOBIN)/crdoc -else -API_REF_GEN=$(shell which crdoc) -endif diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 1a977ee19..c15e75379 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -42,7 +42,7 @@ func (r *Instrumentation) SetupWebhookWithManager(mgr ctrl.Manager) error { Complete() } -//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions={v1,v1beta1} +//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 var _ webhook.Defaulter = &Instrumentation{} @@ -73,8 +73,8 @@ func (r *Instrumentation) Default() { } } -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions={v1,v1beta1} -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions={v1,v1beta1} +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 var _ webhook.Validator = &Instrumentation{} diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index e6296121f..a531b059d 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -34,7 +34,7 @@ func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error Complete() } -// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1 var _ webhook.Defaulter = &OpenTelemetryCollector{} @@ -57,8 +57,8 @@ func (r *OpenTelemetryCollector) Default() { opentelemetrycollectorlog.Info("default", "name", r.Name) } -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1 var _ webhook.Validator = &OpenTelemetryCollector{} diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index d21b1f660..5ea87e547 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Copyright The OpenTelemetry Authors diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 7996432a7..d8af0f4ce 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.13.0+git +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0+git LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 2882f8159..0974dbdfa 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -33,7 +33,7 @@ metadata: containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.13.0+git + operators.operatorframework.io/builder: operator-sdk-v1.16.0+git operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community @@ -262,6 +262,24 @@ spec: control-plane: controller-manager spec: containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election @@ -294,18 +312,6 @@ spec: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: {} serviceAccountName: opentelemetry-operator-controller-manager terminationGracePeriodSeconds: 10 volumes: @@ -373,32 +379,30 @@ spec: webhookdefinitions: - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: mpod.kb.io + failurePolicy: Fail + generateName: minstrumentation.kb.io rules: - apiGroups: - - "" + - opentelemetry.io apiVersions: - - v1 + - v1alpha1 operations: - CREATE - UPDATE resources: - - pods + - instrumentations sideEffects: None targetPort: 9443 type: MutatingAdmissionWebhook - webhookPath: /mutate-v1-pod + webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Fail - generateName: minstrumentation.kb.io + generateName: mopentelemetrycollector.kb.io rules: - apiGroups: - opentelemetry.io @@ -408,46 +412,45 @@ spec: - CREATE - UPDATE resources: - - instrumentations + - opentelemetrycollectors sideEffects: None targetPort: 9443 type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation + webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: mopentelemetrycollector.kb.io + failurePolicy: Ignore + generateName: mpod.kb.io rules: - apiGroups: - - opentelemetry.io + - "" apiVersions: - - v1alpha1 + - v1 operations: - CREATE - UPDATE resources: - - opentelemetrycollectors + - pods sideEffects: None targetPort: 9443 type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + webhookPath: /mutate-v1-pod - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: vinstrumentationdelete.kb.io + failurePolicy: Fail + generateName: vinstrumentationcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io apiVersions: - v1alpha1 operations: - - DELETE + - CREATE + - UPDATE resources: - instrumentations sideEffects: None @@ -456,39 +459,37 @@ spec: webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: vopentelemetrycollectorcreateupdate.kb.io + failurePolicy: Ignore + generateName: vinstrumentationdelete.kb.io rules: - apiGroups: - opentelemetry.io apiVersions: - v1alpha1 operations: - - CREATE - - UPDATE + - DELETE resources: - - opentelemetrycollectors + - instrumentations sideEffects: None targetPort: 9443 type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: vopentelemetrycollectordelete.kb.io + failurePolicy: Fail + generateName: vopentelemetrycollectorcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io apiVersions: - v1alpha1 operations: - - DELETE + - CREATE + - UPDATE resources: - opentelemetrycollectors sideEffects: None @@ -497,22 +498,20 @@ spec: webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: vinstrumentationcreateupdate.kb.io + failurePolicy: Ignore + generateName: vopentelemetrycollectordelete.kb.io rules: - apiGroups: - opentelemetry.io apiVersions: - v1alpha1 operations: - - CREATE - - UPDATE + - DELETE resources: - - instrumentations + - opentelemetrycollectors sideEffects: None targetPort: 9443 type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation + webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 13321f7c8..7b0049cc5 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: instrumentations.opentelemetry.io spec: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index edd8d3ad2..b22af0cee 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -245,7 +245,8 @@ spec: set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of - any volume." + any volume. Note that this field cannot be set when spec.os.name + is windows." format: int64 type: integer fsGroupChangePolicy: @@ -255,13 +256,15 @@ spec: support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". - If not specified, "Always" is used.' + If not specified, "Always" is used. Note that this field cannot + be set when spec.os.name is windows.' type: string runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -278,7 +281,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. + takes precedence for that container. Note that this field cannot + be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: @@ -287,6 +291,7 @@ spec: SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -307,7 +312,8 @@ spec: type: object seccompProfile: description: The seccomp options to use by the containers in this - pod. + pod. Note that this field cannot be set when spec.os.name is + windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -329,7 +335,8 @@ spec: supplementalGroups: description: A list of groups applied to the first process run in each container, in addition to the container's primary GID. If - unspecified, no groups will be added to any container. + unspecified, no groups will be added to any container. Note + that this field cannot be set when spec.os.name is windows. items: format: int64 type: integer @@ -337,7 +344,8 @@ spec: sysctls: description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. + might fail to launch. Note that this field cannot be set when + spec.os.name is windows. items: description: Sysctl defines a kernel parameter to be set properties: @@ -356,7 +364,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -490,12 +499,14 @@ spec: can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when - the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' type: boolean capabilities: description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container - runtime. + runtime. Note that this field cannot be set when spec.os.name + is windows. properties: add: description: Added capabilities @@ -513,23 +524,27 @@ spec: privileged: description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults - to false. + to false. Note that this field cannot be set when spec.os.name + is windows. type: boolean procMount: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root filesystem. - Default is false. + Default is false. Note that this field cannot be set when spec.os.name + is windows. type: boolean runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -546,7 +561,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence. + takes precedence. Note that this field cannot be set when spec.os.name + is windows. format: int64 type: integer seLinuxOptions: @@ -554,7 +570,8 @@ spec: If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -576,7 +593,8 @@ spec: seccompProfile: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, - the container options override the pod options. + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -599,7 +617,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -786,12 +805,12 @@ spec: if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as - PersistentVolumeClaim objects. * While DataSource ignores - disallowed values (dropping them), DataSourceRef preserves - all values, and generates an error if a disallowed value - is specified. (Alpha) Using this field requires the - AnyVolumeDataSource feature gate to be enabled.' + DataSourceRef allows any non-core object, as well as PersistentVolumeClaim + objects. * While DataSource ignores disallowed values + (dropping them), DataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + (Alpha) Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -811,7 +830,11 @@ spec: type: object resources: description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: @@ -907,6 +930,26 @@ spec: items: type: string type: array + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: The storage resource within AllocatedResources + tracks the capacity allocated to a PVC. It may be larger + than the actual capacity when a volume expansion operation + is requested. For storage quota, the larger value from + allocatedResources and PVC.spec.resources is used. If + allocatedResources is not set, PVC.spec.resources alone + is used for quota calculation. If a volume expansion capacity + request is lowered, allocatedResources is only lowered + if there are no expansion operations in progress and if + the actual volume capacity is equal or lower than the + requested capacity. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: object capacity: additionalProperties: anyOf: @@ -959,6 +1002,13 @@ spec: phase: description: Phase represents the current phase of PersistentVolumeClaim. type: string + resizeStatus: + description: ResizeStatus stores status of resize operation. + ResizeStatus is not set by default but when expansion + is complete resizeStatus is set to empty string by resize + controller or kubelet. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: string type: object type: object type: array @@ -1393,20 +1443,17 @@ spec: pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver supports - dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on the - connection between this volume type and PersistentVolumeClaim). - \n Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. \n Use CSI for light-weight local ephemeral - volumes if the CSI driver is meant to be used that way - see - the documentation of the driver for more information. \n A - pod can use both types of ephemeral volumes and persistent - volumes at the same time. \n This is a beta feature and only - available when the GenericEphemeralVolume feature gate is - enabled." + tracking are needed, c) the storage driver is specified through + a storage class, and d) the storage driver supports dynamic + volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n Use + CSI for light-weight local ephemeral volumes if the CSI driver + is meant to be used that way - see the documentation of the + driver for more information. \n A pod can use both types of + ephemeral volumes and persistent volumes at the same time." properties: volumeClaimTemplate: description: "Will be used to create a stand-alone PVC to @@ -1511,13 +1558,13 @@ spec: other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as - well as PersistentVolumeClaim objects. * While - DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - (Alpha) Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + DataSourceRef allows any non-core object, as well + as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef + preserves all values, and generates an error if + a disallowed value is specified. (Alpha) Using + this field requires the AnyVolumeDataSource feature + gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1540,7 +1587,11 @@ spec: type: object resources: description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 963e2b6a1..8adcf2783 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.13.0+git + operators.operatorframework.io.metrics.builder: operator-sdk-v1.16.0+git operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 32bc99b9a..d333be829 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: instrumentations.opentelemetry.io spec: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index e5c7760fb..f452ad38d 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -246,7 +245,8 @@ spec: set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of - any volume." + any volume. Note that this field cannot be set when spec.os.name + is windows." format: int64 type: integer fsGroupChangePolicy: @@ -256,13 +256,15 @@ spec: support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". - If not specified, "Always" is used.' + If not specified, "Always" is used. Note that this field cannot + be set when spec.os.name is windows.' type: string runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -279,7 +281,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. + takes precedence for that container. Note that this field cannot + be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: @@ -288,6 +291,7 @@ spec: SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -308,7 +312,8 @@ spec: type: object seccompProfile: description: The seccomp options to use by the containers in this - pod. + pod. Note that this field cannot be set when spec.os.name is + windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -330,7 +335,8 @@ spec: supplementalGroups: description: A list of groups applied to the first process run in each container, in addition to the container's primary GID. If - unspecified, no groups will be added to any container. + unspecified, no groups will be added to any container. Note + that this field cannot be set when spec.os.name is windows. items: format: int64 type: integer @@ -338,7 +344,8 @@ spec: sysctls: description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. + might fail to launch. Note that this field cannot be set when + spec.os.name is windows. items: description: Sysctl defines a kernel parameter to be set properties: @@ -357,7 +364,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -491,12 +499,14 @@ spec: can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when - the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' type: boolean capabilities: description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container - runtime. + runtime. Note that this field cannot be set when spec.os.name + is windows. properties: add: description: Added capabilities @@ -514,23 +524,27 @@ spec: privileged: description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults - to false. + to false. Note that this field cannot be set when spec.os.name + is windows. type: boolean procMount: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root filesystem. - Default is false. + Default is false. Note that this field cannot be set when spec.os.name + is windows. type: boolean runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -547,7 +561,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence. + takes precedence. Note that this field cannot be set when spec.os.name + is windows. format: int64 type: integer seLinuxOptions: @@ -555,7 +570,8 @@ spec: If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -577,7 +593,8 @@ spec: seccompProfile: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, - the container options override the pod options. + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -600,7 +617,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -787,12 +805,12 @@ spec: if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as - PersistentVolumeClaim objects. * While DataSource ignores - disallowed values (dropping them), DataSourceRef preserves - all values, and generates an error if a disallowed value - is specified. (Alpha) Using this field requires the - AnyVolumeDataSource feature gate to be enabled.' + DataSourceRef allows any non-core object, as well as PersistentVolumeClaim + objects. * While DataSource ignores disallowed values + (dropping them), DataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + (Alpha) Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -812,7 +830,11 @@ spec: type: object resources: description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: @@ -908,6 +930,26 @@ spec: items: type: string type: array + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: The storage resource within AllocatedResources + tracks the capacity allocated to a PVC. It may be larger + than the actual capacity when a volume expansion operation + is requested. For storage quota, the larger value from + allocatedResources and PVC.spec.resources is used. If + allocatedResources is not set, PVC.spec.resources alone + is used for quota calculation. If a volume expansion capacity + request is lowered, allocatedResources is only lowered + if there are no expansion operations in progress and if + the actual volume capacity is equal or lower than the + requested capacity. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: object capacity: additionalProperties: anyOf: @@ -960,6 +1002,13 @@ spec: phase: description: Phase represents the current phase of PersistentVolumeClaim. type: string + resizeStatus: + description: ResizeStatus stores status of resize operation. + ResizeStatus is not set by default but when expansion + is complete resizeStatus is set to empty string by resize + controller or kubelet. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: string type: object type: object type: array @@ -1394,20 +1443,17 @@ spec: pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver supports - dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on the - connection between this volume type and PersistentVolumeClaim). - \n Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. \n Use CSI for light-weight local ephemeral - volumes if the CSI driver is meant to be used that way - see - the documentation of the driver for more information. \n A - pod can use both types of ephemeral volumes and persistent - volumes at the same time. \n This is a beta feature and only - available when the GenericEphemeralVolume feature gate is - enabled." + tracking are needed, c) the storage driver is specified through + a storage class, and d) the storage driver supports dynamic + volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n Use + CSI for light-weight local ephemeral volumes if the CSI driver + is meant to be used that way - see the documentation of the + driver for more information. \n A pod can use both types of + ephemeral volumes and persistent volumes at the same time." properties: volumeClaimTemplate: description: "Will be used to create a stand-alone PVC to @@ -1512,13 +1558,13 @@ spec: other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as - well as PersistentVolumeClaim objects. * While - DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - (Alpha) Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + DataSourceRef allows any non-core object, as well + as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef + preserves all values, and generates an error if + a disallowed value is specified. (Alpha) Using + this field requires the AnyVolumeDataSource feature + gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1541,7 +1587,11 @@ spec: type: object resources: description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 6f8c02fdd..68b92b221 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -15,11 +15,18 @@ spec: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" - "--logtostderr=true" - - "--v=10" + - "--v=0" ports: - containerPort: 8443 name: https protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi - name: manager args: - "--metrics-addr=127.0.0.1:8080" diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f4ab647d8..a3f7f86e7 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,4 +1,3 @@ - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 2072a4fbd..1fd17b825 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,4 +1,3 @@ - --- apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration @@ -8,7 +7,6 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -29,7 +27,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -50,7 +47,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -69,7 +65,6 @@ webhooks: resources: - pods sideEffects: None - --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration @@ -79,7 +74,6 @@ metadata: webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -100,7 +94,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -120,7 +113,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service @@ -141,7 +133,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: webhook-service diff --git a/docs/api.md b/docs/api.md index c057c7f0d..68fe3f3e7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1931,7 +1931,7 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -1940,14 +1940,14 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -1963,7 +1963,7 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -1972,35 +1972,35 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -2012,7 +2012,7 @@ PodSecurityContext holds pod-level security attributes and common container sett -The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. +The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
false
A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- - If unset, the Kubelet will not modify the ownership and permissions of any volume.
+ If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.

Format: int64
fsGroupChangePolicy string - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
+ fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.

Format: int64
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.

Format: int64
seLinuxOptions object - The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
+ The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
false
seccompProfile object - The seccomp options to use by the containers in this pod.
+ The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
false
supplementalGroups []integer - A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.
+ A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.
false
sysctls []object - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.
+ Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
false
@@ -2060,7 +2060,7 @@ The SELinux context to be applied to all containers. If unspecified, the contain -The seccomp options to use by the containers in this pod. +The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
@@ -2129,7 +2129,7 @@ Sysctl defines a kernel parameter to be set -The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
@@ -2294,42 +2294,42 @@ SecurityContext will be set as the container security context. @@ -2345,7 +2345,7 @@ SecurityContext will be set as the container security context. @@ -2354,21 +2354,21 @@ SecurityContext will be set as the container security context. @@ -2380,7 +2380,7 @@ SecurityContext will be set as the container security context. -The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. +The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
allowPrivilegeEscalation boolean - AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN
+ AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
false
capabilities object - The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
+ The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
false
privileged boolean - Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
+ Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
false
procMount string - procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.
+ procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
false
readOnlyRootFilesystem boolean - Whether this container has a read-only root filesystem. Default is false.
+ Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.

Format: int64
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.

Format: int64
seLinuxOptions object - The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
false
seccompProfile object - The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
+ The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
false
@@ -2414,7 +2414,7 @@ The capabilities to add/drop when running containers. Defaults to the default se -The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
@@ -2462,7 +2462,7 @@ The SELinux context to be applied to the container. If unspecified, the containe -The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
@@ -2497,7 +2497,7 @@ The seccomp options to use by this container. If seccomp options are provided at -The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
@@ -2775,14 +2775,14 @@ Spec defines the desired characteristics of a volume requested by a pod author. @@ -2863,7 +2863,7 @@ This field can be used to specify either: * An existing VolumeSnapshot object (s -Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
dataSourceRef object - Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
false
resources object - Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
false
@@ -2904,7 +2904,7 @@ Specifies the object from which to populate the volume with data, if a non-empty -Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -3031,6 +3031,13 @@ Status represents the current information/status of a persistent volume claim. R AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ + + + + @@ -3052,6 +3059,13 @@ Status represents the current information/status of a persistent volume claim. R Phase represents the current phase of PersistentVolumeClaim.
+ + + + +
false
allocatedResourcesmap[string]int or string + The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+
false
capacity map[string]int or string false
resizeStatusstring + ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+
false
@@ -3275,11 +3289,10 @@ Volume represents a named volume in a pod that may be accessed by any container object Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). + Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time. - This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled.
+ A pod can use both types of ephemeral volumes and persistent volumes at the same time.
false @@ -4112,11 +4125,10 @@ EmptyDir represents a temporary directory that shares a pod's lifetime. More inf Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). + Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time. - This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. + A pod can use both types of ephemeral volumes and persistent volumes at the same time. @@ -4212,14 +4224,14 @@ The specification for the PersistentVolumeClaim. The entire content is copied un @@ -4300,7 +4312,7 @@ This field can be used to specify either: * An existing VolumeSnapshot object (s -Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
dataSourceRef object - Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
false
resources object - Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
false
@@ -4341,7 +4353,7 @@ Specifies the object from which to populate the volume with data, if a non-empty -Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
diff --git a/go.mod b/go.mod index f684b3816..99536a860 100644 --- a/go.mod +++ b/go.mod @@ -4,18 +4,18 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/go-logr/logr v0.4.0 + github.com/go-logr/logr v1.2.0 github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 go.opentelemetry.io/otel v1.2.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.4 - k8s.io/apimachinery v0.22.4 - k8s.io/client-go v0.22.4 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/client-go v0.23.0 k8s.io/kubectl v0.22.4 - sigs.k8s.io/controller-runtime v0.9.6 + sigs.k8s.io/controller-runtime v0.11.0 ) require ( @@ -42,13 +42,13 @@ require ( github.com/docker/docker v20.10.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/evanphx/json-patch v4.11.0+incompatible // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.9.0 // indirect github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-kit/log v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/zapr v0.4.0 // indirect + github.com/go-logr/zapr v1.2.0 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -72,7 +72,7 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/json-iterator/go v1.1.11 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/linode/linodego v0.28.5 // indirect github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-isatty v0.0.12 // indirect @@ -80,7 +80,7 @@ require ( github.com/miekg/dns v1.1.42 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect @@ -91,32 +91,35 @@ require ( github.com/prometheus/common v0.29.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect - github.com/sirupsen/logrus v1.7.0 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/afero v1.6.0 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.18.1 // indirect - golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect - golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect - golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect - golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect - golang.org/x/text v0.3.6 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect + golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.48.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 // indirect - google.golang.org/grpc v1.38.0 // indirect - google.golang.org/protobuf v1.26.0 // indirect + google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect + google.golang.org/grpc v1.40.0 // indirect + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apiextensions-apiserver v0.21.3 // indirect - k8s.io/component-base v0.22.4 // indirect - k8s.io/klog/v2 v2.9.0 // indirect - k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect - k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/klog/v2 v2.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect + sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31 // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 92e756222..ff933076e 100644 --- a/go.sum +++ b/go.sum @@ -134,6 +134,7 @@ github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8V github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= @@ -171,6 +172,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= @@ -182,6 +184,8 @@ github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6 github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= @@ -198,7 +202,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -210,6 +218,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -263,12 +272,14 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -283,9 +294,12 @@ github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -308,10 +322,11 @@ github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= -github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -366,7 +381,6 @@ github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsd github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= @@ -438,6 +452,7 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -453,6 +468,7 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2V github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -495,6 +511,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -554,14 +572,16 @@ github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -671,8 +691,9 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -696,6 +717,7 @@ github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH6 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -716,6 +738,7 @@ github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -779,8 +802,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -817,15 +841,16 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= -github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -852,6 +877,7 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -864,6 +890,7 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -903,6 +930,7 @@ github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= @@ -914,7 +942,6 @@ github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= @@ -954,22 +981,28 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -977,6 +1010,7 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -998,6 +1032,7 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= @@ -1027,11 +1062,18 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -1053,6 +1095,7 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.2.0 h1:YOQDvxO1FayUcT9MIhJhgMyNO1WqoduiyvQHzGN0kUQ= @@ -1075,8 +1118,10 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1090,8 +1135,9 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1106,6 +1152,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1117,8 +1164,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1146,7 +1194,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1156,7 +1203,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -1222,8 +1268,10 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1235,8 +1283,10 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1314,6 +1364,7 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1329,21 +1380,26 @@ golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 h1:M69LAlWZCshgp0QSzyDcSsSIejIEeuaCVpmwcKwyLMk= +golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1352,8 +1408,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1443,8 +1500,9 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1480,6 +1538,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= @@ -1518,6 +1577,7 @@ google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1529,8 +1589,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1541,8 +1601,9 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 h1:pc16UedxnxXXtGxHCSUhafAoVHQZ0yXl8ZelMH4EETc= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1571,8 +1632,9 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1585,8 +1647,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1602,6 +1665,7 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1637,32 +1701,33 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.4 h1:UvyHW0ezB2oIgHAxlYoo6UJQObYXU7awuNarwoHEOjw= k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= -k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.4 h1:9uwcvPpukBw/Ri0EUmWz+49cnFtaoiyEhQTK+xOe7Ck= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/cli-runtime v0.22.4/go.mod h1:x35r0ERHXr/MrbR1C6MPJxQ3xKG6+hXi9m2xLzlMPZA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.4 h1:aAQ1Wk+I3bjCNk35YWUqbaueqrIonkfDPJSPDDe8Kfg= k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= -k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/code-generator v0.22.4/go.mod h1:qjYl54pQ/emhkT0UxbufbREYJMWsHNNV/jSVwhYZQGw= -k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.4 h1:7qwLJnua2ppGNZrRGDQ0vhsFebI39VGbZ4zdR5ArViI= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.22.4/go.mod h1:MrSaQy4a3tFVViff8TZL6JHYSewNCLshZCwHYM58v5A= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/component-helpers v0.22.4/go.mod h1:A50qTyczDFbhZDifIfS2zFrHuPk9UNOWPpvNZ+3RSIs= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= @@ -1670,29 +1735,36 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c h1:jvamsI1tn9V0S8jicyX82qaFC0H/NKxv2e5mbqsgR80= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kubectl v0.22.4 h1:ECUO1QWyZ70DiIKEfgBx+8i9D98uspVOwgc1APs/07w= k8s.io/kubectl v0.22.4/go.mod h1:ok2qRT6y2Gy4+y+mniJVyUMKeBHP4OWS9Rdtf/QTM5I= k8s.io/metrics v0.22.4/go.mod h1:6F/iwuYb1w2QDCoHkeMFLf4pwHBcYKLm4mPtVHKYrIw= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a h1:8dYfu/Fc9Gz2rNJKB9IQRGgQOh2clmRzNIPPY1xLY5g= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew= -sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31 h1:MjrlPPWlm/42B+OIdreOFNveuucM+hLIiFPu53F3I3I= +sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31/go.mod h1:nLkMD2WB4Jcix1qfVuJeOF4j5y/VfyeOIlTxG5Wj9co= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= @@ -1700,9 +1772,11 @@ sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go index c9aba7a6b..457ad37cf 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhookhandler/webhookhandler.go @@ -29,7 +29,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" ) -// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1;v1beta1 +// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch diff --git a/pkg/collector/adapters/config_to_probe.go b/pkg/collector/adapters/config_to_probe.go index b01be9712..10dfa45cd 100644 --- a/pkg/collector/adapters/config_to_probe.go +++ b/pkg/collector/adapters/config_to_probe.go @@ -101,7 +101,7 @@ func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, func createProbeFromExtension(extension interface{}) (*corev1.Probe, error) { probeCfg := extractProbeConfigurationFromExtension(extension) return &corev1.Probe{ - Handler: corev1.Handler{ + ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ Path: probeCfg.path, Port: probeCfg.port, diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index e99fd6f31..1da916d27 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -48,10 +48,10 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} existing := makeOtelcol(nsn) - existing.Status.Version = beginV err := k8sClient.Create(context.Background(), &existing) require.NoError(t, err) + existing.Status.Version = beginV err = k8sClient.Status().Update(context.Background(), &existing) require.NoError(t, err) From 8dfb7a56b871752f29fc662f6c4d7679aed30c6f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 9 Feb 2022 11:24:26 +0100 Subject: [PATCH 0403/1234] Use unique label and selector for operator objects (#697) Signed-off-by: Pavol Loffay --- ...perator-controller-manager-metrics-service_v1_service.yaml | 2 ++ ...trics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml | 2 ++ .../opentelemetry-operator-webhook-service_v1_service.yaml | 3 +++ .../opentelemetry-operator.clusterserviceversion.yaml | 2 ++ bundle/manifests/opentelemetry.io_instrumentations.yaml | 2 ++ .../manifests/opentelemetry.io_opentelemetrycollectors.yaml | 2 ++ config/default/kustomization.yaml | 4 ++-- 7 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml index 9e8b2cbd9..66b0879b4 100644 --- a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml @@ -3,6 +3,7 @@ kind: Service metadata: creationTimestamp: null labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: opentelemetry-operator-controller-manager-metrics-service spec: @@ -12,6 +13,7 @@ spec: protocol: TCP targetPort: https selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager status: loadBalancer: {} diff --git a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml index 1cf126194..18a824a57 100644 --- a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -2,6 +2,8 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-metrics-reader rules: - nonResourceURLs: diff --git a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml index 653d80ef1..d40a33694 100644 --- a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml +++ b/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Service metadata: creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-webhook-service spec: ports: @@ -9,6 +11,7 @@ spec: protocol: TCP targetPort: 9443 selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager status: loadBalancer: {} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0974dbdfa..172c5d6c6 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -254,11 +254,13 @@ spec: replicas: 1 selector: matchLabels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager strategy: {} template: metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager spec: containers: diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 7b0049cc5..666e5f0dd 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -4,6 +4,8 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: instrumentations.opentelemetry.io spec: group: opentelemetry.io diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index b22af0cee..b596279c0 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -5,6 +5,8 @@ metadata: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetrycollectors.opentelemetry.io spec: group: opentelemetry.io diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index ef6a8cd16..b5d04b59a 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -9,8 +9,8 @@ namespace: opentelemetry-operator-system namePrefix: opentelemetry-operator- # Labels to add to all resources and selectors. -#commonLabels: -# someName: someValue +commonLabels: + app.kubernetes.io/name: opentelemetry-operator bases: - ../crd From ba476718d5a04262d7759319160d7bcb786e24ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 15:26:56 +0100 Subject: [PATCH 0404/1234] Bump k8s.io/kubectl from 0.22.4 to 0.23.3 (#678) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.22.4 to 0.23.3. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.22.4...v0.23.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 18 ++++++++---------- go.sum | 52 ++++++++++++++++++++++++---------------------------- 2 files changed, 32 insertions(+), 38 deletions(-) diff --git a/go.mod b/go.mod index 99536a860..a6feb7d7f 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/stretchr/testify v1.7.0 go.opentelemetry.io/otel v1.2.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.0 - k8s.io/apimachinery v0.23.0 - k8s.io/client-go v0.23.0 - k8s.io/kubectl v0.22.4 + k8s.io/api v0.23.3 + k8s.io/apimachinery v0.23.3 + k8s.io/client-go v0.23.3 + k8s.io/kubectl v0.23.3 sigs.k8s.io/controller-runtime v0.11.0 ) @@ -92,13 +92,12 @@ require ( github.com/prometheus/procfs v0.6.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/afero v1.6.0 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect + golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect @@ -114,12 +113,11 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.0 // indirect + k8s.io/component-base v0.23.3 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect - sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31 // indirect + k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index ff933076e..026a13ed1 100644 --- a/go.sum +++ b/go.sum @@ -993,7 +993,6 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1266,12 +1265,12 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= +golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1701,32 +1700,31 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/api v0.23.3 h1:KNrME8KHGr12Ozjf8ytOewKzZh6hl/hHUZeHddT3a38= +k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apimachinery v0.23.3 h1:7IW6jxNzrXTsP0c8yXz2E5Yx/WTzVPTsHIx/2Vm0cIk= +k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/cli-runtime v0.22.4/go.mod h1:x35r0ERHXr/MrbR1C6MPJxQ3xKG6+hXi9m2xLzlMPZA= +k8s.io/cli-runtime v0.23.3/go.mod h1:yA00O5pDqnjkBh8fkuugBbfIfjB1nOpz+aYLotbnOfc= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= -k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/code-generator v0.22.4/go.mod h1:qjYl54pQ/emhkT0UxbufbREYJMWsHNNV/jSVwhYZQGw= +k8s.io/client-go v0.23.3 h1:23QYUmCQ/W6hW78xIwm3XqZrrKZM+LWDqW2zfo+szJs= +k8s.io/client-go v0.23.3/go.mod h1:47oMd+YvAOqZM7pcQ6neJtBiFH7alOyfunYN48VsmwE= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/component-base v0.22.4/go.mod h1:MrSaQy4a3tFVViff8TZL6JHYSewNCLshZCwHYM58v5A= -k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/component-helpers v0.22.4/go.mod h1:A50qTyczDFbhZDifIfS2zFrHuPk9UNOWPpvNZ+3RSIs= +k8s.io/component-base v0.23.3 h1:q+epprVdylgecijVGVdf4MbizEL2feW4ssd7cdo6LVY= +k8s.io/component-base v0.23.3/go.mod h1:1Smc4C60rWG7d3HjSYpIwEbySQ3YWg0uzH5a2AtaTLg= +k8s.io/component-helpers v0.23.3/go.mod h1:SH+W/WPTaTenbWyDEeY7iytAQiMh45aqKxkvlqQ57cg= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1741,19 +1739,18 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubectl v0.22.4 h1:ECUO1QWyZ70DiIKEfgBx+8i9D98uspVOwgc1APs/07w= -k8s.io/kubectl v0.22.4/go.mod h1:ok2qRT6y2Gy4+y+mniJVyUMKeBHP4OWS9Rdtf/QTM5I= -k8s.io/metrics v0.22.4/go.mod h1:6F/iwuYb1w2QDCoHkeMFLf4pwHBcYKLm4mPtVHKYrIw= +k8s.io/kubectl v0.23.3 h1:gJsF7cahkWDPYlNvYKK+OrBZLAJUBzCym+Zsi+dfi1E= +k8s.io/kubectl v0.23.3/go.mod h1:VBeeXNgLhSabu4/k0O7Q0YujgnA3+CLTUE0RcmF73yY= +k8s.io/metrics v0.23.3/go.mod h1:Ut8TvkbsO4oMVeUzaTArvPrcw9QRFLs2XNzUlORjdYE= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= +k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1761,20 +1758,19 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31 h1:MjrlPPWlm/42B+OIdreOFNveuucM+hLIiFPu53F3I3I= -sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20220201142011-b1d9a1641f31/go.mod h1:nLkMD2WB4Jcix1qfVuJeOF4j5y/VfyeOIlTxG5Wj9co= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= -sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= -sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= -sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= +sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= +sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= +sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= +sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= From 79eb8ef74ffd42aca9c0664c39bd9f8f6424037e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 10:38:13 -0500 Subject: [PATCH 0405/1234] Bump go.opentelemetry.io/otel from 1.2.0 to 1.3.0 (#703) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.2.0 to 1.3.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.2.0...v1.3.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 5 +++-- go.sum | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index a6feb7d7f..7096000c9 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,12 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/go-logr/logr v1.2.0 + github.com/go-logr/logr v1.2.1 github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/otel v1.2.0 + go.opentelemetry.io/otel v1.3.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.3 k8s.io/apimachinery v0.23.3 @@ -93,6 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/otel/trace v1.3.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 026a13ed1..00a860ed2 100644 --- a/go.sum +++ b/go.sum @@ -323,8 +323,10 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= +github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -1097,8 +1099,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.2.0 h1:YOQDvxO1FayUcT9MIhJhgMyNO1WqoduiyvQHzGN0kUQ= -go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I= +go.opentelemetry.io/otel v1.3.0 h1:APxLf0eiBwLl+SOXiJJCVYzA1OOJNyAoV8C5RNRyy7Y= +go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1106,7 +1108,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0= +go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1NOGY= +go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 371cc3055452648db414cc6db6f0d5f1738a25de Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 10 Feb 2022 10:32:38 +0100 Subject: [PATCH 0406/1234] Bump default instrumentation versions (#699) Signed-off-by: Pavol Loffay --- versions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/versions.txt b/versions.txt index 6e90ed47c..5f00347e7 100644 --- a/versions.txt +++ b/versions.txt @@ -12,12 +12,12 @@ targetallocator=0.1.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.7.2 +autoinstrumentation-java=1.10.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.26.0 +autoinstrumentation-nodejs=0.27.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.26b1 +autoinstrumentation-python=0.28b1 From 6787b10e9ca6c88286ebf733e59f8b9ac3b7b949 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 10 Feb 2022 16:31:03 +0100 Subject: [PATCH 0407/1234] Otel Operator release 0.43.0 (#680) * Otel Operator release 0.43.0 * Fixing typo * Upgrade script to version 0.43.0 * Including versions reference * Fixing Lint tests * Adding metrics changes into CHANGELOG * Removed comment and fixed changelog * Added new PR on Changelog and added lint fixes * Added missing header * Fixing upgrade routine * Adding missing operator-sdk PR * Change method of sorting args and fixing test * fixing test logic * Change method of sorting args and fixing test * Fixed Changelog links * Fixed Changelog links * Change lint format on version tests * Fixed typos on test * Fixed typos on test * Fixed Changelog and added description in test file * Removed empty lines --- CHANGELOG.md | 13 ++ README.md | 1 + ...emetry-operator.clusterserviceversion.yaml | 6 +- pkg/collector/upgrade/v0_43_0.go | 91 +++++++++++ pkg/collector/upgrade/v0_43_0_test.go | 141 ++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + .../00-install-collector.yaml | 2 - .../00-install-collector.yaml | 2 - .../00-install-collector.yaml | 2 - .../e2e/smoke-pod-annotations/00-install.yaml | 2 - .../00-install.yaml | 2 - .../01-install-second-config.yaml | 3 +- tests/e2e/smoke-sidecar/00-install.yaml | 2 - tests/e2e/smoke-simplest/00-install.yaml | 4 +- versions.txt | 4 +- 15 files changed, 257 insertions(+), 22 deletions(-) create mode 100644 pkg/collector/upgrade/v0_43_0.go create mode 100644 pkg/collector/upgrade/v0_43_0_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index a689ed081..11a912080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ Changes by Version ================== +0.43.0 +------------------- +* Bumped OpenTelemetry Collector to v0.43.0 +* Upgrade to 0.43.0 will move the metrics CLI arguments into the config, in response to ([#680](https://github.com/open-telemetry/opentelemetry-operator/pull/680), [@yuriolisa](https://github.com/yuriolisa)) +* Add unique label and selector for operator objects ([#697](https://github.com/open-telemetry/opentelemetry-operator/pull/697), [@pavolloffay](https://github.com/pavolloffay)) +* Bump operator-sdk to 1.17 ([#692](https://github.com/open-telemetry/opentelemetry-operator/pull/692), [@pavolloffay](https://github.com/pavolloffay)) +* Update java instrumentation to 1.10.1 ([#688](https://github.com/open-telemetry/opentelemetry-operator/pull/688), [@anuraaga](https://github.com/anuraaga)) +* Update nodejs instrumentation to 0.27.0 ([#687](https://github.com/open-telemetry/opentelemetry-operator/pull/687), [@anuraaga](https://github.com/anuraaga)) +* Update python instrumentation to 0.28b1 ([#686](https://github.com/open-telemetry/opentelemetry-operator/pull/686), [@anuraaga](https://github.com/anuraaga)) +* Add b3, jaeger, ottrace propagators to python instrumentation ([#684](https://github.com/open-telemetry/opentelemetry-operator/pull/684), [@anuraaga](https://github.com/anuraaga)) +* Add env support to instrumentation kind ([#674](https://github.com/open-telemetry/opentelemetry-operator/pull/674), [@Duncan-tree-zhou](https://github.com/Duncan-tree-zhou)) +* Fix collector config update ([#670](https://github.com/open-telemetry/opentelemetry-operator/pull/670), [@mcariapas](https://github.com/mcariapas)) + 0.42.0 ------------------- * Bumped OpenTelemetry Collector to v0.42.0 diff --git a/README.md b/README.md index 6a10a962f..ecdf1e7e1 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.43.0 | v1.21 to v1.23 | 1.6.1 | | v0.42.0 | v1.21 to v1.23 | 1.6.1 | | v0.41.1 | v1.21 to v1.23 | 1.6.1 | | v0.41.0 | v1.20 to v1.22 | 1.6.1 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 172c5d6c6..989d82cd8 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.42.0 + name: opentelemetry-operator.v0.43.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -285,7 +285,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.42.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.43.0 livenessProbe: httpGet: path: /healthz @@ -377,7 +377,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.42.0 + version: 0.43.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go new file mode 100644 index 000000000..5548d6147 --- /dev/null +++ b/pkg/collector/upgrade/v0_43_0.go @@ -0,0 +1,91 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "sort" + + "gopkg.in/yaml.v2" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_43_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + // return if args exist + if len(otelcol.Spec.Args) == 0 { + return otelcol, nil + } + + //Removing deprecated Spec.Args (--metrics-addr and --metrics-level) based on + // https://github.com/open-telemetry/opentelemetry-collector/pull/4695 + //Both args can be used now on the Spec.Config + foundMetricsArgs := make(map[string]string) + for argKey, argValue := range otelcol.Spec.Args { + if argKey == "--metrics-addr" || argKey == "--metrics-level" { + foundMetricsArgs[argKey] = argValue + delete(otelcol.Spec.Args, argKey) + } + } + + // If we find metrics being used on Spec.Args we'll move to the syntax on Spec.Config + if len(foundMetricsArgs) > 0 { + cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.43.0, failed to parse configuration: %w", err) + } + serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) + if !ok { + cfg["service"] = make(map[interface{}]interface{}) + serviceConfig, _ = cfg["service"].(map[interface{}]interface{}) + } + telemetryConfig, ok := serviceConfig["telemetry"].(map[interface{}]interface{}) + if !ok { + serviceConfig["telemetry"] = make(map[interface{}]interface{}) + telemetryConfig, _ = serviceConfig["telemetry"].(map[interface{}]interface{}) + } + metricsConfig, ok := telemetryConfig["metrics"].(map[interface{}]interface{}) + if !ok { + telemetryConfig["metrics"] = make(map[interface{}]interface{}) + metricsConfig, _ = telemetryConfig["metrics"].(map[interface{}]interface{}) + } + + // if there are already those Args under Spec.Config + // then we won't override them. + if len(metricsConfig) == 0 { + if val, ok := foundMetricsArgs["--metrics-addr"]; ok { + metricsConfig["address"] = val + } + if val, ok := foundMetricsArgs["--metrics-level"]; ok { + metricsConfig["level"] = val + } + } + cfg["service"] = serviceConfig + res, err := yaml.Marshal(cfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.43.0, failed to marshall back configuration: %w", err) + } + otelcol.Spec.Config = string(res) + keys := make([]string, 0, len(foundMetricsArgs)) + for k := range foundMetricsArgs { + keys = append(keys, k) + } + sort.Strings(keys) + otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", keys)) + } + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go new file mode 100644 index 000000000..e259261de --- /dev/null +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_43_0Upgrade(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "--metrics-addr": ":8988", + "--metrics-level": "detailed", + "--test-upgrade43": "true", + "--test-arg1": "otel", + }, + Config: ` +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 + +exporters: + otlp: + endpoint: "example.com" + +service: + pipelines: + traces: + receivers: [otlp/mtls] + exporters: [otlp] +`, + }, + } + existing.Status.Version = "0.42.0" + + // test + res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, map[string]string{ + "--test-upgrade43": "true", + "--test-arg1": "otel", + }, res.Spec.Args) + + // verify + assert.Equal(t, `exporters: + otlp: + endpoint: example.com +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + traces: + exporters: + - otlp + receivers: + - otlp/mtls + telemetry: + metrics: + address: :8988 + level: detailed +`, res.Spec.Config) + + assert.Equal(t, "upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. [--metrics-addr --metrics-level] from otelcol custom resource otelcol.spec.args and "+"adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", res.Status.Messages[0]) + + configWithMetrics := `exporters: + otlp: + endpoint: example.com +receivers: + otlp/mtls: + protocols: + http: + endpoint: mysite.local:55690 +service: + pipelines: + traces: + exporters: + - otlp + receivers: + - otlp/mtls + telemetry: + metrics: + address: :8988 + level: detailed +` + existing.Spec.Config = configWithMetrics + existing.Spec.Args = map[string]string{ + "--metrics-addr": ":8988", + "--metrics-level": "detailed", + "--test-upgrade43": "true", + "--test-arg1": "otel", + } + res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + assert.NoError(t, err) + + // verify + assert.Equal(t, configWithMetrics, res.Spec.Config) + assert.Equal(t, map[string]string{ + "--test-upgrade43": "true", + "--test-arg1": "otel", + }, res.Spec.Args) + + assert.Equal(t, "upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. [--metrics-addr --metrics-level] from otelcol custom resource otelcol.spec.args and "+"adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", res.Status.Messages[0]) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 067686330..641b75510 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -70,6 +70,10 @@ var ( Version: *semver.MustParse("0.41.0"), upgrade: upgrade0_41_0, }, + { + Version: *semver.MustParse("0.43.0"), + upgrade: upgrade0_43_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/tests/e2e/instrumentation-java/00-install-collector.yaml b/tests/e2e/instrumentation-java/00-install-collector.yaml index b82308636..f8e1e98e0 100644 --- a/tests/e2e/instrumentation-java/00-install-collector.yaml +++ b/tests/e2e/instrumentation-java/00-install-collector.yaml @@ -4,8 +4,6 @@ metadata: name: sidecar spec: mode: sidecar - args: - metrics-level: detailed config: | receivers: otlp: diff --git a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml index b82308636..f8e1e98e0 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml @@ -4,8 +4,6 @@ metadata: name: sidecar spec: mode: sidecar - args: - metrics-level: detailed config: | receivers: otlp: diff --git a/tests/e2e/instrumentation-python/00-install-collector.yaml b/tests/e2e/instrumentation-python/00-install-collector.yaml index b82308636..f8e1e98e0 100644 --- a/tests/e2e/instrumentation-python/00-install-collector.yaml +++ b/tests/e2e/instrumentation-python/00-install-collector.yaml @@ -4,8 +4,6 @@ metadata: name: sidecar spec: mode: sidecar - args: - metrics-level: detailed config: | receivers: otlp: diff --git a/tests/e2e/smoke-pod-annotations/00-install.yaml b/tests/e2e/smoke-pod-annotations/00-install.yaml index ee3dac548..cce1909fa 100644 --- a/tests/e2e/smoke-pod-annotations/00-install.yaml +++ b/tests/e2e/smoke-pod-annotations/00-install.yaml @@ -24,5 +24,3 @@ spec: receivers: [jaeger] processors: [] exporters: [logging] - args: - metrics-level: detailed diff --git a/tests/e2e/smoke-restarting-deployment/00-install.yaml b/tests/e2e/smoke-restarting-deployment/00-install.yaml index fbc93e109..7ff13711e 100644 --- a/tests/e2e/smoke-restarting-deployment/00-install.yaml +++ b/tests/e2e/smoke-restarting-deployment/00-install.yaml @@ -17,5 +17,3 @@ spec: receivers: [jaeger] processors: [] exporters: [logging] - args: - metrics-level: detailed diff --git a/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml b/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml index bc9362af9..78f90878b 100644 --- a/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml +++ b/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml @@ -20,5 +20,4 @@ spec: receivers: [jaeger, otlp] processors: [] exporters: [logging] - args: - metrics-level: detailed + diff --git a/tests/e2e/smoke-sidecar/00-install.yaml b/tests/e2e/smoke-sidecar/00-install.yaml index 33d080521..1d498c626 100644 --- a/tests/e2e/smoke-sidecar/00-install.yaml +++ b/tests/e2e/smoke-sidecar/00-install.yaml @@ -4,8 +4,6 @@ metadata: name: sidecar-for-my-app spec: mode: sidecar - args: - metrics-level: detailed config: | receivers: jaeger: diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml index 205c59226..a1a6120f7 100644 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -18,6 +18,4 @@ spec: traces: receivers: [jaeger] processors: [] - exporters: [logging] - args: - metrics-level: detailed \ No newline at end of file + exporters: [logging] \ No newline at end of file diff --git a/versions.txt b/versions.txt index 5f00347e7..2c446a69a 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.42.0 +opentelemetry-collector=0.43.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.42.0 +operator=0.43.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 3039b2238440aaa80dfc4cb91a881839bac64aee Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 14 Feb 2022 17:23:46 +0100 Subject: [PATCH 0408/1234] Fix logger in instrumentation webhook (#698) Signed-off-by: Pavol Loffay --- apis/v1alpha1/instrumentation_webhook.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index c15e75379..1fef3ee4d 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -80,19 +80,19 @@ var _ webhook.Validator = &Instrumentation{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. func (in *Instrumentation) ValidateCreate() error { - opentelemetrycollectorlog.Info("validate create", "name", in.Name) + instrumentationlog.Info("validate create", "name", in.Name) return in.validate() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. func (in *Instrumentation) ValidateUpdate(old runtime.Object) error { - opentelemetrycollectorlog.Info("validate update", "name", in.Name) + instrumentationlog.Info("validate update", "name", in.Name) return in.validate() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. func (in *Instrumentation) ValidateDelete() error { - opentelemetrycollectorlog.Info("validate delete", "name", in.Name) + instrumentationlog.Info("validate delete", "name", in.Name) return nil } From adb7e39ad5d15caf4e42a783a0920c291d057d91 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 17:24:02 +0100 Subject: [PATCH 0409/1234] Bump go.opentelemetry.io/otel from 1.3.0 to 1.4.0 (#708) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 7096000c9..b57c2eef8 100644 --- a/go.mod +++ b/go.mod @@ -4,12 +4,12 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/go-logr/logr v1.2.1 + github.com/go-logr/logr v1.2.2 github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/otel v1.3.0 + go.opentelemetry.io/otel v1.4.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.3 k8s.io/apimachinery v0.23.3 @@ -54,7 +54,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/go-cmp v0.5.7 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.3.0 // indirect + go.opentelemetry.io/otel/trace v1.4.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 00a860ed2..380ab3f86 100644 --- a/go.sum +++ b/go.sum @@ -324,9 +324,9 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= -github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= +github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -527,8 +527,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -1099,8 +1100,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.3.0 h1:APxLf0eiBwLl+SOXiJJCVYzA1OOJNyAoV8C5RNRyy7Y= -go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= +go.opentelemetry.io/otel v1.4.0 h1:7ESuKPq6zpjRaY5nvVDGiuwK7VAJ8MwkKnmNJ9whNZ4= +go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1108,8 +1109,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.3.0 h1:doy8Hzb1RJ+I3yFhtDmwNc7tIyw1tNMOIsyPzp1NOGY= -go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= +go.opentelemetry.io/otel/trace v1.4.0 h1:4OOUrPZdVFQkbzl/JSdvGCWIdw5ONXXxzHlaLlWppmo= +go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 704ff26e02ffb4874de553ab195f47c90f0fa30c Mon Sep 17 00:00:00 2001 From: elvis-cai Date: Wed, 16 Feb 2022 00:56:57 +1100 Subject: [PATCH 0410/1234] Add SPLUNK_ env prefix support to Instrumentation kind (#709) --- apis/v1alpha1/instrumentation_webhook.go | 5 +-- pkg/instrumentation/podmutator_test.go | 32 +++++++++++++++++++ .../00-install-instrumentation.yaml | 4 +++ tests/e2e/instrumentation-java/01-assert.yaml | 4 +++ .../00-install-instrumentation.yaml | 2 ++ .../e2e/instrumentation-nodejs/01-assert.yaml | 2 ++ .../00-install-instrumentation.yaml | 4 ++- .../e2e/instrumentation-python/01-assert.yaml | 2 ++ 8 files changed, 52 insertions(+), 3 deletions(-) diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 1fef3ee4d..f2793a864 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -31,6 +31,7 @@ const ( AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" envPrefix = "OTEL_" + envSplunkPrefix = "SPLUNK_" ) // log is for logging in this package. @@ -130,8 +131,8 @@ func (in *Instrumentation) validate() error { func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error { for _, env := range envs { - if !strings.HasPrefix(env.Name, envPrefix) { - return fmt.Errorf("env name should start with \"OTEL_\": %s", env.Name) + if !strings.HasPrefix(env.Name, envPrefix) && !strings.HasPrefix(env.Name, envSplunkPrefix) { + return fmt.Errorf("env name should start with \"OTEL_\" or \"SPLUNK_\": %s", env.Name) } } return nil diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 15766b7a4..00aa549c1 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -63,6 +63,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", Value: "false", }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, }, }, Env: []corev1.EnvVar{ @@ -86,6 +90,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", @@ -143,6 +151,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", Value: "false", }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, { Name: "JAVA_TOOL_OPTIONS", Value: javaJVMArgument, @@ -167,6 +179,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, { Name: "OTEL_SERVICE_NAME", Value: "app", @@ -246,6 +262,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", @@ -324,6 +344,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, { Name: "OTEL_SERVICE_NAME", Value: "app", @@ -406,6 +430,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, }, }, }, @@ -481,6 +509,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.85", }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, { Name: "OTEL_SERVICE_NAME", Value: "app", diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml index 793f5a87f..f77a3f835 100644 --- a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-java/00-install-instrumentation.yaml @@ -14,6 +14,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" exporter: endpoint: http://localhost:4317 propagators: @@ -28,3 +30,5 @@ spec: value: "true" - name: OTEL_INSTRUMENTATION_JDBC_ENABLED value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index cdc33dcc3..526b21b88 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -14,6 +14,8 @@ spec: value: "true" - name: OTEL_INSTRUMENTATION_JDBC_ENABLED value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" - name: JAVA_TOOL_OPTIONS value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" - name: OTEL_TRACES_EXPORTER @@ -26,6 +28,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" - name: OTEL_SERVICE_NAME value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml index 40459f483..35154afb2 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml @@ -14,6 +14,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" exporter: endpoint: http://localhost:4317 propagators: diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index d327e8596..37164a387 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -24,6 +24,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" - name: OTEL_SERVICE_NAME value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml index fa1fff235..ab4bd669c 100644 --- a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml @@ -10,6 +10,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" exporter: endpoint: http://localhost:4317 propagators: @@ -25,4 +27,4 @@ spec: - name: OTEL_TRACES_EXPORTER value: otlp_proto_http - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 \ No newline at end of file + value: http://localhost:4317 diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index 105cfd30c..a34d32d9a 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -24,6 +24,8 @@ spec: value: parentbased_traceidratio - name: OTEL_TRACES_SAMPLER_ARG value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" - name: OTEL_SERVICE_NAME value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME From c4033917c581a454b0db1a3f886152d0ca90b9a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 11:28:19 +0100 Subject: [PATCH 0411/1234] Bump sigs.k8s.io/controller-runtime from 0.11.0 to 0.11.1 (#712) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.11.0 to 0.11.1. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.11.0...v0.11.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b57c2eef8..8307c9b56 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( k8s.io/apimachinery v0.23.3 k8s.io/client-go v0.23.3 k8s.io/kubectl v0.23.3 - sigs.k8s.io/controller-runtime v0.11.0 + sigs.k8s.io/controller-runtime v0.11.1 ) require ( diff --git a/go.sum b/go.sum index 380ab3f86..a11474573 100644 --- a/go.sum +++ b/go.sum @@ -1760,8 +1760,8 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/controller-runtime v0.11.1 h1:7YIHT2QnHJArj/dk9aUkYhfqfK5cIxPOX5gPECfdZLU= +sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= From 629f333c4543abe0a76a2458f04d56e88e49ee5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 16:40:51 -0500 Subject: [PATCH 0412/1234] Bump go.opentelemetry.io/otel from 1.4.0 to 1.4.1 (#714) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8307c9b56..1cf64ce43 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/otel v1.4.0 + go.opentelemetry.io/otel v1.4.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.3 k8s.io/apimachinery v0.23.3 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.4.0 // indirect + go.opentelemetry.io/otel/trace v1.4.1 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index a11474573..c22f616c6 100644 --- a/go.sum +++ b/go.sum @@ -1100,8 +1100,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.4.0 h1:7ESuKPq6zpjRaY5nvVDGiuwK7VAJ8MwkKnmNJ9whNZ4= -go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= +go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= +go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1109,8 +1109,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.4.0 h1:4OOUrPZdVFQkbzl/JSdvGCWIdw5ONXXxzHlaLlWppmo= -go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= +go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ= +go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 5dde629c5e4c75ff0306ab31c72213ea7cc13941 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 10:42:51 +0100 Subject: [PATCH 0413/1234] Bump k8s.io/kubectl from 0.23.3 to 0.23.4 (#725) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.23.3 to 0.23.4. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.23.3...v0.23.4) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 1cf64ce43..a7b3bf407 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/stretchr/testify v1.7.0 go.opentelemetry.io/otel v1.4.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.3 - k8s.io/apimachinery v0.23.3 - k8s.io/client-go v0.23.3 - k8s.io/kubectl v0.23.3 + k8s.io/api v0.23.4 + k8s.io/apimachinery v0.23.4 + k8s.io/client-go v0.23.4 + k8s.io/kubectl v0.23.4 sigs.k8s.io/controller-runtime v0.11.1 ) @@ -114,7 +114,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.3 // indirect + k8s.io/component-base v0.23.4 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect diff --git a/go.sum b/go.sum index c22f616c6..8869a1426 100644 --- a/go.sum +++ b/go.sum @@ -1705,28 +1705,28 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.23.3 h1:KNrME8KHGr12Ozjf8ytOewKzZh6hl/hHUZeHddT3a38= -k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= +k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E= +k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.3 h1:7IW6jxNzrXTsP0c8yXz2E5Yx/WTzVPTsHIx/2Vm0cIk= -k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.23.4 h1:fhnuMd/xUL3Cjfl64j5ULKZ1/J9n8NuQEgNL+WXWfdM= +k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/cli-runtime v0.23.3/go.mod h1:yA00O5pDqnjkBh8fkuugBbfIfjB1nOpz+aYLotbnOfc= +k8s.io/cli-runtime v0.23.4/go.mod h1:7KywUNTUibmHPqmpDFuRO1kc9RhsufHv2lkjCm2YZyM= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.23.3 h1:23QYUmCQ/W6hW78xIwm3XqZrrKZM+LWDqW2zfo+szJs= -k8s.io/client-go v0.23.3/go.mod h1:47oMd+YvAOqZM7pcQ6neJtBiFH7alOyfunYN48VsmwE= +k8s.io/client-go v0.23.4 h1:YVWvPeerA2gpUudLelvsolzH7c2sFoXXR5wM/sWqNFU= +k8s.io/client-go v0.23.4/go.mod h1:PKnIL4pqLuvYUK1WU7RLTMYKPiIh7MYShLshtRY9cj0= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/code-generator v0.23.3/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/code-generator v0.23.4/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/component-base v0.23.3 h1:q+epprVdylgecijVGVdf4MbizEL2feW4ssd7cdo6LVY= -k8s.io/component-base v0.23.3/go.mod h1:1Smc4C60rWG7d3HjSYpIwEbySQ3YWg0uzH5a2AtaTLg= -k8s.io/component-helpers v0.23.3/go.mod h1:SH+W/WPTaTenbWyDEeY7iytAQiMh45aqKxkvlqQ57cg= +k8s.io/component-base v0.23.4 h1:SziYh48+QKxK+ykJ3Ejqd98XdZIseVBG7sBaNLPqy6M= +k8s.io/component-base v0.23.4/go.mod h1:8o3Gg8i2vnUXGPOwciiYlkSaZT+p+7gA9Scoz8y4W4E= +k8s.io/component-helpers v0.23.4/go.mod h1:1Pl7L4zukZ054ElzRbvmZ1FJIU8roBXFOeRFu8zipa4= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1745,9 +1745,9 @@ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iL k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubectl v0.23.3 h1:gJsF7cahkWDPYlNvYKK+OrBZLAJUBzCym+Zsi+dfi1E= -k8s.io/kubectl v0.23.3/go.mod h1:VBeeXNgLhSabu4/k0O7Q0YujgnA3+CLTUE0RcmF73yY= -k8s.io/metrics v0.23.3/go.mod h1:Ut8TvkbsO4oMVeUzaTArvPrcw9QRFLs2XNzUlORjdYE= +k8s.io/kubectl v0.23.4 h1:mAa+zEOlyZieecEy+xSrhjkpMcukYyHWzcNdX28dzMY= +k8s.io/kubectl v0.23.4/go.mod h1:Dgb0Rvx/8JKS/C2EuvsNiQc6RZnX0SbHJVG3XUzH6ok= +k8s.io/metrics v0.23.4/go.mod h1:cl6sY9BdVT3DubbpqnkPIKi6mn/F2ltkU4yH1tEJ3Bo= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 272b3ea8bec2698e1045692e19f10e75fea8ebcb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 10:43:15 +0100 Subject: [PATCH 0414/1234] Bump docker/login-action from 1.12.0 to 1.13.0 (#723) Bumps [docker/login-action](https://github.com/docker/login-action) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 678b117f3..9079cfdc3 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.12.0 + uses: docker/login-action@v1.13.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 8767f8098..92824c7fc 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.12.0 + uses: docker/login-action@v1.13.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index b8525513c..f370e708c 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.12.0 + uses: docker/login-action@v1.13.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 18f98028f..16b0b84eb 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -56,7 +56,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.12.0 + uses: docker/login-action@v1.13.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 5c8552bfe..5133df5a2 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.12.0 + uses: docker/login-action@v1.13.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From b997cb30544484f99a14482fa723342ff39b5cc4 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:41:36 +0100 Subject: [PATCH 0415/1234] Bump Java auto-instrumentation version to 1.11 (#720) * Bump Java AI version * Update version.txt Co-authored-by: Pavol Loffay --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 4dae2985b..720c7384c 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.10.1 +1.11.1 From 6faf246edef7477a5b07fc4db1b208b8e07fdc02 Mon Sep 17 00:00:00 2001 From: binjip978 Date: Mon, 21 Feb 2022 15:14:13 +0200 Subject: [PATCH 0416/1234] Add appProtocol for otlp and jaeger receiver parsers (#704) Signed-off-by: Sergei Semenchuk --- .../adapters/config_to_ports_test.go | 45 +++++++++++++++++-- pkg/collector/parser/receiver_generic.go | 20 ++++++--- pkg/collector/parser/receiver_jaeger.go | 8 ++++ pkg/collector/parser/receiver_otlp.go | 38 +++++++++++----- pkg/collector/parser/receiver_zipkin.go | 18 +++++--- pkg/collector/reconcile/service_test.go | 8 ++-- tests/e2e/smoke-simplest/00-assert.yaml | 28 ++++++++++++ 7 files changed, 135 insertions(+), 30 deletions(-) diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index f13db7b86..65d4d1579 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -22,7 +22,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" @@ -53,6 +52,17 @@ func TestExtractPortsFromConfig(t *testing.T) { protocols: thrift_http: endpoint: 0.0.0.0:15268 + otlp: + protocols: + grpc: + http: + otlp/2: + protocols: + grpc: + endpoint: 0.0.0.0:55555 + zipkin: + zipkin/2: + endpoint: 0.0.0.0:33333 ` // prepare @@ -63,7 +73,7 @@ func TestExtractPortsFromConfig(t *testing.T) { // test ports, err := adapters.ConfigToReceiverPorts(logger, config) assert.NoError(t, err) - assert.Len(t, ports, 6) + assert.Len(t, ports, 12) // verify expectedPorts := map[int32]bool{} @@ -73,6 +83,11 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedPorts[int32(6831)] = false expectedPorts[int32(6833)] = false expectedPorts[int32(15268)] = false + expectedPorts[int32(4318)] = false + expectedPorts[int32(55681)] = false + expectedPorts[int32(55555)] = false + expectedPorts[int32(9411)] = false + expectedPorts[int32(33333)] = false expectedNames := map[string]bool{} expectedNames["examplereceiver"] = false @@ -81,6 +96,22 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedNames["jaeger-thrift-compact"] = false expectedNames["jaeger-thrift-binary"] = false expectedNames["jaeger-custom-thrift-http"] = false + expectedNames["otlp-grpc"] = false + expectedNames["otlp-http"] = false + expectedNames["otlp-http-legacy"] = false + expectedNames["otlp-2-grpc"] = false + expectedNames["zipkin"] = false + expectedNames["zipkin-2"] = false + + expectedAppProtocols := map[string]string{} + expectedAppProtocols["otlp-grpc"] = "grpc" + expectedAppProtocols["otlp-http"] = "http" + expectedAppProtocols["otlp-http-legacy"] = "http" + expectedAppProtocols["jaeger-custom-thrift-http"] = "http" + expectedAppProtocols["jaeger-grpc"] = "grpc" + expectedAppProtocols["otlp-2-grpc"] = "grpc" + expectedAppProtocols["zipkin"] = "http" + expectedAppProtocols["zipkin-2"] = "http" // make sure we only have the ports in the set for _, port := range ports { @@ -88,6 +119,10 @@ func TestExtractPortsFromConfig(t *testing.T) { assert.NotNil(t, expectedNames[port.Name]) expectedPorts[port.Port] = true expectedNames[port.Name] = true + + if appProtocol, ok := expectedAppProtocols[port.Name]; ok { + assert.Equal(t, appProtocol, *port.AppProtocol) + } } // and make sure all the ports from the set are there @@ -95,6 +130,10 @@ func TestExtractPortsFromConfig(t *testing.T) { assert.True(t, val) } + // make sure we only have the ports names in the set + for _, val := range expectedNames { + assert.True(t, val) + } } func TestNoPortsParsed(t *testing.T) { @@ -162,7 +201,7 @@ func TestParserFailed(t *testing.T) { // prepare mockParserCalled := false mockParser := &mockParser{ - portsFunc: func() ([]v1.ServicePort, error) { + portsFunc: func() ([]corev1.ServicePort, error) { mockParserCalled = true return nil, errors.New("mocked error") }, diff --git a/pkg/collector/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go index da6a2e666..587a08fec 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -25,11 +25,13 @@ var _ ReceiverParser = &GenericReceiver{} // GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly. type GenericReceiver struct { - logger logr.Logger - name string - config map[interface{}]interface{} - defaultPort int32 - parserName string + logger logr.Logger + name string + config map[interface{}]interface{} + defaultPort int32 + defaultProtocol corev1.Protocol + defaultAppProtocol *string + parserName string } // NOTE: Operator will sync with only receivers that aren't scrapers. Operator sync up receivers @@ -49,13 +51,17 @@ func NewGenericReceiverParser(logger logr.Logger, name string, config map[interf func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { port := singlePortFromConfigEndpoint(g.logger, g.name, g.config) if port != nil { + port.Protocol = g.defaultProtocol + port.AppProtocol = g.defaultAppProtocol return []corev1.ServicePort{*port}, nil } if g.defaultPort > 0 { return []corev1.ServicePort{{ - Port: g.defaultPort, - Name: portName(g.name, g.defaultPort), + Port: g.defaultPort, + Name: portName(g.name, g.defaultPort), + Protocol: g.defaultProtocol, + AppProtocol: g.defaultAppProtocol, }}, nil } diff --git a/pkg/collector/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go index 460c0b6ad..790782ab7 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -63,16 +63,19 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { name string defaultPort int32 transportProtocol corev1.Protocol + appProtocol string }{ { name: "grpc", defaultPort: defaultGRPCPort, transportProtocol: corev1.ProtocolTCP, + appProtocol: "grpc", }, { name: "thrift_http", defaultPort: defaultThriftHTTPPort, transportProtocol: corev1.ProtocolTCP, + appProtocol: "http", }, { name: "thrift_compact", @@ -109,6 +112,11 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { // set the appropriate transport protocol (i.e. TCP/UDP) for this kind of receiver protocol protocolPort.Protocol = protocol.transportProtocol + if protocol.appProtocol != "" { + c := protocol.appProtocol + protocolPort.AppProtocol = &c + } + // at this point, we *have* a port specified, add it to the list of ports ports = append(ports, *protocolPort) } diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index 45eab11ed..a637bf810 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -32,6 +32,11 @@ const ( defaultOTLPHTTPPort int32 = 4318 ) +var ( + grpc = "grpc" + http = "http" +) + // OTLPReceiverParser parses the configuration for OTLP receivers. type OTLPReceiverParser struct { logger logr.Logger @@ -64,27 +69,30 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { defaultPorts []corev1.ServicePort }{ { - name: "grpc", + name: grpc, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), - Port: defaultOTLPGRPCPort, - TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), + Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), + Port: defaultOTLPGRPCPort, + TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), + AppProtocol: &grpc, }, }, }, { - name: "http", + name: http, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), - Port: defaultOTLPHTTPPort, - TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), + Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), + Port: defaultOTLPHTTPPort, + TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), + AppProtocol: &http, }, { - Name: portName(fmt.Sprintf("%s-http-legacy", o.name), defaultOTLPHTTPLegacyPort), - Port: defaultOTLPHTTPLegacyPort, - TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), // we target the official port, not the legacy + Name: portName(fmt.Sprintf("%s-http-legacy", o.name), defaultOTLPHTTPLegacyPort), + Port: defaultOTLPHTTPLegacyPort, + TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), // we target the official port, not the legacy + AppProtocol: &http, }, }, }, @@ -106,6 +114,14 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { if protocolPort == nil { ports = append(ports, protocol.defaultPorts...) } else { + // infer protocol and appProtocol from protocol.name + if protocol.name == grpc { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &grpc + } else if protocol.name == http { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &http + } ports = append(ports, *protocolPort) } } diff --git a/pkg/collector/parser/receiver_zipkin.go b/pkg/collector/parser/receiver_zipkin.go index 0aa9eb7ed..d96d951e0 100644 --- a/pkg/collector/parser/receiver_zipkin.go +++ b/pkg/collector/parser/receiver_zipkin.go @@ -14,18 +14,24 @@ package parser -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" +) const parserNameZipkin = "__zipkin" // NewZipkinReceiverParser builds a new parser for Zipkin receivers. func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + http := "http" return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 9411, - parserName: parserNameZipkin, + logger: logger, + name: name, + config: config, + defaultPort: 9411, + defaultProtocol: corev1.ProtocolTCP, + defaultAppProtocol: &http, + parserName: parserNameZipkin, } } diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 4bfafee6f..d400560d6 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -115,10 +115,12 @@ func TestDesiredService(t *testing.T) { }) t.Run("should return service with port mentioned in Instance.Spec.Ports and inferred ports", func(t *testing.T) { + grpc := "grpc" jaegerPorts := v1.ServicePort{ - Name: "jaeger-grpc", - Protocol: "TCP", - Port: 14250, + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + AppProtocol: &grpc, } ports := append(params().Instance.Spec.Ports, jaegerPorts) expected := service("test-collector", ports) diff --git a/tests/e2e/smoke-simplest/00-assert.yaml b/tests/e2e/smoke-simplest/00-assert.yaml index 63f327e5e..d3dfd0565 100644 --- a/tests/e2e/smoke-simplest/00-assert.yaml +++ b/tests/e2e/smoke-simplest/00-assert.yaml @@ -4,3 +4,31 @@ metadata: name: simplest-collector status: readyReplicas: 1 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 From 78100beb19cb5caa9de8a8106b86b9bd0d310696 Mon Sep 17 00:00:00 2001 From: Ben B Date: Mon, 21 Feb 2022 15:25:38 +0100 Subject: [PATCH 0417/1234] Add status fields for instrumentation kind (#717) * expose exporter endpoint, sampler type and argument of instrumentation Signed-off-by: Benedikt Bongartz * regenerate otel-instrumentations Signed-off-by: Benedikt Bongartz --- apis/v1alpha1/instrumentation_types.go | 3 +++ bundle/manifests/opentelemetry.io_instrumentations.yaml | 9 +++++++++ config/crd/bases/opentelemetry.io_instrumentations.yaml | 9 +++++++++ 3 files changed, 21 insertions(+) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 1c066a229..95a0a13e8 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -137,6 +137,9 @@ type InstrumentationStatus struct { // +kubebuilder:resource:shortName=otelinst;otelinsts // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.exporter.endpoint" +// +kubebuilder:printcolumn:name="Sampler",type="string",JSONPath=".spec.sampler.type" +// +kubebuilder:printcolumn:name="Sampler Arg",type="string",JSONPath=".spec.sampler.argument" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" // +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1}} diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 666e5f0dd..d00551d3a 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -23,6 +23,15 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string name: v1alpha1 schema: openAPIV3Schema: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index d333be829..b31e5fedc 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -22,6 +22,15 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string name: v1alpha1 schema: openAPIV3Schema: From ba6185f6a53aba8a44598cdb47425c398db425ff Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 21 Feb 2022 15:28:25 +0100 Subject: [PATCH 0418/1234] Add pavolloffay to maintainers in readme (#730) Signed-off-by: Pavol Loffay --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ecdf1e7e1..3318fb2fc 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,7 @@ Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open - [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs +- [Pavol Loffay](https://github.com/pavolloffay), Red Hat - [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). From b6c8e41ec4afc7a650fe2361be7dc1d23b20625c Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 21 Feb 2022 15:31:54 +0100 Subject: [PATCH 0419/1234] Bump default java auto-instrumentation version to 1.11.1 (#731) Signed-off-by: Pavol Loffay --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index 2c446a69a..1c615309d 100644 --- a/versions.txt +++ b/versions.txt @@ -12,7 +12,7 @@ targetallocator=0.1.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.10.1 +autoinstrumentation-java=1.11.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From d4fe9bbcb442e6b96d9ba0329dce9d4299d53c84 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 22 Feb 2022 13:58:27 +0100 Subject: [PATCH 0420/1234] Use k8s events instead of status messages (#707) * Storing upgrade status on events Signed-off-by: Yuri Sa * Fixing Lint nits Signed-off-by: Yuri Sa * Fixing test checks and converting messages to events Signed-off-by: Yuri Sa * Fixing upgrade test Signed-off-by: Yuri Sa * Fixing var value of expected version Signed-off-by: Yuri Sa * Fixing var value of expected version Signed-off-by: Yuri Sa * Change upgrade script fo v0.19.0 Signed-off-by: Yuri Sa * Created const for RecordBufferSize and Removed commented lines Signed-off-by: Yuri Sa * Changed function signature and type name Signed-off-by: Yuri Sa * Changed variable exposure Signed-off-by: Yuri Sa --- main.go | 10 +++++-- pkg/collector/upgrade/upgrade.go | 42 +++++++++++++++++---------- pkg/collector/upgrade/upgrade_test.go | 27 ++++++++++++++--- pkg/collector/upgrade/v0_15_0.go | 10 +++++-- pkg/collector/upgrade/v0_15_0_test.go | 9 +++++- pkg/collector/upgrade/v0_19_0.go | 17 +++++++---- pkg/collector/upgrade/v0_19_0_test.go | 28 ++++++++++++++---- pkg/collector/upgrade/v0_24_0.go | 9 ++++-- pkg/collector/upgrade/v0_24_0_test.go | 10 +++++-- pkg/collector/upgrade/v0_2_10.go | 4 +-- pkg/collector/upgrade/v0_31_0.go | 9 ++++-- pkg/collector/upgrade/v0_31_0_test.go | 10 +++++-- pkg/collector/upgrade/v0_36_0.go | 13 ++++++--- pkg/collector/upgrade/v0_36_0_test.go | 13 +++++---- pkg/collector/upgrade/v0_38_0.go | 10 ++++--- pkg/collector/upgrade/v0_38_0_test.go | 20 ++++++------- pkg/collector/upgrade/v0_39_0.go | 13 ++++++--- pkg/collector/upgrade/v0_39_0_test.go | 18 ++++++------ pkg/collector/upgrade/v0_41_0.go | 12 ++++---- pkg/collector/upgrade/v0_41_0_test.go | 19 ++++++------ pkg/collector/upgrade/v0_43_0.go | 9 ++++-- pkg/collector/upgrade/v0_43_0_test.go | 14 +++++---- pkg/collector/upgrade/v0_9_0.go | 9 ++++-- pkg/collector/upgrade/v0_9_0_test.go | 10 +++++-- pkg/collector/upgrade/versions.go | 3 +- 25 files changed, 232 insertions(+), 116 deletions(-) diff --git a/main.go b/main.go index 6c0011916..8a511cb01 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + "k8s.io/client-go/tools/record" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/healthz" @@ -225,10 +226,15 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v if err != nil { return fmt.Errorf("failed to start the auto-detect mechanism: %w", err) } - // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { - return collectorupgrade.ManagedInstances(c, ctrl.Log.WithName("collector-upgrade"), v, mgr.GetClient()) + up := &collectorupgrade.VersionUpgrade{ + Log: ctrl.Log.WithName("collector-upgrade"), + Version: v, + Client: mgr.GetClient(), + Recorder: record.NewFakeRecorder(collectorupgrade.RecordBufferSize), + } + return up.ManagedInstances(c) })) if err != nil { return fmt.Errorf("failed to upgrade OpenTelemetryCollector instances: %w", err) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index efb00c023..f7c2da97b 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -22,15 +22,25 @@ import ( semver "github.com/Masterminds/semver/v3" "github.com/go-logr/logr" + "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) +type VersionUpgrade struct { + Log logr.Logger + Version version.Version + Client client.Client + Recorder record.EventRecorder +} + +const RecordBufferSize int = 10 + // ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary. -func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Version, cl client.Client) error { - logger.Info("looking for managed instances to upgrade") +func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { + u.Log.Info("looking for managed instances to upgrade") opts := []client.ListOption{ client.MatchingLabels(map[string]string{ @@ -38,18 +48,18 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi }), } list := &v1alpha1.OpenTelemetryCollectorList{} - if err := cl.List(ctx, list, opts...); err != nil { + if err := u.Client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %w", err) } for i := range list.Items { original := list.Items[i] - itemLogger := logger.WithValues("name", original.Name, "namespace", original.Namespace) + itemLogger := u.Log.WithValues("name", original.Name, "namespace", original.Namespace) if original.Spec.UpgradeStrategy == v1alpha1.UpgradeStrategyNone { itemLogger.Info("skipping instance upgrade due to UpgradeStrategy") continue } - upgraded, err := ManagedInstance(ctx, logger, ver, cl, original) + upgraded, err := u.ManagedInstance(ctx, original) if err != nil { // nothing to do at this level, just go to the next instance continue @@ -59,14 +69,14 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi // the resource update overrides the status, so, keep it so that we can reset it later st := upgraded.Status patch := client.MergeFrom(&original) - if err := cl.Patch(ctx, &upgraded, patch); err != nil { + if err := u.Client.Patch(ctx, &upgraded, patch); err != nil { itemLogger.Error(err, "failed to apply changes to instance") continue } // the status object requires its own update upgraded.Status = st - if err := cl.Status().Patch(ctx, &upgraded, patch); err != nil { + if err := u.Client.Status().Patch(ctx, &upgraded, patch); err != nil { itemLogger.Error(err, "failed to apply changes to instance's status object") continue } @@ -76,14 +86,14 @@ func ManagedInstances(ctx context.Context, logger logr.Logger, ver version.Versi } if len(list.Items) == 0 { - logger.Info("no instances to upgrade") + u.Log.Info("no instances to upgrade") } return nil } // ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version. -func ManagedInstance(ctx context.Context, logger logr.Logger, currentV version.Version, cl client.Client, otelcol v1alpha1.OpenTelemetryCollector) (v1alpha1.OpenTelemetryCollector, error) { +func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.OpenTelemetryCollector) (v1alpha1.OpenTelemetryCollector, error) { // this is likely a new instance, assume it's already up to date if otelcol.Status.Version == "" { return otelcol, nil @@ -91,33 +101,33 @@ func ManagedInstance(ctx context.Context, logger logr.Logger, currentV version.V instanceV, err := semver.NewVersion(otelcol.Status.Version) if err != nil { - logger.Error(err, "failed to parse version for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + u.Log.Error(err, "failed to parse version for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) return otelcol, err } if instanceV.GreaterThan(&Latest.Version) { - logger.Info("skipping upgrade for OpenTelemetry Collector instance, as it's newer than our latest version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) + u.Log.Info("skipping upgrade for OpenTelemetry Collector instance, as it's newer than our latest version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) return otelcol, nil } for _, available := range versions { if available.GreaterThan(instanceV) { - upgraded, err := available.upgrade(cl, &otelcol) + upgraded, err := available.upgrade(u, &otelcol) //available.upgrade(params., &otelcol) if err != nil { - logger.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) + u.Log.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) return otelcol, err } - logger.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", available.String()) + u.Log.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", available.String()) upgraded.Status.Version = available.String() otelcol = *upgraded } } // at the end of the process, we are up to date with the latest known version, which is what we have from versions.txt - otelcol.Status.Version = currentV.OpenTelemetryCollector + otelcol.Status.Version = u.Version.OpenTelemetryCollector - logger.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + u.Log.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) return otelcol, nil } diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 1da916d27..9b03382b0 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -60,9 +61,15 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { err = k8sClient.Get(context.Background(), nsn, persisted) require.NoError(t, err) require.Equal(t, beginV, persisted.Status.Version) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: currentV, + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } // test - err = upgrade.ManagedInstances(context.Background(), logger, currentV, k8sClient) + err = up.ManagedInstances(context.Background()) assert.NoError(t, err) // verify @@ -84,9 +91,14 @@ func TestUpgradeUpToLatestKnownVersion(t *testing.T) { currentV := version.Get() currentV.OpenTelemetryCollector = "0.10.0" // we don't have a 0.10.0 upgrade, but we have a 0.9.0 - + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: currentV, + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } // test - res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + res, err := up.ManagedInstance(context.Background(), existing) // verify assert.NoError(t, err) @@ -113,8 +125,15 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { currentV := version.Get() currentV.OpenTelemetryCollector = upgrade.Latest.String() + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: currentV, + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + // test - res, err := upgrade.ManagedInstance(context.Background(), logger, currentV, k8sClient, existing) + res, err := up.ManagedInstance(context.Background(), existing) if tt.failureExpected { assert.Error(t, err) } else { diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index ca738c813..c8532a190 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -15,13 +15,17 @@ package upgrade import ( - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_15_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_15_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { delete(otelcol.Spec.Args, "--new-metrics") delete(otelcol.Spec.Args, "--legacy-metrics") + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", "upgrade to v0.15.0 dropped the deprecated metrics arguments") + return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 0ca4abc94..d087076d9 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -54,7 +55,13 @@ func TestRemoveMetricsTypeFlags(t *testing.T) { require.Contains(t, existing.Spec.Args, "--legacy-metrics") // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index 6f53420ed..ff4f2cf7b 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_19_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_19_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } @@ -47,7 +48,9 @@ func upgrade0_19_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( // Remove deprecated queued_retry processor if strings.HasPrefix(k.(string), "queued_retry") { delete(processors, k) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 removed the processor %q", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 removed the processor %q", k)) continue } @@ -71,7 +74,9 @@ func upgrade0_19_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( processor["attributes"] = attributes delete(processor, "type") - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 migrated the property 'type' for processor %q", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 migrated the property 'type' for processor %q", k)) } // handle labels @@ -95,7 +100,9 @@ func upgrade0_19_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( processor["attributes"] = attributes delete(processor, "labels") - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.19.0 migrated the property 'labels' for processor %q", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 migrated the property 'labels' for processor %q", k)) } processors[k] = processor diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index 082a8084e..fd33aaf75 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -58,7 +59,13 @@ func TestRemoveQueuedRetryProcessor(t *testing.T) { require.Contains(t, existing.Spec.Config, "num_workers: 123") // checking one property is sufficient // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -66,7 +73,6 @@ func TestRemoveQueuedRetryProcessor(t *testing.T) { assert.Contains(t, res.Spec.Config, "otherprocessor:") assert.NotContains(t, res.Spec.Config, "queued_retry/second:") assert.NotContains(t, res.Spec.Config, "num_workers: 123") // checking one property is sufficient - assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 removed the processor") } func TestMigrateResourceType(t *testing.T) { @@ -90,7 +96,13 @@ func TestMigrateResourceType(t *testing.T) { existing.Status.Version = "0.18.0" // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -101,7 +113,6 @@ func TestMigrateResourceType(t *testing.T) { key: opencensus.type value: some-type `, res.Spec.Config) - assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 migrated the property 'type' for processor") } func TestMigrateLabels(t *testing.T) { @@ -127,7 +138,13 @@ func TestMigrateLabels(t *testing.T) { existing.Status.Version = "0.18.0" // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) actual, err := adapters.ConfigFromString(res.Spec.Config) @@ -139,5 +156,4 @@ func TestMigrateLabels(t *testing.T) { // verify assert.Len(t, actualAttrs, 2) assert.Nil(t, actualProcessor["labels"]) - assert.Contains(t, res.Status.Messages[0], "upgrade to v0.19.0 migrated the property 'labels' for processor") } diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 2cfba940a..cdfdee0a3 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_24_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_24_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } @@ -48,7 +49,9 @@ func upgrade0_24_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( if port, ok := extension["port"]; ok { delete(extension, "port") extension["endpoint"] = fmt.Sprintf("0.0.0.0:%d", port) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension %q", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension %q", k)) } case string: if len(extension) == 0 { diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 87e1c6ef9..0a4c4f6d1 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -52,7 +53,13 @@ func TestHealthCheckEndpointMigration(t *testing.T) { existing.Status.Version = "0.23.0" // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -64,5 +71,4 @@ func TestHealthCheckEndpointMigration(t *testing.T) { health_check/3: endpoint: 0.0.0.0:13133 `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension \"health_check/3\"", res.Status.Messages[0]) } diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index 651512bfc..f1a86a189 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -15,13 +15,11 @@ package upgrade import ( - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. -func upgrade0_2_10(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_2_10(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // this is a no-op, but serves to keep the skeleton here for the future versions return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 5ae98356d..58b7fb1f9 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_31_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_31_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } @@ -55,7 +56,9 @@ func upgrade0_31_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( for fieldKey := range influxdbConfig { if strings.HasPrefix(fieldKey.(string), "metrics_schema") { delete(influxdbConfig, fieldKey) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.31.0 dropped the 'metrics_schema' field from %q receiver", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.31.0 dropped the 'metrics_schema' field from %q receiver", k)) continue } } diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index 0d531c98f..b240abce3 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -60,7 +61,13 @@ service: existing.Status.Version = "0.30.0" // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -78,5 +85,4 @@ service: receivers: - influxdb `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.31.0 dropped the 'metrics_schema' field from \"influxdb\" receiver", res.Status.Messages[0]) } diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index abc90a1d5..2460154eb 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_36_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } @@ -74,7 +75,9 @@ func upgrade0_36_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( if k4.(string) == "tls_settings" { grpcHttpConfig["tls"] = v4 delete(grpcHttpConfig, "tls_settings") - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", k3, k1)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", k3, k1)) } } } @@ -111,7 +114,9 @@ func upgrade0_36_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( delete(otlpConfig, key) } otlpConfig["tls"] = tlsConfig - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", k1)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", k1)) } } } diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index b17f47141..7d4e31a64 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -16,12 +16,12 @@ package upgrade_test import ( "context" - "fmt" "testing" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -77,8 +77,14 @@ service: } existing.Status.Version = "0.35.0" + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -116,7 +122,4 @@ service: receivers: - otlp/mtls `, res.Spec.Config) - assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "grpc", "otlp/mtls")) - assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", "http", "otlp/mtls")) - assert.Contains(t, res.Status.Messages, fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", "otlp")) } diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 5c44c15f6..3dbc6875c 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -21,13 +21,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_38_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_38_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // return if args exist if len(otelcol.Spec.Args) == 0 { return otelcol, nil @@ -94,8 +95,9 @@ func upgrade0_38_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( sort.Slice(keys, func(i, j int) bool { return strings.Compare(keys[i].String(), keys[j].String()) <= 0 }) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", keys)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.38.0 dropped the deprecated logging arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", keys)) } return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index f85db1d20..0cf1670cf 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -69,7 +70,13 @@ service: // TESTCASE 1: verify logging args exist and no config logging parameters // EXPECTED: drop logging args and configure logging parameters into config from args - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -101,10 +108,6 @@ service: level: debug `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. [--log-format --log-level --log-profile] from otelcol custom resource otelcol.spec.args and "+ - "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) - // TESTCASE 2: verify logging args exist and also config logging parameters exist // EXPECTED: drop logging args and persist logging parameters as configured in config configWithLogging := `exporters: @@ -136,7 +139,8 @@ service: "--log-level": "debug", "--arg1": "", } - res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + + res, err = up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -145,8 +149,4 @@ service: "--hii": "hello", "--arg1": "", }, res.Spec.Args) - - assert.Equal(t, "upgrade to v0.38.0 dropped the deprecated logging arguments "+ - "i.e. [--log-format --log-level --log-profile] from otelcol custom resource otelcol.spec.args and "+ - "adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", res.Status.Messages[0]) } diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go index 11ec6e789..10bc0196a 100644 --- a/pkg/collector/upgrade/v0_39_0.go +++ b/pkg/collector/upgrade/v0_39_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_39_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_39_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to parse configuration: %w", err) @@ -42,7 +43,9 @@ func upgrade0_39_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( for k2 := range memoryLimiter { if k2 == "ballast_size_mib" { delete(memoryLimiter, k2) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", k1)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", k1)) } } } @@ -94,7 +97,9 @@ func upgrade0_39_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( for i, k4 := range receiversList { if strings.HasPrefix(k4.(string), "httpd") { receiversList[i] = strings.Replace(k4.(string), "httpd", "apache", 1) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.39.0 has renamed the %s to %s receiver", k4.(string), receiversList[i])) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", receiversList[i])) } } } diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go index fd529f339..f8dd436f4 100644 --- a/pkg/collector/upgrade/v0_39_0_test.go +++ b/pkg/collector/upgrade/v0_39_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -68,7 +69,13 @@ service: // TESTCASE 1: verify httpd receiver renamed to apache // drop processors.memory_limiter field 'ballast_size_mib' - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) assert.Equal(t, `processors: @@ -93,10 +100,6 @@ service: - apache `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.39.0 has dropped the ballast_size_mib field name from memory_limiter/with-settings processor", res.Status.Messages[0]) - assert.Equal(t, "upgrade to v0.39.0 has renamed the httpd/mtls to apache/mtls receiver", res.Status.Messages[1]) - assert.Equal(t, "upgrade to v0.39.0 has renamed the httpd to apache receiver", res.Status.Messages[2]) - // TESTCASE 2: Drop ballast_size_mib from memory_limiter processor existing1 := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ @@ -126,7 +129,7 @@ service: } existing1.Status.Version = "0.38.0" - res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing1) + res, err = up.ManagedInstance(context.Background(), existing1) assert.NoError(t, err) // verify @@ -151,7 +154,4 @@ service: - otlp/mtls - otlp `, res.Spec.Config) - - assert.Equal(t, "upgrade to v0.39.0 has dropped the ballast_size_mib field name from memory_limiter/with-settings processor", res.Status.Messages[0]) - } diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go index 88e62b962..aafc6d1e3 100644 --- a/pkg/collector/upgrade/v0_41_0.go +++ b/pkg/collector/upgrade/v0_41_0.go @@ -18,13 +18,13 @@ import ( "fmt" "strings" - "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_41_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_41_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { return otelcol, fmt.Errorf("couldn't upgrade to v0.41.0, failed to parse configuration: %w", err) @@ -48,8 +48,10 @@ func upgrade0_41_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( otlpCors, _ := otlpReceiver["cors"].(map[interface{}]interface{}) otlpCors[newsCorsKey] = v2 delete(otlpReceiver, k2) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.41.0 has re-structured the %s inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release", k2)) + + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.41.0 has re-structured the %s inside otlp "+"receiver config according to the upstream otlp receiver changes in 0.41.0 release.", k2)) } } } diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go index ab88e3eff..24e49371e 100644 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -59,7 +60,13 @@ service: existing.Status.Version = "0.40.0" // TESTCASE 1: restructure cors for both allowed_origin & allowed_headers - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) assert.Equal(t, `receivers: @@ -79,11 +86,6 @@ service: - otlp `, res.Spec.Config) - assert.Contains(t, res.Status.Messages, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release") - assert.Contains(t, res.Status.Messages, "upgrade to v0.41.0 has re-structured the cors_allowed_headers inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release") - // TESTCASE 2: re-structure cors for allowed_origins existing = v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -111,7 +113,7 @@ service: } existing.Status.Version = "0.40.0" - res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + res, err = up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) assert.Equal(t, `receivers: @@ -128,7 +130,4 @@ service: receivers: - otlp `, res.Spec.Config) - - assert.Equal(t, "upgrade to v0.41.0 has re-structured the cors_allowed_origins inside otlp "+ - "receiver config according to the upstream otlp receiver changes in 0.41.0 release", res.Status.Messages[0]) } diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go index 5548d6147..7a304d547 100644 --- a/pkg/collector/upgrade/v0_43_0.go +++ b/pkg/collector/upgrade/v0_43_0.go @@ -19,13 +19,14 @@ import ( "sort" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_43_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_43_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { // return if args exist if len(otelcol.Spec.Args) == 0 { return otelcol, nil @@ -85,7 +86,9 @@ func upgrade0_43_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) ( keys = append(keys, k) } sort.Strings(keys) - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", keys)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", keys)) } return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go index e259261de..8bb650c50 100644 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -67,7 +68,13 @@ service: existing.Status.Version = "0.42.0" // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -98,8 +105,6 @@ service: level: detailed `, res.Spec.Config) - assert.Equal(t, "upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. [--metrics-addr --metrics-level] from otelcol custom resource otelcol.spec.args and "+"adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", res.Status.Messages[0]) - configWithMetrics := `exporters: otlp: endpoint: example.com @@ -127,7 +132,7 @@ service: "--test-upgrade43": "true", "--test-arg1": "otel", } - res, err = upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + res, err = up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -137,5 +142,4 @@ service: "--test-arg1": "otel", }, res.Spec.Args) - assert.Equal(t, "upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. [--metrics-addr --metrics-level] from otelcol custom resource otelcol.spec.args and "+"adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", res.Status.Messages[0]) } diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 576a24079..5ba72f85d 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -19,13 +19,14 @@ import ( "strings" "gopkg.in/yaml.v2" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + + corev1 "k8s.io/api/core/v1" ) -func upgrade0_9_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_9_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } @@ -46,7 +47,9 @@ func upgrade0_9_0(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (* case map[interface{}]interface{}: // delete is a noop if there's no such entry delete(exporter, "reconnection_delay") - otelcol.Status.Messages = append(otelcol.Status.Messages, fmt.Sprintf("upgrade to v0.9.0 removed the property reconnection_delay for exporter %q", k)) + existing := &corev1.ConfigMap{} + updated := existing.DeepCopy() + u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.9.0 removed the property reconnection_delay for exporter %q", k)) exporters[k] = exporter case string: if len(exporter) == 0 { diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 7f50fded0..98b96b954 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" @@ -53,7 +54,13 @@ func TestRemoveConnectionDelay(t *testing.T) { require.Contains(t, existing.Spec.Config, "reconnection_delay") // test - res, err := upgrade.ManagedInstance(context.Background(), logger, version.Get(), nil, existing) + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: nil, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + res, err := up.ManagedInstance(context.Background(), existing) assert.NoError(t, err) // verify @@ -61,5 +68,4 @@ func TestRemoveConnectionDelay(t *testing.T) { assert.Contains(t, res.Spec.Config, `compression: "on"`) assert.NotContains(t, res.Spec.Config, "reconnection_delay") assert.Contains(t, res.Spec.Config, "num_workers: 123") - assert.Contains(t, res.Status.Messages[0], "upgrade to v0.9.0 removed the property reconnection_delay for exporter") } diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 641b75510..7aec8a0f5 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -16,12 +16,11 @@ package upgrade import ( "github.com/Masterminds/semver/v3" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -type upgradeFunc func(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) +type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) type otelcolVersion struct { semver.Version From 462c4a5c2d63b59ae5728e8ab1658bddbd438654 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 22 Feb 2022 15:19:23 +0100 Subject: [PATCH 0421/1234] Make sure correct version of operator-sdk is always used (#728) * Make sure the correct version of operator-sdk is always used This PR installs operator-sdk to ./bin which makes sure that always correct version of operator-sdk is used. Signed-off-by: Pavol Loffay * Create dir Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 4 ---- .github/workflows/release.yaml | 4 ---- .github/workflows/scorecard.yaml | 4 ---- Makefile | 17 +++++++---------- 4 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 4d0dc98fb..e5acb26f7 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -25,10 +25,6 @@ jobs: - name: "install kustomize" run: ./hack/install-kustomize.sh - - uses: jpkrohling/setup-operator-sdk@v1.1.0 - with: - operator-sdk-version: v1.17.0 - - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 129307286..f648bb236 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,10 +21,6 @@ jobs: - name: "install kustomize" run: ./hack/install-kustomize.sh - - uses: jpkrohling/setup-operator-sdk@v1.1.0 - with: - operator-sdk-version: v1.17.0 - - name: "generate release resources" run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index cefb8ac21..84ec97121 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -39,9 +39,5 @@ jobs: - name: "wait until cluster is ready" run: kubectl wait --timeout=5m --for=condition=available deployment/coredns -n kube-system - - uses: jpkrohling/setup-operator-sdk@v1.1.0 - with: - operator-sdk-version: v1.17.0 - - name: "run scorecard test" run: make scorecard-tests diff --git a/Makefile b/Makefile index b457120ce..91071f6f6 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,8 @@ endif KUBE_VERSION ?= 1.21 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml +OPERATOR_SDK_VERSION ?= 1.17.0 + CERTMANAGER_VERSION ?= 1.6.1 ifndef ignore-not-found @@ -152,7 +154,7 @@ prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind $(KUSTOMIZE) build config/crd -o tests/_build/crds/ .PHONY: scorecard-tests -scorecard-tests: +scorecard-tests: operator-sdk $(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1) .PHONY: set-test-image-vars @@ -263,20 +265,15 @@ else KIND=$(shell which kind) endif +OPERATOR_SDK = $(shell pwd)/bin/operator-sdk .PHONY: operator-sdk operator-sdk: -ifeq (, $(shell which operator-sdk)) @{ \ set -e ;\ - echo "" ;\ - echo "ERROR: operator-sdk not found." ;\ - echo "Please check https://sdk.operatorframework.io for installation instructions and try again." ;\ - echo "" ;\ - exit 1 ;\ + [ -d bin ] || mkdir bin ;\ + curl -L -o $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk_`go env GOOS`_`go env GOARCH`;\ + chmod +x $(OPERATOR_SDK) ;\ } -else -OPERATOR_SDK=$(shell which operator-sdk) -endif # Generate bundle manifests and metadata, then validate generated files. .PHONY: bundle From 3776cac890ea0170d335dcd57471aff7c2075c7a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 22 Feb 2022 15:19:34 +0100 Subject: [PATCH 0422/1234] Deprecate otelcol status messages (#733) Signed-off-by: Pavol Loffay --- apis/v1alpha1/opentelemetrycollector_types.go | 1 + .../manifests/opentelemetry.io_opentelemetrycollectors.yaml | 4 ++-- .../crd/bases/opentelemetry.io_opentelemetrycollectors.yaml | 4 ++-- docs/api.md | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 170e2463c..1b47654e8 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -138,6 +138,7 @@ type OpenTelemetryCollectorStatus struct { // Messages about actions performed by the operator on this resource. // +optional // +listType=atomic + // Deprecated: use Kubernetes events instead. Messages []string `json:"messages,omitempty"` } diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index b596279c0..755c8f754 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2555,8 +2555,8 @@ spec: OpenTelemetryCollector. properties: messages: - description: Messages about actions performed by the operator on this - resource. + description: 'Messages about actions performed by the operator on + this resource. Deprecated: use Kubernetes events instead.' items: type: string type: array diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index f452ad38d..7cb8fdc8a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2553,8 +2553,8 @@ spec: OpenTelemetryCollector. properties: messages: - description: Messages about actions performed by the operator on this - resource. + description: 'Messages about actions performed by the operator on + this resource. Deprecated: use Kubernetes events instead.' items: type: string type: array diff --git a/docs/api.md b/docs/api.md index 68fe3f3e7..493daab7f 100644 --- a/docs/api.md +++ b/docs/api.md @@ -6099,7 +6099,7 @@ OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollecto From e7f2fdc8433512f1708df4a20f9deda612cc8de9 Mon Sep 17 00:00:00 2001 From: Eric Hsueh <39718333+erichsueh3@users.noreply.github.com> Date: Wed, 23 Feb 2022 05:13:53 -0800 Subject: [PATCH 0423/1234] OTEL Operator release 0.44.0 (#719) * OTEL Operator release 0.44.0 * removed changes to kustomization.yaml * removed sdk version changes * Added to CHANGELOG * update changelog * revert LABEL in bundle.Dockerfile --- CHANGELOG.md | 12 ++++++++++++ README.md | 1 + RELEASE.md | 1 + ...opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11a912080..c1bb798d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ Changes by Version ================== +0.44.0 +------------------- +* Bumped OpenTelemetry Collector to v0.44.0 +* Deprecate otelcol status messages ([#733](https://github.com/open-telemetry/opentelemetry-operator/pull/733), [@pavolloffay](https://github.com/pavolloffay)) +* Make sure correct version of operator-sdk is always used ([#728](https://github.com/open-telemetry/opentelemetry-operator/pull/728), [@pavolloffay](https://github.com/pavolloffay)) +* Storing upgrade status into events ([#707](https://github.com/open-telemetry/opentelemetry-operator/pull/707), [@yuriolisa](https://github.com/yuriolisa)) +* Bump default java auto-instrumentation version to `1.11.1` ([#731](https://github.com/open-telemetry/opentelemetry-operator/pull/731), [@pavolloffay](https://github.com/pavolloffay)) +* Add status fields for instrumentation kind ([#717](https://github.com/open-telemetry/opentelemetry-operator/pull/717), [@frzifus](https://github.com/frzifus)) +* Add appProtocol for otlp and jaeger receiver parsers ([#704](https://github.com/open-telemetry/opentelemetry-operator/pull/704), [@binjip978](https://github.com/binjip978)) +* Add SPLUNK_ env prefix support to Instrumentation kind ([#709](https://github.com/open-telemetry/opentelemetry-operator/pull/709), [@elvis-cai](https://github.com/elvis-cai)) +* Fix logger in instrumentation webhook ([#698](https://github.com/open-telemetry/opentelemetry-operator/pull/698), [@pavolloffay](https://github.com/pavolloffay)) + 0.43.0 ------------------- * Bumped OpenTelemetry Collector to v0.43.0 diff --git a/README.md b/README.md index 3318fb2fc..7959184d3 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.44.0 | v1.21 to v1.23 | 1.6.1 | | v0.43.0 | v1.21 to v1.23 | 1.6.1 | | v0.42.0 | v1.21 to v1.23 | 1.6.1 | | v0.41.1 | v1.21 to v1.23 | 1.6.1 | diff --git a/RELEASE.md b/RELEASE.md index 6ed6fd670..5c9a45590 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -19,6 +19,7 @@ Run this generator: ```bash docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator --branch main ``` +* Note that you must generate a Personal Access Token (PAT) and set `GH_WRITE_TOKEN` as that. Remove the commits that are not relevant to users, like: * CI or testing-specific commits (e2e, unit test, ...) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 989d82cd8..9374539eb 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.43.0 + name: opentelemetry-operator.v0.44.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -285,7 +285,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.43.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.44.0 livenessProbe: httpGet: path: /healthz @@ -377,7 +377,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.43.0 + version: 0.44.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 1c615309d..c7073d321 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.43.0 +opentelemetry-collector=0.44.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.43.0 +operator=0.44.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 9a49863c7371176c809b357070804101c81ac3bf Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 23 Feb 2022 14:49:08 +0100 Subject: [PATCH 0424/1234] Use OTEL collector image from GHCR (#732) Signed-off-by: Pavol Loffay --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 8a511cb01..ce5dae521 100644 --- a/main.go +++ b/main.go @@ -85,7 +85,7 @@ func main() { pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") - pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("otel/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") From 373fe173b4280daa6316dbf2d3227627504c8b5d Mon Sep 17 00:00:00 2001 From: Krishna Raman Date: Wed, 23 Feb 2022 09:02:10 -0800 Subject: [PATCH 0425/1234] Change container image USER to UID (#738) * Change container image USER to UID Kubernetes requires USER to be UID in order to verify running as non root. ref https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/security_context_others.go#L49 * Use 65532 as nonroot UID --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ddfa75f24..d44964bc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,6 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X $ FROM gcr.io/distroless/static:nonroot WORKDIR / COPY --from=builder /workspace/manager . -USER nonroot:nonroot +USER 65532:65532 ENTRYPOINT ["/manager"] From 5962b3763e86c5edffdc399b51b925cc77869e72 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 23 Feb 2022 20:19:11 +0100 Subject: [PATCH 0426/1234] Fail CI if bundle.Dockerfile is not the same as generated one (#735) Signed-off-by: Pavol Loffay --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 91071f6f6..1e0baaf09 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ ensure-generate-is-noop: set-image-controller generate bundle @git restore config/manager/kustomization.yaml @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && git diff && exit 1) + @git diff -s --exit-code bundle.Dockerfile || (echo "Build failed: the bundle.Dockerfile file has been changed. The file should be the same as generated one. Run 'make bundle' and update your PR." && git diff && exit 1) @git diff -s --exit-code docs/api.md || (echo "Build failed: the api.md file has been changed but the generated api.md file isn't up to date. Run 'make api-docs' and update your PR." && git diff && exit 1) .PHONY: all From fc1eac8177023f04b59bb568db679f5ad5760bb0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 24 Feb 2022 11:14:35 +0100 Subject: [PATCH 0427/1234] Use default github token to publish the release (#737) Signed-off-by: Pavol Loffay --- .ci/create-release-github.sh | 1 - .github/workflows/release.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.ci/create-release-github.sh b/.ci/create-release-github.sh index 8af5424ff..8557ed7e7 100755 --- a/.ci/create-release-github.sh +++ b/.ci/create-release-github.sh @@ -1,7 +1,6 @@ #!/bin/bash OPERATOR_VERSION=$(git describe --tags) -echo "${GH_WRITE_TOKEN}" | gh auth login --with-token gh config set prompt disabled gh release create \ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f648bb236..e44f7df34 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: - name: "create the release in GitHub" env: - GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./.ci/create-release-github.sh - name: "refresh go proxy module info on release" From 2777905dee47f546fcc055cd3f36ed05c9f39fd7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 24 Feb 2022 11:14:51 +0100 Subject: [PATCH 0428/1234] Use better names for GHA jobs (#736) * Use better names for GHA jobs Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 4 ++-- .github/workflows/release.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 16b0b84eb..1851293bb 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -1,4 +1,4 @@ -name: "Publish images" +name: "Publish operator" on: push: @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - publish-containers: + publish: name: Publish container images runs-on: ubuntu-20.04 steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e44f7df34..62cf8a65c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,7 @@ on: - 'v*' jobs: - unit-tests: + release: runs-on: ubuntu-20.04 steps: - name: Set up Go From 4dfffb807a1b5b4d3ef36cfdb1806fea8747c474 Mon Sep 17 00:00:00 2001 From: gaius <61444500+gai6948@users.noreply.github.com> Date: Fri, 25 Feb 2022 17:29:37 +0800 Subject: [PATCH 0429/1234] Match pod dnsPolicy to hostNetwork config (#691) * feat: match pod dnspolicy to hostNetwork * feat: add dnspolicy support to deployment and sts * added tests for hostNetwork DNSpolicy * use hostnetwork spec in deployment and statefulset --- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 2 ++ pkg/collector/deployment.go | 2 ++ pkg/collector/deployment_test.go | 32 +++++++++++++++++++++++++++++++ pkg/collector/statefulset.go | 2 ++ pkg/collector/statefulset_test.go | 32 +++++++++++++++++++++++++++++++ pkg/collector/utils.go | 29 ++++++++++++++++++++++++++++ 7 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 pkg/collector/utils.go diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index ef48b0593..4da5b0409 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -32,7 +32,6 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) - return appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Collector(otelcol), @@ -55,6 +54,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, HostNetwork: otelcol.Spec.HostNetwork, + DNSPolicy: getDnsPolicy(otelcol), SecurityContext: otelcol.Spec.PodSecurityContext, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 81a66cc5f..71fec012a 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -67,6 +67,7 @@ func TestDaemonsetHostNetwork(t *testing.T) { Spec: v1alpha1.OpenTelemetryCollectorSpec{}, }) assert.False(t, d1.Spec.Template.Spec.HostNetwork) + assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // verify custom d2 := DaemonSet(config.New(), logger, v1alpha1.OpenTelemetryCollector{ @@ -75,6 +76,7 @@ func TestDaemonsetHostNetwork(t *testing.T) { }, }) assert.True(t, d2.Spec.Template.Spec.HostNetwork) + assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } func TestDaemonsetPodAnnotations(t *testing.T) { diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 35533c628..8a4abd212 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -54,6 +54,8 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), + DNSPolicy: getDnsPolicy(otelcol), + HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, SecurityContext: otelcol.Spec.PodSecurityContext, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index e88a42742..7ed3d959b 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -119,3 +119,35 @@ func TestDeploymenttPodSecurityContext(t *testing.T) { assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) } + +func TestDeploymentHostNetwork(t *testing.T) { + // Test default + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := Deployment(cfg, logger, otelcol_1) + + assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) + assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) + + // Test hostNetwork=true + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-hostnetwork", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol_2) + assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) + assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index f100054cf..6427633c0 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -54,6 +54,8 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), + DNSPolicy: getDnsPolicy(otelcol), + HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, SecurityContext: otelcol.Spec.PodSecurityContext, }, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index d19c50603..f4f5141b0 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -178,3 +178,35 @@ func TestStatefulSetPodSecurityContext(t *testing.T) { assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) } + +func TestStatefulSetHostNetwork(t *testing.T) { + // Test default + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := StatefulSet(cfg, logger, otelcol_1) + + assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) + assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) + + // Test hostNetwork=true + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-hostnetwork", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + }, + } + + cfg = config.New() + + d2 := StatefulSet(cfg, logger, otelcol_2) + assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) + assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) +} diff --git a/pkg/collector/utils.go b/pkg/collector/utils.go new file mode 100644 index 000000000..813910bc4 --- /dev/null +++ b/pkg/collector/utils.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func getDnsPolicy(otelcol v1alpha1.OpenTelemetryCollector) corev1.DNSPolicy { + dnsPolicy := corev1.DNSClusterFirst + if otelcol.Spec.HostNetwork { + dnsPolicy = corev1.DNSClusterFirstWithHostNet + } + return dnsPolicy +} From 6fd447ef022f5b36e00a4f43bd1b83562de97333 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 25 Feb 2022 10:42:16 +0100 Subject: [PATCH 0430/1234] Bump scorecard version to 1.17.0 to align with operator-sdk version (#741) * Bump scorecard version to 1.17.0 to align with operator-sdk version Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- bundle/tests/scorecard/config.yaml | 8 ++++---- config/scorecard/patches/basic.config.yaml | 2 +- config/scorecard/patches/olm.config.yaml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index a7b368967..85f9ab2ae 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-crds-have-resources-test diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml index ebd7145ca..0943c47ea 100644 --- a/config/scorecard/patches/basic.config.yaml +++ b/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: basic test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index 46d59c619..db151df81 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.13.1 + image: quay.io/operator-framework/scorecard-test:v1.17.0 labels: suite: olm test: olm-crds-have-resources-test From c2568730e1203fd7f49a01d5c9297e97ac35dc58 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 25 Feb 2022 10:49:54 +0100 Subject: [PATCH 0431/1234] Adding release v0.45.0 (#739) * Adding release v0.45.0 Signed-off-by: Yuri Sa * Include new merged PR into Changelog Signed-off-by: Yuri Sa --- CHANGELOG.md | 7 +++++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1bb798d6..ca6ae636c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ Changes by Version ================== +0.45.0 +------------------- +* Bumped OpenTelemetry Collector to v0.45.0 +* Match pod `dnsPolicy` to `hostNetwork` config ([#691](https://github.com/open-telemetry/opentelemetry-operator/pull/691), [@gai6948](https://github.com/gai6948)) +* Change container image USER to UID ([#738](https://github.com/open-telemetry/opentelemetry-operator/pull/738), [@kraman](https://github.com/kraman)) +* Use OTEL collector image from GHCR ([#732](https://github.com/open-telemetry/opentelemetry-operator/pull/732), [@pavolloffay](https://github.com/pavolloffay)) + 0.44.0 ------------------- * Bumped OpenTelemetry Collector to v0.44.0 diff --git a/README.md b/README.md index 7959184d3..44092fb98 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.45.0 | v1.21 to v1.23 | 1.6.1 | | v0.44.0 | v1.21 to v1.23 | 1.6.1 | | v0.43.0 | v1.21 to v1.23 | 1.6.1 | | v0.42.0 | v1.21 to v1.23 | 1.6.1 | @@ -259,7 +260,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.30.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | | v0.29.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | | v0.28.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | -| v0.27.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 9374539eb..4861b66da 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.44.0 + name: opentelemetry-operator.v0.45.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -285,7 +285,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.44.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.45.0 livenessProbe: httpGet: path: /healthz @@ -377,7 +377,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.44.0 + version: 0.45.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index c7073d321..6cb178656 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.44.0 +opentelemetry-collector=0.45.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.44.0 +operator=0.45.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From b53a7cdfdb91c0a55ce6b70753bf59ec55a20ff6 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 28 Feb 2022 15:11:23 +0100 Subject: [PATCH 0432/1234] Fix docker meta action (#745) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 1851293bb..1b752db3a 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -36,10 +36,9 @@ jobs: uses: docker/metadata-action@v3.6.2 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - tag-semver: | - {{raw}} - {{version}} - {{major}}.{{minor}} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Set up QEMU uses: docker/setup-qemu-action@v1.2.0 From 1a1c767a754967b2892b4850234573de01a369d7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 28 Feb 2022 15:13:48 +0100 Subject: [PATCH 0433/1234] Bump golangci GHA to v3 (#743) * Bump golangci GHA to v3 Signed-off-by: Pavol Loffay * Bump golangci version as well Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index e5acb26f7..a9a3f32b3 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -32,14 +32,18 @@ jobs: name: Code standards (linting) runs-on: ubuntu-20.04 steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2.4.0 - name: Lint - uses: golangci/golangci-lint-action@v2.5.2 + uses: golangci/golangci-lint-action@v3 with: args: -v - version: v1.29 + version: v1.44 security: name: Security From 830b5d0703df3249fce583e8052fc00e6eeae69e Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 28 Feb 2022 15:16:01 +0100 Subject: [PATCH 0434/1234] Make operator more resiliant to etcd defrag activity (#742) * Make operator more resiliant to etcd defrag activity Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index ce5dae521..bafbeb76b 100644 --- a/main.go +++ b/main.go @@ -21,6 +21,7 @@ import ( "os" "runtime" "strings" + "time" "github.com/spf13/pflag" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -135,6 +136,10 @@ func main() { setupLog.Info("the env var WATCH_NAMESPACE isn't set, watching all namespaces") } + // see https://github.com/openshift/library-go/blob/4362aa519714a4b62b00ab8318197ba2bba51cb7/pkg/config/leaderelection/leaderelection.go#L104 + leaseDuration := time.Second * 137 + renewDeadline := time.Second * 107 + retryPeriod := time.Second * 26 mgrOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, @@ -143,6 +148,9 @@ func main() { LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", Namespace: watchNamespace, + LeaseDuration: &leaseDuration, + RenewDeadline: &renewDeadline, + RetryPeriod: &retryPeriod, } if strings.Contains(watchNamespace, ",") { From 8b66d97c8a2a875897ca0c017c846c1418fcbc25 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Mon, 28 Feb 2022 13:19:54 -0500 Subject: [PATCH 0435/1234] Remove tigrannajaryan as a maintainer (#748) * Remove tigrannajaryan as a maintainer I am no longer able to allocate time to be a maintainer of the operator due to focusing on other parts of OpenTelemetry. I am moving myself to the Emeritus section according to the rules introduced in https://github.com/open-telemetry/community/pull/961 I have also listed approvers and maintainers directly in the README, like we do in the Collector repos. I will also remove Collector github teams' permissions from this repo since we have github teams for operator to avoid confusion as to who has what permissions. * Update README.md Co-authored-by: Bogdan Drutu --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44092fb98..9b6260f82 100644 --- a/README.md +++ b/README.md @@ -267,15 +267,24 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): -- [@open-telemetry/collector-approvers](https://github.com/orgs/open-telemetry/teams/collector-approvers) +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk +- [Jay Camp](https://github.com/jrcamp), Splunk +- [James Bebbington](https://github.com/james-bebbington), Google +- [Owais Lone](https://github.com/owais), Splunk +- [Pablo Baeyens](https://github.com/mx-psi), DataDog Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): -- [@open-telemetry/collector-maintainers](https://github.com/orgs/open-telemetry/teams/collector-maintainers) +- [Alex Boten](https://github.com/codeboten), Lightstep +- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - [Pavol Loffay](https://github.com/pavolloffay), Red Hat - [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale +Emeritus Maintainers +- [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk + Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). Thanks to all the people who already contributed! From e769cc58a18aab90fc15f95f4c5f2e1b5f3675f6 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Mon, 28 Feb 2022 11:56:01 -0800 Subject: [PATCH 0436/1234] Remove @open-telemetry/collector-approvers from CODEOWNERS (#749) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 398c814bd..0216d8d08 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,4 +12,4 @@ # https://help.github.com/en/articles/about-code-owners # -* @open-telemetry/collector-approvers @open-telemetry/operator-approvers +* @open-telemetry/operator-approvers From 68f57ad625deb93e164acbf7ec111e0d84edb734 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 1 Mar 2022 09:39:13 -0800 Subject: [PATCH 0437/1234] Move all approvers to emeritus, remove inheritance from collector-approver (#750) * Move all approvers to emeritus, remove in /cc @Aneurysm9 @dmitryax @jrcamp @james-bebbington @owais @mx-psi if you want to be kept as an "active approver" say something in this PR. A separate PR will be done for maintainers. * Add dmitryax@ as approver --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b6260f82..ff5423f23 100644 --- a/README.md +++ b/README.md @@ -267,8 +267,11 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): -- [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Dmitrii Anoshin](https://github.com/dmitryax), Splunk + +Emeritus Approvers: + +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Jay Camp](https://github.com/jrcamp), Splunk - [James Bebbington](https://github.com/james-bebbington), Google - [Owais Lone](https://github.com/owais), Splunk From 50cf4376e7166a5424a65f6ea66703f696203d70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 18:40:38 +0100 Subject: [PATCH 0438/1234] Bump docker/login-action from 1.13.0 to 1.14.0 (#753) Bumps [docker/login-action](https://github.com/docker/login-action) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 9079cfdc3..9800420f3 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.13.0 + uses: docker/login-action@v1.14.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 92824c7fc..0a4060fc2 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.13.0 + uses: docker/login-action@v1.14.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index f370e708c..af779ce8d 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.13.0 + uses: docker/login-action@v1.14.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 1b752db3a..7d3d4f7ac 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -55,7 +55,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.13.0 + uses: docker/login-action@v1.14.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 5133df5a2..fe5f208a4 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.13.0 + uses: docker/login-action@v1.14.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From 1e8e9129e666bc1fd6b2026d06cd1bfbf3a42d8a Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 1 Mar 2022 09:41:59 -0800 Subject: [PATCH 0439/1234] Move collector-maintainers with no involvement in the operator to emeritus (#751) /cc @codeboten @bogdandrutu --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff5423f23..ef72b4c17 100644 --- a/README.md +++ b/README.md @@ -279,13 +279,14 @@ Emeritus Approvers: Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): -- [Alex Boten](https://github.com/codeboten), Lightstep -- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - [Pavol Loffay](https://github.com/pavolloffay), Red Hat - [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale Emeritus Maintainers + +- [Alex Boten](https://github.com/codeboten), Lightstep +- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk - [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). From 803ad9eb7618ca5f1aed5bc3286c0c5d47c22066 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 09:38:42 +0100 Subject: [PATCH 0440/1234] Bump docker/login-action from 1.14.0 to 1.14.1 (#755) Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.0 to 1.14.1. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1.14.0...v1.14.1) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 9800420f3..1c78fd98f 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.0 + uses: docker/login-action@v1.14.1 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 0a4060fc2..4ff7b30da 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.0 + uses: docker/login-action@v1.14.1 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index af779ce8d..c9a8593b1 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.0 + uses: docker/login-action@v1.14.1 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 7d3d4f7ac..c74c67014 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -55,7 +55,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.0 + uses: docker/login-action@v1.14.1 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index fe5f208a4..ece73e2e9 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.0 + uses: docker/login-action@v1.14.1 with: registry: ghcr.io username: ${{ github.repository_owner }} From f6d17e73ba371fb55eb329f0e5447d2614f10c45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 09:39:48 +0100 Subject: [PATCH 0441/1234] Bump actions/checkout from 2.4.0 to 3 (#754) Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index a9a3f32b3..502b1aced 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -17,7 +17,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh @@ -37,7 +37,7 @@ jobs: with: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Lint uses: golangci/golangci-lint-action@v3 @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: Initialize CodeQL uses: github/codeql-action/init@v1 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index afd8ecbad..500ac0f25 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -25,7 +25,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 1c78fd98f..56bf1cdcc 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v3 - name: Read version run: echo "VERSION=$(cat autoinstrumentation/java/version.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 4ff7b30da..1aa4d737f 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v3 - name: Read version run: echo VERSION=$(cat autoinstrumentation/nodejs/package.json | jq -r '.dependencies."@opentelemetry/sdk-node"') >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index c9a8593b1..19ed6853c 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.3.5 + - uses: actions/checkout@v3 - name: Read version run: echo VERSION=$(head -n 1 autoinstrumentation/python/requirements.txt | cut -d '=' -f3) >> $GITHUB_ENV diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index c74c67014..741af403f 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -13,7 +13,7 @@ jobs: name: Publish container images runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index ece73e2e9..c90c9dee8 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - name: Read version run: echo "VERSION=$(cat cmd/otel-allocator/version.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 62cf8a65c..a965970e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,7 +13,7 @@ jobs: with: go-version: 1.17 - - uses: actions/checkout@v2.4.0 + - uses: actions/checkout@v3 - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 84ec97121..e83b00f7a 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -26,7 +26,7 @@ jobs: go-version: 1.17 - name: Check out code into the Go module directory - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 - name: "install kuttl and kind" run: ./hack/install-kuttl.sh From 1110d01d25b1ccc567f3113c8cf4b066e6ec5ca1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 4 Mar 2022 09:42:29 +0100 Subject: [PATCH 0442/1234] Fix publishing main docker tag for operator image (#758) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 741af403f..a824f50a2 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -39,6 +39,7 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=ref,event=branch - name: Set up QEMU uses: docker/setup-qemu-action@v1.2.0 From f7cf69452796835cce5c1101953d291f2bb0e410 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Mon, 7 Mar 2022 13:50:03 +0100 Subject: [PATCH 0443/1234] chore(nodejs): bump auto-instrumentations (#763) --- autoinstrumentation/nodejs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 1d134eecb..dd5c9ddf9 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@opentelemetry/api": "1.0.4", - "@opentelemetry/auto-instrumentations-node": "0.27.2", + "@opentelemetry/auto-instrumentations-node": "0.27.4", "@opentelemetry/exporter-trace-otlp-grpc": "0.27.0", "@opentelemetry/sdk-node": "0.27.0" } From cd4fa9bb0c314e6197aa6ef2d5a849f91bee58a1 Mon Sep 17 00:00:00 2001 From: binjip978 Date: Tue, 8 Mar 2022 10:30:17 +0200 Subject: [PATCH 0444/1234] Add autoscale option to enable support for Horizontal Pod Autoscaling (#746) * add autoscale, minReplicas maxReplicas to collector types Signed-off-by: Sergei Semenchuk * manage hpa with min/max replicas if autoscale is enablad Signed-off-by: Sergei Semenchuk * fix linter Signed-off-by: Sergei Semenchuk * use status if autoscale is true Signed-off-by: Sergei Semenchuk * add validation for autoscale Signed-off-by: Sergei Semenchuk * remove minReplicas Signed-off-by: Sergei Semenchuk * remove autoscale parameter, trigger HPA if maxReplicas is not nil Signed-off-by: Sergei Semenchuk * use collector replicas for minReplicas in HPA if HPA status is currently lower Signed-off-by: Sergei Semenchuk * remove nil check Signed-off-by: Sergei Semenchuk --- apis/v1alpha1/opentelemetrycollector_types.go | 4 + .../opentelemetrycollector_webhook.go | 11 ++ apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...emetry-operator.clusterserviceversion.yaml | 12 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 5 + config/rbac/role.yaml | 12 ++ .../opentelemetrycollector_controller.go | 7 + docs/api.md | 9 ++ pkg/collector/horizontalpodautoscaler.go | 54 +++++++ pkg/collector/horizontalpodautoscaler_test.go | 52 +++++++ pkg/collector/reconcile/deployment.go | 11 ++ .../reconcile/horizontalpodautoscaler.go | 140 ++++++++++++++++++ .../reconcile/horizontalpodautoscaler_test.go | 122 +++++++++++++++ 14 files changed, 449 insertions(+) create mode 100644 pkg/collector/horizontalpodautoscaler.go create mode 100644 pkg/collector/horizontalpodautoscaler_test.go create mode 100644 pkg/collector/reconcile/horizontalpodautoscaler.go create mode 100644 pkg/collector/reconcile/horizontalpodautoscaler_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 1b47654e8..6f62b62b7 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -37,6 +37,10 @@ type OpenTelemetryCollectorSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` + // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. + // +optional + MaxReplicas *int32 `json:"maxReplicas,omitempty"` + // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) // +optional ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index a531b059d..56cbec4ed 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -109,5 +109,16 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } } + // validate autoscale with horizontal pod autoscaler + if r.Spec.MaxReplicas != nil { + if *r.Spec.MaxReplicas < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and more than one") + } + + if r.Spec.Replicas != nil && *r.Spec.Replicas > *r.Spec.MaxReplicas { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, replicas must not be greater than maxReplicas") + } + } + return nil } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 5ea87e547..e2d107070 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -264,6 +264,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.MaxReplicas != nil { + in, out := &in.MaxReplicas, &out.MaxReplicas + *out = new(int32) + **out = **in + } out.TargetAllocator = in.TargetAllocator if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 4861b66da..b6389b545 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -188,6 +188,18 @@ spec: - patch - update - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - coordination.k8s.io resources: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 755c8f754..90c620396 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -218,6 +218,11 @@ spec: description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) type: string + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 7cb8fdc8a..733ac90a8 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -216,6 +216,11 @@ spec: description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) type: string + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index a3f7f86e7..a321ff789 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -99,6 +99,18 @@ rules: - patch - update - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - coordination.k8s.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 5beb60f8f..5c5f799c5 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -21,6 +21,7 @@ import ( "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -84,6 +85,11 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { reconcile.Deployments, true, }, + { + "horizontal pod autoscalers", + reconcile.HorizontalPodAutoscalers, + true, + }, { "daemon sets", reconcile.DaemonSets, @@ -173,6 +179,7 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er Owns(&corev1.ServiceAccount{}). Owns(&corev1.Service{}). Owns(&appsv1.Deployment{}). + Owns(&autoscalingv1.HorizontalPodAutoscaler{}). Owns(&appsv1.DaemonSet{}). Owns(&appsv1.StatefulSet{}). Complete(r) diff --git a/docs/api.md b/docs/api.md index 493daab7f..7bcf03860 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1446,6 +1446,15 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
+ + + + + diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go new file mode 100644 index 000000000..e559d7da2 --- /dev/null +++ b/pkg/collector/horizontalpodautoscaler.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "github.com/go-logr/logr" + autoscalingv1 "k8s.io/api/autoscaling/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +const defaultCPUTarget int32 = 90 + +func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) autoscalingv1.HorizontalPodAutoscaler { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + + annotations := Annotations(otelcol) + cpuTarget := defaultCPUTarget + + return autoscalingv1.HorizontalPodAutoscaler{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Collector(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: annotations, + }, + Spec: autoscalingv1.HorizontalPodAutoscalerSpec{ + ScaleTargetRef: autoscalingv1.CrossVersionObjectReference{ + APIVersion: "apps/v1", + Kind: "Deployment", + Name: naming.Collector(otelcol), + }, + MinReplicas: otelcol.Spec.Replicas, + MaxReplicas: *otelcol.Spec.MaxReplicas, + TargetCPUUtilizationPercentage: &cpuTarget, + }, + } +} diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go new file mode 100644 index 000000000..b16881654 --- /dev/null +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -0,0 +1,52 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestHPA(t *testing.T) { + // prepare + var minReplicas int32 = 3 + var maxReplicas int32 = 5 + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &minReplicas, + MaxReplicas: &maxReplicas, + }, + } + + cfg := config.New() + hpa := HorizontalPodAutoscaler(cfg, logger, otelcol) + + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + assert.Equal(t, int32(90), *hpa.Spec.TargetCPUUtilizationPercentage) +} diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 817639094..86bc1ecc2 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -98,6 +98,17 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } + // if autoscale is enabled, use replicas from current Status + if params.Instance.Spec.MaxReplicas != nil { + currentReplicas := existing.Status.Replicas + // if replicas (minReplicas from HPA perspective) is bigger than + // current status use it. + if *params.Instance.Spec.Replicas > currentReplicas { + currentReplicas = *params.Instance.Spec.Replicas + } + updated.Spec.Replicas = ¤tReplicas + } + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go new file mode 100644 index 000000000..b7e2c7df4 --- /dev/null +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -0,0 +1,140 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete + +// HorizontalPodAutoscaler reconciles HorizontalPodAutoscalers if autoscale is true and replicas is nil. +func HorizontalPodAutoscalers(ctx context.Context, params Params) error { + desired := []autoscalingv1.HorizontalPodAutoscaler{} + + // check if autoscale mode is on, e.g MaxReplicas is not nil + if params.Instance.Spec.MaxReplicas != nil { + desired = append(desired, collector.HorizontalPodAutoscaler(params.Config, params.Log, params.Instance)) + } + + // first, handle the create/update parts + if err := expectedHorizontalPodAutoscalers(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected horizontal pod autoscalers: %w", err) + } + + // then, delete the extra objects + if err := deleteHorizontalPodAutoscalers(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the horizontal pod autoscalers: %w", err) + } + + return nil +} + +func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expected []autoscalingv1.HorizontalPodAutoscaler) error { + for _, obj := range expected { + desired := obj + + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } + + existing := &autoscalingv1.HorizontalPodAutoscaler{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "hpa.name", desired.Name, "hpa.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get %w", err) + } + + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + + updated.OwnerReferences = desired.OwnerReferences + updated.Spec.MinReplicas = params.Instance.Spec.Replicas + if params.Instance.Spec.MaxReplicas != nil { + updated.Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas + } + + for k, v := range desired.Annotations { + updated.Annotations[k] = v + } + for k, v := range desired.Labels { + updated.Labels[k] = v + } + + patch := client.MergeFrom(existing) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "hpa.name", desired.Name, "hpa.namespace", desired.Namespace) + } + + return nil +} + +func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected []autoscalingv1.HorizontalPodAutoscaler) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + list := &autoscalingv1.HorizontalPodAutoscalerList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go new file mode 100644 index 000000000..62b901da3 --- /dev/null +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -0,0 +1,122 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + "io/ioutil" + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/apps/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/tools/record" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" +) + +func TestExpectedHPA(t *testing.T) { + params := paramsWithHPA() + expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) + + t.Run("should create HPA", func(t *testing.T) { + err := expectedHorizontalPodAutoscalers(context.Background(), params, []autoscalingv1.HorizontalPodAutoscaler{expectedHPA}) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &autoscalingv1.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, err) + assert.True(t, exists) + }) + + t.Run("should update HPA", func(t *testing.T) { + minReplicas := int32(1) + maxReplicas := int32(3) + updateParms := paramsWithHPA() + updateParms.Instance.Spec.Replicas = &minReplicas + updateParms.Instance.Spec.MaxReplicas = &maxReplicas + updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) + + createObjectIfNotExists(t, "test-collector", &updatedHPA) + err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []autoscalingv1.HorizontalPodAutoscaler{updatedHPA}) + assert.NoError(t, err) + + actual := autoscalingv1.HorizontalPodAutoscaler{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + }) + + t.Run("should delete HPA", func(t *testing.T) { + err := deleteHorizontalPodAutoscalers(context.Background(), params, []autoscalingv1.HorizontalPodAutoscaler{expectedHPA}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collecto"}) + assert.False(t, exists) + }) +} + +func paramsWithHPA() Params { + configYAML, err := ioutil.ReadFile("../testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + + minReplicas := int32(3) + maxReplicas := int32(5) + + return Params{ + Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []corev1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + Config: string(configYAML), + Replicas: &minReplicas, + MaxReplicas: &maxReplicas, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} From 0264bc0a3aa1208156a5f68ba65ce0f9a507fed9 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 9 Mar 2022 17:23:20 +0530 Subject: [PATCH 0445/1234] Adds break statement to break the loop once resource to keep matches with expected (#761) * adds break statement to break the loop once resource to keep matches with expected * Breaks loop once resource to keep is matched with expected for HorizontalPodAutoscaler --- pkg/collector/reconcile/configmap.go | 1 + pkg/collector/reconcile/daemonset.go | 1 + pkg/collector/reconcile/deployment.go | 1 + pkg/collector/reconcile/horizontalpodautoscaler.go | 1 + pkg/collector/reconcile/service.go | 1 + pkg/collector/reconcile/serviceaccount.go | 1 + pkg/collector/reconcile/statefulset.go | 1 + 7 files changed, 7 insertions(+) diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index d3d8010f1..6cc11e7a7 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -204,6 +204,7 @@ func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.Conf for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index 8acbfa222..ff4f4a134 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -119,6 +119,7 @@ func deleteDaemonSets(ctx context.Context, params Params, expected []appsv1.Daem for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 86bc1ecc2..6a7e4023e 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -140,6 +140,7 @@ func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Dep for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index b7e2c7df4..6d0bca72a 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -125,6 +125,7 @@ func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 2143e77df..7df0f668b 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -257,6 +257,7 @@ func deleteServices(ctx context.Context, params Params, expected []corev1.Servic for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 7d5cfefe9..0cb6cc029 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -119,6 +119,7 @@ func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1 for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index e1ab648b1..0f8baecdf 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -120,6 +120,7 @@ func deleteStatefulSets(ctx context.Context, params Params, expected []appsv1.St for _, keep := range expected { if keep.Name == existing.Name && keep.Namespace == existing.Namespace { del = false + break } } From 227a869c98fbf14fbbb05f7c57496fbec47060f0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 9 Mar 2022 12:56:39 +0100 Subject: [PATCH 0446/1234] Support k8s 1.19 and higher (#734) * Test on lowest and highest k8s version and 1.19 Signed-off-by: Pavol Loffay * Add comment Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Add more comments Signed-off-by: Pavol Loffay --- .github/workflows/e2e.yaml | 6 ++++-- .github/workflows/scorecard.yaml | 4 +--- README.md | 6 +----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 500ac0f25..3e380844a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -12,9 +12,11 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: + # The e2e tests are run on the lowest and highest supported k8s version. + # All Kubernetes version in between expose the same APIs, hence the operator + # should be compatible with them. kube-version: - - "1.21" - - "1.22" + - "1.19" - "1.23" steps: diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index e83b00f7a..e2b19c291 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -14,9 +14,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.20" - - "1.21" - - "1.22" + - "1.23" steps: diff --git a/README.md b/README.md index ef72b4c17..acb36c241 100644 --- a/README.md +++ b/README.md @@ -228,11 +228,7 @@ When a custom `Spec.Image` is used with an `OpenTelemetryCollector` resource, th ### OpenTelemetry Operator vs. Kubernetes vs. Cert Manager -We strive to be compatible with the widest range of Kubernetes versions as possible, but some changes to Kubernetes itself require us to break compatibility with older Kubernetes versions, be it because of code incompatibilities, or in the name of maintainability. - -Our promise is that we'll follow what's common practice in the Kubernetes world and support N-2 versions, based on the release date of the OpenTelemetry Operator. - -For instance, when we released v0.27.0, the latest Kubernetes version was v1.21.1. As such, the minimum version of Kubernetes we support for OpenTelemetry Operator v0.27.0 is v1.19 and we tested it with up to 1.21. +We strive to be compatible with the widest range of Kubernetes versions as possible, but some changes to Kubernetes itself require us to break compatibility with older Kubernetes versions, be it because of code incompatibilities, or in the name of maintainability. Every released operator will support a specific range of Kubernetes versions, to be determined at the latest during the release. We use `cert-manager` for some features of this operator and the third column shows the versions of the `cert-manager` that are known to work with this operator's versions. From 12a6efcc79df1f52354b009824341c9b085700ac Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 9 Mar 2022 16:15:26 +0100 Subject: [PATCH 0447/1234] Testing new kind versions (#765) * Testing new kind versions Signed-off-by: Yuri Sa * Fixing sha256 Signed-off-by: Yuri Sa * Fixing readme Signed-off-by: Yuri Sa * Fixing readme Signed-off-by: Yuri Sa --- kind-1.19.yaml | 2 +- kind-1.20.yaml | 2 +- kind-1.21.yaml | 2 +- kind-1.22.yaml | 2 +- kind-1.23.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kind-1.19.yaml b/kind-1.19.yaml index ab3d9585c..7c8b99b60 100644 --- a/kind-1.19.yaml +++ b/kind-1.19.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764ba8106a9fd5243d6f32729 + image: kindest/node:v1.19.16@sha256:158bff5545d9d6f1e044e044f2cb3704189911537ee10eaf648cd37f75e51548 diff --git a/kind-1.20.yaml b/kind-1.20.yaml index 5fa94edc1..fa6504c5d 100644 --- a/kind-1.20.yaml +++ b/kind-1.20.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.20.7@sha256:cbeaf907fc78ac97ce7b625e4bf0de16e3ea725daf6b04f930bd14c67c671ff9 + image: kindest/node:v1.20.15@sha256:2d93744654696ea4270c04ec83e7940177295aac99223b224b052c79d4e7693e diff --git a/kind-1.21.yaml b/kind-1.21.yaml index 64c6f7163..c63d3b738 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.21.2@sha256:9d07ff05e4afefbba983fac311807b3c17a5f36e7061f6cb7e2ba756255b2be4 + image: kindest/node:v1.21.10@sha256:c92d79188b958150ffde9437e9b49fb301fd8d1a11eee384475fe3c3eea76f02 diff --git a/kind-1.22.yaml b/kind-1.22.yaml index cd065a3cd..357a30df1 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.4@sha256:ca3587e6e545a96c07bf82e2c46503d9ef86fc704f44c17577fca7bcabf5f978 + image: kindest/node:v1.22.7@sha256:c195c17f2a9f6ad5bbddc9eb8bad68fa21709162aabf2b84e4a3896db05c0808 \ No newline at end of file diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 2d0b936e4..0a6b9dcb9 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.0@sha256:2f93d3c7b12a3e93e6c1f34f331415e105979961fcddbe69a4e3ab5a93ccbb35 + image: kindest/node:v1.23.4@sha256:1742ff7f0b79a8aaae347b9c2ffaf9738910e721d649301791c812c162092753 From 23e9a7815aabc0a027a40c4f262c40a89e77b458 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 10 Mar 2022 12:46:21 +0100 Subject: [PATCH 0448/1234] Release version v0.46.0 (#764) * Release version v0.46.0 Signed-off-by: Yuri Sa * Including changelog v0.46.0 Signed-off-by: Yuri Sa * Including collector/contrib changelog links * Fixing readme Signed-off-by: Yuri Sa * Fixing readme Signed-off-by: Yuri Sa * Fixing changelog Signed-off-by: Yuri Sa --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6ae636c..f144f55af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ Changes by Version ================== +0.46.0 +------------------- +* Bumped OpenTelemetry Collector to v0.46.0 +* add autoscale option to enable support for Horizontal Pod Autoscaling ([#746](https://github.com/open-telemetry/opentelemetry-operator/pull/746), [@binjip978](https://github.com/binjip978)) +* chore(nodejs): bump auto-instrumentations ([#763](https://github.com/open-telemetry/opentelemetry-operator/pull/763), [@mat-rumian](https://github.com/mat-rumian)) +* Make operator more resiliant to etcd defrag activity ([#742](https://github.com/open-telemetry/opentelemetry-operator/pull/742), [@pavolloffay](https://github.com/pavolloffay)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.46.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.46.0) +* [OpenTelemetry Contrib - v0.46.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.46.0) + 0.45.0 ------------------- * Bumped OpenTelemetry Collector to v0.45.0 diff --git a/README.md b/README.md index acb36c241..abeacbcc8 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.46.0 | v1.19 to v1.23 | 1.6.1 | | v0.45.0 | v1.21 to v1.23 | 1.6.1 | | v0.44.0 | v1.21 to v1.23 | 1.6.1 | | v0.43.0 | v1.21 to v1.23 | 1.6.1 | @@ -255,7 +256,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.31.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | | v0.30.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | | v0.29.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | -| v0.28.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index b6389b545..0893bbce9 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.45.0 + name: opentelemetry-operator.v0.46.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.45.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.46.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.45.0 + version: 0.46.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 6cb178656..30120ddfa 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.45.0 +opentelemetry-collector=0.46.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.45.0 +operator=0.46.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 09223c005c3b47fb36748ad7af20447b31f7593b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 14 Mar 2022 14:49:40 +0100 Subject: [PATCH 0449/1234] Fix publishing operator image on release (#770) Signed-off-by: Pavol Loffay --- .github/workflows/publish-images.yaml | 4 ++-- .github/workflows/release.yaml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index a824f50a2..ea5889b22 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -3,8 +3,7 @@ name: "Publish operator" on: push: branches: [ main ] - release: - types: [ published ] + tags: [ 'v*' ] workflow_dispatch: @@ -39,6 +38,7 @@ jobs: tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{raw}} type=ref,event=branch - name: Set up QEMU diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a965970e8..05b3cda5d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,8 +1,7 @@ name: "Prepare the release" on: push: - tags: - - 'v*' + tags: [ 'v*' ] jobs: release: From aecdcefce6f124148ecc34b7f4cdd322d497bad5 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 14 Mar 2022 16:09:46 +0100 Subject: [PATCH 0450/1234] Remove v prefix from the container image version/tag (#771) Signed-off-by: Pavol Loffay --- Makefile | 2 +- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1e0baaf09..5c7069ff7 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${ # Image URL to use all building/pushing image targets IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator IMG_REPO ?= opentelemetry-operator -IMG ?= ${IMG_PREFIX}/${IMG_REPO}:$(addprefix v,${VERSION}) +IMG ?= ${IMG_PREFIX}/${IMG_REPO}:${VERSION} BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} # Options for 'bundle-build' diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0893bbce9..3f39fd540 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.46.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.46.0 livenessProbe: httpGet: path: /healthz From 59ba34c97c60f130268f3e254b7d6e8e57b32f44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:00:39 +0530 Subject: [PATCH 0451/1234] Bump docker/build-push-action from 2.9.0 to 2.10.0 (#773) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.9.0...v2.10.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 56bf1cdcc..20130797e 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/java push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 1aa4d737f..847ddd110 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/nodejs push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 19ed6853c..e625f969d 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -39,7 +39,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/python push: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index ea5889b22..c55e999b4 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index c90c9dee8..4ff9f5010 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -35,7 +35,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: cmd/otel-allocator push: true From 65c2bec1aeeff08c42ca2d31892af0ff06fa4c65 Mon Sep 17 00:00:00 2001 From: Will Li Date: Tue, 15 Mar 2022 16:51:46 +0800 Subject: [PATCH 0452/1234] Add documentation how to build and use custom/vendor auto-instrumentation (#762) * doc: customized auto-instrumentation * doc: update based on comments * doc: wording * doc: update based on comments * doc: update based on comments --- README.md | 22 ++++++++++++++++++++++ autoinstrumentation/java/Dockerfile | 4 ++++ autoinstrumentation/nodejs/Dockerfile | 9 +++++++++ autoinstrumentation/python/Dockerfile | 10 ++++++++++ 4 files changed, 45 insertions(+) diff --git a/README.md b/README.md index abeacbcc8..bd1e58c95 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,28 @@ The possible values for the annotation can be * `"my-instrumentation"` - name of `Instrumentation` CR instance. * `"false"` - do not inject +#### Use customized or vendor instrumentation + +By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by +overriding the image fields in a CR. + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: my-instrumentation +spec: + java: + image: your-customized-auto-instrumentation-image:java + nodejs: + image: your-customized-auto-instrumentation-image:nodejs + python: + image: your-customized-auto-instrumentation-image:python +``` + +The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). +Follow the instructions in the Dockerfiles on how to build a custom container image. + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile index 5f143336e..c33093b87 100644 --- a/autoinstrumentation/java/Dockerfile +++ b/autoinstrumentation/java/Dockerfile @@ -1,3 +1,7 @@ +# To build one auto-instrumentation image for Java, please: +# - Download your customized `javaagent.jar` to `/javaagent.jar`. This is required as when instrumenting the pod, +# one init container will be created to copy the jar to your app's container. +# - Grant the necessary access to the jar. `chmod -R go+r /javaagent.jar` FROM busybox ARG version diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index cd648ccea..1e0fd96f9 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -1,3 +1,12 @@ +# To build one auto-instrumentation image for Node.js, please: +# - Ensure the packages are installed in the `/autoinstrumentation` directory. This is required as when instrumenting the pod, +# one init container will be created to copy all the content in `/autoinstrumentation` directory to your app's container. Then +# update the `NODE_OPTIONS` environment variable accordingly. To achieve this, you can mimic the one in `autoinstrumentation/nodejs/Dockerfile` +# by using multi-stage builds. In the first stage, install all the required packages in one custom directory. +# Then in the second stage, copy the directory to `/autoinstrumentation`. +# - Ensure you have `@opentelemetry/api`, `@opentelemetry/auto-instrumentations-node`, and `@opentelemetry/sdk-node` or your customized +# alternatives installed. +# - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` FROM node:16 AS build WORKDIR /operator-build diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index 8086afe0a..5355ed277 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -1,3 +1,13 @@ +# To build one auto-instrumentation image for Python, please: +# - Ensure the packages are installed in the `/autoinstrumentation` directory. This is required as when instrumenting the pod, +# one init container will be created to copy all the content in `/autoinstrumentation` directory to your app's container. Then +# update the `PYTHONPATH` environment variable accordingly. To achieve this, you can mimic the one in `autoinstrumentation/python/Dockerfile` +# by using multi-stage builds. In the first stage, install all the required packages in one custom directory with `pip install --target`. +# Then in the second stage, copy the directory to `/autoinstrumentation`. +# - Ensure you have `opentelemetry-distro` and `opentelemetry-instrumentation` or your customized alternatives installed. +# Those two packages are essential to Python auto-instrumentation. +# - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` + FROM python:3.10-alpine AS build WORKDIR /operator-build From 3c631a3eb83049178e22832af36e2b3c412e8d17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 09:31:45 +0100 Subject: [PATCH 0453/1234] Bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#776) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index a7b3bf407..f3b9add81 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 go.opentelemetry.io/otel v1.4.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.4 diff --git a/go.sum b/go.sum index 8869a1426..5f41f40cb 100644 --- a/go.sum +++ b/go.sum @@ -1026,8 +1026,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= From 586eeedd378f7f9c07e7b1ec3164bac17f5d5b9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 09:25:43 +0100 Subject: [PATCH 0454/1234] Bump go.opentelemetry.io/otel from 1.4.1 to 1.5.0 (#783) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.4.1 to 1.5.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index f3b9add81..f9b84add7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.4.1 + go.opentelemetry.io/otel v1.5.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.4 k8s.io/apimachinery v0.23.4 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.4.1 // indirect + go.opentelemetry.io/otel/trace v1.5.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 5f41f40cb..9867c4904 100644 --- a/go.sum +++ b/go.sum @@ -1101,8 +1101,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= -go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= +go.opentelemetry.io/otel v1.5.0 h1:DhCU8oR2sJH9rfnwPdoV/+BJ7UIN5kXHL8DuSGrPU8E= +go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1110,8 +1110,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ= -go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= +go.opentelemetry.io/otel/trace v1.5.0 h1:AKQZ9zJsBRFAp7zLdyGNkqG2rToCDIt3i5tcLzQlbmU= +go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 4fbf3a81bd28dc25ec7ed969640fb5b6c7af19b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 09:26:06 +0100 Subject: [PATCH 0455/1234] Bump k8s.io/apimachinery from 0.23.4 to 0.23.5 (#780) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.4 to 0.23.5. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.23.4...v0.23.5) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index f9b84add7..cf2415d4e 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/otel v1.5.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.4 - k8s.io/apimachinery v0.23.4 + k8s.io/apimachinery v0.23.5 k8s.io/client-go v0.23.4 k8s.io/kubectl v0.23.4 sigs.k8s.io/controller-runtime v0.11.1 diff --git a/go.sum b/go.sum index 9867c4904..f74f1de1b 100644 --- a/go.sum +++ b/go.sum @@ -1713,8 +1713,9 @@ k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG4 k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.4 h1:fhnuMd/xUL3Cjfl64j5ULKZ1/J9n8NuQEgNL+WXWfdM= k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= +k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/cli-runtime v0.23.4/go.mod h1:7KywUNTUibmHPqmpDFuRO1kc9RhsufHv2lkjCm2YZyM= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= From 337ebc2f2229be33491fe6ada3271aa2d8541acb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 10:31:54 +0100 Subject: [PATCH 0456/1234] Bump k8s.io/api from 0.23.4 to 0.23.5 (#782) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.23.4 to 0.23.5. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](https://github.com/kubernetes/api/compare/v0.23.4...v0.23.5) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index cf2415d4e..e214f9a38 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/stretchr/testify v1.7.1 go.opentelemetry.io/otel v1.5.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.4 + k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 k8s.io/client-go v0.23.4 k8s.io/kubectl v0.23.4 diff --git a/go.sum b/go.sum index f74f1de1b..15aa96437 100644 --- a/go.sum +++ b/go.sum @@ -1706,8 +1706,9 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.23.4 h1:85gnfXQOWbJa1SiWGpE9EEtHs0UVvDyIsSMpEtl2D4E= k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= +k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= +k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= From 6095a067c83f160b3a6c90b603f84dc49c38aebc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Mar 2022 10:32:19 +0100 Subject: [PATCH 0457/1234] Bump k8s.io/client-go from 0.23.4 to 0.23.5 (#781) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.4 to 0.23.5. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.23.4...v0.23.5) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index e214f9a38..b9b66929a 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 - k8s.io/client-go v0.23.4 + k8s.io/client-go v0.23.5 k8s.io/kubectl v0.23.4 sigs.k8s.io/controller-runtime v0.11.1 ) diff --git a/go.sum b/go.sum index 15aa96437..546125367 100644 --- a/go.sum +++ b/go.sum @@ -1722,8 +1722,9 @@ k8s.io/cli-runtime v0.23.4/go.mod h1:7KywUNTUibmHPqmpDFuRO1kc9RhsufHv2lkjCm2YZyM k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.23.4 h1:YVWvPeerA2gpUudLelvsolzH7c2sFoXXR5wM/sWqNFU= k8s.io/client-go v0.23.4/go.mod h1:PKnIL4pqLuvYUK1WU7RLTMYKPiIh7MYShLshtRY9cj0= +k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= +k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/code-generator v0.23.4/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= From 553d2ec991c7fccaedd944330efe730c67074e3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Mar 2022 13:44:21 +0100 Subject: [PATCH 0458/1234] Bump github.com/go-logr/logr from 1.2.2 to 1.2.3 (#787) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index b9b66929a..a2417ffcf 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/go-logr/logr v1.2.2 + github.com/go-logr/logr v1.2.3 github.com/mitchellh/mapstructure v1.4.3 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 546125367..7365f3ab5 100644 --- a/go.sum +++ b/go.sum @@ -324,8 +324,9 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= From cdacf2aef95f761b2b35e211a0f0096de13817c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 11:37:51 +0100 Subject: [PATCH 0459/1234] Bump k8s.io/kubectl from 0.23.4 to 0.23.5 (#790) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.23.4 to 0.23.5. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.23.4...v0.23.5) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 19 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index a2417ffcf..920a4aad6 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 k8s.io/client-go v0.23.5 - k8s.io/kubectl v0.23.4 + k8s.io/kubectl v0.23.5 sigs.k8s.io/controller-runtime v0.11.1 ) @@ -114,7 +114,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.4 // indirect + k8s.io/component-base v0.23.5 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect diff --git a/go.sum b/go.sum index 7365f3ab5..5b06266c6 100644 --- a/go.sum +++ b/go.sum @@ -1707,7 +1707,6 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= @@ -1715,23 +1714,21 @@ k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG4 k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/cli-runtime v0.23.4/go.mod h1:7KywUNTUibmHPqmpDFuRO1kc9RhsufHv2lkjCm2YZyM= +k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.23.4/go.mod h1:PKnIL4pqLuvYUK1WU7RLTMYKPiIh7MYShLshtRY9cj0= k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/code-generator v0.23.4/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= +k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/component-base v0.23.4 h1:SziYh48+QKxK+ykJ3Ejqd98XdZIseVBG7sBaNLPqy6M= -k8s.io/component-base v0.23.4/go.mod h1:8o3Gg8i2vnUXGPOwciiYlkSaZT+p+7gA9Scoz8y4W4E= -k8s.io/component-helpers v0.23.4/go.mod h1:1Pl7L4zukZ054ElzRbvmZ1FJIU8roBXFOeRFu8zipa4= +k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE= +k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= +k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0BgoPQuSM= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1750,9 +1747,9 @@ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iL k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubectl v0.23.4 h1:mAa+zEOlyZieecEy+xSrhjkpMcukYyHWzcNdX28dzMY= -k8s.io/kubectl v0.23.4/go.mod h1:Dgb0Rvx/8JKS/C2EuvsNiQc6RZnX0SbHJVG3XUzH6ok= -k8s.io/metrics v0.23.4/go.mod h1:cl6sY9BdVT3DubbpqnkPIKi6mn/F2ltkU4yH1tEJ3Bo= +k8s.io/kubectl v0.23.5 h1:DmDULqCaF4qstj0Im143XmncvqWtJxHzK8IrW2BzlU0= +k8s.io/kubectl v0.23.5/go.mod h1:lLgw7cVY8xbd7o637vOXPca/w6HC205KsPCRDYRCxwE= +k8s.io/metrics v0.23.5/go.mod h1:WNAtV2a5BYbmDS8+7jSqYYV6E3efuGTpIwJ8PTD1wgs= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From ecb139c9dc453961f695a186d665666cdd1dfd3c Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 21 Mar 2022 11:38:52 +0100 Subject: [PATCH 0460/1234] Release OTEL Operator 0.47.0 (#788) * Release OTEL Operator 0.47.0 Signed-off-by: Yuri Sa * Changing typos Signed-off-by: Yuri Sa --- CHANGELOG.md | 9 +++++++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f144f55af..2bac38f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changes by Version ================== +0.47.0 +------------------- +* Bumped OpenTelemetry Collector to v0.47.0 +* doc: customized auto-instrumentation ([#762](https://github.com/open-telemetry/opentelemetry-operator/pull/762), [@cuichenli](https://github.com/cuichenli)) +* Remove v prefix from the container image version/tag ([#771](https://github.com/open-telemetry/opentelemetry-operator/pull/771), [@pavolloffay](https://github.com/pavolloffay)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.47.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.47.0) +* [OpenTelemetry Contrib - v0.47.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.47.0) + 0.46.0 ------------------- * Bumped OpenTelemetry Collector to v0.46.0 diff --git a/README.md b/README.md index bd1e58c95..438a7c729 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.47.0 | v1.19 to v1.23 | 1.6.1 | | v0.46.0 | v1.19 to v1.23 | 1.6.1 | | v0.45.0 | v1.21 to v1.23 | 1.6.1 | | v0.44.0 | v1.21 to v1.23 | 1.6.1 | @@ -277,7 +278,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.32.0 (skipped) | n/a | n/a | | v0.31.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | | v0.30.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | -| v0.29.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3f39fd540..8700d742d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.46.0 + name: opentelemetry-operator.v0.47.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.46.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.46.0 + version: 0.47.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 30120ddfa..db3d9da98 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.46.0 +opentelemetry-collector=0.47.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.46.0 +operator=0.47.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From a076de3925440ad13ed6584dfa6e91bddcc1d62c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 10:37:31 +0100 Subject: [PATCH 0461/1234] Bump actions/cache from 2.1.7 to 3 (#792) Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.7...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index c55e999b4..7f6bbb98f 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -48,7 +48,7 @@ jobs: uses: docker/setup-buildx-action@v1.6.0 - name: Cache Docker layers - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} From f6378844478d09efcc461b50b3207d4afa9b813f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 10:12:06 +0100 Subject: [PATCH 0462/1234] Bump go.opentelemetry.io/otel from 1.5.0 to 1.6.0 (#795) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 920a4aad6..8ef1fb571 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.5.0 + go.opentelemetry.io/otel v1.6.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.5.0 // indirect + go.opentelemetry.io/otel/trace v1.6.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 5b06266c6..3c5f75a45 100644 --- a/go.sum +++ b/go.sum @@ -1102,8 +1102,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.5.0 h1:DhCU8oR2sJH9rfnwPdoV/+BJ7UIN5kXHL8DuSGrPU8E= -go.opentelemetry.io/otel v1.5.0/go.mod h1:Jm/m+rNp/z0eqJc74H7LPwQ3G87qkU/AnnAydAjSAHk= +go.opentelemetry.io/otel v1.6.0 h1:YV6GkGe/Ag2PKsm4rjlqdSNs0w0A5ZzxeGkxhx1T+t4= +go.opentelemetry.io/otel v1.6.0/go.mod h1:bfJD2DZVw0LBxghOTlgnlI0CV3hLDu9XF/QKOUXMTQQ= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1111,8 +1111,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.5.0 h1:AKQZ9zJsBRFAp7zLdyGNkqG2rToCDIt3i5tcLzQlbmU= -go.opentelemetry.io/otel/trace v1.5.0/go.mod h1:sq55kfhjXYr1zVSyexg0w1mpa03AYXR5eyTkB9NPPdE= +go.opentelemetry.io/otel/trace v1.6.0 h1:NDzPermp9ISkhxIaJXjBTi2O60xOSHDHP/EezjOL2wo= +go.opentelemetry.io/otel/trace v1.6.0/go.mod h1:qs7BrU5cZ8dXQHBGxHMOxwME/27YH2qEp4/+tZLLwJE= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 9afeb0a94969f9d5f9ac67dc78309d83b8bc18b1 Mon Sep 17 00:00:00 2001 From: "David J. M. Karlsen" Date: Thu, 24 Mar 2022 18:13:18 +0100 Subject: [PATCH 0463/1234] add labels in order to make selectors unique (#796) Signed-off-by: David J. M. Karlsen --- config/manager/manager.yaml | 4 ++++ config/prometheus/monitor.yaml | 2 ++ config/rbac/auth_proxy_service.yaml | 2 ++ config/webhook/service.yaml | 1 + 4 files changed, 9 insertions(+) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 4057084d4..52c3cd62e 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: system --- @@ -11,15 +12,18 @@ metadata: name: controller-manager namespace: system labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager spec: selector: matchLabels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager replicas: 1 template: metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager spec: containers: diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index d19136ae7..e66d0ac5e 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -4,6 +4,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: controller-manager-metrics-monitor namespace: system @@ -17,4 +18,5 @@ spec: insecureSkipVerify: true selector: matchLabels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 65e99c69f..45cbe801d 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: controller-manager-metrics-service namespace: system @@ -12,4 +13,5 @@ spec: targetPort: https protocol: TCP selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml index a95890856..f4fa7f2f5 100644 --- a/config/webhook/service.yaml +++ b/config/webhook/service.yaml @@ -10,4 +10,5 @@ spec: targetPort: 9443 protocol: TCP selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager From e3b764fce15a1afe2e943ea8ff7d34f12c0e372c Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Tue, 29 Mar 2022 15:12:29 +0200 Subject: [PATCH 0464/1234] Filter out unneeded labels (#606) * Fixes #605 - Filter out unneeded labels - 10.98.72.0/21 * Remove second parse --- internal/config/main.go | 7 ++++++ internal/config/options.go | 28 ++++++++++++++++++++++++ main.go | 5 +++++ pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 24 ++++++++++++++++++++ pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 24 ++++++++++++++++++++ pkg/collector/horizontalpodautoscaler.go | 2 +- pkg/collector/labels.go | 17 ++++++++++++-- pkg/collector/labels_test.go | 20 +++++++++++++++-- pkg/collector/reconcile/configmap.go | 2 +- pkg/collector/reconcile/service.go | 6 ++--- pkg/collector/reconcile/service_test.go | 2 +- pkg/collector/serviceaccount.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 24 ++++++++++++++++++++ 16 files changed, 155 insertions(+), 14 deletions(-) diff --git a/internal/config/main.go b/internal/config/main.go index dae27bb72..bed73be4d 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -51,6 +51,7 @@ type Config struct { autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string + labelsFilter []string } // New constructs a new configuration based on the given options. @@ -81,6 +82,7 @@ func New(opts ...Option) Config { autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, + labelsFilter: o.labelsFilter, } } @@ -174,3 +176,8 @@ func (c *Config) AutoInstrumentationNodeJSImage() string { func (c *Config) AutoInstrumentationPythonImage() string { return c.autoInstrumentationPythonImage } + +// Returns the filters converted to regex strings used to filter out unwanted labels from propagations. +func (c *Config) LabelsFilter() []string { + return c.labelsFilter +} diff --git a/internal/config/options.go b/internal/config/options.go index 727c88094..37fe630a3 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -15,6 +15,8 @@ package config import ( + "regexp" + "strings" "time" "github.com/go-logr/logr" @@ -41,6 +43,7 @@ type options struct { onChange []func() error platform platform.Platform version version.Version + labelsFilter []string } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -115,3 +118,28 @@ func WithAutoInstrumentationPythonImage(s string) Option { o.autoInstrumentationPythonImage = s } } + +func WithLabelFilters(labelFilters []string) Option { + return func(o *options) { + + filters := []string{} + for _, pattern := range labelFilters { + var result strings.Builder + + for i, literal := range strings.Split(pattern, "*") { + + // Replace * with .* + if i > 0 { + result.WriteString(".*") + } + + // Quote any regular expression meta characters in the + // literal text. + result.WriteString(regexp.QuoteMeta(literal)) + } + filters = append(filters, result.String()) + } + + o.labelsFilter = filters + } +} diff --git a/main.go b/main.go index bafbeb76b..776438563 100644 --- a/main.go +++ b/main.go @@ -80,7 +80,9 @@ func main() { autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string + labelsFilter []string ) + pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") flag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, @@ -91,6 +93,7 @@ func main() { pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) @@ -107,6 +110,7 @@ func main() { "go-version", v.Go, "go-arch", runtime.GOARCH, "go-os", runtime.GOOS, + "labels-filter", labelsFilter, ) restConfig := ctrl.GetConfigOrDie() @@ -127,6 +131,7 @@ func main() { config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), config.WithAutoDetect(ad), + config.WithLabelFilters(labelsFilter), ) watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 4da5b0409..9bbb9472b 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -27,7 +27,7 @@ import ( // DaemonSet builds the deployment for the given instance. func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { - labels := Labels(otelcol) + labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 71fec012a..910d9a34b 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -129,3 +129,27 @@ func TestDaemonstPodSecurityContext(t *testing.T) { assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) } + +func TestDaemonsetFilterLabels(t *testing.T) { + excludedLabels := map[string]string{ + "foo": "1", + "app.foo.bar": "1", + } + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Labels: excludedLabels, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) + + d := DaemonSet(cfg, logger, otelcol) + + assert.Len(t, d.ObjectMeta.Labels, 5) + for k := range excludedLabels { + assert.NotContains(t, d.ObjectMeta.Labels, k) + } +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 8a4abd212..08da24b76 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -27,7 +27,7 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { - labels := Labels(otelcol) + labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 7ed3d959b..9555a454b 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -151,3 +151,27 @@ func TestDeploymentHostNetwork(t *testing.T) { assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } + +func TestDeploymentFilterLabels(t *testing.T) { + excludedLabels := map[string]string{ + "foo": "1", + "app.foo.bar": "1", + } + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Labels: excludedLabels, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) + + d := Deployment(cfg, logger, otelcol) + + assert.Len(t, d.ObjectMeta.Labels, 5) + for k := range excludedLabels { + assert.NotContains(t, d.ObjectMeta.Labels, k) + } +} diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index e559d7da2..334ae87bd 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -27,7 +27,7 @@ import ( const defaultCPUTarget int32 = 90 func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) autoscalingv1.HorizontalPodAutoscaler { - labels := Labels(otelcol) + labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 06fc02bb7..071efb565 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -15,17 +15,30 @@ package collector import ( + "regexp" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) +func isFilteredLabel(label string, filterLabels []string) bool { + for _, pattern := range filterLabels { + match, _ := regexp.MatchString(pattern, label) + return match + } + + return false +} + // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. -func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { +func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map[string]string { // new map every time, so that we don't touch the instance's label base := map[string]string{} if nil != instance.Labels { for k, v := range instance.Labels { - base[k] = v + if !isFilteredLabel(k, filterLabels) { + base[k] = v + } } } diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 38585950d..d9a5b7185 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -34,7 +34,7 @@ func TestLabelsCommonSet(t *testing.T) { } // test - labels := Labels(otelcol) + labels := Labels(otelcol, []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) @@ -50,9 +50,25 @@ func TestLabelsPropagateDown(t *testing.T) { } // test - labels := Labels(otelcol) + labels := Labels(otelcol, []string{}) // verify assert.Len(t, labels, 5) assert.Equal(t, "mycomponent", labels["myapp"]) } + +func TestLabelsFilter(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"test.bar.io": "foo", "test.foo.io": "bar"}, + }, + } + + // This requires the filter to be in regex match form and not the other simpler wildcard one. + labels := Labels(otelcol, []string{".*.bar.io"}) + + // verify + assert.Len(t, labels, 5) + assert.NotContains(t, labels, "test.bar.io") + assert.Equal(t, "bar", labels["test.foo.io"]) +} diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 6cc11e7a7..3bd8e9d68 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -64,7 +64,7 @@ func ConfigMaps(ctx context.Context, params Params) error { func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { name := naming.ConfigMap(params.Instance) - labels := collector.Labels(params.Instance) + labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = name config, err := ReplaceConfig(params) if err != nil { diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 7df0f668b..bdeed0775 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -68,7 +68,7 @@ func Services(ctx context.Context, params Params) error { } func desiredService(ctx context.Context, params Params) *corev1.Service { - labels := collector.Labels(params.Instance) + labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = naming.Service(params.Instance) // by coincidence, the selector is the same as the label, but note that the selector points to the deployment @@ -163,10 +163,10 @@ func headless(ctx context.Context, params Params) *corev1.Service { } func monitoringService(ctx context.Context, params Params) *corev1.Service { - labels := collector.Labels(params.Instance) + labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = naming.MonitoringService(params.Instance) - selector := collector.Labels(params.Instance) + selector := collector.Labels(params.Instance, []string{}) selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-collector", params.Instance.Name) return &corev1.Service{ diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index d400560d6..19a76a495 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -213,7 +213,7 @@ func TestMonitoringService(t *testing.T) { } func service(name string, ports []v1.ServicePort) v1.Service { - labels := collector.Labels(params().Instance) + labels := collector.Labels(params().Instance, []string{}) labels["app.kubernetes.io/name"] = name selector := labels diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index fa1efea86..ac7e61ca4 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -33,7 +33,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { //ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { - labels := Labels(otelcol) + labels := Labels(otelcol, []string{}) labels["app.kubernetes.io/name"] = naming.ServiceAccount(otelcol) return corev1.ServiceAccount{ diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 6427633c0..9d14e5221 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -27,7 +27,7 @@ import ( // StatefulSet builds the statefulset for the given instance. func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.StatefulSet { - labels := Labels(otelcol) + labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index f4f5141b0..a016b83ce 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -210,3 +210,27 @@ func TestStatefulSetHostNetwork(t *testing.T) { assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } + +func TestStatefulSetFilterLabels(t *testing.T) { + excludedLabels := map[string]string{ + "foo": "1", + "app.foo.bar": "1", + } + + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Labels: excludedLabels, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) + + d := StatefulSet(cfg, logger, otelcol) + + assert.Len(t, d.ObjectMeta.Labels, 5) + for k := range excludedLabels { + assert.NotContains(t, d.ObjectMeta.Labels, k) + } +} From 7825b93dc197e2b2fd450048a08be18b04ae0916 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 23:58:44 +0530 Subject: [PATCH 0465/1234] Bump go.opentelemetry.io/otel from 1.6.0 to 1.6.1 (#799) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8ef1fb571..7c534ea7e 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.6.0 + go.opentelemetry.io/otel v1.6.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.6.0 // indirect + go.opentelemetry.io/otel/trace v1.6.1 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 3c5f75a45..97619615f 100644 --- a/go.sum +++ b/go.sum @@ -1102,8 +1102,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.6.0 h1:YV6GkGe/Ag2PKsm4rjlqdSNs0w0A5ZzxeGkxhx1T+t4= -go.opentelemetry.io/otel v1.6.0/go.mod h1:bfJD2DZVw0LBxghOTlgnlI0CV3hLDu9XF/QKOUXMTQQ= +go.opentelemetry.io/otel v1.6.1 h1:6r1YrcTenBvYa1x491d0GGpTVBsNECmrc/K6b+zDeis= +go.opentelemetry.io/otel v1.6.1/go.mod h1:blzUabWHkX6LJewxvadmzafgh/wnvBSDBdOuwkAtrWQ= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1111,8 +1111,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.6.0 h1:NDzPermp9ISkhxIaJXjBTi2O60xOSHDHP/EezjOL2wo= -go.opentelemetry.io/otel/trace v1.6.0/go.mod h1:qs7BrU5cZ8dXQHBGxHMOxwME/27YH2qEp4/+tZLLwJE= +go.opentelemetry.io/otel/trace v1.6.1 h1:f8c93l5tboBYZna1nWk0W9DYyMzJXDWdZcJZ0Kb400U= +go.opentelemetry.io/otel/trace v1.6.1/go.mod h1:RkFRM1m0puWIq10oxImnGEduNBzxiN7TXluRBtE+5j0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 4fb6d2e40e5c7e3c414f574a12c59b39092ccac7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:23:08 +0200 Subject: [PATCH 0466/1234] Bump sigs.k8s.io/controller-runtime from 0.11.1 to 0.11.2 (#800) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.11.1 to 0.11.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.11.1...v0.11.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 20 ++++++-------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 7c534ea7e..b31959b11 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( k8s.io/apimachinery v0.23.5 k8s.io/client-go v0.23.5 k8s.io/kubectl v0.23.5 - sigs.k8s.io/controller-runtime v0.11.1 + sigs.k8s.io/controller-runtime v0.11.2 ) require ( @@ -113,7 +113,7 @@ require ( gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/apiextensions-apiserver v0.23.5 // indirect k8s.io/component-base v0.23.5 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect diff --git a/go.sum b/go.sum index 97619615f..88b96ea08 100644 --- a/go.sum +++ b/go.sum @@ -1706,26 +1706,21 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= -k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= -k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.23.5 h1:5SKzdXyvIJKu+zbfPc3kCbWpbxi+O+zdmAJBm26UJqI= +k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= -k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE= k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0BgoPQuSM= @@ -1754,16 +1749,15 @@ k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.11.1 h1:7YIHT2QnHJArj/dk9aUkYhfqfK5cIxPOX5gPECfdZLU= -sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= +sigs.k8s.io/controller-runtime v0.11.2 h1:H5GTxQl0Mc9UjRJhORusqfJCIjBO8UtUxGggCwL1rLA= +sigs.k8s.io/controller-runtime v0.11.2/go.mod h1:P6QCzrEjLaZGqHsfd+os7JQ+WFZhvB8MRFsn4dWF7O4= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= @@ -1773,8 +1767,6 @@ sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLC sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From ac6fa3126ad0c8213114447eac7383842530aa57 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 4 Apr 2022 18:46:54 +0200 Subject: [PATCH 0467/1234] Release v0.48.0 (#805) Signed-off-by: Yuri Sa --- CHANGELOG.md | 9 +++++++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bac38f3b..b9f551d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ Changes by Version ================== +0.48.0 +------------------- +* Bumped OpenTelemetry Collector to v0.48.0 +* Filter out unneeded labels ([#606](https://github.com/open-telemetry/opentelemetry-operator/pull/606), [@ekarlso](https://github.com/ekarlso)) +* add labels in order to make selectors unique ([#796](https://github.com/open-telemetry/opentelemetry-operator/pull/796), [@davidkarlsen](https://github.com/davidkarlsen)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.48.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.48.0) +* [OpenTelemetry Contrib - v0.48.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.48.0) + 0.47.0 ------------------- * Bumped OpenTelemetry Collector to v0.47.0 diff --git a/README.md b/README.md index 438a7c729..9e58d4f6a 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.48.0 | v1.19 to v1.23 | 1.6.1 | | v0.47.0 | v1.19 to v1.23 | 1.6.1 | | v0.46.0 | v1.19 to v1.23 | 1.6.1 | | v0.45.0 | v1.21 to v1.23 | 1.6.1 | @@ -277,7 +278,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.33.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.32.0 (skipped) | n/a | n/a | | v0.31.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | -| v0.30.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8700d742d..c8e51e0a9 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.47.0 + name: opentelemetry-operator.v0.48.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.48.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.47.0 + version: 0.48.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index db3d9da98..c5d17b581 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.47.0 +opentelemetry-collector=0.48.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.47.0 +operator=0.48.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From c714be094193ef7b1d089f75c8be59c40b5d41d1 Mon Sep 17 00:00:00 2001 From: Serge Catudal Date: Tue, 5 Apr 2022 09:20:46 -0400 Subject: [PATCH 0468/1234] Add scale subresource status to the OpenTelemetryCollector CRD status (#785) * Add scale subresource status to the OpenTelemetryCollector CRD status * Deprecate OpenTelemetryCollector.Status.Replicas * Disable exhaustive linter on updateScaleSubResourceStatus 'switch mode' --- apis/v1alpha1/opentelemetrycollector_types.go | 21 +++++- apis/v1alpha1/zz_generated.deepcopy.go | 16 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 22 +++++- ...ntelemetry.io_opentelemetrycollectors.yaml | 22 +++++- docs/api.md | 45 +++++++++++- pkg/collector/reconcile/opentelemetry.go | 69 +++++++++++++++++-- 6 files changed, 181 insertions(+), 14 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 6f62b62b7..e9a6e1dcf 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -129,12 +129,31 @@ type OpenTelemetryTargetAllocator struct { Image string `json:"image,omitempty"` } +// ScaleSubresourceStatus defines the observed state of the OpenTelemetryCollector's +// scale subresource. +type ScaleSubresourceStatus struct { + // The total number non-terminated pods targeted by this + // OpenTelemetryCollector's deployment or statefulSet. + // +optional + Replicas int32 `json:"replicas,omitempty"` + + // The selector used to match the OpenTelemetryCollector's + // deployment or statefulSet pods. + // +optional + Selector string `json:"selector,omitempty"` +} + // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. type OpenTelemetryCollectorStatus struct { // Replicas is currently not being set and might be removed in the next version. // +optional + // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. Replicas int32 `json:"replicas,omitempty"` + // Scale is the OpenTelemetryCollector's scale subresource status. + // +optional + Scale ScaleSubresourceStatus `json:"scale,omitempty"` + // Version of the managed OpenTelemetry Collector (operand) // +optional Version string `json:"version,omitempty"` @@ -149,7 +168,7 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:object:root=true // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas +// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector // +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.mode",description="Deployment Mode" // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index e2d107070..a14c5fa08 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -352,6 +352,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { *out = *in + out.Scale = in.Scale if in.Messages != nil { in, out := &in.Messages, &out.Messages *out = make([]string, len(*in)) @@ -442,3 +443,18 @@ func (in *Sampler) DeepCopy() *Sampler { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScaleSubresourceStatus) DeepCopyInto(out *ScaleSubresourceStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleSubresourceStatus. +func (in *ScaleSubresourceStatus) DeepCopy() *ScaleSubresourceStatus { + if in == nil { + return nil + } + out := new(ScaleSubresourceStatus) + in.DeepCopyInto(out) + return out +} diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 90c620396..1d4f20b67 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2567,10 +2567,25 @@ spec: type: array x-kubernetes-list-type: atomic replicas: - description: Replicas is currently not being set and might be removed - in the next version. + description: 'Replicas is currently not being set and might be removed + in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" + instead.' format: int32 type: integer + scale: + description: Scale is the OpenTelemetryCollector's scale subresource + status. + properties: + replicas: + description: The total number non-terminated pods targeted by + this OpenTelemetryCollector's deployment or statefulSet. + format: int32 + type: integer + selector: + description: The selector used to match the OpenTelemetryCollector's + deployment or statefulSet pods. + type: string + type: object version: description: Version of the managed OpenTelemetry Collector (operand) type: string @@ -2580,8 +2595,9 @@ spec: storage: true subresources: scale: + labelSelectorPath: .status.scale.selector specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas + statusReplicasPath: .status.scale.replicas status: {} status: acceptedNames: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 733ac90a8..e19701aca 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2565,10 +2565,25 @@ spec: type: array x-kubernetes-list-type: atomic replicas: - description: Replicas is currently not being set and might be removed - in the next version. + description: 'Replicas is currently not being set and might be removed + in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" + instead.' format: int32 type: integer + scale: + description: Scale is the OpenTelemetryCollector's scale subresource + status. + properties: + replicas: + description: The total number non-terminated pods targeted by + this OpenTelemetryCollector's deployment or statefulSet. + format: int32 + type: integer + selector: + description: The selector used to match the OpenTelemetryCollector's + deployment or statefulSet pods. + type: string + type: object version: description: Version of the managed OpenTelemetry Collector (operand) type: string @@ -2578,8 +2593,9 @@ spec: storage: true subresources: scale: + labelSelectorPath: .status.scale.selector specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas + statusReplicasPath: .status.scale.replicas status: {} status: acceptedNames: diff --git a/docs/api.md b/docs/api.md index 7bcf03860..a826628df 100644 --- a/docs/api.md +++ b/docs/api.md @@ -6115,11 +6115,18 @@ OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollecto + + + + + @@ -6128,4 +6135,40 @@ OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollecto +
messages []string - Messages about actions performed by the operator on this resource.
+ Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.
false
false
maxReplicasinteger + MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled.
+
+ Format: int32
+
false
mode enumreplicas integer - Replicas is currently not being set and might be removed in the next version.
+ Replicas is currently not being set and might be removed in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.

Format: int32
false
scaleobject + Scale is the OpenTelemetryCollector's scale subresource status.
+
false
version string false
+ + +### OpenTelemetryCollector.status.scale +[↩ Parent](#opentelemetrycollectorstatus) + + + +Scale is the OpenTelemetryCollector's scale subresource status. + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
replicasinteger + The total number non-terminated pods targeted by this OpenTelemetryCollector's deployment or statefulSet.
+
+ Format: int32
+
false
selectorstring + The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods.
+
false
\ No newline at end of file diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index 9e9f3eaa9..7b733198a 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -19,24 +19,34 @@ import ( "context" "fmt" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes // making params.Instance obsolete. Default values should be set in the Defaulter webhook, this should only be used // for the Status, which can't be set by the defaulter. func Self(ctx context.Context, params Params) error { - if params.Instance.Status.Version != "" { - // a version is already set, let the upgrade mechanism take care of it! - return nil + changed := params.Instance + + // this field is only changed for new instances: on existing instances this + // field is reconciled when the operator is first started, i.e. during + // the upgrade mechanism + if params.Instance.Status.Version == "" { + // a version is not set, otherwise let the upgrade mechanism take care of it! + changed.Status.Version = version.OpenTelemetryCollector() } - changed := params.Instance - changed.Status.Version = version.OpenTelemetryCollector() + if err := updateScaleSubResourceStatus(ctx, params.Client, &changed); err != nil { + return fmt.Errorf("failed to update the scale subresource status for the OpenTelemetry CR: %w", err) + } - // this is only a change for new instances: existing instances are reconciled when the operator is first started statusPatch := client.MergeFrom(¶ms.Instance) if err := params.Client.Status().Patch(ctx, &changed, statusPatch); err != nil { return fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) @@ -44,3 +54,50 @@ func Self(ctx context.Context, params Params) error { return nil } + +func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpenTelemetryCollector) error { + mode := changed.Spec.Mode + if mode != v1alpha1.ModeDeployment && mode != v1alpha1.ModeStatefulSet { + changed.Status.Scale.Replicas = 0 + changed.Status.Scale.Selector = "" + + return nil + } + + name := naming.Collector(*changed) + + // Set the scale selector + labels := collector.Labels(*changed) + labels["app.kubernetes.io/name"] = name + selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) + if err != nil { + return fmt.Errorf("failed to get selector for labelSelector: %w", err) + } + changed.Status.Scale.Selector = selector.String() + + // Set the scale replicas + objKey := client.ObjectKey{ + Namespace: changed.GetNamespace(), + Name: naming.Collector(*changed), + } + + var replicas int32 + switch mode { // nolint:exhaustive + case v1alpha1.ModeDeployment: + obj := &appsv1.Deployment{} + if err := cli.Get(ctx, objKey, obj); err != nil { + return fmt.Errorf("failed to get deployment status.replicas: %w", err) + } + replicas = obj.Status.Replicas + + case v1alpha1.ModeStatefulSet: + obj := &appsv1.StatefulSet{} + if err := cli.Get(ctx, objKey, obj); err != nil { + return fmt.Errorf("failed to get statefulSet status.replicas: %w", err) + } + replicas = obj.Status.Replicas + } + changed.Status.Scale.Replicas = replicas + + return nil +} From 0dce2dfbdaefa86b0052775641a38263a7599266 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 5 Apr 2022 21:29:20 +0200 Subject: [PATCH 0469/1234] Add recommended label "app.kubernetes.io/version" for operand (#797) * Including new label Signed-off-by: Yuri Sa * Checking len of version var Signed-off-by: Yuri Sa * Fixing function signature Signed-off-by: Yuri Sa * Fixing linters Signed-off-by: Yuri Sa * Fixing number of labels in test files Signed-off-by: Yuri Sa * Test len of label version for configmap Signed-off-by: Yuri Sa * Added missing len check Signed-off-by: Yuri Sa --- pkg/collector/daemonset_test.go | 2 +- pkg/collector/deployment_test.go | 2 +- pkg/collector/labels.go | 7 ++++++ pkg/collector/labels_test.go | 29 +++++++++++++++++++++-- pkg/collector/reconcile/configmap.go | 13 ++++++++++ pkg/collector/reconcile/configmap_test.go | 2 ++ pkg/collector/reconcile/suite_test.go | 1 + pkg/collector/statefulset_test.go | 2 +- 8 files changed, 53 insertions(+), 5 deletions(-) diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 910d9a34b..03ee735e8 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -148,7 +148,7 @@ func TestDaemonsetFilterLabels(t *testing.T) { d := DaemonSet(cfg, logger, otelcol) - assert.Len(t, d.ObjectMeta.Labels, 5) + assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { assert.NotContains(t, d.ObjectMeta.Labels, k) } diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 9555a454b..37a1e1caa 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -170,7 +170,7 @@ func TestDeploymentFilterLabels(t *testing.T) { d := Deployment(cfg, logger, otelcol) - assert.Len(t, d.ObjectMeta.Labels, 5) + assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { assert.NotContains(t, d.ObjectMeta.Labels, k) } diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 071efb565..5f1baba83 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -16,6 +16,7 @@ package collector import ( "regexp" + "strings" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" @@ -46,6 +47,12 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map base["app.kubernetes.io/instance"] = naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name) base["app.kubernetes.io/part-of"] = "opentelemetry" base["app.kubernetes.io/component"] = "opentelemetry-collector" + version := strings.Split(instance.Spec.Image, ":") + if len(version) > 1 { + base["app.kubernetes.io/version"] = version[len(version)-1] + } else { + base["app.kubernetes.io/version"] = "latest" + } return base } diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index d9a5b7185..9e9be9568 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -31,12 +31,37 @@ func TestLabelsCommonSet(t *testing.T) { Name: "my-instance", Namespace: "my-ns", }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + }, + } + + // test + labels := Labels(otelcol, []string{}) + assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "0.47.0", labels["app.kubernetes.io/version"]) + assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) +} + +func TestLabelsTagUnset(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-ns", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + }, } // test labels := Labels(otelcol, []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) } @@ -53,7 +78,7 @@ func TestLabelsPropagateDown(t *testing.T) { labels := Labels(otelcol, []string{}) // verify - assert.Len(t, labels, 5) + assert.Len(t, labels, 6) assert.Equal(t, "mycomponent", labels["myapp"]) } @@ -68,7 +93,7 @@ func TestLabelsFilter(t *testing.T) { labels := Labels(otelcol, []string{".*.bar.io"}) // verify - assert.Len(t, labels, 5) + assert.Len(t, labels, 6) assert.NotContains(t, labels, "test.bar.io") assert.Equal(t, "bar", labels["test.foo.io"]) } diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 3bd8e9d68..f24b62685 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -18,6 +18,7 @@ import ( "context" "fmt" "reflect" + "strings" "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" @@ -64,8 +65,14 @@ func ConfigMaps(ctx context.Context, params Params) error { func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { name := naming.ConfigMap(params.Instance) + version := strings.Split(params.Instance.Spec.Image, ":") labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = name + if len(version) > 1 { + labels["app.kubernetes.io/version"] = version[len(version)-1] + } else { + labels["app.kubernetes.io/version"] = "latest" + } config, err := ReplaceConfig(params) if err != nil { params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", err) @@ -86,8 +93,14 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { name := naming.TAConfigMap(params.Instance) + version := strings.Split(params.Instance.Spec.Image, ":") labels := targetallocator.Labels(params.Instance) labels["app.kubernetes.io/name"] = name + if len(version) > 1 { + labels["app.kubernetes.io/version"] = version[len(version)-1] + } else { + labels["app.kubernetes.io/version"] = "latest" + } promConfig, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) if err != nil { diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 607c651ea..09f031082 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -36,11 +36,13 @@ func TestDesiredConfigMap(t *testing.T) { "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/instance": "default.test", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "0.47.0", } t.Run("should return expected collector config map", func(t *testing.T) { expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "0.47.0" expectedData := map[string]string{ "collector.yaml": `processors: diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 9bd26991f..6d8e011cb 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -182,6 +182,7 @@ func params() Params { UID: instanceUID, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", Ports: []v1.ServicePort{{ Name: "web", Port: 80, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index a016b83ce..d26866b1a 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -229,7 +229,7 @@ func TestStatefulSetFilterLabels(t *testing.T) { d := StatefulSet(cfg, logger, otelcol) - assert.Len(t, d.ObjectMeta.Labels, 5) + assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { assert.NotContains(t, d.ObjectMeta.Labels, k) } From b462d0d4fb23c31f4d258c8f7a28eac4487f6156 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 6 Apr 2022 13:09:59 +0200 Subject: [PATCH 0470/1234] Fix Missing parameter on labels function (#809) Signed-off-by: Yuri Sa --- pkg/collector/reconcile/opentelemetry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index 7b733198a..daaef753c 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -67,7 +67,7 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change name := naming.Collector(*changed) // Set the scale selector - labels := collector.Labels(*changed) + labels := collector.Labels(*changed, []string{}) labels["app.kubernetes.io/name"] = name selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) if err != nil { From 767e5ece998634ed5cef88672d154020471d3bea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:44:12 +0200 Subject: [PATCH 0471/1234] Bump go.opentelemetry.io/otel from 1.6.1 to 1.6.2 (#812) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.6.1 to 1.6.2. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.6.1...v1.6.2) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index b31959b11..9d1116b14 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.6.1 + go.opentelemetry.io/otel v1.6.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.6.1 // indirect + go.opentelemetry.io/otel/trace v1.6.2 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 88b96ea08..11ab0206a 100644 --- a/go.sum +++ b/go.sum @@ -1102,8 +1102,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.6.1 h1:6r1YrcTenBvYa1x491d0GGpTVBsNECmrc/K6b+zDeis= -go.opentelemetry.io/otel v1.6.1/go.mod h1:blzUabWHkX6LJewxvadmzafgh/wnvBSDBdOuwkAtrWQ= +go.opentelemetry.io/otel v1.6.2 h1:iLrj1F5ydCSVc4CGjBX2ou/QRav3C8xHjHlVoch6g4w= +go.opentelemetry.io/otel v1.6.2/go.mod h1:MUBZHaB2cm6CahEBHQPq9Anos7IXynP/noVpjsxQTSc= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1111,8 +1111,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.6.1 h1:f8c93l5tboBYZna1nWk0W9DYyMzJXDWdZcJZ0Kb400U= -go.opentelemetry.io/otel/trace v1.6.1/go.mod h1:RkFRM1m0puWIq10oxImnGEduNBzxiN7TXluRBtE+5j0= +go.opentelemetry.io/otel/trace v1.6.2 h1:oY7i1k6XD/ozlGo7ASy+H1UdkNcj9cPfuklaYSXtoFk= +go.opentelemetry.io/otel/trace v1.6.2/go.mod h1:RMqfw8Mclba1p7sXDmEDBvrB8jw65F6GOoN1fyyXTzk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From f732de9391d23d33d54adbe09aad7de98c88a250 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:44:31 +0200 Subject: [PATCH 0472/1234] Bump docker/metadata-action from 3.6.2 to 3.7.0 (#813) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.6.2 to 3.7.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.6.2...v3.7.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 20130797e..a7176fc19 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.2 + uses: docker/metadata-action@v3.7.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 847ddd110..c90049591 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.2 + uses: docker/metadata-action@v3.7.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index e625f969d..30c892683 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.2 + uses: docker/metadata-action@v3.7.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 7f6bbb98f..897b0430d 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -32,7 +32,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.6.2 + uses: docker/metadata-action@v3.7.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 4ff9f5010..2e476453a 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.6.2 + uses: docker/metadata-action@v3.7.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From 2b9fd687810c033d49e754d278dafdc70e04c4ce Mon Sep 17 00:00:00 2001 From: Jake Utley <5660346+jutley@users.noreply.github.com> Date: Thu, 7 Apr 2022 00:49:32 -0700 Subject: [PATCH 0473/1234] Support nodeSelector field for non-sidecar collectors (#789) * Support nodeSelector field for non-sidecar collectors Signed-off-by: Jake Utley * Add tests for nodeSelector Signed-off-by: Jake Utley * Revise resource names in tests Signed-off-by: Jake Utley * Run make bundle Signed-off-by: Jake Utley * More automated changes after 'make test' Signed-off-by: Jake Utley * Manually revert changes to kustomization.yaml Signed-off-by: Jake Utley * Revise field description Signed-off-by: Jake Utley * Use open-telemetry image repo Signed-off-by: Jake Utley --- apis/v1alpha1/opentelemetrycollector_types.go | 7 +++- apis/v1alpha1/zz_generated.deepcopy.go | 7 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 10 +++++- ...ntelemetry.io_opentelemetrycollectors.yaml | 10 +++++- docs/api.md | 9 ++++- pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 33 +++++++++++++++++++ pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 33 +++++++++++++++++++ pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 33 +++++++++++++++++++ 11 files changed, 141 insertions(+), 4 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index e9a6e1dcf..61f7e3f16 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -108,10 +108,15 @@ type OpenTelemetryCollectorSpec struct { Resources v1.ResourceRequirements `json:"resources,omitempty"` // Toleration to schedule OpenTelemetry Collector pods. - // This is only relevant to daemonsets, statefulsets and deployments + // This is only relevant to daemonset, statefulset, and deployment mode // +optional Tolerations []v1.Toleration `json:"tolerations,omitempty"` + // NodeSelector to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonset, statefulset, and deployment mode + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // PodAnnotations is the set of annotations that will be attached to // Collector and Target Allocator pods. // +optional diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index a14c5fa08..e375a200c 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -330,6 +330,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.PodAnnotations != nil { in, out := &in.PodAnnotations, &out.PodAnnotations *out = make(map[string]string, len(*in)) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 1d4f20b67..528f57088 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -232,6 +232,13 @@ spec: - sidecar - statefulset type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object podAnnotations: additionalProperties: type: string @@ -676,7 +683,8 @@ spec: type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonsets, statefulsets and deployments + This is only relevant to daemonset, statefulset, and deployment + mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index e19701aca..a51bde688 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -230,6 +230,13 @@ spec: - sidecar - statefulset type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object podAnnotations: additionalProperties: type: string @@ -674,7 +681,8 @@ spec: type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonsets, statefulsets and deployments + This is only relevant to daemonset, statefulset, and deployment + mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching diff --git a/docs/api.md b/docs/api.md index a826628df..9e9e42de1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1464,6 +1464,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Enum: daemonset, deployment, sidecar, statefulset
false + + nodeSelector + map[string]string + + NodeSelector to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode
+ + false podAnnotations map[string]string @@ -1526,7 +1533,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. tolerations []object - Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonsets, statefulsets and deployments
+ Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode
false diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 9bbb9472b..5af932957 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -53,6 +53,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, + NodeSelector: otelcol.Spec.NodeSelector, HostNetwork: otelcol.Spec.HostNetwork, DNSPolicy: getDnsPolicy(otelcol), SecurityContext: otelcol.Spec.PodSecurityContext, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 03ee735e8..eab9cd9d6 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -153,3 +153,36 @@ func TestDaemonsetFilterLabels(t *testing.T) { assert.NotContains(t, d.ObjectMeta.Labels, k) } } + +func TestDaemonSetNodeSelector(t *testing.T) { + // Test default + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := DaemonSet(cfg, logger, otelcol_1) + + assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) + + // Test nodeSelector + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-nodeselector", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + NodeSelector: map[string]string{ + "node-key": "node-value", + }, + }, + } + + cfg = config.New() + + d2 := DaemonSet(cfg, logger, otelcol_2) + assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 08da24b76..f69f6203f 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -57,6 +57,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele DNSPolicy: getDnsPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, + NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 37a1e1caa..145ede532 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -175,3 +175,36 @@ func TestDeploymentFilterLabels(t *testing.T) { assert.NotContains(t, d.ObjectMeta.Labels, k) } } + +func TestDeploymentNodeSelector(t *testing.T) { + // Test default + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := Deployment(cfg, logger, otelcol_1) + + assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) + + // Test nodeSelector + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-nodeselector", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + NodeSelector: map[string]string{ + "node-key": "node-value", + }, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol_2) + assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 9d14e5221..04fe18b33 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -57,6 +57,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel DNSPolicy: getDnsPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, + NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, }, }, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index d26866b1a..bfdc6e26b 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -234,3 +234,36 @@ func TestStatefulSetFilterLabels(t *testing.T) { assert.NotContains(t, d.ObjectMeta.Labels, k) } } + +func TestStatefulSetNodeSelector(t *testing.T) { + // Test default + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := StatefulSet(cfg, logger, otelcol_1) + + assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) + + // Test nodeSelector + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-nodeselector", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + NodeSelector: map[string]string{ + "node-key": "node-value", + }, + }, + } + + cfg = config.New() + + d2 := StatefulSet(cfg, logger, otelcol_2) + assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) +} From 749c28a6abdac2c151163ab220cdfd2699c92cc1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 7 Apr 2022 09:51:37 +0200 Subject: [PATCH 0474/1234] Bump kube-rbac-proxy image version to 0.11 (#810) Signed-off-by: Pavol Loffay --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- config/default/manager_auth_proxy_patch.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c8e51e0a9..594d4c8c0 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -281,7 +281,7 @@ spec: - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 68b92b221..0efb1e57e 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -10,7 +10,7 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" From f2073ef7f4a9671c078d4713cabdb16b04922b75 Mon Sep 17 00:00:00 2001 From: wei Date: Thu, 7 Apr 2022 18:04:33 +0800 Subject: [PATCH 0475/1234] Fix panic when spec.replicas is nil (#798) --- pkg/collector/reconcile/deployment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 6a7e4023e..247a93257 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -103,7 +103,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D currentReplicas := existing.Status.Replicas // if replicas (minReplicas from HPA perspective) is bigger than // current status use it. - if *params.Instance.Spec.Replicas > currentReplicas { + if params.Instance.Spec.Replicas != nil && *params.Instance.Spec.Replicas > currentReplicas { currentReplicas = *params.Instance.Spec.Replicas } updated.Spec.Replicas = ¤tReplicas From 90e4d31bc619a0ed4f3b206f6272ee66ef4bae72 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 8 Apr 2022 08:55:16 +0200 Subject: [PATCH 0476/1234] Check exposed svc ports (#778) * Creating check if services are configured properly Signed-off-by: Yuri Sa * Creating check if services are configured properly Signed-off-by: Yuri Sa --- pkg/collector/adapters/config_to_ports.go | 10 +- .../adapters/config_to_ports_test.go | 31 +++-- pkg/collector/adapters/config_validate.go | 111 ++++++++++++++++++ .../adapters/config_validate_test.go | 107 +++++++++++++++++ pkg/collector/reconcile/configmap_test.go | 3 +- pkg/collector/testdata/test.yaml | 2 +- 6 files changed, 253 insertions(+), 11 deletions(-) create mode 100644 pkg/collector/adapters/config_validate.go create mode 100644 pkg/collector/adapters/config_validate_test.go diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go index a3fc2822c..de1dc2ab0 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -51,7 +51,10 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ if !ok { return nil, ErrNoReceivers } - + recEnabled := GetEnabledReceivers(logger, config) + if recEnabled == nil { + return nil, ErrReceiversNotAMap + } receivers, ok := receiversProperty.(map[interface{}]interface{}) if !ok { return nil, ErrReceiversNotAMap @@ -59,6 +62,11 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ ports := []corev1.ServicePort{} for key, val := range receivers { + // This check will pass only the enabled receivers, + // then only the related ports will be opened. + if !recEnabled[key] { + continue + } receiver, ok := val.(map[interface{}]interface{}) if !ok { logger.Info("receiver doesn't seem to be a map of properties", "receiver", key) diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 65d4d1579..10f8109c5 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -62,7 +62,18 @@ func TestExtractPortsFromConfig(t *testing.T) { endpoint: 0.0.0.0:55555 zipkin: zipkin/2: - endpoint: 0.0.0.0:33333 + endpoint: 0.0.0.0:33333 +service: + pipelines: + metrics: + receivers: [examplereceiver, examplereceiver/settings] + exporters: [logging] + metrics/1: + receivers: [jaeger, jaeger/custom] + exporters: [logging] + metrics/2: + receivers: [otlp, otlp/2, zipkin] + exporters: [logging] ` // prepare @@ -73,7 +84,7 @@ func TestExtractPortsFromConfig(t *testing.T) { // test ports, err := adapters.ConfigToReceiverPorts(logger, config) assert.NoError(t, err) - assert.Len(t, ports, 12) + assert.Len(t, ports, 11) // verify expectedPorts := map[int32]bool{} @@ -87,7 +98,6 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedPorts[int32(55681)] = false expectedPorts[int32(55555)] = false expectedPorts[int32(9411)] = false - expectedPorts[int32(33333)] = false expectedNames := map[string]bool{} expectedNames["examplereceiver"] = false @@ -101,7 +111,6 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedNames["otlp-http-legacy"] = false expectedNames["otlp-2-grpc"] = false expectedNames["zipkin"] = false - expectedNames["zipkin-2"] = false expectedAppProtocols := map[string]string{} expectedAppProtocols["otlp-grpc"] = "grpc" @@ -111,7 +120,6 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedAppProtocols["jaeger-grpc"] = "grpc" expectedAppProtocols["otlp-2-grpc"] = "grpc" expectedAppProtocols["zipkin"] = "http" - expectedAppProtocols["zipkin-2"] = "http" // make sure we only have the ports in the set for _, port := range ports { @@ -175,11 +183,11 @@ func TestInvalidReceivers(t *testing.T) { }{ { "receiver isn't a map", - "receivers:\n some-receiver: string", + "receivers:\n some-receiver: string\nservice:\n pipelines:\n metrics:\n receivers: [some-receiver]", }, { "receiver's endpoint isn't string", - "receivers:\n some-receiver:\n endpoint: 123", + "receivers:\n some-receiver:\n endpoint: 123\nservice:\n pipelines:\n metrics:\n receivers: [some-receiver]", }, } { t.Run(tt.desc, func(t *testing.T) { @@ -212,7 +220,14 @@ func TestParserFailed(t *testing.T) { config := map[interface{}]interface{}{ "receivers": map[interface{}]interface{}{ - "mock": map[interface{}]interface{}{}, + "mock": map[string]interface{}{}, + }, + "service": map[interface{}]interface{}{ + "pipelines": map[interface{}]interface{}{ + "metrics": map[interface{}]interface{}{ + "receivers": []interface{}{"mock"}, + }, + }, }, } diff --git a/pkg/collector/adapters/config_validate.go b/pkg/collector/adapters/config_validate.go new file mode 100644 index 000000000..c7fc0fa87 --- /dev/null +++ b/pkg/collector/adapters/config_validate.go @@ -0,0 +1,111 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters + +import ( + "github.com/go-logr/logr" +) + +//Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. +//GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. +func GetEnabledReceivers(logger logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { + cfgReceivers, ok := config["receivers"] + if !ok { + return nil + } + receivers, ok := cfgReceivers.(map[interface{}]interface{}) + if !ok { + return nil + } + availableReceivers := map[interface{}]bool{} + + for recvID := range receivers { + + //Safe Cast + receiverID, ok := recvID.(string) + if !ok { + return nil + } + //Getting all receivers present in the receivers section and setting them to false. + availableReceivers[receiverID] = false + } + + cfgService, ok := config["service"].(map[interface{}]interface{}) + if !ok { + return nil + } + + pipeline, ok := cfgService["pipelines"].(map[interface{}]interface{}) + if !ok { + return nil + } + availablePipelines := map[string]bool{} + + for pipID := range pipeline { + //Safe Cast + pipelineID, ok := pipID.(string) + if !ok { + return nil + } + //Getting all the available pipelines. + availablePipelines[pipelineID] = true + } + + if len(pipeline) > 0 { + for pipelineID, pipelineCfg := range pipeline { + //Safe Cast + pipelineV, ok := pipelineID.(string) + if !ok { + continue + } + //Condition will get information if there are multiple configured pipelines. + if len(pipelineV) > 0 { + pipelineDesc, ok := pipelineCfg.(map[interface{}]interface{}) + if !ok { + return nil + } + for pipSpecID, pipSpecCfg := range pipelineDesc { + if pipSpecID.(string) == "receivers" { + receiversList, ok := pipSpecCfg.([]interface{}) + if !ok { + continue + } + // If receiversList is empty means that we haven't any enabled Receiver. + if len(receiversList) == 0 { + availableReceivers = nil + } else { + // All enabled receivers will be set as true + for _, recKey := range receiversList { + //Safe Cast + receiverKey, ok := recKey.(string) + if !ok { + return nil + } + availableReceivers[receiverKey] = true + } + } + //Removing all non-enabled receivers + for recID, recKey := range availableReceivers { + if !(recKey) { + delete(availableReceivers, recID) + } + } + } + } + } + } + } + return availableReceivers +} diff --git a/pkg/collector/adapters/config_validate_test.go b/pkg/collector/adapters/config_validate_test.go new file mode 100644 index 000000000..27cd8a7d7 --- /dev/null +++ b/pkg/collector/adapters/config_validate_test.go @@ -0,0 +1,107 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package adapters + +import ( + "testing" + + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/stretchr/testify/require" +) + +var logger = logf.Log.WithName("unit-tests") + +func TestConfigValidate(t *testing.T) { + // prepare + + // First Test - Exporters + configStr := ` +receivers: + httpd/mtls: + protocols: + http: + endpoint: mysite.local:55690 + jaeger: + protocols: + grpc: + prometheus: + protocols: + grpc: + +processors: + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [httpd/mtls, jaeger] + exporters: [logging] + metrics/1: + receivers: [httpd/mtls, jaeger] + exporters: [logging] +` + // // prepare + config, err := ConfigFromString(configStr) + require.NoError(t, err) + require.NotEmpty(t, config) + + // test + check := GetEnabledReceivers(logger, config) + require.NotEmpty(t, check) +} + +func TestEmptyEnabledReceivers(t *testing.T) { + // prepare + + // First Test - Exporters + configStr := ` +receivers: + httpd/mtls: + protocols: + http: + endpoint: mysite.local:55690 + jaeger: + protocols: + grpc: + prometheus: + protocols: + grpc: + +processors: + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [] + exporters: [] + metrics/1: + receivers: [] + exporters: [] +` + // // prepare + config, err := ConfigFromString(configStr) + require.NoError(t, err) + require.NotEmpty(t, config) + + // test + check := GetEnabledReceivers(logger, config) + require.Empty(t, check) +} diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 09f031082..b55c32260 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -64,7 +64,7 @@ exporters: service: pipelines: metrics: - receivers: [prometheus] + receivers: [prometheus, jaeger] processors: [] exporters: [logging]`, } @@ -114,6 +114,7 @@ service: processors: [] receivers: - prometheus + - jaeger `, } diff --git a/pkg/collector/testdata/test.yaml b/pkg/collector/testdata/test.yaml index a14808f3b..c920cee82 100644 --- a/pkg/collector/testdata/test.yaml +++ b/pkg/collector/testdata/test.yaml @@ -17,6 +17,6 @@ exporters: service: pipelines: metrics: - receivers: [prometheus] + receivers: [prometheus, jaeger] processors: [] exporters: [logging] \ No newline at end of file From acfec1cd57b166f771b54c437e89863408197a1c Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 8 Apr 2022 13:57:58 +0200 Subject: [PATCH 0477/1234] Use golang 1.18 (#786) Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- .golangci.yaml | 2 +- Dockerfile | 2 +- cmd/otel-allocator/Dockerfile | 4 ++-- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 2 -- go.mod | 2 +- go.sum | 12 ------------ 11 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 502b1aced..ec4d9d5bf 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: args: -v - version: v1.44 + version: v1.45 security: name: Security diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 3e380844a..15d8fa278 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 05b3cda5d..d4c38ac47 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - uses: actions/checkout@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index e2b19c291..ce8f19af7 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.golangci.yaml b/.golangci.yaml index 09c1d7f7d..f41ad3e7e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -21,4 +21,4 @@ linters: - gosec - exhaustive - godot - - unparam \ No newline at end of file + - unparam diff --git a/Dockerfile b/Dockerfile index d44964bc4..a55a53c21 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index f87d54e62..36eaf707f 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,5 +1,5 @@ # Build the target allocator binary -FROM golang:1.17 as builder +FROM golang:1.18 as builder WORKDIR /app @@ -23,4 +23,4 @@ WORKDIR /root/ # Copy the pre-built binary file from the previous stage COPY --from=builder /app/main . -CMD ["./main"] \ No newline at end of file +CMD ["./main"] diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 53df37a7c..ee747d5cd 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -1,6 +1,6 @@ module github.com/otel-allocator -go 1.17 +go 1.18 require ( github.com/fsnotify/fsnotify v1.5.1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index ee673f9ce..c5cdbc2f8 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -177,7 +177,6 @@ github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6 github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -1630,7 +1629,6 @@ k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= diff --git a/go.mod b/go.mod index 9d1116b14..8e8df6b59 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.17 +go 1.18 require ( github.com/Masterminds/semver/v3 v3.1.1 diff --git a/go.sum b/go.sum index 11ab0206a..be77cc625 100644 --- a/go.sum +++ b/go.sum @@ -102,7 +102,6 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -186,7 +185,6 @@ github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= @@ -428,7 +426,6 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -831,7 +828,6 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= @@ -845,16 +841,13 @@ github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1126,7 +1119,6 @@ go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1269,7 +1261,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1374,7 +1365,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1499,7 +1489,6 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1729,7 +1718,6 @@ k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8 k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= From b77c89d6ea846ba5d184a4ab8716744e190ef677 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 12 Apr 2022 16:19:37 +0200 Subject: [PATCH 0478/1234] Set replicas to default value (#814) * Set replicas to default value Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- .../opentelemetrycollector_webhook.go | 14 ++-- .../opentelemetrycollector_webhook_test.go | 78 +++++++++++++++++++ 2 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 apis/v1alpha1/opentelemetrycollector_webhook_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 56cbec4ed..f4a6b4f06 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -40,6 +40,8 @@ var _ webhook.Defaulter = &OpenTelemetryCollector{} // Default implements webhook.Defaulter so a webhook will be registered for the type. func (r *OpenTelemetryCollector) Default() { + opentelemetrycollectorlog.Info("default", "name", r.Name) + if len(r.Spec.Mode) == 0 { r.Spec.Mode = ModeDeployment } @@ -54,7 +56,12 @@ func (r *OpenTelemetryCollector) Default() { r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" } - opentelemetrycollectorlog.Info("default", "name", r.Name) + if r.Spec.Replicas == nil { + // We can default to one because dependent objects Deployment and HorizontalPodAutoScaler + // default to 1 as well. + one := int32(1) + r.Spec.Replicas = &one + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -86,11 +93,6 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'volumeClaimTemplates'", r.Spec.Mode) } - // validate replicas - if (r.Spec.Mode == ModeSidecar || r.Spec.Mode == ModeDaemonSet) && r.Spec.Replicas != nil { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'replicas'", r.Spec.Mode) - } - // validate tolerations if r.Spec.Mode == ModeSidecar && len(r.Spec.Tolerations) > 0 { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go new file mode 100644 index 000000000..39dc70955 --- /dev/null +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -0,0 +1,78 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestOTELColDefaultingWebhook(t *testing.T) { + one := int32(1) + five := int32(5) + tests := []struct { + name string + otelcol OpenTelemetryCollector + expected OpenTelemetryCollector + }{ + { + name: "all fields default", + otelcol: OpenTelemetryCollector{}, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + }, + }, + }, + { + name: "provided values in spec", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Replicas: &five, + UpgradeStrategy: "adhoc", + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Replicas: &five, + UpgradeStrategy: "adhoc", + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + test.otelcol.Default() + assert.Equal(t, test.expected, test.otelcol) + }) + } +} From 5dd5da059299d7c78edb1155512a42a9df2a5d36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 07:39:19 +0200 Subject: [PATCH 0479/1234] Bump go.opentelemetry.io/otel from 1.6.2 to 1.6.3 (#815) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.6.2 to 1.6.3. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.6.2...v1.6.3) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8e8df6b59..f5e98b07c 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.6.2 + go.opentelemetry.io/otel v1.6.3 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.5 k8s.io/apimachinery v0.23.5 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.6.2 // indirect + go.opentelemetry.io/otel/trace v1.6.3 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index be77cc625..b33276515 100644 --- a/go.sum +++ b/go.sum @@ -1095,8 +1095,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.6.2 h1:iLrj1F5ydCSVc4CGjBX2ou/QRav3C8xHjHlVoch6g4w= -go.opentelemetry.io/otel v1.6.2/go.mod h1:MUBZHaB2cm6CahEBHQPq9Anos7IXynP/noVpjsxQTSc= +go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE= +go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1104,8 +1104,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.6.2 h1:oY7i1k6XD/ozlGo7ASy+H1UdkNcj9cPfuklaYSXtoFk= -go.opentelemetry.io/otel/trace v1.6.2/go.mod h1:RMqfw8Mclba1p7sXDmEDBvrB8jw65F6GOoN1fyyXTzk= +go.opentelemetry.io/otel/trace v1.6.3 h1:IqN4L+5b0mPNjdXIiZ90Ni4Bl5BRkDQywePLWemd9bc= +go.opentelemetry.io/otel/trace v1.6.3/go.mod h1:GNJQusJlUgZl9/TQBPKU/Y/ty+0iVB5fjhKeJGZPGFs= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From 7cedc895904fef2037933ecd311bc150273173b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 07:40:06 +0200 Subject: [PATCH 0480/1234] Bump actions/setup-go from 2 to 3 (#816) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 4 ++-- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index ec4d9d5bf..1a3a6aa8e 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 - name: Check out code into the Go module directory diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 15d8fa278..f7a29d34b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,7 +22,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d4c38ac47..ceed9ccc4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index ce8f19af7..bf139f059 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 From c65d44afdc1b7b7a55d43e6a5930e836b8c975fe Mon Sep 17 00:00:00 2001 From: Anthony Mirabella Date: Mon, 18 Apr 2022 08:41:04 -0400 Subject: [PATCH 0481/1234] Publish container images for ARM64 in addition to AMD64 (#823) * Publish container images for ARM64 in addition to AMD64 Signed-off-by: Anthony J Mirabella * Publish ARM64 images for target allocator, too Signed-off-by: Anthony J Mirabella * Do not require buildx Signed-off-by: Anthony J Mirabella * Publish ARM64 images for autoinstrumentation, too Signed-off-by: Anthony J Mirabella --- .../publish-autoinstrumentation-java.yaml | 17 +++++++++++++++++ .../publish-autoinstrumentation-nodejs.yaml | 17 +++++++++++++++++ .../publish-autoinstrumentation-python.yaml | 17 +++++++++++++++++ .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 17 +++++++++++++++++ Dockerfile | 3 ++- cmd/otel-allocator/Dockerfile | 4 +++- 7 files changed, 74 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index a7176fc19..92c4b020f 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -31,6 +31,20 @@ jobs: tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1.6.0 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to GitHub Package Registry uses: docker/login-action@v1.14.1 with: @@ -42,7 +56,10 @@ jobs: uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/java + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index c90049591..d732180ef 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -31,6 +31,20 @@ jobs: tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1.6.0 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to GitHub Package Registry uses: docker/login-action@v1.14.1 with: @@ -42,7 +56,10 @@ jobs: uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/nodejs + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 30c892683..53ae2494e 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -31,6 +31,20 @@ jobs: tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1.6.0 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to GitHub Package Registry uses: docker/login-action@v1.14.1 with: @@ -42,7 +56,10 @@ jobs: uses: docker/build-push-action@v2.10.0 with: context: autoinstrumentation/python + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 897b0430d..d8970eb74 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -67,7 +67,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 2e476453a..a2fe61f41 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -27,6 +27,20 @@ jobs: tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1.6.0 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to GitHub Package Registry uses: docker/login-action@v1.14.1 with: @@ -38,7 +52,10 @@ jobs: uses: docker/build-push-action@v2.10.0 with: context: cmd/otel-allocator + platforms: linux/amd64,linux/arm64 push: true build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index a55a53c21..501565fef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ COPY internal/ internal/ COPY pkg/ pkg/ COPY versions.txt versions.txt +ARG TARGETARCH=amd64 ARG VERSION_PKG ARG VERSION ARG VERSION_DATE @@ -27,7 +28,7 @@ ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 36eaf707f..a2e34c0f9 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,6 +1,8 @@ # Build the target allocator binary FROM golang:1.18 as builder +ARG TARGETARCH=amd64 + WORKDIR /app # Copy go mod and sum files @@ -11,7 +13,7 @@ RUN go mod download COPY . . # Build the Go app -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -installsuffix cgo -o main . ######## Start a new stage from scratch ####### FROM alpine:latest From 156112fec91ee1a39e527856c76944a9f339a998 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 08:45:49 +0200 Subject: [PATCH 0482/1234] Bump k8s.io/api from 0.23.5 to 0.23.6 (#830) Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.23.5 to 0.23.6. - [Release notes](https://github.com/kubernetes/api/releases) - [Commits](https://github.com/kubernetes/api/compare/v0.23.5...v0.23.6) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index f5e98b07c..8f701a628 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,8 @@ require ( github.com/stretchr/testify v1.7.1 go.opentelemetry.io/otel v1.6.3 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.5 - k8s.io/apimachinery v0.23.5 + k8s.io/api v0.23.6 + k8s.io/apimachinery v0.23.6 k8s.io/client-go v0.23.5 k8s.io/kubectl v0.23.5 sigs.k8s.io/controller-runtime v0.11.2 diff --git a/go.sum b/go.sum index b33276515..c5a4140a5 100644 --- a/go.sum +++ b/go.sum @@ -1695,14 +1695,16 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.23.5 h1:zno3LUiMubxD/V1Zw3ijyKO3wxrhbUF1Ck+VjBvfaoA= k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= +k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw= +k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g= k8s.io/apiextensions-apiserver v0.23.5 h1:5SKzdXyvIJKu+zbfPc3kCbWpbxi+O+zdmAJBm26UJqI= k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.23.5 h1:Va7dwhp8wgkUPWsEXk6XglXWU4IKYLKNlv8VkX7SDM0= k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= +k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= From cb44baf7036414a7aef841a19bcfdfa8d19ac431 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 08:46:21 +0200 Subject: [PATCH 0483/1234] Bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0 (#831) Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.3 to 1.5.0. - [Release notes](https://github.com/mitchellh/mapstructure/releases) - [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.3...v1.5.0) --- updated-dependencies: - dependency-name: github.com/mitchellh/mapstructure dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8f701a628..e96b3d498 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v1.2.3 - github.com/mitchellh/mapstructure v1.4.3 + github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 diff --git a/go.sum b/go.sum index c5a4140a5..d02940b5a 100644 --- a/go.sum +++ b/go.sum @@ -793,8 +793,8 @@ github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= From 8e7a34e2297dbb2fe83bb7db2945636c81bf320b Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 22 Apr 2022 08:55:48 +0200 Subject: [PATCH 0484/1234] Release v0.49.0 (#822) Signed-off-by: Yuri Sa --- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9f551d7c..3bb7b0ff7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ Changes by Version ================== +0.49.0 +------------------- +### 🚀 New components 🚀 +* Including new label ([#797](https://github.com/open-telemetry/opentelemetry-operator/pull/797), [@yuriolisa](https://github.com/yuriolisa)) +* Add scale subresource status to the OpenTelemetryCollector CRD status ([#785](https://github.com/open-telemetry/opentelemetry-operator/pull/785), [@secat](https://github.com/secat)) +### 💡 Enhancements 💡 +* Set replicas to default value ([#814](https://github.com/open-telemetry/opentelemetry-operator/pull/814), [@pavolloffay](https://github.com/pavolloffay)) +* Use golang 1.18 ([#786](https://github.com/open-telemetry/opentelemetry-operator/pull/786), [@pavolloffay](https://github.com/pavolloffay)) +* Support nodeSelector field for non-sidecar collectors ([#789](https://github.com/open-telemetry/opentelemetry-operator/pull/789), [@jutley](https://github.com/jutley)) +* Fix Missing parameter on labels function ([#809](https://github.com/open-telemetry/opentelemetry-operator/pull/809), [@yuriolisa](https://github.com/yuriolisa)) +### 🧰 Bug fixes 🧰 +* Check exposed svc ports ([#778](https://github.com/open-telemetry/opentelemetry-operator/pull/778), [@yuriolisa](https://github.com/yuriolisa)) +* Fix panic when spec.replicas is nil ([#798](https://github.com/open-telemetry/opentelemetry-operator/pull/798), [@wei840222](https://github.com/wei840222)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.49.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.49.0) +* [OpenTelemetry Contrib - v0.49.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.49.0) 0.48.0 ------------------- diff --git a/README.md b/README.md index 9e58d4f6a..95adad872 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.49.0 | v1.19 to v1.23 | 1.6.1 | | v0.48.0 | v1.19 to v1.23 | 1.6.1 | | v0.47.0 | v1.19 to v1.23 | 1.6.1 | | v0.46.0 | v1.19 to v1.23 | 1.6.1 | @@ -277,7 +278,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.34.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.33.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.32.0 (skipped) | n/a | n/a | -| v0.31.0 | v1.19 to v1.21 | v1.4.0 to v1.5.4 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 594d4c8c0..137e73f08 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.48.0 + name: opentelemetry-operator.v0.49.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.48.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.49.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.48.0 + version: 0.49.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index c5d17b581..15f214ed9 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.48.0 +opentelemetry-collector=0.49.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.48.0 +operator=0.49.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 7b3a1d1414efbc4d998152807c5c2b34c9fc1cf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 09:25:28 +0200 Subject: [PATCH 0485/1234] Bump k8s.io/client-go from 0.23.5 to 0.23.6 (#829) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.23.5 to 0.23.6. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.23.5...v0.23.6) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index e96b3d498..1c828855e 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.6 k8s.io/apimachinery v0.23.6 - k8s.io/client-go v0.23.5 + k8s.io/client-go v0.23.6 k8s.io/kubectl v0.23.5 sigs.k8s.io/controller-runtime v0.11.2 ) diff --git a/go.sum b/go.sum index d02940b5a..725e74e22 100644 --- a/go.sum +++ b/go.sum @@ -1709,8 +1709,9 @@ k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.23.5 h1:zUXHmEuqx0RY4+CsnkOn5l0GU+skkRXKGJrhmE2SLd8= k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= +k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= +k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE= k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= From a84a44cb910664d690e3c1245fc4ac0dbddcce4d Mon Sep 17 00:00:00 2001 From: Sebastian Poxhofer Date: Fri, 22 Apr 2022 09:31:46 +0200 Subject: [PATCH 0486/1234] [targetallocator] PrometheusOperator CRD MVC (#653) * feat(target-allocator): allow custom config file path * feat(target-allocator): move CLI config options to config package * feat(target-allocator): allow running outside of cluster for debugging * introduce meta watcher * add event source * fix: log panics * fix: race condition * fixup! fix: log panics * feat: implement promCR retrieval * feat: functioning * refactor: some cleanup * feat(target-allocator): escape job names in query parameters * feat(target-allocator): make prometheusCR lookup optional and allow using kubernetes_sd outside of cluster * refactor(target-allocator): improve memory usage and comments * chore(target-allocator): update PromOperator and Kubernetes deps * refactor(target-allocator): use exclude instead of replace directive * ci: add Makefile targets for target allocator * tests: add kuttl tests for PrometheusCR feature of target allocator * docs(targetAllocator): add README.md * fixup CRD docs * fix(Makefile): add missing PHONY tags * implement change requests * go mod tidy and fix linting --- Makefile | 20 +- apis/v1alpha1/opentelemetrycollector_types.go | 11 + apis/v1alpha1/zz_generated.deepcopy.go | 16 + ...ntelemetry.io_opentelemetrycollectors.yaml | 12 + cmd/otel-allocator/Dockerfile | 2 +- cmd/otel-allocator/README.md | 85 + cmd/otel-allocator/allocation/allocator.go | 5 +- cmd/otel-allocator/allocation/http.go | 3 +- cmd/otel-allocator/collector/collector.go | 15 +- cmd/otel-allocator/config/config.go | 66 +- cmd/otel-allocator/discovery/discovery.go | 33 +- cmd/otel-allocator/go.mod | 176 +- cmd/otel-allocator/go.sum | 1479 +++++++++++++++-- cmd/otel-allocator/main.go | 110 +- cmd/otel-allocator/watcher/file.go | 55 + cmd/otel-allocator/watcher/main.go | 92 + cmd/otel-allocator/watcher/promOperator.go | 156 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 12 + docs/api.md | 34 + pkg/targetallocator/container.go | 5 + .../e2e/smoke-targetallocator/02-install.yaml | 1 + .../targetallocator-features/02-assert.yaml | 2 + .../targetallocator-features/02-install.yaml | 3 + 23 files changed, 2119 insertions(+), 274 deletions(-) create mode 100644 cmd/otel-allocator/README.md create mode 100644 cmd/otel-allocator/watcher/file.go create mode 100644 cmd/otel-allocator/watcher/main.go create mode 100644 cmd/otel-allocator/watcher/promOperator.go diff --git a/Makefile b/Makefile index 5c7069ff7..9c423a0e5 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,9 @@ IMG_REPO ?= opentelemetry-operator IMG ?= ${IMG_PREFIX}/${IMG_REPO}:${VERSION} BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} +TARGETALLOCATOR_IMG_REPO ?= target-allocator +TARGETALLOCATOR_IMG ?= ${IMG_PREFIX}/${TARGETALLOCATOR_IMG_REPO}:$(addprefix v,${VERSION}) + # Options for 'bundle-build' ifneq ($(origin CHANNELS), undefined) BUNDLE_CHANNELS := --channels=$(CHANNELS) @@ -149,7 +152,7 @@ e2e: $(KUTTL) test .PHONY: prepare-e2e -prepare-e2e: kuttl set-test-image-vars set-image-controller container start-kind +prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind load-image-all mkdir -p tests/_build/crds tests/_build/manifests $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ @@ -161,6 +164,7 @@ scorecard-tests: operator-sdk .PHONY: set-test-image-vars set-test-image-vars: $(eval IMG=local/opentelemetry-operator:e2e) + $(eval TARGETALLOCATOR_IMG=local/opentelemetry-operator-targetallocator:e2e) # Build the container image, used only for local dev purposes .PHONY: container @@ -172,11 +176,25 @@ container: container-push: docker push ${IMG} +.PHONY: container-target-allocator +container-target-allocator: + docker build -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator + .PHONY: start-kind start-kind: kind create cluster --config $(KIND_CONFIG) + +.PHONY: load-image-all +load-image-all: load-image-operator load-image-target-allocator + +.PHONY: load-image-operator +load-image-operator: kind load docker-image local/opentelemetry-operator:e2e +.PHONY: load-image-target-allocator +load-image-target-allocator: + kind load docker-image ${TARGETALLOCATOR_IMG} + .PHONY: cert-manager cert-manager: cmctl # Consider using cmctl to install the cert-manager once install command is not experimental diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 61f7e3f16..0fc999188 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -129,11 +129,22 @@ type OpenTelemetryTargetAllocator struct { // +optional Enabled bool `json:"enabled,omitempty"` + // PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. + // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. + // +optional + PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` + // Image indicates the container image to use for the OpenTelemetry TargetAllocator. // +optional Image string `json:"image,omitempty"` } +type OpenTelemetryTargetAllocatorPrometheusCR struct { + // Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. + // +optional + Enabled bool `json:"enabled,omitempty"` +} + // ScaleSubresourceStatus defines the observed state of the OpenTelemetryCollector's // scale subresource. type ScaleSubresourceStatus struct { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index e375a200c..ef246bbdf 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -380,6 +380,7 @@ func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { *out = *in + out.PrometheusCR = in.PrometheusCR } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. @@ -392,6 +393,21 @@ func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopyInto(out *OpenTelemetryTargetAllocatorPrometheusCR) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocatorPrometheusCR. +func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopy() *OpenTelemetryTargetAllocatorPrometheusCR { + if in == nil { + return nil + } + out := new(OpenTelemetryTargetAllocatorPrometheusCR) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Python) DeepCopyInto(out *Python) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 528f57088..b9eba01c8 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -680,6 +680,18 @@ spec: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. type: string + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR + instances which the ServiceAccount has access to will be retrieved. + This includes other namespaces. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + type: object type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index a2e34c0f9..3179bf22c 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -25,4 +25,4 @@ WORKDIR /root/ # Copy the pre-built binary file from the previous stage COPY --from=builder /app/main . -CMD ["./main"] +ENTRYPOINT ["./main"] diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md new file mode 100644 index 000000000..bff32f383 --- /dev/null +++ b/cmd/otel-allocator/README.md @@ -0,0 +1,85 @@ +# Target Allocator + +The TargetAllocator is an optional separately deployed component of an OpenTelemetry Collector setup, which is used to +distribute targets of the PrometheusReceiver on all deployed Collector instances. + +# Design + +If the Allocator is activated, all Prometheus configurations will be transferred in a separate ConfigMap which get in +turn mounted to the Allocator. +This configuration will be resolved to target configurations and then split across all OpenTelemetryCollector instances. + +TargetAllocators expose the results as [HTTP_SD endpoints](https://prometheus.io/docs/prometheus/latest/http_sd/) +split by collector. + +#### Endpoints +`/jobs`: + +```json +{ + "job1": { + "_link": "/jobs/job1/targets" + }, + "job2": { + "_link": "/jobs/job1/targets" + } +} + +``` + +`/jobs/{jobID}/targets`: + +```json +{ + "collector-1": { + "_link": "/jobs/job1/targets?collector_id=collector-1", + "targets": [ + { + "Targets": [ + "10.100.100.100", + "10.100.100.101", + "10.100.100.102" + ], + "Labels": { + "namespace": "a_namespace", + "pod": "a_pod" + } + } + ] + } +} +``` + +`/jobs/{jobID}/targets?collector_id={collectorID}`: + +```json +[ + { + "targets": [ + "10.100.100.100", + "10.100.100.101", + "10.100.100.102" + ], + "labels": { + "namespace": "a_namespace", + "pod": "a_pod" + } + } +] +``` + + +## Packages +### Watchers +Watchers are responsible for the translation of external sources into Prometheus readable scrape configurations and +triggers updates to the DiscoveryManager + +### DiscoveryManager +Watches the Prometheus service discovery for new targets and sets targets to the Allocator + +### Allocator +Shards the received targets based on the discovered Collector instances + +### Collector +Client to watch for deployed Collector instances which will then provided to the Allocator. + diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go index f7280e2cd..4b155632e 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/allocation/allocator.go @@ -2,6 +2,7 @@ package allocation import ( "fmt" + "net/url" "sync" "github.com/go-logr/logr" @@ -80,7 +81,7 @@ func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. // SetCollectors is called when Collectors are added or removed func (allocator *Allocator) SetCollectors(collectors []string) { - log := allocator.log.WithValues("opentelemetry-targetallocator") + log := allocator.log.WithValues("component", "opentelemetry-targetallocator") allocator.m.Lock() defer allocator.m.Unlock() @@ -132,7 +133,7 @@ func (allocator *Allocator) processWaitingTargets() { allocator.TargetItems[k] = &v targetItem := TargetItem{ JobName: v.JobName, - Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", v.JobName)}, + Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(v.JobName))}, TargetURL: v.TargetURL, Label: v.Label, Collector: col, diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 7d850018b..d691ca77c 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -2,6 +2,7 @@ package allocation import ( "fmt" + "net/url" "github.com/prometheus/common/model" ) @@ -43,7 +44,7 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *All targetGroupList = append(targetGroupList, targetGroupJSON{Targets: targets, Labels: labelSetMap[targets[0]]}) } - displayData[j.Collector.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", j.JobName, j.Collector.Name), Jobs: targetGroupList} + displayData[j.Collector.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(j.JobName), j.Collector.Name), Jobs: targetGroupList} } } diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index c7162042d..0578bab1e 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -30,13 +30,8 @@ type Client struct { close chan struct{} } -func NewClient(logger logr.Logger) (*Client, error) { - config, err := rest.InClusterConfig() - if err != nil { - return &Client{}, err - } - - clientset, err := kubernetes.NewForConfig(config) +func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { + clientset, err := kubernetes.NewForConfig(kubeConfig) if err != nil { return &Client{}, err } @@ -50,7 +45,7 @@ func NewClient(logger logr.Logger) (*Client, error) { func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors []string)) { collectorMap := map[string]bool{} - log := k.log.WithValues("opentelemetry-targetallocator") + log := k.log.WithValues("component", "opentelemetry-targetallocator") opts := metav1.ListOptions{ LabelSelector: labels.SelectorFromSet(labelMap).String(), @@ -83,7 +78,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( return } if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { - log.Info("Collector pod watch event stopped", msg) + log.Info("Collector pod watch event stopped " + msg) return } } @@ -91,7 +86,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( } func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]bool, fn func(collectors []string)) string { - log := k.log.WithValues("opentelemetry-targetallocator") + log := k.log.WithValues("component", "opentelemetry-targetallocator") for { select { case <-k.close: diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index a88dbd68c..d1776506e 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -2,12 +2,24 @@ package config import ( "errors" + "flag" "fmt" + "io/fs" "io/ioutil" + "path/filepath" + "time" + "github.com/go-logr/logr" promconfig "github.com/prometheus/prometheus/config" _ "github.com/prometheus/prometheus/discovery/install" + "github.com/spf13/pflag" "gopkg.in/yaml.v2" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "k8s.io/klog/v2" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/log/zap" ) // ErrInvalidYAML represents an error in the format of the original YAML configuration file. @@ -15,18 +27,29 @@ var ( ErrInvalidYAML = errors.New("couldn't parse the loadbalancer configuration") ) -const defaultConfigFile string = "/conf/targetallocator.yaml" +const DefaultResyncTime = 5 * time.Minute +const DefaultConfigFilePath string = "/conf/targetallocator.yaml" type Config struct { LabelSelector map[string]string `yaml:"label_selector,omitempty"` Config *promconfig.Config `yaml:"config"` } -func Load(file string) (Config, error) { - if file == "" { - file = defaultConfigFile - } +type PrometheusCRWatcherConfig struct { + Enabled *bool +} +type CLIConfig struct { + ListenAddr *string + ConfigFilePath *string + ClusterConfig *rest.Config + // KubeConfigFilePath empty if in cluster configuration is in use + KubeConfigFilePath string + RootLogger logr.Logger + PromCRWatcherConf PrometheusCRWatcherConfig +} + +func Load(file string) (Config, error) { var cfg Config if err := unmarshal(&cfg, file); err != nil { return Config{}, err @@ -45,3 +68,36 @@ func unmarshal(cfg *Config, configFile string) error { } return nil } + +func ParseCLI() (CLIConfig, error) { + opts := zap.Options{} + opts.BindFlags(flag.CommandLine) + cLIConf := CLIConfig{ + ListenAddr: pflag.String("listen-addr", ":8080", "The address where this service serves."), + ConfigFilePath: pflag.String("config-file", DefaultConfigFilePath, "The path to the config file."), + PromCRWatcherConf: PrometheusCRWatcherConfig{ + Enabled: pflag.Bool("enable-prometheus-cr-watcher", false, "Enable Prometheus CRs as target sources"), + }, + } + kubeconfigPath := pflag.String("kubeconfig-path", filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + pflag.Parse() + + cLIConf.RootLogger = zap.New(zap.UseFlagOptions(&opts)) + klog.SetLogger(cLIConf.RootLogger) + ctrl.SetLogger(cLIConf.RootLogger) + + clusterConfig, err := clientcmd.BuildConfigFromFlags("", *kubeconfigPath) + cLIConf.KubeConfigFilePath = *kubeconfigPath + if err != nil { + if _, ok := err.(*fs.PathError); !ok { + return CLIConfig{}, err + } + clusterConfig, err = rest.InClusterConfig() + if err != nil { + return CLIConfig{}, err + } + cLIConf.KubeConfigFilePath = "" // reset as we use in cluster configuration + } + cLIConf.ClusterConfig = clusterConfig + return cLIConf, nil +} diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 96eb74969..4dfb74c2b 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -6,16 +6,18 @@ import ( "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/otel-allocator/allocation" - "github.com/otel-allocator/config" + allocatorWatcher "github.com/otel-allocator/watcher" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" ) type Manager struct { - log logr.Logger - manager *discovery.Manager - logger log.Logger - close chan struct{} + log logr.Logger + manager *discovery.Manager + logger log.Logger + close chan struct{} + configsMap map[allocatorWatcher.EventSource]*config.Config } func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options ...func(*discovery.Manager)) *Manager { @@ -27,24 +29,29 @@ func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options } }() return &Manager{ - log: log, - manager: manager, - logger: logger, - close: make(chan struct{}), + log: log, + manager: manager, + logger: logger, + close: make(chan struct{}), + configsMap: make(map[allocatorWatcher.EventSource]*config.Config), } } -func (m *Manager) ApplyConfig(cfg config.Config) error { +func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { + m.configsMap[source] = cfg + discoveryCfg := make(map[string]discovery.Configs) - for _, scrapeConfig := range cfg.Config.ScrapeConfigs { - discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs + for _, value := range m.configsMap { + for _, scrapeConfig := range value.ScrapeConfigs { + discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs + } } return m.manager.ApplyConfig(discoveryCfg) } func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { - log := m.log.WithValues("opentelemetry-targetallocator") + log := m.log.WithValues("component", "opentelemetry-targetallocator") go func() { for { diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index ee747d5cd..3ad2e1b7f 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -4,117 +4,165 @@ go 1.18 require ( github.com/fsnotify/fsnotify v1.5.1 - github.com/go-kit/log v0.1.0 - github.com/go-logr/logr v0.4.0 + github.com/go-kit/log v0.2.0 + github.com/go-logr/logr v1.2.0 github.com/gorilla/mux v1.8.0 - github.com/prometheus/common v0.30.0 - github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 + github.com/prometheus-operator/prometheus-operator v0.53.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 + github.com/prometheus/common v0.32.1 + github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.22.1 - k8s.io/apimachinery v0.22.1 - k8s.io/client-go v0.22.1 - sigs.k8s.io/controller-runtime v0.9.6 + k8s.io/api v0.23.0 + k8s.io/apimachinery v0.23.0 + k8s.io/client-go v0.23.0 + k8s.io/klog/v2 v2.30.0 + sigs.k8s.io/controller-runtime v0.11.0 ) require ( - cloud.google.com/go v0.83.0 // indirect - github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect + cloud.google.com/go v0.97.0 // indirect + github.com/Azure/azure-sdk-for-go v59.4.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.19 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect + github.com/Azure/go-autorest/autorest v0.11.22 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.17 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.4.16 // indirect - github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect - github.com/armon/go-metrics v0.3.3 // indirect - github.com/aws/aws-sdk-go v1.38.60 // indirect + github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect + github.com/armon/go-metrics v0.3.9 // indirect + github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect + github.com/aws/aws-sdk-go v1.42.16 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect - github.com/containerd/containerd v1.4.3 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe // indirect + github.com/containerd/containerd v1.5.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/digitalocean/godo v1.62.0 // indirect + github.com/dennwc/varint v1.0.0 // indirect + github.com/digitalocean/godo v1.72.0 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.7+incompatible // indirect + github.com/docker/docker v20.10.11+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/evanphx/json-patch v4.11.0+incompatible // indirect - github.com/fatih/color v1.9.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect - github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/zapr v0.4.0 // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 // indirect + github.com/envoyproxy/go-control-plane v0.10.1 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/fatih/color v1.12.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-openapi/analysis v0.20.0 // indirect + github.com/go-openapi/errors v0.20.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/loads v0.20.2 // indirect + github.com/go-openapi/runtime v0.19.29 // indirect + github.com/go-openapi/spec v0.20.3 // indirect + github.com/go-openapi/strfmt v0.21.1 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/go-openapi/validate v0.20.2 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-stack/stack v1.8.0 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.6 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/google/uuid v1.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.1.1 // indirect github.com/googleapis/gnostic v0.5.5 // indirect - github.com/gophercloud/gophercloud v0.18.0 // indirect - github.com/hashicorp/consul/api v1.8.1 // indirect - github.com/hashicorp/go-cleanhttp v0.5.1 // indirect - github.com/hashicorp/go-hclog v0.12.2 // indirect - github.com/hashicorp/go-immutable-radix v1.2.0 // indirect + github.com/gophercloud/gophercloud v0.23.0 // indirect + github.com/hashicorp/consul/api v1.11.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-hclog v0.16.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-version v1.3.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/serf v0.9.5 // indirect - github.com/hetznercloud/hcloud-go v1.26.2 // indirect + github.com/hetznercloud/hcloud-go v1.33.1 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/json-iterator/go v1.1.11 // indirect - github.com/linode/linodego v0.28.5 // indirect - github.com/mattn/go-colorable v0.1.6 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect + github.com/linode/linodego v1.2.1 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/miekg/dns v1.1.42 // indirect + github.com/miekg/dns v1.1.43 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/mitchellh/hashstructure v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 // indirect + github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a // indirect github.com/prometheus/client_golang v1.11.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect - github.com/sirupsen/logrus v1.7.0 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/cobra v1.2.1 // indirect + github.com/thanos-io/thanos v0.24.0-rc.1 // indirect + github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect + github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + go.mongodb.org/mongo-driver v1.7.5 // indirect go.opencensus.io v0.23.0 // indirect - go.uber.org/atomic v1.8.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.0 // indirect - golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect - golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect - golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect - golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect - golang.org/x/text v0.3.6 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/goleak v1.1.12 // indirect + go.uber.org/multierr v1.7.0 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.48.0 // indirect + google.golang.org/api v0.60.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 // indirect - google.golang.org/grpc v1.38.0 // indirect - google.golang.org/protobuf v1.26.0 // indirect - gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect + google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect + google.golang.org/grpc v1.40.0 // indirect + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apiextensions-apiserver v0.21.3 // indirect - k8s.io/component-base v0.22.1 // indirect - k8s.io/klog/v2 v2.9.0 // indirect - k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e // indirect - k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect + k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect + sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) + +// A exclude directive is needed for k8s.io/client-go because Cortex (which +// is an indirect dependency through Thanos and PrometheusOperator) has a requirement on v12.0.0. +exclude k8s.io/client-go v12.0.0+incompatible diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index c5cdbc2f8..eb58c6a66 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1,11 +1,14 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.49.0/go.mod h1:hGvAdzcWNbyuxS3nWhD7H2cIJxjRRTRLQVB0bdputVY= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= @@ -20,14 +23,22 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0 h1:bAMqZidYkmIsUqe6PtkEPT7Q+vfizScn+jfNA6jwK9c= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.92.2/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigtable v1.1.0/go.mod h1:B6ByKcIdYmhoyDzmOnQxyOhN6r05qnewYIxxG6L0/b4= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -38,40 +49,76 @@ cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+ cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/trace v0.1.0/go.mod h1:wxEwsoeRVPbeSkt7ZC9nWCgmoKQRAoySN7XHW2AmI7g= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= -github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v44.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v44.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v45.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v46.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v48.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v52.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v54.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v58.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v59.4.0+incompatible h1:gDA8odnngdNd3KYHL2NoK1j9vpWBgEnFSjKKLpkC8Aw= +github.com/Azure/azure-sdk-for-go v59.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= +github.com/Azure/azure-storage-blob-go v0.13.0/go.mod h1:pA9kNqtjUeQF2zOSu4s//nUdBD+e64lEuc4sVnuOfNs= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest v0.11.2/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest v0.11.4/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest v0.11.9/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.10/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.11/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= -github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= +github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= -github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= +github.com/Azure/go-autorest/autorest/adal v0.9.17 h1:esOPl2dhcz9P3jqBSJ8tPGEj2EqzPPT6zfyuloiogKY= +github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.3/go.mod h1:4bJZhUhcq8LB20TruwHbAQsmUs2Xh+QR7utuJpLXX3A= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4= +github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= @@ -79,12 +126,15 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= +github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= +github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= @@ -98,22 +148,52 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5/go.mod h1:xnKTFzjGUiZtiOagBsfnvomW+nJg2usB1ZpordQWqNM= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= +github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= +github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -125,115 +205,354 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a h1:E/8AP5dFtMhl5KPJz66Kt9G0n+7Sn41Fy1wv9/jHOrc= +github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= +github.com/alicebob/miniredis/v2 v2.14.3/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I= +github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= +github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= +github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= +github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.22.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.33.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.33.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= -github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.35.5/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= +github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.37.8/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.42.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.42.16 h1:jOUmYYpC77NZYQVHTOTFT4lwFBT1u3s8ETKciU4l6gQ= +github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/baidubce/bce-sdk-go v0.9.81/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= +github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= +github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff v1.0.0/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= +github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= +github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe h1:QJDJubh0OEcpeGjC7/8uF9tt4e39U/Ya1uyK+itnNPQ= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= +github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= +github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= +github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= +github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= +github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= +github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= +github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= +github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= +github.com/containerd/containerd v1.5.7 h1:rQyoYtj4KddB3bxG6SAqd4+08gePNyJjRqvOIfV3rkM= +github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= +github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= +github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= +github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= +github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cortexproject/cortex v0.6.1-0.20200228110116-92ab6cbe0995/go.mod h1:3Xa3DjJxtpXqxcMGdk850lcIRb81M0fyY1MQ6udY134= +github.com/cortexproject/cortex v1.2.1-0.20200805064754-d8edc95e2c91/go.mod h1:PVPxNLrxKH+yc8asaJOxuz7TiRmMizFfnSMOnRzM6oM= +github.com/cortexproject/cortex v1.3.1-0.20200923145333-8587ea61fe17/go.mod h1:dJ9gpW7dzQ7z09cKtNN9PfebumgyO4dtNdFQ6eQEed0= +github.com/cortexproject/cortex v1.4.1-0.20201030080541-83ad6df2abea/go.mod h1:kXo5F3jlF7Ky3+I31jt/bXTzOlQjl2X/vGDpy0RY1gU= +github.com/cortexproject/cortex v1.5.1-0.20201111110551-ba512881b076/go.mod h1:zFBGVsvRBfVp6ARXZ7pmiLaGlbjda5ZnA4Y6qSJyrQg= +github.com/cortexproject/cortex v1.6.1-0.20210108144208-6c2dab103f20/go.mod h1:fOsaeeFSyWrjd9nFJO8KVUpsikcxnYsjEzQyjURBoQk= +github.com/cortexproject/cortex v1.6.1-0.20210215155036-dfededd9f331/go.mod h1:8bRHNDawVx8te5lIqJ+/AcNTyfosYNC34Qah7+jX/8c= +github.com/cortexproject/cortex v1.7.1-0.20210224085859-66d6fb5b0d42/go.mod h1:u2dxcHInYbe45wxhLoWVdlFJyDhXewsMcxtnbq/QbH4= +github.com/cortexproject/cortex v1.7.1-0.20210316085356-3fedc1108a49/go.mod h1:/DBOW8TzYBTE/U+O7Whs7i7E2eeeZl1iRVDtIqxn5kg= +github.com/cortexproject/cortex v1.8.1-0.20210422151339-cf1c444e0905/go.mod h1:xxm4/CLvTmDxwE7yXwtClR4dIvkG4S09o5DygPOgc1U= +github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab/go.mod h1:njSBkQ1wUNx9X4knV/j65Pi4ItlJXX4QwXRKoMflJd8= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= +github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= +github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4= +github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A= +github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE= +github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= +github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= +github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= +github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= +github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= -github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= +github.com/digitalocean/godo v1.37.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.38.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.42.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.42.1/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.46.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.52.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.57.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.58.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.60.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.71.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= +github.com/digitalocean/godo v1.72.0 h1:Y5+H6zO8UOmiwETd40Uee1Io8kGPCb5fBN76Kf7UyAI= +github.com/digitalocean/godo v1.72.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= -github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v17.12.0-ce-rc1.0.20200706150819-a40b877fbb9e+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.10+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= +github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -242,9 +561,22 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47/go.mod h1:vDnF4AAEZmO0mvyFIATeDJPFaSRM7ywaOnKd61zaSoE= +github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= +github.com/efficientgo/tools/core v0.0.0-20210201224146-3d78f4d30648/go.mod h1:cFZoHUhKg31xkPnPjhPKFtevnx0Xcg67ptBRxbpaxtk= +github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 h1:jIALuFymwBqVsF32JhgzVsbCB6QsWvXqhetn8QgyrZ4= +github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= +github.com/efficientgo/tools/extkingpin v0.0.0-20210609125236-d73259166f20/go.mod h1:ZV0utlglOczUWv3ih2AbqPSoLoFzdplUYxwV62eZi6Q= +github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= +github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= +github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -254,62 +586,97 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.1 h1:cgDRLG7bs59Zd+apAWuzLQL95obVYAymNJek76W3mgw= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible h1:glyUF9yIYtMHzn8xaKw5rMhdWcwsYV8dZHIq5567/xs= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= +github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= +github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= -github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/logr v1.0.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.14/go.mod h1:zN0kY6i38wo2LQOwltVyMk61bqlqOm86n1/Iszo8F8Y= github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -318,20 +685,27 @@ github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.0 h1:Sxpo9PjEHDzhs3FbnGNonvDgWcMW2U7wGTcDDSFSceM= github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= @@ -341,28 +715,36 @@ github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2e github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.3/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.19.28/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/runtime v0.19.29 h1:5IIvCaIDbxetN674vX9eOxvoZ9mYGQ16fV1Q0VSG+NA= +github.com/go-openapi/runtime v0.19.29/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.14/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= @@ -372,26 +754,41 @@ github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.14/go.mod h1:PdGrHe0rp6MG3A1SrAY/rIHATqzJEEhohGE1atLkBEQ= github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= +github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-redis/redis/v8 v8.0.0-beta.10.0.20200905143926-df7fe4e2ce72/go.mod h1:CJP1ZIHwhosNYwIdaHPZK9vHsM3+roNBaZ7U9Of1DXc= +github.com/go-redis/redis/v8 v8.2.3/go.mod h1:ysgGY09J/QeDYbu3HikWEIPCwaeOkuNoTgKayTEaEOw= +github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -426,28 +823,55 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= +github.com/gocql/gocql v0.0.0-20200121121104-95d072f1b5bb/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= +github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyHSnggXm/DvMMnTsQIc= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -456,6 +880,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -475,14 +900,27 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= +github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -496,8 +934,11 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -507,80 +948,147 @@ github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200615235658-03e1cf38a040/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201007051231-1066cbb265c7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201117184057-ae444373da19/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210208152844-1612e9be7af6/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210323184331-8eee2492667d/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210504235042-3a04a4d88a10/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20211008130755-947d60d73cc0/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= +github.com/google/pprof v0.0.0-20211122183932-1daafda22083/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= -github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= +github.com/gophercloud/gophercloud v0.11.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= +github.com/gophercloud/gophercloud v0.12.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= +github.com/gophercloud/gophercloud v0.13.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= +github.com/gophercloud/gophercloud v0.14.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= +github.com/gophercloud/gophercloud v0.15.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= +github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= +github.com/gophercloud/gophercloud v0.17.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= +github.com/gophercloud/gophercloud v0.23.0 h1:I3P10oKlGu3DHP9PrEWMr1ya+/+3Rc9uRHNkRZ9wO7g= +github.com/gophercloud/gophercloud v0.23.0/go.mod h1:MRw6uyLj8uCGbIvBlqL7QW67t0QtNZnzydUzewo1Ioc= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1/go.mod h1:uPG2nyK4CtgNDmWv7qyzYcdI+S90kHHRWvHnBtEMBXM= +github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware/providers/kit/v2 v2.0.0-20201002093600-73cf2ae9d891/go.mod h1:516cTXxZzi4NBUBbKcwmO4Eqbb6GHAEd3o4N+GYyCBY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway v1.15.0/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= -github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= +github.com/hashicorp/consul/api v1.5.0/go.mod h1:LqwrLNW876eYSuUOo4ZLHBcdKc038txr/IMfbLPATa4= +github.com/hashicorp/consul/api v1.6.0/go.mod h1:1NSuaUUkFaJzMasbfq/11wKYWSR67Xn6r2DXKhuDNFg= +github.com/hashicorp/consul/api v1.7.0/go.mod h1:1NSuaUUkFaJzMasbfq/11wKYWSR67Xn6r2DXKhuDNFg= github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= +github.com/hashicorp/consul/api v1.9.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= +github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/sdk v0.6.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.12.2 h1:F1fdYblUEsxKiailtkhCCG2g4bipEgaHiDc8vffNpD4= github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.2.0 h1:l6UW37iCXwZkZoAbEYnptSHVE/cQ5bOTPYG5W3vf9+8= +github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -591,9 +1099,12 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= +github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= @@ -602,62 +1113,107 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.3 h1:BwZa5IjREr75J0am7nblP+X5i95Rmp8EEbMI5vkUWdA= github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.2.4 h1:OOhYzSvFnkFQXm1ysE8RjXTHsqSRDyP4emusC9K7DYg= +github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= +github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= +github.com/hashicorp/serf v0.9.3/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hetznercloud/hcloud-go v1.26.2 h1:fI8BXAGJI4EFeCDd2a/I4EhqyK32cDdxGeWfYMGUi50= -github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= +github.com/hetznercloud/hcloud-go v1.21.1/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= +github.com/hetznercloud/hcloud-go v1.22.0/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= +github.com/hetznercloud/hcloud-go v1.23.1/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= +github.com/hetznercloud/hcloud-go v1.24.0/go.mod h1:3YmyK8yaZZ48syie6xpm3dt26rtB6s65AisBHylXYFA= +github.com/hetznercloud/hcloud-go v1.25.0/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= +github.com/hetznercloud/hcloud-go v1.33.1 h1:W1HdO2bRLTKU4WsyqAasDSpt54fYO4WNckWYfH5AuCQ= +github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= +github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= -github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= +github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= +github.com/influxdata/flux v0.131.0/go.mod h1:CKvnYe6FHpTj/E0YGI7TcOZdGiYHoToOPSnoa12RtKI= github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= +github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI= +github.com/influxdata/influxdb v1.8.1/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= +github.com/influxdata/influxdb v1.8.2/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= +github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb v1.8.4/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= +github.com/influxdata/influxdb v1.8.5/go.mod h1:oFH+pbEyDln/1TKwa98oJzVrkZwdjrJOwIDGYZj7Ma0= +github.com/influxdata/influxdb v1.9.5/go.mod h1:4uPVvcry9KWQVWLxyT9641qpkRXUBN+xa0MJFFNNLKo= +github.com/influxdata/influxdb-client-go/v2 v2.3.1-0.20210518120617-5d1fff431040/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= +github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/pkg-config v0.2.8/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= +github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= +github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= +github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -667,6 +1223,7 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= @@ -675,29 +1232,59 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0= +github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b h1:iNjcivnc6lhbvJA3LD622NPrUponluJrBWPIwGG/3Bg= +github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/lann/builder v0.0.0-20150808151131-f22ce00fd939/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= +github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= +github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= +github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= -github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= +github.com/linode/linodego v1.2.1 h1:v0vS/n9dGMA9evG+fhLJcy7hsf6TUVmacfYiYzARhts= +github.com/linode/linodego v1.2.1/go.mod h1:x/7+BoaKd4unViBmS2umdjYyVAmpFtBtEXZ0wou7FYQ= +github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= +github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -705,34 +1292,75 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= +github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= +github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= +github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= +github.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= +github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= +github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= +github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= -github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.38/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= +github.com/minio/minio-go/v6 v6.0.44/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= +github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= +github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns= +github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= +github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -742,6 +1370,8 @@ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdI github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= +github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -749,21 +1379,35 @@ github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= +github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -771,13 +1415,23 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.50/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/ncw/swift v1.0.52/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -786,29 +1440,68 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.14.0 h1:ep6kpPVwmr/nTbklSx2nrLNSIO62DoYAhnPNIMhK8gI= -github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= +github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= @@ -816,11 +1509,14 @@ github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKw github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.1-0.20200124165624-2876d2018785/go.mod h1:C+iumr2ni468+1jvcHXLCdqP9uQnoQbdX93F3aWahWU= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -830,7 +1526,10 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= @@ -838,30 +1537,61 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 h1:2TVScDEIfhUCwVNrUenXBGke17gURHMi4nIjZ5iOLBc= +github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512/go.mod h1:qYNF+Y9Fm8LQEsYPHPx67Sw7gXNGNFSWtuQpL/4tvbk= +github.com/prometheus-operator/prometheus-operator v0.53.1 h1:UN1/7cX0bcL321R2MdLMU0olHaTh0kWZzub26sBarpY= +github.com/prometheus-operator/prometheus-operator v0.53.1/go.mod h1:fVDQolAz9K/ThjZ6Ze5Z/HmxJxYNcIA2Yfsq9yokV7g= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 h1:VYWk40/hnOlk7T64najC0RIvYv4RJ9SwLAJyAu5qWyI= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 h1:tKzmD3DQoK3OIcIxWhEmjdrjAr8ufVRpOO5JvpoDgic= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1/go.mod h1:qP20QQUPGhQMp8yD68N17s3VvMeuLYrh+An0M4Q/zs0= +github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= +github.com/prometheus/alertmanager v0.19.0/go.mod h1:Eyp94Yi/T+kdeb2qvq66E3RGuph5T/jm/RBVh4yz1xo= github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= -github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= +github.com/prometheus/alertmanager v0.21.0/go.mod h1:h7tJ81NA0VLWvWEayi1QltevFkLF3KxmC/malTcT8Go= +github.com/prometheus/alertmanager v0.21.1-0.20200911160112-1fdff6b3f939/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= +github.com/prometheus/alertmanager v0.21.1-0.20201106142418-c39b78780054/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= +github.com/prometheus/alertmanager v0.21.1-0.20210310093010-0f9cab6991e6/go.mod h1:MTqVn+vIupE0dzdgo+sMcNCp37SCAi8vPrvKTTnTz9g= +github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1/go.mod h1:gsEqwD5BHHW9RNKvCuPOrrTMiP5I+faJUyLXvnivHik= +github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xmaDAZrqMgxIq3OXHk= +github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a h1:qroc/F4ygaQ0uc2S+Pyk/exMwnSpokGyN1QjfZ1DiWU= +github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -869,37 +1599,81 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.8.0/go.mod h1:PC/OgXc+UN7B4ALwvn1yzVZmVwvhXp5JsbBv6wSv6i0= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.11.1/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.12.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.20.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.21.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= +github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= +github.com/prometheus/exporter-toolkit v0.6.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= +github.com/prometheus/prometheus v0.0.0-20190818123050-43acd0e2e93f/go.mod h1:rMTlmxGCvukf2KMu3fClMDKLLoJ5hl61MhcJ7xKakf0= github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= -github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= -github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= +github.com/prometheus/prometheus v1.8.2-0.20200107122003-4708915ac6ef/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= +github.com/prometheus/prometheus v1.8.2-0.20200213233353-b90be6f32a33/go.mod h1:fkIPPkuZnkXyopYHmXPxf9rgiPkVgZCN8w9o8+UgBlY= +github.com/prometheus/prometheus v1.8.2-0.20200707115909-30505a202a4c/go.mod h1:/kMSPIRsxr/apyHxlzYMdFnaPXUXXqILU5uzIoNhOvc= +github.com/prometheus/prometheus v1.8.2-0.20200722151933-4a8531a64b32/go.mod h1:+/y4DzJ62qmhy0o/H4PtXegRXw+80E8RVRHhLbv+bkM= +github.com/prometheus/prometheus v1.8.2-0.20200805082714-e0cf219f0de2/go.mod h1:i1KZsZmyDTJRvnR7zE8z/u2v+tkpPjoiPpnWp6nwhr0= +github.com/prometheus/prometheus v1.8.2-0.20200819132913-cb830b0a9c78/go.mod h1:zfAqy/MwhMFajB9E2n12/9gG2fvofIE9uKDtlZCDxqs= +github.com/prometheus/prometheus v1.8.2-0.20200923143134-7e2db3d092f3/go.mod h1:9VNWoDFHOMovlubld5uKKxfCDcPBj2GMOCjcUFXkYaM= +github.com/prometheus/prometheus v1.8.2-0.20201028100903-3245b3267b24/go.mod h1:MDRkz271loM/PrYN+wUNEaTMDGSP760MQzB0yEjdgSQ= +github.com/prometheus/prometheus v1.8.2-0.20201029103703-63be30dceed9/go.mod h1:MDRkz271loM/PrYN+wUNEaTMDGSP760MQzB0yEjdgSQ= +github.com/prometheus/prometheus v1.8.2-0.20201119142752-3ad25a6dc3d9/go.mod h1:1MDE/bXgu4gqd5w/otko6WQpXZX9vu8QX4KbitCmaPg= +github.com/prometheus/prometheus v1.8.2-0.20201119181812-c8f810083d3f/go.mod h1:1MDE/bXgu4gqd5w/otko6WQpXZX9vu8QX4KbitCmaPg= +github.com/prometheus/prometheus v1.8.2-0.20210215121130-6f488061dfb4/go.mod h1:NAYujktP0dmSSpeV155mtnwX2pndLpVVK/Ps68R01TA= +github.com/prometheus/prometheus v1.8.2-0.20210315220929-1cba1741828b/go.mod h1:MS/bpdil77lPbfQeKk6OqVQ9OLnpN3Rszd0hka0EOWE= +github.com/prometheus/prometheus v1.8.2-0.20210324152458-c7a62b95cea0/go.mod h1:sf7j/iAbhZahjeC0s3wwMmp5dksrJ/Za1UKdR+j6Hmw= +github.com/prometheus/prometheus v1.8.2-0.20210519120135-d95b0972505f/go.mod h1:yUzDYX0hIYu5YVHmpj/JXLOclB6QcLNDgmagD3FUnSU= +github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7/go.mod h1:outfylaI89+D5IO87TRPRmxfucIobTO3Rb0l2TKqpj0= +github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 h1:2FprD6qMVmu/qOclTsMpMReGn1EcQ7SUk++SIycVlYk= +github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1/go.mod h1:bBByfKZ/sC+obk4CX3GpJ2Ul+fKZGtXneLYFG8C//nc= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1/go.mod h1:JaY6n2sDr+z2WTsXkOmNRUfDy6FN0L6Nk7x06ndm4tY= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -909,56 +1683,102 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= +github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= +github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= +github.com/snowflakedb/gosnowflake v1.3.13/go.mod h1:6nfka9aTXkUNha1p1cjeeyjDvcyh7jfjp0l8kGpDBok= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= +github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -968,43 +1788,144 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= +github.com/tencentyun/cos-go-sdk-v5 v0.7.31/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o= +github.com/thanos-io/thanos v0.8.1-0.20200109203923-552ffa4c1a0d/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw= +github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf/go.mod h1:G8caR6G7pSDreRDvFm9wFuyjEBztmr8Ag3kBYpa/fEc= +github.com/thanos-io/thanos v0.13.1-0.20200807203500-9b578afb4763/go.mod h1:KyW0a93tsh7v4hXAwo2CVAIRYuZT1Kkf4e04gisQjAg= +github.com/thanos-io/thanos v0.13.1-0.20201019130456-f41940581d9a/go.mod h1:A3qUEEbsVkplJnxyDLwuIuvTDaJPByTH+hMdTl9ujAA= +github.com/thanos-io/thanos v0.13.1-0.20201030101306-47f9a225cc52/go.mod h1:OqqX4x21cg5N5MMHd/yGQAc/V3wg8a7Do4Jk8HfaFZQ= +github.com/thanos-io/thanos v0.13.1-0.20210108102609-f85e4003ba51/go.mod h1:kPvI4H0AynFiHDN95ZB28/k70ZPGCx+pBrRh6RZPimw= +github.com/thanos-io/thanos v0.13.1-0.20210204123931-82545cdd16fe/go.mod h1:ZLDGYRNkgM+FCwYNOD+6tOV+DE2fpjzfV6iqXyOgFIw= +github.com/thanos-io/thanos v0.13.1-0.20210224074000-659446cab117/go.mod h1:kdqFpzdkveIKpNNECVJd75RPvgsAifQgJymwCdfev1w= +github.com/thanos-io/thanos v0.13.1-0.20210226164558-03dace0a1aa1/go.mod h1:gMCy4oCteKTT7VuXVvXLTPGzzjovX1VPE5p+HgL1hyU= +github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17/go.mod h1:zU8KqE+6A+HksK4wiep8e/3UvCZLm+Wrw9AqZGaAm9k= +github.com/thanos-io/thanos v0.22.0/go.mod h1:SZDWz3phcUcBr4MYFoPFRvl+Z9Nbi45HlwQlwSZSt+Q= +github.com/thanos-io/thanos v0.24.0-rc.1 h1:DyR8rDMGbDVsxgX2EQZ5ye+AE4HyY4QevuBKhnJhw9o= +github.com/thanos-io/thanos v0.24.0-rc.1/go.mod h1:sfnKJG7cDA41ixNL4gsTJEa3w9Qt8lwAjw+dqRMSDG0= +github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= +github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.24.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= +github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/weaveworks/common v0.0.0-20200206153930-760e36ae819a/go.mod h1:6enWAqfQBFrE8X/XdJwZr8IKgh1chStuFR0mjU/UOUw= +github.com/weaveworks/common v0.0.0-20200625145055-4b1847531bc9/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= +github.com/weaveworks/common v0.0.0-20200914083218-61ffdd448099/go.mod h1:hz10LOsAdzC3K/iXaKoFxOKTDRgxJl+BTGX1GY+TzO4= +github.com/weaveworks/common v0.0.0-20201119133501-0619918236ec/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= +github.com/weaveworks/common v0.0.0-20210112142934-23c8d7fa6120/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= +github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= +github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78/go.mod h1:YU9FvnS7kUnRt6HY10G+2qHkwzP3n3Vb1XsXDsJTSp8= +github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/xlab/treeprint v1.0.0/go.mod h1:IoImgRak9i3zJyuxOKUP1v4UZd1tMoKkq/Cimt1uhCg= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= +go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= +go.elastic.co/apm v1.11.0/go.mod h1:qoOSi09pnzJDh5fKnfY7bPmQgl8yl2tULdOu03xhui0= +go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= +go.elastic.co/apm/module/apmhttp v1.11.0/go.mod h1:5JFMIxdeS4vJy+D1PPPjINuX6hZ3AHalZXoOgyqZAkk= +go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= +go.elastic.co/apm/module/apmot v1.11.0/go.mod h1:Qnbt3w1DvUd/5QugAF1AJ3mR4AG86EcJFBnAGW77EmU= +go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= +go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/etcd v0.0.0-20190709142735-eb7dd97135a5/go.mod h1:N0RPWo9FXJYZQI4BTkDtQylrstIigYHeR18ONnyTufk= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= +go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0-alpha.0/go.mod h1:kdV+xzCJ3luEBSIeQyB/OEKkWKd8Zkux4sbDeANrosU= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0-alpha.0/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= +go.etcd.io/etcd/client/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0/go.mod h1:tV31atvwzcybuqejDoY3oaNRTtlD2l/Ot78Pc9w7DMY= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0-alpha.0/go.mod h1:FAwse6Zlm5v4tEWZaTjmNhe17Int4Oxbu7+2r0DiD3w= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIyCb1u4wjzMg90BQ= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.0.4/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= @@ -1014,6 +1935,10 @@ go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4S go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1025,7 +1950,9 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= @@ -1041,53 +1968,80 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= -go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= +go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= +go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1095,12 +2049,15 @@ golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191029154019-8994fa331a53/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20200821190819-94841d0725da/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1125,37 +2082,46 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1174,6 +2140,7 @@ golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1184,27 +2151,46 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210324051636-2c4c8ecb7826/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 h1:0qxwC5n+ttVOINCBeRHO0nq9X7uy8SDsPoi5OaCdIEI= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210210192628-66670185b0cd/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1214,6 +2200,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200930132711-30421366ff76/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= @@ -1227,23 +2214,38 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1252,20 +2254,28 @@ golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1277,13 +2287,31 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201008064518-c1f3e3309c71/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1293,43 +2321,65 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210314195730-07df6a141424/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1337,6 +2387,7 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1348,6 +2399,7 @@ golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1361,10 +2413,12 @@ golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1383,6 +2437,7 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= @@ -1392,16 +2447,25 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200603131246-cc40288be839/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200725200936-102e7d357031/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200822203824-307de81be3f4/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201020161133-226fd2f889ca/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201119054027-25dc3e1ccc3c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1410,8 +2474,12 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1422,10 +2490,13 @@ gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCY gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1439,19 +2510,33 @@ google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.39.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.42.0/go.mod h1:+Oj4s6ch2SEGtPjGqfUfZonBH0GjQH89gTeKKAEGZKI= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= +google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.60.0 h1:eq/zs5WPH4J9undYM9IP1O7dSr7Yh8Y0GtSCpzGzIUk= +google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1459,23 +2544,30 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1485,17 +2577,24 @@ google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200603110839-e855014d5736/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1504,18 +2603,40 @@ google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 h1:pc16UedxnxXXtGxHCSUhafAoVHQZ0yXl8ZelMH4EETc= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -1530,6 +2651,7 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= @@ -1538,9 +2660,13 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1552,10 +2678,13 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= @@ -1563,15 +2692,23 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= +gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1586,11 +2723,15 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= @@ -1602,62 +2743,150 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= +k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= +k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= -k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= -k8s.io/api v0.22.1 h1:ISu3tD/jRhYfSW8jI/Q1e+lRxkR7w9UwQEZ7FgslrwY= -k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= -k8s.io/apiextensions-apiserver v0.21.3 h1:+B6biyUWpqt41kz5x6peIsljlsuwvNAp/oFax/j2/aY= -k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= +k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= +k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= +k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= +k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= +k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= +k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.5/go.mod h1:FQjAceXnVaWDeov2YUWhOb6Yt+5UjErkp6UO3nczO1Y= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= +k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs= +k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= +k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= +k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= +k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= +k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= +k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= +k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= -k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= -k8s.io/apimachinery v0.22.1 h1:DTARnyzmdHMz7bFWFDDm22AM4pLWTQECMpRTFu2d2OM= -k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= +k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= +k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.5/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= +k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= +k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= +k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= +k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= -k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= -k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw= -k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= -k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= -k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo= -k8s.io/component-base v0.22.1/go.mod h1:0D+Bl8rrnsPN9v0dyYvkqFfBeAd4u7n77ze+p8CMiPo= +k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= +k8s.io/client-go v0.18.5/go.mod h1:EsiD+7Fx+bRckKWZXnAXRKKetm1WuzPagH4iOSC8x58= +k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= +k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= +k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= +k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.5/go.mod h1:Ee5OOMMYvlH8FCZhDsacjMlCBwetbGZETwo1OA+e6Zw= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= +k8s.io/client-go v0.22.3/go.mod h1:ElDjYf8gvZsKDYexmsmnMQ0DYO8W9RwBjfQ1PI53yow= +k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= +k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= +k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= +k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= +k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.9.0 h1:D7HV+n1V57XeZ0m6tdRkfknthUaM06VFbWldOFh8kzM= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.20.0/go.mod h1:Gm8eSIfQN6457haJuPaMxZw4wyP5k+ykPFlrhQDvhvw= +k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= +k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= +k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6/go.mod h1:RZvgC8MSN6DjiMV6oIfEE9pDL9CYXokkfaCKZeHm3nc= +k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= +k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= +k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e h1:KLHHjkdQFomZy8+06csTWZ0m1343QqxZhR2LJ1OxCYM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= +k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471 h1:DnzUXII7sVg1FJ/4JX6YDRJfLNAC7idRatPwe07suiI= -k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= +k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/controller-runtime v0.9.6 h1:EevVMlgUj4fC1NVM4+DB3iPkWkmGRNarA66neqv9Qew= -sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 49b82ac1f..734030955 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -3,13 +3,12 @@ package main import ( "context" "encoding/json" - "flag" "net/http" + "net/url" "os" "os/signal" "syscall" - "github.com/fsnotify/fsnotify" gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/gorilla/mux" @@ -17,9 +16,8 @@ import ( "github.com/otel-allocator/collector" "github.com/otel-allocator/config" lbdiscovery "github.com/otel-allocator/discovery" - "github.com/spf13/pflag" + allocatorWatcher "github.com/otel-allocator/watcher" ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/log/zap" ) var ( @@ -27,37 +25,34 @@ var ( ) func main() { - // Trying zap logger - opts := zap.Options{} - opts.BindFlags(flag.CommandLine) - pflag.CommandLine.AddGoFlagSet(flag.CommandLine) - var listenAddr string - var configDir string - pflag.StringVar(&listenAddr, "listen-addr", ":8080", "The address where this service serves.") - pflag.StringVar(&configDir, "config-dir", "/conf/", "The directory for the config file.") - pflag.Parse() - logger := zap.New(zap.UseFlagOptions(&opts)) - ctrl.SetLogger(logger) - - logger.Info("Starting the Target Allocator") - - // + cliConf, err := config.ParseCLI() + if err != nil { + setupLog.Error(err, "Failed to parse parameters") + os.Exit(1) + } + + cliConf.RootLogger.Info("Starting the Target Allocator") ctx := context.Background() - // watcher to monitor file changes in ConfigMap - watcher, err := fsnotify.NewWatcher() + log := ctrl.Log.WithName("allocator") + allocator := allocation.NewAllocator(log) + watcher, err := allocatorWatcher.NewWatcher(setupLog, cliConf, allocator) if err != nil { - setupLog.Error(err, "Can't start the watcher") + setupLog.Error(err, "Can't start the watchers") os.Exit(1) } defer watcher.Close() - if err := watcher.Add(configDir); err != nil { - setupLog.Error(err, "Can't add directory to watcher") - } - log := ctrl.Log.WithName("allocator") - srv, err := newServer(log, listenAddr) + // creates a new discovery manager + discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) + defer discoveryManager.Close() + discoveryManager.Watch(func(targets []allocation.TargetItem) { + allocator.SetWaitingTargets(targets) + allocator.AllocateTargets() + }) + + srv, err := newServer(log, allocator, discoveryManager, cliConf) if err != nil { setupLog.Error(err, "Can't start the server") } @@ -80,14 +75,14 @@ func main() { } os.Exit(0) case event := <-watcher.Events: - switch event.Op { - case fsnotify.Create: + switch event.Source { + case allocatorWatcher.EventSourceConfigMap: setupLog.Info("ConfigMap updated!") // Restart the server to pickup the new config. if err := srv.Shutdown(ctx); err != nil { setupLog.Error(err, "Cannot shutdown the server") } - srv, err = newServer(log, listenAddr) + srv, err = newServer(log, allocator, discoveryManager, cliConf) if err != nil { setupLog.Error(err, "Error restarting the server with new config") } @@ -96,6 +91,17 @@ func main() { setupLog.Error(err, "Can't restart the server") } }() + + case allocatorWatcher.EventSourcePrometheusCR: + setupLog.Info("PrometheusCRs changed") + promConfig, err := interface{}(*event.Watcher).(*allocatorWatcher.PrometheusCRWatcher).CreatePromConfig(cliConf.KubeConfigFilePath) + if err != nil { + setupLog.Error(err, "failed to compile Prometheus config") + } + err = discoveryManager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, promConfig) + if err != nil { + setupLog.Error(err, "failed to apply Prometheus config") + } } case err := <-watcher.Errors: setupLog.Error(err, "Watcher error") @@ -111,8 +117,8 @@ type server struct { server *http.Server } -func newServer(log logr.Logger, addr string) (*server, error) { - allocator, discoveryManager, k8sclient, err := newAllocator(log, context.Background()) +func newServer(log logr.Logger, allocator *allocation.Allocator, discoveryManager *lbdiscovery.Manager, cliConf config.CLIConfig) (*server, error) { + k8sclient, err := configureFileDiscovery(log, allocator, discoveryManager, context.Background(), cliConf) if err != nil { return nil, err } @@ -122,42 +128,34 @@ func newServer(log logr.Logger, addr string) (*server, error) { discoveryManager: discoveryManager, k8sClient: k8sclient, } - router := mux.NewRouter() + router := mux.NewRouter().UseEncodedPath() router.HandleFunc("/jobs", s.JobHandler).Methods("GET") router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") - s.server = &http.Server{Addr: addr, Handler: router} + s.server = &http.Server{Addr: *cliConf.ListenAddr, Handler: router} return s, nil } -func newAllocator(log logr.Logger, ctx context.Context) (*allocation.Allocator, *lbdiscovery.Manager, *collector.Client, error) { - cfg, err := config.Load("") +func configureFileDiscovery(log logr.Logger, allocator *allocation.Allocator, discoveryManager *lbdiscovery.Manager, ctx context.Context, cliConfig config.CLIConfig) (*collector.Client, error) { + cfg, err := config.Load(*cliConfig.ConfigFilePath) if err != nil { - return nil, nil, nil, err + return nil, err } - k8sClient, err := collector.NewClient(log) + k8sClient, err := collector.NewClient(log, cliConfig.ClusterConfig) if err != nil { - return nil, nil, nil, err + return nil, err } - // creates a new discovery manager - discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) - // returns the list of targets - if err := discoveryManager.ApplyConfig(cfg); err != nil { - return nil, nil, nil, err + if err := discoveryManager.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.Config); err != nil { + return nil, err } - allocator := allocation.NewAllocator(log) - discoveryManager.Watch(func(targets []allocation.TargetItem) { - allocator.SetWaitingTargets(targets) - allocator.AllocateTargets() - }) k8sClient.Watch(ctx, cfg.LabelSelector, func(collectors []string) { allocator.SetCollectors(collectors) allocator.ReallocateCollectors() }) - return allocator, discoveryManager, k8sClient, nil + return k8sClient, nil } func (s *server) Start() error { @@ -168,7 +166,6 @@ func (s *server) Start() error { func (s *server) Shutdown(ctx context.Context) error { s.logger.Info("Shutting down server...") s.k8sClient.Close() - s.discoveryManager.Close() return s.server.Shutdown(ctx) } @@ -190,7 +187,12 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) if len(q) == 0 { - displayData := allocation.GetAllTargetsByJob(params["job_id"], compareMap, s.allocator) + jobId, err := url.QueryUnescape(params["job_id"]) + if err != nil { + errorHandler(err, w, r) + return + } + displayData := allocation.GetAllTargetsByJob(jobId, compareMap, s.allocator) jsonHandler(w, r, displayData) } else { @@ -204,6 +206,10 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { } } +func errorHandler(err error, w http.ResponseWriter, r *http.Request) { + w.WriteHeader(500) +} + func jsonHandler(w http.ResponseWriter, r *http.Request, data interface{}) { w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(data) diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go new file mode 100644 index 000000000..4872ba419 --- /dev/null +++ b/cmd/otel-allocator/watcher/file.go @@ -0,0 +1,55 @@ +package watcher + +import ( + "path/filepath" + + "github.com/fsnotify/fsnotify" + "github.com/go-logr/logr" + "github.com/otel-allocator/config" +) + +type FileWatcher struct { + configFilePath string + watcher *fsnotify.Watcher +} + +func newConfigMapWatcher(logger logr.Logger, config config.CLIConfig) (FileWatcher, error) { + fileWatcher, err := fsnotify.NewWatcher() + if err != nil { + logger.Error(err, "Can't start the watcher") + return FileWatcher{}, err + } + + return FileWatcher{ + configFilePath: *config.ConfigFilePath, + watcher: fileWatcher, + }, nil +} + +func (f *FileWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error) error { + err := f.watcher.Add(filepath.Dir(f.configFilePath)) + if err != nil { + return err + } + + // translate and copy to central event channel + go func() { + for { + select { + case fileEvent := <-f.watcher.Events: + if fileEvent.Op == fsnotify.Create { + upstreamEvents <- Event{ + Source: EventSourceConfigMap, + } + } + case err := <-f.watcher.Errors: + upstreamErrors <- err + } + } + }() + return nil +} + +func (f *FileWatcher) Close() error { + return f.watcher.Close() +} diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go new file mode 100644 index 000000000..fae547e24 --- /dev/null +++ b/cmd/otel-allocator/watcher/main.go @@ -0,0 +1,92 @@ +package watcher + +import ( + "fmt" + + "github.com/go-logr/logr" + "github.com/otel-allocator/allocation" + "github.com/otel-allocator/config" +) + +type Manager struct { + Events chan Event + Errors chan error + allocator *allocation.Allocator + watchers []Watcher +} + +type Watcher interface { + // Start watcher and supply channels which will receive change events + Start(upstreamEvents chan Event, upstreamErrors chan error) error + Close() error +} + +type Event struct { + Source EventSource + Watcher *Watcher +} + +type EventSource int + +const ( + EventSourceConfigMap EventSource = iota + EventSourcePrometheusCR +) + +func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator *allocation.Allocator) (*Manager, error) { + watcher := Manager{ + allocator: allocator, + Events: make(chan Event), + Errors: make(chan error), + } + + fileWatcher, err := newConfigMapWatcher(logger, config) + if err != nil { + return nil, err + } + watcher.watchers = append(watcher.watchers, &fileWatcher) + + if *config.PromCRWatcherConf.Enabled { + promWatcher, err := newCRDMonitorWatcher(logger, config) + if err != nil { + return nil, err + } + watcher.watchers = append(watcher.watchers, promWatcher) + } + + startErr := watcher.Start() + return &watcher, startErr +} + +func (manager *Manager) Close() error { + var errors []error + for _, watcher := range manager.watchers { + err := watcher.Close() + if err != nil { + errors = append(errors, err) + } + } + + close(manager.Events) + close(manager.Errors) + + if len(errors) > 0 { + return fmt.Errorf("closing errors: %+v", errors) + } + return nil +} + +func (manager *Manager) Start() error { + var errors []error + for _, watcher := range manager.watchers { + err := watcher.Start(manager.Events, manager.Errors) + if err != nil { + errors = append(errors, err) + } + } + + if len(errors) > 0 { + return fmt.Errorf("closing errors: %+v", errors) + } + return nil +} diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go new file mode 100644 index 000000000..2804ee00b --- /dev/null +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -0,0 +1,156 @@ +package watcher + +import ( + "fmt" + + allocatorconfig "github.com/otel-allocator/config" + + "github.com/go-kit/log" + "github.com/go-logr/logr" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + "github.com/prometheus-operator/prometheus-operator/pkg/assets" + monitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" + "github.com/prometheus-operator/prometheus-operator/pkg/informers" + "github.com/prometheus-operator/prometheus-operator/pkg/prometheus" + promconfig "github.com/prometheus/prometheus/config" + kubeDiscovery "github.com/prometheus/prometheus/discovery/kubernetes" + "gopkg.in/yaml.v2" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +func newCRDMonitorWatcher(logger logr.Logger, config allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { + mClient, err := monitoringclient.NewForConfig(config.ClusterConfig) + if err != nil { + return nil, err + } + + factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, allocatorconfig.DefaultResyncTime, nil) //TODO decide what strategy to use regarding namespaces + + serviceMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.ServiceMonitorName)) + if err != nil { + return nil, err + } + + podMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.PodMonitorName)) + if err != nil { + return nil, err + } + + monitoringInformers := map[string]*informers.ForResource{ + monitoringv1.ServiceMonitorName: serviceMonitorInformers, + monitoringv1.PodMonitorName: podMonitorInformers, + } + + generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), &monitoringv1.Prometheus{}) // TODO replace Nop? + if err != nil { + return nil, err + } + + return &PrometheusCRWatcher{ + kubeMonitoringClient: mClient, + informers: monitoringInformers, + stopChannel: make(chan struct{}), + configGenerator: generator, + }, nil +} + +type PrometheusCRWatcher struct { + kubeMonitoringClient *monitoringclient.Clientset + informers map[string]*informers.ForResource + stopChannel chan struct{} + configGenerator *prometheus.ConfigGenerator +} + +// Start wrapped informers and wait for an initial sync +func (w *PrometheusCRWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error) error { + watcher := Watcher(w) + event := Event{ + Source: EventSourcePrometheusCR, + Watcher: &watcher, + } + success := true + + for name, resource := range w.informers { + resource.Start(w.stopChannel) + + if ok := cache.WaitForNamedCacheSync(name, w.stopChannel, resource.HasSynced); !ok { + success = false + } + + resource.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + upstreamEvents <- event + }, + UpdateFunc: func(oldObj, newObj interface{}) { + upstreamEvents <- event + }, + DeleteFunc: func(obj interface{}) { + upstreamEvents <- event + }, + }) + } + if !success { + return fmt.Errorf("failed to sync cache") + } + + return nil +} + +func (w *PrometheusCRWatcher) Close() error { + w.stopChannel <- struct{}{} + return nil +} + +func (w *PrometheusCRWatcher) CreatePromConfig(kubeConfigPath string) (*promconfig.Config, error) { + serviceMonitorInstances := make(map[string]*monitoringv1.ServiceMonitor) + smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(labels.NewSelector(), func(sm interface{}) { + monitor := sm.(*monitoringv1.ServiceMonitor) + key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) + serviceMonitorInstances[key] = monitor + }) + if smRetrieveErr != nil { + return nil, smRetrieveErr + } + + podMonitorInstances := make(map[string]*monitoringv1.PodMonitor) + pmRetrieveErr := w.informers[monitoringv1.PodMonitorName].ListAll(labels.NewSelector(), func(pm interface{}) { + monitor := pm.(*monitoringv1.PodMonitor) + key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) + podMonitorInstances[key] = monitor + }) + if pmRetrieveErr != nil { + return nil, pmRetrieveErr + } + + store := assets.Store{ + TLSAssets: nil, + TokenAssets: nil, + BasicAuthAssets: nil, + OAuth2Assets: nil, + SigV4Assets: nil, + } + generatedConfig, err := w.configGenerator.Generate(&monitoringv1.Prometheus{}, serviceMonitorInstances, podMonitorInstances, map[string]*monitoringv1.Probe{}, &store, nil, nil, nil, []string{}) + if err != nil { + return nil, err + } + + promCfg := &promconfig.Config{} + unmarshalErr := yaml.Unmarshal(generatedConfig, promCfg) + if unmarshalErr != nil { + return nil, unmarshalErr + } + + // set kubeconfig path to service discovery configs, else kubernetes_sd will always attempt in-cluster + // authentication even if running with a detected kubeconfig + for _, scrapeConfig := range promCfg.ScrapeConfigs { + for _, serviceDiscoveryConfig := range scrapeConfig.ServiceDiscoveryConfigs { + if serviceDiscoveryConfig.Name() == "kubernetes" { + sdConfig := interface{}(serviceDiscoveryConfig).(*kubeDiscovery.SDConfig) + sdConfig.KubeConfig = kubeConfigPath + } + } + } + return promCfg, nil +} diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index a51bde688..4cdacfcf2 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -678,6 +678,18 @@ spec: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. type: string + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR + instances which the ServiceAccount has access to will be retrieved. + This includes other namespaces. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + type: object type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. diff --git a/docs/api.md b/docs/api.md index 9e9e42de1..b5213b0b6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2586,6 +2586,40 @@ TargetAllocator indicates a value which determines whether to spawn a target all Image indicates the container image to use for the OpenTelemetry TargetAllocator.
false + + prometheusCR + object + + PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
+ + false + + + + +### OpenTelemetryCollector.spec.targetAllocator.prometheusCR +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
enabledboolean + Enabled indicates whether to use a PrometheusOperator custom resources as targets or not.
+
false
diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index 202adbae1..b485f68cf 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -46,10 +46,15 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, }) + var args []string + if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { + args = append(args, "--enable-prometheus-cr-watcher") + } return corev1.Container{ Name: naming.TAContainer(), Image: image, Env: envVars, VolumeMounts: volumeMounts, + Args: args, } } diff --git a/tests/e2e/smoke-targetallocator/02-install.yaml b/tests/e2e/smoke-targetallocator/02-install.yaml index 36eb9c9b1..505aaf86d 100644 --- a/tests/e2e/smoke-targetallocator/02-install.yaml +++ b/tests/e2e/smoke-targetallocator/02-install.yaml @@ -6,6 +6,7 @@ spec: mode: statefulset targetAllocator: enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" config: | receivers: jaeger: diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/02-assert.yaml index cca13596e..90f56dcfb 100644 --- a/tests/e2e/targetallocator-features/02-assert.yaml +++ b/tests/e2e/targetallocator-features/02-assert.yaml @@ -49,6 +49,8 @@ spec: spec: containers: - name: ta-container + args: + - --enable-prometheus-cr-watcher env: - name: OTELCOL_NAMESPACE valueFrom: diff --git a/tests/e2e/targetallocator-features/02-install.yaml b/tests/e2e/targetallocator-features/02-install.yaml index fc30d5d3e..a7ca6964f 100644 --- a/tests/e2e/targetallocator-features/02-install.yaml +++ b/tests/e2e/targetallocator-features/02-install.yaml @@ -19,6 +19,9 @@ spec: storage: 1Gi targetAllocator: enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + prometheusCR: + enabled: true config: | receivers: jaeger: From 665d4ad6b91a1564b458e4dad8bb0228c1c2a4f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Apr 2022 09:51:51 +0200 Subject: [PATCH 0487/1234] Bump k8s.io/kubectl from 0.23.5 to 0.23.6 (#827) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.23.5 to 0.23.6. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.23.5...v0.23.6) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 1c828855e..e1bcf0ed2 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( k8s.io/api v0.23.6 k8s.io/apimachinery v0.23.6 k8s.io/client-go v0.23.6 - k8s.io/kubectl v0.23.5 + k8s.io/kubectl v0.23.6 sigs.k8s.io/controller-runtime v0.11.2 ) @@ -114,7 +114,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect k8s.io/apiextensions-apiserver v0.23.5 // indirect - k8s.io/component-base v0.23.5 // indirect + k8s.io/component-base v0.23.6 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect diff --git a/go.sum b/go.sum index 725e74e22..44a118bd9 100644 --- a/go.sum +++ b/go.sum @@ -1706,16 +1706,18 @@ k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hr k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= -k8s.io/cli-runtime v0.23.5/go.mod h1:oY6QDF2qo9xndSq32tqcmRp2UyXssdGrLfjAVymgbx4= +k8s.io/cli-runtime v0.23.6/go.mod h1:0Z3VR/HRIFKiLzKIAkm1mPtcH98GT/fXu2IU0E4vFmw= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.23.5 h1:8qgP5R6jG1BBSXmRYW+dsmitIrpk8F/fPEvgDenMCCE= +k8s.io/code-generator v0.23.6/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= -k8s.io/component-helpers v0.23.5/go.mod h1:5riXJgjTIs+ZB8xnf5M2anZ8iQuq37a0B/0BgoPQuSM= +k8s.io/component-base v0.23.6 h1:8dhVZ4VrRcNdV2EGjl8tj8YOHwX6ysgCGMJ2Oyy0NW8= +k8s.io/component-base v0.23.6/go.mod h1:FGMPeMrjYu0UZBSAFcfloVDplj9IvU+uRMTOdE23Fj0= +k8s.io/component-helpers v0.23.6/go.mod h1:kgvl6wvnYg9oebklLPpbW8UhvAZ9Qds26/RANEbny/8= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1733,9 +1735,9 @@ k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iL k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubectl v0.23.5 h1:DmDULqCaF4qstj0Im143XmncvqWtJxHzK8IrW2BzlU0= -k8s.io/kubectl v0.23.5/go.mod h1:lLgw7cVY8xbd7o637vOXPca/w6HC205KsPCRDYRCxwE= -k8s.io/metrics v0.23.5/go.mod h1:WNAtV2a5BYbmDS8+7jSqYYV6E3efuGTpIwJ8PTD1wgs= +k8s.io/kubectl v0.23.6 h1:ajzrqj88GqlH/gpscMCts+mKNeSJprpkWJEHO8CR2Ss= +k8s.io/kubectl v0.23.6/go.mod h1:mMtJhc2QtQiSfvIQoMEUIjGHtZuP4uxMy/ees6j6zx8= +k8s.io/metrics v0.23.6/go.mod h1:Fm9VzVMZ7KVEEeLStF2y3XogfcDwpGyI15o1xB6PbYk= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 115cde6f6e47e06aaf2108d08490ce32d94dad55 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Java Bot <97938252+opentelemetry-java-bot@users.noreply.github.com> Date: Sat, 23 Apr 2022 19:34:51 -0700 Subject: [PATCH 0488/1234] Update opentelemetry-javaagent version to 1.13.1 (#835) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 720c7384c..b50dd27dd 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.11.1 +1.13.1 From 5b1c7b58528022c9f50570ce38075d552895b2d5 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 25 Apr 2022 17:43:29 +0200 Subject: [PATCH 0489/1234] Do not block pod creating on internal error in webhook (#811) * Do not block pod creating on internal error Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Add more docs Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- internal/webhookhandler/webhookhandler.go | 17 ++++++++++++++--- internal/webhookhandler/webhookhandler_test.go | 17 ++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go index 457ad37cf..948717f5a 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhookhandler/webhookhandler.go @@ -78,19 +78,30 @@ func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) ns := corev1.Namespace{} err = p.client.Get(ctx, types.NamespacedName{Name: req.Namespace, Namespace: ""}, &ns) if err != nil { - return admission.Errored(http.StatusInternalServerError, err) + res := admission.Errored(http.StatusInternalServerError, err) + // By default, admission.Errored sets Allowed to false which blocks pod creation even though the failurePolicy=ignore. + // Allowed set to true makes sure failure does not block pod creation in case of an error. + // Using the http.StatusInternalServerError creates a k8s event associated with the replica set. + // The admission.Allowed("").WithWarnings(err.Error()) or http.StatusBadRequest does not + // create any event. Additionally, an event/log cannot be created explicitly because the pod name is not known. + res.Allowed = true + return res } for _, m := range p.podMutators { pod, err = m.Mutate(ctx, ns, pod) if err != nil { - return admission.Errored(http.StatusInternalServerError, err) + res := admission.Errored(http.StatusInternalServerError, err) + res.Allowed = true + return res } } marshaledPod, err := json.Marshal(pod) if err != nil { - return admission.Errored(http.StatusInternalServerError, err) + res := admission.Errored(http.StatusInternalServerError, err) + res.Allowed = true + return res } return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) } diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index c439d40d4..97b37b7cb 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -403,15 +403,17 @@ func TestFailOnInvalidRequest(t *testing.T) { name string req admission.Request expected int32 + allowed bool }{ { - "empty payload", - admission.Request{}, - http.StatusBadRequest, + name: "empty payload", + req: admission.Request{}, + expected: http.StatusBadRequest, + allowed: false, }, { - "namespace doesn't exist", - func() admission.Request { + name: "namespace doesn't exist", + req: func() admission.Request { pod := corev1.Pod{} encoded, err := json.Marshal(pod) require.NoError(t, err) @@ -425,7 +427,8 @@ func TestFailOnInvalidRequest(t *testing.T) { }, } }(), - http.StatusInternalServerError, + expected: http.StatusInternalServerError, + allowed: true, }, } { t.Run(tt.name, func(t *testing.T) { @@ -442,7 +445,7 @@ func TestFailOnInvalidRequest(t *testing.T) { res := injector.Handle(context.Background(), tt.req) // verify - assert.False(t, res.Allowed) + assert.Equal(t, tt.allowed, res.Allowed) assert.NotNil(t, res.AdmissionResponse.Result) assert.Equal(t, tt.expected, res.AdmissionResponse.Result.Code) }) From a2948db984836bd56f19913816be5bfcd2b526b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:47:34 +0200 Subject: [PATCH 0490/1234] Bump github/codeql-action from 1 to 2 (#838) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 1a3a6aa8e..dbcf645c1 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -53,12 +53,12 @@ jobs: uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 6273de678ff9bd54c66dc571ead93b5588f86c1c Mon Sep 17 00:00:00 2001 From: Eric Hsueh <39718333+erichsueh3@users.noreply.github.com> Date: Tue, 26 Apr 2022 01:49:41 -0700 Subject: [PATCH 0491/1234] Update sidecar example in README (#837) --- README.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 95adad872..57aafb768 100644 --- a/README.md +++ b/README.md @@ -89,11 +89,7 @@ spec: receivers: jaeger: protocols: - grpc: - otlp: - protocols: - grpc: - http: + thrift_compact: processors: exporters: @@ -102,7 +98,7 @@ spec: service: pipelines: traces: - receivers: [otlp, jaeger] + receivers: [jaeger] processors: [] exporters: [logging] EOF From 480f357155488340bb9fadb96daf9b0933ee9c08 Mon Sep 17 00:00:00 2001 From: Bob Kukura Date: Tue, 26 Apr 2022 05:50:14 -0400 Subject: [PATCH 0492/1234] Create serving certs for headless services on OpenShift (#818) (#824) Add annotation to create serving cerfificates for services on OpenShift. Resolves: #818 Signed-off-by: Robert Kukura --- README.md | 2 ++ pkg/collector/reconcile/service.go | 10 ++++++++++ pkg/collector/reconcile/service_test.go | 1 + 3 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 57aafb768..b8a18c94e 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ The `config` node holds the `YAML` that should be passed down as-is to the under At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash. +The Operator does examine the configuration file to discover configured receivers and their ports. If it finds receivers with ports, it creates a pair of kubernetes services, one headless, exposing those ports within the cluster. The headless service contains a `service.beta.openshift.io/serving-cert-secret-name` annotation that will cause OpenShift to create a secret containing a certificate and key. This secret can be mounted as a volume and the certificate and key used in those receivers' TLS configurations. + ### Upgrades diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index bdeed0775..1fbb6337c 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -158,6 +158,16 @@ func headless(ctx context.Context, params Params) *corev1.Service { } h.Name = naming.HeadlessService(params.Instance) + + // copy to avoid modifying params.Instance.Annotations + annotations := map[string]string{ + "service.beta.openshift.io/serving-cert-secret-name": fmt.Sprintf("%s-tls", h.Name), + } + for k, v := range h.Annotations { + annotations[k] = v + } + h.Annotations = annotations + h.Spec.ClusterIP = "None" return h } diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 19a76a495..9334c7d53 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -196,6 +196,7 @@ func TestDeleteServices(t *testing.T) { func TestHeadlessService(t *testing.T) { t.Run("should return headless service", func(t *testing.T) { actual := headless(context.Background(), params()) + assert.Equal(t, actual.Annotations["service.beta.openshift.io/serving-cert-secret-name"], "test-collector-headless-tls") assert.Equal(t, actual.Spec.ClusterIP, "None") }) } From 2f80f6516ff9d388b3c4648d61b7ed6eeb4e51c7 Mon Sep 17 00:00:00 2001 From: binjip978 Date: Wed, 27 Apr 2022 15:43:53 +0300 Subject: [PATCH 0493/1234] Set replicas to MaxReplicas if HPA is enabled (#833) * Set replicas to MaxReplicas if HPA is enabled If number of replicas in current deployment status is bigger than MaxReplicas and HPA is enabled set deployment replicas to MaxReplicas. * Move replicas calculation in seperate function Signed-off-by: binjip978 --- pkg/collector/reconcile/deployment.go | 22 +++++++++++++++------- pkg/collector/reconcile/deployment_test.go | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 247a93257..d8bb01d54 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -24,6 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) @@ -98,14 +99,8 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - // if autoscale is enabled, use replicas from current Status if params.Instance.Spec.MaxReplicas != nil { - currentReplicas := existing.Status.Replicas - // if replicas (minReplicas from HPA perspective) is bigger than - // current status use it. - if params.Instance.Spec.Replicas != nil && *params.Instance.Spec.Replicas > currentReplicas { - currentReplicas = *params.Instance.Spec.Replicas - } + currentReplicas := currentReplicasWithHPA(params.Instance.Spec, existing.Status.Replicas) updated.Spec.Replicas = ¤tReplicas } @@ -154,3 +149,16 @@ func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Dep return nil } + +// currentReplicasWithHPA calculates deployment replicas if HPA is enabled. +func currentReplicasWithHPA(spec v1alpha1.OpenTelemetryCollectorSpec, curr int32) int32 { + if curr < *spec.Replicas { + return *spec.Replicas + } + + if curr > *spec.MaxReplicas { + return *spec.MaxReplicas + } + + return curr +} diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index aa955af3a..5a513d098 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -234,3 +234,21 @@ func TestExpectedDeployments(t *testing.T) { }) } + +func TestCurrentReplicasWithHPA(t *testing.T) { + minReplicas := int32(2) + maxReplicas := int32(5) + spec := v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &minReplicas, + MaxReplicas: &maxReplicas, + } + + res := currentReplicasWithHPA(spec, 10) + assert.Equal(t, int32(5), res) + + res = currentReplicasWithHPA(spec, 1) + assert.Equal(t, int32(2), res) + + res = currentReplicasWithHPA(spec, 3) + assert.Equal(t, int32(3), res) +} From 2541df2352575586e39b093513e72ac9889dda53 Mon Sep 17 00:00:00 2001 From: goatsthatcode <33231851+goatsthatcode@users.noreply.github.com> Date: Thu, 28 Apr 2022 03:44:46 -0700 Subject: [PATCH 0494/1234] Fix default auto-instrumentation images (#842) Signed-off-by: Loren Brindze --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 776438563..faf7d5af6 100644 --- a/main.go +++ b/main.go @@ -258,7 +258,8 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v u := &instrumentationupgrade.InstrumentationUpgrade{ Logger: ctrl.Log.WithName("instrumentation-upgrade"), DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), - DefaultAutoInstNodeJS: cfg.AutoInstrumentationJavaImage(), + DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), + DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), Client: mgr.GetClient(), } return u.ManagedInstances(c) From ee6c24e8508bc2e720e047558d627e55c6cd1bf8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:45:05 +0200 Subject: [PATCH 0495/1234] Bump docker/setup-buildx-action from 1.6.0 to 1.7.0 (#843) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 92c4b020f..0f01e03e7 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v1.7.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index d732180ef..1eae50618 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v1.7.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 53ae2494e..da11157c3 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v1.7.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index d8970eb74..4ad73fc67 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -45,7 +45,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v1.7.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index a2fe61f41..86f3c4d4d 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -31,7 +31,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.6.0 + uses: docker/setup-buildx-action@v1.7.0 - name: Cache Docker layers uses: actions/cache@v3 From 928e9e4102dfbb35df737c8bb8fcce54bcfb854f Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Thu, 28 Apr 2022 09:59:16 -0500 Subject: [PATCH 0496/1234] Add resource attributes to collector sidecar (#832) * Add resource attributes to collector sidecar Signed-off-by: Ruben Vargas * Update getAttributesEnv comments. Co-authored-by: Ben B. * Use semconv package for attribute names Signed-off-by: Ruben Vargas * Make env var names consistent Signed-off-by: Ruben Vargas * Improve comments Signed-off-by: Ruben Vargas * Rename attributes function Signed-off-by: Ruben Vargas * fix import order Signed-off-by: Ruben Vargas * Verify env vars on sidecar e2e test Signed-off-by: Ruben Vargas * Update readme mentioning OTEL_RESOURCE_ATTRIBUTES env var on sidecar mode Signed-off-by: Ruben Vargas * README Improvments Signed-off-by: Ruben Vargas Co-authored-by: Ben B. --- README.md | 2 + pkg/constants/env.go | 28 ++++ pkg/instrumentation/sdk.go | 50 +++---- pkg/sidecar/attributes.go | 120 ++++++++++++++++ pkg/sidecar/attributes_test.go | 189 +++++++++++++++++++++++++ pkg/sidecar/pod.go | 5 +- pkg/sidecar/pod_test.go | 38 ++++- pkg/sidecar/podmutator.go | 56 +++++++- tests/e2e/smoke-sidecar/01-assert.yaml | 6 + 9 files changed, 459 insertions(+), 35 deletions(-) create mode 100644 pkg/constants/env.go create mode 100644 pkg/sidecar/attributes.go create mode 100644 pkg/sidecar/attributes_test.go diff --git a/README.md b/README.md index b8a18c94e..6a1cdcd86 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,8 @@ spec: EOF ``` +When using sidecar mode the OpenTelemetry collector container will have the environment variable `OTEL_RESOURCE_ATTRIBUTES`set with Kubernetes resource attributes, ready to be consumed by the [resourcedetection](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor) processor. + ### OpenTelemetry auto-instrumentation injection The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Java, NodeJS and Python are supported. diff --git a/pkg/constants/env.go b/pkg/constants/env.go new file mode 100644 index 000000000..0c4070905 --- /dev/null +++ b/pkg/constants/env.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package constants + +const ( + EnvOTELServiceName = "OTEL_SERVICE_NAME" + EnvOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" + EnvOTELResourceAttrs = "OTEL_RESOURCE_ATTRIBUTES" + EnvOTELPropagators = "OTEL_PROPAGATORS" + EnvOTELTracesSampler = "OTEL_TRACES_SAMPLER" + EnvOTELTracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG" + + EnvPodName = "OTEL_RESOURCE_ATTRIBUTES_POD_NAME" + EnvPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID" + EnvNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME" +) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 161e08ad2..a5bf12e65 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -31,22 +31,12 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) const ( volumeName = "opentelemetry-auto-instrumentation" initContainerName = "opentelemetry-auto-instrumentation" - - envOTELServiceName = "OTEL_SERVICE_NAME" - envOTELExporterOTLPEndpoint = "OTEL_EXPORTER_OTLP_ENDPOINT" - envOTELResourceAttrs = "OTEL_RESOURCE_ATTRIBUTES" - envOTELPropagators = "OTEL_PROPAGATORS" - envOTELTracesSampler = "OTEL_TRACES_SAMPLER" - envOTELTracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG" - - envPodName = "OTEL_RESOURCE_ATTRIBUTES_POD_NAME" - envPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID" - envNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -101,18 +91,18 @@ func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { container := &pod.Spec.Containers[0] resourceMap := i.createResourceMap(ctx, otelinst, ns, pod) - idx := getIndexOfEnv(container.Env, envOTELServiceName) + idx := getIndexOfEnv(container.Env, constants.EnvOTELServiceName) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELServiceName, + Name: constants.EnvOTELServiceName, Value: chooseServiceName(pod, resourceMap), }) } if otelinst.Spec.Exporter.Endpoint != "" { - idx = getIndexOfEnv(container.Env, envOTELExporterOTLPEndpoint) + idx = getIndexOfEnv(container.Env, constants.EnvOTELExporterOTLPEndpoint) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELExporterOTLPEndpoint, + Name: constants.EnvOTELExporterOTLPEndpoint, Value: otelinst.Spec.Endpoint, }) } @@ -121,45 +111,45 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph // Some attributes might be empty, we should get them via k8s downward API if resourceMap[string(semconv.K8SPodNameKey)] == "" { container.Env = append(container.Env, corev1.EnvVar{ - Name: envPodName, + Name: constants.EnvPodName, ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{ FieldPath: "metadata.name", }, }, }) - resourceMap[string(semconv.K8SPodNameKey)] = fmt.Sprintf("$(%s)", envPodName) + resourceMap[string(semconv.K8SPodNameKey)] = fmt.Sprintf("$(%s)", constants.EnvPodName) } if otelinst.Spec.Resource.AddK8sUIDAttributes { if resourceMap[string(semconv.K8SPodUIDKey)] == "" { container.Env = append(container.Env, corev1.EnvVar{ - Name: envPodUID, + Name: constants.EnvPodUID, ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{ FieldPath: "metadata.uid", }, }, }) - resourceMap[string(semconv.K8SPodUIDKey)] = fmt.Sprintf("$(%s)", envPodUID) + resourceMap[string(semconv.K8SPodUIDKey)] = fmt.Sprintf("$(%s)", constants.EnvPodUID) } } if resourceMap[string(semconv.K8SNodeNameKey)] == "" { container.Env = append(container.Env, corev1.EnvVar{ - Name: envNodeName, + Name: constants.EnvNodeName, ValueFrom: &corev1.EnvVarSource{ FieldRef: &corev1.ObjectFieldSelector{ FieldPath: "spec.nodeName", }, }, }) - resourceMap[string(semconv.K8SNodeNameKey)] = fmt.Sprintf("$(%s)", envNodeName) + resourceMap[string(semconv.K8SNodeNameKey)] = fmt.Sprintf("$(%s)", constants.EnvNodeName) } - idx = getIndexOfEnv(container.Env, envOTELResourceAttrs) + idx = getIndexOfEnv(container.Env, constants.EnvOTELResourceAttrs) resStr := resourceMapToStr(resourceMap) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELResourceAttrs, + Name: constants.EnvOTELResourceAttrs, Value: resStr, }) } else { @@ -169,27 +159,27 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph container.Env[idx].Value += resStr } - idx = getIndexOfEnv(container.Env, envOTELPropagators) + idx = getIndexOfEnv(container.Env, constants.EnvOTELPropagators) if idx == -1 && len(otelinst.Spec.Propagators) > 0 { propagators := *(*[]string)((unsafe.Pointer(&otelinst.Spec.Propagators))) container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELPropagators, + Name: constants.EnvOTELPropagators, Value: strings.Join(propagators, ","), }) } - idx = getIndexOfEnv(container.Env, envOTELTracesSampler) + idx = getIndexOfEnv(container.Env, constants.EnvOTELTracesSampler) // configure sampler only if it is configured in the CR if idx == -1 && otelinst.Spec.Sampler.Type != "" { - idxSamplerArg := getIndexOfEnv(container.Env, envOTELTracesSamplerArg) + idxSamplerArg := getIndexOfEnv(container.Env, constants.EnvOTELTracesSamplerArg) if idxSamplerArg == -1 { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELTracesSampler, + Name: constants.EnvOTELTracesSampler, Value: string(otelinst.Spec.Sampler.Type), }) if otelinst.Spec.Sampler.Argument != "" { container.Env = append(container.Env, corev1.EnvVar{ - Name: envOTELTracesSamplerArg, + Name: constants.EnvOTELTracesSamplerArg, Value: otelinst.Spec.Sampler.Argument, }) } @@ -223,7 +213,7 @@ func chooseServiceName(pod corev1.Pod, resources map[string]string) string { func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) map[string]string { // get existing resources env var and parse it into a map existingRes := map[string]bool{} - existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[0].Env, envOTELResourceAttrs) + existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[0].Env, constants.EnvOTELResourceAttrs) if existingResourceEnvIdx > -1 { existingResArr := strings.Split(pod.Spec.Containers[0].Env[existingResourceEnvIdx].Value, ",") for _, kv := range existingResArr { diff --git a/pkg/sidecar/attributes.go b/pkg/sidecar/attributes.go new file mode 100644 index 000000000..e40492f78 --- /dev/null +++ b/pkg/sidecar/attributes.go @@ -0,0 +1,120 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package sidecar contains operations related to sidecar manipulation (Add, update, remove). +package sidecar + +import ( + "fmt" + "sort" + "strings" + + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" +) + +const resourceAttributesEnvName = "OTEL_RESOURCE_ATTRIBUTES" + +type podReferences struct { + replicaset *appsv1.ReplicaSet + deployment *appsv1.Deployment +} + +// getResourceAttributesEnv returns a list of environment variables. The list contains OTEL_RESOURCE_ATTRIBUTES and additional environment variables that use Kubernetes downward API to read pod specification. +// see: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ +func getResourceAttributesEnv(ns corev1.Namespace, podReferences podReferences) []corev1.EnvVar { + + var envvars []corev1.EnvVar + + attributes := map[attribute.Key]string{ + semconv.K8SPodNameKey: fmt.Sprintf("$(%s)", constants.EnvPodName), + semconv.K8SPodUIDKey: fmt.Sprintf("$(%s)", constants.EnvPodUID), + semconv.K8SNodeNameKey: fmt.Sprintf("$(%s)", constants.EnvNodeName), + semconv.K8SNamespaceNameKey: ns.Name, + } + + if podReferences.deployment != nil { + attributes[semconv.K8SDeploymentUIDKey] = string(podReferences.deployment.UID) + attributes[semconv.K8SDeploymentNameKey] = string(podReferences.deployment.Name) + } + + if podReferences.replicaset != nil { + attributes[semconv.K8SReplicaSetUIDKey] = string(podReferences.replicaset.UID) + attributes[semconv.K8SReplicaSetNameKey] = string(podReferences.replicaset.Name) + } + + envvars = append(envvars, corev1.EnvVar{ + Name: constants.EnvPodName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }) + + envvars = append(envvars, corev1.EnvVar{ + Name: constants.EnvPodUID, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.uid", + }, + }, + }) + + envvars = append(envvars, corev1.EnvVar{ + Name: constants.EnvNodeName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }) + + envvars = append(envvars, corev1.EnvVar{ + Name: resourceAttributesEnvName, + Value: mapToValue(attributes), + }) + + return envvars +} + +func mapToValue(attributesMap map[attribute.Key]string) string { + var parts []string + + // Sort it to make it predictable + keys := make([]string, 0, len(attributesMap)) + for k := range attributesMap { + keys = append(keys, string(k)) + } + sort.Strings(keys) + + for _, key := range keys { + parts = append(parts, fmt.Sprintf("%s=%s", key, attributesMap[attribute.Key(key)])) + } + return strings.Join(parts, ",") +} + +// check if container doesn't have already the OTEL_RESOURCE_ATTRIBUTES, we don't want to override it if it's already specified. +func hasResourceAttributeEnvVar(envvars []corev1.EnvVar) bool { + for _, env := range envvars { + if env.Name == resourceAttributesEnvName { + return true + } + } + return false +} diff --git a/pkg/sidecar/attributes_test.go b/pkg/sidecar/attributes_test.go new file mode 100644 index 000000000..b8dc62f58 --- /dev/null +++ b/pkg/sidecar/attributes_test.go @@ -0,0 +1,189 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sidecar + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + appv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" +) + +func TestGetAttributesEnvNoPodReferences(t *testing.T) { + ns := corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-ns", + }, + } + references := podReferences{} + envs := getResourceAttributesEnv(ns, references) + + expectedEnv := []corev1.EnvVar{ + { + Name: constants.EnvPodName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: constants.EnvPodUID, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.uid", + }, + }, + }, + { + Name: constants.EnvNodeName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: resourceAttributesEnvName, + Value: fmt.Sprintf("%s=my-ns,%s=$(%s),%s=$(%s),%s=$(%s)", + semconv.K8SNamespaceNameKey, + semconv.K8SNodeNameKey, + constants.EnvNodeName, + semconv.K8SPodNameKey, + constants.EnvPodName, + semconv.K8SPodUIDKey, + constants.EnvPodUID, + ), + }, + } + + assert.Equal(t, expectedEnv, envs) +} + +func TestGetAttributesEnvWithPodReferences(t *testing.T) { + ns := corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-ns", + }, + } + references := podReferences{ + deployment: &appv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-deployment", + UID: "uuid-dep", + }, + }, + replicaset: &appv1.ReplicaSet{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-replicaset", + UID: "uuid-replicaset", + }, + }, + } + envs := getResourceAttributesEnv(ns, references) + + expectedEnv := []corev1.EnvVar{ + { + Name: constants.EnvPodName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: constants.EnvPodUID, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.uid", + }, + }, + }, + { + Name: constants.EnvNodeName, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: resourceAttributesEnvName, + Value: fmt.Sprintf("%s=my-deployment,%s=uuid-dep,%s=my-ns,%s=$(%s),%s=$(%s),%s=$(%s),%s=my-replicaset,%s=uuid-replicaset", + semconv.K8SDeploymentNameKey, + semconv.K8SDeploymentUIDKey, + semconv.K8SNamespaceNameKey, + semconv.K8SNodeNameKey, + constants.EnvNodeName, + semconv.K8SPodNameKey, + constants.EnvPodName, + semconv.K8SPodUIDKey, + constants.EnvPodUID, + semconv.K8SReplicaSetNameKey, + semconv.K8SReplicaSetUIDKey, + ), + }, + } + + assert.Equal(t, expectedEnv, envs) +} + +func TestHasResourceAttributeEnvVar(t *testing.T) { + for _, tt := range []struct { + desc string + expected bool + env []corev1.EnvVar + }{ + { + "has-attributes", true, []corev1.EnvVar{ + { + Name: resourceAttributesEnvName, + Value: fmt.Sprintf("%s=my-deployment,%s=uuid-dep,%s=my-ns,%s=$(%s),%s=$(%s),%s=$(%s),%s=my-replicaset,%s=uuid-replicaset", + semconv.K8SDeploymentNameKey, + semconv.K8SDeploymentUIDKey, + semconv.K8SNamespaceNameKey, + semconv.K8SNodeNameKey, + constants.EnvNodeName, + semconv.K8SPodNameKey, + constants.EnvPodName, + semconv.K8SPodUIDKey, + constants.EnvPodUID, + semconv.K8SReplicaSetNameKey, + semconv.K8SReplicaSetUIDKey, + ), + }, + }, + }, + + { + "does-not-have-attributes", false, []corev1.EnvVar{ + { + Name: "other_env", + Value: "other_value", + }, + }, + }, + } { + t.Run(tt.desc, func(t *testing.T) { + assert.Equal(t, tt.expected, hasResourceAttributeEnvVar(tt.env)) + }) + } +} diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 475b5828a..593d3d0c3 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -32,10 +32,13 @@ const ( ) // add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod) (corev1.Pod, error) { +func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod, attributes []corev1.EnvVar) (corev1.Pod, error) { // add the container volumes := collector.Volumes(cfg, otelcol) container := collector.Container(cfg, logger, otelcol) + if !hasResourceAttributeEnvVar(container.Env) { + container.Env = append(container.Env, attributes...) + } pod.Spec.Containers = append(pod.Spec.Containers, container) pod.Spec.Volumes = append(pod.Spec.Volumes, volumes...) diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index a0e36e979..43dec668c 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -49,7 +49,7 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := add(cfg, logger, otelcol, pod) + changed, err := add(cfg, logger, otelcol, pod, nil) // verify assert.NoError(t, err) @@ -74,7 +74,7 @@ func TestAddSidecarWhenOneExistsAlready(t *testing.T) { cfg := config.New(config.WithCollectorImage("some-default-image")) // test - changed, err := add(cfg, logger, otelcol, pod) + changed, err := add(cfg, logger, otelcol, pod, nil) // verify assert.NoError(t, err) @@ -145,3 +145,37 @@ func TestExistsIn(t *testing.T) { }) } } + +func TestAddSidecarWithAditionalEnv(t *testing.T) { + // prepare + pod := corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + }, + }, + } + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "otelcol-sample", + Namespace: "some-app", + }, + } + cfg := config.New(config.WithCollectorImage("some-default-image")) + + extraEnv := corev1.EnvVar{ + Name: "extraenv", + Value: "extravalue", + } + + // test + changed, err := add(cfg, logger, otelcol, pod, []corev1.EnvVar{ + extraEnv, + }) + + // verify + assert.NoError(t, err) + assert.Len(t, changed.Spec.Containers, 2) + assert.Contains(t, changed.Spec.Containers[1].Env, extraEnv) + +} diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index e951dd6d1..f7d0f6a71 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -20,7 +20,9 @@ import ( "strings" "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -68,7 +70,6 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod } // from this point and on, a sidecar is wanted - // check whether there's a sidecar already -- return the same pod if that's the case. if existsIn(pod) { logger.V(1).Info("pod already has sidecar in it, skipping injection") @@ -88,10 +89,15 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod return pod, err } + // getting pod references, if any + references := p.podReferences(ctx, pod.OwnerReferences, ns) + attributes := getResourceAttributesEnv(ns, references) + // once it's been determined that a sidecar is desired, none exists yet, and we know which instance it should talk to, // we should add the sidecar. logger.V(1).Info("injecting sidecar into pod", "otelcol-namespace", otelcol.Namespace, "otelcol-name", otelcol.Name) - return add(p.config, p.logger, otelcol, pod) + + return add(p.config, p.logger, otelcol, pod, attributes) } func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { @@ -138,3 +144,49 @@ func (p *sidecarPodMutator) selectCollectorInstance(ctx context.Context, ns core return sidecars[0], nil } } + +func (p *sidecarPodMutator) podReferences(ctx context.Context, ownerReferences []metav1.OwnerReference, ns corev1.Namespace) podReferences { + references := &podReferences{} + replicaSet := p.getReplicaSetReference(ctx, ownerReferences, ns) + if replicaSet != nil { + references.replicaset = replicaSet + deployment := p.getDeploymentReference(ctx, replicaSet) + if deployment != nil { + references.deployment = deployment + } + } + return *references +} + +func (p *sidecarPodMutator) getReplicaSetReference(ctx context.Context, ownerReferences []metav1.OwnerReference, ns corev1.Namespace) *appsv1.ReplicaSet { + replicaSetName := findOwnerReferenceKind(ownerReferences, "ReplicaSet") + if replicaSetName != "" { + replicaSet := &appsv1.ReplicaSet{} + err := p.client.Get(ctx, types.NamespacedName{Name: replicaSetName, Namespace: ns.Name}, replicaSet) + if err == nil { + return replicaSet + } + } + return nil +} + +func (p *sidecarPodMutator) getDeploymentReference(ctx context.Context, replicaSet *appsv1.ReplicaSet) *appsv1.Deployment { + deploymentName := findOwnerReferenceKind(replicaSet.OwnerReferences, "Deployment") + if deploymentName != "" { + deployment := &appsv1.Deployment{} + err := p.client.Get(ctx, types.NamespacedName{Name: deploymentName, Namespace: replicaSet.Namespace}, deployment) + if err == nil { + return deployment + } + } + return nil +} + +func findOwnerReferenceKind(references []metav1.OwnerReference, kind string) string { + for _, reference := range references { + if reference.Kind == kind { + return reference.Name + } + } + return "" +} diff --git a/tests/e2e/smoke-sidecar/01-assert.yaml b/tests/e2e/smoke-sidecar/01-assert.yaml index 40a7b819b..358711a28 100644 --- a/tests/e2e/smoke-sidecar/01-assert.yaml +++ b/tests/e2e/smoke-sidecar/01-assert.yaml @@ -9,5 +9,11 @@ spec: containers: - name: myapp - name: otc-container + env: + - name: POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES status: phase: Running From abbe91bca3989a8a7409a24283b33729832a7f24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 08:41:51 +0200 Subject: [PATCH 0497/1234] Bump docker/metadata-action from 3.7.0 to 3.8.0 (#845) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.7.0 to 3.8.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v3.7.0...v3.8.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0f01e03e7..dceefdb7f 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.7.0 + uses: docker/metadata-action@v3.8.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 1eae50618..f3dd8588a 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.7.0 + uses: docker/metadata-action@v3.8.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index da11157c3..ce8d835df 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.7.0 + uses: docker/metadata-action@v3.8.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 4ad73fc67..c3b75ff08 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -32,7 +32,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.7.0 + uses: docker/metadata-action@v3.8.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 86f3c4d4d..3413e2898 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.7.0 + uses: docker/metadata-action@v3.8.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From 0fc09176b88e56c51428eb8eac52031975037bf2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Apr 2022 08:41:59 +0200 Subject: [PATCH 0498/1234] Bump go.opentelemetry.io/otel from 1.6.3 to 1.7.0 (#844) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.6.3 to 1.7.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.6.3...v1.7.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e1bcf0ed2..1bbf14762 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.1 - go.opentelemetry.io/otel v1.6.3 + go.opentelemetry.io/otel v1.7.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.6 k8s.io/apimachinery v0.23.6 @@ -93,7 +93,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.6.3 // indirect + go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 44a118bd9..2456bf327 100644 --- a/go.sum +++ b/go.sum @@ -1095,8 +1095,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.6.3 h1:FLOfo8f9JzFVFVyU+MSRJc2HdEAXQgm7pIv2uFKRSZE= -go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI= +go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= +go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1104,8 +1104,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.6.3 h1:IqN4L+5b0mPNjdXIiZ90Ni4Bl5BRkDQywePLWemd9bc= -go.opentelemetry.io/otel/trace v1.6.3/go.mod h1:GNJQusJlUgZl9/TQBPKU/Y/ty+0iVB5fjhKeJGZPGFs= +go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= +go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= From f044b6735ada56284b9b79da5362d56ce3d46795 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 16:20:58 +0200 Subject: [PATCH 0499/1234] Bump docker/metadata-action from 3.8.0 to 4.0.1 (#859) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.8.0 to 4.0.1. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v3.8.0...v4.0.1) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index dceefdb7f..3680c5725 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.8.0 + uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index f3dd8588a..d1bec2fb3 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.8.0 + uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index ce8d835df..7ad904397 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.8.0 + uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index c3b75ff08..cd82452ef 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -32,7 +32,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v3.8.0 + uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 3413e2898..17c62e806 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -21,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3.8.0 + uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From 3908be7c77c79468d2a78a9580ccd89d91843558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 16:21:28 +0200 Subject: [PATCH 0500/1234] Bump docker/setup-buildx-action from 1.7.0 to 2.0.0 (#857) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.7.0 to 2.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 3680c5725..2dcce31e3 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.7.0 + uses: docker/setup-buildx-action@v2.0.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index d1bec2fb3..4303b503d 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.7.0 + uses: docker/setup-buildx-action@v2.0.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 7ad904397..0bab7c74f 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.7.0 + uses: docker/setup-buildx-action@v2.0.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index cd82452ef..03b005aa8 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -45,7 +45,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.7.0 + uses: docker/setup-buildx-action@v2.0.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 17c62e806..cd71248a8 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -31,7 +31,7 @@ jobs: uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1.7.0 + uses: docker/setup-buildx-action@v2.0.0 - name: Cache Docker layers uses: actions/cache@v3 From e8b6cc6c881c95938b51a563bf586d2bb6ff7743 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 16:23:42 +0200 Subject: [PATCH 0501/1234] Bump docker/login-action from 1.14.1 to 2.0.0 (#855) Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.1 to 2.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1.14.1...v2.0.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 2dcce31e3..24dc70c0c 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.1 + uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 4303b503d..566a06bcb 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.1 + uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 0bab7c74f..fa7d4f73b 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.1 + uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 03b005aa8..a6353ab30 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -56,7 +56,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.1 + uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index cd71248a8..df47235d7 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -42,7 +42,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v1.14.1 + uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From 09b39e39cb45a0005d8310981862d04bc8cb140b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 16:24:04 +0200 Subject: [PATCH 0502/1234] Bump docker/build-push-action from 2.10.0 to 3.0.0 (#858) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 24dc70c0c..f0239049b 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 566a06bcb..7b7b48ed0 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index fa7d4f73b..89133be0f 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index a6353ab30..a1326c292 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index df47235d7..dd35b1884 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -49,7 +49,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2.10.0 + uses: docker/build-push-action@v3.0.0 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From a2e520fbebc19a4967c65d7875e1d01344103ef8 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 9 May 2022 16:25:37 +0200 Subject: [PATCH 0503/1234] Release v0.50.0 (#850) Signed-off-by: Yuri Sa --- .gitignore | 1 + CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 5ec29864b..b33bd1dca 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ vendor # local resources, not to be committed local +config/manager/kustomization.yaml # test resources kubeconfig diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bb7b0ff7..220f0e7b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ Changes by Version ================== + +0.50.0 +------------------- +### 🚀 New components 🚀 +* Add resource attributes to collector sidecar ([#832](https://github.com/open-telemetry/opentelemetry-operator/pull/832), [@rubenvp8510](https://github.com/rubenvp8510)) +* Create serving certs for headless services on OpenShift (#818) ([#824](https://github.com/open-telemetry/opentelemetry-operator/pull/824), [@rkukura](https://github.com/rkukura)) +* [targetallocator] PrometheusOperator CRD MVC ([#653](https://github.com/open-telemetry/opentelemetry-operator/pull/653), [@secustor](https://github.com/secustor)) +### 💡 Enhancements 💡 +* Set replicas to MaxReplicas if HPA is enabled ([#833](https://github.com/open-telemetry/opentelemetry-operator/pull/833), [@binjip978](https://github.com/binjip978)) +* Update sidecar example in README ([#837](https://github.com/open-telemetry/opentelemetry-operator/pull/837), [@erichsueh3](https://github.com/erichsueh3)) +### 🧰 Bug fixes 🧰 +* Fix Default Image Annotations ([#842](https://github.com/open-telemetry/opentelemetry-operator/pull/842), [@goatsthatcode](https://github.com/goatsthatcode)) +* Do not block pod creating on internal error in webhook ([#811](https://github.com/open-telemetry/opentelemetry-operator/pull/811), [@pavolloffay](https://github.com/pavolloffay)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.50.0) +* [OpenTelemetry Contrib - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.50.0) 0.49.0 ------------------- ### 🚀 New components 🚀 diff --git a/README.md b/README.md index 6a1cdcd86..e9b2763ad 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.50.0 | v1.19 to v1.23 | 1.6.1 | | v0.49.0 | v1.19 to v1.23 | 1.6.1 | | v0.48.0 | v1.19 to v1.23 | 1.6.1 | | v0.47.0 | v1.19 to v1.23 | 1.6.1 | @@ -277,7 +278,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.35.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.34.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | | v0.33.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | -| v0.32.0 (skipped) | n/a | n/a | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 137e73f08..e1f577445 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.49.0 + name: opentelemetry-operator.v0.50.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.49.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.50.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.49.0 + version: 0.50.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 15f214ed9..162fe4bba 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.49.0 +opentelemetry-collector=0.50.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.49.0 +operator=0.50.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 10915ca24773e107ca8637997d41b4b27547cb5a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 9 May 2022 20:38:39 +0200 Subject: [PATCH 0504/1234] Fix changelog formatting (#863) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 220f0e7b3..c8f9c0b42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Changes by Version #### OpenTelemetry Collector and Contrib * [OpenTelemetry Collector - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.50.0) * [OpenTelemetry Contrib - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.50.0) + 0.49.0 ------------------- ### 🚀 New components 🚀 From 5357b298ff25e6724be525d6d8d79261e0df064a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 May 2022 00:10:03 +0530 Subject: [PATCH 0505/1234] Bump docker/setup-qemu-action from 1.2.0 to 2.0.0 (#856) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.2.0 to 2.0.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1.2.0...v2.0.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index f0239049b..0232c8320 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 + uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.0.0 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 7b7b48ed0..18f1dc23a 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 + uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.0.0 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 89133be0f..aaab2af83 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 + uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.0.0 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index a1326c292..e93ab1854 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -42,7 +42,7 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 + uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.0.0 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index dd35b1884..50038713a 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -28,7 +28,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v1.2.0 + uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.0.0 From 5bf33351ce320ef8a30ad6e3295e548ca03e19e3 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Tue, 10 May 2022 13:02:55 +0200 Subject: [PATCH 0506/1234] Update Python instrumentation to 0.30b1 (#860) * chore(python-instrumentation): update dependencies * chore(versions): revert python version change --- autoinstrumentation/python/requirements.txt | 82 ++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 9847142c9..86aa210a9 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,48 +1,48 @@ -opentelemetry-distro==0.28b1 +opentelemetry-distro==0.30b1 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.9.1 +opentelemetry-exporter-otlp-proto-http==1.11.1 -opentelemetry-propagator-b3==1.9.1 -opentelemetry-propagator-jaeger==1.9.1 +opentelemetry-propagator-b3==1.11.1 +opentelemetry-propagator-jaeger==1.11.1 -opentelemetry-instrumentation==0.28b1 -opentelemetry-propagator-ot-trace==0.28b1 +opentelemetry-instrumentation==0.30b1 +opentelemetry-propagator-ot-trace==0.30b1 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.28b1 -opentelemetry-instrumentation-aiopg==0.28b1 -opentelemetry-instrumentation-asgi==0.28b1 -opentelemetry-instrumentation-asyncpg==0.28b1 -opentelemetry-instrumentation-boto==0.28b1 -opentelemetry-instrumentation-botocore==0.28b1 -opentelemetry-instrumentation-celery==0.28b1 -opentelemetry-instrumentation-dbapi==0.28b1 -opentelemetry-instrumentation-django==0.28b1 -opentelemetry-instrumentation-elasticsearch==0.28b1 -opentelemetry-instrumentation-falcon==0.28b1 -opentelemetry-instrumentation-fastapi==0.28b1 -opentelemetry-instrumentation-flask==0.28b1 -opentelemetry-instrumentation-grpc==0.28b1 -opentelemetry-instrumentation-httpx==0.28b1 -opentelemetry-instrumentation-jinja2==0.28b1 -opentelemetry-instrumentation-kafka-python==0.28b1 -opentelemetry-instrumentation-logging==0.28b1 -opentelemetry-instrumentation-mysql==0.28b1 -opentelemetry-instrumentation-pika==0.28b1 -opentelemetry-instrumentation-psycopg2==0.28b1 -opentelemetry-instrumentation-pymemcache==0.28b1 -opentelemetry-instrumentation-pymongo==0.28b1 -opentelemetry-instrumentation-pymysql==0.28b1 -opentelemetry-instrumentation-pyramid==0.28b1 -opentelemetry-instrumentation-redis==0.28b1 -opentelemetry-instrumentation-requests==0.28b1 -opentelemetry-instrumentation-sklearn==0.28b1 -opentelemetry-instrumentation-sqlalchemy==0.28b1 -opentelemetry-instrumentation-sqlite3==0.28b1 -opentelemetry-instrumentation-starlette==0.28b1 -opentelemetry-instrumentation-tornado==0.28b1 -opentelemetry-instrumentation-urllib==0.28b1 -opentelemetry-instrumentation-urllib3==0.28b1 -opentelemetry-instrumentation-wsgi==0.28b1 +opentelemetry-instrumentation-aiohttp-client==0.30b1 +opentelemetry-instrumentation-aiopg==0.30b1 +opentelemetry-instrumentation-asgi==0.30b1 +opentelemetry-instrumentation-asyncpg==0.30b1 +opentelemetry-instrumentation-boto==0.30b1 +opentelemetry-instrumentation-botocore==0.30b1 +opentelemetry-instrumentation-celery==0.30b1 +opentelemetry-instrumentation-dbapi==0.30b1 +opentelemetry-instrumentation-django==0.30b1 +opentelemetry-instrumentation-elasticsearch==0.30b1 +opentelemetry-instrumentation-falcon==0.30b1 +opentelemetry-instrumentation-fastapi==0.30b1 +opentelemetry-instrumentation-flask==0.30b1 +opentelemetry-instrumentation-grpc==0.30b1 +opentelemetry-instrumentation-httpx==0.30b1 +opentelemetry-instrumentation-jinja2==0.30b1 +opentelemetry-instrumentation-kafka-python==0.30b1 +opentelemetry-instrumentation-logging==0.30b1 +opentelemetry-instrumentation-mysql==0.30b1 +opentelemetry-instrumentation-pika==0.30b1 +opentelemetry-instrumentation-psycopg2==0.30b1 +opentelemetry-instrumentation-pymemcache==0.30b1 +opentelemetry-instrumentation-pymongo==0.30b1 +opentelemetry-instrumentation-pymysql==0.30b1 +opentelemetry-instrumentation-pyramid==0.30b1 +opentelemetry-instrumentation-redis==0.30b1 +opentelemetry-instrumentation-requests==0.30b1 +opentelemetry-instrumentation-sklearn==0.30b1 +opentelemetry-instrumentation-sqlalchemy==0.30b1 +opentelemetry-instrumentation-sqlite3==0.30b1 +opentelemetry-instrumentation-starlette==0.30b1 +opentelemetry-instrumentation-tornado==0.30b1 +opentelemetry-instrumentation-urllib==0.30b1 +opentelemetry-instrumentation-urllib3==0.30b1 +opentelemetry-instrumentation-wsgi==0.30b1 From 9a17de667955518053d84341a8c76253691237ec Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Thu, 12 May 2022 18:23:26 +0200 Subject: [PATCH 0507/1234] chore(versions): update python instrumentation (#867) --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index 162fe4bba..bfec5864a 100644 --- a/versions.txt +++ b/versions.txt @@ -20,4 +20,4 @@ autoinstrumentation-nodejs=0.27.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.28b1 +autoinstrumentation-python=0.30b1 From a02d99ce81caf6af5566ba2effbb72003af4d2da Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Fri, 13 May 2022 16:21:11 +0200 Subject: [PATCH 0508/1234] Fix K8s attributes values in OTEL_RESOURCE_ATTRIBUTES env var (#864) * chore(env-vars): move otel resource attributes to last env on the list * chore(sdk-test): move otel resource attributes to last env on the list * chore(e2e-test): update env order * chore(env-vars): add condition, update comment --- pkg/instrumentation/sdk.go | 19 +++++++++++++++ pkg/instrumentation/sdk_test.go | 24 +++++++++---------- tests/e2e/instrumentation-java/01-assert.yaml | 2 +- .../e2e/instrumentation-nodejs/01-assert.yaml | 2 +- .../e2e/instrumentation-python/01-assert.yaml | 2 +- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index a5bf12e65..65faf670d 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -186,6 +186,15 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph } } + // Move OTEL_RESOURCE_ATTRIBUTES to last position on env list. + // When OTEL_RESOURCE_ATTRIBUTES environment variable uses other env vars + // as attributes value they have to be configured before. + // It is mandatory to set right order to avoid attributes with value + // pointing to the name of used environment variable instead of its value. + idx = getIndexOfEnv(container.Env, constants.EnvOTELResourceAttrs) + envs := moveEnvToListEnd(container.Env, idx) + container.Env = envs + return pod } @@ -321,3 +330,13 @@ func getIndexOfEnv(envs []corev1.EnvVar, name string) int { } return -1 } + +func moveEnvToListEnd(envs []corev1.EnvVar, idx int) []corev1.EnvVar { + if idx >= 0 && idx < len(envs) { + envToMove := envs[idx] + envs = append(envs[:idx], envs[idx+1:]...) + envs = append(envs, envToMove) + } + + return envs +} diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 4ee0e63c0..10030b609 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -171,10 +171,6 @@ func TestSDKInjection(t *testing.T) { }, }, }, - { - Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", - }, { Name: "OTEL_PROPAGATORS", Value: "b3,jaeger", @@ -187,6 +183,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_TRACES_SAMPLER_ARG", Value: "0.25", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", + }, }, }, }, @@ -229,10 +229,6 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "explicitly_set", }, - { - Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "foo=bar,k8s.container.name=other,", - }, { Name: "OTEL_PROPAGATORS", Value: "b3", @@ -241,6 +237,10 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_TRACES_SAMPLER", Value: "always_on", }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "foo=bar,k8s.container.name=other,", + }, }, }, }, @@ -263,10 +263,6 @@ func TestSDKInjection(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "explicitly_set", }, - { - Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app", - }, { Name: "OTEL_PROPAGATORS", Value: "b3", @@ -283,6 +279,10 @@ func TestSDKInjection(t *testing.T) { }, }, }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app", + }, }, }, }, diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index 526b21b88..d3505b046 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -34,9 +34,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index 37164a387..3190895a5 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -30,9 +30,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index a34d32d9a..c0336b0e3 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -30,9 +30,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation From b4bd108480e8ec96c515f207bee1a7ea96cf8a86 Mon Sep 17 00:00:00 2001 From: fscellos Date: Fri, 13 May 2022 16:39:10 +0200 Subject: [PATCH 0509/1234] Choose target container injection with annotation (#689) Choose container injection by annotation --- README.md | 2 +- config/manager/kustomization.yaml | 2 +- kuttl-test.yaml | 2 +- pkg/instrumentation/annotation.go | 7 +- pkg/instrumentation/helper.go | 27 +++++++ pkg/instrumentation/helper_test.go | 74 +++++++++++++++++ pkg/instrumentation/javaagent.go | 35 ++++---- pkg/instrumentation/javaagent_test.go | 2 +- pkg/instrumentation/nodejs.go | 35 ++++---- pkg/instrumentation/nodejs_test.go | 2 +- pkg/instrumentation/podmutator.go | 10 ++- pkg/instrumentation/python.go | 35 ++++---- pkg/instrumentation/python_test.go | 2 +- pkg/instrumentation/sdk.go | 53 +++++++----- pkg/instrumentation/sdk_test.go | 8 +- .../00-install-collector.yaml | 23 ++++++ .../00-install-instrumentation.yaml | 34 ++++++++ .../01-assert.yaml | 80 +++++++++++++++++++ .../01-install-app.yaml | 23 ++++++ .../02-assert.yaml | 50 ++++++++++++ .../02-install-app.yaml | 23 ++++++ .../00-install-collector.yaml | 23 ++++++ .../00-install-instrumentation.yaml | 34 ++++++++ .../01-assert.yaml | 68 ++++++++++++++++ .../01-install-app.yaml | 23 ++++++ .../02-assert.yaml | 44 ++++++++++ .../02-install-app.yaml | 23 ++++++ .../00-install-collector.yaml | 23 ++++++ .../00-install-instrumentation.yaml | 34 ++++++++ .../01-assert.yaml | 68 ++++++++++++++++ .../01-install-app.yaml | 23 ++++++ .../02-assert.yaml | 44 ++++++++++ .../02-install-app.yaml | 23 ++++++ 33 files changed, 875 insertions(+), 84 deletions(-) create mode 100644 pkg/instrumentation/helper.go create mode 100644 pkg/instrumentation/helper_test.go create mode 100644 tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-java-multicontainer/01-assert.yaml create mode 100644 tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-java-multicontainer/02-assert.yaml create mode 100644 tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml create mode 100644 tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/01-assert.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/02-assert.yaml create mode 100644 tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml diff --git a/README.md b/README.md index e9b2763ad..46c7225af 100644 --- a/README.md +++ b/README.md @@ -324,4 +324,4 @@ Thanks to all the people who already contributed! [godoc-img]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator?status.svg [godoc]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector [contributors]: https://github.com/open-telemetry/opentelemetry-operator/graphs/contributors -[contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator +[contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator \ No newline at end of file diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 7394a6d05..bffbe8a58 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: - - manager.yaml + - manager.yaml \ No newline at end of file diff --git a/kuttl-test.yaml b/kuttl-test.yaml index fe9805a5c..de2c6041f 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -11,4 +11,4 @@ commands: - command: sleep 5s testDirs: - ./tests/e2e/ -timeout: 150 +timeout: 150 \ No newline at end of file diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 8ce17a7c6..3f1519b2c 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -23,9 +23,10 @@ import ( const ( // annotationInjectJava indicates whether java auto-instrumentation should be injected or not. // Possible values are "true", "false" or "" name. - annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" - annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" - annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" + annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" + annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" + annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" + annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go new file mode 100644 index 000000000..92a66df99 --- /dev/null +++ b/pkg/instrumentation/helper.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import corev1 "k8s.io/api/core/v1" + +// Calculate if we already inject InitContainers. +func IsInitContainerMissing(pod corev1.Pod) bool { + for _, initContainer := range pod.Spec.InitContainers { + if initContainer.Name == initContainerName { + return false + } + } + return true +} diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go new file mode 100644 index 000000000..2de3132b0 --- /dev/null +++ b/pkg/instrumentation/helper_test.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" +) + +func TestInitContainerMissing(t *testing.T) { + tests := []struct { + name string + pod corev1.Pod + expected bool + }{ + { + name: "InitContainer_Already_Inject", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + { + Name: initContainerName, + }, + }, + }, + }, + expected: false, + }, + { + name: "InitContainer_Absent_1", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + }, + }, + }, + expected: true, + }, + { + name: "InitContainer_Absent_2", + pod: corev1.Pod{ + Spec: corev1.PodSpec{}, + }, + expected: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + result := IsInitContainerMissing(test.pod) + assert.Equal(t, test.expected, result) + }) + } +} diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index aba550110..61a3d54e2 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -26,9 +26,9 @@ const ( javaJVMArgument = " -javaagent:/otel-auto-instrumentation/javaagent.jar" ) -func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod) corev1.Pod { +func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, index int) corev1.Pod { // caller checks if there is at least one container - container := &pod.Spec.Containers[0] + container := &pod.Spec.Containers[index] // inject env vars for _, env := range javaSpec.Env { @@ -57,21 +57,24 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod) MountPath: "/otel-auto-instrumentation", }) - pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, - }}) + // We just inject Volumes and init containers for the first processed container + if IsInitContainerMissing(pod) { + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) - pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: javaSpec.Image, - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, - VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", - }}, - }) + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: javaSpec.Image, + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + } return pod } diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 28573d34f..d97853bbf 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -174,7 +174,7 @@ func TestInjectJavaagent(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectJavaagent(logr.Discard(), test.Java, test.pod) + pod := injectJavaagent(logr.Discard(), test.Java, test.pod, 0) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 810866a0a..645f9356a 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -26,9 +26,9 @@ const ( nodeRequireArgument = " --require /otel-auto-instrumentation/autoinstrumentation.js" ) -func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod) corev1.Pod { +func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) corev1.Pod { // caller checks if there is at least one container - container := &pod.Spec.Containers[0] + container := &pod.Spec.Containers[index] // inject env vars for _, env := range nodeJSSpec.Env { @@ -57,21 +57,24 @@ func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1. MountPath: "/otel-auto-instrumentation", }) - pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, - }}) + // We just inject Volumes and init containers for the first processed container + if IsInitContainerMissing(pod) { + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) - pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: nodeJSSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, - VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", - }}, - }) + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: nodeJSSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + } return pod } diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index f5a8bf93a..e0a187f0a 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -174,7 +174,7 @@ func TestInjectNodeJSSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectNodeJSSDK(logr.Discard(), test.NodeJS, test.pod) + pod := injectNodeJSSDK(logr.Discard(), test.NodeJS, test.pod, 0) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index ba40d73b5..c442af553 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -94,9 +94,17 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, nil } + // We retrieve the annotation for podname + var targetContainers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectContainerName) + // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, // we should inject the instrumentation. - return pm.sdkInjector.inject(ctx, insts, ns, pod), nil + modifiedPod := pod + for _, currentContainer := range strings.Split(targetContainers, ",") { + modifiedPod = pm.sdkInjector.inject(ctx, insts, ns, modifiedPod, strings.TrimSpace(currentContainer)) + } + + return modifiedPod, nil } func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns corev1.Namespace, pod corev1.Pod, instAnnotation string) (*v1alpha1.Instrumentation, error) { diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index d6ebdddb9..6f2a77bdd 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -30,9 +30,9 @@ const ( pythonPathSuffix = "/otel-auto-instrumentation" ) -func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod) corev1.Pod { +func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod, index int) corev1.Pod { // caller checks if there is at least one container - container := &pod.Spec.Containers[0] + container := &pod.Spec.Containers[index] // inject env vars for _, env := range pythonSpec.Env { @@ -71,21 +71,24 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. MountPath: "/otel-auto-instrumentation", }) - pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, - }}) + // We just inject Volumes and init containers for the first processed container + if IsInitContainerMissing(pod) { + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) - pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: pythonSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, - VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", - }}, - }) + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: pythonSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + } return pod } diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 3fa6d68b2..2d510fca3 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -244,7 +244,7 @@ func TestInjectPythonSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectPythonSDK(logr.Discard(), test.Python, test.pod) + pod := injectPythonSDK(logr.Discard(), test.Python, test.pod, 0) assert.Equal(t, test.expected, pod) }) } diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 65faf670d..cbaaa7ac9 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -46,39 +46,48 @@ type sdkInjector struct { client client.Client } -func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { +func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod, containerName string) corev1.Pod { if len(pod.Spec.Containers) < 1 { return pod } + // We search for specific container to inject variables and if no one is found + // We fallback to first container + var index = 0 + for idx, ctnair := range pod.Spec.Containers { + if ctnair.Name == containerName { + index = idx + } + } + // inject only to the first container for now // in the future we can define an annotation to configure this if insts.Java != nil { otelinst := *insts.Java i.logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectJavaagent(i.logger, otelinst.Spec.Java, pod) - pod = i.injectCommonEnvVar(otelinst, pod) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectJavaagent(i.logger, otelinst.Spec.Java, pod, index) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } if insts.NodeJS != nil { otelinst := *insts.NodeJS i.logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectNodeJSSDK(i.logger, otelinst.Spec.NodeJS, pod) - pod = i.injectCommonEnvVar(otelinst, pod) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectNodeJSSDK(i.logger, otelinst.Spec.NodeJS, pod, index) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } if insts.Python != nil { otelinst := *insts.Python i.logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectPythonSDK(i.logger, otelinst.Spec.Python, pod) - pod = i.injectCommonEnvVar(otelinst, pod) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod) + pod = injectPythonSDK(i.logger, otelinst.Spec.Python, pod, index) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } return pod } -func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod corev1.Pod) corev1.Pod { - container := &pod.Spec.Containers[0] +func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod corev1.Pod, index int) corev1.Pod { + container := &pod.Spec.Containers[index] for _, env := range otelinst.Spec.Env { idx := getIndexOfEnv(container.Env, env.Name) if idx == -1 { @@ -88,14 +97,14 @@ func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod return pod } -func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { - container := &pod.Spec.Containers[0] - resourceMap := i.createResourceMap(ctx, otelinst, ns, pod) +func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) corev1.Pod { + container := &pod.Spec.Containers[index] + resourceMap := i.createResourceMap(ctx, otelinst, ns, pod, index) idx := getIndexOfEnv(container.Env, constants.EnvOTELServiceName) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ Name: constants.EnvOTELServiceName, - Value: chooseServiceName(pod, resourceMap), + Value: chooseServiceName(pod, resourceMap, index), }) } if otelinst.Spec.Exporter.Endpoint != "" { @@ -198,7 +207,7 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph return pod } -func chooseServiceName(pod corev1.Pod, resources map[string]string) string { +func chooseServiceName(pod corev1.Pod, resources map[string]string, index int) string { if name := resources[string(semconv.K8SDeploymentNameKey)]; name != "" { return name } @@ -214,17 +223,17 @@ func chooseServiceName(pod corev1.Pod, resources map[string]string) string { if name := resources[string(semconv.K8SPodNameKey)]; name != "" { return name } - return pod.Spec.Containers[0].Name + return pod.Spec.Containers[index].Name } // createResourceMap creates resource attribute map. // User defined attributes (in explicitly set env var) have higher precedence. -func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod) map[string]string { +func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) map[string]string { // get existing resources env var and parse it into a map existingRes := map[string]bool{} - existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[0].Env, constants.EnvOTELResourceAttrs) + existingResourceEnvIdx := getIndexOfEnv(pod.Spec.Containers[index].Env, constants.EnvOTELResourceAttrs) if existingResourceEnvIdx > -1 { - existingResArr := strings.Split(pod.Spec.Containers[0].Env[existingResourceEnvIdx].Value, ",") + existingResArr := strings.Split(pod.Spec.Containers[index].Env[existingResourceEnvIdx].Value, ",") for _, kv := range existingResArr { keyValueArr := strings.Split(strings.TrimSpace(kv), "=") if len(keyValueArr) != 2 { @@ -243,7 +252,7 @@ func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.I k8sResources := map[attribute.Key]string{} k8sResources[semconv.K8SNamespaceNameKey] = ns.Name - k8sResources[semconv.K8SContainerNameKey] = pod.Spec.Containers[0].Name + k8sResources[semconv.K8SContainerNameKey] = pod.Spec.Containers[index].Name // Some fields might be empty - node name, pod name // The pod name might be empty if the pod is created form deployment template k8sResources[semconv.K8SPodNameKey] = pod.Name diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 10030b609..304d0d93a 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -364,7 +364,7 @@ func TestSDKInjection(t *testing.T) { inj := sdkInjector{ client: k8sClient, } - pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod) + pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod, 0) _, err = json.MarshalIndent(pod, "", " ") assert.NoError(t, err) assert.Equal(t, test.expected, pod) @@ -399,7 +399,7 @@ func TestInjectJava(t *testing.T) { }, }, }, - }) + }, "") assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ @@ -497,7 +497,7 @@ func TestInjectNodeJS(t *testing.T) { }, }, }, - }) + }, "") assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ @@ -596,7 +596,7 @@ func TestInjectPython(t *testing.T) { }, }, }, - }) + }, "") assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ diff --git a/tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..f77a3f835 --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: java +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml new file mode 100644 index 000000000..0b1b9d37e --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml @@ -0,0 +1,80 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myapp,myrabbit + instrumentation.opentelemetry.io/inject-java: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: myrabbit + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..b05162435 --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/pavolloffay/spring-petclinic:latest + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml new file mode 100644 index 000000000..9ff62f1ee --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml @@ -0,0 +1,50 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myrabbit + instrumentation.opentelemetry.io/inject-java: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: myrabbit + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..c963b8737 --- /dev/null +++ b/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/pavolloffay/spring-petclinic:latest + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..f77a3f835 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: java +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml new file mode 100644 index 000000000..88c16084e --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myapp,myrabbit + instrumentation.opentelemetry.io/inject-nodejs: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: NODE_OPTIONS + value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: myrabbit + env: + - name: NODE_OPTIONS + value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..2514ba5e5 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/express-hello-world:latest + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml new file mode 100644 index 000000000..c54cdd167 --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml @@ -0,0 +1,44 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myrabbit + instrumentation.opentelemetry.io/inject-nodejs: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: myrabbit + env: + - name: NODE_OPTIONS + value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..ea8f74d0b --- /dev/null +++ b/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/express-hello-world:latest + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..f77a3f835 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: java +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml new file mode 100644 index 000000000..6f09aa613 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myapp,myrabbit + instrumentation.opentelemetry.io/inject-python: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: PYTHONPATH + value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: myrabbit + env: + - name: PYTHONPATH + value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..82910ec97 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/flask-hello-world:latest + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml new file mode 100644 index 000000000..904fa1d38 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml @@ -0,0 +1,44 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myrabbit + instrumentation.opentelemetry.io/inject-python: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: myrabbit + env: + - name: PYTHONPATH + value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + - name: OTEL_TRACES_EXPORTER + value: otlp_proto_http + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES + - name: OTEL_PROPAGATORS + value: jaeger,b3 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..8101f7d16 --- /dev/null +++ b/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + containers: + - name: myapp + image: ghcr.io/anuraaga/flask-hello-world:latest + - name: myrabbit + image: rabbitmq From 6420f50a2270b9d705399bcc57e5c811eaa2d3b0 Mon Sep 17 00:00:00 2001 From: fscellos Date: Mon, 16 May 2022 14:04:25 +0200 Subject: [PATCH 0510/1234] Fix e2e tests (simple order change on merge on main between injected attributes) #871 (#875) --- tests/e2e/instrumentation-java-multicontainer/01-assert.yaml | 4 ++-- tests/e2e/instrumentation-java-multicontainer/02-assert.yaml | 2 +- .../e2e/instrumentation-nodejs-multicontainer/01-assert.yaml | 4 ++-- .../e2e/instrumentation-nodejs-multicontainer/02-assert.yaml | 2 +- .../e2e/instrumentation-python-multicontainer/01-assert.yaml | 4 ++-- .../e2e/instrumentation-python-multicontainer/02-assert.yaml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml index 0b1b9d37e..5e4f02fcc 100644 --- a/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml @@ -35,9 +35,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation @@ -68,9 +68,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml index 9ff62f1ee..0df16471a 100644 --- a/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml @@ -38,9 +38,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml index 88c16084e..17f8bd73a 100644 --- a/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml @@ -29,9 +29,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation @@ -56,9 +56,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml index c54cdd167..d9688c06e 100644 --- a/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml @@ -32,9 +32,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml index 6f09aa613..196be91e8 100644 --- a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml @@ -29,9 +29,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation @@ -56,9 +56,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation diff --git a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml index 904fa1d38..66335224b 100644 --- a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml @@ -32,9 +32,9 @@ spec: value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES - name: OTEL_PROPAGATORS value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - mountPath: /otel-auto-instrumentation From fde26f958ebb2b8cf9acac1e907fdf4a170f671e Mon Sep 17 00:00:00 2001 From: fscellos Date: Wed, 18 May 2022 11:01:28 +0200 Subject: [PATCH 0511/1234] Documentation for container-names annotation (#876) * Documentation for container-names annotation * Taking account of @pavolloffay's remarks * Correct labl and name of sample pod in doc --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 46c7225af..44bc61ffe 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,44 @@ The possible values for the annotation can be * `"my-instrumentation"` - name of `Instrumentation` CR instance. * `"false"` - do not inject +#### Multi-container pods + +If nothing else is specified, instrumentation is performed on the first container available in the pod spec. +In some cases (for example in the case of the injection of an Istio sidecar) it becomes necessary to specify on which container(s) this injection must be performed. + +For this, it is possible to fine-tune the pod(s) on which the injection will be carried out. + +For this, we will use the `instrumentation.opentelemetry.io/container-names` annotation for which we will indicate one or more pod names (`.spec.containers.name`) on which the injection must be made: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-multiple-containers +spec: + selector: + matchLabels: + app: my-pod-with-multiple-containers + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-multiple-containers + annotations: + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myapp2" + spec: + containers: + - name: myapp + image: myImage1 + - name: myapp2 + image: myImage2 + - name: myapp3 + image: myImage3 +``` + +In the above case, `myapp` and `myapp2` containers will be instrumented, `myapp3` will not. + #### Use customized or vendor instrumentation By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by From 8e502ff60e142a48374d64846a640806ed146067 Mon Sep 17 00:00:00 2001 From: Eric Hsueh <39718333+erichsueh3@users.noreply.github.com> Date: Wed, 18 May 2022 02:02:00 -0700 Subject: [PATCH 0512/1234] OTEL Operator release 0.51.0 (#869) * OTEL Operator release 0.51.0 * update changelog --- CHANGELOG.md | 14 ++++++++++++++ README.md | 1 + ...entelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f9c0b42..af276ef48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,20 @@ Changes by Version ================== +0.51.0 +------------------- +### 🚀 New components 🚀 +* Choose target container injection with annotation ([#689](https://github.com/open-telemetry/opentelemetry-operator/pull/689), [@fscellos](https://github.com/fscellos)) +* Fix K8s attributes values in OTEL_RESOURCE_ATTRIBUTES env var ([#864](https://github.com/open-telemetry/opentelemetry-operator/pull/864), [@mat-rumian](https://github.com/mat-rumian)) +### 💡 Enhancements 💡 +* Update Python auto-instrumentation versions.txt ([#867](https://github.com/open-telemetry/opentelemetry-operator/pull/867), [@mat-rumian](https://github.com/mat-rumian)) +* Update Python instrumentation to 0.30b1 ([#860](https://github.com/open-telemetry/opentelemetry-operator/pull/860), [@mat-rumian](https://github.com/mat-rumian)) +* Fix changelog formatting ([#863](https://github.com/open-telemetry/opentelemetry-operator/pull/863), [@pavolloffay](https://github.com/pavolloffay)) +### 🧰 Bug fixes 🧰 +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.51.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.51.0) +* [OpenTelemetry Contrib - v0.51.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.51.0) + 0.50.0 ------------------- ### 🚀 New components 🚀 diff --git a/README.md b/README.md index 44bc61ffe..43ec69659 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.51.0 | v1.19 to v1.23 | 1.6.1 | | v0.50.0 | v1.19 to v1.23 | 1.6.1 | | v0.49.0 | v1.19 to v1.23 | 1.6.1 | | v0.48.0 | v1.19 to v1.23 | 1.6.1 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e1f577445..d12a529bf 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.50.0 + name: opentelemetry-operator.v0.51.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.50.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.51.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.50.0 + version: 0.51.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index bfec5864a..655e1ea25 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.50.0 +opentelemetry-collector=0.51.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.50.0 +operator=0.51.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 4ffcef48154442245507d82b9147f45f572e561b Mon Sep 17 00:00:00 2001 From: DWonMtl Date: Thu, 19 May 2022 07:08:25 -0400 Subject: [PATCH 0513/1234] avoid non static labels in workload objects selector (#849) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Gagné --- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 29 ++++++++++++++++++++++---- pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 29 ++++++++++++++++++++++---- pkg/collector/labels.go | 20 ++++++++++++++---- pkg/collector/labels_test.go | 19 +++++++++++++++++ pkg/collector/reconcile/daemonset.go | 3 +++ pkg/collector/reconcile/deployment.go | 3 +++ pkg/collector/reconcile/statefulset.go | 3 +++ pkg/collector/serviceaccount.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 29 ++++++++++++++++++++++---- 12 files changed, 123 insertions(+), 20 deletions(-) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 5af932957..dec920a09 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -41,7 +41,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, Spec: appsv1.DaemonSetSpec{ Selector: &metav1.LabelSelector{ - MatchLabels: labels, + MatchLabels: SelectorLabels(otelcol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index eab9cd9d6..f1705adc3 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -30,7 +30,8 @@ func TestDaemonSetNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", + Name: "my-instance", + Namespace: "my-namespace", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Tolerations: testTolerationValues, @@ -57,8 +58,28 @@ func TestDaemonSetNewDefault(t *testing.T) { } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) - // the pod selector should match the pod spec's labels - assert.Equal(t, d.Spec.Selector.MatchLabels, d.Spec.Template.Labels) + expectedLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "my-instance-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + } + assert.Equal(t, expectedLabels, d.Spec.Template.Labels) + + expectedSelectorLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + } + assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) + + // the pod selector must be contained within pod spec's labels + for k, v := range d.Spec.Selector.MatchLabels { + assert.Equal(t, v, d.Spec.Template.Labels[k]) + } } func TestDaemonsetHostNetwork(t *testing.T) { @@ -95,7 +116,7 @@ func TestDaemonsetPodAnnotations(t *testing.T) { // test ds := DaemonSet(cfg, logger, otelcol) - //Add sha256 podAnnotation + // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // verify diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index f69f6203f..bc0e4ce7c 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -43,7 +43,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Spec: appsv1.DeploymentSpec{ Replicas: otelcol.Spec.Replicas, Selector: &metav1.LabelSelector{ - MatchLabels: labels, + MatchLabels: SelectorLabels(otelcol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 145ede532..f9e1be935 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -38,7 +38,8 @@ func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", + Name: "my-instance", + Namespace: "my-namespace", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Tolerations: testTolerationValues, @@ -65,8 +66,28 @@ func TestDeploymentNewDefault(t *testing.T) { } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) - // the pod selector should match the pod spec's labels - assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) + expectedLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "my-instance-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + } + assert.Equal(t, expectedLabels, d.Spec.Template.Labels) + + expectedSelectorLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + } + assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) + + // the pod selector must be contained within pod spec's labels + for k, v := range d.Spec.Selector.MatchLabels { + assert.Equal(t, v, d.Spec.Template.Labels[k]) + } } func TestDeploymentPodAnnotations(t *testing.T) { @@ -85,7 +106,7 @@ func TestDeploymentPodAnnotations(t *testing.T) { // test d := Deployment(cfg, logger, otelcol) - //Add sha256 podAnnotation + // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // verify diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 5f1baba83..311ba6f7e 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -43,10 +43,10 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map } } - base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - base["app.kubernetes.io/instance"] = naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name) - base["app.kubernetes.io/part-of"] = "opentelemetry" - base["app.kubernetes.io/component"] = "opentelemetry-collector" + for k, v := range SelectorLabels(instance) { + base[k] = v + } + version := strings.Split(instance.Spec.Image, ":") if len(version) > 1 { base["app.kubernetes.io/version"] = version[len(version)-1] @@ -56,3 +56,15 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map return base } + +// SelectorLabels return the common labels to all objects that are part of a managed OpenTelemetryCollector to use as selector. +// Selector labels are immutable for Deployment, StatefulSet and DaemonSet, therefore, no labels in selector should be +// expected to be modified for the lifetime of the object. +func SelectorLabels(instance v1alpha1.OpenTelemetryCollector) map[string]string { + return map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name), + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/component": "opentelemetry-collector", + } +} diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 9e9be9568..2116b9f19 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -97,3 +97,22 @@ func TestLabelsFilter(t *testing.T) { assert.NotContains(t, labels, "test.bar.io") assert.Equal(t, "bar", labels["test.foo.io"]) } + +func TestSelectorLabels(t *testing.T) { + // prepare + expected := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-opentelemetry-collector", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + } + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{Name: "my-opentelemetry-collector", Namespace: "my-namespace"}, + } + + // test + result := SelectorLabels(otelcol) + + // verify + assert.Equal(t, expected, result) +} diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index ff4f4a134..be597cd7e 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -89,6 +89,9 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da updated.ObjectMeta.Labels[k] = v } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + updated.Spec.Selector = existing.Spec.Selector.DeepCopy() + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index d8bb01d54..b57a030c9 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -104,6 +104,9 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.Spec.Replicas = ¤tReplicas } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + updated.Spec.Selector = existing.Spec.Selector.DeepCopy() + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index 0f8baecdf..372b28d3b 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -90,6 +90,9 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. updated.ObjectMeta.Labels[k] = v } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + updated.Spec.Selector = existing.Spec.Selector.DeepCopy() + patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index ac7e61ca4..4804b83b3 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -31,7 +31,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { return instance.Spec.ServiceAccount } -//ServiceAccount returns the service account for the given instance. +// ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { labels := Labels(otelcol, []string{}) labels["app.kubernetes.io/name"] = naming.ServiceAccount(otelcol) diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 04fe18b33..cfe20fcee 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -43,7 +43,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Spec: appsv1.StatefulSetSpec{ ServiceName: naming.Service(otelcol), Selector: &metav1.LabelSelector{ - MatchLabels: labels, + MatchLabels: SelectorLabels(otelcol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index bfdc6e26b..add60afba 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -33,7 +33,8 @@ func TestStatefulSetNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", + Name: "my-instance", + Namespace: "my-namespace", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Mode: "statefulset", @@ -61,8 +62,28 @@ func TestStatefulSetNewDefault(t *testing.T) { } assert.Equal(t, expectedAnnotations, ss.Spec.Template.Annotations) - // the pod selector should match the pod spec's labels - assert.Equal(t, ss.Spec.Selector.MatchLabels, ss.Spec.Template.Labels) + expectedLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "my-instance-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + } + assert.Equal(t, expectedLabels, ss.Spec.Template.Labels) + + expectedSelectorLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + } + assert.Equal(t, expectedSelectorLabels, ss.Spec.Selector.MatchLabels) + + // the pod selector must be contained within pod spec's labels + for k, v := range ss.Spec.Selector.MatchLabels { + assert.Equal(t, v, ss.Spec.Template.Labels[k]) + } // assert correct service name assert.Equal(t, "my-instance-collector", ss.Spec.ServiceName) @@ -144,7 +165,7 @@ func TestStatefulSetPodAnnotations(t *testing.T) { // test ss := StatefulSet(cfg, logger, otelcol) - //Add sha256 podAnnotation + // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" // verify From 58a8e79d5c25873a9b68c23688a9f94a3c21a9d2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 24 May 2022 09:33:48 +0200 Subject: [PATCH 0514/1234] Fix docker multiarch build for operator (#882) * Fix docker multiarch build for operator Signed-off-by: Pavol Loffay * Fix docker multiarch build for operator Signed-off-by: Pavol Loffay * Fix multiarch build for TA Signed-off-by: Pavol Loffay --- Dockerfile | 3 +-- cmd/otel-allocator/Dockerfile | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 501565fef..a38643660 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,6 @@ COPY internal/ internal/ COPY pkg/ pkg/ COPY versions.txt versions.txt -ARG TARGETARCH=amd64 ARG VERSION_PKG ARG VERSION ARG VERSION_DATE @@ -28,7 +27,7 @@ ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 3179bf22c..6f88d650a 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,8 +1,6 @@ # Build the target allocator binary FROM golang:1.18 as builder -ARG TARGETARCH=amd64 - WORKDIR /app # Copy go mod and sum files @@ -13,7 +11,7 @@ RUN go mod download COPY . . # Build the Go app -RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -installsuffix cgo -o main . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . ######## Start a new stage from scratch ####### FROM alpine:latest From 827c9bb1c9312e9baf92c57ca7d96d22b3f0dbcf Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 1 Jun 2022 09:14:29 +0200 Subject: [PATCH 0515/1234] Add Yuri Oliveira as Operator Approver (#904) Signed-off-by: Yuri Sa --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 43ec69659..a75be233d 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): - [Dmitrii Anoshin](https://github.com/dmitryax), Splunk +- [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat Emeritus Approvers: From e28a2cec71d0ca38216b96f022c2e2db55cf55f5 Mon Sep 17 00:00:00 2001 From: Abel Perez Martinez Date: Wed, 1 Jun 2022 08:19:10 +0100 Subject: [PATCH 0516/1234] Added extra cli flag webhook-port (#899) * Added extra cli flag webhook-port * Fixed typo preventing the use of the cli flag health-probe-addr --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index faf7d5af6..c7928d855 100644 --- a/main.go +++ b/main.go @@ -81,10 +81,11 @@ func main() { autoInstrumentationNodeJS string autoInstrumentationPython string labelsFilter []string + webhookPort int ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") - flag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") + pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") @@ -94,6 +95,7 @@ func main() { pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") + pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) @@ -148,7 +150,7 @@ func main() { mgrOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, - Port: 9443, + Port: webhookPort, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", From f351a6d3af6ebf33a1e5dfc3b3d2d9c6cd885874 Mon Sep 17 00:00:00 2001 From: Phil Davies Date: Wed, 1 Jun 2022 08:20:06 +0100 Subject: [PATCH 0517/1234] Cross namespace instrumentation (#889) * support cross-namespace instrumentation reference * update readme --- README.md | 3 +- pkg/instrumentation/podmutator.go | 9 +++- .../00-cleanup-other-ns.yaml | 6 +++ .../00-install-collector.yaml | 23 +++++++++ .../00-install-instrumentation.yaml | 41 ++++++++++++++++ .../01-assert.yaml | 48 +++++++++++++++++++ .../01-install-app.yaml | 24 ++++++++++ 7 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml create mode 100644 tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-java-other-ns/01-assert.yaml create mode 100644 tests/e2e/instrumentation-java-other-ns/01-install-app.yaml diff --git a/README.md b/README.md index a75be233d..a404b2f32 100644 --- a/README.md +++ b/README.md @@ -212,7 +212,8 @@ instrumentation.opentelemetry.io/inject-python: "true" The possible values for the annotation can be * `"true"` - inject and `Instrumentation` resource from the namespace. -* `"my-instrumentation"` - name of `Instrumentation` CR instance. +* `"my-instrumentation"` - name of `Instrumentation` CR instance in the current namespace. +* `"my-other-namespace/my-instrumentation"` - name and namespace of `Instrumentation` CR instance in another namespace. * `"false"` - do not inject #### Multi-container pods diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index c442af553..8f9c4c237 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -118,8 +118,15 @@ func (pm *instPodMutator) getInstrumentationInstance(ctx context.Context, ns cor return pm.selectInstrumentationInstanceFromNamespace(ctx, ns) } + var instNamespacedName types.NamespacedName + if instNamespace, instName, namespaced := strings.Cut(instValue, "/"); namespaced { + instNamespacedName = types.NamespacedName{Name: instName, Namespace: instNamespace} + } else { + instNamespacedName = types.NamespacedName{Name: instValue, Namespace: ns.Name} + } + otelInst := &v1alpha1.Instrumentation{} - err := pm.Client.Get(ctx, types.NamespacedName{Name: instValue, Namespace: ns.Name}, otelInst) + err := pm.Client.Get(ctx, instNamespacedName, otelInst) if err != nil { return nil, err } diff --git a/tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml b/tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml new file mode 100644 index 000000000..ee6bc7f70 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: v1 + kind: Namespace + name: my-other-ns diff --git a/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml b/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml new file mode 100644 index 000000000..1cc0dfd27 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml @@ -0,0 +1,41 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: my-other-ns +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: java + namespace: my-other-ns +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" diff --git a/tests/e2e/instrumentation-java-other-ns/01-assert.yaml b/tests/e2e/instrumentation-java-other-ns/01-assert.yaml new file mode 100644 index 000000000..fc4dd7535 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/01-assert.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "my-other-ns/java" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_JAVAAGENT_DEBUG + value: "true" + - name: OTEL_INSTRUMENTATION_JDBC_ENABLED + value: "false" + - name: SPLUNK_PROFILER_ENABLED + value: "false" + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation +status: + phase: Running diff --git a/tests/e2e/instrumentation-java-other-ns/01-install-app.yaml b/tests/e2e/instrumentation-java-other-ns/01-install-app.yaml new file mode 100644 index 000000000..f566eb4c0 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/01-install-app.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-java: "my-other-ns/java" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: ghcr.io/pavolloffay/spring-petclinic:latest From bad6ae7cb2f7a4eb3b242aa62bd96b8b4ea3e41d Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 3 Jun 2022 12:12:05 +0200 Subject: [PATCH 0518/1234] Add creation of ServiceAccount to the Target Allocator (#836) * Added the creation or linking of an existing service account to the target allocator * Fix test * Updated from feedback * Fixed test package --- apis/v1alpha1/opentelemetrycollector_types.go | 4 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 ++ docs/api.md | 7 +++ pkg/collector/reconcile/serviceaccount.go | 4 ++ .../reconcile/serviceaccount_test.go | 10 +++- pkg/naming/main.go | 5 ++ pkg/targetallocator/deployment.go | 5 +- pkg/targetallocator/serviceaccount.go | 47 +++++++++++++++ pkg/targetallocator/serviceaccount_test.go | 59 +++++++++++++++++++ .../e2e/smoke-targetallocator/02-assert.yaml | 6 +- 11 files changed, 150 insertions(+), 5 deletions(-) create mode 100644 pkg/targetallocator/serviceaccount.go create mode 100644 pkg/targetallocator/serviceaccount_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 0fc999188..25a0e60db 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -134,6 +134,10 @@ type OpenTelemetryTargetAllocator struct { // +optional PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` + // ServiceAccount indicates the name of an existing service account to use with this instance. + // +optional + ServiceAccount string `json:"serviceAccount,omitempty"` + // Image indicates the container image to use for the OpenTelemetry TargetAllocator. // +optional Image string `json:"image,omitempty"` diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index b9eba01c8..173ea6883 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -692,6 +692,10 @@ spec: custom resources as targets or not. type: boolean type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. + type: string type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 4cdacfcf2..60335aeff 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -690,6 +690,10 @@ spec: custom resources as targets or not. type: boolean type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. + type: string type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. diff --git a/docs/api.md b/docs/api.md index b5213b0b6..6e947a112 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2593,6 +2593,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
false + + serviceAccount + string + + ServiceAccount indicates the name of an existing service account to use with this instance.
+ + false diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 0cb6cc029..2aa55e50d 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -26,6 +26,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) // +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete @@ -36,6 +37,9 @@ func ServiceAccounts(ctx context.Context, params Params) error { if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { desired = append(desired, collector.ServiceAccount(params.Instance)) } + if params.Instance.Spec.TargetAllocator.Enabled { + desired = append(desired, targetallocator.ServiceAccount(params.Instance)) + } // first, handle the create/update parts if err := expectedServiceAccounts(ctx, params, desired); err != nil { diff --git a/pkg/collector/reconcile/serviceaccount_test.go b/pkg/collector/reconcile/serviceaccount_test.go index 2886fae93..db310237c 100644 --- a/pkg/collector/reconcile/serviceaccount_test.go +++ b/pkg/collector/reconcile/serviceaccount_test.go @@ -24,18 +24,24 @@ import ( "k8s.io/apimachinery/pkg/types" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) func TestExpectedServiceAccounts(t *testing.T) { - t.Run("should create service account", func(t *testing.T) { + t.Run("should create multiple service accounts", func(t *testing.T) { desired := collector.ServiceAccount(params().Instance) - err := expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{desired}) + allocatorDesired := targetallocator.ServiceAccount(params().Instance) + err := expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{desired, allocatorDesired}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) assert.NoError(t, err) assert.True(t, exists) + allocatorExists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + assert.NoError(t, err) + assert.True(t, allocatorExists) + }) t.Run("should update existing service account", func(t *testing.T) { diff --git a/pkg/naming/main.go b/pkg/naming/main.go index d81b9130c..f1124fa61 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -83,3 +83,8 @@ func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } + +// TargetAllocatorServiceAccount returns the TargetAllocator service account resource name. +func TargetAllocatorServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) +} diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 6a68e33bc..f7be218dd 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -49,8 +49,9 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, - Volumes: Volumes(cfg, otelcol), + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), }, }, }, diff --git a/pkg/targetallocator/serviceaccount.go b/pkg/targetallocator/serviceaccount.go new file mode 100644 index 000000000..bd6d32df2 --- /dev/null +++ b/pkg/targetallocator/serviceaccount.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. +func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { + if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 { + return naming.ServiceAccount(instance) + } + + return instance.Spec.TargetAllocator.ServiceAccount +} + +//ServiceAccount returns the service account for the given instance. +func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { + labels := Labels(otelcol) + labels["app.kubernetes.io/name"] = naming.TargetAllocatorServiceAccount(otelcol) + + return corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.TargetAllocatorServiceAccount(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: otelcol.Annotations, + }, + } +} diff --git a/pkg/targetallocator/serviceaccount_test.go b/pkg/targetallocator/serviceaccount_test.go new file mode 100644 index 000000000..a5f7e9fc4 --- /dev/null +++ b/pkg/targetallocator/serviceaccount_test.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestServiceAccountNewDefault(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + assert.Equal(t, "my-instance-collector", sa) +} + +func TestServiceAccountOverride(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + ServiceAccount: "my-special-sa", + }, + }, + } + + // test + sa := ServiceAccountName(otelcol) + + // verify + assert.Equal(t, "my-special-sa", sa) +} diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/02-assert.yaml index 20e774ce9..7cddf56a5 100644 --- a/tests/e2e/smoke-targetallocator/02-assert.yaml +++ b/tests/e2e/smoke-targetallocator/02-assert.yaml @@ -18,4 +18,8 @@ apiVersion: v1 kind: ConfigMap metadata: name: stateful-targetallocator - \ No newline at end of file +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: stateful-targetallocator From 4b895db8c90f0b5467d03a8ec1f37843e2204e4b Mon Sep 17 00:00:00 2001 From: Evan Li <57517886+evanli02@users.noreply.github.com> Date: Tue, 7 Jun 2022 13:10:55 -0700 Subject: [PATCH 0519/1234] updated module name and imports (#910) --- cmd/otel-allocator/discovery/discovery.go | 4 ++-- cmd/otel-allocator/discovery/discovery_test.go | 4 ++-- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/main.go | 10 +++++----- cmd/otel-allocator/watcher/file.go | 2 +- cmd/otel-allocator/watcher/main.go | 4 ++-- cmd/otel-allocator/watcher/promOperator.go | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 4dfb74c2b..0025587f4 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -5,8 +5,8 @@ import ( "github.com/go-kit/log" "github.com/go-logr/logr" - "github.com/otel-allocator/allocation" - allocatorWatcher "github.com/otel-allocator/watcher" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 872651cc1..26cd3f8f9 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -8,8 +8,8 @@ import ( "testing" gokitlog "github.com/go-kit/log" - "github.com/otel-allocator/allocation" - "github.com/otel-allocator/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 3ad2e1b7f..7080dde7f 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -1,4 +1,4 @@ -module github.com/otel-allocator +module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator go 1.18 diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 734030955..1b6a6d6a9 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -12,11 +12,11 @@ import ( gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/gorilla/mux" - "github.com/otel-allocator/allocation" - "github.com/otel-allocator/collector" - "github.com/otel-allocator/config" - lbdiscovery "github.com/otel-allocator/discovery" - allocatorWatcher "github.com/otel-allocator/watcher" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ctrl "sigs.k8s.io/controller-runtime" ) diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index 4872ba419..262bb71bf 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -5,7 +5,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-logr/logr" - "github.com/otel-allocator/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) type FileWatcher struct { diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go index fae547e24..534d8fc7e 100644 --- a/cmd/otel-allocator/watcher/main.go +++ b/cmd/otel-allocator/watcher/main.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/go-logr/logr" - "github.com/otel-allocator/allocation" - "github.com/otel-allocator/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) type Manager struct { diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 2804ee00b..382b2f217 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -3,7 +3,7 @@ package watcher import ( "fmt" - allocatorconfig "github.com/otel-allocator/config" + allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" "github.com/go-kit/log" "github.com/go-logr/logr" From eccfb67605797e61e970850d155a242df5759b49 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 8 Jun 2022 09:05:42 +0200 Subject: [PATCH 0520/1234] Bump cert manager to 1.8.0 (#905) * Add Yuri Oliveira as Operator Approver Signed-off-by: Yuri Sa * Add compatibility with cert-manager 1.8.0 Signed-off-by: Yuri Sa * Including Cert-Manager Kind Versions * Add compatibility with cert-manager 1.6.3 Signed-off-by: Yuri Sa --- Makefile | 2 +- README.md | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 9c423a0e5..4024410bc 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml OPERATOR_SDK_VERSION ?= 1.17.0 -CERTMANAGER_VERSION ?= 1.6.1 +CERTMANAGER_VERSION ?= 1.8.0 ifndef ignore-not-found ignore-not-found = false diff --git a/README.md b/README.md index a404b2f32..d9b36636d 100644 --- a/README.md +++ b/README.md @@ -297,27 +297,27 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| -| v0.51.0 | v1.19 to v1.23 | 1.6.1 | -| v0.50.0 | v1.19 to v1.23 | 1.6.1 | -| v0.49.0 | v1.19 to v1.23 | 1.6.1 | -| v0.48.0 | v1.19 to v1.23 | 1.6.1 | -| v0.47.0 | v1.19 to v1.23 | 1.6.1 | -| v0.46.0 | v1.19 to v1.23 | 1.6.1 | -| v0.45.0 | v1.21 to v1.23 | 1.6.1 | -| v0.44.0 | v1.21 to v1.23 | 1.6.1 | -| v0.43.0 | v1.21 to v1.23 | 1.6.1 | -| v0.42.0 | v1.21 to v1.23 | 1.6.1 | -| v0.41.1 | v1.21 to v1.23 | 1.6.1 | -| v0.41.0 | v1.20 to v1.22 | 1.6.1 | -| v0.40.0 | v1.20 to v1.22 | 1.6.1 | -| v0.39.0 | v1.20 to v1.22 | 1.6.1 | -| v0.38.0 | v1.20 to v1.22 | 1.6.1 | -| v0.37.1 | v1.20 to v1.22 | v1.4.0 to v1.6.1 | -| v0.37.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | -| v0.36.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | -| v0.35.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | -| v0.34.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | -| v0.33.0 | v1.20 to v1.22 | v1.4.0 to v1.5.4 | +| v0.51.0 | v1.19 to v1.23 | v1alpha2 | +| v0.50.0 | v1.19 to v1.23 | v1alpha2 | +| v0.49.0 | v1.19 to v1.23 | v1alpha2 | +| v0.48.0 | v1.19 to v1.23 | v1alpha2 | +| v0.47.0 | v1.19 to v1.23 | v1alpha2 | +| v0.46.0 | v1.19 to v1.23 | v1alpha2 | +| v0.45.0 | v1.21 to v1.23 | v1alpha2 | +| v0.44.0 | v1.21 to v1.23 | v1alpha2 | +| v0.43.0 | v1.21 to v1.23 | v1alpha2 | +| v0.42.0 | v1.21 to v1.23 | v1alpha2 | +| v0.41.1 | v1.21 to v1.23 | v1alpha2 | +| v0.41.0 | v1.20 to v1.22 | v1alpha2 | +| v0.40.0 | v1.20 to v1.22 | v1alpha2 | +| v0.39.0 | v1.20 to v1.22 | v1alpha2 | +| v0.38.0 | v1.20 to v1.22 | v1alpha2 | +| v0.37.1 | v1.20 to v1.22 | v1alpha2 | +| v0.37.0 | v1.20 to v1.22 | v1alpha2 | +| v0.36.0 | v1.20 to v1.22 | v1alpha2 | +| v0.35.0 | v1.20 to v1.22 | v1alpha2 | +| v0.34.0 | v1.20 to v1.22 | v1alpha2 | +| v0.33.0 | v1.20 to v1.22 | v1alpha2 | ## Contributing and Developing From 5350f41be4a17afab774f15e28c15f88a22f10ba Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 8 Jun 2022 13:28:40 +0200 Subject: [PATCH 0521/1234] Print targetallocator logs on test failure (#918) Signed-off-by: Pavol Loffay --- tests/e2e/targetallocator-features/02-assert.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/02-assert.yaml index 90f56dcfb..fa49547bb 100644 --- a/tests/e2e/targetallocator-features/02-assert.yaml +++ b/tests/e2e/targetallocator-features/02-assert.yaml @@ -73,4 +73,10 @@ status: apiVersion: v1 kind: ConfigMap metadata: - name: stateful-targetallocator \ No newline at end of file + name: stateful-targetallocator +--- +# Print TA pod logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/component=opentelemetry-targetallocator From 24f18bd2735978f259ab9bd130fd34d07c406dd3 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 8 Jun 2022 13:33:58 +0200 Subject: [PATCH 0522/1234] Prevent always downloading cmctl and operator-sdk (#917) * Reuse cmctl and operator-sdk from the filesystem Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 4024410bc..a720c4a67 100644 --- a/Makefile +++ b/Makefile @@ -207,6 +207,9 @@ CMCTL = $(shell pwd)/bin/cmctl cmctl: @{ \ set -e ;\ + if (`pwd`/bin/cmctl version | grep ${CERTMANAGER_VERSION}) > /dev/null 2>&1 ; then \ + exit 0; \ + fi ;\ TMP_DIR=$$(mktemp -d) ;\ curl -L -o $$TMP_DIR/cmctl.tar.gz https://github.com/jetstack/cert-manager/releases/download/v$(CERTMANAGER_VERSION)/cmctl-`go env GOOS`-`go env GOARCH`.tar.gz ;\ tar xzf $$TMP_DIR/cmctl.tar.gz -C $$TMP_DIR ;\ @@ -289,6 +292,9 @@ OPERATOR_SDK = $(shell pwd)/bin/operator-sdk operator-sdk: @{ \ set -e ;\ + if (`pwd`/bin/operator-sdk version | grep ${OPERATOR_SDK_VERSION}) > /dev/null 2>&1 ; then \ + exit 0; \ + fi ;\ [ -d bin ] || mkdir bin ;\ curl -L -o $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/v${OPERATOR_SDK_VERSION}/operator-sdk_`go env GOOS`_`go env GOARCH`;\ chmod +x $(OPERATOR_SDK) ;\ From 21a266b629e8409881fae6677c34714d8cff15ba Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 8 Jun 2022 14:03:00 +0200 Subject: [PATCH 0523/1234] Retract version 1.51.0 from gomod (#914) Signed-off-by: Pavol Loffay --- go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go.mod b/go.mod index 1bbf14762..cc7ed48cd 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/open-telemetry/opentelemetry-operator go 1.18 +retract v1.51.0 + require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/go-logr/logr v1.2.3 From 61865143048781f41e042e54593cf065efb6be02 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 8 Jun 2022 14:03:16 +0200 Subject: [PATCH 0524/1234] Adding Otel Operator v0.52.0 (#916) Signed-off-by: Yuri Sa --- .gitignore | 3 ++- CHANGELOG.md | 16 ++++++++++++++++ README.md | 1 + ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 5 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b33bd1dca..6b11e1025 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ vendor # local resources, not to be committed local config/manager/kustomization.yaml +.vscode # test resources kubeconfig @@ -40,4 +41,4 @@ tests/_build/ # autoinstrumentation artifacts build node_modules -package-lock.json +package-lock.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index af276ef48..d1f0ae4d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ Changes by Version ================== +0.52.0 +------------------- +### 🚀 New components 🚀 +* Add creation of ServiceAccount to the Target Allocator ([#836](https://github.com/open-telemetry/opentelemetry-operator/pull/836), [@jaronoff97](https://github.com/jaronoff97)) +* Cross namespace instrumentation ([#889](https://github.com/open-telemetry/opentelemetry-operator/pull/889), [@tKe](https://github.com/tKe)) +* Added extra cli flag webhook-port ([#899](https://github.com/open-telemetry/opentelemetry-operator/pull/899), [@abelperezok](https://github.com/abelperezok)) +### 💡 Enhancements 💡 +* Add cert manager 1.8.0 ([#905](https://github.com/open-telemetry/opentelemetry-operator/pull/905), [@yuriolisa](https://github.com/yuriolisa)) +* updated module name and imports ([#910](https://github.com/open-telemetry/opentelemetry-operator/pull/910), [@evanli02](https://github.com/evanli02)) +### 🧰 Bug fixes 🧰 +* Fix docker multiarch build for operator ([#882](https://github.com/open-telemetry/opentelemetry-operator/pull/882), [@pavolloffay](https://github.com/pavolloffay)) +* avoid non static labels in workload objects selector ([#849](https://github.com/open-telemetry/opentelemetry-operator/pull/849), [@DWonMtl](https://github.com/DWonMtl)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.52.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.52.0) +* [OpenTelemetry Contrib - v0.52.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.52.0) + 0.51.0 ------------------- ### 🚀 New components 🚀 diff --git a/README.md b/README.md index d9b36636d..cc9edf7af 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.52.0 | v1.19 to v1.23 | v1 | | v0.51.0 | v1.19 to v1.23 | v1alpha2 | | v0.50.0 | v1.19 to v1.23 | v1alpha2 | | v0.49.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index d12a529bf..758b32973 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.51.0 + name: opentelemetry-operator.v0.52.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.51.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.52.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.51.0 + version: 0.52.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 655e1ea25..8f354197b 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.51.0 +opentelemetry-collector=0.52.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.51.0 +operator=0.52.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From b607658cc4699ff03ecef561d88ac3677beee4c7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 8 Jun 2022 15:47:41 +0200 Subject: [PATCH 0525/1234] Print TA pod logs in e2e smoke test (#920) Signed-off-by: Pavol Loffay --- tests/e2e/smoke-targetallocator/02-assert.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/02-assert.yaml index 7cddf56a5..c180946c0 100644 --- a/tests/e2e/smoke-targetallocator/02-assert.yaml +++ b/tests/e2e/smoke-targetallocator/02-assert.yaml @@ -23,3 +23,9 @@ apiVersion: v1 kind: ServiceAccount metadata: name: stateful-targetallocator +--- +# Print TA pod logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/component=opentelemetry-targetallocator From c8c05954172d32b3e24c4eba328cec4f16d2422a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 9 Jun 2022 09:46:47 +0200 Subject: [PATCH 0526/1234] Test on Kubernetes 1.24 (#919) Signed-off-by: Pavol Loffay --- .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- kind-1.24.yaml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 kind-1.24.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f7a29d34b..ac32a4cb0 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ jobs: # should be compatible with them. kube-version: - "1.19" - - "1.23" + - "1.24" steps: diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index bf139f059..23f4adab4 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -14,7 +14,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.23" + - "1.24" steps: diff --git a/kind-1.24.yaml b/kind-1.24.yaml new file mode 100644 index 000000000..14e92dde9 --- /dev/null +++ b/kind-1.24.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.24.1@sha256:fd82cddc87336d91aa0a2fc35f3c7a9463c53fd8e9575e9052d2c75c61f5b083 From aed3d3593cc529d696b6aa009aa878b6330209e2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 15 Jun 2022 09:09:52 +0200 Subject: [PATCH 0527/1234] Fix flaky TA test (#928) * Fix flaky TA test Signed-off-by: Pavol Loffay * ta Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --- .../{02-assert.yaml => 00-assert.yaml} | 0 .../e2e/smoke-targetallocator/00-install.yaml | 47 ++++++++++++++ .../e2e/smoke-targetallocator/01-install.yaml | 4 -- .../e2e/smoke-targetallocator/02-install.yaml | 34 ---------- .../{02-assert.yaml => 00-assert.yaml} | 0 .../targetallocator-features/00-install.yaml | 64 ++++++++++++++++++- .../targetallocator-features/01-install.yaml | 4 -- .../targetallocator-features/02-install.yaml | 49 -------------- 8 files changed, 110 insertions(+), 92 deletions(-) rename tests/e2e/smoke-targetallocator/{02-assert.yaml => 00-assert.yaml} (100%) delete mode 100644 tests/e2e/smoke-targetallocator/01-install.yaml delete mode 100644 tests/e2e/smoke-targetallocator/02-install.yaml rename tests/e2e/targetallocator-features/{02-assert.yaml => 00-assert.yaml} (100%) delete mode 100644 tests/e2e/targetallocator-features/01-install.yaml delete mode 100644 tests/e2e/targetallocator-features/02-install.yaml diff --git a/tests/e2e/smoke-targetallocator/02-assert.yaml b/tests/e2e/smoke-targetallocator/00-assert.yaml similarity index 100% rename from tests/e2e/smoke-targetallocator/02-assert.yaml rename to tests/e2e/smoke-targetallocator/00-assert.yaml diff --git a/tests/e2e/smoke-targetallocator/00-install.yaml b/tests/e2e/smoke-targetallocator/00-install.yaml index 9e5058d82..0bbdc5ce1 100644 --- a/tests/e2e/smoke-targetallocator/00-install.yaml +++ b/tests/e2e/smoke-targetallocator/00-install.yaml @@ -1,3 +1,9 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ta +automountServiceAccountToken: true +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -6,3 +12,44 @@ rules: - apiGroups: [""] resources: [ "pods" ] verbs: [ "get", "list", "watch"] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + targetAllocator: + enabled: true + serviceAccount: ta + image: "local/opentelemetry-operator-targetallocator:e2e" + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + processors: + + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/smoke-targetallocator/01-install.yaml b/tests/e2e/smoke-targetallocator/01-install.yaml deleted file mode 100644 index d0ccd9086..000000000 --- a/tests/e2e/smoke-targetallocator/01-install.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/smoke-targetallocator/02-install.yaml b/tests/e2e/smoke-targetallocator/02-install.yaml deleted file mode 100644 index 505aaf86d..000000000 --- a/tests/e2e/smoke-targetallocator/02-install.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - - processors: - - exporters: - logging: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] diff --git a/tests/e2e/targetallocator-features/02-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml similarity index 100% rename from tests/e2e/targetallocator-features/02-assert.yaml rename to tests/e2e/targetallocator-features/00-assert.yaml diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index aeffa74b7..40849c7e3 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -1,3 +1,9 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ta +automountServiceAccountToken: true +--- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -5,4 +11,60 @@ metadata: rules: - apiGroups: [""] resources: [ "pods" ] - verbs: [ "get", "list", "watch"] \ No newline at end of file + verbs: [ "get", "list", "watch"] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + volumes: + - name: testvolume + volumeMounts: + - name: testvolume + mountPath: /usr/share/testvolume + volumeClaimTemplates: + - metadata: + name: testvolume + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi + targetAllocator: + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + serviceAccount: ta + prometheusCR: + enabled: true + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + processors: + + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/targetallocator-features/01-install.yaml b/tests/e2e/targetallocator-features/01-install.yaml deleted file mode 100644 index d0ccd9086..000000000 --- a/tests/e2e/targetallocator-features/01-install.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:default \ No newline at end of file diff --git a/tests/e2e/targetallocator-features/02-install.yaml b/tests/e2e/targetallocator-features/02-install.yaml deleted file mode 100644 index a7ca6964f..000000000 --- a/tests/e2e/targetallocator-features/02-install.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - volumes: - - name: testvolume - volumeMounts: - - name: testvolume - mountPath: /usr/share/testvolume - volumeClaimTemplates: - - metadata: - name: testvolume - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 1Gi - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - prometheusCR: - enabled: true - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - - processors: - - exporters: - logging: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] From 7e3a7533951377f3b9318a32a0b8cd24c31c05e4 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 15 Jun 2022 11:52:34 +0200 Subject: [PATCH 0528/1234] Bump kuttl version (#929) Signed-off-by: Pavol Loffay --- hack/install-kuttl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh index 2cc772172..760e786fe 100755 --- a/hack/install-kuttl.sh +++ b/hack/install-kuttl.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.11.1/kubectl-kuttl_0.11.1_linux_x86_64 +sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.12.1/kubectl-kuttl_0.12.1_linux_x86_64 sudo chmod +x /usr/local/bin/kubectl-kuttl export PATH=$PATH:/usr/local/bin From fad32ef79f5e98b79712b49ee577542d818602e0 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 15 Jun 2022 12:57:52 +0200 Subject: [PATCH 0529/1234] Adding Otel Operator v0.53.0 (#927) * Adding Otel Operator v0.53.0 Signed-off-by: Yuri Sa * Adding Otel Operator v0.53.0 Signed-off-by: Yuri Sa --- CHANGELOG.md | 8 ++++++++ README.md | 3 +-- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f0ae4d5..c036553f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.53.0 +------------------- +### 💡 Enhancements 💡 +* Print TA pod logs in e2e smoke test ([#920](https://github.com/open-telemetry/opentelemetry-operator/pull/920), [@pavolloffay](https://github.com/pavolloffay)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.53.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.53.0) +* [OpenTelemetry Contrib - v0.53.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.53.0) + 0.52.0 ------------------- ### 🚀 New components 🚀 diff --git a/README.md b/README.md index cc9edf7af..354864a99 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.53.0 | v1.19 to v1.24 | v1 | | v0.52.0 | v1.19 to v1.23 | v1 | | v0.51.0 | v1.19 to v1.23 | v1alpha2 | | v0.50.0 | v1.19 to v1.23 | v1alpha2 | @@ -317,8 +318,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.37.0 | v1.20 to v1.22 | v1alpha2 | | v0.36.0 | v1.20 to v1.22 | v1alpha2 | | v0.35.0 | v1.20 to v1.22 | v1alpha2 | -| v0.34.0 | v1.20 to v1.22 | v1alpha2 | -| v0.33.0 | v1.20 to v1.22 | v1alpha2 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 758b32973..78ea539b9 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.52.0 + name: opentelemetry-operator.v0.53.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.52.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.53.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.52.0 + version: 0.53.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 8f354197b..c8a856cce 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.52.0 +opentelemetry-collector=0.53.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.52.0 +operator=0.53.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 7a4ec4e4ec2e2ed0a9ab245a9a54e4a3e2e6222a Mon Sep 17 00:00:00 2001 From: OpenTelemetry Java Bot <97938252+opentelemetry-java-bot@users.noreply.github.com> Date: Tue, 21 Jun 2022 02:14:41 -0700 Subject: [PATCH 0530/1234] Update the javaagent version to 1.15.0 (#936) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index b50dd27dd..141f2e805 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.13.1 +1.15.0 From ddeac3d62e90a5c203b8dc23bb5a5cfe96caece7 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 23 Jun 2022 19:09:31 +0200 Subject: [PATCH 0531/1234] Fix parameter encoding issue in TA (#930) * logging * Fixed encoding issue of params * Do string replacement * Another test * Removed dockerfile changes * Fix broken test * Newline * Change placement of the log import --- .../allocation/allocator_test.go | 17 ++- cmd/otel-allocator/allocation/http_test.go | 118 ++++++++++++++++++ cmd/otel-allocator/main.go | 12 +- pkg/collector/reconcile/config_replace.go | 4 +- pkg/collector/reconcile/configmap_test.go | 52 ++++++++ .../http_sd_config_servicemonitor_test.yaml | 25 ++++ 6 files changed, 211 insertions(+), 17 deletions(-) create mode 100644 cmd/otel-allocator/allocation/http_test.go create mode 100644 pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go index 99b5f34f1..893422a3b 100644 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ b/cmd/otel-allocator/allocation/allocator_test.go @@ -4,15 +4,16 @@ import ( "math" "testing" - "github.com/go-logr/logr" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" ) +var logger = logf.Log.WithName("unit-tests") + // Tests least connection - The expected collector after running findNextCollector should be the collector with the least amount of workload func TestFindNextCollector(t *testing.T) { - var log logr.Logger - s := NewAllocator(log) + s := NewAllocator(logger) defaultCol := collector{Name: "default-col", NumTargets: 1} maxCol := collector{Name: "max-col", NumTargets: 2} @@ -25,9 +26,7 @@ func TestFindNextCollector(t *testing.T) { } func TestSetCollectors(t *testing.T) { - - var log logr.Logger - s := NewAllocator(log) + s := NewAllocator(logger) cols := []string{"col-1", "col-2", "col-3"} s.SetCollectors(cols) @@ -42,8 +41,7 @@ func TestSetCollectors(t *testing.T) { func TestAddingAndRemovingTargets(t *testing.T) { // prepare allocator with initial targets and collectors - var log logr.Logger - s := NewAllocator(log) + s := NewAllocator(logger) cols := []string{"col-1", "col-2", "col-3"} s.SetCollectors(cols) @@ -88,8 +86,7 @@ func TestAddingAndRemovingTargets(t *testing.T) { func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // prepare allocator with 3 collectors and 'random' amount of targets - var log logr.Logger - s := NewAllocator(log) + s := NewAllocator(logger) cols := []string{"col-1", "col-2", "col-3"} s.SetCollectors(cols) diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go new file mode 100644 index 000000000..c239a9c68 --- /dev/null +++ b/cmd/otel-allocator/allocation/http_test.go @@ -0,0 +1,118 @@ +package allocation + +import ( + "github.com/prometheus/common/model" + "reflect" + "testing" +) + +func TestGetAllTargetsByCollectorAndJob(t *testing.T) { + baseAllocator := NewAllocator(logger) + baseAllocator.SetCollectors([]string{"test-collector"}) + statefulAllocator := NewAllocator(logger) + statefulAllocator.SetCollectors([]string{"test-collector-0"}) + type args struct { + collector string + job string + cMap map[string][]TargetItem + allocator *Allocator + } + var tests = []struct { + name string + args args + want []targetGroupJSON + }{ + { + name: "Empty target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string][]TargetItem{}, + allocator: baseAllocator, + }, + want: nil, + }, + { + name: "Single entry target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string][]TargetItem{ + "test-collectortest-job": { + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + }, + TargetURL: "test-url", + Collector: &collector{ + Name: "test-collector", + NumTargets: 1, + }, + }, + }, + }, + allocator: baseAllocator, + }, + want: []targetGroupJSON{ + { + Targets: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + }, + }, + }, + }, + { + name: "Multiple entry target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string][]TargetItem{ + "test-collectortest-job": { + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + }, + TargetURL: "test-url", + Collector: &collector{ + Name: "test-collector", + NumTargets: 1, + }, + }, + }, + "test-collectortest-job2": { + TargetItem{ + JobName: "test-job2", + Label: model.LabelSet{ + "test-label": "test-value", + }, + TargetURL: "test-url", + Collector: &collector{ + Name: "test-collector", + NumTargets: 1, + }, + }, + }, + }, + allocator: baseAllocator, + }, + want: []targetGroupJSON{ + { + Targets: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator); !reflect.DeepEqual(got, tt.want) { + t.Errorf("GetAllTargetsByCollectorAndJob() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 1b6a6d6a9..7978034af 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -185,18 +185,18 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { compareMap[v.Collector.Name+v.JobName] = append(compareMap[v.Collector.Name+v.JobName], *v) } params := mux.Vars(r) + jobId, err := url.QueryUnescape(params["job_id"]) + if err != nil { + errorHandler(err, w, r) + return + } if len(q) == 0 { - jobId, err := url.QueryUnescape(params["job_id"]) - if err != nil { - errorHandler(err, w, r) - return - } displayData := allocation.GetAllTargetsByJob(jobId, compareMap, s.allocator) jsonHandler(w, r, displayData) } else { - tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], params["job_id"], compareMap, s.allocator) + tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], jobId, compareMap, s.allocator) // Displays empty list if nothing matches if len(tgs) == 0 { jsonHandler(w, r, []interface{}{}) diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index ece080549..3d18d2d15 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -16,6 +16,7 @@ package reconcile import ( "fmt" + "net/url" "github.com/mitchellh/mapstructure" promconfig "github.com/prometheus/prometheus/config" @@ -61,9 +62,10 @@ func ReplaceConfig(params Params) (string, error) { } for i := range cfg.PromConfig.ScrapeConfigs { + escapedJob := url.QueryEscape(cfg.PromConfig.ScrapeConfigs[i].JobName) cfg.PromConfig.ScrapeConfigs[i].ServiceDiscoveryConfigs = discovery.Configs{ &http.SDConfig{ - URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(params.Instance), cfg.PromConfig.ScrapeConfigs[i].JobName), + URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(params.Instance), escapedJob), }, } } diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index b55c32260..05df6d79a 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -128,6 +128,58 @@ service: }) + t.Run("should return expected escaped collector config map with http_sd_config", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "latest" + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + prometheus: + config: + global: + scrape_interval: 1m + scrape_timeout: 10s + evaluation_interval: 1m + scrape_configs: + - job_name: serviceMonitor/test/test/0 + honor_timestamps: true + scrape_interval: 1m + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + http_sd_configs: + - follow_redirects: false + url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus +`, + } + + param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test.yaml") + assert.NoError(t, err) + param.Instance.Spec.TargetAllocator.Enabled = true + actual := desiredConfigMap(context.Background(), param) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + // Reset the value + expectedLables["app.kubernetes.io/version"] = "0.47.0" + + }) + t.Run("should return expected target allocator config map", func(t *testing.T) { expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" expectedLables["app.kubernetes.io/name"] = "test-targetallocator" diff --git a/pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml b/pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml new file mode 100644 index 000000000..840385d3e --- /dev/null +++ b/pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml @@ -0,0 +1,25 @@ +processors: +receivers: + prometheus: + config: + scrape_configs: + - job_name: serviceMonitor/test/test/0 + + static_configs: + - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] + labels: + my: label + + file_sd_configs: + - files: + - file2.json + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] From 359478cf4e32d1272b203f0f47914e4ecc1b7d49 Mon Sep 17 00:00:00 2001 From: Dmitrii Anoshin Date: Mon, 27 Jun 2022 01:09:24 -0700 Subject: [PATCH 0532/1234] Remove @dmitryax from approvers (#947) Unfortunately I don't have enough time to contribute to this repository at this point. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 354864a99..7c636dff4 100644 --- a/README.md +++ b/README.md @@ -325,12 +325,12 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): -- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk - [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat Emeritus Approvers: - [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk - [Jay Camp](https://github.com/jrcamp), Splunk - [James Bebbington](https://github.com/james-bebbington), Google - [Owais Lone](https://github.com/owais), Splunk @@ -365,4 +365,4 @@ Thanks to all the people who already contributed! [godoc-img]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator?status.svg [godoc]: https://godoc.org/github.com/open-telemetry/opentelemetry-operator/pkg/apis/opentelemetry/v1alpha1#OpenTelemetryCollector [contributors]: https://github.com/open-telemetry/opentelemetry-operator/graphs/contributors -[contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator \ No newline at end of file +[contributors-img]: https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-operator From ce77f824d1c9648023a27589dd9bc7e51d19dd2b Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Mon, 27 Jun 2022 14:13:38 +0200 Subject: [PATCH 0533/1234] Test to ensure otlp ports in collector e2e (#945) * Add a simple test to ensure we are opening the correct ports for otlp receivers Signed-off-by: Kevin Earls * Fixed typos, yaml formatting Signed-off-by: Kevin Earls * Add otlp port checks to existing smoke test Signed-off-by: Kevin Earls --- tests/e2e/smoke-simplest/00-assert.yaml | 30 ++++++++++++++++++++++++ tests/e2e/smoke-simplest/00-install.yaml | 6 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/e2e/smoke-simplest/00-assert.yaml b/tests/e2e/smoke-simplest/00-assert.yaml index d3dfd0565..f19dd651a 100644 --- a/tests/e2e/smoke-simplest/00-assert.yaml +++ b/tests/e2e/smoke-simplest/00-assert.yaml @@ -18,6 +18,21 @@ spec: port: 14250 protocol: TCP targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 --- @@ -32,3 +47,18 @@ spec: port: 14250 protocol: TCP targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml index a1a6120f7..eb4cc2b39 100644 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ b/tests/e2e/smoke-simplest/00-install.yaml @@ -8,6 +8,10 @@ spec: jaeger: protocols: grpc: + otlp: + protocols: + grpc: + http: processors: exporters: @@ -16,6 +20,6 @@ spec: service: pipelines: traces: - receivers: [jaeger] + receivers: [jaeger,otlp] processors: [] exporters: [logging] \ No newline at end of file From 6105ce3f924833f27b37061d364a45c880b9fc0c Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 1 Jul 2022 14:49:49 +0200 Subject: [PATCH 0534/1234] Adding Otel Operator v0.54.0 (#960) * Adding Otel Operator v0.54.0 Signed-off-by: Yuri Sa * Removing unnecessary infos Signed-off-by: Yuri Sa --- CHANGELOG.md | 8 ++++++++ README.md | 3 ++- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c036553f2..2434b3c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changes by Version ================== +0.54.0 +------------------- +### 🧰 Bug fixes 🧰 +* Fix parameter encoding issue ([#930](https://github.com/open-telemetry/opentelemetry-operator/pull/930), [@jaronoff97](https://github.com/jaronoff97)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.54.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.54.0) +* [OpenTelemetry Contrib - v0.54.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.54.0) + 0.53.0 ------------------- ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 7c636dff4..1e254b67c 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.54.0 | v1.19 to v1.24 | v1 | | v0.53.0 | v1.19 to v1.24 | v1 | | v0.52.0 | v1.19 to v1.23 | v1 | | v0.51.0 | v1.19 to v1.23 | v1alpha2 | @@ -317,7 +318,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.37.1 | v1.20 to v1.22 | v1alpha2 | | v0.37.0 | v1.20 to v1.22 | v1alpha2 | | v0.36.0 | v1.20 to v1.22 | v1alpha2 | -| v0.35.0 | v1.20 to v1.22 | v1alpha2 | + ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 78ea539b9..1faf1d8da 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.53.0 + name: opentelemetry-operator.v0.54.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.53.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.54.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.53.0 + version: 0.54.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index c8a856cce..33d9e7719 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.53.0 +opentelemetry-collector=0.54.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.53.0 +operator=0.54.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 537a1d21dba08e5363d9f628a50ea49bf45b2a49 Mon Sep 17 00:00:00 2001 From: Wen Hu Date: Fri, 1 Jul 2022 20:56:56 +0800 Subject: [PATCH 0535/1234] Fix the issue that the number of target-allocator replicas was incorrectly modified (#950) (#951) --- pkg/collector/reconcile/deployment.go | 2 +- pkg/collector/reconcile/deployment_test.go | 52 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index b57a030c9..4049a8caa 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -99,7 +99,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - if params.Instance.Spec.MaxReplicas != nil { + if params.Instance.Spec.MaxReplicas != nil && desired.Labels["app.kubernetes.io/component"] == "opentelemetry-collector" { currentReplicas := currentReplicasWithHPA(params.Instance.Spec, existing.Status.Replicas) updated.Spec.Replicas = ¤tReplicas } diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 5a513d098..f1e2389e2 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -102,6 +102,58 @@ func TestExpectedDeployments(t *testing.T) { assert.Len(t, expected, 0) }) + t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { + replicas, maxReplicas := int32(2), int32(10) + param := Params{ + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + MaxReplicas: &maxReplicas, + Replicas: &replicas, + Mode: v1alpha1.ModeStatefulSet, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + }, + Config: ` + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + + `, + }, + }, + Scheme: testScheme, + Log: logger, + } + expected := []v1.Deployment{} + allocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) + expected = append(expected, allocator) + + assert.Len(t, expected, 1) + assert.Equal(t, *allocator.Spec.Replicas, int32(1)) + }) + t.Run("should update deployment", func(t *testing.T) { createObjectIfNotExists(t, "test-collector", &expectedDeploy) err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) From 4c96e3f7c4359d8f13531b8d201e66c2e9fd32e6 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Mon, 4 Jul 2022 16:53:03 +0200 Subject: [PATCH 0536/1234] Fix Pod Mutation loop (#953) * chore(webhookhandler): check if pod already instrumented * chore(instrumentations): add check for volume and instrumentation env var value * chore(webhookhandler): add helper tests * chore(instrumentation): add helper tests * chore(instrumentation): update volume checking method * chore(lint): fix * chore(webhookhandler): move out pod instrumentation check * chore(instrumentation): add pod instrumentation inject check * chore(instrumentation): clean up --- pkg/instrumentation/helper.go | 12 ++++++- pkg/instrumentation/helper_test.go | 54 +++++++++++++++++++++++++++++- pkg/instrumentation/javaagent.go | 5 ++- pkg/instrumentation/nodejs.go | 5 ++- pkg/instrumentation/podmutator.go | 6 ++++ pkg/instrumentation/python.go | 4 ++- 6 files changed, 81 insertions(+), 5 deletions(-) diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 92a66df99..7ade3b7b3 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -17,7 +17,7 @@ package instrumentation import corev1 "k8s.io/api/core/v1" // Calculate if we already inject InitContainers. -func IsInitContainerMissing(pod corev1.Pod) bool { +func isInitContainerMissing(pod corev1.Pod) bool { for _, initContainer := range pod.Spec.InitContainers { if initContainer.Name == initContainerName { return false @@ -25,3 +25,13 @@ func IsInitContainerMissing(pod corev1.Pod) bool { } return true } + +// Checks if Pod is already instrumented by checking Instrumentation InitContainer presence. +func isAutoInstrumentationInjected(pod corev1.Pod) bool { + for _, cont := range pod.Spec.InitContainers { + if cont.Name == initContainerName { + return true + } + } + return false +} diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go index 2de3132b0..b2f37d1c0 100644 --- a/pkg/instrumentation/helper_test.go +++ b/pkg/instrumentation/helper_test.go @@ -67,7 +67,59 @@ func TestInitContainerMissing(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - result := IsInitContainerMissing(test.pod) + result := isInitContainerMissing(test.pod) + assert.Equal(t, test.expected, result) + }) + } +} + +func TestAutoInstrumentationInjected(t *testing.T) { + tests := []struct { + name string + pod corev1.Pod + expected bool + }{ + { + name: "AutoInstrumentation_Already_Inject", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "magic-init", + }, + { + Name: initContainerName, + }, + }, + }, + }, + expected: true, + }, + { + name: "AutoInstrumentation_Absent_1", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "magic-init", + }, + }, + }, + }, + expected: false, + }, + { + name: "AutoInstrumentation_Absent_2", + pod: corev1.Pod{ + Spec: corev1.PodSpec{}, + }, + expected: false, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + result := isAutoInstrumentationInjected(test.pod) assert.Equal(t, test.expected, result) }) } diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 61a3d54e2..1d534a4b1 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -50,15 +50,18 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, logger.Info("Skipping javaagent injection, the container defines JAVA_TOOL_OPTIONS env var value via ValueFrom", "container", container.Name) return pod } + container.Env[idx].Value = container.Env[idx].Value + javaJVMArgument + } + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ Name: volumeName, MountPath: "/otel-auto-instrumentation", }) // We just inject Volumes and init containers for the first processed container - if IsInitContainerMissing(pod) { + if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 645f9356a..5a26fd6ad 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -50,15 +50,18 @@ func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1. logger.Info("Skipping NodeJS SDK injection, the container defines NODE_OPTIONS env var value via ValueFrom", "container", container.Name) return pod } + container.Env[idx].Value = container.Env[idx].Value + nodeRequireArgument + } + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ Name: volumeName, MountPath: "/otel-auto-instrumentation", }) // We just inject Volumes and init containers for the first processed container - if IsInitContainerMissing(pod) { + if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 8f9c4c237..cc49a8eab 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -61,6 +61,12 @@ func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) { logger := pm.Logger.WithValues("namespace", pod.Namespace, "name", pod.Name) + // We check if Pod is already instrumented. + if isAutoInstrumentationInjected(pod) { + logger.Info("Skipping pod instrumentation - already instrumented") + return pod, nil + } + var inst *v1alpha1.Instrumentation var err error diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 6f2a77bdd..e2c7495b0 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -54,7 +54,9 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. logger.Info("Skipping Python SDK injection, the container defines PYTHONPATH env var value via ValueFrom", "container", container.Name) return pod } + container.Env[idx].Value = fmt.Sprintf("%s:%s:%s", pythonPathPrefix, container.Env[idx].Value, pythonPathSuffix) + } // Set OTEL_TRACES_EXPORTER to HTTP exporter if not set by user because it is what our autoinstrumentation supports. @@ -72,7 +74,7 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. }) // We just inject Volumes and init containers for the first processed container - if IsInitContainerMissing(pod) { + if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ From ea857dafb9378e369446b62e3ff6c2fb4335aaf7 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Tue, 5 Jul 2022 08:55:26 +0200 Subject: [PATCH 0537/1234] Update Python auto-instrumentation 0.32b0 (#961) * chore(python): update instrumentation version * chore(python): add aws propagator --- autoinstrumentation/python/requirements.txt | 83 +++++++++++---------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 86aa210a9..ad49c3e26 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,48 +1,49 @@ -opentelemetry-distro==0.30b1 +opentelemetry-distro==0.32b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.11.1 +opentelemetry-exporter-otlp-proto-http==1.12.0rc2 -opentelemetry-propagator-b3==1.11.1 -opentelemetry-propagator-jaeger==1.11.1 +opentelemetry-propagator-b3==1.12.0rc2 +opentelemetry-propagator-jaeger==1.12.0rc2 +opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.30b1 -opentelemetry-propagator-ot-trace==0.30b1 +opentelemetry-instrumentation==0.32b0 +opentelemetry-propagator-ot-trace==0.32b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.30b1 -opentelemetry-instrumentation-aiopg==0.30b1 -opentelemetry-instrumentation-asgi==0.30b1 -opentelemetry-instrumentation-asyncpg==0.30b1 -opentelemetry-instrumentation-boto==0.30b1 -opentelemetry-instrumentation-botocore==0.30b1 -opentelemetry-instrumentation-celery==0.30b1 -opentelemetry-instrumentation-dbapi==0.30b1 -opentelemetry-instrumentation-django==0.30b1 -opentelemetry-instrumentation-elasticsearch==0.30b1 -opentelemetry-instrumentation-falcon==0.30b1 -opentelemetry-instrumentation-fastapi==0.30b1 -opentelemetry-instrumentation-flask==0.30b1 -opentelemetry-instrumentation-grpc==0.30b1 -opentelemetry-instrumentation-httpx==0.30b1 -opentelemetry-instrumentation-jinja2==0.30b1 -opentelemetry-instrumentation-kafka-python==0.30b1 -opentelemetry-instrumentation-logging==0.30b1 -opentelemetry-instrumentation-mysql==0.30b1 -opentelemetry-instrumentation-pika==0.30b1 -opentelemetry-instrumentation-psycopg2==0.30b1 -opentelemetry-instrumentation-pymemcache==0.30b1 -opentelemetry-instrumentation-pymongo==0.30b1 -opentelemetry-instrumentation-pymysql==0.30b1 -opentelemetry-instrumentation-pyramid==0.30b1 -opentelemetry-instrumentation-redis==0.30b1 -opentelemetry-instrumentation-requests==0.30b1 -opentelemetry-instrumentation-sklearn==0.30b1 -opentelemetry-instrumentation-sqlalchemy==0.30b1 -opentelemetry-instrumentation-sqlite3==0.30b1 -opentelemetry-instrumentation-starlette==0.30b1 -opentelemetry-instrumentation-tornado==0.30b1 -opentelemetry-instrumentation-urllib==0.30b1 -opentelemetry-instrumentation-urllib3==0.30b1 -opentelemetry-instrumentation-wsgi==0.30b1 +opentelemetry-instrumentation-aiohttp-client==0.32b0 +opentelemetry-instrumentation-aiopg==0.32b0 +opentelemetry-instrumentation-asgi==0.32b0 +opentelemetry-instrumentation-asyncpg==0.32b0 +opentelemetry-instrumentation-boto==0.32b0 +opentelemetry-instrumentation-botocore==0.32b0 +opentelemetry-instrumentation-celery==0.32b0 +opentelemetry-instrumentation-dbapi==0.32b0 +opentelemetry-instrumentation-django==0.32b0 +opentelemetry-instrumentation-elasticsearch==0.32b0 +opentelemetry-instrumentation-falcon==0.32b0 +opentelemetry-instrumentation-fastapi==0.32b0 +opentelemetry-instrumentation-flask==0.32b0 +opentelemetry-instrumentation-grpc==0.32b0 +opentelemetry-instrumentation-httpx==0.32b0 +opentelemetry-instrumentation-jinja2==0.32b0 +opentelemetry-instrumentation-kafka-python==0.32b0 +opentelemetry-instrumentation-logging==0.32b0 +opentelemetry-instrumentation-mysql==0.32b0 +opentelemetry-instrumentation-pika==0.32b0 +opentelemetry-instrumentation-psycopg2==0.32b0 +opentelemetry-instrumentation-pymemcache==0.32b0 +opentelemetry-instrumentation-pymongo==0.32b0 +opentelemetry-instrumentation-pymysql==0.32b0 +opentelemetry-instrumentation-pyramid==0.32b0 +opentelemetry-instrumentation-redis==0.32b0 +opentelemetry-instrumentation-requests==0.32b0 +opentelemetry-instrumentation-sklearn==0.32b0 +opentelemetry-instrumentation-sqlalchemy==0.32b0 +opentelemetry-instrumentation-sqlite3==0.32b0 +opentelemetry-instrumentation-starlette==0.32b0 +opentelemetry-instrumentation-tornado==0.32b0 +opentelemetry-instrumentation-urllib==0.32b0 +opentelemetry-instrumentation-urllib3==0.32b0 +opentelemetry-instrumentation-wsgi==0.32b0 From 89c6b722c2b6b74f627df31456f04326ad83afb1 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 7 Jul 2022 13:00:18 +0200 Subject: [PATCH 0538/1234] Bump Kind versions (#965) Signed-off-by: Yuri Sa --- Makefile | 2 +- kind-1.19.yaml | 2 +- kind-1.24.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a720c4a67..b7fb702c4 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ else GOTEST_OPTS=-race -v endif -KUBE_VERSION ?= 1.21 +KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml OPERATOR_SDK_VERSION ?= 1.17.0 diff --git a/kind-1.19.yaml b/kind-1.19.yaml index 7c8b99b60..dc16e9a73 100644 --- a/kind-1.19.yaml +++ b/kind-1.19.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.19.16@sha256:158bff5545d9d6f1e044e044f2cb3704189911537ee10eaf648cd37f75e51548 + image: kindest/node:v1.19.16@sha256:5970d9629a026fbafa37207ffb8dbaff4ff373f254aadaeecfd3bebc93b7ce3b diff --git a/kind-1.24.yaml b/kind-1.24.yaml index 14e92dde9..6936e0930 100644 --- a/kind-1.24.yaml +++ b/kind-1.24.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.24.1@sha256:fd82cddc87336d91aa0a2fc35f3c7a9463c53fd8e9575e9052d2c75c61f5b083 + image: kindest/node:v1.24.2@sha256:1f0cee2282f43150b52dc7933183ed96abdcfc8d293f30ec07082495874876f1 From c6dc0bedd2e54e6805860aaa4f62638ce6dc7927 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:32:43 +0200 Subject: [PATCH 0539/1234] Fixing monitor configuration (#966) Signed-off-by: Yuri Sa --- config/prometheus/monitor.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index e66d0ac5e..6e5f438a2 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -15,7 +15,11 @@ spec: scheme: https bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token tlsConfig: - insecureSkipVerify: true + insecureSkipVerify: false + ca: + secret: + key: ca.crt + name: opentelemetry-operator-controller-manager-service-cert selector: matchLabels: app.kubernetes.io/name: opentelemetry-operator From 2a66583d739ca3b355cbbcc02052dbc08b8c3c88 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 12 Jul 2022 11:16:54 +0200 Subject: [PATCH 0540/1234] Release Otel Operator v0.55.0 (#971) Signed-off-by: Yuri Sa --- CHANGELOG.md | 12 ++++++++++++ README.md | 2 +- ...opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2434b3c44..e5801f38f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ Changes by Version ================== +0.55.0 +------------------- +### 🧰 Bug fixes 🧰 +* Fixing monitor configuration ([#966](https://github.com/open-telemetry/opentelemetry-operator/pull/966), [@yuriolisa](https://github.com/yuriolisa)) +* Fix Pod Mutation loop ([#953](https://github.com/open-telemetry/opentelemetry-operator/pull/953), [@mat-rumian](https://github.com/mat-rumian)) +* Fix the issue that the number of target-allocator replicas ([#951](https://github.com/open-telemetry/opentelemetry-operator/pull/951), [@CoderPoet](https://github.com/CoderPoet)) +### 💡 Enhancements 💡 +* Update Python auto-instrumentation 0.32b0 ([#961](https://github.com/open-telemetry/opentelemetry-operator/pull/961), [@mat-rumian](https://github.com/mat-rumian)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.55.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.55.0) +* [OpenTelemetry Contrib - v0.55.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.55.0) + 0.54.0 ------------------- ### 🧰 Bug fixes 🧰 diff --git a/README.md b/README.md index 1e254b67c..355d96bc9 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.55.0 | v1.19 to v1.24 | v1 | | v0.54.0 | v1.19 to v1.24 | v1 | | v0.53.0 | v1.19 to v1.24 | v1 | | v0.52.0 | v1.19 to v1.23 | v1 | @@ -317,7 +318,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.38.0 | v1.20 to v1.22 | v1alpha2 | | v0.37.1 | v1.20 to v1.22 | v1alpha2 | | v0.37.0 | v1.20 to v1.22 | v1alpha2 | -| v0.36.0 | v1.20 to v1.22 | v1alpha2 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1faf1d8da..a64ee0beb 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.54.0 + name: opentelemetry-operator.v0.55.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -297,7 +297,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.54.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.55.0 livenessProbe: httpGet: path: /healthz @@ -389,7 +389,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.54.0 + version: 0.55.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 33d9e7719..171434b92 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.54.0 +opentelemetry-collector=0.55.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.54.0 +operator=0.55.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 9bc0080d54c7e16adb6932850756c5b5a662c1a8 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 19 Jul 2022 15:56:56 +0530 Subject: [PATCH 0541/1234] Aadd dotnet-autoinstrumentation image (#989) --- .../publish-autoinstrumentation-dotnet.yaml | 65 +++++++++++++++++++ autoinstrumentation/dotnet/Dockerfile | 20 ++++++ autoinstrumentation/dotnet/version.txt | 1 + 3 files changed, 86 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-dotnet.yaml create mode 100644 autoinstrumentation/dotnet/Dockerfile create mode 100644 autoinstrumentation/dotnet/version.txt diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml new file mode 100644 index 000000000..0abcb9a36 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -0,0 +1,65 @@ +name: "Publish DotNet Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/dotnet/**' + - '.github/workflows/publish-autoinstrumentation-dotnet.yaml' + branches: + - main + pull_request: + paths: + - 'autoinstrumentation/dotnet/**' + - '.github/workflows/publish-autoinstrumentation-dotnet.yaml' + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - name: Read version + run: echo "VERSION=$(cat autoinstrumentation/dotnet/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4.0.1 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2.0.0 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2.0.0 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2.0.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3.0.0 + with: + context: autoinstrumentation/dotnet + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name == 'push' }} + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile new file mode 100644 index 000000000..af3105034 --- /dev/null +++ b/autoinstrumentation/dotnet/Dockerfile @@ -0,0 +1,20 @@ +# To build one auto-instrumentation image for dotnet, please: +# - Download your dotnet auto-instrumentation artefacts to `/autoinstrumentation` directory. This is required as when instrumenting the pod, +# one init container will be created to copy the files to your app's container. +# - Grant the necessary access to the files in the `/autoinstrumentation` directory. +# - Following environment variables are injected to the application container to enable the auto-instrumentation. +# DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps +# DOTNET_SHARED_STORE=%InstallationLocation%/store +# DOTNET_STARTUP_HOOKS=%InstallationLocation%/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll + +FROM busybox + +ARG version + +WORKDIR /autoinstrumentation + +ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-glibc.zip . + +RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip + +RUN chmod -R go+r . \ No newline at end of file diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt new file mode 100644 index 000000000..d76821f8c --- /dev/null +++ b/autoinstrumentation/dotnet/version.txt @@ -0,0 +1 @@ +0.2.0-beta.1 \ No newline at end of file From f8c284958437c15c809ee75dc363e38abc016c06 Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 19 Jul 2022 14:22:45 +0200 Subject: [PATCH 0542/1234] Upgrade operator-sdk (#982) * Upgrading operator-sdk Signed-off-by: Yuri Sa * Upgrading operator-sdk Signed-off-by: Yuri Sa * Upgrading operator-sdk Signed-off-by: Yuri Sa * Changing api docs Signed-off-by: Yuri Sa * Changing annotations Signed-off-by: Yuri Sa * Changing annotations Signed-off-by: Yuri Sa * Upgrading scorecard version Signed-off-by: Yuri Sa * Removing curl-bash commands and kustomization file changes Signed-off-by: Yuri Sa * Removing curl-bash commands and kustomization file changes Signed-off-by: Yuri Sa * Adding kube-rbac-proxy changes Signed-off-by: Yuri Sa --- Makefile | 33 +- bundle.Dockerfile | 2 +- ...emetry-operator.clusterserviceversion.yaml | 43 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 905 +++++++++--------- bundle/metadata/annotations.yaml | 2 +- bundle/tests/scorecard/config.yaml | 8 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 905 +++++++++--------- config/manager/kustomization.yaml | 2 +- config/scorecard/patches/basic.config.yaml | 2 +- config/scorecard/patches/olm.config.yaml | 6 +- docs/api.md | 496 +++++----- go.mod | 57 +- go.sum | 169 ++-- 13 files changed, 1359 insertions(+), 1271 deletions(-) diff --git a/Makefile b/Makefile index b7fb702c4..e62c88a34 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ endif KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml -OPERATOR_SDK_VERSION ?= 1.17.0 +OPERATOR_SDK_VERSION ?= 1.22.1 CERTMANAGER_VERSION ?= 1.8.0 @@ -58,6 +58,11 @@ ifndef ignore-not-found ignore-not-found = false endif +## Location to install dependencies to +LOCALBIN ?= $(shell pwd)/bin +$(LOCALBIN): + mkdir -p $(LOCALBIN) + .PHONY: ensure-generate-is-noop ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=open-telemetry @@ -218,20 +223,28 @@ cmctl: rm -rf $$TMP_DIR ;\ } -CONTROLLER_GEN = $(shell pwd)/bin/controller-gen -.PHONY: controller-gen -controller-gen: ## Download controller-gen locally if necessary. - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.8.0) +KUSTOMIZE ?= $(LOCALBIN)/kustomize +CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen +ENVTEST ?= $(LOCALBIN)/setup-envtest + +## Tool Versions +KUSTOMIZE_VERSION ?= v4.5.5 +CONTROLLER_TOOLS_VERSION ?= v0.8.0 + -KUSTOMIZE = $(shell pwd)/bin/kustomize .PHONY: kustomize kustomize: ## Download kustomize locally if necessary. - $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3,v3.8.7) + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4,$(KUSTOMIZE_VERSION)) + +.PHONY: controller-gen +controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. +$(CONTROLLER_GEN): $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) -ENVTEST = $(shell pwd)/bin/setup-envtest .PHONY: envtest -envtest: ## Download envtest-setup locally if necessary. - $(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,latest) +envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. +$(ENVTEST): $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest CRDOC = $(shell pwd)/bin/crdoc .PHONY: crdoc diff --git a/bundle.Dockerfile b/bundle.Dockerfile index d8af0f4ce..0fb494e06 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0+git +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.1 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index a64ee0beb..574e8e3fb 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -33,7 +33,7 @@ metadata: containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.16.0+git + operators.operatorframework.io/builder: operator-sdk-v1.22.1 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community @@ -261,7 +261,10 @@ spec: - create serviceAccountName: opentelemetry-operator-controller-manager deployments: - - name: opentelemetry-operator-controller-manager + - label: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager spec: replicas: 1 selector: @@ -276,24 +279,6 @@ spec: control-plane: controller-manager spec: containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election @@ -326,6 +311,24 @@ spec: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi serviceAccountName: opentelemetry-operator-controller-manager terminationGracePeriodSeconds: 10 volumes: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 173ea6883..caa2add5b 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -424,7 +424,7 @@ spec: description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard + and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. type: string name: @@ -786,17 +786,17 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of a + description: 'spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the desired access modes + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify either: + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data @@ -822,25 +822,26 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to populate - the volume with data, if a non-empty volume is desired. - This may be any local object from a non-empty API group - (non core object) or a PersistentVolumeClaim object. When - this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and - as such if both fields are non-empty, they must have the - same value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim + description: 'dataSourceRef specifies the object from which + to populate the volume with data, if a non-empty volume + is desired. This may be any local object from a non-empty + API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding will + only succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. + This field will replace the functionality of the DataSource + field and as such if both fields are non-empty, they must + have the same value. For backwards compatibility, both + fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the + other is non-empty. There are two important differences + between DataSource and DataSourceRef: * While DataSource + only allows two specific types of objects, DataSourceRef + allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. - (Alpha) Using this field requires the AnyVolumeDataSource + (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: apiGroup: @@ -860,7 +861,7 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources + description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must @@ -892,8 +893,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider for - binding. + description: selector is a label query over volumes to consider + for binding. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -938,8 +939,8 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume is required @@ -947,16 +948,16 @@ spec: included in claim spec. type: string volumeName: - description: VolumeName is the binding reference to the + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object status: - description: 'Status represents the current information/status + description: 'status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the actual access modes + description: 'accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string @@ -968,17 +969,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources - tracks the capacity allocated to a PVC. It may be larger - than the actual capacity when a volume expansion operation - is requested. For storage quota, the larger value from - allocatedResources and PVC.spec.resources is used. If - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation. If a volume expansion capacity - request is lowered, allocatedResources is only lowered - if there are no expansion operations in progress and if - the actual volume capacity is equal or lower than the - requested capacity. This is an alpha field and requires + description: allocatedResources is the storage resource + within AllocatedResources tracks the capacity allocated + to a PVC. It may be larger than the actual capacity when + a volume expansion operation is requested. For storage + quota, the larger value from allocatedResources and PVC.spec.resources + is used. If allocatedResources is not set, PVC.spec.resources + alone is used for quota calculation. If a volume expansion + capacity request is lowered, allocatedResources is only + lowered if there are no expansion operations in progress + and if the actual volume capacity is equal or lower than + the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. type: object capacity: @@ -988,36 +989,37 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying - volume. + description: capacity represents the actual resources of + the underlying volume. type: object conditions: - description: Current Condition of persistent volume claim. - If underlying persistent volume is being resized then - the Condition will be set to 'ResizeStarted'. + description: conditions is the current Condition of persistent + volume claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. items: description: PersistentVolumeClaimCondition contails details about state of pvc properties: lastProbeTime: - description: Last time we probed the condition. + description: lastProbeTime is the time we probed the + condition. format: date-time type: string lastTransitionTime: - description: Last time the condition transitioned - from one status to another. + description: lastTransitionTime is the time the condition + transitioned from one status to another. format: date-time type: string message: - description: Human-readable message indicating details - about last transition. + description: message is the human-readable message + indicating details about last transition. type: string reason: - description: Unique, this should be a short, machine - understandable string that gives the reason for - condition's last transition. If it reports "ResizeStarted" - that means the underlying persistent volume is being - resized. + description: reason is a unique, this should be a + short, machine understandable string that gives + the reason for condition's last transition. If it + reports "ResizeStarted" that means the underlying + persistent volume is being resized. type: string status: type: string @@ -1031,10 +1033,10 @@ spec: type: object type: array phase: - description: Phase represents the current phase of PersistentVolumeClaim. + description: phase represents the current phase of PersistentVolumeClaim. type: string resizeStatus: - description: ResizeStatus stores status of resize operation. + description: resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires @@ -1093,117 +1095,121 @@ spec: be accessed by any container in the pod. properties: awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource + description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty).' + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty).' format: int32 type: integer readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: boolean volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: string required: - volumeID type: object azureDisk: - description: AzureDisk represents an Azure Data Disk mount on + description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. properties: cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' type: string diskName: - description: The Name of the data disk in the blob storage + description: diskName is the Name of the data disk in the + blob storage type: string diskURI: - description: The URI the data disk in the blob storage + description: diskURI is the URI of data disk in the blob + storage type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set). defaults to shared' type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean required: - diskName - diskURI type: object azureFile: - description: AzureFile represents an Azure File Service mount + description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. properties: readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretName: - description: the name of secret that contains Azure Storage - Account Name and Key + description: secretName is the name of secret that contains + Azure Storage Account Name and Key type: string shareName: - description: Share Name + description: shareName is the azure share Name type: string required: - secretName - shareName type: object cephfs: - description: CephFS represents a Ceph FS mount on the host that + description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime properties: monitors: - description: 'Required: Monitors is a collection of Ceph - monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' items: type: string type: array path: - description: 'Optional: Used as the mounted root, rather - than the full Ceph tree, default is /' + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' type: string readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: boolean secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1211,30 +1217,30 @@ spec: type: string type: object user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string required: - monitors type: object cinder: - description: 'Cinder represents a cinder volume attached and + description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: boolean secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1242,31 +1248,31 @@ spec: type: string type: object volumeID: - description: 'volume id used to identify the volume in cinder. + description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string required: - volumeID type: object configMap: - description: ConfigMap represents a configMap that should populate + description: configMap represents a configMap that should populate this volume properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced ConfigMap will be projected + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -1278,25 +1284,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -1308,28 +1314,28 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or its keys must - be defined + description: optional specify whether the ConfigMap or its + keys must be defined type: boolean type: object csi: - description: CSI (Container Storage Interface) represents ephemeral + description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). properties: driver: - description: Driver is the name of the CSI driver that handles + description: driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. type: string fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to - the associated CSI driver which will determine the default - filesystem to apply. + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. type: string nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the + description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, @@ -1343,13 +1349,13 @@ spec: type: string type: object readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). type: boolean volumeAttributes: additionalProperties: type: string - description: VolumeAttributes stores driver-specific properties + description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. type: object @@ -1357,7 +1363,7 @@ spec: - driver type: object downwardAPI: - description: DownwardAPI represents downward API about the pod + description: downwardAPI represents downward API about the pod that should populate this volume properties: defaultMode: @@ -1444,31 +1450,31 @@ spec: type: array type: object emptyDir: - description: 'EmptyDir represents a temporary directory that + description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: anyOf: - type: integer - type: string - description: 'Total amount of local storage required for - this EmptyDir volume. The size limit is also applicable - for memory medium. The maximum usage on memory medium - EmptyDir would be the minimum value between the SizeLimit - specified here and the sum of memory limits of all containers - in a pod. The default is nil which means that the limit - is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the + SizeLimit specified here and the sum of memory limits + of all containers in a pod. The default is nil which means + that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "Ephemeral represents a volume that is handled + description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this @@ -1536,13 +1542,13 @@ spec: as in a PersistentVolumeClaim are also valid here. properties: accessModes: - description: 'AccessModes contains the desired access + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support @@ -1572,14 +1578,14 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to - populate the volume with data, if a non-empty - volume is desired. This may be any local object - from a non-empty API group (non core object) or - a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. + description: 'dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. This may be any + local object from a non-empty API group (non core + object) or a PersistentVolumeClaim object. When + this field is specified, volume binding will only + succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For @@ -1593,7 +1599,7 @@ spec: as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if - a disallowed value is specified. (Alpha) Using + a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -1617,7 +1623,7 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources + description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous @@ -1650,8 +1656,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider - for binding. + description: selector is a label query over volumes + to consider for binding. properties: matchExpressions: description: matchExpressions is a list of label @@ -1701,8 +1707,9 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required - by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume @@ -1710,7 +1717,7 @@ spec: is implied when not included in claim spec. type: string volumeName: - description: VolumeName is the binding reference + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object @@ -1719,32 +1726,33 @@ spec: type: object type: object fc: - description: FC represents a Fibre Channel resource that is + description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from - compromising the machine' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string lun: - description: 'Optional: FC target lun number' + description: 'lun is Optional: FC target lun number' format: int32 type: integer readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' items: type: string type: array wwids: - description: 'Optional: FC volume world wide identifiers + description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' items: @@ -1752,34 +1760,36 @@ spec: type: array type: object flexVolume: - description: FlexVolume represents a generic volume resource + description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. properties: driver: - description: Driver is the name of the driver to use for + description: driver is the name of the driver to use for this volume. type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. type: string options: additionalProperties: type: string - description: 'Optional: Extra command options if any.' + description: 'options is Optional: this field holds extra + command options if any.' type: object readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the - plugin scripts. This may be empty if no secret object - is specified. If the secret object contains more than - one secret, all secrets are passed to the plugin scripts.' + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified. If the secret object contains + more than one secret, all secrets are passed to the plugin + scripts.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1790,90 +1800,92 @@ spec: - driver type: object flocker: - description: Flocker represents a Flocker volume attached to + description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated type: string datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset type: string type: object gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource + description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty). + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' format: int32 type: integer pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: boolean required: - pdName type: object gitRepo: - description: 'GitRepo represents a git repository at a particular + description: 'gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' properties: directory: - description: Target directory name. Must not contain or - start with '..'. If '.' is supplied, the volume directory - will be the git repository. Otherwise, if specified, - the volume will contain the git repository in the subdirectory - with the given name. + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. type: string repository: - description: Repository URL + description: repository is the URL type: string revision: - description: Commit hash for the specified revision. + description: revision is the commit hash for the specified + revision. type: string required: - repository type: object glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the + description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' properties: endpoints: - description: 'EndpointsName is the endpoint name that details + description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string path: - description: 'Path is the Glusterfs volume path. More info: + description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string readOnly: - description: 'ReadOnly here will force the Glusterfs volume + description: 'readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: boolean @@ -1882,7 +1894,7 @@ spec: - path type: object hostPath: - description: 'HostPath represents a pre-existing file or directory + description: 'hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers @@ -1891,68 +1903,70 @@ spec: mounts and who can/can not mount host directories as read/write.' properties: path: - description: 'Path of the directory on the host. If the + description: 'path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string type: - description: 'Type for HostPath Volume Defaults to "" More + description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string required: - path type: object iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is + description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' properties: chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication type: boolean chapAuthSession: - description: whether support iSCSI Session CHAP authentication + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication type: boolean fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' type: string initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. + description: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. type: string iqn: - description: Target iSCSI Qualified Name. + description: iqn is the target iSCSI Qualified Name. type: string iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). type: string lun: - description: iSCSI Target Lun number. + description: lun represents iSCSI Target Lun number. format: int32 type: integer portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). items: type: string type: array readOnly: - description: ReadOnly here will force the ReadOnly setting + description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. type: boolean secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1960,9 +1974,9 @@ spec: type: string type: object targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). type: string required: - iqn @@ -1970,24 +1984,24 @@ spec: - targetPortal type: object name: - description: 'Volume''s name. Must be a DNS_LABEL and unique + description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string nfs: - description: 'NFS represents an NFS mount on the host that shares + description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' properties: path: - description: 'Path that is exported by the NFS server. More + description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string readOnly: - description: 'ReadOnly here will force the NFS export to + description: 'readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: boolean server: - description: 'Server is the hostname or IP address of the + description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string required: @@ -1995,86 +2009,87 @@ spec: - server type: object persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a + description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim + description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. type: boolean required: - claimName type: object photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController + description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string pdID: - description: ID that identifies Photon Controller persistent - disk + description: pdID is the ID that identifies Photon Controller + persistent disk type: string required: - pdID type: object portworxVolume: - description: PortworxVolume represents a portworx volume attached + description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine properties: fsType: - description: FSType represents the filesystem type to mount + description: fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean volumeID: - description: VolumeID uniquely identifies a Portworx volume + description: volumeID uniquely identifies a Portworx volume type: string required: - volumeID type: object projected: - description: Items for all in one resources secrets, configmaps, - and downward API + description: projected items for all in one resources secrets, + configmaps, and downward API properties: defaultMode: - description: Mode bits used to set permissions on created - files by default. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML accepts - both octal and decimal values, JSON requires decimal values - for mode bits. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set. + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like fsGroup, + and the result can be other mode bits set. format: int32 type: integer sources: - description: list of volume projections + description: sources is the list of volume projections items: description: Projection that may be projected along with other supported volume types properties: configMap: - description: information about the configMap data - to project + description: configMap information about the configMap + data to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected @@ -2089,27 +2104,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2123,13 +2139,13 @@ spec: uid?' type: string optional: - description: Specify whether the ConfigMap or - its keys must be defined + description: optional specify whether the ConfigMap + or its keys must be defined type: boolean type: object downwardAPI: - description: information about the downwardAPI data - to project + description: downwardAPI information about the downwardAPI + data to project properties: items: description: Items is a list of DownwardAPIVolume @@ -2210,15 +2226,15 @@ spec: type: array type: object secret: - description: information about the secret data to - project + description: secret information about the secret data + to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose - name is the key and content is the value. If - specified, the listed keys will be projected + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup @@ -2230,27 +2246,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2264,16 +2281,16 @@ spec: uid?' type: string optional: - description: Specify whether the Secret or its - key must be defined + description: optional field specify whether the + Secret or its key must be defined type: boolean type: object serviceAccountToken: - description: information about the serviceAccountToken - data to project + description: serviceAccountToken is information about + the serviceAccountToken data to project properties: audience: - description: Audience is the intended audience + description: audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the @@ -2281,7 +2298,7 @@ spec: of the apiserver. type: string expirationSeconds: - description: ExpirationSeconds is the requested + description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate @@ -2293,7 +2310,7 @@ spec: format: int64 type: integer path: - description: Path is the path relative to the + description: path is the path relative to the mount point of the file to project the token into. type: string @@ -2304,35 +2321,35 @@ spec: type: array type: object quobyte: - description: Quobyte represents a Quobyte mount on the host + description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime properties: group: - description: Group to map volume access to Default is no + description: group to map volume access to Default is no group type: string readOnly: - description: ReadOnly here will force the Quobyte volume + description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. type: boolean registry: - description: Registry represents a single or multiple Quobyte + description: registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes type: string tenant: - description: Tenant owning the given Quobyte volume in the + description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin type: string user: - description: User to map volume access to Defaults to serivceaccount + description: user to map volume access to Defaults to serivceaccount user type: string volume: - description: Volume is a string that references an already + description: volume is a string that references an already created Quobyte volume by name. type: string required: @@ -2340,41 +2357,42 @@ spec: - volume type: object rbd: - description: 'RBD represents a Rados Block Device mount on the + description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' type: string image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string keyring: - description: 'Keyring is the path to key ring for RBDUser. + description: 'keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string monitors: - description: 'A collection of Ceph monitors. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array pool: - description: 'The rados pool name. Default is rbd. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: boolean secretRef: - description: 'SecretRef is name of the authentication secret + description: 'secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: @@ -2384,35 +2402,36 @@ spec: type: string type: object user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string required: - image - monitors type: object scaleIO: - description: ScaleIO represents a ScaleIO persistent volume + description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". type: string gateway: - description: The host address of the ScaleIO API Gateway. + description: gateway is the host address of the ScaleIO + API Gateway. type: string protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef references to the secret for ScaleIO + description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. properties: @@ -2422,25 +2441,26 @@ spec: type: string type: object sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false type: boolean storageMode: - description: Indicates whether the storage for a volume - should be ThickProvisioned or ThinProvisioned. Default - is ThinProvisioned. + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. type: string storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. type: string system: - description: The name of the storage system as configured - in ScaleIO. + description: system is the name of the storage system as + configured in ScaleIO. type: string volumeName: - description: The name of a volume already created in the - ScaleIO system that is associated with this volume source. + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. type: string required: - gateway @@ -2448,24 +2468,24 @@ spec: - system type: object secret: - description: 'Secret represents a secret that should populate + description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced Secret will be projected + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -2477,25 +2497,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -2503,29 +2523,30 @@ spec: type: object type: array optional: - description: Specify whether the Secret or its keys must - be defined + description: optional field specify whether the Secret or + its keys must be defined type: boolean secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string type: object storageos: - description: StorageOS represents a StorageOS volume attached + description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef specifies the secret to use for obtaining + description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. properties: @@ -2535,12 +2556,12 @@ spec: type: string type: object volumeName: - description: VolumeName is the human-readable name of the + description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. type: string volumeNamespace: - description: VolumeNamespace specifies the scope of the + description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS @@ -2551,24 +2572,26 @@ spec: type: string type: object vsphereVolume: - description: VsphereVolume represents a vSphere volume attached + description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. type: string storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. type: string volumePath: - description: Path that identifies vSphere volume vmdk + description: volumePath is the path that identifies vSphere + volume vmdk type: string required: - volumePath diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 8adcf2783..966e458bf 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.16.0+git + operators.operatorframework.io.metrics.builder: operator-sdk-v1.22.1 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index 85f9ab2ae..e9b46568e 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-crds-have-resources-test diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 60335aeff..dcb4b80ea 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -422,7 +422,7 @@ spec: description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard + and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. type: string name: @@ -784,17 +784,17 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of a + description: 'spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the desired access modes + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify either: + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data @@ -820,25 +820,26 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to populate - the volume with data, if a non-empty volume is desired. - This may be any local object from a non-empty API group - (non core object) or a PersistentVolumeClaim object. When - this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and - as such if both fields are non-empty, they must have the - same value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim + description: 'dataSourceRef specifies the object from which + to populate the volume with data, if a non-empty volume + is desired. This may be any local object from a non-empty + API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding will + only succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. + This field will replace the functionality of the DataSource + field and as such if both fields are non-empty, they must + have the same value. For backwards compatibility, both + fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the + other is non-empty. There are two important differences + between DataSource and DataSourceRef: * While DataSource + only allows two specific types of objects, DataSourceRef + allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. - (Alpha) Using this field requires the AnyVolumeDataSource + (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: apiGroup: @@ -858,7 +859,7 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources + description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must @@ -890,8 +891,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider for - binding. + description: selector is a label query over volumes to consider + for binding. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -936,8 +937,8 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume is required @@ -945,16 +946,16 @@ spec: included in claim spec. type: string volumeName: - description: VolumeName is the binding reference to the + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object status: - description: 'Status represents the current information/status + description: 'status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the actual access modes + description: 'accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string @@ -966,17 +967,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources - tracks the capacity allocated to a PVC. It may be larger - than the actual capacity when a volume expansion operation - is requested. For storage quota, the larger value from - allocatedResources and PVC.spec.resources is used. If - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation. If a volume expansion capacity - request is lowered, allocatedResources is only lowered - if there are no expansion operations in progress and if - the actual volume capacity is equal or lower than the - requested capacity. This is an alpha field and requires + description: allocatedResources is the storage resource + within AllocatedResources tracks the capacity allocated + to a PVC. It may be larger than the actual capacity when + a volume expansion operation is requested. For storage + quota, the larger value from allocatedResources and PVC.spec.resources + is used. If allocatedResources is not set, PVC.spec.resources + alone is used for quota calculation. If a volume expansion + capacity request is lowered, allocatedResources is only + lowered if there are no expansion operations in progress + and if the actual volume capacity is equal or lower than + the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. type: object capacity: @@ -986,36 +987,37 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying - volume. + description: capacity represents the actual resources of + the underlying volume. type: object conditions: - description: Current Condition of persistent volume claim. - If underlying persistent volume is being resized then - the Condition will be set to 'ResizeStarted'. + description: conditions is the current Condition of persistent + volume claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. items: description: PersistentVolumeClaimCondition contails details about state of pvc properties: lastProbeTime: - description: Last time we probed the condition. + description: lastProbeTime is the time we probed the + condition. format: date-time type: string lastTransitionTime: - description: Last time the condition transitioned - from one status to another. + description: lastTransitionTime is the time the condition + transitioned from one status to another. format: date-time type: string message: - description: Human-readable message indicating details - about last transition. + description: message is the human-readable message + indicating details about last transition. type: string reason: - description: Unique, this should be a short, machine - understandable string that gives the reason for - condition's last transition. If it reports "ResizeStarted" - that means the underlying persistent volume is being - resized. + description: reason is a unique, this should be a + short, machine understandable string that gives + the reason for condition's last transition. If it + reports "ResizeStarted" that means the underlying + persistent volume is being resized. type: string status: type: string @@ -1029,10 +1031,10 @@ spec: type: object type: array phase: - description: Phase represents the current phase of PersistentVolumeClaim. + description: phase represents the current phase of PersistentVolumeClaim. type: string resizeStatus: - description: ResizeStatus stores status of resize operation. + description: resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires @@ -1091,117 +1093,121 @@ spec: be accessed by any container in the pod. properties: awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource + description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty).' + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty).' format: int32 type: integer readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: boolean volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: string required: - volumeID type: object azureDisk: - description: AzureDisk represents an Azure Data Disk mount on + description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. properties: cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' type: string diskName: - description: The Name of the data disk in the blob storage + description: diskName is the Name of the data disk in the + blob storage type: string diskURI: - description: The URI the data disk in the blob storage + description: diskURI is the URI of data disk in the blob + storage type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set). defaults to shared' type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean required: - diskName - diskURI type: object azureFile: - description: AzureFile represents an Azure File Service mount + description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. properties: readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretName: - description: the name of secret that contains Azure Storage - Account Name and Key + description: secretName is the name of secret that contains + Azure Storage Account Name and Key type: string shareName: - description: Share Name + description: shareName is the azure share Name type: string required: - secretName - shareName type: object cephfs: - description: CephFS represents a Ceph FS mount on the host that + description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime properties: monitors: - description: 'Required: Monitors is a collection of Ceph - monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' items: type: string type: array path: - description: 'Optional: Used as the mounted root, rather - than the full Ceph tree, default is /' + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' type: string readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: boolean secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1209,30 +1215,30 @@ spec: type: string type: object user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string required: - monitors type: object cinder: - description: 'Cinder represents a cinder volume attached and + description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: boolean secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1240,31 +1246,31 @@ spec: type: string type: object volumeID: - description: 'volume id used to identify the volume in cinder. + description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string required: - volumeID type: object configMap: - description: ConfigMap represents a configMap that should populate + description: configMap represents a configMap that should populate this volume properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced ConfigMap will be projected + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -1276,25 +1282,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -1306,28 +1312,28 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or its keys must - be defined + description: optional specify whether the ConfigMap or its + keys must be defined type: boolean type: object csi: - description: CSI (Container Storage Interface) represents ephemeral + description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). properties: driver: - description: Driver is the name of the CSI driver that handles + description: driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. type: string fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to - the associated CSI driver which will determine the default - filesystem to apply. + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. type: string nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the + description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, @@ -1341,13 +1347,13 @@ spec: type: string type: object readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). type: boolean volumeAttributes: additionalProperties: type: string - description: VolumeAttributes stores driver-specific properties + description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. type: object @@ -1355,7 +1361,7 @@ spec: - driver type: object downwardAPI: - description: DownwardAPI represents downward API about the pod + description: downwardAPI represents downward API about the pod that should populate this volume properties: defaultMode: @@ -1442,31 +1448,31 @@ spec: type: array type: object emptyDir: - description: 'EmptyDir represents a temporary directory that + description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: anyOf: - type: integer - type: string - description: 'Total amount of local storage required for - this EmptyDir volume. The size limit is also applicable - for memory medium. The maximum usage on memory medium - EmptyDir would be the minimum value between the SizeLimit - specified here and the sum of memory limits of all containers - in a pod. The default is nil which means that the limit - is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the + SizeLimit specified here and the sum of memory limits + of all containers in a pod. The default is nil which means + that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "Ephemeral represents a volume that is handled + description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this @@ -1534,13 +1540,13 @@ spec: as in a PersistentVolumeClaim are also valid here. properties: accessModes: - description: 'AccessModes contains the desired access + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support @@ -1570,14 +1576,14 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to - populate the volume with data, if a non-empty - volume is desired. This may be any local object - from a non-empty API group (non core object) or - a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. + description: 'dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. This may be any + local object from a non-empty API group (non core + object) or a PersistentVolumeClaim object. When + this field is specified, volume binding will only + succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For @@ -1591,7 +1597,7 @@ spec: as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if - a disallowed value is specified. (Alpha) Using + a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' properties: @@ -1615,7 +1621,7 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources + description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous @@ -1648,8 +1654,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider - for binding. + description: selector is a label query over volumes + to consider for binding. properties: matchExpressions: description: matchExpressions is a list of label @@ -1699,8 +1705,9 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required - by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume @@ -1708,7 +1715,7 @@ spec: is implied when not included in claim spec. type: string volumeName: - description: VolumeName is the binding reference + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object @@ -1717,32 +1724,33 @@ spec: type: object type: object fc: - description: FC represents a Fibre Channel resource that is + description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from - compromising the machine' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string lun: - description: 'Optional: FC target lun number' + description: 'lun is Optional: FC target lun number' format: int32 type: integer readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' items: type: string type: array wwids: - description: 'Optional: FC volume world wide identifiers + description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' items: @@ -1750,34 +1758,36 @@ spec: type: array type: object flexVolume: - description: FlexVolume represents a generic volume resource + description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. properties: driver: - description: Driver is the name of the driver to use for + description: driver is the name of the driver to use for this volume. type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. type: string options: additionalProperties: type: string - description: 'Optional: Extra command options if any.' + description: 'options is Optional: this field holds extra + command options if any.' type: object readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the - plugin scripts. This may be empty if no secret object - is specified. If the secret object contains more than - one secret, all secrets are passed to the plugin scripts.' + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified. If the secret object contains + more than one secret, all secrets are passed to the plugin + scripts.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1788,90 +1798,92 @@ spec: - driver type: object flocker: - description: Flocker represents a Flocker volume attached to + description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated type: string datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset type: string type: object gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource + description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty). + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' format: int32 type: integer pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: boolean required: - pdName type: object gitRepo: - description: 'GitRepo represents a git repository at a particular + description: 'gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' properties: directory: - description: Target directory name. Must not contain or - start with '..'. If '.' is supplied, the volume directory - will be the git repository. Otherwise, if specified, - the volume will contain the git repository in the subdirectory - with the given name. + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. type: string repository: - description: Repository URL + description: repository is the URL type: string revision: - description: Commit hash for the specified revision. + description: revision is the commit hash for the specified + revision. type: string required: - repository type: object glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the + description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' properties: endpoints: - description: 'EndpointsName is the endpoint name that details + description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string path: - description: 'Path is the Glusterfs volume path. More info: + description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string readOnly: - description: 'ReadOnly here will force the Glusterfs volume + description: 'readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: boolean @@ -1880,7 +1892,7 @@ spec: - path type: object hostPath: - description: 'HostPath represents a pre-existing file or directory + description: 'hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers @@ -1889,68 +1901,70 @@ spec: mounts and who can/can not mount host directories as read/write.' properties: path: - description: 'Path of the directory on the host. If the + description: 'path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string type: - description: 'Type for HostPath Volume Defaults to "" More + description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string required: - path type: object iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is + description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' properties: chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication type: boolean chapAuthSession: - description: whether support iSCSI Session CHAP authentication + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication type: boolean fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' type: string initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. + description: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. type: string iqn: - description: Target iSCSI Qualified Name. + description: iqn is the target iSCSI Qualified Name. type: string iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). type: string lun: - description: iSCSI Target Lun number. + description: lun represents iSCSI Target Lun number. format: int32 type: integer portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). items: type: string type: array readOnly: - description: ReadOnly here will force the ReadOnly setting + description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. type: boolean secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1958,9 +1972,9 @@ spec: type: string type: object targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). type: string required: - iqn @@ -1968,24 +1982,24 @@ spec: - targetPortal type: object name: - description: 'Volume''s name. Must be a DNS_LABEL and unique + description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string nfs: - description: 'NFS represents an NFS mount on the host that shares + description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' properties: path: - description: 'Path that is exported by the NFS server. More + description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string readOnly: - description: 'ReadOnly here will force the NFS export to + description: 'readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: boolean server: - description: 'Server is the hostname or IP address of the + description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string required: @@ -1993,86 +2007,87 @@ spec: - server type: object persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a + description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim + description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. type: boolean required: - claimName type: object photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController + description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string pdID: - description: ID that identifies Photon Controller persistent - disk + description: pdID is the ID that identifies Photon Controller + persistent disk type: string required: - pdID type: object portworxVolume: - description: PortworxVolume represents a portworx volume attached + description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine properties: fsType: - description: FSType represents the filesystem type to mount + description: fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean volumeID: - description: VolumeID uniquely identifies a Portworx volume + description: volumeID uniquely identifies a Portworx volume type: string required: - volumeID type: object projected: - description: Items for all in one resources secrets, configmaps, - and downward API + description: projected items for all in one resources secrets, + configmaps, and downward API properties: defaultMode: - description: Mode bits used to set permissions on created - files by default. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML accepts - both octal and decimal values, JSON requires decimal values - for mode bits. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set. + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like fsGroup, + and the result can be other mode bits set. format: int32 type: integer sources: - description: list of volume projections + description: sources is the list of volume projections items: description: Projection that may be projected along with other supported volume types properties: configMap: - description: information about the configMap data - to project + description: configMap information about the configMap + data to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected @@ -2087,27 +2102,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2121,13 +2137,13 @@ spec: uid?' type: string optional: - description: Specify whether the ConfigMap or - its keys must be defined + description: optional specify whether the ConfigMap + or its keys must be defined type: boolean type: object downwardAPI: - description: information about the downwardAPI data - to project + description: downwardAPI information about the downwardAPI + data to project properties: items: description: Items is a list of DownwardAPIVolume @@ -2208,15 +2224,15 @@ spec: type: array type: object secret: - description: information about the secret data to - project + description: secret information about the secret data + to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose - name is the key and content is the value. If - specified, the listed keys will be projected + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup @@ -2228,27 +2244,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2262,16 +2279,16 @@ spec: uid?' type: string optional: - description: Specify whether the Secret or its - key must be defined + description: optional field specify whether the + Secret or its key must be defined type: boolean type: object serviceAccountToken: - description: information about the serviceAccountToken - data to project + description: serviceAccountToken is information about + the serviceAccountToken data to project properties: audience: - description: Audience is the intended audience + description: audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the @@ -2279,7 +2296,7 @@ spec: of the apiserver. type: string expirationSeconds: - description: ExpirationSeconds is the requested + description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate @@ -2291,7 +2308,7 @@ spec: format: int64 type: integer path: - description: Path is the path relative to the + description: path is the path relative to the mount point of the file to project the token into. type: string @@ -2302,35 +2319,35 @@ spec: type: array type: object quobyte: - description: Quobyte represents a Quobyte mount on the host + description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime properties: group: - description: Group to map volume access to Default is no + description: group to map volume access to Default is no group type: string readOnly: - description: ReadOnly here will force the Quobyte volume + description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. type: boolean registry: - description: Registry represents a single or multiple Quobyte + description: registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes type: string tenant: - description: Tenant owning the given Quobyte volume in the + description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin type: string user: - description: User to map volume access to Defaults to serivceaccount + description: user to map volume access to Defaults to serivceaccount user type: string volume: - description: Volume is a string that references an already + description: volume is a string that references an already created Quobyte volume by name. type: string required: @@ -2338,41 +2355,42 @@ spec: - volume type: object rbd: - description: 'RBD represents a Rados Block Device mount on the + description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' type: string image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string keyring: - description: 'Keyring is the path to key ring for RBDUser. + description: 'keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string monitors: - description: 'A collection of Ceph monitors. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array pool: - description: 'The rados pool name. Default is rbd. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: boolean secretRef: - description: 'SecretRef is name of the authentication secret + description: 'secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: @@ -2382,35 +2400,36 @@ spec: type: string type: object user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string required: - image - monitors type: object scaleIO: - description: ScaleIO represents a ScaleIO persistent volume + description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". type: string gateway: - description: The host address of the ScaleIO API Gateway. + description: gateway is the host address of the ScaleIO + API Gateway. type: string protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef references to the secret for ScaleIO + description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. properties: @@ -2420,25 +2439,26 @@ spec: type: string type: object sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false type: boolean storageMode: - description: Indicates whether the storage for a volume - should be ThickProvisioned or ThinProvisioned. Default - is ThinProvisioned. + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. type: string storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. type: string system: - description: The name of the storage system as configured - in ScaleIO. + description: system is the name of the storage system as + configured in ScaleIO. type: string volumeName: - description: The name of a volume already created in the - ScaleIO system that is associated with this volume source. + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. type: string required: - gateway @@ -2446,24 +2466,24 @@ spec: - system type: object secret: - description: 'Secret represents a secret that should populate + description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced Secret will be projected + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -2475,25 +2495,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -2501,29 +2521,30 @@ spec: type: object type: array optional: - description: Specify whether the Secret or its keys must - be defined + description: optional field specify whether the Secret or + its keys must be defined type: boolean secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string type: object storageos: - description: StorageOS represents a StorageOS volume attached + description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef specifies the secret to use for obtaining + description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. properties: @@ -2533,12 +2554,12 @@ spec: type: string type: object volumeName: - description: VolumeName is the human-readable name of the + description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. type: string volumeNamespace: - description: VolumeNamespace specifies the scope of the + description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS @@ -2549,24 +2570,26 @@ spec: type: string type: object vsphereVolume: - description: VsphereVolume represents a vSphere volume attached + description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. type: string storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. type: string volumePath: - description: Path that identifies vSphere volume vmdk + description: volumePath is the path that identifies vSphere + volume vmdk type: string required: - volumePath diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index bffbe8a58..2e6cc7976 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: - - manager.yaml \ No newline at end of file +- manager.yaml \ No newline at end of file diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml index 0943c47ea..b28c75559 100644 --- a/config/scorecard/patches/basic.config.yaml +++ b/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: basic test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index db151df81..1fe44a2f1 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.17.0 + image: quay.io/operator-framework/scorecard-test:v1.22.1 labels: suite: olm test: olm-crds-have-resources-test diff --git a/docs/api.md b/docs/api.md index 6e947a112..c93ff7a58 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2217,7 +2217,7 @@ ServicePort contains information on service's port. appProtocol string - The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
+ The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
false @@ -2729,14 +2729,14 @@ PersistentVolumeClaim is a user's request for and claim to a persistent volume spec object - Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
false status object - Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
false @@ -2803,7 +2803,7 @@ Standard object's metadata. More info: https://git.k8s.io/community/contributors -Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims @@ -2818,42 +2818,42 @@ Spec defines the desired characteristics of a volume requested by a pod author. @@ -2867,7 +2867,7 @@ Spec defines the desired characteristics of a volume requested by a pod author. @@ -2879,7 +2879,7 @@ Spec defines the desired characteristics of a volume requested by a pod author. -This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
accessModes []string - AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
false
dataSource object - This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
false
dataSourceRef object - Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
false
resources object - Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
false
selector object - A label query over volumes to consider for binding.
+ selector is a label query over volumes to consider for binding.
false
storageClassName string - Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
false
volumeName string - VolumeName is the binding reference to the PersistentVolume backing this claim.
+ volumeName is the binding reference to the PersistentVolume backing this claim.
false
@@ -2920,7 +2920,7 @@ This field can be used to specify either: * An existing VolumeSnapshot object (s -Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
@@ -2961,7 +2961,7 @@ Specifies the object from which to populate the volume with data, if a non-empty -Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -2995,7 +2995,7 @@ Resources represents the minimum resources the volume should have. If RecoverVol -A label query over volumes to consider for binding. +selector is a label query over volumes to consider for binding.
@@ -3070,7 +3070,7 @@ A label selector requirement is a selector that contains values, a key, and an o -Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
@@ -3085,42 +3085,42 @@ Status represents the current information/status of a persistent volume claim. R @@ -3161,7 +3161,7 @@ PersistentVolumeClaimCondition contails details about state of pvc @@ -3170,7 +3170,7 @@ PersistentVolumeClaimCondition contails details about state of pvc @@ -3179,14 +3179,14 @@ PersistentVolumeClaimCondition contails details about state of pvc @@ -3275,77 +3275,77 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -3494,7 +3494,7 @@ Volume represents a named volume in a pod that may be accessed by any container -AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore +awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
accessModes []string - AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
false
allocatedResources map[string]int or string - The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+ allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
false
capacity map[string]int or string - Represents the actual resources of the underlying volume.
+ capacity represents the actual resources of the underlying volume.
false
conditions []object - Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.
+ conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.
false
phase string - Phase represents the current phase of PersistentVolumeClaim.
+ phase represents the current phase of PersistentVolumeClaim.
false
resizeStatus string - ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+ resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
false
lastProbeTime string - Last time we probed the condition.
+ lastProbeTime is the time we probed the condition.

Format: date-time
lastTransitionTime string - Last time the condition transitioned from one status to another.
+ lastTransitionTime is the time the condition transitioned from one status to another.

Format: date-time
message string - Human-readable message indicating details about last transition.
+ message is the human-readable message indicating details about last transition.
false
reason string - Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized.
+ reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized.
false
name string - Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+ name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
true
awsElasticBlockStore object - AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
false
azureDisk object - AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+ azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
false
azureFile object - AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
+ azureFile represents an Azure File Service mount on the host and bind mount to the pod.
false
cephfs object - CephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+ cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
false
cinder object - Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+ cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
false
configMap object - ConfigMap represents a configMap that should populate this volume
+ configMap represents a configMap that should populate this volume
false
csi object - CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
+ csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
false
downwardAPI object - DownwardAPI represents downward API about the pod that should populate this volume
+ downwardAPI represents downward API about the pod that should populate this volume
false
emptyDir object - EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
false
ephemeral object - Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. @@ -3356,133 +3356,133 @@ Volume represents a named volume in a pod that may be accessed by any container fc object - FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+ fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
false
flexVolume object - FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
+ flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
false
flocker object - Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+ flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
false
gcePersistentDisk object - GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
false
gitRepo object - GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
+ gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
false
glusterfs object - Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
+ glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
false
hostPath object - HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
+ hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
false
iscsi object - ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
+ iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
false
nfs object - NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
false
persistentVolumeClaim object - PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
false
photonPersistentDisk object - PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+ photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
false
portworxVolume object - PortworxVolume represents a portworx volume attached and mounted on kubelets host machine
+ portworxVolume represents a portworx volume attached and mounted on kubelets host machine
false
projected object - Items for all in one resources secrets, configmaps, and downward API
+ projected items for all in one resources secrets, configmaps, and downward API
false
quobyte object - Quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+ quobyte represents a Quobyte mount on the host that shares a pod's lifetime
false
rbd object - RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
+ rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
false
scaleIO object - ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+ scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
false
secret object - Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
false
storageos object - StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+ storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
false
vsphereVolume object - VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+ vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
false
@@ -3509,21 +3509,21 @@ AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubel @@ -3532,7 +3532,7 @@ AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubel @@ -3544,7 +3544,7 @@ AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubel -AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. +azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
volumeID string - Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
true
fsType string - Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine
false
partition integer - The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).

Format: int32
readOnly boolean - Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
false
@@ -3559,42 +3559,42 @@ AzureDisk represents an Azure Data Disk mount on the host and bind mount to the @@ -3606,7 +3606,7 @@ AzureDisk represents an Azure Data Disk mount on the host and bind mount to the -AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +azureFile represents an Azure File Service mount on the host and bind mount to the pod.
diskName string - The Name of the data disk in the blob storage
+ diskName is the Name of the data disk in the blob storage
true
diskURI string - The URI the data disk in the blob storage
+ diskURI is the URI of data disk in the blob storage
true
cachingMode string - Host Caching mode: None, Read Only, Read Write.
+ cachingMode is the Host Caching mode: None, Read Only, Read Write.
false
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
kind string - Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
false
readOnly boolean - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
@@ -3621,21 +3621,21 @@ AzureFile represents an Azure File Service mount on the host and bind mount to t @@ -3647,7 +3647,7 @@ AzureFile represents an Azure File Service mount on the host and bind mount to t -CephFS represents a Ceph FS mount on the host that shares a pod's lifetime +cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
secretName string - the name of secret that contains Azure Storage Account Name and Key
+ secretName is the name of secret that contains Azure Storage Account Name and Key
true
shareName string - Share Name
+ shareName is the azure share Name
true
readOnly boolean - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
@@ -3662,42 +3662,42 @@ CephFS represents a Ceph FS mount on the host that shares a pod's lifetime @@ -3709,7 +3709,7 @@ CephFS represents a Ceph FS mount on the host that shares a pod's lifetime -Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
monitors []string - Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+ monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
true
path string - Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+ path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
false
readOnly boolean - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+ readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
false
secretFile string - Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+ secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
false
secretRef object - Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+ secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
false
user string - Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+ user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
false
@@ -3736,7 +3736,7 @@ Optional: SecretRef is reference to the authentication secret for User, default -Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md +cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
@@ -3751,28 +3751,28 @@ Cinder represents a cinder volume attached and mounted on kubelets host machine. @@ -3784,7 +3784,7 @@ Cinder represents a cinder volume attached and mounted on kubelets host machine. -Optional: points to a secret object containing parameters used to connect to OpenStack. +secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.
volumeID string - volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+ volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
true
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
false
readOnly boolean - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+ readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
false
secretRef object - Optional: points to a secret object containing parameters used to connect to OpenStack.
+ secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.
false
@@ -3811,7 +3811,7 @@ Optional: points to a secret object containing parameters used to connect to Ope -ConfigMap represents a configMap that should populate this volume +configMap represents a configMap that should populate this volume
@@ -3826,7 +3826,7 @@ ConfigMap represents a configMap that should populate this volume @@ -3835,7 +3835,7 @@ ConfigMap represents a configMap that should populate this volume @@ -3849,7 +3849,7 @@ ConfigMap represents a configMap that should populate this volume @@ -3876,21 +3876,21 @@ Maps a string key to a path within a volume. @@ -3904,7 +3904,7 @@ Maps a string key to a path within a volume. -CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). +csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
defaultMode integer - Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
items []object - If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
false
optional boolean - Specify whether the ConfigMap or its keys must be defined
+ optional specify whether the ConfigMap or its keys must be defined
false
key string - The key to project.
+ key is the key to project.
true
path string - The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+ path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
true
mode integer - Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
@@ -3919,35 +3919,35 @@ CSI (Container Storage Interface) represents ephemeral storage that is handled b @@ -3959,7 +3959,7 @@ CSI (Container Storage Interface) represents ephemeral storage that is handled b -NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. +nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
driver string - Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
+ driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
true
fsType string - Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
+ fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
false
nodePublishSecretRef object - NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
+ nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
false
readOnly boolean - Specifies a read-only configuration for the volume. Defaults to false (read/write).
+ readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).
false
volumeAttributes map[string]string - VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
+ volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
false
@@ -3986,7 +3986,7 @@ NodePublishSecretRef is a reference to the secret object containing sensitive in -DownwardAPI represents downward API about the pod that should populate this volume +downwardAPI represents downward API about the pod that should populate this volume
@@ -4147,7 +4147,7 @@ Selects a resource of the container: only resources limits and requests (limits. -EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
@@ -4162,14 +4162,14 @@ EmptyDir represents a temporary directory that shares a pod's lifetime. More inf @@ -4181,7 +4181,7 @@ EmptyDir represents a temporary directory that shares a pod's lifetime. More inf -Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. +ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. @@ -4267,42 +4267,42 @@ The specification for the PersistentVolumeClaim. The entire content is copied un @@ -4316,7 +4316,7 @@ The specification for the PersistentVolumeClaim. The entire content is copied un @@ -4328,7 +4328,7 @@ The specification for the PersistentVolumeClaim. The entire content is copied un -This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
medium string - What type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
false
sizeLimit int or string - Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
false
accessModes []string - AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
false
dataSource object - This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
false
dataSourceRef object - Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
false
resources object - Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
false
selector object - A label query over volumes to consider for binding.
+ selector is a label query over volumes to consider for binding.
false
storageClassName string - Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
false
volumeName string - VolumeName is the binding reference to the PersistentVolume backing this claim.
+ volumeName is the binding reference to the PersistentVolume backing this claim.
false
@@ -4369,7 +4369,7 @@ This field can be used to specify either: * An existing VolumeSnapshot object (s -Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
@@ -4410,7 +4410,7 @@ Specifies the object from which to populate the volume with data, if a non-empty -Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -4444,7 +4444,7 @@ Resources represents the minimum resources the volume should have. If RecoverVol -A label query over volumes to consider for binding. +selector is a label query over volumes to consider for binding.
@@ -4574,7 +4574,7 @@ May contain labels and annotations that will be copied into the PVC when creatin -FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. +fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
@@ -4589,14 +4589,14 @@ FC represents a Fibre Channel resource that is attached to a kubelet's host mach @@ -4605,21 +4605,21 @@ FC represents a Fibre Channel resource that is attached to a kubelet's host mach @@ -4631,7 +4631,7 @@ FC represents a Fibre Channel resource that is attached to a kubelet's host mach -FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. +flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine
false
lun integer - Optional: FC target lun number
+ lun is Optional: FC target lun number

Format: int32
readOnly boolean - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
targetWWNs []string - Optional: FC target worldwide names (WWNs)
+ targetWWNs is Optional: FC target worldwide names (WWNs)
false
wwids []string - Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
+ wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
false
@@ -4646,35 +4646,35 @@ FlexVolume represents a generic volume resource that is provisioned/attached usi @@ -4686,7 +4686,7 @@ FlexVolume represents a generic volume resource that is provisioned/attached usi -Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. +secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
driver string - Driver is the name of the driver to use for this volume.
+ driver is the name of the driver to use for this volume.
true
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
false
options map[string]string - Optional: Extra command options if any.
+ options is Optional: this field holds extra command options if any.
false
readOnly boolean - Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
secretRef object - Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
+ secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
false
@@ -4713,7 +4713,7 @@ Optional: SecretRef is reference to the secret object containing sensitive infor -Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running +flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
@@ -4728,14 +4728,14 @@ Flocker represents a Flocker volume attached to a kubelet's host machine. This d @@ -4747,7 +4747,7 @@ Flocker represents a Flocker volume attached to a kubelet's host machine. This d -GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
datasetName string - Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated
+ datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated
false
datasetUUID string - UUID of the dataset. This is unique identifier of a Flocker dataset
+ datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset
false
@@ -4762,21 +4762,21 @@ GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's @@ -4785,7 +4785,7 @@ GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's @@ -4797,7 +4797,7 @@ GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's -GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. +gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
pdName string - Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
true
fsType string - Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine
false
partition integer - The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk

Format: int32
readOnly boolean - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
false
@@ -4812,21 +4812,21 @@ GitRepo represents a git repository at a particular revision. DEPRECATED: GitRep @@ -4838,7 +4838,7 @@ GitRepo represents a git repository at a particular revision. DEPRECATED: GitRep -Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md +glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
repository string - Repository URL
+ repository is the URL
true
directory string - Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
+ directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
false
revision string - Commit hash for the specified revision.
+ revision is the commit hash for the specified revision.
false
@@ -4853,21 +4853,21 @@ Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. @@ -4879,7 +4879,7 @@ Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. -HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. +hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
endpoints string - EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+ endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
true
path string - Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+ path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
true
readOnly boolean - ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+ readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
false
@@ -4894,14 +4894,14 @@ HostPath represents a pre-existing file or directory on the host machine that is @@ -4913,7 +4913,7 @@ HostPath represents a pre-existing file or directory on the host machine that is -ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md +iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
path string - Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
true
type string - Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+ type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
false
@@ -4928,14 +4928,14 @@ ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host mac @@ -4944,63 +4944,63 @@ ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host mac @@ -5012,7 +5012,7 @@ ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host mac -CHAP Secret for iSCSI target and initiator authentication +secretRef is the CHAP Secret for iSCSI target and initiator authentication
iqn string - Target iSCSI Qualified Name.
+ iqn is the target iSCSI Qualified Name.
true
lun integer - iSCSI Target Lun number.
+ lun represents iSCSI Target Lun number.

Format: int32
targetPortal string - iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+ targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
true
chapAuthDiscovery boolean - whether support iSCSI Discovery CHAP authentication
+ chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
false
chapAuthSession boolean - whether support iSCSI Session CHAP authentication
+ chapAuthSession defines whether support iSCSI Session CHAP authentication
false
fsType string - Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine
false
initiatorName string - Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
+ initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
false
iscsiInterface string - iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
+ iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
false
portals []string - iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+ portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
false
readOnly boolean - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
+ readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
false
secretRef object - CHAP Secret for iSCSI target and initiator authentication
+ secretRef is the CHAP Secret for iSCSI target and initiator authentication
false
@@ -5039,7 +5039,7 @@ CHAP Secret for iSCSI target and initiator authentication -NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
@@ -5054,21 +5054,21 @@ NFS represents an NFS mount on the host that shares a pod's lifetime More info: @@ -5080,7 +5080,7 @@ NFS represents an NFS mount on the host that shares a pod's lifetime More info: -PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
path string - Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
true
server string - Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
true
readOnly boolean - ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+ readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
false
@@ -5095,14 +5095,14 @@ PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeCl @@ -5114,7 +5114,7 @@ PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeCl -PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine +photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
claimName string - ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
true
readOnly boolean - Will force the ReadOnly setting in VolumeMounts. Default false.
+ readOnly Will force the ReadOnly setting in VolumeMounts. Default false.
false
@@ -5129,14 +5129,14 @@ PhotonPersistentDisk represents a PhotonController persistent disk attached and @@ -5148,7 +5148,7 @@ PhotonPersistentDisk represents a PhotonController persistent disk attached and -PortworxVolume represents a portworx volume attached and mounted on kubelets host machine +portworxVolume represents a portworx volume attached and mounted on kubelets host machine
pdID string - ID that identifies Photon Controller persistent disk
+ pdID is the ID that identifies Photon Controller persistent disk
true
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
@@ -5163,21 +5163,21 @@ PortworxVolume represents a portworx volume attached and mounted on kubelets hos @@ -5189,7 +5189,7 @@ PortworxVolume represents a portworx volume attached and mounted on kubelets hos -Items for all in one resources secrets, configmaps, and downward API +projected items for all in one resources secrets, configmaps, and downward API
volumeID string - VolumeID uniquely identifies a Portworx volume
+ volumeID uniquely identifies a Portworx volume
true
fsType string - FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+ fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
false
readOnly boolean - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
@@ -5204,7 +5204,7 @@ Items for all in one resources secrets, configmaps, and downward API @@ -5213,7 +5213,7 @@ Items for all in one resources secrets, configmaps, and downward API @@ -5240,28 +5240,28 @@ Projection that may be projected along with other supported volume types @@ -5273,7 +5273,7 @@ Projection that may be projected along with other supported volume types -information about the configMap data to project +configMap information about the configMap data to project
defaultMode integer - Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
sources []object - list of volume projections
+ sources is the list of volume projections
false
configMap object - information about the configMap data to project
+ configMap information about the configMap data to project
false
downwardAPI object - information about the downwardAPI data to project
+ downwardAPI information about the downwardAPI data to project
false
secret object - information about the secret data to project
+ secret information about the secret data to project
false
serviceAccountToken object - information about the serviceAccountToken data to project
+ serviceAccountToken is information about the serviceAccountToken data to project
false
@@ -5288,7 +5288,7 @@ information about the configMap data to project @@ -5302,7 +5302,7 @@ information about the configMap data to project @@ -5329,21 +5329,21 @@ Maps a string key to a path within a volume. @@ -5357,7 +5357,7 @@ Maps a string key to a path within a volume. -information about the downwardAPI data to project +downwardAPI information about the downwardAPI data to project
items []object - If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
false
optional boolean - Specify whether the ConfigMap or its keys must be defined
+ optional specify whether the ConfigMap or its keys must be defined
false
key string - The key to project.
+ key is the key to project.
true
path string - The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+ path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
true
mode integer - Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
@@ -5509,7 +5509,7 @@ Selects a resource of the container: only resources limits and requests (limits. -information about the secret data to project +secret information about the secret data to project
@@ -5524,7 +5524,7 @@ information about the secret data to project @@ -5538,7 +5538,7 @@ information about the secret data to project @@ -5565,21 +5565,21 @@ Maps a string key to a path within a volume. @@ -5593,7 +5593,7 @@ Maps a string key to a path within a volume. -information about the serviceAccountToken data to project +serviceAccountToken is information about the serviceAccountToken data to project
items []object - If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
false
optional boolean - Specify whether the Secret or its key must be defined
+ optional field specify whether the Secret or its key must be defined
false
key string - The key to project.
+ key is the key to project.
true
path string - The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+ path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
true
mode integer - Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
@@ -5608,21 +5608,21 @@ information about the serviceAccountToken data to project @@ -5636,7 +5636,7 @@ information about the serviceAccountToken data to project -Quobyte represents a Quobyte mount on the host that shares a pod's lifetime +quobyte represents a Quobyte mount on the host that shares a pod's lifetime
path string - Path is the path relative to the mount point of the file to project the token into.
+ path is the path relative to the mount point of the file to project the token into.
true
audience string - Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
+ audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
false
expirationSeconds integer - ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.
+ expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.

Format: int64
@@ -5651,42 +5651,42 @@ Quobyte represents a Quobyte mount on the host that shares a pod's lifetime @@ -5698,7 +5698,7 @@ Quobyte represents a Quobyte mount on the host that shares a pod's lifetime -RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md +rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
registry string - Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
+ registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
true
volume string - Volume is a string that references an already created Quobyte volume by name.
+ volume is a string that references an already created Quobyte volume by name.
true
group string - Group to map volume access to Default is no group
+ group to map volume access to Default is no group
false
readOnly boolean - ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
+ readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
false
tenant string - Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
+ tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
false
user string - User to map volume access to Defaults to serivceaccount user
+ user to map volume access to Defaults to serivceaccount user
false
@@ -5713,56 +5713,56 @@ RBD represents a Rados Block Device mount on the host that shares a pod's lifeti @@ -5774,7 +5774,7 @@ RBD represents a Rados Block Device mount on the host that shares a pod's lifeti -SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
image string - The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
true
monitors []string - A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
true
fsType string - Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine
false
keyring string - Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
false
pool string - The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
false
readOnly boolean - ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
false
secretRef object - SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
false
user string - The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+ user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
false
@@ -5801,7 +5801,7 @@ SecretRef is name of the authentication secret for RBDUser. If provided override -ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. +scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
@@ -5816,70 +5816,70 @@ ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernete @@ -5891,7 +5891,7 @@ ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernete -SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. +secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
gateway string - The host address of the ScaleIO API Gateway.
+ gateway is the host address of the ScaleIO API Gateway.
true
secretRef object - SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
+ secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
true
system string - The name of the storage system as configured in ScaleIO.
+ system is the name of the storage system as configured in ScaleIO.
true
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
false
protectionDomain string - The name of the ScaleIO Protection Domain for the configured storage.
+ protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
false
readOnly boolean - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
sslEnabled boolean - Flag to enable/disable SSL communication with Gateway, default false
+ sslEnabled Flag enable/disable SSL communication with Gateway, default false
false
storageMode string - Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
+ storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
false
storagePool string - The ScaleIO Storage Pool associated with the protection domain.
+ storagePool is the ScaleIO Storage Pool associated with the protection domain.
false
volumeName string - The name of a volume already created in the ScaleIO system that is associated with this volume source.
+ volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
false
@@ -5918,7 +5918,7 @@ SecretRef references to the secret for ScaleIO user and other sensitive informat -Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret +secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
@@ -5933,7 +5933,7 @@ Secret represents a secret that should populate this volume. More info: https:// @@ -5942,21 +5942,21 @@ Secret represents a secret that should populate this volume. More info: https:// @@ -5983,21 +5983,21 @@ Maps a string key to a path within a volume. @@ -6011,7 +6011,7 @@ Maps a string key to a path within a volume. -StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. +storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
defaultMode integer - Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
items []object - If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
false
optional boolean - Specify whether the Secret or its keys must be defined
+ optional field specify whether the Secret or its keys must be defined
false
secretName string - Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+ secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
false
key string - The key to project.
+ key is the key to project.
true
path string - The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+ path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
true
mode integer - Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Format: int32
@@ -6026,35 +6026,35 @@ StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes @@ -6066,7 +6066,7 @@ StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes -SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. +secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
readOnly boolean - Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+ readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
false
secretRef object - SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
+ secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
false
volumeName string - VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
+ volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
false
volumeNamespace string - VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
+ volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
false
@@ -6093,7 +6093,7 @@ SecretRef specifies the secret to use for obtaining the StorageOS API credential -VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine +vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
@@ -6108,28 +6108,28 @@ VsphereVolume represents a vSphere volume attached and mounted on kubelets host diff --git a/go.mod b/go.mod index cc7ed48cd..ba044fe40 100644 --- a/go.mod +++ b/go.mod @@ -13,11 +13,11 @@ require ( github.com/stretchr/testify v1.7.1 go.opentelemetry.io/otel v1.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.6 - k8s.io/apimachinery v0.23.6 - k8s.io/client-go v0.23.6 - k8s.io/kubectl v0.23.6 - sigs.k8s.io/controller-runtime v0.11.2 + k8s.io/api v0.24.3 + k8s.io/apimachinery v0.24.3 + k8s.io/client-go v0.24.3 + k8s.io/kubectl v0.24.3 + sigs.k8s.io/controller-runtime v0.12.3 ) require ( @@ -32,18 +32,21 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect github.com/armon/go-metrics v0.3.3 // indirect github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/containerd/containerd v1.4.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.62.0 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker v20.10.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.9.0 // indirect github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect @@ -51,17 +54,20 @@ require ( github.com/go-kit/log v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.15 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.7 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect github.com/gophercloud/gophercloud v0.18.0 // indirect github.com/hashicorp/consul/api v1.8.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.1 // indirect @@ -73,9 +79,11 @@ require ( github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/linode/linodego v0.28.5 // indirect + github.com/mailru/easyjson v0.7.6 // indirect github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-isatty v0.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect @@ -83,15 +91,16 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.11.0 // indirect + github.com/prometheus/client_golang v1.12.1 // indirect github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.29.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect + github.com/prometheus/common v0.32.1 // indirect + github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect @@ -99,28 +108,28 @@ require ( go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect - golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect - golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.48.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect + google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect google.golang.org/grpc v1.40.0 // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apiextensions-apiserver v0.23.5 // indirect - k8s.io/component-base v0.23.6 // indirect - k8s.io/klog/v2 v2.30.0 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect - sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect + k8s.io/apiextensions-apiserver v0.24.2 // indirect + k8s.io/component-base v0.24.3 // indirect + k8s.io/klog/v2 v2.60.1 // indirect + k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 2456bf327..2ed873658 100644 --- a/go.sum +++ b/go.sum @@ -48,7 +48,6 @@ github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9mo github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -113,8 +112,10 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -140,12 +141,12 @@ github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QN github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -172,7 +173,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= @@ -187,8 +188,9 @@ github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6 github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= -github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -209,7 +211,6 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -221,6 +222,7 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -241,8 +243,9 @@ github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2x github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -262,6 +265,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -352,12 +356,14 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -409,6 +415,7 @@ github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfT github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= @@ -511,9 +518,11 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= +github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -564,8 +573,6 @@ github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsC github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= @@ -577,7 +584,6 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -684,6 +690,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -737,7 +744,6 @@ github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBn github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -747,6 +753,7 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= @@ -797,8 +804,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -812,6 +819,7 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= @@ -847,7 +855,7 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -906,8 +914,9 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -927,9 +936,9 @@ github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -939,8 +948,9 @@ github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= @@ -956,6 +966,7 @@ github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -994,9 +1005,9 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1004,7 +1015,6 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= @@ -1037,7 +1047,6 @@ github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMW github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= @@ -1052,22 +1061,24 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= @@ -1162,8 +1173,9 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1203,6 +1215,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1220,7 +1233,6 @@ golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1264,10 +1276,11 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1281,8 +1294,8 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1386,15 +1399,17 @@ golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 h1:M69LAlWZCshgp0QSzyDcSsSIejIEeuaCVpmwcKwyLMk= -golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1413,8 +1428,8 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1496,7 +1511,7 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1596,8 +1611,9 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1695,32 +1711,33 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= -k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw= -k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g= -k8s.io/apiextensions-apiserver v0.23.5 h1:5SKzdXyvIJKu+zbfPc3kCbWpbxi+O+zdmAJBm26UJqI= -k8s.io/apiextensions-apiserver v0.23.5/go.mod h1:ntcPWNXS8ZPKN+zTXuzYMeg731CP0heCTl6gYBxLcuQ= +k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= +k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= +k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= +k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= +k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= -k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apiserver v0.23.5/go.mod h1:7wvMtGJ42VRxzgVI7jkbKvMbuCbVbgsWFT7RyXiRNTw= -k8s.io/cli-runtime v0.23.6/go.mod h1:0Z3VR/HRIFKiLzKIAkm1mPtcH98GT/fXu2IU0E4vFmw= +k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= +k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= +k8s.io/cli-runtime v0.24.3/go.mod h1:In84wauoMOqa7JDvDSXGbf8lTNlr70fOGpYlYfJtSqA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= -k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= -k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= -k8s.io/code-generator v0.23.5/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/code-generator v0.23.6/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.23.5/go.mod h1:c5Nq44KZyt1aLl0IpHX82fhsn84Sb0jjzwjpcA42bY0= -k8s.io/component-base v0.23.6 h1:8dhVZ4VrRcNdV2EGjl8tj8YOHwX6ysgCGMJ2Oyy0NW8= -k8s.io/component-base v0.23.6/go.mod h1:FGMPeMrjYu0UZBSAFcfloVDplj9IvU+uRMTOdE23Fj0= -k8s.io/component-helpers v0.23.6/go.mod h1:kgvl6wvnYg9oebklLPpbW8UhvAZ9Qds26/RANEbny/8= +k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= +k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= +k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= +k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/code-generator v0.24.3/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= +k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= +k8s.io/component-base v0.24.3 h1:u99WjuHYCRJjS1xeLOx72DdRaghuDnuMgueiGMFy1ec= +k8s.io/component-base v0.24.3/go.mod h1:bqom2IWN9Lj+vwAkPNOv2TflsP1PeVDIwIN0lRthxYY= +k8s.io/component-helpers v0.24.3/go.mod h1:/1WNW8TfBOijQ1ED2uCHb4wtXYWDVNMqUll8h36iNVo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= @@ -1728,35 +1745,35 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubectl v0.23.6 h1:ajzrqj88GqlH/gpscMCts+mKNeSJprpkWJEHO8CR2Ss= -k8s.io/kubectl v0.23.6/go.mod h1:mMtJhc2QtQiSfvIQoMEUIjGHtZuP4uxMy/ees6j6zx8= -k8s.io/metrics v0.23.6/go.mod h1:Fm9VzVMZ7KVEEeLStF2y3XogfcDwpGyI15o1xB6PbYk= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kubectl v0.24.3 h1:PqY8ho/S/KuE2/hCC3Iee7X+lOtARYo0LQsNzvV/edE= +k8s.io/kubectl v0.24.3/go.mod h1:PYLcvw96sC1NLbxZEDbdlOEd6/C76VIWjGmWV5QjSk0= +k8s.io/metrics v0.24.3/go.mod h1:p1M0lhMySWfhISkSd3HEj8xIgrVnJTK3PPhFq2rA3To= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/controller-runtime v0.11.2 h1:H5GTxQl0Mc9UjRJhORusqfJCIjBO8UtUxGggCwL1rLA= -sigs.k8s.io/controller-runtime v0.11.2/go.mod h1:P6QCzrEjLaZGqHsfd+os7JQ+WFZhvB8MRFsn4dWF7O4= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= -sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= -sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= -sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= +sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= +sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= +sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= +sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= +sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From 6f187bd7582992fca71ceb56a4b3fc4083803c9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 10:34:39 +0200 Subject: [PATCH 0543/1234] Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 (#993) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.8.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index ba044fe40..5f2f4a944 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.7.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.3 @@ -123,7 +123,7 @@ require ( google.golang.org/protobuf v1.27.1 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.24.2 // indirect k8s.io/component-base v0.24.3 // indirect k8s.io/klog/v2 v2.60.1 // indirect diff --git a/go.sum b/go.sum index 2ed873658..a0cd834cb 100644 --- a/go.sum +++ b/go.sum @@ -1024,6 +1024,7 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1031,8 +1032,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= @@ -1696,8 +1698,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= From 5ef2c0f447cd44b0546adabb2143057b11bdee4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Jul 2022 10:49:49 +0200 Subject: [PATCH 0544/1234] Bump docker/build-push-action from 3.0.0 to 3.1.0 (#994) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 0abcb9a36..8663e0e1d 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0232c8320..da173e8c5 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 18f1dc23a..fdc4c0261 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index aaab2af83..b4b1bd442 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index e93ab1854..6b9c77926 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 50038713a..3d5b8d632 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -49,7 +49,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.0.0 + uses: docker/build-push-action@v3.1.0 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From 0232b80b1885bf616d4cc5134c6422ed51f7199b Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Mon, 25 Jul 2022 11:09:21 +0200 Subject: [PATCH 0545/1234] =?UTF-8?q?Change=20Horizontal=20Pod=20Autoscale?= =?UTF-8?q?r=20to=20scale=20on=20OpenTelemetry=20Collector=20=E2=80=A6=20(?= =?UTF-8?q?#984)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change Horizontal Pod Autoscaler to scale on OpenTelemetry Collector object Signed-off-by: Kevin Earls * Update doc; move upgrade code out of reconciler Signed-off-by: Kevin Earls * Fixed doc Signed-off-by: Kevin Earls * Respond to comments, implement test Signed-off-by: Kevin Earls * respond to comments Signed-off-by: Kevin Earls --- Makefile | 6 +- apis/v1alpha1/opentelemetrycollector_types.go | 6 +- .../opentelemetrycollector_webhook.go | 9 +++ apis/v1alpha1/zz_generated.deepcopy.go | 5 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 7 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 7 +- docs/api.md | 11 ++- hack/install-metrics-server.sh | 7 ++ pkg/collector/horizontalpodautoscaler.go | 9 ++- pkg/collector/reconcile/deployment.go | 5 -- .../reconcile/horizontalpodautoscaler.go | 7 +- pkg/collector/upgrade/v0_56_0.go | 80 +++++++++++++++++++ pkg/collector/upgrade/v0_56_0_test.go | 59 ++++++++++++++ pkg/collector/upgrade/versions.go | 4 + pkg/naming/main.go | 15 ++++ tests/e2e/autoscale/00-assert.yaml | 16 ++++ tests/e2e/autoscale/00-install.yaml | 32 ++++++++ tests/e2e/autoscale/01-assert.yaml | 18 +++++ tests/e2e/autoscale/01-install.yaml | 19 +++++ 19 files changed, 307 insertions(+), 15 deletions(-) create mode 100755 hack/install-metrics-server.sh create mode 100644 pkg/collector/upgrade/v0_56_0.go create mode 100644 pkg/collector/upgrade/v0_56_0_test.go create mode 100644 tests/e2e/autoscale/00-assert.yaml create mode 100644 tests/e2e/autoscale/00-install.yaml create mode 100644 tests/e2e/autoscale/01-assert.yaml create mode 100644 tests/e2e/autoscale/01-install.yaml diff --git a/Makefile b/Makefile index e62c88a34..562e54715 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,7 @@ e2e: $(KUTTL) test .PHONY: prepare-e2e -prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind load-image-all +prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server load-image-all mkdir -p tests/_build/crds tests/_build/manifests $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ @@ -189,6 +189,10 @@ container-target-allocator: start-kind: kind create cluster --config $(KIND_CONFIG) +.PHONY: install-metrics-server +install-metrics-server: + ./hack/install-metrics-server.sh + .PHONY: load-image-all load-image-all: load-image-operator load-image-target-allocator diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 25a0e60db..4e5f03b88 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -33,10 +33,14 @@ type OpenTelemetryCollectorSpec struct { // +optional Args map[string]string `json:"args,omitempty"` - // Replicas is the number of pod instances for the underlying OpenTelemetry Collector + // Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling // +optional Replicas *int32 `json:"replicas,omitempty"` + // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 + // +optional + MinReplicas *int32 `json:"minReplicas,omitempty"` + // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional MaxReplicas *int32 `json:"maxReplicas,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index f4a6b4f06..6a4b1e936 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -120,6 +120,15 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { if r.Spec.Replicas != nil && *r.Spec.Replicas > *r.Spec.MaxReplicas { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, replicas must not be greater than maxReplicas") } + + if r.Spec.MinReplicas != nil && *r.Spec.MinReplicas > *r.Spec.MaxReplicas { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas") + } + + if r.Spec.MinReplicas != nil && *r.Spec.MinReplicas < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") + } + } return nil diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index ef246bbdf..a1d95abb2 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -264,6 +264,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } if in.MaxReplicas != nil { in, out := &in.MaxReplicas, &out.MaxReplicas *out = new(int32) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index caa2add5b..619113f22 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -223,6 +223,11 @@ spec: If MaxReplicas is set autoscaling is enabled. format: int32 type: integer + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling feature. Set + this if your are using autoscaling. It must be at least 1 + format: int32 + type: integer mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) @@ -475,7 +480,7 @@ spec: x-kubernetes-list-type: atomic replicas: description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector + OpenTelemetry Collector. Set this if your are not using autoscaling format: int32 type: integer resources: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index dcb4b80ea..7043d13eb 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -221,6 +221,11 @@ spec: If MaxReplicas is set autoscaling is enabled. format: int32 type: integer + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling feature. Set + this if your are using autoscaling. It must be at least 1 + format: int32 + type: integer mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) @@ -473,7 +478,7 @@ spec: x-kubernetes-list-type: atomic replicas: description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector + OpenTelemetry Collector. Set this if your are not using autoscaling format: int32 type: integer resources: diff --git a/docs/api.md b/docs/api.md index c93ff7a58..8802302ac 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1455,6 +1455,15 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Format: int32
+ + + + + @@ -1496,7 +1505,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. diff --git a/hack/install-metrics-server.sh b/hack/install-metrics-server.sh new file mode 100755 index 000000000..d63332d77 --- /dev/null +++ b/hack/install-metrics-server.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Install metrics-server on kind clusters for autoscale tests. Note: This is not needed for minikube, +# you can just add --addons "metrics-server" to the start command. +kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml +kubectl patch deployment -n kube-system metrics-server --type "json" -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": --kubelet-insecure-tls}]' +kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=5m diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 334ae87bd..7c7003fb4 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -35,17 +35,18 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al return autoscalingv1.HorizontalPodAutoscaler{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Collector(otelcol), + Name: naming.HorizontalPodAutoscaler(otelcol), Namespace: otelcol.Namespace, Labels: labels, Annotations: annotations, }, Spec: autoscalingv1.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscalingv1.CrossVersionObjectReference{ - APIVersion: "apps/v1", - Kind: "Deployment", - Name: naming.Collector(otelcol), + APIVersion: v1alpha1.GroupVersion.String(), + Kind: "OpenTelemetryCollector", + Name: naming.OpenTelemetryCollector(otelcol), }, + MinReplicas: otelcol.Spec.Replicas, MaxReplicas: *otelcol.Spec.MaxReplicas, TargetCPUUtilizationPercentage: &cpuTarget, diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 4049a8caa..99aa3a5a3 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -99,11 +99,6 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - if params.Instance.Spec.MaxReplicas != nil && desired.Labels["app.kubernetes.io/component"] == "opentelemetry-collector" { - currentReplicas := currentReplicasWithHPA(params.Instance.Spec, existing.Status.Replicas) - updated.Spec.Replicas = ¤tReplicas - } - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. updated.Spec.Selector = existing.Spec.Selector.DeepCopy() diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 6d0bca72a..606f4dffc 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -52,6 +52,7 @@ func HorizontalPodAutoscalers(ctx context.Context, params Params) error { } func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expected []autoscalingv1.HorizontalPodAutoscaler) error { + one := int32(1) for _, obj := range expected { desired := obj @@ -81,9 +82,13 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect } updated.OwnerReferences = desired.OwnerReferences - updated.Spec.MinReplicas = params.Instance.Spec.Replicas if params.Instance.Spec.MaxReplicas != nil { updated.Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas + if params.Instance.Spec.MinReplicas != nil { + updated.Spec.MinReplicas = params.Instance.Spec.MinReplicas + } else { + updated.Spec.MinReplicas = &one + } } for k, v := range desired.Annotations { diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go new file mode 100644 index 000000000..9103a3d50 --- /dev/null +++ b/pkg/collector/upgrade/v0_56_0.go @@ -0,0 +1,80 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "context" + "fmt" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + // return if this does not use an autoscaler + if otelcol.Spec.MaxReplicas == nil { + return otelcol, nil + } + + // Add minReplicas + one := int32(1) + otelcol.Spec.MinReplicas = &one + + // Find the existing HPA for this collector and upgrade it if necessary + listOptions := []client.ListOption{ + client.InNamespace(otelcol.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + hpaList := &autoscalingv1.HorizontalPodAutoscalerList{} + ctx := context.Background() + if err := u.Client.List(ctx, hpaList, listOptions...); err != nil { + return nil, fmt.Errorf("couldn't upgrade to v0.56.0, failed trying to find HPA instances: %w", err) + } + + errors := []error{} + for i := range hpaList.Items { + existing := hpaList.Items[i] + // If there is an autoscaler based on Deployment, replace it with one based on OpenTelemetryCollector + if existing.Spec.ScaleTargetRef.Kind == "Deployment" { + updated := existing.DeepCopy() + updated.Spec.ScaleTargetRef = autoscalingv1.CrossVersionObjectReference{ + Kind: "OpenTelemetryCollector", + Name: naming.OpenTelemetryCollectorName(otelcol.Name), + APIVersion: v1alpha1.GroupVersion.String(), + } + patch := client.MergeFrom(&existing) + err := u.Client.Patch(ctx, updated, patch) + if err != nil { + errors = append(errors, err) + } + } + } + + if len(errors) != 0 { + return nil, fmt.Errorf("couldn't upgrade to v0.56.0, failed to recreate autoscaler: %v", errors) + } + + u.Log.Info("in upgrade0_56_0", "Otel Instance", otelcol.Name, "Upgrade version", u.Version.String()) + u.Recorder.Event(otelcol, "Normal", "Upgrade", "upgraded to v0.56.0, added minReplicas. recreated HPA instance") + + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_56_0_test.go b/pkg/collector/upgrade/v0_56_0_test.go new file mode 100644 index 000000000..639ceccb7 --- /dev/null +++ b/pkg/collector/upgrade/v0_56_0_test.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/record" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_56_0Upgrade(t *testing.T) { + one := int32(1) + three := int32(3) + + collectorInstance := v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "OpenTelemetryCollector", + APIVersion: "v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "somewhere", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + MaxReplicas: &three, + }, + } + + collectorInstance.Status.Version = "0.55.0" + versionUpgrade := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + upgradedInstance, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) + assert.NoError(t, err) + assert.Equal(t, one, *upgradedInstance.Spec.MinReplicas) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 7aec8a0f5..f78e824e4 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -73,6 +73,10 @@ var ( Version: *semver.MustParse("0.43.0"), upgrade: upgrade0_43_0, }, + { + Version: *semver.MustParse("0.56.0"), + upgrade: upgrade0_56_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/pkg/naming/main.go b/pkg/naming/main.go index f1124fa61..f6b896212 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -54,6 +54,21 @@ func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } +// HorizontalPodAutoscaler builds the autoscaler name based on the instance. +func HorizontalPodAutoscaler(otelcol v1alpha1.OpenTelemetryCollector) string { + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +} + +// HorizontalPodAutoscaler builds the collector (deployment/daemonset) name based on the instance. +func OpenTelemetryCollector(otelcol v1alpha1.OpenTelemetryCollector) string { + return DNSName(Truncate("%s", 63, otelcol.Name)) +} + +// HorizontalPodAutoscaler builds the collector (deployment/daemonset) name based on the instance. +func OpenTelemetryCollectorName(otelcolName string) string { + return DNSName(Truncate("%s", 63, otelcolName)) +} + // TargetAllocator returns the TargetAllocator deployment resource name. func TargetAllocator(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) diff --git a/tests/e2e/autoscale/00-assert.yaml b/tests/e2e/autoscale/00-assert.yaml new file mode 100644 index 000000000..ef4b82869 --- /dev/null +++ b/tests/e2e/autoscale/00-assert.yaml @@ -0,0 +1,16 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 + +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: simplest-collector +spec: + minReplicas: 1 + maxReplicas: 2 + diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml new file mode 100644 index 000000000..e2ba8d5a5 --- /dev/null +++ b/tests/e2e/autoscale/00-install.yaml @@ -0,0 +1,32 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + minReplicas: 1 + maxReplicas: 2 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/autoscale/01-assert.yaml b/tests/e2e/autoscale/01-assert.yaml new file mode 100644 index 000000000..2c2eec023 --- /dev/null +++ b/tests/e2e/autoscale/01-assert.yaml @@ -0,0 +1,18 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: tracegen +status: + conditions: + - status: "True" + type: Complete + +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector + +metadata: + name: simplest +status: + scale: + replicas: 2 diff --git a/tests/e2e/autoscale/01-install.yaml b/tests/e2e/autoscale/01-install.yaml new file mode 100644 index 000000000..eac440836 --- /dev/null +++ b/tests/e2e/autoscale/01-install.yaml @@ -0,0 +1,19 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: tracegen +spec: + template: + spec: + containers: + - name: tracegen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:latest + command: + - "./tracegen" + args: + - -otlp-endpoint=simplest-collector-headless:4317 + - -otlp-insecure + - -duration=1m + - -workers=20 + restartPolicy: Never + backoffLimit: 4 From c33b88f4357c38887b2961a9fef8b6d81dd6d414 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 25 Jul 2022 02:30:06 -0700 Subject: [PATCH 0546/1234] Update the javaagent version to 1.16.0 (#995) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 141f2e805..15b989e39 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.15.0 +1.16.0 From b18ddf1f4b49c422d87d394ba1d51d01ddbab68f Mon Sep 17 00:00:00 2001 From: Yuri Oliveira Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:11:57 +0200 Subject: [PATCH 0547/1234] Release v0.56.0 (#997) * Release v0.56.0 Signed-off-by: Yuri Sa * Included Kevin's PR Signed-off-by: Yuri Sa --- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5801f38f..2324e7654 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ Changes by Version ================== +0.56.0 +------------------- +### 💡 Enhancements 💡 +* Upgrade operator-sdk ([#982](https://github.com/open-telemetry/opentelemetry-operator/pull/982), [@yuriolisa](https://github.com/yuriolisa)) +* build and push dotnet-auto-instrumentation image ([#989](https://github.com/open-telemetry/opentelemetry-operator/pull/989), [@avadhut123pisal](https://github.com/avadhut123pisal) +* Change Horizontal Pod Autoscaler to scale on OpenTelemetry Collector … ([#984](https://github.com/open-telemetry/opentelemetry-operator/pull/984), [@kevinearls](https://github.com/kevinearls)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.56.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.56.0) +* [OpenTelemetry Contrib - v0.56.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.56.0) + 0.55.0 ------------------- ### 🧰 Bug fixes 🧰 diff --git a/README.md b/README.md index 355d96bc9..de7c98183 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.56.0 | v1.19 to v1.24 | v1 | | v0.55.0 | v1.19 to v1.24 | v1 | | v0.54.0 | v1.19 to v1.24 | v1 | | v0.53.0 | v1.19 to v1.24 | v1 | @@ -317,7 +318,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.39.0 | v1.20 to v1.22 | v1alpha2 | | v0.38.0 | v1.20 to v1.22 | v1alpha2 | | v0.37.1 | v1.20 to v1.22 | v1alpha2 | -| v0.37.0 | v1.20 to v1.22 | v1alpha2 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 574e8e3fb..5a12bb3f8 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.55.0 + name: opentelemetry-operator.v0.56.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -282,7 +282,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.55.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.56.0 livenessProbe: httpGet: path: /healthz @@ -392,7 +392,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.55.0 + version: 0.56.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 171434b92..b9c107353 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.55.0 +opentelemetry-collector=0.56.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.55.0 +operator=0.56.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 7ce297de5415486b568d68466a564fd65fe7d462 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 26 Jul 2022 17:30:48 +0530 Subject: [PATCH 0548/1234] Support DotNet auto-instrumentation (#976) * Adds support for dotnet auto-instrumentation * changes default image for testing * adds dotnet auto-instrumentation to the ldflags in makefile * changes in Makefile * fixes issue in makefile * fixes issue in dockerfile * passes dotnet sample app image to e2e test * fixes version in the dot net autoinstrumentation version file * adds testing changes for dot-net-autoinstrumentation * fixes annotation * downloads dot-net release from github * removes git push condition check * removes git push condition check * changes repo to logicmonitor * adds dontnet auto-instrumentation related details in readme * adds docker image layer caching in github action * triggers action on pull request * adds e2e test cases for dotnet instrumentation * fixes version for dotnet instrumentation * version changes * restores clusterversion file * restores changes in Makefile * minor change * Adds configuration details to dockerfile * updates version of dotnet auto-instrumentation * changes env var name from OTEL_DOTNET_TRACER_INSTRUMENTATIONS to OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS * removes java related env variables * fixes e2e test cases * fixes e2e test case * deletes .DS_Store file * sets OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS to default value * fixes e2e test case * fixes e2e test case --- .../publish-autoinstrumentation-dotnet.yaml | 2 +- Dockerfile | 3 +- Makefile | 5 +- README.md | 12 +- apis/v1alpha1/instrumentation_types.go | 16 + apis/v1alpha1/instrumentation_webhook.go | 37 ++- apis/v1alpha1/instrumentation_webhook_test.go | 34 +++ apis/v1alpha1/zz_generated.deepcopy.go | 23 ++ .../opentelemetry.io_instrumentations.yaml | 121 ++++++++ .../opentelemetry.io_instrumentations.yaml | 121 ++++++++ docs/api.md | 287 ++++++++++++++++++ internal/config/main.go | 7 + internal/config/options.go | 7 + internal/version/main.go | 13 +- main.go | 6 + pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/dotnet.go | 118 +++++++ pkg/instrumentation/dotnet_test.go | 274 +++++++++++++++++ pkg/instrumentation/podmutator.go | 10 +- pkg/instrumentation/podmutator_test.go | 165 ++++++++++ pkg/instrumentation/sdk.go | 7 + pkg/instrumentation/sdk_test.go | 106 +++++++ pkg/instrumentation/upgrade/upgrade.go | 9 + pkg/instrumentation/upgrade/upgrade_test.go | 5 + .../00-install-collector.yaml | 23 ++ .../00-install-instrumentation.yaml | 30 ++ .../01-assert.yaml | 84 +++++ .../01-install-app.yaml | 23 ++ .../02-assert.yaml | 52 ++++ .../02-install-app.yaml | 23 ++ .../00-install-collector.yaml | 23 ++ .../00-install-instrumentation.yaml | 30 ++ .../e2e/instrumentation-dotnet/01-assert.yaml | 48 +++ .../01-install-app.yaml | 24 ++ versions.txt | 4 + 35 files changed, 1741 insertions(+), 12 deletions(-) create mode 100644 pkg/instrumentation/dotnet.go create mode 100644 pkg/instrumentation/dotnet_test.go create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml create mode 100644 tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml create mode 100644 tests/e2e/instrumentation-dotnet/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-dotnet/01-assert.yaml create mode 100644 tests/e2e/instrumentation-dotnet/01-install-app.yaml diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 8663e0e1d..9b6e23556 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -62,4 +62,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index a38643660..f3f25cdfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,9 +25,10 @@ ARG TARGETALLOCATOR_VERSION ARG AUTO_INSTRUMENTATION_JAVA_VERSION ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION +ARG AUTO_INSTRUMENTATION_DOTNET_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 562e54715..02b4ebbbb 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,8 @@ TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetalloc AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION}" +AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" # Image URL to use all building/pushing image targets IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator @@ -174,7 +175,7 @@ set-test-image-vars: # Build the container image, used only for local dev purposes .PHONY: container container: - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} . + docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push diff --git a/README.md b/README.md index de7c98183..3cc8628f7 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ When using sidecar mode the OpenTelemetry collector container will have the envi ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Java, NodeJS and Python are supported. +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently DotNet, Java, NodeJS and Python are supported. To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. @@ -210,12 +210,20 @@ Python: instrumentation.opentelemetry.io/inject-python: "true" ``` +DotNet: +```bash +instrumentation.opentelemetry.io/inject-dotnet: "true" +``` + The possible values for the annotation can be * `"true"` - inject and `Instrumentation` resource from the namespace. * `"my-instrumentation"` - name of `Instrumentation` CR instance in the current namespace. * `"my-other-namespace/my-instrumentation"` - name and namespace of `Instrumentation` CR instance in another namespace. * `"false"` - do not inject + +>**Note:** For `DotNet` auto-instrumentation, by default, operator sets the `OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS` environment variable which specifies the list of traces source instrumentations you want to enable. The value that is set by default by the operator is all available instrumentations supported by the `openTelemery-dotnet-instrumentation` release consumed in the image, i.e. `AspNet,HttpClient,SqlClient`. This value can be overriden by configuring the environment variable explicitely. + #### Multi-container pods If nothing else is specified, instrumentation is performed on the first container available in the pod spec. @@ -271,6 +279,8 @@ spec: image: your-customized-auto-instrumentation-image:nodejs python: image: your-customized-auto-instrumentation-image:python + dotnet: + image: your-customized-auto-instrumentation-image:dotnet ``` The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 95a0a13e8..af6ef30a7 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -54,6 +54,10 @@ type InstrumentationSpec struct { // Python defines configuration for python auto-instrumentation. // +optional Python Python `json:"python,omitempty"` + + // DotNet defines configuration for DotNet auto-instrumentation. + // +optional + DotNet DotNet `json:"dotnet,omitempty"` } // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. @@ -129,6 +133,18 @@ type Python struct { Env []corev1.EnvVar `json:"env,omitempty"` } +type DotNet struct { + // Image is a container image with DotNet SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // Env defines DotNet specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` +} + // InstrumentationStatus defines status of the instrumentation. type InstrumentationStatus struct { } diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index f2793a864..3516802d7 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -27,11 +27,14 @@ import ( ) const ( - AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" - AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" - AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" - envPrefix = "OTEL_" - envSplunkPrefix = "SPLUNK_" + AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" + AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" + AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" + envPrefix = "OTEL_" + envSplunkPrefix = "SPLUNK_" + envOtelDotnetAutoTracesEnabledInstrumentations = "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS" + defaultEnabledTracesInstrumentations = "AspNet,HttpClient,SqlClient" ) // log is for logging in this package. @@ -72,6 +75,18 @@ func (r *Instrumentation) Default() { r.Spec.Python.Image = val } } + if r.Spec.DotNet.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationDotNet]; ok { + r.Spec.DotNet.Image = val + } + } + // by default set all the available instrumentations for dotnet unless the env is already set + if !r.isEnvVarSet(envOtelDotnetAutoTracesEnabledInstrumentations) { + r.Spec.DotNet.Env = append(r.Spec.DotNet.Env, corev1.EnvVar{ + Name: envOtelDotnetAutoTracesEnabledInstrumentations, + Value: defaultEnabledTracesInstrumentations, + }) + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -125,6 +140,9 @@ func (in *Instrumentation) validate() error { if err := in.validateEnv(in.Spec.Python.Env); err != nil { return err } + if err := in.validateEnv(in.Spec.DotNet.Env); err != nil { + return err + } return nil } @@ -137,3 +155,12 @@ func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error { } return nil } + +func (in *Instrumentation) isEnvVarSet(name string) bool { + for _, env := range in.Spec.DotNet.Env { + if env.Name == name { + return true + } + } + return false +} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 622e3ce8e..89ffb74cf 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -28,6 +29,7 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { AnnotationDefaultAutoInstrumentationJava: "java-img:1", AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", AnnotationDefaultAutoInstrumentationPython: "python-img:1", + AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", }, }, } @@ -35,6 +37,38 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { assert.Equal(t, "java-img:1", inst.Spec.Java.Image) assert.Equal(t, "nodejs-img:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python-img:1", inst.Spec.Python.Image) + assert.Equal(t, "dotnet-img:1", inst.Spec.DotNet.Image) + assert.Equal(t, true, inst.isEnvVarSet(envOtelDotnetAutoTracesEnabledInstrumentations)) +} + +func TestInstrumentationDefaultingWebhookOtelDotNetTracesEnabledInstruEnvSet(t *testing.T) { + inst := &Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + AnnotationDefaultAutoInstrumentationJava: "java-img:1", + AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", + AnnotationDefaultAutoInstrumentationPython: "python-img:1", + AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", + }, + }, + Spec: InstrumentationSpec{ + DotNet: DotNet{ + Env: []v1.EnvVar{ + { + Name: envOtelDotnetAutoTracesEnabledInstrumentations, + Value: "AspNet,HttpClient", + }, + }, + }, + }, + } + inst.Default() + for _, env := range inst.Spec.DotNet.Env { + if env.Name == envOtelDotnetAutoTracesEnabledInstrumentations { + assert.Equal(t, "AspNet,HttpClient", env.Value) + break + } + } } func TestInstrumentationValidatingWebhook(t *testing.T) { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index a1d95abb2..cb60f0ca6 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -24,6 +24,28 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DotNet) DeepCopyInto(out *DotNet) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DotNet. +func (in *DotNet) DeepCopy() *DotNet { + if in == nil { + return nil + } + out := new(DotNet) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Exporter) DeepCopyInto(out *Exporter) { *out = *in @@ -119,6 +141,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { in.Java.DeepCopyInto(&out.Java) in.NodeJS.DeepCopyInto(&out.NodeJS) in.Python.DeepCopyInto(&out.Python) + in.DotNet.DeepCopyInto(&out.DotNet) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index d00551d3a..832f9bf5d 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -53,6 +53,127 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + dotnet: + description: DotNet defines configuration for DotNet auto-instrumentation. + properties: + env: + description: 'Env defines DotNet specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with DotNet SDK and auto-instrumentation. + type: string + type: object env: description: 'Env defines common env vars. There are four layers for env vars'' definitions and the precedence order is: `original container diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index b31e5fedc..c1354e589 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -52,6 +52,127 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + dotnet: + description: DotNet defines configuration for DotNet auto-instrumentation. + properties: + env: + description: 'Env defines DotNet specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with DotNet SDK and auto-instrumentation. + type: string + type: object env: description: 'Env defines common env vars. There are four layers for env vars'' definitions and the precedence order is: `original container diff --git a/docs/api.md b/docs/api.md index 8802302ac..57b8d78a9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -86,6 +86,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen + + + + +
volumePath string - Path that identifies vSphere volume vmdk
+ volumePath is the path that identifies vSphere volume vmdk
true
fsType string - Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+ fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
storagePolicyID string - Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+ storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
false
storagePolicyName string - Storage Policy Based Management (SPBM) profile name.
+ storagePolicyName is the storage Policy Based Management (SPBM) profile name.
false
false
minReplicasinteger + MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1
+
+ Format: int32
+
false
mode enumreplicas integer - Replicas is the number of pod instances for the underlying OpenTelemetry Collector
+ Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling

Format: int32
dotnetobject + DotNet defines configuration for DotNet auto-instrumentation.
+
false
env []object @@ -145,6 +152,286 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen
+### Instrumentation.spec.dotnet +[↩ Parent](#instrumentationspec) + + + +DotNet defines configuration for DotNet auto-instrumentation. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
env[]object + Env defines DotNet specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with DotNet SDK and auto-instrumentation.
+
false
+ + +### Instrumentation.spec.dotnet.env[index] +[↩ Parent](#instrumentationspecdotnet) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.dotnet.env[index].valueFrom +[↩ Parent](#instrumentationspecdotnetenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.dotnet.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecdotnetenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.dotnet.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecdotnetenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.dotnet.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecdotnetenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.dotnet.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecdotnetenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + ### Instrumentation.spec.env[index] [↩ Parent](#instrumentationspec) diff --git a/internal/config/main.go b/internal/config/main.go index bed73be4d..f2821e883 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -51,6 +51,7 @@ type Config struct { autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string + autoInstrumentationDotNetImage string labelsFilter []string } @@ -82,6 +83,7 @@ func New(opts ...Option) Config { autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, + autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, labelsFilter: o.labelsFilter, } } @@ -177,6 +179,11 @@ func (c *Config) AutoInstrumentationPythonImage() string { return c.autoInstrumentationPythonImage } +// AutoInstrumentationDotNetImage returns OpenTelemetry DotNet auto-instrumentation container image. +func (c *Config) AutoInstrumentationDotNetImage() string { + return c.autoInstrumentationDotNetImage +} + // Returns the filters converted to regex strings used to filter out unwanted labels from propagations. func (c *Config) LabelsFilter() []string { return c.labelsFilter diff --git a/internal/config/options.go b/internal/config/options.go index 37fe630a3..c71e2e27d 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -37,6 +37,7 @@ type options struct { autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string + autoInstrumentationDotNetImage string collectorConfigMapEntry string targetAllocatorConfigMapEntry string logger logr.Logger @@ -119,6 +120,12 @@ func WithAutoInstrumentationPythonImage(s string) Option { } } +func WithAutoInstrumentationDotNetImage(s string) Option { + return func(o *options) { + o.autoInstrumentationDotNetImage = s + } +} + func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/version/main.go b/internal/version/main.go index 5b2dcc539..d6e7cf1db 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -28,6 +28,7 @@ var ( autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string + autoInstrumentationDotNet string ) // Version holds this Operator's version as well as the version of some of the components it uses. @@ -40,6 +41,7 @@ type Version struct { AutoInstrumentationJava string `json:"auto-instrumentation-java"` AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` AutoInstrumentationPython string `json:"auto-instrumentation-python"` + AutoInstrumentationDotNet string `json:"auto-instrumentation-dotnet"` } // Get returns the Version object with the relevant information. @@ -53,12 +55,13 @@ func Get() Version { AutoInstrumentationJava: AutoInstrumentationJava(), AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), AutoInstrumentationPython: AutoInstrumentationPython(), + AutoInstrumentationDotNet: AutoInstrumentationDotNet(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, @@ -67,6 +70,7 @@ func (v Version) String() string { v.AutoInstrumentationJava, v.AutoInstrumentationNodeJS, v.AutoInstrumentationPython, + v.AutoInstrumentationDotNet, ) } @@ -112,3 +116,10 @@ func AutoInstrumentationPython() string { } return "0.0.0" } + +func AutoInstrumentationDotNet() string { + if len(autoInstrumentationDotNet) > 0 { + return autoInstrumentationDotNet + } + return "0.0.0" +} diff --git a/main.go b/main.go index c7928d855..70d24c869 100644 --- a/main.go +++ b/main.go @@ -80,6 +80,7 @@ func main() { autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string + autoInstrumentationDotNet string labelsFilter []string webhookPort int ) @@ -94,6 +95,7 @@ func main() { pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.Parse() @@ -108,6 +110,7 @@ func main() { "auto-instrumentation-java", autoInstrumentationJava, "auto-instrumentation-nodejs", autoInstrumentationNodeJS, "auto-instrumentation-python", autoInstrumentationPython, + "auto-instrumentation-dotnet", autoInstrumentationDotNet, "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, @@ -132,6 +135,7 @@ func main() { config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), + config.WithAutoInstrumentationDotNetImage(autoInstrumentationDotNet), config.WithAutoDetect(ad), config.WithLabelFilters(labelsFilter), ) @@ -200,6 +204,7 @@ func main() { otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava, otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, + otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, }, }, }).SetupWebhookWithManager(mgr); err != nil { @@ -262,6 +267,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), + DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), Client: mgr.GetClient(), } return u.ManagedInstances(c) diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 3f1519b2c..89c1a7dc0 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -26,6 +26,7 @@ const ( annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" + annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" ) diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go new file mode 100644 index 000000000..ee933ef33 --- /dev/null +++ b/pkg/instrumentation/dotnet.go @@ -0,0 +1,118 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + envDotNetAdditionalDeps = "DOTNET_ADDITIONAL_DEPS" + envDotNetSharedStore = "DOTNET_SHARED_STORE" + envDotNetStartupHook = "DOTNET_STARTUP_HOOKS" + dotNetAdditionalDepsPath = "./otel-auto-instrumentation/AdditionalDeps" + dotNetSharedStorePath = "/otel-auto-instrumentation/store" + dotNetStartupHookPath = "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" +) + +func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) corev1.Pod { + // caller checks if there is at least one container + container := pod.Spec.Containers[index] + + // inject env vars + for _, env := range dotNetSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + + idx := getIndexOfEnv(container.Env, envDotNetStartupHook) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_STARTUP_HOOKS env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetStartupHookPath) + } + + idx = getIndexOfEnv(container.Env, envDotNetAdditionalDeps) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_ADDITIONAL_DEPS env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetAdditionalDepsPath) + } + + idx = getIndexOfEnv(container.Env, envDotNetSharedStore) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }) + } else if idx > -1 { + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_SHARED_STORE env var value via ValueFrom", "container", container.Name) + return pod + } + container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetSharedStorePath) + } + + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }) + + // We just inject Volumes and init containers for the first processed container + if isInitContainerMissing(pod) { + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: initContainerName, + Image: dotNetSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }) + } + + pod.Spec.Containers[index] = container + return pod +} diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go new file mode 100644 index 000000000..7e3e827e6 --- /dev/null +++ b/pkg/instrumentation/dotnet_test.go @@ -0,0 +1,274 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestInjectDotNetSDK(t *testing.T) { + tests := []struct { + name string + v1alpha1.DotNet + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS not defined", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{{Name: "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS", Value: "AspNet,HttpClient,SqlClient"}}}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS", + Value: "AspNet,HttpClient,SqlClient", + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + }, + }, + }, + }, + }, + }, + { + name: "DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE defined", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetStartupHook, + Value: "/foo:/bar", + }, + { + Name: envDotNetAdditionalDeps, + Value: "/foo:/bar", + }, + { + Name: envDotNetSharedStore, + Value: "/foo:/bar", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: envDotNetStartupHook, + Value: fmt.Sprintf("%s:%s", "/foo:/bar", dotNetStartupHookPath), + }, + { + Name: envDotNetAdditionalDeps, + Value: fmt.Sprintf("%s:%s", "/foo:/bar", dotNetAdditionalDepsPath), + }, + { + Name: envDotNetSharedStore, + Value: fmt.Sprintf("%s:%s", "/foo:/bar", dotNetSharedStorePath), + }, + }, + }, + }, + }, + }, + }, + { + name: "DOTNET_STARTUP_HOOKS defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetStartupHook, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetStartupHook, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + { + name: "DOTNET_ADDITIONAL_DEPS defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetAdditionalDeps, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetAdditionalDeps, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + { + name: "DOTNET_SHARED_STORE defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetSharedStore, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetSharedStore, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectDotNetSDK(logr.Discard(), test.DotNet, test.pod, 0) + assert.Equal(t, test.expected, pod) + }) + } +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index cc49a8eab..41c1830df 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -43,6 +43,7 @@ type languageInstrumentations struct { Java *v1alpha1.Instrumentation NodeJS *v1alpha1.Instrumentation Python *v1alpha1.Instrumentation + DotNet *v1alpha1.Instrumentation } var _ webhookhandler.PodMutator = (*instPodMutator)(nil) @@ -95,7 +96,14 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } insts.Python = inst - if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil { + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectDotNet); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + insts.DotNet = inst + + if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 00aa549c1..92aa9945d 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -549,6 +549,171 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "dotnet injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "dotnet", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "dotnet", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "opentelemetry-auto-instrumentation", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=dotnet,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opentelemetry-auto-instrumentation", + MountPath: "/otel-auto-instrumentation", + }, + }, + }, + }, + }, + }, + }, { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index cbaaa7ac9..996044a0d 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -83,6 +83,13 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } + if insts.DotNet != nil { + otelinst := *insts.DotNet + i.logger.V(1).Info("injecting dotnet instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = injectDotNetSDK(i.logger, otelinst.Spec.DotNet, pod, index) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 304d0d93a..0a6b558be 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -670,3 +670,109 @@ func TestInjectPython(t *testing.T) { }, }, pod) } + +func TestInjectDotNet(t *testing.T) { + inst := v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + } + insts := languageInstrumentations{ + DotNet: &inst, + } + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), insts, + corev1.Namespace{}, + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, "") + assert.Equal(t, corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "img:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, pod) +} diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 9a702cbf3..65e7b6f77 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -30,6 +30,7 @@ type InstrumentationUpgrade struct { DefaultAutoInstJava string DefaultAutoInstNodeJS string DefaultAutoInstPython string + DefaultAutoInstDotNet string Client client.Client } @@ -92,5 +93,13 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] = u.DefaultAutoInstPython } } + autoInstDotnet := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] + if autoInstDotnet != "" { + // upgrade the image only if the image matches the annotation + if inst.Spec.DotNet.Image == autoInstDotnet { + inst.Spec.DotNet.Image = u.DefaultAutoInstDotNet + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] = u.DefaultAutoInstDotNet + } + } return inst } diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 07eb0a933..89a1c251d 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -46,6 +46,7 @@ func TestUpgrade(t *testing.T) { v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", + v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", }, }, Spec: v1alpha1.InstrumentationSpec{ @@ -58,6 +59,7 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "java:1", inst.Spec.Java.Image) assert.Equal(t, "nodejs:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python:1", inst.Spec.Python.Image) + assert.Equal(t, "dotnet:1", inst.Spec.DotNet.Image) err = k8sClient.Create(context.Background(), inst) require.NoError(t, err) @@ -66,6 +68,7 @@ func TestUpgrade(t *testing.T) { DefaultAutoInstJava: "java:2", DefaultAutoInstNodeJS: "nodejs:2", DefaultAutoInstPython: "python:2", + DefaultAutoInstDotNet: "dotnet:2", Client: k8sClient, } err = up.ManagedInstances(context.Background()) @@ -83,4 +86,6 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "nodejs:2", updated.Spec.NodeJS.Image) assert.Equal(t, "python:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython]) assert.Equal(t, "python:2", updated.Spec.Python.Image) + assert.Equal(t, "dotnet:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet]) + assert.Equal(t, "dotnet:2", updated.Spec.DotNet.Image) } diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..391b502df --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,30 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: dotnet +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + dotnet: + env: + - name: OTEL_LOG_LEVEL + value: "debug" \ No newline at end of file diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml new file mode 100644 index 000000000..9fca3fec8 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -0,0 +1,84 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myapp,myrabbit + instrumentation.opentelemetry.io/inject-dotnet: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_LOG_LEVEL + value: "debug" + - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS + value: AspNet,HttpClient,SqlClient + - name: DOTNET_STARTUP_HOOKS + value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + - name: DOTNET_ADDITIONAL_DEPS + value: ./otel-auto-instrumentation/AdditionalDeps + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation/store + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: myrabbit + env: + - name: OTEL_LOG_LEVEL + value: "debug" + - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS + value: AspNet,HttpClient,SqlClient + - name: DOTNET_STARTUP_HOOKS + value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + - name: DOTNET_ADDITIONAL_DEPS + value: ./otel-auto-instrumentation/AdditionalDeps + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation/store + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..ce6889a69 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + containers: + - name: myapp + image: docker.io/adib070/mvc + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml new file mode 100644 index 000000000..8cb31810b --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/container-names: myrabbit + instrumentation.opentelemetry.io/inject-dotnet: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: myrabbit + env: + - name: OTEL_LOG_LEVEL + value: "debug" + - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS + value: AspNet,HttpClient,SqlClient + - name: DOTNET_STARTUP_HOOKS + value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + - name: DOTNET_ADDITIONAL_DEPS + value: ./otel-auto-instrumentation/AdditionalDeps + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation/store + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container +status: + phase: Running \ No newline at end of file diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..137023368 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + containers: + - name: myapp + image: docker.io/adib070/mvc + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-dotnet/00-install-collector.yaml b/tests/e2e/instrumentation-dotnet/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml new file mode 100644 index 000000000..affbe2982 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml @@ -0,0 +1,30 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: dotnet +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + dotnet: + env: + - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS + value: AspNet,HttpClient diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml new file mode 100644 index 000000000..9b5320b07 --- /dev/null +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS + value: AspNet,HttpClient + - name: DOTNET_STARTUP_HOOKS + value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + - name: DOTNET_ADDITIONAL_DEPS + value: ./otel-auto-instrumentation/AdditionalDeps + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation/store + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation +status: + phase: Running diff --git a/tests/e2e/instrumentation-dotnet/01-install-app.yaml b/tests/e2e/instrumentation-dotnet/01-install-app.yaml new file mode 100644 index 000000000..15c652bac --- /dev/null +++ b/tests/e2e/instrumentation-dotnet/01-install-app.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: docker.io/adib070/mvc diff --git a/versions.txt b/versions.txt index b9c107353..2c8b4553b 100644 --- a/versions.txt +++ b/versions.txt @@ -21,3 +21,7 @@ autoinstrumentation-nodejs=0.27.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt autoinstrumentation-python=0.30b1 + +# Represents the current release of DotNet instrumentation. +# Should match autoinstrumentation/dotnet/version.txt +autoinstrumentation-dotnet=0.2.0-beta.1 \ No newline at end of file From ab00e8ca433df0c5c752af17b8dbf958729e1d38 Mon Sep 17 00:00:00 2001 From: Wen Hu Date: Wed, 27 Jul 2022 02:46:41 +0800 Subject: [PATCH 0549/1234] Fix the issue that target-level metadata labels were missing (#948) (#949) * Fix the issue that target-level metadata labels were missing (#948) * fix(allocation): GetAllTargetsByCollectorAndJob with label merge --- cmd/otel-allocator/allocation/http.go | 23 +++--- cmd/otel-allocator/allocation/http_test.go | 72 +++++++++++++++++-- cmd/otel-allocator/collector/collector.go | 1 + cmd/otel-allocator/discovery/discovery.go | 2 +- .../discovery/discovery_test.go | 9 ++- cmd/otel-allocator/go.mod | 8 +-- cmd/otel-allocator/go.sum | 12 ++-- 7 files changed, 94 insertions(+), 33 deletions(-) diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index d691ca77c..49b6cb65b 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -30,20 +30,13 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *All var targetGroupList []targetGroupJSON - trg := make(map[string][]TargetItem) for _, t := range targetList { - trg[t.JobName+t.Label.String()] = append(trg[t.JobName+t.Label.String()], t) + targetGroupList = append(targetGroupList, targetGroupJSON{ + Targets: []string{t.TargetURL}, + Labels: t.Label, + }) } - labelSetMap := make(map[string]model.LabelSet) - for _, tArr := range trg { - var targets []string - for _, t := range tArr { - labelSetMap[t.TargetURL] = t.Label - targets = append(targets, t.TargetURL) - } - targetGroupList = append(targetGroupList, targetGroupJSON{Targets: targets, Labels: labelSetMap[targets[0]]}) - } displayData[j.Collector.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(j.JobName), j.Collector.Name), Jobs: targetGroupList} } @@ -53,14 +46,14 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *All func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator *Allocator) []targetGroupJSON { var tgs []targetGroupJSON - group := make(map[string][]string) + group := make(map[string]string) labelSet := make(map[string]model.LabelSet) for _, col := range allocator.collectors { if col.Name == collector { for _, targetItemArr := range cMap { for _, targetItem := range targetItemArr { - if targetItem.Collector.Name == collector && targetItem.JobName == job { - group[targetItem.Label.String()] = append(group[targetItem.Label.String()], targetItem.TargetURL) + if targetItem.Collector.Name == collector && targetItem.JobName == job { + group[targetItem.Label.String()] = targetItem.TargetURL labelSet[targetItem.TargetURL] = targetItem.Label } } @@ -69,7 +62,7 @@ func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[strin } for _, v := range group { - tgs = append(tgs, targetGroupJSON{Targets: v, Labels: labelSet[v[0]]}) + tgs = append(tgs, targetGroupJSON{Targets: []string{v}, Labels: labelSet[v]}) } return tgs diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index c239a9c68..ed62c1113 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -1,9 +1,11 @@ package allocation import ( - "github.com/prometheus/common/model" "reflect" "testing" + + "github.com/prometheus/common/model" + "github.com/stretchr/testify/assert" ) func TestGetAllTargetsByCollectorAndJob(t *testing.T) { @@ -41,7 +43,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { "test-collectortest-job": { TargetItem{ JobName: "test-job", - Label: model.LabelSet{ + Label: model.LabelSet{ "test-label": "test-value", }, TargetURL: "test-url", @@ -72,7 +74,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { "test-collectortest-job": { TargetItem{ JobName: "test-job", - Label: model.LabelSet{ + Label: model.LabelSet{ "test-label": "test-value", }, TargetURL: "test-url", @@ -85,7 +87,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { "test-collectortest-job2": { TargetItem{ JobName: "test-job2", - Label: model.LabelSet{ + Label: model.LabelSet{ "test-label": "test-value", }, TargetURL: "test-url", @@ -107,11 +109,69 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { }, }, }, + { + name: "Multiple entry target map of same job with label merge", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string][]TargetItem{ + "test-collectortest-job": { + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + "foo": "bar", + }, + TargetURL: "test-url1", + Collector: &collector{ + Name: "test-collector", + NumTargets: 2, + }, + }, + }, + "test-collectortest-job2": { + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + }, + TargetURL: "test-url2", + Collector: &collector{ + Name: "test-collector", + NumTargets: 2, + }, + }, + }, + }, + allocator: baseAllocator, + }, + want: []targetGroupJSON{ + { + Targets: []string{"test-url1"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + "foo": "bar", + }, + }, + { + Targets: []string{"test-url2"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + }, + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator); !reflect.DeepEqual(got, tt.want) { - t.Errorf("GetAllTargetsByCollectorAndJob() = %v, want %v", got, tt.want) + for _, groupJSON := range GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator) { + exist := false + for _, wantGroupJson := range tt.want { + if groupJSON.Labels.String() == wantGroupJson.Labels.String() { + exist = reflect.DeepEqual(groupJSON, wantGroupJson) + } + } + assert.Equal(t, true, exist) } }) } diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index 0578bab1e..0528ee427 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -77,6 +77,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( log.Error(err, "unable to create collector pod watcher") return } + log.Info("Successfully started a collector pod watcher") if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { log.Info("Collector pod watch event stopped " + msg) return diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 0025587f4..050aa4a45 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -68,7 +68,7 @@ func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { targets = append(targets, allocation.TargetItem{ JobName: jobName, TargetURL: string(t[model.AddressLabel]), - Label: tg.Labels, + Label: t.Merge(tg.Labels), }) } } diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 26cd3f8f9..11e601f36 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -10,9 +10,12 @@ import ( gokitlog "github.com/go-kit/log" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" + ctrl "sigs.k8s.io/controller-runtime" ) var cfg config.Config @@ -26,7 +29,7 @@ func TestMain(m *testing.M) { fmt.Printf("failed to load config file: %v", err) os.Exit(1) } - manager = NewManager(context.Background(), gokitlog.NewNopLogger()) + manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger()) results = make(chan []string) manager.Watch(func(targets []allocation.TargetItem) { @@ -45,7 +48,7 @@ func TestMain(m *testing.M) { } func TestTargetDiscovery(t *testing.T) { - err := manager.ApplyConfig(cfg) + err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, &promconfig.Config{}) assert.NoError(t, err) gotTargets := <-results @@ -70,7 +73,7 @@ func TestTargetUpdate(t *testing.T) { }, } - err := manager.ApplyConfig(cfg) + err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, &promconfig.Config{}) assert.NoError(t, err) gotTargets := <-results diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 7080dde7f..2ed30a020 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -39,7 +39,7 @@ require ( github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect github.com/armon/go-metrics v0.3.9 // indirect github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect - github.com/aws/aws-sdk-go v1.42.16 // indirect + github.com/aws/aws-sdk-go v1.44.41 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect @@ -139,11 +139,11 @@ require ( go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.19.1 // indirect golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index eb58c6a66..e3d28aeff 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -264,8 +264,9 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.42.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.42.16 h1:jOUmYYpC77NZYQVHTOTFT4lwFBT1u3s8ETKciU4l6gQ= github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.41 h1:FNW3Tb8vKvXLZ7lzGlg/dCAXhK4RC5fyFewD11oJhUM= +github.com/aws/aws-sdk-go v1.44.41/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= @@ -2165,8 +2166,9 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9 h1:0qxwC5n+ttVOINCBeRHO0nq9X7uy8SDsPoi5OaCdIEI= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2347,13 +2349,15 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 h1:TyHqChC80pFkXWraUUf6RuB5IqFdQieMLwwCJokV2pc= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 03af42e9f12373ea35cbd61fe3da5403eec261b9 Mon Sep 17 00:00:00 2001 From: Bill Franklin Date: Wed, 27 Jul 2022 09:40:28 +0100 Subject: [PATCH 0550/1234] Enable injecting only core Instrumentation SDK config (#1000) Closes #990. Adds support for injecting SDK environment variables only, without injecting language-specific libraries or config. Usage: ```bash instrumentation.opentelemetry.io/inject-sdk: "true" ``` --- README.md | 17 ++++- pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/podmutator.go | 10 ++- pkg/instrumentation/sdk.go | 7 ++ pkg/instrumentation/sdk_test.go | 67 +++++++++++++++++++ .../00-install-collector.yaml | 23 +++++++ .../00-install-instrumentation.yaml | 24 +++++++ tests/e2e/instrumentation-sdk/01-assert.yaml | 27 ++++++++ .../instrumentation-sdk/01-install-app.yaml | 24 +++++++ 9 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 tests/e2e/instrumentation-sdk/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-sdk/01-assert.yaml create mode 100644 tests/e2e/instrumentation-sdk/01-install-app.yaml diff --git a/README.md b/README.md index 3cc8628f7..d57687404 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,11 @@ DotNet: instrumentation.opentelemetry.io/inject-dotnet: "true" ``` +OpenTelemetry SDK environment variables only: +```bash +instrumentation.opentelemetry.io/inject-sdk: "true" +``` + The possible values for the annotation can be * `"true"` - inject and `Instrumentation` resource from the namespace. * `"my-instrumentation"` - name of `Instrumentation` CR instance in the current namespace. @@ -222,7 +227,7 @@ The possible values for the annotation can be * `"false"` - do not inject ->**Note:** For `DotNet` auto-instrumentation, by default, operator sets the `OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS` environment variable which specifies the list of traces source instrumentations you want to enable. The value that is set by default by the operator is all available instrumentations supported by the `openTelemery-dotnet-instrumentation` release consumed in the image, i.e. `AspNet,HttpClient,SqlClient`. This value can be overriden by configuring the environment variable explicitely. +>**Note:** For `DotNet` auto-instrumentation, by default, operator sets the `OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS` environment variable which specifies the list of traces source instrumentations you want to enable. The value that is set by default by the operator is all available instrumentations supported by the `openTelemery-dotnet-instrumentation` release consumed in the image, i.e. `AspNet,HttpClient,SqlClient`. This value can be overriden by configuring the environment variable explicitely. #### Multi-container pods @@ -283,9 +288,17 @@ spec: image: your-customized-auto-instrumentation-image:dotnet ``` -The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). +The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). Follow the instructions in the Dockerfiles on how to build a custom container image. +#### Inject OpenTelemetry SDK environment variables only + +You can configure the OpenTelemetry SDK for applications which can't currently be autoinstrumented by using `inject-sdk` in place of (e.g.) `inject-python` or `inject-java`. This will inject environment variables like `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_TRACES_SAMPLER`, and `OTEL_EXPORTER_OTLP_ENDPOINT`, that you can configure in the `Instrumentation`, but will not actually provide the SDK. + +```bash +instrumentation.opentelemetry.io/inject-sdk: "true" +``` + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 89c1a7dc0..53817d5c8 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -27,6 +27,7 @@ const ( annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" + annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" ) diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 41c1830df..9d6c369db 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -44,6 +44,7 @@ type languageInstrumentations struct { NodeJS *v1alpha1.Instrumentation Python *v1alpha1.Instrumentation DotNet *v1alpha1.Instrumentation + Sdk *v1alpha1.Instrumentation } var _ webhookhandler.PodMutator = (*instPodMutator)(nil) @@ -103,7 +104,14 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } insts.DotNet = inst - if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil { + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectSdk); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + insts.Sdk = inst + + if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Sdk == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 996044a0d..037806395 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -90,6 +90,13 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } + if insts.Sdk != nil { + otelinst := *insts.Sdk + i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } + return pod } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 0a6b558be..3e976619e 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -776,3 +776,70 @@ func TestInjectDotNet(t *testing.T) { }, }, pod) } + +func TestInjectSdkOnly(t *testing.T) { + inst := v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + } + insts := languageInstrumentations{ + Sdk: &inst, + } + + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), insts, + corev1.Namespace{}, + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, "") + assert.Equal(t, corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, pod) +} diff --git a/tests/e2e/instrumentation-sdk/00-install-collector.yaml b/tests/e2e/instrumentation-sdk/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-sdk/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml b/tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml new file mode 100644 index 000000000..e6fe8125d --- /dev/null +++ b/tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml @@ -0,0 +1,24 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: sdk-only +spec: + env: + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + nodejs: + env: + - name: OTEL_NODEJS_DEBUG + value: "true" + python: + env: + - name: OTEL_ENV_VAR + value: "true" diff --git a/tests/e2e/instrumentation-sdk/01-assert.yaml b/tests/e2e/instrumentation-sdk/01-assert.yaml new file mode 100644 index 000000000..931beb460 --- /dev/null +++ b/tests/e2e/instrumentation-sdk/01-assert.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-sdk: "true" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + - name: OTEL_TRACES_SAMPLER_ARG + - name: OTEL_RESOURCE_ATTRIBUTES + - name: otc-container +status: + phase: Running diff --git a/tests/e2e/instrumentation-sdk/01-install-app.yaml b/tests/e2e/instrumentation-sdk/01-install-app.yaml new file mode 100644 index 000000000..a57db32a5 --- /dev/null +++ b/tests/e2e/instrumentation-sdk/01-install-app.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-sdk: "true" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: ghcr.io/anuraaga/express-hello-world:latest From 42a6d6044efaefd568ceeaec2003dbe35ac3d44d Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 28 Jul 2022 11:38:59 +0200 Subject: [PATCH 0551/1234] Replace maiigned by fieldalignment (#1005) * Replace maiigned by fieldalignment Signed-off-by: Israel Blancas * Disable unwanted linters Signed-off-by: Israel Blancas * Apply changes requested by fieldalignment Signed-off-by: Israel Blancas * Add autogenerated changes to the repository Signed-off-by: Israel Blancas * Revert "Add autogenerated changes to the repository" This reverts commit b49cf7a58a0ce8c0d941788d3bc0ed1ffd3270de. * Fix field descriptions Signed-off-by: Israel Blancas --- .golangci.yaml | 6 +- apis/v1alpha1/instrumentation_types.go | 4 +- apis/v1alpha1/instrumentation_webhook_test.go | 2 +- apis/v1alpha1/opentelemetrycollector_types.go | 114 +++++++----------- .../opentelemetrycollector_controller.go | 30 ++--- internal/config/main.go | 24 ++-- internal/config/options.go | 14 +-- internal/webhookhandler/webhookhandler.go | 4 +- .../webhookhandler/webhookhandler_test.go | 2 +- .../adapters/config_to_ports_test.go | 14 +-- .../adapters/config_to_probe_test.go | 4 +- pkg/collector/parser/receiver_generic.go | 6 +- pkg/collector/parser/receiver_generic_test.go | 28 ++--- pkg/collector/parser/receiver_jaeger.go | 4 +- pkg/collector/parser/receiver_jaeger_test.go | 2 +- pkg/collector/parser/receiver_otlp.go | 2 +- pkg/collector/parser/receiver_test.go | 10 +- pkg/collector/reconcile/params.go | 8 +- pkg/collector/upgrade/upgrade.go | 4 +- pkg/collector/upgrade/versions.go | 2 +- pkg/instrumentation/podmutator.go | 2 +- pkg/instrumentation/podmutator_test.go | 6 +- pkg/instrumentation/sdk.go | 2 +- pkg/instrumentation/upgrade/upgrade.go | 2 +- pkg/naming/triming_test.go | 4 +- pkg/sidecar/attributes_test.go | 10 +- pkg/sidecar/pod_test.go | 26 ++-- pkg/sidecar/podmutator.go | 4 +- 28 files changed, 162 insertions(+), 178 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index f41ad3e7e..879cfc619 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -11,14 +11,18 @@ linters-settings: suggest-new: true misspell: locale: US + govet: + disable-all: true + enable: + - fieldalignment linters: enable: - goheader - goimports - - maligned - misspell - gosec + - govet - exhaustive - godot - unparam diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index af6ef30a7..d4d00bece 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -162,9 +162,9 @@ type InstrumentationStatus struct { // Instrumentation is the spec for OpenTelemetry instrumentation. type Instrumentation struct { Status InstrumentationStatus `json:"status,omitempty"` - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec InstrumentationSpec `json:"spec,omitempty"` metav1.TypeMeta `json:",inline"` + Spec InstrumentationSpec `json:"spec,omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 89ffb74cf..74dcb6619 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -74,8 +74,8 @@ func TestInstrumentationDefaultingWebhookOtelDotNetTracesEnabledInstruEnvSet(t * func TestInstrumentationValidatingWebhook(t *testing.T) { tests := []struct { name string - inst Instrumentation err string + inst Instrumentation }{ { name: "argument is not a number", diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 4e5f03b88..747736361 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -21,130 +21,106 @@ import ( // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. type OpenTelemetryCollectorSpec struct { - // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. - // +required - Config string `json:"config,omitempty"` - - // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + // Resources to set on the OpenTelemetry Collector pods. // +optional - UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` - + Resources v1.ResourceRequirements `json:"resources,omitempty"` + // NodeSelector to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonset, statefulset, and deployment mode + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Args is the set of arguments to pass to the OpenTelemetry Collector binary // +optional Args map[string]string `json:"args,omitempty"` - // Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling // +optional Replicas *int32 `json:"replicas,omitempty"` - // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 // +optional MinReplicas *int32 `json:"minReplicas,omitempty"` - // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional MaxReplicas *int32 `json:"maxReplicas,omitempty"` - - // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) + // SecurityContext will be set as the container security context. // +optional - ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` + SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` - // Image indicates the container image to use for the OpenTelemetry Collector. + PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` + // PodAnnotations is the set of annotations that will be attached to + // Collector and Target Allocator pods. // +optional - Image string `json:"image,omitempty"` - + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. // +optional TargetAllocator OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"` - // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional Mode Mode `json:"mode,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` - - // SecurityContext will be set as the container security context. + // Image indicates the container image to use for the OpenTelemetry Collector. // +optional - SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` - - PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` - - // HostNetwork indicates if the pod should run in the host networking namespace. + Image string `json:"image,omitempty"` + // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed // +optional - HostNetwork bool `json:"hostNetwork,omitempty"` + UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` - // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. + // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) // +optional - // +listType=atomic - VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` - + ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` + // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + // +required + Config string `json:"config,omitempty"` // VolumeMounts represents the mount points to use in the underlying collector deployment(s) // +optional // +listType=atomic VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` - - // Volumes represents which volumes to use in the underlying collector deployment(s). - // +optional - // +listType=atomic - Volumes []v1.Volume `json:"volumes,omitempty"` - // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be // used to open aditional ports that can't be inferred by the operator, like for custom receivers. // +optional // +listType=atomic Ports []v1.ServicePort `json:"ports,omitempty"` - // ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be // consumed in the config file for the Collector. // +optional Env []v1.EnvVar `json:"env,omitempty"` - // List of sources to populate environment variables on the OpenTelemetry Collector's Pods. // These can then in certain cases be consumed in the config file for the Collector. // +optional EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` - - // Resources to set on the OpenTelemetry Collector pods. + // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. // +optional - Resources v1.ResourceRequirements `json:"resources,omitempty"` - + // +listType=atomic + VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // Toleration to schedule OpenTelemetry Collector pods. // This is only relevant to daemonset, statefulset, and deployment mode // +optional Tolerations []v1.Toleration `json:"tolerations,omitempty"` - - // NodeSelector to schedule OpenTelemetry Collector pods. - // This is only relevant to daemonset, statefulset, and deployment mode + // Volumes represents which volumes to use in the underlying collector deployment(s). // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // PodAnnotations is the set of annotations that will be attached to - // Collector and Target Allocator pods. + // +listType=atomic + Volumes []v1.Volume `json:"volumes,omitempty"` + // HostNetwork indicates if the pod should run in the host networking namespace. // +optional - PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + HostNetwork bool `json:"hostNetwork,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. type OpenTelemetryTargetAllocator struct { + // ServiceAccount indicates the name of an existing service account to use with this instance. + // +optional + ServiceAccount string `json:"serviceAccount,omitempty"` + // Image indicates the container image to use for the OpenTelemetry TargetAllocator. + // +optional + Image string `json:"image,omitempty"` // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. // +optional Enabled bool `json:"enabled,omitempty"` - // PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. // +optional PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` - - // ServiceAccount indicates the name of an existing service account to use with this instance. - // +optional - ServiceAccount string `json:"serviceAccount,omitempty"` - - // Image indicates the container image to use for the OpenTelemetry TargetAllocator. - // +optional - Image string `json:"image,omitempty"` } type OpenTelemetryTargetAllocatorPrometheusCR struct { @@ -156,24 +132,19 @@ type OpenTelemetryTargetAllocatorPrometheusCR struct { // ScaleSubresourceStatus defines the observed state of the OpenTelemetryCollector's // scale subresource. type ScaleSubresourceStatus struct { - // The total number non-terminated pods targeted by this - // OpenTelemetryCollector's deployment or statefulSet. - // +optional - Replicas int32 `json:"replicas,omitempty"` - // The selector used to match the OpenTelemetryCollector's // deployment or statefulSet pods. // +optional Selector string `json:"selector,omitempty"` -} -// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. -type OpenTelemetryCollectorStatus struct { - // Replicas is currently not being set and might be removed in the next version. + // The total number non-terminated pods targeted by this + // OpenTelemetryCollector's deployment or statefulSet. // +optional - // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. Replicas int32 `json:"replicas,omitempty"` +} +// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. +type OpenTelemetryCollectorStatus struct { // Scale is the OpenTelemetryCollector's scale subresource status. // +optional Scale ScaleSubresourceStatus `json:"scale,omitempty"` @@ -187,6 +158,11 @@ type OpenTelemetryCollectorStatus struct { // +listType=atomic // Deprecated: use Kubernetes events instead. Messages []string `json:"messages,omitempty"` + + // Replicas is currently not being set and might be removed in the next version. + // +optional + // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. + Replicas int32 `json:"replicas,omitempty"` } // +kubebuilder:object:root=true diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 5c5f799c5..7854514df 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -37,28 +37,28 @@ import ( // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. type OpenTelemetryCollectorReconciler struct { client.Client - log logr.Logger + recorder record.EventRecorder scheme *runtime.Scheme - config config.Config + log logr.Logger tasks []Task - recorder record.EventRecorder + config config.Config } // Task represents a reconciliation task to be executed by the reconciler. type Task struct { - Name string Do func(context.Context, reconcile.Params) error + Name string BailOnError bool } // Params is the set of options to build a new openTelemetryCollectorReconciler. type Params struct { client.Client - Log logr.Logger + Recorder record.EventRecorder Scheme *runtime.Scheme - Config config.Config + Log logr.Logger Tasks []Task - Recorder record.EventRecorder + Config config.Config } // NewReconciler creates a new reconciler for OpenTelemetryCollector objects. @@ -66,43 +66,43 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { if len(p.Tasks) == 0 { p.Tasks = []Task{ { - "config maps", reconcile.ConfigMaps, + "config maps", true, }, { - "service accounts", reconcile.ServiceAccounts, + "service accounts", true, }, { - "services", reconcile.Services, + "services", true, }, { - "deployments", reconcile.Deployments, + "deployments", true, }, { - "horizontal pod autoscalers", reconcile.HorizontalPodAutoscalers, + "horizontal pod autoscalers", true, }, { - "daemon sets", reconcile.DaemonSets, + "daemon sets", true, }, { - "stateful sets", reconcile.StatefulSets, + "stateful sets", true, }, { - "opentelemetry", reconcile.Self, + "opentelemetry", true, }, } diff --git a/internal/config/main.go b/internal/config/main.go index f2821e883..f20af554b 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -34,25 +34,21 @@ const ( // Config holds the static configuration for this operator. type Config struct { - // Registers a callback, to be called once a configuration change happens - OnChange func() error - - logger logr.Logger - autoDetect autodetect.AutoDetect - autoDetectFrequency time.Duration - onChange []func() error - - // config state + autoDetect autodetect.AutoDetect + OnChange func() error + logger logr.Logger + targetAllocatorImage string + autoInstrumentationPythonImage string collectorImage string collectorConfigMapEntry string - targetAllocatorImage string + autoInstrumentationDotNetImage string targetAllocatorConfigMapEntry string - platform platform.Platform - autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string - autoInstrumentationPythonImage string - autoInstrumentationDotNetImage string + autoInstrumentationJavaImage string + onChange []func() error labelsFilter []string + platform platform.Platform + autoDetectFrequency time.Duration } // New constructs a new configuration based on the given options. diff --git a/internal/config/options.go b/internal/config/options.go index c71e2e27d..beef2b4b8 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -31,20 +31,20 @@ type Option func(c *options) type options struct { autoDetect autodetect.AutoDetect - autoDetectFrequency time.Duration - targetAllocatorImage string - collectorImage string + version version.Version + logger logr.Logger + autoInstrumentationDotNetImage string autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string - autoInstrumentationDotNetImage string + collectorImage string collectorConfigMapEntry string targetAllocatorConfigMapEntry string - logger logr.Logger + targetAllocatorImage string onChange []func() error - platform platform.Platform - version version.Version labelsFilter []string + platform platform.Platform + autoDetectFrequency time.Duration } func WithAutoDetect(a autodetect.AutoDetect) Option { diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go index 948717f5a..4b2614ecc 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhookhandler/webhookhandler.go @@ -45,11 +45,11 @@ type WebhookHandler interface { // the implementation. type podSidecarInjector struct { - config config.Config - logger logr.Logger client client.Client decoder *admission.Decoder + logger logr.Logger podMutators []PodMutator + config config.Config } // PodMutator mutates a pod. diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index 97b37b7cb..16b3543f4 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -400,8 +400,8 @@ func TestFailOnInvalidRequest(t *testing.T) { // we use a typical Go table-test instad of Ginkgo's DescribeTable because we need to // do an assertion during the declaration of the table params, which isn't supported (yet?) for _, tt := range []struct { - name string req admission.Request + name string expected int32 allowed bool }{ diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 10f8109c5..9d518e6b9 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -146,19 +146,19 @@ service: func TestNoPortsParsed(t *testing.T) { for _, tt := range []struct { + expected error desc string configStr string - expected error }{ { - "empty", - "", - adapters.ErrNoReceivers, + expected: adapters.ErrNoReceivers, + desc: "empty", + configStr: "", }, { - "not a map", - "receivers: some-string", - adapters.ErrReceiversNotAMap, + expected: adapters.ErrReceiversNotAMap, + desc: "not a map", + configStr: "receivers: some-string", }, } { t.Run(tt.desc, func(t *testing.T) { diff --git a/pkg/collector/adapters/config_to_probe_test.go b/pkg/collector/adapters/config_to_probe_test.go index 65a6a609b..6a2ae3398 100644 --- a/pkg/collector/adapters/config_to_probe_test.go +++ b/pkg/collector/adapters/config_to_probe_test.go @@ -25,8 +25,8 @@ func TestConfigToProbeShouldCreateProbeFor(t *testing.T) { tests := []struct { desc string config string - expectedPort int32 expectedPath string + expectedPort int32 }{ { desc: "SimpleHappyPath", @@ -120,9 +120,9 @@ service: func TestConfigToProbeShouldErrorIf(t *testing.T) { tests := []struct { + expectedErr error desc string config string - expectedErr error }{ { desc: "NoHealthCheckExtension", diff --git a/pkg/collector/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go index 587a08fec..21b4e2ce5 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -25,13 +25,13 @@ var _ ReceiverParser = &GenericReceiver{} // GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly. type GenericReceiver struct { + config map[interface{}]interface{} + defaultAppProtocol *string logger logr.Logger name string - config map[interface{}]interface{} - defaultPort int32 defaultProtocol corev1.Protocol - defaultAppProtocol *string parserName string + defaultPort int32 } // NOTE: Operator will sync with only receivers that aren't scrapers. Operator sync up receivers diff --git a/pkg/collector/parser/receiver_generic_test.go b/pkg/collector/parser/receiver_generic_test.go index 7c0766dd6..15fd90359 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/pkg/collector/parser/receiver_generic_test.go @@ -59,27 +59,27 @@ func TestFailedToParseEndpoint(t *testing.T) { func TestDownstreamParsers(t *testing.T) { for _, tt := range []struct { + builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser desc string receiverName string parserName string defaultPort int - builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser }{ - {"zipkin", "zipkin", "__zipkin", 9411, parser.NewZipkinReceiverParser}, - {"opencensus", "opencensus", "__opencensus", 55678, parser.NewOpenCensusReceiverParser}, + {parser.NewZipkinReceiverParser, "zipkin", "zipkin", "__zipkin", 9411}, + {parser.NewOpenCensusReceiverParser, "opencensus", "opencensus", "__opencensus", 55678}, // contrib receivers - {"carbon", "carbon", "__carbon", 2003, parser.NewCarbonReceiverParser}, - {"collectd", "collectd", "__collectd", 8081, parser.NewCollectdReceiverParser}, - {"sapm", "sapm", "__sapm", 7276, parser.NewSAPMReceiverParser}, - {"signalfx", "signalfx", "__signalfx", 9943, parser.NewSignalFxReceiverParser}, - {"wavefront", "wavefront", "__wavefront", 2003, parser.NewWavefrontReceiverParser}, - {"zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410, parser.NewZipkinScribeReceiverParser}, - {"fluentforward", "fluentforward", "__fluentforward", 8006, parser.NewFluentForwardReceiverParser}, - {"statsd", "statsd", "__statsd", 8125, parser.NewStatsdReceiverParser}, - {"influxdb", "influxdb", "__influxdb", 8086, parser.NewInfluxdbReceiverParser}, - {"splunk-hec", "splunk-hec", "__splunk_hec", 8088, parser.NewSplunkHecReceiverParser}, - {"awsxray", "awsxray", "__awsxray", 2000, parser.NewAWSXrayReceiverParser}, + {parser.NewCarbonReceiverParser, "carbon", "carbon", "__carbon", 2003}, + {parser.NewCollectdReceiverParser, "collectd", "collectd", "__collectd", 8081}, + {parser.NewSAPMReceiverParser, "sapm", "sapm", "__sapm", 7276}, + {parser.NewSignalFxReceiverParser, "signalfx", "signalfx", "__signalfx", 9943}, + {parser.NewWavefrontReceiverParser, "wavefront", "wavefront", "__wavefront", 2003}, + {parser.NewZipkinScribeReceiverParser, "zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410}, + {parser.NewFluentForwardReceiverParser, "fluentforward", "fluentforward", "__fluentforward", 8006}, + {parser.NewStatsdReceiverParser, "statsd", "statsd", "__statsd", 8125}, + {parser.NewInfluxdbReceiverParser, "influxdb", "influxdb", "__influxdb", 8086}, + {parser.NewSplunkHecReceiverParser, "splunk-hec", "splunk-hec", "__splunk_hec", 8088}, + {parser.NewAWSXrayReceiverParser, "awsxray", "awsxray", "__awsxray", 2000}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { diff --git a/pkg/collector/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go index 790782ab7..428938c31 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -34,9 +34,9 @@ const ( // JaegerReceiverParser parses the configuration for Jaeger-specific receivers. type JaegerReceiverParser struct { + config map[interface{}]interface{} logger logr.Logger name string - config map[interface{}]interface{} } // NewJaegerReceiverParser builds a new parser for Jaeger receivers. @@ -61,9 +61,9 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { for _, protocol := range []struct { name string - defaultPort int32 transportProtocol corev1.Protocol appProtocol string + defaultPort int32 }{ { name: "grpc", diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 92897a92c..827c988c4 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -84,9 +84,9 @@ func TestJaegerExposeDefaultPorts(t *testing.T) { }) expectedResults := map[string]struct { + transportProtocol corev1.Protocol portNumber int32 seen bool - transportProtocol corev1.Protocol }{ "jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP}, "jaeger-thrift-http": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP}, diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index a637bf810..2fa208fe9 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -39,9 +39,9 @@ var ( // OTLPReceiverParser parses the configuration for OTLP receivers. type OTLPReceiverParser struct { + config map[interface{}]interface{} logger logr.Logger name string - config map[interface{}]interface{} } // NewOTLPReceiverParser builds a new parser for OTLP receivers. diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index 47f741ea8..2566f7a7b 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -29,13 +29,13 @@ func TestReceiverPortNames(t *testing.T) { for _, tt := range []struct { desc string candidate string - port int expected string + port int }{ - {"regular case", "my-receiver", 123, "my-receiver"}, - {"name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", 123, "port-123"}, - {"name with invalid chars", "my-🦄-receiver", 123, "port-123"}, - {"name starting with invalid char", "-my-receiver", 123, "port-123"}, + {"regular case", "my-receiver", "my-receiver", 123}, + {"name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", "port-123", 123}, + {"name with invalid chars", "my-🦄-receiver", "port-123", 123}, + {"name starting with invalid char", "-my-receiver", "port-123", 123}, } { t.Run(tt.desc, func(t *testing.T) { assert.Equal(t, tt.expected, portName(tt.candidate, int32(tt.port))) diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go index c38c167ab..e704dc37d 100644 --- a/pkg/collector/reconcile/params.go +++ b/pkg/collector/reconcile/params.go @@ -26,10 +26,10 @@ import ( // Params holds the reconciliation-specific parameters. type Params struct { - Config config.Config Client client.Client - Instance v1alpha1.OpenTelemetryCollector - Log logr.Logger - Scheme *runtime.Scheme Recorder record.EventRecorder + Scheme *runtime.Scheme + Log logr.Logger + Instance v1alpha1.OpenTelemetryCollector + Config config.Config } diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index f7c2da97b..93123a7f0 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -30,10 +30,10 @@ import ( ) type VersionUpgrade struct { - Log logr.Logger - Version version.Version Client client.Client Recorder record.EventRecorder + Version version.Version + Log logr.Logger } const RecordBufferSize int = 10 diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index f78e824e4..22359494a 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -23,8 +23,8 @@ import ( type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) type otelcolVersion struct { - semver.Version upgrade upgradeFunc + semver.Version } var ( diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 9d6c369db..c18c66132 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -34,9 +34,9 @@ var ( ) type instPodMutator struct { - Logger logr.Logger Client client.Client sdkInjector *sdkInjector + Logger logr.Logger } type languageInstrumentations struct { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 92aa9945d..f44861f2b 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -34,11 +34,11 @@ func TestMutatePod(t *testing.T) { tests := []struct { name string - ns corev1.Namespace + err string pod corev1.Pod - inst v1alpha1.Instrumentation expected corev1.Pod - err string + inst v1alpha1.Instrumentation + ns corev1.Namespace }{ { name: "javaagent injection, true", diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 037806395..1c0c31fc5 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -42,8 +42,8 @@ const ( // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. type sdkInjector struct { - logger logr.Logger client client.Client + logger logr.Logger } func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod, containerName string) corev1.Pod { diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 65e7b6f77..1dc9c7f54 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -26,12 +26,12 @@ import ( ) type InstrumentationUpgrade struct { + Client client.Client Logger logr.Logger DefaultAutoInstJava string DefaultAutoInstNodeJS string DefaultAutoInstPython string DefaultAutoInstDotNet string - Client client.Client } //+kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch diff --git a/pkg/naming/triming_test.go b/pkg/naming/triming_test.go index e1396d478..7d6a0557a 100644 --- a/pkg/naming/triming_test.go +++ b/pkg/naming/triming_test.go @@ -26,10 +26,10 @@ import ( func TestTruncate(t *testing.T) { for _, tt := range []struct { format string - max int - values []interface{} expected string cap string + values []interface{} + max int }{ { format: "%s-collector", diff --git a/pkg/sidecar/attributes_test.go b/pkg/sidecar/attributes_test.go index b8dc62f58..b636075f8 100644 --- a/pkg/sidecar/attributes_test.go +++ b/pkg/sidecar/attributes_test.go @@ -149,11 +149,12 @@ func TestGetAttributesEnvWithPodReferences(t *testing.T) { func TestHasResourceAttributeEnvVar(t *testing.T) { for _, tt := range []struct { desc string - expected bool env []corev1.EnvVar + expected bool }{ { - "has-attributes", true, []corev1.EnvVar{ + "has-attributes", + []corev1.EnvVar{ { Name: resourceAttributesEnvName, Value: fmt.Sprintf("%s=my-deployment,%s=uuid-dep,%s=my-ns,%s=$(%s),%s=$(%s),%s=$(%s),%s=my-replicaset,%s=uuid-replicaset", @@ -171,15 +172,18 @@ func TestHasResourceAttributeEnvVar(t *testing.T) { ), }, }, + true, }, { - "does-not-have-attributes", false, []corev1.EnvVar{ + "does-not-have-attributes", + []corev1.EnvVar{ { Name: "other_env", Value: "other_value", }, }, + false, }, } { t.Run(tt.desc, func(t *testing.T) { diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 43dec668c..1982e5315 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -122,23 +122,27 @@ func TestRemoveNonExistingSidecar(t *testing.T) { func TestExistsIn(t *testing.T) { for _, tt := range []struct { desc string - expected bool pod corev1.Pod + expected bool }{ - {"has-sidecar", true, corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - {Name: "my-app"}, - {Name: naming.Container()}, + {"has-sidecar", + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {Name: "my-app"}, + {Name: naming.Container()}, + }, }, }, - }}, + true}, - {"does-not-have-sidecar", false, corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{}, + {"does-not-have-sidecar", + corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{}, + }, }, - }}, + false}, } { t.Run(tt.desc, func(t *testing.T) { assert.Equal(t, tt.expected, existsIn(tt.pod)) diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index f7d0f6a71..55743db2e 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -38,9 +38,9 @@ var ( ) type sidecarPodMutator struct { - config config.Config - logger logr.Logger client client.Client + logger logr.Logger + config config.Config } var _ webhookhandler.PodMutator = (*sidecarPodMutator)(nil) From e341f288d2000ebb030b06654f5763c1ec3855f8 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:17:26 +0200 Subject: [PATCH 0552/1234] chore(nodejs): update to 0.31.0 (#955) * chore(nodejs): bump deps, switch exporter to OTLP HTTP proto * chore(nodejs): switch exporter to OTLP HTTP json * chore(instrumentation): get back to grpc exporter --- autoinstrumentation/nodejs/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index dd5c9ddf9..157dcc87a 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,9 +14,9 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.0.4", - "@opentelemetry/auto-instrumentations-node": "0.27.4", - "@opentelemetry/exporter-trace-otlp-grpc": "0.27.0", - "@opentelemetry/sdk-node": "0.27.0" + "@opentelemetry/api": "1.1.0", + "@opentelemetry/auto-instrumentations-node": "0.31.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.31.0", + "@opentelemetry/sdk-node": "0.31.0" } } From e765bfa55ba361ac45314ba65b5486b480a56711 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Aug 2022 10:19:31 +0200 Subject: [PATCH 0553/1234] Bump go.opentelemetry.io/otel from 1.7.0 to 1.9.0 (#1019) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.7.0 to 1.9.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.7.0...v1.9.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 15 ++++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 5f2f4a944..2982d7c16 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.0 - go.opentelemetry.io/otel v1.7.0 + go.opentelemetry.io/otel v1.9.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.3 k8s.io/apimachinery v0.24.3 @@ -63,7 +63,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.7 // indirect + github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect @@ -104,7 +104,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.7.0 // indirect + go.opentelemetry.io/otel/trace v1.9.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index a0cd834cb..d139f329e 100644 --- a/go.sum +++ b/go.sum @@ -326,10 +326,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -535,8 +533,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -1108,8 +1106,8 @@ go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUz go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= -go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= +go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= +go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= @@ -1117,8 +1115,8 @@ go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= -go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= +go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1517,7 +1515,6 @@ golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= From d91ecc283e7c910e2d14c5174a39bb2fac7cd582 Mon Sep 17 00:00:00 2001 From: Ian McNally Date: Wed, 3 Aug 2022 04:19:46 -0400 Subject: [PATCH 0554/1234] chore(operator): update python inst to 0.32b0 (#1012) Updates python auto instrumentation to it's current version of 0.32b0 (as seen in autoinstrumentation/python/requirements.txt) --- versions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions.txt b/versions.txt index 2c8b4553b..86552e2f0 100644 --- a/versions.txt +++ b/versions.txt @@ -20,8 +20,8 @@ autoinstrumentation-nodejs=0.27.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.30b1 +autoinstrumentation-python=0.32b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.2.0-beta.1 \ No newline at end of file +autoinstrumentation-dotnet=0.2.0-beta.1 From fc3cae52284edb5793e9e908a449f4303cec85d7 Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Wed, 3 Aug 2022 14:25:18 +0200 Subject: [PATCH 0555/1234] Sort order of ports returned to fix flaky tests (#1003) * Sort order of ports returned to fix flaky tests Signed-off-by: Kevin Earls * Verify type of receiver name Signed-off-by: Kevin Earls * Sort ports too before returning Signed-off-by: Kevin Earls * Add unit test Signed-off-by: Kevin Earls * respond to comments Signed-off-by: Kevin Earls * fix nits Signed-off-by: Kevin Earls --- pkg/collector/adapters/config_to_ports.go | 6 ++ .../adapters/config_to_ports_test.go | 72 +++++-------------- 2 files changed, 24 insertions(+), 54 deletions(-) diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go index de1dc2ab0..c897bec83 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -16,6 +16,7 @@ package adapters import ( "errors" + "sort" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -89,5 +90,10 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ ports = append(ports, rcvrPorts...) } } + + sort.Slice(ports, func(i, j int) bool { + return ports[i].Name < ports[j].Name + }) + return ports, nil } diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 9d518e6b9..84c10e3d8 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" @@ -87,61 +88,24 @@ service: assert.Len(t, ports, 11) // verify - expectedPorts := map[int32]bool{} - expectedPorts[int32(12345)] = false - expectedPorts[int32(12346)] = false - expectedPorts[int32(14250)] = false - expectedPorts[int32(6831)] = false - expectedPorts[int32(6833)] = false - expectedPorts[int32(15268)] = false - expectedPorts[int32(4318)] = false - expectedPorts[int32(55681)] = false - expectedPorts[int32(55555)] = false - expectedPorts[int32(9411)] = false + httpAppProtocol := "http" + grpcAppProtocol := "grpc" + targetPortZero := intstr.IntOrString{Type: 0, IntVal: 0, StrVal: ""} + targetPort4317 := intstr.IntOrString{Type: 0, IntVal: 4317, StrVal: ""} + targetPort4318 := intstr.IntOrString{Type: 0, IntVal: 4318, StrVal: ""} - expectedNames := map[string]bool{} - expectedNames["examplereceiver"] = false - expectedNames["examplereceiver-settings"] = false - expectedNames["jaeger-grpc"] = false - expectedNames["jaeger-thrift-compact"] = false - expectedNames["jaeger-thrift-binary"] = false - expectedNames["jaeger-custom-thrift-http"] = false - expectedNames["otlp-grpc"] = false - expectedNames["otlp-http"] = false - expectedNames["otlp-http-legacy"] = false - expectedNames["otlp-2-grpc"] = false - expectedNames["zipkin"] = false - - expectedAppProtocols := map[string]string{} - expectedAppProtocols["otlp-grpc"] = "grpc" - expectedAppProtocols["otlp-http"] = "http" - expectedAppProtocols["otlp-http-legacy"] = "http" - expectedAppProtocols["jaeger-custom-thrift-http"] = "http" - expectedAppProtocols["jaeger-grpc"] = "grpc" - expectedAppProtocols["otlp-2-grpc"] = "grpc" - expectedAppProtocols["zipkin"] = "http" - - // make sure we only have the ports in the set - for _, port := range ports { - assert.NotNil(t, expectedPorts[port.Port]) - assert.NotNil(t, expectedNames[port.Name]) - expectedPorts[port.Port] = true - expectedNames[port.Name] = true - - if appProtocol, ok := expectedAppProtocols[port.Name]; ok { - assert.Equal(t, appProtocol, *port.AppProtocol) - } - } - - // and make sure all the ports from the set are there - for _, val := range expectedPorts { - assert.True(t, val) - } - - // make sure we only have the ports names in the set - for _, val := range expectedNames { - assert.True(t, val) - } + assert.Len(t, ports, 11) + assert.Equal(t, corev1.ServicePort{Name: "examplereceiver", Port: int32(12345)}, ports[0]) + assert.Equal(t, corev1.ServicePort{Name: "examplereceiver-settings", Port: int32(12346)}, ports[1]) + assert.Equal(t, corev1.ServicePort{Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: int32(15268), TargetPort: targetPortZero}, ports[2]) + assert.Equal(t, corev1.ServicePort{Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: int32(14250)}, ports[3]) + assert.Equal(t, corev1.ServicePort{Name: "jaeger-thrift-binary", Protocol: "UDP", Port: int32(6833)}, ports[4]) + assert.Equal(t, corev1.ServicePort{Name: "jaeger-thrift-compact", Protocol: "UDP", Port: int32(6831)}, ports[5]) + assert.Equal(t, corev1.ServicePort{Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: int32(55555)}, ports[6]) + assert.Equal(t, corev1.ServicePort{Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: int32(4317), TargetPort: targetPort4317}, ports[7]) + assert.Equal(t, corev1.ServicePort{Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: int32(4318), TargetPort: targetPort4318}, ports[8]) + assert.Equal(t, corev1.ServicePort{Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: int32(55681), TargetPort: targetPort4318}, ports[9]) + assert.Equal(t, corev1.ServicePort{Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: int32(9411)}, ports[10]) } func TestNoPortsParsed(t *testing.T) { From 64870e1cd6e9c66bbf1cd8ad2c692c0378d3a438 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Thu, 4 Aug 2022 14:05:25 +0200 Subject: [PATCH 0556/1234] chore(nodejs): update versions.txt (#1015) --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index 86552e2f0..29f42aadd 100644 --- a/versions.txt +++ b/versions.txt @@ -16,7 +16,7 @@ autoinstrumentation-java=1.11.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.27.0 +autoinstrumentation-nodejs=0.31.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt From 4eb4054e9ea9b1f2f73e81d5e558da3ff63ab8a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 13:48:14 +0200 Subject: [PATCH 0557/1234] Bump docker/build-push-action from 3.1.0 to 3.1.1 (#1024) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3.1.0...v3.1.1) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 9b6e23556..adf438d2e 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index da173e8c5..93c7eda52 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index fdc4c0261..f734dc95c 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index b4b1bd442..38493adc8 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 6b9c77926..d31b0878e 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 3d5b8d632..ccb046c70 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -49,7 +49,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.0 + uses: docker/build-push-action@v3.1.1 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From 07b9f22df8a87852464bf4877d793afcddae37c3 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 10 Aug 2022 14:18:48 -0400 Subject: [PATCH 0558/1234] Update the target allocator on any manifest change (#1027) * Update the target allocator on any manifest change * Change test to check for prometheusCR change validation * Fix test * Updated test to be more flexible for the future --- pkg/collector/parser/receiver.go | 4 ++ pkg/collector/reconcile/deployment.go | 6 +-- pkg/collector/reconcile/deployment_test.go | 46 +++++++++++----------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index 156a6928b..ef950c89b 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -107,6 +107,10 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in case name == "kubeletstats": return nil + // ignore prometheus receiver as it has no listening endpoint + case name == "prometheus": + return nil + default: endpoint = getAddressFromConfig(logger, name, endpointKey, config) } diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 99aa3a5a3..3cf567ce2 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -85,11 +85,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.Labels = map[string]string{} } - if desired.Labels["app.kubernetes.io/component"] == "opentelemetry-targetallocator" { - updated.Spec.Template.Spec.Containers[0].Image = desired.Spec.Template.Spec.Containers[0].Image - } else { - updated.Spec = desired.Spec - } + updated.Spec = desired.Spec updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences for k, v := range desired.ObjectMeta.Annotations { diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index f1e2389e2..386790075 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -102,6 +102,29 @@ func TestExpectedDeployments(t *testing.T) { assert.Len(t, expected, 0) }) + t.Run("should update target allocator deployment when the prometheusCR is updated", func(t *testing.T) { + ctx := context.Background() + createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) + orgUID := expectedTADeploy.OwnerReferences[0].UID + + updatedParam, err := newParams(expectedTADeploy.Spec.Template.Spec.Containers[0].Image, "") + assert.NoError(t, err) + updatedParam.Instance.Spec.TargetAllocator.PrometheusCR.Enabled = true + updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) + + err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) + assert.ElementsMatch(t, actual.Spec.Template.Spec.Containers[0].Args, []string{"--enable-prometheus-cr-watcher"}) + assert.Equal(t, int32(1), *actual.Spec.Replicas) + }) + t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { replicas, maxReplicas := int32(2), int32(10) param := Params{ @@ -168,29 +191,6 @@ func TestExpectedDeployments(t *testing.T) { assert.Equal(t, int32(2), *actual.Spec.Replicas) }) - t.Run("should not update target allocator deployment when the container image is not updated", func(t *testing.T) { - ctx := context.Background() - createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) - orgUID := expectedTADeploy.OwnerReferences[0].UID - - updatedParam, err := newParams("test/test-img", "") - assert.NoError(t, err) - updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, param.Instance) - *updatedDeploy.Spec.Replicas = int32(3) - - err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) - assert.Equal(t, expectedTADeploy.Spec.Template.Spec.Containers[0].Image, actual.Spec.Template.Spec.Containers[0].Image) - assert.Equal(t, int32(1), *actual.Spec.Replicas) - }) - t.Run("should update target allocator deployment when the container image is updated", func(t *testing.T) { ctx := context.Background() createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) From 388a7c9ea53fd63a0bf1bc46771e84910a86840b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 15 Aug 2022 14:53:57 -0400 Subject: [PATCH 0559/1234] Instrument TA with prometheus (#1030) * Instrument TA with prometheus * Added metrics for targets per collector * Remove auth line * Updated based on feedback * Small exporting change --- cmd/otel-allocator/allocation/allocator.go | 23 ++++++++++++++++++ cmd/otel-allocator/collector/collector.go | 9 +++++++- cmd/otel-allocator/discovery/discovery.go | 12 ++++++++++ cmd/otel-allocator/main.go | 27 +++++++++++++++++++++- cmd/otel-allocator/watcher/main.go | 11 +++++++++ 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go index 4b155632e..93c41b0a4 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/allocation/allocator.go @@ -6,9 +6,26 @@ import ( "sync" "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" ) +var ( + collectorsAllocatable = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_collectors_allocatable", + Help: "Number of collectors the allocator is able to allocate to.", + }) + targetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_targets_per_collector", + Help: "The number of targets for each collector.", + }, []string{"collector_name"}) + timeToAssign = promauto.NewHistogramVec(prometheus.HistogramOpts{ + Name: "opentelemetry_allocator_time_to_allocate", + Help: "The time it takes to allocate", + }, []string{"method"}) +) + /* Load balancer will serve on an HTTP server exposing /jobs//targets <- these are configured using least connection Load balancer will need information about the collectors in order to set the URLs @@ -96,12 +113,15 @@ func (allocator *Allocator) SetCollectors(collectors []string) { for _, i := range collectors { allocator.collectors[i] = &collector{Name: i, NumTargets: 0} } + collectorsAllocatable.Set(float64(len(collectors))) } // Reallocate needs to be called to process the new target updates. // Until Reallocate is called, old targets will be served. func (allocator *Allocator) AllocateTargets() { allocator.m.Lock() + timer := prometheus.NewTimer(timeToAssign.WithLabelValues("AllocateTargets")) + defer timer.ObserveDuration() defer allocator.m.Unlock() allocator.removeOutdatedTargets() allocator.processWaitingTargets() @@ -110,6 +130,8 @@ func (allocator *Allocator) AllocateTargets() { // ReallocateCollectors reallocates the targets among the new collector instances func (allocator *Allocator) ReallocateCollectors() { allocator.m.Lock() + timer := prometheus.NewTimer(timeToAssign.WithLabelValues("ReallocateCollectors")) + defer timer.ObserveDuration() defer allocator.m.Unlock() allocator.TargetItems = make(map[string]*TargetItem) allocator.processWaitingTargets() @@ -139,6 +161,7 @@ func (allocator *Allocator) processWaitingTargets() { Collector: col, } col.NumTargets++ + targetsPerCollector.WithLabelValues(col.Name).Set(float64(col.NumTargets)) allocator.TargetItems[v.JobName+v.TargetURL] = &targetItem } } diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index 0528ee427..933b61bbe 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -7,6 +7,8 @@ import ( "time" "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -20,7 +22,11 @@ const ( ) var ( - ns = os.Getenv("OTELCOL_NAMESPACE") + ns = os.Getenv("OTELCOL_NAMESPACE") + collectors = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_collectors_discovered", + Help: "Number of collectors discovered.", + }) ) type Client struct { @@ -89,6 +95,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]bool, fn func(collectors []string)) string { log := k.log.WithValues("component", "opentelemetry-targetallocator") for { + collectors.Set(float64(len(collectorMap))) select { case <-k.close: return "kubernetes client closed" diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 050aa4a45..1714f9265 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -7,11 +7,20 @@ import ( "github.com/go-logr/logr" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" ) +var ( + targetsDiscovered = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_targets", + Help: "Number of targets discovered.", + }, []string{"job_name"}) +) + type Manager struct { log logr.Logger manager *discovery.Manager @@ -63,8 +72,10 @@ func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { targets := []allocation.TargetItem{} for jobName, tgs := range tsets { + var count float64 = 0 for _, tg := range tgs { for _, t := range tg.Targets { + count++ targets = append(targets, allocation.TargetItem{ JobName: jobName, TargetURL: string(t[model.AddressLabel]), @@ -72,6 +83,7 @@ func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { }) } } + targetsDiscovered.WithLabelValues(jobName).Set(count) } fn(targets) } diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 7978034af..c1806c2e6 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -17,11 +17,22 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/client_golang/prometheus/promhttp" ctrl "sigs.k8s.io/controller-runtime" ) var ( - setupLog = ctrl.Log.WithName("setup") + setupLog = ctrl.Log.WithName("setup") + httpDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ + Name: "opentelemetry_allocator_http_duration_seconds", + Help: "Duration of received HTTP requests.", + }, []string{"path"}) + eventsMetric = promauto.NewCounterVec(prometheus.CounterOpts{ + Name: "opentelemetry_allocator_events", + Help: "Number of events in the channel.", + }, []string{"source"}) ) func main() { @@ -75,6 +86,7 @@ func main() { } os.Exit(0) case event := <-watcher.Events: + eventsMetric.WithLabelValues(event.Source.String()).Inc() switch event.Source { case allocatorWatcher.EventSourceConfigMap: setupLog.Info("ConfigMap updated!") @@ -129,8 +141,10 @@ func newServer(log logr.Logger, allocator *allocation.Allocator, discoveryManage k8sClient: k8sclient, } router := mux.NewRouter().UseEncodedPath() + router.Use(s.PrometheusMiddleware) router.HandleFunc("/jobs", s.JobHandler).Methods("GET") router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") + router.Path("/metrics").Handler(promhttp.Handler()) s.server = &http.Server{Addr: *cliConf.ListenAddr, Handler: router} return s, nil } @@ -177,6 +191,17 @@ func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { jsonHandler(w, r, displayData) } +// PrometheusMiddleware implements mux.MiddlewareFunc. +func (s *server) PrometheusMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + route := mux.CurrentRoute(r) + path, _ := route.GetPathTemplate() + timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) + next.ServeHTTP(w, r) + timer.ObserveDuration() + }) +} + func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { q := r.URL.Query()["collector_id"] diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go index 534d8fc7e..dd09ca1b0 100644 --- a/cmd/otel-allocator/watcher/main.go +++ b/cmd/otel-allocator/watcher/main.go @@ -33,6 +33,17 @@ const ( EventSourcePrometheusCR ) +var ( + eventSourceToString = map[EventSource]string{ + EventSourceConfigMap: "EventSourceConfigMap", + EventSourcePrometheusCR: "EventSourcePrometheusCR", + } +) + +func (e EventSource) String() string { + return eventSourceToString[e] +} + func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator *allocation.Allocator) (*Manager, error) { watcher := Manager{ allocator: allocator, From 5021ca7a7e6525373b16b259046480edb5b6def1 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 18 Aug 2022 03:23:24 -0400 Subject: [PATCH 0560/1234] Resolve bug where TA doesn't allocate all targets (#1039) * Resolve bug where TA doesn't allocate all targets * Cleanup cleanup --- cmd/otel-allocator/allocation/allocator.go | 28 +++++---- .../allocation/allocator_test.go | 57 +++++++++++++++---- cmd/otel-allocator/allocation/http.go | 4 +- cmd/otel-allocator/main.go | 4 +- 4 files changed, 68 insertions(+), 25 deletions(-) diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go index 93c41b0a4..c59e3fb50 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/allocation/allocator.go @@ -40,6 +40,10 @@ type TargetItem struct { Collector *collector } +func (t TargetItem) hash() string { + return t.JobName + t.TargetURL + t.Label.Fingerprint().String() +} + // Create a struct that holds collector - and jobs for that collector // This struct will be parsed into endpoint with collector and jobs info @@ -59,11 +63,15 @@ type Allocator struct { collectors map[string]*collector // all current collectors - TargetItems map[string]*TargetItem + targetItems map[string]*TargetItem log logr.Logger } +func (allocator *Allocator) TargetItems() map[string]*TargetItem { + return allocator.targetItems +} + // findNextCollector finds the next collector with less number of targets. func (allocator *Allocator) findNextCollector() *collector { var col *collector @@ -91,7 +99,7 @@ func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { allocator.targetsWaiting = make(map[string]TargetItem, len(targets)) // Set new data for _, i := range targets { - allocator.targetsWaiting[i.JobName+i.TargetURL] = i + allocator.targetsWaiting[i.hash()] = i } } @@ -133,16 +141,16 @@ func (allocator *Allocator) ReallocateCollectors() { timer := prometheus.NewTimer(timeToAssign.WithLabelValues("ReallocateCollectors")) defer timer.ObserveDuration() defer allocator.m.Unlock() - allocator.TargetItems = make(map[string]*TargetItem) + allocator.targetItems = make(map[string]*TargetItem) allocator.processWaitingTargets() } // removeOutdatedTargets removes targets that are no longer available. func (allocator *Allocator) removeOutdatedTargets() { - for k := range allocator.TargetItems { + for k := range allocator.targetItems { if _, ok := allocator.targetsWaiting[k]; !ok { - allocator.collectors[allocator.TargetItems[k].Collector.Name].NumTargets-- - delete(allocator.TargetItems, k) + allocator.collectors[allocator.targetItems[k].Collector.Name].NumTargets-- + delete(allocator.targetItems, k) } } } @@ -150,9 +158,9 @@ func (allocator *Allocator) removeOutdatedTargets() { // processWaitingTargets processes the newly set targets. func (allocator *Allocator) processWaitingTargets() { for k, v := range allocator.targetsWaiting { - if _, ok := allocator.TargetItems[k]; !ok { + if _, ok := allocator.targetItems[k]; !ok { col := allocator.findNextCollector() - allocator.TargetItems[k] = &v + allocator.targetItems[k] = &v targetItem := TargetItem{ JobName: v.JobName, Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(v.JobName))}, @@ -162,7 +170,7 @@ func (allocator *Allocator) processWaitingTargets() { } col.NumTargets++ targetsPerCollector.WithLabelValues(col.Name).Set(float64(col.NumTargets)) - allocator.TargetItems[v.JobName+v.TargetURL] = &targetItem + allocator.targetItems[v.hash()] = &targetItem } } } @@ -172,6 +180,6 @@ func NewAllocator(log logr.Logger) *Allocator { log: log, targetsWaiting: make(map[string]TargetItem), collectors: make(map[string]*collector), - TargetItems: make(map[string]*TargetItem), + targetItems: make(map[string]*TargetItem), } } diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go index 893422a3b..596ff3b62 100644 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ b/cmd/otel-allocator/allocation/allocator_test.go @@ -45,11 +45,12 @@ func TestAddingAndRemovingTargets(t *testing.T) { cols := []string{"col-1", "col-2", "col-3"} s.SetCollectors(cols) + labels := model.LabelSet{} initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} var targetList []TargetItem for _, i := range initTargets { - targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) } // test that targets and collectors are added properly @@ -58,13 +59,13 @@ func TestAddingAndRemovingTargets(t *testing.T) { // verify expectedTargetLen := len(initTargets) - assert.Len(t, s.TargetItems, expectedTargetLen) + assert.Len(t, s.TargetItems(), expectedTargetLen) // prepare second round of targets tar := []string{"prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004"} var newTargetList []TargetItem for _, i := range tar { - newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) + newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) } // test that less targets are found - removed @@ -73,11 +74,45 @@ func TestAddingAndRemovingTargets(t *testing.T) { // verify expectedNewTargetLen := len(tar) - assert.Len(t, s.TargetItems, expectedNewTargetLen) + assert.Len(t, s.TargetItems(), expectedNewTargetLen) // verify results map for _, i := range tar { - _, ok := s.TargetItems["sample-name"+i] + _, ok := s.TargetItems()["sample-name"+i+labels.Fingerprint().String()] + assert.True(t, ok) + } +} + +// Tests that two targets with the same target url and job name but different label set are both added +func TestAllocationCollision(t *testing.T) { + // prepare allocator with initial targets and collectors + s := NewAllocator(logger) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + firstLabels := model.LabelSet{ + "test": "test1", + } + secondLabels := model.LabelSet{ + "test": "test2", + } + + targetList := []TargetItem{ + TargetItem{JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: firstLabels}, + TargetItem{JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: secondLabels}, + } + + // test that targets and collectors are added properly + s.SetWaitingTargets(targetList) + s.AllocateTargets() + + // verify + expectedTargetLen := len(targetList) + assert.Len(t, s.TargetItems(), expectedTargetLen) + + // verify results map + for _, i := range targetList { + _, ok := s.TargetItems()[i.hash()] assert.True(t, ok) } } @@ -104,8 +139,8 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // Divisor needed to get 15% divisor := 6.7 - count := len(s.TargetItems) / len(s.collectors) - percent := float64(len(s.TargetItems)) / divisor + count := len(s.TargetItems()) / len(s.collectors) + percent := float64(len(s.TargetItems())) / divisor // test for _, i := range s.collectors { @@ -123,8 +158,8 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { s.SetWaitingTargets(newTargetList) s.AllocateTargets() - count = len(s.TargetItems) / len(s.collectors) - percent = float64(len(s.TargetItems)) / divisor + count = len(s.TargetItems()) / len(s.collectors) + percent = float64(len(s.TargetItems())) / divisor // test for _, i := range s.collectors { @@ -141,8 +176,8 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { s.SetWaitingTargets(newTargetList) s.AllocateTargets() - count = len(s.TargetItems) / len(s.collectors) - percent = float64(len(s.TargetItems)) / divisor + count = len(s.TargetItems()) / len(s.collectors) + percent = float64(len(s.TargetItems())) / divisor // test for _, i := range s.collectors { diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 49b6cb65b..01f4e5c82 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -23,7 +23,7 @@ type targetGroupJSON struct { func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *Allocator) map[string]collectorJSON { displayData := make(map[string]collectorJSON) - for _, j := range allocator.TargetItems { + for _, j := range allocator.TargetItems() { if j.JobName == job { var targetList []TargetItem targetList = append(targetList, cMap[j.Collector.Name+j.JobName]...) @@ -52,7 +52,7 @@ func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[strin if col.Name == collector { for _, targetItemArr := range cMap { for _, targetItem := range targetItemArr { - if targetItem.Collector.Name == collector && targetItem.JobName == job { + if targetItem.Collector.Name == collector && targetItem.JobName == job { group[targetItem.Label.String()] = targetItem.TargetURL labelSet[targetItem.TargetURL] = targetItem.Label } diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index c1806c2e6..c467ff4bf 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -185,7 +185,7 @@ func (s *server) Shutdown(ctx context.Context) error { func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { displayData := make(map[string]allocation.LinkJSON) - for _, v := range s.allocator.TargetItems { + for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = allocation.LinkJSON{v.Link.Link} } jsonHandler(w, r, displayData) @@ -206,7 +206,7 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { q := r.URL.Query()["collector_id"] var compareMap = make(map[string][]allocation.TargetItem) // CollectorName+jobName -> TargetItem - for _, v := range s.allocator.TargetItems { + for _, v := range s.allocator.TargetItems() { compareMap[v.Collector.Name+v.JobName] = append(compareMap[v.Collector.Name+v.JobName], *v) } params := mux.Vars(r) From cb91777abb7eb177ba1f54bba9ad29834b86cf2f Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Thu, 18 Aug 2022 09:26:40 +0200 Subject: [PATCH 0561/1234] Simultaneously support versions v2 and v2beta2 of Autoscaling (#1014) * Update to v2beta2 Signed-off-by: Kevin Earls * First attempt at supporting v2 and v2beta2 of autoscaling Signed-off-by: Kevin Earls * Fix ErrorF statement Signed-off-by: Kevin Earls * Adding whitespace to rerun CI Signed-off-by: Kevin Earls * Make the stupid linter happy Signed-off-by: Kevin Earls * Just run on 1.24 to get full test results Signed-off-by: Kevin Earls * Just run on 1.19 to get full test results Signed-off-by: Kevin Earls * Cleanup, remove extraneous autodetect() calls, run only on 1.24 Signed-off-by: Kevin Earls * Remove redundant builder.Owns call Signed-off-by: Kevin Earls * Start of cleanup Signed-off-by: Kevin Earls * Appease the stupid linter Signed-off-by: Kevin Earls * Cleanup Signed-off-by: Kevin Earls * Check before returning v2beta2, reduce copy/pasted code Signed-off-by: Kevin Earls * Back out DRY changes Signed-off-by: Kevin Earls * reduc copy/pasted code Signed-off-by: Kevin Earls * Respond to comments Signed-off-by: Kevin Earls * Implement autoscaling version constants as an enum Signed-off-by: Kevin Earls * remove TODO, move declaration Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- apis/v1alpha1/zz_generated.deepcopy.go | 56 +++---- .../opentelemetrycollector_controller.go | 23 ++- .../opentelemetrycollector_controller_test.go | 29 +++- internal/config/main.go | 15 ++ internal/config/main_test.go | 4 + internal/config/options.go | 1 + pkg/autodetect/main.go | 62 ++++++++ pkg/autodetect/main_test.go | 6 + pkg/collector/horizontalpodautoscaler.go | 88 ++++++++--- pkg/collector/horizontalpodautoscaler_test.go | 76 +++++++-- .../reconcile/horizontalpodautoscaler.go | 145 ++++++++++++------ .../reconcile/horizontalpodautoscaler_test.go | 92 ++++++++--- pkg/collector/reconcile/suite_test.go | 3 +- 13 files changed, 468 insertions(+), 132 deletions(-) diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index cb60f0ca6..cba3b24b9 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -65,9 +65,9 @@ func (in *Exporter) DeepCopy() *Exporter { func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { *out = *in out.Status = in.Status - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation. @@ -275,6 +275,14 @@ func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSpec) { *out = *in + in.Resources.DeepCopyInto(&out.Resources) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Args != nil { in, out := &in.Args, &out.Args *out = make(map[string]string, len(*in)) @@ -297,7 +305,6 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } - out.TargetAllocator = in.TargetAllocator if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(v1.SecurityContext) @@ -308,13 +315,14 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(v1.PodSecurityContext) (*in).DeepCopyInto(*out) } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val } } + out.TargetAllocator = in.TargetAllocator if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]v1.VolumeMount, len(*in)) @@ -322,13 +330,6 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]v1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]v1.ServicePort, len(*in)) @@ -350,7 +351,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.Resources.DeepCopyInto(&out.Resources) + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations *out = make([]v1.Toleration, len(*in)) @@ -358,18 +365,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.PodAnnotations != nil { - in, out := &in.PodAnnotations, &out.PodAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } } diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 7854514df..4250d677b 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -21,7 +21,8 @@ import ( "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" - autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +32,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) @@ -173,14 +175,25 @@ func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params // SetupWithManager tells the manager what our controller is interested in. func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). + err := r.config.AutoDetect() // We need to call this so we can get the correct autodetect version + if err != nil { + return err + } + builder := ctrl.NewControllerManagedBy(mgr). For(&v1alpha1.OpenTelemetryCollector{}). Owns(&corev1.ConfigMap{}). Owns(&corev1.ServiceAccount{}). Owns(&corev1.Service{}). Owns(&appsv1.Deployment{}). - Owns(&autoscalingv1.HorizontalPodAutoscaler{}). Owns(&appsv1.DaemonSet{}). - Owns(&appsv1.StatefulSet{}). - Complete(r) + Owns(&appsv1.StatefulSet{}) + + autoscalingVersion := r.config.AutoscalingVersion() + if autoscalingVersion == autodetect.AutoscalingVersionV2 { + builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) + } else { + builder = builder.Owns(&autoscalingv2beta2.HorizontalPodAutoscaler{}) + } + + return builder.Complete(r) } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 981449f7e..b9324225b 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -36,14 +36,21 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) var logger = logf.Log.WithName("unit-tests") +var mockAutoDetector = &mockAutoDetect{ + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + return autodetect.AutoscalingVersionV2Beta2, nil + }, +} func TestNewObjectsOnReconciliation(t *testing.T) { // prepare - cfg := config.New(config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator")) + cfg := config.New(config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator"), config.WithAutoDetect(mockAutoDetector)) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, @@ -129,7 +136,7 @@ func TestNewObjectsOnReconciliation(t *testing.T) { func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { // prepare - cfg := config.New() + cfg := config.New(config.WithAutoDetect(mockAutoDetector)) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, @@ -341,3 +348,21 @@ func TestRegisterWithManager(t *testing.T) { // verify assert.NoError(t, err) } + +var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) + +type mockAutoDetect struct { + PlatformFunc func() (platform.Platform, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) +} + +func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { + return m.HPAVersionFunc() +} + +func (m *mockAutoDetect) Platform() (platform.Platform, error) { + if m.PlatformFunc != nil { + return m.PlatformFunc() + } + return platform.Unknown, nil +} diff --git a/internal/config/main.go b/internal/config/main.go index f20af554b..e2eee51a2 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -49,6 +49,7 @@ type Config struct { labelsFilter []string platform platform.Platform autoDetectFrequency time.Duration + autoscalingVersion autodetect.AutoscalingVersion } // New constructs a new configuration based on the given options. @@ -61,6 +62,7 @@ func New(opts ...Option) Config { logger: logf.Log.WithName("config"), platform: platform.Unknown, version: version.Get(), + autoscalingVersion: autodetect.DefaultAutoscalingVersion, } for _, opt := range opts { opt(&o) @@ -81,6 +83,7 @@ func New(opts ...Option) Config { autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, labelsFilter: o.labelsFilter, + autoscalingVersion: o.autoscalingVersion, } } @@ -132,6 +135,13 @@ func (c *Config) AutoDetect() error { } } + hpaVersion, err := c.autoDetect.HPAVersion() + if err != nil { + return err + } + c.autoscalingVersion = hpaVersion + c.logger.Info("In Autodetect, Set HPA version to [", c.autoscalingVersion, "] from [", hpaVersion, "]") + return nil } @@ -160,6 +170,11 @@ func (c *Config) Platform() platform.Platform { return c.platform } +// AutoscalingVersion represents the preferred version of autoscaling. +func (c *Config) AutoscalingVersion() autodetect.AutoscalingVersion { + return c.autoscalingVersion +} + // AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. func (c *Config) AutoInstrumentationJavaImage() string { return c.autoInstrumentationJavaImage diff --git a/internal/config/main_test.go b/internal/config/main_test.go index ba981ab2d..fbdc6d899 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -102,6 +102,10 @@ type mockAutoDetect struct { PlatformFunc func() (platform.Platform, error) } +func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { + return autodetect.DefaultAutoscalingVersion, nil +} + func (m *mockAutoDetect) Platform() (platform.Platform, error) { if m.PlatformFunc != nil { return m.PlatformFunc() diff --git a/internal/config/options.go b/internal/config/options.go index beef2b4b8..a3846ce15 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -45,6 +45,7 @@ type options struct { labelsFilter []string platform platform.Platform autoDetectFrequency time.Duration + autoscalingVersion autodetect.AutoscalingVersion } func WithAutoDetect(a autodetect.AutoDetect) Option { diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go index 487d5b4a2..57d6748f6 100644 --- a/pkg/autodetect/main.go +++ b/pkg/autodetect/main.go @@ -16,6 +16,9 @@ package autodetect import ( + "errors" + "sort" + "k8s.io/client-go/discovery" "k8s.io/client-go/rest" @@ -27,12 +30,23 @@ var _ AutoDetect = (*autoDetect)(nil) // AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. type AutoDetect interface { Platform() (platform.Platform, error) + HPAVersion() (AutoscalingVersion, error) } type autoDetect struct { dcl discovery.DiscoveryInterface } +type AutoscalingVersion int + +const ( + AutoscalingVersionV2 AutoscalingVersion = iota + AutoscalingVersionV2Beta2 + AutoscalingVersionUnknown +) + +const DefaultAutoscalingVersion = AutoscalingVersionV2 + // New creates a new auto-detection worker, using the given client when talking to the current cluster. func New(restConfig *rest.Config) (AutoDetect, error) { dcl, err := discovery.NewDiscoveryClientForConfig(restConfig) @@ -64,3 +78,51 @@ func (a *autoDetect) Platform() (platform.Platform, error) { return platform.Kubernetes, nil } + +func (a *autoDetect) HPAVersion() (AutoscalingVersion, error) { + apiList, err := a.dcl.ServerGroups() + if err != nil { + return AutoscalingVersionUnknown, err + } + + for _, apiGroup := range apiList.Groups { + if apiGroup.Name == "autoscaling" { + // Sort this so we can make sure to get v2 before v2beta2 + versions := apiGroup.Versions + sort.Slice(versions, func(i, j int) bool { + return versions[i].Version < versions[j].Version + }) + + for _, version := range versions { + if version.Version == "v2" || version.Version == "v2beta2" { + return toAutoscalingVersion(version.Version), nil + } + } + return AutoscalingVersionUnknown, errors.New("Failed to find appropriate version of apiGroup autoscaling, only v2 and v2beta2 are supported") + } + } + + return AutoscalingVersionUnknown, errors.New("Failed to find apiGroup autoscaling") +} + +func (v AutoscalingVersion) String() string { + switch v { + case AutoscalingVersionV2: + return "v2" + case AutoscalingVersionV2Beta2: + return "v2beta2" + case AutoscalingVersionUnknown: + return "unknown" + } + return "unknown" +} + +func toAutoscalingVersion(version string) AutoscalingVersion { + switch version { + case "v2": + return AutoscalingVersionV2Beta2 + case "v2beta2": + return AutoscalingVersionV2Beta2 + } + return AutoscalingVersionUnknown +} diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index 6ffc1b9e7..42be4eba1 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -88,3 +88,9 @@ func TestUnknownPlatformOnError(t *testing.T) { assert.Error(t, err) assert.Equal(t, platform.Unknown, plt) } + +func TestAutoscalingVersionToString(t *testing.T) { + assert.Equal(t, "v2", autodetect.AutoscalingVersionV2.String()) + assert.Equal(t, "v2beta2", autodetect.AutoscalingVersionV2Beta2.String()) + assert.Equal(t, "unknown", autodetect.AutoscalingVersionUnknown.String()) +} diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 7c7003fb4..0cdd3dca2 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -16,40 +16,92 @@ package collector import ( "github.com/go-logr/logr" - autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) const defaultCPUTarget int32 = 90 -func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) autoscalingv1.HorizontalPodAutoscaler { +func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { + autoscalingVersion := cfg.AutoscalingVersion() + labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) cpuTarget := defaultCPUTarget + var result client.Object + + objectMeta := metav1.ObjectMeta{ + Name: naming.HorizontalPodAutoscaler(otelcol), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: annotations, + } + + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + targetCPUUtilization := autoscalingv2beta2.MetricSpec{ + Type: autoscalingv2beta2.ResourceMetricSourceType, + Resource: &autoscalingv2beta2.ResourceMetricSource{ + Name: corev1.ResourceCPU, + Target: autoscalingv2beta2.MetricTarget{ + Type: autoscalingv2beta2.UtilizationMetricType, + AverageUtilization: &cpuTarget, + }, + }, + } + metrics := []autoscalingv2beta2.MetricSpec{targetCPUUtilization} - return autoscalingv1.HorizontalPodAutoscaler{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.HorizontalPodAutoscaler(otelcol), - Namespace: otelcol.Namespace, - Labels: labels, - Annotations: annotations, - }, - Spec: autoscalingv1.HorizontalPodAutoscalerSpec{ - ScaleTargetRef: autoscalingv1.CrossVersionObjectReference{ - APIVersion: v1alpha1.GroupVersion.String(), - Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol), + autoscaler := autoscalingv2beta2.HorizontalPodAutoscaler{ + ObjectMeta: objectMeta, + Spec: autoscalingv2beta2.HorizontalPodAutoscalerSpec{ + ScaleTargetRef: autoscalingv2beta2.CrossVersionObjectReference{ + APIVersion: v1alpha1.GroupVersion.String(), + Kind: "OpenTelemetryCollector", + Name: naming.OpenTelemetryCollector(otelcol), + }, + MinReplicas: otelcol.Spec.Replicas, + MaxReplicas: *otelcol.Spec.MaxReplicas, + Metrics: metrics, + }, + } + result = &autoscaler + } else { + targetCPUUtilization := autoscalingv2.MetricSpec{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ + Name: corev1.ResourceCPU, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, + AverageUtilization: &cpuTarget, + }, }, + } + metrics := []autoscalingv2.MetricSpec{targetCPUUtilization} - MinReplicas: otelcol.Spec.Replicas, - MaxReplicas: *otelcol.Spec.MaxReplicas, - TargetCPUUtilizationPercentage: &cpuTarget, - }, + autoscaler := autoscalingv2.HorizontalPodAutoscaler{ + ObjectMeta: objectMeta, + Spec: autoscalingv2.HorizontalPodAutoscalerSpec{ + ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ + APIVersion: v1alpha1.GroupVersion.String(), + Kind: "OpenTelemetryCollector", + Name: naming.OpenTelemetryCollector(otelcol), + }, + MinReplicas: otelcol.Spec.Replicas, + MaxReplicas: *otelcol.Spec.MaxReplicas, + Metrics: metrics, + }, + } + result = &autoscaler } + + return result } diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index b16881654..6aaa71ca5 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -18,15 +18,27 @@ import ( "testing" "github.com/stretchr/testify/assert" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) func TestHPA(t *testing.T) { - // prepare + type test struct { + name string + autoscalingVersion autodetect.AutoscalingVersion + } + v2Test := test{autodetect.AutoscalingVersionV2.String(), autodetect.AutoscalingVersionV2} + v2beta2Test := test{autodetect.AutoscalingVersionV2Beta2.String(), autodetect.AutoscalingVersionV2Beta2} + tests := []test{v2Test, v2beta2Test} + var minReplicas int32 = 3 var maxReplicas int32 = 5 @@ -40,13 +52,59 @@ func TestHPA(t *testing.T) { }, } - cfg := config.New() - hpa := HorizontalPodAutoscaler(cfg, logger, otelcol) + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + mockAutoDetector := &mockAutoDetect{ + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + return test.autoscalingVersion, nil + }, + } + configuration := config.New(config.WithAutoDetect(mockAutoDetector)) + err := configuration.AutoDetect() + assert.NoError(t, err) + raw := HorizontalPodAutoscaler(configuration, logger, otelcol) + + if configuration.AutoscalingVersion() == autodetect.AutoscalingVersionV2Beta2 { + hpa := raw.(*autoscalingv2beta2.HorizontalPodAutoscaler) + + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + assert.Equal(t, 1, len(hpa.Spec.Metrics)) + assert.Equal(t, corev1.ResourceCPU, hpa.Spec.Metrics[0].Resource.Name) + assert.Equal(t, int32(90), *hpa.Spec.Metrics[0].Resource.Target.AverageUtilization) + } else { + hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) + + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + assert.Equal(t, 1, len(hpa.Spec.Metrics)) + assert.Equal(t, corev1.ResourceCPU, hpa.Spec.Metrics[0].Resource.Name) + assert.Equal(t, int32(90), *hpa.Spec.Metrics[0].Resource.Target.AverageUtilization) + } + }) + } +} - // verify - assert.Equal(t, "my-instance-collector", hpa.Name) - assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) - assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) - assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - assert.Equal(t, int32(90), *hpa.Spec.TargetCPUUtilizationPercentage) +var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) + +type mockAutoDetect struct { + PlatformFunc func() (platform.Platform, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) +} + +func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { + return m.HPAVersionFunc() +} + +func (m *mockAutoDetect) Platform() (platform.Platform, error) { + if m.PlatformFunc != nil { + return m.PlatformFunc() + } + return platform.Unknown, nil } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 606f4dffc..302f3c4a5 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -18,12 +18,15 @@ import ( "context" "fmt" - autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) @@ -31,7 +34,7 @@ import ( // HorizontalPodAutoscaler reconciles HorizontalPodAutoscalers if autoscale is true and replicas is nil. func HorizontalPodAutoscalers(ctx context.Context, params Params) error { - desired := []autoscalingv1.HorizontalPodAutoscaler{} + desired := []client.Object{} // check if autoscale mode is on, e.g MaxReplicas is not nil if params.Instance.Spec.MaxReplicas != nil { @@ -51,52 +54,48 @@ func HorizontalPodAutoscalers(ctx context.Context, params Params) error { return nil } -func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expected []autoscalingv1.HorizontalPodAutoscaler) error { - one := int32(1) +func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expected []client.Object) error { + autoscalingVersion := params.Config.AutoscalingVersion() + var existing client.Object + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + existing = &autoscalingv2beta2.HorizontalPodAutoscaler{} + } else { + existing = &autoscalingv2.HorizontalPodAutoscaler{} + } + for _, obj := range expected { - desired := obj + desired, _ := meta.Accessor(obj) - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } - existing := &autoscalingv1.HorizontalPodAutoscaler{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + nns := types.NamespacedName{Namespace: desired.GetNamespace(), Name: desired.GetName()} err := params.Client.Get(ctx, nns, existing) if k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { + if err := params.Client.Create(ctx, obj); err != nil { return fmt.Errorf("failed to create: %w", err) } - params.Log.V(2).Info("created", "hpa.name", desired.Name, "hpa.namespace", desired.Namespace) + params.Log.V(2).Info("created", "hpa.name", desired.GetName(), "hpa.namespace", desired.GetNamespace()) continue } else if err != nil { return fmt.Errorf("failed to get %w", err) } - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } + updated := existing.DeepCopyObject().(client.Object) + updated.SetOwnerReferences(desired.GetOwnerReferences()) + setAutoscalerSpec(params, autoscalingVersion, updated) - updated.OwnerReferences = desired.OwnerReferences - if params.Instance.Spec.MaxReplicas != nil { - updated.Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas - if params.Instance.Spec.MinReplicas != nil { - updated.Spec.MinReplicas = params.Instance.Spec.MinReplicas - } else { - updated.Spec.MinReplicas = &one - } + annotations := updated.GetAnnotations() + for k, v := range desired.GetAnnotations() { + annotations[k] = v } - - for k, v := range desired.Annotations { - updated.Annotations[k] = v - } - for k, v := range desired.Labels { - updated.Labels[k] = v + updated.SetAnnotations(annotations) + labels := updated.GetLabels() + for k, v := range desired.GetLabels() { + labels[k] = v } + updated.SetLabels(labels) patch := client.MergeFrom(existing) @@ -104,13 +103,36 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect return fmt.Errorf("failed to apply changes: %w", err) } - params.Log.V(2).Info("applied", "hpa.name", desired.Name, "hpa.namespace", desired.Namespace) + params.Log.V(2).Info("applied", "hpa.name", desired.GetName(), "hpa.namespace", desired.GetNamespace()) } return nil } -func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected []autoscalingv1.HorizontalPodAutoscaler) error { +func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object) { + one := int32(1) + if params.Instance.Spec.MaxReplicas != nil { + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas + if params.Instance.Spec.MinReplicas != nil { + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.MinReplicas + } else { + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one + } + } else { + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas + if params.Instance.Spec.MinReplicas != nil { + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.MinReplicas + } else { + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one + } + } + } +} + +func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected []client.Object) error { + autoscalingVersion := params.Config.AutoscalingVersion() + opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ @@ -119,26 +141,53 @@ func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected }), } - list := &autoscalingv1.HorizontalPodAutoscalerList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + list := &autoscalingv2beta2.HorizontalPodAutoscalerList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, k := range expected { + keep := k.(*autoscalingv2beta2.HorizontalPodAutoscaler) + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + break + } + } - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) } } + } else { + list := &autoscalingv2.HorizontalPodAutoscalerList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, k := range expected { + keep := k.(*autoscalingv2.HorizontalPodAutoscaler) + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + break + } + } - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) } - params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) } } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index 62b901da3..af2737c51 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -22,27 +22,34 @@ import ( "github.com/stretchr/testify/assert" v1 "k8s.io/api/apps/v1" - autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" + "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) func TestExpectedHPA(t *testing.T) { - params := paramsWithHPA() - expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) + params := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) + err := params.Config.AutoDetect() + assert.NoError(t, err) + autoscalingVersion := params.Config.AutoscalingVersion() + expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) t.Run("should create HPA", func(t *testing.T) { - err := expectedHorizontalPodAutoscalers(context.Background(), params, []autoscalingv1.HorizontalPodAutoscaler{expectedHPA}) + err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &autoscalingv1.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + exists, err := populateObjectIfExists(t, &autoscalingv2beta2.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) assert.NoError(t, err) assert.True(t, exists) }) @@ -50,26 +57,42 @@ func TestExpectedHPA(t *testing.T) { t.Run("should update HPA", func(t *testing.T) { minReplicas := int32(1) maxReplicas := int32(3) - updateParms := paramsWithHPA() + updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) updateParms.Instance.Spec.Replicas = &minReplicas updateParms.Instance.Spec.MaxReplicas = &maxReplicas updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) - createObjectIfNotExists(t, "test-collector", &updatedHPA) - err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []autoscalingv1.HorizontalPodAutoscaler{updatedHPA}) - assert.NoError(t, err) - - actual := autoscalingv1.HorizontalPodAutoscaler{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + updatedAutoscaler := *updatedHPA.(*autoscalingv2beta2.HorizontalPodAutoscaler) + createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) + err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + assert.NoError(t, err) + + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + } else { + updatedAutoscaler := *updatedHPA.(*autoscalingv2.HorizontalPodAutoscaler) + createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) + err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + assert.NoError(t, err) + + actual := autoscalingv2.HorizontalPodAutoscaler{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + } }) t.Run("should delete HPA", func(t *testing.T) { - err := deleteHorizontalPodAutoscalers(context.Background(), params, []autoscalingv1.HorizontalPodAutoscaler{expectedHPA}) + err = deleteHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) actual := v1.Deployment{} @@ -78,7 +101,7 @@ func TestExpectedHPA(t *testing.T) { }) } -func paramsWithHPA() Params { +func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { configYAML, err := ioutil.ReadFile("../testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) @@ -87,8 +110,19 @@ func paramsWithHPA() Params { minReplicas := int32(3) maxReplicas := int32(5) + mockAutoDetector := &mockAutoDetect{ + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + return autoscalingVersion, nil + }, + } + configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + err = configuration.AutoDetect() + if err != nil { + logger.Error(err, "configuration.autodetect failed") + } + return Params{ - Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), + Config: configuration, Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ @@ -120,3 +154,21 @@ func paramsWithHPA() Params { Recorder: record.NewFakeRecorder(10), } } + +var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) + +type mockAutoDetect struct { + PlatformFunc func() (platform.Platform, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) +} + +func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { + return m.HPAVersionFunc() +} + +func (m *mockAutoDetect) Platform() (platform.Platform, error) { + if m.PlatformFunc != nil { + return m.PlatformFunc() + } + return platform.Unknown, nil +} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 6d8e011cb..0ce59bc92 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -259,8 +259,7 @@ func createObjectIfNotExists(tb testing.TB, name string, object client.Object) { tb.Helper() err := k8sClient.Get(context.Background(), client.ObjectKey{Namespace: "default", Name: name}, object) if errors.IsNotFound(err) { - err := k8sClient.Create(context.Background(), - object) + err := k8sClient.Create(context.Background(), object) assert.NoError(tb, err) } } From 3159df92cb9d8cb6e5a4917cd297b71186e3a2d2 Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Thu, 18 Aug 2022 11:45:05 -0700 Subject: [PATCH 0562/1234] Protect allocator maps behind mutex, create getter funcs for them (#1040) * protect allocator maps behind mutex, create getter funcs for them * remove empty line and adjust tests * update comments, formatting --- cmd/otel-allocator/allocation/allocator.go | 79 ++++++++++++------- .../allocation/allocator_test.go | 41 ++++++---- cmd/otel-allocator/allocation/http.go | 2 +- 3 files changed, 76 insertions(+), 46 deletions(-) diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go index c59e3fb50..27a714a7c 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/allocation/allocator.go @@ -57,40 +57,39 @@ type collector struct { // Users need to call SetTargets when they have new targets in their // clusters and call Reshard to process the new targets and reshard. type Allocator struct { - m sync.Mutex - + // m protects targetsWaiting, collectors, and targetItems for concurrent use. + m sync.RWMutex targetsWaiting map[string]TargetItem // temp buffer to keep targets that are waiting to be processed - - collectors map[string]*collector // all current collectors - - targetItems map[string]*TargetItem + collectors map[string]*collector // all current collectors + targetItems map[string]*TargetItem log logr.Logger } +// TargetItems returns a shallow copy of the targetItems map. func (allocator *Allocator) TargetItems() map[string]*TargetItem { - return allocator.targetItems + allocator.m.RLock() + defer allocator.m.RUnlock() + targetItemsCopy := make(map[string]*TargetItem) + for k, v := range allocator.targetItems { + targetItemsCopy[k] = v + } + return targetItemsCopy } -// findNextCollector finds the next collector with less number of targets. -func (allocator *Allocator) findNextCollector() *collector { - var col *collector - for _, v := range allocator.collectors { - // If the initial collector is empty, set the initial collector to the first element of map - if col == nil { - col = v - } else { - if v.NumTargets < col.NumTargets { - col = v - } - } - +// Collectors returns a shallow copy of the collectors map. +func (allocator *Allocator) Collectors() map[string]*collector { + allocator.m.RLock() + defer allocator.m.RUnlock() + collectorsCopy := make(map[string]*collector) + for k, v := range allocator.collectors { + collectorsCopy[k] = v } - return col + return collectorsCopy } -// SetTargets accepts the a list of targets that will be used to make -// load balancing decisions. This method should be called when where are +// SetWaitingTargets accepts a list of targets that will be used to make +// load balancing decisions. This method should be called when there are // new targets discovered or existing targets are shutdown. func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { // Dump old data @@ -104,7 +103,7 @@ func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { } // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. -// SetCollectors is called when Collectors are added or removed +// This method is called when Collectors are added or removed. func (allocator *Allocator) SetCollectors(collectors []string) { log := allocator.log.WithValues("component", "opentelemetry-targetallocator") @@ -124,8 +123,9 @@ func (allocator *Allocator) SetCollectors(collectors []string) { collectorsAllocatable.Set(float64(len(collectors))) } -// Reallocate needs to be called to process the new target updates. -// Until Reallocate is called, old targets will be served. +// AllocateTargets removes outdated targets and adds new ones from +// waitingTargets. This method needs to be called to process the new target +// updates. Until it is called, old targets will be served. func (allocator *Allocator) AllocateTargets() { allocator.m.Lock() timer := prometheus.NewTimer(timeToAssign.WithLabelValues("AllocateTargets")) @@ -135,7 +135,7 @@ func (allocator *Allocator) AllocateTargets() { allocator.processWaitingTargets() } -// ReallocateCollectors reallocates the targets among the new collector instances +// ReallocateCollectors reallocates the targets among the new collector instances. func (allocator *Allocator) ReallocateCollectors() { allocator.m.Lock() timer := prometheus.NewTimer(timeToAssign.WithLabelValues("ReallocateCollectors")) @@ -145,7 +145,8 @@ func (allocator *Allocator) ReallocateCollectors() { allocator.processWaitingTargets() } -// removeOutdatedTargets removes targets that are no longer available. +// removeOutdatedTargets removes targets that are no longer available. This +// method is called after a lock has been acquired in ReallocateCollectors(). func (allocator *Allocator) removeOutdatedTargets() { for k := range allocator.targetItems { if _, ok := allocator.targetsWaiting[k]; !ok { @@ -155,7 +156,8 @@ func (allocator *Allocator) removeOutdatedTargets() { } } -// processWaitingTargets processes the newly set targets. +// processWaitingTargets processes the newly set targets. This method is called +// after a lock has been acquired in AllocateTargets() or ReallocateCollectors(). func (allocator *Allocator) processWaitingTargets() { for k, v := range allocator.targetsWaiting { if _, ok := allocator.targetItems[k]; !ok { @@ -175,6 +177,25 @@ func (allocator *Allocator) processWaitingTargets() { } } +// findNextCollector finds the next collector with fewer number of targets. +// This method is called from within processWaitingTargets(), whose caller +// acquires the needed lock. +func (allocator *Allocator) findNextCollector() *collector { + var col *collector + for _, v := range allocator.collectors { + // If the initial collector is empty, set the initial collector to the first element of map + if col == nil { + col = v + } else { + if v.NumTargets < col.NumTargets { + col = v + } + } + + } + return col +} + func NewAllocator(log logr.Logger) *Allocator { return &Allocator{ log: log, diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go index 596ff3b62..356920be6 100644 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ b/cmd/otel-allocator/allocation/allocator_test.go @@ -31,11 +31,12 @@ func TestSetCollectors(t *testing.T) { cols := []string{"col-1", "col-2", "col-3"} s.SetCollectors(cols) - excpectedColLen := len(cols) - assert.Len(t, s.collectors, excpectedColLen) + expectedColLen := len(cols) + collectors := s.Collectors() + assert.Len(t, collectors, expectedColLen) for _, i := range cols { - assert.NotNil(t, s.collectors[i]) + assert.NotNil(t, collectors[i]) } } @@ -73,12 +74,13 @@ func TestAddingAndRemovingTargets(t *testing.T) { s.AllocateTargets() // verify + targetItems := s.TargetItems() expectedNewTargetLen := len(tar) - assert.Len(t, s.TargetItems(), expectedNewTargetLen) + assert.Len(t, targetItems, expectedNewTargetLen) // verify results map for _, i := range tar { - _, ok := s.TargetItems()["sample-name"+i+labels.Fingerprint().String()] + _, ok := targetItems["sample-name"+i+labels.Fingerprint().String()] assert.True(t, ok) } } @@ -107,12 +109,13 @@ func TestAllocationCollision(t *testing.T) { s.AllocateTargets() // verify + targetItems := s.TargetItems() expectedTargetLen := len(targetList) - assert.Len(t, s.TargetItems(), expectedTargetLen) + assert.Len(t, targetItems, expectedTargetLen) // verify results map for _, i := range targetList { - _, ok := s.TargetItems()[i.hash()] + _, ok := targetItems[i.hash()] assert.True(t, ok) } } @@ -139,11 +142,13 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // Divisor needed to get 15% divisor := 6.7 - count := len(s.TargetItems()) / len(s.collectors) - percent := float64(len(s.TargetItems())) / divisor + targetItemLen := len(s.TargetItems()) + collectors := s.Collectors() + count := targetItemLen / len(collectors) + percent := float64(targetItemLen) / divisor // test - for _, i := range s.collectors { + for _, i := range collectors { assert.InDelta(t, i.NumTargets, count, percent) } @@ -158,11 +163,13 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { s.SetWaitingTargets(newTargetList) s.AllocateTargets() - count = len(s.TargetItems()) / len(s.collectors) - percent = float64(len(s.TargetItems())) / divisor + targetItemLen = len(s.TargetItems()) + collectors = s.Collectors() + count = targetItemLen / len(collectors) + percent = float64(targetItemLen) / divisor // test - for _, i := range s.collectors { + for _, i := range collectors { assert.InDelta(t, i.NumTargets, count, math.Round(percent)) } // adding targets at 'random' @@ -176,11 +183,13 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { s.SetWaitingTargets(newTargetList) s.AllocateTargets() - count = len(s.TargetItems()) / len(s.collectors) - percent = float64(len(s.TargetItems())) / divisor + targetItemLen = len(s.TargetItems()) + collectors = s.Collectors() + count = targetItemLen / len(collectors) + percent = float64(targetItemLen) / divisor // test - for _, i := range s.collectors { + for _, i := range collectors { assert.InDelta(t, i.NumTargets, count, math.Round(percent)) } } diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 01f4e5c82..ba2602fff 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -48,7 +48,7 @@ func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[strin var tgs []targetGroupJSON group := make(map[string]string) labelSet := make(map[string]model.LabelSet) - for _, col := range allocator.collectors { + for _, col := range allocator.Collectors() { if col.Name == collector { for _, targetItemArr := range cMap { for _, targetItem := range targetItemArr { From 2825f76c519f3d01f0b575de885a4af72558ca7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 12:59:09 +0200 Subject: [PATCH 0563/1234] Bump k8s.io/client-go from 0.24.3 to 0.24.4 (#1044) Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.24.3 to 0.24.4. - [Release notes](https://github.com/kubernetes/client-go/releases) - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.24.3...v0.24.4) --- updated-dependencies: - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 2982d7c16..e5498c6b8 100644 --- a/go.mod +++ b/go.mod @@ -13,9 +13,9 @@ require ( github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.9.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.3 - k8s.io/apimachinery v0.24.3 - k8s.io/client-go v0.24.3 + k8s.io/api v0.24.4 + k8s.io/apimachinery v0.24.4 + k8s.io/client-go v0.24.4 k8s.io/kubectl v0.24.3 sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/go.sum b/go.sum index d139f329e..962b9ed27 100644 --- a/go.sum +++ b/go.sum @@ -1712,22 +1712,25 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= -k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= +k8s.io/api v0.24.4 h1:I5Y645gJ8zWKawyr78lVfDQkZrAViSbeRXsPZWTxmXk= +k8s.io/api v0.24.4/go.mod h1:42pVfA0NRxrtJhZQOvRSyZcJihzAdU59WBtTjYcB0/M= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.24.4 h1:S0Ur3J/PbivTcL43EdSdPhqCqKla2NIuneNwZcTDeGQ= +k8s.io/apimachinery v0.24.4/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= k8s.io/cli-runtime v0.24.3/go.mod h1:In84wauoMOqa7JDvDSXGbf8lTNlr70fOGpYlYfJtSqA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= -k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= +k8s.io/client-go v0.24.4 h1:hIAIJZIPyaw46AkxwyR0FRfM/pRxpUNTd3ysYu9vyRg= +k8s.io/client-go v0.24.4/go.mod h1:+AxlPWw/H6f+EJhRSjIeALaJT4tbeB/8g9BNvXGPd0Y= k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/code-generator v0.24.3/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= From 24ac11991e3d3a99ced6408b8603ba24cfb014b1 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 19 Aug 2022 03:59:27 -0700 Subject: [PATCH 0564/1234] Update the javaagent version to 1.17.0 (#1042) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 15b989e39..092afa15d 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.16.0 +1.17.0 From a3644adca0fe029181f31e48b3067d25a3f34112 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 22 Aug 2022 15:31:47 +0200 Subject: [PATCH 0565/1234] Release v0.57.2 (#1023) * Release v0.57.2 Signed-off-by: Yuri Sa * Release v0.57.2 Signed-off-by: Yuri Sa * Added otel upgrade Signed-off-by: Yuri Sa * Fixed linters Signed-off-by: Yuri Sa * Fixed unit tests for 0.57.2 Signed-off-by: Yuri Sa * Fixed requested topics Signed-off-by: Yuri Sa * Fixed requested topics Signed-off-by: Yuri Sa * Fixed version number Signed-off-by: Yuri Sa * Fixed version number Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa Co-authored-by: Vineeth Pothulapati --- CHANGELOG.md | 16 +++ ...emetry-operator.clusterserviceversion.yaml | 6 +- pkg/collector/upgrade/v0_24_0_test.go | 4 - pkg/collector/upgrade/v0_57_2.go | 69 +++++++++++++ pkg/collector/upgrade/v0_57_2_test.go | 97 +++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + versions.txt | 4 +- 7 files changed, 191 insertions(+), 9 deletions(-) create mode 100644 pkg/collector/upgrade/v0_57_2.go create mode 100644 pkg/collector/upgrade/v0_57_2_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 2324e7654..65a09f258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ Changes by Version ================== +0.57.2 +------------------- +### 🚀 New components 🚀 +* Support DotNet auto-instrumentation ([#976](https://github.com/open-telemetry/opentelemetry-operator/pull/976), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Enable instrumentation injecting only core SDK config ([#1000](https://github.com/open-telemetry/opentelemetry-operator/pull/1000), [@bilbof](https://github.com/bilbof)) +### 💡 Enhancements 💡 +* chore(nodejs): update versions.txt to 0.31.0 ([#1015](https://github.com/open-telemetry/opentelemetry-operator/pull/1015), [@mat-rumian](https://github.com/mat-rumian)) +* chore(nodejs): update to 0.31.0 ([#955](https://github.com/open-telemetry/opentelemetry-operator/pull/955), [@mat-rumian](https://github.com/mat-rumian)) +* chore(operator): update python inst to 0.32b0 ([#1012](https://github.com/open-telemetry/opentelemetry-operator/pull/1012), [@ianmcnally](https://github.com/ianmcnally)) +* Sort order of ports returned to fix flaky tests ([#1003](https://github.com/open-telemetry/opentelemetry-operator/pull/1003), [@kevinearls](https://github.com/kevinearls)) +### 🧰 Bug fixes 🧰 +* Fix the issue that target-level metadata labels were missing (#948) ([#949](https://github.com/open-telemetry/opentelemetry-operator/pull/949), [@CoderPoet](https://github.com/CoderPoet)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.57.2](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.57.2) +* [OpenTelemetry Contrib - v0.57.2](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.57.2) + 0.56.0 ------------------- ### 💡 Enhancements 💡 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 5a12bb3f8..0960f40a7 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.56.0 + name: opentelemetry-operator.v0.57.2 namespace: placeholder spec: apiservicedefinitions: {} @@ -282,7 +282,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.56.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.57.2 livenessProbe: httpGet: path: /healthz @@ -392,7 +392,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.56.0 + version: 0.57.2 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 0a4c4f6d1..2d56c7609 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -41,8 +41,6 @@ func TestHealthCheckEndpointMigration(t *testing.T) { }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: `extensions: - health_check: - health_check/1: "" health_check/2: endpoint: "localhost:13133" health_check/3: @@ -64,8 +62,6 @@ func TestHealthCheckEndpointMigration(t *testing.T) { // verify assert.Equal(t, `extensions: - health_check: - health_check/1: "" health_check/2: endpoint: localhost:13133 health_check/3: diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go new file mode 100644 index 000000000..1d2e34651 --- /dev/null +++ b/pkg/collector/upgrade/v0_57_2.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "fmt" + "strings" + + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + otelCfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, failed to parse configuration: %w", err) + } + + //Remove deprecated port field from config. (https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/10853) + extensionsConfig, ok := otelCfg["extensions"].(map[interface{}]interface{}) + if !ok { + // In case there is no extensions config. + return otelcol, nil + } + + for keyExt, valExt := range extensionsConfig { + if strings.HasPrefix(keyExt.(string), "health_check") { + switch extensions := valExt.(type) { + case map[interface{}]interface{}: + if port, ok := extensions["port"]; ok { + endpointV := extensions["endpoint"] + extensions["endpoint"] = fmt.Sprintf("%s:%s", endpointV, port) + delete(extensions, "port") + + otelCfg["extensions"] = extensionsConfig + res, err := yaml.Marshal(otelCfg) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, failed to marshall back configuration: %w", err) + } + + otelcol.Spec.Config = string(res) + u.Recorder.Event(otelcol, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.57.2 has deprecated port for healthcheck extension %q", keyExt)) + } + default: + return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, the extension %q is invalid (expected string or map but was %t)", keyExt, valExt) + } + } + } + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_57_2_test.go b/pkg/collector/upgrade/v0_57_2_test.go new file mode 100644 index 000000000..f3f392424 --- /dev/null +++ b/pkg/collector/upgrade/v0_57_2_test.go @@ -0,0 +1,97 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/record" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +func Test0_57_0Upgrade(t *testing.T) { + collectorInstance := v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "OpenTelemetryCollector", + APIVersion: "v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "otel-my-instance", + Namespace: "somewhere", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `receivers: + otlp: + protocols: + http: + endpoint: mysite.local:55690 +extensions: + health_check: + endpoint: "localhost" + port: "4444" + check_collector_pipeline: + enabled: false + exporter_failure_threshold: 5 + interval: 5m +service: + extensions: [health_check] + pipelines: + metrics: + receivers: [otlp] + exporters: [nop] +`, + }, + } + + collectorInstance.Status.Version = "0.56.0" + //Test to remove port and change endpoint value. + versionUpgrade := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + + upgradedInstance, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) + assert.NoError(t, err) + assert.Equal(t, `extensions: + health_check: + check_collector_pipeline: + enabled: false + exporter_failure_threshold: 5 + interval: 5m + endpoint: localhost:4444 +receivers: + otlp: + protocols: + http: + endpoint: mysite.local:55690 +service: + extensions: + - health_check + pipelines: + metrics: + exporters: + - nop + receivers: + - otlp +`, upgradedInstance.Spec.Config) +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 22359494a..a311cf2ee 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -77,6 +77,10 @@ var ( Version: *semver.MustParse("0.56.0"), upgrade: upgrade0_56_0, }, + { + Version: *semver.MustParse("0.57.2"), + upgrade: upgrade0_57_2, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. diff --git a/versions.txt b/versions.txt index 29f42aadd..42c9a0eb5 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.56.0 +opentelemetry-collector=0.57.2 # Represents the current release of the OpenTelemetry Operator. -operator=0.56.0 +operator=0.57.2 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From ce4b1beff58e4c3698efcb822a20ff956c2d94e5 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 22 Aug 2022 12:12:10 -0400 Subject: [PATCH 0566/1234] TargetAllocator - fix unnecessary and incorrect reallocation (#1041) * Resolve bug where TA doesn't allocate all targets * Cleanup cleanup * Changed how targets and collectors are allocated * Comments * added a test * Fix comment spacing * Updated based on feedback * Metrics fix, comment * updated from feedback * Change where metric is recorded --- cmd/otel-allocator/allocation/allocator.go | 213 ++++++++++-------- .../allocation/allocator_test.go | 104 +++++++-- cmd/otel-allocator/collector/collector.go | 6 +- cmd/otel-allocator/main.go | 10 +- 4 files changed, 215 insertions(+), 118 deletions(-) diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go index 27a714a7c..be4d82d3e 100644 --- a/cmd/otel-allocator/allocation/allocator.go +++ b/cmd/otel-allocator/allocation/allocator.go @@ -27,7 +27,8 @@ var ( ) /* - Load balancer will serve on an HTTP server exposing /jobs//targets <- these are configured using least connection + Load balancer will serve on an HTTP server exposing /jobs//targets + The targets are allocated using the least connection method Load balancer will need information about the collectors in order to set the URLs Keep a Map of what each collector currently holds and update it based on new scrape target updates */ @@ -55,13 +56,12 @@ type collector struct { // Allocator makes decisions to distribute work among // a number of OpenTelemetry collectors based on the number of targets. // Users need to call SetTargets when they have new targets in their -// clusters and call Reshard to process the new targets and reshard. +// clusters and call SetCollectors when the collectors have changed. type Allocator struct { - // m protects targetsWaiting, collectors, and targetItems for concurrent use. - m sync.RWMutex - targetsWaiting map[string]TargetItem // temp buffer to keep targets that are waiting to be processed - collectors map[string]*collector // all current collectors - targetItems map[string]*TargetItem + // m protects collectors and targetItems for concurrent use. + m sync.RWMutex + collectors map[string]*collector // all current collectors + targetItems map[string]*TargetItem log logr.Logger } @@ -88,17 +88,97 @@ func (allocator *Allocator) Collectors() map[string]*collector { return collectorsCopy } -// SetWaitingTargets accepts a list of targets that will be used to make +// findNextCollector finds the next collector with fewer number of targets. +// This method is called from within SetTargets and SetCollectors, whose caller +// acquires the needed lock. +func (allocator *Allocator) findNextCollector() *collector { + var col *collector + for _, v := range allocator.collectors { + // If the initial collector is empty, set the initial collector to the first element of map + if col == nil { + col = v + } else { + if v.NumTargets < col.NumTargets { + col = v + } + } + } + return col +} + +// addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems +// This method is called from within SetTargets and SetCollectors, whose caller acquires the needed lock. +// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap +func (allocator *Allocator) addTargetToTargetItems(target *TargetItem) { + chosenCollector := allocator.findNextCollector() + targetItem := TargetItem{ + JobName: target.JobName, + Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, + TargetURL: target.TargetURL, + Label: target.Label, + Collector: chosenCollector, + } + allocator.targetItems[targetItem.hash()] = &targetItem + chosenCollector.NumTargets++ + targetsPerCollector.WithLabelValues(chosenCollector.Name).Set(float64(chosenCollector.NumTargets)) +} + +// getCollectorChanges returns the new and removed collectors respectively. +// This method is called from within SetCollectors, which acquires the needed lock. +func (allocator *Allocator) getCollectorChanges(collectors []string) ([]string, []string) { + var newCollectors []string + var removedCollectors []string + // Used as a set to check for removed collectors + tempCollectorMap := map[string]bool{} + for _, s := range collectors { + if _, found := allocator.collectors[s]; !found { + newCollectors = append(newCollectors, s) + } + tempCollectorMap[s] = true + } + for k := range allocator.collectors { + if _, found := tempCollectorMap[k]; !found { + removedCollectors = append(removedCollectors, k) + } + } + return newCollectors, removedCollectors +} + +// SetTargets accepts a list of targets that will be used to make // load balancing decisions. This method should be called when there are // new targets discovered or existing targets are shutdown. -func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { - // Dump old data +func (allocator *Allocator) SetTargets(targets []TargetItem) { + timer := prometheus.NewTimer(timeToAssign.WithLabelValues("SetTargets")) + defer timer.ObserveDuration() + allocator.m.Lock() defer allocator.m.Unlock() - allocator.targetsWaiting = make(map[string]TargetItem, len(targets)) - // Set new data - for _, i := range targets { - allocator.targetsWaiting[i.hash()] = i + + // Make the temp map for access + tempTargetMap := make(map[string]TargetItem, len(targets)) + for _, target := range targets { + tempTargetMap[target.hash()] = target + } + + // Check for removals + for k, target := range allocator.targetItems { + // if the old target is no longer in the new list, remove it + if _, ok := tempTargetMap[k]; !ok { + allocator.collectors[target.Collector.Name].NumTargets-- + delete(allocator.targetItems, k) + targetsPerCollector.WithLabelValues(target.Collector.Name).Set(float64(allocator.collectors[target.Collector.Name].NumTargets)) + } + } + + // Check for additions + for k, target := range tempTargetMap { + // Do nothing if the item is already there + if _, ok := allocator.targetItems[k]; ok { + continue + } else { + // Assign new set of collectors with the one different name + allocator.addTargetToTargetItems(&target) + } } } @@ -106,101 +186,52 @@ func (allocator *Allocator) SetWaitingTargets(targets []TargetItem) { // This method is called when Collectors are added or removed. func (allocator *Allocator) SetCollectors(collectors []string) { log := allocator.log.WithValues("component", "opentelemetry-targetallocator") + timer := prometheus.NewTimer(timeToAssign.WithLabelValues("SetCollectors")) + defer timer.ObserveDuration() - allocator.m.Lock() - defer allocator.m.Unlock() + collectorsAllocatable.Set(float64(len(collectors))) if len(collectors) == 0 { log.Info("No collector instances present") return } - for k := range allocator.collectors { - delete(allocator.collectors, k) - } - for _, i := range collectors { - allocator.collectors[i] = &collector{Name: i, NumTargets: 0} - } - collectorsAllocatable.Set(float64(len(collectors))) -} - -// AllocateTargets removes outdated targets and adds new ones from -// waitingTargets. This method needs to be called to process the new target -// updates. Until it is called, old targets will be served. -func (allocator *Allocator) AllocateTargets() { allocator.m.Lock() - timer := prometheus.NewTimer(timeToAssign.WithLabelValues("AllocateTargets")) - defer timer.ObserveDuration() defer allocator.m.Unlock() - allocator.removeOutdatedTargets() - allocator.processWaitingTargets() -} - -// ReallocateCollectors reallocates the targets among the new collector instances. -func (allocator *Allocator) ReallocateCollectors() { - allocator.m.Lock() - timer := prometheus.NewTimer(timeToAssign.WithLabelValues("ReallocateCollectors")) - defer timer.ObserveDuration() - defer allocator.m.Unlock() - allocator.targetItems = make(map[string]*TargetItem) - allocator.processWaitingTargets() -} - -// removeOutdatedTargets removes targets that are no longer available. This -// method is called after a lock has been acquired in ReallocateCollectors(). -func (allocator *Allocator) removeOutdatedTargets() { - for k := range allocator.targetItems { - if _, ok := allocator.targetsWaiting[k]; !ok { - allocator.collectors[allocator.targetItems[k].Collector.Name].NumTargets-- - delete(allocator.targetItems, k) - } + newCollectors, removedCollectors := allocator.getCollectorChanges(collectors) + if len(newCollectors) == 0 && len(removedCollectors) == 0 { + log.Info("No changes to the collectors found") + return } -} -// processWaitingTargets processes the newly set targets. This method is called -// after a lock has been acquired in AllocateTargets() or ReallocateCollectors(). -func (allocator *Allocator) processWaitingTargets() { - for k, v := range allocator.targetsWaiting { - if _, ok := allocator.targetItems[k]; !ok { - col := allocator.findNextCollector() - allocator.targetItems[k] = &v - targetItem := TargetItem{ - JobName: v.JobName, - Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(v.JobName))}, - TargetURL: v.TargetURL, - Label: v.Label, - Collector: col, - } - col.NumTargets++ - targetsPerCollector.WithLabelValues(col.Name).Set(float64(col.NumTargets)) - allocator.targetItems[v.hash()] = &targetItem - } + // Clear existing collectors + for _, k := range removedCollectors { + delete(allocator.collectors, k) + targetsPerCollector.WithLabelValues(k).Set(0) + } + // Insert the new collectors + for _, i := range newCollectors { + allocator.collectors[i] = &collector{Name: i, NumTargets: 0} } -} -// findNextCollector finds the next collector with fewer number of targets. -// This method is called from within processWaitingTargets(), whose caller -// acquires the needed lock. -func (allocator *Allocator) findNextCollector() *collector { - var col *collector - for _, v := range allocator.collectors { - // If the initial collector is empty, set the initial collector to the first element of map - if col == nil { - col = v - } else { - if v.NumTargets < col.NumTargets { - col = v + // find targets which need to be redistributed + var redistribute []*TargetItem + for _, item := range allocator.targetItems { + for _, s := range removedCollectors { + if item.Collector.Name == s { + redistribute = append(redistribute, item) } } - } - return col + // Re-Allocate the existing targets + for _, item := range redistribute { + allocator.addTargetToTargetItems(item) + } } func NewAllocator(log logr.Logger) *Allocator { return &Allocator{ - log: log, - targetsWaiting: make(map[string]TargetItem), - collectors: make(map[string]*collector), - targetItems: make(map[string]*TargetItem), + log: log, + collectors: make(map[string]*collector), + targetItems: make(map[string]*TargetItem), } } diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go index 356920be6..0b754cb47 100644 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ b/cmd/otel-allocator/allocation/allocator_test.go @@ -11,7 +11,7 @@ import ( var logger = logf.Log.WithName("unit-tests") -// Tests least connection - The expected collector after running findNextCollector should be the collector with the least amount of workload +// Tests the least connection - The expected collector after running findNextCollector should be the collector with the least amount of workload func TestFindNextCollector(t *testing.T) { s := NewAllocator(logger) @@ -55,8 +55,7 @@ func TestAddingAndRemovingTargets(t *testing.T) { } // test that targets and collectors are added properly - s.SetWaitingTargets(targetList) - s.AllocateTargets() + s.SetTargets(targetList) // verify expectedTargetLen := len(initTargets) @@ -69,9 +68,8 @@ func TestAddingAndRemovingTargets(t *testing.T) { newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) } - // test that less targets are found - removed - s.SetWaitingTargets(newTargetList) - s.AllocateTargets() + // test that fewer targets are found - removed + s.SetTargets(newTargetList) // verify targetItems := s.TargetItems() @@ -100,13 +98,12 @@ func TestAllocationCollision(t *testing.T) { } targetList := []TargetItem{ - TargetItem{JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: firstLabels}, - TargetItem{JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: secondLabels}, + {JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: firstLabels}, + {JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: secondLabels}, } // test that targets and collectors are added properly - s.SetWaitingTargets(targetList) - s.AllocateTargets() + s.SetTargets(targetList) // verify targetItems := s.TargetItems() @@ -120,6 +117,84 @@ func TestAllocationCollision(t *testing.T) { } } +func TestNoCollectorReassignment(t *testing.T) { + s := NewAllocator(logger) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + labels := model.LabelSet{} + + expectedColLen := len(cols) + assert.Len(t, s.collectors, expectedColLen) + + for _, i := range cols { + assert.NotNil(t, s.collectors[i]) + } + initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} + var targetList []TargetItem + for _, i := range initTargets { + targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) + } + // test that targets and collectors are added properly + s.SetTargets(targetList) + + // verify + expectedTargetLen := len(initTargets) + targetItems := s.TargetItems() + assert.Len(t, targetItems, expectedTargetLen) + + // assign new set of collectors with the same names + newCols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(newCols) + + newTargetItems := s.TargetItems() + assert.Equal(t, targetItems, newTargetItems) + +} + +func TestSmartCollectorReassignment(t *testing.T) { + s := NewAllocator(logger) + + cols := []string{"col-1", "col-2", "col-3"} + s.SetCollectors(cols) + labels := model.LabelSet{} + + expectedColLen := len(cols) + assert.Len(t, s.collectors, expectedColLen) + + for _, i := range cols { + assert.NotNil(t, s.collectors[i]) + } + initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} + var targetList []TargetItem + for _, i := range initTargets { + targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) + } + // test that targets and collectors are added properly + s.SetTargets(targetList) + + // verify + expectedTargetLen := len(initTargets) + targetItems := s.TargetItems() + assert.Len(t, targetItems, expectedTargetLen) + + // assign new set of collectors with the same names + newCols := []string{"col-1", "col-2", "col-4"} + s.SetCollectors(newCols) + + newTargetItems := s.TargetItems() + assert.Equal(t, len(targetItems), len(newTargetItems)) + for key, targetItem := range targetItems { + item, ok := newTargetItems[key] + assert.True(t, ok, "all target items should be found in new target item list") + if targetItem.Collector.Name != "col-3" { + assert.Equal(t, targetItem.Collector.Name, item.Collector.Name) + } else { + assert.Equal(t, "col-4", item.Collector.Name) + } + } +} + // Tests that the delta in number of targets per collector is less than 15% of an even distribution func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { @@ -136,8 +211,7 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { for _, i := range targets { newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) } - s.SetWaitingTargets(newTargetList) - s.AllocateTargets() + s.SetTargets(newTargetList) // Divisor needed to get 15% divisor := 6.7 @@ -160,8 +234,7 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { for _, i := range targets { newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) } - s.SetWaitingTargets(newTargetList) - s.AllocateTargets() + s.SetTargets(newTargetList) targetItemLen = len(s.TargetItems()) collectors = s.Collectors() @@ -180,8 +253,7 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { for _, i := range targets { newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) } - s.SetWaitingTargets(newTargetList) - s.AllocateTargets() + s.SetTargets(newTargetList) targetItemLen = len(s.TargetItems()) collectors = s.Collectors() diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index 933b61bbe..7732d42f0 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -22,8 +22,8 @@ const ( ) var ( - ns = os.Getenv("OTELCOL_NAMESPACE") - collectors = promauto.NewGauge(prometheus.GaugeOpts{ + ns = os.Getenv("OTELCOL_NAMESPACE") + collectorsDiscovered = promauto.NewGauge(prometheus.GaugeOpts{ Name: "opentelemetry_allocator_collectors_discovered", Help: "Number of collectors discovered.", }) @@ -95,7 +95,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]bool, fn func(collectors []string)) string { log := k.log.WithValues("component", "opentelemetry-targetallocator") for { - collectors.Set(float64(len(collectorMap))) + collectorsDiscovered.Set(float64(len(collectorMap))) select { case <-k.close: return "kubernetes client closed" diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index c467ff4bf..bd2bd0a46 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -58,10 +58,7 @@ func main() { // creates a new discovery manager discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) defer discoveryManager.Close() - discoveryManager.Watch(func(targets []allocation.TargetItem) { - allocator.SetWaitingTargets(targets) - allocator.AllocateTargets() - }) + discoveryManager.Watch(allocator.SetTargets) srv, err := newServer(log, allocator, discoveryManager, cliConf) if err != nil { @@ -165,10 +162,7 @@ func configureFileDiscovery(log logr.Logger, allocator *allocation.Allocator, di return nil, err } - k8sClient.Watch(ctx, cfg.LabelSelector, func(collectors []string) { - allocator.SetCollectors(collectors) - allocator.ReallocateCollectors() - }) + k8sClient.Watch(ctx, cfg.LabelSelector, allocator.SetCollectors) return k8sClient, nil } From f95f359f344c0d826e3095e9348cadb1e3319e75 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 23 Aug 2022 18:14:09 +0200 Subject: [PATCH 0567/1234] Otel Operator Release v0.58.0 (#1050) * Release Otel Operator v0.58.0 Signed-off-by: Yuri Sa * Release Otel Operator v0.58.0 Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- CHANGELOG.md | 13 +++++++++++++ README.md | 5 +++-- ...pentelemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65a09f258..58847d77b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,30 @@ Changes by Version ================== +0.58.0 +------------------- +### 🧰 Bug fixes 🧰 +* Fix unnecessary and incorrect reallocation ([#1041](https://github.com/open-telemetry/opentelemetry-operator/pull/1041), [@jaronoff97](https://github.com/jaronoff97)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.58.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.58.0) +* [OpenTelemetry Contrib - v0.58.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.58.0) + 0.57.2 ------------------- ### 🚀 New components 🚀 * Support DotNet auto-instrumentation ([#976](https://github.com/open-telemetry/opentelemetry-operator/pull/976), [@avadhut123pisal](https://github.com/avadhut123pisal)) * Enable instrumentation injecting only core SDK config ([#1000](https://github.com/open-telemetry/opentelemetry-operator/pull/1000), [@bilbof](https://github.com/bilbof)) +* Instrument TA with prometheus ([#1030](https://github.com/open-telemetry/opentelemetry-operator/pull/1030), [@jaronoff97](https://github.com/jaronoff97)) ### 💡 Enhancements 💡 +* Protect allocator maps behind mutex, create getter funcs for them ([#1040](https://github.com/open-telemetry/opentelemetry-operator/pull/1040), [@kristinapathak](https://github.com/kristinapathak)) +* Simultaneously support versions v2 and v2beta2 of Autoscaling ([#1014](https://github.com/open-telemetry/opentelemetry-operator/pull/1014), [@kevinearls](https://github.com/kevinearls)) +* Update the target allocator on any manifest change ([#1027](https://github.com/open-telemetry/opentelemetry-operator/pull/1027), [@jaronoff97](https://github.com/jaronoff97)) * chore(nodejs): update versions.txt to 0.31.0 ([#1015](https://github.com/open-telemetry/opentelemetry-operator/pull/1015), [@mat-rumian](https://github.com/mat-rumian)) * chore(nodejs): update to 0.31.0 ([#955](https://github.com/open-telemetry/opentelemetry-operator/pull/955), [@mat-rumian](https://github.com/mat-rumian)) * chore(operator): update python inst to 0.32b0 ([#1012](https://github.com/open-telemetry/opentelemetry-operator/pull/1012), [@ianmcnally](https://github.com/ianmcnally)) * Sort order of ports returned to fix flaky tests ([#1003](https://github.com/open-telemetry/opentelemetry-operator/pull/1003), [@kevinearls](https://github.com/kevinearls)) ### 🧰 Bug fixes 🧰 +* Resolve bug where TA doesn't allocate all targets ([#1039](https://github.com/open-telemetry/opentelemetry-operator/pull/1039), [@jaronoff97](https://github.com/jaronoff97)) * Fix the issue that target-level metadata labels were missing (#948) ([#949](https://github.com/open-telemetry/opentelemetry-operator/pull/949), [@CoderPoet](https://github.com/CoderPoet)) #### OpenTelemetry Collector and Contrib * [OpenTelemetry Collector - v0.57.2](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.57.2) diff --git a/README.md b/README.md index d57687404..35298af43 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,8 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.58.0 | v1.19 to v1.24 | v1 | +| v0.57.2 | v1.19 to v1.24 | v1 | | v0.56.0 | v1.19 to v1.24 | v1 | | v0.55.0 | v1.19 to v1.24 | v1 | | v0.54.0 | v1.19 to v1.24 | v1 | @@ -339,8 +341,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.41.0 | v1.20 to v1.22 | v1alpha2 | | v0.40.0 | v1.20 to v1.22 | v1alpha2 | | v0.39.0 | v1.20 to v1.22 | v1alpha2 | -| v0.38.0 | v1.20 to v1.22 | v1alpha2 | -| v0.37.1 | v1.20 to v1.22 | v1alpha2 | + ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0960f40a7..aad9b4667 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.57.2 + name: opentelemetry-operator.v0.58.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -282,7 +282,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.57.2 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.58.0 livenessProbe: httpGet: path: /healthz @@ -392,7 +392,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.57.2 + version: 0.58.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 42c9a0eb5..c985f7257 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.57.2 +opentelemetry-collector=0.58.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.57.2 +operator=0.58.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From e82a81429d012b92dc5b473291360eb497bfc8af Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 26 Aug 2022 13:45:37 +0200 Subject: [PATCH 0568/1234] Upgrade operator-sdk to 1.23.0 (#1055) * Upgrade operator-sdk to 1.23.0 Signed-off-by: Israel Blancas * Upgrade generated files for operator-sdk 1.23.0 Signed-off-by: Israel Blancas * Undo changes in kustomize installation Signed-off-by: Israel Blancas Signed-off-by: Israel Blancas --- Makefile | 8 +- bundle.Dockerfile | 2 +- ...emetry-operator.clusterserviceversion.yaml | 4 +- .../opentelemetry.io_instrumentations.yaml | 26 +++++- ...ntelemetry.io_opentelemetrycollectors.yaml | 33 ++++++- bundle/metadata/annotations.yaml | 2 +- bundle/tests/scorecard/config.yaml | 8 +- .../opentelemetry.io_instrumentations.yaml | 28 ++++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 35 ++++++-- config/default/manager_auth_proxy_patch.yaml | 2 +- config/scorecard/patches/basic.config.yaml | 2 +- config/scorecard/patches/olm.config.yaml | 6 +- go.mod | 32 ++++--- go.sum | 87 +++++++++++++++++++ 14 files changed, 228 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 02b4ebbbb..09ce4b790 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ endif KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml -OPERATOR_SDK_VERSION ?= 1.22.1 +OPERATOR_SDK_VERSION ?= 1.23.0 CERTMANAGER_VERSION ?= 1.8.0 @@ -234,7 +234,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v4.5.5 -CONTROLLER_TOOLS_VERSION ?= v0.8.0 +CONTROLLER_TOOLS_VERSION ?= v0.9.2 .PHONY: kustomize @@ -244,12 +244,12 @@ kustomize: ## Download kustomize locally if necessary. .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) - GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest CRDOC = $(shell pwd)/bin/crdoc .PHONY: crdoc diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 0fb494e06..4a211e0f1 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.22.1 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.23.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index aad9b4667..e1e6c4f2d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -33,7 +33,7 @@ metadata: containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.22.1 + operators.operatorframework.io/builder: operator-sdk-v1.23.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community @@ -316,7 +316,7 @@ spec: - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 832f9bf5d..d5a814711 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator @@ -103,6 +103,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -121,6 +122,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -145,6 +147,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -165,6 +168,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -219,6 +223,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -236,6 +241,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -260,6 +266,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -278,6 +285,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -340,6 +348,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -358,6 +367,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -382,6 +392,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -402,6 +413,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -462,6 +474,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -480,6 +493,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -504,6 +518,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -524,6 +539,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -599,6 +615,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -617,6 +634,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -641,6 +659,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -661,6 +680,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -720,5 +740,5 @@ status: acceptedNames: kind: "" plural: "" - conditions: [] - storedVersions: [] + conditions: null + storedVersions: null diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 619113f22..da91c7ce0 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator @@ -107,6 +107,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -124,6 +125,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -148,6 +150,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -166,6 +169,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -189,6 +193,7 @@ spec: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. @@ -204,6 +209,7 @@ spec: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array hostNetwork: @@ -826,6 +832,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume @@ -865,6 +872,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -943,6 +951,7 @@ spec: contains only "value". The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic storageClassName: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' @@ -1221,6 +1230,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic user: description: 'user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' @@ -1252,6 +1262,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic volumeID: description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' @@ -1323,6 +1334,7 @@ spec: keys must be defined type: boolean type: object + x-kubernetes-map-type: atomic csi: description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta @@ -1353,6 +1365,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic readOnly: description: readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). @@ -1406,6 +1419,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 @@ -1449,6 +1463,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -1582,6 +1597,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if @@ -1627,6 +1643,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -1711,6 +1728,7 @@ spec: The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic storageClassName: description: 'storageClassName is the name of the StorageClass required by the claim. More info: @@ -1801,6 +1819,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -1978,6 +1997,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic targetPortal: description: targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than @@ -2148,6 +2168,7 @@ spec: or its keys must be defined type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: description: downwardAPI information about the downwardAPI data to project @@ -2177,6 +2198,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: description: 'Optional: mode bits used to set permissions on this file, must be @@ -2225,6 +2247,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -2290,6 +2313,7 @@ spec: Secret or its key must be defined type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: description: serviceAccountToken is information about the serviceAccountToken data to project @@ -2406,6 +2430,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic user: description: 'user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' @@ -2445,6 +2470,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic sslEnabled: description: sslEnabled Flag enable/disable SSL communication with Gateway, default false @@ -2560,6 +2586,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic volumeName: description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within @@ -2655,5 +2682,5 @@ status: acceptedNames: kind: "" plural: "" - conditions: [] - storedVersions: [] + conditions: null + storedVersions: null diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 966e458bf..440076266 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.22.1 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.23.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index e9b46568e..36fd9c2e7 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-crds-have-resources-test diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index c1354e589..ba2ad97b8 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null name: instrumentations.opentelemetry.io spec: @@ -102,6 +102,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -120,6 +121,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -144,6 +146,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -164,6 +167,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -218,6 +222,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -235,6 +240,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -259,6 +265,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -277,6 +284,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -339,6 +347,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -357,6 +366,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -381,6 +391,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -401,6 +412,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -461,6 +473,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -479,6 +492,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -503,6 +517,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -523,6 +538,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -598,6 +614,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, @@ -616,6 +633,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -640,6 +658,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace @@ -660,6 +679,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -715,9 +735,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 7043d13eb..e5a008441 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 + controller-gen.kubebuilder.io/version: v0.9.2 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -105,6 +105,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, @@ -122,6 +123,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic resourceFieldRef: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, @@ -146,6 +148,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic secretKeyRef: description: Selects a key of a secret in the pod's namespace properties: @@ -164,6 +167,7 @@ spec: required: - key type: object + x-kubernetes-map-type: atomic type: object required: - name @@ -187,6 +191,7 @@ spec: description: Specify whether the ConfigMap must be defined type: boolean type: object + x-kubernetes-map-type: atomic prefix: description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. @@ -202,6 +207,7 @@ spec: description: Specify whether the Secret must be defined type: boolean type: object + x-kubernetes-map-type: atomic type: object type: array hostNetwork: @@ -824,6 +830,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume @@ -863,6 +870,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -941,6 +949,7 @@ spec: contains only "value". The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic storageClassName: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' @@ -1219,6 +1228,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic user: description: 'user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' @@ -1250,6 +1260,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic volumeID: description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' @@ -1321,6 +1332,7 @@ spec: keys must be defined type: boolean type: object + x-kubernetes-map-type: atomic csi: description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta @@ -1351,6 +1363,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic readOnly: description: readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). @@ -1404,6 +1417,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 @@ -1447,6 +1461,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -1580,6 +1595,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if @@ -1625,6 +1641,7 @@ spec: - kind - name type: object + x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -1709,6 +1726,7 @@ spec: The requirements are ANDed. type: object type: object + x-kubernetes-map-type: atomic storageClassName: description: 'storageClassName is the name of the StorageClass required by the claim. More info: @@ -1799,6 +1817,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic required: - driver type: object @@ -1976,6 +1995,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic targetPortal: description: targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than @@ -2146,6 +2166,7 @@ spec: or its keys must be defined type: boolean type: object + x-kubernetes-map-type: atomic downwardAPI: description: downwardAPI information about the downwardAPI data to project @@ -2175,6 +2196,7 @@ spec: required: - fieldPath type: object + x-kubernetes-map-type: atomic mode: description: 'Optional: mode bits used to set permissions on this file, must be @@ -2223,6 +2245,7 @@ spec: required: - resource type: object + x-kubernetes-map-type: atomic required: - path type: object @@ -2288,6 +2311,7 @@ spec: Secret or its key must be defined type: boolean type: object + x-kubernetes-map-type: atomic serviceAccountToken: description: serviceAccountToken is information about the serviceAccountToken data to project @@ -2404,6 +2428,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic user: description: 'user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' @@ -2443,6 +2468,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic sslEnabled: description: sslEnabled Flag enable/disable SSL communication with Gateway, default false @@ -2558,6 +2584,7 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object + x-kubernetes-map-type: atomic volumeName: description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within @@ -2649,9 +2676,3 @@ spec: specReplicasPath: .spec.replicas statusReplicasPath: .status.scale.replicas status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 0efb1e57e..f0f06c1ff 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -10,7 +10,7 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml index b28c75559..90f7ef77d 100644 --- a/config/scorecard/patches/basic.config.yaml +++ b/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: basic test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index 1fe44a2f1..c4153b56f 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.22.1 + image: quay.io/operator-framework/scorecard-test:v1.23.0 labels: suite: olm test: olm-crds-have-resources-test diff --git a/go.mod b/go.mod index e5498c6b8..f2dc89a72 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( ) require ( - cloud.google.com/go v0.83.0 // indirect + cloud.google.com/go v0.99.0 // indirect github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.19 // indirect @@ -31,24 +31,29 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/BurntSushi/toml v1.0.0 // indirect github.com/Microsoft/go-winio v0.4.16 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect + github.com/alessio/shellescape v1.4.1 // indirect github.com/armon/go-metrics v0.3.3 // indirect github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/containerd v1.4.3 // indirect + github.com/containerd/containerd v1.4.8 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.62.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.7+incompatible // indirect + github.com/docker/docker v20.10.14+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fatih/color v1.9.0 // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/fatih/color v1.13.0 // indirect github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-kit/log v0.1.0 // indirect @@ -66,8 +71,9 @@ require ( github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.1.2 // indirect - github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/googleapis/gax-go/v2 v2.1.1 // indirect github.com/gophercloud/gophercloud v0.18.0 // indirect github.com/hashicorp/consul/api v1.8.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.1 // indirect @@ -78,14 +84,16 @@ require ( github.com/hashicorp/serf v0.9.5 // indirect github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kudobuilder/kuttl v0.12.1 // indirect github.com/linode/linodego v0.28.5 // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattn/go-colorable v0.1.6 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/miekg/dns v1.1.42 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -95,6 +103,7 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.1 // indirect @@ -103,6 +112,8 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/cobra v1.4.0 // indirect + github.com/thoas/go-funk v0.7.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/trace v1.9.0 // indirect go.uber.org/atomic v1.8.0 // indirect @@ -111,15 +122,15 @@ require ( golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect + golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.48.0 // indirect + google.golang.org/api v0.61.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect - google.golang.org/grpc v1.40.0 // indirect + google.golang.org/grpc v1.42.0 // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -130,6 +141,7 @@ require ( k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/kind v0.12.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 962b9ed27..39d509582 100644 --- a/go.sum +++ b/go.sum @@ -22,6 +22,14 @@ cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0 h1:bAMqZidYkmIsUqe6PtkEPT7Q+vfizScn+jfNA6jwK9c= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -94,6 +102,9 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= +github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -131,6 +142,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= +github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -202,7 +215,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= @@ -210,6 +227,8 @@ github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u9 github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.8 h1:H0wkS4AbVKTg9vyvBdCBrxoax8AMObKbNz9Fl2N0i4Y= +github.com/containerd/containerd v1.4.8/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= @@ -248,6 +267,8 @@ github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6 github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= +github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -256,7 +277,10 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY= +github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -275,6 +299,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -282,11 +307,15 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -489,6 +518,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -558,7 +588,9 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -567,6 +599,9 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -660,6 +695,7 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= @@ -732,6 +768,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kudobuilder/kuttl v0.12.1 h1:YUCQvLDlPQNdH35G/x3NpvanvTIQDUnBBYD1BnwZalE= +github.com/kudobuilder/kuttl v0.12.1/go.mod h1:mYb0/gii3lCNfKccbPN34i8vomyCLo4rJKbOhOAWPk0= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -759,6 +797,9 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -766,6 +807,8 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -881,6 +924,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -1005,6 +1050,7 @@ github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1034,6 +1080,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/thoas/go-funk v0.7.0 h1:GmirKrs6j6zJbhJIficOsz2aAI7700KsU/5YrdHRM1Y= +github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= @@ -1294,6 +1342,9 @@ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1399,12 +1450,19 @@ golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo= +golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1510,6 +1568,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1550,6 +1609,14 @@ google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1Avk google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1610,7 +1677,21 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1642,8 +1723,12 @@ google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1773,6 +1858,8 @@ sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98 sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/kind v0.12.0 h1:LFynXwQkH1MrWI8pM1FQty0oUwEKjU5EkMaVZaPld8E= +sigs.k8s.io/kind v0.12.0/go.mod h1:EcgDSBVxz8Bvm19fx8xkioFrf9dC30fMJdOTXBSGNoM= sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= From 81b51b1061ab03dd831fa377655821b8501f8efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 26 Aug 2022 13:45:45 +0200 Subject: [PATCH 0569/1234] Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 (#1057) to publish new image --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index d76821f8c..591a71e77 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.2.0-beta.1 \ No newline at end of file +0.3.0-beta.1 \ No newline at end of file From 0a677d45e072c94ca961b09b6f158e510f9186fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 30 Aug 2022 02:56:59 +0200 Subject: [PATCH 0570/1234] Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 (#1056) Special support for instrumentation list is not needed. By default all instrumentations are enabled. --- README.md | 3 -- apis/v1alpha1/instrumentation_webhook.go | 30 ++++------------- apis/v1alpha1/instrumentation_webhook_test.go | 32 ------------------- pkg/instrumentation/dotnet_test.go | 6 +--- .../01-assert.yaml | 4 --- .../02-assert.yaml | 2 -- .../00-install-instrumentation.yaml | 4 --- .../e2e/instrumentation-dotnet/01-assert.yaml | 2 -- versions.txt | 2 +- 9 files changed, 8 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 35298af43..fb09401cf 100644 --- a/README.md +++ b/README.md @@ -226,9 +226,6 @@ The possible values for the annotation can be * `"my-other-namespace/my-instrumentation"` - name and namespace of `Instrumentation` CR instance in another namespace. * `"false"` - do not inject - ->**Note:** For `DotNet` auto-instrumentation, by default, operator sets the `OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS` environment variable which specifies the list of traces source instrumentations you want to enable. The value that is set by default by the operator is all available instrumentations supported by the `openTelemery-dotnet-instrumentation` release consumed in the image, i.e. `AspNet,HttpClient,SqlClient`. This value can be overriden by configuring the environment variable explicitely. - #### Multi-container pods If nothing else is specified, instrumentation is performed on the first container available in the pod spec. diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 3516802d7..0a19653ce 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -27,14 +27,12 @@ import ( ) const ( - AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" - AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" - AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" - AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" - envPrefix = "OTEL_" - envSplunkPrefix = "SPLUNK_" - envOtelDotnetAutoTracesEnabledInstrumentations = "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS" - defaultEnabledTracesInstrumentations = "AspNet,HttpClient,SqlClient" + AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" + AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" + AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" + envPrefix = "OTEL_" + envSplunkPrefix = "SPLUNK_" ) // log is for logging in this package. @@ -80,13 +78,6 @@ func (r *Instrumentation) Default() { r.Spec.DotNet.Image = val } } - // by default set all the available instrumentations for dotnet unless the env is already set - if !r.isEnvVarSet(envOtelDotnetAutoTracesEnabledInstrumentations) { - r.Spec.DotNet.Env = append(r.Spec.DotNet.Env, corev1.EnvVar{ - Name: envOtelDotnetAutoTracesEnabledInstrumentations, - Value: defaultEnabledTracesInstrumentations, - }) - } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -155,12 +146,3 @@ func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error { } return nil } - -func (in *Instrumentation) isEnvVarSet(name string) bool { - for _, env := range in.Spec.DotNet.Env { - if env.Name == name { - return true - } - } - return false -} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 74dcb6619..ef31be3f8 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -18,7 +18,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -38,37 +37,6 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { assert.Equal(t, "nodejs-img:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python-img:1", inst.Spec.Python.Image) assert.Equal(t, "dotnet-img:1", inst.Spec.DotNet.Image) - assert.Equal(t, true, inst.isEnvVarSet(envOtelDotnetAutoTracesEnabledInstrumentations)) -} - -func TestInstrumentationDefaultingWebhookOtelDotNetTracesEnabledInstruEnvSet(t *testing.T) { - inst := &Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - AnnotationDefaultAutoInstrumentationJava: "java-img:1", - AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", - AnnotationDefaultAutoInstrumentationPython: "python-img:1", - AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", - }, - }, - Spec: InstrumentationSpec{ - DotNet: DotNet{ - Env: []v1.EnvVar{ - { - Name: envOtelDotnetAutoTracesEnabledInstrumentations, - Value: "AspNet,HttpClient", - }, - }, - }, - }, - } - inst.Default() - for _, env := range inst.Spec.DotNet.Env { - if env.Name == envOtelDotnetAutoTracesEnabledInstrumentations { - assert.Equal(t, "AspNet,HttpClient", env.Value) - break - } - } } func TestInstrumentationValidatingWebhook(t *testing.T) { diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 7e3e827e6..b2ec849e2 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -34,7 +34,7 @@ func TestInjectDotNetSDK(t *testing.T) { }{ { name: "DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS not defined", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{{Name: "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS", Value: "AspNet,HttpClient,SqlClient"}}}, + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -72,10 +72,6 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, Env: []corev1.EnvVar{ - { - Name: "OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS", - Value: "AspNet,HttpClient,SqlClient", - }, { Name: envDotNetStartupHook, Value: dotNetStartupHookPath, diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml index 9fca3fec8..7923b8873 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -13,8 +13,6 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" - - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS - value: AspNet,HttpClient,SqlClient - name: DOTNET_STARTUP_HOOKS value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" - name: DOTNET_ADDITIONAL_DEPS @@ -48,8 +46,6 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" - - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS - value: AspNet,HttpClient,SqlClient - name: DOTNET_STARTUP_HOOKS value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" - name: DOTNET_ADDITIONAL_DEPS diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml index 8cb31810b..1fd49964a 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -16,8 +16,6 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" - - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS - value: AspNet,HttpClient,SqlClient - name: DOTNET_STARTUP_HOOKS value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" - name: DOTNET_ADDITIONAL_DEPS diff --git a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml index affbe2982..fb267ba1e 100644 --- a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml @@ -24,7 +24,3 @@ spec: sampler: type: parentbased_traceidratio argument: "0.25" - dotnet: - env: - - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS - value: AspNet,HttpClient diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index 9b5320b07..6c38bc686 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -10,8 +10,6 @@ spec: containers: - name: myapp env: - - name: OTEL_DOTNET_AUTO_TRACES_ENABLED_INSTRUMENTATIONS - value: AspNet,HttpClient - name: DOTNET_STARTUP_HOOKS value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" - name: DOTNET_ADDITIONAL_DEPS diff --git a/versions.txt b/versions.txt index c985f7257..0892f54b5 100644 --- a/versions.txt +++ b/versions.txt @@ -24,4 +24,4 @@ autoinstrumentation-python=0.32b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.2.0-beta.1 +autoinstrumentation-dotnet=0.3.0-beta.1 From c900d0e87da1dc013b4951f21a21adea7693ef7c Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 30 Aug 2022 06:28:20 +0530 Subject: [PATCH 0571/1234] adds dotnet-autoinstrumentation image version env var to the operator image publish workflow (#1060) --- .github/workflows/publish-images.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index d31b0878e..af7ed8a98 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -27,6 +27,7 @@ jobs: grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print "AUTO_INSTRUMENTATION_JAVA_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print "AUTO_INSTRUMENTATION_DOTNET_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -79,6 +80,7 @@ jobs: TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }} AUTO_INSTRUMENTATION_JAVA_VERSION=${{ env.AUTO_INSTRUMENTATION_JAVA_VERSION }} AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} - AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env. AUTO_INSTRUMENTATION_PYTHON_VERSION }} + AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }} + AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache From 2688ea96d6df00aff9ed4f721319becd40099fd5 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Tue, 30 Aug 2022 17:52:18 +0530 Subject: [PATCH 0572/1234] Bump python instrumentation versions (#1063) --- autoinstrumentation/python/requirements.txt | 82 ++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index ad49c3e26..a36c6dbee 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,49 +1,49 @@ -opentelemetry-distro==0.32b0 +opentelemetry-distro==0.33b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.12.0rc2 +opentelemetry-exporter-otlp-proto-http==1.12.0 -opentelemetry-propagator-b3==1.12.0rc2 -opentelemetry-propagator-jaeger==1.12.0rc2 +opentelemetry-propagator-b3==1.12.0 +opentelemetry-propagator-jaeger==1.12.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.32b0 -opentelemetry-propagator-ot-trace==0.32b0 +opentelemetry-instrumentation==0.33b0 +opentelemetry-propagator-ot-trace==0.33b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.32b0 -opentelemetry-instrumentation-aiopg==0.32b0 -opentelemetry-instrumentation-asgi==0.32b0 -opentelemetry-instrumentation-asyncpg==0.32b0 -opentelemetry-instrumentation-boto==0.32b0 -opentelemetry-instrumentation-botocore==0.32b0 -opentelemetry-instrumentation-celery==0.32b0 -opentelemetry-instrumentation-dbapi==0.32b0 -opentelemetry-instrumentation-django==0.32b0 -opentelemetry-instrumentation-elasticsearch==0.32b0 -opentelemetry-instrumentation-falcon==0.32b0 -opentelemetry-instrumentation-fastapi==0.32b0 -opentelemetry-instrumentation-flask==0.32b0 -opentelemetry-instrumentation-grpc==0.32b0 -opentelemetry-instrumentation-httpx==0.32b0 -opentelemetry-instrumentation-jinja2==0.32b0 -opentelemetry-instrumentation-kafka-python==0.32b0 -opentelemetry-instrumentation-logging==0.32b0 -opentelemetry-instrumentation-mysql==0.32b0 -opentelemetry-instrumentation-pika==0.32b0 -opentelemetry-instrumentation-psycopg2==0.32b0 -opentelemetry-instrumentation-pymemcache==0.32b0 -opentelemetry-instrumentation-pymongo==0.32b0 -opentelemetry-instrumentation-pymysql==0.32b0 -opentelemetry-instrumentation-pyramid==0.32b0 -opentelemetry-instrumentation-redis==0.32b0 -opentelemetry-instrumentation-requests==0.32b0 -opentelemetry-instrumentation-sklearn==0.32b0 -opentelemetry-instrumentation-sqlalchemy==0.32b0 -opentelemetry-instrumentation-sqlite3==0.32b0 -opentelemetry-instrumentation-starlette==0.32b0 -opentelemetry-instrumentation-tornado==0.32b0 -opentelemetry-instrumentation-urllib==0.32b0 -opentelemetry-instrumentation-urllib3==0.32b0 -opentelemetry-instrumentation-wsgi==0.32b0 +opentelemetry-instrumentation-aiohttp-client==0.33b0 +opentelemetry-instrumentation-aiopg==0.33b0 +opentelemetry-instrumentation-asgi==0.33b0 +opentelemetry-instrumentation-asyncpg==0.33b0 +opentelemetry-instrumentation-boto==0.33b0 +opentelemetry-instrumentation-botocore==0.33b0 +opentelemetry-instrumentation-celery==0.33b0 +opentelemetry-instrumentation-dbapi==0.33b0 +opentelemetry-instrumentation-django==0.33b0 +opentelemetry-instrumentation-elasticsearch==0.33b0 +opentelemetry-instrumentation-falcon==0.33b0 +opentelemetry-instrumentation-fastapi==0.33b0 +opentelemetry-instrumentation-flask==0.33b0 +opentelemetry-instrumentation-grpc==0.33b0 +opentelemetry-instrumentation-httpx==0.33b0 +opentelemetry-instrumentation-jinja2==0.33b0 +opentelemetry-instrumentation-kafka-python==0.33b0 +opentelemetry-instrumentation-logging==0.33b0 +opentelemetry-instrumentation-mysql==0.33b0 +opentelemetry-instrumentation-pika==0.33b0 +opentelemetry-instrumentation-psycopg2==0.33b0 +opentelemetry-instrumentation-pymemcache==0.33b0 +opentelemetry-instrumentation-pymongo==0.33b0 +opentelemetry-instrumentation-pymysql==0.33b0 +opentelemetry-instrumentation-pyramid==0.33b0 +opentelemetry-instrumentation-redis==0.33b0 +opentelemetry-instrumentation-requests==0.33b0 +opentelemetry-instrumentation-sklearn==0.33b0 +opentelemetry-instrumentation-sqlalchemy==0.33b0 +opentelemetry-instrumentation-sqlite3==0.33b0 +opentelemetry-instrumentation-starlette==0.33b0 +opentelemetry-instrumentation-tornado==0.33b0 +opentelemetry-instrumentation-urllib==0.33b0 +opentelemetry-instrumentation-urllib3==0.33b0 +opentelemetry-instrumentation-wsgi==0.33b0 From b1f65dc8342241bfaf41e7084fa40844fcb801d7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 30 Aug 2022 16:54:48 +0200 Subject: [PATCH 0573/1234] Bump k8s API to 0.25.0 (#1067) * Bump k8s API to 0.25.0 Signed-off-by: Pavol Loffay * tidy Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- go.mod | 54 ++++++++------------ go.sum | 159 +++++++++++++++++++-------------------------------------- 2 files changed, 74 insertions(+), 139 deletions(-) diff --git a/go.mod b/go.mod index f2dc89a72..a15177689 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.9.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.4 - k8s.io/apimachinery v0.24.4 - k8s.io/client-go v0.24.4 - k8s.io/kubectl v0.24.3 + k8s.io/api v0.25.0 + k8s.io/apimachinery v0.25.0 + k8s.io/client-go v0.25.0 + k8s.io/kubectl v0.25.0 sigs.k8s.io/controller-runtime v0.12.3 ) @@ -24,19 +24,17 @@ require ( cloud.google.com/go v0.99.0 // indirect github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.19 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect + github.com/Azure/go-autorest/autorest v0.11.27 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/BurntSushi/toml v1.0.0 // indirect github.com/Microsoft/go-winio v0.4.16 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect - github.com/alessio/shellescape v1.4.1 // indirect github.com/armon/go-metrics v0.3.3 // indirect github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -48,30 +46,26 @@ require ( github.com/docker/docker v20.10.14+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 // indirect - github.com/emicklei/go-restful v2.9.5+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-kit/log v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect - github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-logr/zapr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.5 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.1.2 // indirect github.com/googleapis/gax-go/v2 v2.1.1 // indirect github.com/gophercloud/gophercloud v0.18.0 // indirect @@ -84,12 +78,10 @@ require ( github.com/hashicorp/serf v0.9.5 // indirect github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kudobuilder/kuttl v0.12.1 // indirect github.com/linode/linodego v0.28.5 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mattn/go-colorable v0.1.12 // indirect @@ -103,7 +95,6 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.1 // indirect @@ -112,36 +103,33 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/cobra v1.4.0 // indirect - github.com/thoas/go-funk v0.7.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/trace v1.9.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.61.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect - google.golang.org/grpc v1.42.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect + google.golang.org/grpc v1.47.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.24.2 // indirect - k8s.io/component-base v0.24.3 // indirect - k8s.io/klog/v2 v2.60.1 // indirect - k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect - sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect - sigs.k8s.io/kind v0.12.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + k8s.io/component-base v0.25.0 // indirect + k8s.io/klog/v2 v2.70.1 // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 39d509582..d30262888 100644 --- a/go.sum +++ b/go.sum @@ -20,7 +20,6 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0 h1:bAMqZidYkmIsUqe6PtkEPT7Q+vfizScn+jfNA6jwK9c= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= @@ -66,8 +65,9 @@ github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUd github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.19 h1:7/IqD2fEYVha1EPeaiytVKhzmPV223pfkRIQUGOK2IE= github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -75,8 +75,10 @@ github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMl github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= +github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -86,8 +88,9 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= @@ -102,16 +105,12 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.0.0 h1:dtDWrepsVPfW9H/4y7dDgFc2MBUSeJhlaDtK13CxFlU= -github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= @@ -142,8 +141,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -185,7 +182,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= @@ -204,7 +200,6 @@ github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tj github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -217,15 +212,14 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.8 h1:H0wkS4AbVKTg9vyvBdCBrxoax8AMObKbNz9Fl2N0i4Y= github.com/containerd/containerd v1.4.8/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -249,7 +243,6 @@ github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhr github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= @@ -265,7 +258,6 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -277,10 +269,7 @@ github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY= -github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -289,8 +278,9 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -299,27 +289,20 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -328,7 +311,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -338,7 +320,6 @@ github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0 github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -355,10 +336,12 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -498,6 +481,9 @@ github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5 github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= @@ -541,7 +527,6 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= @@ -590,14 +575,11 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= @@ -605,7 +587,6 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= @@ -695,7 +676,6 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= @@ -768,20 +748,15 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kudobuilder/kuttl v0.12.1 h1:YUCQvLDlPQNdH35G/x3NpvanvTIQDUnBBYD1BnwZalE= -github.com/kudobuilder/kuttl v0.12.1/go.mod h1:mYb0/gii3lCNfKccbPN34i8vomyCLo4rJKbOhOAWPk0= github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= -github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -795,7 +770,6 @@ github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsI github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= @@ -805,13 +779,11 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -854,7 +826,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= @@ -882,7 +853,6 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -891,12 +861,13 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -923,9 +894,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -1007,7 +975,6 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1022,7 +989,6 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= @@ -1046,21 +1012,16 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1080,8 +1041,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/thoas/go-funk v0.7.0 h1:GmirKrs6j6zJbhJIficOsz2aAI7700KsU/5YrdHRM1Y= -github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= @@ -1107,7 +1066,6 @@ github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhe github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1166,7 +1124,6 @@ go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16g go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1222,8 +1179,10 @@ golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1327,8 +1286,9 @@ golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1340,7 +1300,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1391,7 +1350,6 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1459,10 +1417,9 @@ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb h1:PVGECzEo9Y3uOidtkHGdd347NjLtITfJFO9BxFpmRoo= -golang.org/x/sys v0.0.0-20220403205710-6acee93ad0eb/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1605,9 +1562,7 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0 h1:RDAPWfNFY06dffEXfn7hZF5Fr1ZbnChzfQZAPyBd1+I= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= @@ -1692,8 +1647,9 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1725,10 +1681,10 @@ google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1742,8 +1698,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1759,7 +1716,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1797,31 +1753,25 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= -k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= -k8s.io/api v0.24.4 h1:I5Y645gJ8zWKawyr78lVfDQkZrAViSbeRXsPZWTxmXk= -k8s.io/api v0.24.4/go.mod h1:42pVfA0NRxrtJhZQOvRSyZcJihzAdU59WBtTjYcB0/M= +k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= +k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.24.4 h1:S0Ur3J/PbivTcL43EdSdPhqCqKla2NIuneNwZcTDeGQ= -k8s.io/apimachinery v0.24.4/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= +k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= -k8s.io/cli-runtime v0.24.3/go.mod h1:In84wauoMOqa7JDvDSXGbf8lTNlr70fOGpYlYfJtSqA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= -k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= -k8s.io/client-go v0.24.4 h1:hIAIJZIPyaw46AkxwyR0FRfM/pRxpUNTd3ysYu9vyRg= -k8s.io/client-go v0.24.4/go.mod h1:+AxlPWw/H6f+EJhRSjIeALaJT4tbeB/8g9BNvXGPd0Y= +k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= +k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/code-generator v0.24.3/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= -k8s.io/component-base v0.24.3 h1:u99WjuHYCRJjS1xeLOx72DdRaghuDnuMgueiGMFy1ec= -k8s.io/component-base v0.24.3/go.mod h1:bqom2IWN9Lj+vwAkPNOv2TflsP1PeVDIwIN0lRthxYY= -k8s.io/component-helpers v0.24.3/go.mod h1:/1WNW8TfBOijQ1ED2uCHb4wtXYWDVNMqUll8h36iNVo= +k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= +k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1833,22 +1783,23 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kubectl v0.24.3 h1:PqY8ho/S/KuE2/hCC3Iee7X+lOtARYo0LQsNzvV/edE= -k8s.io/kubectl v0.24.3/go.mod h1:PYLcvw96sC1NLbxZEDbdlOEd6/C76VIWjGmWV5QjSk0= -k8s.io/metrics v0.24.3/go.mod h1:p1M0lhMySWfhISkSd3HEj8xIgrVnJTK3PPhFq2rA3To= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/kubectl v0.25.0 h1:/Wn1cFqo8ik3iee1EvpxYre3bkWsGLXzLQI6uCCAkQc= +k8s.io/kubectl v0.25.0/go.mod h1:n16ULWsOl2jmQpzt2o7Dud1t4o0+Y186ICb4O+GwKAU= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1856,19 +1807,15 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/kind v0.12.0 h1:LFynXwQkH1MrWI8pM1FQty0oUwEKjU5EkMaVZaPld8E= -sigs.k8s.io/kind v0.12.0/go.mod h1:EcgDSBVxz8Bvm19fx8xkioFrf9dC30fMJdOTXBSGNoM= -sigs.k8s.io/kustomize/api v0.11.4/go.mod h1:k+8RsqYbgpkIrJ4p9jcdPqe8DprLxFUUO0yNOq8C+xI= -sigs.k8s.io/kustomize/cmd/config v0.10.6/go.mod h1:/S4A4nUANUa4bZJ/Edt7ZQTyKOY9WCER0uBS1SW2Rco= -sigs.k8s.io/kustomize/kustomize/v4 v4.5.4/go.mod h1:Zo/Xc5FKD6sHl0lilbrieeGeZHVYCA4BzxeAaLI05Bg= -sigs.k8s.io/kustomize/kyaml v0.13.6/go.mod h1:yHP031rn1QX1lr/Xd934Ri/xdVNG8BE2ECa78Ht/kEg= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= From c1546e36d644d4faf16b240e3e38c3197416a605 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 1 Sep 2022 12:26:50 +0200 Subject: [PATCH 0574/1234] Use golang 1.19 (#1021) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- Dockerfile | 2 +- cmd/otel-allocator/Dockerfile | 2 +- cmd/otel-allocator/config/config.go | 4 ++-- cmd/otel-allocator/go.mod | 2 +- go.mod | 2 +- pkg/collector/adapters/config_validate.go | 6 +++--- pkg/collector/reconcile/horizontalpodautoscaler_test.go | 4 ++-- pkg/collector/reconcile/suite_test.go | 7 +++---- pkg/collector/upgrade/noop.go | 2 +- pkg/targetallocator/serviceaccount.go | 2 +- 14 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index dbcf645c1..6deff2320 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -35,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -43,7 +43,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: args: -v - version: v1.45 + version: v1.48 security: name: Security diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ac32a4cb0..2c2d9473d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ceed9ccc4..d84b0272d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/checkout@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 23f4adab4..1de97b83b 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index f3f25cdfb..89a589723 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.18 as builder +FROM golang:1.19 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 6f88d650a..3e856c08a 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,5 +1,5 @@ # Build the target allocator binary -FROM golang:1.18 as builder +FROM golang:1.19 as builder WORKDIR /app diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index d1776506e..4be3bdf3c 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -5,7 +5,7 @@ import ( "flag" "fmt" "io/fs" - "io/ioutil" + "os" "path/filepath" "time" @@ -59,7 +59,7 @@ func Load(file string) (Config, error) { func unmarshal(cfg *Config, configFile string) error { - yamlFile, err := ioutil.ReadFile(configFile) + yamlFile, err := os.ReadFile(configFile) if err != nil { return err } diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 2ed30a020..af1eec2ee 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator -go 1.18 +go 1.19 require ( github.com/fsnotify/fsnotify v1.5.1 diff --git a/go.mod b/go.mod index a15177689..1540459be 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.18 +go 1.19 retract v1.51.0 diff --git a/pkg/collector/adapters/config_validate.go b/pkg/collector/adapters/config_validate.go index c7fc0fa87..f34f36f2d 100644 --- a/pkg/collector/adapters/config_validate.go +++ b/pkg/collector/adapters/config_validate.go @@ -18,9 +18,9 @@ import ( "github.com/go-logr/logr" ) -//Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. -//GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. -func GetEnabledReceivers(logger logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { +// Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. +// GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. +func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { cfgReceivers, ok := config["receivers"] if !ok { return nil diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index af2737c51..13cfe1a37 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -17,7 +17,7 @@ package reconcile import ( "context" "fmt" - "io/ioutil" + "os" "testing" "github.com/stretchr/testify/assert" @@ -102,7 +102,7 @@ func TestExpectedHPA(t *testing.T) { } func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { - configYAML, err := ioutil.ReadFile("../testdata/test.yaml") + configYAML, err := os.ReadFile("../testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 0ce59bc92..c1640d6fe 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -18,7 +18,6 @@ import ( "context" "crypto/tls" "fmt" - "io/ioutil" "net" "os" "path/filepath" @@ -164,7 +163,7 @@ func TestMain(m *testing.M) { func params() Params { replicas := int32(2) - configYAML, err := ioutil.ReadFile("../testdata/test.yaml") + configYAML, err := os.ReadFile("../testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } @@ -208,9 +207,9 @@ func newParams(taContainerImage string, file string) (Params, error) { var err error if file == "" { - configYAML, err = ioutil.ReadFile("../testdata/test.yaml") + configYAML, err = os.ReadFile("../testdata/test.yaml") } else { - configYAML, err = ioutil.ReadFile(file) + configYAML, err = os.ReadFile(file) } if err != nil { return Params{}, fmt.Errorf("Error getting yaml file: %w", err) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index 1061bb046..1ec75d3dc 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -//nolint unused +// nolint unused func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { return otelcol, nil } diff --git a/pkg/targetallocator/serviceaccount.go b/pkg/targetallocator/serviceaccount.go index bd6d32df2..78627f3bf 100644 --- a/pkg/targetallocator/serviceaccount.go +++ b/pkg/targetallocator/serviceaccount.go @@ -31,7 +31,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { return instance.Spec.TargetAllocator.ServiceAccount } -//ServiceAccount returns the service account for the given instance. +// ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.TargetAllocatorServiceAccount(otelcol) From 19c186df1b89a3898169a16f91bd13fab5a6931f Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Thu, 1 Sep 2022 15:39:03 +0200 Subject: [PATCH 0575/1234] Change log message to V(2), be sure to pass strings so it doesn't panic (#1069) * Change log message to V(2), be sure to pass strings so it doesn't panic Signed-off-by: Kevin Earls * Changed log message to use V(1), updated parameters Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- internal/config/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/main.go b/internal/config/main.go index e2eee51a2..64aeaa551 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -140,7 +140,7 @@ func (c *Config) AutoDetect() error { return err } c.autoscalingVersion = hpaVersion - c.logger.Info("In Autodetect, Set HPA version to [", c.autoscalingVersion, "] from [", hpaVersion, "]") + c.logger.V(1).Info("autoscaling version detected", "autoscaling-version", c.autoscalingVersion.String()) return nil } From b753f569c70e2ca01314e9652460c207260f7db3 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 5 Sep 2022 09:21:42 +0200 Subject: [PATCH 0576/1234] Release v0.59.0 (#1074) * Release v0.59.0 Signed-off-by: Yuri Sa * updated controller-gen locally Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- CHANGELOG.md | 16 ++++++++++++++++ README.md | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58847d77b..9115181e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ Changes by Version ================== +0.59.0 +------------------- +### 💡 Enhancements 💡 +* Change log message to V(2), be sure to pass strings so it doesn't panic ([#1069](https://github.com/open-telemetry/opentelemetry-operator/pull/1069), [@kevinearls](https://github.com/kevinearls)) +* Use golang 1.19 ([#1021](https://github.com/open-telemetry/opentelemetry-operator/pull/1021), [@pavolloffay](https://github.com/pavolloffay)) +* Bump k8s API to 0.25.0 ([#1067](https://github.com/open-telemetry/opentelemetry-operator/pull/1067), [@pavolloffay](https://github.com/pavolloffay)) +* Bump python auto instrumentation version to 1.12&0.33b0 ([#1063](https://github.com/open-telemetry/opentelemetry-operator/pull/1063), [@srikanthccv](https://github.com/srikanthccv)) +* Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 - adjustment ([#1056](https://github.com/open-telemetry/opentelemetry-operator/pull/1056), [@Kielek](https://github.com/Kielek)) +* Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 ([#1057](https://github.com/open-telemetry/opentelemetry-operator/pull/1057), [@Kielek](https://github.com/Kielek)) +* Upgrade operator-sdk to 1.23.0 ([#1055](https://github.com/open-telemetry/opentelemetry-operator/pull/1055), [@iblancasa](https://github.com/iblancasa)) +### 🧰 Bug fixes 🧰 +* adds dotnet-auto-instrumentation image version env variable to the operator publish workflow ([#1060](https://github.com/open-telemetry/opentelemetry-operator/pull/1060), [@avadhut123pisal](https://github.com/avadhut123pisal)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.59.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.59.0) +* [OpenTelemetry Contrib - v0.59.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.59.0) + 0.58.0 ------------------- ### 🧰 Bug fixes 🧰 diff --git a/README.md b/README.md index fb09401cf..719485445 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.59.0 | v1.19 to v1.24 | v1 | | v0.58.0 | v1.19 to v1.24 | v1 | | v0.57.2 | v1.19 to v1.24 | v1 | | v0.56.0 | v1.19 to v1.24 | v1 | @@ -337,7 +338,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.41.1 | v1.21 to v1.23 | v1alpha2 | | v0.41.0 | v1.20 to v1.22 | v1alpha2 | | v0.40.0 | v1.20 to v1.22 | v1alpha2 | -| v0.39.0 | v1.20 to v1.22 | v1alpha2 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e1e6c4f2d..9f7da1d8e 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.58.0 + name: opentelemetry-operator.v0.59.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -282,7 +282,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.58.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.59.0 livenessProbe: httpGet: path: /healthz @@ -392,7 +392,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.58.0 + version: 0.59.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 0892f54b5..b1cf88eae 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.58.0 +opentelemetry-collector=0.59.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.58.0 +operator=0.59.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From 4655c158a017e9037d83d22383f405837f9eb890 Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Mon, 5 Sep 2022 10:14:42 +0200 Subject: [PATCH 0577/1234] Add retry loop for client.get of replicaset as that sometimes fails (#1072) * Add retry loop for client.get of replicaset as that sometimes fails Signed-off-by: Kevin Earls * Reduce total timeout, remove TODO Signed-off-by: Kevin Earls * Use apierrors to check error Signed-off-by: Kevin Earls * Appease the linter Signed-off-by: Kevin Earls * Lower meximum wait time to 2 seconds Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- pkg/instrumentation/sdk.go | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 1c0c31fc5..346fc7768 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -19,6 +19,7 @@ import ( "fmt" "sort" "strings" + "time" "unsafe" "github.com/go-logr/logr" @@ -26,8 +27,11 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.7.0" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -291,12 +295,22 @@ func (i *sdkInjector) addParentResourceLabels(ctx context.Context, uid bool, ns } // parent of ReplicaSet is e.g. Deployment which we are interested to know rs := appsv1.ReplicaSet{} - // ignore the error. The object might not exist, the error is not important, getting labels is just the best effort - //nolint:errcheck - i.client.Get(ctx, types.NamespacedName{ - Namespace: ns.Name, - Name: owner.Name, - }, &rs) + nsn := types.NamespacedName{Namespace: ns.Name, Name: owner.Name} + backOff := wait.Backoff{Duration: 10 * time.Millisecond, Factor: 1.5, Jitter: 0.1, Steps: 20, Cap: 2 * time.Second} + + checkError := func(err error) bool { + return apierrors.IsNotFound(err) + } + + getReplicaSet := func() error { + return i.client.Get(ctx, nsn, &rs) + } + + // use a retry loop to get the Deployment. A single call to client.get fails occasionally + err := retry.OnError(backOff, checkError, getReplicaSet) + if err != nil { + i.logger.Error(err, "failed to get replicaset", "replicaset", nsn.Name, "namespace", nsn.Namespace) + } i.addParentResourceLabels(ctx, uid, ns, rs.ObjectMeta, resources) case "deployment": resources[semconv.K8SDeploymentNameKey] = owner.Name From 4264ee7731dd41c98dc39368764b5ef660b8f350 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Sep 2022 21:37:15 +0200 Subject: [PATCH 0578/1234] Bump sigs.k8s.io/controller-runtime from 0.12.3 to 0.13.0 (#1076) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.12.3 to 0.13.0. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.12.3...v0.13.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 ++--- go.sum | 176 ++++++--------------------------------------------------- 2 files changed, 25 insertions(+), 165 deletions(-) diff --git a/go.mod b/go.mod index 1540459be..96453f92a 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( k8s.io/apimachinery v0.25.0 k8s.io/client-go v0.25.0 k8s.io/kubectl v0.25.0 - sigs.k8s.io/controller-runtime v0.12.3 + sigs.k8s.io/controller-runtime v0.13.0 ) require ( @@ -47,9 +47,9 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-kit/log v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.0 // indirect github.com/go-logr/zapr v1.2.3 // indirect @@ -97,7 +97,7 @@ require ( github.com/opencontainers/image-spec v1.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.1 // indirect + github.com/prometheus/client_golang v1.12.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect @@ -107,14 +107,14 @@ require ( go.opentelemetry.io/otel/trace v1.9.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect + go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.61.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -124,7 +124,7 @@ require ( gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.24.2 // indirect + k8s.io/apiextensions-apiserver v0.25.0 // indirect k8s.io/component-base v0.25.0 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect diff --git a/go.sum b/go.sum index d30262888..93f69d80c 100644 --- a/go.sum +++ b/go.sum @@ -39,7 +39,6 @@ cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -56,7 +55,6 @@ github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvj github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= @@ -64,7 +62,6 @@ github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8 github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= @@ -118,7 +115,6 @@ github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -144,7 +140,6 @@ github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8V github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= @@ -156,7 +151,6 @@ github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+r github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= @@ -171,7 +165,6 @@ github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/ github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= @@ -181,8 +174,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= @@ -193,8 +184,6 @@ github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6 github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -216,26 +205,14 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.8 h1:H0wkS4AbVKTg9vyvBdCBrxoax8AMObKbNz9Fl2N0i4Y= github.com/containerd/containerd v1.4.8/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -247,7 +224,6 @@ github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xb github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= @@ -278,7 +254,6 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -295,24 +270,20 @@ github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMi github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -333,13 +304,11 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= @@ -469,7 +438,6 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= @@ -488,9 +456,7 @@ github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2V github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -530,9 +496,6 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= @@ -594,26 +557,20 @@ github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= @@ -651,7 +608,6 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= @@ -703,7 +659,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -739,7 +694,6 @@ github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH6 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -756,7 +710,6 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -818,7 +771,6 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -846,7 +798,6 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= @@ -858,15 +809,11 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -891,7 +838,6 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -906,18 +852,15 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= @@ -926,8 +869,8 @@ github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -935,9 +878,7 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -953,7 +894,6 @@ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= @@ -965,7 +905,6 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -976,7 +915,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -998,30 +936,22 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1040,13 +970,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= @@ -1073,21 +1000,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -1108,24 +1022,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1133,7 +1035,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1147,10 +1049,9 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1165,7 +1066,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1180,7 +1080,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1222,7 +1121,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1262,7 +1160,6 @@ golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1283,10 +1180,7 @@ golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1 golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1317,8 +1211,8 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1345,16 +1239,13 @@ golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1375,14 +1266,12 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1397,7 +1286,6 @@ golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1410,14 +1298,11 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1443,8 +1328,8 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1480,7 +1365,6 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1506,7 +1390,6 @@ golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1527,7 +1410,6 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1607,7 +1489,6 @@ google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1619,7 +1500,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1647,7 +1527,6 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -1715,10 +1594,7 @@ gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1 gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1752,43 +1628,32 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= -k8s.io/apiextensions-apiserver v0.24.2 h1:/4NEQHKlEz1MlaK/wHT5KMKC9UKYz6NZz6JE6ov4G6k= -k8s.io/apiextensions-apiserver v0.24.2/go.mod h1:e5t2GMFVngUEHUd0wuCJzw8YDwZoqZfJiGOW6mm2hLQ= +k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= +k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= -k8s.io/apiserver v0.24.2/go.mod h1:pSuKzr3zV+L+MWqsEo0kHHYwCo77AT5qXbFXP2jbvFI= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= -k8s.io/code-generator v0.24.2/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.2/go.mod h1:ucHwW76dajvQ9B7+zecZAP3BVqvrHoOxm8olHEg0nmM= k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= k8s.io/kubectl v0.25.0 h1:/Wn1cFqo8ik3iee1EvpxYre3bkWsGLXzLQI6uCCAkQc= @@ -1796,24 +1661,19 @@ k8s.io/kubectl v0.25.0/go.mod h1:n16ULWsOl2jmQpzt2o7Dud1t4o0+Y186ICb4O+GwKAU= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/controller-runtime v0.12.3 h1:FCM8xeY/FI8hoAfh/V4XbbYMY20gElh9yh+A98usMio= -sigs.k8s.io/controller-runtime v0.12.3/go.mod h1:qKsk4WE6zW2Hfj0G4v10EnNB2jMG1C+NTb8h+DwCoU0= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= +sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= From b7081575f8742cddbf82b7e59c33b405882ba8af Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Tue, 6 Sep 2022 10:29:25 +0200 Subject: [PATCH 0579/1234] Make sure we return the right version when autoscaling v2 is found (#1075) Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- pkg/autodetect/main.go | 6 +++--- pkg/autodetect/main_test.go | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go index 57d6748f6..dc4c23736 100644 --- a/pkg/autodetect/main.go +++ b/pkg/autodetect/main.go @@ -95,7 +95,7 @@ func (a *autoDetect) HPAVersion() (AutoscalingVersion, error) { for _, version := range versions { if version.Version == "v2" || version.Version == "v2beta2" { - return toAutoscalingVersion(version.Version), nil + return ToAutoScalingVersion(version.Version), nil } } return AutoscalingVersionUnknown, errors.New("Failed to find appropriate version of apiGroup autoscaling, only v2 and v2beta2 are supported") @@ -117,10 +117,10 @@ func (v AutoscalingVersion) String() string { return "unknown" } -func toAutoscalingVersion(version string) AutoscalingVersion { +func ToAutoScalingVersion(version string) AutoscalingVersion { switch version { case "v2": - return AutoscalingVersionV2Beta2 + return AutoscalingVersionV2 case "v2beta2": return AutoscalingVersionV2Beta2 } diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index 42be4eba1..eea043120 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -94,3 +94,9 @@ func TestAutoscalingVersionToString(t *testing.T) { assert.Equal(t, "v2beta2", autodetect.AutoscalingVersionV2Beta2.String()) assert.Equal(t, "unknown", autodetect.AutoscalingVersionUnknown.String()) } + +func TestToAutoScalingVersion(t *testing.T) { + assert.Equal(t, autodetect.AutoscalingVersionV2, autodetect.ToAutoScalingVersion("v2")) + assert.Equal(t, autodetect.AutoscalingVersionV2Beta2, autodetect.ToAutoScalingVersion("v2beta2")) + assert.Equal(t, autodetect.AutoscalingVersionUnknown, autodetect.ToAutoScalingVersion("fred")) +} From 408fc82d090d7a2e6c03afc1430e330003e3bffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 12 Sep 2022 17:04:04 +0200 Subject: [PATCH 0580/1234] Bump .NET OTel AutoInstrumentation to 0.3.1-beta.1 (#1085) --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 591a71e77..efa59c1d8 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.3.0-beta.1 \ No newline at end of file +0.3.1-beta.1 From e4e0cb65cdeeebe4e8727b5588effe19583e6df1 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 12 Sep 2022 12:21:10 -0400 Subject: [PATCH 0581/1234] Introduce ability to specify strategies for target allocation (#1079) * Cribbed from another branch * Refactor part 2 * Fix tests * Remove deadlocking problem * Update based on comments * Unexported some fields, added blocker and comments about invariants * Comments and imports fixed --- apis/v1alpha1/opentelemetrycollector_types.go | 2 + apis/v1alpha1/zz_generated.deepcopy.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 4 + cmd/otel-allocator/allocation/allocator.go | 237 ---------------- .../allocation/allocator_test.go | 267 ------------------ cmd/otel-allocator/allocation/http.go | 23 +- cmd/otel-allocator/allocation/http_test.go | 45 +-- .../allocation/least_weighted.go | 206 ++++++++++++++ .../allocation/least_weighted_test.go | 264 +++++++++++++++++ cmd/otel-allocator/allocation/strategy.go | 89 ++++++ cmd/otel-allocator/collector/collector.go | 41 +-- .../collector/collector_test.go | 31 +- cmd/otel-allocator/config/config.go | 12 +- cmd/otel-allocator/diff/diff.go | 40 +++ cmd/otel-allocator/diff/diff_test.go | 63 +++++ cmd/otel-allocator/discovery/discovery.go | 14 +- .../discovery/discovery_test.go | 9 +- cmd/otel-allocator/main.go | 47 +-- cmd/otel-allocator/watcher/file.go | 1 + cmd/otel-allocator/watcher/main.go | 5 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 4 + docs/api.md | 7 + pkg/collector/reconcile/configmap.go | 5 + pkg/collector/reconcile/configmap_test.go | 4 +- 24 files changed, 800 insertions(+), 622 deletions(-) delete mode 100644 cmd/otel-allocator/allocation/allocator.go delete mode 100644 cmd/otel-allocator/allocation/allocator_test.go create mode 100644 cmd/otel-allocator/allocation/least_weighted.go create mode 100644 cmd/otel-allocator/allocation/least_weighted_test.go create mode 100644 cmd/otel-allocator/allocation/strategy.go create mode 100644 cmd/otel-allocator/diff/diff.go create mode 100644 cmd/otel-allocator/diff/diff_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 747736361..ac79522da 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -108,6 +108,8 @@ type OpenTelemetryCollectorSpec struct { // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. type OpenTelemetryTargetAllocator struct { + // AllocationStrategy determines which strategy the target allocator should use for allocation + AllocationStrategy string `json:"allocationStrategy,omitempty"` // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index cba3b24b9..776bebf9f 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -20,7 +20,7 @@ package v1alpha1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index da91c7ce0..01dc8f2e2 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -683,6 +683,10 @@ spec: description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. properties: + allocationStrategy: + description: AllocationStrategy determines which strategy the + target allocator should use for allocation + type: string enabled: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. diff --git a/cmd/otel-allocator/allocation/allocator.go b/cmd/otel-allocator/allocation/allocator.go deleted file mode 100644 index be4d82d3e..000000000 --- a/cmd/otel-allocator/allocation/allocator.go +++ /dev/null @@ -1,237 +0,0 @@ -package allocation - -import ( - "fmt" - "net/url" - "sync" - - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/common/model" -) - -var ( - collectorsAllocatable = promauto.NewGauge(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_collectors_allocatable", - Help: "Number of collectors the allocator is able to allocate to.", - }) - targetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_targets_per_collector", - Help: "The number of targets for each collector.", - }, []string{"collector_name"}) - timeToAssign = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "opentelemetry_allocator_time_to_allocate", - Help: "The time it takes to allocate", - }, []string{"method"}) -) - -/* - Load balancer will serve on an HTTP server exposing /jobs//targets - The targets are allocated using the least connection method - Load balancer will need information about the collectors in order to set the URLs - Keep a Map of what each collector currently holds and update it based on new scrape target updates -*/ - -type TargetItem struct { - JobName string - Link LinkJSON - TargetURL string - Label model.LabelSet - Collector *collector -} - -func (t TargetItem) hash() string { - return t.JobName + t.TargetURL + t.Label.Fingerprint().String() -} - -// Create a struct that holds collector - and jobs for that collector -// This struct will be parsed into endpoint with collector and jobs info - -type collector struct { - Name string - NumTargets int -} - -// Allocator makes decisions to distribute work among -// a number of OpenTelemetry collectors based on the number of targets. -// Users need to call SetTargets when they have new targets in their -// clusters and call SetCollectors when the collectors have changed. -type Allocator struct { - // m protects collectors and targetItems for concurrent use. - m sync.RWMutex - collectors map[string]*collector // all current collectors - targetItems map[string]*TargetItem - - log logr.Logger -} - -// TargetItems returns a shallow copy of the targetItems map. -func (allocator *Allocator) TargetItems() map[string]*TargetItem { - allocator.m.RLock() - defer allocator.m.RUnlock() - targetItemsCopy := make(map[string]*TargetItem) - for k, v := range allocator.targetItems { - targetItemsCopy[k] = v - } - return targetItemsCopy -} - -// Collectors returns a shallow copy of the collectors map. -func (allocator *Allocator) Collectors() map[string]*collector { - allocator.m.RLock() - defer allocator.m.RUnlock() - collectorsCopy := make(map[string]*collector) - for k, v := range allocator.collectors { - collectorsCopy[k] = v - } - return collectorsCopy -} - -// findNextCollector finds the next collector with fewer number of targets. -// This method is called from within SetTargets and SetCollectors, whose caller -// acquires the needed lock. -func (allocator *Allocator) findNextCollector() *collector { - var col *collector - for _, v := range allocator.collectors { - // If the initial collector is empty, set the initial collector to the first element of map - if col == nil { - col = v - } else { - if v.NumTargets < col.NumTargets { - col = v - } - } - } - return col -} - -// addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems -// This method is called from within SetTargets and SetCollectors, whose caller acquires the needed lock. -// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap -func (allocator *Allocator) addTargetToTargetItems(target *TargetItem) { - chosenCollector := allocator.findNextCollector() - targetItem := TargetItem{ - JobName: target.JobName, - Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, - TargetURL: target.TargetURL, - Label: target.Label, - Collector: chosenCollector, - } - allocator.targetItems[targetItem.hash()] = &targetItem - chosenCollector.NumTargets++ - targetsPerCollector.WithLabelValues(chosenCollector.Name).Set(float64(chosenCollector.NumTargets)) -} - -// getCollectorChanges returns the new and removed collectors respectively. -// This method is called from within SetCollectors, which acquires the needed lock. -func (allocator *Allocator) getCollectorChanges(collectors []string) ([]string, []string) { - var newCollectors []string - var removedCollectors []string - // Used as a set to check for removed collectors - tempCollectorMap := map[string]bool{} - for _, s := range collectors { - if _, found := allocator.collectors[s]; !found { - newCollectors = append(newCollectors, s) - } - tempCollectorMap[s] = true - } - for k := range allocator.collectors { - if _, found := tempCollectorMap[k]; !found { - removedCollectors = append(removedCollectors, k) - } - } - return newCollectors, removedCollectors -} - -// SetTargets accepts a list of targets that will be used to make -// load balancing decisions. This method should be called when there are -// new targets discovered or existing targets are shutdown. -func (allocator *Allocator) SetTargets(targets []TargetItem) { - timer := prometheus.NewTimer(timeToAssign.WithLabelValues("SetTargets")) - defer timer.ObserveDuration() - - allocator.m.Lock() - defer allocator.m.Unlock() - - // Make the temp map for access - tempTargetMap := make(map[string]TargetItem, len(targets)) - for _, target := range targets { - tempTargetMap[target.hash()] = target - } - - // Check for removals - for k, target := range allocator.targetItems { - // if the old target is no longer in the new list, remove it - if _, ok := tempTargetMap[k]; !ok { - allocator.collectors[target.Collector.Name].NumTargets-- - delete(allocator.targetItems, k) - targetsPerCollector.WithLabelValues(target.Collector.Name).Set(float64(allocator.collectors[target.Collector.Name].NumTargets)) - } - } - - // Check for additions - for k, target := range tempTargetMap { - // Do nothing if the item is already there - if _, ok := allocator.targetItems[k]; ok { - continue - } else { - // Assign new set of collectors with the one different name - allocator.addTargetToTargetItems(&target) - } - } -} - -// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. -// This method is called when Collectors are added or removed. -func (allocator *Allocator) SetCollectors(collectors []string) { - log := allocator.log.WithValues("component", "opentelemetry-targetallocator") - timer := prometheus.NewTimer(timeToAssign.WithLabelValues("SetCollectors")) - defer timer.ObserveDuration() - - collectorsAllocatable.Set(float64(len(collectors))) - if len(collectors) == 0 { - log.Info("No collector instances present") - return - } - - allocator.m.Lock() - defer allocator.m.Unlock() - newCollectors, removedCollectors := allocator.getCollectorChanges(collectors) - if len(newCollectors) == 0 && len(removedCollectors) == 0 { - log.Info("No changes to the collectors found") - return - } - - // Clear existing collectors - for _, k := range removedCollectors { - delete(allocator.collectors, k) - targetsPerCollector.WithLabelValues(k).Set(0) - } - // Insert the new collectors - for _, i := range newCollectors { - allocator.collectors[i] = &collector{Name: i, NumTargets: 0} - } - - // find targets which need to be redistributed - var redistribute []*TargetItem - for _, item := range allocator.targetItems { - for _, s := range removedCollectors { - if item.Collector.Name == s { - redistribute = append(redistribute, item) - } - } - } - // Re-Allocate the existing targets - for _, item := range redistribute { - allocator.addTargetToTargetItems(item) - } -} - -func NewAllocator(log logr.Logger) *Allocator { - return &Allocator{ - log: log, - collectors: make(map[string]*collector), - targetItems: make(map[string]*TargetItem), - } -} diff --git a/cmd/otel-allocator/allocation/allocator_test.go b/cmd/otel-allocator/allocation/allocator_test.go deleted file mode 100644 index 0b754cb47..000000000 --- a/cmd/otel-allocator/allocation/allocator_test.go +++ /dev/null @@ -1,267 +0,0 @@ -package allocation - -import ( - "math" - "testing" - - "github.com/prometheus/common/model" - "github.com/stretchr/testify/assert" - logf "sigs.k8s.io/controller-runtime/pkg/log" -) - -var logger = logf.Log.WithName("unit-tests") - -// Tests the least connection - The expected collector after running findNextCollector should be the collector with the least amount of workload -func TestFindNextCollector(t *testing.T) { - s := NewAllocator(logger) - - defaultCol := collector{Name: "default-col", NumTargets: 1} - maxCol := collector{Name: "max-col", NumTargets: 2} - leastCol := collector{Name: "least-col", NumTargets: 0} - s.collectors[maxCol.Name] = &maxCol - s.collectors[leastCol.Name] = &leastCol - s.collectors[defaultCol.Name] = &defaultCol - - assert.Equal(t, "least-col", s.findNextCollector().Name) -} - -func TestSetCollectors(t *testing.T) { - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - - expectedColLen := len(cols) - collectors := s.Collectors() - assert.Len(t, collectors, expectedColLen) - - for _, i := range cols { - assert.NotNil(t, collectors[i]) - } -} - -func TestAddingAndRemovingTargets(t *testing.T) { - // prepare allocator with initial targets and collectors - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - labels := model.LabelSet{} - - initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} - var targetList []TargetItem - for _, i := range initTargets { - targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) - } - - // test that targets and collectors are added properly - s.SetTargets(targetList) - - // verify - expectedTargetLen := len(initTargets) - assert.Len(t, s.TargetItems(), expectedTargetLen) - - // prepare second round of targets - tar := []string{"prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004"} - var newTargetList []TargetItem - for _, i := range tar { - newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) - } - - // test that fewer targets are found - removed - s.SetTargets(newTargetList) - - // verify - targetItems := s.TargetItems() - expectedNewTargetLen := len(tar) - assert.Len(t, targetItems, expectedNewTargetLen) - - // verify results map - for _, i := range tar { - _, ok := targetItems["sample-name"+i+labels.Fingerprint().String()] - assert.True(t, ok) - } -} - -// Tests that two targets with the same target url and job name but different label set are both added -func TestAllocationCollision(t *testing.T) { - // prepare allocator with initial targets and collectors - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - firstLabels := model.LabelSet{ - "test": "test1", - } - secondLabels := model.LabelSet{ - "test": "test2", - } - - targetList := []TargetItem{ - {JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: firstLabels}, - {JobName: "sample-name", TargetURL: "0.0.0.0:8000", Label: secondLabels}, - } - - // test that targets and collectors are added properly - s.SetTargets(targetList) - - // verify - targetItems := s.TargetItems() - expectedTargetLen := len(targetList) - assert.Len(t, targetItems, expectedTargetLen) - - // verify results map - for _, i := range targetList { - _, ok := targetItems[i.hash()] - assert.True(t, ok) - } -} - -func TestNoCollectorReassignment(t *testing.T) { - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - labels := model.LabelSet{} - - expectedColLen := len(cols) - assert.Len(t, s.collectors, expectedColLen) - - for _, i := range cols { - assert.NotNil(t, s.collectors[i]) - } - initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} - var targetList []TargetItem - for _, i := range initTargets { - targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) - } - // test that targets and collectors are added properly - s.SetTargets(targetList) - - // verify - expectedTargetLen := len(initTargets) - targetItems := s.TargetItems() - assert.Len(t, targetItems, expectedTargetLen) - - // assign new set of collectors with the same names - newCols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(newCols) - - newTargetItems := s.TargetItems() - assert.Equal(t, targetItems, newTargetItems) - -} - -func TestSmartCollectorReassignment(t *testing.T) { - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - labels := model.LabelSet{} - - expectedColLen := len(cols) - assert.Len(t, s.collectors, expectedColLen) - - for _, i := range cols { - assert.NotNil(t, s.collectors[i]) - } - initTargets := []string{"prometheus:1000", "prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005"} - var targetList []TargetItem - for _, i := range initTargets { - targetList = append(targetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: labels}) - } - // test that targets and collectors are added properly - s.SetTargets(targetList) - - // verify - expectedTargetLen := len(initTargets) - targetItems := s.TargetItems() - assert.Len(t, targetItems, expectedTargetLen) - - // assign new set of collectors with the same names - newCols := []string{"col-1", "col-2", "col-4"} - s.SetCollectors(newCols) - - newTargetItems := s.TargetItems() - assert.Equal(t, len(targetItems), len(newTargetItems)) - for key, targetItem := range targetItems { - item, ok := newTargetItems[key] - assert.True(t, ok, "all target items should be found in new target item list") - if targetItem.Collector.Name != "col-3" { - assert.Equal(t, targetItem.Collector.Name, item.Collector.Name) - } else { - assert.Equal(t, "col-4", item.Collector.Name) - } - } -} - -// Tests that the delta in number of targets per collector is less than 15% of an even distribution -func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { - - // prepare allocator with 3 collectors and 'random' amount of targets - s := NewAllocator(logger) - - cols := []string{"col-1", "col-2", "col-3"} - s.SetCollectors(cols) - - targets := []string{"prometheus:1001", "prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1005", "prometheus:1006", - "prometheus:1011", "prometheus:1012", "prometheus:1013", "prometheus:1014", "prometheus:1015", "prometheus:1016", - "prometheus:1021", "prometheus:1022", "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1026"} - var newTargetList []TargetItem - for _, i := range targets { - newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) - } - s.SetTargets(newTargetList) - - // Divisor needed to get 15% - divisor := 6.7 - - targetItemLen := len(s.TargetItems()) - collectors := s.Collectors() - count := targetItemLen / len(collectors) - percent := float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, percent) - } - - // removing targets at 'random' - targets = []string{"prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1006", - "prometheus:1011", "prometheus:1012", "prometheus:1013", "prometheus:1014", "prometheus:1016", - "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1026"} - newTargetList = []TargetItem{} - for _, i := range targets { - newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) - } - s.SetTargets(newTargetList) - - targetItemLen = len(s.TargetItems()) - collectors = s.Collectors() - count = targetItemLen / len(collectors) - percent = float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, math.Round(percent)) - } - // adding targets at 'random' - targets = []string{"prometheus:1002", "prometheus:1003", "prometheus:1004", "prometheus:1006", - "prometheus:1011", "prometheus:1012", "prometheus:1001", "prometheus:1014", "prometheus:1016", - "prometheus:1023", "prometheus:1024", "prometheus:1025", "prometheus:1126", "prometheus:1227"} - newTargetList = []TargetItem{} - for _, i := range targets { - newTargetList = append(newTargetList, TargetItem{JobName: "sample-name", TargetURL: i, Label: model.LabelSet{}}) - } - s.SetTargets(newTargetList) - - targetItemLen = len(s.TargetItems()) - collectors = s.Collectors() - count = targetItemLen / len(collectors) - percent = float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, math.Round(percent)) - } -} diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index ba2602fff..88622aef6 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -21,12 +21,12 @@ type targetGroupJSON struct { Labels model.LabelSet `json:"labels"` } -func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *Allocator) map[string]collectorJSON { +func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator Allocator) map[string]collectorJSON { displayData := make(map[string]collectorJSON) for _, j := range allocator.TargetItems() { if j.JobName == job { var targetList []TargetItem - targetList = append(targetList, cMap[j.Collector.Name+j.JobName]...) + targetList = append(targetList, cMap[j.CollectorName+j.JobName]...) var targetGroupList []targetGroupJSON @@ -37,30 +37,27 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator *All }) } - displayData[j.Collector.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(j.JobName), j.Collector.Name), Jobs: targetGroupList} + displayData[j.CollectorName] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(j.JobName), j.CollectorName), Jobs: targetGroupList} } } return displayData } -func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator *Allocator) []targetGroupJSON { +func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator Allocator) []targetGroupJSON { var tgs []targetGroupJSON group := make(map[string]string) labelSet := make(map[string]model.LabelSet) - for _, col := range allocator.Collectors() { - if col.Name == collector { - for _, targetItemArr := range cMap { - for _, targetItem := range targetItemArr { - if targetItem.Collector.Name == collector && targetItem.JobName == job { - group[targetItem.Label.String()] = targetItem.TargetURL - labelSet[targetItem.TargetURL] = targetItem.Label - } + if _, ok := allocator.Collectors()[collector]; ok { + for _, targetItemArr := range cMap { + for _, targetItem := range targetItemArr { + if targetItem.CollectorName == collector && targetItem.JobName == job { + group[targetItem.Label.String()] = targetItem.TargetURL + labelSet[targetItem.TargetURL] = targetItem.Label } } } } - for _, v := range group { tgs = append(tgs, targetGroupJSON{Targets: []string{v}, Labels: labelSet[v]}) } diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index ed62c1113..1b8cf9726 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -9,15 +9,15 @@ import ( ) func TestGetAllTargetsByCollectorAndJob(t *testing.T) { - baseAllocator := NewAllocator(logger) - baseAllocator.SetCollectors([]string{"test-collector"}) - statefulAllocator := NewAllocator(logger) - statefulAllocator.SetCollectors([]string{"test-collector-0"}) + baseAllocator, _ := New("least-weighted", logger) + baseAllocator.SetCollectors(map[string]*Collector{"test-collector": {Name: "test-collector"}}) + statefulAllocator, _ := New("least-weighted", logger) + statefulAllocator.SetCollectors(map[string]*Collector{"test-collector-0": {Name: "test-collector-0"}}) type args struct { collector string job string cMap map[string][]TargetItem - allocator *Allocator + allocator Allocator } var tests = []struct { name string @@ -46,11 +46,8 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { Label: model.LabelSet{ "test-label": "test-value", }, - TargetURL: "test-url", - Collector: &collector{ - Name: "test-collector", - NumTargets: 1, - }, + TargetURL: "test-url", + CollectorName: "test-collector", }, }, }, @@ -77,11 +74,8 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { Label: model.LabelSet{ "test-label": "test-value", }, - TargetURL: "test-url", - Collector: &collector{ - Name: "test-collector", - NumTargets: 1, - }, + TargetURL: "test-url", + CollectorName: "test-collector", }, }, "test-collectortest-job2": { @@ -90,11 +84,8 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { Label: model.LabelSet{ "test-label": "test-value", }, - TargetURL: "test-url", - Collector: &collector{ - Name: "test-collector", - NumTargets: 1, - }, + TargetURL: "test-url", + CollectorName: "test-collector", }, }, }, @@ -122,11 +113,8 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { "test-label": "test-value", "foo": "bar", }, - TargetURL: "test-url1", - Collector: &collector{ - Name: "test-collector", - NumTargets: 2, - }, + TargetURL: "test-url1", + CollectorName: "test-collector", }, }, "test-collectortest-job2": { @@ -135,11 +123,8 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { Label: model.LabelSet{ "test-label": "test-value", }, - TargetURL: "test-url2", - Collector: &collector{ - Name: "test-collector", - NumTargets: 2, - }, + TargetURL: "test-url2", + CollectorName: "test-collector", }, }, }, diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go new file mode 100644 index 000000000..9e037567d --- /dev/null +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -0,0 +1,206 @@ +package allocation + +import ( + "fmt" + "net/url" + "sync" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" + + "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" +) + +var _ Allocator = &leastWeightedAllocator{} + +const strategyName = "least-weighted" + +/* + Load balancer will serve on an HTTP server exposing /jobs//targets + The targets are allocated using the least connection method + Load balancer will need information about the collectors in order to set the URLs + Keep a Map of what each collector currently holds and update it based on new scrape target updates +*/ + +// leastWeightedAllocator makes decisions to distribute work among +// a number of OpenTelemetry collectors based on the number of targets. +// Users need to call SetTargets when they have new targets in their +// clusters and call SetCollectors when the collectors have changed. +type leastWeightedAllocator struct { + // m protects collectors and targetItems for concurrent use. + m sync.RWMutex + // collectors is a map from a Collector's name to a Collector instance + collectors map[string]*Collector + // targetItems is a map from a target item's hash to the target items allocated state + targetItems map[string]*TargetItem + + log logr.Logger +} + +// TargetItems returns a shallow copy of the targetItems map. +func (allocator *leastWeightedAllocator) TargetItems() map[string]*TargetItem { + allocator.m.RLock() + defer allocator.m.RUnlock() + targetItemsCopy := make(map[string]*TargetItem) + for k, v := range allocator.targetItems { + targetItemsCopy[k] = v + } + return targetItemsCopy +} + +// Collectors returns a shallow copy of the collectors map. +func (allocator *leastWeightedAllocator) Collectors() map[string]*Collector { + allocator.m.RLock() + defer allocator.m.RUnlock() + collectorsCopy := make(map[string]*Collector) + for k, v := range allocator.collectors { + collectorsCopy[k] = v + } + return collectorsCopy +} + +// findNextCollector finds the next collector with fewer number of targets. +// This method is called from within SetTargets and SetCollectors, whose caller +// acquires the needed lock. This method assumes there are is at least 1 collector set +// INVARIANT: allocator.collectors must have at least 1 collector set +func (allocator *leastWeightedAllocator) findNextCollector() *Collector { + var col *Collector + for _, v := range allocator.collectors { + // If the initial collector is empty, set the initial collector to the first element of map + if col == nil { + col = v + } else if v.NumTargets < col.NumTargets { + col = v + } + } + return col +} + +// addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems +// This method is called from within SetTargets and SetCollectors, which acquire the needed lock. +// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap +// INVARIANT: allocator.collectors must have at least 1 collector set +func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetItem) { + chosenCollector := allocator.findNextCollector() + targetItem := &TargetItem{ + JobName: target.JobName, + Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, + TargetURL: target.TargetURL, + Label: target.Label, + CollectorName: chosenCollector.Name, + } + allocator.targetItems[targetItem.Hash()] = targetItem + chosenCollector.NumTargets++ + TargetsPerCollector.WithLabelValues(chosenCollector.Name, strategyName).Set(float64(chosenCollector.NumTargets)) +} + +// handleTargets receives the new and removed targets and reconciles the current state. +// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector +// Any net-new additions are assigned to the next available collector +func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*TargetItem]) { + // Check for removals + for k, target := range allocator.targetItems { + // if the current target is in the removals list + if _, ok := diff.Removals()[k]; ok { + c := allocator.collectors[target.CollectorName] + c.NumTargets-- + delete(allocator.targetItems, k) + TargetsPerCollector.WithLabelValues(target.CollectorName, strategyName).Set(float64(c.NumTargets)) + } + } + + // Check for additions + for k, target := range diff.Additions() { + // Do nothing if the item is already there + if _, ok := allocator.targetItems[k]; ok { + continue + } else { + // Add target to target pool and assign a collector + allocator.addTargetToTargetItems(target) + } + } +} + +// handleCollectors receives the new and removed collectors and reconciles the current state. +// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map +// Finally, any targets of removed collectors are reallocated to the next available collector. +func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Collector]) { + // Clear removed collectors + for _, k := range diff.Removals() { + delete(allocator.collectors, k.Name) + TargetsPerCollector.WithLabelValues(k.Name, strategyName).Set(0) + } + // Insert the new collectors + for _, i := range diff.Additions() { + allocator.collectors[i.Name] = NewCollector(i.Name) + } + + // Re-Allocate targets of the removed collectors + for _, item := range allocator.targetItems { + if _, ok := diff.Removals()[item.CollectorName]; ok { + allocator.addTargetToTargetItems(item) + } + } +} + +// SetTargets accepts a list of targets that will be used to make +// load balancing decisions. This method should be called when there are +// new targets discovered or existing targets are shutdown. +func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*TargetItem) { + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", strategyName)) + defer timer.ObserveDuration() + + allocator.m.Lock() + defer allocator.m.Unlock() + + if len(allocator.collectors) == 0 { + allocator.log.Info("No collector instances present, cannot set targets") + return + } + // Check for target changes + targetsDiff := diff.Maps(allocator.targetItems, targets) + // If there are any additions or removals + if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { + allocator.handleTargets(targetsDiff) + } + return +} + +// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. +// This method is called when Collectors are added or removed. +func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Collector) { + log := allocator.log.WithValues("component", "opentelemetry-targetallocator") + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", strategyName)) + defer timer.ObserveDuration() + + CollectorsAllocatable.WithLabelValues(strategyName).Set(float64(len(collectors))) + if len(collectors) == 0 { + log.Info("No collector instances present") + return + } + + allocator.m.Lock() + defer allocator.m.Unlock() + + // Check for collector changes + collectorsDiff := diff.Maps(allocator.collectors, collectors) + if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { + allocator.handleCollectors(collectorsDiff) + } + return +} + +func NewAllocator(log logr.Logger) Allocator { + return &leastWeightedAllocator{ + log: log, + collectors: make(map[string]*Collector), + targetItems: make(map[string]*TargetItem), + } +} + +func init() { + err := Register(strategyName, NewAllocator) + if err != nil { + panic(err) + } +} diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go new file mode 100644 index 000000000..c15c30a30 --- /dev/null +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -0,0 +1,264 @@ +package allocation + +import ( + "fmt" + "math" + "math/rand" + "testing" + + "github.com/prometheus/common/model" + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +var logger = logf.Log.WithName("unit-tests") + +func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*TargetItem { + toReturn := map[string]*TargetItem{} + for i := startingIndex; i < n+startingIndex; i++ { + collector := fmt.Sprintf("collector-%d", i%numCollectors) + newTarget := NewTargetItem(fmt.Sprintf("test-job-%d", i), "test-url", nil, collector) + toReturn[newTarget.Hash()] = newTarget + } + return toReturn +} + +func makeNCollectors(n int, targetsForEach int) map[string]*Collector { + toReturn := map[string]*Collector{} + for i := 0; i < n; i++ { + collector := fmt.Sprintf("collector-%d", i) + toReturn[collector] = &Collector{ + Name: collector, + NumTargets: targetsForEach, + } + } + return toReturn +} + +func TestSetCollectors(t *testing.T) { + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(3, 0) + s.SetCollectors(cols) + + expectedColLen := len(cols) + collectors := s.Collectors() + assert.Len(t, collectors, expectedColLen) + + for _, i := range cols { + assert.NotNil(t, collectors[i.Name]) + } +} + +func TestAddingAndRemovingTargets(t *testing.T) { + // prepare allocator with initial targets and collectors + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(3, 0) + s.SetCollectors(cols) + + initTargets := makeNNewTargets(6, 3, 0) + + // test that targets and collectors are added properly + s.SetTargets(initTargets) + + // verify + expectedTargetLen := len(initTargets) + assert.Len(t, s.TargetItems(), expectedTargetLen) + + // prepare second round of targets + tar := makeNNewTargets(4, 3, 0) + + // test that fewer targets are found - removed + s.SetTargets(tar) + + // verify + targetItems := s.TargetItems() + expectedNewTargetLen := len(tar) + assert.Len(t, targetItems, expectedNewTargetLen) + + // verify results map + for _, i := range tar { + _, ok := targetItems[i.Hash()] + assert.True(t, ok) + } +} + +// Tests that two targets with the same target url and job name but different label set are both added +func TestAllocationCollision(t *testing.T) { + // prepare allocator with initial targets and collectors + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(3, 0) + s.SetCollectors(cols) + firstLabels := model.LabelSet{ + "test": "test1", + } + secondLabels := model.LabelSet{ + "test": "test2", + } + firstTarget := NewTargetItem("sample-name", "0.0.0.0:8000", firstLabels, "") + secondTarget := NewTargetItem("sample-name", "0.0.0.0:8000", secondLabels, "") + + targetList := map[string]*TargetItem{ + firstTarget.Hash(): firstTarget, + secondTarget.Hash(): secondTarget, + } + + // test that targets and collectors are added properly + s.SetTargets(targetList) + + // verify + targetItems := s.TargetItems() + expectedTargetLen := len(targetList) + assert.Len(t, targetItems, expectedTargetLen) + + // verify results map + for _, i := range targetList { + _, ok := targetItems[i.Hash()] + assert.True(t, ok) + } +} + +func TestNoCollectorReassignment(t *testing.T) { + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(3, 0) + s.SetCollectors(cols) + + expectedColLen := len(cols) + assert.Len(t, s.Collectors(), expectedColLen) + + for _, i := range cols { + assert.NotNil(t, s.Collectors()[i.Name]) + } + initTargets := makeNNewTargets(6, 3, 0) + + // test that targets and collectors are added properly + s.SetTargets(initTargets) + + // verify + expectedTargetLen := len(initTargets) + targetItems := s.TargetItems() + assert.Len(t, targetItems, expectedTargetLen) + + // assign new set of collectors with the same names + newCols := makeNCollectors(3, 0) + s.SetCollectors(newCols) + + newTargetItems := s.TargetItems() + assert.Equal(t, targetItems, newTargetItems) + +} + +func TestSmartCollectorReassignment(t *testing.T) { + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(4, 0) + s.SetCollectors(cols) + + expectedColLen := len(cols) + assert.Len(t, s.Collectors(), expectedColLen) + + for _, i := range cols { + assert.NotNil(t, s.Collectors()[i.Name]) + } + initTargets := makeNNewTargets(6, 4, 0) + // test that targets and collectors are added properly + s.SetTargets(initTargets) + + // verify + expectedTargetLen := len(initTargets) + targetItems := s.TargetItems() + assert.Len(t, targetItems, expectedTargetLen) + + // assign new set of collectors with the same names + newCols := map[string]*Collector{ + "collector-0": { + Name: "collector-0", + }, "collector-1": { + Name: "collector-1", + }, "collector-2": { + Name: "collector-2", + }, "collector-4": { + Name: "collector-4", + }, + } + s.SetCollectors(newCols) + + newTargetItems := s.TargetItems() + assert.Equal(t, len(targetItems), len(newTargetItems)) + for key, targetItem := range targetItems { + item, ok := newTargetItems[key] + assert.True(t, ok, "all target items should be found in new target item list") + if targetItem.CollectorName != "collector-3" { + assert.Equal(t, targetItem.CollectorName, item.CollectorName) + } else { + assert.Equal(t, "collector-4", item.CollectorName) + } + } +} + +// Tests that the delta in number of targets per collector is less than 15% of an even distribution +func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { + + // prepare allocator with 3 collectors and 'random' amount of targets + s, _ := New("least-weighted", logger) + + cols := makeNCollectors(3, 0) + s.SetCollectors(cols) + + targets := makeNNewTargets(27, 3, 0) + s.SetTargets(targets) + + // Divisor needed to get 15% + divisor := 6.7 + + targetItemLen := len(s.TargetItems()) + collectors := s.Collectors() + count := targetItemLen / len(collectors) + percent := float64(targetItemLen) / divisor + + // test + for _, i := range collectors { + assert.InDelta(t, i.NumTargets, count, percent) + } + + // removing targets at 'random' + // Remove half of targets randomly + toDelete := len(targets) / 2 + counter := 0 + for index, _ := range targets { + shouldDelete := rand.Intn(toDelete) + if counter < shouldDelete { + delete(targets, index) + } + counter++ + } + s.SetTargets(targets) + + targetItemLen = len(s.TargetItems()) + collectors = s.Collectors() + count = targetItemLen / len(collectors) + percent = float64(targetItemLen) / divisor + + // test + for _, i := range collectors { + assert.InDelta(t, i.NumTargets, count, math.Round(percent)) + } + // adding targets at 'random' + for _, item := range makeNNewTargets(13, 3, 100) { + targets[item.Hash()] = item + } + s.SetTargets(targets) + + targetItemLen = len(s.TargetItems()) + collectors = s.Collectors() + count = targetItemLen / len(collectors) + percent = float64(targetItemLen) / divisor + + // test + for _, i := range collectors { + assert.InDelta(t, i.NumTargets, count, math.Round(percent)) + } +} diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go new file mode 100644 index 000000000..42166caf7 --- /dev/null +++ b/cmd/otel-allocator/allocation/strategy.go @@ -0,0 +1,89 @@ +package allocation + +import ( + "errors" + "fmt" + "net/url" + + "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/common/model" +) + +type AllocatorProvider func(log logr.Logger) Allocator + +var ( + registry = map[string]AllocatorProvider{} + + // TargetsPerCollector records how many targets have been assigned to each collector + // It is currently the responsibility of the strategy to track this information. + TargetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_targets_per_collector", + Help: "The number of targets for each collector.", + }, []string{"collector_name", "strategy"}) + CollectorsAllocatable = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_collectors_allocatable", + Help: "Number of collectors the allocator is able to allocate to.", + }, []string{"strategy"}) + TimeToAssign = promauto.NewHistogramVec(prometheus.HistogramOpts{ + Name: "opentelemetry_allocator_time_to_allocate", + Help: "The time it takes to allocate", + }, []string{"method", "strategy"}) +) + +func New(name string, log logr.Logger) (Allocator, error) { + if p, ok := registry[name]; ok { + return p(log), nil + } + return nil, errors.New(fmt.Sprintf("unregistered strategy: %s", name)) +} + +func Register(name string, provider AllocatorProvider) error { + if _, ok := registry[name]; ok { + return errors.New("already registered") + } + registry[name] = provider + return nil +} + +type Allocator interface { + SetCollectors(collectors map[string]*Collector) + SetTargets(targets map[string]*TargetItem) + TargetItems() map[string]*TargetItem + Collectors() map[string]*Collector +} + +type TargetItem struct { + JobName string + Link LinkJSON + TargetURL string + Label model.LabelSet + CollectorName string +} + +func NewTargetItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *TargetItem { + return &TargetItem{ + JobName: jobName, + Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, + TargetURL: targetURL, + Label: label, + CollectorName: collectorName, + } +} + +func (t TargetItem) Hash() string { + return t.JobName + t.TargetURL + t.Label.Fingerprint().String() +} + +// Collector Creates a struct that holds Collector information +// This struct will be parsed into endpoint with Collector and jobs info +// This struct can be extended with information like annotations and labels in the future +type Collector struct { + Name string + NumTargets int +} + +func NewCollector(name string) *Collector { + return &Collector{Name: name} +} diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index 7732d42f0..e1cf66ec1 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -15,6 +15,8 @@ import ( "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" ) const ( @@ -30,10 +32,9 @@ var ( ) type Client struct { - log logr.Logger - k8sClient kubernetes.Interface - collectorChan chan []string - close chan struct{} + log logr.Logger + k8sClient kubernetes.Interface + close chan struct{} } func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { @@ -49,8 +50,8 @@ func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { }, nil } -func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors []string)) { - collectorMap := map[string]bool{} +func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors map[string]*allocation.Collector)) { + collectorMap := map[string]*allocation.Collector{} log := k.log.WithValues("component", "opentelemetry-targetallocator") opts := metav1.ListOptions{ @@ -64,17 +65,11 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( for i := range pods.Items { pod := pods.Items[i] if pod.GetObjectMeta().GetDeletionTimestamp() == nil { - collectorMap[pod.Name] = true + collectorMap[pod.Name] = allocation.NewCollector(pod.Name) } } - collectorKeys := make([]string, len(collectorMap)) - i := 0 - for keys := range collectorMap { - collectorKeys[i] = keys - i++ - } - fn(collectorKeys) + fn(collectorMap) go func() { for { @@ -92,7 +87,7 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( }() } -func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]bool, fn func(collectors []string)) string { +func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) string { log := k.log.WithValues("component", "opentelemetry-targetallocator") for { collectorsDiscovered.Set(float64(len(collectorMap))) @@ -115,23 +110,11 @@ func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap switch event.Type { case watch.Added: - collectorMap[pod.Name] = true + collectorMap[pod.Name] = allocation.NewCollector(pod.Name) case watch.Deleted: delete(collectorMap, pod.Name) } - - collectorKeys := make([]string, len(collectorMap)) - i := 0 - for keys := range collectorMap { - collectorKeys[i] = keys - i++ - } - fn(collectorKeys) - select { - case k.collectorChan <- collectorKeys: - default: - fn(collectorKeys) - } + fn(collectorMap) case <-time.After(watcherTimeout): log.Info("Restarting watch routine") return "" diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go index 5ba5b0fb1..059e61670 100644 --- a/cmd/otel-allocator/collector/collector_test.go +++ b/cmd/otel-allocator/collector/collector_test.go @@ -4,7 +4,6 @@ import ( "context" "fmt" "os" - "sort" "testing" "github.com/stretchr/testify/assert" @@ -12,16 +11,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/kubernetes/fake" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" ) var client Client -var collectors = []string{} +var collectors = map[string]*allocation.Collector{} func TestMain(m *testing.M) { client = Client{ - k8sClient: fake.NewSimpleClientset(), - collectorChan: make(chan []string, 3), - close: make(chan struct{}), + k8sClient: fake.NewSimpleClientset(), + close: make(chan struct{}), } labelMap := map[string]string{ @@ -39,7 +39,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - go runWatch(context.Background(), &client, watcher.ResultChan(), map[string]bool{}, func(collectorList []string) { getCollectors(collectorList) }) + go runWatch(context.Background(), &client, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) { getCollectors(colMap) }) code := m.Run() @@ -49,18 +49,25 @@ func TestMain(m *testing.M) { } func TestWatchPodAddition(t *testing.T) { - expected := []string{"test-pod1", "test-pod2", "test-pod3"} + expected := map[string]*allocation.Collector{ + "test-pod1": { + Name: "test-pod1", + }, + "test-pod2": { + Name: "test-pod2", + }, + "test-pod3": { + Name: "test-pod3", + }, + } for _, k := range []string{"test-pod1", "test-pod2", "test-pod3"} { expected := pod(k) _, err := client.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), expected, metav1.CreateOptions{}) assert.NoError(t, err) - collectors = <-client.collectorChan } assert.Len(t, collectors, 3) - - sort.Strings(collectors) assert.Equal(t, collectors, expected) } @@ -70,16 +77,14 @@ func TestWatchPodDeletion(t *testing.T) { for _, k := range []string{"test-pod2", "test-pod3"} { err := client.k8sClient.CoreV1().Pods("test-ns").Delete(context.Background(), k, metav1.DeleteOptions{}) assert.NoError(t, err) - collectors = <-client.collectorChan } assert.Len(t, collectors, 1) - sort.Strings(collectors) assert.Equal(t, collectors, expected) } -func getCollectors(c []string) { +func getCollectors(c map[string]*allocation.Collector) { collectors = c } diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 4be3bdf3c..05d0e3840 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -31,8 +31,16 @@ const DefaultResyncTime = 5 * time.Minute const DefaultConfigFilePath string = "/conf/targetallocator.yaml" type Config struct { - LabelSelector map[string]string `yaml:"label_selector,omitempty"` - Config *promconfig.Config `yaml:"config"` + LabelSelector map[string]string `yaml:"label_selector,omitempty"` + Config *promconfig.Config `yaml:"config"` + AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` +} + +func (c Config) GetAllocationStrategy() string { + if c.AllocationStrategy != nil { + return *c.AllocationStrategy + } + return "least-weighted" } type PrometheusCRWatcherConfig struct { diff --git a/cmd/otel-allocator/diff/diff.go b/cmd/otel-allocator/diff/diff.go new file mode 100644 index 000000000..44ec55e04 --- /dev/null +++ b/cmd/otel-allocator/diff/diff.go @@ -0,0 +1,40 @@ +package diff + +// Changes is the result of the difference between two maps – items that are added and items that are removed +// This map is used to reconcile state differences. +type Changes[T any] struct { + additions map[string]T + removals map[string]T +} + +func (c Changes[T]) Additions() map[string]T { + return c.additions +} + +func (c Changes[T]) Removals() map[string]T { + return c.removals +} + +// Maps generates Changes for two maps with the same type signature by checking for any removals and then checking for +// additions. +func Maps[T any](current, new map[string]T) Changes[T] { + additions := map[string]T{} + removals := map[string]T{} + // Used as a set to check for removed items + newMembership := map[string]bool{} + for key, value := range new { + if _, found := current[key]; !found { + additions[key] = value + } + newMembership[key] = true + } + for key, value := range current { + if _, found := newMembership[key]; !found { + removals[key] = value + } + } + return Changes[T]{ + additions: additions, + removals: removals, + } +} diff --git a/cmd/otel-allocator/diff/diff_test.go b/cmd/otel-allocator/diff/diff_test.go new file mode 100644 index 000000000..bcae530d5 --- /dev/null +++ b/cmd/otel-allocator/diff/diff_test.go @@ -0,0 +1,63 @@ +package diff + +import ( + "reflect" + "testing" +) + +func TestDiffMaps(t *testing.T) { + type args struct { + current map[string]string + new map[string]string + } + tests := []struct { + name string + args args + want Changes[string] + }{ + { + name: "basic replacement", + args: args{ + current: map[string]string{ + "current": "one", + }, + new: map[string]string{ + "new": "another", + }, + }, + want: Changes[string]{ + additions: map[string]string{ + "new": "another", + }, + removals: map[string]string{ + "current": "one", + }, + }, + }, + { + name: "single addition", + args: args{ + current: map[string]string{ + "current": "one", + }, + new: map[string]string{ + "current": "one", + "new": "another", + }, + }, + want: Changes[string]{ + additions: map[string]string{ + "new": "another", + }, + removals: map[string]string{}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := Maps(tt.args.current, tt.args.new); !reflect.DeepEqual(got, tt.want) { + t.Errorf("DiffMaps() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 1714f9265..2c0393f61 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -5,13 +5,14 @@ import ( "github.com/go-kit/log" "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) var ( @@ -59,7 +60,7 @@ func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.C return m.manager.ApplyConfig(discoveryCfg) } -func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { +func (m *Manager) Watch(fn func(targets map[string]*allocation.TargetItem)) { log := m.log.WithValues("component", "opentelemetry-targetallocator") go func() { @@ -69,18 +70,19 @@ func (m *Manager) Watch(fn func(targets []allocation.TargetItem)) { log.Info("Service Discovery watch event stopped: discovery manager closed") return case tsets := <-m.manager.SyncCh(): - targets := []allocation.TargetItem{} + targets := map[string]*allocation.TargetItem{} for jobName, tgs := range tsets { var count float64 = 0 for _, tg := range tgs { for _, t := range tg.Targets { count++ - targets = append(targets, allocation.TargetItem{ + item := &allocation.TargetItem{ JobName: jobName, TargetURL: string(t[model.AddressLabel]), Label: t.Merge(tg.Labels), - }) + } + targets[item.Hash()] = item } } targetsDiscovered.WithLabelValues(jobName).Set(count) diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 11e601f36..7edacde40 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -8,14 +8,15 @@ import ( "testing" gokitlog "github.com/go-kit/log" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" ctrl "sigs.k8s.io/controller-runtime" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) var cfg config.Config @@ -32,7 +33,7 @@ func TestMain(m *testing.M) { manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger()) results = make(chan []string) - manager.Watch(func(targets []allocation.TargetItem) { + manager.Watch(func(targets map[string]*allocation.TargetItem) { var result []string for _, t := range targets { result = append(result, t.TargetURL) diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index bd2bd0a46..80d8ec474 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -12,15 +12,17 @@ import ( gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/gorilla/mux" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/client_golang/prometheus/promhttp" + _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" + ctrl "sigs.k8s.io/controller-runtime" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/client_golang/prometheus/promhttp" - ctrl "sigs.k8s.io/controller-runtime" ) var ( @@ -41,13 +43,22 @@ func main() { setupLog.Error(err, "Failed to parse parameters") os.Exit(1) } + cfg, err := config.Load(*cliConf.ConfigFilePath) + if err != nil { + setupLog.Error(err, "Unable to load configuration") + } cliConf.RootLogger.Info("Starting the Target Allocator") ctx := context.Background() log := ctrl.Log.WithName("allocator") - allocator := allocation.NewAllocator(log) + + allocator, err := allocation.New(cfg.GetAllocationStrategy(), log) + if err != nil { + setupLog.Error(err, "Unable to initialize allocation strategy") + os.Exit(1) + } watcher, err := allocatorWatcher.NewWatcher(setupLog, cliConf, allocator) if err != nil { setupLog.Error(err, "Can't start the watchers") @@ -60,7 +71,13 @@ func main() { defer discoveryManager.Close() discoveryManager.Watch(allocator.SetTargets) - srv, err := newServer(log, allocator, discoveryManager, cliConf) + k8sclient, err := configureFileDiscovery(log, allocator, discoveryManager, context.Background(), cliConf) + if err != nil { + setupLog.Error(err, "Can't start the k8s client") + os.Exit(1) + } + + srv, err := newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) if err != nil { setupLog.Error(err, "Can't start the server") } @@ -91,7 +108,7 @@ func main() { if err := srv.Shutdown(ctx); err != nil { setupLog.Error(err, "Cannot shutdown the server") } - srv, err = newServer(log, allocator, discoveryManager, cliConf) + srv, err = newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) if err != nil { setupLog.Error(err, "Error restarting the server with new config") } @@ -120,17 +137,13 @@ func main() { type server struct { logger logr.Logger - allocator *allocation.Allocator + allocator allocation.Allocator discoveryManager *lbdiscovery.Manager k8sClient *collector.Client server *http.Server } -func newServer(log logr.Logger, allocator *allocation.Allocator, discoveryManager *lbdiscovery.Manager, cliConf config.CLIConfig) (*server, error) { - k8sclient, err := configureFileDiscovery(log, allocator, discoveryManager, context.Background(), cliConf) - if err != nil { - return nil, err - } +func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, k8sclient *collector.Client, listenAddr *string) (*server, error) { s := &server{ logger: log, allocator: allocator, @@ -142,11 +155,11 @@ func newServer(log logr.Logger, allocator *allocation.Allocator, discoveryManage router.HandleFunc("/jobs", s.JobHandler).Methods("GET") router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") router.Path("/metrics").Handler(promhttp.Handler()) - s.server = &http.Server{Addr: *cliConf.ListenAddr, Handler: router} + s.server = &http.Server{Addr: *listenAddr, Handler: router} return s, nil } -func configureFileDiscovery(log logr.Logger, allocator *allocation.Allocator, discoveryManager *lbdiscovery.Manager, ctx context.Context, cliConfig config.CLIConfig) (*collector.Client, error) { +func configureFileDiscovery(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, ctx context.Context, cliConfig config.CLIConfig) (*collector.Client, error) { cfg, err := config.Load(*cliConfig.ConfigFilePath) if err != nil { return nil, err @@ -180,7 +193,7 @@ func (s *server) Shutdown(ctx context.Context) error { func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { displayData := make(map[string]allocation.LinkJSON) for _, v := range s.allocator.TargetItems() { - displayData[v.JobName] = allocation.LinkJSON{v.Link.Link} + displayData[v.JobName] = allocation.LinkJSON{Link: v.Link.Link} } jsonHandler(w, r, displayData) } @@ -201,7 +214,7 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { var compareMap = make(map[string][]allocation.TargetItem) // CollectorName+jobName -> TargetItem for _, v := range s.allocator.TargetItems() { - compareMap[v.Collector.Name+v.JobName] = append(compareMap[v.Collector.Name+v.JobName], *v) + compareMap[v.CollectorName+v.JobName] = append(compareMap[v.CollectorName+v.JobName], *v) } params := mux.Vars(r) jobId, err := url.QueryUnescape(params["job_id"]) diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index 262bb71bf..6adc3c33e 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -5,6 +5,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-logr/logr" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go index dd09ca1b0..dac48d5fb 100644 --- a/cmd/otel-allocator/watcher/main.go +++ b/cmd/otel-allocator/watcher/main.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/go-logr/logr" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) @@ -11,7 +12,7 @@ import ( type Manager struct { Events chan Event Errors chan error - allocator *allocation.Allocator + allocator allocation.Allocator watchers []Watcher } @@ -44,7 +45,7 @@ func (e EventSource) String() string { return eventSourceToString[e] } -func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator *allocation.Allocator) (*Manager, error) { +func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator allocation.Allocator) (*Manager, error) { watcher := Manager{ allocator: allocator, Events: make(chan Event), diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index e5a008441..b2f0bf3d0 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -681,6 +681,10 @@ spec: description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. properties: + allocationStrategy: + description: AllocationStrategy determines which strategy the + target allocator should use for allocation + type: string enabled: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. diff --git a/docs/api.md b/docs/api.md index 57b8d78a9..6dcb8b56e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2869,6 +2869,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all + allocationStrategy + string + + AllocationStrategy determines which strategy the target allocator should use for allocation
+ + false + enabled boolean diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index f24b62685..4c15e4296 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -114,6 +114,11 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { "app.kubernetes.io/component": "opentelemetry-collector", } taConfig["config"] = promConfig + if len(params.Instance.Spec.TargetAllocator.AllocationStrategy) > 0 { + taConfig["allocation_strategy"] = params.Instance.Spec.TargetAllocator.AllocationStrategy + } else { + taConfig["allocation_strategy"] = "least-weighted" + } taConfigYAML, err := yaml.Marshal(taConfig) if err != nil { return corev1.ConfigMap{}, err diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 05df6d79a..bdc13d79c 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -185,7 +185,8 @@ service: expectedLables["app.kubernetes.io/name"] = "test-targetallocator" expectedData := map[string]string{ - "targetallocator.yaml": `config: + "targetallocator.yaml": `allocation_strategy: least-weighted +config: scrape_configs: - job_name: otel-collector scrape_interval: 10s @@ -324,6 +325,7 @@ func TestExpectedConfigMap(t *testing.T) { "app.kubernetes.io/component": "opentelemetry-collector", } taConfig["config"] = parmConfig + taConfig["allocation_strategy"] = "least-weighted" taConfigYAML, _ := yaml.Marshal(taConfig) assert.Equal(t, string(taConfigYAML), actual.Data["targetallocator.yaml"]) From 0f2178e75e133362d1af038df312007f6bbe8aa1 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 12 Sep 2022 19:47:00 +0200 Subject: [PATCH 0582/1234] Upgrade kind, kind images and add testing for Kubernetes 1.25 (#1078) Signed-off-by: Israel Blancas Signed-off-by: Israel Blancas --- .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- kind-1.19.yaml | 2 +- kind-1.20.yaml | 2 +- kind-1.21.yaml | 2 +- kind-1.22.yaml | 2 +- kind-1.23.yaml | 2 +- kind-1.24.yaml | 2 +- kind-1.25.yaml | 5 +++++ 9 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 kind-1.25.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 2c2d9473d..15b61ce40 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ jobs: # should be compatible with them. kube-version: - "1.19" - - "1.24" + - "1.25" steps: diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 1de97b83b..fa011fe7f 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -14,7 +14,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.24" + - "1.25" steps: diff --git a/kind-1.19.yaml b/kind-1.19.yaml index dc16e9a73..8b85a6a66 100644 --- a/kind-1.19.yaml +++ b/kind-1.19.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.19.16@sha256:5970d9629a026fbafa37207ffb8dbaff4ff373f254aadaeecfd3bebc93b7ce3b + image: kindest/node:v1.19.16@sha256:707469aac7e6805e52c3bde2a8a8050ce2b15decff60db6c5077ba9975d28b98 diff --git a/kind-1.20.yaml b/kind-1.20.yaml index fa6504c5d..44e7f6ae9 100644 --- a/kind-1.20.yaml +++ b/kind-1.20.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.20.15@sha256:2d93744654696ea4270c04ec83e7940177295aac99223b224b052c79d4e7693e + image: kindest/node:v1.20.15@sha256:d67de8f84143adebe80a07672f370365ec7d23f93dc86866f0e29fa29ce026fe diff --git a/kind-1.21.yaml b/kind-1.21.yaml index c63d3b738..2894a87c4 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.21.10@sha256:c92d79188b958150ffde9437e9b49fb301fd8d1a11eee384475fe3c3eea76f02 + image: kindest/node:v1.21.14@sha256:f9b4d3d1112f24a7254d2ee296f177f628f9b4c1b32f0006567af11b91c1f301 diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 357a30df1..27fe599db 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.7@sha256:c195c17f2a9f6ad5bbddc9eb8bad68fa21709162aabf2b84e4a3896db05c0808 \ No newline at end of file + image: kindest/node:v1.22.13@sha256:4904eda4d6e64b402169797805b8ec01f50133960ad6c19af45173a27eadf959 \ No newline at end of file diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 0a6b9dcb9..5728285a1 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.4@sha256:1742ff7f0b79a8aaae347b9c2ffaf9738910e721d649301791c812c162092753 + image: kindest/node:v1.23.10@sha256:f047448af6a656fae7bc909e2fab360c18c487ef3edc93f06d78cdfd864b2d12 diff --git a/kind-1.24.yaml b/kind-1.24.yaml index 6936e0930..56553b608 100644 --- a/kind-1.24.yaml +++ b/kind-1.24.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.24.2@sha256:1f0cee2282f43150b52dc7933183ed96abdcfc8d293f30ec07082495874876f1 + image: kindest/node:v1.24.4@sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98 diff --git a/kind-1.25.yaml b/kind-1.25.yaml new file mode 100644 index 000000000..6340109a9 --- /dev/null +++ b/kind-1.25.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.25.0@sha256:428aaa17ec82ccde0131cb2d1ca6547d13cf5fdabcc0bbecf749baa935387cbf From e48373c612e5fc9058699aa7139b893bfde58fd0 Mon Sep 17 00:00:00 2001 From: Kelsey Ma Date: Mon, 12 Sep 2022 11:05:12 -0700 Subject: [PATCH 0583/1234] Update GetAllTargetsByCollectorAndJob to use TargetItem hash (#1086) * Update GetAllTargetsByCollectorAndJob to use TargetItem hash to prevent overwriting of labels for targets with the same address * Fix unit test after merging main Co-authored-by: Pavol Loffay --- cmd/otel-allocator/allocation/http.go | 8 ++-- cmd/otel-allocator/allocation/http_test.go | 49 +++++++++++++++++++++- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 88622aef6..37d08769f 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -46,20 +46,20 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator Allo func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator Allocator) []targetGroupJSON { var tgs []targetGroupJSON - group := make(map[string]string) + group := make(map[string]TargetItem) labelSet := make(map[string]model.LabelSet) if _, ok := allocator.Collectors()[collector]; ok { for _, targetItemArr := range cMap { for _, targetItem := range targetItemArr { if targetItem.CollectorName == collector && targetItem.JobName == job { - group[targetItem.Label.String()] = targetItem.TargetURL - labelSet[targetItem.TargetURL] = targetItem.Label + group[targetItem.Label.String()] = targetItem + labelSet[targetItem.Hash()] = targetItem.Label } } } } for _, v := range group { - tgs = append(tgs, targetGroupJSON{Targets: []string{v}, Labels: labelSet[v]}) + tgs = append(tgs, targetGroupJSON{Targets: []string{v.TargetURL}, Labels: labelSet[v.Hash()]}) } return tgs diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index 1b8cf9726..6e2241654 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -146,12 +146,57 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { }, }, }, + { + name: "Multiple entry target map with same target address", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string][]TargetItem{ + "test-collectortest-job": { + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + "foo": "bar", + }, + TargetURL: "test-url", + CollectorName: "test-collector", + }, + TargetItem{ + JobName: "test-job", + Label: model.LabelSet{ + "test-label": "test-value", + }, + TargetURL: "test-url", + CollectorName: "test-collector", + }, + }, + }, + allocator: baseAllocator, + }, + want: []targetGroupJSON{ + { + Targets: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + "foo": "bar", + }, + }, + { + Targets: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test-label": "test-value", + }, + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - for _, groupJSON := range GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator) { + targetGroups := GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator) + for _, wantGroupJson := range tt.want { exist := false - for _, wantGroupJson := range tt.want { + for _, groupJSON := range targetGroups { if groupJSON.Labels.String() == wantGroupJson.Labels.String() { exist = reflect.DeepEqual(groupJSON, wantGroupJson) } From 6769e32e61d45cda9d5535a0e249192ffb7c2cf1 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 15 Sep 2022 02:35:13 -0700 Subject: [PATCH 0584/1234] Update the javaagent version to 1.18.0 (#1096) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 092afa15d..84cc52946 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.17.0 +1.18.0 From 16e6ca4d851729fade8e44e28d02cb2cf9afb338 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:35:31 +0200 Subject: [PATCH 0585/1234] Bump go.opentelemetry.io/otel from 1.9.0 to 1.10.0 (#1092) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 96453f92a..5ebe3570e 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.0 - go.opentelemetry.io/otel v1.9.0 + go.opentelemetry.io/otel v1.10.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.0 k8s.io/apimachinery v0.25.0 @@ -104,7 +104,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.9.0 // indirect + go.opentelemetry.io/otel/trace v1.10.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect diff --git a/go.sum b/go.sum index 93f69d80c..db75cca7f 100644 --- a/go.sum +++ b/go.sum @@ -1022,10 +1022,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= -go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= -go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= -go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= +go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= From 770085138b3004ec0e958f78781e851dac94475d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 15 Sep 2022 13:49:25 +0200 Subject: [PATCH 0586/1234] .NET - enable bytecode instrumentation (#1081) * .NET Auto Instrumentation - support for byte code instrumentation * extract method to set env variable * code review feedback --- autoinstrumentation/dotnet/Dockerfile | 4 + pkg/instrumentation/dotnet.go | 109 ++++++----- pkg/instrumentation/dotnet_test.go | 180 +++++++++++++++++- pkg/instrumentation/podmutator_test.go | 16 ++ pkg/instrumentation/sdk_test.go | 16 ++ .../01-assert.yaml | 24 ++- .../02-assert.yaml | 12 +- .../e2e/instrumentation-dotnet/01-assert.yaml | 12 +- 8 files changed, 318 insertions(+), 55 deletions(-) diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile index af3105034..2d6d75c2b 100644 --- a/autoinstrumentation/dotnet/Dockerfile +++ b/autoinstrumentation/dotnet/Dockerfile @@ -3,9 +3,13 @@ # one init container will be created to copy the files to your app's container. # - Grant the necessary access to the files in the `/autoinstrumentation` directory. # - Following environment variables are injected to the application container to enable the auto-instrumentation. +# CORECLR_ENABLE_PROFILING=1 +# CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} +# CORECLR_PROFILER_PATH=%InstallationLocation%/OpenTelemetry.AutoInstrumentation.Native.so # DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps # DOTNET_SHARED_STORE=%InstallationLocation%/store # DOTNET_STARTUP_HOOKS=%InstallationLocation%/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll +# OTEL_DOTNET_AUTO_HOME=%InstallationLocation% FROM busybox diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index ee933ef33..210db334f 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -24,12 +24,20 @@ import ( ) const ( - envDotNetAdditionalDeps = "DOTNET_ADDITIONAL_DEPS" - envDotNetSharedStore = "DOTNET_SHARED_STORE" - envDotNetStartupHook = "DOTNET_STARTUP_HOOKS" - dotNetAdditionalDepsPath = "./otel-auto-instrumentation/AdditionalDeps" - dotNetSharedStorePath = "/otel-auto-instrumentation/store" - dotNetStartupHookPath = "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + envDotNetCoreClrEnableProfiling = "CORECLR_ENABLE_PROFILING" + envDotNetCoreClrProfiler = "CORECLR_PROFILER" + envDotNetCoreClrProfilerPath = "CORECLR_PROFILER_PATH" + envDotNetAdditionalDeps = "DOTNET_ADDITIONAL_DEPS" + envDotNetSharedStore = "DOTNET_SHARED_STORE" + envDotNetStartupHook = "DOTNET_STARTUP_HOOKS" + envDotNetOTelAutoHome = "OTEL_DOTNET_AUTO_HOME" + dotNetCoreClrEnableProfilingEnabled = "1" + dotNetCoreClrProfilerId = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + dotNetCoreClrProfilerPath = "/otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" + dotNetOTelAutoHomePath = "/otel-auto-instrumentation" + dotNetSharedStorePath = "/otel-auto-instrumentation/store" + dotNetStartupHookPath = "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" ) func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) corev1.Pod { @@ -44,49 +52,37 @@ func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1. } } - idx := getIndexOfEnv(container.Env, envDotNetStartupHook) - if idx == -1 { - container.Env = append(container.Env, corev1.EnvVar{ - Name: envDotNetStartupHook, - Value: dotNetStartupHookPath, - }) - } else if idx > -1 { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_STARTUP_HOOKS env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetStartupHookPath) + const ( + doNotConcatEnvValues = false + concatEnvValues = true + ) + + if !trySetEnvVar(logger, &container, envDotNetCoreClrEnableProfiling, dotNetCoreClrEnableProfilingEnabled, doNotConcatEnvValues) { + return pod } - idx = getIndexOfEnv(container.Env, envDotNetAdditionalDeps) - if idx == -1 { - container.Env = append(container.Env, corev1.EnvVar{ - Name: envDotNetAdditionalDeps, - Value: dotNetAdditionalDepsPath, - }) - } else if idx > -1 { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_ADDITIONAL_DEPS env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetAdditionalDepsPath) + if !trySetEnvVar(logger, &container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerId, doNotConcatEnvValues) { + return pod } - idx = getIndexOfEnv(container.Env, envDotNetSharedStore) - if idx == -1 { - container.Env = append(container.Env, corev1.EnvVar{ - Name: envDotNetSharedStore, - Value: dotNetSharedStorePath, - }) - } else if idx > -1 { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping DotNet SDK injection, the container defines DOTNET_SHARED_STORE env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, dotNetSharedStorePath) + if !trySetEnvVar(logger, &container, envDotNetCoreClrProfilerPath, dotNetCoreClrProfilerPath, doNotConcatEnvValues) { + return pod + } + + if !trySetEnvVar(logger, &container, envDotNetStartupHook, dotNetStartupHookPath, concatEnvValues) { + return pod + } + + if !trySetEnvVar(logger, &container, envDotNetAdditionalDeps, dotNetAdditionalDepsPath, concatEnvValues) { + return pod + } + + if !trySetEnvVar(logger, &container, envDotNetOTelAutoHome, dotNetOTelAutoHomePath, doNotConcatEnvValues) { + return pod + } + + if !trySetEnvVar(logger, &container, envDotNetSharedStore, dotNetSharedStorePath, concatEnvValues) { + return pod } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ @@ -116,3 +112,26 @@ func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1. pod.Spec.Containers[index] = container return pod } + +func trySetEnvVar(logger logr.Logger, container *corev1.Container, envVarName string, envVarValue string, concatValues bool) bool { + idx := getIndexOfEnv(container.Env, envVarName) + if idx < 0 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envVarName, + Value: envVarValue, + }) + return true + } + + if container.Env[idx].ValueFrom != nil { + // TODO add to status object or submit it as an event + logger.Info("Skipping DotNet SDK injection, the container defines env var value via ValueFrom", "envVar", envVarName, "container", container.Name) + return false + } + + if concatValues { + container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, envVarValue) + } + + return true +} diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index b2ec849e2..00177e15f 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -33,7 +33,7 @@ func TestInjectDotNetSDK(t *testing.T) { expected corev1.Pod }{ { - name: "DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS not defined", + name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS, OTEL_DOTNET_AUTO_HOME not defined", DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, pod: corev1.Pod{ Spec: corev1.PodSpec{ @@ -72,6 +72,18 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerId, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerPath, + }, { Name: envDotNetStartupHook, Value: dotNetStartupHookPath, @@ -80,6 +92,10 @@ func TestInjectDotNetSDK(t *testing.T) { Name: envDotNetAdditionalDeps, Value: dotNetAdditionalDepsPath, }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, { Name: envDotNetSharedStore, Value: dotNetSharedStorePath, @@ -91,13 +107,25 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, { - name: "DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE defined", + name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE, OTEL_DOTNET_AUTO_HOME defined", DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: "/foo:/bar", + }, + { + Name: envDotNetCoreClrProfiler, + Value: "/foo:/bar", + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: "/foo:/bar", + }, { Name: envDotNetStartupHook, Value: "/foo:/bar", @@ -110,6 +138,10 @@ func TestInjectDotNetSDK(t *testing.T) { Name: envDotNetSharedStore, Value: "/foo:/bar", }, + { + Name: envDotNetOTelAutoHome, + Value: "/foo:/bar", + }, }, }, }, @@ -145,6 +177,18 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: "/foo:/bar", + }, + { + Name: envDotNetCoreClrProfiler, + Value: "/foo:/bar", + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: "/foo:/bar", + }, { Name: envDotNetStartupHook, Value: fmt.Sprintf("%s:%s", "/foo:/bar", dotNetStartupHookPath), @@ -157,6 +201,106 @@ func TestInjectDotNetSDK(t *testing.T) { Name: envDotNetSharedStore, Value: fmt.Sprintf("%s:%s", "/foo:/bar", dotNetSharedStorePath), }, + { + Name: envDotNetOTelAutoHome, + Value: "/foo:/bar", + }, + }, + }, + }, + }, + }, + }, + { + name: "CORECLR_ENABLE_PROFILING defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + { + name: "CORECLR_PROFILER defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrProfiler, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrProfiler, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, + { + name: "CORECLR_PROFILER_PATH defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrProfilerPath, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrProfilerPath, + ValueFrom: &corev1.EnvVarSource{}, + }, }, }, }, @@ -259,6 +403,38 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, + { + name: "OTEL_DOTNET_AUTO_HOME defined as ValueFrom", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetOTelAutoHome, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetOTelAutoHome, + ValueFrom: &corev1.EnvVarSource{}, + }, + }, + }, + }, + }, + }, + }, } for _, test := range tests { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index f44861f2b..101d24fe2 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -650,6 +650,18 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://localhost:4317", }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerId, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerPath, + }, { Name: envDotNetStartupHook, Value: dotNetStartupHookPath, @@ -658,6 +670,10 @@ func TestMutatePod(t *testing.T) { Name: envDotNetAdditionalDeps, Value: dotNetAdditionalDepsPath, }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, { Name: envDotNetSharedStore, Value: dotNetSharedStorePath, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 3e976619e..31c29282f 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -730,6 +730,18 @@ func TestInjectDotNet(t *testing.T) { }, }, Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerId, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerPath, + }, { Name: envDotNetStartupHook, Value: dotNetStartupHookPath, @@ -738,6 +750,10 @@ func TestInjectDotNet(t *testing.T) { Name: envDotNetAdditionalDeps, Value: dotNetAdditionalDepsPath, }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, { Name: envDotNetSharedStore, Value: dotNetSharedStorePath, diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml index 7923b8873..c2ed9a888 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -13,10 +13,18 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: ./otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation - name: DOTNET_SHARED_STORE value: /otel-auto-instrumentation/store - name: OTEL_TRACES_EXPORTER @@ -46,10 +54,18 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: ./otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation - name: DOTNET_SHARED_STORE value: /otel-auto-instrumentation/store - name: OTEL_TRACES_EXPORTER diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml index 1fd49964a..fdb39b7c1 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -16,10 +16,18 @@ spec: env: - name: OTEL_LOG_LEVEL value: "debug" + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: ./otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation - name: DOTNET_SHARED_STORE value: /otel-auto-instrumentation/store - name: OTEL_TRACES_EXPORTER diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index 6c38bc686..28b3a289f 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -10,10 +10,18 @@ spec: containers: - name: myapp env: + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: ./otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation - name: DOTNET_SHARED_STORE value: /otel-auto-instrumentation/store - name: OTEL_TRACES_EXPORTER From 1a19a84158d26e1a01c4c20ef42f7598e6e0c02d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 15 Sep 2022 13:49:50 +0200 Subject: [PATCH 0587/1234] Utilize .NET AutoInstrumentation docker image v.0.3.1-beta.1 (#1091) --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index b1cf88eae..0de42ba63 100644 --- a/versions.txt +++ b/versions.txt @@ -24,4 +24,4 @@ autoinstrumentation-python=0.32b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.3.0-beta.1 +autoinstrumentation-dotnet=0.3.1-beta.1 From 50592cc0e3f1ea7664d454db8171a08cb43241ba Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Thu, 15 Sep 2022 18:41:01 +0200 Subject: [PATCH 0588/1234] Expose Horizontal Pod Autoscaler Behavior and add hpa scaledown test (#1077) * Add scaledown test for autoscaling Signed-off-by: Kevin Earls * Fix nits Signed-off-by: Kevin Earls * Appease the linter Signed-off-by: Kevin Earls * Don't use a default, only set scaleUp/scaleDown if they are in the CR Signed-off-by: Kevin Earls * Removed commented out code Signed-off-by: Kevin Earls * Change defaults for scaleUp/scaleDown Signed-off-by: Kevin Earls * Update autoscaling scaleup/scaledown Signed-off-by: Kevin Earls * Run generate Signed-off-by: Kevin Earls * Ran make api-docs Signed-off-by: Kevin Earls * Update HPA implementation to embed HorizontalPodAutoscalerBehavior Signed-off-by: Kevin Earls * Only set behavior if it exists in the collector CR Signed-off-by: Kevin Earls * Aded some unit tests Signed-off-by: Kevin Earls * Add kuttl assertion that hpa scaled down Signed-off-by: Kevin Earls * added whitespace to rerun tests Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- apis/v1alpha1/opentelemetrycollector_types.go | 14 + .../opentelemetrycollector_webhook.go | 9 + apis/v1alpha1/zz_generated.deepcopy.go | 28 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 124 +++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 124 +++++++++ docs/api.md | 244 ++++++++++++++++++ pkg/collector/horizontalpodautoscaler.go | 91 +++++++ pkg/collector/horizontalpodautoscaler_test.go | 53 ++++ tests/e2e/autoscale/00-assert.yaml | 3 + tests/e2e/autoscale/00-install.yaml | 6 + tests/e2e/autoscale/02-assert.yaml | 8 + 11 files changed, 703 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/autoscale/02-assert.yaml diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index ac79522da..862d91f6d 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -15,6 +15,7 @@ package v1alpha1 import ( + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -40,6 +41,13 @@ type OpenTelemetryCollectorSpec struct { // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional MaxReplicas *int32 `json:"maxReplicas,omitempty"` + + // Autoscaler specifies the pod autoscaling configuration to use + // for the OpenTelemetryCollector workload. + // + // +optional + Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"` + // SecurityContext will be set as the container security context. // +optional SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` @@ -197,6 +205,12 @@ type OpenTelemetryCollectorList struct { Items []OpenTelemetryCollector `json:"items"` } +// AutoscalerSpec defines the OpenTelemetryCollector's pod autoscaling specification. +type AutoscalerSpec struct { + // +optional + Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"` +} + func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 6a4b1e936..b8df65c95 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -129,6 +129,15 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") } + if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.Behavior != nil { + if r.Spec.Autoscaler.Behavior.ScaleDown != nil && *r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleDown should be one or more") + } + + if r.Spec.Autoscaler.Behavior.ScaleUp != nil && *r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") + } + } } return nil diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 776bebf9f..0f81becc7 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -20,10 +20,31 @@ package v1alpha1 import ( - v1 "k8s.io/api/core/v1" + "k8s.io/api/autoscaling/v2" + "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { + *out = *in + if in.Behavior != nil { + in, out := &in.Behavior, &out.Behavior + *out = new(v2.HorizontalPodAutoscalerBehavior) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalerSpec. +func (in *AutoscalerSpec) DeepCopy() *AutoscalerSpec { + if in == nil { + return nil + } + out := new(AutoscalerSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DotNet) DeepCopyInto(out *DotNet) { *out = *in @@ -305,6 +326,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int32) **out = **in } + if in.Autoscaler != nil { + in, out := &in.Autoscaler, &out.Autoscaler + *out = new(AutoscalerSpec) + (*in).DeepCopyInto(*out) + } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(v1.SecurityContext) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 01dc8f2e2..d7f09b06a 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -59,6 +59,130 @@ spec: description: Args is the set of arguments to pass to the OpenTelemetry Collector binary type: object + autoscaler: + description: Autoscaler specifies the pod autoscaling configuration + to use for the OpenTelemetryCollector workload. + properties: + behavior: + description: HorizontalPodAutoscalerBehavior configures the scaling + behavior of the target in both Up and Down directions (scaleUp + and scaleDown fields respectively). + properties: + scaleDown: + description: scaleDown is scaling policy for scaling Down. + If not set, the default value is to allow to scale down + to minReplicas pods, with a 300 second stabilization window + (i.e., the highest recommendation for the last 300sec is + used). + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: PeriodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: Type is used to specify the scaling + policy. + type: string + value: + description: Value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'StabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + scaleUp: + description: 'scaleUp is scaling policy for scaling Up. If + not set, the default value is the higher of: * increase + no more than 4 pods per 60 seconds * double the number of + pods per 60 seconds No stabilization is used.' + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: PeriodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: Type is used to specify the scaling + policy. + type: string + value: + description: Value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'StabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + type: object + type: object config: description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index b2f0bf3d0..88e8f28cf 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -57,6 +57,130 @@ spec: description: Args is the set of arguments to pass to the OpenTelemetry Collector binary type: object + autoscaler: + description: Autoscaler specifies the pod autoscaling configuration + to use for the OpenTelemetryCollector workload. + properties: + behavior: + description: HorizontalPodAutoscalerBehavior configures the scaling + behavior of the target in both Up and Down directions (scaleUp + and scaleDown fields respectively). + properties: + scaleDown: + description: scaleDown is scaling policy for scaling Down. + If not set, the default value is to allow to scale down + to minReplicas pods, with a 300 second stabilization window + (i.e., the highest recommendation for the last 300sec is + used). + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: PeriodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: Type is used to specify the scaling + policy. + type: string + value: + description: Value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'StabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + scaleUp: + description: 'scaleUp is scaling policy for scaling Up. If + not set, the default value is the higher of: * increase + no more than 4 pods per 60 seconds * double the number of + pods per 60 seconds No stabilization is used.' + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: PeriodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: Type is used to specify the scaling + policy. + type: string + value: + description: Value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'StabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + type: object + type: object config: description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation diff --git a/docs/api.md b/docs/api.md index 6dcb8b56e..97c0fba76 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1691,6 +1691,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Args is the set of arguments to pass to the OpenTelemetry Collector binary
false + + autoscaler + object + + Autoscaler specifies the pod autoscaling configuration to use for the OpenTelemetryCollector workload.
+ + false config string @@ -1866,6 +1873,243 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. +### OpenTelemetryCollector.spec.autoscaler +[↩ Parent](#opentelemetrycollectorspec) + + + +Autoscaler specifies the pod autoscaling configuration to use for the OpenTelemetryCollector workload. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
behaviorobject + HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.behavior +[↩ Parent](#opentelemetrycollectorspecautoscaler) + + + +HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
scaleDownobject + scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).
+
false
scaleUpobject + scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used.
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.behavior.scaleDown +[↩ Parent](#opentelemetrycollectorspecautoscalerbehavior) + + + +scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used). + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
policies[]object + policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
+
false
selectPolicystring + selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
+
false
stabilizationWindowSecondsinteger + StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.behavior.scaleDown.policies[index] +[↩ Parent](#opentelemetrycollectorspecautoscalerbehaviorscaledown) + + + +HPAScalingPolicy is a single policy which must hold true for a specified past interval. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
periodSecondsinteger + PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
+
+ Format: int32
+
true
typestring + Type is used to specify the scaling policy.
+
true
valueinteger + Value contains the amount of change which is permitted by the policy. It must be greater than zero
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.autoscaler.behavior.scaleUp +[↩ Parent](#opentelemetrycollectorspecautoscalerbehavior) + + + +scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
policies[]object + policies is a list of potential scaling polices which can be used during scaling. At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
+
false
selectPolicystring + selectPolicy is used to specify which policy should be used. If not set, the default value Max is used.
+
false
stabilizationWindowSecondsinteger + StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.behavior.scaleUp.policies[index] +[↩ Parent](#opentelemetrycollectorspecautoscalerbehaviorscaleup) + + + +HPAScalingPolicy is a single policy which must hold true for a specified past interval. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
periodSecondsinteger + PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
+
+ Format: int32
+
true
typestring + Type is used to specify the scaling policy.
+
true
valueinteger + Value contains the amount of change which is permitted by the policy. It must be greater than zero
+
+ Format: int32
+
true
+ + ### OpenTelemetryCollector.spec.env[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 0cdd3dca2..25265a3d7 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -73,6 +73,12 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Metrics: metrics, }, } + + if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.Behavior != nil { + behavior := ConvertToV2beta2Behavior(*otelcol.Spec.Autoscaler.Behavior) + autoscaler.Spec.Behavior = &behavior + } + result = &autoscaler } else { targetCPUUtilization := autoscalingv2.MetricSpec{ @@ -100,8 +106,93 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Metrics: metrics, }, } + if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.Behavior != nil { + autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior + } result = &autoscaler } return result } + +// Create a v2beta2 HorizontalPodAutoscalerBehavior from a v2 instance. +func ConvertToV2beta2Behavior(v2behavior autoscalingv2.HorizontalPodAutoscalerBehavior) autoscalingv2beta2.HorizontalPodAutoscalerBehavior { + behavior := &autoscalingv2beta2.HorizontalPodAutoscalerBehavior{} + + if v2behavior.ScaleUp != nil { + scaleUpRules := &autoscalingv2beta2.HPAScalingRules{} + scaleUpTime := *v2behavior.ScaleUp.StabilizationWindowSeconds + scaleUpRules.StabilizationWindowSeconds = &scaleUpTime + + if v2behavior.ScaleUp.SelectPolicy != nil { + scaleUpSelectPolicy := ConvertToV2Beta2SelectPolicy(*v2behavior.ScaleUp.SelectPolicy) + scaleUpRules.SelectPolicy = &scaleUpSelectPolicy + } + if v2behavior.ScaleUp.Policies != nil { + scaleUpPolicies := []autoscalingv2beta2.HPAScalingPolicy{} + for _, policy := range v2behavior.ScaleUp.Policies { + v2beta2policy := ConvertToV2Beta2HPAScalingPolicy(policy) + scaleUpPolicies = append(scaleUpPolicies, v2beta2policy) + } + scaleUpRules.Policies = scaleUpPolicies + } + + behavior.ScaleUp = scaleUpRules + } + + if v2behavior.ScaleDown != nil { + scaleDownRules := &autoscalingv2beta2.HPAScalingRules{} + scaleDownTime := *v2behavior.ScaleDown.StabilizationWindowSeconds + scaleDownRules.StabilizationWindowSeconds = &scaleDownTime + + if v2behavior.ScaleDown.SelectPolicy != nil { + scaleDownSelectPolicy := ConvertToV2Beta2SelectPolicy(*v2behavior.ScaleDown.SelectPolicy) + scaleDownRules.SelectPolicy = &scaleDownSelectPolicy + } + if v2behavior.ScaleDown.Policies != nil { + ScaleDownPolicies := []autoscalingv2beta2.HPAScalingPolicy{} + for _, policy := range v2behavior.ScaleDown.Policies { + v2beta2policy := ConvertToV2Beta2HPAScalingPolicy(policy) + ScaleDownPolicies = append(ScaleDownPolicies, v2beta2policy) + } + scaleDownRules.Policies = ScaleDownPolicies + } + + behavior.ScaleDown = scaleDownRules + } + + return *behavior +} + +func ConvertToV2Beta2HPAScalingPolicy(v2policy autoscalingv2.HPAScalingPolicy) autoscalingv2beta2.HPAScalingPolicy { + v2beta2Policy := &autoscalingv2beta2.HPAScalingPolicy{ + Value: v2policy.Value, + PeriodSeconds: v2policy.PeriodSeconds, + } + + switch v2policy.Type { + case autoscalingv2.PodsScalingPolicy: + v2beta2Policy.Type = autoscalingv2beta2.PodsScalingPolicy + case autoscalingv2.PercentScalingPolicy: + v2beta2Policy.Type = autoscalingv2beta2.PercentScalingPolicy + } + + return *v2beta2Policy +} + +func ConvertToV2Beta2SelectPolicy(scalingPolicy autoscalingv2.ScalingPolicySelect) autoscalingv2beta2.ScalingPolicySelect { + max := autoscalingv2beta2.MaxPolicySelect + min := autoscalingv2beta2.MinPolicySelect + disabled := autoscalingv2beta2.DisabledPolicySelect + + switch scalingPolicy { + case autoscalingv2.MaxChangePolicySelect: + return max + case autoscalingv2.MinChangePolicySelect: + return min + case autoscalingv2.DisabledPolicySelect: + return disabled + } + + return disabled +} diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index 6aaa71ca5..c8f076248 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -91,6 +91,59 @@ func TestHPA(t *testing.T) { } } +func TestConvertToV2beta2Behavior(t *testing.T) { + ten := int32(10) + thirty := int32(30) + max := autoscalingv2.MaxChangePolicySelect + min := autoscalingv2.MinChangePolicySelect + + v2ScaleUp := &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &thirty, + SelectPolicy: &max, + } + + v2ScaleDown := &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &ten, + SelectPolicy: &min, + } + + v2Behavior := &autoscalingv2.HorizontalPodAutoscalerBehavior{ + ScaleUp: v2ScaleUp, + ScaleDown: v2ScaleDown, + } + + v2Beta2Behavior := ConvertToV2beta2Behavior(*v2Behavior) + + assert.Equal(t, thirty, *v2Beta2Behavior.ScaleUp.StabilizationWindowSeconds) + assert.Equal(t, ten, *v2Beta2Behavior.ScaleDown.StabilizationWindowSeconds) + assert.Equal(t, autoscalingv2beta2.MaxPolicySelect, *v2Beta2Behavior.ScaleUp.SelectPolicy) + assert.EqualValues(t, autoscalingv2beta2.MinPolicySelect, *v2Beta2Behavior.ScaleDown.SelectPolicy) +} + +func TestConvertToV2Beta2HPAScalingPolicy(t *testing.T) { + v2Policy := autoscalingv2.HPAScalingPolicy{ + Type: autoscalingv2.PodsScalingPolicy, + Value: 5, + PeriodSeconds: 10, + } + + v2Beta2Policy := ConvertToV2Beta2HPAScalingPolicy(v2Policy) + assert.Equal(t, autoscalingv2beta2.PodsScalingPolicy, v2Beta2Policy.Type) + assert.Equal(t, int32(5), v2Beta2Policy.Value) + assert.Equal(t, int32(10), v2Beta2Policy.PeriodSeconds) + +} + +func TestConvertToV2Beta2SelectPolicy(t *testing.T) { + min := autoscalingv2.MinChangePolicySelect + max := autoscalingv2.MaxChangePolicySelect + disabled := autoscalingv2.DisabledPolicySelect + + assert.Equal(t, autoscalingv2beta2.MinPolicySelect, ConvertToV2Beta2SelectPolicy(min)) + assert.Equal(t, autoscalingv2beta2.MaxPolicySelect, ConvertToV2Beta2SelectPolicy(max)) + assert.Equal(t, autoscalingv2beta2.DisabledPolicySelect, ConvertToV2Beta2SelectPolicy(disabled)) +} + var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { diff --git a/tests/e2e/autoscale/00-assert.yaml b/tests/e2e/autoscale/00-assert.yaml index ef4b82869..aaacc816c 100644 --- a/tests/e2e/autoscale/00-assert.yaml +++ b/tests/e2e/autoscale/00-assert.yaml @@ -13,4 +13,7 @@ metadata: spec: minReplicas: 1 maxReplicas: 2 +# This is not neccesarily exact. We really just want to wait until this is no longer +status: + currentCPUUtilizationPercentage: 20 diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index e2ba8d5a5..8645bb919 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -5,6 +5,12 @@ metadata: spec: minReplicas: 1 maxReplicas: 2 + autoscaler: + behavior: + scaleUp: + stabilizationWindowSeconds: 10 + scaleDown: + stabilizationWindowSeconds: 15 resources: limits: cpu: 500m diff --git a/tests/e2e/autoscale/02-assert.yaml b/tests/e2e/autoscale/02-assert.yaml new file mode 100644 index 000000000..fb4e052f2 --- /dev/null +++ b/tests/e2e/autoscale/02-assert.yaml @@ -0,0 +1,8 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector + +metadata: + name: simplest +status: + scale: + replicas: 1 From 5c3e2867f38e0eb1d203a76485ea9f99e05e1f11 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 16 Sep 2022 04:05:48 -0400 Subject: [PATCH 0589/1234] Added consistent hashing strategy to target-allocator (#1087) * Added consistent hashing strategy * testing fix, metrics fix * Add configurable replicas * Fix linting * Fix test and add a new one * Rename var to rerun tests * Comments and things * Grammar * docs :facepalm: --- apis/v1alpha1/opentelemetrycollector_types.go | 9 +- .../opentelemetrycollector_webhook.go | 9 +- apis/v1alpha1/zz_generated.deepcopy.go | 7 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 12 +- .../allocation/consistent_hashing.go | 196 ++++++++++++++++++ .../allocation/consistent_hashing_test.go | 92 ++++++++ cmd/otel-allocator/allocation/http_test.go | 4 +- .../allocation/least_weighted.go | 23 +- .../allocation/least_weighted_test.go | 37 ++-- cmd/otel-allocator/allocation/strategy.go | 18 ++ cmd/otel-allocator/go.mod | 1 + cmd/otel-allocator/go.sum | 2 + ...ntelemetry.io_opentelemetrycollectors.yaml | 12 +- docs/api.md | 11 +- pkg/collector/reconcile/deployment_test.go | 59 +++++- pkg/targetallocator/deployment.go | 4 +- 16 files changed, 455 insertions(+), 41 deletions(-) create mode 100644 cmd/otel-allocator/allocation/consistent_hashing.go create mode 100644 cmd/otel-allocator/allocation/consistent_hashing_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 862d91f6d..1c9382fe2 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -116,7 +116,14 @@ type OpenTelemetryCollectorSpec struct { // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. type OpenTelemetryTargetAllocator struct { - // AllocationStrategy determines which strategy the target allocator should use for allocation + // Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value + // other than 1 if a strategy that allows for high availability is chosen. Currently, the only allocation strategy + // that can be run in a high availability mode is consistent-hashing. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + // AllocationStrategy determines which strategy the target allocator should use for allocation. + // The current options are least-weighted and consistent-hashing. The default option is least-weighted + // +optional AllocationStrategy string `json:"allocationStrategy,omitempty"` // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index b8df65c95..39e5f617d 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -56,12 +56,15 @@ func (r *OpenTelemetryCollector) Default() { r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" } + // We can default to one because dependent objects Deployment and HorizontalPodAutoScaler + // default to 1 as well. + one := int32(1) if r.Spec.Replicas == nil { - // We can default to one because dependent objects Deployment and HorizontalPodAutoScaler - // default to 1 as well. - one := int32(1) r.Spec.Replicas = &one } + if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Replicas == nil { + r.Spec.TargetAllocator.Replicas = &one + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 0f81becc7..f2b839793 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -348,7 +348,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*out)[key] = val } } - out.TargetAllocator = in.TargetAllocator + in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]v1.VolumeMount, len(*in)) @@ -435,6 +435,11 @@ func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { *out = *in out.PrometheusCR = in.PrometheusCR + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index d7f09b06a..1572235e1 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -809,7 +809,9 @@ spec: properties: allocationStrategy: description: AllocationStrategy determines which strategy the - target allocator should use for allocation + target allocator should use for allocation. The current options + are least-weighted and consistent-hashing. The default option + is least-weighted type: string enabled: description: Enabled indicates whether to use a target allocation @@ -831,6 +833,14 @@ spec: custom resources as targets or not. type: boolean type: object + replicas: + description: Replicas is the number of pod instances for the underlying + TargetAllocator. This should only be set to a value other than + 1 if a strategy that allows for high availability is chosen. + Currently, the only allocation strategy that can be run in a + high availability mode is consistent-hashing. + format: int32 + type: integer serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go new file mode 100644 index 000000000..31a78e35a --- /dev/null +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -0,0 +1,196 @@ +package allocation + +import ( + "fmt" + "net/url" + "sync" + + "github.com/buraksezer/consistent" + "github.com/cespare/xxhash/v2" + "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" +) + +var _ Allocator = &consistentHashingAllocator{} + +const consistentHashingStrategyName = "consistent-hashing" + +type hasher struct{} + +func (h hasher) Sum64(data []byte) uint64 { + return xxhash.Sum64(data) +} + +type consistentHashingAllocator struct { + // m protects consistentHasher, collectors and targetItems for concurrent use. + m sync.RWMutex + + consistentHasher *consistent.Consistent + + // collectors is a map from a Collector's name to a Collector instance + collectors map[string]*Collector + + // targetItems is a map from a target item's hash to the target items allocated state + targetItems map[string]*TargetItem + + log logr.Logger +} + +func newConsistentHashingAllocator(log logr.Logger) Allocator { + config := consistent.Config{ + PartitionCount: 1061, + ReplicationFactor: 5, + Load: 1.1, + Hasher: hasher{}, + } + consistentHasher := consistent.New(nil, config) + return &consistentHashingAllocator{ + consistentHasher: consistentHasher, + collectors: make(map[string]*Collector), + targetItems: make(map[string]*TargetItem), + log: log, + } +} + +// addTargetToTargetItems assigns a target to the collector based on its hash and adds it to the allocator's targetItems +// This method is called from within SetTargets and SetCollectors, which acquire the needed lock. +// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap +// INVARIANT: c.collectors must have at least 1 collector set +func (c *consistentHashingAllocator) addTargetToTargetItems(target *TargetItem) { + // Check if this is a reassignment, if so, decrement the previous collector's NumTargets + if previousColName, ok := c.collectors[target.CollectorName]; ok { + previousColName.NumTargets-- + TargetsPerCollector.WithLabelValues(previousColName.String(), consistentHashingStrategyName).Set(float64(c.collectors[previousColName.String()].NumTargets)) + } + colOwner := c.consistentHasher.LocateKey([]byte(target.Hash())) + targetItem := &TargetItem{ + JobName: target.JobName, + Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, + TargetURL: target.TargetURL, + Label: target.Label, + CollectorName: colOwner.String(), + } + c.targetItems[targetItem.Hash()] = targetItem + c.collectors[colOwner.String()].NumTargets++ + TargetsPerCollector.WithLabelValues(colOwner.String(), consistentHashingStrategyName).Set(float64(c.collectors[colOwner.String()].NumTargets)) +} + +// handleTargets receives the new and removed targets and reconciles the current state. +// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector +// Any net-new additions are assigned to the next available collector +func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*TargetItem]) { + // Check for removals + for k, target := range c.targetItems { + // if the current target is in the removals list + if _, ok := diff.Removals()[k]; ok { + col := c.collectors[target.CollectorName] + col.NumTargets-- + delete(c.targetItems, k) + TargetsPerCollector.WithLabelValues(target.CollectorName, consistentHashingStrategyName).Set(float64(col.NumTargets)) + } + } + + // Check for additions + for k, target := range diff.Additions() { + // Do nothing if the item is already there + if _, ok := c.targetItems[k]; ok { + continue + } else { + // Add target to target pool and assign a collector + c.addTargetToTargetItems(target) + } + } +} + +// handleCollectors receives the new and removed collectors and reconciles the current state. +// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map +// Finally, update all targets' collectors to match the consistent hashing. +func (c *consistentHashingAllocator) handleCollectors(diff diff.Changes[*Collector]) { + // Clear removed collectors + for _, k := range diff.Removals() { + delete(c.collectors, k.Name) + c.consistentHasher.Remove(k.Name) + TargetsPerCollector.WithLabelValues(k.Name, consistentHashingStrategyName).Set(0) + } + // Insert the new collectors + for _, i := range diff.Additions() { + c.collectors[i.Name] = NewCollector(i.Name) + c.consistentHasher.Add(c.collectors[i.Name]) + } + + // Re-Allocate all targets + for _, item := range c.targetItems { + c.addTargetToTargetItems(item) + } +} + +// SetTargets accepts a list of targets that will be used to make +// load balancing decisions. This method should be called when there are +// new targets discovered or existing targets are shutdown. +func (c *consistentHashingAllocator) SetTargets(targets map[string]*TargetItem) { + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", consistentHashingStrategyName)) + defer timer.ObserveDuration() + + c.m.Lock() + defer c.m.Unlock() + + if len(c.collectors) == 0 { + c.log.Info("No collector instances present, cannot set targets") + return + } + // Check for target changes + targetsDiff := diff.Maps(c.targetItems, targets) + // If there are any additions or removals + if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { + c.handleTargets(targetsDiff) + } + return +} + +// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. +// This method is called when Collectors are added or removed. +func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collector) { + log := c.log.WithValues("component", "opentelemetry-targetallocator") + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", consistentHashingStrategyName)) + defer timer.ObserveDuration() + + CollectorsAllocatable.WithLabelValues(consistentHashingStrategyName).Set(float64(len(collectors))) + if len(collectors) == 0 { + log.Info("No collector instances present") + return + } + + c.m.Lock() + defer c.m.Unlock() + + // Check for collector changes + collectorsDiff := diff.Maps(c.collectors, collectors) + if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { + c.handleCollectors(collectorsDiff) + } + return +} + +// TargetItems returns a shallow copy of the targetItems map. +func (c *consistentHashingAllocator) TargetItems() map[string]*TargetItem { + c.m.RLock() + defer c.m.RUnlock() + targetItemsCopy := make(map[string]*TargetItem) + for k, v := range c.targetItems { + targetItemsCopy[k] = v + } + return targetItemsCopy +} + +// Collectors returns a shallow copy of the collectors map. +func (c *consistentHashingAllocator) Collectors() map[string]*Collector { + c.m.RLock() + defer c.m.RUnlock() + collectorsCopy := make(map[string]*Collector) + for k, v := range c.collectors { + collectorsCopy[k] = v + } + return collectorsCopy +} diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go new file mode 100644 index 000000000..8793af53b --- /dev/null +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -0,0 +1,92 @@ +package allocation + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCanSetSingleTarget(t *testing.T) { + cols := makeNCollectors(3, 0, 0) + c := newConsistentHashingAllocator(logger) + c.SetCollectors(cols) + c.SetTargets(makeNNewTargets(1, 3, 0)) + actualTargetItems := c.TargetItems() + assert.Len(t, actualTargetItems, 1) + for _, item := range actualTargetItems { + assert.Equal(t, "collector-2", item.CollectorName) + } +} + +func TestRelativelyEvenDistribution(t *testing.T) { + numCols := 15 + numItems := 10000 + cols := makeNCollectors(numCols, 0, 0) + var expectedPerCollector = float64(numItems / numCols) + expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector + c := newConsistentHashingAllocator(logger) + c.SetCollectors(cols) + c.SetTargets(makeNNewTargets(numItems, 0, 0)) + actualTargetItems := c.TargetItems() + assert.Len(t, actualTargetItems, numItems) + actualCollectors := c.Collectors() + assert.Len(t, actualCollectors, numCols) + for _, col := range actualCollectors { + t.Logf("col: %s \ttargets: %d", col.Name, col.NumTargets) + assert.InDelta(t, col.NumTargets, expectedPerCollector, expectedDelta) + } +} + +func TestFullReallocation(t *testing.T) { + cols := makeNCollectors(10, 0, 0) + c := newConsistentHashingAllocator(logger) + c.SetCollectors(cols) + c.SetTargets(makeNNewTargets(10000, 10, 0)) + actualTargetItems := c.TargetItems() + assert.Len(t, actualTargetItems, 10000) + actualCollectors := c.Collectors() + assert.Len(t, actualCollectors, 10) + newCols := makeNCollectors(10, 0, 10) + c.SetCollectors(newCols) + updatedTargetItems := c.TargetItems() + assert.Len(t, updatedTargetItems, 10000) + updatedCollectors := c.Collectors() + assert.Len(t, updatedCollectors, 10) + for _, item := range updatedTargetItems { + _, ok := updatedCollectors[item.CollectorName] + assert.True(t, ok, "Some items weren't reallocated correctly") + } +} + +func TestNumRemapped(t *testing.T) { + numItems := 10_000 + numInitialCols := 15 + numFinalCols := 16 + expectedDelta := float64((numFinalCols - numInitialCols) * (numItems / numFinalCols)) + cols := makeNCollectors(numInitialCols, 0, 0) + c := newConsistentHashingAllocator(logger) + c.SetCollectors(cols) + c.SetTargets(makeNNewTargets(numItems, numInitialCols, 0)) + actualTargetItems := c.TargetItems() + assert.Len(t, actualTargetItems, numItems) + actualCollectors := c.Collectors() + assert.Len(t, actualCollectors, numInitialCols) + newCols := makeNCollectors(numFinalCols, 0, 0) + c.SetCollectors(newCols) + updatedTargetItems := c.TargetItems() + assert.Len(t, updatedTargetItems, numItems) + updatedCollectors := c.Collectors() + assert.Len(t, updatedCollectors, numFinalCols) + countRemapped := 0 + countNotRemapped := 0 + for _, item := range updatedTargetItems { + previousItem, ok := actualTargetItems[item.Hash()] + assert.True(t, ok) + if previousItem.CollectorName != item.CollectorName { + countRemapped++ + } else { + countNotRemapped++ + } + } + assert.InDelta(t, numItems/numFinalCols, countRemapped, expectedDelta) +} diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index 6e2241654..c54a7a4dc 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -159,7 +159,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { "test-label": "test-value", "foo": "bar", }, - TargetURL: "test-url", + TargetURL: "test-url", CollectorName: "test-collector", }, TargetItem{ @@ -167,7 +167,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { Label: model.LabelSet{ "test-label": "test-value", }, - TargetURL: "test-url", + TargetURL: "test-url", CollectorName: "test-collector", }, }, diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 9e037567d..3824d1a1d 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -13,7 +13,7 @@ import ( var _ Allocator = &leastWeightedAllocator{} -const strategyName = "least-weighted" +const leastWeightedStrategyName = "least-weighted" /* Load balancer will serve on an HTTP server exposing /jobs//targets @@ -91,7 +91,7 @@ func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetIt } allocator.targetItems[targetItem.Hash()] = targetItem chosenCollector.NumTargets++ - TargetsPerCollector.WithLabelValues(chosenCollector.Name, strategyName).Set(float64(chosenCollector.NumTargets)) + TargetsPerCollector.WithLabelValues(chosenCollector.Name, leastWeightedStrategyName).Set(float64(chosenCollector.NumTargets)) } // handleTargets receives the new and removed targets and reconciles the current state. @@ -105,7 +105,7 @@ func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*Target c := allocator.collectors[target.CollectorName] c.NumTargets-- delete(allocator.targetItems, k) - TargetsPerCollector.WithLabelValues(target.CollectorName, strategyName).Set(float64(c.NumTargets)) + TargetsPerCollector.WithLabelValues(target.CollectorName, leastWeightedStrategyName).Set(float64(c.NumTargets)) } } @@ -128,7 +128,7 @@ func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Col // Clear removed collectors for _, k := range diff.Removals() { delete(allocator.collectors, k.Name) - TargetsPerCollector.WithLabelValues(k.Name, strategyName).Set(0) + TargetsPerCollector.WithLabelValues(k.Name, leastWeightedStrategyName).Set(0) } // Insert the new collectors for _, i := range diff.Additions() { @@ -147,7 +147,7 @@ func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Col // load balancing decisions. This method should be called when there are // new targets discovered or existing targets are shutdown. func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*TargetItem) { - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", strategyName)) + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", leastWeightedStrategyName)) defer timer.ObserveDuration() allocator.m.Lock() @@ -170,10 +170,10 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*TargetIt // This method is called when Collectors are added or removed. func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Collector) { log := allocator.log.WithValues("component", "opentelemetry-targetallocator") - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", strategyName)) + timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", leastWeightedStrategyName)) defer timer.ObserveDuration() - CollectorsAllocatable.WithLabelValues(strategyName).Set(float64(len(collectors))) + CollectorsAllocatable.WithLabelValues(leastWeightedStrategyName).Set(float64(len(collectors))) if len(collectors) == 0 { log.Info("No collector instances present") return @@ -190,17 +190,10 @@ func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Co return } -func NewAllocator(log logr.Logger) Allocator { +func newLeastWeightedAllocator(log logr.Logger) Allocator { return &leastWeightedAllocator{ log: log, collectors: make(map[string]*Collector), targetItems: make(map[string]*TargetItem), } } - -func init() { - err := Register(strategyName, NewAllocator) - if err != nil { - panic(err) - } -} diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index c15c30a30..d6b98b3d0 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -4,6 +4,7 @@ import ( "fmt" "math" "math/rand" + "strconv" "testing" "github.com/prometheus/common/model" @@ -13,19 +14,31 @@ import ( var logger = logf.Log.WithName("unit-tests") +func colIndex(index, numCols int) int { + if numCols == 0 { + return -1 + } + return index % numCols +} + func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*TargetItem { toReturn := map[string]*TargetItem{} for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", i%numCollectors) - newTarget := NewTargetItem(fmt.Sprintf("test-job-%d", i), "test-url", nil, collector) + collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) + label := model.LabelSet{ + "collector": model.LabelValue(collector), + "i": model.LabelValue(strconv.Itoa(i)), + "total": model.LabelValue(strconv.Itoa(n + startingIndex)), + } + newTarget := NewTargetItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) toReturn[newTarget.Hash()] = newTarget } return toReturn } -func makeNCollectors(n int, targetsForEach int) map[string]*Collector { +func makeNCollectors(n int, targetsForEach int, startingIndex int) map[string]*Collector { toReturn := map[string]*Collector{} - for i := 0; i < n; i++ { + for i := startingIndex; i < n+startingIndex; i++ { collector := fmt.Sprintf("collector-%d", i) toReturn[collector] = &Collector{ Name: collector, @@ -38,7 +51,7 @@ func makeNCollectors(n int, targetsForEach int) map[string]*Collector { func TestSetCollectors(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := makeNCollectors(3, 0, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -54,7 +67,7 @@ func TestAddingAndRemovingTargets(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := makeNCollectors(3, 0, 0) s.SetCollectors(cols) initTargets := makeNNewTargets(6, 3, 0) @@ -89,7 +102,7 @@ func TestAllocationCollision(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := makeNCollectors(3, 0, 0) s.SetCollectors(cols) firstLabels := model.LabelSet{ "test": "test1", @@ -123,7 +136,7 @@ func TestAllocationCollision(t *testing.T) { func TestNoCollectorReassignment(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := makeNCollectors(3, 0, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -143,7 +156,7 @@ func TestNoCollectorReassignment(t *testing.T) { assert.Len(t, targetItems, expectedTargetLen) // assign new set of collectors with the same names - newCols := makeNCollectors(3, 0) + newCols := makeNCollectors(3, 0, 0) s.SetCollectors(newCols) newTargetItems := s.TargetItems() @@ -154,7 +167,7 @@ func TestNoCollectorReassignment(t *testing.T) { func TestSmartCollectorReassignment(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(4, 0) + cols := makeNCollectors(4, 0, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -163,7 +176,7 @@ func TestSmartCollectorReassignment(t *testing.T) { for _, i := range cols { assert.NotNil(t, s.Collectors()[i.Name]) } - initTargets := makeNNewTargets(6, 4, 0) + initTargets := makeNNewTargets(6, 0, 0) // test that targets and collectors are added properly s.SetTargets(initTargets) @@ -205,7 +218,7 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // prepare allocator with 3 collectors and 'random' amount of targets s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := makeNCollectors(3, 0, 0) s.SetCollectors(cols) targets := makeNNewTargets(27, 3, 0) diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go index 42166caf7..949a397fd 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/allocation/strategy.go @@ -5,6 +5,7 @@ import ( "fmt" "net/url" + "github.com/buraksezer/consistent" "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -76,6 +77,8 @@ func (t TargetItem) Hash() string { return t.JobName + t.TargetURL + t.Label.Fingerprint().String() } +var _ consistent.Member = Collector{} + // Collector Creates a struct that holds Collector information // This struct will be parsed into endpoint with Collector and jobs info // This struct can be extended with information like annotations and labels in the future @@ -84,6 +87,21 @@ type Collector struct { NumTargets int } +func (c Collector) String() string { + return c.Name +} + func NewCollector(name string) *Collector { return &Collector{Name: name} } + +func init() { + err := Register(leastWeightedStrategyName, newLeastWeightedAllocator) + if err != nil { + panic(err) + } + err = Register(consistentHashingStrategyName, newConsistentHashingAllocator) + if err != nil { + panic(err) + } +} diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index af1eec2ee..93fafa28e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -42,6 +42,7 @@ require ( github.com/aws/aws-sdk-go v1.44.41 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect + github.com/buraksezer/consistent v0.9.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe // indirect github.com/containerd/containerd v1.5.7 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index e3d28aeff..5230d2b70 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -305,6 +305,8 @@ github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7 github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/buraksezer/consistent v0.9.0 h1:Zfs6bX62wbP3QlbPGKUhqDw7SmNkOzY5bHZIYXYpR5g= +github.com/buraksezer/consistent v0.9.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 88e8f28cf..27e6e0180 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -807,7 +807,9 @@ spec: properties: allocationStrategy: description: AllocationStrategy determines which strategy the - target allocator should use for allocation + target allocator should use for allocation. The current options + are least-weighted and consistent-hashing. The default option + is least-weighted type: string enabled: description: Enabled indicates whether to use a target allocation @@ -829,6 +831,14 @@ spec: custom resources as targets or not. type: boolean type: object + replicas: + description: Replicas is the number of pod instances for the underlying + TargetAllocator. This should only be set to a value other than + 1 if a strategy that allows for high availability is chosen. + Currently, the only allocation strategy that can be run in a + high availability mode is consistent-hashing. + format: int32 + type: integer serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. diff --git a/docs/api.md b/docs/api.md index 97c0fba76..dac36db06 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3116,7 +3116,7 @@ TargetAllocator indicates a value which determines whether to spawn a target all allocationStrategy string - AllocationStrategy determines which strategy the target allocator should use for allocation
+ AllocationStrategy determines which strategy the target allocator should use for allocation. The current options are least-weighted and consistent-hashing. The default option is least-weighted
false @@ -3140,6 +3140,15 @@ TargetAllocator indicates a value which determines whether to spawn a target all PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
false + + replicas + integer + + Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value other than 1 if a strategy that allows for high availability is chosen. Currently, the only allocation strategy that can be run in a high availability mode is consistent-hashing.
+
+ Format: int32
+ + false serviceAccount string diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 386790075..d5d794d88 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -127,6 +127,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { replicas, maxReplicas := int32(2), int32(10) + oneReplica := int32(1) param := Params{ Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ @@ -144,7 +145,8 @@ func TestExpectedDeployments(t *testing.T) { Replicas: &replicas, Mode: v1alpha1.ModeStatefulSet, TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, + Enabled: true, + Replicas: &oneReplica, }, Config: ` receivers: @@ -177,6 +179,61 @@ func TestExpectedDeployments(t *testing.T) { assert.Equal(t, *allocator.Spec.Replicas, int32(1)) }) + t.Run("should update target allocator deployment replicas when changed", func(t *testing.T) { + initialReplicas, nextReplicas := int32(1), int32(2) + param := Params{ + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &initialReplicas, + Mode: v1alpha1.ModeStatefulSet, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Replicas: &initialReplicas, + }, + Config: ` + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + + `, + }, + }, + Scheme: testScheme, + Log: logger, + } + expected := []v1.Deployment{} + allocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) + expected = append(expected, allocator) + + assert.Len(t, expected, 1) + assert.Equal(t, *allocator.Spec.Replicas, int32(1)) + param.Instance.Spec.TargetAllocator.Replicas = &nextReplicas + finalAllocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) + assert.Equal(t, *finalAllocator.Spec.Replicas, int32(2)) + }) + t.Run("should update deployment", func(t *testing.T) { createObjectIfNotExists(t, "test-collector", &expectedDeploy) err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index f7be218dd..0eb919853 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -30,8 +30,6 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele labels := Labels(otelcol) labels["app.kubernetes.io/name"] = naming.TargetAllocator(otelcol) - var replicas int32 = 1 - return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: naming.TargetAllocator(otelcol), @@ -39,7 +37,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Labels: labels, }, Spec: appsv1.DeploymentSpec{ - Replicas: &replicas, + Replicas: otelcol.Spec.TargetAllocator.Replicas, Selector: &metav1.LabelSelector{ MatchLabels: labels, }, From f82536560b2996d8ef8362e1d0fc3f544a64ebfa Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Fri, 16 Sep 2022 10:13:14 +0200 Subject: [PATCH 0590/1234] Release v0.60.0 (#1100) Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- CHANGELOG.md | 18 ++++++++++++++++++ README.md | 3 +-- ...lemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 4 ++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9115181e4..037570a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ Changes by Version ================== +0.60.0 +------------------- +### 🚀 New components 🚀 +* .NET - enable bytecode instrumentation ([#1081](https://github.com/open-telemetry/opentelemetry-operator/pull/1081), [@Kielek](https://github.com/Kielek)) +* Introduce ability to specify strategies for target allocation ([#1079](https://github.com/open-telemetry/opentelemetry-operator/pull/1079), [@jaronoff97](https://github.com/jaronoff97)) +### 💡 Enhancements 💡 +* Expose Horizontal Pod Autoscaler Behavior and add hpa scaledown test ([#1077](https://github.com/open-telemetry/opentelemetry-operator/pull/1077), [@kevinearls](https://github.com/kevinearls)) +* Utilize .NET AutoInstrumentation docker image v.0.3.1-beta.1 ([#1091](https://github.com/open-telemetry/opentelemetry-operator/pull/1091), [@Kielek](https://github.com/Kielek)) +* Update the javaagent version to 1.18.0 ([#1096](https://github.com/open-telemetry/opentelemetry-operator/pull/1096), [@opentelemetrybot](https://github.com/opentelemetrybot)) +* Update GetAllTargetsByCollectorAndJob to use TargetItem hash ([#1086](https://github.com/open-telemetry/opentelemetry-operator/pull/1086), [@kelseyma](https://github.com/kelseyma)) +* Upgrade kind images and add testing for Kubernetes 1.25 ([#1078](https://github.com/open-telemetry/opentelemetry-operator/pull/1078), [@iblancasa](https://github.com/iblancasa)) +* Bump .NET OTel AutoInstrumentation to 0.3.1-beta.1 ([#1085](https://github.com/open-telemetry/opentelemetry-operator/pull/1085), [@Kielek](https://github.com/Kielek)) +* Make sure we return the right version when autoscaling v2 is found ([#1075](https://github.com/open-telemetry/opentelemetry-operator/pull/1075), [@kevinearls](https://github.com/kevinearls)) +* Add retry loop for client.get of replicaset as that sometimes fails ([#1072](https://github.com/open-telemetry/opentelemetry-operator/pull/1072), [@kevinearls](https://github.com/kevinearls)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.60.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.60.0) +* [OpenTelemetry Contrib - v0.60.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.60.0) + 0.59.0 ------------------- diff --git a/README.md b/README.md index 719485445..2247e40d7 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | | v0.58.0 | v1.19 to v1.24 | v1 | | v0.57.2 | v1.19 to v1.24 | v1 | @@ -337,8 +338,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.42.0 | v1.21 to v1.23 | v1alpha2 | | v0.41.1 | v1.21 to v1.23 | v1alpha2 | | v0.41.0 | v1.20 to v1.22 | v1alpha2 | -| v0.40.0 | v1.20 to v1.22 | v1alpha2 | - ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 9f7da1d8e..fb2be6e9b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.59.0 + name: opentelemetry-operator.v0.60.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -282,7 +282,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.59.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.60.0 livenessProbe: httpGet: path: /healthz @@ -392,7 +392,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.59.0 + version: 0.60.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 0de42ba63..05b8d9aed 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.59.0 +opentelemetry-collector=0.60.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.59.0 +operator=0.60.0 # Represents the current release of the Target Allocator. targetallocator=0.1.0 From f40724e27dd5f4c597d350315e4dcd94d1fd56ca Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 16 Sep 2022 11:21:19 +0200 Subject: [PATCH 0591/1234] Add missing entry to 0.60.0 changelog (#1102) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037570a77..91d36732f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changes by Version ------------------- ### 🚀 New components 🚀 * .NET - enable bytecode instrumentation ([#1081](https://github.com/open-telemetry/opentelemetry-operator/pull/1081), [@Kielek](https://github.com/Kielek)) +* Added consistent hashing strategy for target allocation ([#1087](https://github.com/open-telemetry/opentelemetry-operator/pull/1087), [@jaronoff97](https://github.com/jaronoff97)) * Introduce ability to specify strategies for target allocation ([#1079](https://github.com/open-telemetry/opentelemetry-operator/pull/1079), [@jaronoff97](https://github.com/jaronoff97)) ### 💡 Enhancements 💡 * Expose Horizontal Pod Autoscaler Behavior and add hpa scaledown test ([#1077](https://github.com/open-telemetry/opentelemetry-operator/pull/1077), [@kevinearls](https://github.com/kevinearls)) From 0d4da4c5ea2adf89f266bf54afafb8e5a56bbe35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 10:37:52 +0200 Subject: [PATCH 0592/1234] Bump k8s.io/kubectl from 0.25.0 to 0.25.1 (#1112) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.25.0 to 0.25.1. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.25.0...v0.25.1) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index 5ebe3570e..e805d85ae 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.10.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.0 - k8s.io/apimachinery v0.25.0 - k8s.io/client-go v0.25.0 - k8s.io/kubectl v0.25.0 + k8s.io/api v0.25.1 + k8s.io/apimachinery v0.25.1 + k8s.io/client-go v0.25.1 + k8s.io/kubectl v0.25.1 sigs.k8s.io/controller-runtime v0.13.0 ) @@ -125,7 +125,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.0 // indirect + k8s.io/component-base v0.25.1 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index db75cca7f..a78c20355 100644 --- a/go.sum +++ b/go.sum @@ -810,11 +810,11 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -1628,20 +1628,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= -k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= +k8s.io/api v0.25.1 h1:yL7du50yc93k17nH/Xe9jujAYrcDkI/i5DL1jPz4E3M= +k8s.io/api v0.25.1/go.mod h1:hh4itDvrWSJsmeUc28rIFNri8MatNAAxJjKcQmhX6TU= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= +k8s.io/apimachinery v0.25.1 h1:t0XrnmCEHVgJlR2arwO8Awp9ylluDic706WePaYCBTI= +k8s.io/apimachinery v0.25.1/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= -k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= -k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= -k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= +k8s.io/client-go v0.25.1 h1:uFj4AJKtE1/ckcSKz8IhgAuZTdRXZDKev8g387ndD58= +k8s.io/client-go v0.25.1/go.mod h1:rdFWTLV/uj2C74zGbQzOsmXPUtMAjSf7ajil4iJUNKo= +k8s.io/component-base v0.25.1 h1:Wmj33QwddVwsJFJWmXlf24Nu8do2bGHLabXHrKz7Org= +k8s.io/component-base v0.25.1/go.mod h1:j78+TFdsKM8RXHfM88oeAdZu2v9qMZdQZOfg0LGW+q4= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1656,8 +1656,8 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.0 h1:/Wn1cFqo8ik3iee1EvpxYre3bkWsGLXzLQI6uCCAkQc= -k8s.io/kubectl v0.25.0/go.mod h1:n16ULWsOl2jmQpzt2o7Dud1t4o0+Y186ICb4O+GwKAU= +k8s.io/kubectl v0.25.1 h1:M488FUhCMLugm5+kACkDMlldaOz0yLzYpQzUvUP+nDE= +k8s.io/kubectl v0.25.1/go.mod h1:ki8ymtGZau2M1lloUV2fqMxP9UCX/i0WIhnWTfqsGSY= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From e4ee830cb76c2716817d2a47c5ccc93dd350002b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 09:49:06 +0200 Subject: [PATCH 0593/1234] Bump k8s.io/kubectl from 0.25.1 to 0.25.2 (#1119) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.25.1 to 0.25.2. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.25.1...v0.25.2) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index e805d85ae..e98a5c2ba 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.10.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.1 - k8s.io/apimachinery v0.25.1 - k8s.io/client-go v0.25.1 - k8s.io/kubectl v0.25.1 + k8s.io/api v0.25.2 + k8s.io/apimachinery v0.25.2 + k8s.io/client-go v0.25.2 + k8s.io/kubectl v0.25.2 sigs.k8s.io/controller-runtime v0.13.0 ) @@ -125,7 +125,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.1 // indirect + k8s.io/component-base v0.25.2 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index a78c20355..302bb0fcb 100644 --- a/go.sum +++ b/go.sum @@ -1628,20 +1628,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.25.1 h1:yL7du50yc93k17nH/Xe9jujAYrcDkI/i5DL1jPz4E3M= -k8s.io/api v0.25.1/go.mod h1:hh4itDvrWSJsmeUc28rIFNri8MatNAAxJjKcQmhX6TU= +k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8= +k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.25.1 h1:t0XrnmCEHVgJlR2arwO8Awp9ylluDic706WePaYCBTI= -k8s.io/apimachinery v0.25.1/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= +k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs= +k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.25.1 h1:uFj4AJKtE1/ckcSKz8IhgAuZTdRXZDKev8g387ndD58= -k8s.io/client-go v0.25.1/go.mod h1:rdFWTLV/uj2C74zGbQzOsmXPUtMAjSf7ajil4iJUNKo= -k8s.io/component-base v0.25.1 h1:Wmj33QwddVwsJFJWmXlf24Nu8do2bGHLabXHrKz7Org= -k8s.io/component-base v0.25.1/go.mod h1:j78+TFdsKM8RXHfM88oeAdZu2v9qMZdQZOfg0LGW+q4= +k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo= +k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4= +k8s.io/component-base v0.25.2 h1:Nve/ZyHLUBHz1rqwkjXm/Re6IniNa5k7KgzxZpTfSQY= +k8s.io/component-base v0.25.2/go.mod h1:90W21YMr+Yjg7MX+DohmZLzjsBtaxQDDwaX4YxDkl60= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1656,8 +1656,8 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.1 h1:M488FUhCMLugm5+kACkDMlldaOz0yLzYpQzUvUP+nDE= -k8s.io/kubectl v0.25.1/go.mod h1:ki8ymtGZau2M1lloUV2fqMxP9UCX/i0WIhnWTfqsGSY= +k8s.io/kubectl v0.25.2 h1:2993lTeVimxKSWx/7z2PiJxUILygRa3tmC4QhFaeioA= +k8s.io/kubectl v0.25.2/go.mod h1:eoBGJtKUj7x38KXelz+dqVtbtbKwCqyKzJWmBHU0prg= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From a5a4cbfceaed2ca76d91ee7f38b5b6fbeaf04dd5 Mon Sep 17 00:00:00 2001 From: Tim Buchwaldt Date: Thu, 22 Sep 2022 10:12:55 +0200 Subject: [PATCH 0594/1234] Add default settings to README (#1114) * Add default settings to README As many probably copy the first example in the README, this should contain the suggested two default processors. Running without them is a bad idea, therefore I suggest this change. * Update to recommended default values --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2247e40d7..bfa92ac67 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,13 @@ spec: grpc: http: processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s exporters: logging: From f7aafc50fe0916b359d3070cd3c662002328e24a Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:10:17 -0400 Subject: [PATCH 0595/1234] Add targetCPUUTilization to HPA (#1066) --- apis/v1alpha1/opentelemetrycollector_types.go | 6 ++-- .../opentelemetrycollector_webhook.go | 10 ++++++ apis/v1alpha1/zz_generated.deepcopy.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ docs/api.md | 9 +++++ pkg/collector/horizontalpodautoscaler.go | 8 ++--- pkg/collector/horizontalpodautoscaler_test.go | 4 +++ .../reconcile/horizontalpodautoscaler.go | 2 ++ .../reconcile/horizontalpodautoscaler_test.go | 4 +++ tests/e2e/autoscale/00-assert.yaml | 17 +++++++-- tests/e2e/autoscale/00-install.yaml | 35 +++++++++++++++++++ 12 files changed, 99 insertions(+), 10 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 1c9382fe2..197162ac4 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -41,13 +41,11 @@ type OpenTelemetryCollectorSpec struct { // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional MaxReplicas *int32 `json:"maxReplicas,omitempty"` - // Autoscaler specifies the pod autoscaling configuration to use // for the OpenTelemetryCollector workload. // // +optional Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"` - // SecurityContext will be set as the container security context. // +optional SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` @@ -216,6 +214,10 @@ type OpenTelemetryCollectorList struct { type AutoscalerSpec struct { // +optional Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"` + // TargetCPUUtilization sets the target average CPU used across all replicas. + // If average CPU exceeds this value, the HPA will scale up. Defaults to 90 percent. + // +optional + TargetCPUUtilization *int32 `json:"targetCPUUtilization,omitempty"` } func init() { diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 39e5f617d..78e971962 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -65,6 +65,12 @@ func (r *OpenTelemetryCollector) Default() { if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Replicas == nil { r.Spec.TargetAllocator.Replicas = &one } + + // Set default targetCPUUtilization for autoscaler + if r.Spec.MaxReplicas != nil && r.Spec.Autoscaler.TargetCPUUtilization == nil { + defaultCPUTarget := int32(90) + r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -141,6 +147,10 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") } } + if r.Spec.Autoscaler.TargetCPUUtilization != nil && (*r.Spec.Autoscaler.TargetCPUUtilization < int32(1) || *r.Spec.Autoscaler.TargetCPUUtilization > int32(99)) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetCPUUtilization should be greater than 0 and less than 100") + } + } return nil diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f2b839793..e41120b72 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -539,4 +539,4 @@ func (in *ScaleSubresourceStatus) DeepCopy() *ScaleSubresourceStatus { out := new(ScaleSubresourceStatus) in.DeepCopyInto(out) return out -} +} \ No newline at end of file diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 1572235e1..c1e4aa95a 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -182,6 +182,12 @@ spec: type: integer type: object type: object + targetCPUUtilization: + description: TargetCPUUtilization sets the target average CPU + used across all replicas. If average CPU exceeds this value, + the HPA will scale up. Defaults to 90 percent. + format: int32 + type: integer type: object config: description: Config is the raw JSON to be used as the collector's diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 27e6e0180..291ce4177 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -180,6 +180,12 @@ spec: type: integer type: object type: object + targetCPUUtilization: + description: TargetCPUUtilization sets the target average CPU + used across all replicas. If average CPU exceeds this value, + the HPA will scale up. Defaults to 90 percent. + format: int32 + type: integer type: object config: description: Config is the raw JSON to be used as the collector's diff --git a/docs/api.md b/docs/api.md index dac36db06..cfcf11371 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1896,6 +1896,15 @@ Autoscaler specifies the pod autoscaling configuration to use for the OpenTeleme HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
false + + targetCPUUtilization + integer + + TargetCPUUtilization sets the target average CPU used across all replicas. If average CPU exceeds this value, the HPA will scale up. Defaults to 90 percent.
+
+ Format: int32
+ + false diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 25265a3d7..8fc133ab1 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -28,8 +28,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -const defaultCPUTarget int32 = 90 - func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { autoscalingVersion := cfg.AutoscalingVersion() @@ -37,7 +35,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al labels["app.kubernetes.io/name"] = naming.Collector(otelcol) annotations := Annotations(otelcol) - cpuTarget := defaultCPUTarget + var result client.Object objectMeta := metav1.ObjectMeta{ @@ -54,7 +52,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Name: corev1.ResourceCPU, Target: autoscalingv2beta2.MetricTarget{ Type: autoscalingv2beta2.UtilizationMetricType, - AverageUtilization: &cpuTarget, + AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, }, }, } @@ -87,7 +85,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Name: corev1.ResourceCPU, Target: autoscalingv2.MetricTarget{ Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: &cpuTarget, + AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, }, }, } diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index c8f076248..04b90b348 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -41,6 +41,7 @@ func TestHPA(t *testing.T) { var minReplicas int32 = 3 var maxReplicas int32 = 5 + var cpuUtilization int32 = 90 otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -49,6 +50,9 @@ func TestHPA(t *testing.T) { Spec: v1alpha1.OpenTelemetryCollectorSpec{ Replicas: &minReplicas, MaxReplicas: &maxReplicas, + Autoscaler: &v1alpha1.AutoscalerSpec{ + TargetCPUUtilization: &cpuUtilization, + }, }, } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 302f3c4a5..1f8435ff1 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -119,6 +119,7 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV } else { updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics[0].Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization } else { updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas if params.Instance.Spec.MinReplicas != nil { @@ -126,6 +127,7 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV } else { updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics[0].Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization } } } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index 13cfe1a37..3d23f29c7 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -109,6 +109,7 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { minReplicas := int32(3) maxReplicas := int32(5) + cpuUtilization := int32(90) mockAutoDetector := &mockAutoDetect{ HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { @@ -147,6 +148,9 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { Config: string(configYAML), Replicas: &minReplicas, MaxReplicas: &maxReplicas, + Autoscaler: &v1alpha1.AutoscalerSpec{ + TargetCPUUtilization: &cpuUtilization, + }, }, }, Scheme: testScheme, diff --git a/tests/e2e/autoscale/00-assert.yaml b/tests/e2e/autoscale/00-assert.yaml index aaacc816c..4039af39f 100644 --- a/tests/e2e/autoscale/00-assert.yaml +++ b/tests/e2e/autoscale/00-assert.yaml @@ -4,7 +4,6 @@ metadata: name: simplest-collector status: readyReplicas: 1 - --- apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler @@ -16,4 +15,18 @@ spec: # This is not neccesarily exact. We really just want to wait until this is no longer status: currentCPUUtilizationPercentage: 20 - +--- +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: simplest-set-utilization-collector +spec: + minReplicas: 1 + maxReplicas: 2 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50 \ No newline at end of file diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 8645bb919..04e52e7be 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -36,3 +36,38 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest-set-utilization +spec: + minReplicas: 1 + maxReplicas: 2 + autoscaler: + targetCPUUtilization: 50 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From 77673ab265c3c4c0f8675e28fe68428d5c04df2e Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Mon, 3 Oct 2022 01:22:38 -0700 Subject: [PATCH 0596/1234] Fix lint issues in target allocator (#1090) * fix lint issues in target allocator files squash of all current commits on this branch * remove addtl golangci config * remove version.txt --- .github/workflows/continuous-integration.yaml | 4 ++ .golangci.yaml | 2 - Makefile | 1 + .../allocation/consistent_hashing.go | 26 ++++++--- .../allocation/consistent_hashing_test.go | 26 +++++++-- cmd/otel-allocator/allocation/http.go | 14 +++++ cmd/otel-allocator/allocation/http_test.go | 14 +++++ .../allocation/least_weighted.go | 30 +++++++--- .../allocation/least_weighted_test.go | 40 ++++++++----- cmd/otel-allocator/allocation/strategy.go | 24 ++++++-- cmd/otel-allocator/collector/collector.go | 16 +++++- .../collector/collector_test.go | 14 +++++ cmd/otel-allocator/config/config.go | 20 +++++-- cmd/otel-allocator/config/config_test.go | 14 +++++ cmd/otel-allocator/diff/diff.go | 14 +++++ cmd/otel-allocator/diff/diff_test.go | 14 +++++ cmd/otel-allocator/discovery/discovery.go | 16 +++++- .../discovery/discovery_test.go | 14 +++++ cmd/otel-allocator/header.txt | 13 +++++ cmd/otel-allocator/main.go | 57 ++++++++++++------- cmd/otel-allocator/version.txt | 1 - cmd/otel-allocator/watcher/file.go | 14 +++++ cmd/otel-allocator/watcher/main.go | 16 +++++- cmd/otel-allocator/watcher/promOperator.go | 19 ++++++- 24 files changed, 348 insertions(+), 75 deletions(-) create mode 100644 cmd/otel-allocator/header.txt delete mode 100644 cmd/otel-allocator/version.txt diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 6deff2320..2b5a9437b 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -31,6 +31,9 @@ jobs: lint: name: Code standards (linting) runs-on: ubuntu-20.04 + strategy: + matrix: + workdir: [".", "./cmd/otel-allocator"] steps: - name: Set up Go uses: actions/setup-go@v3 @@ -44,6 +47,7 @@ jobs: with: args: -v version: v1.48 + working-directory: ${{ matrix.workdir }} security: name: Security diff --git a/.golangci.yaml b/.golangci.yaml index 879cfc619..f1a7317c8 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -13,8 +13,6 @@ linters-settings: locale: US govet: disable-all: true - enable: - - fieldalignment linters: enable: diff --git a/Makefile b/Makefile index 09ce4b790..d3602da55 100644 --- a/Makefile +++ b/Makefile @@ -146,6 +146,7 @@ vet: .PHONY: lint lint: golangci-lint run + cd cmd/otel-allocator && golangci-lint run # Generate code .PHONY: generate diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index 31a78e35a..41f31a4e9 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( @@ -56,8 +70,8 @@ func newConsistentHashingAllocator(log logr.Logger) Allocator { // addTargetToTargetItems assigns a target to the collector based on its hash and adds it to the allocator's targetItems // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. -// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap -// INVARIANT: c.collectors must have at least 1 collector set +// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. +// INVARIANT: c.collectors must have at least 1 collector set. func (c *consistentHashingAllocator) addTargetToTargetItems(target *TargetItem) { // Check if this is a reassignment, if so, decrement the previous collector's NumTargets if previousColName, ok := c.collectors[target.CollectorName]; ok { @@ -78,8 +92,8 @@ func (c *consistentHashingAllocator) addTargetToTargetItems(target *TargetItem) } // handleTargets receives the new and removed targets and reconciles the current state. -// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector -// Any net-new additions are assigned to the next available collector +// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. +// Any net-new additions are assigned to the next available collector. func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*TargetItem]) { // Check for removals for k, target := range c.targetItems { @@ -105,7 +119,7 @@ func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*TargetItem } // handleCollectors receives the new and removed collectors and reconciles the current state. -// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map +// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map. // Finally, update all targets' collectors to match the consistent hashing. func (c *consistentHashingAllocator) handleCollectors(diff diff.Changes[*Collector]) { // Clear removed collectors @@ -146,7 +160,6 @@ func (c *consistentHashingAllocator) SetTargets(targets map[string]*TargetItem) if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { c.handleTargets(targetsDiff) } - return } // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. @@ -170,7 +183,6 @@ func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collec if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { c.handleCollectors(collectorsDiff) } - return } // TargetItems returns a shallow copy of the targetItems map. diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go index 8793af53b..31ac9c200 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( @@ -7,7 +21,7 @@ import ( ) func TestCanSetSingleTarget(t *testing.T) { - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) c.SetTargets(makeNNewTargets(1, 3, 0)) @@ -21,7 +35,7 @@ func TestCanSetSingleTarget(t *testing.T) { func TestRelativelyEvenDistribution(t *testing.T) { numCols := 15 numItems := 10000 - cols := makeNCollectors(numCols, 0, 0) + cols := makeNCollectors(numCols, 0) var expectedPerCollector = float64(numItems / numCols) expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector c := newConsistentHashingAllocator(logger) @@ -38,7 +52,7 @@ func TestRelativelyEvenDistribution(t *testing.T) { } func TestFullReallocation(t *testing.T) { - cols := makeNCollectors(10, 0, 0) + cols := makeNCollectors(10, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) c.SetTargets(makeNNewTargets(10000, 10, 0)) @@ -46,7 +60,7 @@ func TestFullReallocation(t *testing.T) { assert.Len(t, actualTargetItems, 10000) actualCollectors := c.Collectors() assert.Len(t, actualCollectors, 10) - newCols := makeNCollectors(10, 0, 10) + newCols := makeNCollectors(10, 10) c.SetCollectors(newCols) updatedTargetItems := c.TargetItems() assert.Len(t, updatedTargetItems, 10000) @@ -63,7 +77,7 @@ func TestNumRemapped(t *testing.T) { numInitialCols := 15 numFinalCols := 16 expectedDelta := float64((numFinalCols - numInitialCols) * (numItems / numFinalCols)) - cols := makeNCollectors(numInitialCols, 0, 0) + cols := makeNCollectors(numInitialCols, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) c.SetTargets(makeNNewTargets(numItems, numInitialCols, 0)) @@ -71,7 +85,7 @@ func TestNumRemapped(t *testing.T) { assert.Len(t, actualTargetItems, numItems) actualCollectors := c.Collectors() assert.Len(t, actualCollectors, numInitialCols) - newCols := makeNCollectors(numFinalCols, 0, 0) + newCols := makeNCollectors(numFinalCols, 0) c.SetCollectors(newCols) updatedTargetItems := c.TargetItems() assert.Len(t, updatedTargetItems, numItems) diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 37d08769f..ee60f3160 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index c54a7a4dc..e4e7fb7b6 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 3824d1a1d..bed1dbd51 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( @@ -61,8 +75,8 @@ func (allocator *leastWeightedAllocator) Collectors() map[string]*Collector { // findNextCollector finds the next collector with fewer number of targets. // This method is called from within SetTargets and SetCollectors, whose caller -// acquires the needed lock. This method assumes there are is at least 1 collector set -// INVARIANT: allocator.collectors must have at least 1 collector set +// acquires the needed lock. This method assumes there are is at least 1 collector set. +// INVARIANT: allocator.collectors must have at least 1 collector set. func (allocator *leastWeightedAllocator) findNextCollector() *Collector { var col *Collector for _, v := range allocator.collectors { @@ -78,8 +92,8 @@ func (allocator *leastWeightedAllocator) findNextCollector() *Collector { // addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. -// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap -// INVARIANT: allocator.collectors must have at least 1 collector set +// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. +// INVARIANT: allocator.collectors must have at least 1 collector set. func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetItem) { chosenCollector := allocator.findNextCollector() targetItem := &TargetItem{ @@ -95,8 +109,8 @@ func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetIt } // handleTargets receives the new and removed targets and reconciles the current state. -// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector -// Any net-new additions are assigned to the next available collector +// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. +// Any net-new additions are assigned to the next available collector. func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*TargetItem]) { // Check for removals for k, target := range allocator.targetItems { @@ -122,7 +136,7 @@ func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*Target } // handleCollectors receives the new and removed collectors and reconciles the current state. -// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map +// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map. // Finally, any targets of removed collectors are reallocated to the next available collector. func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Collector]) { // Clear removed collectors @@ -163,7 +177,6 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*TargetIt if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { allocator.handleTargets(targetsDiff) } - return } // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. @@ -187,7 +200,6 @@ func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Co if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { allocator.handleCollectors(collectorsDiff) } - return } func newLeastWeightedAllocator(log logr.Logger) Allocator { diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index d6b98b3d0..3b6209ddd 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( @@ -36,13 +50,13 @@ func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*Ta return toReturn } -func makeNCollectors(n int, targetsForEach int, startingIndex int) map[string]*Collector { +func makeNCollectors(n int, startingIndex int) map[string]*Collector { toReturn := map[string]*Collector{} for i := startingIndex; i < n+startingIndex; i++ { collector := fmt.Sprintf("collector-%d", i) toReturn[collector] = &Collector{ Name: collector, - NumTargets: targetsForEach, + NumTargets: 0, } } return toReturn @@ -51,7 +65,7 @@ func makeNCollectors(n int, targetsForEach int, startingIndex int) map[string]*C func TestSetCollectors(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -67,7 +81,7 @@ func TestAddingAndRemovingTargets(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) s.SetCollectors(cols) initTargets := makeNNewTargets(6, 3, 0) @@ -97,12 +111,12 @@ func TestAddingAndRemovingTargets(t *testing.T) { } } -// Tests that two targets with the same target url and job name but different label set are both added +// Tests that two targets with the same target url and job name but different label set are both added. func TestAllocationCollision(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) s.SetCollectors(cols) firstLabels := model.LabelSet{ "test": "test1", @@ -136,7 +150,7 @@ func TestAllocationCollision(t *testing.T) { func TestNoCollectorReassignment(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -156,7 +170,7 @@ func TestNoCollectorReassignment(t *testing.T) { assert.Len(t, targetItems, expectedTargetLen) // assign new set of collectors with the same names - newCols := makeNCollectors(3, 0, 0) + newCols := makeNCollectors(3, 0) s.SetCollectors(newCols) newTargetItems := s.TargetItems() @@ -167,7 +181,7 @@ func TestNoCollectorReassignment(t *testing.T) { func TestSmartCollectorReassignment(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(4, 0, 0) + cols := makeNCollectors(4, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -212,13 +226,13 @@ func TestSmartCollectorReassignment(t *testing.T) { } } -// Tests that the delta in number of targets per collector is less than 15% of an even distribution +// Tests that the delta in number of targets per collector is less than 15% of an even distribution. func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // prepare allocator with 3 collectors and 'random' amount of targets s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0, 0) + cols := makeNCollectors(3, 0) s.SetCollectors(cols) targets := makeNNewTargets(27, 3, 0) @@ -241,8 +255,8 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // Remove half of targets randomly toDelete := len(targets) / 2 counter := 0 - for index, _ := range targets { - shouldDelete := rand.Intn(toDelete) + for index := range targets { + shouldDelete := rand.Intn(toDelete) //nolint:gosec if counter < shouldDelete { delete(targets, index) } diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go index 949a397fd..2808c32b5 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/allocation/strategy.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package allocation import ( @@ -17,7 +31,7 @@ type AllocatorProvider func(log logr.Logger) Allocator var ( registry = map[string]AllocatorProvider{} - // TargetsPerCollector records how many targets have been assigned to each collector + // TargetsPerCollector records how many targets have been assigned to each collector. // It is currently the responsibility of the strategy to track this information. TargetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "opentelemetry_allocator_targets_per_collector", @@ -37,7 +51,7 @@ func New(name string, log logr.Logger) (Allocator, error) { if p, ok := registry[name]; ok { return p(log), nil } - return nil, errors.New(fmt.Sprintf("unregistered strategy: %s", name)) + return nil, fmt.Errorf("unregistered strategy: %s", name) } func Register(name string, provider AllocatorProvider) error { @@ -79,9 +93,9 @@ func (t TargetItem) Hash() string { var _ consistent.Member = Collector{} -// Collector Creates a struct that holds Collector information -// This struct will be parsed into endpoint with Collector and jobs info -// This struct can be extended with information like annotations and labels in the future +// Collector Creates a struct that holds Collector information. +// This struct will be parsed into endpoint with Collector and jobs info. +// This struct can be extended with information like annotations and labels in the future. type Collector struct { Name string NumTargets int diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index e1cf66ec1..f6e7f0ff8 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector import ( @@ -108,7 +122,7 @@ func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap return "no event" } - switch event.Type { + switch event.Type { //nolint:exhaustive case watch.Added: collectorMap[pod.Name] = allocation.NewCollector(pod.Name) case watch.Deleted: diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go index 059e61670..d4bd1680d 100644 --- a/cmd/otel-allocator/collector/collector_test.go +++ b/cmd/otel-allocator/collector/collector_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package collector import ( diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 05d0e3840..0fa8879f0 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -1,7 +1,20 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( - "errors" "flag" "fmt" "io/fs" @@ -22,11 +35,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" ) -// ErrInvalidYAML represents an error in the format of the original YAML configuration file. -var ( - ErrInvalidYAML = errors.New("couldn't parse the loadbalancer configuration") -) - const DefaultResyncTime = 5 * time.Minute const DefaultConfigFilePath string = "/conf/targetallocator.yaml" diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 09ed11a27..3c45ffefe 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/cmd/otel-allocator/diff/diff.go b/cmd/otel-allocator/diff/diff.go index 44ec55e04..4bb201cfc 100644 --- a/cmd/otel-allocator/diff/diff.go +++ b/cmd/otel-allocator/diff/diff.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package diff // Changes is the result of the difference between two maps – items that are added and items that are removed diff --git a/cmd/otel-allocator/diff/diff_test.go b/cmd/otel-allocator/diff/diff_test.go index bcae530d5..9dec103b7 100644 --- a/cmd/otel-allocator/diff/diff_test.go +++ b/cmd/otel-allocator/diff/diff_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package diff import ( diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 2c0393f61..b6e45f991 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package discovery import ( @@ -35,7 +49,7 @@ func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options go func() { if err := manager.Run(); err != nil { - logger.Log("Discovery manager failed", err) + log.Error(err, "Discovery manager failed") } }() return &Manager{ diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 7edacde40..afea78717 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package discovery import ( diff --git a/cmd/otel-allocator/header.txt b/cmd/otel-allocator/header.txt new file mode 100644 index 000000000..3881885f3 --- /dev/null +++ b/cmd/otel-allocator/header.txt @@ -0,0 +1,13 @@ +Copyright The OpenTelemetry Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 80d8ec474..7c830322e 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( @@ -8,6 +22,7 @@ import ( "os" "os/signal" "syscall" + "time" gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" @@ -64,7 +79,12 @@ func main() { setupLog.Error(err, "Can't start the watchers") os.Exit(1) } - defer watcher.Close() + defer func() { + err := watcher.Close() + if err != nil { + log.Error(err, "failed to close watcher") + } + }() // creates a new discovery manager discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) @@ -77,10 +97,7 @@ func main() { os.Exit(1) } - srv, err := newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) - if err != nil { - setupLog.Error(err, "Can't start the server") - } + srv := newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) interrupts := make(chan os.Signal, 1) signal.Notify(interrupts, os.Interrupt, syscall.SIGTERM) @@ -108,10 +125,7 @@ func main() { if err := srv.Shutdown(ctx); err != nil { setupLog.Error(err, "Cannot shutdown the server") } - srv, err = newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) - if err != nil { - setupLog.Error(err, "Error restarting the server with new config") - } + srv = newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) go func() { if err := srv.Start(); err != http.ErrServerClosed { setupLog.Error(err, "Can't restart the server") @@ -143,7 +157,7 @@ type server struct { server *http.Server } -func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, k8sclient *collector.Client, listenAddr *string) (*server, error) { +func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, k8sclient *collector.Client, listenAddr *string) *server { s := &server{ logger: log, allocator: allocator, @@ -155,8 +169,8 @@ func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager router.HandleFunc("/jobs", s.JobHandler).Methods("GET") router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") router.Path("/metrics").Handler(promhttp.Handler()) - s.server = &http.Server{Addr: *listenAddr, Handler: router} - return s, nil + s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} + return s } func configureFileDiscovery(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, ctx context.Context, cliConfig config.CLIConfig) (*collector.Client, error) { @@ -195,7 +209,7 @@ func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = allocation.LinkJSON{Link: v.Link.Link} } - jsonHandler(w, r, displayData) + jsonHandler(s.logger, w, displayData) } // PrometheusMiddleware implements mux.MiddlewareFunc. @@ -219,30 +233,33 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) jobId, err := url.QueryUnescape(params["job_id"]) if err != nil { - errorHandler(err, w, r) + errorHandler(w) return } if len(q) == 0 { displayData := allocation.GetAllTargetsByJob(jobId, compareMap, s.allocator) - jsonHandler(w, r, displayData) + jsonHandler(s.logger, w, displayData) } else { tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], jobId, compareMap, s.allocator) // Displays empty list if nothing matches if len(tgs) == 0 { - jsonHandler(w, r, []interface{}{}) + jsonHandler(s.logger, w, []interface{}{}) return } - jsonHandler(w, r, tgs) + jsonHandler(s.logger, w, tgs) } } -func errorHandler(err error, w http.ResponseWriter, r *http.Request) { +func errorHandler(w http.ResponseWriter) { w.WriteHeader(500) } -func jsonHandler(w http.ResponseWriter, r *http.Request, data interface{}) { +func jsonHandler(logger logr.Logger, w http.ResponseWriter, data interface{}) { w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(data) + err := json.NewEncoder(w).Encode(data) + if err != nil { + logger.Error(err, "failed to encode data for http response") + } } diff --git a/cmd/otel-allocator/version.txt b/cmd/otel-allocator/version.txt deleted file mode 100644 index 6e8bf73aa..000000000 --- a/cmd/otel-allocator/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index 6adc3c33e..a2a7f9fd9 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package watcher import ( diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go index dac48d5fb..8dbd71036 100644 --- a/cmd/otel-allocator/watcher/main.go +++ b/cmd/otel-allocator/watcher/main.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package watcher import ( @@ -59,7 +73,7 @@ func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator allocatio watcher.watchers = append(watcher.watchers, &fileWatcher) if *config.PromCRWatcherConf.Enabled { - promWatcher, err := newCRDMonitorWatcher(logger, config) + promWatcher, err := newCRDMonitorWatcher(config) if err != nil { return nil, err } diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 382b2f217..09eee6f50 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -1,3 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package watcher import ( @@ -6,7 +20,6 @@ import ( allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" "github.com/go-kit/log" - "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/prometheus-operator/prometheus-operator/pkg/assets" monitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" @@ -20,7 +33,7 @@ import ( "k8s.io/client-go/tools/cache" ) -func newCRDMonitorWatcher(logger logr.Logger, config allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { +func newCRDMonitorWatcher(config allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { mClient, err := monitoringclient.NewForConfig(config.ClusterConfig) if err != nil { return nil, err @@ -63,7 +76,7 @@ type PrometheusCRWatcher struct { configGenerator *prometheus.ConfigGenerator } -// Start wrapped informers and wait for an initial sync +// Start wrapped informers and wait for an initial sync. func (w *PrometheusCRWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error) error { watcher := Watcher(w) event := Event{ From 942ed4dc940ac0143c66cb16d97068ff0292c08b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 4 Oct 2022 03:21:14 -0400 Subject: [PATCH 0597/1234] Add scrape configs endpoint to target allocator (#1124) * Add scrape configs endpoint * Fix a borked chan * Fix some defaults * comments and cleaning * Goimports * Pass linting * Reuse and docs * Update pkg/collector/container.go Co-authored-by: Anthony Mirabella Co-authored-by: Pavol Loffay Co-authored-by: Anthony Mirabella --- apis/v1alpha1/zz_generated.deepcopy.go | 2 +- cmd/otel-allocator/README.md | 35 +++++++++++++++++++ cmd/otel-allocator/discovery/discovery.go | 10 ++++++ cmd/otel-allocator/go.mod | 8 ++--- cmd/otel-allocator/main.go | 41 ++++++++++++++++++----- cmd/otel-allocator/watcher/file.go | 5 +++ pkg/collector/container.go | 12 +++++++ pkg/collector/reconcile/service.go | 1 + pkg/collector/reconcile/service_test.go | 16 +++++++++ 9 files changed, 117 insertions(+), 13 deletions(-) diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index e41120b72..f2b839793 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -539,4 +539,4 @@ func (in *ScaleSubresourceStatus) DeepCopy() *ScaleSubresourceStatus { out := new(ScaleSubresourceStatus) in.DeepCopyInto(out) return out -} \ No newline at end of file +} diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index bff32f383..f4b4d53fd 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -12,7 +12,42 @@ This configuration will be resolved to target configurations and then split acro TargetAllocators expose the results as [HTTP_SD endpoints](https://prometheus.io/docs/prometheus/latest/http_sd/) split by collector. +Currently, the Target Allocator handles the sharding of targets. The operator sets the `$SHARD` variable to 0 to allow +collectors to keep targets generated by a Prometheus CRD. Using Prometheus sharding and target allocator sharding is not +recommended currently and may lead to unknown results. +[See this thread for more information](https://github.com/open-telemetry/opentelemetry-operator/pull/1124#discussion_r984683577) + #### Endpoints +`/scrape_configs`: + +```json +{ + "job1": { + "follow_redirects": true, + "honor_timestamps": true, + "job_name": "job1", + "metric_relabel_configs": [], + "metrics_path": "/metrics", + "scheme": "http", + "scrape_interval": "1m", + "scrape_timeout": "10s", + "static_configs": [] + }, + "job2": { + "follow_redirects": true, + "honor_timestamps": true, + "job_name": "job2", + "metric_relabel_configs": [], + "metrics_path": "/metrics", + "relabel_configs": [], + "scheme": "http", + "scrape_interval": "1m", + "scrape_timeout": "10s", + "kubernetes_sd_configs": [] + } +} +``` + `/jobs`: ```json diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index b6e45f991..9cdadde88 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -61,6 +61,16 @@ func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options } } +func (m *Manager) GetScrapeConfigs() map[string]*config.ScrapeConfig { + jobToScrapeConfig := map[string]*config.ScrapeConfig{} + for _, c := range m.configsMap { + for _, scrapeConfig := range c.ScrapeConfigs { + jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig + } + } + return jobToScrapeConfig +} + func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { m.configsMap[source] = cfg diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 93fafa28e..83d2ee1b6 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -3,13 +3,17 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator go 1.19 require ( + github.com/buraksezer/consistent v0.9.0 + github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.1 + github.com/ghodss/yaml v1.0.0 github.com/go-kit/log v0.2.0 github.com/go-logr/logr v1.2.0 github.com/gorilla/mux v1.8.0 github.com/prometheus-operator/prometheus-operator v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 + github.com/prometheus/client_golang v1.11.0 github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 @@ -42,8 +46,6 @@ require ( github.com/aws/aws-sdk-go v1.44.41 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/buraksezer/consistent v0.9.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe // indirect github.com/containerd/containerd v1.5.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -59,7 +61,6 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.12.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/zapr v1.2.0 // indirect github.com/go-openapi/analysis v0.20.0 // indirect @@ -123,7 +124,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 // indirect github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a // indirect - github.com/prometheus/client_golang v1.11.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 7c830322e..85e1ca4c4 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -24,12 +24,14 @@ import ( "syscall" "time" + "github.com/ghodss/yaml" gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" + yaml2 "gopkg.in/yaml.v2" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ctrl "sigs.k8s.io/controller-runtime" @@ -166,6 +168,7 @@ func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager } router := mux.NewRouter().UseEncodedPath() router.Use(s.PrometheusMiddleware) + router.HandleFunc("/scrape_configs", s.ScrapeConfigsHandler).Methods("GET") router.HandleFunc("/jobs", s.JobHandler).Methods("GET") router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") router.Path("/metrics").Handler(promhttp.Handler()) @@ -204,12 +207,33 @@ func (s *server) Shutdown(ctx context.Context) error { return s.server.Shutdown(ctx) } +// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. +// The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. +// After that, the YAML is converted in to a JSON format for consumers to use. +func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { + configs := s.discoveryManager.GetScrapeConfigs() + configBytes, err := yaml2.Marshal(configs) + if err != nil { + s.errorHandler(w, err) + } + jsonConfig, err := yaml.YAMLToJSON(configBytes) + if err != nil { + s.errorHandler(w, err) + } + // We don't use the jsonHandler method because we don't want our bytes to be re-encoded + w.Header().Set("Content-Type", "application/json") + _, err = w.Write(jsonConfig) + if err != nil { + s.errorHandler(w, err) + } +} + func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { displayData := make(map[string]allocation.LinkJSON) for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = allocation.LinkJSON{Link: v.Link.Link} } - jsonHandler(s.logger, w, displayData) + s.jsonHandler(w, displayData) } // PrometheusMiddleware implements mux.MiddlewareFunc. @@ -233,33 +257,34 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) jobId, err := url.QueryUnescape(params["job_id"]) if err != nil { - errorHandler(w) + s.errorHandler(w, err) return } if len(q) == 0 { displayData := allocation.GetAllTargetsByJob(jobId, compareMap, s.allocator) - jsonHandler(s.logger, w, displayData) + s.jsonHandler(w, displayData) } else { tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], jobId, compareMap, s.allocator) // Displays empty list if nothing matches if len(tgs) == 0 { - jsonHandler(s.logger, w, []interface{}{}) + s.jsonHandler(w, []interface{}{}) return } - jsonHandler(s.logger, w, tgs) + s.jsonHandler(w, tgs) } } -func errorHandler(w http.ResponseWriter) { +func (s *server) errorHandler(w http.ResponseWriter, err error) { w.WriteHeader(500) + s.jsonHandler(w, err) } -func jsonHandler(logger logr.Logger, w http.ResponseWriter, data interface{}) { +func (s *server) jsonHandler(w http.ResponseWriter, data interface{}) { w.Header().Set("Content-Type", "application/json") err := json.NewEncoder(w).Encode(data) if err != nil { - logger.Error(err, "failed to encode data for http response") + s.logger.Error(err, "failed to encode data for http response") } } diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index a2a7f9fd9..069b9ac48 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -26,6 +26,7 @@ import ( type FileWatcher struct { configFilePath string watcher *fsnotify.Watcher + closer chan bool } func newConfigMapWatcher(logger logr.Logger, config config.CLIConfig) (FileWatcher, error) { @@ -38,6 +39,7 @@ func newConfigMapWatcher(logger logr.Logger, config config.CLIConfig) (FileWatch return FileWatcher{ configFilePath: *config.ConfigFilePath, watcher: fileWatcher, + closer: make(chan bool), }, nil } @@ -51,6 +53,8 @@ func (f *FileWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error go func() { for { select { + case <-f.closer: + return case fileEvent := <-f.watcher.Events: if fileEvent.Op == fsnotify.Create { upstreamEvents <- Event{ @@ -66,5 +70,6 @@ func (f *FileWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error } func (f *FileWatcher) Close() error { + f.closer <- true return f.watcher.Close() } diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 5c0548feb..e61a6b638 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -78,6 +78,18 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, }) + if otelcol.Spec.TargetAllocator.Enabled { + // We need to add a SHARD here so the collector is able to keep targets after the hashmod operation which is + // added by default by the Prometheus operator's config generator. + // All collector instances use SHARD == 0 as they only receive targets + // allocated to them and should not use the Prometheus hashmod-based + // allocation. + envVars = append(envVars, corev1.EnvVar{ + Name: "SHARD", + Value: "0", + }) + } + var livenessProbe *corev1.Probe if config, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { if probe, err := adapters.ConfigToContainerProbe(config); err == nil { diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 1fbb6337c..896c99a35 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -235,6 +235,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv updated.ObjectMeta.Labels[k] = v } updated.Spec.Ports = desired.Spec.Ports + updated.Spec.Selector = desired.Spec.Selector patch := client.MergeFrom(existing) diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 9334c7d53..f200a166b 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -165,7 +165,23 @@ func TestExpectedServices(t *testing.T) { assert.True(t, exists) assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) assert.Contains(t, actual.Spec.Ports, extraPorts) + }) + t.Run("should update service on version change", func(t *testing.T) { + serviceInstance := service("test-collector", params().Instance.Spec.Ports) + createObjectIfNotExists(t, "test-collector", &serviceInstance) + newService := service("test-collector", params().Instance.Spec.Ports) + newService.Spec.Selector["app.kubernetes.io/version"] = "Newest" + err := expectedServices(context.Background(), params(), []v1.Service{newService}) + assert.NoError(t, err) + + actual := v1.Service{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + assert.Equal(t, "Newest", actual.Spec.Selector["app.kubernetes.io/version"]) }) } From 10404ebe147630a070768f346a541524672700ec Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Tue, 4 Oct 2022 03:33:23 -0700 Subject: [PATCH 0598/1234] Expose container ports on the collector pod (#1070) * expose container ports * get container ports from service ports * add, fix tests * move logic changes to their own branch --- apis/v1alpha1/opentelemetrycollector_types.go | 2 +- .../opentelemetrycollector_webhook.go | 11 + .../opentelemetrycollector_webhook_test.go | 254 ++++++++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 2 +- docs/api.md | 2 +- .../adapters/config_to_ports_test.go | 32 +-- pkg/collector/container.go | 113 ++++++++ pkg/collector/container_test.go | 142 ++++++++++ 9 files changed, 541 insertions(+), 19 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 197162ac4..8688ca69b 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -83,7 +83,7 @@ type OpenTelemetryCollectorSpec struct { VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be - // used to open aditional ports that can't be inferred by the operator, like for custom receivers. + // used to open additional ports that can't be inferred by the operator, like for custom receivers. // +optional // +listType=atomic Ports []v1.ServicePort `json:"ports,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 78e971962..2c09add4c 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -18,6 +18,7 @@ import ( "fmt" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" @@ -120,6 +121,16 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } } + // validator port config + for _, p := range r.Spec.Ports { + nameErrs := validation.IsValidPortName(p.Name) + numErrs := validation.IsValidPortNum(int(p.Port)) + if len(nameErrs) > 0 || len(numErrs) > 0 { + return fmt.Errorf("the OpenTelemetry Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", + p.Name, nameErrs, p.Port, numErrs) + } + } + // validate autoscale with horizontal pod autoscaler if r.Spec.MaxReplicas != nil { if *r.Spec.MaxReplicas < int32(1) { diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 39dc70955..7396b335e 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -18,6 +18,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + autoscalingv2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -76,3 +78,255 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }) } } + +func TestOTELColValidatingWebhook(t *testing.T) { + zero := int32(0) + one := int32(1) + three := int32(3) + five := int32(5) + + tests := []struct { //nolint:govet + name string + otelcol OpenTelemetryCollector + expectedErr string + }{ + { + name: "valid empty spec", + otelcol: OpenTelemetryCollector{}, + }, + { + name: "valid full spec", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeStatefulSet, + MinReplicas: &one, + Replicas: &three, + MaxReplicas: &five, + UpgradeStrategy: "adhoc", + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + }, + Config: `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" + prometheus: + config: + scrape_config: + job_name: otel-collector + scrape_interval: 10s + jaeger/custom: + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 +`, + Ports: []v1.ServicePort{ + { + Name: "port1", + Port: 5555, + }, + { + Name: "port2", + Port: 5554, + Protocol: v1.ProtocolUDP, + }, + }, + Autoscaler: &AutoscalerSpec{ + Behavior: &autoscalingv2.HorizontalPodAutoscalerBehavior{ + ScaleDown: &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &three, + }, + ScaleUp: &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &five, + }, + }, + TargetCPUUtilization: &five, + }, + }, + }, + }, + { + name: "invalid mode with volume claim templates", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + VolumeClaimTemplates: []v1.PersistentVolumeClaim{{}, {}}, + }, + }, + expectedErr: "does not support the attribute 'volumeClaimTemplates'", + }, + { + name: "invalid mode with tolerations", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Tolerations: []v1.Toleration{{}, {}}, + }, + }, + expectedErr: "does not support the attribute 'tolerations'", + }, + { + name: "invalid mode with target allocator", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + }, + }, + }, + expectedErr: "does not support the target allocation deployment", + }, + { + name: "invalid target allocator config", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeStatefulSet, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec Prometheus configuration is incorrect", + }, + { + name: "invalid port name", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{ + { + // this port name contains a non alphanumeric character, which is invalid. + Name: "-test🦄port", + Port: 12345, + Protocol: v1.ProtocolTCP, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec Ports configuration is incorrect", + }, + { + name: "invalid port name, too long", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{ + { + Name: "aaaabbbbccccdddd", // len: 16, too long + Port: 5555, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec Ports configuration is incorrect", + }, + { + name: "invalid port num", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{ + { + Name: "aaaabbbbccccddd", // len: 15 + // no port set means it's 0, which is invalid + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec Ports configuration is incorrect", + }, + { + name: "invalid max replicas", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &zero, + }, + }, + expectedErr: "maxReplicas should be defined and more than one", + }, + { + name: "invalid replicas, greater than max", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Replicas: &five, + }, + }, + expectedErr: "replicas must not be greater than maxReplicas", + }, + { + name: "invalid min replicas, greater than max", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + MinReplicas: &five, + }, + }, + expectedErr: "minReplicas must not be greater than maxReplicas", + }, + { + name: "invalid min replicas, lesser than 1", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + MinReplicas: &zero, + }, + }, + expectedErr: "minReplicas should be one or more", + }, + { + name: "invalid autoscaler scale down", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + Behavior: &autoscalingv2.HorizontalPodAutoscalerBehavior{ + ScaleDown: &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &zero, + }, + }, + }, + }, + }, + expectedErr: "scaleDown should be one or more", + }, + { + name: "invalid autoscaler scale up", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + Behavior: &autoscalingv2.HorizontalPodAutoscalerBehavior{ + ScaleUp: &autoscalingv2.HPAScalingRules{ + StabilizationWindowSeconds: &zero, + }, + }, + }, + }, + }, + expectedErr: "scaleUp should be one or more", + }, + { + name: "invalid autoscaler target cpu utilization", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + TargetCPUUtilization: &zero, + }, + }, + }, + expectedErr: "targetCPUUtilization should be greater than 0 and less than 100", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := test.otelcol.validateCRDSpec() + if test.expectedErr == "" { + assert.NoError(t, err) + return + } + assert.ErrorContains(t, err, test.expectedErr) + }) + } +} diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index c1e4aa95a..d9efcacdd 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -556,7 +556,7 @@ spec: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can - be used to open aditional ports that can't be inferred by the operator, + be used to open additional ports that can't be inferred by the operator, like for custom receivers. items: description: ServicePort contains information on service's port. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 291ce4177..16a012488 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -554,7 +554,7 @@ spec: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can - be used to open aditional ports that can't be inferred by the operator, + be used to open additional ports that can't be inferred by the operator, like for custom receivers. items: description: ServicePort contains information on service's port. diff --git a/docs/api.md b/docs/api.md index cfcf11371..aa9e10058 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1792,7 +1792,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. ports []object - Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers.
+ Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open additional ports that can't be inferred by the operator, like for custom receivers.
false diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 84c10e3d8..fbc698955 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -31,8 +31,7 @@ import ( var logger = logf.Log.WithName("unit-tests") -func TestExtractPortsFromConfig(t *testing.T) { - configStr := `receivers: +var portConfigStr = `receivers: examplereceiver: endpoint: "0.0.0.0:12345" examplereceiver/settings: @@ -77,8 +76,9 @@ service: exporters: [logging] ` +func TestExtractPortsFromConfig(t *testing.T) { // prepare - config, err := adapters.ConfigFromString(configStr) + config, err := adapters.ConfigFromString(portConfigStr) require.NoError(t, err) require.NotEmpty(t, config) @@ -94,18 +94,20 @@ service: targetPort4317 := intstr.IntOrString{Type: 0, IntVal: 4317, StrVal: ""} targetPort4318 := intstr.IntOrString{Type: 0, IntVal: 4318, StrVal: ""} - assert.Len(t, ports, 11) - assert.Equal(t, corev1.ServicePort{Name: "examplereceiver", Port: int32(12345)}, ports[0]) - assert.Equal(t, corev1.ServicePort{Name: "examplereceiver-settings", Port: int32(12346)}, ports[1]) - assert.Equal(t, corev1.ServicePort{Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: int32(15268), TargetPort: targetPortZero}, ports[2]) - assert.Equal(t, corev1.ServicePort{Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: int32(14250)}, ports[3]) - assert.Equal(t, corev1.ServicePort{Name: "jaeger-thrift-binary", Protocol: "UDP", Port: int32(6833)}, ports[4]) - assert.Equal(t, corev1.ServicePort{Name: "jaeger-thrift-compact", Protocol: "UDP", Port: int32(6831)}, ports[5]) - assert.Equal(t, corev1.ServicePort{Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: int32(55555)}, ports[6]) - assert.Equal(t, corev1.ServicePort{Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: int32(4317), TargetPort: targetPort4317}, ports[7]) - assert.Equal(t, corev1.ServicePort{Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: int32(4318), TargetPort: targetPort4318}, ports[8]) - assert.Equal(t, corev1.ServicePort{Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: int32(55681), TargetPort: targetPort4318}, ports[9]) - assert.Equal(t, corev1.ServicePort{Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: int32(9411)}, ports[10]) + expectedPorts := []corev1.ServicePort{ + {Name: "examplereceiver", Port: 12345}, + {Name: "examplereceiver-settings", Port: 12346}, + {Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero}, + {Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 14250}, + {Name: "jaeger-thrift-binary", Protocol: "UDP", Port: 6833}, + {Name: "jaeger-thrift-compact", Protocol: "UDP", Port: 6831}, + {Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 55555}, + {Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: 4317, TargetPort: targetPort4317}, + {Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: 4318, TargetPort: targetPort4318}, + {Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: 55681, TargetPort: targetPort4318}, + {Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 9411}, + } + assert.ElementsMatch(t, expectedPorts, ports) } func TestNoPortsParsed(t *testing.T) { diff --git a/pkg/collector/container.go b/pkg/collector/container.go index e61a6b638..1052df49a 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -15,10 +15,16 @@ package collector import ( + "errors" "fmt" + "net" + "sort" + "strconv" "github.com/go-logr/logr" + "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/validation" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -26,6 +32,12 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) +// maxPortLen allows us to truncate a port name according to what is considered valid port syntax: +// https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsValidPortName +const maxPortLen = 15 + +var errInvalidPort = errors.New("invalid port name/num") + // Container builds a container for the given collector. func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { image := otelcol.Spec.Image @@ -33,6 +45,16 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem image = cfg.CollectorImage() } + // build container ports from service ports + ports := getConfigContainerPorts(logger, otelcol.Spec.Config) + for _, p := range otelcol.Spec.Ports { + ports[p.Name] = corev1.ContainerPort{ + Name: p.Name, + ContainerPort: p.Port, + Protocol: p.Protocol, + } + } + argsMap := otelcol.Spec.Args if argsMap == nil { argsMap = map[string]string{} @@ -101,6 +123,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Name: naming.Container(), Image: image, ImagePullPolicy: otelcol.Spec.ImagePullPolicy, + Ports: portMapToList(ports), VolumeMounts: volumeMounts, Args: args, Env: envVars, @@ -110,3 +133,93 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem LivenessProbe: livenessProbe, } } + +func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.ContainerPort { + ports := map[string]corev1.ContainerPort{} + c, err := adapters.ConfigFromString(cfg) + if err != nil { + logger.Error(err, "couldn't extract the configuration") + return ports + } + ps, err := adapters.ConfigToReceiverPorts(logger, c) + if err != nil { + logger.Error(err, "couldn't build container ports from configuration") + } else { + for _, p := range ps { + truncName := naming.Truncate(p.Name, maxPortLen) + if p.Name != truncName { + logger.Info("truncating container port name", + "port.name.prev", p.Name, "port.name.new", truncName) + } + nameErrs := validation.IsValidPortName(truncName) + numErrs := validation.IsValidPortNum(int(p.Port)) + if len(nameErrs) > 0 || len(numErrs) > 0 { + logger.Error(errInvalidPort, "dropping container port", "port.name", truncName, "port.num", p.Port, + "port.name.errs", nameErrs, "num.errs", numErrs) + continue + } + ports[truncName] = corev1.ContainerPort{ + Name: truncName, + ContainerPort: p.Port, + Protocol: p.Protocol, + } + } + } + + metricsPort, err := getMetricsPort(c) + if err != nil { + logger.Error(err, "couldn't determine metrics port from configuration, using 8888 default value") + metricsPort = 8888 + } + ports["metrics"] = corev1.ContainerPort{ + Name: "metrics", + ContainerPort: metricsPort, + Protocol: corev1.ProtocolTCP, + } + return ports +} + +// getMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. +func getMetricsPort(c map[interface{}]interface{}) (int32, error) { + // we don't need to unmarshal the whole config, just follow the keys down to + // the metrics address. + type metricsCfg struct { + Address string + } + type telemetryCfg struct { + Metrics metricsCfg + } + type serviceCfg struct { + Telemetry telemetryCfg + } + type cfg struct { + Service serviceCfg + } + var cOut cfg + err := mapstructure.Decode(c, &cOut) + if err != nil { + return 0, err + } + + _, port, err := net.SplitHostPort(cOut.Service.Telemetry.Metrics.Address) + if err != nil { + return 0, err + } + i64, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return 0, err + } + + return int32(i64), nil +} + +func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { + ports := make([]corev1.ContainerPort, 0, len(portMap)) + for _, p := range portMap { + ports = append(ports, p) + } + sort.Slice(ports, func(i, j int) bool { + return ports[i].Name < ports[j].Name + }) + return ports +} diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 60820c9c2..a0d7155e5 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -29,6 +29,12 @@ import ( var logger = logf.Log.WithName("unit-tests") +var metricContainerPort = corev1.ContainerPort{ + Name: "metrics", + ContainerPort: 8888, + Protocol: corev1.ProtocolTCP, +} + func TestContainerNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{} @@ -39,6 +45,7 @@ func TestContainerNewDefault(t *testing.T) { // verify assert.Equal(t, "default-image", c.Image) + assert.Equal(t, []corev1.ContainerPort{metricContainerPort}, c.Ports) } func TestContainerWithImageOverridden(t *testing.T) { @@ -57,6 +64,141 @@ func TestContainerWithImageOverridden(t *testing.T) { assert.Equal(t, "overridden-image", c.Image) } +func TestContainerPorts(t *testing.T) { + var goodConfig = `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" +service: + pipelines: + metrics: + receivers: [examplereceiver] + exporters: [logging] +` + + tests := []struct { + description string + specConfig string + specPorts []corev1.ServicePort + expectedPorts []corev1.ContainerPort + }{ + { + description: "bad spec config", + specConfig: "🦄", + specPorts: nil, + expectedPorts: []corev1.ContainerPort{}, + }, + { + description: "couldn't build ports from spec config", + specConfig: "", + specPorts: nil, + expectedPorts: []corev1.ContainerPort{metricContainerPort}, + }, + { + description: "ports in spec Config", + specConfig: goodConfig, + specPorts: nil, + expectedPorts: []corev1.ContainerPort{ + { + Name: "examplereceiver", + ContainerPort: 12345, + }, + metricContainerPort, + }, + }, + { + description: "ports in spec ContainerPorts", + specPorts: []corev1.ServicePort{ + { + Name: "testport1", + Port: 12345, + }, + }, + expectedPorts: []corev1.ContainerPort{ + metricContainerPort, + { + Name: "testport1", + ContainerPort: 12345, + }, + }, + }, + { + description: "ports in spec Config and ContainerPorts", + specConfig: goodConfig, + specPorts: []corev1.ServicePort{ + { + Name: "testport1", + Port: 12345, + }, + { + Name: "testport2", + Port: 54321, + Protocol: corev1.ProtocolUDP, + }, + }, + expectedPorts: []corev1.ContainerPort{ + { + Name: "examplereceiver", + ContainerPort: 12345, + }, + metricContainerPort, + { + Name: "testport1", + ContainerPort: 12345, + }, + { + Name: "testport2", + ContainerPort: 54321, + Protocol: corev1.ProtocolUDP, + }, + }, + }, + { + description: "duplicate port name", + specConfig: goodConfig, + specPorts: []corev1.ServicePort{ + { + Name: "testport1", + Port: 12345, + }, + { + Name: "testport1", + Port: 11111, + }, + }, + expectedPorts: []corev1.ContainerPort{ + { + Name: "examplereceiver", + ContainerPort: 12345, + }, + metricContainerPort, + { + Name: "testport1", + ContainerPort: 11111, + }, + }, + }, + } + + for _, testCase := range tests { + t.Run(testCase.description, func(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: testCase.specConfig, + Ports: testCase.specPorts, + }, + } + cfg := config.New(config.WithCollectorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.ElementsMatch(t, testCase.expectedPorts, c.Ports) + }) + } +} + func TestContainerConfigFlagIsIgnored(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ From c9a6505adcaeb27110ac0031eae84bf46d10b668 Mon Sep 17 00:00:00 2001 From: Ben B Date: Thu, 6 Oct 2022 16:28:26 +0200 Subject: [PATCH 0599/1234] Continue context in the collector controller (#1144) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- controllers/opentelemetrycollector_controller.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 4250d677b..ab1e2c2ac 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -127,8 +127,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state. -func (r *OpenTelemetryCollectorReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error) { - ctx := context.Background() +func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log := r.log.WithValues("opentelemetrycollector", req.NamespacedName) var instance v1alpha1.OpenTelemetryCollector From cc715ccf7488947371577f633ad60f4de67ba8f3 Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Thu, 6 Oct 2022 11:21:49 -0700 Subject: [PATCH 0600/1234] Add missing nil checks in collector validating webhook (#1136) * add missing nil checks in validating webhook * fix imports --- apis/v1alpha1/opentelemetrycollector_webhook.go | 10 ++++++---- apis/v1alpha1/opentelemetrycollector_webhook_test.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 2c09add4c..0eb4c624b 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -134,7 +134,7 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { // validate autoscale with horizontal pod autoscaler if r.Spec.MaxReplicas != nil { if *r.Spec.MaxReplicas < int32(1) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and more than one") + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and one or more") } if r.Spec.Replicas != nil && *r.Spec.Replicas > *r.Spec.MaxReplicas { @@ -150,15 +150,17 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.Behavior != nil { - if r.Spec.Autoscaler.Behavior.ScaleDown != nil && *r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds < int32(1) { + if r.Spec.Autoscaler.Behavior.ScaleDown != nil && r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds != nil && + *r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds < int32(1) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleDown should be one or more") } - if r.Spec.Autoscaler.Behavior.ScaleUp != nil && *r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds < int32(1) { + if r.Spec.Autoscaler.Behavior.ScaleUp != nil && r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds != nil && + *r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds < int32(1) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") } } - if r.Spec.Autoscaler.TargetCPUUtilization != nil && (*r.Spec.Autoscaler.TargetCPUUtilization < int32(1) || *r.Spec.Autoscaler.TargetCPUUtilization > int32(99)) { + if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.TargetCPUUtilization != nil && (*r.Spec.Autoscaler.TargetCPUUtilization < int32(1) || *r.Spec.Autoscaler.TargetCPUUtilization > int32(99)) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetCPUUtilization should be greater than 0 and less than 100") } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 7396b335e..5e1856c21 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -241,7 +241,7 @@ func TestOTELColValidatingWebhook(t *testing.T) { MaxReplicas: &zero, }, }, - expectedErr: "maxReplicas should be defined and more than one", + expectedErr: "maxReplicas should be defined and one or more", }, { name: "invalid replicas, greater than max", From 32464acdeeae0dc5dd032d4c8ddf608369ee3baf Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Fri, 7 Oct 2022 00:04:55 -0700 Subject: [PATCH 0601/1234] Change error logs to info for building container (#1146) --- pkg/collector/container.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 1052df49a..042824308 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -15,7 +15,6 @@ package collector import ( - "errors" "fmt" "net" "sort" @@ -36,8 +35,6 @@ import ( // https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsValidPortName const maxPortLen = 15 -var errInvalidPort = errors.New("invalid port name/num") - // Container builds a container for the given collector. func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { image := otelcol.Spec.Image @@ -154,7 +151,7 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C nameErrs := validation.IsValidPortName(truncName) numErrs := validation.IsValidPortNum(int(p.Port)) if len(nameErrs) > 0 || len(numErrs) > 0 { - logger.Error(errInvalidPort, "dropping container port", "port.name", truncName, "port.num", p.Port, + logger.Info("dropping invalid container port", "port.name", truncName, "port.num", p.Port, "port.name.errs", nameErrs, "num.errs", numErrs) continue } @@ -168,7 +165,7 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C metricsPort, err := getMetricsPort(c) if err != nil { - logger.Error(err, "couldn't determine metrics port from configuration, using 8888 default value") + logger.Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) metricsPort = 8888 } ports["metrics"] = corev1.ContainerPort{ From a1b9a86fd7c86aba201131636369f1de9eabc0f8 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 7 Oct 2022 03:06:58 -0400 Subject: [PATCH 0602/1234] Bump OTel python versions to 1.13.0 and 0.34b0 (#1147) --- autoinstrumentation/python/requirements.txt | 82 ++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index a36c6dbee..9ae341398 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,49 +1,49 @@ -opentelemetry-distro==0.33b0 +opentelemetry-distro==0.34b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.12.0 +opentelemetry-exporter-otlp-proto-http==1.13.0 -opentelemetry-propagator-b3==1.12.0 -opentelemetry-propagator-jaeger==1.12.0 +opentelemetry-propagator-b3==1.13.0 +opentelemetry-propagator-jaeger==1.13.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.33b0 -opentelemetry-propagator-ot-trace==0.33b0 +opentelemetry-instrumentation==0.34b0 +opentelemetry-propagator-ot-trace==0.34b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.33b0 -opentelemetry-instrumentation-aiopg==0.33b0 -opentelemetry-instrumentation-asgi==0.33b0 -opentelemetry-instrumentation-asyncpg==0.33b0 -opentelemetry-instrumentation-boto==0.33b0 -opentelemetry-instrumentation-botocore==0.33b0 -opentelemetry-instrumentation-celery==0.33b0 -opentelemetry-instrumentation-dbapi==0.33b0 -opentelemetry-instrumentation-django==0.33b0 -opentelemetry-instrumentation-elasticsearch==0.33b0 -opentelemetry-instrumentation-falcon==0.33b0 -opentelemetry-instrumentation-fastapi==0.33b0 -opentelemetry-instrumentation-flask==0.33b0 -opentelemetry-instrumentation-grpc==0.33b0 -opentelemetry-instrumentation-httpx==0.33b0 -opentelemetry-instrumentation-jinja2==0.33b0 -opentelemetry-instrumentation-kafka-python==0.33b0 -opentelemetry-instrumentation-logging==0.33b0 -opentelemetry-instrumentation-mysql==0.33b0 -opentelemetry-instrumentation-pika==0.33b0 -opentelemetry-instrumentation-psycopg2==0.33b0 -opentelemetry-instrumentation-pymemcache==0.33b0 -opentelemetry-instrumentation-pymongo==0.33b0 -opentelemetry-instrumentation-pymysql==0.33b0 -opentelemetry-instrumentation-pyramid==0.33b0 -opentelemetry-instrumentation-redis==0.33b0 -opentelemetry-instrumentation-requests==0.33b0 -opentelemetry-instrumentation-sklearn==0.33b0 -opentelemetry-instrumentation-sqlalchemy==0.33b0 -opentelemetry-instrumentation-sqlite3==0.33b0 -opentelemetry-instrumentation-starlette==0.33b0 -opentelemetry-instrumentation-tornado==0.33b0 -opentelemetry-instrumentation-urllib==0.33b0 -opentelemetry-instrumentation-urllib3==0.33b0 -opentelemetry-instrumentation-wsgi==0.33b0 +opentelemetry-instrumentation-aiohttp-client==0.34b0 +opentelemetry-instrumentation-aiopg==0.34b0 +opentelemetry-instrumentation-asgi==0.34b0 +opentelemetry-instrumentation-asyncpg==0.34b0 +opentelemetry-instrumentation-boto==0.34b0 +opentelemetry-instrumentation-botocore==0.34b0 +opentelemetry-instrumentation-celery==0.34b0 +opentelemetry-instrumentation-dbapi==0.34b0 +opentelemetry-instrumentation-django==0.34b0 +opentelemetry-instrumentation-elasticsearch==0.34b0 +opentelemetry-instrumentation-falcon==0.34b0 +opentelemetry-instrumentation-fastapi==0.34b0 +opentelemetry-instrumentation-flask==0.34b0 +opentelemetry-instrumentation-grpc==0.34b0 +opentelemetry-instrumentation-httpx==0.34b0 +opentelemetry-instrumentation-jinja2==0.34b0 +opentelemetry-instrumentation-kafka-python==0.34b0 +opentelemetry-instrumentation-logging==0.34b0 +opentelemetry-instrumentation-mysql==0.34b0 +opentelemetry-instrumentation-pika==0.34b0 +opentelemetry-instrumentation-psycopg2==0.34b0 +opentelemetry-instrumentation-pymemcache==0.34b0 +opentelemetry-instrumentation-pymongo==0.34b0 +opentelemetry-instrumentation-pymysql==0.34b0 +opentelemetry-instrumentation-pyramid==0.34b0 +opentelemetry-instrumentation-redis==0.34b0 +opentelemetry-instrumentation-requests==0.34b0 +opentelemetry-instrumentation-sklearn==0.34b0 +opentelemetry-instrumentation-sqlalchemy==0.34b0 +opentelemetry-instrumentation-sqlite3==0.34b0 +opentelemetry-instrumentation-starlette==0.34b0 +opentelemetry-instrumentation-tornado==0.34b0 +opentelemetry-instrumentation-urllib==0.34b0 +opentelemetry-instrumentation-urllib3==0.34b0 +opentelemetry-instrumentation-wsgi==0.34b0 From af44c528c04ab2c972a5f87208993da7089ad1f0 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 7 Oct 2022 11:25:49 -0400 Subject: [PATCH 0603/1234] Fix Target Allocator builds by using versions.txt (#1140) * Rerun target allocator publish step * Docs which will trigger a publish * update release docs * update on new version --- .github/workflows/publish-target-allocator.yaml | 4 +++- RELEASE.md | 2 +- cmd/otel-allocator/README.md | 3 ++- versions.txt | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index ccb046c70..72d206627 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -7,6 +7,8 @@ on: - '.github/workflows/publish-target-allocator.yaml' branches: - main + tags: + - 'v*' workflow_dispatch: jobs: @@ -17,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - name: Read version - run: echo "VERSION=$(cat cmd/otel-allocator/version.txt)" >> $GITHUB_ENV + run: grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "VERSION="$2}' >> $GITHUB_ENV - name: Docker meta id: meta diff --git a/RELEASE.md b/RELEASE.md index 5c9a45590..21095ac66 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,7 +2,7 @@ Steps to release a new version of the OpenTelemetry Operator: -1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the operator. The `major.minor` should typically match, with the patch portion being possibly different. +1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 1. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. 1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! 1. Add the changes to the changelog diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index f4b4d53fd..88b4cee96 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -1,7 +1,8 @@ # Target Allocator The TargetAllocator is an optional separately deployed component of an OpenTelemetry Collector setup, which is used to -distribute targets of the PrometheusReceiver on all deployed Collector instances. +distribute targets of the PrometheusReceiver on all deployed Collector instances. The release version matches the +operator's most recent release as well. # Design diff --git a/versions.txt b/versions.txt index 05b8d9aed..bbdf49788 100644 --- a/versions.txt +++ b/versions.txt @@ -8,7 +8,7 @@ opentelemetry-collector=0.60.0 operator=0.60.0 # Represents the current release of the Target Allocator. -targetallocator=0.1.0 +targetallocator=0.60.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From f2de9c1004db30dcec741f47b4ae449bf4fa0d44 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 7 Oct 2022 11:26:08 -0400 Subject: [PATCH 0604/1234] Bump default python image version (#1150) --- versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.txt b/versions.txt index bbdf49788..f2a5e32d1 100644 --- a/versions.txt +++ b/versions.txt @@ -20,7 +20,7 @@ autoinstrumentation-nodejs=0.31.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.32b0 +autoinstrumentation-python=0.34b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt From a029af73f9ba246dbd1a5f945b38cd291a8f964c Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Mon, 10 Oct 2022 20:23:09 +0530 Subject: [PATCH 0605/1234] Add deepcopy missing implementation for TargetCPUUtilization in AutoscalerSpec (#1138) Co-authored-by: Pavol Loffay --- apis/v1alpha1/zz_generated.deepcopy.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f2b839793..655948e0e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -33,6 +33,11 @@ func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { *out = new(v2.HorizontalPodAutoscalerBehavior) (*in).DeepCopyInto(*out) } + if in.TargetCPUUtilization != nil { + in, out := &in.TargetCPUUtilization, &out.TargetCPUUtilization + *out = new(int32) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalerSpec. @@ -434,12 +439,12 @@ func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { *out = *in - out.PrometheusCR = in.PrometheusCR if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas *out = new(int32) **out = **in } + out.PrometheusCR = in.PrometheusCR } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. From 5c65116ab7fce2b3dccaccd294918a9e71605f38 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Mon, 10 Oct 2022 21:19:19 +0530 Subject: [PATCH 0606/1234] Change dotnet app image and context propagator b3 to b3multi (#1151) * changes app image and context propagator b3 to b3multi * adds source code repo link for the application --- .../00-install-instrumentation.yaml | 2 +- .../e2e/instrumentation-dotnet-multicontainer/01-assert.yaml | 4 ++-- .../instrumentation-dotnet-multicontainer/01-install-app.yaml | 2 +- .../e2e/instrumentation-dotnet-multicontainer/02-assert.yaml | 2 +- .../instrumentation-dotnet-multicontainer/02-install-app.yaml | 2 +- .../instrumentation-dotnet/00-install-instrumentation.yaml | 2 +- tests/e2e/instrumentation-dotnet/01-assert.yaml | 2 +- tests/e2e/instrumentation-dotnet/01-install-app.yaml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml index 391b502df..71351ee43 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml @@ -20,7 +20,7 @@ spec: endpoint: http://localhost:4317 propagators: - jaeger - - b3 + - b3multi sampler: type: parentbased_traceidratio argument: "0.25" diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml index c2ed9a888..48dc57916 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -44,7 +44,7 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_PROPAGATORS - value: jaeger,b3 + value: jaeger,b3multi - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount @@ -85,7 +85,7 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_PROPAGATORS - value: jaeger,b3 + value: jaeger,b3multi - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml index ce6889a69..e64bc4f56 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/adib070/mvc + image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp - name: myrabbit image: rabbitmq diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml index fdb39b7c1..ff8be2ac3 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -47,7 +47,7 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_PROPAGATORS - value: jaeger,b3 + value: jaeger,b3multi - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml index 137023368..9b86d167c 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/adib070/mvc + image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp - name: myrabbit image: rabbitmq diff --git a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml index fb267ba1e..80ca25ca5 100644 --- a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml @@ -20,7 +20,7 @@ spec: endpoint: http://localhost:4317 propagators: - jaeger - - b3 + - b3multi sampler: type: parentbased_traceidratio argument: "0.25" diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index 28b3a289f..29bbb3a6f 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -41,7 +41,7 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - name: OTEL_PROPAGATORS - value: jaeger,b3 + value: jaeger,b3multi - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount diff --git a/tests/e2e/instrumentation-dotnet/01-install-app.yaml b/tests/e2e/instrumentation-dotnet/01-install-app.yaml index 15c652bac..589b4d9c8 100644 --- a/tests/e2e/instrumentation-dotnet/01-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet/01-install-app.yaml @@ -21,4 +21,4 @@ spec: fsGroup: 2000 containers: - name: myapp - image: docker.io/adib070/mvc + image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp From 73ea5f60a04acc9cc2df46270ed7a12235b1eaa1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 11 Oct 2022 09:49:07 +0200 Subject: [PATCH 0607/1234] Fix generated deepcopy file changes check (#1154) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3602da55..f28896140 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ ensure-generate-is-noop: USER=open-telemetry ensure-generate-is-noop: set-image-controller generate bundle @# on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check @git restore config/manager/kustomization.yaml - @git diff -s --exit-code api/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) + @git diff -s --exit-code apis/v1alpha1/zz_generated.*.go || (echo "Build failed: a model has been changed but the generated resources aren't up to date. Run 'make generate' and update your PR." && exit 1) @git diff -s --exit-code bundle config || (echo "Build failed: the bundle, config files has been changed but the generated bundle, config files aren't up to date. Run 'make bundle' and update your PR." && git diff && exit 1) @git diff -s --exit-code bundle.Dockerfile || (echo "Build failed: the bundle.Dockerfile file has been changed. The file should be the same as generated one. Run 'make bundle' and update your PR." && git diff && exit 1) @git diff -s --exit-code docs/api.md || (echo "Build failed: the api.md file has been changed but the generated api.md file isn't up to date. Run 'make api-docs' and update your PR." && git diff && exit 1) From c166e87d54824e7dba960c59f66cde9c07ca2cc7 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Tue, 11 Oct 2022 04:03:35 -0400 Subject: [PATCH 0608/1234] Set OTEL_METRICS_EXPORTER to none to prevent using the default value (#1149) * Set OTEL_METRICS_EXPORTER to none to prevent using the default value * Update more test assertions * fix tests --- pkg/instrumentation/podmutator_test.go | 8 ++ pkg/instrumentation/python.go | 21 ++++- pkg/instrumentation/python_test.go | 77 +++++++++++++++++++ pkg/instrumentation/sdk_test.go | 4 + .../01-assert.yaml | 6 +- .../02-assert.yaml | 2 + .../e2e/instrumentation-python/01-assert.yaml | 2 + 7 files changed, 115 insertions(+), 5 deletions(-) diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 101d24fe2..3418b5533 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -408,6 +408,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_EXPORTER", Value: "otlp_proto_http", }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://localhost:4317", @@ -489,6 +493,10 @@ func TestMutatePod(t *testing.T) { Name: "OTEL_TRACES_EXPORTER", Value: "otlp_proto_http", }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: "http://localhost:4317", diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index e2c7495b0..b3956e353 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -24,10 +24,11 @@ import ( ) const ( - envPythonPath = "PYTHONPATH" - envOtelTracesExporter = "OTEL_TRACES_EXPORTER" - pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" - pythonPathSuffix = "/otel-auto-instrumentation" + envPythonPath = "PYTHONPATH" + envOtelTracesExporter = "OTEL_TRACES_EXPORTER" + envOtelMetricsExporter = "OTEL_METRICS_EXPORTER" + pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" + pythonPathSuffix = "/otel-auto-instrumentation" ) func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod, index int) corev1.Pod { @@ -68,6 +69,18 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. }) } + // TODO: https://github.com/open-telemetry/opentelemetry-python/issues/2447 this should + // also be set to `otlp_proto_http` once an exporter is implemented. For now, set + // OTEL_METRICS_EXPORTER to none if not set by user to prevent using the default grpc + // exporter which is not included in the image. + idx = getIndexOfEnv(container.Env, envOtelMetricsExporter) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOtelMetricsExporter, + Value: "none", + }) + } + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ Name: volumeName, MountPath: "/otel-auto-instrumentation", diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 2d510fca3..c8a4887a1 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -80,6 +80,10 @@ func TestInjectPythonSDK(t *testing.T) { Name: "OTEL_TRACES_EXPORTER", Value: "otlp_proto_http", }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, }, }, }, @@ -141,6 +145,10 @@ func TestInjectPythonSDK(t *testing.T) { Name: "OTEL_TRACES_EXPORTER", Value: "otlp_proto_http", }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, }, }, }, @@ -202,6 +210,75 @@ func TestInjectPythonSDK(t *testing.T) { Name: "PYTHONPATH", Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, + }, + }, + }, + }, + }, + }, + { + name: "OTEL_METRICS_EXPORTER defined", + Python: v1alpha1.Python{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: "OTEL_METRICS_EXPORTER", + Value: "somebackend", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_METRICS_EXPORTER", + Value: "somebackend", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp_proto_http", + }, }, }, }, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 31c29282f..c900193f2 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -636,6 +636,10 @@ func TestInjectPython(t *testing.T) { Name: "OTEL_TRACES_EXPORTER", Value: "otlp_proto_http", }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "none", + }, { Name: "OTEL_SERVICE_NAME", Value: "app", diff --git a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml index 196be91e8..41d2a13ea 100644 --- a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml @@ -15,6 +15,8 @@ spec: value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER value: otlp_proto_http + - name: OTEL_METRICS_EXPORTER + value: none - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT @@ -42,6 +44,8 @@ spec: value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER value: otlp_proto_http + - name: OTEL_METRICS_EXPORTER + value: none - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT @@ -65,4 +69,4 @@ spec: name: opentelemetry-auto-instrumentation - name: otc-container status: - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml index 66335224b..3bfcbfcc3 100644 --- a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml @@ -18,6 +18,8 @@ spec: value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER value: otlp_proto_http + - name: OTEL_METRICS_EXPORTER + value: none - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index c0336b0e3..a1eb66123 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -18,6 +18,8 @@ spec: value: http://localhost:4317 - name: PYTHONPATH value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" + - name: OTEL_METRICS_EXPORTER + value: none - name: OTEL_EXPORTER_OTLP_TIMEOUT value: "20" - name: OTEL_TRACES_SAMPLER From 8783fe112f4f01694b2f0cc6f61911dd060b988c Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 11 Oct 2022 11:36:29 +0200 Subject: [PATCH 0609/1234] Add ingress options (#1128) * add ingress name generation function Signed-off-by: Benedikt Bongartz * extend otelcol crd with minimalistic ingress options Signed-off-by: Benedikt Bongartz * support collector ingress reconciling Signed-off-by: Benedikt Bongartz * register ingress reconciler Signed-off-by: Benedikt Bongartz * grant permission to create, modify and delete ingress entries Signed-off-by: Benedikt Bongartz * add ingress integration tests Signed-off-by: Benedikt Bongartz * verify if collector mode is compatible with ingress settings Signed-off-by: Benedikt Bongartz * create dedicated ingress type Signed-off-by: Benedikt Bongartz * follow recommendations Signed-off-by: Benedikt Bongartz * regenerate Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- apis/v1alpha1/ingress_type.go | 26 ++ apis/v1alpha1/opentelemetrycollector_types.go | 28 ++ .../opentelemetrycollector_webhook.go | 6 + .../opentelemetrycollector_webhook_test.go | 15 + apis/v1alpha1/zz_generated.deepcopy.go | 31 ++ ...emetry-operator.clusterserviceversion.yaml | 12 + ...ntelemetry.io_opentelemetrycollectors.yaml | 46 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 46 +++ config/rbac/role.yaml | 12 + .../opentelemetrycollector_controller.go | 6 + docs/api.md | 91 ++++++ pkg/collector/reconcile/ingress.go | 242 ++++++++++++++++ pkg/collector/reconcile/ingress_test.go | 268 ++++++++++++++++++ pkg/collector/testdata/ingress_testdata.yaml | 16 ++ pkg/naming/main.go | 5 + tests/e2e/ingress/00-assert.yaml | 47 +++ tests/e2e/ingress/00-install.yaml | 28 ++ 17 files changed, 925 insertions(+) create mode 100644 apis/v1alpha1/ingress_type.go create mode 100644 pkg/collector/reconcile/ingress.go create mode 100644 pkg/collector/reconcile/ingress_test.go create mode 100644 pkg/collector/testdata/ingress_testdata.yaml create mode 100644 tests/e2e/ingress/00-assert.yaml create mode 100644 tests/e2e/ingress/00-install.yaml diff --git a/apis/v1alpha1/ingress_type.go b/apis/v1alpha1/ingress_type.go new file mode 100644 index 000000000..5ef8528b0 --- /dev/null +++ b/apis/v1alpha1/ingress_type.go @@ -0,0 +1,26 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // IngressType represents how a collector should be exposed (ingress vs route). + // +kubebuilder:validation:Enum=ingress + IngressType string +) + +const ( + // IngressTypeNginx specifies that an ingress entry should be created. + IngressTypeNginx IngressType = "ingress" +) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 8688ca69b..5b2ee5f0b 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -17,9 +17,32 @@ package v1alpha1 import ( autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// Ingress is used to specify how OpenTelemetry Collector is exposed. This +// functionality is only available if one of the valid modes is set. +// Valid modes are: deployment, daemonset and statefulset. +type Ingress struct { + // Type default value is: "" + // Supported types are: ingress + Type IngressType `json:"type,omitempty"` + + // Hostname by which the ingress proxy can be reached. + // +optional + Hostname string `json:"hostname,omitempty"` + + // Annotations to add to ingress. + // e.g. 'cert-manager.io/cluster-issuer: "letsencrypt"' + // +optional + Annotations map[string]string `json:"annotations,omitempty"` + + // TLS configuration. + // +optional + TLS []networkingv1.IngressTLS `json:"tls,omitempty"` +} + // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. type OpenTelemetryCollectorSpec struct { // Resources to set on the OpenTelemetry Collector pods. @@ -107,6 +130,11 @@ type OpenTelemetryCollectorSpec struct { // +optional // +listType=atomic Volumes []v1.Volume `json:"volumes,omitempty"` + // Ingress is used to specify how OpenTelemetry Collector is exposed. This + // functionality is only available if one of the valid modes is set. + // Valid modes are: deployment, daemonset and statefulset. + // +optional + Ingress Ingress `json:"ingress,omitempty"` // HostNetwork indicates if the pod should run in the host networking namespace. // +optional HostNetwork bool `json:"hostNetwork,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 0eb4c624b..6c8c22ccd 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -166,5 +166,11 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } + if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { + return fmt.Errorf("the OptenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", + ModeDeployment, ModeDaemonSet, ModeStatefulSet, + ) + } + return nil } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 5e1856c21..008067f22 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -15,6 +15,7 @@ package v1alpha1 import ( + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -317,6 +318,20 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "targetCPUUtilization should be greater than 0 and less than 100", }, + { + name: "invalid deployment mode incompabible with ingress settings", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Ingress: Ingress{ + Type: IngressTypeNginx, + }, + }, + }, + expectedErr: fmt.Sprintf("Ingress can only be used in combination with the modes: %s, %s, %s", + ModeDeployment, ModeDaemonSet, ModeStatefulSet, + ), + }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 655948e0e..f03c0e2ce 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ package v1alpha1 import ( "k8s.io/api/autoscaling/v2" "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -87,6 +88,35 @@ func (in *Exporter) DeepCopy() *Exporter { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Ingress) DeepCopyInto(out *Ingress) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = make([]networkingv1.IngressTLS, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. +func (in *Ingress) DeepCopy() *Ingress { + if in == nil { + return nil + } + out := new(Ingress) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { *out = *in @@ -403,6 +433,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Ingress.DeepCopyInto(&out.Ingress) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index fb2be6e9b..c8debce01 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -209,6 +209,18 @@ spec: - get - list - update + - apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - opentelemetry.io resources: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index d9efcacdd..ca5d28a00 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -354,6 +354,52 @@ spec: description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) type: string + ingress: + description: 'Ingress is used to specify how OpenTelemetry Collector + is exposed. This functionality is only available if one of the valid + modes is set. Valid modes are: deployment, daemonset and statefulset.' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' + type: object + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + tls: + description: TLS configuration. + items: + description: IngressTLS describes the transport layer security + associated with an Ingress. + properties: + hosts: + description: Hosts are a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. Defaults to the wildcard host setting + for the loadbalancer controller fulfilling this Ingress, + if left unspecified. + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + description: SecretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. If the + SNI host in a listener conflicts with the "Host" header + field used by an IngressRule, the SNI host is used for + termination and value of the Host header is used for routing. + type: string + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress' + enum: + - ingress + type: string + type: object maxReplicas: description: MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 16a012488..57681b495 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -352,6 +352,52 @@ spec: description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) type: string + ingress: + description: 'Ingress is used to specify how OpenTelemetry Collector + is exposed. This functionality is only available if one of the valid + modes is set. Valid modes are: deployment, daemonset and statefulset.' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' + type: object + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + tls: + description: TLS configuration. + items: + description: IngressTLS describes the transport layer security + associated with an Ingress. + properties: + hosts: + description: Hosts are a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. Defaults to the wildcard host setting + for the loadbalancer controller fulfilling this Ingress, + if left unspecified. + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + description: SecretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. If the + SNI host in a listener conflicts with the "Host" header + field used by an IngressRule, the SNI host is used for + termination and value of the Host header is used for routing. + type: string + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress' + enum: + - ingress + type: string + type: object maxReplicas: description: MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index a321ff789..565555235 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -120,6 +120,18 @@ rules: - get - list - update +- apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - opentelemetry.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index ab1e2c2ac..11483b6fb 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -102,6 +102,11 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { "stateful sets", true, }, + { + reconcile.Ingresses, + "ingresses", + true, + }, { reconcile.Self, "opentelemetry", @@ -123,6 +128,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch +// +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch diff --git a/docs/api.md b/docs/api.md index aa9e10058..de084d0ef 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1740,6 +1740,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
false + + ingress + object + + Ingress is used to specify how OpenTelemetry Collector is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset.
+ + false maxReplicas integer @@ -2474,6 +2481,90 @@ The Secret to select from +### OpenTelemetryCollector.spec.ingress +[↩ Parent](#opentelemetrycollectorspec) + + + +Ingress is used to specify how OpenTelemetry Collector is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string + Annotations to add to ingress. e.g. 'cert-manager.io/cluster-issuer: "letsencrypt"'
+
false
hostnamestring + Hostname by which the ingress proxy can be reached.
+
false
tls[]object + TLS configuration.
+
false
typeenum + Type default value is: "" Supported types are: ingress
+
+ Enum: ingress
+
false
+ + +### OpenTelemetryCollector.spec.ingress.tls[index] +[↩ Parent](#opentelemetrycollectorspecingress) + + + +IngressTLS describes the transport layer security associated with an Ingress. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
hosts[]string + Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
+
false
secretNamestring + SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
+
false
+ + ### OpenTelemetryCollector.spec.podSecurityContext [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go new file mode 100644 index 000000000..79576ebf7 --- /dev/null +++ b/pkg/collector/reconcile/ingress.go @@ -0,0 +1,242 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { + if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { + return nil + } + + config, err := adapters.ConfigFromString(params.Instance.Spec.Config) + if err != nil { + params.Log.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(params.Log, config) + if err != nil { + params.Log.Error(err, "couldn't build the ingress for this instance") + return nil + } + + if len(params.Instance.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) + resultingInferredPorts := []corev1.ServicePort{} + for _, inferred := range ports { + if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) + } + + // if we have no ports, we don't need a ingress entry + if len(ports) == 0 { + params.Log.V(1).Info( + "the instance's configuration didn't yield any ports to open, skipping ingress", + "instance.name", params.Instance.Name, + "instance.namespace", params.Instance.Namespace, + ) + return nil + } + + pathType := networkingv1.PathTypePrefix + paths := make([]networkingv1.HTTPIngressPath, len(ports)) + for i, p := range ports { + paths[i] = networkingv1.HTTPIngressPath{ + Path: "/" + p.Name, + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: naming.Service(params.Instance), + Port: networkingv1.ServiceBackendPort{ + // Valid names must be non-empty and no more than 15 characters long. + Name: naming.Truncate(p.Name, 15), + }, + }, + }, + } + } + + return &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Ingress(params.Instance), + Namespace: params.Instance.Namespace, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Ingress(params.Instance), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: networkingv1.IngressSpec{ + TLS: params.Instance.Spec.Ingress.TLS, + Rules: []networkingv1.IngressRule{ + { + Host: params.Instance.Spec.Ingress.Hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: paths, + }, + }, + }, + }, + }, + } +} + +// Ingresses reconciles the ingress(s) required for the instance in the current context. +func Ingresses(ctx context.Context, params Params) error { + isSupportedMode := true + if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { + params.Log.V(3).Info("ingress settings are not supported in sidecar mode") + isSupportedMode = false + } + + nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: params.Instance.Name} + err := params.Client.Get(ctx, nns, &corev1.Service{}) // NOTE: check if service exists. + serviceExists := err != nil + + var desired []networkingv1.Ingress + if isSupportedMode && serviceExists { + if d := desiredIngresses(ctx, params); d != nil { + desired = append(desired, *d) + } + } + + // first, handle the create/update parts + if err := expectedIngresses(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected ingresses: %w", err) + } + + // then, delete the extra objects + if err := deleteIngresses(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the ingresses to be deleted: %w", err) + } + + return nil +} + +func expectedIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { + for _, obj := range expected { + desired := obj + + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } + + existing := &networkingv1.Ingress{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err := params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) + return nil + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + updated.Spec.Rules = desired.Spec.Rules + updated.Spec.TLS = desired.Spec.TLS + updated.Spec.DefaultBackend = desired.Spec.DefaultBackend + updated.Spec.IngressClassName = desired.Spec.IngressClassName + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + patch := client.MergeFrom(existing) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) + } + return nil +} + +func deleteIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &networkingv1.IngressList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + break + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "ingress.name", existing.Name, "ingress.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go new file mode 100644 index 000000000..2c3447c7f --- /dev/null +++ b/pkg/collector/reconcile/ingress_test.go @@ -0,0 +1,268 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + _ "embed" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + v1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +const test_file_ingress = "../testdata/ingress_testdata.yaml" + +func TestDesiredIngresses(t *testing.T) { + t.Run("should return nil invalid ingress type", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressType("unknown"), + }, + }, + }, + } + + actual := desiredIngresses(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse config", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "!!!", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + }, + }, + }, + } + + actual := desiredIngresses(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "---", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + }, + }, + }, + } + + actual := desiredIngresses(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to do something else", func(t *testing.T) { + var ( + ns = "test" + hostname = "example.com" + ) + + params, err := newParams("something:tag", test_file_ingress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = ns + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + } + + got := desiredIngresses(context.Background(), params) + pathType := networkingv1.PathTypePrefix + + assert.NotEqual(t, &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Ingress(params.Instance), + Namespace: ns, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Ingress(params.Instance), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: networkingv1.IngressSpec{ + Rules: []networkingv1.IngressRule{ + { + Host: hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/another-port", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "another-port", + }, + }, + }, + }, + { + Path: "/otlp-grpc", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-grpc", + }, + }, + }, + }, + { + Path: "/otlp-test-grpc", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-test-grpc", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, got) + }) + +} + +func TestExpectedIngresses(t *testing.T) { + t.Run("should create and update ingress entry", func(t *testing.T) { + ctx := context.Background() + + params, err := newParams("something:tag", test_file_ingress) + if err != nil { + t.Fatal(err) + } + params.Instance.Spec.Ingress.Type = "ingress" + + err = expectedIngresses(ctx, params, []networkingv1.Ingress{*desiredIngresses(ctx, params)}) + assert.NoError(t, err) + + nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} + exists, err := populateObjectIfExists(t, &networkingv1.Ingress{}, nns) + assert.NoError(t, err) + assert.True(t, exists) + + // update fields + const expectHostname = "something-else.com" + params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} + params.Instance.Spec.Ingress.Hostname = expectHostname + + err = expectedIngresses(ctx, params, []networkingv1.Ingress{*desiredIngresses(ctx, params)}) + assert.NoError(t, err) + + got := &networkingv1.Ingress{} + err = params.Client.Get(ctx, nns, got) + assert.NoError(t, err) + + gotHostname := got.Spec.Rules[0].Host + if gotHostname != expectHostname { + t.Errorf("host name is not up-to-date. expect: %s, got: %s", expectHostname, gotHostname) + } + + if v, ok := got.Annotations["blub"]; !ok || v != "blob" { + t.Error("annotations are not up-to-date. Missing entry or value is invalid.") + } + }) +} + +func TestDeleteIngresses(t *testing.T) { + t.Run("should delete excess ingress", func(t *testing.T) { + // create + ctx := context.Background() + + myParams, err := newParams("something:tag", test_file_ingress) + if err != nil { + t.Fatal(err) + } + myParams.Instance.Spec.Ingress.Type = "ingress" + + err = expectedIngresses(ctx, myParams, []networkingv1.Ingress{*desiredIngresses(ctx, myParams)}) + assert.NoError(t, err) + + nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} + exists, err := populateObjectIfExists(t, &networkingv1.Ingress{}, nns) + assert.NoError(t, err) + assert.True(t, exists) + + // delete + if err := deleteIngresses(ctx, params(), []networkingv1.Ingress{}); err != nil { + t.Error(err) + } + + // check + exists, err = populateObjectIfExists(t, &v1.Ingress{}, nns) + assert.NoError(t, err) + assert.False(t, exists) + }) +} + +func TestIngresses(t *testing.T) { + t.Run("wrong mode", func(t *testing.T) { + ctx := context.Background() + err := Ingresses(ctx, params()) + assert.Nil(t, err) + }) + + t.Run("supported mode and service exists", func(t *testing.T) { + ctx := context.Background() + myParams := params() + err := expectedServices(context.Background(), myParams, []corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) + assert.NoError(t, err) + + assert.Nil(t, Ingresses(ctx, myParams)) + }) + +} diff --git a/pkg/collector/testdata/ingress_testdata.yaml b/pkg/collector/testdata/ingress_testdata.yaml new file mode 100644 index 000000000..54f9342a7 --- /dev/null +++ b/pkg/collector/testdata/ingress_testdata.yaml @@ -0,0 +1,16 @@ +--- +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:12345 + otlp/test: + protocols: + grpc: + endpoint: 0.0.0.0:98765 + +service: + pipelines: + traces: + receivers: [otlp, otlp/test] + exporters: [nop] diff --git a/pkg/naming/main.go b/pkg/naming/main.go index f6b896212..59b8029a8 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -89,6 +89,11 @@ func Service(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } +// Ingress builds the ingress name based on the instance. +func Ingress(otelcol v1alpha1.OpenTelemetryCollector) string { + return DNSName(Truncate("%s-ingress", 63, otelcol.Name)) +} + // TAService returns the name to use for the TargetAllocator service. func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) diff --git a/tests/e2e/ingress/00-assert.yaml b/tests/e2e/ingress/00-assert.yaml new file mode 100644 index 000000000..7d98dc4c4 --- /dev/null +++ b/tests/e2e/ingress/00-assert.yaml @@ -0,0 +1,47 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + something.com: "true" + labels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-ingress + name: simplest-ingress + ownerReferences: + - apiVersion: opentelemetry.io/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: OpenTelemetryCollector + name: simplest +spec: + rules: + - host: example.com + http: + paths: + - backend: + service: + name: simplest-collector + port: + name: otlp-grpc + path: /otlp-grpc + pathType: Prefix + - backend: + service: + name: simplest-collector + port: + name: otlp-http + path: /otlp-http + pathType: Prefix + - backend: + service: + name: simplest-collector + port: + name: otlp-http-legac + path: /otlp-http-legacy + pathType: Prefix diff --git a/tests/e2e/ingress/00-install.yaml b/tests/e2e/ingress/00-install.yaml new file mode 100644 index 000000000..9da41295d --- /dev/null +++ b/tests/e2e/ingress/00-install.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + mode: "deployment" + ingress: + type: ingress + hostname: "example.com" + annotations: + something.com: "true" + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From d191ba182f72217f35f889cc78b3e3d42347e9ce Mon Sep 17 00:00:00 2001 From: YUANFAN PENG Date: Wed, 12 Oct 2022 01:24:51 -0700 Subject: [PATCH 0610/1234] Allow version before 0.52 to upgrade (#1126) * when Spec.selector changed, since it is immutable, the old deployment/statefulset/daemonset will be deleted and a new one with updated selector will be created. * add e2e test. * address lint. * add newline to end. * add newline to end. * add delete options to deployment and statefulset. * remove unecessary propagation policy, the default background is working fine. * Add unit test. * revert accident change. * remove timeout wait, don't 2 changes in one reconcile cycle. * fix lint * fix test, change name to isolate it from other tests. * revert accident change. * remove unsed constant. * Add comment for explaining the upgrading e2e test. * add e2e upgrade to workflow. * Address comment, adding detail comments for e2e upgrade test. * rever accident change. Co-authored-by: Pavol Loffay --- .github/workflows/e2e.yaml | 2 +- Makefile | 5 ++ kuttl-test-upgrade.yaml | 26 +++++++ pkg/collector/reconcile/daemonset.go | 14 +++- pkg/collector/reconcile/daemonset_test.go | 30 ++++++++ pkg/collector/reconcile/deployment.go | 14 +++- pkg/collector/reconcile/deployment_test.go | 30 ++++++++ pkg/collector/reconcile/statefulset.go | 14 +++- pkg/collector/reconcile/statefulset_test.go | 30 ++++++++ tests/e2e-upgrade/upgrade-test/00-assert.yaml | 69 +++++++++++++++++++ .../e2e-upgrade/upgrade-test/00-install.yaml | 28 ++++++++ .../upgrade-test/01-upgrade-operator.yaml | 6 ++ tests/e2e-upgrade/upgrade-test/02-assert.yaml | 8 +++ .../upgrade-test/02-upgrade-collector.yaml | 28 ++++++++ 14 files changed, 294 insertions(+), 10 deletions(-) create mode 100644 kuttl-test-upgrade.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/00-assert.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/00-install.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/02-assert.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 15b61ce40..e5af64f91 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,4 +35,4 @@ jobs: - name: "run tests" env: KUBE_VERSION: ${{ matrix.kube-version }} - run: make prepare-e2e e2e KUBE_VERSION=$KUBE_VERSION + run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION diff --git a/Makefile b/Makefile index f28896140..51897f266 100644 --- a/Makefile +++ b/Makefile @@ -158,6 +158,11 @@ generate: controller-gen api-docs e2e: $(KUTTL) test +# end-to-end-test for testing upgrading +.PHONY: e2e-upgrade +e2e-upgrade: + $(KUTTL) test --config kuttl-test-upgrade.yaml + .PHONY: prepare-e2e prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server load-image-all mkdir -p tests/_build/crds tests/_build/manifests diff --git a/kuttl-test-upgrade.yaml b/kuttl-test-upgrade.yaml new file mode 100644 index 000000000..e77a2e2fa --- /dev/null +++ b/kuttl-test-upgrade.yaml @@ -0,0 +1,26 @@ +# Make sure that the OT operator after upgrading itself, can upgrade the OT collectors without error. +# The test is based on the version v0.49.0, a breaking change was introduced from PR +# https://github.com/open-telemetry/opentelemetry-operator/pull/797, which added a version label "app.kubernetes.io/version", +# The version label would change between OT operator upgrade, and since at the time, the collector pod selector was the same +# as this labels, resulted in selector being modified during reconciliation which caused error due to the selector is immutable. +# Please be aware of that the collector labels are changeable in various ways, so this issue may happen in any operator < v0.52.0 +# which changed the selector to be a static set of labels. +# The fix for this issue including: +# https://github.com/open-telemetry/opentelemetry-operator/issues/840, make the selector be a static set of labels; +# https://github.com/open-telemetry/opentelemetry-operator/issues/1117, delete the old collector to let the operator +# create a new one when the selector changed. +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +crdDir: ./tests/_build/crds/ +artifactsDir: ./tests/_build/artifacts/ +kindContainers: + - local/opentelemetry-operator:e2e + - ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.49.0 +commands: + - command: make cert-manager + - command: kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.49.0/opentelemetry-operator.yaml + - command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system + - command: sleep 60s +testDirs: + - ./tests/e2e-upgrade/ +timeout: 150 diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index be597cd7e..a14649c59 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -19,6 +19,7 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -70,6 +71,16 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da return fmt.Errorf("failed to get: %w", err) } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector daemonset will be created in the next reconcile cycle", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) + + if err := params.Client.Delete(ctx, existing); err != nil { + return fmt.Errorf("failed to request deleting daemonset: %w", err) + } + continue + } + // it exists already, merge the two if the end result isn't identical to the existing one updated := existing.DeepCopy() if updated.Annotations == nil { @@ -89,9 +100,6 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da updated.ObjectMeta.Labels[k] = v } - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - updated.Spec.Selector = existing.Spec.Selector.DeepCopy() - patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/daemonset_test.go b/pkg/collector/reconcile/daemonset_test.go index 8a4751e8b..02d8d0c8a 100644 --- a/pkg/collector/reconcile/daemonset_test.go +++ b/pkg/collector/reconcile/daemonset_test.go @@ -130,4 +130,34 @@ func TestExpectedDaemonsets(t *testing.T) { assert.True(t, exists) }) + + t.Run("change Spec.Selector should recreate daemonset", func(t *testing.T) { + + oldDs := collector.DaemonSet(param.Config, logger, param.Instance) + oldDs.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" + oldDs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" + oldDs.Name = "update-ds" + + err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{oldDs}) + assert.NoError(t, err) + exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + + newDs := collector.DaemonSet(param.Config, logger, param.Instance) + newDs.Name = oldDs.Name + err = expectedDaemonSets(context.Background(), param, []v1.DaemonSet{newDs}) + assert.NoError(t, err) + exists, err = populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) + assert.NoError(t, err) + assert.False(t, exists) + + err = expectedDaemonSets(context.Background(), param, []v1.DaemonSet{newDs}) + assert.NoError(t, err) + actual := v1.DaemonSet{} + exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, newDs.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) + }) } diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 3cf567ce2..5e4b4bd18 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -19,6 +19,7 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -76,6 +77,16 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D return fmt.Errorf("failed to get: %w", err) } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector deployment will be created in the next reconcile cycle ", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) + + if err := params.Client.Delete(ctx, existing); err != nil { + return fmt.Errorf("failed to delete deployment: %w", err) + } + continue + } + // it exists already, merge the two if the end result isn't identical to the existing one updated := existing.DeepCopy() if updated.Annotations == nil { @@ -95,9 +106,6 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D updated.ObjectMeta.Labels[k] = v } - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - updated.Spec.Selector = existing.Spec.Selector.DeepCopy() - patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index d5d794d88..ab146b469 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -342,6 +342,36 @@ func TestExpectedDeployments(t *testing.T) { assert.True(t, exists) }) + + t.Run("change Spec.Selector should recreate deployment", func(t *testing.T) { + + oldDeploy := collector.Deployment(param.Config, logger, param.Instance) + oldDeploy.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" + oldDeploy.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" + oldDeploy.Name = "update-deploy" + + err := expectedDeployments(context.Background(), param, []v1.Deployment{oldDeploy}) + assert.NoError(t, err) + exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) + assert.NoError(t, err) + assert.True(t, exists) + + newDeploy := collector.Deployment(param.Config, logger, param.Instance) + newDeploy.Name = oldDeploy.Name + err = expectedDeployments(context.Background(), param, []v1.Deployment{newDeploy}) + assert.NoError(t, err) + exists, err = populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) + assert.NoError(t, err) + assert.False(t, exists) + + err = expectedDeployments(context.Background(), param, []v1.Deployment{newDeploy}) + assert.NoError(t, err) + actual := v1.Deployment{} + exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, newDeploy.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) + }) } func TestCurrentReplicasWithHPA(t *testing.T) { diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index 372b28d3b..e66373432 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -19,6 +19,7 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -71,6 +72,16 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. return fmt.Errorf("failed to get: %w", err) } + // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. + if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector statfulset will be created in the next reconcile cycle", "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) + + if err := params.Client.Delete(ctx, existing); err != nil { + return fmt.Errorf("failed to delete statefulset: %w", err) + } + continue + } + // it exists already, merge the two if the end result isn't identical to the existing one updated := existing.DeepCopy() if updated.Annotations == nil { @@ -90,9 +101,6 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. updated.ObjectMeta.Labels[k] = v } - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - updated.Spec.Selector = existing.Spec.Selector.DeepCopy() - patch := client.MergeFrom(existing) if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) diff --git a/pkg/collector/reconcile/statefulset_test.go b/pkg/collector/reconcile/statefulset_test.go index 4a0de27f2..bf8353429 100644 --- a/pkg/collector/reconcile/statefulset_test.go +++ b/pkg/collector/reconcile/statefulset_test.go @@ -132,4 +132,34 @@ func TestExpectedStatefulsets(t *testing.T) { assert.True(t, exists) }) + + t.Run("change Spec.Selector should recreate statefulset", func(t *testing.T) { + + oldSs := collector.StatefulSet(param.Config, logger, param.Instance) + oldSs.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" + oldSs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" + oldSs.Name = "update-ss" + + err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{oldSs}) + assert.NoError(t, err) + exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + + newSs := collector.StatefulSet(param.Config, logger, param.Instance) + newSs.Name = oldSs.Name + err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + assert.NoError(t, err) + exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.False(t, exists) + + err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + assert.NoError(t, err) + actual := v1.StatefulSet{} + exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, newSs.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) + }) } diff --git a/tests/e2e-upgrade/upgrade-test/00-assert.yaml b/tests/e2e-upgrade/upgrade-test/00-assert.yaml new file mode 100644 index 000000000..f6462600f --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/00-assert.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector + annotations: + operatorVersion: "v0.49.0" +spec: + selector: + matchLabels: + app.kubernetes.io/version: latest +status: + readyReplicas: 1 +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 diff --git a/tests/e2e-upgrade/upgrade-test/00-install.yaml b/tests/e2e-upgrade/upgrade-test/00-install.yaml new file mode 100644 index 000000000..b0e18de3c --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/00-install.yaml @@ -0,0 +1,28 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + annotations: + operatorVersion: "v0.49.0" +spec: + replicas: 1 + config: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger,otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml b/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml new file mode 100644 index 000000000..346d4facd --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl apply -f ../../_build/manifests/01-opentelemetry-operator.yaml + - command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system + - command: sleep 60s diff --git a/tests/e2e-upgrade/upgrade-test/02-assert.yaml b/tests/e2e-upgrade/upgrade-test/02-assert.yaml new file mode 100644 index 000000000..b40c5a7bb --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/02-assert.yaml @@ -0,0 +1,8 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector + annotations: + operatorVersion: "latest" +status: + readyReplicas: 2 diff --git a/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml b/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml new file mode 100644 index 000000000..dceb4999c --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml @@ -0,0 +1,28 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + annotations: + operatorVersion: "latest" +spec: + replicas: 2 + config: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger,otlp] + processors: [] + exporters: [logging] From 6d4a9a1f6740ee56b40f64247119537f52f827de Mon Sep 17 00:00:00 2001 From: Ben B Date: Wed, 12 Oct 2022 10:43:00 +0200 Subject: [PATCH 0611/1234] Update routine for migration of jaeger remote sampling in version 0.61.0 (#1116) * upgrade routine for jaeger remote sampling Signed-off-by: Benedikt Bongartz * upgrade routine to fail if jaeger receiver uses remote sapmling Signed-off-by: Benedikt Bongartz * improve error message and create event when upgrade fails Signed-off-by: Benedikt Bongartz * always inform users about failed upgrades Signed-off-by: Benedikt Bongartz * follow recommendations Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- .../upgrade/testdata/v0_61_0-invalid.yaml | 8 ++ .../upgrade/testdata/v0_61_0-valid.yaml | 5 ++ pkg/collector/upgrade/upgrade.go | 4 +- pkg/collector/upgrade/v0_61_0.go | 69 +++++++++++++++ pkg/collector/upgrade/v0_61_0_test.go | 86 +++++++++++++++++++ pkg/collector/upgrade/versions.go | 4 + 6 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml create mode 100644 pkg/collector/upgrade/testdata/v0_61_0-valid.yaml create mode 100644 pkg/collector/upgrade/v0_61_0.go create mode 100644 pkg/collector/upgrade/v0_61_0_test.go diff --git a/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml b/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml new file mode 100644 index 000000000..e04bc249a --- /dev/null +++ b/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml @@ -0,0 +1,8 @@ +--- +receivers: + jaeger: + protocols: + grpc: + remote_sampling: + strategy_file: "/etc/strategy.json" + strategy_file_reload_interval: 10s diff --git a/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml b/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml new file mode 100644 index 000000000..2dc25ca4a --- /dev/null +++ b/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml @@ -0,0 +1,5 @@ +--- +receivers: + jaeger: + protocols: + grpc: diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 93123a7f0..7d6dae3bf 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -61,7 +61,9 @@ func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { } upgraded, err := u.ManagedInstance(ctx, original) if err != nil { - // nothing to do at this level, just go to the next instance + const msg = "automated update not possible. Configuration must be corrected manually and CR instance must be re-created." + itemLogger.Info(msg) + u.Recorder.Event(&original, "Error", "Upgrade", msg) continue } diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go new file mode 100644 index 000000000..dff6365a6 --- /dev/null +++ b/pkg/collector/upgrade/v0_61_0.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade + +import ( + "errors" + "fmt" + "strings" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" +) + +func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { + if len(otelcol.Spec.Config) == 0 { + return otelcol, nil + } + + otelCfg, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + return otelcol, fmt.Errorf("couldn't upgrade to v0.61.0, failed to parse configuration: %w", err) + } + + // Search for removed Jaeger remote sampling settings. (https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/14163) + receiversConfig, ok := otelCfg["receivers"].(map[any]any) + if !ok { + // In case there is no extensions config. + return otelcol, nil + } + + for key, rc := range receiversConfig { + k, ok := key.(string) + if !ok { + continue + } + cfg, ok := rc.(map[any]any) + // check if jaeger is configured + if !ok || !strings.HasPrefix(k, "jaeger") { + continue + } + + // check if remote sampling settings exit + if _, ok := cfg["remote_sampling"]; !ok { + continue + } + + const issueID = "https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707" + errStr := fmt.Sprintf( + "jaegerremotesampling is no longer available as receiver configuration. "+ + "Please use the extension instead with a different remote sampling port. See: %s", + issueID, + ) + u.Recorder.Event(otelcol, "Error", "Upgrade", errStr) + return nil, errors.New(errStr) + } + return otelcol, nil +} diff --git a/pkg/collector/upgrade/v0_61_0_test.go b/pkg/collector/upgrade/v0_61_0_test.go new file mode 100644 index 000000000..5c43aa32b --- /dev/null +++ b/pkg/collector/upgrade/v0_61_0_test.go @@ -0,0 +1,86 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package upgrade_test + +import ( + "context" + _ "embed" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/record" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +var ( + //go:embed testdata/v0_61_0-valid.yaml + valid string + //go:embed testdata/v0_61_0-invalid.yaml + invalid string +) + +func Test0_61_0Upgrade(t *testing.T) { + + collectorInstance := v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "OpenTelemetryCollector", + APIVersion: "v1alpha1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "otel-my-instance", + Namespace: "somewhere", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + tt := []struct { + name string + config string + expectErr bool + }{ + { + name: "no remote sampling config", // valid + config: valid, + expectErr: false, + }, + { + name: "has remote sampling config", // invalid + config: invalid, + expectErr: true, + }, + } + + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + collectorInstance.Spec.Config = tc.config + collectorInstance.Status.Version = "0.60.0" + + versionUpgrade := &upgrade.VersionUpgrade{ + Log: logger, + Version: version.Get(), + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + + _, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) + if (err != nil) != tc.expectErr { + t.Errorf("expect err: %t but got: %v", tc.expectErr, err) + } + }) + } +} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index a311cf2ee..ae0870f04 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -81,6 +81,10 @@ var ( Version: *semver.MustParse("0.57.2"), upgrade: upgrade0_57_2, }, + { + Version: *semver.MustParse("0.61.0"), + upgrade: upgrade0_61_0, + }, } // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. From 992b681dd1bb8445b2744fb4f602f0faa0128ac9 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 12 Oct 2022 18:13:43 +0530 Subject: [PATCH 0612/1234] Validate all env. vars. before starting injecting env. vars (#1141) * skips env var injection and sdk configurations if agent injection is skipped * mutate container at the last of SDK injection step * validate first and then mutate the container with env variables * fixes go lint issues * incorporates review comments * fixes go lint issue * removes return statement in case of failed instrumentation --- pkg/instrumentation/dotnet.go | 65 +++++------- pkg/instrumentation/dotnet_test.go | 138 ++------------------------ pkg/instrumentation/javaagent.go | 24 ++--- pkg/instrumentation/javaagent_test.go | 9 +- pkg/instrumentation/nodejs.go | 22 ++-- pkg/instrumentation/nodejs_test.go | 9 +- pkg/instrumentation/python.go | 24 ++--- pkg/instrumentation/python_test.go | 9 +- pkg/instrumentation/sdk.go | 69 +++++++++---- 9 files changed, 132 insertions(+), 237 deletions(-) diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 210db334f..47263bb91 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -17,7 +17,6 @@ package instrumentation import ( "fmt" - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -40,11 +39,17 @@ const ( dotNetStartupHookPath = "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" ) -func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) corev1.Pod { - // caller checks if there is at least one container - container := pod.Spec.Containers[index] +func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (corev1.Pod, error) { - // inject env vars + // caller checks if there is at least one container. + container := &pod.Spec.Containers[index] + + err := validateContainerEnv(container.Env, envDotNetStartupHook, envDotNetAdditionalDeps, envDotNetSharedStore) + if err != nil { + return pod, err + } + + // inject .NET instrumentation spec env vars. for _, env := range dotNetSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) if idx == -1 { @@ -57,40 +62,26 @@ func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1. concatEnvValues = true ) - if !trySetEnvVar(logger, &container, envDotNetCoreClrEnableProfiling, dotNetCoreClrEnableProfilingEnabled, doNotConcatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetCoreClrEnableProfiling, dotNetCoreClrEnableProfilingEnabled, doNotConcatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerId, doNotConcatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerId, doNotConcatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetCoreClrProfilerPath, dotNetCoreClrProfilerPath, doNotConcatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetCoreClrProfilerPath, dotNetCoreClrProfilerPath, doNotConcatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetStartupHook, dotNetStartupHookPath, concatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetStartupHook, dotNetStartupHookPath, concatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetAdditionalDeps, dotNetAdditionalDepsPath, concatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetAdditionalDeps, dotNetAdditionalDepsPath, concatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetOTelAutoHome, dotNetOTelAutoHomePath, doNotConcatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetOTelAutoHome, dotNetOTelAutoHomePath, doNotConcatEnvValues) - if !trySetEnvVar(logger, &container, envDotNetSharedStore, dotNetSharedStorePath, concatEnvValues) { - return pod - } + setDotNetEnvVar(container, envDotNetSharedStore, dotNetSharedStorePath, concatEnvValues) container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ Name: volumeName, MountPath: "/otel-auto-instrumentation", }) - // We just inject Volumes and init containers for the first processed container + // We just inject Volumes and init containers for the first processed container. if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, @@ -108,30 +99,22 @@ func injectDotNetSDK(logger logr.Logger, dotNetSpec v1alpha1.DotNet, pod corev1. }}, }) } - - pod.Spec.Containers[index] = container - return pod + return pod, nil } -func trySetEnvVar(logger logr.Logger, container *corev1.Container, envVarName string, envVarValue string, concatValues bool) bool { +// setDotNetEnvVar function sets env var to the container if not exist already. +// value of concatValues should be set to true if the env var supports multiple values separated by :. +// If it is set to false, the original container's env var value has priority. +func setDotNetEnvVar(container *corev1.Container, envVarName string, envVarValue string, concatValues bool) { idx := getIndexOfEnv(container.Env, envVarName) if idx < 0 { container.Env = append(container.Env, corev1.EnvVar{ Name: envVarName, Value: envVarValue, }) - return true + return } - - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping DotNet SDK injection, the container defines env var value via ValueFrom", "envVar", envVarName, "container", container.Name) - return false - } - if concatValues { container.Env[idx].Value = fmt.Sprintf("%s:%s", container.Env[idx].Value, envVarValue) } - - return true } diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 00177e15f..aa0978c98 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -18,7 +18,6 @@ import ( "fmt" "testing" - "github.com/go-logr/logr" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -31,6 +30,7 @@ func TestInjectDotNetSDK(t *testing.T) { v1alpha1.DotNet pod corev1.Pod expected corev1.Pod + err error }{ { name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS, OTEL_DOTNET_AUTO_HOME not defined", @@ -105,6 +105,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE, OTEL_DOTNET_AUTO_HOME defined", @@ -210,102 +211,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, - }, - { - name: "CORECLR_ENABLE_PROFILING defined as ValueFrom", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, - pod: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrEnableProfiling, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - expected: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrEnableProfiling, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - }, - { - name: "CORECLR_PROFILER defined as ValueFrom", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, - pod: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrProfiler, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - expected: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrProfiler, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - }, - { - name: "CORECLR_PROFILER_PATH defined as ValueFrom", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, - pod: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrProfilerPath, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - expected: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetCoreClrProfilerPath, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, + err: nil, }, { name: "DOTNET_STARTUP_HOOKS defined as ValueFrom", @@ -338,6 +244,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envDotNetStartupHook), }, { name: "DOTNET_ADDITIONAL_DEPS defined as ValueFrom", @@ -370,6 +277,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envDotNetAdditionalDeps), }, { name: "DOTNET_SHARED_STORE defined as ValueFrom", @@ -402,45 +310,15 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, - }, - { - name: "OTEL_DOTNET_AUTO_HOME defined as ValueFrom", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, - pod: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetOTelAutoHome, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, - expected: corev1.Pod{ - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Env: []corev1.EnvVar{ - { - Name: envDotNetOTelAutoHome, - ValueFrom: &corev1.EnvVarSource{}, - }, - }, - }, - }, - }, - }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envDotNetSharedStore), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectDotNetSDK(logr.Discard(), test.DotNet, test.pod, 0) + pod, err := injectDotNetSDK(test.DotNet, test.pod, 0) assert.Equal(t, test.expected, pod) + assert.Equal(t, test.err, err) }) } } diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 1d534a4b1..02688ac0d 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -15,7 +15,6 @@ package instrumentation import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -26,11 +25,16 @@ const ( javaJVMArgument = " -javaagent:/otel-auto-instrumentation/javaagent.jar" ) -func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, index int) corev1.Pod { - // caller checks if there is at least one container +func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1.Pod, error) { + // caller checks if there is at least one container. container := &pod.Spec.Containers[index] - // inject env vars + err := validateContainerEnv(container.Env, envJavaToolsOptions) + if err != nil { + return pod, err + } + + // inject Java instrumentation spec env vars. for _, env := range javaSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) if idx == -1 { @@ -45,14 +49,7 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, Value: javaJVMArgument, }) } else { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping javaagent injection, the container defines JAVA_TOOL_OPTIONS env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = container.Env[idx].Value + javaJVMArgument - } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ @@ -60,7 +57,7 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, MountPath: "/otel-auto-instrumentation", }) - // We just inject Volumes and init containers for the first processed container + // We just inject Volumes and init containers for the first processed container. if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, @@ -78,6 +75,5 @@ func injectJavaagent(logger logr.Logger, javaSpec v1alpha1.Java, pod corev1.Pod, }}, }) } - - return pod + return pod, err } diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index d97853bbf..ab3a6f885 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -15,9 +15,9 @@ package instrumentation import ( + "fmt" "testing" - "github.com/go-logr/logr" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -30,6 +30,7 @@ func TestInjectJavaagent(t *testing.T) { v1alpha1.Java pod corev1.Pod expected corev1.Pod + err error }{ { name: "JAVA_TOOL_OPTIONS not defined", @@ -80,6 +81,7 @@ func TestInjectJavaagent(t *testing.T) { }, }, }, + err: nil, }, { name: "JAVA_TOOL_OPTIONS defined", @@ -137,6 +139,7 @@ func TestInjectJavaagent(t *testing.T) { }, }, }, + err: nil, }, { name: "JAVA_TOOL_OPTIONS defined as ValueFrom", @@ -169,13 +172,15 @@ func TestInjectJavaagent(t *testing.T) { }, }, }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envJavaToolsOptions), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectJavaagent(logr.Discard(), test.Java, test.pod, 0) + pod, err := injectJavaagent(test.Java, test.pod, 0) assert.Equal(t, test.expected, pod) + assert.Equal(t, test.err, err) }) } } diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 5a26fd6ad..d1a4e180e 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -15,7 +15,6 @@ package instrumentation import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -26,11 +25,16 @@ const ( nodeRequireArgument = " --require /otel-auto-instrumentation/autoinstrumentation.js" ) -func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) corev1.Pod { - // caller checks if there is at least one container +func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (corev1.Pod, error) { + // caller checks if there is at least one container. container := &pod.Spec.Containers[index] - // inject env vars + err := validateContainerEnv(container.Env, envNodeOptions) + if err != nil { + return pod, err + } + + // inject NodeJS instrumentation spec env vars. for _, env := range nodeJSSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) if idx == -1 { @@ -45,14 +49,7 @@ func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1. Value: nodeRequireArgument, }) } else if idx > -1 { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping NodeJS SDK injection, the container defines NODE_OPTIONS env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = container.Env[idx].Value + nodeRequireArgument - } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ @@ -78,6 +75,5 @@ func injectNodeJSSDK(logger logr.Logger, nodeJSSpec v1alpha1.NodeJS, pod corev1. }}, }) } - - return pod + return pod, nil } diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index e0a187f0a..3054f029a 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -15,9 +15,9 @@ package instrumentation import ( + "fmt" "testing" - "github.com/go-logr/logr" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -30,6 +30,7 @@ func TestInjectNodeJSSDK(t *testing.T) { v1alpha1.NodeJS pod corev1.Pod expected corev1.Pod + err error }{ { name: "NODE_OPTIONS not defined", @@ -80,6 +81,7 @@ func TestInjectNodeJSSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "NODE_OPTIONS defined", @@ -137,6 +139,7 @@ func TestInjectNodeJSSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "NODE_OPTIONS defined as ValueFrom", @@ -169,13 +172,15 @@ func TestInjectNodeJSSDK(t *testing.T) { }, }, }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envNodeOptions), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectNodeJSSDK(logr.Discard(), test.NodeJS, test.pod, 0) + pod, err := injectNodeJSSDK(test.NodeJS, test.pod, 0) assert.Equal(t, test.expected, pod) + assert.Equal(t, test.err, err) }) } } diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index b3956e353..2662ddc87 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -17,7 +17,6 @@ package instrumentation import ( "fmt" - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -31,11 +30,16 @@ const ( pythonPathSuffix = "/otel-auto-instrumentation" ) -func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1.Pod, index int) corev1.Pod { - // caller checks if there is at least one container +func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (corev1.Pod, error) { + // caller checks if there is at least one container. container := &pod.Spec.Containers[index] - // inject env vars + err := validateContainerEnv(container.Env, envPythonPath) + if err != nil { + return pod, err + } + + // inject Python instrumentation spec env vars. for _, env := range pythonSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) if idx == -1 { @@ -50,14 +54,7 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), }) } else if idx > -1 { - if container.Env[idx].ValueFrom != nil { - // TODO add to status object or submit it as an event - logger.Info("Skipping Python SDK injection, the container defines PYTHONPATH env var value via ValueFrom", "container", container.Name) - return pod - } - container.Env[idx].Value = fmt.Sprintf("%s:%s:%s", pythonPathPrefix, container.Env[idx].Value, pythonPathSuffix) - } // Set OTEL_TRACES_EXPORTER to HTTP exporter if not set by user because it is what our autoinstrumentation supports. @@ -86,7 +83,7 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. MountPath: "/otel-auto-instrumentation", }) - // We just inject Volumes and init containers for the first processed container + // We just inject Volumes and init containers for the first processed container. if isInitContainerMissing(pod) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, @@ -104,6 +101,5 @@ func injectPythonSDK(logger logr.Logger, pythonSpec v1alpha1.Python, pod corev1. }}, }) } - - return pod + return pod, nil } diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index c8a4887a1..35e8e4d34 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -18,7 +18,6 @@ import ( "fmt" "testing" - "github.com/go-logr/logr" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" @@ -31,6 +30,7 @@ func TestInjectPythonSDK(t *testing.T) { v1alpha1.Python pod corev1.Pod expected corev1.Pod + err error }{ { name: "PYTHONPATH not defined", @@ -89,6 +89,7 @@ func TestInjectPythonSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "PYTHONPATH defined", @@ -154,6 +155,7 @@ func TestInjectPythonSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "OTEL_TRACES_EXPORTER defined", @@ -284,6 +286,7 @@ func TestInjectPythonSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "PYTHONPATH defined as ValueFrom", @@ -316,13 +319,15 @@ func TestInjectPythonSDK(t *testing.T) { }, }, }, + err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envPythonPath), }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod := injectPythonSDK(logr.Discard(), test.Python, test.pod, 0) + pod, err := injectPythonSDK(test.Python, test.pod, 0) assert.Equal(t, test.expected, pod) + assert.Equal(t, test.err, err) }) } } diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 346fc7768..b126427d7 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -64,35 +64,53 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations } } - // inject only to the first container for now - // in the future we can define an annotation to configure this if insts.Java != nil { otelinst := *insts.Java - i.logger.V(1).Info("injecting java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectJavaagent(i.logger, otelinst.Spec.Java, pod, index) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + var err error + i.logger.V(1).Info("injecting Java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod, err = injectJavaagent(otelinst.Spec.Java, pod, index) + if err != nil { + i.logger.Info("Skipping javaagent injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } } if insts.NodeJS != nil { otelinst := *insts.NodeJS - i.logger.V(1).Info("injecting nodejs instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectNodeJSSDK(i.logger, otelinst.Spec.NodeJS, pod, index) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + var err error + i.logger.V(1).Info("injecting NodeJS instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod, err = injectNodeJSSDK(otelinst.Spec.NodeJS, pod, index) + if err != nil { + i.logger.Info("Skipping NodeJS SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } } if insts.Python != nil { otelinst := *insts.Python - i.logger.V(1).Info("injecting python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectPythonSDK(i.logger, otelinst.Spec.Python, pod, index) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + var err error + i.logger.V(1).Info("injecting Python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod, err = injectPythonSDK(otelinst.Spec.Python, pod, index) + if err != nil { + i.logger.Info("Skipping Python SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } } if insts.DotNet != nil { otelinst := *insts.DotNet - i.logger.V(1).Info("injecting dotnet instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = injectDotNetSDK(i.logger, otelinst.Spec.DotNet, pod, index) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + var err error + i.logger.V(1).Info("injecting DotNet instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod, err = injectDotNetSDK(otelinst.Spec.DotNet, pod, index) + if err != nil { + i.logger.Info("Skipping DotNet SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + } } if insts.Sdk != nil { otelinst := *insts.Sdk @@ -100,7 +118,6 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) } - return pod } @@ -377,3 +394,17 @@ func moveEnvToListEnd(envs []corev1.EnvVar, idx int) []corev1.EnvVar { return envs } + +func validateContainerEnv(envs []corev1.EnvVar, envsToBeValidated ...string) error { + for _, envToBeValidated := range envsToBeValidated { + for _, containerEnv := range envs { + if containerEnv.Name == envToBeValidated { + if containerEnv.ValueFrom != nil { + return fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", containerEnv.Name) + } + break + } + } + } + return nil +} From 611f52b38c4f6c80bb370951c4b61b1349918d0a Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 13 Oct 2022 04:27:12 -0700 Subject: [PATCH 0613/1234] Update the javaagent version to 1.19.0 (#1161) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 84cc52946..815d5ca06 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.18.0 +1.19.0 From 000ec9362db3c929861bbc1803e960ad14e0a65c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:34:34 +0200 Subject: [PATCH 0614/1234] Bump docker/build-push-action from 3.1.1 to 3.2.0 (#1166) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3.1.1...v3.2.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index adf438d2e..775c68359 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 93c7eda52..6e6caf43d 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index f734dc95c..57e74fa0a 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 38493adc8..3173e2916 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index af7ed8a98..bc62d864d 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 72d206627..ba40fff1f 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -51,7 +51,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.1.1 + uses: docker/build-push-action@v3.2.0 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From 2b6ec2bab2b42d5865804f8c6ab3789721969ac8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:34:51 +0200 Subject: [PATCH 0615/1234] Bump go.opentelemetry.io/otel from 1.10.0 to 1.11.0 (#1162) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e98a5c2ba..966d8f240 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.0 - go.opentelemetry.io/otel v1.10.0 + go.opentelemetry.io/otel v1.11.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.2 k8s.io/apimachinery v0.25.2 @@ -104,7 +104,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.10.0 // indirect + go.opentelemetry.io/otel/trace v1.11.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect diff --git a/go.sum b/go.sum index 302bb0fcb..5f5913e58 100644 --- a/go.sum +++ b/go.sum @@ -1022,10 +1022,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= -go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= -go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk= +go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk= +go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI= +go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= From 2877e53d91fcf4e27afac93c80563fed2bcfa950 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Oct 2022 16:35:15 +0200 Subject: [PATCH 0616/1234] Bump docker/login-action from 2.0.0 to 2.1.0 (#1165) Bumps [docker/login-action](https://github.com/docker/login-action) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 775c68359..ef27ee895 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 6e6caf43d..d76926710 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 57e74fa0a..8816223bc 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 3173e2916..441c12c16 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -46,7 +46,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index bc62d864d..4b48ed350 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -57,7 +57,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index ba40fff1f..d90049114 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -44,7 +44,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.0.0 + uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From 246cc4a8eebbea86cd48a93a3deb1725a355d054 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 14 Oct 2022 09:55:10 +0200 Subject: [PATCH 0617/1234] Remove unused make target (#1160) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 51897f266..de7fad2fe 100644 --- a/Makefile +++ b/Makefile @@ -340,9 +340,6 @@ bundle-build: bundle-push: docker push $(BUNDLE_IMG) -.PHONY: tools -tools: ginkgo kustomize controller-gen operator-sdk - .PHONY: api-docs api-docs: crdoc kustomize @{ \ From e3618643819800d34de77b1879f0db2696d90b9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 11:02:09 +0200 Subject: [PATCH 0618/1234] Bump k8s.io/kubectl from 0.25.2 to 0.25.3 (#1172) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.25.2 to 0.25.3. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.25.2...v0.25.3) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 966d8f240..a0c10a6f5 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/stretchr/testify v1.8.0 go.opentelemetry.io/otel v1.11.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.2 - k8s.io/apimachinery v0.25.2 - k8s.io/client-go v0.25.2 - k8s.io/kubectl v0.25.2 + k8s.io/api v0.25.3 + k8s.io/apimachinery v0.25.3 + k8s.io/client-go v0.25.3 + k8s.io/kubectl v0.25.3 sigs.k8s.io/controller-runtime v0.13.0 ) @@ -125,7 +125,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.2 // indirect + k8s.io/component-base v0.25.3 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index 5f5913e58..478a0ab4b 100644 --- a/go.sum +++ b/go.sum @@ -1036,7 +1036,7 @@ go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1628,20 +1628,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8= -k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0= +k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= +k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.25.2 h1:WbxfAjCx+AeN8Ilp9joWnyJ6xu9OMeS/fsfjK/5zaQs= -k8s.io/apimachinery v0.25.2/go.mod h1:hqqA1X0bsgsxI6dXsJ4HnNTBOmJNxyPp8dw3u2fSHwA= +k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= +k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo= -k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4= -k8s.io/component-base v0.25.2 h1:Nve/ZyHLUBHz1rqwkjXm/Re6IniNa5k7KgzxZpTfSQY= -k8s.io/component-base v0.25.2/go.mod h1:90W21YMr+Yjg7MX+DohmZLzjsBtaxQDDwaX4YxDkl60= +k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= +k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= +k8s.io/component-base v0.25.3 h1:UrsxciGdrCY03ULT1h/S/gXFCOPnLhUVwSyx+hM/zq4= +k8s.io/component-base v0.25.3/go.mod h1:WYoS8L+IlTZgU7rhAl5Ctpw0WdMxDfCC5dkxcEFa/TI= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1656,8 +1656,8 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.2 h1:2993lTeVimxKSWx/7z2PiJxUILygRa3tmC4QhFaeioA= -k8s.io/kubectl v0.25.2/go.mod h1:eoBGJtKUj7x38KXelz+dqVtbtbKwCqyKzJWmBHU0prg= +k8s.io/kubectl v0.25.3 h1:HnWJziEtmsm4JaJiKT33kG0kadx68MXxUE8UEbXnN4U= +k8s.io/kubectl v0.25.3/go.mod h1:glU7PiVj/R6Ud4A9FJdTcJjyzOtCJyc0eO7Mrbh3jlI= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 0cdc838257b515882b78a55c8fc45dd53c54606f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 11:02:44 +0200 Subject: [PATCH 0619/1234] Bump docker/setup-buildx-action from 2.0.0 to 2.1.0 (#1167) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index ef27ee895..25d37faf2 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index d76926710..58d13bd8e 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 8816223bc..60bd4fb12 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 441c12c16..7ec68e398 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 4b48ed350..381d27202 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -46,7 +46,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index d90049114..1287de258 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -33,7 +33,7 @@ jobs: uses: docker/setup-qemu-action@v2.0.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.0.0 + uses: docker/setup-buildx-action@v2.1.0 - name: Cache Docker layers uses: actions/cache@v3 From 666c524dab6a052e95275e1869352fefdfbfe688 Mon Sep 17 00:00:00 2001 From: YUANFAN PENG Date: Fri, 14 Oct 2022 03:01:03 -0700 Subject: [PATCH 0620/1234] Fix flasky e2e upgrade. (#1175) --- tests/e2e-upgrade/upgrade-test/00-assert.yaml | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/tests/e2e-upgrade/upgrade-test/00-assert.yaml b/tests/e2e-upgrade/upgrade-test/00-assert.yaml index f6462600f..50736de4a 100644 --- a/tests/e2e-upgrade/upgrade-test/00-assert.yaml +++ b/tests/e2e-upgrade/upgrade-test/00-assert.yaml @@ -10,60 +10,3 @@ spec: app.kubernetes.io/version: latest status: readyReplicas: 1 ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 From 76f244d293abc92971f6852a27f2c52d815d1090 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 12:01:45 +0200 Subject: [PATCH 0621/1234] Bump docker/metadata-action from 4.0.1 to 4.1.0 (#1163) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.0.1 to 4.1.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v4.0.1...v4.1.0) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 25d37faf2..a4dc8d9de 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet tags: | diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 58d13bd8e..4afacc839 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 60bd4fb12..f311d785d 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 7ec68e398..d40cff522 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 381d27202..8b86a9100 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 1287de258..5c970b7bc 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -23,7 +23,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.0.1 + uses: docker/metadata-action@v4.1.0 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From b443426fb5bc99331e7d086855ec8d87bb9161ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Oct 2022 14:03:54 +0200 Subject: [PATCH 0622/1234] Bump docker/setup-qemu-action from 2.0.0 to 2.1.0 (#1164) Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index a4dc8d9de..e423ce4aa 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 4afacc839..0ac7db242 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index f311d785d..c6659ef48 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index d40cff522..69c07ee4f 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -32,7 +32,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 8b86a9100..ed3d87e5c 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -43,7 +43,7 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 5c970b7bc..60df68d05 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -30,7 +30,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.0.0 + uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2.1.0 From bc32d5175e4e4aa1b29e2ee9ff15edcc7a782f82 Mon Sep 17 00:00:00 2001 From: Efrat Levitan <41479945+Efrat19@users.noreply.github.com> Date: Fri, 14 Oct 2022 17:15:30 +0300 Subject: [PATCH 0623/1234] Add local arm build (#1157) * add local arm build Signed-off-by: Efrat19 * fix typo Signed-off-by: Efrat19 * add automatic amd build if needed * fix amd to arm * use buildx only * support arm builds in container-target-allocator * add default ARCH for e2e Signed-off-by: Efrat19 * fix ARCH var Signed-off-by: Efrat19 Co-authored-by: Pavol Loffay --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index de7fad2fe..9055a2147 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" +ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator @@ -179,9 +180,10 @@ set-test-image-vars: $(eval TARGETALLOCATOR_IMG=local/opentelemetry-operator-targetallocator:e2e) # Build the container image, used only for local dev purposes +# buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker build -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . + docker buildx build --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push @@ -190,7 +192,7 @@ container-push: .PHONY: container-target-allocator container-target-allocator: - docker build -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator + docker buildx build --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator .PHONY: start-kind start-kind: From e4a62cb54295263a979c1604a9288a4f8723cc62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:33:47 +0200 Subject: [PATCH 0624/1234] Bump docker/metadata-action from 4.1.0 to 4.1.1 (#1180) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index e423ce4aa..8a04206cb 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet tags: | diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0ac7db242..810c57e67 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index c6659ef48..a15624bd6 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 69c07ee4f..6044fa260 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index ed3d87e5c..e294706e0 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 60df68d05..961083004 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -23,7 +23,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.0 + uses: docker/metadata-action@v4.1.1 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | From ec74ba6f36ef014d667bdbaf765bb0652c25ee92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Oct 2022 17:46:27 +0200 Subject: [PATCH 0625/1234] Bump docker/setup-buildx-action from 2.1.0 to 2.2.0 (#1181) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 8a04206cb..6d56f375c 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 810c57e67..a9fcc4ba0 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index a15624bd6..89b1cc7cb 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 6044fa260..9d134c954 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -35,7 +35,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index e294706e0..35b4255c3 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -46,7 +46,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 961083004..cc6e4a148 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -33,7 +33,7 @@ jobs: uses: docker/setup-qemu-action@v2.1.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.1.0 + uses: docker/setup-buildx-action@v2.2.0 - name: Cache Docker layers uses: actions/cache@v3 From e66ef73fc64334a2ff5f82a2d2fcaca597dc679e Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 19 Oct 2022 14:24:58 +0530 Subject: [PATCH 0626/1234] Add support for priorityClassName for collector (#1178) --- apis/v1alpha1/opentelemetrycollector_types.go | 5 ++++ .../opentelemetrycollector_webhook.go | 5 ++++ .../opentelemetrycollector_webhook_test.go | 10 +++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 4 +++ docs/api.md | 7 +++++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 29 +++++++++++++++++++ pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 29 +++++++++++++++++++ pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 29 +++++++++++++++++++ 12 files changed, 125 insertions(+) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 5b2ee5f0b..9f34405b3 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -138,6 +138,11 @@ type OpenTelemetryCollectorSpec struct { // HostNetwork indicates if the pod should run in the host networking namespace. // +optional HostNetwork bool `json:"hostNetwork,omitempty"` + // If specified, indicates the pod's priority. + // If not specified, the pod priority will be default or zero if there is no + // default. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 6c8c22ccd..6fde5d807 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -108,6 +108,11 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) } + // validate priorityClassName + if r.Spec.Mode == ModeSidecar && r.Spec.PriorityClassName != "" { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'priorityClassName'", r.Spec.Mode) + } + // validate target allocation if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 008067f22..3ec287956 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -332,6 +332,16 @@ func TestOTELColValidatingWebhook(t *testing.T) { ModeDeployment, ModeDaemonSet, ModeStatefulSet, ), }, + { + name: "invalid mode with priorityClassName", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + PriorityClassName: "test-class", + }, + }, + expectedErr: "does not support the attribute 'priorityClassName'", + }, } for _, test := range tests { diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index ca5d28a00..0fdf671e4 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -660,6 +660,10 @@ spec: type: object type: array x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string replicas: description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 57681b495..06db1901e 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -658,6 +658,10 @@ spec: type: object type: array x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string replicas: description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling diff --git a/docs/api.md b/docs/api.md index de084d0ef..1bb6512d3 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1802,6 +1802,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open additional ports that can't be inferred by the operator, like for custom receivers.
false + + priorityClassName + string + + If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.
+ + false replicas integer diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index dec920a09..b8245354c 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -57,6 +57,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem HostNetwork: otelcol.Spec.HostNetwork, DNSPolicy: getDnsPolicy(otelcol), SecurityContext: otelcol.Spec.PodSecurityContext, + PriorityClassName: otelcol.Spec.PriorityClassName, }, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index f1705adc3..7be991de4 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -207,3 +207,32 @@ func TestDaemonSetNodeSelector(t *testing.T) { d2 := DaemonSet(cfg, logger, otelcol_2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } + +func TestDaemonSetPriorityClassName(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := DaemonSet(cfg, logger, otelcol_1) + assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) + + priorityClassName := "test-class" + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PriorityClassName: priorityClassName, + }, + } + + cfg = config.New() + + d2 := DaemonSet(cfg, logger, otelcol_2) + assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index bc0e4ce7c..f6ce3fd18 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -59,6 +59,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, + PriorityClassName: otelcol.Spec.PriorityClassName, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index f9e1be935..23ca4bc93 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -229,3 +229,32 @@ func TestDeploymentNodeSelector(t *testing.T) { d2 := Deployment(cfg, logger, otelcol_2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } + +func TestDeploymentPriorityClassName(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := Deployment(cfg, logger, otelcol_1) + assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) + + priorityClassName := "test-class" + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PriorityClassName: priorityClassName, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol_2) + assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index cfe20fcee..464f77caf 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -59,6 +59,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, + PriorityClassName: otelcol.Spec.PriorityClassName, }, }, Replicas: otelcol.Spec.Replicas, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index add60afba..66c5926e6 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -288,3 +288,32 @@ func TestStatefulSetNodeSelector(t *testing.T) { d2 := StatefulSet(cfg, logger, otelcol_2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } + +func TestStatefulSetPriorityClassName(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + sts1 := StatefulSet(cfg, logger, otelcol_1) + assert.Empty(t, sts1.Spec.Template.Spec.PriorityClassName) + + priorityClassName := "test-class" + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + PriorityClassName: priorityClassName, + }, + } + + cfg = config.New() + + sts2 := StatefulSet(cfg, logger, otelcol_2) + assert.Equal(t, priorityClassName, sts2.Spec.Template.Spec.PriorityClassName) +} From 6e19e0ab0ec720f55ee27c1cf00e4c6af5f9391f Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 19 Oct 2022 16:30:45 +0200 Subject: [PATCH 0627/1234] Release v0.61.0 (#1131) * Release v0.61.0 Signed-off-by: Yuri Sa * Adding missing changes Signed-off-by: Yuri Sa * Adding missing topics on CHANGELOG Signed-off-by: Yuri Sa * Adding missing topics on CHANGELOG Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- CHANGELOG.md | 32 +++++++++++++++++++ README.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 6 ++-- versions.txt | 4 +-- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91d36732f..78600e875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ Changes by Version ================== +0.61.0 +------------------- +#### :x: Breaking Changes :x: +* Jaeger receiver no longer supports remote sampling. To be able to perform an update, it must be deactivated or replaced by a configuration of the [jaegerremotesampling](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/jaegerremotesampling) extension. To increase the collector version afterwards, the update must be triggered again by restarting the operator. Alternatively, the `OpenTelemetryCollector` CRD can be re-created. ([otel-contrib#14707](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707) +### 🚀 New components 🚀 +* [HPA] Add targetCPUUtilization field to collector config ([#1066](https://github.com/open-telemetry/opentelemetry-operator/pull/1066), [@moh-osman3](https://github.com/moh-osman3)) +* Extend otelcol crd with minimalistic ingress options ([#1128](https://github.com/open-telemetry/opentelemetry-operator/pull/1128), [@frzifus](https://github.com/frzifus)) +* Reconcile otel collector on given context ([#1144](https://github.com/open-telemetry/opentelemetry-operator/pull/1144), [@frzifus](https://github.com/frzifus)) +* Expose container ports on the collector pod ([#1070](https://github.com/open-telemetry/opentelemetry-operator/pull/1070), [@kristinapathak](https://github.com/kristinapathak)) +* Add scrape configs endpoint ([#1124](https://github.com/open-telemetry/opentelemetry-operator/pull/1124), [@jaronoff97](https://github.com/jaronoff97)) +* Add local arm build ([#1157](https://github.com/open-telemetry/opentelemetry-operator/pull/1157), [@Efrat19](https://github.com/Efrat19)) +* [HPA] Add targetCPUUtilization field to collector config ([#1066](https://github.com/open-telemetry/opentelemetry-operator/pull/1066), [@moh-osman3](https://github.com/moh-osman3)) +### 💡 Enhancements 💡 +* Validate all env. vars. before starting injecting env. vars ([#1141](https://github.com/open-telemetry/opentelemetry-operator/pull/1141), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Update routine for migration of jaeger remote sampling in version 0.61.0 ([#1116](https://github.com/open-telemetry/opentelemetry-operator/pull/1116), [@frzifus](https://github.com/frzifus)) +* Allow version before 0.52 to upgrade ([#1126](https://github.com/open-telemetry/opentelemetry-operator/pull/1126), [@pureklkl](https://github.com/pureklkl)) +* Set OTEL_METRICS_EXPORTER to none to prevent using the default value ([#1149](https://github.com/open-telemetry/opentelemetry-operator/pull/1149), [@aabmass](https://github.com/aabmass)) +* Change app image and context propagator b3 to b3multi in .Net e2e test case ([#1151](https://github.com/open-telemetry/opentelemetry-operator/pull/1151), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Adds deepcopy missing implementation for TargetCPUUtilization field of AutoscalerSpec ([#1138](https://github.com/open-telemetry/opentelemetry-operator/pull/1138), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Bump default python image version ([#1150](https://github.com/open-telemetry/opentelemetry-operator/pull/1150), [@aabmass](https://github.com/aabmass)) +* Bump OTel python versions to 1.13.0 and 0.34b0 ([#1147](https://github.com/open-telemetry/opentelemetry-operator/pull/1147), [@aabmass](https://github.com/aabmass) +* Change error logs to info for building container ([#1146](https://github.com/open-telemetry/opentelemetry-operator/pull/1146), [@kristinapathak](https://github.com/kristinapathak)) +* Add missing nil checks in collector validating webhook ([#1136](https://github.com/open-telemetry/opentelemetry-operator/pull/1136), [@kristinapathak](https://github.com/kristinapathak)) +* Fix lint issues in target allocator ([#1090](https://github.com/open-telemetry/opentelemetry-operator/pull/1090), [@kristinapathak](https://github.com/kristinapathak)) +### 🧰 Bug fixes 🧰 +* Fix generated deepcopy file changes check ([#1154](https://github.com/open-telemetry/opentelemetry-operator/pull/1154), [@pavolloffay](https://github.com/pavolloffay)) +* Fix Target Allocator builds by using versions.txt ([#1140](https://github.com/open-telemetry/opentelemetry-operator/pull/1140), [@jaronoff97](https://github.com/jaronoff97)) +* Add missing entry to 0.60.0 changelog ([#1102](https://github.com/open-telemetry/opentelemetry-operator/pull/1102), [@pavolloffay](https://github.com/pavolloffay)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.61.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.61.0) +* [OpenTelemetry Contrib - v0.61.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.61.0) + 0.60.0 ------------------- ### 🚀 New components 🚀 diff --git a/README.md b/README.md index bfa92ac67..ffcf40168 100644 --- a/README.md +++ b/README.md @@ -324,6 +324,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.61.0 | v1.19 to v1.25 | v1 | | v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | | v0.58.0 | v1.19 to v1.24 | v1 | @@ -344,7 +345,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.43.0 | v1.21 to v1.23 | v1alpha2 | | v0.42.0 | v1.21 to v1.23 | v1alpha2 | | v0.41.1 | v1.21 to v1.23 | v1alpha2 | -| v0.41.0 | v1.20 to v1.22 | v1alpha2 | ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c8debce01..a6adcc52a 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.60.0 + name: opentelemetry-operator.v0.61.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -294,7 +294,7 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.60.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.61.0 livenessProbe: httpGet: path: /healthz @@ -404,7 +404,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.60.0 + version: 0.61.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index f2a5e32d1..1f281296b 100644 --- a/versions.txt +++ b/versions.txt @@ -2,10 +2,10 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.60.0 +opentelemetry-collector=0.61.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.60.0 +operator=0.61.0 # Represents the current release of the Target Allocator. targetallocator=0.60.0 From 7aaf176263561b0586d02456d65f54985ee00aae Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 19 Oct 2022 20:18:51 +0530 Subject: [PATCH 0628/1234] Skip .NET auto-instrumentation if OTEL_DOTNET_AUTO_HOME env var is already set (#1177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * skips env var injection and sdk configurations if agent injection is skipped * mutate container at the last of SDK injection step * validate first and then mutate the container with env variables * fixes go lint issues * incorporates review comments * fixes go lint issue * removes return statement in case of failed instrumentation * skips auto-instrumentation if OTEL_DOTNET_AUTO_HOME is already set * use errors.New() to get the error object use errors.New() to get the error object instead of fmt.Errorf() Co-authored-by: Robert Pająk * use errors.New() to get the error object use errors.New() to get the error object instead of fmt.Errorf() Co-authored-by: Robert Pająk * replaces fmt.Errorf with error.New Co-authored-by: Robert Pająk --- pkg/instrumentation/dotnet.go | 13 +++++++ pkg/instrumentation/dotnet_test.go | 60 +++++++++++++++++++++++++++--- pkg/instrumentation/python_test.go | 1 + 3 files changed, 68 insertions(+), 6 deletions(-) diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 47263bb91..c86614a47 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -15,6 +15,7 @@ package instrumentation import ( + "errors" "fmt" corev1 "k8s.io/api/core/v1" @@ -49,6 +50,18 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor return pod, err } + // check if OTEL_DOTNET_AUTO_HOME env var is already set in the container + // if it is already set, then we assume that .NET Auto-instrumentation is already configured for this container + if getIndexOfEnv(container.Env, envDotNetOTelAutoHome) > -1 { + return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the container") + } + + // check if OTEL_DOTNET_AUTO_HOME env var is already set in the .NET instrumentatiom spec + // if it is already set, then we assume that .NET Auto-instrumentation is already configured for this container + if getIndexOfEnv(dotNetSpec.Env, envDotNetOTelAutoHome) > -1 { + return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec") + } + // inject .NET instrumentation spec env vars. for _, env := range dotNetSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index aa0978c98..eab7fb85c 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -108,7 +108,7 @@ func TestInjectDotNetSDK(t *testing.T) { err: nil, }, { - name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE, OTEL_DOTNET_AUTO_HOME defined", + name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE defined", DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, pod: corev1.Pod{ Spec: corev1.PodSpec{ @@ -139,10 +139,6 @@ func TestInjectDotNetSDK(t *testing.T) { Name: envDotNetSharedStore, Value: "/foo:/bar", }, - { - Name: envDotNetOTelAutoHome, - Value: "/foo:/bar", - }, }, }, }, @@ -204,7 +200,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, { Name: envDotNetOTelAutoHome, - Value: "/foo:/bar", + Value: dotNetOTelAutoHomePath, }, }, }, @@ -312,6 +308,58 @@ func TestInjectDotNetSDK(t *testing.T) { }, err: fmt.Errorf("the container defines env var value via ValueFrom, envVar: %s", envDotNetSharedStore), }, + { + name: "OTEL_DOTNET_AUTO_HOME already set in the container", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetOTelAutoHome, + Value: "/otel-dotnet-auto", + }, + }, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Env: []corev1.EnvVar{ + { + Name: envDotNetOTelAutoHome, + Value: "/otel-dotnet-auto", + }, + }, + }, + }, + }, + }, + err: fmt.Errorf("OTEL_DOTNET_AUTO_HOME environment variable is already set in the container"), + }, + { + name: "OTEL_DOTNET_AUTO_HOME already set in the .NET instrumentation spec", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{{Name: envDotNetOTelAutoHome, Value: dotNetOTelAutoHomePath}}}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + err: fmt.Errorf("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec"), + }, } for _, test := range tests { diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 35e8e4d34..910a35ba6 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -221,6 +221,7 @@ func TestInjectPythonSDK(t *testing.T) { }, }, }, + err: nil, }, { name: "OTEL_METRICS_EXPORTER defined", From 4b6ac5bd1e94501e15a7c67db85325d8d465453d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:17:42 +0200 Subject: [PATCH 0629/1234] Bump go.opentelemetry.io/otel from 1.11.0 to 1.11.1 (#1189) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.0...v1.11.1) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index a0c10a6f5..4d0713f39 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.0 - go.opentelemetry.io/otel v1.11.0 + go.opentelemetry.io/otel v1.11.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.3 k8s.io/apimachinery v0.25.3 @@ -63,7 +63,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.1.2 // indirect @@ -104,7 +104,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.11.0 // indirect + go.opentelemetry.io/otel/trace v1.11.1 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect diff --git a/go.sum b/go.sum index 478a0ab4b..f0a864d0d 100644 --- a/go.sum +++ b/go.sum @@ -511,8 +511,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -1022,10 +1022,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk= -go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk= -go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI= -go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U= +go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= +go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= +go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= +go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= From ef651ef7633d9fed972e7fa13a85170f12cef656 Mon Sep 17 00:00:00 2001 From: Ben B Date: Thu, 20 Oct 2022 10:18:03 +0200 Subject: [PATCH 0630/1234] changelog: mention that jaeger extention and receiver need different ports (#1186) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78600e875..315101cdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Changes by Version 0.61.0 ------------------- #### :x: Breaking Changes :x: -* Jaeger receiver no longer supports remote sampling. To be able to perform an update, it must be deactivated or replaced by a configuration of the [jaegerremotesampling](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/jaegerremotesampling) extension. To increase the collector version afterwards, the update must be triggered again by restarting the operator. Alternatively, the `OpenTelemetryCollector` CRD can be re-created. ([otel-contrib#14707](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707) +* Jaeger receiver no longer supports remote sampling. To be able to perform an update, it must be deactivated or replaced by a configuration of the [jaegerremotesampling](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/jaegerremotesampling) extension. It is **important** that the `jaegerremotesampling` extension and the `jaegerreceiver` do not use the same port. To increase the collector version afterwards, the update must be triggered again by restarting the operator. Alternatively, the `OpenTelemetryCollector` CRD can be re-created. ([otel-contrib#14707](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707)) ### 🚀 New components 🚀 * [HPA] Add targetCPUUtilization field to collector config ([#1066](https://github.com/open-telemetry/opentelemetry-operator/pull/1066), [@moh-osman3](https://github.com/moh-osman3)) * Extend otelcol crd with minimalistic ingress options ([#1128](https://github.com/open-telemetry/opentelemetry-operator/pull/1128), [@frzifus](https://github.com/frzifus)) From 15f023fe34e84185cb063f628e2f05bd60b3ae1b Mon Sep 17 00:00:00 2001 From: YUANFAN PENG Date: Thu, 20 Oct 2022 01:19:52 -0700 Subject: [PATCH 0631/1234] debug e2e upgrade test (#1187) * log the operator if e2e test failed. add manifest to the test. * revert accident change. * fix logging * try using replace. * log deployment * increase timeout. * revert to apply --- .github/workflows/e2e.yaml | 6 + Makefile | 5 + kuttl-test-upgrade.yaml | 4 +- .../opentelemetry-operator-v0.49.0.yaml | 2732 +++++++++++++++++ 4 files changed, 2745 insertions(+), 2 deletions(-) create mode 100644 tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e5af64f91..9ac9ffc4e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -36,3 +36,9 @@ jobs: env: KUBE_VERSION: ${{ matrix.kube-version }} run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION + + - name: "log operator if failed" + if: ${{ failure() }} + env: + KUBE_VERSION: ${{ matrix.kube-version }} + run: make e2e-log-operator KUBE_VERSION=$KUBE_VERSION diff --git a/Makefile b/Makefile index 9055a2147..1f90583a0 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,11 @@ e2e: e2e-upgrade: $(KUTTL) test --config kuttl-test-upgrade.yaml +.PHONY: e2e-log-operator +e2e-log-operator: + kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager + kubectl get deploy -A + .PHONY: prepare-e2e prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server load-image-all mkdir -p tests/_build/crds tests/_build/manifests diff --git a/kuttl-test-upgrade.yaml b/kuttl-test-upgrade.yaml index e77a2e2fa..3af212f43 100644 --- a/kuttl-test-upgrade.yaml +++ b/kuttl-test-upgrade.yaml @@ -18,9 +18,9 @@ kindContainers: - ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.49.0 commands: - command: make cert-manager - - command: kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.49.0/opentelemetry-operator.yaml + - command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml - command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system - command: sleep 60s testDirs: - ./tests/e2e-upgrade/ -timeout: 150 +timeout: 300 diff --git a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml new file mode 100644 index 000000000..750fe9ca5 --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml @@ -0,0 +1,2732 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator + name: instrumentations.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: Instrumentation + listKind: InstrumentationList + plural: instrumentations + shortNames: + - otelinst + - otelinsts + singular: instrumentation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Instrumentation is the spec for OpenTelemetry instrumentation. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. + properties: + env: + description: 'Env defines common env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + env: + description: 'Env defines java specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with javaagent auto-instrumentation JAR. + type: string + type: object + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. + properties: + env: + description: 'Env defines nodejs specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with NodeJS SDK and auto-instrumentation. + type: string + type: object + propagators: + description: Propagators defines inter-process context propagation configuration. + items: + description: Propagator represents the propagation type. + enum: + - tracecontext + - baggage + - b3 + - b3multi + - jaeger + - xray + - ottrace + - none + type: string + type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + env: + description: 'Env defines python specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Python SDK and auto-instrumentation. + type: string + type: object + resource: + description: Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. + properties: + addK8sUIDAttributes: + description: AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid). + type: boolean + resourceAttributes: + additionalProperties: + type: string + description: 'Attributes defines attributes that are added to the resource. For example environment: dev' + type: object + type: object + sampler: + description: Sampler defines sampling configuration. + properties: + argument: + description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. + type: string + type: + description: Type defines sampler type. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + enum: + - always_on + - always_off + - traceidratio + - parentbased_always_on + - parentbased_always_off + - parentbased_traceidratio + - jaeger_remote + - xray + type: string + type: object + type: object + status: + description: InstrumentationStatus defines status of the instrumentation. + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + controller-gen.kubebuilder.io/version: v0.8.0 + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetrycollectors.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors + shortNames: + - otelcol + - otelcols + singular: opentelemetrycollector + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Deployment Mode + jsonPath: .spec.mode + name: Mode + type: string + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + properties: + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry Collector binary + type: object + config: + description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + type: string + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpenTelemetry Collector. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) + type: string + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + mode: + description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) + enum: + - daemonset + - deployment + - sidecar + - statefulset + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. + type: object + podSecurityContext: + description: PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. + properties: + fsGroup: + description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: \n 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + type: string + name: + description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + replicas: + description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: SecurityContext will be set as the container security context. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service account to use with this instance. + type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. + properties: + enabled: + description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. + type: boolean + image: + description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. + type: string + type: object + tolerations: + description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode + items: + description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string + volumeClaimTemplates: + description: VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. + items: + description: PersistentVolumeClaim is a user's request for and claim to a persistent volume + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: A label query over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the PersistentVolume backing this claim. + type: string + type: object + status: + description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Represents the actual resources of the underlying volume. + type: object + conditions: + description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contails details about state of pvc + properties: + lastProbeTime: + description: Last time we probed the condition. + format: date-time + type: string + lastTransitionTime: + description: Last time the condition transitioned from one status to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about last transition. + type: string + reason: + description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. + type: string + status: + type: string + type: + description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: Phase represents the current phase of PersistentVolumeClaim. + type: string + resizeStatus: + description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + volumeMounts: + description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying collector deployment(s). + items: + description: Volume represents a named volume in a pod that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' + format: int32 + type: integer + readOnly: + description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + properties: + cachingMode: + description: 'Host Caching mode: None, Read Only, Read Write.' + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + properties: + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and Key + type: string + shareName: + description: Share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + properties: + monitors: + description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeID: + description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: ConfigMap represents a configMap that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + csi: + description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + properties: + driver: + description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + type: string + nodePublishSecretRef: + description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + readOnly: + description: Specifies a read-only configuration for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: DownwardAPI represents downward API about the pod that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." + properties: + volumeClaimTemplate: + description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." + properties: + metadata: + description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + properties: + accessModes: + description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + dataSourceRef: + description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' + properties: + apiGroup: + description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + resources: + description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + selector: + description: A label query over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + storageClassName: + description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: VolumeName is the binding reference to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + properties: + fsType: + description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + lun: + description: 'Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'Optional: FC target worldwide names (WWNs)' + items: + type: string + type: array + wwids: + description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'Optional: Extra command options if any.' + type: object + readOnly: + description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + required: + - driver + type: object + flocker: + description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + properties: + datasetName: + description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + type: string + datasetUUID: + description: UUID of the dataset. This is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + partition: + description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + format: int32 + type: integer + pdName: + description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' + properties: + directory: + description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + type: string + repository: + description: Repository URL + type: string + revision: + description: Commit hash for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' + properties: + path: + description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: whether support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: whether support iSCSI Session CHAP authentication + type: boolean + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + initiatorName: + description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: CHAP Secret for iSCSI target and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + targetPortal: + description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + claimName: + description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: Will force the ReadOnly setting in VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + properties: + fsType: + description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: Items for all in one resources secrets, configmaps, and downward API + properties: + defaultMode: + description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + format: int32 + type: integer + sources: + description: list of volume projections + items: + description: Projection that may be projected along with other supported volume types + properties: + configMap: + description: information about the configMap data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its keys must be defined + type: boolean + type: object + downwardAPI: + description: information about the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile represents information to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + mode: + description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + required: + - path + type: object + type: array + type: object + secret: + description: information about the secret data to project + properties: + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + type: object + serviceAccountToken: + description: information about the serviceAccountToken data to project + properties: + audience: + description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + type: string + expirationSeconds: + description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + format: int64 + type: integer + path: + description: Path is the path relative to the mount point of the file to project the token into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + properties: + group: + description: Group to map volume access to Default is no group + type: string + readOnly: + description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. + type: boolean + registry: + description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + type: string + tenant: + description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: User to map volume access to Defaults to serivceaccount user + type: string + volume: + description: Volume is a string that references an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' + type: string + image: + description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + user: + description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: The name of the ScaleIO Protection Domain for the configured storage. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + sslEnabled: + description: Flag to enable/disable SSL communication with Gateway, default false + type: boolean + storageMode: + description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. + type: string + storagePool: + description: The ScaleIO Storage Pool associated with the protection domain. + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: The name of a volume already created in the ScaleIO system that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + items: + description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: The key to project. + type: string + mode: + description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' + format: int32 + type: integer + path: + description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: Specify whether the Secret or its keys must be defined + type: boolean + secretName: + description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + volumeName: + description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + type: string + volumeNamespace: + description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + properties: + fsType: + description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + storagePolicyID: + description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: Storage Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. + properties: + messages: + description: 'Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + replicas: + description: 'Replicas is currently not being set and might be removed in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.' + format: int32 + type: integer + scale: + description: Scale is the OpenTelemetryCollector's scale subresource status. + properties: + replicas: + description: The total number non-terminated pods targeted by this OpenTelemetryCollector's deployment or statefulSet. + format: int32 + type: integer + selector: + description: The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods. + type: string + type: object + version: + description: Version of the managed OpenTelemetry Collector (operand) + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.scale.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.scale.replicas + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-leader-election-role + namespace: opentelemetry-operator-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-manager-role +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - list + - watch +- apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - daemonsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - update +- apiGroups: + - opentelemetry.io + resources: + - instrumentations + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/finalizers + verbs: + - get + - patch + - update +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/status + verbs: + - get + - patch + - update +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-proxy-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-leader-election-rolebinding + namespace: opentelemetry-operator-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: opentelemetry-operator-leader-election-role +subjects: +- kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-operator-manager-role +subjects: +- kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-operator-proxy-role +subjects: +- kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager-metrics-service + namespace: opentelemetry-operator-system +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + selector: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system +spec: + ports: + - port: 443 + protocol: TCP + targetPort: 9443 + selector: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + - args: + - --metrics-addr=127.0.0.1:8080 + - --enable-leader-election + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.49.0 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 100m + memory: 64Mi + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + serviceAccountName: opentelemetry-operator-controller-manager + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: opentelemetry-operator-controller-manager-service-cert +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-serving-cert + namespace: opentelemetry-operator-system +spec: + dnsNames: + - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc + - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc.cluster.local + issuerRef: + kind: Issuer + name: opentelemetry-operator-selfsigned-issuer + secretName: opentelemetry-operator-controller-manager-service-cert + subject: + organizationalUnits: + - opentelemetry-operator +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-selfsigned-issuer + namespace: opentelemetry-operator-system +spec: + selfSigned: {} +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-mutating-webhook-configuration +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: minstrumentation.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: mopentelemetrycollector.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-v1-pod + failurePolicy: Ignore + name: mpod.kb.io + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods + sideEffects: None +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-validating-webhook-configuration +webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: vinstrumentationcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Ignore + name: vinstrumentationdelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - instrumentations + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: vopentelemetrycollectorcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Ignore + name: vopentelemetrycollectordelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - opentelemetrycollectors + sideEffects: None From 873711ca7bb678d269ad9c7d84337b73fe724010 Mon Sep 17 00:00:00 2001 From: Tiago Angelo <5454243+angelokurtis@users.noreply.github.com> Date: Thu, 20 Oct 2022 06:53:03 -0300 Subject: [PATCH 0632/1234] Using immutable labels as service selectors (#1152) * Using immutable labels as service selectors * Fixing expected service selectors * Removing unnecessary selector Co-authored-by: Vineeth Pothulapati --- pkg/collector/reconcile/service.go | 11 ++--------- pkg/collector/reconcile/service_test.go | 3 +-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 896c99a35..86a84f200 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -71,10 +71,6 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = naming.Service(params.Instance) - // by coincidence, the selector is the same as the label, but note that the selector points to the deployment - // whereas 'labels' refers to the service - selector := labels - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) if err != nil { params.Log.Error(err, "couldn't extract the configuration from the context") @@ -120,7 +116,7 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { Annotations: params.Instance.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: selector, + Selector: collector.SelectorLabels(params.Instance), ClusterIP: "", Ports: ports, }, @@ -176,9 +172,6 @@ func monitoringService(ctx context.Context, params Params) *corev1.Service { labels := collector.Labels(params.Instance, []string{}) labels["app.kubernetes.io/name"] = naming.MonitoringService(params.Instance) - selector := collector.Labels(params.Instance, []string{}) - selector["app.kubernetes.io/name"] = fmt.Sprintf("%s-collector", params.Instance.Name) - return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: naming.MonitoringService(params.Instance), @@ -187,7 +180,7 @@ func monitoringService(ctx context.Context, params Params) *corev1.Service { Annotations: params.Instance.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: selector, + Selector: collector.SelectorLabels(params.Instance), ClusterIP: "", Ports: []corev1.ServicePort{{ Name: "monitoring", diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index f200a166b..c98553b20 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -233,7 +233,6 @@ func service(name string, ports []v1.ServicePort) v1.Service { labels := collector.Labels(params().Instance, []string{}) labels["app.kubernetes.io/name"] = name - selector := labels return v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -242,7 +241,7 @@ func service(name string, ports []v1.ServicePort) v1.Service { Annotations: params().Instance.Annotations, }, Spec: v1.ServiceSpec{ - Selector: selector, + Selector: collector.SelectorLabels(params().Instance), ClusterIP: "", Ports: ports, }, From d5ce268c67083cd65281246c709320de52275a6f Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 20 Oct 2022 04:24:01 -0700 Subject: [PATCH 0633/1234] Update the javaagent version to 1.19.1 (#1188) Co-authored-by: Pavol Loffay --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 815d5ca06..66e2ae6c2 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.19.0 +1.19.1 From d5c212d7185e830908e8d557be2958b103250f24 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 20 Oct 2022 09:31:54 -0400 Subject: [PATCH 0634/1234] Use the newly created TA codeowners (#1145) * Set up codeowners * use operator maintainers * Force new push --- .github/CODEOWNERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0216d8d08..209e0fe34 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -12,4 +12,11 @@ # https://help.github.com/en/articles/about-code-owners # +# Global owners, will be the owners for everything in the repo. * @open-telemetry/operator-approvers + +# AutoInstrumentation owners +# TBD + +# Target Allocator owners +cmd/otel-allocator @open-telemetry/operator-ta-maintainers From 8c6fabc28ab39cd398fb78f13ca92ff97afa040f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:05:49 +0200 Subject: [PATCH 0635/1234] Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 (#1199) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 4d0713f39..126bf6b70 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.3 diff --git a/go.sum b/go.sum index f0a864d0d..bcfb16491 100644 --- a/go.sum +++ b/go.sum @@ -960,6 +960,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -968,8 +969,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= From 80f1014e5c6388c49d09b693be0f8b585d3b81f2 Mon Sep 17 00:00:00 2001 From: Povilas Versockas Date: Wed, 26 Oct 2022 12:49:26 +0300 Subject: [PATCH 0636/1234] docs: add link to helm-chart (#1205) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ffcf40168..5c65cfd50 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ The operator manages: * [API docs](./docs/api.md) +## Helm Charts + +You can install Opentelemetry Operator via [Helm Chart](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator) from the opentelemetry-helm-charts repository. More information is available in [here](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator). + ## Getting started To install the operator in an existing cluster, make sure you have [`cert-manager` installed](https://cert-manager.io/docs/installation/) and run: @@ -66,7 +70,6 @@ At this point, the Operator does *not* validate the contents of the configuratio The Operator does examine the configuration file to discover configured receivers and their ports. If it finds receivers with ports, it creates a pair of kubernetes services, one headless, exposing those ports within the cluster. The headless service contains a `service.beta.openshift.io/serving-cert-secret-name` annotation that will cause OpenShift to create a secret containing a certificate and key. This secret can be mounted as a volume and the certificate and key used in those receivers' TLS configurations. - ### Upgrades As noted above, the OpenTelemetry Collector format is continuing to evolve. However, a best-effort attempt is made to upgrade all managed `OpenTelemetryCollector` resources. From e8cf7e3f58300ab9b78def742431033177759e23 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 26 Oct 2022 15:21:19 +0530 Subject: [PATCH 0637/1234] Add support of affinity in collector spec (#1204) --- apis/v1alpha1/opentelemetrycollector_types.go | 3 + .../opentelemetrycollector_webhook.go | 5 + .../opentelemetrycollector_webhook_test.go | 26 + apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 828 +++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 828 +++++++++++ docs/api.md | 1309 +++++++++++++++++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 28 + pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 46 + pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 28 + 13 files changed, 3109 insertions(+) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 9f34405b3..99b74dddd 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -143,6 +143,9 @@ type OpenTelemetryCollectorSpec struct { // default. // +optional PriorityClassName string `json:"priorityClassName,omitempty"` + // If specified, indicates the pod's scheduling constraints + // +optional + Affinity *v1.Affinity `json:"affinity,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 6fde5d807..793e9ed70 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -113,6 +113,11 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'priorityClassName'", r.Spec.Mode) } + // validate affinity + if r.Spec.Mode == ModeSidecar && r.Spec.Affinity != nil { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'affinity'", r.Spec.Mode) + } + // validate target allocation if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 3ec287956..edb8b5686 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -342,6 +342,32 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "does not support the attribute 'priorityClassName'", }, + { + name: "invalid mode with affinity", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Affinity: &v1.Affinity{ + NodeAffinity: &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "node", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-node"}, + }, + }, + }, + }, + }, + }, + }, + }, + }, + expectedErr: "does not support the attribute 'affinity'", + }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f03c0e2ce..3b2613097 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -434,6 +434,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp } } in.Ingress.DeepCopyInto(&out.Ingress) + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 0fdf671e4..13eab8959 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -53,6 +53,834 @@ spec: spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node matches + the corresponding matchExpressions; the node(s) with the + highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to an update), the system may or may not try to + eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may or may + not try to eventually evict the pod from its node. When + there are multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. all terms + must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the anti-affinity requirements + specified by this field cease to be met at some point during + pod execution (e.g. due to a pod label update), the system + may or may not try to eventually evict the pod from its + node. When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object args: additionalProperties: type: string diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 06db1901e..3a33c5ce2 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -51,6 +51,834 @@ spec: spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node matches + the corresponding matchExpressions; the node(s) with the + highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to an update), the system may or may not try to + eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may or may + not try to eventually evict the pod from its node. When + there are multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. all terms + must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the anti-affinity requirements + specified by this field cease to be met at some point during + pod execution (e.g. due to a pod label update), the system + may or may not try to eventually evict the pod from its + node. When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object args: additionalProperties: type: string diff --git a/docs/api.md b/docs/api.md index 1bb6512d3..b87e3645d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1685,6 +1685,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + affinity + object + + If specified, indicates the pod's scheduling constraints
+ + false + args map[string]string @@ -1887,6 +1894,1308 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. +### OpenTelemetryCollector.spec.affinity +[↩ Parent](#opentelemetrycollectorspec) + + + +If specified, indicates the pod's scheduling constraints + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeAffinityobject + Describes node affinity scheduling rules for the pod.
+
false
podAffinityobject + Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+
false
podAntiAffinityobject + Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity +[↩ Parent](#opentelemetrycollectorspecaffinity) + + + +Describes node affinity scheduling rules for the pod. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
+
false
requiredDuringSchedulingIgnoredDuringExecutionobject + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinity) + + + +An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferenceobject + A node selector term, associated with the corresponding weight.
+
true
weightinteger + Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +A node selector term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinity) + + + +If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeSelectorTerms[]object + Required. A list of node selector terms. The terms are ORed.
+
true
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinityrequiredduringschedulingignoredduringexecution) + + + +A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index] +[↩ Parent](#opentelemetrycollectorspecaffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity +[↩ Parent](#opentelemetrycollectorspecaffinity) + + + +Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity +[↩ Parent](#opentelemetrycollectorspecaffinity) + + + +Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + ### OpenTelemetryCollector.spec.autoscaler [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index b8245354c..f8e1dcece 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -58,6 +58,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem DNSPolicy: getDnsPolicy(otelcol), SecurityContext: otelcol.Spec.PodSecurityContext, PriorityClassName: otelcol.Spec.PriorityClassName, + Affinity: otelcol.Spec.Affinity, }, }, }, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 7be991de4..fec8f7e9a 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -236,3 +236,31 @@ func TestDaemonSetPriorityClassName(t *testing.T) { d2 := DaemonSet(cfg, logger, otelcol_2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } + +func TestDaemonSetAffinity(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := DaemonSet(cfg, logger, otelcol_1) + assert.Nil(t, d1.Spec.Template.Spec.Affinity) + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Affinity: testAffinityValue, + }, + } + + cfg = config.New() + + d2 := DaemonSet(cfg, logger, otelcol_2) + assert.NotNil(t, d2.Spec.Template.Spec.Affinity) + assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index f6ce3fd18..116790751 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -60,6 +60,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, PriorityClassName: otelcol.Spec.PriorityClassName, + Affinity: otelcol.Spec.Affinity, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 23ca4bc93..435d49e94 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -34,6 +34,24 @@ var testTolerationValues = []v1.Toleration{ }, } +var testAffinityValue = &v1.Affinity{ + NodeAffinity: &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "node", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-node"}, + }, + }, + }, + }, + }, + }, +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ @@ -258,3 +276,31 @@ func TestDeploymentPriorityClassName(t *testing.T) { d2 := Deployment(cfg, logger, otelcol_2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } + +func TestDeploymentAffinity(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := Deployment(cfg, logger, otelcol_1) + assert.Nil(t, d1.Spec.Template.Spec.Affinity) + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Affinity: testAffinityValue, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol_2) + assert.NotNil(t, d2.Spec.Template.Spec.Affinity) + assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 464f77caf..76bd1c6dc 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -60,6 +60,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel NodeSelector: otelcol.Spec.NodeSelector, SecurityContext: otelcol.Spec.PodSecurityContext, PriorityClassName: otelcol.Spec.PriorityClassName, + Affinity: otelcol.Spec.Affinity, }, }, Replicas: otelcol.Spec.Replicas, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 66c5926e6..c71823ce5 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -317,3 +317,31 @@ func TestStatefulSetPriorityClassName(t *testing.T) { sts2 := StatefulSet(cfg, logger, otelcol_2) assert.Equal(t, priorityClassName, sts2.Spec.Template.Spec.PriorityClassName) } + +func TestStatefulSetAffinity(t *testing.T) { + otelcol_1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + sts1 := Deployment(cfg, logger, otelcol_1) + assert.Nil(t, sts1.Spec.Template.Spec.Affinity) + + otelcol_2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Affinity: testAffinityValue, + }, + } + + cfg = config.New() + + sts2 := StatefulSet(cfg, logger, otelcol_2) + assert.NotNil(t, sts2.Spec.Template.Spec.Affinity) + assert.Equal(t, *testAffinityValue, *sts2.Spec.Template.Spec.Affinity) +} From c59c88211b08a19d31c41920f6d82c5b29cb1352 Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Wed, 26 Oct 2022 11:52:20 +0200 Subject: [PATCH 0638/1234] Fix panic if maxreplicas is set but autoscale is not defined in the CR (#1201) * Fix panic if maxreplicas is set but autosclae is not defined in the PR Signed-off-by: Kevin Earls * Add a unit test Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- .../opentelemetrycollector_webhook.go | 5 +++- .../opentelemetrycollector_webhook_test.go | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 793e9ed70..fd4c5bd6a 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -68,8 +68,11 @@ func (r *OpenTelemetryCollector) Default() { } // Set default targetCPUUtilization for autoscaler - if r.Spec.MaxReplicas != nil && r.Spec.Autoscaler.TargetCPUUtilization == nil { + if r.Spec.MaxReplicas != nil && (r.Spec.Autoscaler == nil || r.Spec.Autoscaler.TargetCPUUtilization == nil) { defaultCPUTarget := int32(90) + if r.Spec.Autoscaler == nil { + r.Spec.Autoscaler = &AutoscalerSpec{} + } r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget } } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index edb8b5686..0ebc65690 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -27,6 +27,8 @@ import ( func TestOTELColDefaultingWebhook(t *testing.T) { one := int32(1) five := int32(5) + defaultCPUTarget := int32(90) + tests := []struct { name string otelcol OpenTelemetryCollector @@ -70,6 +72,30 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, + { + name: "MaxReplicas but no Autoscale", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &five, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + Autoscaler: &AutoscalerSpec{ + TargetCPUUtilization: &defaultCPUTarget, + }, + MaxReplicas: &five, + }, + }, + }, } for _, test := range tests { From 208e74783941dc14217c696c4e538a02c643a70e Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Oct 2022 12:43:17 +0200 Subject: [PATCH 0639/1234] Avoid OOM of the operator (#1194) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- .../opentelemetry-operator.clusterserviceversion.yaml | 3 --- config/manager/manager.yaml | 3 --- 2 files changed, 6 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index a6adcc52a..296b50a99 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -313,9 +313,6 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 resources: - limits: - cpu: 200m - memory: 256Mi requests: cpu: 100m memory: 64Mi diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 52c3cd62e..e8a8e5e37 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -44,9 +44,6 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 resources: - limits: - cpu: 200m - memory: 256Mi requests: cpu: 100m memory: 64Mi From 9d428b50f71577dc20325fcc4af1dcf8732640c7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Oct 2022 12:43:39 +0200 Subject: [PATCH 0640/1234] Make logging easier to configure (#1193) * Make logging easier to configure Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 ++ config/default/manager_auth_proxy_patch.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 296b50a99..1b7326394 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -294,6 +294,8 @@ spec: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election + - --zap-log-level=info + - --zap-time-encoding=rfc3339nano image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.61.0 livenessProbe: httpGet: diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index f0f06c1ff..f44f9c71e 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -31,3 +31,5 @@ spec: args: - "--metrics-addr=127.0.0.1:8080" - "--enable-leader-election" + - "--zap-log-level=info" + - "--zap-time-encoding=rfc3339nano" From 092acafdba78b59ce88e32fe1878f5c38053b5c1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Oct 2022 12:43:53 +0200 Subject: [PATCH 0641/1234] Bump cert-manager to 1.10 (#1192) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1f90583a0..7ae5d2134 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml OPERATOR_SDK_VERSION ?= 1.23.0 -CERTMANAGER_VERSION ?= 1.8.0 +CERTMANAGER_VERSION ?= 1.10.0 ifndef ignore-not-found ignore-not-found = false From 54f331b4f47affda465da4872d60d76971f5f580 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 26 Oct 2022 13:04:00 +0200 Subject: [PATCH 0642/1234] Minimize dependabot PRs for GHA deps (#1185) * Minimize dependabot PRs for GHA deps Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- .../workflows/publish-autoinstrumentation-dotnet.yaml | 10 +++++----- .../workflows/publish-autoinstrumentation-java.yaml | 10 +++++----- .../workflows/publish-autoinstrumentation-nodejs.yaml | 10 +++++----- .../workflows/publish-autoinstrumentation-python.yaml | 10 +++++----- .github/workflows/publish-images.yaml | 10 +++++----- .github/workflows/publish-target-allocator.yaml | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 6d56f375c..8b3634657 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -25,17 +25,17 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -46,14 +46,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index a9fcc4ba0..c95439f90 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -25,17 +25,17 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -46,14 +46,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 89b1cc7cb..4fa837a2c 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -25,17 +25,17 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -46,14 +46,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 9d134c954..2f28a8041 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -25,17 +25,17 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -46,14 +46,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 35b4255c3..cf625ec9b 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | @@ -43,10 +43,10 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -57,14 +57,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index cc6e4a148..36f5c3833 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -23,17 +23,17 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4.1.1 + uses: docker/metadata-action@v4 with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2.1.0 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.2.0 + uses: docker/setup-buildx-action@v2 - name: Cache Docker layers uses: actions/cache@v3 @@ -44,14 +44,14 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2.1.0 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3.2.0 + uses: docker/build-push-action@v3 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From a65ec2235e638e07955c5b7be107594685fee53f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Fri, 28 Oct 2022 16:59:09 +0200 Subject: [PATCH 0643/1234] Bump OTel .NET AutoInstrumentation to 0.4.0-beta.1 (#1209) --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index efa59c1d8..616da2f44 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.3.1-beta.1 +0.4.0-beta.1 From 750166d77a81139369ed24dca86df2881b125106 Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 1 Nov 2022 18:42:13 +0100 Subject: [PATCH 0644/1234] Prepare release 0.63.1 (#1215) * bump operator and dependency versions Signed-off-by: Benedikt Bongartz * regenerate Signed-off-by: Benedikt Bongartz * prepare changelog for release v0.63.1 Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- CHANGELOG.md | 34 +++++++++++++++++-- README.md | 4 +-- ...emetry-operator.clusterserviceversion.yaml | 6 ++-- versions.txt | 8 ++--- 4 files changed, 40 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 315101cdd..f53e18c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ Changes by Version ================== +0.63.1 +------------------ +### 🚀 New components 🚀 +* Adds support of affinity in collector spec ([#1204](https://github.com/open-telemetry/opentelemetry-operator/pull/1204), [@avadhut123pisal](https://github.com/avadhut123pisal)) + +### 💡 Enhancements 💡 + +* Make logging easier to configure ([#1193](https://github.com/open-telemetry/opentelemetry-operator/pull/1193), [@pavolloffay](https://github.com/pavolloffay)) +* Using immutable labels as service selectors ([#1152](https://github.com/open-telemetry/opentelemetry-operator/pull/1152), [@angelokurtis](https://github.com/angelokurtis)) +* Avoid OOM of the operator ([#1194](https://github.com/open-telemetry/opentelemetry-operator/pull/1194), [@pavolloffay](https://github.com/pavolloffay)) +* Update the javaagent version to 1.19.1 ([#1188](https://github.com/open-telemetry/opentelemetry-operator/pull/1188), [@opentelemetrybot](https://github.com/opentelemetrybot)) +* Bump OTel .NET AutoInstrumentation to 0.4.0-beta.1 ([#1209](https://github.com/open-telemetry/opentelemetry-operator/pull/1209), [@pellared](https://github.com/pellared)) +* Skip .NET auto-instrumentation if OTEL_DOTNET_AUTO_HOME env var is already set ([#1177](https://github.com/open-telemetry/opentelemetry-operator/pull/1177), [@avadhut123pisal](https://github.com/avadhut123pisal)) + +### 🧰 Bug fixes 🧰 +* Fix panic if maxreplicas is set but autoscale is not defined in the CR ([#1201](https://github.com/open-telemetry/opentelemetry-operator/pull/1201), [@kevinearls](https://github.com/kevinearls)) + +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.1) +* [OpenTelemetry Contrib - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.1) +* [OpenTelemetry Collector - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.0) +* [OpenTelemetry Contrib - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.0) +* [OpenTelemetry Collector - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.1) +* [OpenTelemetry Contrib - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.62.1) +* [OpenTelemetry Collector - v0.62.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.0) +* [OpenTelemetry Contrib - v0.62.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.62.0) + + 0.61.0 ------------------- #### :x: Breaking Changes :x: @@ -437,18 +465,18 @@ _Note: The default port for the OTLP receiver has been changed from 55680 to 431 0.15.0 (2020-11-27) ------------------- -* Bumped OpenTelemetry Collector to v0.15.0 ([#131](https://github.com/open-telemetry/opentelemetry-operator/pull/131), [@jpkrohling](https://github.com/jpkrohling)) +* Bumped OpenTelemetry Collector to v0.15.0 ([#131](https://github.com/open-telemetry/opentelemetry-operator/pull/131), [@jpkrohling](https://github.com/jpkrohling)) 0.14.0 (2020-11-09) ------------------- -* Bumped OpenTelemetry Collector to v0.14.0 ([#112](https://github.com/open-telemetry/opentelemetry-operator/pull/112), [@jpkrohling](https://github.com/jpkrohling)) +* Bumped OpenTelemetry Collector to v0.14.0 ([#112](https://github.com/open-telemetry/opentelemetry-operator/pull/112), [@jpkrohling](https://github.com/jpkrohling)) _Note: The `tailsampling` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.14.0, which includes this processor), or remove the processor._ 0.13.0 (2020-10-22) ------------------- -* Bumped OpenTelemetry Collector to v0.13.0 ([#101](https://github.com/open-telemetry/opentelemetry-operator/pull/101), [@dengliming](https://github.com/dengliming)) +* Bumped OpenTelemetry Collector to v0.13.0 ([#101](https://github.com/open-telemetry/opentelemetry-operator/pull/101), [@dengliming](https://github.com/dengliming)) * Allow for spec.Env to be set on the OTEL Collector Spec ([#94](https://github.com/open-telemetry/opentelemetry-operator/pull/94), [@ekarlso](https://github.com/ekarlso)) _Note: The `groupbytrace` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.13.1, which includes this processor), or remove the processor._ diff --git a/README.md b/README.md index 5c65cfd50..331e0dd5d 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.63.1 | v1.19 to v1.25 | v1 | | v0.61.0 | v1.19 to v1.25 | v1 | | v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | @@ -347,7 +348,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.44.0 | v1.21 to v1.23 | v1alpha2 | | v0.43.0 | v1.21 to v1.23 | v1alpha2 | | v0.42.0 | v1.21 to v1.23 | v1alpha2 | -| v0.41.1 | v1.21 to v1.23 | v1alpha2 | ## Contributing and Developing @@ -386,7 +386,7 @@ Thanks to all the people who already contributed! [![Contributors][contributors-img]][contributors] ## License - + [Apache 2.0 License](./LICENSE). [github-workflow]: https://github.com/open-telemetry/opentelemetry-operator/actions diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1b7326394..c529a995b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.61.0 + name: opentelemetry-operator.v0.63.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -296,7 +296,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.61.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.63.1 livenessProbe: httpGet: path: /healthz @@ -403,7 +403,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.61.0 + version: 0.63.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 1f281296b..cbc83c6f6 100644 --- a/versions.txt +++ b/versions.txt @@ -2,17 +2,17 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.61.0 +opentelemetry-collector=0.63.1 # Represents the current release of the OpenTelemetry Operator. -operator=0.61.0 +operator=0.63.1 # Represents the current release of the Target Allocator. targetallocator=0.60.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.11.1 +autoinstrumentation-java=1.19.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json @@ -24,4 +24,4 @@ autoinstrumentation-python=0.34b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.3.1-beta.1 +autoinstrumentation-dotnet=0.4.0-beta.1 From 556deec0d3a6b6826b507d587292cfb37884f1bf Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Wed, 2 Nov 2022 03:34:48 -0400 Subject: [PATCH 0645/1234] Create target package (#1214) --- .../allocation/consistent_hashing.go | 29 +++++------ cmd/otel-allocator/allocation/http.go | 14 +++--- cmd/otel-allocator/allocation/http_test.go | 28 ++++++----- .../allocation/least_weighted.go | 25 ++++------ .../allocation/least_weighted_test.go | 14 +++--- cmd/otel-allocator/allocation/strategy.go | 30 ++---------- cmd/otel-allocator/discovery/discovery.go | 8 +-- .../discovery/discovery_test.go | 4 +- cmd/otel-allocator/main.go | 7 +-- cmd/otel-allocator/target/target.go | 49 +++++++++++++++++++ 10 files changed, 112 insertions(+), 96 deletions(-) create mode 100644 cmd/otel-allocator/target/target.go diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index 41f31a4e9..f55499f79 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -15,8 +15,6 @@ package allocation import ( - "fmt" - "net/url" "sync" "github.com/buraksezer/consistent" @@ -25,6 +23,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) var _ Allocator = &consistentHashingAllocator{} @@ -47,7 +46,7 @@ type consistentHashingAllocator struct { collectors map[string]*Collector // targetItems is a map from a target item's hash to the target items allocated state - targetItems map[string]*TargetItem + targetItems map[string]*target.Item log logr.Logger } @@ -63,7 +62,7 @@ func newConsistentHashingAllocator(log logr.Logger) Allocator { return &consistentHashingAllocator{ consistentHasher: consistentHasher, collectors: make(map[string]*Collector), - targetItems: make(map[string]*TargetItem), + targetItems: make(map[string]*target.Item), log: log, } } @@ -72,20 +71,14 @@ func newConsistentHashingAllocator(log logr.Logger) Allocator { // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. // This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. // INVARIANT: c.collectors must have at least 1 collector set. -func (c *consistentHashingAllocator) addTargetToTargetItems(target *TargetItem) { +func (c *consistentHashingAllocator) addTargetToTargetItems(tg *target.Item) { // Check if this is a reassignment, if so, decrement the previous collector's NumTargets - if previousColName, ok := c.collectors[target.CollectorName]; ok { + if previousColName, ok := c.collectors[tg.CollectorName]; ok { previousColName.NumTargets-- TargetsPerCollector.WithLabelValues(previousColName.String(), consistentHashingStrategyName).Set(float64(c.collectors[previousColName.String()].NumTargets)) } - colOwner := c.consistentHasher.LocateKey([]byte(target.Hash())) - targetItem := &TargetItem{ - JobName: target.JobName, - Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, - TargetURL: target.TargetURL, - Label: target.Label, - CollectorName: colOwner.String(), - } + colOwner := c.consistentHasher.LocateKey([]byte(tg.Hash())) + targetItem := target.NewItem(tg.JobName, tg.TargetURL, tg.Label, colOwner.String()) c.targetItems[targetItem.Hash()] = targetItem c.collectors[colOwner.String()].NumTargets++ TargetsPerCollector.WithLabelValues(colOwner.String(), consistentHashingStrategyName).Set(float64(c.collectors[colOwner.String()].NumTargets)) @@ -94,7 +87,7 @@ func (c *consistentHashingAllocator) addTargetToTargetItems(target *TargetItem) // handleTargets receives the new and removed targets and reconciles the current state. // Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. // Any net-new additions are assigned to the next available collector. -func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*TargetItem]) { +func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*target.Item]) { // Check for removals for k, target := range c.targetItems { // if the current target is in the removals list @@ -143,7 +136,7 @@ func (c *consistentHashingAllocator) handleCollectors(diff diff.Changes[*Collect // SetTargets accepts a list of targets that will be used to make // load balancing decisions. This method should be called when there are // new targets discovered or existing targets are shutdown. -func (c *consistentHashingAllocator) SetTargets(targets map[string]*TargetItem) { +func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) { timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", consistentHashingStrategyName)) defer timer.ObserveDuration() @@ -186,10 +179,10 @@ func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collec } // TargetItems returns a shallow copy of the targetItems map. -func (c *consistentHashingAllocator) TargetItems() map[string]*TargetItem { +func (c *consistentHashingAllocator) TargetItems() map[string]*target.Item { c.m.RLock() defer c.m.RUnlock() - targetItemsCopy := make(map[string]*TargetItem) + targetItemsCopy := make(map[string]*target.Item) for k, v := range c.targetItems { targetItemsCopy[k] = v } diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index ee60f3160..4d373b6fd 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -19,11 +19,9 @@ import ( "net/url" "github.com/prometheus/common/model" -) -type LinkJSON struct { - Link string `json:"_link"` -} + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) type collectorJSON struct { Link string `json:"_link"` @@ -35,11 +33,11 @@ type targetGroupJSON struct { Labels model.LabelSet `json:"labels"` } -func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator Allocator) map[string]collectorJSON { +func GetAllTargetsByJob(job string, cMap map[string][]target.Item, allocator Allocator) map[string]collectorJSON { displayData := make(map[string]collectorJSON) for _, j := range allocator.TargetItems() { if j.JobName == job { - var targetList []TargetItem + var targetList []target.Item targetList = append(targetList, cMap[j.CollectorName+j.JobName]...) var targetGroupList []targetGroupJSON @@ -58,9 +56,9 @@ func GetAllTargetsByJob(job string, cMap map[string][]TargetItem, allocator Allo return displayData } -func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]TargetItem, allocator Allocator) []targetGroupJSON { +func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]target.Item, allocator Allocator) []targetGroupJSON { var tgs []targetGroupJSON - group := make(map[string]TargetItem) + group := make(map[string]target.Item) labelSet := make(map[string]model.LabelSet) if _, ok := allocator.Collectors()[collector]; ok { for _, targetItemArr := range cMap { diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index e4e7fb7b6..c3d6967d1 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -20,6 +20,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) func TestGetAllTargetsByCollectorAndJob(t *testing.T) { @@ -30,7 +32,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { type args struct { collector string job string - cMap map[string][]TargetItem + cMap map[string][]target.Item allocator Allocator } var tests = []struct { @@ -43,7 +45,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { args: args{ collector: "test-collector", job: "test-job", - cMap: map[string][]TargetItem{}, + cMap: map[string][]target.Item{}, allocator: baseAllocator, }, want: nil, @@ -53,9 +55,9 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { args: args{ collector: "test-collector", job: "test-job", - cMap: map[string][]TargetItem{ + cMap: map[string][]target.Item{ "test-collectortest-job": { - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", @@ -81,9 +83,9 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { args: args{ collector: "test-collector", job: "test-job", - cMap: map[string][]TargetItem{ + cMap: map[string][]target.Item{ "test-collectortest-job": { - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", @@ -93,7 +95,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { }, }, "test-collectortest-job2": { - TargetItem{ + target.Item{ JobName: "test-job2", Label: model.LabelSet{ "test-label": "test-value", @@ -119,9 +121,9 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { args: args{ collector: "test-collector", job: "test-job", - cMap: map[string][]TargetItem{ + cMap: map[string][]target.Item{ "test-collectortest-job": { - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", @@ -132,7 +134,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { }, }, "test-collectortest-job2": { - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", @@ -165,9 +167,9 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { args: args{ collector: "test-collector", job: "test-job", - cMap: map[string][]TargetItem{ + cMap: map[string][]target.Item{ "test-collectortest-job": { - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", @@ -176,7 +178,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { TargetURL: "test-url", CollectorName: "test-collector", }, - TargetItem{ + target.Item{ JobName: "test-job", Label: model.LabelSet{ "test-label": "test-value", diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index bed1dbd51..033c7bf52 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -15,11 +15,10 @@ package allocation import ( - "fmt" - "net/url" "sync" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" @@ -46,16 +45,16 @@ type leastWeightedAllocator struct { // collectors is a map from a Collector's name to a Collector instance collectors map[string]*Collector // targetItems is a map from a target item's hash to the target items allocated state - targetItems map[string]*TargetItem + targetItems map[string]*target.Item log logr.Logger } // TargetItems returns a shallow copy of the targetItems map. -func (allocator *leastWeightedAllocator) TargetItems() map[string]*TargetItem { +func (allocator *leastWeightedAllocator) TargetItems() map[string]*target.Item { allocator.m.RLock() defer allocator.m.RUnlock() - targetItemsCopy := make(map[string]*TargetItem) + targetItemsCopy := make(map[string]*target.Item) for k, v := range allocator.targetItems { targetItemsCopy[k] = v } @@ -94,15 +93,9 @@ func (allocator *leastWeightedAllocator) findNextCollector() *Collector { // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. // This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. // INVARIANT: allocator.collectors must have at least 1 collector set. -func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetItem) { +func (allocator *leastWeightedAllocator) addTargetToTargetItems(tg *target.Item) { chosenCollector := allocator.findNextCollector() - targetItem := &TargetItem{ - JobName: target.JobName, - Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(target.JobName))}, - TargetURL: target.TargetURL, - Label: target.Label, - CollectorName: chosenCollector.Name, - } + targetItem := target.NewItem(tg.JobName, tg.TargetURL, tg.Label, chosenCollector.Name) allocator.targetItems[targetItem.Hash()] = targetItem chosenCollector.NumTargets++ TargetsPerCollector.WithLabelValues(chosenCollector.Name, leastWeightedStrategyName).Set(float64(chosenCollector.NumTargets)) @@ -111,7 +104,7 @@ func (allocator *leastWeightedAllocator) addTargetToTargetItems(target *TargetIt // handleTargets receives the new and removed targets and reconciles the current state. // Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. // Any net-new additions are assigned to the next available collector. -func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*TargetItem]) { +func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*target.Item]) { // Check for removals for k, target := range allocator.targetItems { // if the current target is in the removals list @@ -160,7 +153,7 @@ func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Col // SetTargets accepts a list of targets that will be used to make // load balancing decisions. This method should be called when there are // new targets discovered or existing targets are shutdown. -func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*TargetItem) { +func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.Item) { timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", leastWeightedStrategyName)) defer timer.ObserveDuration() @@ -206,6 +199,6 @@ func newLeastWeightedAllocator(log logr.Logger) Allocator { return &leastWeightedAllocator{ log: log, collectors: make(map[string]*Collector), - targetItems: make(map[string]*TargetItem), + targetItems: make(map[string]*target.Item), } } diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index 3b6209ddd..281254196 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -24,6 +24,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) var logger = logf.Log.WithName("unit-tests") @@ -35,8 +37,8 @@ func colIndex(index, numCols int) int { return index % numCols } -func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*TargetItem { - toReturn := map[string]*TargetItem{} +func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*target.Item { + toReturn := map[string]*target.Item{} for i := startingIndex; i < n+startingIndex; i++ { collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) label := model.LabelSet{ @@ -44,7 +46,7 @@ func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*Ta "i": model.LabelValue(strconv.Itoa(i)), "total": model.LabelValue(strconv.Itoa(n + startingIndex)), } - newTarget := NewTargetItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) + newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) toReturn[newTarget.Hash()] = newTarget } return toReturn @@ -124,10 +126,10 @@ func TestAllocationCollision(t *testing.T) { secondLabels := model.LabelSet{ "test": "test2", } - firstTarget := NewTargetItem("sample-name", "0.0.0.0:8000", firstLabels, "") - secondTarget := NewTargetItem("sample-name", "0.0.0.0:8000", secondLabels, "") + firstTarget := target.NewItem("sample-name", "0.0.0.0:8000", firstLabels, "") + secondTarget := target.NewItem("sample-name", "0.0.0.0:8000", secondLabels, "") - targetList := map[string]*TargetItem{ + targetList := map[string]*target.Item{ firstTarget.Hash(): firstTarget, secondTarget.Hash(): secondTarget, } diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go index 2808c32b5..24d3b9b4b 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/allocation/strategy.go @@ -17,13 +17,13 @@ package allocation import ( "errors" "fmt" - "net/url" "github.com/buraksezer/consistent" "github.com/go-logr/logr" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/common/model" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) type AllocatorProvider func(log logr.Logger) Allocator @@ -64,33 +64,11 @@ func Register(name string, provider AllocatorProvider) error { type Allocator interface { SetCollectors(collectors map[string]*Collector) - SetTargets(targets map[string]*TargetItem) - TargetItems() map[string]*TargetItem + SetTargets(targets map[string]*target.Item) + TargetItems() map[string]*target.Item Collectors() map[string]*Collector } -type TargetItem struct { - JobName string - Link LinkJSON - TargetURL string - Label model.LabelSet - CollectorName string -} - -func NewTargetItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *TargetItem { - return &TargetItem{ - JobName: jobName, - Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, - TargetURL: targetURL, - Label: label, - CollectorName: collectorName, - } -} - -func (t TargetItem) Hash() string { - return t.JobName + t.TargetURL + t.Label.Fingerprint().String() -} - var _ consistent.Member = Collector{} // Collector Creates a struct that holds Collector information. diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 9cdadde88..d8298096a 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -25,7 +25,7 @@ import ( "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -84,7 +84,7 @@ func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.C return m.manager.ApplyConfig(discoveryCfg) } -func (m *Manager) Watch(fn func(targets map[string]*allocation.TargetItem)) { +func (m *Manager) Watch(fn func(targets map[string]*target.Item)) { log := m.log.WithValues("component", "opentelemetry-targetallocator") go func() { @@ -94,14 +94,14 @@ func (m *Manager) Watch(fn func(targets map[string]*allocation.TargetItem)) { log.Info("Service Discovery watch event stopped: discovery manager closed") return case tsets := <-m.manager.SyncCh(): - targets := map[string]*allocation.TargetItem{} + targets := map[string]*target.Item{} for jobName, tgs := range tsets { var count float64 = 0 for _, tg := range tgs { for _, t := range tg.Targets { count++ - item := &allocation.TargetItem{ + item := &target.Item{ JobName: jobName, TargetURL: string(t[model.AddressLabel]), Label: t.Merge(tg.Labels), diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index afea78717..56fd1aa4e 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -28,8 +28,8 @@ import ( "github.com/stretchr/testify/assert" ctrl "sigs.k8s.io/controller-runtime" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -47,7 +47,7 @@ func TestMain(m *testing.M) { manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger()) results = make(chan []string) - manager.Watch(func(targets map[string]*allocation.TargetItem) { + manager.Watch(func(targets map[string]*target.Item) { var result []string for _, t := range targets { result = append(result, t.TargetURL) diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 85e1ca4c4..1dffa9d3d 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -39,6 +39,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -229,9 +230,9 @@ func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { } func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { - displayData := make(map[string]allocation.LinkJSON) + displayData := make(map[string]target.LinkJSON) for _, v := range s.allocator.TargetItems() { - displayData[v.JobName] = allocation.LinkJSON{Link: v.Link.Link} + displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} } s.jsonHandler(w, displayData) } @@ -250,7 +251,7 @@ func (s *server) PrometheusMiddleware(next http.Handler) http.Handler { func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { q := r.URL.Query()["collector_id"] - var compareMap = make(map[string][]allocation.TargetItem) // CollectorName+jobName -> TargetItem + var compareMap = make(map[string][]target.Item) // CollectorName+jobName -> TargetItem for _, v := range s.allocator.TargetItems() { compareMap[v.CollectorName+v.JobName] = append(compareMap[v.CollectorName+v.JobName], *v) } diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/target/target.go new file mode 100644 index 000000000..ab68589fe --- /dev/null +++ b/cmd/otel-allocator/target/target.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package target + +import ( + "fmt" + "net/url" + + "github.com/prometheus/common/model" +) + +// This package contains common structs and methods that relate to scrape targets. +type LinkJSON struct { + Link string `json:"_link"` +} + +type Item struct { + JobName string + Link LinkJSON + TargetURL string + Label model.LabelSet + CollectorName string +} + +func (t Item) Hash() string { + return t.JobName + t.TargetURL + t.Label.Fingerprint().String() +} + +func NewItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *Item { + return &Item{ + JobName: jobName, + Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, + TargetURL: targetURL, + Label: label, + CollectorName: collectorName, + } +} From ca5cd5a88ed3260331684387a9b484262cf9cfa6 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Wed, 2 Nov 2022 01:59:58 -0700 Subject: [PATCH 0646/1234] Update the javaagent version to 1.19.2 (#1216) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 66e2ae6c2..836ae4eda 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.19.1 +1.19.2 From 854eb67ffc535c3bc711bb06e06e662e4910244d Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Fri, 4 Nov 2022 08:04:09 -0400 Subject: [PATCH 0647/1234] [target-allocator] Add a pre-hook to the allocator to filter out dropped targets (#1127) * Adding prehook allocator filter to reduce assigned targets * add metrics to track number of targets kept after filtering * add smaller interfaces local to packages using them * address review feedback * remove outdated references --- apis/v1alpha1/opentelemetrycollector_types.go | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 6 + .../allocation/consistent_hashing.go | 21 +- .../allocation/least_weighted.go | 22 +- cmd/otel-allocator/allocation/strategy.go | 37 +++- cmd/otel-allocator/config/config.go | 8 + cmd/otel-allocator/discovery/discovery.go | 15 +- .../discovery/discovery_test.go | 2 +- cmd/otel-allocator/main.go | 11 +- cmd/otel-allocator/prehook/prehook.go | 57 +++++ cmd/otel-allocator/prehook/relabel.go | 101 +++++++++ cmd/otel-allocator/prehook/relabel_test.go | 203 ++++++++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 6 + docs/api.md | 7 + pkg/collector/reconcile/configmap.go | 5 + 15 files changed, 495 insertions(+), 11 deletions(-) create mode 100644 cmd/otel-allocator/prehook/prehook.go create mode 100644 cmd/otel-allocator/prehook/relabel.go create mode 100644 cmd/otel-allocator/prehook/relabel_test.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 99b74dddd..d16abab40 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -159,6 +159,11 @@ type OpenTelemetryTargetAllocator struct { // The current options are least-weighted and consistent-hashing. The default option is least-weighted // +optional AllocationStrategy string `json:"allocationStrategy,omitempty"` + // FilterStrategy determines how to filter targets before allocating them among the collectors. + // The only current option is relabel-config (drops targets based on prom relabel_config). + // Filtering is disabled by default. + // +optional + FilterStrategy string `json:"filterStrategy,omitempty"` // ServiceAccount indicates the name of an existing service account to use with this instance. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 13eab8959..fcdfed60d 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1701,6 +1701,12 @@ spec: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. type: boolean + filterStrategy: + description: FilterStrategy determines how to filter targets before + allocating them among the collectors. The only current option + is relabel-config (drops targets based on prom relabel_config). + Filtering is disabled by default. + type: string image: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index f55499f79..bccd8100b 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -49,9 +49,11 @@ type consistentHashingAllocator struct { targetItems map[string]*target.Item log logr.Logger + + filter Filter } -func newConsistentHashingAllocator(log logr.Logger) Allocator { +func newConsistentHashingAllocator(log logr.Logger, opts ...AllocationOption) Allocator { config := consistent.Config{ PartitionCount: 1061, ReplicationFactor: 5, @@ -59,12 +61,22 @@ func newConsistentHashingAllocator(log logr.Logger) Allocator { Hasher: hasher{}, } consistentHasher := consistent.New(nil, config) - return &consistentHashingAllocator{ + chAllocator := &consistentHashingAllocator{ consistentHasher: consistentHasher, collectors: make(map[string]*Collector), targetItems: make(map[string]*target.Item), log: log, } + for _, opt := range opts { + opt(chAllocator) + } + + return chAllocator +} + +// SetFilter sets the filtering hook to use. +func (c *consistentHashingAllocator) SetFilter(filter Filter) { + c.filter = filter } // addTargetToTargetItems assigns a target to the collector based on its hash and adds it to the allocator's targetItems @@ -140,6 +152,11 @@ func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", consistentHashingStrategyName)) defer timer.ObserveDuration() + if c.filter != nil { + targets = c.filter.Apply(targets) + } + RecordTargetsKeptPerJob(targets) + c.m.Lock() defer c.m.Unlock() diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 033c7bf52..717c147d9 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -48,6 +48,13 @@ type leastWeightedAllocator struct { targetItems map[string]*target.Item log logr.Logger + + filter Filter +} + +// SetFilter sets the filtering hook to use. +func (allocator *leastWeightedAllocator) SetFilter(filter Filter) { + allocator.filter = filter } // TargetItems returns a shallow copy of the targetItems map. @@ -157,6 +164,11 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.I timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", leastWeightedStrategyName)) defer timer.ObserveDuration() + if allocator.filter != nil { + targets = allocator.filter.Apply(targets) + } + RecordTargetsKeptPerJob(targets) + allocator.m.Lock() defer allocator.m.Unlock() @@ -195,10 +207,16 @@ func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Co } } -func newLeastWeightedAllocator(log logr.Logger) Allocator { - return &leastWeightedAllocator{ +func newLeastWeightedAllocator(log logr.Logger, opts ...AllocationOption) Allocator { + lwAllocator := &leastWeightedAllocator{ log: log, collectors: make(map[string]*Collector), targetItems: make(map[string]*target.Item), } + + for _, opt := range opts { + opt(lwAllocator) + } + + return lwAllocator } diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go index 24d3b9b4b..14bcca3e5 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/allocation/strategy.go @@ -26,7 +26,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) -type AllocatorProvider func(log logr.Logger) Allocator +type AllocatorProvider func(log logr.Logger, opts ...AllocationOption) Allocator var ( registry = map[string]AllocatorProvider{} @@ -45,11 +45,41 @@ var ( Name: "opentelemetry_allocator_time_to_allocate", Help: "The time it takes to allocate", }, []string{"method", "strategy"}) + targetsKeptPerJob = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_targets_kept", + Help: "Number of targets kept after filtering.", + }, []string{"job_name"}) ) -func New(name string, log logr.Logger) (Allocator, error) { +type AllocationOption func(Allocator) + +type Filter interface { + Apply(map[string]*target.Item) map[string]*target.Item +} + +func WithFilter(filter Filter) AllocationOption { + return func(allocator Allocator) { + allocator.SetFilter(filter) + } +} + +func RecordTargetsKeptPerJob(targets map[string]*target.Item) map[string]float64 { + targetsPerJob := make(map[string]float64) + + for _, tItem := range targets { + targetsPerJob[tItem.JobName] += 1 + } + + for jName, numTargets := range targetsPerJob { + targetsKeptPerJob.WithLabelValues(jName).Set(numTargets) + } + + return targetsPerJob +} + +func New(name string, log logr.Logger, opts ...AllocationOption) (Allocator, error) { if p, ok := registry[name]; ok { - return p(log), nil + return p(log, opts...), nil } return nil, fmt.Errorf("unregistered strategy: %s", name) } @@ -67,6 +97,7 @@ type Allocator interface { SetTargets(targets map[string]*target.Item) TargetItems() map[string]*target.Item Collectors() map[string]*Collector + SetFilter(filter Filter) } var _ consistent.Member = Collector{} diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 0fa8879f0..af26544f0 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -42,6 +42,7 @@ type Config struct { LabelSelector map[string]string `yaml:"label_selector,omitempty"` Config *promconfig.Config `yaml:"config"` AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` + FilterStrategy *string `yaml:"filter_strategy,omitempty"` } func (c Config) GetAllocationStrategy() string { @@ -51,6 +52,13 @@ func (c Config) GetAllocationStrategy() string { return "least-weighted" } +func (c Config) GetTargetsFilterStrategy() string { + if c.FilterStrategy != nil { + return *c.FilterStrategy + } + return "" +} + type PrometheusCRWatcherConfig struct { Enabled *bool } diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index d8298096a..a68bebc26 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -24,6 +24,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/model/relabel" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" @@ -42,9 +43,14 @@ type Manager struct { logger log.Logger close chan struct{} configsMap map[allocatorWatcher.EventSource]*config.Config + hook discoveryHook } -func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options ...func(*discovery.Manager)) *Manager { +type discoveryHook interface { + SetConfig(map[string][]*relabel.Config) +} + +func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, hook discoveryHook, options ...func(*discovery.Manager)) *Manager { manager := discovery.NewManager(ctx, logger, options...) go func() { @@ -58,6 +64,7 @@ func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, options logger: logger, close: make(chan struct{}), configsMap: make(map[allocatorWatcher.EventSource]*config.Config), + hook: hook, } } @@ -75,12 +82,18 @@ func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.C m.configsMap[source] = cfg discoveryCfg := make(map[string]discovery.Configs) + relabelCfg := make(map[string][]*relabel.Config) for _, value := range m.configsMap { for _, scrapeConfig := range value.ScrapeConfigs { discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs + relabelCfg[scrapeConfig.JobName] = scrapeConfig.RelabelConfigs } } + + if m.hook != nil { + m.hook.SetConfig(relabelCfg) + } return m.manager.ApplyConfig(discoveryCfg) } diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 56fd1aa4e..0f341849a 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -44,7 +44,7 @@ func TestMain(m *testing.M) { fmt.Printf("failed to load config file: %v", err) os.Exit(1) } - manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger()) + manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger(), nil) results = make(chan []string) manager.Watch(func(targets map[string]*target.Item) { diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 1dffa9d3d..9dd52a105 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -39,6 +39,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -72,11 +73,16 @@ func main() { log := ctrl.Log.WithName("allocator") - allocator, err := allocation.New(cfg.GetAllocationStrategy(), log) + // allocatorPrehook will be nil if filterStrategy is not set or + // unrecognized. No filtering will be used in this case. + allocatorPrehook := prehook.New(cfg.GetTargetsFilterStrategy(), log) + + allocator, err := allocation.New(cfg.GetAllocationStrategy(), log, allocation.WithFilter(allocatorPrehook)) if err != nil { setupLog.Error(err, "Unable to initialize allocation strategy") os.Exit(1) } + watcher, err := allocatorWatcher.NewWatcher(setupLog, cliConf, allocator) if err != nil { setupLog.Error(err, "Can't start the watchers") @@ -90,8 +96,9 @@ func main() { }() // creates a new discovery manager - discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger()) + discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger(), allocatorPrehook) defer discoveryManager.Close() + discoveryManager.Watch(allocator.SetTargets) k8sclient, err := configureFileDiscovery(log, allocator, discoveryManager, context.Background(), cliConf) diff --git a/cmd/otel-allocator/prehook/prehook.go b/cmd/otel-allocator/prehook/prehook.go new file mode 100644 index 000000000..ebe41c097 --- /dev/null +++ b/cmd/otel-allocator/prehook/prehook.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prehook + +import ( + "errors" + + "github.com/go-logr/logr" + "github.com/prometheus/prometheus/model/relabel" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +const ( + relabelConfigTargetFilterName = "relabel-config" +) + +type Hook interface { + Apply(map[string]*target.Item) map[string]*target.Item + SetConfig(map[string][]*relabel.Config) + GetConfig() map[string][]*relabel.Config +} + +type HookProvider func(log logr.Logger) Hook + +var ( + registry = map[string]HookProvider{} +) + +func New(name string, log logr.Logger) Hook { + if p, ok := registry[name]; ok { + return p(log.WithName("Prehook").WithName(name)) + } + + log.Info("Unrecognized filter strategy; filtering disabled") + return nil +} + +func Register(name string, provider HookProvider) error { + if _, ok := registry[name]; ok { + return errors.New("already registered") + } + registry[name] = provider + return nil +} diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go new file mode 100644 index 000000000..54059773c --- /dev/null +++ b/cmd/otel-allocator/prehook/relabel.go @@ -0,0 +1,101 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prehook + +import ( + "github.com/go-logr/logr" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/model/relabel" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +type RelabelConfigTargetFilter struct { + log logr.Logger + relabelCfg map[string][]*relabel.Config +} + +func NewRelabelConfigTargetFilter(log logr.Logger) Hook { + return &RelabelConfigTargetFilter{ + log: log, + relabelCfg: make(map[string][]*relabel.Config), + } +} + +// helper function converts from model.LabelSet to []labels.Label. +func convertLabelToPromLabelSet(lbls model.LabelSet) []labels.Label { + newLabels := make([]labels.Label, len(lbls)) + index := 0 + for k, v := range lbls { + newLabels[index].Name = string(k) + newLabels[index].Value = string(v) + index++ + } + return newLabels +} + +func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[string]*target.Item { + numTargets := len(targets) + + // need to wait until relabelCfg is set + if len(tf.relabelCfg) == 0 { + return targets + } + + // Note: jobNameKey != tItem.JobName (jobNameKey is hashed) + for jobNameKey, tItem := range targets { + keepTarget := true + lset := convertLabelToPromLabelSet(tItem.Label) + for _, cfg := range tf.relabelCfg[tItem.JobName] { + if new_lset := relabel.Process(lset, cfg); new_lset == nil { + keepTarget = false + break // inner loop + } else { + lset = new_lset + } + } + + if !keepTarget { + delete(targets, jobNameKey) + } + } + + tf.log.V(2).Info("Filtering complete", "seen", numTargets, "kept", len(targets)) + return targets +} + +func (tf *RelabelConfigTargetFilter) SetConfig(cfgs map[string][]*relabel.Config) { + relabelCfgCopy := make(map[string][]*relabel.Config) + for key, val := range cfgs { + relabelCfgCopy[key] = val + } + tf.relabelCfg = relabelCfgCopy +} + +func (tf *RelabelConfigTargetFilter) GetConfig() map[string][]*relabel.Config { + relabelCfgCopy := make(map[string][]*relabel.Config) + for k, v := range tf.relabelCfg { + relabelCfgCopy[k] = v + } + return relabelCfgCopy +} + +func init() { + err := Register(relabelConfigTargetFilterName, NewRelabelConfigTargetFilter) + if err != nil { + panic(err) + } +} diff --git a/cmd/otel-allocator/prehook/relabel_test.go b/cmd/otel-allocator/prehook/relabel_test.go new file mode 100644 index 000000000..151188242 --- /dev/null +++ b/cmd/otel-allocator/prehook/relabel_test.go @@ -0,0 +1,203 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package prehook + +import ( + "crypto/rand" + "fmt" + "math/big" + "strconv" + "testing" + + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/relabel" + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +var ( + logger = logf.Log.WithName("unit-tests") + numTargets = 100 + + relabelConfigs = []relabelConfigObj{ + { + cfg: relabel.Config{ + Action: "replace", + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + Replacement: "$1", + }, + isDrop: false, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Action: "keep", + }, + isDrop: false, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("bad.*match"), + Action: "drop", + }, + isDrop: false, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"label_not_present"}, + Regex: relabel.MustNewRegexp("(.*)"), + Action: "keep", + }, + isDrop: false, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Action: "drop", + }, + isDrop: true, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"collector"}, + Regex: relabel.MustNewRegexp("(collector.*)"), + Action: "drop", + }, + isDrop: true, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("bad.*match"), + Action: "keep", + }, + isDrop: true, + }, + { + cfg: relabel.Config{ + SourceLabels: model.LabelNames{"collector"}, + Regex: relabel.MustNewRegexp("collectors-n"), + Action: "keep", + }, + isDrop: true, + }, + } + + DefaultDropRelabelConfig = relabel.Config{ + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Action: "drop", + } +) + +type relabelConfigObj struct { + cfg relabel.Config + isDrop bool +} + +func colIndex(index, numCols int) int { + if numCols == 0 { + return -1 + } + return index % numCols +} + +func makeNNewTargets(n int, numCollectors int, startingIndex int) (map[string]*target.Item, int, map[string]*target.Item, map[string][]*relabel.Config) { + toReturn := map[string]*target.Item{} + expectedMap := make(map[string]*target.Item) + numItemsRemaining := n + relabelConfig := make(map[string][]*relabel.Config) + for i := startingIndex; i < n+startingIndex; i++ { + collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) + label := model.LabelSet{ + "collector": model.LabelValue(collector), + "i": model.LabelValue(strconv.Itoa(i)), + "total": model.LabelValue(strconv.Itoa(n + startingIndex)), + } + jobName := fmt.Sprintf("test-job-%d", i) + newTarget := target.NewItem(jobName, "test-url", label, collector) + // add a single replace, drop, or keep action as relabel_config for targets + var index int + ind, _ := rand.Int(rand.Reader, big.NewInt(int64(len(relabelConfigs)))) + + index = int(ind.Int64()) + + relabelConfig[jobName] = []*relabel.Config{ + &relabelConfigs[index].cfg, + } + + targetKey := newTarget.Hash() + if relabelConfigs[index].isDrop { + numItemsRemaining-- + } else { + expectedMap[targetKey] = newTarget + } + toReturn[targetKey] = newTarget + } + return toReturn, numItemsRemaining, expectedMap, relabelConfig +} + +func TestApply(t *testing.T) { + allocatorPrehook := New("relabel-config", logger) + assert.NotNil(t, allocatorPrehook) + + targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(numTargets, 3, 0) + allocatorPrehook.SetConfig(relabelCfg) + remainingItems := allocatorPrehook.Apply(targets) + assert.Len(t, remainingItems, numRemaining) + assert.Equal(t, remainingItems, expectedTargetMap) + + // clear out relabelCfg to test with empty values + for key := range relabelCfg { + relabelCfg[key] = nil + } + + // cfg = createMockConfig(relabelCfg) + allocatorPrehook.SetConfig(relabelCfg) + remainingItems = allocatorPrehook.Apply(targets) + // relabelCfg is empty so targets should be unfiltered + assert.Len(t, remainingItems, len(targets)) + assert.Equal(t, remainingItems, targets) +} + +func TestApplyEmptyRelabelCfg(t *testing.T) { + + allocatorPrehook := New("relabel-config", logger) + assert.NotNil(t, allocatorPrehook) + + targets, _, _, _ := makeNNewTargets(numTargets, 3, 0) + + relabelCfg := map[string][]*relabel.Config{} + allocatorPrehook.SetConfig(relabelCfg) + remainingItems := allocatorPrehook.Apply(targets) + // relabelCfg is empty so targets should be unfiltered + assert.Len(t, remainingItems, len(targets)) + assert.Equal(t, remainingItems, targets) +} + +func TestSetConfig(t *testing.T) { + allocatorPrehook := New("relabel-config", logger) + assert.NotNil(t, allocatorPrehook) + + _, _, _, relabelCfg := makeNNewTargets(numTargets, 3, 0) + allocatorPrehook.SetConfig(relabelCfg) + assert.Equal(t, relabelCfg, allocatorPrehook.GetConfig()) +} diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 3a33c5ce2..119623238 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1699,6 +1699,12 @@ spec: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. type: boolean + filterStrategy: + description: FilterStrategy determines how to filter targets before + allocating them among the collectors. The only current option + is relabel-config (drops targets based on prom relabel_config). + Filtering is disabled by default. + type: string image: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. diff --git a/docs/api.md b/docs/api.md index b87e3645d..015c87490 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4542,6 +4542,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not.
false + + filterStrategy + string + + FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option is relabel-config (drops targets based on prom relabel_config). Filtering is disabled by default.
+ + false image string diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 4c15e4296..dce74a4f2 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -119,6 +119,11 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { } else { taConfig["allocation_strategy"] = "least-weighted" } + + if len(params.Instance.Spec.TargetAllocator.FilterStrategy) > 0 { + taConfig["filter_strategy"] = params.Instance.Spec.TargetAllocator.FilterStrategy + } + taConfigYAML, err := yaml.Marshal(taConfig) if err != nil { return corev1.ConfigMap{}, err From 9528bdd469ed0b6ffbfc63ad7b67db3a32473809 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 7 Nov 2022 14:52:56 +0200 Subject: [PATCH 0648/1234] Trim unnecessary otelcol operator verbs (#1222) Signed-off-by: birca Signed-off-by: birca --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 -- config/manager/kustomization.yaml | 2 +- config/rbac/role.yaml | 2 -- controllers/opentelemetrycollector_controller.go | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c529a995b..007b9c3b1 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -236,8 +236,6 @@ spec: resources: - opentelemetrycollectors verbs: - - create - - delete - get - list - patch diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2e6cc7976..5c5f0b84c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml \ No newline at end of file +- manager.yaml diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 565555235..7dc982d34 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -147,8 +147,6 @@ rules: resources: - opentelemetrycollectors verbs: - - create - - delete - get - list - patch diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 11483b6fb..8e986c469 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -125,7 +125,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { } } -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete From 6b9e52f85025be88f458527f0ff498165bb92605 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 14:07:01 +0100 Subject: [PATCH 0649/1234] Bump sigs.k8s.io/controller-runtime from 0.13.0 to 0.13.1 (#1221) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.13.0 to 0.13.1. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.13.0...v0.13.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 126bf6b70..fe1008cea 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( k8s.io/apimachinery v0.25.3 k8s.io/client-go v0.25.3 k8s.io/kubectl v0.25.3 - sigs.k8s.io/controller-runtime v0.13.0 + sigs.k8s.io/controller-runtime v0.13.1 ) require ( diff --git a/go.sum b/go.sum index bcfb16491..63f6bd38e 100644 --- a/go.sum +++ b/go.sum @@ -1669,8 +1669,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= -sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= +sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= From 2ea988c6094e4d4a6d3c60571da2a516f895c9bb Mon Sep 17 00:00:00 2001 From: Juha Vainikka Date: Mon, 7 Nov 2022 19:55:54 +0200 Subject: [PATCH 0650/1234] Bump OTel python versions to 1.14.0 and 0.35b0 (#1227) --- autoinstrumentation/python/requirements.txt | 82 ++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 9ae341398..13afc4e3f 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,49 +1,49 @@ -opentelemetry-distro==0.34b0 +opentelemetry-distro==0.35b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.13.0 +opentelemetry-exporter-otlp-proto-http==1.14.0 -opentelemetry-propagator-b3==1.13.0 -opentelemetry-propagator-jaeger==1.13.0 +opentelemetry-propagator-b3==1.14.0 +opentelemetry-propagator-jaeger==1.14.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.34b0 -opentelemetry-propagator-ot-trace==0.34b0 +opentelemetry-instrumentation==0.35b0 +opentelemetry-propagator-ot-trace==0.35b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.34b0 -opentelemetry-instrumentation-aiopg==0.34b0 -opentelemetry-instrumentation-asgi==0.34b0 -opentelemetry-instrumentation-asyncpg==0.34b0 -opentelemetry-instrumentation-boto==0.34b0 -opentelemetry-instrumentation-botocore==0.34b0 -opentelemetry-instrumentation-celery==0.34b0 -opentelemetry-instrumentation-dbapi==0.34b0 -opentelemetry-instrumentation-django==0.34b0 -opentelemetry-instrumentation-elasticsearch==0.34b0 -opentelemetry-instrumentation-falcon==0.34b0 -opentelemetry-instrumentation-fastapi==0.34b0 -opentelemetry-instrumentation-flask==0.34b0 -opentelemetry-instrumentation-grpc==0.34b0 -opentelemetry-instrumentation-httpx==0.34b0 -opentelemetry-instrumentation-jinja2==0.34b0 -opentelemetry-instrumentation-kafka-python==0.34b0 -opentelemetry-instrumentation-logging==0.34b0 -opentelemetry-instrumentation-mysql==0.34b0 -opentelemetry-instrumentation-pika==0.34b0 -opentelemetry-instrumentation-psycopg2==0.34b0 -opentelemetry-instrumentation-pymemcache==0.34b0 -opentelemetry-instrumentation-pymongo==0.34b0 -opentelemetry-instrumentation-pymysql==0.34b0 -opentelemetry-instrumentation-pyramid==0.34b0 -opentelemetry-instrumentation-redis==0.34b0 -opentelemetry-instrumentation-requests==0.34b0 -opentelemetry-instrumentation-sklearn==0.34b0 -opentelemetry-instrumentation-sqlalchemy==0.34b0 -opentelemetry-instrumentation-sqlite3==0.34b0 -opentelemetry-instrumentation-starlette==0.34b0 -opentelemetry-instrumentation-tornado==0.34b0 -opentelemetry-instrumentation-urllib==0.34b0 -opentelemetry-instrumentation-urllib3==0.34b0 -opentelemetry-instrumentation-wsgi==0.34b0 +opentelemetry-instrumentation-aiohttp-client==0.35b0 +opentelemetry-instrumentation-aiopg==0.35b0 +opentelemetry-instrumentation-asgi==0.35b0 +opentelemetry-instrumentation-asyncpg==0.35b0 +opentelemetry-instrumentation-boto==0.35b0 +opentelemetry-instrumentation-botocore==0.35b0 +opentelemetry-instrumentation-celery==0.35b0 +opentelemetry-instrumentation-dbapi==0.35b0 +opentelemetry-instrumentation-django==0.35b0 +opentelemetry-instrumentation-elasticsearch==0.35b0 +opentelemetry-instrumentation-falcon==0.35b0 +opentelemetry-instrumentation-fastapi==0.35b0 +opentelemetry-instrumentation-flask==0.35b0 +opentelemetry-instrumentation-grpc==0.35b0 +opentelemetry-instrumentation-httpx==0.35b0 +opentelemetry-instrumentation-jinja2==0.35b0 +opentelemetry-instrumentation-kafka-python==0.35b0 +opentelemetry-instrumentation-logging==0.35b0 +opentelemetry-instrumentation-mysql==0.35b0 +opentelemetry-instrumentation-pika==0.35b0 +opentelemetry-instrumentation-psycopg2==0.35b0 +opentelemetry-instrumentation-pymemcache==0.35b0 +opentelemetry-instrumentation-pymongo==0.35b0 +opentelemetry-instrumentation-pymysql==0.35b0 +opentelemetry-instrumentation-pyramid==0.35b0 +opentelemetry-instrumentation-redis==0.35b0 +opentelemetry-instrumentation-requests==0.35b0 +opentelemetry-instrumentation-sklearn==0.35b0 +opentelemetry-instrumentation-sqlalchemy==0.35b0 +opentelemetry-instrumentation-sqlite3==0.35b0 +opentelemetry-instrumentation-starlette==0.35b0 +opentelemetry-instrumentation-tornado==0.35b0 +opentelemetry-instrumentation-urllib==0.35b0 +opentelemetry-instrumentation-urllib3==0.35b0 +opentelemetry-instrumentation-wsgi==0.35b0 From e6e9d7e0ffbc5e72c35e1a02a6eddf3acda1ed10 Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 8 Nov 2022 18:34:08 +0100 Subject: [PATCH 0651/1234] mention v0.62.1 release in changelog and readme (#1218) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- CHANGELOG.md | 21 +++++++++++++++++---- README.md | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f53e18c2e..2199d378f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,23 @@ Changes by Version 0.63.1 ------------------ ### 🚀 New components 🚀 +* None + +### 💡 Enhancements 💡 +* None + +### 🧰 Bug fixes 🧰 +* None + +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.1) +* [OpenTelemetry Contrib - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.1) +* [OpenTelemetry Collector - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.0) +* [OpenTelemetry Contrib - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.0) + +0.62.1 +------------------ +### 🚀 New components 🚀 * Adds support of affinity in collector spec ([#1204](https://github.com/open-telemetry/opentelemetry-operator/pull/1204), [@avadhut123pisal](https://github.com/avadhut123pisal)) ### 💡 Enhancements 💡 @@ -18,10 +35,6 @@ Changes by Version * Fix panic if maxreplicas is set but autoscale is not defined in the CR ([#1201](https://github.com/open-telemetry/opentelemetry-operator/pull/1201), [@kevinearls](https://github.com/kevinearls)) #### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.1) -* [OpenTelemetry Contrib - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.1) -* [OpenTelemetry Collector - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.0) -* [OpenTelemetry Contrib - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.0) * [OpenTelemetry Collector - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.1) * [OpenTelemetry Contrib - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.62.1) * [OpenTelemetry Collector - v0.62.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.0) diff --git a/README.md b/README.md index 331e0dd5d..dfd2873e4 100644 --- a/README.md +++ b/README.md @@ -328,6 +328,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| | v0.63.1 | v1.19 to v1.25 | v1 | +| v0.62.1 | v1.19 to v1.25 | v1 | | v0.61.0 | v1.19 to v1.25 | v1 | | v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | @@ -347,7 +348,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.45.0 | v1.21 to v1.23 | v1alpha2 | | v0.44.0 | v1.21 to v1.23 | v1alpha2 | | v0.43.0 | v1.21 to v1.23 | v1alpha2 | -| v0.42.0 | v1.21 to v1.23 | v1alpha2 | ## Contributing and Developing From 82cf1bb5f1076bdcd04174b4ea95af74bf112ff6 Mon Sep 17 00:00:00 2001 From: kangsheng89 Date: Wed, 9 Nov 2022 01:34:36 +0800 Subject: [PATCH 0652/1234] Fix min tls setting for webhook server (#1225) (#1230) * fix min tls setting for webhook server (#1225) * using constant as setting * fix godot issue on comment --- main.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.go b/main.go index 70d24c869..d4aae3194 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,7 @@ package main import ( "context" + "crypto/tls" "flag" "fmt" "os" @@ -50,6 +51,10 @@ import ( // +kubebuilder:scaffold:imports ) +// We should avoid that users unknowingly use a vulnerable TLS version. +// The defaults should be a safe configuration. +const defaultMinTLSVersion = tls.VersionTLS12 + var ( scheme = k8sruntime.NewScheme() setupLog = ctrl.Log.WithName("setup") @@ -151,10 +156,16 @@ func main() { leaseDuration := time.Second * 137 renewDeadline := time.Second * 107 retryPeriod := time.Second * 26 + + optionsTlSOptsFuncs := []func(*tls.Config){ + func(config *tls.Config) { minTlsDefault(config) }, + } + mgrOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, Port: webhookPort, + TLSOpts: optionsTlSOptsFuncs, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", @@ -277,3 +288,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v } return nil } + +func minTlsDefault(cfg *tls.Config) { + cfg.MinVersion = defaultMinTLSVersion +} From 254bef36257eb3fd06ae74afb74016956fa3ec2f Mon Sep 17 00:00:00 2001 From: Ben B Date: Wed, 9 Nov 2022 11:43:17 +0100 Subject: [PATCH 0653/1234] update approver section in readme (#1235) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dfd2873e4..42d76841a 100644 --- a/README.md +++ b/README.md @@ -356,6 +356,7 @@ Please see [CONTRIBUTING.md](CONTRIBUTING.md). Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): +- [Benedikt Bongartz](https://github.com/frzifus), Red Hat - [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat Emeritus Approvers: From 9e3da3b525467a628d31ef384de13ce3fee70f29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:54:16 +0100 Subject: [PATCH 0654/1234] Bump k8s.io/kubectl from 0.25.3 to 0.25.4 (#1248) Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.25.3 to 0.25.4. - [Release notes](https://github.com/kubernetes/kubectl/releases) - [Commits](https://github.com/kubernetes/kubectl/compare/v0.25.3...v0.25.4) --- updated-dependencies: - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index fe1008cea..57ffd4056 100644 --- a/go.mod +++ b/go.mod @@ -13,10 +13,10 @@ require ( github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.3 - k8s.io/apimachinery v0.25.3 - k8s.io/client-go v0.25.3 - k8s.io/kubectl v0.25.3 + k8s.io/api v0.25.4 + k8s.io/apimachinery v0.25.4 + k8s.io/client-go v0.25.4 + k8s.io/kubectl v0.25.4 sigs.k8s.io/controller-runtime v0.13.1 ) @@ -125,7 +125,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.3 // indirect + k8s.io/component-base v0.25.4 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index 63f6bd38e..36431c939 100644 --- a/go.sum +++ b/go.sum @@ -1630,20 +1630,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= -k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= +k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= +k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= -k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= +k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= +k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= -k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= -k8s.io/component-base v0.25.3 h1:UrsxciGdrCY03ULT1h/S/gXFCOPnLhUVwSyx+hM/zq4= -k8s.io/component-base v0.25.3/go.mod h1:WYoS8L+IlTZgU7rhAl5Ctpw0WdMxDfCC5dkxcEFa/TI= +k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8= +k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= +k8s.io/component-base v0.25.4 h1:n1bjg9Yt+G1C0WnIDJmg2fo6wbEU1UGMRiQSjmj7hNQ= +k8s.io/component-base v0.25.4/go.mod h1:nnZJU8OP13PJEm6/p5V2ztgX2oyteIaAGKGMYb2L2cY= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1658,8 +1658,8 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.3 h1:HnWJziEtmsm4JaJiKT33kG0kadx68MXxUE8UEbXnN4U= -k8s.io/kubectl v0.25.3/go.mod h1:glU7PiVj/R6Ud4A9FJdTcJjyzOtCJyc0eO7Mrbh3jlI= +k8s.io/kubectl v0.25.4 h1:O3OA1z4V1ZyvxCvScjq0pxAP7ABgznr8UvnVObgI6Dc= +k8s.io/kubectl v0.25.4/go.mod h1:CKMrQ67Bn2YCP26tZStPQGq62zr9pvzEf65A0navm8k= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= From 78ccd933809b99725496c921662e52590cc8d48e Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 15 Nov 2022 17:17:34 +0100 Subject: [PATCH 0655/1234] change autoscaling version detection log verbosity (#1212) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- internal/config/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/main.go b/internal/config/main.go index 64aeaa551..e2ef98570 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -140,7 +140,7 @@ func (c *Config) AutoDetect() error { return err } c.autoscalingVersion = hpaVersion - c.logger.V(1).Info("autoscaling version detected", "autoscaling-version", c.autoscalingVersion.String()) + c.logger.V(2).Info("autoscaling version detected", "autoscaling-version", c.autoscalingVersion.String()) return nil } From 3f59235df90b85f6ff02ed8b6df2a61bffa3664d Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 18 Nov 2022 11:27:08 -0500 Subject: [PATCH 0656/1234] Add new selector for pod and service monitor (#1256) * Add new selector for pod and service monitor * Use map, add tests * Fix manifests * Fixed make * remove kustomization * Changed based on feedback * Docs * config whoops --- apis/v1alpha1/opentelemetrycollector_types.go | 10 ++ apis/v1alpha1/zz_generated.deepcopy.go | 16 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 16 ++ cmd/otel-allocator/config/config.go | 10 +- cmd/otel-allocator/config/config_test.go | 154 ++++++++++++++---- .../testdata/pod_service_selector_test.yaml | 14 ++ cmd/otel-allocator/main.go | 2 +- cmd/otel-allocator/watcher/main.go | 8 +- cmd/otel-allocator/watcher/promOperator.go | 34 +++- ...ntelemetry.io_opentelemetrycollectors.yaml | 16 ++ docs/api.md | 14 ++ pkg/collector/reconcile/configmap.go | 8 + pkg/collector/reconcile/configmap_test.go | 39 +++++ 13 files changed, 294 insertions(+), 47 deletions(-) create mode 100644 cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index d16abab40..dc2f86fce 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -183,6 +183,16 @@ type OpenTelemetryTargetAllocatorPrometheusCR struct { // Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. // +optional Enabled bool `json:"enabled,omitempty"` + // PodMonitors to be selected for target discovery. + // This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a + // PodMonitor's meta labels. The requirements are ANDed. + // +optional + PodMonitorSelector map[string]string `json:"podMonitorSelector,omitempty"` + // ServiceMonitors to be selected for target discovery. + // This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a + // ServiceMonitor's meta labels. The requirements are ANDed. + // +optional + ServiceMonitorSelector map[string]string `json:"serviceMonitorSelector,omitempty"` } // ScaleSubresourceStatus defines the observed state of the OpenTelemetryCollector's diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 3b2613097..103838601 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -480,7 +480,7 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll *out = new(int32) **out = **in } - out.PrometheusCR = in.PrometheusCR + in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. @@ -496,6 +496,20 @@ func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopyInto(out *OpenTelemetryTargetAllocatorPrometheusCR) { *out = *in + if in.PodMonitorSelector != nil { + in, out := &in.PodMonitorSelector, &out.PodMonitorSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ServiceMonitorSelector != nil { + in, out := &in.ServiceMonitorSelector, &out.ServiceMonitorSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocatorPrometheusCR. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index fcdfed60d..1e95f54bd 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1722,6 +1722,22 @@ spec: description: Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. type: boolean + podMonitorSelector: + additionalProperties: + type: string + description: PodMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a PodMonitor's + meta labels. The requirements are ANDed. + type: object + serviceMonitorSelector: + additionalProperties: + type: string + description: ServiceMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a ServiceMonitor's + meta labels. The requirements are ANDed. + type: object type: object replicas: description: Replicas is the number of pod instances for the underlying diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index af26544f0..ed16eddce 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -39,10 +39,12 @@ const DefaultResyncTime = 5 * time.Minute const DefaultConfigFilePath string = "/conf/targetallocator.yaml" type Config struct { - LabelSelector map[string]string `yaml:"label_selector,omitempty"` - Config *promconfig.Config `yaml:"config"` - AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` - FilterStrategy *string `yaml:"filter_strategy,omitempty"` + LabelSelector map[string]string `yaml:"label_selector,omitempty"` + Config *promconfig.Config `yaml:"config"` + AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` + FilterStrategy *string `yaml:"filter_strategy,omitempty"` + PodMonitorSelector map[string]string `yaml:"pod_monitor_selector,omitempty"` + ServiceMonitorSelector map[string]string `yaml:"service_monitor_selector,omitempty"` } func (c Config) GetAllocationStrategy() string { diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 3c45ffefe..48ba9f39a 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -15,7 +15,12 @@ package config import ( + "fmt" "testing" + "time" + + commonconfig "github.com/prometheus/common/config" + promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery" @@ -23,39 +28,130 @@ import ( "github.com/stretchr/testify/assert" ) -const testFile = "./testdata/config_test.yaml" - -func TestConfigLoad(t *testing.T) { - expectedFileSDConfig := &file.SDConfig{ - Files: []string{"./file_sd_test.json"}, - RefreshInterval: model.Duration(300000000000), +func TestLoad(t *testing.T) { + type args struct { + file string } - expectedStaticSDConfig := discovery.StaticConfig{ + tests := []struct { + name string + args args + want Config + wantErr assert.ErrorAssertionFunc + }{ + { + name: "file sd load", + args: args{ + file: "./testdata/config_test.yaml", + }, + want: Config{ + LabelSelector: map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + Config: &promconfig.Config{ + GlobalConfig: promconfig.GlobalConfig{ + ScrapeInterval: model.Duration(60 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + EvaluationInterval: model.Duration(60 * time.Second), + }, + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "prometheus", + HonorTimestamps: true, + ScrapeInterval: model.Duration(60 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + ServiceDiscoveryConfigs: []discovery.Config{ + &file.SDConfig{ + Files: []string{"./file_sd_test.json"}, + RefreshInterval: model.Duration(5 * time.Minute), + }, + discovery.StaticConfig{ + { + Targets: []model.LabelSet{ + {model.AddressLabel: "prom.domain:9001"}, + {model.AddressLabel: "prom.domain:9002"}, + {model.AddressLabel: "prom.domain:9003"}, + }, + Labels: model.LabelSet{ + "my": "label", + }, + Source: "0", + }, + }, + }, + }, + }, + }, + }, + wantErr: assert.NoError, + }, { - Targets: []model.LabelSet{ - {model.AddressLabel: "prom.domain:9001"}, - {model.AddressLabel: "prom.domain:9002"}, - {model.AddressLabel: "prom.domain:9003"}, + name: "service monitor pod monitor selector", + args: args{ + file: "./testdata/pod_service_selector_test.yaml", }, - Labels: model.LabelSet{ - "my": "label", + want: Config{ + LabelSelector: map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + Config: &promconfig.Config{ + GlobalConfig: promconfig.GlobalConfig{ + ScrapeInterval: model.Duration(60 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + EvaluationInterval: model.Duration(60 * time.Second), + }, + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "prometheus", + HonorTimestamps: true, + ScrapeInterval: model.Duration(60 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + ServiceDiscoveryConfigs: []discovery.Config{ + discovery.StaticConfig{ + { + Targets: []model.LabelSet{ + {model.AddressLabel: "prom.domain:9001"}, + {model.AddressLabel: "prom.domain:9002"}, + {model.AddressLabel: "prom.domain:9003"}, + }, + Labels: model.LabelSet{ + "my": "label", + }, + Source: "0", + }, + }, + }, + }, + }, + }, + PodMonitorSelector: map[string]string{ + "release": "test", + }, + ServiceMonitorSelector: map[string]string{ + "release": "test", + }, }, - Source: "0", + wantErr: assert.NoError, }, } - - cfg := Config{} - err := unmarshal(&cfg, testFile) - assert.NoError(t, err) - - scrapeConfig := *cfg.Config.ScrapeConfigs[0] - actualFileSDConfig := scrapeConfig.ServiceDiscoveryConfigs[0] - actulaStaticSDConfig := scrapeConfig.ServiceDiscoveryConfigs[1] - t.Log(actulaStaticSDConfig) - - assert.Equal(t, cfg.LabelSelector["app.kubernetes.io/instance"], "default.test") - assert.Equal(t, cfg.LabelSelector["app.kubernetes.io/managed-by"], "opentelemetry-operator") - assert.Equal(t, scrapeConfig.JobName, "prometheus") - assert.Equal(t, expectedFileSDConfig, actualFileSDConfig) - assert.Equal(t, expectedStaticSDConfig, actulaStaticSDConfig) + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := Load(tt.args.file) + if !tt.wantErr(t, err, fmt.Sprintf("Load(%v)", tt.args.file)) { + return + } + assert.Equalf(t, tt.want, got, "Load(%v)", tt.args.file) + }) + } } diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml b/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml new file mode 100644 index 000000000..c0ff54ad3 --- /dev/null +++ b/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml @@ -0,0 +1,14 @@ +label_selector: + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +pod_monitor_selector: + release: test +service_monitor_selector: + release: test +config: + scrape_configs: + - job_name: prometheus + static_configs: + - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] + labels: + my: label \ No newline at end of file diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 9dd52a105..07d1373f1 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -83,7 +83,7 @@ func main() { os.Exit(1) } - watcher, err := allocatorWatcher.NewWatcher(setupLog, cliConf, allocator) + watcher, err := allocatorWatcher.NewWatcher(setupLog, cfg, cliConf, allocator) if err != nil { setupLog.Error(err, "Can't start the watchers") os.Exit(1) diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go index 8dbd71036..d983c40f7 100644 --- a/cmd/otel-allocator/watcher/main.go +++ b/cmd/otel-allocator/watcher/main.go @@ -59,21 +59,21 @@ func (e EventSource) String() string { return eventSourceToString[e] } -func NewWatcher(logger logr.Logger, config config.CLIConfig, allocator allocation.Allocator) (*Manager, error) { +func NewWatcher(logger logr.Logger, cfg config.Config, cliConfig config.CLIConfig, allocator allocation.Allocator) (*Manager, error) { watcher := Manager{ allocator: allocator, Events: make(chan Event), Errors: make(chan error), } - fileWatcher, err := newConfigMapWatcher(logger, config) + fileWatcher, err := newConfigMapWatcher(logger, cliConfig) if err != nil { return nil, err } watcher.watchers = append(watcher.watchers, &fileWatcher) - if *config.PromCRWatcherConf.Enabled { - promWatcher, err := newCRDMonitorWatcher(config) + if *cliConfig.PromCRWatcherConf.Enabled { + promWatcher, err := newCRDMonitorWatcher(cfg, cliConfig) if err != nil { return nil, err } diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 09eee6f50..2b33b633b 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -33,8 +33,8 @@ import ( "k8s.io/client-go/tools/cache" ) -func newCRDMonitorWatcher(config allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { - mClient, err := monitoringclient.NewForConfig(config.ClusterConfig) +func newCRDMonitorWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { + mClient, err := monitoringclient.NewForConfig(cliConfig.ClusterConfig) if err != nil { return nil, err } @@ -61,11 +61,17 @@ func newCRDMonitorWatcher(config allocatorconfig.CLIConfig) (*PrometheusCRWatche return nil, err } + servMonSelector := getSelector(cfg.ServiceMonitorSelector) + + podMonSelector := getSelector(cfg.PodMonitorSelector) + return &PrometheusCRWatcher{ - kubeMonitoringClient: mClient, - informers: monitoringInformers, - stopChannel: make(chan struct{}), - configGenerator: generator, + kubeMonitoringClient: mClient, + informers: monitoringInformers, + stopChannel: make(chan struct{}), + configGenerator: generator, + serviceMonitorSelector: servMonSelector, + podMonitorSelector: podMonSelector, }, nil } @@ -74,6 +80,17 @@ type PrometheusCRWatcher struct { informers map[string]*informers.ForResource stopChannel chan struct{} configGenerator *prometheus.ConfigGenerator + + serviceMonitorSelector labels.Selector + podMonitorSelector labels.Selector +} + +func getSelector(s map[string]string) labels.Selector { + sel := labels.NewSelector() + if s == nil { + return sel + } + return labels.SelectorFromSet(s) } // Start wrapped informers and wait for an initial sync. @@ -118,7 +135,8 @@ func (w *PrometheusCRWatcher) Close() error { func (w *PrometheusCRWatcher) CreatePromConfig(kubeConfigPath string) (*promconfig.Config, error) { serviceMonitorInstances := make(map[string]*monitoringv1.ServiceMonitor) - smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(labels.NewSelector(), func(sm interface{}) { + + smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(w.serviceMonitorSelector, func(sm interface{}) { monitor := sm.(*monitoringv1.ServiceMonitor) key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) serviceMonitorInstances[key] = monitor @@ -128,7 +146,7 @@ func (w *PrometheusCRWatcher) CreatePromConfig(kubeConfigPath string) (*promconf } podMonitorInstances := make(map[string]*monitoringv1.PodMonitor) - pmRetrieveErr := w.informers[monitoringv1.PodMonitorName].ListAll(labels.NewSelector(), func(pm interface{}) { + pmRetrieveErr := w.informers[monitoringv1.PodMonitorName].ListAll(w.podMonitorSelector, func(pm interface{}) { monitor := pm.(*monitoringv1.PodMonitor) key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) podMonitorInstances[key] = monitor diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 119623238..f04031ee7 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1720,6 +1720,22 @@ spec: description: Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. type: boolean + podMonitorSelector: + additionalProperties: + type: string + description: PodMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a PodMonitor's + meta labels. The requirements are ANDed. + type: object + serviceMonitorSelector: + additionalProperties: + type: string + description: ServiceMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a ServiceMonitor's + meta labels. The requirements are ANDed. + type: object type: object replicas: description: Replicas is the number of pod instances for the underlying diff --git a/docs/api.md b/docs/api.md index 015c87490..832176e98 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4606,6 +4606,20 @@ PrometheusCR defines the configuration for the retrieval of PrometheusOperator C Enabled indicates whether to use a PrometheusOperator custom resources as targets or not.
false + + podMonitorSelector + map[string]string + + PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's meta labels. The requirements are ANDed.
+ + false + + serviceMonitorSelector + map[string]string + + ServiceMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a ServiceMonitor's meta labels. The requirements are ANDed.
+ + false diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index dce74a4f2..801fa7ba6 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -124,6 +124,14 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { taConfig["filter_strategy"] = params.Instance.Spec.TargetAllocator.FilterStrategy } + if params.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { + taConfig["service_monitor_selector"] = ¶ms.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector + } + + if params.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { + taConfig["pod_monitor_selector"] = ¶ms.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector + } + taConfigYAML, err := yaml.Marshal(taConfig) if err != nil { return corev1.ConfigMap{}, err diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index bdc13d79c..22bef856a 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -209,6 +209,45 @@ label_selector: assert.Equal(t, expectedData, actual.Data) }) + t.Run("should return expected target allocator config map with label selectors", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + expectedLables["app.kubernetes.io/name"] = "test-targetallocator" + + expectedData := map[string]string{ + "targetallocator.yaml": `allocation_strategy: least-weighted +config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: + - 0.0.0.0:8888 + - 0.0.0.0:9999 +label_selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +pod_monitor_selector: + release: test +service_monitor_selector: + release: test +`, + } + p := params() + p.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector = map[string]string{ + "release": "test", + } + p.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector = map[string]string{ + "release": "test", + } + actual, err := desiredTAConfigMap(p) + assert.NoError(t, err) + + assert.Equal(t, "test-targetallocator", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) } From 2b7861c20349394e4abb041c4d14a58ccccfe57e Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Fri, 18 Nov 2022 08:27:58 -0800 Subject: [PATCH 0657/1234] add headless label (#1088) --- pkg/collector/reconcile/service.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 86a84f200..8bb8e8519 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -34,6 +34,12 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) +// headless label is to differentiate the headless service from the clusterIP service. +const ( + headlessLabel = "operator.opentelemetry.io/collector-headless-service" + headlessExists = "Exists" +) + // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // Services reconciles the service(s) required for the instance in the current context. @@ -154,6 +160,7 @@ func headless(ctx context.Context, params Params) *corev1.Service { } h.Name = naming.HeadlessService(params.Instance) + h.Labels[headlessLabel] = headlessExists // copy to avoid modifying params.Instance.Annotations annotations := map[string]string{ From 471e23489420e468043da8622b1b1dc3ff0a3ce0 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 21 Nov 2022 02:07:52 -0800 Subject: [PATCH 0658/1234] Update the javaagent version to 1.20.1 (#1266) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 836ae4eda..0044d6cb9 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.19.2 +1.20.1 From d53fb637c666212532c5a51fef27771881debcae Mon Sep 17 00:00:00 2001 From: Sebastian Poxhofer Date: Mon, 21 Nov 2022 11:39:24 +0100 Subject: [PATCH 0659/1234] feat(otel-allocator): use type for AllocationStrategy (#1220) * feat(otel-allocator): use type for AllocationStrategy * ci(otel-allocator): add operator to build context of allocator * chore(otel-allocator): fix linting * Revert "ci(otel-allocator): add operator to build context of allocator" This reverts commit 6b9a54c945dcdfd0cd4ef07c7dd6b1f5265a8342. * feat(otel-allocator): rollback dependency to operator --- apis/v1alpha1/allocation_strategy.go | 29 +++ apis/v1alpha1/opentelemetrycollector_types.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 3 + cmd/otel-allocator/go.mod | 87 ++++----- cmd/otel-allocator/go.sum | 165 ++++++++++++------ ...ntelemetry.io_opentelemetrycollectors.yaml | 3 + docs/api.md | 4 +- pkg/collector/reconcile/configmap.go | 3 +- 8 files changed, 201 insertions(+), 95 deletions(-) create mode 100644 apis/v1alpha1/allocation_strategy.go diff --git a/apis/v1alpha1/allocation_strategy.go b/apis/v1alpha1/allocation_strategy.go new file mode 100644 index 000000000..49c794517 --- /dev/null +++ b/apis/v1alpha1/allocation_strategy.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // OpenTelemetryTargetAllocatorAllocationStrategy represent which strategy to distribute target to each collector + // +kubebuilder:validation:Enum=least-weighted;consistent-hashing + OpenTelemetryTargetAllocatorAllocationStrategy string +) + +const ( + // OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted targets will be distributed to collector with fewer targets currently assigned. + OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted OpenTelemetryTargetAllocatorAllocationStrategy = "least-weighted" + + // OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup. + OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing OpenTelemetryTargetAllocatorAllocationStrategy = "consistent-hashing" +) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index dc2f86fce..4907f6517 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -158,7 +158,7 @@ type OpenTelemetryTargetAllocator struct { // AllocationStrategy determines which strategy the target allocator should use for allocation. // The current options are least-weighted and consistent-hashing. The default option is least-weighted // +optional - AllocationStrategy string `json:"allocationStrategy,omitempty"` + AllocationStrategy OpenTelemetryTargetAllocatorAllocationStrategy `json:"allocationStrategy,omitempty"` // FilterStrategy determines how to filter targets before allocating them among the collectors. // The only current option is relabel-config (drops targets based on prom relabel_config). // Filtering is disabled by default. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 1e95f54bd..87b237832 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1696,6 +1696,9 @@ spec: target allocator should use for allocation. The current options are least-weighted and consistent-hashing. The default option is least-weighted + enum: + - least-weighted + - consistent-hashing type: string enabled: description: Enabled indicates whether to use a target allocation diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 83d2ee1b6..04c9ba359 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -5,33 +5,33 @@ go 1.19 require ( github.com/buraksezer/consistent v0.9.0 github.com/cespare/xxhash/v2 v2.1.2 - github.com/fsnotify/fsnotify v1.5.1 + github.com/fsnotify/fsnotify v1.5.4 github.com/ghodss/yaml v1.0.0 github.com/go-kit/log v0.2.0 - github.com/go-logr/logr v1.2.0 + github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 github.com/prometheus-operator/prometheus-operator v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 - github.com/prometheus/client_golang v1.11.0 + github.com/prometheus/client_golang v1.12.2 github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.23.0 - k8s.io/apimachinery v0.23.0 - k8s.io/client-go v0.23.0 - k8s.io/klog/v2 v2.30.0 - sigs.k8s.io/controller-runtime v0.11.0 + k8s.io/api v0.25.3 + k8s.io/apimachinery v0.25.3 + k8s.io/client-go v0.25.3 + k8s.io/klog/v2 v2.70.1 + sigs.k8s.io/controller-runtime v0.13.0 ) require ( - cloud.google.com/go v0.97.0 // indirect + cloud.google.com/go v0.99.0 // indirect github.com/Azure/azure-sdk-for-go v59.4.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.22 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.17 // indirect + github.com/Azure/go-autorest/autorest v0.11.27 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect @@ -46,23 +46,25 @@ require ( github.com/aws/aws-sdk-go v1.44.41 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe // indirect + github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect github.com/containerd/containerd v1.5.7 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.72.0 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.11+incompatible // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/docker v20.10.14+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 // indirect - github.com/envoyproxy/go-control-plane v0.10.1 // indirect + github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/fatih/color v1.12.0 // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/fatih/color v1.13.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-logr/zapr v1.2.3 // indirect github.com/go-openapi/analysis v0.20.0 // indirect github.com/go-openapi/errors v0.20.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect @@ -77,16 +79,16 @@ require ( github.com/go-stack/stack v1.8.0 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.0.0 // indirect + github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/uuid v1.2.0 // indirect github.com/googleapis/gax-go/v2 v2.1.1 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect github.com/gophercloud/gophercloud v0.23.0 // indirect github.com/hashicorp/consul/api v1.11.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -106,15 +108,16 @@ require ( github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect github.com/linode/linodego v1.2.1 // indirect github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/miekg/dns v1.1.43 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.2 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -129,38 +132,38 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/cobra v1.2.1 // indirect + github.com/spf13/cobra v1.4.0 // indirect github.com/thanos-io/thanos v0.24.0-rc.1 // indirect github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.mongodb.org/mongo-driver v1.7.5 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.9.0 // indirect - go.uber.org/goleak v1.1.12 // indirect + go.uber.org/goleak v1.2.0 // indirect go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect + go.uber.org/zap v1.21.0 // indirect + golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect + golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.60.0 // indirect + google.golang.org/api v0.61.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 // indirect - google.golang.org/grpc v1.40.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect + google.golang.org/grpc v1.47.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.0 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect - sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.25.0 // indirect + k8s.io/component-base v0.25.3 // indirect + k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect + k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 5230d2b70..fc6c1b7e4 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -30,8 +30,9 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD cloud.google.com/go v0.92.2/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -102,8 +103,9 @@ github.com/Azure/go-autorest/autorest v0.11.11/go.mod h1:eipySxLmqSyC5s5k1CLupqe github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= +github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= +github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -114,8 +116,10 @@ github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyC github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.17 h1:esOPl2dhcz9P3jqBSJ8tPGEj2EqzPPT6zfyuloiogKY= github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= +github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/azure/auth v0.5.3/go.mod h1:4bJZhUhcq8LB20TruwHbAQsmUs2Xh+QR7utuJpLXX3A= github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4= github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= @@ -127,8 +131,9 @@ github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxB github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= @@ -347,9 +352,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe h1:QJDJubh0OEcpeGjC7/8uF9tt4e39U/Ya1uyK+itnNPQ= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -475,6 +483,7 @@ github.com/cortexproject/cortex v1.8.1-0.20210422151339-cf1c444e0905/go.mod h1:x github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab/go.mod h1:njSBkQ1wUNx9X4knV/j65Pi4ItlJXX4QwXRKoMflJd8= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -535,8 +544,9 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v17.12.0-ce-rc1.0.20200706150819-a40b877fbb9e+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -544,8 +554,9 @@ github.com/docker/docker v20.10.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05b github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.10+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= +github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -582,6 +593,8 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -590,8 +603,9 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.10.1 h1:cgDRLG7bs59Zd+apAWuzLQL95obVYAymNJek76W3mgw= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= @@ -604,11 +618,14 @@ github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -623,8 +640,9 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= @@ -662,10 +680,13 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.0.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -858,8 +879,9 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyHSnggXm/DvMMnTsQIc= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -924,6 +946,8 @@ github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSx github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -935,8 +959,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -995,7 +1020,6 @@ github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1a github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= @@ -1306,8 +1330,10 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= @@ -1383,8 +1409,9 @@ github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= @@ -1413,6 +1440,7 @@ github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISe github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= @@ -1463,6 +1491,7 @@ github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1476,7 +1505,7 @@ github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= +github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1591,8 +1620,9 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1689,6 +1719,7 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= @@ -1755,8 +1786,9 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1778,8 +1810,10 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1788,8 +1822,11 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1978,8 +2015,10 @@ go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhW go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1996,8 +2035,9 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -2043,8 +2083,10 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2168,9 +2210,11 @@ golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2207,8 +2251,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200930132711-30421366ff76/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2349,11 +2394,15 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2384,8 +2433,9 @@ golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 h1:GZokNIeuVkl3aZHJchRrr13WCsols02MLUcz1U9is6M= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2484,12 +2534,11 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= @@ -2538,8 +2587,9 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.60.0 h1:eq/zs5WPH4J9undYM9IP1O7dSr7Yh8Y0GtSCpzGzIUk= google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= +google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2631,8 +2681,11 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -2669,8 +2722,10 @@ google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2685,8 +2740,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2734,8 +2790,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= @@ -2768,10 +2825,12 @@ k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs= k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= -k8s.io/api v0.23.0 h1:WrL1gb73VSC8obi8cuYETJGXEoFNEh3LU0Pt+Sokgro= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= +k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= +k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= +k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= @@ -2790,8 +2849,9 @@ k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MA k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= -k8s.io/apimachinery v0.23.0 h1:mIfWRMjBuMdolAWJ3Fd+aPTMv3X9z+waiARMpvvb0HQ= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= +k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= +k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= @@ -2812,14 +2872,16 @@ k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= k8s.io/client-go v0.22.3/go.mod h1:ElDjYf8gvZsKDYexmsmnMQ0DYO8W9RwBjfQ1PI53yow= k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= -k8s.io/client-go v0.23.0 h1:vcsOqyPq7XV3QmQRCBH/t9BICJM9Q1M18qahjv+rebY= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= +k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= +k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.25.3 h1:UrsxciGdrCY03ULT1h/S/gXFCOPnLhUVwSyx+hM/zq4= +k8s.io/component-base v0.25.3/go.mod h1:WYoS8L+IlTZgU7rhAl5Ctpw0WdMxDfCC5dkxcEFa/TI= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2840,8 +2902,9 @@ k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.20.0/go.mod h1:Gm8eSIfQN6457haJuPaMxZw4wyP5k+ykPFlrhQDvhvw= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6/go.mod h1:RZvgC8MSN6DjiMV6oIfEE9pDL9CYXokkfaCKZeHm3nc= @@ -2853,8 +2916,9 @@ k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAG k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -2867,8 +2931,8 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= -k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -2876,10 +2940,11 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= +sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= +sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= @@ -2889,8 +2954,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0 h1:kDvPBbnPk+qYmkHmSo8vKGp438IASWofnbbUKDE/bv0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.0/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index f04031ee7..c24a7fb8c 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1694,6 +1694,9 @@ spec: target allocator should use for allocation. The current options are least-weighted and consistent-hashing. The default option is least-weighted + enum: + - least-weighted + - consistent-hashing type: string enabled: description: Enabled indicates whether to use a target allocation diff --git a/docs/api.md b/docs/api.md index 832176e98..6f03ab970 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4530,9 +4530,11 @@ TargetAllocator indicates a value which determines whether to spawn a target all allocationStrategy - string + enum AllocationStrategy determines which strategy the target allocator should use for allocation. The current options are least-weighted and consistent-hashing. The default option is least-weighted
+
+ Enum: least-weighted, consistent-hashing
false diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 801fa7ba6..9f874010c 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -28,6 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" @@ -117,7 +118,7 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { if len(params.Instance.Spec.TargetAllocator.AllocationStrategy) > 0 { taConfig["allocation_strategy"] = params.Instance.Spec.TargetAllocator.AllocationStrategy } else { - taConfig["allocation_strategy"] = "least-weighted" + taConfig["allocation_strategy"] = v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted } if len(params.Instance.Spec.TargetAllocator.FilterStrategy) > 0 { From 6e1035954625ef92960d614e5bca46f648a92434 Mon Sep 17 00:00:00 2001 From: Craig Squire Date: Mon, 21 Nov 2022 04:40:00 -0600 Subject: [PATCH 0660/1234] Only create ServiceAccounts if existing ServiceAccount is not specified (#1246) * Only create SAs if existing SA is not specified * Add note to types about ServiceAccount creation * Remove ServiceAccount from TA e2e test assertion, generate to update docs * make bundle * Update bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml Co-authored-by: Ben B. * Update bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml Co-authored-by: Ben B. * remove other invalid updates from make bundle Co-authored-by: Ben B. --- apis/v1alpha1/opentelemetrycollector_types.go | 6 +++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +++-- docs/api.md | 4 +-- pkg/collector/reconcile/serviceaccount.go | 19 ++++++++----- .../reconcile/serviceaccount_test.go | 27 +++++++++++++++++++ .../e2e/smoke-targetallocator/00-assert.yaml | 5 ---- 7 files changed, 53 insertions(+), 20 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 4907f6517..6db0579bc 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -84,7 +84,8 @@ type OpenTelemetryCollectorSpec struct { // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional Mode Mode `json:"mode,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. + // ServiceAccount indicates the name of an existing service account to use with this instance. When set, + // the operator will not automatically create a ServiceAccount for the collector. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` // Image indicates the container image to use for the OpenTelemetry Collector. @@ -164,7 +165,8 @@ type OpenTelemetryTargetAllocator struct { // Filtering is disabled by default. // +optional FilterStrategy string `json:"filterStrategy,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. + // ServiceAccount indicates the name of an existing service account to use with this instance. When set, + // the operator will not automatically create a ServiceAccount for the TargetAllocator. // +optional ServiceAccount string `json:"serviceAccount,omitempty"` // Image indicates the container image to use for the OpenTelemetry TargetAllocator. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 87b237832..21d8168ca 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1685,7 +1685,8 @@ spec: type: object serviceAccount: description: ServiceAccount indicates the name of an existing service - account to use with this instance. + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. type: string targetAllocator: description: TargetAllocator indicates a value which determines whether @@ -1752,7 +1753,8 @@ spec: type: integer serviceAccount: description: ServiceAccount indicates the name of an existing - service account to use with this instance. + service account to use with this instance. When set, the operator + will not automatically create a ServiceAccount for the TargetAllocator. type: string type: object tolerations: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c24a7fb8c..30ed3d3fa 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1683,7 +1683,8 @@ spec: type: object serviceAccount: description: ServiceAccount indicates the name of an existing service - account to use with this instance. + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. type: string targetAllocator: description: TargetAllocator indicates a value which determines whether @@ -1750,7 +1751,8 @@ spec: type: integer serviceAccount: description: ServiceAccount indicates the name of an existing - service account to use with this instance. + service account to use with this instance. When set, the operator + will not automatically create a ServiceAccount for the TargetAllocator. type: string type: object tolerations: diff --git a/docs/api.md b/docs/api.md index 6f03ab970..2bbc23e0a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1843,7 +1843,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. serviceAccount string - ServiceAccount indicates the name of an existing service account to use with this instance.
+ ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the collector.
false @@ -4578,7 +4578,7 @@ TargetAllocator indicates a value which determines whether to spawn a target all serviceAccount string - ServiceAccount indicates the name of an existing service account to use with this instance.
+ ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator.
false diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 2aa55e50d..b19c40aa1 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -33,13 +33,7 @@ import ( // ServiceAccounts reconciles the service account(s) required for the instance in the current context. func ServiceAccounts(ctx context.Context, params Params) error { - desired := []corev1.ServiceAccount{} - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { - desired = append(desired, collector.ServiceAccount(params.Instance)) - } - if params.Instance.Spec.TargetAllocator.Enabled { - desired = append(desired, targetallocator.ServiceAccount(params.Instance)) - } + desired := desiredServiceAccounts(params) // first, handle the create/update parts if err := expectedServiceAccounts(ctx, params, desired); err != nil { @@ -54,6 +48,17 @@ func ServiceAccounts(ctx context.Context, params Params) error { return nil } +func desiredServiceAccounts(params Params) []corev1.ServiceAccount { + desired := []corev1.ServiceAccount{} + if params.Instance.Spec.Mode != v1alpha1.ModeSidecar && len(params.Instance.Spec.ServiceAccount) == 0 { + desired = append(desired, collector.ServiceAccount(params.Instance)) + } + if params.Instance.Spec.TargetAllocator.Enabled && len(params.Instance.Spec.TargetAllocator.ServiceAccount) == 0 { + desired = append(desired, targetallocator.ServiceAccount(params.Instance)) + } + return desired +} + func expectedServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { for _, obj := range expected { desired := obj diff --git a/pkg/collector/reconcile/serviceaccount_test.go b/pkg/collector/reconcile/serviceaccount_test.go index db310237c..df6d69397 100644 --- a/pkg/collector/reconcile/serviceaccount_test.go +++ b/pkg/collector/reconcile/serviceaccount_test.go @@ -117,3 +117,30 @@ func TestDeleteServiceAccounts(t *testing.T) { }) } + +func TestDesiredServiceAccounts(t *testing.T) { + t.Run("should not create any service account", func(t *testing.T) { + params := params() + params.Instance.Spec.ServiceAccount = "existing-collector-sa" + params.Instance.Spec.TargetAllocator.Enabled = true + params.Instance.Spec.TargetAllocator.ServiceAccount = "existing-allocator-sa" + desired := desiredServiceAccounts(params) + assert.Len(t, desired, 0) + }) + + t.Run("should create collector service account", func(t *testing.T) { + params := params() + desired := desiredServiceAccounts(params) + assert.Len(t, desired, 1) + assert.Equal(t, collector.ServiceAccount(params.Instance), desired[0]) + }) + + t.Run("should create targetallocator service account", func(t *testing.T) { + params := params() + params.Instance.Spec.ServiceAccount = "existing-collector-sa" + params.Instance.Spec.TargetAllocator.Enabled = true + desired := desiredServiceAccounts(params) + assert.Len(t, desired, 1) + assert.Equal(t, targetallocator.ServiceAccount(params.Instance), desired[0]) + }) +} diff --git a/tests/e2e/smoke-targetallocator/00-assert.yaml b/tests/e2e/smoke-targetallocator/00-assert.yaml index c180946c0..355df73c4 100644 --- a/tests/e2e/smoke-targetallocator/00-assert.yaml +++ b/tests/e2e/smoke-targetallocator/00-assert.yaml @@ -19,11 +19,6 @@ kind: ConfigMap metadata: name: stateful-targetallocator --- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: stateful-targetallocator ---- # Print TA pod logs if test fails apiVersion: kuttl.dev/v1beta1 kind: TestAssert From dd382de0bcec63aa9ecc83019ed3837715307e49 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 22 Nov 2022 11:35:45 +0100 Subject: [PATCH 0661/1234] Prepare release v0.64.1 (#1253) * Release - v0.64.1 Signed-off-by: Yuri Sa * Fix target allocator version Signed-off-by: Yuri Sa * Added new changes to changelog Signed-off-by: Yuri Sa --- CHANGELOG.md | 23 +++++++++++++++++++ README.md | 3 ++- ...emetry-operator.clusterserviceversion.yaml | 6 ++--- versions.txt | 8 +++---- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2199d378f..650c36aad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ Changes by Version ================== +0.64.1 +------------------ +### 🚀 New components 🚀 +* add headless label ([#1088](https://github.com/open-telemetry/opentelemetry-operator/pull/1088), [@kristinapathak](https://github.com/kristinapathak)) +* Add new selector for pod and service monitor ([#1256](https://github.com/open-telemetry/opentelemetry-operator/pull/1256), [@jaronoff97](https://github.com/jaronoff97)) +* [target-allocator] Add a pre-hook to the allocator to filter out dropped targets ([#1127](https://github.com/open-telemetry/opentelemetry-operator/pull/1127), [@moh-osman3](https://github.com/moh-osman3)) +* [target-allocator] create new target package ([#1214](https://github.com/open-telemetry/opentelemetry-operator/pull/1214), [@moh-osman3](https://github.com/moh-osman3)) +### 💡 Enhancements 💡 +* Only create ServiceAccounts if existing ServiceAccount is not specified ([#1246](https://github.com/open-telemetry/opentelemetry-operator/pull/1246), [@csquire](https://github.com/csquire)) +* feat(otel-allocator): use type for AllocationStrategy ([#1220](https://github.com/open-telemetry/opentelemetry-operator/pull/1220), [@secustor](https://github.com/secustor)) +* fix min tls setting for webhook server (#1225) ([#1230](https://github.com/open-telemetry/opentelemetry-operator/pull/1230), [@kangsheng89](https://github.com/kangsheng89)) +* Bump OTel python versions to 1.14.0 and 0.35b0 ([#1227](https://github.com/open-telemetry/opentelemetry-operator/pull/1227), [@vainikkaj](https://github.com/vainikkaj)) +* Trim unnecessary otelcol operator verbs ([#1222](https://github.com/open-telemetry/opentelemetry-operator/pull/1222), [@Allex1](https://github.com/Allex1)) +* decrease autoscaling version detection log verbosity ([#1212](https://github.com/open-telemetry/opentelemetry-operator/pull/1212), [@frzifus](https://github.com/frzifus)) + +### 🧰 Bug fixes 🧰 +* None + +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.64.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.64.1) +* [OpenTelemetry Contrib - v0.64.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.64.0) +* [OpenTelemetry Collector - v0.64.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.64.0) + 0.63.1 ------------------ ### 🚀 New components 🚀 diff --git a/README.md b/README.md index 42d76841a..9a4a070e4 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.64.1 | v1.19 to v1.25 | v1 | | v0.63.1 | v1.19 to v1.25 | v1 | | v0.62.1 | v1.19 to v1.25 | v1 | | v0.61.0 | v1.19 to v1.25 | v1 | @@ -347,7 +348,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.46.0 | v1.19 to v1.23 | v1alpha2 | | v0.45.0 | v1.21 to v1.23 | v1alpha2 | | v0.44.0 | v1.21 to v1.23 | v1alpha2 | -| v0.43.0 | v1.21 to v1.23 | v1alpha2 | + ## Contributing and Developing diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 007b9c3b1..5a0f7412d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.63.1 + name: opentelemetry-operator.v0.64.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -294,7 +294,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.63.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.64.1 livenessProbe: httpGet: path: /healthz @@ -401,7 +401,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.63.1 + version: 0.64.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index cbc83c6f6..db2f4e727 100644 --- a/versions.txt +++ b/versions.txt @@ -2,17 +2,17 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.63.1 +opentelemetry-collector=0.64.1 # Represents the current release of the OpenTelemetry Operator. -operator=0.63.1 +operator=0.64.1 # Represents the current release of the Target Allocator. -targetallocator=0.60.0 +targetallocator=0.64.1 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.19.1 +autoinstrumentation-java=1.20.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From dc3c1774299d5a8bdba9327ed8960054f5b23518 Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Tue, 22 Nov 2022 08:58:08 -0500 Subject: [PATCH 0662/1234] [target-allocator] Fix bug found when using relabel-config filterStrategy with serviceMonitors (#1232) * env variable substitution for * remove unnessary env variable lookup and gofmt * fix linter issues * addressing review feedback * add to unit test * addressing feedback * change go.mod to use later version of prometheus * run gofmt * rebasing go.mod and running go mod tidy --- cmd/otel-allocator/go.mod | 161 +-- cmd/otel-allocator/go.sum | 1164 ++++++-------------- cmd/otel-allocator/prehook/relabel.go | 18 +- cmd/otel-allocator/prehook/relabel_test.go | 153 ++- 4 files changed, 549 insertions(+), 947 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 04c9ba359..6b5859a4e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -7,111 +7,116 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.4 github.com/ghodss/yaml v1.0.0 - github.com/go-kit/log v0.2.0 + github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 github.com/prometheus-operator/prometheus-operator v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 - github.com/prometheus/client_golang v1.12.2 - github.com/prometheus/common v0.32.1 + github.com/prometheus/client_golang v1.13.0 + github.com/prometheus/common v0.37.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.3 - k8s.io/apimachinery v0.25.3 - k8s.io/client-go v0.25.3 - k8s.io/klog/v2 v2.70.1 - sigs.k8s.io/controller-runtime v0.13.0 + k8s.io/api v0.24.3 + k8s.io/apimachinery v0.24.3 + k8s.io/client-go v0.24.3 + k8s.io/klog/v2 v2.70.0 + sigs.k8s.io/controller-runtime v0.11.0 ) require ( - cloud.google.com/go v0.99.0 // indirect - github.com/Azure/azure-sdk-for-go v59.4.0+incompatible // indirect + cloud.google.com/go/compute v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.27 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect + github.com/Azure/go-autorest/autorest v0.11.28 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/Microsoft/go-winio v0.5.1 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect - github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect - github.com/armon/go-metrics v0.3.9 // indirect - github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect - github.com/aws/aws-sdk-go v1.44.41 // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/armon/go-metrics v0.3.10 // indirect + github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect + github.com/aws/aws-sdk-go v1.44.72 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 // indirect - github.com/containerd/containerd v1.5.7 // indirect + github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.72.0 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.14+incompatible // indirect + github.com/digitalocean/godo v1.82.0 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect + github.com/emicklei/go-restful v2.16.0+incompatible // indirect + github.com/envoyproxy/go-control-plane v0.10.3 // indirect + github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/analysis v0.20.0 // indirect - github.com/go-openapi/errors v0.20.0 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-logr/zapr v1.2.0 // indirect + github.com/go-openapi/analysis v0.21.2 // indirect + github.com/go-openapi/errors v0.20.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.5 // indirect - github.com/go-openapi/loads v0.20.2 // indirect - github.com/go-openapi/runtime v0.19.29 // indirect - github.com/go-openapi/spec v0.20.3 // indirect - github.com/go-openapi/strfmt v0.21.1 // indirect - github.com/go-openapi/swag v0.19.15 // indirect - github.com/go-openapi/validate v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/loads v0.21.1 // indirect + github.com/go-openapi/runtime v0.23.1 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/strfmt v0.21.3 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-openapi/validate v0.21.0 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect - github.com/go-stack/stack v1.8.0 // indirect - github.com/go-zookeeper/zk v1.0.2 // indirect + github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/go-querystring v1.0.0 // indirect - github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.1.1 // indirect - github.com/gophercloud/gophercloud v0.23.0 // indirect - github.com/hashicorp/consul/api v1.11.0 // indirect + github.com/google/go-cmp v0.5.8 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect + github.com/googleapis/gax-go/v2 v2.4.0 // indirect + github.com/gophercloud/gophercloud v0.25.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 // indirect + github.com/hashicorp/consul/api v1.14.0 // indirect + github.com/hashicorp/cronexpr v1.1.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v0.16.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.3.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/serf v0.9.5 // indirect - github.com/hetznercloud/hcloud-go v1.33.1 // indirect + github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c // indirect + github.com/hashicorp/serf v0.9.7 // indirect + github.com/hetznercloud/hcloud-go v1.35.2 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect - github.com/linode/linodego v1.2.1 // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/linode/linodego v1.8.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/miekg/dns v1.1.43 // indirect + github.com/miekg/dns v1.1.50 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/hashstructure v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -121,52 +126,58 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 // indirect - github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a // indirect + github.com/prometheus/alertmanager v0.24.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.7.3 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect + github.com/prometheus/procfs v0.8.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.4.0 // indirect github.com/thanos-io/thanos v0.24.0-rc.1 // indirect - github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.mongodb.org/mongo-driver v1.7.5 // indirect + github.com/vultr/govultr/v2 v2.17.2 // indirect + go.mongodb.org/mongo-driver v1.10.0 // indirect go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/otel v1.9.0 // indirect + go.opentelemetry.io/otel/trace v1.9.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/goleak v1.2.0 // indirect go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.21.0 // indirect - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + go.uber.org/zap v1.19.1 // indirect + golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced // indirect + golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 // indirect golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect + golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect + golang.org/x/tools v0.1.12 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.61.0 // indirect + google.golang.org/api v0.91.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.47.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 // indirect + google.golang.org/grpc v1.48.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.3 // indirect - k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect - k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + k8s.io/apiextensions-apiserver v0.23.0 // indirect + k8s.io/component-base v0.23.0 // indirect + k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) +replace github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.38.0 + // A exclude directive is needed for k8s.io/client-go because Cortex (which // is an indirect dependency through Thanos and PrometheusOperator) has a requirement on v12.0.0. exclude k8s.io/client-go v12.0.0+incompatible diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index fc6c1b7e4..7e91669b8 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1,9 +1,7 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -31,8 +29,9 @@ cloud.google.com/go v0.92.2/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -42,9 +41,17 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7 cloud.google.com/go/bigtable v1.1.0/go.mod h1:B6ByKcIdYmhoyDzmOnQxyOhN6r05qnewYIxxG6L0/b4= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -55,72 +62,39 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/trace v0.1.0/go.mod h1:wxEwsoeRVPbeSkt7ZC9nWCgmoKQRAoySN7XHW2AmI7g= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -contrib.go.opencensus.io/exporter/ocagent v0.6.0/go.mod h1:zmKjrJcdo0aYcVS7bmEeSEBLPA9YJp5bjrofdU3pIXs= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v23.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v43.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v44.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v44.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v45.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v46.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v48.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v51.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v52.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v54.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v58.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v59.4.0+incompatible h1:gDA8odnngdNd3KYHL2NoK1j9vpWBgEnFSjKKLpkC8Aw= -github.com/Azure/azure-sdk-for-go v59.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= +github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/azure-storage-blob-go v0.13.0/go.mod h1:pA9kNqtjUeQF2zOSu4s//nUdBD+e64lEuc4sVnuOfNs= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.2/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.4/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.9/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.10/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.11/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= -github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= -github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= +github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= +github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.3/go.mod h1:4bJZhUhcq8LB20TruwHbAQsmUs2Xh+QR7utuJpLXX3A= +github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= +github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4= github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -130,15 +104,12 @@ github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSY github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= @@ -151,43 +122,18 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= -github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5/go.mod h1:xnKTFzjGUiZtiOagBsfnvomW+nJg2usB1ZpordQWqNM= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -197,8 +143,6 @@ github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdko github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= -github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -211,9 +155,9 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a h1:E/8AP5dFtMhl5KPJz66Kt9G0n+7Sn41Fy1wv9/jHOrc= github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/alicebob/miniredis/v2 v2.14.3/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I= @@ -222,21 +166,16 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/apache/arrow/go/arrow v0.0.0-20200601151325-b2287a20f230/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= -github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= @@ -245,21 +184,16 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.22.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= -github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.31.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.33.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.33.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.35.5/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= @@ -269,9 +203,9 @@ github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2z github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go v1.42.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.44.41 h1:FNW3Tb8vKvXLZ7lzGlg/dCAXhK4RC5fyFewD11oJhUM= -github.com/aws/aws-sdk-go v1.44.41/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.72 h1:i7J5XT7pjBjtl1OrdIhiQHzsG89wkZCcM1HhyK++3DI= +github.com/aws/aws-sdk-go v1.44.72/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= @@ -282,38 +216,22 @@ github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NR github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= -github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/buraksezer/consistent v0.9.0 h1:Zfs6bX62wbP3QlbPGKUhqDw7SmNkOzY5bHZIYXYpR5g= github.com/buraksezer/consistent v0.9.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -322,28 +240,27 @@ github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QH github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v0.0.0-20181017004759-096ff4a8a059/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= @@ -354,10 +271,12 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc h1:PYXxkRUBGUMa5xgMVMDl62vEklZvKpVaxQeN9ie7Hfk= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -366,106 +285,18 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.7 h1:rQyoYtj4KddB3bxG6SAqd4+08gePNyJjRqvOIfV3rkM= -github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -488,8 +319,6 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= @@ -500,73 +329,36 @@ github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= -github.com/digitalocean/godo v1.37.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.38.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.42.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.42.1/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.46.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.52.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.57.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.58.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.60.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= -github.com/digitalocean/godo v1.71.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= -github.com/digitalocean/godo v1.72.0 h1:Y5+H6zO8UOmiwETd40Uee1Io8kGPCb5fBN76Kf7UyAI= -github.com/digitalocean/godo v1.72.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= +github.com/digitalocean/godo v1.82.0 h1:lqAit46H1CqJGjh7LDbsamng/UMBME5rvmfH3Vb5Yy8= +github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v17.12.0-ce-rc1.0.20200706150819-a40b877fbb9e+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.10+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= -github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -574,10 +366,10 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= +github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47/go.mod h1:vDnF4AAEZmO0mvyFIATeDJPFaSRM7ywaOnKd61zaSoE= github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= github.com/efficientgo/tools/core v0.0.0-20210201224146-3d78f4d30648/go.mod h1:cFZoHUhKg31xkPnPjhPKFtevnx0Xcg67ptBRxbpaxtk= @@ -593,8 +385,8 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful v2.16.0+incompatible h1:rgqiKNjTnFQA6kkhFe16D8epTksy9HQ1MyrbDXSdYhM= +github.com/emicklei/go-restful v2.16.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -603,37 +395,33 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= +github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= @@ -644,9 +432,6 @@ github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5 github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -656,21 +441,17 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -678,29 +459,26 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.0.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.17.2/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.14/go.mod h1:zN0kY6i38wo2LQOwltVyMk61bqlqOm86n1/Iszo8F8Y= github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= +github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.17.2/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -709,11 +487,11 @@ github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.0 h1:Sxpo9PjEHDzhs3FbnGNonvDgWcMW2U7wGTcDDSFSceM= github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= @@ -721,15 +499,13 @@ github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUe github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.17.2/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= @@ -739,10 +515,10 @@ github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2e github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= +github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.18.0/go.mod h1:uI6pHuxWYTy94zZxgcwJkUWa9wbIlhteGfloI10GD4U= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.3/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= @@ -750,25 +526,23 @@ github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2g github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/runtime v0.19.29 h1:5IIvCaIDbxetN674vX9eOxvoZ9mYGQ16fV1Q0VSG+NA= github.com/go-openapi/runtime v0.19.29/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= +github.com/go-openapi/runtime v0.23.1 h1:/Drg9R96eMmgKJHVWZADz78XbE39/6QiIiB45mc+epo= +github.com/go-openapi/runtime v0.23.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.14/go.mod h1:gwrgJS15eCUgjLpMjBJmbZezCsw88LmgeEip0M63doA= github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.17.2/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= @@ -779,37 +553,41 @@ github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLs github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= +github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY= github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.17.2/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.14/go.mod h1:PdGrHe0rp6MG3A1SrAY/rIHATqzJEEhohGE1atLkBEQ= github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= +github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI= +github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis/v8 v8.0.0-beta.10.0.20200905143926-df7fe4e2ce72/go.mod h1:CJP1ZIHwhosNYwIdaHPZK9vHsM3+roNBaZ7U9Of1DXc= github.com/go-redis/redis/v8 v8.2.3/go.mod h1:ysgGY09J/QeDYbu3HikWEIPCwaeOkuNoTgKayTEaEOw= github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= @@ -818,11 +596,12 @@ github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -850,22 +629,17 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9 github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= github.com/gocql/gocql v0.0.0-20200121121104-95d072f1b5bb/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -878,14 +652,11 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyHSnggXm/DvMMnTsQIc= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -933,10 +704,8 @@ github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -944,8 +713,6 @@ github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -960,96 +727,82 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200615235658-03e1cf38a040/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201007051231-1066cbb265c7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201117184057-ae444373da19/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210208152844-1612e9be7af6/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210323184331-8eee2492667d/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210504235042-3a04a4d88a10/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20211008130755-947d60d73cc0/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20211122183932-1daafda22083/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= +github.com/google/pprof v0.0.0-20220729232143-a41b82acbcb1/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= -github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/gophercloud v0.11.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/gophercloud v0.12.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/gophercloud v0.13.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= -github.com/gophercloud/gophercloud v0.14.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= -github.com/gophercloud/gophercloud v0.15.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= -github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= -github.com/gophercloud/gophercloud v0.17.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= -github.com/gophercloud/gophercloud v0.23.0 h1:I3P10oKlGu3DHP9PrEWMr1ya+/+3Rc9uRHNkRZ9wO7g= -github.com/gophercloud/gophercloud v0.23.0/go.mod h1:MRw6uyLj8uCGbIvBlqL7QW67t0QtNZnzydUzewo1Ioc= +github.com/gophercloud/gophercloud v0.25.0 h1:C3Oae7y0fUVQGSsBrb3zliAjdX+riCSEh4lNMejFNI4= +github.com/gophercloud/gophercloud v0.25.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1/go.mod h1:uPG2nyK4CtgNDmWv7qyzYcdI+S90kHHRWvHnBtEMBXM= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 h1:uirlL/j72L93RhV4+mkWhjv0cov2I0MIgPOG9rMDr1k= +github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -1062,58 +815,59 @@ github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.4/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= -github.com/grpc-ecosystem/grpc-gateway v1.15.0/go.mod h1:vO11I9oWA+KsxmfFQPhLnnIb1VDE24M+pdxZFiuZcA8= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= github.com/hashicorp/consul/api v1.5.0/go.mod h1:LqwrLNW876eYSuUOo4ZLHBcdKc038txr/IMfbLPATa4= -github.com/hashicorp/consul/api v1.6.0/go.mod h1:1NSuaUUkFaJzMasbfq/11wKYWSR67Xn6r2DXKhuDNFg= github.com/hashicorp/consul/api v1.7.0/go.mod h1:1NSuaUUkFaJzMasbfq/11wKYWSR67Xn6r2DXKhuDNFg= github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= github.com/hashicorp/consul/api v1.9.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.14.0 h1:Y64GIJ8hYTu+tuGekwO4G4ardXoiCivX9wv1iP/kihk= +github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.6.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.8.0 h1:OJtKBtEjboEZvG6AOUdh4Z1Zbyu0WcxQ0qatRrZHTVU= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/consul/sdk v0.10.0 h1:rGLEh2AWK4K0KCMvqWAz2EYxQqgciIfMagWZ0nVe5MI= +github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= +github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= +github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= +github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= @@ -1123,8 +877,9 @@ github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0S github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -1138,80 +893,51 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.4 h1:OOhYzSvFnkFQXm1ysE8RjXTHsqSRDyP4emusC9K7DYg= github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1vWZfM= +github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c h1:lV5A4cLQr1Bh1xGSSQ2R0fDRK4GZnfXxYia4Q7aaTXc= +github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c/go.mod h1:wPbfT+Daj0i4M73rK2TGvIHo9FUWMJ/hrhn8Xb4Puvc= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= github.com/hashicorp/serf v0.9.3/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hetznercloud/hcloud-go v1.21.1/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= -github.com/hetznercloud/hcloud-go v1.22.0/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= -github.com/hetznercloud/hcloud-go v1.23.1/go.mod h1:xng8lbDUg+xM1dgc0yGHX5EeqbwIq7UYlMWMTx3SQVg= -github.com/hetznercloud/hcloud-go v1.24.0/go.mod h1:3YmyK8yaZZ48syie6xpm3dt26rtB6s65AisBHylXYFA= -github.com/hetznercloud/hcloud-go v1.25.0/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= -github.com/hetznercloud/hcloud-go v1.33.1 h1:W1HdO2bRLTKU4WsyqAasDSpt54fYO4WNckWYfH5AuCQ= -github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= +github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hetznercloud/hcloud-go v1.35.2 h1:eEDtmDiI2plZ2UQmj4YpiYse5XbtpXOUBpAdIOLxzgE= +github.com/hetznercloud/hcloud-go v1.35.2/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/flux v0.131.0/go.mod h1:CKvnYe6FHpTj/E0YGI7TcOZdGiYHoToOPSnoa12RtKI= -github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= -github.com/influxdata/influxdb v1.7.7/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.8.1/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.8.2/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb v1.8.4/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb v1.8.5/go.mod h1:oFH+pbEyDln/1TKwa98oJzVrkZwdjrJOwIDGYZj7Ma0= -github.com/influxdata/influxdb v1.9.5/go.mod h1:4uPVvcry9KWQVWLxyT9641qpkRXUBN+xa0MJFFNNLKo= -github.com/influxdata/influxdb-client-go/v2 v2.3.1-0.20210518120617-5d1fff431040/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/pkg-config v0.2.8/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/ionos-cloud/sdk-go/v6 v6.1.2 h1:es5R5sVmjHFrYNBbJfAeHF+16GheaJMyc63xWxIAec4= +github.com/ionos-cloud/sdk-go/v6 v6.1.2/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -1224,14 +950,12 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22 github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1243,13 +967,10 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= @@ -1257,18 +978,12 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0= github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b h1:iNjcivnc6lhbvJA3LD622NPrUponluJrBWPIwGG/3Bg= github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= @@ -1280,6 +995,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -1291,25 +1008,23 @@ github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LE github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/lann/builder v0.0.0-20150808151131-f22ce00fd939/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linode/linodego v1.2.1 h1:v0vS/n9dGMA9evG+fhLJcy7hsf6TUVmacfYiYzARhts= -github.com/linode/linodego v1.2.1/go.mod h1:x/7+BoaKd4unViBmS2umdjYyVAmpFtBtEXZ0wou7FYQ= +github.com/linode/linodego v1.8.0 h1:7B2UaWu6C48tZZZrtINWRElAcwzk4TLnL9USjKf3xm0= +github.com/linode/linodego v1.8.0/go.mod h1:heqhl91D8QTPVm2k9qZHP78zzbOdTFLXE9NJc3bcc50= github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1319,17 +1034,14 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= @@ -1348,13 +1060,9 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -1368,19 +1076,16 @@ github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcK github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.38/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= +github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= +github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= @@ -1389,14 +1094,14 @@ github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns= github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= @@ -1404,22 +1109,15 @@ github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= @@ -1431,14 +1129,13 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1460,10 +1157,8 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.50/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.52/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -1471,67 +1166,41 @@ github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/oklog/ulid v0.0.0-20170117200651-66bb6560562f/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -1539,7 +1208,6 @@ github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.m github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.1-0.20200124165624-2876d2018785/go.mod h1:C+iumr2ni468+1jvcHXLCdqP9uQnoQbdX93F3aWahWU= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= @@ -1553,35 +1221,29 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 h1:2TVScDEIfhUCwVNrUenXBGke17gURHMi4nIjZ5iOLBc= github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512/go.mod h1:qYNF+Y9Fm8LQEsYPHPx67Sw7gXNGNFSWtuQpL/4tvbk= github.com/prometheus-operator/prometheus-operator v0.53.1 h1:UN1/7cX0bcL321R2MdLMU0olHaTh0kWZzub26sBarpY= @@ -1590,18 +1252,16 @@ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 h github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 h1:tKzmD3DQoK3OIcIxWhEmjdrjAr8ufVRpOO5JvpoDgic= github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1/go.mod h1:qP20QQUPGhQMp8yD68N17s3VvMeuLYrh+An0M4Q/zs0= -github.com/prometheus/alertmanager v0.18.0/go.mod h1:WcxHBl40VSPuOaqWae6l6HpnEOVRIycEJ7i9iYkadEE= github.com/prometheus/alertmanager v0.19.0/go.mod h1:Eyp94Yi/T+kdeb2qvq66E3RGuph5T/jm/RBVh4yz1xo= -github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= github.com/prometheus/alertmanager v0.21.0/go.mod h1:h7tJ81NA0VLWvWEayi1QltevFkLF3KxmC/malTcT8Go= github.com/prometheus/alertmanager v0.21.1-0.20200911160112-1fdff6b3f939/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= github.com/prometheus/alertmanager v0.21.1-0.20201106142418-c39b78780054/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= github.com/prometheus/alertmanager v0.21.1-0.20210310093010-0f9cab6991e6/go.mod h1:MTqVn+vIupE0dzdgo+sMcNCp37SCAi8vPrvKTTnTz9g= github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1/go.mod h1:gsEqwD5BHHW9RNKvCuPOrrTMiP5I+faJUyLXvnivHik= github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xmaDAZrqMgxIq3OXHk= -github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a h1:qroc/F4ygaQ0uc2S+Pyk/exMwnSpokGyN1QjfZ1DiWU= github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/alertmanager v0.24.0 h1:HBWR3lk4uy3ys+naDZthDdV7yEsxpaNeZuUS+hJgrOw= +github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= @@ -1609,7 +1269,6 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.2.0/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -1621,10 +1280,10 @@ github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0 github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1632,7 +1291,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= @@ -1656,23 +1314,24 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/exporter-toolkit v0.6.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= @@ -1682,78 +1341,49 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4 github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.0.0-20180315085919-58e2a31db8de/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s= -github.com/prometheus/prometheus v0.0.0-20190818123050-43acd0e2e93f/go.mod h1:rMTlmxGCvukf2KMu3fClMDKLLoJ5hl61MhcJ7xKakf0= -github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= -github.com/prometheus/prometheus v1.8.2-0.20200107122003-4708915ac6ef/go.mod h1:7U90zPoLkWjEIQcy/rweQla82OCTUzxVHE51G3OhJbI= -github.com/prometheus/prometheus v1.8.2-0.20200213233353-b90be6f32a33/go.mod h1:fkIPPkuZnkXyopYHmXPxf9rgiPkVgZCN8w9o8+UgBlY= -github.com/prometheus/prometheus v1.8.2-0.20200707115909-30505a202a4c/go.mod h1:/kMSPIRsxr/apyHxlzYMdFnaPXUXXqILU5uzIoNhOvc= -github.com/prometheus/prometheus v1.8.2-0.20200722151933-4a8531a64b32/go.mod h1:+/y4DzJ62qmhy0o/H4PtXegRXw+80E8RVRHhLbv+bkM= -github.com/prometheus/prometheus v1.8.2-0.20200805082714-e0cf219f0de2/go.mod h1:i1KZsZmyDTJRvnR7zE8z/u2v+tkpPjoiPpnWp6nwhr0= -github.com/prometheus/prometheus v1.8.2-0.20200819132913-cb830b0a9c78/go.mod h1:zfAqy/MwhMFajB9E2n12/9gG2fvofIE9uKDtlZCDxqs= -github.com/prometheus/prometheus v1.8.2-0.20200923143134-7e2db3d092f3/go.mod h1:9VNWoDFHOMovlubld5uKKxfCDcPBj2GMOCjcUFXkYaM= -github.com/prometheus/prometheus v1.8.2-0.20201028100903-3245b3267b24/go.mod h1:MDRkz271loM/PrYN+wUNEaTMDGSP760MQzB0yEjdgSQ= -github.com/prometheus/prometheus v1.8.2-0.20201029103703-63be30dceed9/go.mod h1:MDRkz271loM/PrYN+wUNEaTMDGSP760MQzB0yEjdgSQ= -github.com/prometheus/prometheus v1.8.2-0.20201119142752-3ad25a6dc3d9/go.mod h1:1MDE/bXgu4gqd5w/otko6WQpXZX9vu8QX4KbitCmaPg= -github.com/prometheus/prometheus v1.8.2-0.20201119181812-c8f810083d3f/go.mod h1:1MDE/bXgu4gqd5w/otko6WQpXZX9vu8QX4KbitCmaPg= -github.com/prometheus/prometheus v1.8.2-0.20210215121130-6f488061dfb4/go.mod h1:NAYujktP0dmSSpeV155mtnwX2pndLpVVK/Ps68R01TA= -github.com/prometheus/prometheus v1.8.2-0.20210315220929-1cba1741828b/go.mod h1:MS/bpdil77lPbfQeKk6OqVQ9OLnpN3Rszd0hka0EOWE= -github.com/prometheus/prometheus v1.8.2-0.20210324152458-c7a62b95cea0/go.mod h1:sf7j/iAbhZahjeC0s3wwMmp5dksrJ/Za1UKdR+j6Hmw= -github.com/prometheus/prometheus v1.8.2-0.20210519120135-d95b0972505f/go.mod h1:yUzDYX0hIYu5YVHmpj/JXLOclB6QcLNDgmagD3FUnSU= -github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7/go.mod h1:outfylaI89+D5IO87TRPRmxfucIobTO3Rb0l2TKqpj0= -github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 h1:2FprD6qMVmu/qOclTsMpMReGn1EcQ7SUk++SIycVlYk= -github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1/go.mod h1:bBByfKZ/sC+obk4CX3GpJ2Ul+fKZGtXneLYFG8C//nc= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/prometheus v0.38.0 h1:YSiJ5gDZmXnOntPRyHn1wb/6I1Frasj9dw57XowIqeA= +github.com/prometheus/prometheus v0.38.0/go.mod h1:2zHO5FtRhM+iu995gwKIb99EXxjeZEuXpKUTIRq4YI0= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1/go.mod h1:JaY6n2sDr+z2WTsXkOmNRUfDy6FN0L6Nk7x06ndm4tY= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/samuel/go-zookeeper v0.0.0-20190810000440-0ceca61e4d75/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/samuel/go-zookeeper v0.0.0-20200724154423-2164a8ac840e/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 h1:0roa6gXKgyta64uqh52AQG3wzZXH21unn+ltzQSXML0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20180825020608-02ddb050ef6b/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20200627165143-92b8a710ab6c/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -1767,7 +1397,6 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.3.13/go.mod h1:6nfka9aTXkUNha1p1cjeeyjDvcyh7jfjp0l8kGpDBok= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= @@ -1781,9 +1410,7 @@ github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY52 github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= @@ -1792,31 +1419,24 @@ github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1824,14 +1444,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= github.com/tencentyun/cos-go-sdk-v5 v0.7.31/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o= @@ -1851,47 +1466,30 @@ github.com/thanos-io/thanos v0.24.0-rc.1/go.mod h1:sfnKJG7cDA41ixNL4gsTJEa3w9Qt8 github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= -github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.24.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/weaveworks/common v0.0.0-20200206153930-760e36ae819a/go.mod h1:6enWAqfQBFrE8X/XdJwZr8IKgh1chStuFR0mjU/UOUw= github.com/weaveworks/common v0.0.0-20200625145055-4b1847531bc9/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= github.com/weaveworks/common v0.0.0-20200914083218-61ffdd448099/go.mod h1:hz10LOsAdzC3K/iXaKoFxOKTDRgxJl+BTGX1GY+TzO4= @@ -1900,25 +1498,19 @@ github.com/weaveworks/common v0.0.0-20210112142934-23c8d7fa6120/go.mod h1:ykzWac github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78/go.mod h1:YU9FvnS7kUnRt6HY10G+2qHkwzP3n3Vb1XsXDsJTSp8= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.0.0/go.mod h1:IoImgRak9i3zJyuxOKUP1v4UZd1tMoKkq/Cimt1uhCg= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1926,10 +1518,9 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= go.elastic.co/apm v1.11.0/go.mod h1:qoOSi09pnzJDh5fKnfY7bPmQgl8yl2tULdOu03xhui0= @@ -1947,7 +1538,6 @@ go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20190709142735-eb7dd97135a5/go.mod h1:N0RPWo9FXJYZQI4BTkDtQylrstIigYHeR18ONnyTufk= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -1964,21 +1554,20 @@ go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD0 go.etcd.io/etcd/server/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIyCb1u4wjzMg90BQ= go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.0.4/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5 h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= +go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1992,16 +1581,31 @@ go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0/go.mod h1:548ZsYzmT4PL4zWKRd8q/N4z0Wxzn/ZxUE+lkEpwWQA= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= +go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= +go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= +go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= +go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= +go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= +go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= +go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= +go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -2012,10 +1616,9 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= @@ -2030,22 +1633,15 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -2063,30 +1659,25 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2131,12 +1722,14 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2144,7 +1737,6 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -2155,7 +1747,6 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2193,15 +1784,14 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210324051636-2c4c8ecb7826/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210505214959-0714010a04ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2209,12 +1799,20 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= +golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2229,7 +1827,6 @@ golang.org/x/oauth2 v0.0.0-20210210192628-66670185b0cd/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -2237,8 +1834,15 @@ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3AbpuWzV6f1LjnLrM4pe2SZrw= +golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2252,6 +1856,7 @@ golang.org/x/sync v0.0.0-20200930132711-30421366ff76/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2266,7 +1871,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2280,46 +1884,35 @@ golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2336,50 +1929,36 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201008064518-c1f3e3309c71/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210314195730-07df6a141424/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210503173754-0981d6026fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2395,26 +1974,36 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180805044716-cb6730876b98/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -2422,7 +2011,6 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2433,9 +2021,9 @@ golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2443,7 +2031,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190118193359-16909d206f00/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -2469,7 +2056,6 @@ golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190918214516-5a1a30219888/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2496,32 +2082,23 @@ golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200603131246-cc40288be839/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200710042808-f1c4188a97a1/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200725200936-102e7d357031/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200822203824-307de81be3f4/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201020161133-226fd2f889ca/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201119054027-25dc3e1ccc3c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2533,23 +2110,25 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2565,7 +2144,6 @@ google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.26.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= @@ -2588,8 +2166,18 @@ google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= -google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= +google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2600,7 +2188,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2609,9 +2196,7 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -2623,7 +2208,6 @@ google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2632,14 +2216,12 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200603110839-e855014d5736/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2652,7 +2234,6 @@ google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2661,6 +2242,7 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= @@ -2682,11 +2264,31 @@ google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 h1:7PEE9xCtufpGJzrqweakEEnTh7YFELmnKm/ee+5jmfQ= +google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2695,7 +2297,6 @@ google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLD google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -2705,7 +2306,6 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -2723,9 +2323,15 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2741,36 +2347,37 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/telebot.v3 v3.0.0/go.mod h1:7rExV8/0mDDNu9epSrDm/8j22KLaActH1Tbee6YjzWg= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2785,9 +2392,7 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -2807,155 +2412,58 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A= -k8s.io/api v0.0.0-20190813020757-36bff7324fb7/go.mod h1:3Iy+myeAORNCLgjd/Xu9ebwN7Vh59Bw0vh9jhoX+V58= k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= -k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= -k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -k8s.io/api v0.18.5/go.mod h1:tN+e/2nbdGKOAH55NMV8oGrMG+3uRlA9GaRfvnCCSNk= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= -k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= -k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= -k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.5/go.mod h1:FQjAceXnVaWDeov2YUWhOb6Yt+5UjErkp6UO3nczO1Y= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= -k8s.io/api v0.22.3/go.mod h1:azgiXFiXqiWyLCfI62/eYBOu19rj2LKmIhFPP4+33fs= -k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk= k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= -k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= +k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= +k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= +k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= -k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= -k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= -k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA= -k8s.io/apimachinery v0.0.0-20190809020650-423f5d784010/go.mod h1:Waf/xTS2FGRrgXCkO5FP3XxTOWh0qLf2QhL1qFZZ/R8= k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= -k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.18.5/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= -k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.5/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.22.3/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= -k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= +k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k= -k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/client-go v0.18.5/go.mod h1:EsiD+7Fx+bRckKWZXnAXRKKetm1WuzPagH4iOSC8x58= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= -k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= -k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= -k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.5/go.mod h1:Ee5OOMMYvlH8FCZhDsacjMlCBwetbGZETwo1OA+e6Zw= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= -k8s.io/client-go v0.22.3/go.mod h1:ElDjYf8gvZsKDYexmsmnMQ0DYO8W9RwBjfQ1PI53yow= -k8s.io/client-go v0.22.4/go.mod h1:Yzw4e5e7h1LNHA4uqnMVrpEpUs1hJOiuBsJKIlRCHDA= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= -k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= +k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= +k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= -k8s.io/component-base v0.25.3 h1:UrsxciGdrCY03ULT1h/S/gXFCOPnLhUVwSyx+hM/zq4= -k8s.io/component-base v0.25.3/go.mod h1:WYoS8L+IlTZgU7rhAl5Ctpw0WdMxDfCC5dkxcEFa/TI= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.5.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.20.0/go.mod h1:Gm8eSIfQN6457haJuPaMxZw4wyP5k+ykPFlrhQDvhvw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-openapi v0.0.0-20190722073852-5e22f3d471e6/go.mod h1:RZvgC8MSN6DjiMV6oIfEE9pDL9CYXokkfaCKZeHm3nc= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.0 h1:GMmmjoFOrNepPN0ZeGCzvD2Gh5IKRwdFx8W5PBxVTQU= +k8s.io/klog/v2 v2.70.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= -k8s.io/utils v0.0.0-20190809000727-6c36bc71fc4a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= -sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= +sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go index 54059773c..978693257 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/prehook/relabel.go @@ -80,11 +80,27 @@ func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[ func (tf *RelabelConfigTargetFilter) SetConfig(cfgs map[string][]*relabel.Config) { relabelCfgCopy := make(map[string][]*relabel.Config) for key, val := range cfgs { - relabelCfgCopy[key] = val + relabelCfgCopy[key] = tf.replaceRelabelConfig(val) } + tf.relabelCfg = relabelCfgCopy } +// See this thread [https://github.com/open-telemetry/opentelemetry-operator/pull/1124/files#r983145795] +// for why SHARD == 0 is a necessary substitution. Otherwise the keep action that uses this env variable, +// would not match the regex and all targets end up dropped. Also note, $(SHARD) will always be 0 and it +// does not make sense to read from the environment because it is never set in the allocator. +func (tf *RelabelConfigTargetFilter) replaceRelabelConfig(cfg []*relabel.Config) []*relabel.Config { + for i := range cfg { + str := cfg[i].Regex.String() + if str == "$(SHARD)" { + cfg[i].Regex = relabel.MustNewRegexp("0") + } + } + + return cfg +} + func (tf *RelabelConfigTargetFilter) GetConfig() map[string][]*relabel.Config { relabelCfgCopy := make(map[string][]*relabel.Config) for k, v := range tf.relabelCfg { diff --git a/cmd/otel-allocator/prehook/relabel_test.go b/cmd/otel-allocator/prehook/relabel_test.go index 151188242..d30f645eb 100644 --- a/cmd/otel-allocator/prehook/relabel_test.go +++ b/cmd/otel-allocator/prehook/relabel_test.go @@ -30,77 +30,134 @@ import ( ) var ( - logger = logf.Log.WithName("unit-tests") - numTargets = 100 + logger = logf.Log.WithName("unit-tests") + defaultNumTargets = 100 + defaultNumCollectors = 3 + defaultStartIndex = 0 relabelConfigs = []relabelConfigObj{ { - cfg: relabel.Config{ - Action: "replace", - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - Replacement: "$1", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Action: "replace", + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + Replacement: "$1", + TargetLabel: "foo", + }, }, isDrop: false, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Action: "keep", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Separator: ";", + Action: "keep", + Replacement: "$1", + }, }, isDrop: false, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("bad.*match"), - Action: "drop", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("bad.*match"), + Action: "drop", + Separator: ";", + Replacement: "$1", + }, }, isDrop: false, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"label_not_present"}, - Regex: relabel.MustNewRegexp("(.*)"), - Action: "keep", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"label_not_present"}, + Regex: relabel.MustNewRegexp("(.*)"), + Separator: ";", + Action: "keep", + Replacement: "$1", + }, }, isDrop: false, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Action: "drop", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Separator: ";", + Action: "drop", + Replacement: "$1", + }, }, isDrop: true, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"collector"}, - Regex: relabel.MustNewRegexp("(collector.*)"), - Action: "drop", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"collector"}, + Regex: relabel.MustNewRegexp("(collector.*)"), + Separator: ";", + Action: "drop", + Replacement: "$1", + }, }, isDrop: true, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("bad.*match"), - Action: "keep", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("bad.*match"), + Separator: ";", + Action: "keep", + Replacement: "$1", + }, }, isDrop: true, }, { - cfg: relabel.Config{ - SourceLabels: model.LabelNames{"collector"}, - Regex: relabel.MustNewRegexp("collectors-n"), - Action: "keep", + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"collector"}, + Regex: relabel.MustNewRegexp("collectors-n"), + Separator: ";", + Action: "keep", + Replacement: "$1", + }, }, isDrop: true, }, } + HashmodConfig = relabelConfigObj{ + cfg: []*relabel.Config{ + { + SourceLabels: model.LabelNames{"i"}, + Regex: relabel.MustNewRegexp("(.*)"), + Separator: ";", + Modulus: 1, + TargetLabel: "tmp-0", + Action: "hashmod", + Replacement: "$1", + }, + + { + SourceLabels: model.LabelNames{"tmp-$(SHARD)"}, + Regex: relabel.MustNewRegexp("$(SHARD)"), + Separator: ";", + Action: "keep", + Replacement: "$1", + }, + }, + isDrop: false, + } + DefaultDropRelabelConfig = relabel.Config{ SourceLabels: model.LabelNames{"i"}, Regex: relabel.MustNewRegexp("(.*)"), @@ -109,7 +166,7 @@ var ( ) type relabelConfigObj struct { - cfg relabel.Config + cfg []*relabel.Config isDrop bool } @@ -120,7 +177,7 @@ func colIndex(index, numCols int) int { return index % numCols } -func makeNNewTargets(n int, numCollectors int, startingIndex int) (map[string]*target.Item, int, map[string]*target.Item, map[string][]*relabel.Config) { +func makeNNewTargets(rCfgs []relabelConfigObj, n int, numCollectors int, startingIndex int) (map[string]*target.Item, int, map[string]*target.Item, map[string][]*relabel.Config) { toReturn := map[string]*target.Item{} expectedMap := make(map[string]*target.Item) numItemsRemaining := n @@ -140,9 +197,7 @@ func makeNNewTargets(n int, numCollectors int, startingIndex int) (map[string]*t index = int(ind.Int64()) - relabelConfig[jobName] = []*relabel.Config{ - &relabelConfigs[index].cfg, - } + relabelConfig[jobName] = rCfgs[index].cfg targetKey := newTarget.Hash() if relabelConfigs[index].isDrop { @@ -159,7 +214,7 @@ func TestApply(t *testing.T) { allocatorPrehook := New("relabel-config", logger) assert.NotNil(t, allocatorPrehook) - targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(numTargets, 3, 0) + targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) allocatorPrehook.SetConfig(relabelCfg) remainingItems := allocatorPrehook.Apply(targets) assert.Len(t, remainingItems, numRemaining) @@ -178,12 +233,24 @@ func TestApply(t *testing.T) { assert.Equal(t, remainingItems, targets) } +func TestApplyHashmodAction(t *testing.T) { + allocatorPrehook := New("relabel-config", logger) + assert.NotNil(t, allocatorPrehook) + + hashRelabelConfigs := append(relabelConfigs, HashmodConfig) + targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(hashRelabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) + allocatorPrehook.SetConfig(relabelCfg) + remainingItems := allocatorPrehook.Apply(targets) + assert.Len(t, remainingItems, numRemaining) + assert.Equal(t, remainingItems, expectedTargetMap) +} + func TestApplyEmptyRelabelCfg(t *testing.T) { allocatorPrehook := New("relabel-config", logger) assert.NotNil(t, allocatorPrehook) - targets, _, _, _ := makeNNewTargets(numTargets, 3, 0) + targets, _, _, _ := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) relabelCfg := map[string][]*relabel.Config{} allocatorPrehook.SetConfig(relabelCfg) @@ -197,7 +264,7 @@ func TestSetConfig(t *testing.T) { allocatorPrehook := New("relabel-config", logger) assert.NotNil(t, allocatorPrehook) - _, _, _, relabelCfg := makeNNewTargets(numTargets, 3, 0) + _, _, _, relabelCfg := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) allocatorPrehook.SetConfig(relabelCfg) assert.Equal(t, relabelCfg, allocatorPrehook.GetConfig()) } From 8d0c84113f89fb4e324f0fc41c6bfaced79a16b7 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Tue, 22 Nov 2022 05:58:27 -0800 Subject: [PATCH 0663/1234] Update the javaagent version to 1.20.2 (#1270) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 0044d6cb9..769e37e15 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.20.1 +1.20.2 From 1eed17e1551be6717d672c83d5ea69c14a21af5c Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 22 Nov 2022 19:29:25 +0530 Subject: [PATCH 0664/1234] Aadd ingressClassName field to collector spec (#1269) * adds ingressClassName field to collector spec * updates docs/api.md with ingressClassName field --- apis/v1alpha1/opentelemetrycollector_types.go | 6 ++++++ apis/v1alpha1/zz_generated.deepcopy.go | 5 +++++ ...opentelemetry.io_opentelemetrycollectors.yaml | 5 +++++ ...opentelemetry.io_opentelemetrycollectors.yaml | 5 +++++ docs/api.md | 7 +++++++ pkg/collector/reconcile/ingress.go | 1 + pkg/collector/reconcile/ingress_test.go | 16 +++++++++------- 7 files changed, 38 insertions(+), 7 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 6db0579bc..0aac34ca7 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -41,6 +41,12 @@ type Ingress struct { // TLS configuration. // +optional TLS []networkingv1.IngressTLS `json:"tls,omitempty"` + + // IngressClassName is the name of an IngressClass cluster resource. Ingress + // controller implementations use this field to know whether they should be + // serving this Ingress resource. + // +optional + IngressClassName *string `json:"ingressClassName,omitempty"` } // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 103838601..65bd3901d 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -105,6 +105,11 @@ func (in *Ingress) DeepCopyInto(out *Ingress) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.IngressClassName != nil { + in, out := &in.IngressClassName, &out.IngressClassName + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 21d8168ca..41d2e014a 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1196,6 +1196,11 @@ spec: hostname: description: Hostname by which the ingress proxy can be reached. type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string tls: description: TLS configuration. items: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 30ed3d3fa..068df5d1a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1194,6 +1194,11 @@ spec: hostname: description: Hostname by which the ingress proxy can be reached. type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string tls: description: TLS configuration. items: diff --git a/docs/api.md b/docs/api.md index 2bbc23e0a..87358baaf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3827,6 +3827,13 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function Hostname by which the ingress proxy can be reached.
false + + ingressClassName + string + + IngressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource.
+ + false tls []object diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go index 79576ebf7..ea8279112 100644 --- a/pkg/collector/reconcile/ingress.go +++ b/pkg/collector/reconcile/ingress.go @@ -118,6 +118,7 @@ func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { }, }, }, + IngressClassName: params.Instance.Spec.Ingress.IngressClassName, }, } } diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index 2c3447c7f..7324a1481 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -23,7 +23,6 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" - v1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -93,8 +92,9 @@ func TestDesiredIngresses(t *testing.T) { t.Run("should return nil unable to do something else", func(t *testing.T) { var ( - ns = "test" - hostname = "example.com" + ns = "test" + hostname = "example.com" + ingressClassName = "nginx" ) params, err := newParams("something:tag", test_file_ingress) @@ -104,9 +104,10 @@ func TestDesiredIngresses(t *testing.T) { params.Instance.Namespace = ns params.Instance.Spec.Ingress = v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeNginx, - Hostname: hostname, - Annotations: map[string]string{"some.key": "some.value"}, + Type: v1alpha1.IngressTypeNginx, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + IngressClassName: &ingressClassName, } got := desiredIngresses(context.Background(), params) @@ -124,6 +125,7 @@ func TestDesiredIngresses(t *testing.T) { }, }, Spec: networkingv1.IngressSpec{ + IngressClassName: &ingressClassName, Rules: []networkingv1.IngressRule{ { Host: hostname, @@ -243,7 +245,7 @@ func TestDeleteIngresses(t *testing.T) { } // check - exists, err = populateObjectIfExists(t, &v1.Ingress{}, nns) + exists, err = populateObjectIfExists(t, &networkingv1.Ingress{}, nns) assert.NoError(t, err) assert.False(t, exists) }) From c05d902b48e14d7a0904cf3e1e2bb75a03ff4841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Sat, 26 Nov 2022 14:22:37 +0100 Subject: [PATCH 0665/1234] Bump OTel .NET AutoInstrumentation to 0.5.0 - part 1 (#1276) --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 616da2f44..8f0916f76 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.4.0-beta.1 +0.5.0 From c7c8b059191ae64b2089ee7a074a619bb9b70609 Mon Sep 17 00:00:00 2001 From: kangsheng89 Date: Sat, 26 Nov 2022 21:31:01 +0800 Subject: [PATCH 0666/1234] Add secure ciphersuites for TLS config (#1244) * add secure ciphersuites for TLS config * add comment for the secureCipherSuite function * provide more descriptive comments on secureCipherSuite function * ciphersuites and tls version setting can be configurable * add description for the function tlsConfigSetting --- go.mod | 4 +++- go.sum | 5 +++++ main.go | 34 +++++++++++++++++++++++++++------- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 57ffd4056..f67c4ade8 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( k8s.io/api v0.25.4 k8s.io/apimachinery v0.25.4 k8s.io/client-go v0.25.4 + k8s.io/component-base v0.25.4 k8s.io/kubectl v0.25.4 sigs.k8s.io/controller-runtime v0.13.1 ) @@ -78,6 +79,7 @@ require ( github.com/hashicorp/serf v0.9.5 // indirect github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect @@ -103,6 +105,7 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/cobra v1.4.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/trace v1.11.1 // indirect go.uber.org/atomic v1.8.0 // indirect @@ -125,7 +128,6 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/component-base v0.25.4 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index 36431c939..b1222651f 100644 --- a/go.sum +++ b/go.sum @@ -213,6 +213,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -632,6 +633,7 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= @@ -915,6 +917,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= @@ -947,6 +950,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= diff --git a/main.go b/main.go index d4aae3194..404abf83b 100644 --- a/main.go +++ b/main.go @@ -31,6 +31,7 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "k8s.io/client-go/tools/record" + k8sapiflag "k8s.io/component-base/cli/flag" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/healthz" @@ -51,15 +52,16 @@ import ( // +kubebuilder:scaffold:imports ) -// We should avoid that users unknowingly use a vulnerable TLS version. -// The defaults should be a safe configuration. -const defaultMinTLSVersion = tls.VersionTLS12 - var ( scheme = k8sruntime.NewScheme() setupLog = ctrl.Log.WithName("setup") ) +type tlsConfig struct { + minVersion string + cipherSuites []string +} + func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) @@ -88,6 +90,7 @@ func main() { autoInstrumentationDotNet string labelsFilter []string webhookPort int + tlsOpt tlsConfig ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") @@ -103,6 +106,8 @@ func main() { pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") + pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") + pflag.StringSliceVar(&tlsOpt.cipherSuites, "tls-cipher-suites", nil, "Comma-separated list of cipher suites for the server. Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). If omitted, the default Go cipher suites will be used") pflag.Parse() logger := zap.New(zap.UseFlagOptions(&opts)) @@ -158,7 +163,7 @@ func main() { retryPeriod := time.Second * 26 optionsTlSOptsFuncs := []func(*tls.Config){ - func(config *tls.Config) { minTlsDefault(config) }, + func(config *tls.Config) { tlsConfigSetting(config, tlsOpt) }, } mgrOptions := ctrl.Options{ @@ -289,6 +294,21 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v return nil } -func minTlsDefault(cfg *tls.Config) { - cfg.MinVersion = defaultMinTLSVersion +// This function get the option from command argument (tlsConfig), check the validity through k8sapiflag +// and set the config for webhook server. +// refer to https://pkg.go.dev/k8s.io/component-base/cli/flag +func tlsConfigSetting(cfg *tls.Config, tlsOpt tlsConfig) { + // TLSVersion helper function returns the TLS Version ID for the version name passed. + version, err := k8sapiflag.TLSVersion(tlsOpt.minVersion) + if err != nil { + setupLog.Error(err, "TLS version invalid") + } + cfg.MinVersion = version + + // TLSCipherSuites helper function returns a list of cipher suite IDs from the cipher suite names passed. + cipherSuiteIDs, err := k8sapiflag.TLSCipherSuites(tlsOpt.cipherSuites) + if err != nil { + setupLog.Error(err, "Failed to convert TLS cipher suite name to ID") + } + cfg.CipherSuites = cipherSuiteIDs } From 30561f029602e1ebd1d711e6ac432639486b9c86 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Sat, 26 Nov 2022 14:40:03 +0100 Subject: [PATCH 0667/1234] Apache instrumentation v1.0 (#1236) * Apache Instrumentation - Agent Image Build * Rename deafult image name * Github bld action for Apache HTTPD autoinstr img * Added Apache HTTPD image to publish images act * Heading change --- ...lish-autoinstrumentation-apache-httpd.yaml | 65 +++++++++++++++++++ .github/workflows/publish-images.yaml | 2 + autoinstrumentation/apache-httpd/Dockerfile | 26 ++++++++ autoinstrumentation/apache-httpd/README.md | 13 ++++ autoinstrumentation/apache-httpd/version.txt | 1 + 5 files changed, 107 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-apache-httpd.yaml create mode 100644 autoinstrumentation/apache-httpd/Dockerfile create mode 100644 autoinstrumentation/apache-httpd/README.md create mode 100644 autoinstrumentation/apache-httpd/version.txt diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml new file mode 100644 index 000000000..597d79ecd --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -0,0 +1,65 @@ +name: "Publish Apache HTTPD Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/apache-httpd/**' + - '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' + branches: + - main + pull_request: + paths: + - 'autoinstrumentation/apache-httpd/**' + - '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - name: Read version + run: echo "VERSION=$(cat autoinstrumentation/apache-httpd/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: autoinstrumentation/apache-httpd + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name == 'push' }} + build-args: version=${{ env.VERSION }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index cf625ec9b..a04fcf3e1 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -28,6 +28,7 @@ jobs: grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print "AUTO_INSTRUMENTATION_DOTNET_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -82,5 +83,6 @@ jobs: AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }} AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }} + AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${{ env.AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/autoinstrumentation/apache-httpd/Dockerfile b/autoinstrumentation/apache-httpd/Dockerfile new file mode 100644 index 000000000..6b99e022c --- /dev/null +++ b/autoinstrumentation/apache-httpd/Dockerfile @@ -0,0 +1,26 @@ + +############################ +# STEP 1 download the webserver agent +############################ +FROM alpine:latest as agent + +ARG version + +RUN mkdir /opt/opentelemetry +WORKDIR /opt/opentelemetry + +RUN wget https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz.zip +RUN unzip opentelemetry-webserver-sdk-x64-linux.tgz.zip +RUN mkdir agent +RUN tar -xvf opentelemetry-webserver-sdk-x64-linux.tgz -C agent + +############################ +# STEP 2 download the webserver agent +############################ +FROM alpine:latest + +COPY --from=agent /opt/opentelemetry/agent/opentelemetry-webserver-sdk /opt/opentelemetry + +RUN chmod a+w /opt/opentelemetry/logs + +CMD ["cat", "Just delivering the Opentelemetry Apache/Nginx agent"] \ No newline at end of file diff --git a/autoinstrumentation/apache-httpd/README.md b/autoinstrumentation/apache-httpd/README.md new file mode 100644 index 000000000..2ff4f1aa6 --- /dev/null +++ b/autoinstrumentation/apache-httpd/README.md @@ -0,0 +1,13 @@ +# How to build Apache HTTPD auto-instrumentation docker image + +To build image for Apache HTTPD auto instrumentation, use the following commands + +``` +export REPO_NAME="" +export IMAGE_NAME_PREFIX="autoinstrumentation-apache-httpd" +export IMAGE_VERSION=`cat version.txt` +export IMAGE_NAME=${REPO_NAME}/${IMAGE_NAME_PREFIX}:${IMAGE_VERSION} +docker build --build-arg version=${IMAGE_VERSION} . -t ${IMAGE_NAME} -t ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest +docker push ${IMAGE_NAME} +docker push ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest +``` diff --git a/autoinstrumentation/apache-httpd/version.txt b/autoinstrumentation/apache-httpd/version.txt new file mode 100644 index 000000000..e6d5cb833 --- /dev/null +++ b/autoinstrumentation/apache-httpd/version.txt @@ -0,0 +1 @@ +1.0.2 \ No newline at end of file From ccd0b988aa98eb1fdc5b616f8f9073aa93ef80c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Mon, 28 Nov 2022 09:55:17 +0100 Subject: [PATCH 0668/1234] Bump OTel .NET AutoInstrumentation to 0.5.0 - part 2 (#1274) * Bump OTel .NET AutoInstrumentation to 0.5.0 * Update DOTNET_STARTUP_HOOKS * Update versions.txt Co-authored-by: Pavol Loffay --- autoinstrumentation/dotnet/Dockerfile | 2 +- pkg/instrumentation/dotnet.go | 2 +- .../e2e/instrumentation-dotnet-multicontainer/01-assert.yaml | 4 ++-- .../e2e/instrumentation-dotnet-multicontainer/02-assert.yaml | 2 +- tests/e2e/instrumentation-dotnet/01-assert.yaml | 2 +- versions.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile index 2d6d75c2b..2e7dd241a 100644 --- a/autoinstrumentation/dotnet/Dockerfile +++ b/autoinstrumentation/dotnet/Dockerfile @@ -8,7 +8,7 @@ # CORECLR_PROFILER_PATH=%InstallationLocation%/OpenTelemetry.AutoInstrumentation.Native.so # DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps # DOTNET_SHARED_STORE=%InstallationLocation%/store -# DOTNET_STARTUP_HOOKS=%InstallationLocation%/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll +# DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll # OTEL_DOTNET_AUTO_HOME=%InstallationLocation% FROM busybox diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index c86614a47..aecf7c3e8 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -37,7 +37,7 @@ const ( dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" dotNetOTelAutoHomePath = "/otel-auto-instrumentation" dotNetSharedStorePath = "/otel-auto-instrumentation/store" - dotNetStartupHookPath = "/otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + dotNetStartupHookPath = "/otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" ) func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (corev1.Pod, error) { diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml index 48dc57916..b33808640 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -20,7 +20,7 @@ spec: - name: CORECLR_PROFILER_PATH value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS value: /otel-auto-instrumentation/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME @@ -61,7 +61,7 @@ spec: - name: CORECLR_PROFILER_PATH value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS value: /otel-auto-instrumentation/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml index ff8be2ac3..128c64134 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -23,7 +23,7 @@ spec: - name: CORECLR_PROFILER_PATH value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS value: /otel-auto-instrumentation/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index 29bbb3a6f..270549965 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -17,7 +17,7 @@ spec: - name: CORECLR_PROFILER_PATH value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/netcoreapp3.1/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS value: /otel-auto-instrumentation/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME diff --git a/versions.txt b/versions.txt index db2f4e727..7cb352808 100644 --- a/versions.txt +++ b/versions.txt @@ -24,4 +24,4 @@ autoinstrumentation-python=0.34b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.4.0-beta.1 +autoinstrumentation-dotnet=0.5.0 From a8eba43b834188430669517f302064d7fe9c07c3 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 29 Nov 2022 04:54:27 -0500 Subject: [PATCH 0669/1234] [target-allocator] Run TA tests on CI & Fix said tests (#1288) * quick commit * Fix collector tests by using a wait group for determinism * Fix the other tests * Fix cluster service version change * Fix tests? * order of operations --- Makefile | 1 + .../collector/collector_test.go | 164 ++++++++++++------ cmd/otel-allocator/config/config_test.go | 2 + .../discovery/discovery_test.go | 97 +++++------ .../discovery/testdata/test.yaml | 7 +- .../discovery/testdata/test_update.yaml | 14 ++ 6 files changed, 166 insertions(+), 119 deletions(-) create mode 100644 cmd/otel-allocator/discovery/testdata/test_update.yaml diff --git a/Makefile b/Makefile index 7ae5d2134..51e233c78 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,7 @@ ci: test .PHONY: test test: generate fmt vet ensure-generate-is-noop envtest KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... + cd cmd/otel-allocator && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... # Build manager binary .PHONY: manager diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go index d4bd1680d..e9fbc46c3 100644 --- a/cmd/otel-allocator/collector/collector_test.go +++ b/cmd/otel-allocator/collector/collector_test.go @@ -18,8 +18,12 @@ import ( "context" "fmt" "os" + "sync" "testing" + "k8s.io/apimachinery/pkg/watch" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -29,13 +33,13 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" ) -var client Client -var collectors = map[string]*allocation.Collector{} +var logger = logf.Log.WithName("collector-unit-tests") -func TestMain(m *testing.M) { - client = Client{ +func getTestClient() (Client, watch.Interface) { + kubeClient := Client{ k8sClient: fake.NewSimpleClientset(), close: make(chan struct{}), + log: logger, } labelMap := map[string]string{ @@ -47,71 +51,117 @@ func TestMain(m *testing.M) { LabelSelector: labels.SelectorFromSet(labelMap).String(), } - watcher, err := client.k8sClient.CoreV1().Pods("test-ns").Watch(context.Background(), opts) + watcher, err := kubeClient.k8sClient.CoreV1().Pods("test-ns").Watch(context.Background(), opts) if err != nil { fmt.Printf("failed to setup a Collector Pod watcher: %v", err) os.Exit(1) } - - go runWatch(context.Background(), &client, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) { getCollectors(colMap) }) - - code := m.Run() - - close(client.close) - - os.Exit(code) -} - -func TestWatchPodAddition(t *testing.T) { - expected := map[string]*allocation.Collector{ - "test-pod1": { - Name: "test-pod1", - }, - "test-pod2": { - Name: "test-pod2", - }, - "test-pod3": { - Name: "test-pod3", - }, - } - - for _, k := range []string{"test-pod1", "test-pod2", "test-pod3"} { - expected := pod(k) - _, err := client.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), expected, metav1.CreateOptions{}) - assert.NoError(t, err) - } - - assert.Len(t, collectors, 3) - assert.Equal(t, collectors, expected) -} - -func TestWatchPodDeletion(t *testing.T) { - expected := []string{"test-pod1"} - - for _, k := range []string{"test-pod2", "test-pod3"} { - err := client.k8sClient.CoreV1().Pods("test-ns").Delete(context.Background(), k, metav1.DeleteOptions{}) - assert.NoError(t, err) - } - - assert.Len(t, collectors, 1) - - assert.Equal(t, collectors, expected) -} - -func getCollectors(c map[string]*allocation.Collector) { - collectors = c + return kubeClient, watcher } func pod(name string) *v1.Pod { - labels := make(map[string]string) - labels["app.kubernetes.io/instance"] = "default.test" - labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + labelSet := make(map[string]string) + labelSet["app.kubernetes.io/instance"] = "default.test" + labelSet["app.kubernetes.io/managed-by"] = "opentelemetry-operator" return &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "test-ns", - Labels: labels, + Labels: labelSet, }, } } + +func Test_runWatch(t *testing.T) { + type args struct { + kubeFn func(t *testing.T, client Client, group *sync.WaitGroup) + collectorMap map[string]*allocation.Collector + } + tests := []struct { + name string + args args + want map[string]*allocation.Collector + }{ + { + name: "pod add", + args: args{ + kubeFn: func(t *testing.T, client Client, group *sync.WaitGroup) { + for _, k := range []string{"test-pod1", "test-pod2", "test-pod3"} { + p := pod(k) + group.Add(1) + _, err := client.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), p, metav1.CreateOptions{}) + assert.NoError(t, err) + } + }, + collectorMap: map[string]*allocation.Collector{}, + }, + want: map[string]*allocation.Collector{ + "test-pod1": { + Name: "test-pod1", + }, + "test-pod2": { + Name: "test-pod2", + }, + "test-pod3": { + Name: "test-pod3", + }, + }, + }, + { + name: "pod delete", + args: args{ + kubeFn: func(t *testing.T, client Client, group *sync.WaitGroup) { + for _, k := range []string{"test-pod2", "test-pod3"} { + group.Add(1) + err := client.k8sClient.CoreV1().Pods("test-ns").Delete(context.Background(), k, metav1.DeleteOptions{}) + assert.NoError(t, err) + } + }, + collectorMap: map[string]*allocation.Collector{ + "test-pod1": { + Name: "test-pod1", + }, + "test-pod2": { + Name: "test-pod2", + }, + "test-pod3": { + Name: "test-pod3", + }, + }, + }, + want: map[string]*allocation.Collector{ + "test-pod1": { + Name: "test-pod1", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + kubeClient, watcher := getTestClient() + defer func() { + close(kubeClient.close) + watcher.Stop() + }() + var wg sync.WaitGroup + actual := make(map[string]*allocation.Collector) + for _, k := range tt.args.collectorMap { + p := pod(k.Name) + _, err := kubeClient.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), p, metav1.CreateOptions{}) + wg.Add(1) + assert.NoError(t, err) + } + go runWatch(context.Background(), &kubeClient, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) { + actual = colMap + wg.Done() + }) + + tt.args.kubeFn(t, kubeClient, &wg) + wg.Wait() + + assert.Len(t, actual, len(tt.want)) + assert.Equal(t, actual, tt.want) + }) + } +} diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 48ba9f39a..26349d6d1 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -64,6 +64,7 @@ func TestLoad(t *testing.T) { Scheme: "http", HTTPClientConfig: commonconfig.HTTPClientConfig{ FollowRedirects: true, + EnableHTTP2: true, }, ServiceDiscoveryConfigs: []discovery.Config{ &file.SDConfig{ @@ -116,6 +117,7 @@ func TestLoad(t *testing.T) { Scheme: "http", HTTPClientConfig: commonconfig.HTTPClientConfig{ FollowRedirects: true, + EnableHTTP2: true, }, ServiceDiscoveryConfigs: []discovery.Config{ discovery.StaticConfig{ diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 0f341849a..cadc9d8ef 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -16,15 +16,10 @@ package discovery import ( "context" - "fmt" - "os" "sort" "testing" gokitlog "github.com/go-kit/log" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" ctrl "sigs.k8s.io/controller-runtime" @@ -33,20 +28,34 @@ import ( allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) -var cfg config.Config -var manager *Manager -var results chan []string - -func TestMain(m *testing.M) { - var err error - cfg, err = config.Load("./testdata/test.yaml") - if err != nil { - fmt.Printf("failed to load config file: %v", err) - os.Exit(1) +func TestDiscovery(t *testing.T) { + type args struct { + file string + } + tests := []struct { + name string + args args + want []string + }{ + { + name: "base case", + args: args{ + file: "./testdata/test.yaml", + }, + want: []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "promfile.domain:1001", "promfile.domain:3000"}, + }, + { + name: "update", + args: args{ + file: "./testdata/test_update.yaml", + }, + want: []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"}, + }, } - manager = NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger(), nil) + manager := NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger(), nil) + defer close(manager.close) - results = make(chan []string) + results := make(chan []string) manager.Watch(func(targets map[string]*target.Item) { var result []string for _, t := range targets { @@ -55,46 +64,18 @@ func TestMain(m *testing.M) { results <- result }) - code := m.Run() - - close(manager.close) - - os.Exit(code) -} - -func TestTargetDiscovery(t *testing.T) { - err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, &promconfig.Config{}) - assert.NoError(t, err) - - gotTargets := <-results - wantTargets := []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "promfile.domain:1001", "promfile.domain:3000"} - - sort.Strings(gotTargets) - sort.Strings(wantTargets) - assert.Equal(t, gotTargets, wantTargets) -} - -func TestTargetUpdate(t *testing.T) { - cfg.Config.ScrapeConfigs[0].ServiceDiscoveryConfigs[1] = discovery.StaticConfig{ - { - Targets: []model.LabelSet{ - {model.AddressLabel: "prom.domain:9004"}, - {model.AddressLabel: "prom.domain:9005"}, - }, - Labels: model.LabelSet{ - "my": "label", - }, - Source: "0", - }, + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg, err := config.Load(tt.args.file) + assert.NoError(t, err) + assert.True(t, len(cfg.Config.ScrapeConfigs) > 0) + err = manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg.Config) + assert.NoError(t, err) + + gotTargets := <-results + sort.Strings(gotTargets) + sort.Strings(tt.want) + assert.Equal(t, tt.want, gotTargets) + }) } - - err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, &promconfig.Config{}) - assert.NoError(t, err) - - gotTargets := <-results - wantTargets := []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"} - - sort.Strings(gotTargets) - sort.Strings(wantTargets) - assert.Equal(t, gotTargets, wantTargets) } diff --git a/cmd/otel-allocator/discovery/testdata/test.yaml b/cmd/otel-allocator/discovery/testdata/test.yaml index 54902342c..b6d1cf2f7 100644 --- a/cmd/otel-allocator/discovery/testdata/test.yaml +++ b/cmd/otel-allocator/discovery/testdata/test.yaml @@ -5,11 +5,10 @@ config: scrape_configs: - job_name: prometheus + file_sd_configs: + - files: + - ../config/testdata/file_sd_test.json static_configs: - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] labels: my: label - - file_sd_configs: - - files: - - ../config/testdata/file_sd_test.json diff --git a/cmd/otel-allocator/discovery/testdata/test_update.yaml b/cmd/otel-allocator/discovery/testdata/test_update.yaml new file mode 100644 index 000000000..3a7ec60f3 --- /dev/null +++ b/cmd/otel-allocator/discovery/testdata/test_update.yaml @@ -0,0 +1,14 @@ +label_selector: + app.kubernetes.io/instance: default.test + app.kubernetes.io/managed-by: opentelemetry-operator +config: + scrape_configs: + - job_name: prometheus + + file_sd_configs: + - files: + - ../config/testdata/file_sd_test.json + static_configs: + - targets: ["prom.domain:9004", "prom.domain:9005"] + labels: + my: other-label From 1d90292e46eb345cb192187c9d6a3260bb84ab7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 17:55:48 +0100 Subject: [PATCH 0670/1234] Bump github.com/Masterminds/semver/v3 from 3.1.1 to 3.2.0 (#1289) Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/Masterminds/semver/releases) - [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md) - [Commits](https://github.com/Masterminds/semver/compare/v3.1.1...v3.2.0) --- updated-dependencies: - dependency-name: github.com/Masterminds/semver/v3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f67c4ade8..043482590 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 retract v1.51.0 require ( - github.com/Masterminds/semver/v3 v3.1.1 + github.com/Masterminds/semver/v3 v3.2.0 github.com/go-logr/logr v1.2.3 github.com/mitchellh/mapstructure v1.5.0 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 diff --git a/go.sum b/go.sum index b1222651f..f2c7c473b 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= From 7f0efd6a617e436b7fc809ea291ea5e5249be265 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 30 Nov 2022 07:36:14 +0530 Subject: [PATCH 0671/1234] Prepare for 0.66.0 release (#1284) * Prepare for 0.66.0 release --- CHANGELOG.md | 17 +++++++++++++++++ README.md | 2 +- RELEASE.md | 15 ++++++++------- ...elemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 10 +++++----- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 650c36aad..eea6ef8b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ Changes by Version ================== +0.66.0 +------------------ +### 🚀 New components 🚀 +* Add ingressClassName field to collector spec ([#1269](https://github.com/open-telemetry/opentelemetry-operator/pull/1269), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Add secure ciphersuites for TLS config ([#1244](https://github.com/open-telemetry/opentelemetry-operator/pull/1244), [@kangsheng89](https://github.com/kangsheng89)) +* Add Apache-httpd instrumentation v1.0 (part-1) ([#1236](https://github.com/open-telemetry/opentelemetry-operator/pull/1236), [@chrlic](https://github.com/chrlic)) +### 💡 Enhancements 💡 +* Update the javaagent version to 1.20.2 ([#1212](https://github.com/open-telemetry/opentelemetry-operator/pull/1270)) +* Bump OTel .NET AutoInstrumentation to 0.5.0 ([#1276](https://github.com/open-telemetry/opentelemetry-operator/pull/1276), [@pellared](https://github.com/pellared)) + +### 🧰 Bug fixes 🧰 +* Fix bug found when using relabel-config filterStrategy with serviceMonitors ([#1232](https://github.com/open-telemetry/opentelemetry-operator/pull/1232), [@moh-osman3](https://github.com/moh-osman3)) + +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.66.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.66.0) +* [OpenTelemetry Contrib - v0.66.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.66.0) + 0.64.1 ------------------ ### 🚀 New components 🚀 diff --git a/README.md b/README.md index 9a4a070e4..dc17bcb21 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.66.0 | v1.19 to v1.25 | v1 | | v0.64.1 | v1.19 to v1.25 | v1 | | v0.63.1 | v1.19 to v1.25 | v1 | | v0.62.1 | v1.19 to v1.25 | v1 | @@ -347,7 +348,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.47.0 | v1.19 to v1.23 | v1alpha2 | | v0.46.0 | v1.19 to v1.23 | v1alpha2 | | v0.45.0 | v1.21 to v1.23 | v1alpha2 | -| v0.44.0 | v1.21 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index 21095ac66..3259fd8da 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,13 +3,14 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. -1. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -1. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! -1. Add the changes to the changelog -1. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` -1. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` -1. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images -1. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the `Community Operators repositories`: +2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `auto-instrumentation/`. +3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. +4. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! +5. Add the changes to the changelog +6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` +7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` +8. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images +9. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the `Community Operators repositories`: 1. one for the `community-operators-prod`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) 1. one for the `community-operators` directory, used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 5a0f7412d..e0c48808f 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.64.1 + name: opentelemetry-operator.v0.66.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -294,7 +294,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.64.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.66.0 livenessProbe: httpGet: path: /healthz @@ -401,7 +401,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.64.1 + version: 0.66.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 7cb352808..acf404f4d 100644 --- a/versions.txt +++ b/versions.txt @@ -2,17 +2,17 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.64.1 +opentelemetry-collector=0.66.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.64.1 +operator=0.66.0 # Represents the current release of the Target Allocator. -targetallocator=0.64.1 +targetallocator=0.66.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.20.1 +autoinstrumentation-java=1.20.2 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json @@ -20,7 +20,7 @@ autoinstrumentation-nodejs=0.31.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.34b0 +autoinstrumentation-python=0.35b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt From e379693db73d0385d63e16d2e1ebb99331461ebc Mon Sep 17 00:00:00 2001 From: Endre Karlson Date: Wed, 30 Nov 2022 11:28:06 +0100 Subject: [PATCH 0672/1234] Remove default PV claims - fixes #1281 (#1282) --- pkg/collector/container.go | 5 ----- pkg/collector/volumeclaim.go | 20 ++------------------ pkg/collector/volumeclaim_test.go | 25 ------------------------- 3 files changed, 2 insertions(+), 48 deletions(-) diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 042824308..6db2e3aed 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -76,11 +76,6 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if len(otelcol.Spec.VolumeMounts) > 0 { volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) - } else if otelcol.Spec.Mode == "statefulset" { - volumeMounts = append(volumeMounts, corev1.VolumeMount{ - Name: "default-volume", - MountPath: "/usr/share/default-volume", - }) } var envVars = otelcol.Spec.Env diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index b35d830b0..c249e5813 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -17,8 +17,6 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -35,22 +33,8 @@ func VolumeClaimTemplates(cfg config.Config, otelcol v1alpha1.OpenTelemetryColle } // Add all user specified claims or use default. - if len(otelcol.Spec.VolumeClaimTemplates) > 0 { - volumeClaimTemplates = append(volumeClaimTemplates, - otelcol.Spec.VolumeClaimTemplates...) - } else { - volumeClaimTemplates = []corev1.PersistentVolumeClaim{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "default-volume", - }, - Spec: corev1.PersistentVolumeClaimSpec{ - AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{"storage": resource.MustParse("50Mi")}, - }, - }, - }} - } + volumeClaimTemplates = append(volumeClaimTemplates, + otelcol.Spec.VolumeClaimTemplates...) return volumeClaimTemplates } diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index 360ba906c..7cf47c42b 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -27,31 +27,6 @@ import ( . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) -func TestVolumeClaimNewDefault(t *testing.T) { - // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: "statefulset", - }, - } - cfg := config.New() - - // test - volumeClaims := VolumeClaimTemplates(cfg, otelcol) - - // verify - assert.Len(t, volumeClaims, 1) - - // check that it's the initial-volume - assert.Equal(t, "default-volume", volumeClaims[0].Name) - - // check the access mode is correct - assert.Equal(t, corev1.PersistentVolumeAccessMode("ReadWriteOnce"), volumeClaims[0].Spec.AccessModes[0]) - - //check the storage is correct - assert.Equal(t, resource.MustParse("50Mi"), volumeClaims[0].Spec.Resources.Requests["storage"]) -} - func TestVolumeClaimAllowsUserToAdd(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ From fa15566a49ce8f52487961587933c658b259922d Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 30 Nov 2022 13:36:45 +0100 Subject: [PATCH 0673/1234] Added linters (#1287) * Added linters * Small changes into golanci Signed-off-by: Yuri Sa * Small changes into golanci Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- .golangci.yaml | 6 +++ apis/v1alpha1/instrumentation_webhook.go | 40 +++++++++---------- cmd/otel-allocator/discovery/discovery.go | 4 +- .../discovery/discovery_test.go | 2 +- cmd/otel-allocator/main.go | 6 +-- cmd/otel-allocator/prehook/relabel.go | 4 +- .../opentelemetrycollector_controller_test.go | 4 +- pkg/collector/daemonset.go | 2 +- pkg/collector/daemonset_test.go | 24 +++++------ pkg/collector/deployment.go | 2 +- pkg/collector/deployment_test.go | 32 +++++++-------- pkg/collector/reconcile/config_replace.go | 2 +- pkg/collector/reconcile/ingress_test.go | 8 ++-- pkg/collector/statefulset.go | 2 +- pkg/collector/statefulset_test.go | 32 +++++++-------- pkg/collector/upgrade/v0_36_0.go | 10 ++--- pkg/collector/utils.go | 2 +- pkg/instrumentation/dotnet.go | 4 +- pkg/instrumentation/dotnet_test.go | 2 +- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- 21 files changed, 99 insertions(+), 93 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index f1a7317c8..e763616e1 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -24,3 +24,9 @@ linters: - exhaustive - godot - unparam + - gosimple + - unused + - staticcheck + - ineffassign + - typecheck + - unparam \ No newline at end of file diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 0a19653ce..39ab6c866 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -86,59 +86,59 @@ func (r *Instrumentation) Default() { var _ webhook.Validator = &Instrumentation{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (in *Instrumentation) ValidateCreate() error { - instrumentationlog.Info("validate create", "name", in.Name) - return in.validate() +func (r *Instrumentation) ValidateCreate() error { + instrumentationlog.Info("validate create", "name", r.Name) + return r.validate() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (in *Instrumentation) ValidateUpdate(old runtime.Object) error { - instrumentationlog.Info("validate update", "name", in.Name) - return in.validate() +func (r *Instrumentation) ValidateUpdate(old runtime.Object) error { + instrumentationlog.Info("validate update", "name", r.Name) + return r.validate() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (in *Instrumentation) ValidateDelete() error { - instrumentationlog.Info("validate delete", "name", in.Name) +func (r *Instrumentation) ValidateDelete() error { + instrumentationlog.Info("validate delete", "name", r.Name) return nil } -func (in *Instrumentation) validate() error { - switch in.Spec.Sampler.Type { +func (r *Instrumentation) validate() error { + switch r.Spec.Sampler.Type { case TraceIDRatio, ParentBasedTraceIDRatio: - if in.Spec.Sampler.Argument != "" { - rate, err := strconv.ParseFloat(in.Spec.Sampler.Argument, 64) + if r.Spec.Sampler.Argument != "" { + rate, err := strconv.ParseFloat(r.Spec.Sampler.Argument, 64) if err != nil { - return fmt.Errorf("spec.sampler.argument is not a number: %s", in.Spec.Sampler.Argument) + return fmt.Errorf("spec.sampler.argument is not a number: %s", r.Spec.Sampler.Argument) } if rate < 0 || rate > 1 { - return fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", in.Spec.Sampler.Argument) + return fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", r.Spec.Sampler.Argument) } } case AlwaysOn, AlwaysOff, JaegerRemote, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: } // validate env vars - if err := in.validateEnv(in.Spec.Env); err != nil { + if err := r.validateEnv(r.Spec.Env); err != nil { return err } - if err := in.validateEnv(in.Spec.Java.Env); err != nil { + if err := r.validateEnv(r.Spec.Java.Env); err != nil { return err } - if err := in.validateEnv(in.Spec.NodeJS.Env); err != nil { + if err := r.validateEnv(r.Spec.NodeJS.Env); err != nil { return err } - if err := in.validateEnv(in.Spec.Python.Env); err != nil { + if err := r.validateEnv(r.Spec.Python.Env); err != nil { return err } - if err := in.validateEnv(in.Spec.DotNet.Env); err != nil { + if err := r.validateEnv(r.Spec.DotNet.Env); err != nil { return err } return nil } -func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error { +func (r *Instrumentation) validateEnv(envs []corev1.EnvVar) error { for _, env := range envs { if !strings.HasPrefix(env.Name, envPrefix) && !strings.HasPrefix(env.Name, envSplunkPrefix) { return fmt.Errorf("env name should start with \"OTEL_\" or \"SPLUNK_\": %s", env.Name) diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index a68bebc26..814e302ef 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -50,7 +50,7 @@ type discoveryHook interface { SetConfig(map[string][]*relabel.Config) } -func NewManager(log logr.Logger, ctx context.Context, logger log.Logger, hook discoveryHook, options ...func(*discovery.Manager)) *Manager { +func NewManager(ctx context.Context, log logr.Logger, logger log.Logger, hook discoveryHook, options ...func(*discovery.Manager)) *Manager { manager := discovery.NewManager(ctx, logger, options...) go func() { @@ -110,7 +110,7 @@ func (m *Manager) Watch(fn func(targets map[string]*target.Item)) { targets := map[string]*target.Item{} for jobName, tgs := range tsets { - var count float64 = 0 + var count float64 for _, tg := range tgs { for _, t := range tg.Targets { count++ diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index cadc9d8ef..11de1b7ee 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -52,7 +52,7 @@ func TestDiscovery(t *testing.T) { want: []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"}, }, } - manager := NewManager(ctrl.Log.WithName("test"), context.Background(), gokitlog.NewNopLogger(), nil) + manager := NewManager(context.Background(), ctrl.Log.WithName("test"), gokitlog.NewNopLogger(), nil) defer close(manager.close) results := make(chan []string) diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 07d1373f1..6df8be607 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -96,12 +96,12 @@ func main() { }() // creates a new discovery manager - discoveryManager := lbdiscovery.NewManager(log, ctx, gokitlog.NewNopLogger(), allocatorPrehook) + discoveryManager := lbdiscovery.NewManager(ctx, log, gokitlog.NewNopLogger(), allocatorPrehook) defer discoveryManager.Close() discoveryManager.Watch(allocator.SetTargets) - k8sclient, err := configureFileDiscovery(log, allocator, discoveryManager, context.Background(), cliConf) + k8sclient, err := configureFileDiscovery(context.Background(), log, allocator, discoveryManager, cliConf) if err != nil { setupLog.Error(err, "Can't start the k8s client") os.Exit(1) @@ -184,7 +184,7 @@ func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager return s } -func configureFileDiscovery(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, ctx context.Context, cliConfig config.CLIConfig) (*collector.Client, error) { +func configureFileDiscovery(ctx context.Context, log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, cliConfig config.CLIConfig) (*collector.Client, error) { cfg, err := config.Load(*cliConfig.ConfigFilePath) if err != nil { return nil, err diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go index 978693257..6bd67a420 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/prehook/relabel.go @@ -60,11 +60,11 @@ func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[ keepTarget := true lset := convertLabelToPromLabelSet(tItem.Label) for _, cfg := range tf.relabelCfg[tItem.JobName] { - if new_lset := relabel.Process(lset, cfg); new_lset == nil { + if newLset := relabel.Process(lset, cfg); newLset == nil { keepTarget = false break // inner loop } else { - lset = new_lset + lset = newLset } } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index b9324225b..9b52cbb18 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -229,7 +229,7 @@ func TestContinueOnRecoverableFailure(t *testing.T) { { Name: "should-fail", Do: func(context.Context, reconcile.Params) error { - return errors.New("should fail!") + return errors.New("should fail") }, BailOnError: false, }, @@ -255,7 +255,7 @@ func TestBreakOnUnrecoverableError(t *testing.T) { // prepare cfg := config.New() taskCalled := false - expectedErr := errors.New("should fail!") + expectedErr := errors.New("should fail") nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index f8e1dcece..565d1a92b 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -55,7 +55,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, HostNetwork: otelcol.Spec.HostNetwork, - DNSPolicy: getDnsPolicy(otelcol), + DNSPolicy: getDNSPolicy(otelcol), SecurityContext: otelcol.Spec.PodSecurityContext, PriorityClassName: otelcol.Spec.PriorityClassName, Affinity: otelcol.Spec.Affinity, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index fec8f7e9a..e56187a73 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -177,7 +177,7 @@ func TestDaemonsetFilterLabels(t *testing.T) { func TestDaemonSetNodeSelector(t *testing.T) { // Test default - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -185,12 +185,12 @@ func TestDaemonSetNodeSelector(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol_1) + d1 := DaemonSet(cfg, logger, otelcol1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, @@ -204,12 +204,12 @@ func TestDaemonSetNodeSelector(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol_2) + d2 := DaemonSet(cfg, logger, otelcol2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } func TestDaemonSetPriorityClassName(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -217,12 +217,12 @@ func TestDaemonSetPriorityClassName(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol_1) + d1 := DaemonSet(cfg, logger, otelcol1) assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -233,12 +233,12 @@ func TestDaemonSetPriorityClassName(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol_2) + d2 := DaemonSet(cfg, logger, otelcol2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } func TestDaemonSetAffinity(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -246,10 +246,10 @@ func TestDaemonSetAffinity(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol_1) + d1 := DaemonSet(cfg, logger, otelcol1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -260,7 +260,7 @@ func TestDaemonSetAffinity(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol_2) + d2 := DaemonSet(cfg, logger, otelcol2) assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 116790751..cb0211fbf 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -54,7 +54,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDnsPolicy(otelcol), + DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 435d49e94..601f22c59 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -161,7 +161,7 @@ func TestDeploymenttPodSecurityContext(t *testing.T) { func TestDeploymentHostNetwork(t *testing.T) { // Test default - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -169,13 +169,13 @@ func TestDeploymentHostNetwork(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol_1) + d1 := Deployment(cfg, logger, otelcol1) assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // Test hostNetwork=true - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-hostnetwork", }, @@ -186,7 +186,7 @@ func TestDeploymentHostNetwork(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol_2) + d2 := Deployment(cfg, logger, otelcol2) assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } @@ -217,7 +217,7 @@ func TestDeploymentFilterLabels(t *testing.T) { func TestDeploymentNodeSelector(t *testing.T) { // Test default - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -225,12 +225,12 @@ func TestDeploymentNodeSelector(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol_1) + d1 := Deployment(cfg, logger, otelcol1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, @@ -244,12 +244,12 @@ func TestDeploymentNodeSelector(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol_2) + d2 := Deployment(cfg, logger, otelcol2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } func TestDeploymentPriorityClassName(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -257,12 +257,12 @@ func TestDeploymentPriorityClassName(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol_1) + d1 := Deployment(cfg, logger, otelcol1) assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -273,12 +273,12 @@ func TestDeploymentPriorityClassName(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol_2) + d2 := Deployment(cfg, logger, otelcol2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } func TestDeploymentAffinity(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -286,10 +286,10 @@ func TestDeploymentAffinity(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol_1) + d1 := Deployment(cfg, logger, otelcol1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -300,7 +300,7 @@ func TestDeploymentAffinity(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol_2) + d2 := Deployment(cfg, logger, otelcol2) assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 3d18d2d15..7de12081b 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -22,7 +22,7 @@ import ( promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/http" - _ "github.com/prometheus/prometheus/discovery/install" + _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index 7324a1481..8608011bd 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -31,7 +31,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -const test_file_ingress = "../testdata/ingress_testdata.yaml" +const testFileIngress = "../testdata/ingress_testdata.yaml" func TestDesiredIngresses(t *testing.T) { t.Run("should return nil invalid ingress type", func(t *testing.T) { @@ -97,7 +97,7 @@ func TestDesiredIngresses(t *testing.T) { ingressClassName = "nginx" ) - params, err := newParams("something:tag", test_file_ingress) + params, err := newParams("something:tag", testFileIngress) if err != nil { t.Fatal(err) } @@ -183,7 +183,7 @@ func TestExpectedIngresses(t *testing.T) { t.Run("should create and update ingress entry", func(t *testing.T) { ctx := context.Background() - params, err := newParams("something:tag", test_file_ingress) + params, err := newParams("something:tag", testFileIngress) if err != nil { t.Fatal(err) } @@ -225,7 +225,7 @@ func TestDeleteIngresses(t *testing.T) { // create ctx := context.Background() - myParams, err := newParams("something:tag", test_file_ingress) + myParams, err := newParams("something:tag", testFileIngress) if err != nil { t.Fatal(err) } diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 76bd1c6dc..ba76d4732 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -54,7 +54,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel ServiceAccountName: ServiceAccountName(otelcol), Containers: []corev1.Container{Container(cfg, logger, otelcol)}, Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDnsPolicy(otelcol), + DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index c71823ce5..66ccbae38 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -202,7 +202,7 @@ func TestStatefulSetPodSecurityContext(t *testing.T) { func TestStatefulSetHostNetwork(t *testing.T) { // Test default - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -210,13 +210,13 @@ func TestStatefulSetHostNetwork(t *testing.T) { cfg := config.New() - d1 := StatefulSet(cfg, logger, otelcol_1) + d1 := StatefulSet(cfg, logger, otelcol1) assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // Test hostNetwork=true - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-hostnetwork", }, @@ -227,7 +227,7 @@ func TestStatefulSetHostNetwork(t *testing.T) { cfg = config.New() - d2 := StatefulSet(cfg, logger, otelcol_2) + d2 := StatefulSet(cfg, logger, otelcol2) assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } @@ -258,7 +258,7 @@ func TestStatefulSetFilterLabels(t *testing.T) { func TestStatefulSetNodeSelector(t *testing.T) { // Test default - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -266,12 +266,12 @@ func TestStatefulSetNodeSelector(t *testing.T) { cfg := config.New() - d1 := StatefulSet(cfg, logger, otelcol_1) + d1 := StatefulSet(cfg, logger, otelcol1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, @@ -285,12 +285,12 @@ func TestStatefulSetNodeSelector(t *testing.T) { cfg = config.New() - d2 := StatefulSet(cfg, logger, otelcol_2) + d2 := StatefulSet(cfg, logger, otelcol2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } func TestStatefulSetPriorityClassName(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -298,12 +298,12 @@ func TestStatefulSetPriorityClassName(t *testing.T) { cfg := config.New() - sts1 := StatefulSet(cfg, logger, otelcol_1) + sts1 := StatefulSet(cfg, logger, otelcol1) assert.Empty(t, sts1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -314,12 +314,12 @@ func TestStatefulSetPriorityClassName(t *testing.T) { cfg = config.New() - sts2 := StatefulSet(cfg, logger, otelcol_2) + sts2 := StatefulSet(cfg, logger, otelcol2) assert.Equal(t, priorityClassName, sts2.Spec.Template.Spec.PriorityClassName) } func TestStatefulSetAffinity(t *testing.T) { - otelcol_1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -327,10 +327,10 @@ func TestStatefulSetAffinity(t *testing.T) { cfg := config.New() - sts1 := Deployment(cfg, logger, otelcol_1) + sts1 := Deployment(cfg, logger, otelcol1) assert.Nil(t, sts1.Spec.Template.Spec.Affinity) - otelcol_2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, @@ -341,7 +341,7 @@ func TestStatefulSetAffinity(t *testing.T) { cfg = config.New() - sts2 := StatefulSet(cfg, logger, otelcol_2) + sts2 := StatefulSet(cfg, logger, otelcol2) assert.NotNil(t, sts2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *sts2.Spec.Template.Spec.Affinity) } diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 2460154eb..875b7a04c 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -65,16 +65,16 @@ func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) ( for k3, v3 := range protocConfig { // grpc config if k3 == "grpc" || k3 == "http" { - grpcHttpConfig, ok := v3.(map[interface{}]interface{}) + grpcHTTPConfig, ok := v3.(map[interface{}]interface{}) if !ok { - // no grpcHttpConfig? no need to fail because of that + // no grpcHTTPConfig? no need to fail because of that return otelcol, nil } - for k4, v4 := range grpcHttpConfig { + for k4, v4 := range grpcHTTPConfig { // change tls_settings to tls if k4.(string) == "tls_settings" { - grpcHttpConfig["tls"] = v4 - delete(grpcHttpConfig, "tls_settings") + grpcHTTPConfig["tls"] = v4 + delete(grpcHTTPConfig, "tls_settings") existing := &corev1.ConfigMap{} updated := existing.DeepCopy() u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", k3, k1)) diff --git a/pkg/collector/utils.go b/pkg/collector/utils.go index 813910bc4..36d683345 100644 --- a/pkg/collector/utils.go +++ b/pkg/collector/utils.go @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -func getDnsPolicy(otelcol v1alpha1.OpenTelemetryCollector) corev1.DNSPolicy { +func getDNSPolicy(otelcol v1alpha1.OpenTelemetryCollector) corev1.DNSPolicy { dnsPolicy := corev1.DNSClusterFirst if otelcol.Spec.HostNetwork { dnsPolicy = corev1.DNSClusterFirstWithHostNet diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index aecf7c3e8..d10d7ad93 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -32,7 +32,7 @@ const ( envDotNetStartupHook = "DOTNET_STARTUP_HOOKS" envDotNetOTelAutoHome = "OTEL_DOTNET_AUTO_HOME" dotNetCoreClrEnableProfilingEnabled = "1" - dotNetCoreClrProfilerId = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + dotNetCoreClrProfilerID = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" dotNetCoreClrProfilerPath = "/otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so" dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" dotNetOTelAutoHomePath = "/otel-auto-instrumentation" @@ -77,7 +77,7 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor setDotNetEnvVar(container, envDotNetCoreClrEnableProfiling, dotNetCoreClrEnableProfilingEnabled, doNotConcatEnvValues) - setDotNetEnvVar(container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerId, doNotConcatEnvValues) + setDotNetEnvVar(container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerID, doNotConcatEnvValues) setDotNetEnvVar(container, envDotNetCoreClrProfilerPath, dotNetCoreClrProfilerPath, doNotConcatEnvValues) diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index eab7fb85c..7bfc78a35 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -78,7 +78,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, { Name: envDotNetCoreClrProfiler, - Value: dotNetCoreClrProfilerId, + Value: dotNetCoreClrProfilerID, }, { Name: envDotNetCoreClrProfilerPath, diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 3418b5533..352f208d6 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -664,7 +664,7 @@ func TestMutatePod(t *testing.T) { }, { Name: envDotNetCoreClrProfiler, - Value: dotNetCoreClrProfilerId, + Value: dotNetCoreClrProfilerID, }, { Name: envDotNetCoreClrProfilerPath, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index c900193f2..077b0f34d 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -740,7 +740,7 @@ func TestInjectDotNet(t *testing.T) { }, { Name: envDotNetCoreClrProfiler, - Value: dotNetCoreClrProfilerId, + Value: dotNetCoreClrProfilerID, }, { Name: envDotNetCoreClrProfilerPath, From 6f9d7df05161b2baf03b83e41b4064845be6262d Mon Sep 17 00:00:00 2001 From: Ben B Date: Wed, 30 Nov 2022 14:05:57 +0100 Subject: [PATCH 0674/1234] remove unused onChange function from config (#1290) Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- internal/config/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/config/main.go b/internal/config/main.go index e2ef98570..05c83776f 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -35,7 +35,6 @@ const ( // Config holds the static configuration for this operator. type Config struct { autoDetect autodetect.AutoDetect - OnChange func() error logger logr.Logger targetAllocatorImage string autoInstrumentationPythonImage string From 61accfd0591c184bf2585f5b6711b3871024f506 Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Thu, 1 Dec 2022 10:48:42 +0100 Subject: [PATCH 0675/1234] Add TargetMemoryUtilization metric for AutoScaling (#1223) * Add TargetMemoryUtilization metric for AutoScaling Signed-off-by: Kevin Earls * Add changes to v2beta2 as there is no way to un e2e tests just for one version Signed-off-by: Kevin Earls * See if we just have a race condition Signed-off-by: Kevin Earls * Reset kuttl timeout Signed-off-by: Kevin Earls * Add some debugging code to help analyze failures on github Signed-off-by: Kevin Earls * Try to appease the linter Signed-off-by: Kevin Earls * Restore autoscale tests Signed-off-by: Kevin Earls * Cleanup Signed-off-by: Kevin Earls * More cleanup Signed-off-by: Kevin Earls * Respond to comments Signed-off-by: Kevin Earls * Cleanup whitespace so linter will rerun Signed-off-by: Kevin Earls * Don't set TargetCPUUtilization to default if another metric is set Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls --- apis/v1alpha1/opentelemetrycollector_types.go | 3 + .../opentelemetrycollector_webhook.go | 14 +++-- apis/v1alpha1/zz_generated.deepcopy.go | 5 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 5 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 5 ++ docs/api.md | 9 +++ pkg/collector/horizontalpodautoscaler.go | 58 ++++++++++++++----- pkg/collector/horizontalpodautoscaler_test.go | 28 ++++++--- .../reconcile/horizontalpodautoscaler.go | 11 +++- tests/e2e/autoscale/00-install.yaml | 3 + tests/e2e/autoscale/01-assert.yaml | 1 + tests/e2e/autoscale/02-assert.yaml | 1 + 12 files changed, 116 insertions(+), 27 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 0aac34ca7..a296381b2 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -277,6 +277,9 @@ type AutoscalerSpec struct { // If average CPU exceeds this value, the HPA will scale up. Defaults to 90 percent. // +optional TargetCPUUtilization *int32 `json:"targetCPUUtilization,omitempty"` + // +optional + // TargetMemoryUtilization sets the target average memory utilization across all replicas + TargetMemoryUtilization *int32 `json:"targetMemoryUtilization,omitempty"` } func init() { diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index fd4c5bd6a..ea41f2b10 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -67,13 +67,15 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.TargetAllocator.Replicas = &one } - // Set default targetCPUUtilization for autoscaler - if r.Spec.MaxReplicas != nil && (r.Spec.Autoscaler == nil || r.Spec.Autoscaler.TargetCPUUtilization == nil) { - defaultCPUTarget := int32(90) + if r.Spec.MaxReplicas != nil { if r.Spec.Autoscaler == nil { r.Spec.Autoscaler = &AutoscalerSpec{} } - r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget + + if r.Spec.Autoscaler.TargetMemoryUtilization == nil && r.Spec.Autoscaler.TargetCPUUtilization == nil { + defaultCPUTarget := int32(90) + r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget + } } } @@ -176,7 +178,9 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.TargetCPUUtilization != nil && (*r.Spec.Autoscaler.TargetCPUUtilization < int32(1) || *r.Spec.Autoscaler.TargetCPUUtilization > int32(99)) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetCPUUtilization should be greater than 0 and less than 100") } - + if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.TargetMemoryUtilization != nil && (*r.Spec.Autoscaler.TargetMemoryUtilization < int32(1) || *r.Spec.Autoscaler.TargetMemoryUtilization > int32(99)) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetMemoryUtilization should be greater than 0 and less than 100") + } } if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 65bd3901d..01c5f1dbd 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -39,6 +39,11 @@ func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { *out = new(int32) **out = **in } + if in.TargetMemoryUtilization != nil { + in, out := &in.TargetMemoryUtilization, &out.TargetMemoryUtilization + *out = new(int32) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalerSpec. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 41d2e014a..38dbce2c7 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1016,6 +1016,11 @@ spec: the HPA will scale up. Defaults to 90 percent. format: int32 type: integer + targetMemoryUtilization: + description: TargetMemoryUtilization sets the target average memory + utilization across all replicas + format: int32 + type: integer type: object config: description: Config is the raw JSON to be used as the collector's diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 068df5d1a..c6990780b 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1014,6 +1014,11 @@ spec: the HPA will scale up. Defaults to 90 percent. format: int32 type: integer + targetMemoryUtilization: + description: TargetMemoryUtilization sets the target average memory + utilization across all replicas + format: int32 + type: integer type: object config: description: Config is the raw JSON to be used as the collector's diff --git a/docs/api.md b/docs/api.md index 87358baaf..9359a696c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3228,6 +3228,15 @@ Autoscaler specifies the pod autoscaling configuration to use for the OpenTeleme Format: int32
false + + targetMemoryUtilization + integer + + TargetMemoryUtilization sets the target average memory utilization across all replicas
+
+ Format: int32
+ + false diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 8fc133ab1..c7205562d 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -33,9 +33,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al labels := Labels(otelcol, cfg.LabelsFilter()) labels["app.kubernetes.io/name"] = naming.Collector(otelcol) - annotations := Annotations(otelcol) - var result client.Object objectMeta := metav1.ObjectMeta{ @@ -46,6 +44,22 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al } if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { + metrics := []autoscalingv2beta2.MetricSpec{} + + if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { + utilizationTarget := autoscalingv2beta2.MetricSpec{ + Type: autoscalingv2beta2.ResourceMetricSourceType, + Resource: &autoscalingv2beta2.ResourceMetricSource{ + Name: corev1.ResourceMemory, + Target: autoscalingv2beta2.MetricTarget{ + Type: autoscalingv2beta2.UtilizationMetricType, + AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, + }, + }, + } + metrics = append(metrics, utilizationTarget) + } + targetCPUUtilization := autoscalingv2beta2.MetricSpec{ Type: autoscalingv2beta2.ResourceMetricSourceType, Resource: &autoscalingv2beta2.ResourceMetricSource{ @@ -56,7 +70,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al }, }, } - metrics := []autoscalingv2beta2.MetricSpec{targetCPUUtilization} + metrics = append(metrics, targetCPUUtilization) autoscaler := autoscalingv2beta2.HorizontalPodAutoscaler{ ObjectMeta: objectMeta, @@ -79,17 +93,35 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al result = &autoscaler } else { - targetCPUUtilization := autoscalingv2.MetricSpec{ - Type: autoscalingv2.ResourceMetricSourceType, - Resource: &autoscalingv2.ResourceMetricSource{ - Name: corev1.ResourceCPU, - Target: autoscalingv2.MetricTarget{ - Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, + metrics := []autoscalingv2.MetricSpec{} + + if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { + utilizationTarget := autoscalingv2.MetricSpec{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ + Name: corev1.ResourceMemory, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, + AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, + }, }, - }, + } + metrics = append(metrics, utilizationTarget) + } + + if otelcol.Spec.Autoscaler.TargetCPUUtilization != nil { + targetCPUUtilization := autoscalingv2.MetricSpec{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ + Name: corev1.ResourceCPU, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, + AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, + }, + }, + } + metrics = append(metrics, targetCPUUtilization) } - metrics := []autoscalingv2.MetricSpec{targetCPUUtilization} autoscaler := autoscalingv2.HorizontalPodAutoscaler{ ObjectMeta: objectMeta, @@ -104,7 +136,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Metrics: metrics, }, } - if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.Behavior != nil { + if otelcol.Spec.Autoscaler.Behavior != nil { autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior } result = &autoscaler diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index 04b90b348..aa5e1c173 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -41,7 +41,8 @@ func TestHPA(t *testing.T) { var minReplicas int32 = 3 var maxReplicas int32 = 5 - var cpuUtilization int32 = 90 + var cpuUtilization int32 = 66 + var memoryUtilization int32 = 77 otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -51,7 +52,8 @@ func TestHPA(t *testing.T) { Replicas: &minReplicas, MaxReplicas: &maxReplicas, Autoscaler: &v1alpha1.AutoscalerSpec{ - TargetCPUUtilization: &cpuUtilization, + TargetCPUUtilization: &cpuUtilization, + TargetMemoryUtilization: &memoryUtilization, }, }, } @@ -76,9 +78,13 @@ func TestHPA(t *testing.T) { assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - assert.Equal(t, 1, len(hpa.Spec.Metrics)) - assert.Equal(t, corev1.ResourceCPU, hpa.Spec.Metrics[0].Resource.Name) - assert.Equal(t, int32(90), *hpa.Spec.Metrics[0].Resource.Target.AverageUtilization) + for _, metric := range hpa.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) + } + } } else { hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) @@ -87,9 +93,15 @@ func TestHPA(t *testing.T) { assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - assert.Equal(t, 1, len(hpa.Spec.Metrics)) - assert.Equal(t, corev1.ResourceCPU, hpa.Spec.Metrics[0].Resource.Name) - assert.Equal(t, int32(90), *hpa.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.Equal(t, 2, len(hpa.Spec.Metrics)) + + for _, metric := range hpa.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) + } + } } }) } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 1f8435ff1..d5df719b0 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -20,6 +20,7 @@ import ( autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" @@ -127,7 +128,15 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV } else { updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics[0].Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization + + // This will update memory and CPU usage for now, and can be used to update other metrics in the future + for _, metric := range updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + metric.Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization + } else if metric.Resource.Name == corev1.ResourceMemory { + metric.Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetMemoryUtilization + } + } } } } diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 04e52e7be..15f4aed64 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -1,3 +1,6 @@ +# This creates two different deployments. The first one will be used to see if we scale properly. (Note that we are +# only scaling up to 2 because of limitations of KUTTL). The second is to check the targetCPUUtilization option. +# apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: diff --git a/tests/e2e/autoscale/01-assert.yaml b/tests/e2e/autoscale/01-assert.yaml index 2c2eec023..76c712f7a 100644 --- a/tests/e2e/autoscale/01-assert.yaml +++ b/tests/e2e/autoscale/01-assert.yaml @@ -1,3 +1,4 @@ +# Wait until tracegen has completed and the simplest deployment has scaled up to 2 apiVersion: batch/v1 kind: Job metadata: diff --git a/tests/e2e/autoscale/02-assert.yaml b/tests/e2e/autoscale/02-assert.yaml index fb4e052f2..c610ad3f0 100644 --- a/tests/e2e/autoscale/02-assert.yaml +++ b/tests/e2e/autoscale/02-assert.yaml @@ -1,3 +1,4 @@ +# Wait for the collector to scale back down to 1 apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector From ce30a35357a3129ba57b907b34e6b5052ecc155e Mon Sep 17 00:00:00 2001 From: Kevin Earls Date: Thu, 1 Dec 2022 10:48:51 +0100 Subject: [PATCH 0676/1234] Ignore reconcile errors that occur because a pod is being terminated (#1233) * Ignore reconcile errors that occur because a pod is being terminated Signed-off-by: Kevin Earls * Appease the all powerfull linter Signed-off-by: Kevin Earls * Change behavior to end reconcile loop if pod has been terminated Signed-off-by: Kevin Earls * Print a log message if we exit the reconciler loop Signed-off-by: Kevin Earls * Look for NamespaceTerminatingCause Signed-off-by: Kevin Earls * Appease the almighty linter Signed-off-by: Kevin Earls * Fix log message Signed-off-by: Kevin Earls * Skip flaky test Signed-off-by: Kevin Earls Signed-off-by: Kevin Earls Co-authored-by: Ben B --- cmd/otel-allocator/allocation/least_weighted_test.go | 1 + controllers/opentelemetrycollector_controller.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index 281254196..f70d5025f 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -181,6 +181,7 @@ func TestNoCollectorReassignment(t *testing.T) { } func TestSmartCollectorReassignment(t *testing.T) { + t.Skip("This test is flaky and fails frequently, see issue 1291") s, _ := New("least-weighted", logger) cols := makeNCollectors(4, 0) diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 8e986c469..6d3bb96a6 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -168,6 +168,11 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { for _, task := range r.tasks { if err := task.Do(ctx, params); err != nil { + // If we get an error that occurs because a pod is being terminated, then exit this loop + if apierrors.IsForbidden(err) && apierrors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { + r.log.V(2).Info("Exiting reconcile loop because namespace is being terminated", "namespace", params.Instance.Namespace) + return nil + } r.log.Error(err, fmt.Sprintf("failed to reconcile %s", task.Name)) if task.BailOnError { return err From eb51a095c820f49f2ec029f6983a23c9d6d3013c Mon Sep 17 00:00:00 2001 From: Ben B Date: Thu, 1 Dec 2022 18:19:04 +0100 Subject: [PATCH 0677/1234] Add change handler to register callbacks (#1292) * config: move onChange callback list methods into a thread-safe wrapper Signed-off-by: Benedikt Bongartz * config: keep change handler private Signed-off-by: Benedikt Bongartz * follow naming recommendations Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- internal/config/change_handler.go | 63 ++++++++++++++++++++++++++ internal/config/change_handler_test.go | 41 +++++++++++++++++ internal/config/main.go | 20 ++++---- internal/config/main_test.go | 4 +- internal/config/options.go | 10 ++-- 5 files changed, 123 insertions(+), 15 deletions(-) create mode 100644 internal/config/change_handler.go create mode 100644 internal/config/change_handler_test.go diff --git a/internal/config/change_handler.go b/internal/config/change_handler.go new file mode 100644 index 000000000..46646c712 --- /dev/null +++ b/internal/config/change_handler.go @@ -0,0 +1,63 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package config contains the operator's runtime configuration. +package config + +import ( + "sync" + + "github.com/go-logr/logr" + logf "sigs.k8s.io/controller-runtime/pkg/log" +) + +// changeHandler is implemented by any structure that is able to register callbacks +// and call them using one single method. +type changeHandler interface { + // Do will call every registered callback. + Do() error + // Register this function as a callback that will be executed when Do() is called. + Register(f func() error) +} + +// newOnChange returns a thread-safe ChangeHandler. +func newOnChange() changeHandler { + return &onChange{ + logger: logf.Log.WithName("change-handler"), + } +} + +type onChange struct { + logger logr.Logger + + callbacks []func() error + muCallbacks sync.Mutex +} + +func (o *onChange) Do() error { + o.muCallbacks.Lock() + defer o.muCallbacks.Unlock() + for _, fn := range o.callbacks { + if err := fn(); err != nil { + o.logger.Error(err, "change callback failed") + } + } + return nil +} + +func (o *onChange) Register(f func() error) { + o.muCallbacks.Lock() + defer o.muCallbacks.Unlock() + o.callbacks = append(o.callbacks, f) +} diff --git a/internal/config/change_handler_test.go b/internal/config/change_handler_test.go new file mode 100644 index 000000000..069ffa3f8 --- /dev/null +++ b/internal/config/change_handler_test.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package config contains the operator's runtime configuration. +package config + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestChangeHandler(t *testing.T) { + // prepare + internal := 0 + callback := func() error { + internal += 1 + return nil + } + h := newOnChange() + + h.Register(callback) + + for i := 0; i < 5; i++ { + assert.Equal(t, i, internal) + require.NoError(t, h.Do()) + assert.Equal(t, i+1, internal) + } +} diff --git a/internal/config/main.go b/internal/config/main.go index 05c83776f..69f5ea952 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -44,7 +44,7 @@ type Config struct { targetAllocatorConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string - onChange []func() error + onPlatformChange changeHandler labelsFilter []string platform platform.Platform autoDetectFrequency time.Duration @@ -62,6 +62,7 @@ func New(opts ...Option) Config { platform: platform.Unknown, version: version.Get(), autoscalingVersion: autodetect.DefaultAutoscalingVersion, + onPlatformChange: newOnChange(), } for _, opt := range opts { opt(&o) @@ -75,7 +76,7 @@ func New(opts ...Option) Config { targetAllocatorImage: o.targetAllocatorImage, targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, logger: o.logger, - onChange: o.onChange, + onPlatformChange: o.onPlatformChange, platform: o.platform, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, @@ -125,12 +126,9 @@ func (c *Config) AutoDetect() error { } if changed { - for _, callback := range c.onChange { - if err := callback(); err != nil { - // we don't fail if the callback failed, as the auto-detection itself - // did work - c.logger.Error(err, "configuration change notification failed for callback") - } + if err := c.onPlatformChange.Do(); err != nil { + // Don't fail if the callback failed, as auto-detection itself worked. + c.logger.Error(err, "configuration change notification failed for callback") } } @@ -198,3 +196,9 @@ func (c *Config) AutoInstrumentationDotNetImage() string { func (c *Config) LabelsFilter() []string { return c.labelsFilter } + +// RegisterPlatformChangeCallback registers the given function as a callback that +// is called when the platform detection detects a change. +func (c *Config) RegisterPlatformChangeCallback(f func() error) { + c.onPlatformChange.Register(f) +} diff --git a/internal/config/main_test.go b/internal/config/main_test.go index fbdc6d899..92c8ad885 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -41,7 +41,7 @@ func TestNewConfig(t *testing.T) { assert.Equal(t, platform.Kubernetes, cfg.Platform()) } -func TestCallbackOnChanges(t *testing.T) { +func TestOnPlatformChangeCallback(t *testing.T) { // prepare calledBack := false mock := &mockAutoDetect{ @@ -51,7 +51,7 @@ func TestCallbackOnChanges(t *testing.T) { } cfg := config.New( config.WithAutoDetect(mock), - config.WithOnChange(func() error { + config.WithOnPlatformChangeCallback(func() error { calledBack = true return nil }), diff --git a/internal/config/options.go b/internal/config/options.go index a3846ce15..34b5b13dd 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -41,7 +41,7 @@ type options struct { collectorConfigMapEntry string targetAllocatorConfigMapEntry string targetAllocatorImage string - onChange []func() error + onPlatformChange changeHandler labelsFilter []string platform platform.Platform autoDetectFrequency time.Duration @@ -84,12 +84,12 @@ func WithLogger(logger logr.Logger) Option { o.logger = logger } } -func WithOnChange(f func() error) Option { +func WithOnPlatformChangeCallback(f func() error) Option { return func(o *options) { - if o.onChange == nil { - o.onChange = []func() error{} + if o.onPlatformChange == nil { + o.onPlatformChange = newOnChange() } - o.onChange = append(o.onChange, f) + o.onPlatformChange.Register(f) } } func WithPlatform(plt platform.Platform) Option { From 0a30663116be9851985f9817f0853d4204e16a1e Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 6 Dec 2022 12:00:11 -0500 Subject: [PATCH 0678/1234] Memory improvements first pass (#1293) * Memory improvements first pass * Comments, store hash * Fix linting and tests * Update, more tests and benchmarks, notes * linting --- .../allocation/consistent_hashing.go | 60 ++++++- .../allocation/consistent_hashing_test.go | 1 - cmd/otel-allocator/allocation/http.go | 55 +----- cmd/otel-allocator/allocation/http_test.go | 162 +++++++++--------- .../allocation/least_weighted.go | 55 +++++- cmd/otel-allocator/allocation/strategy.go | 35 ++-- .../allocation/strategy_test.go | 102 +++++++++++ cmd/otel-allocator/diff/diff.go | 27 ++- cmd/otel-allocator/diff/diff_test.go | 73 +++++--- cmd/otel-allocator/discovery/discovery.go | 6 +- .../discovery/discovery_test.go | 3 +- cmd/otel-allocator/go.mod | 4 +- cmd/otel-allocator/go.sum | 4 +- cmd/otel-allocator/main.go | 48 ++++-- cmd/otel-allocator/prehook/relabel.go | 2 +- cmd/otel-allocator/target/target.go | 24 ++- 16 files changed, 431 insertions(+), 230 deletions(-) create mode 100644 cmd/otel-allocator/allocation/strategy_test.go diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index bccd8100b..962e133ed 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -43,11 +43,16 @@ type consistentHashingAllocator struct { consistentHasher *consistent.Consistent // collectors is a map from a Collector's name to a Collector instance + // collectorKey -> collector pointer collectors map[string]*Collector // targetItems is a map from a target item's hash to the target items allocated state + // targetItem hash -> target item pointer targetItems map[string]*target.Item + // collectorKey -> job -> target item hash -> true + targetItemsPerJobPerCollector map[string]map[string]map[string]bool + log logr.Logger filter Filter @@ -62,10 +67,11 @@ func newConsistentHashingAllocator(log logr.Logger, opts ...AllocationOption) Al } consistentHasher := consistent.New(nil, config) chAllocator := &consistentHashingAllocator{ - consistentHasher: consistentHasher, - collectors: make(map[string]*Collector), - targetItems: make(map[string]*target.Item), - log: log, + consistentHasher: consistentHasher, + collectors: make(map[string]*Collector), + targetItems: make(map[string]*target.Item), + targetItemsPerJobPerCollector: make(map[string]map[string]map[string]bool), + log: log, } for _, opt := range opts { opt(chAllocator) @@ -79,19 +85,36 @@ func (c *consistentHashingAllocator) SetFilter(filter Filter) { c.filter = filter } +// addCollectorTargetItemMapping keeps track of which collector has which jobs and targets +// this allows the allocator to respond without any extra allocations to http calls. The caller of this method +// has to acquire a lock. +func (c *consistentHashingAllocator) addCollectorTargetItemMapping(tg *target.Item) { + if c.targetItemsPerJobPerCollector[tg.CollectorName] == nil { + c.targetItemsPerJobPerCollector[tg.CollectorName] = make(map[string]map[string]bool) + } + if c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] == nil { + c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] = make(map[string]bool) + } + c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName][tg.Hash()] = true +} + // addTargetToTargetItems assigns a target to the collector based on its hash and adds it to the allocator's targetItems // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. // This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. // INVARIANT: c.collectors must have at least 1 collector set. +// NOTE: by not creating a new target item, there is the potential for a race condition where we modify this target +// item while it's being encoded by the server JSON handler. func (c *consistentHashingAllocator) addTargetToTargetItems(tg *target.Item) { // Check if this is a reassignment, if so, decrement the previous collector's NumTargets if previousColName, ok := c.collectors[tg.CollectorName]; ok { previousColName.NumTargets-- + delete(c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName], tg.Hash()) TargetsPerCollector.WithLabelValues(previousColName.String(), consistentHashingStrategyName).Set(float64(c.collectors[previousColName.String()].NumTargets)) } colOwner := c.consistentHasher.LocateKey([]byte(tg.Hash())) - targetItem := target.NewItem(tg.JobName, tg.TargetURL, tg.Label, colOwner.String()) - c.targetItems[targetItem.Hash()] = targetItem + tg.CollectorName = colOwner.String() + c.targetItems[tg.Hash()] = tg + c.addCollectorTargetItemMapping(tg) c.collectors[colOwner.String()].NumTargets++ TargetsPerCollector.WithLabelValues(colOwner.String(), consistentHashingStrategyName).Set(float64(c.collectors[colOwner.String()].NumTargets)) } @@ -107,6 +130,7 @@ func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*target.Ite col := c.collectors[target.CollectorName] col.NumTargets-- delete(c.targetItems, k) + delete(c.targetItemsPerJobPerCollector[target.CollectorName][target.JobName], target.Hash()) TargetsPerCollector.WithLabelValues(target.CollectorName, consistentHashingStrategyName).Set(float64(col.NumTargets)) } } @@ -130,6 +154,7 @@ func (c *consistentHashingAllocator) handleCollectors(diff diff.Changes[*Collect // Clear removed collectors for _, k := range diff.Removals() { delete(c.collectors, k.Name) + delete(c.targetItemsPerJobPerCollector, k.Name) c.consistentHasher.Remove(k.Name) TargetsPerCollector.WithLabelValues(k.Name, consistentHashingStrategyName).Set(0) } @@ -155,7 +180,7 @@ func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) if c.filter != nil { targets = c.filter.Apply(targets) } - RecordTargetsKeptPerJob(targets) + RecordTargetsKept(targets) c.m.Lock() defer c.m.Unlock() @@ -175,13 +200,12 @@ func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. // This method is called when Collectors are added or removed. func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collector) { - log := c.log.WithValues("component", "opentelemetry-targetallocator") timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", consistentHashingStrategyName)) defer timer.ObserveDuration() CollectorsAllocatable.WithLabelValues(consistentHashingStrategyName).Set(float64(len(collectors))) if len(collectors) == 0 { - log.Info("No collector instances present") + c.log.Info("No collector instances present") return } @@ -195,6 +219,24 @@ func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collec } } +func (c *consistentHashingAllocator) GetTargetsForCollectorAndJob(collector string, job string) []*target.Item { + c.m.RLock() + defer c.m.RUnlock() + if _, ok := c.targetItemsPerJobPerCollector[collector]; !ok { + return []*target.Item{} + } + if _, ok := c.targetItemsPerJobPerCollector[collector][job]; !ok { + return []*target.Item{} + } + targetItemsCopy := make([]*target.Item, len(c.targetItemsPerJobPerCollector[collector][job])) + index := 0 + for targetHash := range c.targetItemsPerJobPerCollector[collector][job] { + targetItemsCopy[index] = c.targetItems[targetHash] + index++ + } + return targetItemsCopy +} + // TargetItems returns a shallow copy of the targetItems map. func (c *consistentHashingAllocator) TargetItems() map[string]*target.Item { c.m.RLock() diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go index 31ac9c200..4a719a216 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -46,7 +46,6 @@ func TestRelativelyEvenDistribution(t *testing.T) { actualCollectors := c.Collectors() assert.Len(t, actualCollectors, numCols) for _, col := range actualCollectors { - t.Logf("col: %s \ttargets: %d", col.Name, col.NumTargets) assert.InDelta(t, col.NumTargets, expectedPerCollector, expectedDelta) } } diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go index 4d373b6fd..a6e72c1d8 100644 --- a/cmd/otel-allocator/allocation/http.go +++ b/cmd/otel-allocator/allocation/http.go @@ -18,61 +18,24 @@ import ( "fmt" "net/url" - "github.com/prometheus/common/model" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) type collectorJSON struct { - Link string `json:"_link"` - Jobs []targetGroupJSON `json:"targets"` -} - -type targetGroupJSON struct { - Targets []string `json:"targets"` - Labels model.LabelSet `json:"labels"` + Link string `json:"_link"` + Jobs []*target.Item `json:"targets"` } -func GetAllTargetsByJob(job string, cMap map[string][]target.Item, allocator Allocator) map[string]collectorJSON { +// GetAllTargetsByJob is a relatively expensive call that is usually only used for debugging purposes. +func GetAllTargetsByJob(allocator Allocator, job string) map[string]collectorJSON { displayData := make(map[string]collectorJSON) - for _, j := range allocator.TargetItems() { - if j.JobName == job { - var targetList []target.Item - targetList = append(targetList, cMap[j.CollectorName+j.JobName]...) - - var targetGroupList []targetGroupJSON - - for _, t := range targetList { - targetGroupList = append(targetGroupList, targetGroupJSON{ - Targets: []string{t.TargetURL}, - Labels: t.Label, - }) - } - - displayData[j.CollectorName] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(j.JobName), j.CollectorName), Jobs: targetGroupList} - - } + for _, col := range allocator.Collectors() { + items := allocator.GetTargetsForCollectorAndJob(col.Name, job) + displayData[col.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(job), col.Name), Jobs: items} } return displayData } -func GetAllTargetsByCollectorAndJob(collector string, job string, cMap map[string][]target.Item, allocator Allocator) []targetGroupJSON { - var tgs []targetGroupJSON - group := make(map[string]target.Item) - labelSet := make(map[string]model.LabelSet) - if _, ok := allocator.Collectors()[collector]; ok { - for _, targetItemArr := range cMap { - for _, targetItem := range targetItemArr { - if targetItem.CollectorName == collector && targetItem.JobName == job { - group[targetItem.Label.String()] = targetItem - labelSet[targetItem.Hash()] = targetItem.Label - } - } - } - } - for _, v := range group { - tgs = append(tgs, targetGroupJSON{Targets: []string{v.TargetURL}, Labels: labelSet[v.Hash()]}) - } - - return tgs +func GetAllTargetsByCollectorAndJob(allocator Allocator, collector string, job string) []*target.Item { + return allocator.GetTargetsForCollectorAndJob(collector, job) } diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go index c3d6967d1..586b833f7 100644 --- a/cmd/otel-allocator/allocation/http_test.go +++ b/cmd/otel-allocator/allocation/http_test.go @@ -15,7 +15,7 @@ package allocation import ( - "reflect" + "fmt" "testing" "github.com/prometheus/common/model" @@ -24,11 +24,21 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) +var ( + baseLabelSet = model.LabelSet{ + "test-label": "test-value", + } + testJobLabelSetTwo = model.LabelSet{ + "test-label": "test-value2", + } + baseTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") + testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") + secondTargetItem = target.NewItem("test-job2", "test-url", baseLabelSet, "test-collector") +) + func TestGetAllTargetsByCollectorAndJob(t *testing.T) { - baseAllocator, _ := New("least-weighted", logger) - baseAllocator.SetCollectors(map[string]*Collector{"test-collector": {Name: "test-collector"}}) - statefulAllocator, _ := New("least-weighted", logger) - statefulAllocator.SetCollectors(map[string]*Collector{"test-collector-0": {Name: "test-collector-0"}}) + leastWeighted, _ := New(leastWeightedStrategyName, logger) + leastWeighted.SetCollectors(map[string]*Collector{"test-collector": {Name: "test-collector"}}) type args struct { collector string job string @@ -38,7 +48,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { var tests = []struct { name string args args - want []targetGroupJSON + want []target.Item }{ { name: "Empty target map", @@ -46,7 +56,7 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { collector: "test-collector", job: "test-job", cMap: map[string][]target.Item{}, - allocator: baseAllocator, + allocator: leastWeighted, }, want: nil, }, @@ -57,21 +67,14 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { job: "test-job", cMap: map[string][]target.Item{ "test-collectortest-job": { - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - }, - TargetURL: "test-url", - CollectorName: "test-collector", - }, + *baseTargetItem, }, }, - allocator: baseAllocator, + allocator: leastWeighted, }, - want: []targetGroupJSON{ + want: []target.Item{ { - Targets: []string{"test-url"}, + TargetURL: []string{"test-url"}, Labels: map[model.LabelName]model.LabelValue{ "test-label": "test-value", }, @@ -85,31 +88,17 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { job: "test-job", cMap: map[string][]target.Item{ "test-collectortest-job": { - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - }, - TargetURL: "test-url", - CollectorName: "test-collector", - }, + *baseTargetItem, }, "test-collectortest-job2": { - target.Item{ - JobName: "test-job2", - Label: model.LabelSet{ - "test-label": "test-value", - }, - TargetURL: "test-url", - CollectorName: "test-collector", - }, + *secondTargetItem, }, }, - allocator: baseAllocator, + allocator: leastWeighted, }, - want: []targetGroupJSON{ + want: []target.Item{ { - Targets: []string{"test-url"}, + TargetURL: []string{"test-url"}, Labels: map[model.LabelName]model.LabelValue{ "test-label": "test-value", }, @@ -123,41 +112,26 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { job: "test-job", cMap: map[string][]target.Item{ "test-collectortest-job": { - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - "foo": "bar", - }, - TargetURL: "test-url1", - CollectorName: "test-collector", - }, + *baseTargetItem, }, "test-collectortest-job2": { - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - }, - TargetURL: "test-url2", - CollectorName: "test-collector", - }, + *testJobTargetItemTwo, }, }, - allocator: baseAllocator, + allocator: leastWeighted, }, - want: []targetGroupJSON{ + want: []target.Item{ { - Targets: []string{"test-url1"}, + TargetURL: []string{"test-url1"}, Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", + "test-label": "test-value-1", "foo": "bar", }, }, { - Targets: []string{"test-url2"}, + TargetURL: []string{"test-url2"}, Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", + "test-label": "test-value-2", }, }, }, @@ -169,37 +143,22 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { job: "test-job", cMap: map[string][]target.Item{ "test-collectortest-job": { - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - "foo": "bar", - }, - TargetURL: "test-url", - CollectorName: "test-collector", - }, - target.Item{ - JobName: "test-job", - Label: model.LabelSet{ - "test-label": "test-value", - }, - TargetURL: "test-url", - CollectorName: "test-collector", - }, + *baseTargetItem, + *baseTargetItem, }, }, - allocator: baseAllocator, + allocator: leastWeighted, }, - want: []targetGroupJSON{ + want: []target.Item{ { - Targets: []string{"test-url"}, + TargetURL: []string{"test-url"}, Labels: map[model.LabelName]model.LabelValue{ "test-label": "test-value", "foo": "bar", }, }, { - Targets: []string{"test-url"}, + TargetURL: []string{"test-url"}, Labels: map[model.LabelName]model.LabelValue{ "test-label": "test-value", }, @@ -209,16 +168,49 @@ func TestGetAllTargetsByCollectorAndJob(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - targetGroups := GetAllTargetsByCollectorAndJob(tt.args.collector, tt.args.job, tt.args.cMap, tt.args.allocator) + targetGroups := GetAllTargetsByCollectorAndJob(tt.args.allocator, tt.args.collector, tt.args.job) for _, wantGroupJson := range tt.want { - exist := false for _, groupJSON := range targetGroups { if groupJSON.Labels.String() == wantGroupJson.Labels.String() { - exist = reflect.DeepEqual(groupJSON, wantGroupJson) + assert.Equal(t, wantGroupJson, groupJSON) } } - assert.Equal(t, true, exist) } }) } } + +func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) { + var table = []struct { + numCollectors int + numJobs int + }{ + {numCollectors: 100, numJobs: 100}, + {numCollectors: 100, numJobs: 1000}, + {numCollectors: 100, numJobs: 10000}, + {numCollectors: 100, numJobs: 100000}, + {numCollectors: 1000, numJobs: 100}, + {numCollectors: 1000, numJobs: 1000}, + {numCollectors: 1000, numJobs: 10000}, + {numCollectors: 1000, numJobs: 100000}, + } + for _, s := range GetRegisteredAllocatorNames() { + for _, v := range table { + a, err := New(s, logger) + if err != nil { + b.Log(err) + b.Fail() + } + cols := makeNCollectors(v.numCollectors, 0) + jobs := makeNNewTargets(v.numJobs, v.numCollectors, 0) + a.SetCollectors(cols) + a.SetTargets(jobs) + b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numJobs), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + GetAllTargetsByCollectorAndJob(a, fmt.Sprintf("collector-%d", v.numCollectors/2), fmt.Sprintf("test-job-%d", v.numJobs/2)) + } + }) + } + } +} diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 717c147d9..08a55059e 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -47,6 +47,9 @@ type leastWeightedAllocator struct { // targetItems is a map from a target item's hash to the target items allocated state targetItems map[string]*target.Item + // collectorKey -> job -> target item hash -> true + targetItemsPerJobPerCollector map[string]map[string]map[string]bool + log logr.Logger filter Filter @@ -57,6 +60,24 @@ func (allocator *leastWeightedAllocator) SetFilter(filter Filter) { allocator.filter = filter } +func (allocator *leastWeightedAllocator) GetTargetsForCollectorAndJob(collector string, job string) []*target.Item { + allocator.m.RLock() + defer allocator.m.RUnlock() + if _, ok := allocator.targetItemsPerJobPerCollector[collector]; !ok { + return []*target.Item{} + } + if _, ok := allocator.targetItemsPerJobPerCollector[collector][job]; !ok { + return []*target.Item{} + } + targetItemsCopy := make([]*target.Item, len(allocator.targetItemsPerJobPerCollector[collector][job])) + index := 0 + for targetHash := range allocator.targetItemsPerJobPerCollector[collector][job] { + targetItemsCopy[index] = allocator.targetItems[targetHash] + index++ + } + return targetItemsCopy +} + // TargetItems returns a shallow copy of the targetItems map. func (allocator *leastWeightedAllocator) TargetItems() map[string]*target.Item { allocator.m.RLock() @@ -96,14 +117,30 @@ func (allocator *leastWeightedAllocator) findNextCollector() *Collector { return col } +// addCollectorTargetItemMapping keeps track of which collector has which jobs and targets +// this allows the allocator to respond without any extra allocations to http calls. The caller of this method +// has to acquire a lock. +func (allocator *leastWeightedAllocator) addCollectorTargetItemMapping(tg *target.Item) { + if allocator.targetItemsPerJobPerCollector[tg.CollectorName] == nil { + allocator.targetItemsPerJobPerCollector[tg.CollectorName] = make(map[string]map[string]bool) + } + if allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] == nil { + allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] = make(map[string]bool) + } + allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName][tg.Hash()] = true +} + // addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems // This method is called from within SetTargets and SetCollectors, which acquire the needed lock. // This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. // INVARIANT: allocator.collectors must have at least 1 collector set. +// NOTE: by not creating a new target item, there is the potential for a race condition where we modify this target +// item while it's being encoded by the server JSON handler. func (allocator *leastWeightedAllocator) addTargetToTargetItems(tg *target.Item) { chosenCollector := allocator.findNextCollector() - targetItem := target.NewItem(tg.JobName, tg.TargetURL, tg.Label, chosenCollector.Name) - allocator.targetItems[targetItem.Hash()] = targetItem + tg.CollectorName = chosenCollector.Name + allocator.targetItems[tg.Hash()] = tg + allocator.addCollectorTargetItemMapping(tg) chosenCollector.NumTargets++ TargetsPerCollector.WithLabelValues(chosenCollector.Name, leastWeightedStrategyName).Set(float64(chosenCollector.NumTargets)) } @@ -119,6 +156,7 @@ func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*target c := allocator.collectors[target.CollectorName] c.NumTargets-- delete(allocator.targetItems, k) + delete(allocator.targetItemsPerJobPerCollector[target.CollectorName][target.JobName], target.Hash()) TargetsPerCollector.WithLabelValues(target.CollectorName, leastWeightedStrategyName).Set(float64(c.NumTargets)) } } @@ -142,6 +180,7 @@ func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Col // Clear removed collectors for _, k := range diff.Removals() { delete(allocator.collectors, k.Name) + delete(allocator.targetItemsPerJobPerCollector, k.Name) TargetsPerCollector.WithLabelValues(k.Name, leastWeightedStrategyName).Set(0) } // Insert the new collectors @@ -167,7 +206,7 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.I if allocator.filter != nil { targets = allocator.filter.Apply(targets) } - RecordTargetsKeptPerJob(targets) + RecordTargetsKept(targets) allocator.m.Lock() defer allocator.m.Unlock() @@ -187,13 +226,12 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.I // SetCollectors sets the set of collectors with key=collectorName, value=Collector object. // This method is called when Collectors are added or removed. func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Collector) { - log := allocator.log.WithValues("component", "opentelemetry-targetallocator") timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", leastWeightedStrategyName)) defer timer.ObserveDuration() CollectorsAllocatable.WithLabelValues(leastWeightedStrategyName).Set(float64(len(collectors))) if len(collectors) == 0 { - log.Info("No collector instances present") + allocator.log.Info("No collector instances present") return } @@ -209,9 +247,10 @@ func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Co func newLeastWeightedAllocator(log logr.Logger, opts ...AllocationOption) Allocator { lwAllocator := &leastWeightedAllocator{ - log: log, - collectors: make(map[string]*Collector), - targetItems: make(map[string]*target.Item), + log: log, + collectors: make(map[string]*Collector), + targetItems: make(map[string]*target.Item), + targetItemsPerJobPerCollector: make(map[string]map[string]map[string]bool), } for _, opt := range opts { diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go index 14bcca3e5..b99455773 100644 --- a/cmd/otel-allocator/allocation/strategy.go +++ b/cmd/otel-allocator/allocation/strategy.go @@ -45,10 +45,10 @@ var ( Name: "opentelemetry_allocator_time_to_allocate", Help: "The time it takes to allocate", }, []string{"method", "strategy"}) - targetsKeptPerJob = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_targets_kept", + targetsRemaining = promauto.NewCounter(prometheus.CounterOpts{ + Name: "opentelemetry_allocator_targets_remaining", Help: "Number of targets kept after filtering.", - }, []string{"job_name"}) + }) ) type AllocationOption func(Allocator) @@ -63,23 +63,13 @@ func WithFilter(filter Filter) AllocationOption { } } -func RecordTargetsKeptPerJob(targets map[string]*target.Item) map[string]float64 { - targetsPerJob := make(map[string]float64) - - for _, tItem := range targets { - targetsPerJob[tItem.JobName] += 1 - } - - for jName, numTargets := range targetsPerJob { - targetsKeptPerJob.WithLabelValues(jName).Set(numTargets) - } - - return targetsPerJob +func RecordTargetsKept(targets map[string]*target.Item) { + targetsRemaining.Add(float64(len(targets))) } func New(name string, log logr.Logger, opts ...AllocationOption) (Allocator, error) { if p, ok := registry[name]; ok { - return p(log, opts...), nil + return p(log.WithValues("allocator", name), opts...), nil } return nil, fmt.Errorf("unregistered strategy: %s", name) } @@ -92,11 +82,20 @@ func Register(name string, provider AllocatorProvider) error { return nil } +func GetRegisteredAllocatorNames() []string { + var names []string + for s := range registry { + names = append(names, s) + } + return names +} + type Allocator interface { SetCollectors(collectors map[string]*Collector) SetTargets(targets map[string]*target.Item) TargetItems() map[string]*target.Item Collectors() map[string]*Collector + GetTargetsForCollectorAndJob(collector string, job string) []*target.Item SetFilter(filter Filter) } @@ -110,6 +109,10 @@ type Collector struct { NumTargets int } +func (c Collector) Hash() string { + return c.Name +} + func (c Collector) String() string { return c.Name } diff --git a/cmd/otel-allocator/allocation/strategy_test.go b/cmd/otel-allocator/allocation/strategy_test.go new file mode 100644 index 000000000..292722019 --- /dev/null +++ b/cmd/otel-allocator/allocation/strategy_test.go @@ -0,0 +1,102 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package allocation + +import ( + "fmt" + "reflect" + "testing" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" +) + +func Benchmark_Setting(b *testing.B) { + var table = []struct { + numCollectors int + numTargets int + }{ + {numCollectors: 100, numTargets: 100}, + {numCollectors: 100, numTargets: 1000}, + {numCollectors: 100, numTargets: 10000}, + {numCollectors: 100, numTargets: 100000}, + {numCollectors: 1000, numTargets: 100}, + {numCollectors: 1000, numTargets: 1000}, + {numCollectors: 1000, numTargets: 10000}, + {numCollectors: 1000, numTargets: 100000}, + } + + for _, s := range GetRegisteredAllocatorNames() { + for _, v := range table { + // prepare allocator with 3 collectors and 'random' amount of targets + a, _ := New(s, logger) + cols := makeNCollectors(v.numCollectors, 0) + targets := makeNNewTargets(v.numTargets, v.numCollectors, 0) + b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numTargets), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + a.SetCollectors(cols) + a.SetTargets(targets) + } + }) + } + } +} + +func TestCollectorDiff(t *testing.T) { + collector0 := NewCollector("collector-0") + collector1 := NewCollector("collector-1") + collector2 := NewCollector("collector-2") + collector3 := NewCollector("collector-3") + collector4 := NewCollector("collector-4") + type args struct { + current map[string]*Collector + new map[string]*Collector + } + tests := []struct { + name string + args args + want diff.Changes[*Collector] + }{ + { + name: "diff two collector maps", + args: args{ + current: map[string]*Collector{ + "collector-0": collector0, + "collector-1": collector1, + "collector-2": collector2, + "collector-3": collector3, + }, + new: map[string]*Collector{ + "collector-0": collector0, + "collector-1": collector1, + "collector-2": collector2, + "collector-4": collector4, + }, + }, + want: diff.NewChanges(map[string]*Collector{ + "collector-4": collector4, + }, map[string]*Collector{ + "collector-3": collector3, + }), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := diff.Maps(tt.args.current, tt.args.new); !reflect.DeepEqual(got, tt.want) { + t.Errorf("DiffMaps() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/cmd/otel-allocator/diff/diff.go b/cmd/otel-allocator/diff/diff.go index 4bb201cfc..93bed4dae 100644 --- a/cmd/otel-allocator/diff/diff.go +++ b/cmd/otel-allocator/diff/diff.go @@ -16,11 +16,19 @@ package diff // Changes is the result of the difference between two maps – items that are added and items that are removed // This map is used to reconcile state differences. -type Changes[T any] struct { +type Changes[T Hasher] struct { additions map[string]T removals map[string]T } +type Hasher interface { + Hash() string +} + +func NewChanges[T Hasher](additions map[string]T, removals map[string]T) Changes[T] { + return Changes[T]{additions: additions, removals: removals} +} + func (c Changes[T]) Additions() map[string]T { return c.additions } @@ -31,19 +39,20 @@ func (c Changes[T]) Removals() map[string]T { // Maps generates Changes for two maps with the same type signature by checking for any removals and then checking for // additions. -func Maps[T any](current, new map[string]T) Changes[T] { +// TODO: This doesn't need to create maps, it can return slices only. This function doesn't need to insert the values. +func Maps[T Hasher](current, new map[string]T) Changes[T] { additions := map[string]T{} removals := map[string]T{} - // Used as a set to check for removed items - newMembership := map[string]bool{} - for key, value := range new { - if _, found := current[key]; !found { - additions[key] = value + for key, newValue := range new { + if currentValue, found := current[key]; !found { + additions[key] = newValue + } else if currentValue.Hash() != newValue.Hash() { + additions[key] = newValue + removals[key] = currentValue } - newMembership[key] = true } for key, value := range current { - if _, found := newMembership[key]; !found { + if _, found := new[key]; !found { removals[key] = value } } diff --git a/cmd/otel-allocator/diff/diff_test.go b/cmd/otel-allocator/diff/diff_test.go index 9dec103b7..7b8cda5b3 100644 --- a/cmd/otel-allocator/diff/diff_test.go +++ b/cmd/otel-allocator/diff/diff_test.go @@ -19,51 +19,82 @@ import ( "testing" ) +type HasherString string + +func (s HasherString) Hash() string { + return string(s) +} + func TestDiffMaps(t *testing.T) { type args struct { - current map[string]string - new map[string]string + current map[string]Hasher + new map[string]Hasher } tests := []struct { name string args args - want Changes[string] + want Changes[Hasher] }{ { name: "basic replacement", args: args{ - current: map[string]string{ - "current": "one", + current: map[string]Hasher{ + "current": HasherString("one"), }, - new: map[string]string{ - "new": "another", + new: map[string]Hasher{ + "new": HasherString("another"), }, }, - want: Changes[string]{ - additions: map[string]string{ - "new": "another", + want: Changes[Hasher]{ + additions: map[string]Hasher{ + "new": HasherString("another"), }, - removals: map[string]string{ - "current": "one", + removals: map[string]Hasher{ + "current": HasherString("one"), }, }, }, { name: "single addition", args: args{ - current: map[string]string{ - "current": "one", + current: map[string]Hasher{ + "current": HasherString("one"), + }, + new: map[string]Hasher{ + "current": HasherString("one"), + "new": HasherString("another"), + }, + }, + want: Changes[Hasher]{ + additions: map[string]Hasher{ + "new": HasherString("another"), + }, + removals: map[string]Hasher{}, + }, + }, + { + name: "value change", + args: args{ + current: map[string]Hasher{ + "k1": HasherString("v1"), + "k2": HasherString("v2"), + "change": HasherString("before"), }, - new: map[string]string{ - "current": "one", - "new": "another", + new: map[string]Hasher{ + "k1": HasherString("v1"), + "k3": HasherString("v3"), + "change": HasherString("after"), }, }, - want: Changes[string]{ - additions: map[string]string{ - "new": "another", + want: Changes[Hasher]{ + additions: map[string]Hasher{ + "k3": HasherString("v3"), + "change": HasherString("after"), + }, + removals: map[string]Hasher{ + "k2": HasherString("v2"), + "change": HasherString("before"), }, - removals: map[string]string{}, }, }, } diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go index 814e302ef..fa232ea49 100644 --- a/cmd/otel-allocator/discovery/discovery.go +++ b/cmd/otel-allocator/discovery/discovery.go @@ -114,11 +114,7 @@ func (m *Manager) Watch(fn func(targets map[string]*target.Item)) { for _, tg := range tgs { for _, t := range tg.Targets { count++ - item := &target.Item{ - JobName: jobName, - TargetURL: string(t[model.AddressLabel]), - Label: t.Merge(tg.Labels), - } + item := target.NewItem(jobName, string(t[model.AddressLabel]), t.Merge(tg.Labels), "") targets[item.Hash()] = item } } diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/discovery/discovery_test.go index 11de1b7ee..7ce8a920e 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/discovery/discovery_test.go @@ -59,11 +59,10 @@ func TestDiscovery(t *testing.T) { manager.Watch(func(targets map[string]*target.Item) { var result []string for _, t := range targets { - result = append(result, t.TargetURL) + result = append(result, t.TargetURL[0]) } results <- result }) - for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cfg, err := config.Load(tt.args.file) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 6b5859a4e..cae3c562f 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -3,13 +3,14 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator go 1.19 require ( - github.com/buraksezer/consistent v0.9.0 + github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.4 github.com/ghodss/yaml v1.0.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 + github.com/mitchellh/hashstructure v1.1.0 github.com/prometheus-operator/prometheus-operator v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 @@ -118,7 +119,6 @@ require ( github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/miekg/dns v1.1.50 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/hashstructure v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 7e91669b8..6b8882eb0 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -230,8 +230,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/buraksezer/consistent v0.9.0 h1:Zfs6bX62wbP3QlbPGKUhqDw7SmNkOzY5bHZIYXYpR5g= -github.com/buraksezer/consistent v0.9.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= +github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= +github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 6df8be607..5cc9362d5 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -24,14 +24,16 @@ import ( "syscall" "time" - "github.com/ghodss/yaml" + "github.com/mitchellh/hashstructure" + + yaml2 "github.com/ghodss/yaml" gokitlog "github.com/go-kit/log" "github.com/go-logr/logr" "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" - yaml2 "gopkg.in/yaml.v2" + yaml "gopkg.in/yaml.v2" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ctrl "sigs.k8s.io/controller-runtime" @@ -160,11 +162,13 @@ func main() { } type server struct { - logger logr.Logger - allocator allocation.Allocator - discoveryManager *lbdiscovery.Manager - k8sClient *collector.Client - server *http.Server + logger logr.Logger + allocator allocation.Allocator + discoveryManager *lbdiscovery.Manager + k8sClient *collector.Client + server *http.Server + compareHash uint64 + scrapeConfigResponse []byte } func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, k8sclient *collector.Client, listenAddr *string) *server { @@ -173,6 +177,7 @@ func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager allocator: allocator, discoveryManager: discoveryManager, k8sClient: k8sclient, + compareHash: uint64(0), } router := mux.NewRouter().UseEncodedPath() router.Use(s.PrometheusMiddleware) @@ -220,17 +225,32 @@ func (s *server) Shutdown(ctx context.Context) error { // After that, the YAML is converted in to a JSON format for consumers to use. func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { configs := s.discoveryManager.GetScrapeConfigs() - configBytes, err := yaml2.Marshal(configs) + + hash, err := hashstructure.Hash(configs, nil) if err != nil { + s.logger.Error(err, "failed to hash the config") s.errorHandler(w, err) + return } - jsonConfig, err := yaml.YAMLToJSON(configBytes) - if err != nil { - s.errorHandler(w, err) + // if the hashes are different, we need to recompute the scrape config + if hash != s.compareHash { + configBytes, err := yaml.Marshal(configs) + if err != nil { + s.errorHandler(w, err) + return + } + jsonConfig, err := yaml2.YAMLToJSON(configBytes) + if err != nil { + s.errorHandler(w, err) + return + } + // Update the response and the hash + s.scrapeConfigResponse = jsonConfig + s.compareHash = hash } // We don't use the jsonHandler method because we don't want our bytes to be re-encoded w.Header().Set("Content-Type", "application/json") - _, err = w.Write(jsonConfig) + _, err = w.Write(s.scrapeConfigResponse) if err != nil { s.errorHandler(w, err) } @@ -270,11 +290,11 @@ func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { } if len(q) == 0 { - displayData := allocation.GetAllTargetsByJob(jobId, compareMap, s.allocator) + displayData := allocation.GetAllTargetsByJob(s.allocator, jobId) s.jsonHandler(w, displayData) } else { - tgs := allocation.GetAllTargetsByCollectorAndJob(q[0], jobId, compareMap, s.allocator) + tgs := allocation.GetAllTargetsByCollectorAndJob(s.allocator, q[0], jobId) // Displays empty list if nothing matches if len(tgs) == 0 { s.jsonHandler(w, []interface{}{}) diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go index 6bd67a420..90c62ec64 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/prehook/relabel.go @@ -58,7 +58,7 @@ func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[ // Note: jobNameKey != tItem.JobName (jobNameKey is hashed) for jobNameKey, tItem := range targets { keepTarget := true - lset := convertLabelToPromLabelSet(tItem.Label) + lset := convertLabelToPromLabelSet(tItem.Labels) for _, cfg := range tf.relabelCfg[tItem.JobName] { if newLset := relabel.Process(lset, cfg); newLset == nil { keepTarget = false diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/target/target.go index ab68589fe..22106c082 100644 --- a/cmd/otel-allocator/target/target.go +++ b/cmd/otel-allocator/target/target.go @@ -27,23 +27,29 @@ type LinkJSON struct { } type Item struct { - JobName string - Link LinkJSON - TargetURL string - Label model.LabelSet - CollectorName string + JobName string `json:"-"` + Link LinkJSON `json:"-"` + TargetURL []string `json:"targets"` + Labels model.LabelSet `json:"labels"` + CollectorName string `json:"-"` + hash string } -func (t Item) Hash() string { - return t.JobName + t.TargetURL + t.Label.Fingerprint().String() +func (t *Item) Hash() string { + return t.hash } +// NewItem Creates a new target item. +// INVARIANTS: +// * Item fields must not be modified after creation. +// * Item should only be made via its constructor, never directly. func NewItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *Item { return &Item{ JobName: jobName, Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, - TargetURL: targetURL, - Label: label, + hash: jobName + targetURL + label.Fingerprint().String(), + TargetURL: []string{targetURL}, + Labels: label, CollectorName: collectorName, } } From 140e175c9ab969f3508d341341986beec12fd845 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 7 Dec 2022 10:41:47 +0100 Subject: [PATCH 0679/1234] Updated Kind 1.25 version (#1304) Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- kind-1.25.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kind-1.25.yaml b/kind-1.25.yaml index 6340109a9..fd8831adb 100644 --- a/kind-1.25.yaml +++ b/kind-1.25.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.25.0@sha256:428aaa17ec82ccde0131cb2d1ca6547d13cf5fdabcc0bbecf749baa935387cbf + image: kindest/node:v1.25.3@sha256:f1de3b0670462f43280114eccceab8bf1b9576d2afe0582f8f74529da6fd0365 From 3a9621aa85467348e13e8bde5d46b4c4afffb429 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 10:43:38 +0100 Subject: [PATCH 0680/1234] Bump go.opentelemetry.io/otel from 1.11.1 to 1.11.2 (#1301) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.11.1 to 1.11.2. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.1...v1.11.2) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 043482590..e14c053a5 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 - go.opentelemetry.io/otel v1.11.1 + go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.4 k8s.io/apimachinery v0.25.4 @@ -107,7 +107,7 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.4.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.11.1 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect diff --git a/go.sum b/go.sum index f2c7c473b..561d25c1f 100644 --- a/go.sum +++ b/go.sum @@ -1029,10 +1029,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= From c7c4b5f97b346a57a1a6b07d30de40ba26a9c19c Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 7 Dec 2022 17:23:28 +0100 Subject: [PATCH 0681/1234] Added further lint work (#1303) * Added furhter lint work Signed-off-by: Yuri Sa * Fixed param ghosted vars Signed-off-by: Yuri Sa * add missing line Signed-off-by: Yuri Sa Signed-off-by: Yuri Sa --- .golangci.yaml | 44 ++++++++++++++++++- .../opentelemetrycollector_webhook.go | 2 +- cmd/otel-allocator/config/config.go | 4 +- cmd/otel-allocator/main.go | 11 ++--- controllers/suite_test.go | 21 +++++---- .../webhookhandler_suite_test.go | 21 +++++---- .../webhookhandler/webhookhandler_test.go | 12 ++--- pkg/collector/adapters/config_to_probe.go | 16 +++---- pkg/collector/adapters/config_validate.go | 20 ++++----- pkg/collector/reconcile/config_replace.go | 22 +++++----- pkg/collector/reconcile/configmap.go | 14 +++--- pkg/collector/reconcile/daemonset.go | 4 +- pkg/collector/reconcile/deployment.go | 4 +- pkg/collector/reconcile/deployment_test.go | 26 +++++------ .../reconcile/horizontalpodautoscaler.go | 4 +- .../reconcile/horizontalpodautoscaler_test.go | 27 +++++++----- pkg/collector/reconcile/ingress.go | 8 ++-- pkg/collector/reconcile/ingress_test.go | 4 +- pkg/collector/reconcile/service.go | 4 +- pkg/collector/reconcile/serviceaccount.go | 4 +- pkg/collector/reconcile/statefulset.go | 4 +- pkg/collector/reconcile/suite_test.go | 21 +++++---- pkg/collector/upgrade/suite_test.go | 21 +++++---- pkg/collector/upgrade/v0_36_0.go | 12 ++--- .../instrumentation_suite_test.go | 15 ++++--- .../upgrade/upgrade_suite_test.go | 7 ++- pkg/sidecar/podmutator.go | 2 +- 27 files changed, 207 insertions(+), 147 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index e763616e1..6a5007561 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,5 +1,8 @@ run: + concurrency: 4 timeout: 5m + issues-exit-code: 1 + tests: true # all available settings of specific linters linters-settings: @@ -11,8 +14,42 @@ linters-settings: suggest-new: true misspell: locale: US + ignore-words: + - cancelled + - metre + - meter + - metres + - kilometre + - kilometres govet: - disable-all: true + # report about shadowed variables + check-shadowing: true + + # settings per analyzer + settings: + printf: # analyzer name, run `go tool vet help` to see all analyzers + funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf + + enable-all: true + # TODO: Enable this and fix the alignment issues. + disable: + - fieldalignment + gofmt: + simplify: true + revive: + min-confidence: 0.8 + + depguard: + list-type: denylist + include-go-root: true + packages-with-error-message: + # See https://github.com/open-telemetry/opentelemetry-collector/issues/5200 for rationale + - sync/atomic: "Use go.uber.org/atomic instead of sync/atomic" + - github.com/pkg/errors: "Use 'errors' or 'fmt' instead of github.com/pkg/errors" linters: enable: @@ -29,4 +66,7 @@ linters: - staticcheck - ineffassign - typecheck - - unparam \ No newline at end of file + - unparam + - depguard + - errcheck + - errorlint diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index ea41f2b10..a4a1ee222 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -132,7 +132,7 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { if r.Spec.TargetAllocator.Enabled { _, err := ta.ConfigToPromConfig(r.Spec.Config) if err != nil { - return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %s", err) + return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } } diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index ed16eddce..7185b5ce8 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -15,6 +15,7 @@ package config import ( + "errors" "flag" "fmt" "io/fs" @@ -115,7 +116,8 @@ func ParseCLI() (CLIConfig, error) { clusterConfig, err := clientcmd.BuildConfigFromFlags("", *kubeconfigPath) cLIConf.KubeConfigFilePath = *kubeconfigPath if err != nil { - if _, ok := err.(*fs.PathError); !ok { + pathError := &fs.PathError{} + if ok := errors.As(err, &pathError); !ok { return CLIConfig{}, err } clusterConfig, err = rest.InClusterConfig() diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 5cc9362d5..f15b4a47f 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -17,6 +17,7 @@ package main import ( "context" "encoding/json" + "errors" "net/http" "net/url" "os" @@ -91,9 +92,9 @@ func main() { os.Exit(1) } defer func() { - err := watcher.Close() - if err != nil { - log.Error(err, "failed to close watcher") + watcherErr := watcher.Close() + if watcherErr != nil { + log.Error(watcherErr, "failed to close watcher") } }() @@ -115,7 +116,7 @@ func main() { signal.Notify(interrupts, os.Interrupt, syscall.SIGTERM) go func() { - if err := srv.Start(); err != http.ErrServerClosed { + if err := srv.Start(); !errors.Is(err, http.ErrServerClosed) { setupLog.Error(err, "Can't start the server") } }() @@ -139,7 +140,7 @@ func main() { } srv = newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) go func() { - if err := srv.Start(); err != http.ErrServerClosed { + if err := srv.Start(); !errors.Is(err, http.ErrServerClosed) { setupLog.Error(err, "Can't restart the server") } }() diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 1068a79be..9b79181ea 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -43,6 +44,8 @@ var ( testScheme *runtime.Scheme = scheme.Scheme ctx context.Context cancel context.CancelFunc + err error + cfg *rest.Config ) func TestMain(m *testing.M) { @@ -55,13 +58,13 @@ func TestMain(m *testing.M) { Paths: []string{filepath.Join("..", "config", "webhook")}, }, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } @@ -75,7 +78,7 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ Scheme: testScheme, Host: webhookInstallOptions.LocalServingHost, Port: webhookInstallOptions.LocalServingPort, @@ -83,12 +86,12 @@ func TestMain(m *testing.M) { LeaderElection: false, MetricsBindAddress: "0", }) - if err != nil { - fmt.Printf("failed to start webhook server: %v", err) + if mgrErr != nil { + fmt.Printf("failed to start webhook server: %v", mgrErr) os.Exit(1) } - if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } @@ -119,9 +122,9 @@ func TestMain(m *testing.M) { return true }, func() error { // #nosec G402 - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err + conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if tlsErr != nil { + return tlsErr } _ = conn.Close() return nil diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go index 4c0b1c681..4e0d26be6 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -43,6 +44,8 @@ var ( testScheme *runtime.Scheme = scheme.Scheme ctx context.Context cancel context.CancelFunc + err error + cfg *rest.Config ) func TestMain(m *testing.M) { @@ -55,13 +58,13 @@ func TestMain(m *testing.M) { Paths: []string{filepath.Join("..", "..", "config", "webhook")}, }, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } @@ -75,7 +78,7 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ Scheme: testScheme, Host: webhookInstallOptions.LocalServingHost, Port: webhookInstallOptions.LocalServingPort, @@ -83,12 +86,12 @@ func TestMain(m *testing.M) { LeaderElection: false, MetricsBindAddress: "0", }) - if err != nil { - fmt.Printf("failed to start webhook server: %v", err) + if mgrErr != nil { + fmt.Printf("failed to start webhook server: %v", mgrErr) os.Exit(1) } - if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } @@ -119,9 +122,9 @@ func TestMain(m *testing.M) { return true }, func() error { // #nosec G402 - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err + conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if tlsErr != nil { + return tlsErr } _ = conn.Close() return nil diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index 16b3543f4..9987a06fc 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -131,8 +131,8 @@ func TestShouldInjectSidecar(t *testing.T) { }() for i := range tt.otelcols { - err := k8sClient.Create(context.Background(), &tt.otelcols[i]) - require.NoError(t, err) + clientErr := k8sClient.Create(context.Background(), &tt.otelcols[i]) + require.NoError(t, clientErr) } encoded, err := json.Marshal(tt.pod) @@ -154,8 +154,8 @@ func TestShouldInjectSidecar(t *testing.T) { require.NoError(t, err) injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - err = injector.InjectDecoder(decoder) - require.NoError(t, err) + injectErr := injector.InjectDecoder(decoder) + require.NoError(t, injectErr) // test res := injector.Handle(context.Background(), req) @@ -354,8 +354,8 @@ func TestPodShouldNotBeChanged(t *testing.T) { }() for i := range tt.otelcols { - err := k8sClient.Create(context.Background(), &tt.otelcols[i]) - require.NoError(t, err) + clientErr := k8sClient.Create(context.Background(), &tt.otelcols[i]) + require.NoError(t, clientErr) } encoded, err := json.Marshal(tt.pod) diff --git a/pkg/collector/adapters/config_to_probe.go b/pkg/collector/adapters/config_to_probe.go index 10dfa45cd..84b65eb01 100644 --- a/pkg/collector/adapters/config_to_probe.go +++ b/pkg/collector/adapters/config_to_probe.go @@ -49,22 +49,22 @@ const ( // ConfigToContainerProbe converts the incoming configuration object into a container probe or returns an error. func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, error) { - serviceProperty, ok := config["service"] - if !ok { + serviceProperty, withService := config["service"] + if !withService { return nil, errNoService } - service, ok := serviceProperty.(map[interface{}]interface{}) - if !ok { + service, withSvcProperty := serviceProperty.(map[interface{}]interface{}) + if !withSvcProperty { return nil, errServiceNotAMap } - serviceExtensionsProperty, ok := service["extensions"] - if !ok { + serviceExtensionsProperty, withExtension := service["extensions"] + if !withExtension { return nil, errNoServiceExtensions } - serviceExtensions, ok := serviceExtensionsProperty.([]interface{}) - if !ok { + serviceExtensions, withExtProperty := serviceExtensionsProperty.([]interface{}) + if !withExtProperty { return nil, errServiceExtensionsNotSlice } healthCheckServiceExtensions := make([]string, 0) diff --git a/pkg/collector/adapters/config_validate.go b/pkg/collector/adapters/config_validate.go index f34f36f2d..37c6e6ec9 100644 --- a/pkg/collector/adapters/config_validate.go +++ b/pkg/collector/adapters/config_validate.go @@ -34,29 +34,29 @@ func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[ for recvID := range receivers { //Safe Cast - receiverID, ok := recvID.(string) - if !ok { + receiverID, withReceiver := recvID.(string) + if !withReceiver { return nil } //Getting all receivers present in the receivers section and setting them to false. availableReceivers[receiverID] = false } - cfgService, ok := config["service"].(map[interface{}]interface{}) - if !ok { + cfgService, withService := config["service"].(map[interface{}]interface{}) + if !withService { return nil } - pipeline, ok := cfgService["pipelines"].(map[interface{}]interface{}) - if !ok { + pipeline, withPipeline := cfgService["pipelines"].(map[interface{}]interface{}) + if !withPipeline { return nil } availablePipelines := map[string]bool{} for pipID := range pipeline { //Safe Cast - pipelineID, ok := pipID.(string) - if !ok { + pipelineID, existsPipeline := pipID.(string) + if !existsPipeline { return nil } //Getting all the available pipelines. @@ -66,8 +66,8 @@ func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[ if len(pipeline) > 0 { for pipelineID, pipelineCfg := range pipeline { //Safe Cast - pipelineV, ok := pipelineID.(string) - if !ok { + pipelineV, withPipelineCfg := pipelineID.(string) + if !withPipelineCfg { continue } //Condition will get information if there are multiple configured pipelines. diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 7de12081b..8be892b65 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -38,27 +38,27 @@ func ReplaceConfig(params Params) (string, error) { if !params.Instance.Spec.TargetAllocator.Enabled { return params.Instance.Spec.Config, nil } - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - return "", err + config, getStringErr := adapters.ConfigFromString(params.Instance.Spec.Config) + if getStringErr != nil { + return "", getStringErr } - promCfgMap, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) - if err != nil { - return "", err + promCfgMap, getCfgPromErr := ta.ConfigToPromConfig(params.Instance.Spec.Config) + if getCfgPromErr != nil { + return "", getCfgPromErr } // yaml marshaling/unsmarshaling is preferred because of the problems associated with the conversion of map to a struct using mapstructure - promCfg, err := yaml.Marshal(map[string]interface{}{ + promCfg, marshalErr := yaml.Marshal(map[string]interface{}{ "config": promCfgMap, }) - if err != nil { - return "", err + if marshalErr != nil { + return "", marshalErr } var cfg Config - if err = yaml.UnmarshalStrict(promCfg, &cfg); err != nil { - return "", fmt.Errorf("error unmarshaling YAML: %w", err) + if marshalErr = yaml.UnmarshalStrict(promCfg, &cfg); marshalErr != nil { + return "", fmt.Errorf("error unmarshaling YAML: %w", marshalErr) } for i := range cfg.PromConfig.ScrapeConfigs { diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 9f874010c..24a6f7cef 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -161,10 +161,10 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co existing := &corev1.ConfigMap{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && errors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - if errors.IsAlreadyExists(err) && retry { + clientGetErr := params.Client.Get(ctx, nns, existing) + if clientGetErr != nil && errors.IsNotFound(clientGetErr) { + if clientCreateErr := params.Client.Create(ctx, &desired); clientCreateErr != nil { + if errors.IsAlreadyExists(clientCreateErr) && retry { // let's try again? we probably had multiple updates at one, and now it exists already if err := expectedConfigMaps(ctx, params, expected, false); err != nil { // somethin else happened now... @@ -174,12 +174,12 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co // we succeeded in the retry, exit this attempt return nil } - return fmt.Errorf("failed to create: %w", err) + return fmt.Errorf("failed to create: %w", clientCreateErr) } params.Log.V(2).Info("created", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) + } else if clientGetErr != nil { + return fmt.Errorf("failed to get: %w", clientGetErr) } // it exists already, merge the two if the end result isn't identical to the existing one diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index a14649c59..8a665a194 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -62,8 +62,8 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) continue diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 5e4b4bd18..6e2a8c3ec 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -68,8 +68,8 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) continue diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index ab146b469..00c4e0bb9 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -57,8 +57,7 @@ func TestExpectedDeployments(t *testing.T) { }) t.Run("should not create target allocator deployment when targetallocator is not enabled", func(t *testing.T) { - param := Params{ - Client: k8sClient, + paramTargetAllocator := Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -91,12 +90,11 @@ func TestExpectedDeployments(t *testing.T) { `, }, }, - Scheme: testScheme, - Log: logger, + Log: logger, } expected := []v1.Deployment{} - if param.Instance.Spec.TargetAllocator.Enabled { - expected = append(expected, targetallocator.Deployment(param.Config, param.Log, param.Instance)) + if paramTargetAllocator.Instance.Spec.TargetAllocator.Enabled { + expected = append(expected, targetallocator.Deployment(paramTargetAllocator.Config, paramTargetAllocator.Log, paramTargetAllocator.Instance)) } assert.Len(t, expected, 0) @@ -128,8 +126,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { replicas, maxReplicas := int32(2), int32(10) oneReplica := int32(1) - param := Params{ - Client: k8sClient, + paramMaxReplicas := Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -168,11 +165,10 @@ func TestExpectedDeployments(t *testing.T) { `, }, }, - Scheme: testScheme, - Log: logger, + Log: logger, } expected := []v1.Deployment{} - allocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) + allocator := targetallocator.Deployment(paramMaxReplicas.Config, paramMaxReplicas.Log, paramMaxReplicas.Instance) expected = append(expected, allocator) assert.Len(t, expected, 1) @@ -181,8 +177,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should update target allocator deployment replicas when changed", func(t *testing.T) { initialReplicas, nextReplicas := int32(1), int32(2) - param := Params{ - Client: k8sClient, + paramReplicas := Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -220,11 +215,10 @@ func TestExpectedDeployments(t *testing.T) { `, }, }, - Scheme: testScheme, - Log: logger, + Log: logger, } expected := []v1.Deployment{} - allocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) + allocator := targetallocator.Deployment(paramReplicas.Config, paramReplicas.Log, paramReplicas.Instance) expected = append(expected, allocator) assert.Len(t, expected, 1) diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index d5df719b0..28f756e36 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -74,8 +74,8 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect nns := types.NamespacedName{Namespace: desired.GetNamespace(), Name: desired.GetName()} err := params.Client.Get(ctx, nns, existing) if k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, obj); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, obj); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "hpa.name", desired.GetName(), "hpa.namespace", desired.GetNamespace()) continue diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index 3d23f29c7..1e978d9cb 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -38,6 +38,9 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) +var hpaUpdateErr error +var withHPA bool + func TestExpectedHPA(t *testing.T) { params := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) err := params.Config.AutoDetect() @@ -49,8 +52,8 @@ func TestExpectedHPA(t *testing.T) { err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &autoscalingv2beta2.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) + exists, hpaErr := populateObjectIfExists(t, &autoscalingv2beta2.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, hpaErr) assert.True(t, exists) }) @@ -65,27 +68,27 @@ func TestExpectedHPA(t *testing.T) { if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { updatedAutoscaler := *updatedHPA.(*autoscalingv2beta2.HorizontalPodAutoscaler) createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) - err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - assert.NoError(t, err) + hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + assert.NoError(t, hpaUpdateErr) actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + withHPA, hpaUpdateErr = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) - assert.True(t, exists) + assert.NoError(t, hpaUpdateErr) + assert.True(t, withHPA) assert.Equal(t, int32(1), *actual.Spec.MinReplicas) assert.Equal(t, int32(3), actual.Spec.MaxReplicas) } else { updatedAutoscaler := *updatedHPA.(*autoscalingv2.HorizontalPodAutoscaler) createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) - err := expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - assert.NoError(t, err) + hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + assert.NoError(t, hpaUpdateErr) actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + withHPA, hpaUpdateErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) - assert.True(t, exists) + assert.NoError(t, hpaUpdateErr) + assert.True(t, withHPA) assert.Equal(t, int32(1), *actual.Spec.MinReplicas) assert.Equal(t, int32(3), actual.Spec.MaxReplicas) } diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go index ea8279112..9ed20fbd5 100644 --- a/pkg/collector/reconcile/ingress.go +++ b/pkg/collector/reconcile/ingress.go @@ -165,15 +165,15 @@ func expectedIngresses(ctx context.Context, params Params, expected []networking existing := &networkingv1.Ingress{} nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { + clientGetErr := params.Client.Get(ctx, nns, existing) + if clientGetErr != nil && k8serrors.IsNotFound(clientGetErr) { if err := params.Client.Create(ctx, &desired); err != nil { return fmt.Errorf("failed to create: %w", err) } params.Log.V(2).Info("created", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) return nil - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) + } else if clientGetErr != nil { + return fmt.Errorf("failed to get: %w", clientGetErr) } // it exists already, merge the two if the end result isn't identical to the existing one diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index 8608011bd..9c03dd565 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -240,8 +240,8 @@ func TestDeleteIngresses(t *testing.T) { assert.True(t, exists) // delete - if err := deleteIngresses(ctx, params(), []networkingv1.Ingress{}); err != nil { - t.Error(err) + if delIngressErr := deleteIngresses(ctx, params(), []networkingv1.Ingress{}); delIngressErr != nil { + t.Error(delIngressErr) } // check diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 8bb8e8519..8589359a4 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -209,8 +209,8 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "service.name", desired.Name, "service.namespace", desired.Namespace) continue diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index b19c40aa1..77fadd7d7 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -71,8 +71,8 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) continue diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index e66373432..d36f0acee 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -63,8 +63,8 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) + if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) continue diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index c1640d6fe..a83f3bf8f 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -35,6 +35,7 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" @@ -56,6 +57,8 @@ var ( logger = logf.Log.WithName("unit-tests") instanceUID = uuid.NewUUID() + err error + cfg *rest.Config ) const ( @@ -73,13 +76,13 @@ func TestMain(m *testing.M) { Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, }, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } @@ -93,7 +96,7 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ Scheme: testScheme, Host: webhookInstallOptions.LocalServingHost, Port: webhookInstallOptions.LocalServingPort, @@ -101,12 +104,12 @@ func TestMain(m *testing.M) { LeaderElection: false, MetricsBindAddress: "0", }) - if err != nil { - fmt.Printf("failed to start webhook server: %v", err) + if mgrErr != nil { + fmt.Printf("failed to start webhook server: %v", mgrErr) os.Exit(1) } - if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } @@ -137,9 +140,9 @@ func TestMain(m *testing.M) { return true }, func() error { // #nosec G402 - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err + conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if tlsErr != nil { + return tlsErr } _ = conn.Close() return nil diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index 84b3e43e7..e17404a26 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -43,6 +44,8 @@ var ( testScheme *runtime.Scheme = scheme.Scheme ctx context.Context cancel context.CancelFunc + err error + cfg *rest.Config ) func TestMain(m *testing.M) { @@ -56,13 +59,13 @@ func TestMain(m *testing.M) { }, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } @@ -76,7 +79,7 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, err := ctrl.NewManager(cfg, ctrl.Options{ + mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ Scheme: testScheme, Host: webhookInstallOptions.LocalServingHost, Port: webhookInstallOptions.LocalServingPort, @@ -84,12 +87,12 @@ func TestMain(m *testing.M) { LeaderElection: false, MetricsBindAddress: "0", }) - if err != nil { - fmt.Printf("failed to start webhook server: %v", err) + if mgrErr != nil { + fmt.Printf("failed to start webhook server: %v", mgrErr) os.Exit(1) } - if err := (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } @@ -120,9 +123,9 @@ func TestMain(m *testing.M) { return true }, func() error { // #nosec G402 - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if err != nil { - return err + conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if tlsErr != nil { + return tlsErr } _ = conn.Close() return nil diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 875b7a04c..3ea3cc778 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -49,24 +49,24 @@ func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) ( // Change tls config key from tls_settings to tls in otlp.protocols.grpc if strings.HasPrefix(k1.(string), "otlp") { - otlpConfig, ok := v1.(map[interface{}]interface{}) - if !ok { + otlpConfig, withOTLP := v1.(map[interface{}]interface{}) + if !withOTLP { // no otlpConfig? no need to fail because of that return otelcol, nil } for k2, v2 := range otlpConfig { // protocols config if k2 == "protocols" { - protocConfig, ok := v2.(map[interface{}]interface{}) - if !ok { + protocConfig, withProtocConfig := v2.(map[interface{}]interface{}) + if !withProtocConfig { // no protocolConfig? no need to fail because of that return otelcol, nil } for k3, v3 := range protocConfig { // grpc config if k3 == "grpc" || k3 == "http" { - grpcHTTPConfig, ok := v3.(map[interface{}]interface{}) - if !ok { + grpcHTTPConfig, withHTTPConfig := v3.(map[interface{}]interface{}) + if !withHTTPConfig { // no grpcHTTPConfig? no need to fail because of that return otelcol, nil } diff --git a/pkg/instrumentation/instrumentation_suite_test.go b/pkg/instrumentation/instrumentation_suite_test.go index a5fb3c46b..4877f7355 100644 --- a/pkg/instrumentation/instrumentation_suite_test.go +++ b/pkg/instrumentation/instrumentation_suite_test.go @@ -21,28 +21,33 @@ import ( "testing" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -var k8sClient client.Client -var testEnv *envtest.Environment -var testScheme = scheme.Scheme +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme = scheme.Scheme + err error + cfg *rest.Config +) func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } diff --git a/pkg/instrumentation/upgrade/upgrade_suite_test.go b/pkg/instrumentation/upgrade/upgrade_suite_test.go index fb3891f9e..11f62ea12 100644 --- a/pkg/instrumentation/upgrade/upgrade_suite_test.go +++ b/pkg/instrumentation/upgrade/upgrade_suite_test.go @@ -21,6 +21,7 @@ import ( "testing" "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" @@ -30,6 +31,8 @@ import ( var k8sClient client.Client var testEnv *envtest.Environment var testScheme = scheme.Scheme +var err error +var cfg *rest.Config func TestMain(m *testing.M) { testEnv = &envtest.Environment{ @@ -38,13 +41,13 @@ func TestMain(m *testing.M) { }, } - cfg, err := testEnv.Start() + cfg, err = testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) } - if err := v1alpha1.AddToScheme(testScheme); err != nil { + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 55743db2e..22302a44e 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -79,7 +79,7 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod // which instance should it talk to? otelcol, err := p.getCollectorInstance(ctx, ns, annValue) if err != nil { - if err == errMultipleInstancesPossible || err == errNoInstancesAvailable || err == errInstanceNotSidecar { + if errors.Is(err, errMultipleInstancesPossible) || errors.Is(err, errNoInstancesAvailable) || errors.Is(err, errInstanceNotSidecar) { // we still allow the pod to be created, but we log a message to the operator's logs logger.Error(err, "failed to select an OpenTelemetry Collector instance for this pod's sidecar") return pod, nil From 0cf9da2620f96f269fede30b866fd679901d8155 Mon Sep 17 00:00:00 2001 From: Ben B Date: Mon, 12 Dec 2022 11:18:50 +0100 Subject: [PATCH 0682/1234] Support openshift routes (#1206) * split service port from config calculation into its own function Signed-off-by: Benedikt Bongartz * register openshift route v1 as valid ingress enum Signed-off-by: Benedikt Bongartz * add routes to reconcile loop - determine platform - grant otel controller permission to route api Signed-off-by: Benedikt Bongartz * add openshift api to go mod Signed-off-by: Benedikt Bongartz * add naming method for openshift routes Signed-off-by: Benedikt Bongartz * add route reconcile routine Signed-off-by: Benedikt Bongartz * add route reconciler if platform changes to openshift Signed-off-by: Benedikt Bongartz * move route cr definition into testdata package Signed-off-by: Benedikt Bongartz * controllers: verify that route is created Signed-off-by: Benedikt Bongartz * crd: move route tls termination settings into extra section Signed-off-by: Benedikt Bongartz * fix: share platform state across copied config objects Signed-off-by: Benedikt Bongartz * controller: split opentelemetry collector callback Signed-off-by: Benedikt Bongartz * tests: add route e2e tests Signed-off-by: Benedikt Bongartz * fix govet linting ``` main.go:238:16: shadow: declaration of "err" shadows declaration at line 230 (govet) configBytes, err := yaml.Marshal(configs) ^ ``` Signed-off-by: Benedikt Bongartz * add ingress workaround description Signed-off-by: Benedikt Bongartz * regenerate Signed-off-by: Benedikt Bongartz Signed-off-by: Benedikt Bongartz --- Makefile | 6 +- apis/v1alpha1/ingress_type.go | 24 +- apis/v1alpha1/opentelemetrycollector_types.go | 18 ++ .../opentelemetrycollector_webhook.go | 3 + .../opentelemetrycollector_webhook_test.go | 29 +++ apis/v1alpha1/zz_generated.deepcopy.go | 16 ++ ...emetry-operator.clusterserviceversion.yaml | 12 + ...ntelemetry.io_opentelemetrycollectors.yaml | 15 ++ cmd/otel-allocator/main.go | 6 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 15 ++ config/rbac/role.yaml | 12 + .../opentelemetrycollector_controller.go | 79 +++++- .../opentelemetrycollector_controller_test.go | 29 ++- controllers/suite_test.go | 9 + docs/api.md | 38 ++- go.mod | 1 + go.sum | 2 + hack/install-openshift-routes.sh | 6 + internal/config/main.go | 56 +++-- internal/config/options.go | 4 +- main.go | 2 + pkg/collector/reconcile/ingress.go | 64 ++--- pkg/collector/reconcile/route.go | 209 ++++++++++++++++ pkg/collector/reconcile/route_test.go | 236 ++++++++++++++++++ pkg/collector/reconcile/suite_test.go | 11 + pkg/collector/testdata/route_crd.go | 74 ++++++ pkg/naming/main.go | 5 + tests/e2e/route/00-assert.yaml | 31 +++ tests/e2e/route/00-install.yaml | 30 +++ 29 files changed, 974 insertions(+), 68 deletions(-) create mode 100755 hack/install-openshift-routes.sh create mode 100644 pkg/collector/reconcile/route.go create mode 100644 pkg/collector/reconcile/route_test.go create mode 100644 pkg/collector/testdata/route_crd.go create mode 100644 tests/e2e/route/00-assert.yaml create mode 100644 tests/e2e/route/00-install.yaml diff --git a/Makefile b/Makefile index 51e233c78..3ca33d1de 100644 --- a/Makefile +++ b/Makefile @@ -171,7 +171,7 @@ e2e-log-operator: kubectl get deploy -A .PHONY: prepare-e2e -prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server load-image-all +prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server install-openshift-routes load-image-all mkdir -p tests/_build/crds tests/_build/manifests $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml $(KUSTOMIZE) build config/crd -o tests/_build/crds/ @@ -208,6 +208,10 @@ start-kind: install-metrics-server: ./hack/install-metrics-server.sh +.PHONY: install-openshift-routes +install-openshift-routes: + ./hack/install-openshift-routes.sh + .PHONY: load-image-all load-image-all: load-image-operator load-image-target-allocator diff --git a/apis/v1alpha1/ingress_type.go b/apis/v1alpha1/ingress_type.go index 5ef8528b0..f7377617c 100644 --- a/apis/v1alpha1/ingress_type.go +++ b/apis/v1alpha1/ingress_type.go @@ -16,11 +16,33 @@ package v1alpha1 type ( // IngressType represents how a collector should be exposed (ingress vs route). - // +kubebuilder:validation:Enum=ingress + // +kubebuilder:validation:Enum=ingress;route IngressType string ) const ( // IngressTypeNginx specifies that an ingress entry should be created. IngressTypeNginx IngressType = "ingress" + // IngressTypeOpenshiftRoute specifies that an route entry should be created. + IngressTypeRoute IngressType = "route" +) + +type ( + // TLSRouteTerminationType is used to indicate which tls settings should be used. + // +kubebuilder:validation:Enum=insecure;edge;passthrough;reencrypt + TLSRouteTerminationType string +) + +const ( + // TLSRouteTerminationTypeInsecure indicates that insecure connections are allowed. + TLSRouteTerminationTypeInsecure TLSRouteTerminationType = "insecure" + // TLSRouteTerminationTypeEdge indicates that encryption should be terminated + // at the edge router. + TLSRouteTerminationTypeEdge TLSRouteTerminationType = "edge" + // TLSTerminationPassthrough indicates that the destination service is + // responsible for decrypting traffic. + TLSRouteTerminationTypePassthrough TLSRouteTerminationType = "passthrough" + // TLSTerminationReencrypt indicates that traffic will be decrypted on the edge + // and re-encrypt using a new certificate. + TLSRouteTerminationTypeReencrypt TLSRouteTerminationType = "reencrypt" ) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index a296381b2..3331a5ada 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -24,6 +24,13 @@ import ( // Ingress is used to specify how OpenTelemetry Collector is exposed. This // functionality is only available if one of the valid modes is set. // Valid modes are: deployment, daemonset and statefulset. +// NOTE: If this feature is activated, all specified receivers are exposed. +// Currently this has a few limitations. Depending on the ingress controller +// there are problems with TLS and gRPC. +// SEE: https://github.com/open-telemetry/opentelemetry-operator/issues/1306. +// NOTE: As a workaround, port name and appProtocol could be specified directly +// in the CR. +// SEE: OpenTelemetryCollector.spec.ports[index]. type Ingress struct { // Type default value is: "" // Supported types are: ingress @@ -47,6 +54,17 @@ type Ingress struct { // serving this Ingress resource. // +optional IngressClassName *string `json:"ingressClassName,omitempty"` + + // Route is an OpenShift specific section that is only considered when + // type "route" is used. + // +optional + Route OpenShiftRoute `json:"route,omitempty"` +} + +// OpenShiftRoute defines openshift route specific settings. +type OpenShiftRoute struct { + // Termination indicates termination type. By default "edge" is used. + Termination TLSRouteTerminationType `json:"termination,omitempty"` } // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index a4a1ee222..389921867 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -77,6 +77,9 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget } } + if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { + r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 0ebc65690..29e29dfe3 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -96,6 +96,35 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, + { + name: "Missing route termination", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Ingress: Ingress{ + Type: IngressTypeRoute, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Ingress: Ingress{ + Type: IngressTypeRoute, + Route: OpenShiftRoute{ + Termination: TLSRouteTerminationTypeEdge, + }, + }, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + }, + }, + }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 01c5f1dbd..6803230c8 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -115,6 +115,7 @@ func (in *Ingress) DeepCopyInto(out *Ingress) { *out = new(string) **out = **in } + out.Route = in.Route } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. @@ -279,6 +280,21 @@ func (in *NodeJS) DeepCopy() *NodeJS { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenShiftRoute) DeepCopyInto(out *OpenShiftRoute) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftRoute. +func (in *OpenShiftRoute) DeepCopy() *OpenShiftRoute { + if in == nil { + return nil + } + out := new(OpenShiftRoute) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { *out = *in diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e0c48808f..e7e975ae0 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -257,6 +257,18 @@ spec: - get - patch - update + - apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - authentication.k8s.io resources: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 38dbce2c7..471ff6b94 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1206,6 +1206,20 @@ spec: resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource. type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. + properties: + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object tls: description: TLS configuration. items: @@ -1236,6 +1250,7 @@ spec: description: 'Type default value is: "" Supported types are: ingress' enum: - ingress + - route type: string type: object maxReplicas: diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index f15b4a47f..041e2dd26 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -235,12 +235,14 @@ func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { } // if the hashes are different, we need to recompute the scrape config if hash != s.compareHash { - configBytes, err := yaml.Marshal(configs) + var configBytes []byte + configBytes, err = yaml.Marshal(configs) if err != nil { s.errorHandler(w, err) return } - jsonConfig, err := yaml2.YAMLToJSON(configBytes) + var jsonConfig []byte + jsonConfig, err = yaml2.YAMLToJSON(configBytes) if err != nil { s.errorHandler(w, err) return diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c6990780b..3bd1e672e 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1204,6 +1204,20 @@ spec: resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource. type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. + properties: + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object tls: description: TLS configuration. items: @@ -1234,6 +1248,7 @@ spec: description: 'Type default value is: "" Supported types are: ingress' enum: - ingress + - route type: string type: object maxReplicas: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7dc982d34..37e368696 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -168,3 +168,15 @@ rules: - get - patch - update +- apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - create + - delete + - get + - list + - patch + - update + - watch diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 6d3bb96a6..4f62c9390 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -18,6 +18,7 @@ package controllers import ( "context" "fmt" + "sync" "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" @@ -34,6 +35,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" + "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. @@ -42,8 +44,10 @@ type OpenTelemetryCollectorReconciler struct { recorder record.EventRecorder scheme *runtime.Scheme log logr.Logger - tasks []Task config config.Config + + tasks []Task + muTasks sync.RWMutex } // Task represents a reconciliation task to be executed by the reconciler. @@ -63,10 +67,65 @@ type Params struct { Config config.Config } +func (r *OpenTelemetryCollectorReconciler) onPlatformChange() error { + // NOTE: At the time the reconciler gets created, the platform type is still unknown. + plt := r.config.Platform() + var ( + routesIdx = -1 + ) + r.muTasks.Lock() + for i, t := range r.tasks { + // search for route reconciler + switch t.Name { + case "routes": + routesIdx = i + } + } + r.muTasks.Unlock() + + if err := r.addRouteTask(plt, routesIdx); err != nil { + return err + } + + return r.removeRouteTask(plt, routesIdx) +} + +func (r *OpenTelemetryCollectorReconciler) addRouteTask(plt platform.Platform, routesIdx int) error { + r.muTasks.Lock() + defer r.muTasks.Unlock() + // if exists and platform is openshift + if routesIdx == -1 && plt == platform.OpenShift { + r.tasks = append([]Task{{reconcile.Routes, "routes", true}}, r.tasks...) + } + return nil +} + +func (r *OpenTelemetryCollectorReconciler) removeRouteTask(plt platform.Platform, routesIdx int) error { + r.muTasks.Lock() + defer r.muTasks.Unlock() + if len(r.tasks) < routesIdx { + return fmt.Errorf("can not remove route task from reconciler") + } + // if exists and platform is not openshift + if routesIdx != -1 && plt != platform.OpenShift { + r.tasks = append(r.tasks[:routesIdx], r.tasks[routesIdx+1:]...) + } + return nil +} + // NewReconciler creates a new reconciler for OpenTelemetryCollector objects. func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { - if len(p.Tasks) == 0 { - p.Tasks = []Task{ + r := &OpenTelemetryCollectorReconciler{ + Client: p.Client, + log: p.Log, + scheme: p.Scheme, + config: p.Config, + tasks: p.Tasks, + recorder: p.Recorder, + } + + if len(r.tasks) == 0 { + r.tasks = []Task{ { reconcile.ConfigMaps, "config maps", @@ -113,22 +172,16 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { true, }, } + r.config.RegisterPlatformChangeCallback(r.onPlatformChange) } - - return &OpenTelemetryCollectorReconciler{ - Client: p.Client, - log: p.Log, - scheme: p.Scheme, - config: p.Config, - tasks: p.Tasks, - recorder: p.Recorder, - } + return r } // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch @@ -166,6 +219,8 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct // RunTasks runs all the tasks associated with this reconciler. func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { + r.muTasks.RLock() + defer r.muTasks.RUnlock() for _, task := range r.tasks { if err := task.Do(ctx, params); err != nil { // If we get an error that occurs because a pod is being terminated, then exit this loop diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 9b52cbb18..b9d83572d 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -20,6 +20,7 @@ import ( "fmt" "testing" + routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" @@ -46,11 +47,18 @@ var mockAutoDetector = &mockAutoDetect{ HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { return autodetect.AutoscalingVersionV2Beta2, nil }, + PlatformFunc: func() (platform.Platform, error) { + return platform.OpenShift, nil + }, } func TestNewObjectsOnReconciliation(t *testing.T) { // prepare - cfg := config.New(config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator"), config.WithAutoDetect(mockAutoDetector)) + cfg := config.New( + config.WithCollectorImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + config.WithAutoDetect(mockAutoDetector), + ) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, @@ -58,6 +66,7 @@ func TestNewObjectsOnReconciliation(t *testing.T) { Scheme: testScheme, Config: cfg, }) + require.NoError(t, cfg.AutoDetect()) created := &v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, @@ -65,6 +74,18 @@ func TestNewObjectsOnReconciliation(t *testing.T) { }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Mode: v1alpha1.ModeDeployment, + Ports: []corev1.ServicePort{ + { + Name: "telnet", + Port: 49935, + }, + }, + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, + }, }, } err := k8sClient.Create(context.Background(), created) @@ -128,6 +149,12 @@ func TestNewObjectsOnReconciliation(t *testing.T) { // attention! we expect statefulsets to be empty in the default configuration assert.Empty(t, list.Items) } + { + list := &routev1.RouteList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } // cleanup require.NoError(t, k8sClient.Delete(context.Background(), created)) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 9b79181ea..be597e73c 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -25,6 +25,8 @@ import ( "testing" "time" + routev1 "github.com/openshift/api/route/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" @@ -35,6 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/testdata" // +kubebuilder:scaffold:imports ) @@ -54,6 +57,7 @@ func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, + CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, WebhookInstallOptions: envtest.WebhookInstallOptions{ Paths: []string{filepath.Join("..", "config", "webhook")}, }, @@ -64,6 +68,11 @@ func TestMain(m *testing.M) { os.Exit(1) } + if err = routev1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) diff --git a/docs/api.md b/docs/api.md index 9359a696c..73ee92b8d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3843,6 +3843,13 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function IngressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource.
false + + route + object + + Route is an OpenShift specific section that is only considered when type "route" is used.
+ + false tls []object @@ -3856,7 +3863,36 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function Type default value is: "" Supported types are: ingress

- Enum: ingress
+ Enum: ingress, route
+ + false + + + + +### OpenTelemetryCollector.spec.ingress.route +[↩ Parent](#opentelemetrycollectorspecingress) + + + +Route is an OpenShift specific section that is only considered when type "route" is used. + + + + + + + + + + + + + + diff --git a/go.mod b/go.mod index e14c053a5..0860325c3 100644 --- a/go.mod +++ b/go.mod @@ -97,6 +97,7 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/openshift/api v3.9.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect diff --git a/go.sum b/go.sum index 561d25c1f..300155a10 100644 --- a/go.sum +++ b/go.sum @@ -822,6 +822,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= +github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= diff --git a/hack/install-openshift-routes.sh b/hack/install-openshift-routes.sh new file mode 100755 index 000000000..573dee06a --- /dev/null +++ b/hack/install-openshift-routes.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router_rbac.yaml +kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/route_crd.yaml +kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router.yaml +kubectl wait --for=condition=available deployment/ingress-router -n openshift-ingress --timeout=5m diff --git a/internal/config/main.go b/internal/config/main.go index 69f5ea952..1f4ef087d 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -16,6 +16,7 @@ package config import ( + "sync" "time" "github.com/go-logr/logr" @@ -46,7 +47,7 @@ type Config struct { autoInstrumentationJavaImage string onPlatformChange changeHandler labelsFilter []string - platform platform.Platform + platform platformStore autoDetectFrequency time.Duration autoscalingVersion autodetect.AutoscalingVersion } @@ -59,7 +60,7 @@ func New(opts ...Option) Config { collectorConfigMapEntry: defaultCollectorConfigMapEntry, targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, logger: logf.Log.WithName("config"), - platform: platform.Unknown, + platform: newPlatformWrapper(), version: version.Get(), autoscalingVersion: autodetect.DefaultAutoscalingVersion, onPlatformChange: newOnChange(), @@ -108,25 +109,17 @@ func (c *Config) periodicAutoDetect() { // AutoDetect attempts to automatically detect relevant information for this operator. func (c *Config) AutoDetect() error { - changed := false c.logger.V(2).Info("auto-detecting the configuration based on the environment") - // TODO: once new things need to be detected, extract this into individual detection routines - if c.platform == platform.Unknown { - plt, err := c.autoDetect.Platform() - if err != nil { - return err - } - - if c.platform != plt { - c.logger.V(1).Info("platform detected", "platform", plt) - c.platform = plt - changed = true - } + plt, err := c.autoDetect.Platform() + if err != nil { + return err } - if changed { - if err := c.onPlatformChange.Do(); err != nil { + if c.platform.Get() != plt { + c.logger.V(1).Info("platform detected", "platform", plt) + c.platform.Set(plt) + if err = c.onPlatformChange.Do(); err != nil { // Don't fail if the callback failed, as auto-detection itself worked. c.logger.Error(err, "configuration change notification failed for callback") } @@ -164,7 +157,7 @@ func (c *Config) TargetAllocatorConfigMapEntry() string { // Platform represents the type of the platform this operator is running. func (c *Config) Platform() platform.Platform { - return c.platform + return c.platform.Get() } // AutoscalingVersion represents the preferred version of autoscaling. @@ -202,3 +195,30 @@ func (c *Config) LabelsFilter() []string { func (c *Config) RegisterPlatformChangeCallback(f func() error) { c.onPlatformChange.Register(f) } + +type platformStore interface { + Set(plt platform.Platform) + Get() platform.Platform +} + +func newPlatformWrapper() platformStore { + return &platformWrapper{} +} + +type platformWrapper struct { + mu sync.Mutex + current platform.Platform +} + +func (p *platformWrapper) Set(plt platform.Platform) { + p.mu.Lock() + p.current = plt + p.mu.Unlock() +} + +func (p *platformWrapper) Get() platform.Platform { + p.mu.Lock() + plt := p.current + p.mu.Unlock() + return plt +} diff --git a/internal/config/options.go b/internal/config/options.go index 34b5b13dd..c1e5993da 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -43,7 +43,7 @@ type options struct { targetAllocatorImage string onPlatformChange changeHandler labelsFilter []string - platform platform.Platform + platform platformStore autoDetectFrequency time.Duration autoscalingVersion autodetect.AutoscalingVersion } @@ -94,7 +94,7 @@ func WithOnPlatformChangeCallback(f func() error) Option { } func WithPlatform(plt platform.Platform) Option { return func(o *options) { - o.platform = plt + o.platform.Set(plt) } } func WithVersion(v version.Version) Option { diff --git a/main.go b/main.go index 404abf83b..797b6bcca 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ import ( "strings" "time" + routev1 "github.com/openshift/api/route/v1" "github.com/spf13/pflag" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" @@ -66,6 +67,7 @@ func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) + utilruntime.Must(routev1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go index 9ed20fbd5..fee7e8cd7 100644 --- a/pkg/collector/reconcile/ingress.go +++ b/pkg/collector/reconcile/ingress.go @@ -36,36 +36,7 @@ func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { return nil } - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration from the context") - return nil - } - - ports, err := adapters.ConfigToReceiverPorts(params.Log, config) - if err != nil { - params.Log.Error(err, "couldn't build the ingress for this instance") - return nil - } - - if len(params.Instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) - } + ports := servicePortsFromCfg(params) // if we have no ports, we don't need a ingress entry if len(ports) == 0 { @@ -241,3 +212,36 @@ func deleteIngresses(ctx context.Context, params Params, expected []networkingv1 return nil } + +func servicePortsFromCfg(params Params) []corev1.ServicePort { + config, err := adapters.ConfigFromString(params.Instance.Spec.Config) + if err != nil { + params.Log.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(params.Log, config) + if err != nil { + params.Log.Error(err, "couldn't build the ingress for this instance") + } + + if len(params.Instance.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) + resultingInferredPorts := []corev1.ServicePort{} + for _, inferred := range ports { + if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) + } + return ports +} diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go new file mode 100644 index 000000000..50783611d --- /dev/null +++ b/pkg/collector/reconcile/route.go @@ -0,0 +1,209 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + routev1 "github.com/openshift/api/route/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +func desiredRoutes(_ context.Context, params Params) []routev1.Route { + var tlsCfg *routev1.TLSConfig + switch params.Instance.Spec.Ingress.Route.Termination { + case v1alpha1.TLSRouteTerminationTypeInsecure: + // NOTE: insecure, no tls cfg. + case v1alpha1.TLSRouteTerminationTypeEdge: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationEdge} + case v1alpha1.TLSRouteTerminationTypePassthrough: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationPassthrough} + case v1alpha1.TLSRouteTerminationTypeReencrypt: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationReencrypt} + default: // NOTE: if unsupported, end here. + return nil + } + + ports := servicePortsFromCfg(params) + + // if we have no ports, we don't need a route entry + if len(ports) == 0 { + params.Log.V(1).Info( + "the instance's configuration didn't yield any ports to open, skipping route", + "instance.name", params.Instance.Name, + "instance.namespace", params.Instance.Namespace, + ) + return nil + } + + routes := make([]routev1.Route, len(ports)) + for i, p := range ports { + routes[i] = routev1.Route{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Route(params.Instance, p.Name), + Namespace: params.Instance.Namespace, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Route(params.Instance, p.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: routev1.RouteSpec{ + Host: p.Name + "." + params.Instance.Spec.Ingress.Hostname, + Path: "/" + p.Name, + To: routev1.RouteTargetReference{ + Kind: "Service", + Name: naming.Service(params.Instance), + }, + Port: &routev1.RoutePort{ + // Valid names must be non-empty and no more than 15 characters long. + TargetPort: intstr.FromString(naming.Truncate(p.Name, 15)), + }, + WildcardPolicy: routev1.WildcardPolicyNone, + TLS: tlsCfg, + }, + } + } + return routes +} + +// Routes reconciles the route(s) required for the instance in the current context. +func Routes(ctx context.Context, params Params) error { + if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { + return nil + } + + isSupportedMode := true + if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { + params.Log.V(3).Info("ingress settings are not supported in sidecar mode") + isSupportedMode = false + } + + var desired []routev1.Route + if isSupportedMode { + if r := desiredRoutes(ctx, params); r != nil { + desired = append(desired, r...) + } + } + + // first, handle the create/update parts + if err := expectedRoutes(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected routes: %w", err) + } + + // then, delete the extra objects + if err := deleteRoutes(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the routes to be deleted: %w", err) + } + + return nil +} + +func expectedRoutes(ctx context.Context, params Params, expected []routev1.Route) error { + for _, obj := range expected { + desired := obj + + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } + + existing := &routev1.Route{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err = params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "route.name", desired.Name, "route.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + updated.Spec.To = desired.Spec.To + updated.Spec.TLS = desired.Spec.TLS + updated.Spec.Port = desired.Spec.Port + updated.Spec.WildcardPolicy = desired.Spec.WildcardPolicy + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + patch := client.MergeFrom(existing) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "route.name", desired.Name, "route.namespace", desired.Namespace) + } + return nil +} + +func deleteRoutes(ctx context.Context, params Params, expected []routev1.Route) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + list := &routev1.RouteList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + break + } + } + + if del { + if err := params.Client.Delete(ctx, &existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "route.name", existing.Name, "route.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go new file mode 100644 index 000000000..4ea82bc91 --- /dev/null +++ b/pkg/collector/reconcile/route_test.go @@ -0,0 +1,236 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + _ "embed" + "fmt" + "strings" + "testing" + + routev1 "github.com/openshift/api/route/v1" + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +func TestDesiredRoutes(t *testing.T) { + t.Run("should return nil invalid ingress type", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressType("unknown"), + }, + }, + }, + } + + actual := desiredRoutes(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse config", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "!!!", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + }, + }, + }, + } + + actual := desiredRoutes(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { + params := Params{ + Config: config.Config{}, + Client: k8sClient, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "---", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + }, + }, + }, + } + + actual := desiredRoutes(context.Background(), params) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to do something else", func(t *testing.T) { + var ( + ns = "test" + hostname = "example.com" + ) + + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = ns + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, + } + + got := desiredRoutes(context.Background(), params)[0] + + assert.NotEqual(t, &routev1.Route{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Route(params.Instance, ""), + Namespace: ns, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Route(params.Instance, ""), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: routev1.RouteSpec{ + Host: hostname, + Path: "/abc", + To: routev1.RouteTargetReference{ + Kind: "service", + Name: "test-collector", + }, + Port: &routev1.RoutePort{ + TargetPort: intstr.FromString("another-port"), + }, + WildcardPolicy: routev1.WildcardPolicyNone, + TLS: &routev1.TLSConfig{ + Termination: routev1.TLSTerminationPassthrough, + InsecureEdgeTerminationPolicy: routev1.InsecureEdgeTerminationPolicyAllow, + }, + }, + }, got) + }) +} + +func TestExpectedRoutes(t *testing.T) { + t.Run("should create and update route entry", func(t *testing.T) { + ctx := context.Background() + + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + params.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + params.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + + err = expectedRoutes(ctx, params, desiredRoutes(ctx, params)) + assert.NoError(t, err) + + nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: "otlp-grpc-test-route"} + exists, err := populateObjectIfExists(t, &routev1.Route{}, nns) + assert.NoError(t, err) + assert.True(t, exists) + + // update fields + const expectHostname = "something-else.com" + params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} + params.Instance.Spec.Ingress.Hostname = expectHostname + + err = expectedRoutes(ctx, params, desiredRoutes(ctx, params)) + assert.NoError(t, err) + + got := &routev1.Route{} + err = params.Client.Get(ctx, nns, got) + assert.NoError(t, err) + + gotHostname := got.Spec.Host + if !strings.Contains(gotHostname, got.Spec.Host) { + t.Errorf("host name is not up-to-date. expect: %s, got: %s", expectHostname, gotHostname) + } + + if v, ok := got.Annotations["blub"]; !ok || v != "blob" { + t.Error("annotations are not up-to-date. Missing entry or value is invalid.") + } + }) +} + +func TestDeleteRoutes(t *testing.T) { + t.Run("should delete excess routes", func(t *testing.T) { + // create + ctx := context.Background() + + myParams, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + myParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + + err = expectedRoutes(ctx, myParams, desiredRoutes(ctx, myParams)) + assert.NoError(t, err) + + nns := types.NamespacedName{Namespace: "default", Name: "otlp-grpc-test-route"} + exists, err := populateObjectIfExists(t, &routev1.Route{}, nns) + assert.NoError(t, err) + assert.True(t, exists) + + // delete + if err = deleteRoutes(ctx, params(), []routev1.Route{}); err != nil { + t.Error(err) + } + + // check + exists, err = populateObjectIfExists(t, &routev1.Route{}, nns) + assert.NoError(t, err) + assert.False(t, exists) + }) +} + +func TestRoutes(t *testing.T) { + t.Run("wrong mode", func(t *testing.T) { + ctx := context.Background() + err := Routes(ctx, params()) + assert.Nil(t, err) + }) + + t.Run("supported mode and service exists", func(t *testing.T) { + ctx := context.Background() + myParams := params() + err := expectedServices(context.Background(), myParams, []corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) + assert.NoError(t, err) + + assert.Nil(t, Routes(ctx, myParams)) + }) + +} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index a83f3bf8f..598807dd2 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -25,8 +25,10 @@ import ( "testing" "time" + routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -45,6 +47,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/testdata" ) var ( @@ -72,6 +75,9 @@ func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + CRDInstallOptions: envtest.CRDInstallOptions{ + CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, + }, WebhookInstallOptions: envtest.WebhookInstallOptions{ Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, }, @@ -82,6 +88,11 @@ func TestMain(m *testing.M) { os.Exit(1) } + if err = routev1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + if err = v1alpha1.AddToScheme(testScheme); err != nil { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) diff --git a/pkg/collector/testdata/route_crd.go b/pkg/collector/testdata/route_crd.go new file mode 100644 index 000000000..c32a7f95b --- /dev/null +++ b/pkg/collector/testdata/route_crd.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package testdata + +import ( + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpenShiftRouteCRD as go structure. +var OpenShiftRouteCRD = &apiextensionsv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "routes.route.openshift.io", + }, + Spec: apiextensionsv1.CustomResourceDefinitionSpec{ + Group: "route.openshift.io", + Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ + { + Name: "v1", + Served: true, + Storage: true, + Schema: &apiextensionsv1.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ + Type: "object", + XPreserveUnknownFields: func(v bool) *bool { return &v }(true), + }, + }, + AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ + { + Name: "Host", + Type: "string", + JSONPath: ".status.ingress[0].host", + }, + { + Name: "Admitted", + Type: "string", + JSONPath: `.status.ingress[0].conditions[?(@.type=="Admitted")].status`, + }, + { + Name: "Service", + Type: "string", + JSONPath: ".spec.to.name", + }, + { + Name: "TLS", + Type: "string", + JSONPath: ".spec.tls.type", + }, + }, + Subresources: &apiextensionsv1.CustomResourceSubresources{ + Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, + }, + }, + }, + Scope: apiextensionsv1.NamespaceScoped, + Names: apiextensionsv1.CustomResourceDefinitionNames{ + Plural: "routes", + Singular: "route", + Kind: "Route", + }, + }, +} diff --git a/pkg/naming/main.go b/pkg/naming/main.go index 59b8029a8..ff7f7cd9a 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -94,6 +94,11 @@ func Ingress(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-ingress", 63, otelcol.Name)) } +// Route builds the route name based on the instance. +func Route(otelcol v1alpha1.OpenTelemetryCollector, prefix string) string { + return DNSName(Truncate("%s-%s-route", 63, prefix, otelcol.Name)) +} + // TAService returns the name to use for the TargetAllocator service. func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) diff --git a/tests/e2e/route/00-assert.yaml b/tests/e2e/route/00-assert.yaml new file mode 100644 index 000000000..35ee38e2a --- /dev/null +++ b/tests/e2e/route/00-assert.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + something.com: "true" + labels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-grpc-simplest-route + name: otlp-grpc-simplest-route + ownerReferences: + - apiVersion: opentelemetry.io/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: OpenTelemetryCollector + name: simplest +spec: + host: otlp-grpc.example.com + path: /otlp-grpc + port: + targetPort: otlp-grpc + to: + kind: Service + name: simplest-collector + weight: null + wildcardPolicy: None diff --git a/tests/e2e/route/00-install.yaml b/tests/e2e/route/00-install.yaml new file mode 100644 index 000000000..b2f47baaf --- /dev/null +++ b/tests/e2e/route/00-install.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + mode: "deployment" + ingress: + type: route + hostname: "example.com" + annotations: + something.com: "true" + route: + termination: "insecure" + + config: | + receivers: + otlp: + protocols: + grpc: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From b170cc75cc5f6496607691517e7ab9e55abb296d Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 15 Dec 2022 03:13:23 -0500 Subject: [PATCH 0683/1234] Add chloggen to the repository (#1326) * Add changelog gen * Doc update * Forgot a file in the copypasta * Apply suggestions from code review Co-authored-by: Ben B. * pin version Co-authored-by: Ben B. --- .chloggen/1317-chloggen.yaml | 17 +++++ .chloggen/TEMPLATE.yaml | 16 +++++ .github/workflows/changelog.yaml | 88 +++++++++++++++++++++++ .github/workflows/check_links_config.json | 17 +++++ CONTRIBUTING.md | 16 +++++ Makefile | 25 +++++++ RELEASE.md | 11 ++- 7 files changed, 183 insertions(+), 7 deletions(-) create mode 100755 .chloggen/1317-chloggen.yaml create mode 100644 .chloggen/TEMPLATE.yaml create mode 100644 .github/workflows/changelog.yaml create mode 100644 .github/workflows/check_links_config.json diff --git a/.chloggen/1317-chloggen.yaml b/.chloggen/1317-chloggen.yaml new file mode 100755 index 000000000..e61973f98 --- /dev/null +++ b/.chloggen/1317-chloggen.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: github_actions + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduces the chloggen package to manage the changelog + +# One or more tracking issues related to the change +issues: + - 1317 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.chloggen/TEMPLATE.yaml b/.chloggen/TEMPLATE.yaml new file mode 100644 index 000000000..ca13515f1 --- /dev/null +++ b/.chloggen/TEMPLATE.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: + +# One or more tracking issues related to the change +issues: [] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 000000000..b009cfbcd --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,88 @@ +# This action requires that any PR targeting the main branch should add a +# yaml file to the ./.chloggen/ directory. If a CHANGELOG entry is not required, +# or if performing maintance on the Changelog, add either \"[chore]\" to the title of +# the pull request or add the \"Skip Changelog\" label to disable this action. + +name: changelog + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + branches: + - main + +env: + # See: https://github.com/actions/cache/issues/810#issuecomment-1222550359 + # Cache downloads for this workflow consistently run in under 1 minute + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + changelog: + runs-on: ubuntu-latest + if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}} + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Cache Go + id: go-cache + uses: actions/cache@v3 + with: + path: | + ~/go/bin + ~/go/pkg/mod + key: changelog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + + - name: Ensure no changes to the CHANGELOG + run: | + if [[ $(git diff --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./CHANGELOG.md) ]] + then + echo "The CHANGELOG should not be directly modified." + echo "Please add a .yaml file to the ./.chloggen/ directory." + echo "See CONTRIBUTING.md for more details." + echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." + false + else + echo "The CHANGELOG was not modified." + fi + + - name: Ensure ./.chloggen/*.yaml addition(s) + run: | + if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./.chloggen | grep -c \\.yaml) ]] + then + echo "No changelog entry was added to the ./.chloggen/ directory." + echo "Please add a .yaml file to the ./.chloggen/ directory." + echo "See CONTRIBUTING.md for more details." + echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." + false + else + echo "A changelog entry was added to the ./.chloggen/ directory." + fi + + - name: Validate ./.chloggen/*.yaml changes + run: | + make chlog-validate \ + || { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; } + + # In order to validate any links in the yaml file, render the config to markdown + - name: Render .chloggen changelog entries + run: make chlog-preview > changelog_preview.md + - name: Install markdown-link-check + run: npm install -g markdown-link-check + - name: Run markdown-link-check + run: | + markdown-link-check \ + --verbose \ + --config .github/workflows/check_links_config.json \ + changelog_preview.md \ + || { echo "Check that anchor links are lowercase"; exit 1; } diff --git a/.github/workflows/check_links_config.json b/.github/workflows/check_links_config.json new file mode 100644 index 000000000..83b164ead --- /dev/null +++ b/.github/workflows/check_links_config.json @@ -0,0 +1,17 @@ +{ + "ignorePatterns": [ + { + "pattern": "http(s)?://\\d+\\.\\d+\\.\\d+\\.\\d+" + }, + { + "pattern": "http(s)?://localhost" + }, + { + "pattern": "http(s)?://example.com" + }, + { + "pattern": "^#" + } + ], + "aliveStatusCodes": [429, 200] +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bce58b96f..20b2a3fc4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -135,6 +135,22 @@ Every bug fix should be accompanied with a unit test, so that we can prevent reg They are mostly welcome! +### Adding a Changelog Entry + +The [CHANGELOG.md](./CHANGELOG.md) file in this repo is autogenerated from `.yaml` files in the `./.chloggen` directory. + +Your pull-request should add a new `.yaml` file to this directory. The name of your file must be unique since the last release. + +During the collector release process, all `./.chloggen/*.yaml` files are transcribed into `CHANGELOG.md` and then deleted. + +**Recommended Steps** +1. Create an entry file using `make chlog-new`. This generates a file based on your current branch (e.g. `./.chloggen/my-branch.yaml`) +2. Fill in all fields in the new file +3. Run `make chlog-validate` to ensure the new file is valid +4. Commit and push the file + +Alternately, copy `./.chloggen/TEMPLATE.yaml`, or just create your file from scratch. + ## Operator Lifecycle Manager (OLM) For production environments, it is recommended to use the [Operator Lifecycle Manager (OLM)](https://github.com/operator-framework/operator-lifecycle-manager) to provision and update the OpenTelemetry Operator. Our operator is available in the [Operator Hub](https://operatorhub.io/operator/opentelemetry-operator), and when making changes involving those manifests the following steps can be used for testing. Refer to the [OLM documentation](https://sdk.operatorframework.io/docs/olm-integration/quickstart-bundle/) for more complete information. diff --git a/Makefile b/Makefile index 3ca33d1de..70d94903a 100644 --- a/Makefile +++ b/Makefile @@ -249,6 +249,7 @@ cmctl: KUSTOMIZE ?= $(LOCALBIN)/kustomize CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen ENVTEST ?= $(LOCALBIN)/setup-envtest +CHLOGGEN ?= $(LOCALBIN)/chloggen ## Tool Versions KUSTOMIZE_VERSION ?= v4.5.5 @@ -360,3 +361,27 @@ api-docs: crdoc kustomize $(KUSTOMIZE) build config/crd -o $$TMP_DIR/crd-output.yaml ;\ $(CRDOC) --resources $$TMP_DIR/crd-output.yaml --output docs/api.md ;\ } + + +.PHONY: chlog-install +chlog-install: $(CHLOGGEN) +$(CHLOGGEN): $(LOCALBIN) + GOBIN=$(LOCALBIN) go install go.opentelemetry.io/build-tools/chloggen@v0.3.0 + +FILENAME?=$(shell git branch --show-current) +.PHONY: chlog-new +chlog-new: chlog-install + $(CHLOGGEN) new --filename $(FILENAME) + +.PHONY: chlog-validate +chlog-validate: chlog-install + $(CHLOGGEN) validate + +.PHONY: chlog-preview +chlog-preview: chlog-install + $(CHLOGGEN) update --dry + +.PHONY: chlog-update +chlog-update: chlog-install + $(CHLOGGEN) update --version $(VERSION) + diff --git a/RELEASE.md b/RELEASE.md index 3259fd8da..8ba66bba4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,13 +16,10 @@ Steps to release a new version of the OpenTelemetry Operator: ## Generating the changelog -Run this generator: +We now use the chloggen to generate the changelog, simply run the following to generate the Changelog: + ```bash -docker run --rm -v "${PWD}:/app" pavolloffay/gch:latest --oauth-token ${GH_WRITE_TOKEN} --owner open-telemetry --repo opentelemetry-operator --branch main +make chlog-update ``` -* Note that you must generate a Personal Access Token (PAT) and set `GH_WRITE_TOKEN` as that. -Remove the commits that are not relevant to users, like: -* CI or testing-specific commits (e2e, unit test, ...) -* bug fixes for problems that are not part of a release yet -* version bumps for internal dependencies +This will delete all entries (other than the template) in the `.chloggen` directory and create a populated Changelog.md entry. Make sure that the PR you are generating for the release has the `[chore]` prefix, otherwise CI will not pass. From 49de005991bd6864ccbf637c022da9e0ae925405 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Sat, 17 Dec 2022 03:24:21 -0500 Subject: [PATCH 0684/1234] [target-allocator] Handle concurrency more gracefully (#1265) * First pass * More defense * Fixing tests... * Fix go.sum * Remove some more expensive sites for http * Begin working on run groups * Reworked logic for run groups to manage concurrency and shutdowns more effectively * Fix imports linting * Test fixes * Fix linting * Delete duplicated code * Remove gen change * Remove http from allocation, add tests for http * Some cleanup * lint * Fix lint errors * Changelog file, requested changes * update run group for prom watcher * Header for allocatortest --- .chloggen/1257-memory-usage-fixes.yaml | 17 + .../allocation/allocatortest.go | 58 +++ .../allocation/consistent_hashing.go | 16 +- .../allocation/consistent_hashing_test.go | 20 +- cmd/otel-allocator/allocation/http.go | 41 -- cmd/otel-allocator/allocation/http_test.go | 216 ---------- .../allocation/least_weighted.go | 16 +- .../allocation/least_weighted_test.go | 62 +-- .../allocation/strategy_test.go | 40 +- cmd/otel-allocator/collector/collector.go | 26 +- cmd/otel-allocator/discovery/discovery.go | 131 ------ cmd/otel-allocator/go.mod | 1 + cmd/otel-allocator/go.sum | 1 + cmd/otel-allocator/main.go | 406 +++++++----------- cmd/otel-allocator/prehook/prehook.go | 7 + cmd/otel-allocator/prehook/relabel.go | 7 - cmd/otel-allocator/server/server.go | 189 ++++++++ cmd/otel-allocator/server/server_test.go | 214 +++++++++ cmd/otel-allocator/target/discovery.go | 111 +++++ .../{discovery => target}/discovery_test.go | 30 +- .../{discovery => target}/testdata/test.yaml | 0 .../testdata/test_update.yaml | 0 cmd/otel-allocator/watcher/file.go | 49 ++- cmd/otel-allocator/watcher/main.go | 118 ----- cmd/otel-allocator/watcher/promOperator.go | 20 +- cmd/otel-allocator/watcher/watcher.go | 47 ++ 26 files changed, 951 insertions(+), 892 deletions(-) create mode 100755 .chloggen/1257-memory-usage-fixes.yaml create mode 100644 cmd/otel-allocator/allocation/allocatortest.go delete mode 100644 cmd/otel-allocator/allocation/http.go delete mode 100644 cmd/otel-allocator/allocation/http_test.go delete mode 100644 cmd/otel-allocator/discovery/discovery.go create mode 100644 cmd/otel-allocator/server/server.go create mode 100644 cmd/otel-allocator/server/server_test.go create mode 100644 cmd/otel-allocator/target/discovery.go rename cmd/otel-allocator/{discovery => target}/discovery_test.go (78%) rename cmd/otel-allocator/{discovery => target}/testdata/test.yaml (100%) rename cmd/otel-allocator/{discovery => target}/testdata/test_update.yaml (100%) delete mode 100644 cmd/otel-allocator/watcher/main.go create mode 100644 cmd/otel-allocator/watcher/watcher.go diff --git a/.chloggen/1257-memory-usage-fixes.yaml b/.chloggen/1257-memory-usage-fixes.yaml new file mode 100755 index 000000000..bcb965885 --- /dev/null +++ b/.chloggen/1257-memory-usage-fixes.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Target Allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR changes many packages in the target allocator for cleaner access patterns + +# One or more tracking issues related to the change +issues: + - 1257 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/allocation/allocatortest.go b/cmd/otel-allocator/allocation/allocatortest.go new file mode 100644 index 000000000..0cc4ccc41 --- /dev/null +++ b/cmd/otel-allocator/allocation/allocatortest.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package allocation + +import ( + "fmt" + "strconv" + + "github.com/prometheus/common/model" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +func colIndex(index, numCols int) int { + if numCols == 0 { + return -1 + } + return index % numCols +} + +func MakeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*target.Item { + toReturn := map[string]*target.Item{} + for i := startingIndex; i < n+startingIndex; i++ { + collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) + label := model.LabelSet{ + "collector": model.LabelValue(collector), + "i": model.LabelValue(strconv.Itoa(i)), + "total": model.LabelValue(strconv.Itoa(n + startingIndex)), + } + newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) + toReturn[newTarget.Hash()] = newTarget + } + return toReturn +} + +func MakeNCollectors(n int, startingIndex int) map[string]*Collector { + toReturn := map[string]*Collector{} + for i := startingIndex; i < n+startingIndex; i++ { + collector := fmt.Sprintf("collector-%d", i) + toReturn[collector] = &Collector{ + Name: collector, + NumTargets: 0, + } + } + return toReturn +} diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index 962e133ed..f0ada80e8 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -124,25 +124,25 @@ func (c *consistentHashingAllocator) addTargetToTargetItems(tg *target.Item) { // Any net-new additions are assigned to the next available collector. func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*target.Item]) { // Check for removals - for k, target := range c.targetItems { - // if the current target is in the removals list + for k, item := range c.targetItems { + // if the current item is in the removals list if _, ok := diff.Removals()[k]; ok { - col := c.collectors[target.CollectorName] + col := c.collectors[item.CollectorName] col.NumTargets-- delete(c.targetItems, k) - delete(c.targetItemsPerJobPerCollector[target.CollectorName][target.JobName], target.Hash()) - TargetsPerCollector.WithLabelValues(target.CollectorName, consistentHashingStrategyName).Set(float64(col.NumTargets)) + delete(c.targetItemsPerJobPerCollector[item.CollectorName][item.JobName], item.Hash()) + TargetsPerCollector.WithLabelValues(item.CollectorName, consistentHashingStrategyName).Set(float64(col.NumTargets)) } } // Check for additions - for k, target := range diff.Additions() { + for k, item := range diff.Additions() { // Do nothing if the item is already there if _, ok := c.targetItems[k]; ok { continue } else { - // Add target to target pool and assign a collector - c.addTargetToTargetItems(target) + // Add item to item pool and assign a collector + c.addTargetToTargetItems(item) } } } diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go index 4a719a216..7fcbf8891 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -21,10 +21,10 @@ import ( ) func TestCanSetSingleTarget(t *testing.T) { - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) - c.SetTargets(makeNNewTargets(1, 3, 0)) + c.SetTargets(MakeNNewTargets(1, 3, 0)) actualTargetItems := c.TargetItems() assert.Len(t, actualTargetItems, 1) for _, item := range actualTargetItems { @@ -35,12 +35,12 @@ func TestCanSetSingleTarget(t *testing.T) { func TestRelativelyEvenDistribution(t *testing.T) { numCols := 15 numItems := 10000 - cols := makeNCollectors(numCols, 0) + cols := MakeNCollectors(numCols, 0) var expectedPerCollector = float64(numItems / numCols) expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) - c.SetTargets(makeNNewTargets(numItems, 0, 0)) + c.SetTargets(MakeNNewTargets(numItems, 0, 0)) actualTargetItems := c.TargetItems() assert.Len(t, actualTargetItems, numItems) actualCollectors := c.Collectors() @@ -51,15 +51,15 @@ func TestRelativelyEvenDistribution(t *testing.T) { } func TestFullReallocation(t *testing.T) { - cols := makeNCollectors(10, 0) + cols := MakeNCollectors(10, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) - c.SetTargets(makeNNewTargets(10000, 10, 0)) + c.SetTargets(MakeNNewTargets(10000, 10, 0)) actualTargetItems := c.TargetItems() assert.Len(t, actualTargetItems, 10000) actualCollectors := c.Collectors() assert.Len(t, actualCollectors, 10) - newCols := makeNCollectors(10, 10) + newCols := MakeNCollectors(10, 10) c.SetCollectors(newCols) updatedTargetItems := c.TargetItems() assert.Len(t, updatedTargetItems, 10000) @@ -76,15 +76,15 @@ func TestNumRemapped(t *testing.T) { numInitialCols := 15 numFinalCols := 16 expectedDelta := float64((numFinalCols - numInitialCols) * (numItems / numFinalCols)) - cols := makeNCollectors(numInitialCols, 0) + cols := MakeNCollectors(numInitialCols, 0) c := newConsistentHashingAllocator(logger) c.SetCollectors(cols) - c.SetTargets(makeNNewTargets(numItems, numInitialCols, 0)) + c.SetTargets(MakeNNewTargets(numItems, numInitialCols, 0)) actualTargetItems := c.TargetItems() assert.Len(t, actualTargetItems, numItems) actualCollectors := c.Collectors() assert.Len(t, actualCollectors, numInitialCols) - newCols := makeNCollectors(numFinalCols, 0) + newCols := MakeNCollectors(numFinalCols, 0) c.SetCollectors(newCols) updatedTargetItems := c.TargetItems() assert.Len(t, updatedTargetItems, numItems) diff --git a/cmd/otel-allocator/allocation/http.go b/cmd/otel-allocator/allocation/http.go deleted file mode 100644 index a6e72c1d8..000000000 --- a/cmd/otel-allocator/allocation/http.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "fmt" - "net/url" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -type collectorJSON struct { - Link string `json:"_link"` - Jobs []*target.Item `json:"targets"` -} - -// GetAllTargetsByJob is a relatively expensive call that is usually only used for debugging purposes. -func GetAllTargetsByJob(allocator Allocator, job string) map[string]collectorJSON { - displayData := make(map[string]collectorJSON) - for _, col := range allocator.Collectors() { - items := allocator.GetTargetsForCollectorAndJob(col.Name, job) - displayData[col.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(job), col.Name), Jobs: items} - } - return displayData -} - -func GetAllTargetsByCollectorAndJob(allocator Allocator, collector string, job string) []*target.Item { - return allocator.GetTargetsForCollectorAndJob(collector, job) -} diff --git a/cmd/otel-allocator/allocation/http_test.go b/cmd/otel-allocator/allocation/http_test.go deleted file mode 100644 index 586b833f7..000000000 --- a/cmd/otel-allocator/allocation/http_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "fmt" - "testing" - - "github.com/prometheus/common/model" - "github.com/stretchr/testify/assert" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var ( - baseLabelSet = model.LabelSet{ - "test-label": "test-value", - } - testJobLabelSetTwo = model.LabelSet{ - "test-label": "test-value2", - } - baseTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") - testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") - secondTargetItem = target.NewItem("test-job2", "test-url", baseLabelSet, "test-collector") -) - -func TestGetAllTargetsByCollectorAndJob(t *testing.T) { - leastWeighted, _ := New(leastWeightedStrategyName, logger) - leastWeighted.SetCollectors(map[string]*Collector{"test-collector": {Name: "test-collector"}}) - type args struct { - collector string - job string - cMap map[string][]target.Item - allocator Allocator - } - var tests = []struct { - name string - args args - want []target.Item - }{ - { - name: "Empty target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string][]target.Item{}, - allocator: leastWeighted, - }, - want: nil, - }, - { - name: "Single entry target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string][]target.Item{ - "test-collectortest-job": { - *baseTargetItem, - }, - }, - allocator: leastWeighted, - }, - want: []target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", - }, - }, - }, - }, - { - name: "Multiple entry target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string][]target.Item{ - "test-collectortest-job": { - *baseTargetItem, - }, - "test-collectortest-job2": { - *secondTargetItem, - }, - }, - allocator: leastWeighted, - }, - want: []target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", - }, - }, - }, - }, - { - name: "Multiple entry target map of same job with label merge", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string][]target.Item{ - "test-collectortest-job": { - *baseTargetItem, - }, - "test-collectortest-job2": { - *testJobTargetItemTwo, - }, - }, - allocator: leastWeighted, - }, - want: []target.Item{ - { - TargetURL: []string{"test-url1"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value-1", - "foo": "bar", - }, - }, - { - TargetURL: []string{"test-url2"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value-2", - }, - }, - }, - }, - { - name: "Multiple entry target map with same target address", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string][]target.Item{ - "test-collectortest-job": { - *baseTargetItem, - *baseTargetItem, - }, - }, - allocator: leastWeighted, - }, - want: []target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", - "foo": "bar", - }, - }, - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test-label": "test-value", - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - targetGroups := GetAllTargetsByCollectorAndJob(tt.args.allocator, tt.args.collector, tt.args.job) - for _, wantGroupJson := range tt.want { - for _, groupJSON := range targetGroups { - if groupJSON.Labels.String() == wantGroupJson.Labels.String() { - assert.Equal(t, wantGroupJson, groupJSON) - } - } - } - }) - } -} - -func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) { - var table = []struct { - numCollectors int - numJobs int - }{ - {numCollectors: 100, numJobs: 100}, - {numCollectors: 100, numJobs: 1000}, - {numCollectors: 100, numJobs: 10000}, - {numCollectors: 100, numJobs: 100000}, - {numCollectors: 1000, numJobs: 100}, - {numCollectors: 1000, numJobs: 1000}, - {numCollectors: 1000, numJobs: 10000}, - {numCollectors: 1000, numJobs: 100000}, - } - for _, s := range GetRegisteredAllocatorNames() { - for _, v := range table { - a, err := New(s, logger) - if err != nil { - b.Log(err) - b.Fail() - } - cols := makeNCollectors(v.numCollectors, 0) - jobs := makeNNewTargets(v.numJobs, v.numCollectors, 0) - a.SetCollectors(cols) - a.SetTargets(jobs) - b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numJobs), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - GetAllTargetsByCollectorAndJob(a, fmt.Sprintf("collector-%d", v.numCollectors/2), fmt.Sprintf("test-job-%d", v.numJobs/2)) - } - }) - } - } -} diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 08a55059e..012d9bbfa 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -150,25 +150,25 @@ func (allocator *leastWeightedAllocator) addTargetToTargetItems(tg *target.Item) // Any net-new additions are assigned to the next available collector. func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*target.Item]) { // Check for removals - for k, target := range allocator.targetItems { - // if the current target is in the removals list + for k, item := range allocator.targetItems { + // if the current item is in the removals list if _, ok := diff.Removals()[k]; ok { - c := allocator.collectors[target.CollectorName] + c := allocator.collectors[item.CollectorName] c.NumTargets-- delete(allocator.targetItems, k) - delete(allocator.targetItemsPerJobPerCollector[target.CollectorName][target.JobName], target.Hash()) - TargetsPerCollector.WithLabelValues(target.CollectorName, leastWeightedStrategyName).Set(float64(c.NumTargets)) + delete(allocator.targetItemsPerJobPerCollector[item.CollectorName][item.JobName], item.Hash()) + TargetsPerCollector.WithLabelValues(item.CollectorName, leastWeightedStrategyName).Set(float64(c.NumTargets)) } } // Check for additions - for k, target := range diff.Additions() { + for k, item := range diff.Additions() { // Do nothing if the item is already there if _, ok := allocator.targetItems[k]; ok { continue } else { - // Add target to target pool and assign a collector - allocator.addTargetToTargetItems(target) + // Add item to item pool and assign a collector + allocator.addTargetToTargetItems(item) } } } diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index f70d5025f..90df0b39b 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -15,10 +15,8 @@ package allocation import ( - "fmt" "math" "math/rand" - "strconv" "testing" "github.com/prometheus/common/model" @@ -30,44 +28,10 @@ import ( var logger = logf.Log.WithName("unit-tests") -func colIndex(index, numCols int) int { - if numCols == 0 { - return -1 - } - return index % numCols -} - -func makeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*target.Item { - toReturn := map[string]*target.Item{} - for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) - label := model.LabelSet{ - "collector": model.LabelValue(collector), - "i": model.LabelValue(strconv.Itoa(i)), - "total": model.LabelValue(strconv.Itoa(n + startingIndex)), - } - newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) - toReturn[newTarget.Hash()] = newTarget - } - return toReturn -} - -func makeNCollectors(n int, startingIndex int) map[string]*Collector { - toReturn := map[string]*Collector{} - for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", i) - toReturn[collector] = &Collector{ - Name: collector, - NumTargets: 0, - } - } - return toReturn -} - func TestSetCollectors(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -83,10 +47,10 @@ func TestAddingAndRemovingTargets(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) s.SetCollectors(cols) - initTargets := makeNNewTargets(6, 3, 0) + initTargets := MakeNNewTargets(6, 3, 0) // test that targets and collectors are added properly s.SetTargets(initTargets) @@ -96,7 +60,7 @@ func TestAddingAndRemovingTargets(t *testing.T) { assert.Len(t, s.TargetItems(), expectedTargetLen) // prepare second round of targets - tar := makeNNewTargets(4, 3, 0) + tar := MakeNNewTargets(4, 3, 0) // test that fewer targets are found - removed s.SetTargets(tar) @@ -118,7 +82,7 @@ func TestAllocationCollision(t *testing.T) { // prepare allocator with initial targets and collectors s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) s.SetCollectors(cols) firstLabels := model.LabelSet{ "test": "test1", @@ -152,7 +116,7 @@ func TestAllocationCollision(t *testing.T) { func TestNoCollectorReassignment(t *testing.T) { s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -161,7 +125,7 @@ func TestNoCollectorReassignment(t *testing.T) { for _, i := range cols { assert.NotNil(t, s.Collectors()[i.Name]) } - initTargets := makeNNewTargets(6, 3, 0) + initTargets := MakeNNewTargets(6, 3, 0) // test that targets and collectors are added properly s.SetTargets(initTargets) @@ -172,7 +136,7 @@ func TestNoCollectorReassignment(t *testing.T) { assert.Len(t, targetItems, expectedTargetLen) // assign new set of collectors with the same names - newCols := makeNCollectors(3, 0) + newCols := MakeNCollectors(3, 0) s.SetCollectors(newCols) newTargetItems := s.TargetItems() @@ -184,7 +148,7 @@ func TestSmartCollectorReassignment(t *testing.T) { t.Skip("This test is flaky and fails frequently, see issue 1291") s, _ := New("least-weighted", logger) - cols := makeNCollectors(4, 0) + cols := MakeNCollectors(4, 0) s.SetCollectors(cols) expectedColLen := len(cols) @@ -193,7 +157,7 @@ func TestSmartCollectorReassignment(t *testing.T) { for _, i := range cols { assert.NotNil(t, s.Collectors()[i.Name]) } - initTargets := makeNNewTargets(6, 0, 0) + initTargets := MakeNNewTargets(6, 0, 0) // test that targets and collectors are added properly s.SetTargets(initTargets) @@ -235,10 +199,10 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { // prepare allocator with 3 collectors and 'random' amount of targets s, _ := New("least-weighted", logger) - cols := makeNCollectors(3, 0) + cols := MakeNCollectors(3, 0) s.SetCollectors(cols) - targets := makeNNewTargets(27, 3, 0) + targets := MakeNNewTargets(27, 3, 0) s.SetTargets(targets) // Divisor needed to get 15% @@ -277,7 +241,7 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { assert.InDelta(t, i.NumTargets, count, math.Round(percent)) } // adding targets at 'random' - for _, item := range makeNNewTargets(13, 3, 100) { + for _, item := range MakeNNewTargets(13, 3, 100) { targets[item.Hash()] = item } s.SetTargets(targets) diff --git a/cmd/otel-allocator/allocation/strategy_test.go b/cmd/otel-allocator/allocation/strategy_test.go index 292722019..c12529d8d 100644 --- a/cmd/otel-allocator/allocation/strategy_test.go +++ b/cmd/otel-allocator/allocation/strategy_test.go @@ -22,6 +22,41 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" ) +func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) { + var table = []struct { + numCollectors int + numJobs int + }{ + {numCollectors: 100, numJobs: 100}, + {numCollectors: 100, numJobs: 1000}, + {numCollectors: 100, numJobs: 10000}, + {numCollectors: 100, numJobs: 100000}, + {numCollectors: 1000, numJobs: 100}, + {numCollectors: 1000, numJobs: 1000}, + {numCollectors: 1000, numJobs: 10000}, + {numCollectors: 1000, numJobs: 100000}, + } + for _, s := range GetRegisteredAllocatorNames() { + for _, v := range table { + a, err := New(s, logger) + if err != nil { + b.Log(err) + b.Fail() + } + cols := MakeNCollectors(v.numCollectors, 0) + jobs := MakeNNewTargets(v.numJobs, v.numCollectors, 0) + a.SetCollectors(cols) + a.SetTargets(jobs) + b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numJobs), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + a.GetTargetsForCollectorAndJob(fmt.Sprintf("collector-%d", v.numCollectors/2), fmt.Sprintf("test-job-%d", v.numJobs/2)) + } + }) + } + } +} + func Benchmark_Setting(b *testing.B) { var table = []struct { numCollectors int @@ -39,10 +74,9 @@ func Benchmark_Setting(b *testing.B) { for _, s := range GetRegisteredAllocatorNames() { for _, v := range table { - // prepare allocator with 3 collectors and 'random' amount of targets a, _ := New(s, logger) - cols := makeNCollectors(v.numCollectors, 0) - targets := makeNNewTargets(v.numTargets, v.numCollectors, 0) + cols := MakeNCollectors(v.numCollectors, 0) + targets := MakeNNewTargets(v.numTargets, v.numCollectors, 0) b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numTargets), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index f6e7f0ff8..40a0c8ac9 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -64,7 +64,7 @@ func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { }, nil } -func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors map[string]*allocation.Collector)) { +func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors map[string]*allocation.Collector)) error { collectorMap := map[string]*allocation.Collector{} log := k.log.WithValues("component", "opentelemetry-targetallocator") @@ -85,20 +85,18 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( fn(collectorMap) - go func() { - for { - watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) - if err != nil { - log.Error(err, "unable to create collector pod watcher") - return - } - log.Info("Successfully started a collector pod watcher") - if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { - log.Info("Collector pod watch event stopped " + msg) - return - } + for { + watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) + if err != nil { + log.Error(err, "unable to create collector pod watcher") + return err } - }() + log.Info("Successfully started a collector pod watcher") + if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" && msg != "no event" { + log.Info("Collector pod watch event stopped " + msg) + return nil + } + } } func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) string { diff --git a/cmd/otel-allocator/discovery/discovery.go b/cmd/otel-allocator/discovery/discovery.go deleted file mode 100644 index fa232ea49..000000000 --- a/cmd/otel-allocator/discovery/discovery.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package discovery - -import ( - "context" - - "github.com/go-kit/log" - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/model/relabel" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" -) - -var ( - targetsDiscovered = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_targets", - Help: "Number of targets discovered.", - }, []string{"job_name"}) -) - -type Manager struct { - log logr.Logger - manager *discovery.Manager - logger log.Logger - close chan struct{} - configsMap map[allocatorWatcher.EventSource]*config.Config - hook discoveryHook -} - -type discoveryHook interface { - SetConfig(map[string][]*relabel.Config) -} - -func NewManager(ctx context.Context, log logr.Logger, logger log.Logger, hook discoveryHook, options ...func(*discovery.Manager)) *Manager { - manager := discovery.NewManager(ctx, logger, options...) - - go func() { - if err := manager.Run(); err != nil { - log.Error(err, "Discovery manager failed") - } - }() - return &Manager{ - log: log, - manager: manager, - logger: logger, - close: make(chan struct{}), - configsMap: make(map[allocatorWatcher.EventSource]*config.Config), - hook: hook, - } -} - -func (m *Manager) GetScrapeConfigs() map[string]*config.ScrapeConfig { - jobToScrapeConfig := map[string]*config.ScrapeConfig{} - for _, c := range m.configsMap { - for _, scrapeConfig := range c.ScrapeConfigs { - jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig - } - } - return jobToScrapeConfig -} - -func (m *Manager) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { - m.configsMap[source] = cfg - - discoveryCfg := make(map[string]discovery.Configs) - relabelCfg := make(map[string][]*relabel.Config) - - for _, value := range m.configsMap { - for _, scrapeConfig := range value.ScrapeConfigs { - discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs - relabelCfg[scrapeConfig.JobName] = scrapeConfig.RelabelConfigs - } - } - - if m.hook != nil { - m.hook.SetConfig(relabelCfg) - } - return m.manager.ApplyConfig(discoveryCfg) -} - -func (m *Manager) Watch(fn func(targets map[string]*target.Item)) { - log := m.log.WithValues("component", "opentelemetry-targetallocator") - - go func() { - for { - select { - case <-m.close: - log.Info("Service Discovery watch event stopped: discovery manager closed") - return - case tsets := <-m.manager.SyncCh(): - targets := map[string]*target.Item{} - - for jobName, tgs := range tsets { - var count float64 - for _, tg := range tgs { - for _, t := range tg.Targets { - count++ - item := target.NewItem(jobName, string(t[model.AddressLabel]), t.Merge(tg.Labels), "") - targets[item.Hash()] = item - } - } - targetsDiscovered.WithLabelValues(jobName).Set(count) - } - fn(targets) - } - } - }() -} - -func (m *Manager) Close() { - close(m.close) -} diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index cae3c562f..ecd00cf11 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -11,6 +11,7 @@ require ( github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 github.com/mitchellh/hashstructure v1.1.0 + github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 6b8882eb0..e271cccac 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1165,6 +1165,7 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 041e2dd26..da8aed31f 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -16,43 +16,29 @@ package main import ( "context" - "encoding/json" - "errors" - "net/http" - "net/url" "os" "os/signal" "syscall" - "time" - "github.com/mitchellh/hashstructure" - - yaml2 "github.com/ghodss/yaml" gokitlog "github.com/go-kit/log" - "github.com/go-logr/logr" - "github.com/gorilla/mux" + "github.com/oklog/run" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/client_golang/prometheus/promhttp" - yaml "gopkg.in/yaml.v2" + "github.com/prometheus/prometheus/discovery" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ctrl "sigs.k8s.io/controller-runtime" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - lbdiscovery "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/discovery" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/server" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) var ( setupLog = ctrl.Log.WithName("setup") - httpDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "opentelemetry_allocator_http_duration_seconds", - Help: "Duration of received HTTP requests.", - }, []string{"path"}) eventsMetric = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "opentelemetry_allocator_events", Help: "Number of events in the channel.", @@ -60,262 +46,186 @@ var ( ) func main() { + var ( + // allocatorPrehook will be nil if filterStrategy is not set or + // unrecognized. No filtering will be used in this case. + allocatorPrehook prehook.Hook + allocator allocation.Allocator + discoveryManager *discovery.Manager + collectorWatcher *collector.Client + fileWatcher allocatorWatcher.Watcher + promWatcher allocatorWatcher.Watcher + targetDiscoverer *target.Discoverer + + discoveryCancel context.CancelFunc + runGroup run.Group + eventChan = make(chan allocatorWatcher.Event) + eventCloser = make(chan bool, 1) + interrupts = make(chan os.Signal, 1) + errChan = make(chan error) + ) cliConf, err := config.ParseCLI() if err != nil { setupLog.Error(err, "Failed to parse parameters") os.Exit(1) } - cfg, err := config.Load(*cliConf.ConfigFilePath) - if err != nil { - setupLog.Error(err, "Unable to load configuration") + cfg, configLoadErr := config.Load(*cliConf.ConfigFilePath) + if configLoadErr != nil { + setupLog.Error(configLoadErr, "Unable to load configuration") } cliConf.RootLogger.Info("Starting the Target Allocator") - ctx := context.Background() - log := ctrl.Log.WithName("allocator") - // allocatorPrehook will be nil if filterStrategy is not set or - // unrecognized. No filtering will be used in this case. - allocatorPrehook := prehook.New(cfg.GetTargetsFilterStrategy(), log) - - allocator, err := allocation.New(cfg.GetAllocationStrategy(), log, allocation.WithFilter(allocatorPrehook)) + allocatorPrehook = prehook.New(cfg.GetTargetsFilterStrategy(), log) + allocator, err = allocation.New(cfg.GetAllocationStrategy(), log, allocation.WithFilter(allocatorPrehook)) if err != nil { setupLog.Error(err, "Unable to initialize allocation strategy") os.Exit(1) } - - watcher, err := allocatorWatcher.NewWatcher(setupLog, cfg, cliConf, allocator) - if err != nil { - setupLog.Error(err, "Can't start the watchers") + discoveryCtx, discoveryCancel := context.WithCancel(ctx) + discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger()) + targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook) + collectorWatcher, collectorWatcherErr := collector.NewClient(log, cliConf.ClusterConfig) + if collectorWatcherErr != nil { + setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") os.Exit(1) } - defer func() { - watcherErr := watcher.Close() - if watcherErr != nil { - log.Error(watcherErr, "failed to close watcher") - } - }() - - // creates a new discovery manager - discoveryManager := lbdiscovery.NewManager(ctx, log, gokitlog.NewNopLogger(), allocatorPrehook) - defer discoveryManager.Close() - - discoveryManager.Watch(allocator.SetTargets) - - k8sclient, err := configureFileDiscovery(context.Background(), log, allocator, discoveryManager, cliConf) + fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), cliConf) if err != nil { - setupLog.Error(err, "Can't start the k8s client") + setupLog.Error(err, "Can't start the file watcher") os.Exit(1) } + srv := server.NewServer(log, allocator, targetDiscoverer, cliConf.ListenAddr) + signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) + defer close(interrupts) - srv := newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) - - interrupts := make(chan os.Signal, 1) - signal.Notify(interrupts, os.Interrupt, syscall.SIGTERM) - - go func() { - if err := srv.Start(); !errors.Is(err, http.ErrServerClosed) { - setupLog.Error(err, "Can't start the server") + if *cliConf.PromCRWatcherConf.Enabled { + promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(cfg, cliConf) + if err != nil { + setupLog.Error(err, "Can't start the prometheus watcher") + os.Exit(1) } - }() - - for { - select { - case <-interrupts: - if err := srv.Shutdown(ctx); err != nil { - setupLog.Error(err, "Error on server shutdown") - os.Exit(1) - } - os.Exit(0) - case event := <-watcher.Events: - eventsMetric.WithLabelValues(event.Source.String()).Inc() - switch event.Source { - case allocatorWatcher.EventSourceConfigMap: - setupLog.Info("ConfigMap updated!") - // Restart the server to pickup the new config. - if err := srv.Shutdown(ctx); err != nil { - setupLog.Error(err, "Cannot shutdown the server") + runGroup.Add( + func() error { + promWatcherErr := promWatcher.Watch(eventChan, errChan) + setupLog.Info("Prometheus watcher exited") + return promWatcherErr + }, + func(_ error) { + setupLog.Info("Closing prometheus watcher") + promWatcherErr := promWatcher.Close() + if promWatcherErr != nil { + setupLog.Error(promWatcherErr, "prometheus watcher failed to close") } - srv = newServer(log, allocator, discoveryManager, k8sclient, cliConf.ListenAddr) - go func() { - if err := srv.Start(); !errors.Is(err, http.ErrServerClosed) { - setupLog.Error(err, "Can't restart the server") + }) + } + runGroup.Add( + func() error { + fileWatcherErr := fileWatcher.Watch(eventChan, errChan) + setupLog.Info("File watcher exited") + return fileWatcherErr + }, + func(_ error) { + setupLog.Info("Closing file watcher") + fileWatcherErr := fileWatcher.Close() + if fileWatcherErr != nil { + setupLog.Error(fileWatcherErr, "file watcher failed to close") + } + }) + runGroup.Add( + func() error { + discoveryManagerErr := discoveryManager.Run() + setupLog.Info("Discovery manager exited") + return discoveryManagerErr + }, + func(_ error) { + setupLog.Info("Closing discovery manager") + discoveryCancel() + }) + runGroup.Add( + func() error { + // Initial loading of the config file's scrape config + err = targetDiscoverer.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.Config) + if err != nil { + setupLog.Error(err, "Unable to apply initial configuration") + return err + } + err := targetDiscoverer.Watch(allocator.SetTargets) + setupLog.Info("Target discoverer exited") + return err + }, + func(_ error) { + setupLog.Info("Closing target discoverer") + targetDiscoverer.Close() + }) + runGroup.Add( + func() error { + err := collectorWatcher.Watch(ctx, cfg.LabelSelector, allocator.SetCollectors) + setupLog.Info("Collector watcher exited") + return err + }, + func(_ error) { + setupLog.Info("Closing collector watcher") + collectorWatcher.Close() + }) + runGroup.Add( + func() error { + err := srv.Start() + setupLog.Info("Server failed to start") + return err + }, + func(_ error) { + setupLog.Info("Closing server") + if shutdownErr := srv.Shutdown(ctx); shutdownErr != nil { + setupLog.Error(shutdownErr, "Error on server shutdown") + } + }) + runGroup.Add( + func() error { + for { + select { + case event := <-eventChan: + eventsMetric.WithLabelValues(event.Source.String()).Inc() + loadConfig, err := event.Watcher.LoadConfig() + if err != nil { + setupLog.Error(err, "Unable to load configuration") + continue } - }() - - case allocatorWatcher.EventSourcePrometheusCR: - setupLog.Info("PrometheusCRs changed") - promConfig, err := interface{}(*event.Watcher).(*allocatorWatcher.PrometheusCRWatcher).CreatePromConfig(cliConf.KubeConfigFilePath) - if err != nil { - setupLog.Error(err, "failed to compile Prometheus config") + err = targetDiscoverer.ApplyConfig(event.Source, loadConfig) + if err != nil { + setupLog.Error(err, "Unable to apply configuration") + continue + } + case err := <-errChan: + setupLog.Error(err, "Watcher error") + case <-eventCloser: + return nil } - err = discoveryManager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, promConfig) - if err != nil { - setupLog.Error(err, "failed to apply Prometheus config") + } + }, + func(_ error) { + setupLog.Info("Closing watcher loop") + close(eventCloser) + }) + runGroup.Add( + func() error { + for { + select { + case <-interrupts: + setupLog.Info("Received interrupt") + return nil + case <-eventCloser: + return nil } } - case err := <-watcher.Errors: - setupLog.Error(err, "Watcher error") - } - } -} - -type server struct { - logger logr.Logger - allocator allocation.Allocator - discoveryManager *lbdiscovery.Manager - k8sClient *collector.Client - server *http.Server - compareHash uint64 - scrapeConfigResponse []byte -} - -func newServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, k8sclient *collector.Client, listenAddr *string) *server { - s := &server{ - logger: log, - allocator: allocator, - discoveryManager: discoveryManager, - k8sClient: k8sclient, - compareHash: uint64(0), - } - router := mux.NewRouter().UseEncodedPath() - router.Use(s.PrometheusMiddleware) - router.HandleFunc("/scrape_configs", s.ScrapeConfigsHandler).Methods("GET") - router.HandleFunc("/jobs", s.JobHandler).Methods("GET") - router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") - router.Path("/metrics").Handler(promhttp.Handler()) - s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} - return s -} - -func configureFileDiscovery(ctx context.Context, log logr.Logger, allocator allocation.Allocator, discoveryManager *lbdiscovery.Manager, cliConfig config.CLIConfig) (*collector.Client, error) { - cfg, err := config.Load(*cliConfig.ConfigFilePath) - if err != nil { - return nil, err - } - - k8sClient, err := collector.NewClient(log, cliConfig.ClusterConfig) - if err != nil { - return nil, err - } - - // returns the list of targets - if err := discoveryManager.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.Config); err != nil { - return nil, err - } - - k8sClient.Watch(ctx, cfg.LabelSelector, allocator.SetCollectors) - return k8sClient, nil -} - -func (s *server) Start() error { - setupLog.Info("Starting server...") - return s.server.ListenAndServe() -} - -func (s *server) Shutdown(ctx context.Context) error { - s.logger.Info("Shutting down server...") - s.k8sClient.Close() - return s.server.Shutdown(ctx) -} - -// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. -// The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. -// After that, the YAML is converted in to a JSON format for consumers to use. -func (s *server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { - configs := s.discoveryManager.GetScrapeConfigs() - - hash, err := hashstructure.Hash(configs, nil) - if err != nil { - s.logger.Error(err, "failed to hash the config") - s.errorHandler(w, err) - return - } - // if the hashes are different, we need to recompute the scrape config - if hash != s.compareHash { - var configBytes []byte - configBytes, err = yaml.Marshal(configs) - if err != nil { - s.errorHandler(w, err) - return - } - var jsonConfig []byte - jsonConfig, err = yaml2.YAMLToJSON(configBytes) - if err != nil { - s.errorHandler(w, err) - return - } - // Update the response and the hash - s.scrapeConfigResponse = jsonConfig - s.compareHash = hash - } - // We don't use the jsonHandler method because we don't want our bytes to be re-encoded - w.Header().Set("Content-Type", "application/json") - _, err = w.Write(s.scrapeConfigResponse) - if err != nil { - s.errorHandler(w, err) - } -} - -func (s *server) JobHandler(w http.ResponseWriter, r *http.Request) { - displayData := make(map[string]target.LinkJSON) - for _, v := range s.allocator.TargetItems() { - displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} - } - s.jsonHandler(w, displayData) -} - -// PrometheusMiddleware implements mux.MiddlewareFunc. -func (s *server) PrometheusMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - route := mux.CurrentRoute(r) - path, _ := route.GetPathTemplate() - timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) - next.ServeHTTP(w, r) - timer.ObserveDuration() - }) -} - -func (s *server) TargetsHandler(w http.ResponseWriter, r *http.Request) { - q := r.URL.Query()["collector_id"] - - var compareMap = make(map[string][]target.Item) // CollectorName+jobName -> TargetItem - for _, v := range s.allocator.TargetItems() { - compareMap[v.CollectorName+v.JobName] = append(compareMap[v.CollectorName+v.JobName], *v) - } - params := mux.Vars(r) - jobId, err := url.QueryUnescape(params["job_id"]) - if err != nil { - s.errorHandler(w, err) - return - } - - if len(q) == 0 { - displayData := allocation.GetAllTargetsByJob(s.allocator, jobId) - s.jsonHandler(w, displayData) - - } else { - tgs := allocation.GetAllTargetsByCollectorAndJob(s.allocator, q[0], jobId) - // Displays empty list if nothing matches - if len(tgs) == 0 { - s.jsonHandler(w, []interface{}{}) - return - } - s.jsonHandler(w, tgs) - } -} - -func (s *server) errorHandler(w http.ResponseWriter, err error) { - w.WriteHeader(500) - s.jsonHandler(w, err) -} - -func (s *server) jsonHandler(w http.ResponseWriter, data interface{}) { - w.Header().Set("Content-Type", "application/json") - err := json.NewEncoder(w).Encode(data) - if err != nil { - s.logger.Error(err, "failed to encode data for http response") - } + }, + func(_ error) { + setupLog.Info("Closing interrupt loop") + }) + if runErr := runGroup.Run(); runErr != nil { + setupLog.Error(runErr, "run group exited") + } + setupLog.Info("Target allocator exited.") } diff --git a/cmd/otel-allocator/prehook/prehook.go b/cmd/otel-allocator/prehook/prehook.go index ebe41c097..f356f7c2d 100644 --- a/cmd/otel-allocator/prehook/prehook.go +++ b/cmd/otel-allocator/prehook/prehook.go @@ -55,3 +55,10 @@ func Register(name string, provider HookProvider) error { registry[name] = provider return nil } + +func init() { + err := Register(relabelConfigTargetFilterName, NewRelabelConfigTargetFilter) + if err != nil { + panic(err) + } +} diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go index 90c62ec64..cb07ec98a 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/prehook/relabel.go @@ -108,10 +108,3 @@ func (tf *RelabelConfigTargetFilter) GetConfig() map[string][]*relabel.Config { } return relabelCfgCopy } - -func init() { - err := Register(relabelConfigTargetFilterName, NewRelabelConfigTargetFilter) - if err != nil { - panic(err) - } -} diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go new file mode 100644 index 000000000..61807b005 --- /dev/null +++ b/cmd/otel-allocator/server/server.go @@ -0,0 +1,189 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package server + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "net/url" + "time" + + yaml2 "github.com/ghodss/yaml" + "github.com/go-logr/logr" + "github.com/gorilla/mux" + "github.com/mitchellh/hashstructure" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/client_golang/prometheus/promhttp" + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +var ( + httpDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ + Name: "opentelemetry_allocator_http_duration_seconds", + Help: "Duration of received HTTP requests.", + }, []string{"path"}) +) + +type collectorJSON struct { + Link string `json:"_link"` + Jobs []*target.Item `json:"targets"` +} + +type Server struct { + logger logr.Logger + allocator allocation.Allocator + discoveryManager *target.Discoverer + server *http.Server + + compareHash uint64 + scrapeConfigResponse []byte +} + +func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *target.Discoverer, listenAddr *string) *Server { + s := &Server{ + logger: log, + allocator: allocator, + discoveryManager: discoveryManager, + compareHash: uint64(0), + } + router := mux.NewRouter().UseEncodedPath() + router.Use(s.PrometheusMiddleware) + router.HandleFunc("/scrape_configs", s.ScrapeConfigsHandler).Methods("GET") + router.HandleFunc("/jobs", s.JobHandler).Methods("GET") + router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") + router.Path("/metrics").Handler(promhttp.Handler()) + s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} + return s +} + +func (s *Server) Start() error { + s.logger.Info("Starting server...") + return s.server.ListenAndServe() +} + +func (s *Server) Shutdown(ctx context.Context) error { + s.logger.Info("Shutting down server...") + return s.server.Shutdown(ctx) +} + +// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. +// The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. +// After that, the YAML is converted in to a JSON format for consumers to use. +func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { + configs := s.discoveryManager.GetScrapeConfigs() + + hash, err := hashstructure.Hash(configs, nil) + if err != nil { + s.logger.Error(err, "failed to hash the config") + s.errorHandler(w, err) + return + } + // if the hashes are different, we need to recompute the scrape config + if hash != s.compareHash { + var configBytes []byte + configBytes, err = yaml.Marshal(configs) + if err != nil { + s.errorHandler(w, err) + return + } + var jsonConfig []byte + jsonConfig, err = yaml2.YAMLToJSON(configBytes) + if err != nil { + s.errorHandler(w, err) + return + } + s.scrapeConfigResponse = jsonConfig + s.compareHash = hash + } + // We don't use the jsonHandler method because we don't want our bytes to be re-encoded + w.Header().Set("Content-Type", "application/json") + _, err = w.Write(s.scrapeConfigResponse) + if err != nil { + s.errorHandler(w, err) + } +} + +func (s *Server) JobHandler(w http.ResponseWriter, r *http.Request) { + displayData := make(map[string]target.LinkJSON) + for _, v := range s.allocator.TargetItems() { + displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} + } + s.jsonHandler(w, displayData) +} + +// PrometheusMiddleware implements mux.MiddlewareFunc. +func (s *Server) PrometheusMiddleware(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + route := mux.CurrentRoute(r) + path, _ := route.GetPathTemplate() + timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) + next.ServeHTTP(w, r) + timer.ObserveDuration() + }) +} + +func (s *Server) TargetsHandler(w http.ResponseWriter, r *http.Request) { + q := r.URL.Query()["collector_id"] + + params := mux.Vars(r) + jobId, err := url.QueryUnescape(params["job_id"]) + if err != nil { + s.errorHandler(w, err) + return + } + + if len(q) == 0 { + displayData := GetAllTargetsByJob(s.allocator, jobId) + s.jsonHandler(w, displayData) + + } else { + tgs := s.allocator.GetTargetsForCollectorAndJob(q[0], jobId) + // Displays empty list if nothing matches + if len(tgs) == 0 { + s.jsonHandler(w, []interface{}{}) + return + } + s.jsonHandler(w, tgs) + } +} + +func (s *Server) errorHandler(w http.ResponseWriter, err error) { + w.WriteHeader(500) + s.jsonHandler(w, err) +} + +func (s *Server) jsonHandler(w http.ResponseWriter, data interface{}) { + w.Header().Set("Content-Type", "application/json") + err := json.NewEncoder(w).Encode(data) + if err != nil { + s.logger.Error(err, "failed to encode data for http response") + } +} + +// GetAllTargetsByJob is a relatively expensive call that is usually only used for debugging purposes. +func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]collectorJSON { + displayData := make(map[string]collectorJSON) + for _, col := range allocator.Collectors() { + items := allocator.GetTargetsForCollectorAndJob(col.Name, job) + displayData[col.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(job), col.Name), Jobs: items} + } + return displayData +} diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go new file mode 100644 index 000000000..3f3c7da11 --- /dev/null +++ b/cmd/otel-allocator/server/server_test.go @@ -0,0 +1,214 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package server + +import ( + "crypto/rand" + "encoding/json" + "fmt" + "io" + "math/big" + "net/http/httptest" + "testing" + + "github.com/prometheus/common/model" + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +var ( + logger = logf.Log.WithName("server-unit-tests") + baseLabelSet = model.LabelSet{ + "test_label": "test-value", + } + testJobLabelSetTwo = model.LabelSet{ + "test_label": "test-value2", + } + baseTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") + secondTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") + testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") +) + +func TestServer_TargetsHandler(t *testing.T) { + leastWeighted, _ := allocation.New("least-weighted", logger) + type args struct { + collector string + job string + cMap map[string]*target.Item + allocator allocation.Allocator + } + type want struct { + items []*target.Item + errString string + } + tests := []struct { + name string + args args + want want + }{ + { + name: "Empty target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string]*target.Item{}, + allocator: leastWeighted, + }, + want: want{ + items: []*target.Item{}, + }, + }, + { + name: "Single entry target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string]*target.Item{ + baseTargetItem.Hash(): baseTargetItem, + }, + allocator: leastWeighted, + }, + want: want{ + items: []*target.Item{ + { + TargetURL: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test_label": "test-value", + }, + }, + }, + }, + }, + { + name: "Multiple entry target map", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string]*target.Item{ + baseTargetItem.Hash(): baseTargetItem, + secondTargetItem.Hash(): secondTargetItem, + }, + allocator: leastWeighted, + }, + want: want{ + items: []*target.Item{ + { + TargetURL: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test_label": "test-value", + }, + }, + }, + }, + }, + { + name: "Multiple entry target map of same job with label merge", + args: args{ + collector: "test-collector", + job: "test-job", + cMap: map[string]*target.Item{ + baseTargetItem.Hash(): baseTargetItem, + testJobTargetItemTwo.Hash(): testJobTargetItemTwo, + }, + allocator: leastWeighted, + }, + want: want{ + items: []*target.Item{ + { + TargetURL: []string{"test-url"}, + Labels: map[model.LabelName]model.LabelValue{ + "test_label": "test-value", + }, + }, + { + TargetURL: []string{"test-url2"}, + Labels: map[model.LabelName]model.LabelValue{ + "test_label": "test-value2", + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + listenAddr := ":8080" + s := NewServer(logger, tt.args.allocator, nil, &listenAddr) + tt.args.allocator.SetCollectors(map[string]*allocation.Collector{"test-collector": {Name: "test-collector"}}) + tt.args.allocator.SetTargets(tt.args.cMap) + request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/%s/targets?collector_id=%s", tt.args.job, tt.args.collector), nil) + w := httptest.NewRecorder() + s.server.Handler.ServeHTTP(w, request) + result := w.Result() + body := result.Body + bodyBytes, err := io.ReadAll(body) + assert.NoError(t, err) + if len(tt.want.errString) != 0 { + assert.EqualError(t, err, tt.want.errString) + return + } + var itemResponse []*target.Item + err = json.Unmarshal(bodyBytes, &itemResponse) + assert.NoError(t, err) + assert.Equal(t, tt.want.items, itemResponse) + }) + } +} + +func randInt(max int64) int64 { + nBig, _ := rand.Int(rand.Reader, big.NewInt(max)) + return nBig.Int64() +} + +func BenchmarkServerTargetsHandler(b *testing.B) { + var table = []struct { + numCollectors int + numJobs int + }{ + {numCollectors: 100, numJobs: 100}, + {numCollectors: 100, numJobs: 1000}, + {numCollectors: 100, numJobs: 10000}, + {numCollectors: 100, numJobs: 100000}, + {numCollectors: 1000, numJobs: 100}, + {numCollectors: 1000, numJobs: 1000}, + {numCollectors: 1000, numJobs: 10000}, + {numCollectors: 1000, numJobs: 100000}, + } + + for _, allocatorName := range allocation.GetRegisteredAllocatorNames() { + for _, v := range table { + a, _ := allocation.New(allocatorName, logger) + cols := allocation.MakeNCollectors(v.numCollectors, 0) + targets := allocation.MakeNNewTargets(v.numJobs, v.numCollectors, 0) + listenAddr := ":8080" + a.SetCollectors(cols) + a.SetTargets(targets) + s := NewServer(logger, a, nil, &listenAddr) + b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + randomJob := randInt(int64(v.numJobs)) + randomCol := randInt(int64(v.numCollectors)) + request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) + w := httptest.NewRecorder() + s.server.Handler.ServeHTTP(w, request) + } + }) + } + } +} diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go new file mode 100644 index 000000000..4726fabc2 --- /dev/null +++ b/cmd/otel-allocator/target/discovery.go @@ -0,0 +1,111 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package target + +import ( + "github.com/go-logr/logr" + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/config" + "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/model/relabel" + + allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" +) + +var ( + targetsDiscovered = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Name: "opentelemetry_allocator_targets", + Help: "Number of targets discovered.", + }, []string{"job_name"}) +) + +type Discoverer struct { + log logr.Logger + manager *discovery.Manager + close chan struct{} + configsMap map[allocatorWatcher.EventSource]*config.Config + jobToScrapeConfig map[string]*config.ScrapeConfig + hook discoveryHook +} + +type discoveryHook interface { + SetConfig(map[string][]*relabel.Config) +} + +func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHook) *Discoverer { + return &Discoverer{ + log: log, + manager: manager, + close: make(chan struct{}), + configsMap: make(map[allocatorWatcher.EventSource]*config.Config), + jobToScrapeConfig: make(map[string]*config.ScrapeConfig), + hook: hook, + } +} + +func (m *Discoverer) GetScrapeConfigs() map[string]*config.ScrapeConfig { + return m.jobToScrapeConfig +} + +func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { + m.configsMap[source] = cfg + + discoveryCfg := make(map[string]discovery.Configs) + relabelCfg := make(map[string][]*relabel.Config) + + for _, value := range m.configsMap { + for _, scrapeConfig := range value.ScrapeConfigs { + m.jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig + discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs + relabelCfg[scrapeConfig.JobName] = scrapeConfig.RelabelConfigs + } + } + + if m.hook != nil { + m.hook.SetConfig(relabelCfg) + } + return m.manager.ApplyConfig(discoveryCfg) +} + +func (m *Discoverer) Watch(fn func(targets map[string]*Item)) error { + for { + select { + case <-m.close: + m.log.Info("Service Discovery watch event stopped: discovery manager closed") + return nil + case tsets := <-m.manager.SyncCh(): + targets := map[string]*Item{} + + for jobName, tgs := range tsets { + var count float64 = 0 + for _, tg := range tgs { + for _, t := range tg.Targets { + count++ + item := NewItem(jobName, string(t[model.AddressLabel]), t.Merge(tg.Labels), "") + targets[item.Hash()] = item + } + } + targetsDiscovered.WithLabelValues(jobName).Set(count) + } + fn(targets) + } + } +} + +func (m *Discoverer) Close() { + close(m.close) +} diff --git a/cmd/otel-allocator/discovery/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go similarity index 78% rename from cmd/otel-allocator/discovery/discovery_test.go rename to cmd/otel-allocator/target/discovery_test.go index 7ce8a920e..ab9ad547c 100644 --- a/cmd/otel-allocator/discovery/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package discovery +package target import ( "context" @@ -20,11 +20,11 @@ import ( "testing" gokitlog "github.com/go-kit/log" + "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" ctrl "sigs.k8s.io/controller-runtime" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -52,17 +52,27 @@ func TestDiscovery(t *testing.T) { want: []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"}, }, } - manager := NewManager(context.Background(), ctrl.Log.WithName("test"), gokitlog.NewNopLogger(), nil) + ctx, cancelFunc := context.WithCancel(context.Background()) + d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil) defer close(manager.close) + defer cancelFunc() results := make(chan []string) - manager.Watch(func(targets map[string]*target.Item) { - var result []string - for _, t := range targets { - result = append(result, t.TargetURL[0]) - } - results <- result - }) + go func() { + err := d.Run() + assert.NoError(t, err) + }() + go func() { + err := manager.Watch(func(targets map[string]*Item) { + var result []string + for _, t := range targets { + result = append(result, t.TargetURL[0]) + } + results <- result + }) + assert.NoError(t, err) + }() for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cfg, err := config.Load(tt.args.file) diff --git a/cmd/otel-allocator/discovery/testdata/test.yaml b/cmd/otel-allocator/target/testdata/test.yaml similarity index 100% rename from cmd/otel-allocator/discovery/testdata/test.yaml rename to cmd/otel-allocator/target/testdata/test.yaml diff --git a/cmd/otel-allocator/discovery/testdata/test_update.yaml b/cmd/otel-allocator/target/testdata/test_update.yaml similarity index 100% rename from cmd/otel-allocator/discovery/testdata/test_update.yaml rename to cmd/otel-allocator/target/testdata/test_update.yaml diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index 069b9ac48..df561b918 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -19,54 +19,65 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-logr/logr" + promconfig "github.com/prometheus/prometheus/config" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) +var _ Watcher = &FileWatcher{} + type FileWatcher struct { + logger logr.Logger configFilePath string watcher *fsnotify.Watcher closer chan bool } -func newConfigMapWatcher(logger logr.Logger, config config.CLIConfig) (FileWatcher, error) { +func NewFileWatcher(logger logr.Logger, config config.CLIConfig) (*FileWatcher, error) { fileWatcher, err := fsnotify.NewWatcher() if err != nil { logger.Error(err, "Can't start the watcher") - return FileWatcher{}, err + return &FileWatcher{}, err } - return FileWatcher{ + return &FileWatcher{ + logger: logger, configFilePath: *config.ConfigFilePath, watcher: fileWatcher, closer: make(chan bool), }, nil } -func (f *FileWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error) error { +func (f *FileWatcher) LoadConfig() (*promconfig.Config, error) { + cfg, err := config.Load(f.configFilePath) + if err != nil { + f.logger.Error(err, "Unable to load configuration") + return nil, err + } + return cfg.Config, nil +} + +func (f *FileWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { err := f.watcher.Add(filepath.Dir(f.configFilePath)) if err != nil { return err } - // translate and copy to central event channel - go func() { - for { - select { - case <-f.closer: - return - case fileEvent := <-f.watcher.Events: - if fileEvent.Op == fsnotify.Create { - upstreamEvents <- Event{ - Source: EventSourceConfigMap, - } + for { + select { + case <-f.closer: + return nil + case fileEvent := <-f.watcher.Events: + if fileEvent.Op == fsnotify.Create { + upstreamEvents <- Event{ + Source: EventSourceConfigMap, + Watcher: Watcher(f), } - case err := <-f.watcher.Errors: - upstreamErrors <- err } + case err := <-f.watcher.Errors: + upstreamErrors <- err } - }() - return nil + } } func (f *FileWatcher) Close() error { diff --git a/cmd/otel-allocator/watcher/main.go b/cmd/otel-allocator/watcher/main.go deleted file mode 100644 index d983c40f7..000000000 --- a/cmd/otel-allocator/watcher/main.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package watcher - -import ( - "fmt" - - "github.com/go-logr/logr" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" -) - -type Manager struct { - Events chan Event - Errors chan error - allocator allocation.Allocator - watchers []Watcher -} - -type Watcher interface { - // Start watcher and supply channels which will receive change events - Start(upstreamEvents chan Event, upstreamErrors chan error) error - Close() error -} - -type Event struct { - Source EventSource - Watcher *Watcher -} - -type EventSource int - -const ( - EventSourceConfigMap EventSource = iota - EventSourcePrometheusCR -) - -var ( - eventSourceToString = map[EventSource]string{ - EventSourceConfigMap: "EventSourceConfigMap", - EventSourcePrometheusCR: "EventSourcePrometheusCR", - } -) - -func (e EventSource) String() string { - return eventSourceToString[e] -} - -func NewWatcher(logger logr.Logger, cfg config.Config, cliConfig config.CLIConfig, allocator allocation.Allocator) (*Manager, error) { - watcher := Manager{ - allocator: allocator, - Events: make(chan Event), - Errors: make(chan error), - } - - fileWatcher, err := newConfigMapWatcher(logger, cliConfig) - if err != nil { - return nil, err - } - watcher.watchers = append(watcher.watchers, &fileWatcher) - - if *cliConfig.PromCRWatcherConf.Enabled { - promWatcher, err := newCRDMonitorWatcher(cfg, cliConfig) - if err != nil { - return nil, err - } - watcher.watchers = append(watcher.watchers, promWatcher) - } - - startErr := watcher.Start() - return &watcher, startErr -} - -func (manager *Manager) Close() error { - var errors []error - for _, watcher := range manager.watchers { - err := watcher.Close() - if err != nil { - errors = append(errors, err) - } - } - - close(manager.Events) - close(manager.Errors) - - if len(errors) > 0 { - return fmt.Errorf("closing errors: %+v", errors) - } - return nil -} - -func (manager *Manager) Start() error { - var errors []error - for _, watcher := range manager.watchers { - err := watcher.Start(manager.Events, manager.Errors) - if err != nil { - errors = append(errors, err) - } - } - - if len(errors) > 0 { - return fmt.Errorf("closing errors: %+v", errors) - } - return nil -} diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 2b33b633b..49ce07f00 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/tools/cache" ) -func newCRDMonitorWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { +func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { mClient, err := monitoringclient.NewForConfig(cliConfig.ClusterConfig) if err != nil { return nil, err @@ -70,6 +70,7 @@ func newCRDMonitorWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig. informers: monitoringInformers, stopChannel: make(chan struct{}), configGenerator: generator, + kubeConfigPath: cliConfig.KubeConfigFilePath, serviceMonitorSelector: servMonSelector, podMonitorSelector: podMonSelector, }, nil @@ -80,6 +81,7 @@ type PrometheusCRWatcher struct { informers map[string]*informers.ForResource stopChannel chan struct{} configGenerator *prometheus.ConfigGenerator + kubeConfigPath string serviceMonitorSelector labels.Selector podMonitorSelector labels.Selector @@ -93,12 +95,11 @@ func getSelector(s map[string]string) labels.Selector { return labels.SelectorFromSet(s) } -// Start wrapped informers and wait for an initial sync. -func (w *PrometheusCRWatcher) Start(upstreamEvents chan Event, upstreamErrors chan error) error { - watcher := Watcher(w) +// Watch wrapped informers and wait for an initial sync. +func (w *PrometheusCRWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { event := Event{ Source: EventSourcePrometheusCR, - Watcher: &watcher, + Watcher: Watcher(w), } success := true @@ -108,7 +109,6 @@ func (w *PrometheusCRWatcher) Start(upstreamEvents chan Event, upstreamErrors ch if ok := cache.WaitForNamedCacheSync(name, w.stopChannel, resource.HasSynced); !ok { success = false } - resource.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { upstreamEvents <- event @@ -124,16 +124,16 @@ func (w *PrometheusCRWatcher) Start(upstreamEvents chan Event, upstreamErrors ch if !success { return fmt.Errorf("failed to sync cache") } - + <-w.stopChannel return nil } func (w *PrometheusCRWatcher) Close() error { - w.stopChannel <- struct{}{} + close(w.stopChannel) return nil } -func (w *PrometheusCRWatcher) CreatePromConfig(kubeConfigPath string) (*promconfig.Config, error) { +func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { serviceMonitorInstances := make(map[string]*monitoringv1.ServiceMonitor) smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(w.serviceMonitorSelector, func(sm interface{}) { @@ -179,7 +179,7 @@ func (w *PrometheusCRWatcher) CreatePromConfig(kubeConfigPath string) (*promconf for _, serviceDiscoveryConfig := range scrapeConfig.ServiceDiscoveryConfigs { if serviceDiscoveryConfig.Name() == "kubernetes" { sdConfig := interface{}(serviceDiscoveryConfig).(*kubeDiscovery.SDConfig) - sdConfig.KubeConfig = kubeConfigPath + sdConfig.KubeConfig = w.kubeConfigPath } } } diff --git a/cmd/otel-allocator/watcher/watcher.go b/cmd/otel-allocator/watcher/watcher.go new file mode 100644 index 000000000..a1b0e99fa --- /dev/null +++ b/cmd/otel-allocator/watcher/watcher.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package watcher + +import promconfig "github.com/prometheus/prometheus/config" + +type Watcher interface { + // Watch watcher and supply channels which will receive change events + Watch(upstreamEvents chan Event, upstreamErrors chan error) error + LoadConfig() (*promconfig.Config, error) + Close() error +} + +type Event struct { + Source EventSource + Watcher Watcher +} + +type EventSource int + +const ( + EventSourceConfigMap EventSource = iota + EventSourcePrometheusCR +) + +var ( + eventSourceToString = map[EventSource]string{ + EventSourceConfigMap: "EventSourceConfigMap", + EventSourcePrometheusCR: "EventSourcePrometheusCR", + } +) + +func (e EventSource) String() string { + return eventSourceToString[e] +} From a89d0d63f512c8c41970c6caf42e349f3af17457 Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Mon, 19 Dec 2022 04:14:17 -0500 Subject: [PATCH 0685/1234] [target-allocator] restart pod watcher when no event is found (#1237) * naive fix * unit test for close channel * update unit tests, timeout option still not working as expected * gofmt and removed unused block * fix more lint errors * more lint * add timeout to context instead * gofmt * move logic for starting watch to own function * gofmt * add timoutSeconds to test struct * remove repeated logger declarations * add chloggen --- .chloggen/1028-restart-podwatcher.yaml | 17 ++++++ cmd/otel-allocator/collector/collector.go | 47 +++++++++------- .../collector/collector_test.go | 56 ++++++++++++++++++- 3 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 .chloggen/1028-restart-podwatcher.yaml diff --git a/.chloggen/1028-restart-podwatcher.yaml b/.chloggen/1028-restart-podwatcher.yaml new file mode 100644 index 000000000..ab3277f90 --- /dev/null +++ b/.chloggen/1028-restart-podwatcher.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Target Allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR restarts pod watcher on no event and adds unit tests for timeout and closed watcher channel + +# One or more tracking issues related to the change +issues: + - 1028 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go index 40a0c8ac9..eaeee8e16 100644 --- a/cmd/otel-allocator/collector/collector.go +++ b/cmd/otel-allocator/collector/collector.go @@ -17,7 +17,6 @@ package collector import ( "context" "os" - "strconv" "time" "github.com/go-logr/logr" @@ -58,7 +57,7 @@ func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { } return &Client{ - log: logger, + log: logger.WithValues("component", "opentelemetry-targetallocator"), k8sClient: clientset, close: make(chan struct{}), }, nil @@ -66,14 +65,13 @@ func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors map[string]*allocation.Collector)) error { collectorMap := map[string]*allocation.Collector{} - log := k.log.WithValues("component", "opentelemetry-targetallocator") opts := metav1.ListOptions{ LabelSelector: labels.SelectorFromSet(labelMap).String(), } pods, err := k.k8sClient.CoreV1().Pods(ns).List(ctx, opts) if err != nil { - log.Error(err, "Pod failure") + k.log.Error(err, "Pod failure") os.Exit(1) } for i := range pods.Items { @@ -86,38 +84,48 @@ func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func( fn(collectorMap) for { - watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) - if err != nil { - log.Error(err, "unable to create collector pod watcher") - return err - } - log.Info("Successfully started a collector pod watcher") - if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" && msg != "no event" { - log.Info("Collector pod watch event stopped " + msg) + if !k.restartWatch(ctx, opts, collectorMap, fn) { return nil } } } +func (k *Client) restartWatch(ctx context.Context, opts metav1.ListOptions, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) bool { + // add timeout to the context before calling Watch + ctx, cancel := context.WithTimeout(ctx, watcherTimeout) + defer cancel() + watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) + if err != nil { + k.log.Error(err, "unable to create collector pod watcher") + return false + } + k.log.Info("Successfully started a collector pod watcher") + if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { + k.log.Info("Collector pod watch event stopped " + msg) + return false + } + + return true +} + func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) string { - log := k.log.WithValues("component", "opentelemetry-targetallocator") for { collectorsDiscovered.Set(float64(len(collectorMap))) select { case <-k.close: return "kubernetes client closed" case <-ctx.Done(): - return "context done" + return "" case event, ok := <-c: if !ok { - log.Info(strconv.FormatBool(ok)) - return "no event" + k.log.Info("No event found. Restarting watch routine") + return "" } pod, ok := event.Object.(*v1.Pod) if !ok { - log.Info(strconv.FormatBool(ok)) - return "no event" + k.log.Info("No pod found in event Object. Restarting watch routine") + return "" } switch event.Type { //nolint:exhaustive @@ -127,9 +135,6 @@ func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap delete(collectorMap, pod.Name) } fn(collectorMap) - case <-time.After(watcherTimeout): - log.Info("Restarting watch routine") - return "" } } } diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go index e9fbc46c3..5367828e2 100644 --- a/cmd/otel-allocator/collector/collector_test.go +++ b/cmd/otel-allocator/collector/collector_test.go @@ -20,6 +20,7 @@ import ( "os" "sync" "testing" + "time" "k8s.io/apimachinery/pkg/watch" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -50,7 +51,6 @@ func getTestClient() (Client, watch.Interface) { opts := metav1.ListOptions{ LabelSelector: labels.SelectorFromSet(labelMap).String(), } - watcher, err := kubeClient.k8sClient.CoreV1().Pods("test-ns").Watch(context.Background(), opts) if err != nil { fmt.Printf("failed to setup a Collector Pod watcher: %v", err) @@ -165,3 +165,57 @@ func Test_runWatch(t *testing.T) { }) } } + +// this tests runWatch in the case of watcher channel closing and watcher timing out. +func Test_closeChannel(t *testing.T) { + tests := []struct { + description string + isCloseChannel bool + timeoutSeconds time.Duration + }{ + { + // event is triggered by channel closing. + description: "close_channel", + isCloseChannel: true, + // channel should be closed before this timeout occurs + timeoutSeconds: 10 * time.Second, + }, + { + // event triggered by timeout. + description: "watcher_timeout", + isCloseChannel: false, + timeoutSeconds: 0 * time.Second, + }, + } + + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + kubeClient, watcher := getTestClient() + + defer func() { + close(kubeClient.close) + watcher.Stop() + }() + var wg sync.WaitGroup + wg.Add(1) + terminated := false + + go func(watcher watch.Interface) { + defer wg.Done() + ctx, cancel := context.WithTimeout(context.Background(), tc.timeoutSeconds) + defer cancel() + if msg := runWatch(ctx, &kubeClient, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) {}); msg != "" { + terminated = true + return + } + }(watcher) + + if tc.isCloseChannel { + // stop pod watcher to trigger event. + watcher.Stop() + } + wg.Wait() + assert.False(t, terminated) + }) + } +} From 5a8d349a33203a444ff59d255c71b892d3086a70 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 19 Dec 2022 02:30:43 -0800 Subject: [PATCH 0686/1234] Update the javaagent version to 1.21.0 (#1324) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 769e37e15..3500250a4 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.20.2 +1.21.0 From 80fde270617e816da9812707905361aac48d65fd Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Mon, 19 Dec 2022 11:31:22 +0100 Subject: [PATCH 0687/1234] feat(python): update dependencies (#1321) --- autoinstrumentation/python/requirements.txt | 86 +++++++++++---------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 13afc4e3f..871b1dd1c 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,49 +1,53 @@ -opentelemetry-distro==0.35b0 +opentelemetry-distro==0.36b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.14.0 +opentelemetry-exporter-otlp-proto-http==1.15.0 -opentelemetry-propagator-b3==1.14.0 -opentelemetry-propagator-jaeger==1.14.0 +opentelemetry-propagator-b3==1.15.0 +opentelemetry-propagator-jaeger==1.15.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.35b0 -opentelemetry-propagator-ot-trace==0.35b0 +opentelemetry-instrumentation==0.36b0 +opentelemetry-propagator-ot-trace==0.36b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aiohttp-client==0.35b0 -opentelemetry-instrumentation-aiopg==0.35b0 -opentelemetry-instrumentation-asgi==0.35b0 -opentelemetry-instrumentation-asyncpg==0.35b0 -opentelemetry-instrumentation-boto==0.35b0 -opentelemetry-instrumentation-botocore==0.35b0 -opentelemetry-instrumentation-celery==0.35b0 -opentelemetry-instrumentation-dbapi==0.35b0 -opentelemetry-instrumentation-django==0.35b0 -opentelemetry-instrumentation-elasticsearch==0.35b0 -opentelemetry-instrumentation-falcon==0.35b0 -opentelemetry-instrumentation-fastapi==0.35b0 -opentelemetry-instrumentation-flask==0.35b0 -opentelemetry-instrumentation-grpc==0.35b0 -opentelemetry-instrumentation-httpx==0.35b0 -opentelemetry-instrumentation-jinja2==0.35b0 -opentelemetry-instrumentation-kafka-python==0.35b0 -opentelemetry-instrumentation-logging==0.35b0 -opentelemetry-instrumentation-mysql==0.35b0 -opentelemetry-instrumentation-pika==0.35b0 -opentelemetry-instrumentation-psycopg2==0.35b0 -opentelemetry-instrumentation-pymemcache==0.35b0 -opentelemetry-instrumentation-pymongo==0.35b0 -opentelemetry-instrumentation-pymysql==0.35b0 -opentelemetry-instrumentation-pyramid==0.35b0 -opentelemetry-instrumentation-redis==0.35b0 -opentelemetry-instrumentation-requests==0.35b0 -opentelemetry-instrumentation-sklearn==0.35b0 -opentelemetry-instrumentation-sqlalchemy==0.35b0 -opentelemetry-instrumentation-sqlite3==0.35b0 -opentelemetry-instrumentation-starlette==0.35b0 -opentelemetry-instrumentation-tornado==0.35b0 -opentelemetry-instrumentation-urllib==0.35b0 -opentelemetry-instrumentation-urllib3==0.35b0 -opentelemetry-instrumentation-wsgi==0.35b0 +opentelemetry-instrumentation-aio-pika==0.36b0 +opentelemetry-instrumentation-aiohttp-client==0.36b0 +opentelemetry-instrumentation-aiopg==0.36b0 +opentelemetry-instrumentation-asgi==0.36b0 +opentelemetry-instrumentation-asyncpg==0.36b0 +opentelemetry-instrumentation-boto==0.36b0 +opentelemetry-instrumentation-boto3sqs==0.36b0 +opentelemetry-instrumentation-botocore==0.36b0 +opentelemetry-instrumentation-celery==0.36b0 +opentelemetry-instrumentation-confluent-kafka==0.36b0 +opentelemetry-instrumentation-dbapi==0.36b0 +opentelemetry-instrumentation-django==0.36b0 +opentelemetry-instrumentation-elasticsearch==0.36b0 +opentelemetry-instrumentation-falcon==0.36b0 +opentelemetry-instrumentation-fastapi==0.36b0 +opentelemetry-instrumentation-flask==0.36b0 +opentelemetry-instrumentation-grpc==0.36b0 +opentelemetry-instrumentation-httpx==0.36b0 +opentelemetry-instrumentation-jinja2==0.36b0 +opentelemetry-instrumentation-kafka-python==0.36b0 +opentelemetry-instrumentation-logging==0.36b0 +opentelemetry-instrumentation-mysql==0.36b0 +opentelemetry-instrumentation-pika==0.36b0 +opentelemetry-instrumentation-psycopg2==0.36b0 +opentelemetry-instrumentation-pymemcache==0.36b0 +opentelemetry-instrumentation-pymongo==0.36b0 +opentelemetry-instrumentation-pymysql==0.36b0 +opentelemetry-instrumentation-pyramid==0.36b0 +opentelemetry-instrumentation-redis==0.36b0 +opentelemetry-instrumentation-requests==0.36b0 +opentelemetry-instrumentation-sklearn==0.36b0 +opentelemetry-instrumentation-sqlalchemy==0.36b0 +opentelemetry-instrumentation-sqlite3==0.36b0 +opentelemetry-instrumentation-starlette==0.36b0 +opentelemetry-instrumentation-tornado==0.36b0 +opentelemetry-instrumentation-tortoiseorm==0.36b0 +opentelemetry-instrumentation-urllib==0.36b0 +opentelemetry-instrumentation-urllib3==0.36b0 +opentelemetry-instrumentation-wsgi==0.36b0 From de546a1aa4426da0b85d6e1947397fae200f5167 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:15:58 +0100 Subject: [PATCH 0688/1234] feat(nodejs): update ot dependencies (#1320) --- autoinstrumentation/nodejs/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 157dcc87a..546a3d200 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,9 +14,9 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.1.0", - "@opentelemetry/auto-instrumentations-node": "0.31.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.31.0", - "@opentelemetry/sdk-node": "0.31.0" + "@opentelemetry/api": "1.3.0", + "@opentelemetry/auto-instrumentations-node": "0.35.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.34.0", + "@opentelemetry/sdk-node": "0.34.0" } } From 608cc6a1efb8411b9c3b68876ad66de2efc09de7 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Tue, 20 Dec 2022 13:04:09 +0100 Subject: [PATCH 0689/1234] feat(instrumentation): update python version 0.36b0 (#1333) * feat(instrumentation): update python version * feat(changelog): update --- .chloggen/1333-update-python-ai-version.yaml | 16 ++++++++++++++++ versions.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/1333-update-python-ai-version.yaml diff --git a/.chloggen/1333-update-python-ai-version.yaml b/.chloggen/1333-update-python-ai-version.yaml new file mode 100644 index 000000000..b29f9a8d4 --- /dev/null +++ b/.chloggen/1333-update-python-ai-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR updates Python auto-instrumentation image version (0.36b0) + +# One or more tracking issues related to the change +issues: [1333] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/versions.txt b/versions.txt index acf404f4d..9168482c5 100644 --- a/versions.txt +++ b/versions.txt @@ -20,7 +20,7 @@ autoinstrumentation-nodejs=0.31.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.35b0 +autoinstrumentation-python=0.36b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt From b9bcb15bcfbf8d86beaf6d29b8bcb9c9a7112a03 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Tue, 20 Dec 2022 13:04:40 +0100 Subject: [PATCH 0690/1234] feat(instrumentation): update nodejs version 0.34.0 (#1334) * feat(instrumentation): update nodejs version * feat(changelog): update --- .chloggen/1334-update-nodejs-ai-version.yaml | 16 ++++++++++++++++ versions.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/1334-update-nodejs-ai-version.yaml diff --git a/.chloggen/1334-update-nodejs-ai-version.yaml b/.chloggen/1334-update-nodejs-ai-version.yaml new file mode 100644 index 000000000..d515a2e99 --- /dev/null +++ b/.chloggen/1334-update-nodejs-ai-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR updates NodeJS auto-instrumentation image version (0.34.0) + +# One or more tracking issues related to the change +issues: [1334] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/versions.txt b/versions.txt index 9168482c5..39ffef459 100644 --- a/versions.txt +++ b/versions.txt @@ -16,7 +16,7 @@ autoinstrumentation-java=1.20.2 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.31.0 +autoinstrumentation-nodejs=0.34.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt From 06503f9eb1ff8dcaddcbb13c97a3fe9d5a7fbb18 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 20 Dec 2022 17:38:38 +0100 Subject: [PATCH 0691/1234] [chore] Change the E2E automation to run the tests in OpenShift (#1254) * Run the E2E tests in OpenShift Signed-off-by: Israel Blancas * Set version for GitHub Actions workflow Signed-off-by: Israel Blancas * Fix CI Signed-off-by: Israel Blancas * Apply some changes to simplify the upgrade E2E test Signed-off-by: Israel Blancas * Fix CI Signed-off-by: Israel Blancas * Fix CI Signed-off-by: Israel Blancas * Install OpenShift routes only if needed Signed-off-by: Israel Blancas * Trigger Build Signed-off-by: Israel Blancas * Remove cert-manager installation from deployment step Signed-off-by: Israel Blancas * Trigger Build Signed-off-by: Israel Blancas * Ensure the webhook don't fail when kubectl apply Signed-off-by: Israel Blancas * Fix coding standard issues Signed-off-by: Israel Blancas * Fix coding standard issues Signed-off-by: Israel Blancas * Increase timeout for golangci Signed-off-by: Israel Blancas * Apply changes requested in CR Signed-off-by: Israel Blancas * Change timeout to 500ms Signed-off-by: Israel Blancas * Change program file name Signed-off-by: Israel Blancas * Do the check without depending on a manifest file Signed-off-by: Israel Blancas * Change program file name Signed-off-by: Israel Blancas Signed-off-by: Israel Blancas --- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- Makefile | 43 ++++-- hack/check-operator-ready.go | 128 ++++++++++++++++++ hack/install-metrics-server.sh | 17 ++- hack/install-openshift-routes.sh | 12 +- hack/modify-test-images.sh | 4 + kuttl-test-upgrade.yaml | 9 +- kuttl-test.yaml | 8 -- .../upgrade-test/01-upgrade-operator.yaml | 4 +- 10 files changed, 185 insertions(+), 44 deletions(-) create mode 100644 hack/check-operator-ready.go create mode 100755 hack/modify-test-images.sh diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 2b5a9437b..18d39f5a5 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -45,7 +45,7 @@ jobs: - name: Lint uses: golangci/golangci-lint-action@v3 with: - args: -v + args: -v --timeout 5m version: v1.48 working-directory: ${{ matrix.workdir }} diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 9ac9ffc4e..7e285901c 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -35,7 +35,7 @@ jobs: - name: "run tests" env: KUBE_VERSION: ${{ matrix.kube-version }} - run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION + run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION VERSION=e2e - name: "log operator if failed" if: ${{ failure() }} diff --git a/Makefile b/Makefile index 70d94903a..2881a11d7 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,8 @@ else GOTEST_OPTS=-race -v endif +START_KIND_CLUSTER ?= true + KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml @@ -117,6 +119,7 @@ set-image-controller: manifests kustomize .PHONY: deploy deploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - + go run hack/check-operator-ready.go 300 # Undeploy controller in the current Kubernetes context, configured in ~/.kube/config .PHONY: undeploy @@ -162,7 +165,7 @@ e2e: # end-to-end-test for testing upgrading .PHONY: e2e-upgrade -e2e-upgrade: +e2e-upgrade: undeploy $(KUTTL) test --config kuttl-test-upgrade.yaml .PHONY: e2e-log-operator @@ -171,38 +174,38 @@ e2e-log-operator: kubectl get deploy -A .PHONY: prepare-e2e -prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server install-openshift-routes load-image-all - mkdir -p tests/_build/crds tests/_build/manifests - $(KUSTOMIZE) build config/default -o tests/_build/manifests/01-opentelemetry-operator.yaml - $(KUSTOMIZE) build config/crd -o tests/_build/crds/ +prepare-e2e: kuttl set-image-controller container container-target-allocator start-kind cert-manager install-metrics-server install-openshift-routes load-image-all deploy + TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) ./hack/modify-test-images.sh .PHONY: scorecard-tests scorecard-tests: operator-sdk $(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1) -.PHONY: set-test-image-vars -set-test-image-vars: - $(eval IMG=local/opentelemetry-operator:e2e) - $(eval TARGETALLOCATOR_IMG=local/opentelemetry-operator-targetallocator:e2e) # Build the container image, used only for local dev purposes # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker buildx build --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . + docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push container-push: docker push ${IMG} +.PHONY: container-target-allocator-push +container-target-allocator-push: + docker push ${TARGETALLOCATOR_IMG} + .PHONY: container-target-allocator container-target-allocator: - docker buildx build --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator + docker buildx build --load --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator .PHONY: start-kind start-kind: +ifeq (true,$(START_KIND_CLUSTER)) kind create cluster --config $(KIND_CONFIG) +endif .PHONY: install-metrics-server install-metrics-server: @@ -216,12 +219,22 @@ install-openshift-routes: load-image-all: load-image-operator load-image-target-allocator .PHONY: load-image-operator -load-image-operator: - kind load docker-image local/opentelemetry-operator:e2e +load-image-operator: container +ifeq (true,$(START_KIND_CLUSTER)) + kind load docker-image $(IMG) +else + $(MAKE) container-push +endif + .PHONY: load-image-target-allocator -load-image-target-allocator: - kind load docker-image ${TARGETALLOCATOR_IMG} +load-image-target-allocator: container-target-allocator +ifeq (true,$(START_KIND_CLUSTER)) + kind load docker-image $(TARGETALLOCATOR_IMG) +else + $(MAKE) container-target-allocator-push +endif + .PHONY: cert-manager cert-manager: cmctl diff --git a/hack/check-operator-ready.go b/hack/check-operator-ready.go new file mode 100644 index 000000000..7405cc817 --- /dev/null +++ b/hack/check-operator-ready.go @@ -0,0 +1,128 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "fmt" + "os" + "path/filepath" + "time" + + appsv1 "k8s.io/api/apps/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + + "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "sigs.k8s.io/controller-runtime/pkg/client" + + otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var scheme *k8sruntime.Scheme + +func init() { + scheme = k8sruntime.NewScheme() + utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) + utilruntime.Must(appsv1.AddToScheme(scheme)) +} + +func main() { + var timeout int + var kubeconfigPath string + + defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") + + pflag.IntVar(&timeout, "timeout", 300, "The timeout for the check.") + pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") + pflag.Parse() + + pollInterval := 500 * time.Millisecond + timeoutPoll := time.Duration(timeout) * time.Second + + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + println("Error reading the kubeconfig:", err.Error()) + os.Exit(1) + } + + clusterClient, err := client.New(config, client.Options{Scheme: scheme}) + if err != nil { + println("Creating the Kubernetes client", err) + os.Exit(1) + } + + fmt.Println("Waiting until the OTEL Collector Operator is deployed") + operatorDeployment := &appsv1.Deployment{} + + err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { + err = clusterClient.Get( + context.Background(), + client.ObjectKey{ + Name: "opentelemetry-operator-controller-manager", + Namespace: "opentelemetry-operator-system", + }, + operatorDeployment, + ) + if err != nil { + fmt.Println(err) + return false, nil + } + return true, nil + }) + + if err != nil { + fmt.Println(err) + } + fmt.Println("OTEL Collector Operator is deployed properly!") + + // Sometimes, the deployment of the OTEL Operator is ready but, when + // creating new instances of the OTEL Collector, the webhook is not reachable + // and kubectl apply fails. This code deployes an OTEL Collector instance + // until success (or timeout) + collectorInstance := otelv1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "operator-check", + Namespace: "default", + }, + } + + // Ensure the collector is not there before the check + _ = clusterClient.Delete(context.Background(), &collectorInstance) + + fmt.Println("Ensure the creation of OTEL Collectors is available") + err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { + err = clusterClient.Create( + context.Background(), + &collectorInstance, + ) + if err != nil { + fmt.Println(err) + return false, nil + } + return true, nil + }) + + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + _ = clusterClient.Delete(context.Background(), &collectorInstance) +} diff --git a/hack/install-metrics-server.sh b/hack/install-metrics-server.sh index d63332d77..10720d16a 100755 --- a/hack/install-metrics-server.sh +++ b/hack/install-metrics-server.sh @@ -1,7 +1,16 @@ #!/bin/bash -# Install metrics-server on kind clusters for autoscale tests. Note: This is not needed for minikube, +# Install metrics-server on kind clusters for autoscale tests. +# Note: This is not needed for minikube, # you can just add --addons "metrics-server" to the start command. -kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml -kubectl patch deployment -n kube-system metrics-server --type "json" -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": --kubelet-insecure-tls}]' -kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=5m + + +if [[ "$(kubectl api-resources)" =~ "openshift" ]]; then + echo "Connected to an OpenShift cluster. metrics-server installation is not needed" +elif [[ "$(kubectl get deployment metrics-server -n kube-system 2>&1 )" =~ "NotFound" ]]; then + kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml + kubectl patch deployment -n kube-system metrics-server --type "json" -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": --kubelet-insecure-tls}]' + kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=5m +else + echo "metrics-server is installed. Skipping installation" +fi diff --git a/hack/install-openshift-routes.sh b/hack/install-openshift-routes.sh index 573dee06a..d34903dbf 100755 --- a/hack/install-openshift-routes.sh +++ b/hack/install-openshift-routes.sh @@ -1,6 +1,10 @@ #!/bin/bash -kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router_rbac.yaml -kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/route_crd.yaml -kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router.yaml -kubectl wait --for=condition=available deployment/ingress-router -n openshift-ingress --timeout=5m +if [[ "$(kubectl api-resources)" =~ "openshift" ]]; then + echo "Connected to an OpenShift cluster. OpenShift routes installation is not needed" +else + kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router_rbac.yaml + kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/route_crd.yaml + kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router.yaml + kubectl wait --for=condition=available deployment/ingress-router -n openshift-ingress --timeout=5m +fi diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh new file mode 100755 index 000000000..8950c7032 --- /dev/null +++ b/hack/modify-test-images.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +sed -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/00-install.yaml +sed -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml diff --git a/kuttl-test-upgrade.yaml b/kuttl-test-upgrade.yaml index 3af212f43..8066df516 100644 --- a/kuttl-test-upgrade.yaml +++ b/kuttl-test-upgrade.yaml @@ -11,16 +11,9 @@ # create a new one when the selector changed. apiVersion: kuttl.dev/v1beta1 kind: TestSuite -crdDir: ./tests/_build/crds/ -artifactsDir: ./tests/_build/artifacts/ -kindContainers: - - local/opentelemetry-operator:e2e - - ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.49.0 commands: - - command: make cert-manager - command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml - - command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system - - command: sleep 60s + - command: go run hack/check-operator-ready.go testDirs: - ./tests/e2e-upgrade/ timeout: 300 diff --git a/kuttl-test.yaml b/kuttl-test.yaml index de2c6041f..3758415cb 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -1,14 +1,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite -crdDir: ./tests/_build/crds/ artifactsDir: ./tests/_build/artifacts/ -kindContainers: - - local/opentelemetry-operator:e2e -commands: - - command: make cert-manager - - command: kubectl apply -f ./tests/_build/manifests/01-opentelemetry-operator.yaml - - command: kubectl wait --timeout=5m --for=condition=available deployment opentelemetry-operator-controller-manager -n opentelemetry-operator-system - - command: sleep 5s testDirs: - ./tests/e2e/ timeout: 150 \ No newline at end of file diff --git a/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml b/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml index 346d4facd..248ffb6a9 100644 --- a/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml +++ b/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml @@ -1,6 +1,4 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - - command: kubectl apply -f ../../_build/manifests/01-opentelemetry-operator.yaml - - command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system - - command: sleep 60s + - script: cd ../../../ && make deploy VERSION=e2e From 1c4e2c7ca472fd371be2c0640f6f2ae7ff1383f6 Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Wed, 4 Jan 2023 05:01:44 -0500 Subject: [PATCH 0692/1234] [HPA] Move maxReplicas and minReplicas to AutoscalerSpec (#1302) * move maxReplics and minReplicas to Autoscaler field * fix descriptions * run make generate * make bundle * make api-docs * fix unit test * fix nil pointer dereference * use .Spec.Replicas if MinReplicas is not set * initialize pointers * set .autoscaler.[max|min]Replicas in default webhook * updating reconcile for hpa * addressing review feedback * add comment * gofmt * chloggen --- .../1115-move-autoscaler-crd-fields.yaml | 17 +++++++ apis/v1alpha1/opentelemetrycollector_types.go | 8 ++++ .../opentelemetrycollector_webhook.go | 47 ++++++++++++++++--- .../opentelemetrycollector_webhook_test.go | 47 +++++++++++++++++++ apis/v1alpha1/zz_generated.deepcopy.go | 10 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++++++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++++++-- config/manager/kustomization.yaml | 2 +- docs/api.md | 22 ++++++++- pkg/collector/horizontalpodautoscaler.go | 8 ++-- pkg/collector/horizontalpodautoscaler_test.go | 4 +- .../reconcile/horizontalpodautoscaler.go | 16 +++---- .../reconcile/horizontalpodautoscaler_test.go | 10 ++-- tests/e2e/autoscale/00-install.yaml | 3 ++ 14 files changed, 200 insertions(+), 36 deletions(-) create mode 100644 .chloggen/1115-move-autoscaler-crd-fields.yaml diff --git a/.chloggen/1115-move-autoscaler-crd-fields.yaml b/.chloggen/1115-move-autoscaler-crd-fields.yaml new file mode 100644 index 000000000..168a1d93b --- /dev/null +++ b/.chloggen/1115-move-autoscaler-crd-fields.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Autoscaler + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR moves MaxReplicas and MinReplicas to .Spec.Autoscaler + +# One or more tracking issues related to the change +issues: + - 1115 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 3331a5ada..205b93122 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -84,9 +84,11 @@ type OpenTelemetryCollectorSpec struct { Replicas *int32 `json:"replicas,omitempty"` // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 // +optional + // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead. MinReplicas *int32 `json:"minReplicas,omitempty"` // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional + // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead. MaxReplicas *int32 `json:"maxReplicas,omitempty"` // Autoscaler specifies the pod autoscaling configuration to use // for the OpenTelemetryCollector workload. @@ -289,6 +291,12 @@ type OpenTelemetryCollectorList struct { // AutoscalerSpec defines the OpenTelemetryCollector's pod autoscaling specification. type AutoscalerSpec struct { + // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 + // +optional + MinReplicas *int32 `json:"minReplicas,omitempty"` + // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. + // +optional + MaxReplicas *int32 `json:"maxReplicas,omitempty"` // +optional Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"` // TargetCPUUtilization sets the target average CPU used across all replicas. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 389921867..66e7d2e42 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -67,11 +67,22 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.TargetAllocator.Replicas = &one } - if r.Spec.MaxReplicas != nil { + if r.Spec.MaxReplicas != nil || (r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil) { if r.Spec.Autoscaler == nil { r.Spec.Autoscaler = &AutoscalerSpec{} } + if r.Spec.Autoscaler.MaxReplicas == nil { + r.Spec.Autoscaler.MaxReplicas = r.Spec.MaxReplicas + } + if r.Spec.Autoscaler.MinReplicas == nil { + if r.Spec.MinReplicas != nil { + r.Spec.Autoscaler.MinReplicas = r.Spec.MinReplicas + } else { + r.Spec.Autoscaler.MinReplicas = r.Spec.Replicas + } + } + if r.Spec.Autoscaler.TargetMemoryUtilization == nil && r.Spec.Autoscaler.TargetCPUUtilization == nil { defaultCPUTarget := int32(90) r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget @@ -149,21 +160,45 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } } + maxReplicas := new(int32) + if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil { + maxReplicas = r.Spec.Autoscaler.MaxReplicas + } + + // check deprecated .Spec.MaxReplicas if maxReplicas is not set + if *maxReplicas == 0 { + maxReplicas = r.Spec.MaxReplicas + } + + minReplicas := new(int32) + if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MinReplicas != nil { + minReplicas = r.Spec.Autoscaler.MinReplicas + } + + // check deprecated .Spec.MinReplicas if minReplicas is not set + if *minReplicas == 0 { + if r.Spec.MinReplicas != nil { + minReplicas = r.Spec.MinReplicas + } else { + minReplicas = r.Spec.Replicas + } + } + // validate autoscale with horizontal pod autoscaler - if r.Spec.MaxReplicas != nil { - if *r.Spec.MaxReplicas < int32(1) { + if maxReplicas != nil { + if *maxReplicas < int32(1) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and one or more") } - if r.Spec.Replicas != nil && *r.Spec.Replicas > *r.Spec.MaxReplicas { + if r.Spec.Replicas != nil && *r.Spec.Replicas > *maxReplicas { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, replicas must not be greater than maxReplicas") } - if r.Spec.MinReplicas != nil && *r.Spec.MinReplicas > *r.Spec.MaxReplicas { + if minReplicas != nil && *minReplicas > *maxReplicas { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas") } - if r.Spec.MinReplicas != nil && *r.Spec.MinReplicas < int32(1) { + if minReplicas != nil && *minReplicas < int32(1) { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 29e29dfe3..f0a7e6894 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -72,6 +72,34 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, + { + name: "Setting Autoscaler MaxReplicas", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Autoscaler: &AutoscalerSpec{ + MaxReplicas: &five, + MinReplicas: &one, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + Autoscaler: &AutoscalerSpec{ + TargetCPUUtilization: &defaultCPUTarget, + MaxReplicas: &five, + MinReplicas: &one, + }, + }, + }, + }, { name: "MaxReplicas but no Autoscale", otelcol: OpenTelemetryCollector{ @@ -91,6 +119,10 @@ func TestOTELColDefaultingWebhook(t *testing.T) { UpgradeStrategy: UpgradeStrategyAutomatic, Autoscaler: &AutoscalerSpec{ TargetCPUUtilization: &defaultCPUTarget, + // webhook Default adds MaxReplicas to Autoscaler because + // OpenTelemetryCollector.Spec.MaxReplicas is deprecated. + MaxReplicas: &five, + MinReplicas: &one, }, MaxReplicas: &five, }, @@ -135,6 +167,9 @@ func TestOTELColDefaultingWebhook(t *testing.T) { } } +// TODO: a lot of these tests use .Spec.MaxReplicas and .Spec.MinReplicas. These fields are +// deprecated and moved to .Spec.Autoscaler. Fine to use these fields to test that old CRD is +// still supported but should eventually be updated. func TestOTELColValidatingWebhook(t *testing.T) { zero := int32(0) one := int32(1) @@ -373,6 +408,18 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "targetCPUUtilization should be greater than 0 and less than 100", }, + { + name: "autoscaler minReplicas is less than maxReplicas", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Autoscaler: &AutoscalerSpec{ + MaxReplicas: &one, + MinReplicas: &five, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas", + }, { name: "invalid deployment mode incompabible with ingress settings", otelcol: OpenTelemetryCollector{ diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 6803230c8..3aba6ad2e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -29,6 +29,16 @@ import ( // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { *out = *in + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } + if in.MaxReplicas != nil { + in, out := &in.MaxReplicas, &out.MaxReplicas + *out = new(int32) + **out = **in + } if in.Behavior != nil { in, out := &in.Behavior, &out.Behavior *out = new(v2.HorizontalPodAutoscalerBehavior) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 471ff6b94..778401ecb 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1010,6 +1010,17 @@ spec: type: integer type: object type: object + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling + feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling + feature. Set this if your are using autoscaling. It must be + at least 1 + format: int32 + type: integer targetCPUUtilization: description: TargetCPUUtilization sets the target average CPU used across all replicas. If average CPU exceeds this value, @@ -1254,13 +1265,15 @@ spec: type: string type: object maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. + description: 'MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" + instead.' format: int32 type: integer minReplicas: - description: MinReplicas sets a lower bound to the autoscaling feature. Set - this if your are using autoscaling. It must be at least 1 + description: 'MinReplicas sets a lower bound to the autoscaling feature. Set + this if your are using autoscaling. It must be at least 1 Deprecated: + use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' format: int32 type: integer mode: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 3bd1e672e..6cbd2e26a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1008,6 +1008,17 @@ spec: type: integer type: object type: object + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling + feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling + feature. Set this if your are using autoscaling. It must be + at least 1 + format: int32 + type: integer targetCPUUtilization: description: TargetCPUUtilization sets the target average CPU used across all replicas. If average CPU exceeds this value, @@ -1252,13 +1263,15 @@ spec: type: string type: object maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. + description: 'MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" + instead.' format: int32 type: integer minReplicas: - description: MinReplicas sets a lower bound to the autoscaling feature. Set - this if your are using autoscaling. It must be at least 1 + description: 'MinReplicas sets a lower bound to the autoscaling feature. Set + this if your are using autoscaling. It must be at least 1 Deprecated: + use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' format: int32 type: integer mode: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..2e6cc7976 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml +- manager.yaml \ No newline at end of file diff --git a/docs/api.md b/docs/api.md index 73ee92b8d..00f6922f1 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1758,7 +1758,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -1767,7 +1767,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3219,6 +3219,24 @@ Autoscaler specifies the pod autoscaling configuration to use for the OpenTeleme HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
+ + + + + + + + + + diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index c7205562d..2d3d74e56 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -80,8 +80,8 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Kind: "OpenTelemetryCollector", Name: naming.OpenTelemetryCollector(otelcol), }, - MinReplicas: otelcol.Spec.Replicas, - MaxReplicas: *otelcol.Spec.MaxReplicas, + MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, + MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, Metrics: metrics, }, } @@ -131,8 +131,8 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Kind: "OpenTelemetryCollector", Name: naming.OpenTelemetryCollector(otelcol), }, - MinReplicas: otelcol.Spec.Replicas, - MaxReplicas: *otelcol.Spec.MaxReplicas, + MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, + MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, Metrics: metrics, }, } diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index aa5e1c173..a24778ba1 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -49,9 +49,9 @@ func TestHPA(t *testing.T) { Name: "my-instance", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Replicas: &minReplicas, - MaxReplicas: &maxReplicas, Autoscaler: &v1alpha1.AutoscalerSpec{ + MinReplicas: &minReplicas, + MaxReplicas: &maxReplicas, TargetCPUUtilization: &cpuUtilization, TargetMemoryUtilization: &memoryUtilization, }, diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 28f756e36..64f8b0f56 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -38,7 +38,7 @@ func HorizontalPodAutoscalers(ctx context.Context, params Params) error { desired := []client.Object{} // check if autoscale mode is on, e.g MaxReplicas is not nil - if params.Instance.Spec.MaxReplicas != nil { + if params.Instance.Spec.MaxReplicas != nil || (params.Instance.Spec.Autoscaler != nil && params.Instance.Spec.Autoscaler.MaxReplicas != nil) { desired = append(desired, collector.HorizontalPodAutoscaler(params.Config, params.Log, params.Instance)) } @@ -112,19 +112,19 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object) { one := int32(1) - if params.Instance.Spec.MaxReplicas != nil { + if params.Instance.Spec.Autoscaler.MaxReplicas != nil { if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas - if params.Instance.Spec.MinReplicas != nil { - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.MinReplicas + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas + if params.Instance.Spec.Autoscaler.MinReplicas != nil { + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.Autoscaler.MinReplicas } else { updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics[0].Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization } else { - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.MaxReplicas - if params.Instance.Spec.MinReplicas != nil { - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.MinReplicas + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas + if params.Instance.Spec.Autoscaler.MinReplicas != nil { + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.Autoscaler.MinReplicas } else { updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index 1e978d9cb..933fa9fea 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -61,8 +61,8 @@ func TestExpectedHPA(t *testing.T) { minReplicas := int32(1) maxReplicas := int32(3) updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) - updateParms.Instance.Spec.Replicas = &minReplicas - updateParms.Instance.Spec.MaxReplicas = &maxReplicas + updateParms.Instance.Spec.Autoscaler.MinReplicas = &minReplicas + updateParms.Instance.Spec.Autoscaler.MaxReplicas = &maxReplicas updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { @@ -148,10 +148,10 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { }, NodePort: 0, }}, - Config: string(configYAML), - Replicas: &minReplicas, - MaxReplicas: &maxReplicas, + Config: string(configYAML), Autoscaler: &v1alpha1.AutoscalerSpec{ + MinReplicas: &minReplicas, + MaxReplicas: &maxReplicas, TargetCPUUtilization: &cpuUtilization, }, }, diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 15f4aed64..4f4b316e0 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -6,6 +6,9 @@ kind: OpenTelemetryCollector metadata: name: simplest spec: +# TODO: these tests use .Spec.MaxReplicas and .Spec.MinReplicas. These fields are +# deprecated and moved to .Spec.Autoscaler. Fine to use these fields to test that old CRD is +# still supported but should eventually be updated. minReplicas: 1 maxReplicas: 2 autoscaler: From fde6b9513f5067cc9bd521129ff169a77f160d63 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 4 Jan 2023 03:41:03 -0700 Subject: [PATCH 0693/1234] Update default python exporters to use OTLP (#1328) * Update default python metrics exporter * Update sdk test * Update python to use `otlp` and OTEL_EXPORTER_OTLP_*_PROTOCOL * add changelog * Update e2e tests * Update how protocol is set --- .chloggen/update-python-metrics-exporter.yaml | 16 +++++++ pkg/instrumentation/podmutator_test.go | 20 ++++++--- pkg/instrumentation/python.go | 39 +++++++++++----- pkg/instrumentation/python_test.go | 44 ++++++++++++++++--- pkg/instrumentation/sdk_test.go | 12 ++++- .../01-assert.yaml | 16 +++++-- .../02-assert.yaml | 8 +++- .../00-install-instrumentation.yaml | 4 +- .../e2e/instrumentation-python/01-assert.yaml | 10 +++-- 9 files changed, 133 insertions(+), 36 deletions(-) create mode 100755 .chloggen/update-python-metrics-exporter.yaml diff --git a/.chloggen/update-python-metrics-exporter.yaml b/.chloggen/update-python-metrics-exporter.yaml new file mode 100755 index 000000000..e68545a60 --- /dev/null +++ b/.chloggen/update-python-metrics-exporter.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: instrumentation/python + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Updates the default exporters to `otlp` and sets `OTEL_EXPORTER_OTLP_[TRACES|METRICS]_PROTOCOL` to `http/protobuf` + +# One or more tracking issues related to the change +issues: [1328] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 352f208d6..64a6e1fb0 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -406,15 +406,15 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", + Value: "http://localhost:4318", }, }, }, @@ -491,20 +491,28 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", + Value: "http://localhost:4318", }, { Name: "PYTHONPATH", Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, { Name: "OTEL_EXPORTER_OTLP_TIMEOUT", Value: "20", diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 2662ddc87..b7eaebc68 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -23,11 +23,13 @@ import ( ) const ( - envPythonPath = "PYTHONPATH" - envOtelTracesExporter = "OTEL_TRACES_EXPORTER" - envOtelMetricsExporter = "OTEL_METRICS_EXPORTER" - pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" - pythonPathSuffix = "/otel-auto-instrumentation" + envPythonPath = "PYTHONPATH" + envOtelTracesExporter = "OTEL_TRACES_EXPORTER" + envOtelMetricsExporter = "OTEL_METRICS_EXPORTER" + envOtelExporterOTLPTracesProtocol = "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" + envOtelExporterOTLPMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL" + pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" + pythonPathSuffix = "/otel-auto-instrumentation" ) func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (corev1.Pod, error) { @@ -62,19 +64,34 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ Name: envOtelTracesExporter, - Value: "otlp_proto_http", + Value: "otlp", }) } - // TODO: https://github.com/open-telemetry/opentelemetry-python/issues/2447 this should - // also be set to `otlp_proto_http` once an exporter is implemented. For now, set - // OTEL_METRICS_EXPORTER to none if not set by user to prevent using the default grpc - // exporter which is not included in the image. + // Set OTEL_EXPORTER_OTLP_TRACES_PROTOCOL to http/protobuf if not set by user because it is what our autoinstrumentation supports. + idx = getIndexOfEnv(container.Env, envOtelExporterOTLPTracesProtocol) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOtelExporterOTLPTracesProtocol, + Value: "http/protobuf", + }) + } + + // Set OTEL_METRICS_EXPORTER to HTTP exporter if not set by user because it is what our autoinstrumentation supports. idx = getIndexOfEnv(container.Env, envOtelMetricsExporter) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ Name: envOtelMetricsExporter, - Value: "none", + Value: "otlp", + }) + } + + // Set OTEL_EXPORTER_OTLP_METRICS_PROTOCOL to http/protobuf if not set by user because it is what our autoinstrumentation supports. + idx = getIndexOfEnv(container.Env, envOtelExporterOTLPMetricsProtocol) + if idx == -1 { + container.Env = append(container.Env, corev1.EnvVar{ + Name: envOtelExporterOTLPMetricsProtocol, + Value: "http/protobuf", }) } diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 910a35ba6..716f21fb3 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -78,11 +78,19 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, }, }, @@ -144,11 +152,19 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, }, }, @@ -212,9 +228,17 @@ func TestInjectPythonSDK(t *testing.T) { Name: "PYTHONPATH", Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, }, }, @@ -280,7 +304,15 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, }, }, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 077b0f34d..24e457ce7 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -634,11 +634,19 @@ func TestInjectPython(t *testing.T) { }, { Name: "OTEL_TRACES_EXPORTER", - Value: "otlp_proto_http", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", }, { Name: "OTEL_METRICS_EXPORTER", - Value: "none", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, { Name: "OTEL_SERVICE_NAME", diff --git a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml index 41d2a13ea..280312a89 100644 --- a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml @@ -14,9 +14,13 @@ spec: - name: PYTHONPATH value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http + value: otlp + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: http/protobuf - name: OTEL_METRICS_EXPORTER - value: none + value: otlp + - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL + value: http/protobuf - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT @@ -43,9 +47,13 @@ spec: - name: PYTHONPATH value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http + value: otlp + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: http/protobuf - name: OTEL_METRICS_EXPORTER - value: none + value: otlp + - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL + value: http/protobuf - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT diff --git a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml index 3bfcbfcc3..24e3f7d1e 100644 --- a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml @@ -17,9 +17,13 @@ spec: - name: PYTHONPATH value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http + value: otlp + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: http/protobuf - name: OTEL_METRICS_EXPORTER - value: none + value: otlp + - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL + value: http/protobuf - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4317 - name: OTEL_EXPORTER_OTLP_TIMEOUT diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml index ab4bd669c..a2b7d65a2 100644 --- a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-python/00-install-instrumentation.yaml @@ -25,6 +25,6 @@ spec: - name: OTEL_LOG_LEVEL value: "debug" - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http + value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 + value: http://localhost:4318 diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index a1eb66123..4b7c122ae 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -13,13 +13,17 @@ spec: - name: OTEL_LOG_LEVEL value: "debug" - name: OTEL_TRACES_EXPORTER - value: otlp_proto_http + value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 + value: http://localhost:4318 - name: PYTHONPATH value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: http/protobuf - name: OTEL_METRICS_EXPORTER - value: none + value: otlp + - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL + value: http/protobuf - name: OTEL_EXPORTER_OTLP_TIMEOUT value: "20" - name: OTEL_TRACES_SAMPLER From 74581ea322aa7a24d412bb11d3f6ff89934ea33e Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Thu, 5 Jan 2023 03:00:47 -0800 Subject: [PATCH 0694/1234] [target-allocator] marshal with jsoniter (#1323) * benchmarking jsoniter * fix imports * fix lint issues * add chlog file * remove duplicate funcs used for benchmarking * fix imports --- .chloggen/use-json-iterator.yaml | 17 ++ cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/server/server.go | 53 ++++-- cmd/otel-allocator/server/server_test.go | 221 ++++++++++++++++++++++- go.mod | 4 +- 5 files changed, 266 insertions(+), 31 deletions(-) create mode 100755 .chloggen/use-json-iterator.yaml diff --git a/.chloggen/use-json-iterator.yaml b/.chloggen/use-json-iterator.yaml new file mode 100755 index 000000000..8eefa84e5 --- /dev/null +++ b/.chloggen/use-json-iterator.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Target Allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Use json-iter to marshal json + +# One or more tracking issues related to the change +issues: + - 1336 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index ecd00cf11..14d9bfc43 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -10,6 +10,7 @@ require ( github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 + github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.53.1 @@ -111,7 +112,6 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect github.com/linode/linodego v1.8.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 61807b005..68661bac7 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -16,20 +16,19 @@ package server import ( "context" - "encoding/json" "fmt" "net/http" "net/url" "time" - yaml2 "github.com/ghodss/yaml" "github.com/go-logr/logr" "github.com/gorilla/mux" + jsoniter "github.com/json-iterator/go" "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" - "gopkg.in/yaml.v2" + promconfig "github.com/prometheus/prometheus/config" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" @@ -42,27 +41,49 @@ var ( }, []string{"path"}) ) +var ( + yamlConfig = jsoniter.Config{ + EscapeHTML: false, + MarshalFloatWith6Digits: true, + ObjectFieldMustBeSimpleString: true, + TagKey: "yaml", + }.Froze() + jsonConfig = jsoniter.Config{ + EscapeHTML: false, + MarshalFloatWith6Digits: true, + ObjectFieldMustBeSimpleString: true, + }.Froze() +) + type collectorJSON struct { Link string `json:"_link"` Jobs []*target.Item `json:"targets"` } +type DiscoveryManager interface { + GetScrapeConfigs() map[string]*promconfig.ScrapeConfig +} + type Server struct { logger logr.Logger allocator allocation.Allocator - discoveryManager *target.Discoverer + discoveryManager DiscoveryManager server *http.Server + yamlMarshaller jsoniter.API // TODO: for testing, it would make a lot of sense to have a simpler interface + jsonMarshaller jsoniter.API // TODO: for testing, it would make a lot of sense to have a simpler interface compareHash uint64 scrapeConfigResponse []byte } -func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *target.Discoverer, listenAddr *string) *Server { +func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager DiscoveryManager, listenAddr *string) *Server { s := &Server{ logger: log, allocator: allocator, discoveryManager: discoveryManager, compareHash: uint64(0), + yamlMarshaller: yamlConfig, + jsonMarshaller: jsonConfig, } router := mux.NewRouter().UseEncodedPath() router.Use(s.PrometheusMiddleware) @@ -87,7 +108,7 @@ func (s *Server) Shutdown(ctx context.Context) error { // ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. // The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. // After that, the YAML is converted in to a JSON format for consumers to use. -func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { +func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, _ *http.Request) { configs := s.discoveryManager.GetScrapeConfigs() hash, err := hashstructure.Hash(configs, nil) @@ -98,19 +119,13 @@ func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { } // if the hashes are different, we need to recompute the scrape config if hash != s.compareHash { - var configBytes []byte - configBytes, err = yaml.Marshal(configs) - if err != nil { - s.errorHandler(w, err) - return - } - var jsonConfig []byte - jsonConfig, err = yaml2.YAMLToJSON(configBytes) - if err != nil { - s.errorHandler(w, err) + configBytes, mErr := s.yamlMarshaller.Marshal(configs) + if mErr != nil { + s.errorHandler(w, mErr) return } - s.scrapeConfigResponse = jsonConfig + // Update the response and the hash + s.scrapeConfigResponse = configBytes s.compareHash = hash } // We don't use the jsonHandler method because we don't want our bytes to be re-encoded @@ -121,7 +136,7 @@ func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { } } -func (s *Server) JobHandler(w http.ResponseWriter, r *http.Request) { +func (s *Server) JobHandler(w http.ResponseWriter, _ *http.Request) { displayData := make(map[string]target.LinkJSON) for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} @@ -172,7 +187,7 @@ func (s *Server) errorHandler(w http.ResponseWriter, err error) { func (s *Server) jsonHandler(w http.ResponseWriter, data interface{}) { w.Header().Set("Content-Type", "application/json") - err := json.NewEncoder(w).Encode(data) + err := s.jsonMarshaller.NewEncoder(w).Encode(data) if err != nil { s.logger.Error(err, "failed to encode data for http response") } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 3f3c7da11..afc6f7e78 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -15,15 +15,16 @@ package server import ( - "crypto/rand" "encoding/json" "fmt" "io" - "math/big" + "math/rand" "net/http/httptest" "testing" + "time" "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -44,6 +45,14 @@ var ( testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") ) +type mockDiscoveryManager struct { + m map[string]*promconfig.ScrapeConfig +} + +func (m *mockDiscoveryManager) GetScrapeConfigs() map[string]*promconfig.ScrapeConfig { + return m.m +} + func TestServer_TargetsHandler(t *testing.T) { leastWeighted, _ := allocation.New("least-weighted", logger) type args struct { @@ -170,12 +179,8 @@ func TestServer_TargetsHandler(t *testing.T) { } } -func randInt(max int64) int64 { - nBig, _ := rand.Int(rand.Reader, big.NewInt(max)) - return nBig.Int64() -} - func BenchmarkServerTargetsHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) var table = []struct { numCollectors int numJobs int @@ -202,8 +207,8 @@ func BenchmarkServerTargetsHandler(b *testing.B) { b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - randomJob := randInt(int64(v.numJobs)) - randomCol := randInt(int64(v.numCollectors)) + randomJob := rand.Intn(v.numJobs) //nolint: gosec + randomCol := rand.Intn(v.numCollectors) //nolint: gosec request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) w := httptest.NewRecorder() s.server.Handler.ServeHTTP(w, request) @@ -212,3 +217,201 @@ func BenchmarkServerTargetsHandler(b *testing.B) { } } } + +func BenchmarkScrapeConfigsHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + yamlMarshaller: yamlConfig, + } + + tests := []int{0, 5, 10, 50, 100, 500} + for _, n := range tests { + data := makeNScrapeConfigs(n) + b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + s.compareHash = 0 + s.discoveryManager = &mockDiscoveryManager{m: data} + resp := httptest.NewRecorder() + s.ScrapeConfigsHandler(resp, nil) + } + }) + } +} + +func BenchmarkCollectorMapJSONHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + jsonMarshaller: jsonConfig, + } + + tests := []struct { + numCollectors int + numTargets int + }{ + { + numCollectors: 0, + numTargets: 0, + }, + { + numCollectors: 5, + numTargets: 5, + }, + { + numCollectors: 5, + numTargets: 50, + }, + { + numCollectors: 5, + numTargets: 500, + }, + { + numCollectors: 50, + numTargets: 5, + }, + { + numCollectors: 50, + numTargets: 50, + }, + { + numCollectors: 50, + numTargets: 500, + }, + { + numCollectors: 50, + numTargets: 5000, + }, + } + for _, tc := range tests { + data := makeNCollectorJSON(tc.numCollectors, tc.numTargets) + b.Run(fmt.Sprintf("%d_collectors_%d_targets", tc.numCollectors, tc.numTargets), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + resp := httptest.NewRecorder() + s.jsonHandler(resp, data) + } + }) + } +} + +func BenchmarkTargetItemsJSONHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + jsonMarshaller: jsonConfig, + } + + tests := []struct { + numTargets int + numLabels int + }{ + { + numTargets: 0, + numLabels: 0, + }, + { + numTargets: 5, + numLabels: 5, + }, + { + numTargets: 5, + numLabels: 50, + }, + { + numTargets: 50, + numLabels: 5, + }, + { + numTargets: 50, + numLabels: 50, + }, + { + numTargets: 500, + numLabels: 50, + }, + { + numTargets: 500, + numLabels: 500, + }, + { + numTargets: 5000, + numLabels: 50, + }, + { + numTargets: 5000, + numLabels: 500, + }, + } + for _, tc := range tests { + data := makeNTargetItems(tc.numTargets, tc.numLabels) + b.Run(fmt.Sprintf("%d_targets_%d_labels", tc.numTargets, tc.numLabels), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + resp := httptest.NewRecorder() + s.jsonHandler(resp, data) + } + }) + } +} + +var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/") + +func randSeq(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] //nolint:gosec + } + return string(b) +} + +func makeNScrapeConfigs(n int) map[string]*promconfig.ScrapeConfig { + items := make(map[string]*promconfig.ScrapeConfig, n) + for i := 0; i < n; i++ { + items[randSeq(20)] = &promconfig.ScrapeConfig{ + JobName: randSeq(20), + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(time.Minute), + MetricsPath: randSeq(50), + SampleLimit: 5, + TargetLimit: 200, + LabelLimit: 20, + LabelNameLengthLimit: 50, + LabelValueLengthLimit: 100, + } + } + return items +} + +func makeNCollectorJSON(numCollectors, numItems int) map[string]collectorJSON { + items := make(map[string]collectorJSON, numCollectors) + for i := 0; i < numCollectors; i++ { + items[randSeq(20)] = collectorJSON{ + Link: randSeq(120), + Jobs: makeNTargetItems(numItems, 50), + } + } + return items +} + +func makeNTargetItems(numItems, numLabels int) []*target.Item { + items := make([]*target.Item, 0, numItems) + for i := 0; i < numItems; i++ { + items = append(items, target.NewItem( + randSeq(80), + randSeq(150), + makeNNewLabels(numLabels), + randSeq(30), + )) + } + return items +} + +func makeNNewLabels(n int) model.LabelSet { + labels := make(map[model.LabelName]model.LabelValue, n) + for i := 0; i < n; i++ { + labels[model.LabelName(randSeq(20))] = model.LabelValue(randSeq(20)) + } + return labels +} diff --git a/go.mod b/go.mod index 0860325c3..3f9d7f0cd 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,14 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/go-logr/logr v1.2.3 github.com/mitchellh/mapstructure v1.5.0 + github.com/openshift/api v3.9.0+incompatible github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.4 + k8s.io/apiextensions-apiserver v0.25.0 k8s.io/apimachinery v0.25.4 k8s.io/client-go v0.25.4 k8s.io/component-base v0.25.4 @@ -97,7 +99,6 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect - github.com/openshift/api v3.9.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect @@ -128,7 +129,6 @@ require ( gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.0 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect From b20661c14c86797641b815ae28a716fc33e11c1c Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 5 Jan 2023 06:01:10 -0500 Subject: [PATCH 0695/1234] [target-allocator] Change the github action to match the operator (#1347) * Change the github action to match the operator * Add chloggen --- .chloggen/1298-change-ta-build-proc.yaml | 16 ++++++++++++++++ .github/workflows/publish-target-allocator.yaml | 13 ++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 .chloggen/1298-change-ta-build-proc.yaml diff --git a/.chloggen/1298-change-ta-build-proc.yaml b/.chloggen/1298-change-ta-build-proc.yaml new file mode 100755 index 000000000..885d5b0c7 --- /dev/null +++ b/.chloggen/1298-change-ta-build-proc.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target-allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR changes how the target allocator images are released by having all new target allocator changes in a "main" tagged image, with the version tag being generated only on an official release. + +# One or more tracking issues related to the change +issues: [1298] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 36f5c3833..473fc163e 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -19,7 +19,9 @@ jobs: - uses: actions/checkout@v3 - name: Read version - run: grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "VERSION="$2}' >> $GITHUB_ENV + run: | + echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV + echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - name: Docker meta id: meta @@ -27,7 +29,10 @@ jobs: with: images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{raw}} + type=ref,event=branch - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -56,7 +61,9 @@ jobs: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 push: true - build-args: version=${{ env.VERSION }} + build-args: | + VERSION=${{ env.VERSION }} + VERSION_DATE=${{ env.VERSION_DATE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache From ded4c2c5b2fcf23af93d841024ada6ea3ddc1fbb Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Fri, 6 Jan 2023 00:13:37 -0800 Subject: [PATCH 0696/1234] Revert "[target-allocator] marshal with jsoniter (#1323)" (#1351) This reverts commit 74581ea322aa7a24d412bb11d3f6ff89934ea33e. --- .chloggen/use-json-iterator.yaml | 17 -- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/server/server.go | 53 ++---- cmd/otel-allocator/server/server_test.go | 221 +---------------------- go.mod | 4 +- 5 files changed, 31 insertions(+), 266 deletions(-) delete mode 100755 .chloggen/use-json-iterator.yaml diff --git a/.chloggen/use-json-iterator.yaml b/.chloggen/use-json-iterator.yaml deleted file mode 100755 index 8eefa84e5..000000000 --- a/.chloggen/use-json-iterator.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Target Allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Use json-iter to marshal json - -# One or more tracking issues related to the change -issues: - - 1336 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 14d9bfc43..ecd00cf11 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -10,7 +10,6 @@ require ( github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 - github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.53.1 @@ -112,6 +111,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect github.com/linode/linodego v1.8.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 68661bac7..61807b005 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -16,19 +16,20 @@ package server import ( "context" + "encoding/json" "fmt" "net/http" "net/url" "time" + yaml2 "github.com/ghodss/yaml" "github.com/go-logr/logr" "github.com/gorilla/mux" - jsoniter "github.com/json-iterator/go" "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" - promconfig "github.com/prometheus/prometheus/config" + "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" @@ -41,49 +42,27 @@ var ( }, []string{"path"}) ) -var ( - yamlConfig = jsoniter.Config{ - EscapeHTML: false, - MarshalFloatWith6Digits: true, - ObjectFieldMustBeSimpleString: true, - TagKey: "yaml", - }.Froze() - jsonConfig = jsoniter.Config{ - EscapeHTML: false, - MarshalFloatWith6Digits: true, - ObjectFieldMustBeSimpleString: true, - }.Froze() -) - type collectorJSON struct { Link string `json:"_link"` Jobs []*target.Item `json:"targets"` } -type DiscoveryManager interface { - GetScrapeConfigs() map[string]*promconfig.ScrapeConfig -} - type Server struct { logger logr.Logger allocator allocation.Allocator - discoveryManager DiscoveryManager + discoveryManager *target.Discoverer server *http.Server - yamlMarshaller jsoniter.API // TODO: for testing, it would make a lot of sense to have a simpler interface - jsonMarshaller jsoniter.API // TODO: for testing, it would make a lot of sense to have a simpler interface compareHash uint64 scrapeConfigResponse []byte } -func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager DiscoveryManager, listenAddr *string) *Server { +func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *target.Discoverer, listenAddr *string) *Server { s := &Server{ logger: log, allocator: allocator, discoveryManager: discoveryManager, compareHash: uint64(0), - yamlMarshaller: yamlConfig, - jsonMarshaller: jsonConfig, } router := mux.NewRouter().UseEncodedPath() router.Use(s.PrometheusMiddleware) @@ -108,7 +87,7 @@ func (s *Server) Shutdown(ctx context.Context) error { // ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. // The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. // After that, the YAML is converted in to a JSON format for consumers to use. -func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, _ *http.Request) { +func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { configs := s.discoveryManager.GetScrapeConfigs() hash, err := hashstructure.Hash(configs, nil) @@ -119,13 +98,19 @@ func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, _ *http.Request) { } // if the hashes are different, we need to recompute the scrape config if hash != s.compareHash { - configBytes, mErr := s.yamlMarshaller.Marshal(configs) - if mErr != nil { - s.errorHandler(w, mErr) + var configBytes []byte + configBytes, err = yaml.Marshal(configs) + if err != nil { + s.errorHandler(w, err) + return + } + var jsonConfig []byte + jsonConfig, err = yaml2.YAMLToJSON(configBytes) + if err != nil { + s.errorHandler(w, err) return } - // Update the response and the hash - s.scrapeConfigResponse = configBytes + s.scrapeConfigResponse = jsonConfig s.compareHash = hash } // We don't use the jsonHandler method because we don't want our bytes to be re-encoded @@ -136,7 +121,7 @@ func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, _ *http.Request) { } } -func (s *Server) JobHandler(w http.ResponseWriter, _ *http.Request) { +func (s *Server) JobHandler(w http.ResponseWriter, r *http.Request) { displayData := make(map[string]target.LinkJSON) for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} @@ -187,7 +172,7 @@ func (s *Server) errorHandler(w http.ResponseWriter, err error) { func (s *Server) jsonHandler(w http.ResponseWriter, data interface{}) { w.Header().Set("Content-Type", "application/json") - err := s.jsonMarshaller.NewEncoder(w).Encode(data) + err := json.NewEncoder(w).Encode(data) if err != nil { s.logger.Error(err, "failed to encode data for http response") } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index afc6f7e78..3f3c7da11 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -15,16 +15,15 @@ package server import ( + "crypto/rand" "encoding/json" "fmt" "io" - "math/rand" + "math/big" "net/http/httptest" "testing" - "time" "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -45,14 +44,6 @@ var ( testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") ) -type mockDiscoveryManager struct { - m map[string]*promconfig.ScrapeConfig -} - -func (m *mockDiscoveryManager) GetScrapeConfigs() map[string]*promconfig.ScrapeConfig { - return m.m -} - func TestServer_TargetsHandler(t *testing.T) { leastWeighted, _ := allocation.New("least-weighted", logger) type args struct { @@ -179,8 +170,12 @@ func TestServer_TargetsHandler(t *testing.T) { } } +func randInt(max int64) int64 { + nBig, _ := rand.Int(rand.Reader, big.NewInt(max)) + return nBig.Int64() +} + func BenchmarkServerTargetsHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) var table = []struct { numCollectors int numJobs int @@ -207,8 +202,8 @@ func BenchmarkServerTargetsHandler(b *testing.B) { b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - randomJob := rand.Intn(v.numJobs) //nolint: gosec - randomCol := rand.Intn(v.numCollectors) //nolint: gosec + randomJob := randInt(int64(v.numJobs)) + randomCol := randInt(int64(v.numCollectors)) request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) w := httptest.NewRecorder() s.server.Handler.ServeHTTP(w, request) @@ -217,201 +212,3 @@ func BenchmarkServerTargetsHandler(b *testing.B) { } } } - -func BenchmarkScrapeConfigsHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) - s := &Server{ - logger: logger, - yamlMarshaller: yamlConfig, - } - - tests := []int{0, 5, 10, 50, 100, 500} - for _, n := range tests { - data := makeNScrapeConfigs(n) - b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - s.compareHash = 0 - s.discoveryManager = &mockDiscoveryManager{m: data} - resp := httptest.NewRecorder() - s.ScrapeConfigsHandler(resp, nil) - } - }) - } -} - -func BenchmarkCollectorMapJSONHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) - s := &Server{ - logger: logger, - jsonMarshaller: jsonConfig, - } - - tests := []struct { - numCollectors int - numTargets int - }{ - { - numCollectors: 0, - numTargets: 0, - }, - { - numCollectors: 5, - numTargets: 5, - }, - { - numCollectors: 5, - numTargets: 50, - }, - { - numCollectors: 5, - numTargets: 500, - }, - { - numCollectors: 50, - numTargets: 5, - }, - { - numCollectors: 50, - numTargets: 50, - }, - { - numCollectors: 50, - numTargets: 500, - }, - { - numCollectors: 50, - numTargets: 5000, - }, - } - for _, tc := range tests { - data := makeNCollectorJSON(tc.numCollectors, tc.numTargets) - b.Run(fmt.Sprintf("%d_collectors_%d_targets", tc.numCollectors, tc.numTargets), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - resp := httptest.NewRecorder() - s.jsonHandler(resp, data) - } - }) - } -} - -func BenchmarkTargetItemsJSONHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) - s := &Server{ - logger: logger, - jsonMarshaller: jsonConfig, - } - - tests := []struct { - numTargets int - numLabels int - }{ - { - numTargets: 0, - numLabels: 0, - }, - { - numTargets: 5, - numLabels: 5, - }, - { - numTargets: 5, - numLabels: 50, - }, - { - numTargets: 50, - numLabels: 5, - }, - { - numTargets: 50, - numLabels: 50, - }, - { - numTargets: 500, - numLabels: 50, - }, - { - numTargets: 500, - numLabels: 500, - }, - { - numTargets: 5000, - numLabels: 50, - }, - { - numTargets: 5000, - numLabels: 500, - }, - } - for _, tc := range tests { - data := makeNTargetItems(tc.numTargets, tc.numLabels) - b.Run(fmt.Sprintf("%d_targets_%d_labels", tc.numTargets, tc.numLabels), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - resp := httptest.NewRecorder() - s.jsonHandler(resp, data) - } - }) - } -} - -var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/") - -func randSeq(n int) string { - b := make([]rune, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] //nolint:gosec - } - return string(b) -} - -func makeNScrapeConfigs(n int) map[string]*promconfig.ScrapeConfig { - items := make(map[string]*promconfig.ScrapeConfig, n) - for i := 0; i < n; i++ { - items[randSeq(20)] = &promconfig.ScrapeConfig{ - JobName: randSeq(20), - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(time.Minute), - MetricsPath: randSeq(50), - SampleLimit: 5, - TargetLimit: 200, - LabelLimit: 20, - LabelNameLengthLimit: 50, - LabelValueLengthLimit: 100, - } - } - return items -} - -func makeNCollectorJSON(numCollectors, numItems int) map[string]collectorJSON { - items := make(map[string]collectorJSON, numCollectors) - for i := 0; i < numCollectors; i++ { - items[randSeq(20)] = collectorJSON{ - Link: randSeq(120), - Jobs: makeNTargetItems(numItems, 50), - } - } - return items -} - -func makeNTargetItems(numItems, numLabels int) []*target.Item { - items := make([]*target.Item, 0, numItems) - for i := 0; i < numItems; i++ { - items = append(items, target.NewItem( - randSeq(80), - randSeq(150), - makeNNewLabels(numLabels), - randSeq(30), - )) - } - return items -} - -func makeNNewLabels(n int) model.LabelSet { - labels := make(map[model.LabelName]model.LabelValue, n) - for i := 0; i < n; i++ { - labels[model.LabelName(randSeq(20))] = model.LabelValue(randSeq(20)) - } - return labels -} diff --git a/go.mod b/go.mod index 3f9d7f0cd..0860325c3 100644 --- a/go.mod +++ b/go.mod @@ -8,14 +8,12 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/go-logr/logr v1.2.3 github.com/mitchellh/mapstructure v1.5.0 - github.com/openshift/api v3.9.0+incompatible github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.4 - k8s.io/apiextensions-apiserver v0.25.0 k8s.io/apimachinery v0.25.4 k8s.io/client-go v0.25.4 k8s.io/component-base v0.25.4 @@ -99,6 +97,7 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/openshift/api v3.9.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect @@ -129,6 +128,7 @@ require ( gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.25.0 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect From c5c395302a442122cb6ce9e0a5636e22c6b6d41d Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 6 Jan 2023 09:25:25 +0100 Subject: [PATCH 0697/1234] Prepare for 0.67.0 release (#1350) * add new release Signed-off-by: Yuri Sa * add new release Signed-off-by: Yuri Sa * Add missing changelog and bump TA version Signed-off-by: Pavol Loffay * clear changelog Signed-off-by: Pavol Loffay Signed-off-by: Yuri Sa Signed-off-by: Pavol Loffay Co-authored-by: Yuri Sa --- .chloggen/1028-restart-podwatcher.yaml | 17 ---------------- .chloggen/1257-memory-usage-fixes.yaml | 17 ---------------- .chloggen/1317-chloggen.yaml | 17 ---------------- .chloggen/1333-update-python-ai-version.yaml | 16 --------------- .chloggen/1334-update-nodejs-ai-version.yaml | 16 --------------- CHANGELOG.md | 20 +++++++++++++++++++ README.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 8 ++++---- 9 files changed, 28 insertions(+), 91 deletions(-) delete mode 100644 .chloggen/1028-restart-podwatcher.yaml delete mode 100755 .chloggen/1257-memory-usage-fixes.yaml delete mode 100755 .chloggen/1317-chloggen.yaml delete mode 100644 .chloggen/1333-update-python-ai-version.yaml delete mode 100644 .chloggen/1334-update-nodejs-ai-version.yaml diff --git a/.chloggen/1028-restart-podwatcher.yaml b/.chloggen/1028-restart-podwatcher.yaml deleted file mode 100644 index ab3277f90..000000000 --- a/.chloggen/1028-restart-podwatcher.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Target Allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR restarts pod watcher on no event and adds unit tests for timeout and closed watcher channel - -# One or more tracking issues related to the change -issues: - - 1028 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1257-memory-usage-fixes.yaml b/.chloggen/1257-memory-usage-fixes.yaml deleted file mode 100755 index bcb965885..000000000 --- a/.chloggen/1257-memory-usage-fixes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Target Allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR changes many packages in the target allocator for cleaner access patterns - -# One or more tracking issues related to the change -issues: - - 1257 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1317-chloggen.yaml b/.chloggen/1317-chloggen.yaml deleted file mode 100755 index e61973f98..000000000 --- a/.chloggen/1317-chloggen.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: github_actions - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Introduces the chloggen package to manage the changelog - -# One or more tracking issues related to the change -issues: - - 1317 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1333-update-python-ai-version.yaml b/.chloggen/1333-update-python-ai-version.yaml deleted file mode 100644 index b29f9a8d4..000000000 --- a/.chloggen/1333-update-python-ai-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR updates Python auto-instrumentation image version (0.36b0) - -# One or more tracking issues related to the change -issues: [1333] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1334-update-nodejs-ai-version.yaml b/.chloggen/1334-update-nodejs-ai-version.yaml deleted file mode 100644 index d515a2e99..000000000 --- a/.chloggen/1334-update-nodejs-ai-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR updates NodeJS auto-instrumentation image version (0.34.0) - -# One or more tracking issues related to the change -issues: [1334] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index eea6ef8b4..5c7ab19f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ Changes by Version ================== +0.67.0 +------------------ +### 🚀 New components 🚀 +* Support openshift routes ([#1206](https://github.com/open-telemetry/opentelemetry-operator/pull/1206), [@frzifus](https://github.com/frzifus)) +* Add TargetMemoryUtilization metric for AutoScaling ([#1223](https://github.com/open-telemetry/opentelemetry-operator/pull/1223), [@kevinearls](https://github.com/kevinearls)) +### 💡 Enhancements 💡 +* Update the javaagent version to 1.21.0 ([#1324](https://github.com/open-telemetry/opentelemetry-operator/pull/1324)) +* Update default python exporters to use OTLP ([#1328](https://github.com/open-telemetry/opentelemetry-operator/pull/1328), [@TylerHelmuth](https://github.com/TylerHelmuth)) +* Update default Node.JS instrumentation to 0.34.0 ([#1334](https://github.com/open-telemetry/opentelemetry-operator/pull/1334), [@mat-rumian](https://github.com/mat-rumian)) +* Update default Python instrumentation to 0.36b0 ([#1333](https://github.com/open-telemetry/opentelemetry-operator/pull/1333), [@mat-rumian](https://github.com/mat-rumian)) +* [HPA] Move maxReplicas and minReplicas to AutoscalerSpec ([#1333](https://github.com/open-telemetry/opentelemetry-operator/pull/1302), [@moh-osman3](https://github.com/moh-osman3)) +* Memory improvements first pass ([#1293](https://github.com/open-telemetry/opentelemetry-operator/pull/1293), [@jaronoff97](https://github.com/jaronoff97)) +* Add change handler to register callbacks ([#1292](https://github.com/open-telemetry/opentelemetry-operator/pull/1292), [@frzifus](https://github.com/frzifus)) +* Ignore reconcile errors that occur because a pod is being terminated ([#1233](https://github.com/open-telemetry/opentelemetry-operator/pull/1233), [@kevinearls](https://github.com/kevinearls)) +* remove unused onChange function from config ([#1290](https://github.com/open-telemetry/opentelemetry-operator/pull/1290), [@frzifus](https://github.com/frzifus)) +* Remove default claims - fixes #1281 ([#1282](https://github.com/open-telemetry/opentelemetry-operator/pull/1282), [@ekarlso](https://github.com/ekarlso)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.67.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.67.0) +* [OpenTelemetry Contrib - v0.67.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.67.0) + 0.66.0 ------------------ ### 🚀 New components 🚀 diff --git a/README.md b/README.md index dc17bcb21..9d70582aa 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|----------------------| +| v0.67.0 | v1.19 to v1.25 | v1 | | v0.66.0 | v1.19 to v1.25 | v1 | | v0.64.1 | v1.19 to v1.25 | v1 | | v0.63.1 | v1.19 to v1.25 | v1 | @@ -347,7 +348,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.48.0 | v1.19 to v1.23 | v1alpha2 | | v0.47.0 | v1.19 to v1.23 | v1alpha2 | | v0.46.0 | v1.19 to v1.23 | v1alpha2 | -| v0.45.0 | v1.21 to v1.23 | v1alpha2 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e7e975ae0..7b03dd022 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.66.0 + name: opentelemetry-operator.v0.67.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -306,7 +306,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.66.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.67.0 livenessProbe: httpGet: path: /healthz @@ -413,7 +413,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.66.0 + version: 0.67.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 39ffef459..2f84cbd3b 100644 --- a/versions.txt +++ b/versions.txt @@ -2,17 +2,17 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.66.0 +opentelemetry-collector=0.67.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.66.0 +operator=0.67.0 # Represents the current release of the Target Allocator. -targetallocator=0.66.0 +targetallocator=0.67.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.20.2 +autoinstrumentation-java=1.21.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From e1cecbf3bada4a2c5275bf7d7216c58ee6ad4480 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 9 Jan 2023 19:14:08 +0100 Subject: [PATCH 0698/1234] Refactor the target allocator build to not run it as root (#1345) * Refactor the target allocator build to not run it as root Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas * Fix issue number in changelog Signed-off-by: Israel Blancas * Trigger Build Signed-off-by: Israel Blancas * Use scratch image as base image for the target allocator Signed-off-by: Israel Blancas Signed-off-by: Israel Blancas --- .chloggen/1346-run-ta-nonroot.yaml | 16 ++++++++++++++++ cmd/otel-allocator/Dockerfile | 13 ++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100755 .chloggen/1346-run-ta-nonroot.yaml diff --git a/.chloggen/1346-run-ta-nonroot.yaml b/.chloggen/1346-run-ta-nonroot.yaml new file mode 100755 index 000000000..b8d43368b --- /dev/null +++ b/.chloggen/1346-run-ta-nonroot.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Run the target allocator as non root user" + +# One or more tracking issues related to the change +issues: [1346] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 3e856c08a..5ba6d819f 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,8 +1,10 @@ -# Build the target allocator binary -FROM golang:1.19 as builder +# Build the otel-allocator binary +FROM golang:1.19-alpine as builder WORKDIR /app +RUN apk --no-cache add ca-certificates + # Copy go mod and sum files COPY go.mod go.sum ./ @@ -14,12 +16,13 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . ######## Start a new stage from scratch ####### -FROM alpine:latest - -RUN apk --no-cache add ca-certificates +FROM scratch WORKDIR /root/ +# Copy the certs from the builder +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + # Copy the pre-built binary file from the previous stage COPY --from=builder /app/main . From ba24a19c01ee95b60dd0c62f519524a1046e95f7 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Mon, 9 Jan 2023 11:52:47 -0700 Subject: [PATCH 0699/1234] [chore] Update Instrumentation example with python env var (#1330) * Update Instrumentation example with python env var * Add comment --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 9d70582aa..217d67810 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,13 @@ spec: sampler: type: parentbased_traceidratio argument: "0.25" + python: + env: + # Required if endpoint is set to 4317. + # Python autoinstrumentation uses http/proto by default + # so data must be sent to 4318 instead of 4137. + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://otel-collector:4318 EOF ``` From 0bdaa9eae900c7e08a6ad20546b1c9729d248803 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 10 Jan 2023 11:21:31 +0100 Subject: [PATCH 0700/1234] [bug_fix] Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters (#1337) * Add missing resource for OpenShift routes Signed-off-by: Israel Blancas * Add missing file Signed-off-by: Israel Blancas * Add missing changelog file Signed-off-by: Israel Blancas Signed-off-by: Israel Blancas --- .chloggen/1337-fix-routes-openshift.yaml | 16 ++++++++++++++++ ...telemetry-operator.clusterserviceversion.yaml | 1 + config/rbac/role.yaml | 1 + controllers/opentelemetrycollector_controller.go | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 .chloggen/1337-fix-routes-openshift.yaml diff --git a/.chloggen/1337-fix-routes-openshift.yaml b/.chloggen/1337-fix-routes-openshift.yaml new file mode 100755 index 000000000..10c81316c --- /dev/null +++ b/.chloggen/1337-fix-routes-openshift.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "There was a missing resource in the OpenShift routes ClusterBinding" + +# One or more tracking issues related to the change +issues: [1337] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7b03dd022..8ba67b540 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -261,6 +261,7 @@ spec: - route.openshift.io resources: - routes + - routes/custom-host verbs: - create - delete diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 37e368696..1d8a6c605 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -172,6 +172,7 @@ rules: - route.openshift.io resources: - routes + - routes/custom-host verbs: - create - delete diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 4f62c9390..ca171d2d1 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -181,7 +181,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch From b056433b07db19c95b701ae5b2c98ed957de9122 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 11 Jan 2023 13:55:32 -0500 Subject: [PATCH 0701/1234] [new-component] Operator OpAMP Bridge Service (#1339) * Begin the journey * Some hacks to functionality * Fix create bug, getting prepped for refactor * Some reorganization and cleaning, added tests * Add deletion and dockerfile * Add logic for specifying allowed components * Linting, CI, header * Makefile CI * Added comments, created an object for use by the applied keys map * Fix makefile, update to use require * IMports * updated from comments * Improved logging, working dockerfile * Rename the whole thing * Change service name * Update from feedback --- .chloggen/1318-remote-config-service.yaml | 16 + .github/workflows/continuous-integration.yaml | 2 +- .gitignore | 1 + Makefile | 17 +- cmd/operator-opamp-bridge/Dockerfile | 29 + cmd/operator-opamp-bridge/agent/agent.go | 295 ++++++++ cmd/operator-opamp-bridge/agent/agent_test.go | 555 ++++++++++++++ .../agent/collector_key.go | 43 ++ .../agent/collector_key_test.go | 98 +++ .../agent/testdata/agent.yaml | 15 + .../testdata/agentbasiccomponentsallowed.yaml | 23 + .../agent/testdata/agentbatchnotallowed.yaml | 22 + .../testdata/agentnoprocessorsallowed.yaml | 20 + .../agent/testdata/basic.yaml | 24 + .../agent/testdata/invalid.yaml | 24 + .../agent/testdata/updated.yaml | 25 + cmd/operator-opamp-bridge/config/cli.go | 101 +++ cmd/operator-opamp-bridge/config/config.go | 142 ++++ cmd/operator-opamp-bridge/go.mod | 94 +++ cmd/operator-opamp-bridge/go.sum | 707 ++++++++++++++++++ cmd/operator-opamp-bridge/header.txt | 13 + cmd/operator-opamp-bridge/logger/logger.go | 40 + cmd/operator-opamp-bridge/main.go | 62 ++ cmd/operator-opamp-bridge/metrics/reporter.go | 180 +++++ cmd/operator-opamp-bridge/operator/client.go | 200 +++++ .../operator/client_test.go | 196 +++++ .../operator/testdata/collector.yaml | 24 + .../operator/testdata/invalid-collector.yaml | 24 + .../operator/testdata/updated-collector.yaml | 24 + 29 files changed, 3013 insertions(+), 3 deletions(-) create mode 100755 .chloggen/1318-remote-config-service.yaml create mode 100644 cmd/operator-opamp-bridge/Dockerfile create mode 100644 cmd/operator-opamp-bridge/agent/agent.go create mode 100644 cmd/operator-opamp-bridge/agent/agent_test.go create mode 100644 cmd/operator-opamp-bridge/agent/collector_key.go create mode 100644 cmd/operator-opamp-bridge/agent/collector_key_test.go create mode 100644 cmd/operator-opamp-bridge/agent/testdata/agent.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/basic.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/invalid.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/updated.yaml create mode 100644 cmd/operator-opamp-bridge/config/cli.go create mode 100644 cmd/operator-opamp-bridge/config/config.go create mode 100644 cmd/operator-opamp-bridge/go.mod create mode 100644 cmd/operator-opamp-bridge/go.sum create mode 100644 cmd/operator-opamp-bridge/header.txt create mode 100644 cmd/operator-opamp-bridge/logger/logger.go create mode 100644 cmd/operator-opamp-bridge/main.go create mode 100644 cmd/operator-opamp-bridge/metrics/reporter.go create mode 100644 cmd/operator-opamp-bridge/operator/client.go create mode 100644 cmd/operator-opamp-bridge/operator/client_test.go create mode 100644 cmd/operator-opamp-bridge/operator/testdata/collector.yaml create mode 100644 cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml create mode 100644 cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml diff --git a/.chloggen/1318-remote-config-service.yaml b/.chloggen/1318-remote-config-service.yaml new file mode 100755 index 000000000..13fb153ba --- /dev/null +++ b/.chloggen/1318-remote-config-service.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Operator OpAMP Bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introducing the Operator OpAMP Bridge service, which allows a user to manage OpenTelemetry Collector CRDs via OpAMP + +# One or more tracking issues related to the change +issues: [1318] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 18d39f5a5..1ecdd99c6 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - workdir: [".", "./cmd/otel-allocator"] + workdir: [".", "./cmd/otel-allocator", "./cmd/operator-opamp-bridge"] steps: - name: Set up Go uses: actions/setup-go@v3 diff --git a/.gitignore b/.gitignore index 6b11e1025..88abe862c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.dylib bin vendor +.DS_Store # Test binary, build with `go test -c` *.test diff --git a/Makefile b/Makefile index 2881a11d7..6c5392e43 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,9 @@ BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} TARGETALLOCATOR_IMG_REPO ?= target-allocator TARGETALLOCATOR_IMG ?= ${IMG_PREFIX}/${TARGETALLOCATOR_IMG_REPO}:$(addprefix v,${VERSION}) +OPERATOROPAMPBRIDGE_IMG_REPO ?= operator-opamp-bridge +OPERATOROPAMPBRIDGE_IMG ?= ${IMG_PREFIX}/${OPERATOROPAMPBRIDGE_IMG_REPO}:$(addprefix v,${VERSION}) + # Options for 'bundle-build' ifneq ($(origin CHANNELS), undefined) BUNDLE_CHANNELS := --channels=$(CHANNELS) @@ -89,6 +92,7 @@ ci: test test: generate fmt vet ensure-generate-is-noop envtest KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... cd cmd/otel-allocator && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... + cd cmd/operator-opamp-bridge && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... # Build manager binary .PHONY: manager @@ -152,6 +156,7 @@ vet: lint: golangci-lint run cd cmd/otel-allocator && golangci-lint run + cd cmd/operator-opamp-bridge && golangci-lint run # Generate code .PHONY: generate @@ -174,7 +179,7 @@ e2e-log-operator: kubectl get deploy -A .PHONY: prepare-e2e -prepare-e2e: kuttl set-image-controller container container-target-allocator start-kind cert-manager install-metrics-server install-openshift-routes load-image-all deploy +prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server install-openshift-routes load-image-all deploy TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) ./hack/modify-test-images.sh .PHONY: scorecard-tests @@ -201,6 +206,10 @@ container-target-allocator-push: container-target-allocator: docker buildx build --load --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator +.PHONY: container-operator-opamp-bridge +container-operator-opamp-bridge: + docker buildx build --platform linux/${ARCH} -t ${OPERATOROPAMPBRIDGE_IMG} cmd/operator-opamp-bridge + .PHONY: start-kind start-kind: ifeq (true,$(START_KIND_CLUSTER)) @@ -216,7 +225,7 @@ install-openshift-routes: ./hack/install-openshift-routes.sh .PHONY: load-image-all -load-image-all: load-image-operator load-image-target-allocator +load-image-all: load-image-operator load-image-target-allocator load-image-operator-opamp-bridge .PHONY: load-image-operator load-image-operator: container @@ -236,6 +245,10 @@ else endif +.PHONY: load-image-operator-opamp-bridge +load-image-operator-opamp-bridge: + kind load docker-image ${OPERATOROPAMPBRIDGE_IMG} + .PHONY: cert-manager cert-manager: cmctl # Consider using cmctl to install the cert-manager once install command is not experimental diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile new file mode 100644 index 000000000..ce62eca28 --- /dev/null +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -0,0 +1,29 @@ +# Build the operator-opamp-bridge binary +FROM golang:1.19-alpine as builder + +WORKDIR /app + +RUN apk --no-cache add ca-certificates + +# Copy go mod and sum files +COPY go.mod go.sum ./ + +RUN go mod download + +COPY . . + +# Build the Go app +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . + +######## Start a new stage from scratch ####### +FROM scratch + +WORKDIR /root/ + +# Copy the certs from the builder +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + +# Copy the pre-built binary file from the previous stage +COPY --from=builder /app/main . + +ENTRYPOINT ["./main"] diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go new file mode 100644 index 000000000..fb8067d22 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/agent.go @@ -0,0 +1,295 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package agent + +import ( + "bytes" + "context" + "time" + + "gopkg.in/yaml.v3" + + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/metrics" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" + + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" + + "github.com/oklog/ulid/v2" + "go.uber.org/multierr" + + "github.com/open-telemetry/opamp-go/client" + "github.com/open-telemetry/opamp-go/client/types" + "github.com/open-telemetry/opamp-go/protobufs" +) + +type Agent struct { + logger types.Logger + + appliedKeys map[collectorKey]bool + startTime uint64 + lastHash []byte + + instanceId ulid.ULID + agentDescription *protobufs.AgentDescription + remoteConfigStatus *protobufs.RemoteConfigStatus + + opampClient client.OpAMPClient + metricReporter *metrics.MetricReporter + config config.Config + applier operator.ConfigApplier + remoteConfigEnabled bool +} + +func NewAgent(logger types.Logger, applier operator.ConfigApplier, config config.Config, opampClient client.OpAMPClient) *Agent { + agent := &Agent{ + config: config, + applier: applier, + logger: logger, + appliedKeys: map[collectorKey]bool{}, + instanceId: config.GetNewInstanceId(), + agentDescription: config.GetDescription(), + remoteConfigEnabled: config.RemoteConfigEnabled(), + opampClient: opampClient, + } + + agent.logger.Debugf("Agent created, id=%v, type=%s, version=%s.", + agent.instanceId.String(), config.GetAgentType(), config.GetAgentVersion()) + + return agent +} + +// TODO: Something should run on a schedule to set the health of the OpAMP client. +func (agent *Agent) getHealth() *protobufs.AgentHealth { + return &protobufs.AgentHealth{ + Healthy: true, + StartTimeUnixNano: agent.startTime, + LastError: "", + } +} + +// onConnect is called when an agent is successfully connected to a server. +func (agent *Agent) onConnect() { + agent.logger.Debugf("Connected to the server.") +} + +// onConnectFailed is called when an agent was unable to connect to a server. +func (agent *Agent) onConnectFailed(err error) { + agent.logger.Errorf("Failed to connect to the server: %v", err) +} + +// onError is called when an agent receives an error response from the server. +func (agent *Agent) onError(err *protobufs.ServerErrorResponse) { + agent.logger.Errorf("Server returned an error response: %v", err.ErrorMessage) +} + +// saveRemoteConfigStatus receives a status from the server when the server sets a remote configuration. +func (agent *Agent) saveRemoteConfigStatus(_ context.Context, status *protobufs.RemoteConfigStatus) { + agent.remoteConfigStatus = status +} + +// Start sets up the callbacks for the OpAMP client and begins the client's connection to the server. +func (agent *Agent) Start() error { + agent.startTime = uint64(time.Now().UnixNano()) + settings := types.StartSettings{ + OpAMPServerURL: agent.config.Endpoint, + InstanceUid: agent.instanceId.String(), + Callbacks: types.CallbacksStruct{ + OnConnectFunc: agent.onConnect, + OnConnectFailedFunc: agent.onConnectFailed, + OnErrorFunc: agent.onError, + SaveRemoteConfigStatusFunc: agent.saveRemoteConfigStatus, + GetEffectiveConfigFunc: agent.getEffectiveConfig, + OnMessageFunc: agent.onMessage, + }, + RemoteConfigStatus: agent.remoteConfigStatus, + PackagesStateProvider: nil, + Capabilities: agent.config.GetCapabilities(), + } + err := agent.opampClient.SetAgentDescription(agent.agentDescription) + if err != nil { + return err + } + err = agent.opampClient.SetHealth(agent.getHealth()) + if err != nil { + return err + } + + agent.logger.Debugf("Starting OpAMP client...") + + err = agent.opampClient.Start(context.Background(), settings) + if err != nil { + return err + } + + agent.logger.Debugf("OpAMP Client started.") + + return nil +} + +// updateAgentIdentity receives a new instanced Id from the remote server and updates the agent's instanceID field. +// The meter will be reinitialized by the onMessage function. +func (agent *Agent) updateAgentIdentity(instanceId ulid.ULID) { + agent.logger.Debugf("Agent identity is being changed from id=%v to id=%v", + agent.instanceId.String(), + instanceId.String()) + agent.instanceId = instanceId +} + +// getEffectiveConfig is called when a remote server needs to learn of the current effective configuration of each +// collector the agent is managing. +func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.EffectiveConfig, error) { + instances, err := agent.applier.ListInstances() + if err != nil { + agent.logger.Errorf("couldn't list instances", err) + return nil, err + } + instanceMap := map[string]*protobufs.AgentConfigFile{} + for _, instance := range instances { + marshaled, err := yaml.Marshal(instance) + if err != nil { + agent.logger.Errorf("couldn't marshal collector configuration", err) + return nil, err + } + mapKey := newCollectorKey(instance.GetName(), instance.GetNamespace()) + instanceMap[mapKey.String()] = &protobufs.AgentConfigFile{ + Body: marshaled, + ContentType: "yaml", + } + } + return &protobufs.EffectiveConfig{ + ConfigMap: &protobufs.AgentConfigMap{ + ConfigMap: instanceMap, + }, + }, nil +} + +// initMeter initializes a metric reporter instance for the agent to report runtime metrics to the +// configured destination. The settings received will be used to initialize a reporter, shutting down any previously +// running metrics reporting instances. +func (agent *Agent) initMeter(settings *protobufs.TelemetryConnectionSettings) { + reporter, err := metrics.NewMetricReporter(agent.logger, settings, agent.config.GetAgentType(), agent.config.GetAgentVersion(), agent.instanceId) + if err != nil { + agent.logger.Errorf("Cannot collect metrics: %v", err) + return + } + + if agent.metricReporter != nil { + agent.metricReporter.Shutdown() + } + agent.metricReporter = reporter +} + +// applyRemoteConfig receives a remote configuration from a remote server of the following form: +// +// map[name/namespace] -> collector CRD spec +// +// For every key in the received remote configuration, the agent attempts to apply it to the connected +// Kubernetes cluster. If an agent fails to apply a collector CRD, it will continue to the next entry. The agent will +// store the received configuration hash regardless of application status as per the OpAMP spec. +// +// INVARIANT: The caller must verify that config isn't nil _and_ the configuration has changed between calls. +func (agent *Agent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (*protobufs.RemoteConfigStatus, error) { + var multiErr error + // Apply changes from the received config map + for key, file := range config.Config.GetConfigMap() { + if len(key) == 0 || len(file.Body) == 0 { + continue + } + colKey, err := collectorKeyFromKey(key) + if err != nil { + multiErr = multierr.Append(multiErr, err) + continue + } + err = agent.applier.Apply(colKey.name, colKey.namespace, file) + if err != nil { + multiErr = multierr.Append(multiErr, err) + continue + } + agent.appliedKeys[colKey] = true + } + // Check if anything was deleted + for collectorKey := range agent.appliedKeys { + if _, ok := config.Config.GetConfigMap()[collectorKey.String()]; !ok { + err := agent.applier.Delete(collectorKey.name, collectorKey.namespace) + if err != nil { + multiErr = multierr.Append(multiErr, err) + } + } + } + agent.lastHash = config.GetConfigHash() + if multiErr != nil { + return &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: agent.lastHash, + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, + ErrorMessage: multiErr.Error(), + }, multiErr + } + return &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: agent.lastHash, + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, nil +} + +// Shutdown will stop the OpAMP client gracefully. +func (agent *Agent) Shutdown() { + agent.logger.Debugf("Agent shutting down...") + if agent.opampClient != nil { + err := agent.opampClient.Stop(context.Background()) + if err != nil { + agent.logger.Errorf(err.Error()) + } + } + if agent.metricReporter != nil { + agent.metricReporter.Shutdown() + } +} + +// onMessage is called when the client receives a new message from the connected OpAMP server. The agent is responsible +// for checking if it should apply a new remote configuration. The agent will also initialize metrics based on the +// settings received from the server. The agent is also able to update its identifier if it needs to. +func (agent *Agent) onMessage(ctx context.Context, msg *types.MessageData) { + // If we received remote configuration, and it's not the same as the previously applied one + if agent.remoteConfigEnabled && msg.RemoteConfig != nil && !bytes.Equal(agent.lastHash, msg.RemoteConfig.GetConfigHash()) { + var err error + status, err := agent.applyRemoteConfig(msg.RemoteConfig) + if err != nil { + agent.logger.Errorf(err.Error()) + } + err = agent.opampClient.SetRemoteConfigStatus(status) + if err != nil { + agent.logger.Errorf(err.Error()) + return + } + err = agent.opampClient.UpdateEffectiveConfig(ctx) + if err != nil { + agent.logger.Errorf(err.Error()) + } + } + + // The instance id is updated prior to the meter initialization so that the new meter will report using the updated + // instanceId. + if msg.AgentIdentification != nil { + newInstanceId, err := ulid.Parse(msg.AgentIdentification.NewInstanceUid) + if err != nil { + agent.logger.Errorf(err.Error()) + return + } + agent.updateAgentIdentity(newInstanceId) + } + + if msg.OwnMetricsConnSettings != nil { + agent.initMeter(msg.OwnMetricsConnSettings) + } +} diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go new file mode 100644 index 000000000..707e5315e --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/agent_test.go @@ -0,0 +1,555 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package agent + +import ( + "context" + "crypto/rand" + "fmt" + "os" + "sort" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/oklog/ulid/v2" + "github.com/open-telemetry/opamp-go/client" + "github.com/open-telemetry/opamp-go/client/types" + "github.com/open-telemetry/opamp-go/protobufs" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" +) + +var ( + l = logf.Log.WithName("agent-tests") + clientLogger = logger.NewLogger(&l) + _ client.OpAMPClient = &mockOpampClient{} +) + +type mockOpampClient struct { + lastStatus *protobufs.RemoteConfigStatus + lastEffectiveConfig *protobufs.EffectiveConfig + settings types.StartSettings +} + +func (m *mockOpampClient) Start(ctx context.Context, settings types.StartSettings) error { + m.settings = settings + return nil +} + +func (m *mockOpampClient) Stop(ctx context.Context) error { + return nil +} + +func (m *mockOpampClient) SetAgentDescription(descr *protobufs.AgentDescription) error { + return nil +} + +func (m *mockOpampClient) AgentDescription() *protobufs.AgentDescription { + return nil +} + +func (m *mockOpampClient) SetHealth(health *protobufs.AgentHealth) error { + return nil +} + +func (m *mockOpampClient) UpdateEffectiveConfig(ctx context.Context) error { + effectiveConfig, err := m.settings.Callbacks.GetEffectiveConfig(ctx) + if err != nil { + return err + } + m.lastEffectiveConfig = effectiveConfig + return nil +} + +func (m *mockOpampClient) SetRemoteConfigStatus(status *protobufs.RemoteConfigStatus) error { + m.lastStatus = status + return nil +} + +func (m *mockOpampClient) SetPackageStatuses(statuses *protobufs.PackageStatuses) error { + return nil +} + +func getFakeApplier(t *testing.T, conf config.Config) *operator.Client { + schemeBuilder := runtime.NewSchemeBuilder(func(s *runtime.Scheme) error { + s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) + metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) + return nil + }) + scheme := runtime.NewScheme() + err := schemeBuilder.AddToScheme(scheme) + require.NoError(t, err, "Should be able to add custom types") + c := fake.NewClientBuilder().WithScheme(scheme) + return operator.NewClient(l, c.Build(), conf.GetComponentsAllowed()) +} + +func TestAgent_onMessage(t *testing.T) { + type fields struct { + configFile string + } + type args struct { + ctx context.Context + // Mapping from name/namespace to a config in testdata + configFile map[string]string + // Mapping from name/namespace to a config in testdata (for testing updates) + nextConfigFile map[string]string + } + type want struct { + // Mapping from name/namespace to a list of expected contents + contents map[string][]string + // Mapping from name/namespace to a list of updated expected contents + nextContents map[string][]string + // The status after the initial config loading + status *protobufs.RemoteConfigStatus + // The status after the updated config loading + nextStatus *protobufs.RemoteConfigStatus + } + tests := []struct { + name string + fields fields + args args + want want + }{ + { + name: "no data", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: nil, + }, + want: want{ + contents: map[string][]string{}, + status: nil, + }, + }, + { + name: "base case", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "receivers: [otlp]", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, + { + name: "failure", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "bad/testnamespace": "invalid.yaml", + }, + }, + want: want{ + contents: nil, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("bad/testnamespace408"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, + ErrorMessage: "yaml: line 16: could not find expected ':'", + }, + }, + }, + { + name: "all components are allowed", + fields: fields{ + configFile: "testdata/agentbasiccomponentsallowed.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "receivers: [otlp]", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, + { + name: "batch not allowed", + fields: fields{ + configFile: "testdata/agentbatchnotallowed.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + }, + want: want{ + contents: nil, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, + ErrorMessage: "Items in config are not allowed: [processors.batch]", + }, + }, + }, + { + name: "processors not allowed", + fields: fields{ + configFile: "testdata/agentnoprocessorsallowed.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + }, + want: want{ + contents: nil, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, + ErrorMessage: "Items in config are not allowed: [processors]", + }, + }, + }, + { + name: "can update config and replicas", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + nextConfigFile: map[string]string{ + "good/testnamespace": "updated.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "replicas: 1", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + nextContents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: [memory_limiter, batch]", + "replicas: 3", + "status:", + }, + }, + nextStatus: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace439"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, + { + name: "cannot update with bad config", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + nextConfigFile: map[string]string{ + "good/testnamespace": "invalid.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "replicas: 1", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + nextContents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "replicas: 1", + "status:", + }, + }, + nextStatus: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace408"), // The new hash should be of the bad config + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, + ErrorMessage: "yaml: line 16: could not find expected ':'", + }, + }, + }, + { + name: "update with new collector", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + nextConfigFile: map[string]string{ + "good/testnamespace": "basic.yaml", + "other/testnamespace": "updated.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + nextContents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "status:", + }, + "other/testnamespace": { + "kind: OpenTelemetryCollector", + "name: other", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: [memory_limiter, batch]", + "status:", + }, + }, + nextStatus: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405other/testnamespace439"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, + { + name: "can delete existing collector", + fields: fields{ + configFile: "testdata/agent.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + nextConfigFile: map[string]string{}, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "processors: []", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + nextContents: map[string][]string{}, + nextStatus: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte(""), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + mockClient := &mockOpampClient{} + conf, err := config.Load(tt.fields.configFile) + require.NoError(t, err, "should be able to load config") + applier := getFakeApplier(t, conf) + agent := NewAgent(clientLogger, applier, conf, mockClient) + err = agent.Start() + defer agent.Shutdown() + require.NoError(t, err, "should be able to start agent") + data, err := getMessageDataFromConfigFile(tt.args.configFile) + require.NoError(t, err, "should be able to load data") + agent.onMessage(tt.args.ctx, data) + effectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) + require.NoError(t, err, "should be able to get effective config") + if tt.args.configFile != nil { + // We should only expect this to happen if we supply configuration + assert.Equal(t, effectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") + } + assert.NotNilf(t, effectiveConfig.ConfigMap.GetConfigMap(), "configmap should have data") + for colNameNamespace, expectedContents := range tt.want.contents { + assert.Contains(t, effectiveConfig.ConfigMap.GetConfigMap(), colNameNamespace) + for _, content := range expectedContents { + asString := string(effectiveConfig.ConfigMap.GetConfigMap()[colNameNamespace].GetBody()) + assert.Contains(t, asString, content) + } + } + assert.Equal(t, tt.want.status, mockClient.lastStatus) + if tt.args.nextConfigFile == nil { + // Nothing left to do! + return + } + nextData, err := getMessageDataFromConfigFile(tt.args.nextConfigFile) + require.NoError(t, err, "should be able to load updated data") + agent.onMessage(tt.args.ctx, nextData) + nextEffectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) + require.NoError(t, err, "should be able to get updated effective config") + assert.Equal(t, nextEffectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") + assert.NotNilf(t, nextEffectiveConfig.ConfigMap.GetConfigMap(), "configmap should have updated data") + for colNameNamespace, expectedContents := range tt.want.nextContents { + assert.Contains(t, nextEffectiveConfig.ConfigMap.GetConfigMap(), colNameNamespace) + for _, content := range expectedContents { + asString := string(nextEffectiveConfig.ConfigMap.GetConfigMap()[colNameNamespace].GetBody()) + assert.Contains(t, asString, content) + } + } + assert.Equal(t, tt.want.nextStatus, mockClient.lastStatus) + }) + } +} + +func Test_CanUpdateIdentity(t *testing.T) { + mockClient := &mockOpampClient{} + conf, err := config.Load("testdata/agent.yaml") + require.NoError(t, err, "should be able to load config") + applier := getFakeApplier(t, conf) + agent := NewAgent(clientLogger, applier, conf, mockClient) + err = agent.Start() + defer agent.Shutdown() + require.NoError(t, err, "should be able to start agent") + previousInstanceId := agent.instanceId.String() + entropy := ulid.Monotonic(rand.Reader, 0) + newId := ulid.MustNew(ulid.MaxTime(), entropy) + agent.onMessage(context.Background(), &types.MessageData{ + AgentIdentification: &protobufs.AgentIdentification{ + NewInstanceUid: newId.String(), + }, + }) + assert.NotEqual(t, previousInstanceId, newId.String()) + assert.Equal(t, agent.instanceId, newId) +} + +func getMessageDataFromConfigFile(filemap map[string]string) (*types.MessageData, error) { + toReturn := &types.MessageData{} + if filemap == nil { + return toReturn, nil + } + configs := map[string]*protobufs.AgentConfigFile{} + hash := "" + fileNames := make([]string, len(filemap)) + i := 0 + for k := range filemap { + fileNames[i] = k + i++ + } + // We sort the filenames so we get consistent results for multiple file loads + sort.Strings(fileNames) + + for _, key := range fileNames { + yamlFile, err := os.ReadFile(fmt.Sprintf("testdata/%s", filemap[key])) + if err != nil { + return toReturn, err + } + configs[key] = &protobufs.AgentConfigFile{ + Body: yamlFile, + ContentType: "yaml", + } + hash = hash + key + fmt.Sprint(len(yamlFile)) + } + toReturn.RemoteConfig = &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: configs, + }, + // just use the file name for the hash + ConfigHash: []byte(hash), + } + return toReturn, nil +} diff --git a/cmd/operator-opamp-bridge/agent/collector_key.go b/cmd/operator-opamp-bridge/agent/collector_key.go new file mode 100644 index 000000000..f1353d347 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/collector_key.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package agent + +import ( + "errors" + "fmt" + "strings" +) + +type collectorKey struct { + name string + namespace string +} + +func newCollectorKey(name string, namespace string) collectorKey { + return collectorKey{name: name, namespace: namespace} +} + +func collectorKeyFromKey(key string) (collectorKey, error) { + s := strings.Split(key, "/") + // We expect map keys to be of the form name/namespace + if len(s) != 2 { + return collectorKey{}, errors.New("invalid key") + } + return newCollectorKey(s[0], s[1]), nil +} + +func (k collectorKey) String() string { + return fmt.Sprintf("%s/%s", k.name, k.namespace) +} diff --git a/cmd/operator-opamp-bridge/agent/collector_key_test.go b/cmd/operator-opamp-bridge/agent/collector_key_test.go new file mode 100644 index 000000000..b0b254648 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/collector_key_test.go @@ -0,0 +1,98 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package agent + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_collectorKeyFromKey(t *testing.T) { + type args struct { + key string + } + tests := []struct { + name string + args args + want collectorKey + wantErr assert.ErrorAssertionFunc + }{ + { + name: "base case", + args: args{ + key: "good/namespace", + }, + want: collectorKey{ + name: "good", + namespace: "namespace", + }, + wantErr: assert.NoError, + }, + { + name: "unable to get key", + args: args{ + key: "badnamespace", + }, + want: collectorKey{}, + wantErr: assert.Error, + }, + { + name: "too many slashes", + args: args{ + key: "too/many/slashes", + }, + want: collectorKey{}, + wantErr: assert.Error, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := collectorKeyFromKey(tt.args.key) + if !tt.wantErr(t, err, fmt.Sprintf("collectorKeyFromKey(%v)", tt.args.key)) { + return + } + assert.Equalf(t, tt.want, got, "collectorKeyFromKey(%v)", tt.args.key) + }) + } +} + +func Test_collectorKey_String(t *testing.T) { + type fields struct { + name string + namespace string + } + tests := []struct { + name string + fields fields + want string + }{ + { + name: "can make a key", + fields: fields{ + name: "good", + namespace: "namespace", + }, + want: "good/namespace", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + k := newCollectorKey(tt.fields.name, tt.fields.namespace) + assert.Equalf(t, tt.want, k.String(), "String()") + }) + } +} diff --git a/cmd/operator-opamp-bridge/agent/testdata/agent.yaml b/cmd/operator-opamp-bridge/agent/testdata/agent.yaml new file mode 100644 index 000000000..b03015cef --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/agent.yaml @@ -0,0 +1,15 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +protocol: wss +capabilities: + - AcceptsRemoteConfig + - ReportsEffectiveConfig + # - AcceptsPackages + # - ReportsPackageStatuses + - ReportsOwnTraces + - ReportsOwnMetrics + - ReportsOwnLogs + - AcceptsOpAMPConnectionSettings + - AcceptsOtherConnectionSettings + - AcceptsRestartCommand + - ReportsHealth + - ReportsRemoteConfig diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml new file mode 100644 index 000000000..b98d517b1 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml @@ -0,0 +1,23 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +protocol: wss +capabilities: + - AcceptsRemoteConfig + - ReportsEffectiveConfig + # - AcceptsPackages + # - ReportsPackageStatuses + - ReportsOwnTraces + - ReportsOwnMetrics + - ReportsOwnLogs + - AcceptsOpAMPConnectionSettings + - AcceptsOtherConnectionSettings + - AcceptsRestartCommand + - ReportsHealth + - ReportsRemoteConfig +components_allowed: + receivers: + - otlp + processors: + - memory_limiter + - batch + exporters: + - logging diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml new file mode 100644 index 000000000..2369aa80b --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml @@ -0,0 +1,22 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +protocol: wss +capabilities: + - AcceptsRemoteConfig + - ReportsEffectiveConfig + # - AcceptsPackages + # - ReportsPackageStatuses + - ReportsOwnTraces + - ReportsOwnMetrics + - ReportsOwnLogs + - AcceptsOpAMPConnectionSettings + - AcceptsOtherConnectionSettings + - AcceptsRestartCommand + - ReportsHealth + - ReportsRemoteConfig +components_allowed: + receivers: + - otlp + processors: + - memory_limiter + exporters: + - logging diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml new file mode 100644 index 000000000..625f6b11e --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml @@ -0,0 +1,20 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +protocol: wss +capabilities: + - AcceptsRemoteConfig + - ReportsEffectiveConfig + # - AcceptsPackages + # - ReportsPackageStatuses + - ReportsOwnTraces + - ReportsOwnMetrics + - ReportsOwnLogs + - AcceptsOpAMPConnectionSettings + - AcceptsOtherConnectionSettings + - AcceptsRestartCommand + - ReportsHealth + - ReportsRemoteConfig +components_allowed: + receivers: + - otlp + exporters: + - logging diff --git a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml new file mode 100644 index 000000000..1e808b198 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml @@ -0,0 +1,24 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml new file mode 100644 index 000000000..3d8c6c93e --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml @@ -0,0 +1,24 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + +GARBAGE + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml new file mode 100644 index 000000000..12eee6c3a --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml @@ -0,0 +1,25 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [logging] +replicas: 3 diff --git a/cmd/operator-opamp-bridge/config/cli.go b/cmd/operator-opamp-bridge/config/cli.go new file mode 100644 index 000000000..06a782a0c --- /dev/null +++ b/cmd/operator-opamp-bridge/config/cli.go @@ -0,0 +1,101 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "errors" + "flag" + "io/fs" + "path/filepath" + + "github.com/go-logr/logr" + "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var ( + schemeBuilder = runtime.NewSchemeBuilder(registerKnownTypes) +) + +func registerKnownTypes(s *runtime.Scheme) error { + s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) + metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) + return nil +} + +type CLIConfig struct { + ListenAddr *string + ConfigFilePath *string + + ClusterConfig *rest.Config + // KubeConfigFilePath empty if in cluster configuration is in use + KubeConfigFilePath string + RootLogger logr.Logger +} + +func GetLogger() logr.Logger { + opts := zap.Options{} + opts.BindFlags(flag.CommandLine) + + return zap.New(zap.UseFlagOptions(&opts)) +} + +func ParseCLI(logger logr.Logger) (CLIConfig, error) { + cLIConf := CLIConfig{ + RootLogger: logger, + ListenAddr: pflag.String("listen-addr", ":8080", "The address where this service serves."), + ConfigFilePath: pflag.String("config-file", defaultConfigFilePath, "The path to the config file."), + } + kubeconfigPath := pflag.String("kubeconfig-path", filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + pflag.Parse() + + klog.SetLogger(logger) + + clusterConfig, err := clientcmd.BuildConfigFromFlags("", *kubeconfigPath) + cLIConf.KubeConfigFilePath = *kubeconfigPath + if err != nil { + pathError := &fs.PathError{} + if ok := errors.As(err, &pathError); !ok { + return CLIConfig{}, err + } + clusterConfig, err = rest.InClusterConfig() + if err != nil { + return CLIConfig{}, err + } + cLIConf.KubeConfigFilePath = "" // reset as we use in cluster configuration + } + cLIConf.ClusterConfig = clusterConfig + return cLIConf, nil +} + +func (cli CLIConfig) GetKubernetesClient() (client.Client, error) { + err := schemeBuilder.AddToScheme(scheme.Scheme) + if err != nil { + return nil, err + } + return client.New(cli.ClusterConfig, client.Options{ + Scheme: scheme.Scheme, + }) +} diff --git a/cmd/operator-opamp-bridge/config/config.go b/cmd/operator-opamp-bridge/config/config.go new file mode 100644 index 000000000..706ff09e0 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/config.go @@ -0,0 +1,142 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "crypto/rand" + "fmt" + "os" + "runtime" + "time" + + "github.com/oklog/ulid/v2" + "github.com/open-telemetry/opamp-go/client" + "github.com/open-telemetry/opamp-go/protobufs" + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" +) + +const ( + agentType = "io.opentelemetry.operator-opamp-bridge" + defaultConfigFilePath = "/conf/remoteconfiguration.yaml" +) + +var ( + agentVersion = os.Getenv("OPAMP_VERSION") + hostname, _ = os.Hostname() +) + +type Config struct { + Endpoint string `yaml:"endpoint"` + Protocol string `yaml:"protocol"` + Capabilities []string `yaml:"capabilities"` + + // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) + ComponentsAllowed map[string][]string `yaml:"components_allowed,omitempty"` +} + +func (c *Config) CreateClient(logger *logger.Logger) client.OpAMPClient { + if c.Protocol == "http" { + return client.NewHTTP(logger) + } + return client.NewWebSocket(logger) +} + +func (c *Config) GetComponentsAllowed() map[string]map[string]bool { + m := make(map[string]map[string]bool) + for component, componentSet := range c.ComponentsAllowed { + if _, ok := m[component]; !ok { + m[component] = make(map[string]bool) + } + for _, s := range componentSet { + m[component][s] = true + } + } + return m +} + +func (c *Config) GetCapabilities() protobufs.AgentCapabilities { + var capabilities int32 + for _, capability := range c.Capabilities { + // This is a helper so that we don't force consumers to prefix every agent capability + formatted := fmt.Sprintf("AgentCapabilities_%s", capability) + if v, ok := protobufs.AgentCapabilities_value[formatted]; ok { + capabilities = v | capabilities + } + } + return protobufs.AgentCapabilities(capabilities) +} + +func (c *Config) GetAgentType() string { + return agentType +} + +func (c *Config) GetAgentVersion() string { + return agentVersion +} + +func (c *Config) GetDescription() *protobufs.AgentDescription { + return &protobufs.AgentDescription{ + IdentifyingAttributes: []*protobufs.KeyValue{ + keyValuePair("service.name", c.GetAgentType()), + keyValuePair("service.version", c.GetAgentVersion()), + }, + NonIdentifyingAttributes: []*protobufs.KeyValue{ + keyValuePair("os.family", runtime.GOOS), + keyValuePair("host.name", hostname), + }, + } +} + +func keyValuePair(key string, value string) *protobufs.KeyValue { + return &protobufs.KeyValue{ + Key: key, + Value: &protobufs.AnyValue{ + Value: &protobufs.AnyValue_StringValue{ + StringValue: value, + }, + }, + } +} + +func (c *Config) GetNewInstanceId() ulid.ULID { + entropy := ulid.Monotonic(rand.Reader, 0) + return ulid.MustNew(ulid.Timestamp(time.Now()), entropy) +} + +func (c *Config) RemoteConfigEnabled() bool { + capabilities := c.GetCapabilities() + return capabilities&protobufs.AgentCapabilities_AgentCapabilities_AcceptsRemoteConfig != 0 +} + +func Load(file string) (Config, error) { + var cfg Config + if err := unmarshal(&cfg, file); err != nil { + return Config{}, err + } + return cfg, nil +} + +func unmarshal(cfg *Config, configFile string) error { + yamlFile, err := os.ReadFile(configFile) + if err != nil { + return err + } + if err = yaml.UnmarshalStrict(yamlFile, cfg); err != nil { + return fmt.Errorf("error unmarshaling YAML: %w", err) + } + return nil +} diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod new file mode 100644 index 000000000..0b4927c83 --- /dev/null +++ b/cmd/operator-opamp-bridge/go.mod @@ -0,0 +1,94 @@ +module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge + +go 1.19 + +require ( + github.com/go-logr/logr v1.2.3 + github.com/oklog/ulid/v2 v2.0.2 + github.com/open-telemetry/opamp-go v0.5.0 + github.com/open-telemetry/opentelemetry-operator v1.51.0 + github.com/shirou/gopsutil v3.21.11+incompatible + github.com/spf13/pflag v1.0.5 + github.com/stretchr/testify v1.8.1 + go.opentelemetry.io/otel v1.11.2 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 + go.opentelemetry.io/otel/metric v0.34.0 + go.opentelemetry.io/otel/sdk v1.11.2 + go.opentelemetry.io/otel/sdk/metric v0.34.0 + go.uber.org/multierr v1.6.0 + gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.1 + k8s.io/apimachinery v0.26.0 + k8s.io/client-go v0.26.0 + k8s.io/klog/v2 v2.80.1 + sigs.k8s.io/controller-runtime v0.14.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.19.14 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/google/uuid v1.1.2 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.6 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect + github.com/tklauser/go-sysconf v0.3.11 // indirect + github.com/tklauser/numcpus v0.6.0 // indirect + github.com/yusufpapurcu/wmi v1.2.2 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.uber.org/atomic v1.8.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + golang.org/x/time v0.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect + google.golang.org/grpc v1.51.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + k8s.io/api v0.26.0 // indirect + k8s.io/apiextensions-apiserver v0.26.0 // indirect + k8s.io/component-base v0.26.0 // indirect + k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect + k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum new file mode 100644 index 000000000..bdd771b44 --- /dev/null +++ b/cmd/operator-opamp-bridge/go.sum @@ -0,0 +1,707 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= +github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/open-telemetry/opamp-go v0.5.0 h1:2YFbb6G4qBkq3yTRdVb5Nfz9hKHW/ldUyex352e1J7g= +github.com/open-telemetry/opamp-go v0.5.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= +github.com/open-telemetry/opentelemetry-operator v1.51.0 h1:mf6E24jBnv0JvxUH2nOujiqShwA7kJcCFbhd2vdMyQQ= +github.com/open-telemetry/opentelemetry-operator v1.51.0/go.mod h1:2oXRmTlK6/4gc+ipK94KKHEEf6h3PWh2NiG3doAQnwo= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= +github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 h1:kpskzLZ60cJ48SJ4uxWa6waBL+4kSV6nVK8rP+QM8Wg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0/go.mod h1:4+x3i62TEegDHuzNva0bMcAN8oUi5w4liGb1d/VgPYo= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 h1:t4Ajxj8JGjxkqoBtbkCOY2cDUl9RwiNE9LPQavooi9U= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0/go.mod h1:WO7omosl4P7JoanH9NgInxDxEn2F2M5YinIh8EyeT8w= +go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= +go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= +go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU= +go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU= +go.opentelemetry.io/otel/sdk/metric v0.34.0 h1:7ElxfQpXCFZlRTvVRTkcUvK8Gt5DC8QzmzsLsO2gdzo= +go.opentelemetry.io/otel/sdk/metric v0.34.0/go.mod h1:l4r16BIqiqPy5rd14kkxllPy/fOI4tWo1jkpD9Z3ffQ= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= +go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= +golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I= +k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg= +k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= +k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= +k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg= +k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= +k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= +k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= +k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/controller-runtime v0.14.0 h1:ju2xsov5Ara6FoQuddg+az+rAxsUsTYn2IYyEKCTyDc= +sigs.k8s.io/controller-runtime v0.14.0/go.mod h1:GaRkrY8a7UZF0kqFFbUKG7n9ICiTY5T55P1RiE3UZlU= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cmd/operator-opamp-bridge/header.txt b/cmd/operator-opamp-bridge/header.txt new file mode 100644 index 000000000..3881885f3 --- /dev/null +++ b/cmd/operator-opamp-bridge/header.txt @@ -0,0 +1,13 @@ +Copyright The OpenTelemetry Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/logger/logger.go b/cmd/operator-opamp-bridge/logger/logger.go new file mode 100644 index 000000000..e973c7f5b --- /dev/null +++ b/cmd/operator-opamp-bridge/logger/logger.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package logger + +import ( + "fmt" + + "github.com/go-logr/logr" + "github.com/open-telemetry/opamp-go/client/types" +) + +var _ types.Logger = &Logger{} + +type Logger struct { + Logger *logr.Logger +} + +func NewLogger(logger *logr.Logger) *Logger { + return &Logger{Logger: logger} +} + +func (l *Logger) Debugf(format string, v ...interface{}) { + l.Logger.V(4).Info(fmt.Sprintf(format, v...)) +} + +func (l *Logger) Errorf(format string, v ...interface{}) { + l.Logger.V(0).Error(nil, fmt.Sprintf(format, v...)) +} diff --git a/cmd/operator-opamp-bridge/main.go b/cmd/operator-opamp-bridge/main.go new file mode 100644 index 000000000..abbd4d824 --- /dev/null +++ b/cmd/operator-opamp-bridge/main.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "os" + "os/signal" + + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/agent" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" +) + +func main() { + l := config.GetLogger() + cliConf, err := config.ParseCLI(l.WithName("cli-config")) + if err != nil { + l.Error(err, "unable to load ") + os.Exit(1) + } + cfg, configLoadErr := config.Load(*cliConf.ConfigFilePath) + if configLoadErr != nil { + l.Error(configLoadErr, "Unable to load configuration") + return + } + l.Info("Starting the Remote Configuration service") + agentLogf := l.WithName("agent") + agentLogger := logger.NewLogger(&agentLogf) + + kubeClient, kubeErr := cliConf.GetKubernetesClient() + if kubeErr != nil { + l.Error(kubeErr, "Couldn't create kubernetes client") + os.Exit(1) + } + operatorClient := operator.NewClient(l.WithName("operator-client"), kubeClient, cfg.GetComponentsAllowed()) + + opampClient := cfg.CreateClient(agentLogger) + opampAgent := agent.NewAgent(agentLogger, operatorClient, cfg, opampClient) + + if err := opampAgent.Start(); err != nil { + l.Error(err, "Cannot start OpAMP client") + os.Exit(1) + } + + interrupt := make(chan os.Signal, 1) + signal.Notify(interrupt, os.Interrupt) + <-interrupt + opampAgent.Shutdown() +} diff --git a/cmd/operator-opamp-bridge/metrics/reporter.go b/cmd/operator-opamp-bridge/metrics/reporter.go new file mode 100644 index 000000000..08dd8a5ef --- /dev/null +++ b/cmd/operator-opamp-bridge/metrics/reporter.go @@ -0,0 +1,180 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package metrics + +import ( + "context" + "fmt" + "net/url" + "os" + "time" + + "github.com/oklog/ulid/v2" + "github.com/shirou/gopsutil/process" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/metric/instrument" + "go.opentelemetry.io/otel/metric/instrument/asyncfloat64" + "go.opentelemetry.io/otel/metric/instrument/asyncint64" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + otelresource "go.opentelemetry.io/otel/sdk/resource" + semconv "go.opentelemetry.io/otel/semconv/v1.4.0" + + "github.com/open-telemetry/opamp-go/client/types" + "github.com/open-telemetry/opamp-go/protobufs" +) + +// MetricReporter is a metric reporter that collects Agent metrics and sends them to an +// OTLP/HTTP destination. +type MetricReporter struct { + logger types.Logger + + meter metric.Meter + meterShutdowner func() + done chan struct{} + + // The Agent's process. + process *process.Process + + // Some example metrics to report. + processMemoryPhysical asyncint64.Gauge + processCpuTime asyncfloat64.Counter +} + +// NewMetricReporter creates an OTLP/HTTP client to the destination address supplied by the server. +// TODO: do more validation on the endpoint, allow for gRPC. +// TODO: set global provider and add more metrics to be reported. +func NewMetricReporter( + logger types.Logger, + dest *protobufs.TelemetryConnectionSettings, + agentType string, + agentVersion string, + instanceId ulid.ULID, +) (*MetricReporter, error) { + + if dest.DestinationEndpoint == "" { + return nil, fmt.Errorf("metric destination must specify DestinationEndpoint") + } + + u, err := url.Parse(dest.DestinationEndpoint) + if err != nil { + return nil, fmt.Errorf("invalid DestinationEndpoint: %w", err) + } + + // Create OTLP/HTTP metric exporter. + opts := []otlpmetrichttp.Option{ + otlpmetrichttp.WithEndpoint(u.Host), + otlpmetrichttp.WithURLPath(u.Path), + } + + headers := map[string]string{} + for _, header := range dest.Headers.GetHeaders() { + headers[header.GetKey()] = header.GetValue() + } + opts = append(opts, otlpmetrichttp.WithHeaders(headers)) + + client, err := otlpmetrichttp.New(context.Background(), opts...) + if err != nil { + return nil, fmt.Errorf("failed to initialize otlp metric http client: %w", err) + } + + // Define the Resource to be exported with all metrics. Use OpenTelemetry semantic + // conventions as the OpAMP spec requires: + // https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#own-telemetry-reporting + resource, resourceErr := otelresource.New(context.Background(), + otelresource.WithAttributes( + semconv.ServiceNameKey.String(agentType), + semconv.ServiceVersionKey.String(agentVersion), + semconv.ServiceInstanceIDKey.String(instanceId.String()), + ), + ) + if resourceErr != nil { + return nil, resourceErr + } + + provider := sdkmetric.NewMeterProvider( + sdkmetric.WithResource(resource), + sdkmetric.WithReader(sdkmetric.NewPeriodicReader(client, sdkmetric.WithInterval(5*time.Second)))) + + reporter := &MetricReporter{ + logger: logger, + } + + reporter.done = make(chan struct{}) + + reporter.meter = provider.Meter("opamp") + + reporter.process, err = process.NewProcess(int32(os.Getpid())) + if err != nil { + return nil, fmt.Errorf("cannot query own process: %w", err) + } + + // Create some metrics that will be reported according to OpenTelemetry semantic + // conventions for process metrics (conventions are TBD for now). + reporter.processCpuTime, err = reporter.meter.AsyncFloat64().Counter( + "process.cpu.time", + ) + if err != nil { + return nil, fmt.Errorf("can't create process time metric: %w", err) + } + err = reporter.meter.RegisterCallback([]instrument.Asynchronous{reporter.processCpuTime}, reporter.processCpuTimeFunc) + if err != nil { + return nil, fmt.Errorf("can't create register callback: %w", err) + } + reporter.processMemoryPhysical, err = reporter.meter.AsyncInt64().Gauge( + "process.memory.physical_usage", + ) + if err != nil { + return nil, fmt.Errorf("can't create memory metric: %w", err) + } + err = reporter.meter.RegisterCallback([]instrument.Asynchronous{reporter.processMemoryPhysical}, reporter.processMemoryPhysicalFunc) + if err != nil { + return nil, fmt.Errorf("can't register callback: %w", err) + } + + reporter.meterShutdowner = func() { _ = provider.Shutdown(context.Background()) } + + return reporter, nil +} + +func (reporter *MetricReporter) processCpuTimeFunc(c context.Context) { + times, err := reporter.process.Times() + if err != nil { + reporter.logger.Errorf("Cannot get process CPU times: %w", err) + } + reporter.processCpuTime.Observe(c, times.User, attribute.String("state", "user")) + reporter.processCpuTime.Observe(c, times.System, attribute.String("state", "system")) + reporter.processCpuTime.Observe(c, times.Iowait, attribute.String("state", "wait")) +} + +func (reporter *MetricReporter) processMemoryPhysicalFunc(ctx context.Context) { + memory, err := reporter.process.MemoryInfo() + if err != nil { + reporter.logger.Errorf("Cannot get process memory information: %w", err) + return + } + reporter.processMemoryPhysical.Observe(ctx, int64(memory.RSS)) +} + +func (reporter *MetricReporter) Shutdown() { + if reporter.done != nil { + close(reporter.done) + } + + if reporter.meterShutdowner != nil { + reporter.meterShutdowner() + } +} diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go new file mode 100644 index 000000000..b83b476fb --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/client.go @@ -0,0 +1,200 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package operator + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + "github.com/open-telemetry/opamp-go/protobufs" + "gopkg.in/yaml.v3" + "k8s.io/apimachinery/pkg/api/errors" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + CollectorResource = "OpenTelemetryCollector" + ResourceIdentifierKey = "created-by" + ResourceIdentifierValue = "operator-opamp-bridge" +) + +type ConfigApplier interface { + // Apply receives a name and namespace to apply an OpenTelemetryCollector CRD that is contained in the configmap. + Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error + + // GetInstance retrieves an OpenTelemetryCollector CRD given a name and namespace. + GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error) + + // ListInstances retrieves all OpenTelemetryCollector CRDs created by the operator-opamp-bridge agent. + ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) + + // Delete attempts to delete an OpenTelemetryCollector object given a name and namespace. + Delete(name string, namespace string) error +} + +type Client struct { + log logr.Logger + componentsAllowed map[string]map[string]bool + k8sClient client.Client + close chan bool +} + +var _ ConfigApplier = &Client{} + +func NewClient(log logr.Logger, c client.Client, componentsAllowed map[string]map[string]bool) *Client { + return &Client{ + log: log, + componentsAllowed: componentsAllowed, + k8sClient: c, + close: make(chan bool, 1), + } +} + +func (c Client) create(ctx context.Context, name string, namespace string, collector *v1alpha1.OpenTelemetryCollector) error { + // Set the defaults + collector.Default() + collector.TypeMeta.Kind = CollectorResource + collector.TypeMeta.APIVersion = v1alpha1.GroupVersion.String() + collector.ObjectMeta.Name = name + collector.ObjectMeta.Namespace = namespace + + if collector.ObjectMeta.Labels == nil { + collector.ObjectMeta.Labels = map[string]string{} + } + collector.ObjectMeta.Labels[ResourceIdentifierKey] = ResourceIdentifierValue + err := collector.ValidateCreate() + if err != nil { + return err + } + c.log.Info("Creating collector") + return c.k8sClient.Create(ctx, collector) +} + +func (c Client) update(ctx context.Context, old *v1alpha1.OpenTelemetryCollector, new *v1alpha1.OpenTelemetryCollector) error { + new.ObjectMeta = old.ObjectMeta + new.TypeMeta = old.TypeMeta + err := new.ValidateUpdate(old) + if err != nil { + return err + } + c.log.Info("Updating collector") + return c.k8sClient.Update(ctx, new) +} + +func (c Client) Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error { + c.log.Info("Received new config", "name", name, "namespace", namespace) + var collectorSpec v1alpha1.OpenTelemetryCollectorSpec + err := yaml.Unmarshal(configmap.Body, &collectorSpec) + if err != nil { + return err + } + if len(collectorSpec.Config) == 0 { + return errors.NewBadRequest("Must supply valid configuration") + } + reasons, validateErr := c.validate(collectorSpec) + if validateErr != nil { + return validateErr + } + if len(reasons) > 0 { + return errors.NewBadRequest(fmt.Sprintf("Items in config are not allowed: %v", reasons)) + } + collector := &v1alpha1.OpenTelemetryCollector{Spec: collectorSpec} + ctx := context.Background() + instance, err := c.GetInstance(name, namespace) + if err != nil { + return err + } + if instance != nil { + return c.update(ctx, instance, collector) + } + return c.create(ctx, name, namespace, collector) +} + +func (c Client) Delete(name string, namespace string) error { + ctx := context.Background() + result := v1alpha1.OpenTelemetryCollector{} + err := c.k8sClient.Get(ctx, client.ObjectKey{ + Namespace: namespace, + Name: name, + }, &result) + if err != nil { + if errors.IsNotFound(err) { + return nil + } + return err + } + return c.k8sClient.Delete(ctx, &result) +} + +func (c Client) ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) { + ctx := context.Background() + result := v1alpha1.OpenTelemetryCollectorList{} + err := c.k8sClient.List(ctx, &result, client.MatchingLabels{ + ResourceIdentifierKey: ResourceIdentifierValue, + }) + if err != nil { + return nil, err + } + return result.Items, nil +} + +func (c Client) GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error) { + ctx := context.Background() + result := v1alpha1.OpenTelemetryCollector{} + err := c.k8sClient.Get(ctx, client.ObjectKey{ + Namespace: namespace, + Name: name, + }, &result) + if err != nil { + if errors.IsNotFound(err) { + return nil, nil + } + return nil, err + } + return &result, nil +} + +func (c Client) validate(spec v1alpha1.OpenTelemetryCollectorSpec) ([]string, error) { + // Do not use this feature if it's not specified + if c.componentsAllowed == nil || len(c.componentsAllowed) == 0 { + return nil, nil + } + collectorConfig := make(map[string]map[string]interface{}) + err := yaml.Unmarshal([]byte(spec.Config), &collectorConfig) + if err != nil { + return nil, err + } + var invalidComponents []string + for component, componentMap := range collectorConfig { + if component == "service" { + // We don't care about what's in the service pipelines. + // Only components declared in the configuration can be used in the service pipeline. + continue + } + if _, ok := c.componentsAllowed[component]; !ok { + invalidComponents = append(invalidComponents, component) + continue + } + for componentName := range componentMap { + if _, ok := c.componentsAllowed[component][componentName]; !ok { + invalidComponents = append(invalidComponents, fmt.Sprintf("%s.%s", component, componentName)) + } + } + } + return invalidComponents, nil +} diff --git a/cmd/operator-opamp-bridge/operator/client_test.go b/cmd/operator-opamp-bridge/operator/client_test.go new file mode 100644 index 000000000..9d4284b90 --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/client_test.go @@ -0,0 +1,196 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package operator + +import ( + "os" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opamp-go/protobufs" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var ( + clientLogger = logf.Log.WithName("client-tests") +) + +func getFakeClient(t *testing.T) client.WithWatch { + schemeBuilder := runtime.NewSchemeBuilder(func(s *runtime.Scheme) error { + s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) + metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) + return nil + }) + scheme := runtime.NewScheme() + err := schemeBuilder.AddToScheme(scheme) + require.NoError(t, err, "Should be able to add custom types") + c := fake.NewClientBuilder().WithScheme(scheme) + return c.Build() +} + +func TestClient_Apply(t *testing.T) { + type args struct { + name string + namespace string + file string + config string + } + tests := []struct { + name string + args args + wantErr bool + }{ + { + name: "base case", + args: args{ + name: "test", + namespace: "opentelemetry", + file: "testdata/collector.yaml", + }, + wantErr: false, + }, + { + name: "invalid config", + args: args{ + name: "test", + namespace: "opentelemetry", + file: "testdata/invalid-collector.yaml", + }, + wantErr: true, + }, + { + name: "empty config", + args: args{ + name: "test", + namespace: "opentelemetry", + config: "", + }, + wantErr: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + fakeClient := getFakeClient(t) + c := NewClient(clientLogger, fakeClient, nil) + var colConfig []byte + var err error + if len(tt.args.file) > 0 { + colConfig, err = loadConfig(tt.args.file) + require.NoError(t, err, "Should be no error on loading test configuration") + } else { + colConfig = []byte(tt.args.config) + } + configmap := &protobufs.AgentConfigFile{ + Body: colConfig, + ContentType: "yaml", + } + if err := c.Apply(tt.args.name, tt.args.namespace, configmap); (err != nil) != tt.wantErr { + t.Errorf("Apply() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func Test_collectorUpdate(t *testing.T) { + name := "test" + namespace := "testing" + fakeClient := getFakeClient(t) + c := NewClient(clientLogger, fakeClient, nil) + colConfig, err := loadConfig("testdata/collector.yaml") + require.NoError(t, err, "Should be no error on loading test configuration") + configmap := &protobufs.AgentConfigFile{ + Body: colConfig, + ContentType: "yaml", + } + // Apply a valid initial configuration + err = c.Apply(name, namespace, configmap) + require.NoError(t, err, "Should apply base config") + + // Get the newly created collector + instance, err := c.GetInstance(name, namespace) + require.NoError(t, err, "Should be able to get the newly created instance") + assert.Contains(t, instance.Spec.Config, "processors: []") + + // Try updating with an invalid one + configmap.Body = []byte("empty, invalid!") + err = c.Apply(name, namespace, configmap) + assert.Error(t, err, "Should be unable to update") + + // Update successfully with a valid configuration + newColConfig, err := loadConfig("testdata/updated-collector.yaml") + require.NoError(t, err, "Should be no error on loading test configuration") + newConfigMap := &protobufs.AgentConfigFile{ + Body: newColConfig, + ContentType: "yaml", + } + err = c.Apply(name, namespace, newConfigMap) + require.NoError(t, err, "Should be able to update collector") + + // Get the updated collector + updatedInstance, err := c.GetInstance(name, namespace) + require.NoError(t, err, "Should be able to get the updated instance") + assert.Contains(t, updatedInstance.Spec.Config, "processors: [memory_limiter, batch]") + + allInstances, err := c.ListInstances() + require.NoError(t, err, "Should be able to list all collectors") + assert.Len(t, allInstances, 1) + assert.Equal(t, allInstances[0], *updatedInstance) +} + +func Test_collectorDelete(t *testing.T) { + name := "test" + namespace := "testing" + fakeClient := getFakeClient(t) + c := NewClient(clientLogger, fakeClient, nil) + colConfig, err := loadConfig("testdata/collector.yaml") + require.NoError(t, err, "Should be no error on loading test configuration") + configmap := &protobufs.AgentConfigFile{ + Body: colConfig, + ContentType: "yaml", + } + // Apply a valid initial configuration + err = c.Apply(name, namespace, configmap) + require.NoError(t, err, "Should apply base config") + + // Get the newly created collector + instance, err := c.GetInstance(name, namespace) + require.NoError(t, err, "Should be able to get the newly created instance") + assert.Contains(t, instance.Spec.Config, "processors: []") + + // Delete it + err = c.Delete(name, namespace) + require.NoError(t, err, "Should be able to delete a collector") + + // Check there's nothing left + allInstances, err := c.ListInstances() + require.NoError(t, err, "Should be able to list all collectors") + assert.Len(t, allInstances, 0) +} + +func loadConfig(file string) ([]byte, error) { + yamlFile, err := os.ReadFile(file) + if err != nil { + return []byte{}, err + } + return yamlFile, nil +} diff --git a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml new file mode 100644 index 000000000..1e808b198 --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml @@ -0,0 +1,24 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml new file mode 100644 index 000000000..bfc325a9b --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml @@ -0,0 +1,24 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s +GARBAGE + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml new file mode 100644 index 000000000..d04399ea0 --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml @@ -0,0 +1,24 @@ +config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [logging] \ No newline at end of file From c5e9a626614fba76fb1ef40aea59729370aa1b6e Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 12 Jan 2023 13:17:00 -0800 Subject: [PATCH 0702/1234] Update the javaagent version to 1.22.0 (#1367) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 3500250a4..57807d6d0 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.21.0 +1.22.0 From 1585725849caa503965deac282798d937703f071 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 11:05:39 +0100 Subject: [PATCH 0703/1234] Bump github.com/docker/distribution in /cmd/otel-allocator (#1349) Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.7.1+incompatible to 2.8.0+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.7.1...v2.8.0) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index ecd00cf11..3c7dca8ae 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -6,7 +6,6 @@ require ( github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.4 - github.com/ghodss/yaml v1.0.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/gorilla/mux v1.8.0 @@ -52,7 +51,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.82.0 // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/distribution v2.8.0+incompatible // indirect github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect @@ -63,6 +62,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index e271cccac..4c8a76211 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -348,8 +348,9 @@ github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/ github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= +github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= From 037b673b51a995452ee7883f8975a217cca0afeb Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Sat, 14 Jan 2023 08:47:26 -0800 Subject: [PATCH 0704/1234] Update the javaagent version to 1.22.1 (#1371) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 57807d6d0..6245beecd 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.22.0 +1.22.1 From 2e2ff442ae66c5c64bf7d292d3c86f8662764b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 19 Jan 2023 14:32:12 -0300 Subject: [PATCH 0705/1234] Add basic TA readme documentation (#1375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling Co-authored-by: Ben B. --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index 217d67810..a04308218 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,75 @@ You can configure the OpenTelemetry SDK for applications which can't currently b instrumentation.opentelemetry.io/inject-sdk: "true" ``` +### Target Allocator + +The OpenTelemetry Operator comes with an optional component, the Target Allocator (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: collector-with-ta +spec: + mode: statefulset + targetAllocator: + enabled: true + config: | + receivers: + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [prometheus] + processors: [] + exporters: [logging] +``` + +Behind the scenes, the OpenTelemetry Operator will convert the Collector’s configuration after the reconciliation into the following: + +```yaml + receivers: + prometheus: + config: + global: + scrape_interval: 1m + scrape_timeout: 10s + evaluation_interval: 1m + scrape_configs: + - job_name: otel-collector + honor_timestamps: true + scrape_interval: 10s + scrape_timeout: 10s + metrics_path: /metrics + scheme: http + follow_redirects: true + http_sd_configs: + - follow_redirects: false + url: http://collector-with-ta-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [prometheus] + processors: [] + exporters: [logging] +``` + +Note how the Operator added a `global` section and a new `http_sd_configs` to the `otel-collector` scrape config, pointing to a Target Allocator instance it provisioned. + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector From 6c8ea9da1a82f806283bcdebabb4851c8c5481a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 10:51:23 +0100 Subject: [PATCH 0706/1234] Bump github.com/containerd/containerd from 1.4.8 to 1.5.16 (#1363) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.4.8 to 1.5.16. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.4.8...v1.5.16) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 +++++++------- go.sum | 18 +++++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 0860325c3..64b98fbcb 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,14 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/go-logr/logr v1.2.3 github.com/mitchellh/mapstructure v1.5.0 + github.com/openshift/api v3.9.0+incompatible github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.25.4 + k8s.io/apiextensions-apiserver v0.25.0 k8s.io/apimachinery v0.25.4 k8s.io/client-go v0.25.4 k8s.io/component-base v0.25.4 @@ -32,7 +34,7 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/Microsoft/go-winio v0.5.2 // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect @@ -40,7 +42,7 @@ require ( github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/containerd v1.4.8 // indirect + github.com/containerd/containerd v1.5.16 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.62.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect @@ -67,7 +69,7 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/google/uuid v1.2.0 // indirect github.com/googleapis/gax-go/v2 v2.1.1 // indirect github.com/gophercloud/gophercloud v0.18.0 // indirect github.com/hashicorp/consul/api v1.8.1 // indirect @@ -88,7 +90,7 @@ require ( github.com/mailru/easyjson v0.7.6 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.42 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -96,8 +98,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect - github.com/openshift/api v3.9.0+incompatible // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.12.2 // indirect @@ -128,7 +129,6 @@ require ( gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.25.0 // indirect k8s.io/klog/v2 v2.70.1 // indirect k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect diff --git a/go.sum b/go.sum index 300155a10..02545db47 100644 --- a/go.sum +++ b/go.sum @@ -112,8 +112,9 @@ github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -207,8 +208,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.8 h1:H0wkS4AbVKTg9vyvBdCBrxoax8AMObKbNz9Fl2N0i4Y= -github.com/containerd/containerd v1.4.8/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.16 h1:WsTS9tV0vQmRxkWAiiaoasHJ20jqVxVA15s93Bs4GIU= +github.com/containerd/containerd v1.5.16/go.mod h1:bVZZA+0blg2Lw6+I4xDml7L3gum0LsFKe3TnFELlSFw= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -541,8 +542,9 @@ github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLe github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -742,8 +744,8 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -820,8 +822,9 @@ github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= @@ -941,6 +944,7 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= From 5eea7bf5d867f9b29a5eadb83f17d163f9f45eed Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 23 Jan 2023 13:20:14 +0100 Subject: [PATCH 0707/1234] Make sure dev image is always overridden (#1381) * Make sure dev image is always overridden Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20b2a3fc4..d98ea5f7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ When deploying the operator into the cluster using `make deploy`, an image in th * `IMG`, to override the entire image specification ```bash -IMG=docker.io/${USER}/opentelemetry-operator:latest make generate bundle container container-push deploy +IMG=docker.io/${USER}/opentelemetry-operator:dev-$(git rev-parse --short HEAD)-$(date +%s) make generate bundle container container-push deploy ``` Your operator will be available in the `opentelemetry-operator-system` namespace. From 8e4b28fdbb8ed30b3a908a54c5e551f55b0ddbb6 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 23 Jan 2023 13:20:36 +0100 Subject: [PATCH 0708/1234] Add nicer logs to the check-operator-ready script (#1382) Signed-off-by: Pavol Loffay Signed-off-by: Pavol Loffay --- hack/check-operator-ready.go | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hack/check-operator-ready.go b/hack/check-operator-ready.go index 7405cc817..57028f327 100644 --- a/hack/check-operator-ready.go +++ b/hack/check-operator-ready.go @@ -58,17 +58,17 @@ func main() { config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) if err != nil { - println("Error reading the kubeconfig:", err.Error()) + fmt.Printf("Error reading the kubeconfig: %s\n", err.Error()) os.Exit(1) } clusterClient, err := client.New(config, client.Options{Scheme: scheme}) if err != nil { - println("Creating the Kubernetes client", err) + fmt.Printf("Creating the Kubernetes client: %s\n", err) os.Exit(1) } - fmt.Println("Waiting until the OTEL Collector Operator is deployed") + fmt.Println("Waiting until the OpenTelemetry Operator deployment is created") operatorDeployment := &appsv1.Deployment{} err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { @@ -81,7 +81,7 @@ func main() { operatorDeployment, ) if err != nil { - fmt.Println(err) + fmt.Printf("Failed to get OpenTelemetry operator deployment: %s\n", err) return false, nil } return true, nil @@ -90,7 +90,7 @@ func main() { if err != nil { fmt.Println(err) } - fmt.Println("OTEL Collector Operator is deployed properly!") + fmt.Println("OpenTelemetry Operator deployment is created. Now checking if it if fully operational.") // Sometimes, the deployment of the OTEL Operator is ready but, when // creating new instances of the OTEL Collector, the webhook is not reachable @@ -106,14 +106,14 @@ func main() { // Ensure the collector is not there before the check _ = clusterClient.Delete(context.Background(), &collectorInstance) - fmt.Println("Ensure the creation of OTEL Collectors is available") + fmt.Println("Check if the OpenTelemetry collector CR can be created.") err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { err = clusterClient.Create( context.Background(), &collectorInstance, ) if err != nil { - fmt.Println(err) + fmt.Printf("failed: to create OpenTelemetry collector CR %s\n", err) return false, nil } return true, nil @@ -124,5 +124,10 @@ func main() { os.Exit(1) } - _ = clusterClient.Delete(context.Background(), &collectorInstance) + if err := clusterClient.Delete(context.Background(), &collectorInstance); err != nil { + fmt.Printf("Failed to delete OpenTelemetry collector CR: %s\n", err) + os.Exit(1) + } + + fmt.Println("OpenTelemetry operator is ready.") } From 3dde81ccf8c24a3a3b2a3539ca2310c2b94bbbd3 Mon Sep 17 00:00:00 2001 From: Sairam Arpavur Natarajan Date: Mon, 23 Jan 2023 11:00:23 -0800 Subject: [PATCH 0709/1234] Update nodesdk and add resource detectors (#1211) * Update NodeSDK to 0.33 and add auto resource detectors * Add more resource detectors * Keep only applicable resource detectors * Update resource detector version --- autoinstrumentation/nodejs/package.json | 5 +++++ .../nodejs/src/autoinstrumentation.ts | 22 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 546a3d200..2e60e5008 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -17,6 +17,11 @@ "@opentelemetry/api": "1.3.0", "@opentelemetry/auto-instrumentations-node": "0.35.0", "@opentelemetry/exporter-trace-otlp-grpc": "0.34.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.3", + "@opentelemetry/resource-detector-aws": "1.2.1", + "@opentelemetry/resource-detector-container": "0.2.1", + "@opentelemetry/resource-detector-gcp": "0.27.4", + "@opentelemetry/resources": "1.9.0", "@opentelemetry/sdk-node": "0.34.0" } } diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts index 3b0d9d225..e2debe15c 100644 --- a/autoinstrumentation/nodejs/src/autoinstrumentation.ts +++ b/autoinstrumentation/nodejs/src/autoinstrumentation.ts @@ -1,5 +1,10 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; +import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'; +import { awsEc2Detector, awsEksDetector } from '@opentelemetry/resource-detector-aws'; +import { containerDetector } from '@opentelemetry/resource-detector-container'; +import { gcpDetector } from '@opentelemetry/resource-detector-gcp'; +import { envDetector, hostDetector, osDetector, processDetector } from '@opentelemetry/resources'; import { NodeSDK } from '@opentelemetry/sdk-node'; @@ -7,6 +12,23 @@ const sdk = new NodeSDK({ autoDetectResources: true, instrumentations: [getNodeAutoInstrumentations()], traceExporter: new OTLPTraceExporter(), + resourceDetectors: + [ + // Standard resource detectors. + containerDetector, + envDetector, + hostDetector, + osDetector, + processDetector, + + // Cloud resource detectors. + alibabaCloudEcsDetector, + // Ordered AWS Resource Detectors as per: + // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md#ordering + awsEksDetector, + awsEc2Detector, + gcpDetector, + ], }); sdk.start(); From 2f8538b71c16e1f7278497f6dc1b2d1a0f1f91ab Mon Sep 17 00:00:00 2001 From: Paurush Garg <62579325+PaurushGarg@users.noreply.github.com> Date: Tue, 24 Jan 2023 01:20:33 -0800 Subject: [PATCH 0710/1234] [chore]: Prepare for v0.68.0 release (#1384) * Release v0.68.0 * Changing nodejs version to 0.35.0 * Updated changelog --- .../1115-move-autoscaler-crd-fields.yaml | 17 ------- .chloggen/1298-change-ta-build-proc.yaml | 16 ------- .chloggen/1318-remote-config-service.yaml | 16 ------- .chloggen/1337-fix-routes-openshift.yaml | 16 ------- .chloggen/1346-run-ta-nonroot.yaml | 16 ------- .chloggen/update-python-metrics-exporter.yaml | 16 ------- CHANGELOG.md | 16 +++++++ README.md | 47 ++++++++++--------- ...emetry-operator.clusterserviceversion.yaml | 6 +-- versions.txt | 8 ++-- 10 files changed, 47 insertions(+), 127 deletions(-) delete mode 100644 .chloggen/1115-move-autoscaler-crd-fields.yaml delete mode 100755 .chloggen/1298-change-ta-build-proc.yaml delete mode 100755 .chloggen/1318-remote-config-service.yaml delete mode 100755 .chloggen/1337-fix-routes-openshift.yaml delete mode 100755 .chloggen/1346-run-ta-nonroot.yaml delete mode 100755 .chloggen/update-python-metrics-exporter.yaml diff --git a/.chloggen/1115-move-autoscaler-crd-fields.yaml b/.chloggen/1115-move-autoscaler-crd-fields.yaml deleted file mode 100644 index 168a1d93b..000000000 --- a/.chloggen/1115-move-autoscaler-crd-fields.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: deprecation - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Autoscaler - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR moves MaxReplicas and MinReplicas to .Spec.Autoscaler - -# One or more tracking issues related to the change -issues: - - 1115 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1298-change-ta-build-proc.yaml b/.chloggen/1298-change-ta-build-proc.yaml deleted file mode 100755 index 885d5b0c7..000000000 --- a/.chloggen/1298-change-ta-build-proc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target-allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR changes how the target allocator images are released by having all new target allocator changes in a "main" tagged image, with the version tag being generated only on an official release. - -# One or more tracking issues related to the change -issues: [1298] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1318-remote-config-service.yaml b/.chloggen/1318-remote-config-service.yaml deleted file mode 100755 index 13fb153ba..000000000 --- a/.chloggen/1318-remote-config-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: new_component - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Operator OpAMP Bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Introducing the Operator OpAMP Bridge service, which allows a user to manage OpenTelemetry Collector CRDs via OpAMP - -# One or more tracking issues related to the change -issues: [1318] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1337-fix-routes-openshift.yaml b/.chloggen/1337-fix-routes-openshift.yaml deleted file mode 100755 index 10c81316c..000000000 --- a/.chloggen/1337-fix-routes-openshift.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "There was a missing resource in the OpenShift routes ClusterBinding" - -# One or more tracking issues related to the change -issues: [1337] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1346-run-ta-nonroot.yaml b/.chloggen/1346-run-ta-nonroot.yaml deleted file mode 100755 index b8d43368b..000000000 --- a/.chloggen/1346-run-ta-nonroot.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Run the target allocator as non root user" - -# One or more tracking issues related to the change -issues: [1346] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/update-python-metrics-exporter.yaml b/.chloggen/update-python-metrics-exporter.yaml deleted file mode 100755 index e68545a60..000000000 --- a/.chloggen/update-python-metrics-exporter.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: instrumentation/python - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Updates the default exporters to `otlp` and sets `OTEL_EXPORTER_OTLP_[TRACES|METRICS]_PROTOCOL` to `http/protobuf` - -# One or more tracking issues related to the change -issues: [1328] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c7ab19f3..7f0f7a732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ Changes by Version ================== +0.68.0 +------------------ +### 🚩 Deprecations 🚩 +* `HPA`: Move maxReplicas and minReplicas to AutoscalerSpec.([#1302](https://github.com/open-telemetry/opentelemetry-operator/pull/1302), [@moh-osman3](https://github.com/moh-osman3)) +### 🚀 New components 🚀 +* `Operator OpAMP Bridge`: Operator OpAMP Bridge Service. ([#1339](https://github.com/open-telemetry/opentelemetry-operator/pull/1339), [@jaronoff97](https://github.com/jaronoff97)) +### 💡 Enhancements 💡 +* `instrumentation/python`: Update default python exporters to use OTLP. ([#1328](https://github.com/open-telemetry/opentelemetry-operator/pull/1328), [@TylerHelmuth](https://github.com/TylerHelmuth)) +* `target-allocator`: Change the github action to match the operator. ([#1347](https://github.com/open-telemetry/opentelemetry-operator/pull/1347), [@jaronoff97](https://github.com/jaronoff97)) +### 🧰 Bug fixes 🧰 +* `operator`: Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters.([#1337](https://github.com/open-telemetry/opentelemetry-operator/pull/1337), [@iblancasa](https://github.com/iblancasa)) +* `target allocator`: Refactor the target allocator build to not run it as root. ([#1345](https://github.com/open-telemetry/opentelemetry-operator/pull/1345), [@iblancasa](https://github.com/iblancasa)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.68.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.68.0) +* [OpenTelemetry Contrib - v0.68.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.68.0) + 0.67.0 ------------------ ### 🚀 New components 🚀 diff --git a/README.md b/README.md index a04308218..39dbf9266 100644 --- a/README.md +++ b/README.md @@ -401,29 +401,30 @@ We use `cert-manager` for some features of this operator and the third column sh The OpenTelemetry Operator *might* work on versions outside of the given range, but when opening new issues, please make sure to test your scenario on a supported version. -| OpenTelemetry Operator | Kubernetes | Cert-Manager | -|------------------------|----------------------|----------------------| -| v0.67.0 | v1.19 to v1.25 | v1 | -| v0.66.0 | v1.19 to v1.25 | v1 | -| v0.64.1 | v1.19 to v1.25 | v1 | -| v0.63.1 | v1.19 to v1.25 | v1 | -| v0.62.1 | v1.19 to v1.25 | v1 | -| v0.61.0 | v1.19 to v1.25 | v1 | -| v0.60.0 | v1.19 to v1.25 | v1 | -| v0.59.0 | v1.19 to v1.24 | v1 | -| v0.58.0 | v1.19 to v1.24 | v1 | -| v0.57.2 | v1.19 to v1.24 | v1 | -| v0.56.0 | v1.19 to v1.24 | v1 | -| v0.55.0 | v1.19 to v1.24 | v1 | -| v0.54.0 | v1.19 to v1.24 | v1 | -| v0.53.0 | v1.19 to v1.24 | v1 | -| v0.52.0 | v1.19 to v1.23 | v1 | -| v0.51.0 | v1.19 to v1.23 | v1alpha2 | -| v0.50.0 | v1.19 to v1.23 | v1alpha2 | -| v0.49.0 | v1.19 to v1.23 | v1alpha2 | -| v0.48.0 | v1.19 to v1.23 | v1alpha2 | -| v0.47.0 | v1.19 to v1.23 | v1alpha2 | -| v0.46.0 | v1.19 to v1.23 | v1alpha2 | +| OpenTelemetry Operator | Kubernetes | Cert-Manager | +|------------------------|----------------------|---------------------| +| v0.68.0 | v1.19 to v1.25 | v1 | +| v0.67.0 | v1.19 to v1.25 | v1 | +| v0.66.0 | v1.19 to v1.25 | v1 | +| v0.64.1 | v1.19 to v1.25 | v1 | +| v0.63.1 | v1.19 to v1.25 | v1 | +| v0.62.1 | v1.19 to v1.25 | v1 | +| v0.61.0 | v1.19 to v1.25 | v1 | +| v0.60.0 | v1.19 to v1.25 | v1 | +| v0.59.0 | v1.19 to v1.24 | v1 | +| v0.58.0 | v1.19 to v1.24 | v1 | +| v0.57.2 | v1.19 to v1.24 | v1 | +| v0.56.0 | v1.19 to v1.24 | v1 | +| v0.55.0 | v1.19 to v1.24 | v1 | +| v0.54.0 | v1.19 to v1.24 | v1 | +| v0.53.0 | v1.19 to v1.24 | v1 | +| v0.52.0 | v1.19 to v1.23 | v1 | +| v0.51.0 | v1.19 to v1.23 | v1alpha2 | +| v0.50.0 | v1.19 to v1.23 | v1alpha2 | +| v0.49.0 | v1.19 to v1.23 | v1alpha2 | +| v0.48.0 | v1.19 to v1.23 | v1alpha2 | +| v0.47.0 | v1.19 to v1.23 | v1alpha2 | +| v0.46.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8ba67b540..a4b06995b 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.67.0 + name: opentelemetry-operator.v0.68.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.67.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.68.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.67.0 + version: 0.68.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 2f84cbd3b..8bf0d08d9 100644 --- a/versions.txt +++ b/versions.txt @@ -2,17 +2,17 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.67.0 +opentelemetry-collector=0.68.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.67.0 +operator=0.68.0 # Represents the current release of the Target Allocator. -targetallocator=0.67.0 +targetallocator=0.68.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.21.0 +autoinstrumentation-java=1.22.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From 1b66c8e056e32c0b205ecfef634b47675604e7fe Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Wed, 25 Jan 2023 07:29:26 -0800 Subject: [PATCH 0711/1234] [target-allocator] Addtl server unit tests (#1357) * add DiscoveryManager interface, ScrapeConfigsHandler tests * add job handler tests * add changelog entry * make LinkJSON with keyed fields * fix whitespace --- .chloggen/improve-server-tests.yaml | 16 + cmd/otel-allocator/server/bench_test.go | 263 ++++++++++ cmd/otel-allocator/server/mocks_test.go | 51 ++ cmd/otel-allocator/server/server.go | 11 +- cmd/otel-allocator/server/server_test.go | 585 +++++++++++++++++++++-- cmd/otel-allocator/target/target.go | 2 +- 6 files changed, 889 insertions(+), 39 deletions(-) create mode 100755 .chloggen/improve-server-tests.yaml create mode 100644 cmd/otel-allocator/server/bench_test.go create mode 100644 cmd/otel-allocator/server/mocks_test.go diff --git a/.chloggen/improve-server-tests.yaml b/.chloggen/improve-server-tests.yaml new file mode 100755 index 000000000..582d0eaf4 --- /dev/null +++ b/.chloggen/improve-server-tests.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Added test coverage for server handling. + +# One or more tracking issues related to the change +issues: [1392] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go new file mode 100644 index 000000000..2219eaadb --- /dev/null +++ b/cmd/otel-allocator/server/bench_test.go @@ -0,0 +1,263 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package server + +import ( + "fmt" + "math/rand" + "net/http/httptest" + "testing" + "time" + + "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +func BenchmarkServerTargetsHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + var table = []struct { + numCollectors int + numJobs int + }{ + {numCollectors: 100, numJobs: 100}, + {numCollectors: 100, numJobs: 1000}, + {numCollectors: 100, numJobs: 10000}, + {numCollectors: 100, numJobs: 100000}, + {numCollectors: 1000, numJobs: 100}, + {numCollectors: 1000, numJobs: 1000}, + {numCollectors: 1000, numJobs: 10000}, + {numCollectors: 1000, numJobs: 100000}, + } + + for _, allocatorName := range allocation.GetRegisteredAllocatorNames() { + for _, v := range table { + a, _ := allocation.New(allocatorName, logger) + cols := allocation.MakeNCollectors(v.numCollectors, 0) + targets := allocation.MakeNNewTargets(v.numJobs, v.numCollectors, 0) + listenAddr := ":8080" + a.SetCollectors(cols) + a.SetTargets(targets) + s := NewServer(logger, a, nil, &listenAddr) + b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + randomJob := rand.Intn(v.numJobs) //nolint: gosec + randomCol := rand.Intn(v.numCollectors) //nolint: gosec + request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) + w := httptest.NewRecorder() + s.server.Handler.ServeHTTP(w, request) + } + }) + } + } +} + +func BenchmarkScrapeConfigsHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + } + + tests := []int{0, 5, 10, 50, 100, 500} + for _, n := range tests { + data := makeNScrapeConfigs(n) + b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + s.compareHash = 0 + s.discoveryManager = &mockDiscoveryManager{m: data} + resp := httptest.NewRecorder() + s.ScrapeConfigsHandler(resp, nil) + } + }) + } +} + +func BenchmarkCollectorMapJSONHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + } + + tests := []struct { + numCollectors int + numTargets int + }{ + { + numCollectors: 0, + numTargets: 0, + }, + { + numCollectors: 5, + numTargets: 5, + }, + { + numCollectors: 5, + numTargets: 50, + }, + { + numCollectors: 5, + numTargets: 500, + }, + { + numCollectors: 50, + numTargets: 5, + }, + { + numCollectors: 50, + numTargets: 50, + }, + { + numCollectors: 50, + numTargets: 500, + }, + { + numCollectors: 50, + numTargets: 5000, + }, + } + for _, tc := range tests { + data := makeNCollectorJSON(tc.numCollectors, tc.numTargets) + b.Run(fmt.Sprintf("%d_collectors_%d_targets", tc.numCollectors, tc.numTargets), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + resp := httptest.NewRecorder() + s.jsonHandler(resp, data) + } + }) + } +} + +func BenchmarkTargetItemsJSONHandler(b *testing.B) { + rand.Seed(time.Now().UnixNano()) + s := &Server{ + logger: logger, + } + + tests := []struct { + numTargets int + numLabels int + }{ + { + numTargets: 0, + numLabels: 0, + }, + { + numTargets: 5, + numLabels: 5, + }, + { + numTargets: 5, + numLabels: 50, + }, + { + numTargets: 50, + numLabels: 5, + }, + { + numTargets: 50, + numLabels: 50, + }, + { + numTargets: 500, + numLabels: 50, + }, + { + numTargets: 500, + numLabels: 500, + }, + { + numTargets: 5000, + numLabels: 50, + }, + { + numTargets: 5000, + numLabels: 500, + }, + } + for _, tc := range tests { + data := makeNTargetItems(tc.numTargets, tc.numLabels) + b.Run(fmt.Sprintf("%d_targets_%d_labels", tc.numTargets, tc.numLabels), func(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + resp := httptest.NewRecorder() + s.jsonHandler(resp, data) + } + }) + } +} + +var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/") + +func randSeq(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letters[rand.Intn(len(letters))] //nolint:gosec + } + return string(b) +} + +func makeNScrapeConfigs(n int) map[string]*promconfig.ScrapeConfig { + items := make(map[string]*promconfig.ScrapeConfig, n) + for i := 0; i < n; i++ { + items[randSeq(20)] = &promconfig.ScrapeConfig{ + JobName: randSeq(20), + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(time.Minute), + MetricsPath: randSeq(50), + SampleLimit: 5, + TargetLimit: 200, + LabelLimit: 20, + LabelNameLengthLimit: 50, + LabelValueLengthLimit: 100, + } + } + return items +} + +func makeNCollectorJSON(numCollectors, numItems int) map[string]collectorJSON { + items := make(map[string]collectorJSON, numCollectors) + for i := 0; i < numCollectors; i++ { + items[randSeq(20)] = collectorJSON{ + Link: randSeq(120), + Jobs: makeNTargetItems(numItems, 50), + } + } + return items +} + +func makeNTargetItems(numItems, numLabels int) []*target.Item { + items := make([]*target.Item, 0, numItems) + for i := 0; i < numItems; i++ { + items = append(items, target.NewItem( + randSeq(80), + randSeq(150), + makeNNewLabels(numLabels), + randSeq(30), + )) + } + return items +} + +func makeNNewLabels(n int) model.LabelSet { + labels := make(map[model.LabelName]model.LabelValue, n) + for i := 0; i < n; i++ { + labels[model.LabelName(randSeq(20))] = model.LabelValue(randSeq(20)) + } + return labels +} diff --git a/cmd/otel-allocator/server/mocks_test.go b/cmd/otel-allocator/server/mocks_test.go new file mode 100644 index 000000000..3b3988880 --- /dev/null +++ b/cmd/otel-allocator/server/mocks_test.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package server + +import ( + promconfig "github.com/prometheus/prometheus/config" + + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" + "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" +) + +var ( + _ DiscoveryManager = &mockDiscoveryManager{} + _ allocation.Allocator = &mockAllocator{} +) + +type mockDiscoveryManager struct { + m map[string]*promconfig.ScrapeConfig +} + +func (m *mockDiscoveryManager) GetScrapeConfigs() map[string]*promconfig.ScrapeConfig { + return m.m +} + +// mockAllocator implements the Allocator interface, but all funcs other than +// TargetItems() are a no-op. +type mockAllocator struct { + targetItems map[string]*target.Item +} + +func (m *mockAllocator) SetCollectors(_ map[string]*allocation.Collector) {} +func (m *mockAllocator) SetTargets(_ map[string]*target.Item) {} +func (m *mockAllocator) Collectors() map[string]*allocation.Collector { return nil } +func (m *mockAllocator) GetTargetsForCollectorAndJob(_ string, _ string) []*target.Item { return nil } +func (m *mockAllocator) SetFilter(_ allocation.Filter) {} + +func (m *mockAllocator) TargetItems() map[string]*target.Item { + return m.targetItems +} diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 61807b005..c4c67847f 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -29,6 +29,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" + promconfig "github.com/prometheus/prometheus/config" "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" @@ -47,17 +48,21 @@ type collectorJSON struct { Jobs []*target.Item `json:"targets"` } +type DiscoveryManager interface { + GetScrapeConfigs() map[string]*promconfig.ScrapeConfig +} + type Server struct { logger logr.Logger allocator allocation.Allocator - discoveryManager *target.Discoverer + discoveryManager DiscoveryManager server *http.Server compareHash uint64 scrapeConfigResponse []byte } -func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager *target.Discoverer, listenAddr *string) *Server { +func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager DiscoveryManager, listenAddr *string) *Server { s := &Server{ logger: log, allocator: allocator, @@ -166,7 +171,7 @@ func (s *Server) TargetsHandler(w http.ResponseWriter, r *http.Request) { } func (s *Server) errorHandler(w http.ResponseWriter, err error) { - w.WriteHeader(500) + w.WriteHeader(http.StatusInternalServerError) s.jsonHandler(w, err) } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 3f3c7da11..35ce2467e 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -15,16 +15,22 @@ package server import ( - "crypto/rand" "encoding/json" "fmt" "io" - "math/big" + "net/http" "net/http/httptest" + "net/url" "testing" + "time" + "github.com/prometheus/common/config" "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" + "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v2" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" @@ -153,8 +159,11 @@ func TestServer_TargetsHandler(t *testing.T) { tt.args.allocator.SetTargets(tt.args.cMap) request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/%s/targets?collector_id=%s", tt.args.job, tt.args.collector), nil) w := httptest.NewRecorder() + s.server.Handler.ServeHTTP(w, request) result := w.Result() + + assert.Equal(t, http.StatusOK, result.StatusCode) body := result.Body bodyBytes, err := io.ReadAll(body) assert.NoError(t, err) @@ -170,45 +179,551 @@ func TestServer_TargetsHandler(t *testing.T) { } } -func randInt(max int64) int64 { - nBig, _ := rand.Int(rand.Reader, big.NewInt(max)) - return nBig.Int64() +func TestServer_ScrapeConfigsHandler(t *testing.T) { + tests := []struct { + description string + scrapeConfigs map[string]*promconfig.ScrapeConfig + expectedCode int + expectedBody []byte + }{ + { + description: "nil scrape config", + scrapeConfigs: nil, + expectedCode: http.StatusOK, + expectedBody: []byte{}, + }, + { + description: "empty scrape config", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{}, + expectedCode: http.StatusOK, + expectedBody: []byte{}, + }, + { + description: "single entry", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + expectedCode: http.StatusOK, + }, + { + description: "multiple entries", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{ + model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), + model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), + }, + Separator: ";", + Regex: relabel.MustNewRegexp("(testapp);true"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("http"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "namespace", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "service", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "pod", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "container", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + "serviceMonitor/testapp/testapp1/0": { + JobName: "serviceMonitor/testapp/testapp1/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(5 * time.Minute), + ScrapeTimeout: model.Duration(10 * time.Second), + MetricsPath: "/v2/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{ + model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), + model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), + }, + Separator: ";", + Regex: relabel.MustNewRegexp("(testapp);true"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("http"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "namespace", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "service", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "pod", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "container", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + "serviceMonitor/testapp/testapp2/0": { + JobName: "serviceMonitor/testapp/testapp2/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Minute), + ScrapeTimeout: model.Duration(2 * time.Minute), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{ + model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), + model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), + }, + Separator: ";", + Regex: relabel.MustNewRegexp("(testapp);true"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("http"), + Replacement: "$$1", + Action: relabel.Keep, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "namespace", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "service", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "pod", + Replacement: "$$1", + Action: relabel.Replace, + }, + { + SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "container", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + expectedCode: http.StatusOK, + }, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + listenAddr := ":8080" + dm := &mockDiscoveryManager{m: tc.scrapeConfigs} + s := NewServer(logger, nil, dm, &listenAddr) + request := httptest.NewRequest("GET", "/scrape_configs", nil) + w := httptest.NewRecorder() + + s.server.Handler.ServeHTTP(w, request) + result := w.Result() + + assert.Equal(t, tc.expectedCode, result.StatusCode) + bodyBytes, err := io.ReadAll(result.Body) + require.NoError(t, err) + if tc.expectedBody != nil { + assert.Equal(t, tc.expectedBody, bodyBytes) + return + } + scrapeConfigs := map[string]*promconfig.ScrapeConfig{} + err = yaml.Unmarshal(bodyBytes, scrapeConfigs) + require.NoError(t, err) + assert.Equal(t, tc.scrapeConfigs, scrapeConfigs) + }) + } } -func BenchmarkServerTargetsHandler(b *testing.B) { - var table = []struct { - numCollectors int - numJobs int +func TestScrapeConfigsHandler_Hashing(t *testing.T) { + s := &Server{logger: logger} + // these tests are meant to be run sequentially in this order, to test + // that hashing doesn't cause us to send the wrong information. + tests := []struct { + description string + scrapeConfigs map[string]*promconfig.ScrapeConfig }{ - {numCollectors: 100, numJobs: 100}, - {numCollectors: 100, numJobs: 1000}, - {numCollectors: 100, numJobs: 10000}, - {numCollectors: 100, numJobs: 100000}, - {numCollectors: 1000, numJobs: 100}, - {numCollectors: 1000, numJobs: 1000}, - {numCollectors: 1000, numJobs: 10000}, - {numCollectors: 1000, numJobs: 100000}, + { + description: "base config", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + { + description: "different bool", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + { + description: "different job name", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + { + description: "different key", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/1": { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + { + description: "unset scrape interval", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/1": { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + //{ + // + // TODO: fix handler logic so this test passes. + // This test currently fails due to the regexp struct not having any + // exported fields for the hashing algorithm to hash on, causing the + // hashes to be the same even though the data is different. + // + // description: "different regex", + // scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + // "serviceMonitor/testapp/testapp/1": { + // JobName: "serviceMonitor/testapp/testapp/1", + // HonorTimestamps: false, + // ScrapeTimeout: model.Duration(30 * time.Second), + // MetricsPath: "/metrics", + // HTTPClientConfig: config.HTTPClientConfig{ + // FollowRedirects: true, + // }, + // RelabelConfigs: []*relabel.Config{ + // { + // SourceLabels: model.LabelNames{model.LabelName("job")}, + // Separator: ";", + // Regex: relabel.MustNewRegexp("something else"), + // TargetLabel: "__tmp_prometheus_job_name", + // Replacement: "$$1", + // Action: relabel.Replace, + // }, + // }, + // }, + // }, + //}, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + dm := &mockDiscoveryManager{m: tc.scrapeConfigs} + s.discoveryManager = dm + request := httptest.NewRequest("GET", "/scrape_configs", nil) + w := httptest.NewRecorder() + + s.ScrapeConfigsHandler(w, request) + result := w.Result() + + assert.Equal(t, http.StatusOK, result.StatusCode) + bodyBytes, err := io.ReadAll(result.Body) + require.NoError(t, err) + scrapeConfigResult := map[string]*promconfig.ScrapeConfig{} + err = yaml.Unmarshal(bodyBytes, scrapeConfigResult) + require.NoError(t, err) + assert.Equal(t, tc.scrapeConfigs, scrapeConfigResult) + }) } +} - for _, allocatorName := range allocation.GetRegisteredAllocatorNames() { - for _, v := range table { - a, _ := allocation.New(allocatorName, logger) - cols := allocation.MakeNCollectors(v.numCollectors, 0) - targets := allocation.MakeNNewTargets(v.numJobs, v.numCollectors, 0) +func TestServer_JobHandler(t *testing.T) { + tests := []struct { + description string + targetItems map[string]*target.Item + expectedCode int + expectedJobs map[string]target.LinkJSON + }{ + { + description: "nil jobs", + targetItems: nil, + expectedCode: http.StatusOK, + expectedJobs: make(map[string]target.LinkJSON), + }, + { + description: "empty jobs", + targetItems: map[string]*target.Item{}, + expectedCode: http.StatusOK, + expectedJobs: make(map[string]target.LinkJSON), + }, + { + description: "one job", + targetItems: map[string]*target.Item{ + "targetitem": target.NewItem("job1", "", model.LabelSet{}, ""), + }, + expectedCode: http.StatusOK, + expectedJobs: map[string]target.LinkJSON{ + "job1": newLink("job1"), + }, + }, + { + description: "multiple jobs", + targetItems: map[string]*target.Item{ + "a": target.NewItem("job1", "", model.LabelSet{}, ""), + "b": target.NewItem("job2", "", model.LabelSet{}, ""), + "c": target.NewItem("job3", "", model.LabelSet{}, ""), + "d": target.NewItem("job3", "", model.LabelSet{}, ""), + "e": target.NewItem("job3", "", model.LabelSet{}, "")}, + expectedCode: http.StatusOK, + expectedJobs: map[string]target.LinkJSON{ + "job1": newLink("job1"), + "job2": newLink("job2"), + "job3": newLink("job3"), + }, + }, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { listenAddr := ":8080" - a.SetCollectors(cols) - a.SetTargets(targets) + a := &mockAllocator{targetItems: tc.targetItems} s := NewServer(logger, a, nil, &listenAddr) - b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - randomJob := randInt(int64(v.numJobs)) - randomCol := randInt(int64(v.numCollectors)) - request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) - w := httptest.NewRecorder() - s.server.Handler.ServeHTTP(w, request) - } - }) - } + request := httptest.NewRequest("GET", "/jobs", nil) + w := httptest.NewRecorder() + + s.server.Handler.ServeHTTP(w, request) + result := w.Result() + + assert.Equal(t, tc.expectedCode, result.StatusCode) + bodyBytes, err := io.ReadAll(result.Body) + require.NoError(t, err) + jobs := map[string]target.LinkJSON{} + err = json.Unmarshal(bodyBytes, &jobs) + require.NoError(t, err) + assert.Equal(t, tc.expectedJobs, jobs) + }) } } + +func newLink(jobName string) target.LinkJSON { + return target.LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))} +} diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/target/target.go index 22106c082..51940f47d 100644 --- a/cmd/otel-allocator/target/target.go +++ b/cmd/otel-allocator/target/target.go @@ -46,7 +46,7 @@ func (t *Item) Hash() string { func NewItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *Item { return &Item{ JobName: jobName, - Link: LinkJSON{fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, + Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, hash: jobName + targetURL + label.Fingerprint().String(), TargetURL: []string{targetURL}, Labels: label, From 072ed8c376f1f05a1d2d039e6fa36445058d3fdd Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Thu, 26 Jan 2023 16:48:33 +0100 Subject: [PATCH 0712/1234] [target-allocator] Replace deprecated `gorilla/mux` dependency with `gin` (#1383) * Replace dependency and adjust HTTP methods and configuration Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera Signed-off-by: Matej Gera --- ...eplace-deperecated-gorilla-dependency.yaml | 16 +++++ cmd/otel-allocator/go.mod | 10 ++- cmd/otel-allocator/go.sum | 9 ++- cmd/otel-allocator/server/server.go | 64 +++++++++---------- 4 files changed, 64 insertions(+), 35 deletions(-) create mode 100644 .chloggen/1383-replace-deperecated-gorilla-dependency.yaml diff --git a/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml b/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml new file mode 100644 index 000000000..55337914d --- /dev/null +++ b/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "target allocator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Replace deprecated dependency `gorilla/mux` with `gin` and adjust HTTP method signatures and configuration to correspond functionally to existing code." + +# One or more tracking issues related to the change +issues: [1352] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 3c7dca8ae..214cf5ec8 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -6,9 +6,10 @@ require ( github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.4 + github.com/ghodss/yaml v1.0.0 + github.com/gin-gonic/gin v1.5.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 - github.com/gorilla/mux v1.8.0 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.53.1 @@ -62,7 +63,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/fatih/color v1.13.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.0 // indirect @@ -76,6 +77,8 @@ require ( github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.21.1 // indirect github.com/go-openapi/validate v0.21.0 // indirect + github.com/go-playground/locales v0.13.0 // indirect + github.com/go-playground/universal-translator v0.17.0 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -113,6 +116,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect + github.com/leodido/go-urn v1.2.0 // indirect github.com/linode/linodego v1.8.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect @@ -140,6 +144,7 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.4.0 // indirect github.com/thanos-io/thanos v0.24.0-rc.1 // indirect + github.com/ugorji/go/codec v1.1.7 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.mongodb.org/mongo-driver v1.10.0 // indirect go.opencensus.io v0.23.0 // indirect @@ -165,6 +170,7 @@ require ( google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 // indirect google.golang.org/grpc v1.48.0 // indirect google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/go-playground/validator.v9 v9.29.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 4c8a76211..caed1fb18 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -438,7 +438,9 @@ github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49P github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.5.0 h1:fi+bqFAx/oLK54somfCtEZs9HeH1LHVoEPUgARpTqyc= github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -585,8 +587,10 @@ github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt52 github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-redis/redis/v8 v8.0.0-beta.10.0.20200905143926-df7fe4e2ce72/go.mod h1:CJP1ZIHwhosNYwIdaHPZK9vHsM3+roNBaZ7U9Of1DXc= @@ -794,7 +798,6 @@ github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51 github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -1014,6 +1017,7 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtB github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1485,6 +1489,7 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -2365,7 +2370,9 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index c4c67847f..8bd25a8ea 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -23,8 +23,8 @@ import ( "time" yaml2 "github.com/ghodss/yaml" + "github.com/gin-gonic/gin" "github.com/go-logr/logr" - "github.com/gorilla/mux" "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -69,12 +69,16 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager discoveryManager: discoveryManager, compareHash: uint64(0), } - router := mux.NewRouter().UseEncodedPath() + + router := gin.Default() + router.UseRawPath = true + router.UnescapePathValues = false router.Use(s.PrometheusMiddleware) - router.HandleFunc("/scrape_configs", s.ScrapeConfigsHandler).Methods("GET") - router.HandleFunc("/jobs", s.JobHandler).Methods("GET") - router.HandleFunc("/jobs/{job_id}/targets", s.TargetsHandler).Methods("GET") - router.Path("/metrics").Handler(promhttp.Handler()) + router.GET("/scrape_configs", s.ScrapeConfigsHandler) + router.GET("/jobs", s.JobHandler) + router.GET("/jobs/:job_id/targets", s.TargetsHandler) + router.GET("/metrics", gin.WrapH(promhttp.Handler())) + s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} return s } @@ -92,13 +96,13 @@ func (s *Server) Shutdown(ctx context.Context) error { // ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. // The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. // After that, the YAML is converted in to a JSON format for consumers to use. -func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { +func (s *Server) ScrapeConfigsHandler(c *gin.Context) { configs := s.discoveryManager.GetScrapeConfigs() hash, err := hashstructure.Hash(configs, nil) if err != nil { s.logger.Error(err, "failed to hash the config") - s.errorHandler(w, err) + s.errorHandler(c.Writer, err) return } // if the hashes are different, we need to recompute the scrape config @@ -106,67 +110,63 @@ func (s *Server) ScrapeConfigsHandler(w http.ResponseWriter, r *http.Request) { var configBytes []byte configBytes, err = yaml.Marshal(configs) if err != nil { - s.errorHandler(w, err) + s.errorHandler(c.Writer, err) return } var jsonConfig []byte jsonConfig, err = yaml2.YAMLToJSON(configBytes) if err != nil { - s.errorHandler(w, err) + s.errorHandler(c.Writer, err) return } s.scrapeConfigResponse = jsonConfig s.compareHash = hash } // We don't use the jsonHandler method because we don't want our bytes to be re-encoded - w.Header().Set("Content-Type", "application/json") - _, err = w.Write(s.scrapeConfigResponse) + c.Writer.Header().Set("Content-Type", "application/json") + _, err = c.Writer.Write(s.scrapeConfigResponse) if err != nil { - s.errorHandler(w, err) + s.errorHandler(c.Writer, err) } } -func (s *Server) JobHandler(w http.ResponseWriter, r *http.Request) { +func (s *Server) JobHandler(c *gin.Context) { displayData := make(map[string]target.LinkJSON) for _, v := range s.allocator.TargetItems() { displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} } - s.jsonHandler(w, displayData) + s.jsonHandler(c.Writer, displayData) } -// PrometheusMiddleware implements mux.MiddlewareFunc. -func (s *Server) PrometheusMiddleware(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - route := mux.CurrentRoute(r) - path, _ := route.GetPathTemplate() - timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) - next.ServeHTTP(w, r) - timer.ObserveDuration() - }) +func (s *Server) PrometheusMiddleware(c *gin.Context) { + path := c.FullPath() + timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) + c.Next() + timer.ObserveDuration() } -func (s *Server) TargetsHandler(w http.ResponseWriter, r *http.Request) { - q := r.URL.Query()["collector_id"] +func (s *Server) TargetsHandler(c *gin.Context) { + q := c.Request.URL.Query()["collector_id"] - params := mux.Vars(r) - jobId, err := url.QueryUnescape(params["job_id"]) + jobIdParam := c.Params.ByName("job_id") + jobId, err := url.QueryUnescape(jobIdParam) if err != nil { - s.errorHandler(w, err) + s.errorHandler(c.Writer, err) return } if len(q) == 0 { displayData := GetAllTargetsByJob(s.allocator, jobId) - s.jsonHandler(w, displayData) + s.jsonHandler(c.Writer, displayData) } else { tgs := s.allocator.GetTargetsForCollectorAndJob(q[0], jobId) // Displays empty list if nothing matches if len(tgs) == 0 { - s.jsonHandler(w, []interface{}{}) + s.jsonHandler(c.Writer, []interface{}{}) return } - s.jsonHandler(w, tgs) + s.jsonHandler(c.Writer, tgs) } } From 6814271a01588fac2df297bcd00b9c555fab252f Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 27 Jan 2023 07:09:20 -0500 Subject: [PATCH 0713/1234] [chore] Fix Target Allocator tests (#1403) * Change the github action to match the operator * Add chloggen * Fix tests * imports --- cmd/otel-allocator/server/bench_test.go | 9 +++++++-- cmd/otel-allocator/server/server_test.go | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go index 2219eaadb..2145101fb 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/server/bench_test.go @@ -21,6 +21,7 @@ import ( "testing" "time" + "github.com/gin-gonic/gin" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" @@ -81,8 +82,12 @@ func BenchmarkScrapeConfigsHandler(b *testing.B) { for i := 0; i < b.N; i++ { s.compareHash = 0 s.discoveryManager = &mockDiscoveryManager{m: data} - resp := httptest.NewRecorder() - s.ScrapeConfigsHandler(resp, nil) + + c, _ := gin.CreateTestContext(httptest.NewRecorder()) + gin.SetMode(gin.ReleaseMode) + c.Request = httptest.NewRequest("GET", "/scrape_configs", nil) + + s.ScrapeConfigsHandler(c) } }) } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 35ce2467e..9dd90728c 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -24,6 +24,7 @@ import ( "testing" "time" + "github.com/gin-gonic/gin" "github.com/prometheus/common/config" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" @@ -640,10 +641,12 @@ func TestScrapeConfigsHandler_Hashing(t *testing.T) { t.Run(tc.description, func(t *testing.T) { dm := &mockDiscoveryManager{m: tc.scrapeConfigs} s.discoveryManager = dm - request := httptest.NewRequest("GET", "/scrape_configs", nil) w := httptest.NewRecorder() + c, _ := gin.CreateTestContext(w) + gin.SetMode(gin.ReleaseMode) + c.Request = httptest.NewRequest("GET", "/scrape_configs", nil) - s.ScrapeConfigsHandler(w, request) + s.ScrapeConfigsHandler(c) result := w.Result() assert.Equal(t, http.StatusOK, result.StatusCode) From 0a3a882cb02a107c1cada4c901af5bacd0bb21b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 09:45:34 +0100 Subject: [PATCH 0714/1234] Bump docker/build-push-action from 3 to 4 (#1412) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 597d79ecd..6feacce80 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: autoinstrumentation/apache-httpd platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 8b3634657..ad6bca3a0 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index c95439f90..04f313ed6 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 4fa837a2c..1180bcae4 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 2f28a8041..81ce065a1 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,7 +53,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index a04fcf3e1..56edfe467 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -65,7 +65,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 473fc163e..fcff14efe 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -56,7 +56,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From 55c37bc5a5048fe6cb54766746ab0d3eda92ddc3 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 31 Jan 2023 13:43:58 +0100 Subject: [PATCH 0715/1234] [chore] Fix E2E autoscale test for OpenShift (#1365) * Improve the reliability of the autoscale E2E test Signed-off-by: Israel Blancas * Revert change Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- tests/e2e/autoscale/00-assert.yaml | 27 +---- tests/e2e/autoscale/00-install.yaml | 5 +- .../01-check-simplest-collector-hpa.yaml | 4 + ...implest-set-utilization-collector-hpa.yaml | 4 + .../{01-assert.yaml => 03-assert.yaml} | 11 -- .../{01-install.yaml => 03-install.yaml} | 2 + tests/e2e/autoscale/04-delete.yaml | 7 ++ .../{02-assert.yaml => 05-assert.yaml} | 1 - tests/e2e/autoscale/wait-until-hpa-ready.go | 109 ++++++++++++++++++ 9 files changed, 133 insertions(+), 37 deletions(-) create mode 100644 tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml create mode 100644 tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml rename tests/e2e/autoscale/{01-assert.yaml => 03-assert.yaml} (62%) rename tests/e2e/autoscale/{01-install.yaml => 03-install.yaml} (80%) create mode 100644 tests/e2e/autoscale/04-delete.yaml rename tests/e2e/autoscale/{02-assert.yaml => 05-assert.yaml} (99%) create mode 100644 tests/e2e/autoscale/wait-until-hpa-ready.go diff --git a/tests/e2e/autoscale/00-assert.yaml b/tests/e2e/autoscale/00-assert.yaml index 4039af39f..a0edb1230 100644 --- a/tests/e2e/autoscale/00-assert.yaml +++ b/tests/e2e/autoscale/00-assert.yaml @@ -5,28 +5,9 @@ metadata: status: readyReplicas: 1 --- -apiVersion: autoscaling/v1 -kind: HorizontalPodAutoscaler -metadata: - name: simplest-collector -spec: - minReplicas: 1 - maxReplicas: 2 -# This is not neccesarily exact. We really just want to wait until this is no longer -status: - currentCPUUtilizationPercentage: 20 ---- -apiVersion: autoscaling/v2beta2 -kind: HorizontalPodAutoscaler +apiVersion: apps/v1 +kind: Deployment metadata: name: simplest-set-utilization-collector -spec: - minReplicas: 1 - maxReplicas: 2 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 50 \ No newline at end of file +status: + readyReplicas: 1 diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 4f4b316e0..ad1a96a74 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -1,5 +1,6 @@ -# This creates two different deployments. The first one will be used to see if we scale properly. (Note that we are -# only scaling up to 2 because of limitations of KUTTL). The second is to check the targetCPUUtilization option. +# This creates two different deployments: +# * The first one will be used to see if we scale properly +# * The second is to check the targetCPUUtilization option # apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector diff --git a/tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml b/tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml new file mode 100644 index 000000000..c01035210 --- /dev/null +++ b/tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: go run ./wait-until-hpa-ready.go --hpa simplest-collector diff --git a/tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml b/tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml new file mode 100644 index 000000000..21dad9ff4 --- /dev/null +++ b/tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: go run ./wait-until-hpa-ready.go --hpa simplest-set-utilization-collector diff --git a/tests/e2e/autoscale/01-assert.yaml b/tests/e2e/autoscale/03-assert.yaml similarity index 62% rename from tests/e2e/autoscale/01-assert.yaml rename to tests/e2e/autoscale/03-assert.yaml index 76c712f7a..3b9801016 100644 --- a/tests/e2e/autoscale/01-assert.yaml +++ b/tests/e2e/autoscale/03-assert.yaml @@ -1,17 +1,6 @@ # Wait until tracegen has completed and the simplest deployment has scaled up to 2 -apiVersion: batch/v1 -kind: Job -metadata: - name: tracegen -status: - conditions: - - status: "True" - type: Complete - ---- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector - metadata: name: simplest status: diff --git a/tests/e2e/autoscale/01-install.yaml b/tests/e2e/autoscale/03-install.yaml similarity index 80% rename from tests/e2e/autoscale/01-install.yaml rename to tests/e2e/autoscale/03-install.yaml index eac440836..041ccbeab 100644 --- a/tests/e2e/autoscale/01-install.yaml +++ b/tests/e2e/autoscale/03-install.yaml @@ -13,6 +13,8 @@ spec: args: - -otlp-endpoint=simplest-collector-headless:4317 - -otlp-insecure + # High duration to ensure the trace creation doesn't stop. + # It'll be stopped in step 4 - -duration=1m - -workers=20 restartPolicy: Never diff --git a/tests/e2e/autoscale/04-delete.yaml b/tests/e2e/autoscale/04-delete.yaml new file mode 100644 index 000000000..e6a6c0629 --- /dev/null +++ b/tests/e2e/autoscale/04-delete.yaml @@ -0,0 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: batch/v1 + kind: Job + metadata: + name: tracegen diff --git a/tests/e2e/autoscale/02-assert.yaml b/tests/e2e/autoscale/05-assert.yaml similarity index 99% rename from tests/e2e/autoscale/02-assert.yaml rename to tests/e2e/autoscale/05-assert.yaml index c610ad3f0..c3400dfa3 100644 --- a/tests/e2e/autoscale/02-assert.yaml +++ b/tests/e2e/autoscale/05-assert.yaml @@ -1,7 +1,6 @@ # Wait for the collector to scale back down to 1 apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector - metadata: name: simplest status: diff --git a/tests/e2e/autoscale/wait-until-hpa-ready.go b/tests/e2e/autoscale/wait-until-hpa-ready.go new file mode 100644 index 000000000..7bea80b2b --- /dev/null +++ b/tests/e2e/autoscale/wait-until-hpa-ready.go @@ -0,0 +1,109 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" +) + +func main() { + var hpaName string + var timeout int + var kubeconfigPath string + + defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") + + pflag.IntVar(&timeout, "timeout", 600, "The timeout for the check.") + pflag.StringVar(&hpaName, "hpa", "", "HPA to check") + pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") + pflag.Parse() + + if len(hpaName) == 0 { + fmt.Println("hpa flag is mandatory") + os.Exit(1) + } + + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + fmt.Printf("Error reading the kubeconfig: %s\n", err) + os.Exit(1) + } + + client, err := kubernetes.NewForConfig(config) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), metav1.GetOptions{}) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + hpaClientV2 := client.AutoscalingV2().HorizontalPodAutoscalers(namespace.Name) + hpaClientV1 := client.AutoscalingV1().HorizontalPodAutoscalers(namespace.Name) + + pollInterval := time.Second + + // Search in v2 and v1 for an HPA with the given name + err = wait.Poll(pollInterval, 0, func() (done bool, err error) { + hpav2, err := hpaClientV2.Get( + context.Background(), + hpaName, + metav1.GetOptions{}, + ) + if err != nil { + hpav1, err := hpaClientV1.Get( + context.Background(), + hpaName, + metav1.GetOptions{}, + ) + if err != nil { + fmt.Printf("HPA %s not found\n", hpaName) + return false, nil + } + + if hpav1.Status.CurrentCPUUtilizationPercentage == nil { + fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) + return false, nil + } + return true, nil + } + + if hpav2.Status.CurrentMetrics == nil { + fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) + return false, nil + } + return true, nil + }) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + fmt.Printf("%s is ready!\n", hpaName) +} From 41938a9508f13871025633fe7ec24ae43c08e58d Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 1 Feb 2023 18:09:17 +0100 Subject: [PATCH 0716/1234] Inject otelcol sidecar into any namespace (#1395) * Inject otelcol sidecar into any namespace Signed-off-by: Pavol Loffay * review comments Signed-off-by: Pavol Loffay * review comments Signed-off-by: Pavol Loffay * Consume otelcol config directly from env var Signed-off-by: Pavol Loffay * Fix lint Signed-off-by: Pavol Loffay * revert Signed-off-by: Pavol Loffay * revert init prepper image Signed-off-by: Pavol Loffay * Change order Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/inject-any-namespace.yaml | 16 ++++++++ README.md | 9 ++++- config/manager/kustomization.yaml | 2 +- .../webhookhandler/webhookhandler_test.go | 3 +- pkg/collector/container.go | 25 ++++++------ pkg/collector/container_test.go | 30 +++++++-------- pkg/collector/daemonset.go | 2 +- pkg/collector/deployment.go | 2 +- pkg/collector/reconcile/config_replace.go | 13 ++++--- .../reconcile/config_replace_test.go | 4 +- pkg/collector/reconcile/configmap.go | 2 +- pkg/collector/statefulset.go | 2 +- pkg/sidecar/pod.go | 18 ++++++--- pkg/sidecar/pod_test.go | 38 ++++++++++++++++++- pkg/sidecar/podmutator.go | 9 ++++- .../00-install.yaml | 29 ++++++++++++++ .../01-assert.yaml | 21 ++++++++++ .../01-install-app.yaml | 20 ++++++++++ tests/e2e/smoke-sidecar/01-assert.yaml | 1 + 19 files changed, 195 insertions(+), 51 deletions(-) create mode 100755 .chloggen/inject-any-namespace.yaml create mode 100644 tests/e2e/smoke-sidecar-other-namespace/00-install.yaml create mode 100644 tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml create mode 100644 tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml diff --git a/.chloggen/inject-any-namespace.yaml b/.chloggen/inject-any-namespace.yaml new file mode 100755 index 000000000..9288e9c39 --- /dev/null +++ b/.chloggen/inject-any-namespace.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Support sidecar injecton into any namespace. + +# One or more tracking issues related to the change +issues: [199] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 39dbf9266..840051d94 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ The `CustomResource` for the `OpenTelemetryCollector` exposes a property named ` #### Sidecar injection -A sidecar with the OpenTelemetry Collector can be injected into pod-based workloads by setting the pod annotation `sidecar.opentelemetry.io/inject` to either `"true"`, or to the name of a concrete `OpenTelemetryCollector` from the same namespace, like in the following example: +A sidecar with the OpenTelemetry Collector can be injected into pod-based workloads by setting the pod annotation `sidecar.opentelemetry.io/inject` to either `"true"`, or to the name of a concrete `OpenTelemetryCollector`, like in the following example: ```yaml kubectl apply -f - < 0 { volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index a0d7155e5..2d4ffba36 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -41,7 +41,7 @@ func TestContainerNewDefault(t *testing.T) { cfg := config.New(config.WithCollectorImage("default-image")) // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Equal(t, "default-image", c.Image) @@ -58,7 +58,7 @@ func TestContainerWithImageOverridden(t *testing.T) { cfg := config.New(config.WithCollectorImage("default-image")) // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Equal(t, "overridden-image", c.Image) @@ -191,7 +191,7 @@ service: cfg := config.New(config.WithCollectorImage("default-image")) // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.ElementsMatch(t, testCase.expectedPorts, c.Ports) @@ -212,7 +212,7 @@ func TestContainerConfigFlagIsIgnored(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Len(t, c.Args, 2) @@ -232,7 +232,7 @@ func TestContainerCustomVolumes(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Len(t, c.VolumeMounts, 2) @@ -241,7 +241,7 @@ func TestContainerCustomVolumes(t *testing.T) { func TestContainerCustomSecurityContext(t *testing.T) { // default config without security context - c1 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{Spec: v1alpha1.OpenTelemetryCollectorSpec{}}) + c1 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{Spec: v1alpha1.OpenTelemetryCollectorSpec{}}, true) // verify assert.Nil(t, c1.SecurityContext) @@ -258,7 +258,7 @@ func TestContainerCustomSecurityContext(t *testing.T) { RunAsUser: &uid, }, }, - }) + }, true) // verify assert.NotNil(t, c2.SecurityContext) @@ -281,7 +281,7 @@ func TestContainerEnvVarsOverridden(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Len(t, c.Env, 2) @@ -297,7 +297,7 @@ func TestContainerDefaultEnvVars(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Len(t, c.Env, 1) @@ -323,7 +323,7 @@ func TestContainerResourceRequirements(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Equal(t, resource.MustParse("100m"), *c.Resources.Limits.Cpu()) @@ -340,7 +340,7 @@ func TestContainerDefaultResourceRequirements(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Empty(t, c.Resources) @@ -359,7 +359,7 @@ func TestContainerArgs(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Contains(t, c.Args, "--metrics-level=detailed") @@ -376,7 +376,7 @@ func TestContainerImagePullPolicy(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Equal(t, c.ImagePullPolicy, corev1.PullIfNotPresent) @@ -409,7 +409,7 @@ func TestContainerEnvFrom(t *testing.T) { cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Contains(t, c.EnvFrom, envFrom1) @@ -429,7 +429,7 @@ service: cfg := config.New() // test - c := Container(cfg, logger, otelcol) + c := Container(cfg, logger, otelcol, true) // verify assert.Equal(t, "/", c.LivenessProbe.HTTPGet.Path) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 565d1a92b..591a020ce 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -50,7 +50,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index cb0211fbf..5df6b347e 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -52,7 +52,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 8be892b65..6ad5ea098 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -25,6 +25,7 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. "gopkg.in/yaml.v2" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" @@ -34,16 +35,16 @@ type Config struct { PromConfig *promconfig.Config `yaml:"config"` } -func ReplaceConfig(params Params) (string, error) { - if !params.Instance.Spec.TargetAllocator.Enabled { - return params.Instance.Spec.Config, nil +func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { + if !instance.Spec.TargetAllocator.Enabled { + return instance.Spec.Config, nil } - config, getStringErr := adapters.ConfigFromString(params.Instance.Spec.Config) + config, getStringErr := adapters.ConfigFromString(instance.Spec.Config) if getStringErr != nil { return "", getStringErr } - promCfgMap, getCfgPromErr := ta.ConfigToPromConfig(params.Instance.Spec.Config) + promCfgMap, getCfgPromErr := ta.ConfigToPromConfig(instance.Spec.Config) if getCfgPromErr != nil { return "", getCfgPromErr } @@ -65,7 +66,7 @@ func ReplaceConfig(params Params) (string, error) { escapedJob := url.QueryEscape(cfg.PromConfig.ScrapeConfigs[i].JobName) cfg.PromConfig.ScrapeConfigs[i].ServiceDiscoveryConfigs = discovery.Configs{ &http.SDConfig{ - URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(params.Instance), escapedJob), + URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(instance), escapedJob), }, } } diff --git a/pkg/collector/reconcile/config_replace_test.go b/pkg/collector/reconcile/config_replace_test.go index 0d867492b..3ccd43f07 100644 --- a/pkg/collector/reconcile/config_replace_test.go +++ b/pkg/collector/reconcile/config_replace_test.go @@ -29,7 +29,7 @@ func TestPrometheusParser(t *testing.T) { assert.NoError(t, err) t.Run("should update config with http_sd_config", func(t *testing.T) { - actualConfig, err := ReplaceConfig(param) + actualConfig, err := ReplaceConfig(param.Instance) assert.NoError(t, err) // prepare @@ -63,7 +63,7 @@ func TestPrometheusParser(t *testing.T) { t.Run("should not update config with http_sd_config", func(t *testing.T) { param.Instance.Spec.TargetAllocator.Enabled = false - actualConfig, err := ReplaceConfig(param) + actualConfig, err := ReplaceConfig(param.Instance) assert.NoError(t, err) // prepare diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 24a6f7cef..b5e9906ed 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -74,7 +74,7 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { } else { labels["app.kubernetes.io/version"] = "latest" } - config, err := ReplaceConfig(params) + config, err := ReplaceConfig(params.Instance) if err != nil { params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", err) } diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index ba76d4732..2ea7d77a0 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -52,7 +52,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 593d3d0c3..c86d2f3ae 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -24,23 +24,31 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) const ( - label = "sidecar.opentelemetry.io/injected" + label = "sidecar.opentelemetry.io/injected" + confEnvVar = "OTEL_CONFIG" ) // add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod, attributes []corev1.EnvVar) (corev1.Pod, error) { - // add the container - volumes := collector.Volumes(cfg, otelcol) - container := collector.Container(cfg, logger, otelcol) + otelColCfg, err := reconcile.ReplaceConfig(otelcol) + if err != nil { + return pod, err + } + + container := collector.Container(cfg, logger, otelcol, false) + container.Args = append(container.Args, fmt.Sprintf("--config=env:%s", confEnvVar)) + + container.Env = append(container.Env, corev1.EnvVar{Name: confEnvVar, Value: otelColCfg}) if !hasResourceAttributeEnvVar(container.Env) { container.Env = append(container.Env, attributes...) } pod.Spec.Containers = append(pod.Spec.Containers, container) - pod.Spec.Volumes = append(pod.Spec.Volumes, volumes...) + pod.Spec.Volumes = append(pod.Spec.Volumes, otelcol.Spec.Volumes...) if pod.Labels == nil { pod.Labels = map[string]string{} diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 1982e5315..caee349b5 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -18,6 +18,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -45,6 +46,13 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { Name: "otelcol-sample", Namespace: "some-app", }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: ` +receivers: +exporters: +processors: +`, + }, } cfg := config.New(config.WithCollectorImage("some-default-image")) @@ -53,9 +61,35 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { // verify assert.NoError(t, err) - assert.Len(t, changed.Spec.Containers, 2) - assert.Len(t, changed.Spec.Volumes, 2) + require.Len(t, changed.Spec.Containers, 2) + require.Len(t, changed.Spec.Volumes, 1) assert.Equal(t, "some-app.otelcol-sample", changed.Labels["sidecar.opentelemetry.io/injected"]) + assert.Equal(t, corev1.Container{ + Name: "otc-container", + Image: "some-default-image", + Args: []string{"--config=env:OTEL_CONFIG"}, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_CONFIG", + Value: otelcol.Spec.Config, + }, + }, + Ports: []corev1.ContainerPort{ + { + Name: "metrics", + ContainerPort: 8888, + Protocol: corev1.ProtocolTCP, + }, + }, + }, changed.Spec.Containers[1]) } // this situation should never happen in the current code path, but it should not fail diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 22302a44e..7f1956e4d 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -106,7 +106,14 @@ func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1. } otelcol := v1alpha1.OpenTelemetryCollector{} - err := p.client.Get(ctx, types.NamespacedName{Name: ann, Namespace: ns.Name}, &otelcol) + var nsnOtelcol types.NamespacedName + instNamespace, instName, namespaced := strings.Cut(ann, "/") + if namespaced { + nsnOtelcol = types.NamespacedName{Name: instName, Namespace: instNamespace} + } else { + nsnOtelcol = types.NamespacedName{Name: ann, Namespace: ns.Name} + } + err := p.client.Get(ctx, nsnOtelcol, &otelcol) if err != nil { return otelcol, err } diff --git a/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml b/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml new file mode 100644 index 000000000..9f6414134 --- /dev/null +++ b/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-otel-sidecar-other-namespace +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar-for-my-app + namespace: kuttl-otel-sidecar-other-namespace +spec: + mode: sidecar + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml new file mode 100644 index 000000000..af10887f6 --- /dev/null +++ b/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Pod +metadata: + namespace: kuttl-otel-sidecar-other-namespace + annotations: + sidecar.opentelemetry.io/inject: "kuttl-otel-sidecar-other-namespace/sidecar-for-my-app" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + - name: otc-container + env: + - name: POD_NAME + - name: OTEL_CONFIG + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES +status: + phase: Running diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml new file mode 100644 index 000000000..b85e38b91 --- /dev/null +++ b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar + namespace: kuttl-otel-sidecar-other-namespace +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "kuttl-otel-sidecar-other-namespace/sidecar-for-my-app" + spec: + containers: + - name: myapp + image: k8s.gcr.io/echoserver:1.4 diff --git a/tests/e2e/smoke-sidecar/01-assert.yaml b/tests/e2e/smoke-sidecar/01-assert.yaml index 358711a28..b4bd1b960 100644 --- a/tests/e2e/smoke-sidecar/01-assert.yaml +++ b/tests/e2e/smoke-sidecar/01-assert.yaml @@ -11,6 +11,7 @@ spec: - name: otc-container env: - name: POD_NAME + - name: OTEL_CONFIG - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME From 0ceafa390b782200e536528c8b144d97e82bbc61 Mon Sep 17 00:00:00 2001 From: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:29:09 -0800 Subject: [PATCH 0717/1234] Add dependabot checks for nested go mod files (#1406) --- .github/dependabot.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 04278f7ed..788b9504c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,14 @@ updates: directory: / schedule: interval: daily + - package-ecosystem: gomod + directory: /cmd/operator-opamp-bridge + schedule: + interval: daily + - package-ecosystem: gomod + directory: /cmd/otel-allocator + schedule: + interval: daily - package-ecosystem: github-actions directory: / @@ -13,4 +21,4 @@ updates: - package-ecosystem: docker directory: / schedule: - interval: daily \ No newline at end of file + interval: daily From 05b871d64d93ff315559cfa97238866d86f5dba3 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Thu, 2 Feb 2023 10:13:07 +0100 Subject: [PATCH 0718/1234] CRD defs for Apache HTTPD Autoinstrumentation (#1305) * CRD defs for Apache HTTPD Autoinstrumentation * Generated resources for Apache Httpd CRD defs * Generated bundle for Apache Httpd CRD * Fixed version for "make bundle" * Makefile and version update * Chngnd repo user to open-telemetry for make bundle * Reverted changes in kustomization.yaml * Reverted changes in kustomization.yaml * Reverted chnages in kustomization.yaml * Apache HTTPD - Link to attributes doc * make bundle sync * ./.chloggen yaml added for #1305 * Version fix --- .chloggen/1305-apache-httpd-crd.yaml | 16 + Makefile | 1 + apis/v1alpha1/instrumentation_types.go | 31 + apis/v1alpha1/instrumentation_webhook.go | 27 +- apis/v1alpha1/instrumentation_webhook_test.go | 10 +- apis/v1alpha1/zz_generated.deepcopy.go | 30 + .../opentelemetry.io_instrumentations.yaml | 250 ++++++++ .../opentelemetry.io_instrumentations.yaml | 250 ++++++++ docs/api.md | 554 ++++++++++++++++++ versions.txt | 4 + 10 files changed, 1163 insertions(+), 10 deletions(-) create mode 100644 .chloggen/1305-apache-httpd-crd.yaml diff --git a/.chloggen/1305-apache-httpd-crd.yaml b/.chloggen/1305-apache-httpd-crd.yaml new file mode 100644 index 000000000..01d80814b --- /dev/null +++ b/.chloggen/1305-apache-httpd-crd.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR adds CRD for Apache HTTPD auto-instrumentation + +# One or more tracking issues related to the change +issues: [1305] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Makefile b/Makefile index 6c5392e43..a2f1d5bdf 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep a AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" +AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" ARCH ?= $(shell go env GOARCH) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index d4d00bece..ee952e8ab 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -58,6 +58,10 @@ type InstrumentationSpec struct { // DotNet defines configuration for DotNet auto-instrumentation. // +optional DotNet DotNet `json:"dotnet,omitempty"` + + // Apache defines configuration for Apache HTTPD auto-instrumentation. + // +optional + ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"` } // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. @@ -145,6 +149,33 @@ type DotNet struct { Env []corev1.EnvVar `json:"env,omitempty"` } +type ApacheHttpd struct { + // Image is a container image with Apache SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Attrs defines Apache HTTPD agent specific attributes. The precedence is: + // `agent default attributes` > `instrument spec attributes` . + // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module + // +optional + Attrs []corev1.EnvVar `json:"attrs,omitempty"` + + // Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 + // +optional + Version string `json:"version,omitempty"` + + // Location of Apache HTTPD server configuration. + // Needed only if different from default "/usr/local/apache2/conf" + // +optional + ConfigPath string `json:"configPath,omitempty"` +} + // InstrumentationStatus defines status of the instrumentation. type InstrumentationStatus struct { } diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 39ab6c866..41a78f78f 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -27,12 +27,13 @@ import ( ) const ( - AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" - AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" - AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" - AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" - envPrefix = "OTEL_" - envSplunkPrefix = "SPLUNK_" + AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" + AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" + AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" + AnnotationDefaultAutoInstrumentationApacheHttpd = "instrumentation.opentelemetry.io/default-auto-instrumentation-apache-httpd-image" + envPrefix = "OTEL_" + envSplunkPrefix = "SPLUNK_" ) // log is for logging in this package. @@ -78,6 +79,17 @@ func (r *Instrumentation) Default() { r.Spec.DotNet.Image = val } } + if r.Spec.ApacheHttpd.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationApacheHttpd]; ok { + r.Spec.ApacheHttpd.Image = val + } + } + if r.Spec.ApacheHttpd.Version == "" { + r.Spec.ApacheHttpd.Version = "2.4" + } + if r.Spec.ApacheHttpd.ConfigPath == "" { + r.Spec.ApacheHttpd.ConfigPath = "/usr/local/apache2/conf" + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -134,6 +146,9 @@ func (r *Instrumentation) validate() error { if err := r.validateEnv(r.Spec.DotNet.Env); err != nil { return err } + if err := r.validateEnv(r.Spec.ApacheHttpd.Env); err != nil { + return err + } return nil } diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index ef31be3f8..f390443b4 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -25,10 +25,11 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { inst := &Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - AnnotationDefaultAutoInstrumentationJava: "java-img:1", - AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", - AnnotationDefaultAutoInstrumentationPython: "python-img:1", - AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", + AnnotationDefaultAutoInstrumentationJava: "java-img:1", + AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", + AnnotationDefaultAutoInstrumentationPython: "python-img:1", + AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", + AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd-img:1", }, }, } @@ -37,6 +38,7 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { assert.Equal(t, "nodejs-img:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python-img:1", inst.Spec.Python.Image) assert.Equal(t, "dotnet-img:1", inst.Spec.DotNet.Image) + assert.Equal(t, "apache-httpd-img:1", inst.Spec.ApacheHttpd.Image) } func TestInstrumentationValidatingWebhook(t *testing.T) { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 3aba6ad2e..9b0df017e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,35 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Attrs != nil { + in, out := &in.Attrs, &out.Attrs + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApacheHttpd. +func (in *ApacheHttpd) DeepCopy() *ApacheHttpd { + if in == nil { + return nil + } + out := new(ApacheHttpd) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { *out = *in @@ -219,6 +248,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { in.NodeJS.DeepCopyInto(&out.NodeJS) in.Python.DeepCopyInto(&out.Python) in.DotNet.DeepCopyInto(&out.DotNet) + in.ApacheHttpd.DeepCopyInto(&out.ApacheHttpd) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index d5a814711..592686083 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -53,6 +53,256 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + apacheHttpd: + description: Apache defines configuration for Apache HTTPD auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Apache HTTPD agent specific attributes. + The precedence is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configPath: + description: Location of Apache HTTPD server configuration. Needed + only if different from default "/usr/local/apache2/conf" + type: string + env: + description: 'Env defines Apache HTTPD specific env vars. There + are four layers for env vars'' definitions and the precedence + order is: `original container env vars` > `language specific + env vars` > `common env vars` > `instrument spec configs'' vars`. + If the former var had been defined, then the other vars would + be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Apache SDK and auto-instrumentation. + type: string + version: + description: Apache HTTPD server version. One of 2.4 or 2.2. Default + is 2.4 + type: string + type: object dotnet: description: DotNet defines configuration for DotNet auto-instrumentation. properties: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index ba2ad97b8..20697e796 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -52,6 +52,256 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + apacheHttpd: + description: Apache defines configuration for Apache HTTPD auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Apache HTTPD agent specific attributes. + The precedence is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configPath: + description: Location of Apache HTTPD server configuration. Needed + only if different from default "/usr/local/apache2/conf" + type: string + env: + description: 'Env defines Apache HTTPD specific env vars. There + are four layers for env vars'' definitions and the precedence + order is: `original container env vars` > `language specific + env vars` > `common env vars` > `instrument spec configs'' vars`. + If the former var had been defined, then the other vars would + be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Apache SDK and auto-instrumentation. + type: string + version: + description: Apache HTTPD server version. One of 2.4 or 2.2. Default + is 2.4 + type: string + type: object dotnet: description: DotNet defines configuration for DotNet auto-instrumentation. properties: diff --git a/docs/api.md b/docs/api.md index 00f6922f1..7329db833 100644 --- a/docs/api.md +++ b/docs/api.md @@ -86,6 +86,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen + + + + +
NameTypeDescriptionRequired
terminationenum + Termination indicates termination type. By default "edge" is used.
+
+ Enum: insecure, edge, passthrough, reencrypt
false
maxReplicas integer - MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled.
+ MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead.

Format: int32
minReplicas integer - MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1
+ MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.

Format: int32
false
maxReplicasinteger + MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled.
+
+ Format: int32
+
false
minReplicasinteger + MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1
+
+ Format: int32
+
false
targetCPUUtilization integer
apacheHttpdobject + Apache defines configuration for Apache HTTPD auto-instrumentation.
+
false
dotnet object @@ -152,6 +159,553 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen
+### Instrumentation.spec.apacheHttpd +[↩ Parent](#instrumentationspec) + + + +Apache defines configuration for Apache HTTPD auto-instrumentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
attrs[]object + Attrs defines Apache HTTPD agent specific attributes. The precedence is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+
false
configPathstring + Location of Apache HTTPD server configuration. Needed only if different from default "/usr/local/apache2/conf"
+
false
env[]object + Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with Apache SDK and auto-instrumentation.
+
false
versionstring + Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index] +[↩ Parent](#instrumentationspecapachehttpd) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index].valueFrom +[↩ Parent](#instrumentationspecapachehttpdattrsindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecapachehttpdattrsindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecapachehttpdattrsindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecapachehttpdattrsindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.apacheHttpd.attrs[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecapachehttpdattrsindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index] +[↩ Parent](#instrumentationspecapachehttpd) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index].valueFrom +[↩ Parent](#instrumentationspecapachehttpdenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecapachehttpdenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecapachehttpdenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecapachehttpdenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.apacheHttpd.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecapachehttpdenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + ### Instrumentation.spec.dotnet [↩ Parent](#instrumentationspec) diff --git a/versions.txt b/versions.txt index 8bf0d08d9..88aa144d1 100644 --- a/versions.txt +++ b/versions.txt @@ -25,3 +25,7 @@ autoinstrumentation-python=0.36b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt autoinstrumentation-dotnet=0.5.0 + +# Represents the current release of Apache HTTPD instrumentation. +# Should match autoinstrumentation/apache-httpd/version.txt +autoinstrumentation-apache-httpd=1.0.2 From 195744f4c959cd8414675b27395b66a6875d924e Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Thu, 2 Feb 2023 09:19:20 +0000 Subject: [PATCH 0719/1234] register pprof endpoints for allocator (#1408) * register pprof endpoints for allocator * changelog entry * full sentence for changelog --- .chloggen/allocator-pprof.yaml | 16 ++++++++++++++++ cmd/otel-allocator/server/server.go | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100755 .chloggen/allocator-pprof.yaml diff --git a/.chloggen/allocator-pprof.yaml b/.chloggen/allocator-pprof.yaml new file mode 100755 index 000000000..0f389d5b3 --- /dev/null +++ b/.chloggen/allocator-pprof.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Register pprof endpoints under `/debug/pprof`. + +# One or more tracking issues related to the change +issues: [188] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 8bd25a8ea..a1aee2f45 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -19,6 +19,7 @@ import ( "encoding/json" "fmt" "net/http" + "net/http/pprof" "net/url" "time" @@ -78,6 +79,7 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager router.GET("/jobs", s.JobHandler) router.GET("/jobs/:job_id/targets", s.TargetsHandler) router.GET("/metrics", gin.WrapH(promhttp.Handler())) + registerPprof(router.Group("/debug/pprof/")) s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} return s @@ -192,3 +194,11 @@ func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]c } return displayData } + +func registerPprof(g *gin.RouterGroup) { + g.GET("/", gin.WrapF(pprof.Index)) + g.GET("/cmdline", gin.WrapF(pprof.Cmdline)) + g.GET("/profile", gin.WrapF(pprof.Profile)) + g.GET("/symbol", gin.WrapF(pprof.Symbol)) + g.GET("/trace", gin.WrapF(pprof.Trace)) +} From fad90a846dc42b9500fdecf5b5a6e4f5945f4712 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:26:03 +0100 Subject: [PATCH 0720/1234] Bump go.opentelemetry.io/otel in /cmd/operator-opamp-bridge (#1427) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.12.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 4 ++-- cmd/operator-opamp-bridge/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 0b4927c83..3608c9851 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,7 +10,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 - go.opentelemetry.io/otel v1.11.2 + go.opentelemetry.io/otel v1.12.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 go.opentelemetry.io/otel/metric v0.34.0 go.opentelemetry.io/otel/sdk v1.11.2 @@ -67,7 +67,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 // indirect - go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.opentelemetry.io/otel/trace v1.12.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index bdd771b44..ace799a85 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -321,8 +321,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= -go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= +go.opentelemetry.io/otel v1.12.0 h1:IgfC7kqQrRccIKuB7Cl+SRUmsKbEwSGPr0Eu+/ht1SQ= +go.opentelemetry.io/otel v1.12.0/go.mod h1:geaoz0L0r1BEOR81k7/n9W4TCXYCJ7bPO7K374jQHG0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 h1:kpskzLZ60cJ48SJ4uxWa6waBL+4kSV6nVK8rP+QM8Wg= @@ -335,8 +335,8 @@ go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNX go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU= go.opentelemetry.io/otel/sdk/metric v0.34.0 h1:7ElxfQpXCFZlRTvVRTkcUvK8Gt5DC8QzmzsLsO2gdzo= go.opentelemetry.io/otel/sdk/metric v0.34.0/go.mod h1:l4r16BIqiqPy5rd14kkxllPy/fOI4tWo1jkpD9Z3ffQ= -go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= -go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= +go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= +go.opentelemetry.io/otel/trace v1.12.0/go.mod h1:pHlgBynn6s25qJ2szD+Bv+iwKJttjHSI3lUAyf0GNuQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= From d2bf668d52419d2fd5e70efb47a6334b8c42c938 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:26:25 +0100 Subject: [PATCH 0721/1234] Bump k8s.io/apimachinery in /cmd/operator-opamp-bridge (#1425) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.0 to 0.26.1. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.0...v0.26.1) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 3608c9851..368edcdcd 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,7 +18,7 @@ require ( go.uber.org/multierr v1.6.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.26.0 + k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.0 k8s.io/klog/v2 v2.80.1 sigs.k8s.io/controller-runtime v0.14.0 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index ace799a85..591850f94 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -682,8 +682,8 @@ k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I= k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg= k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= -k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg= -k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= +k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= From f2dc6789aa5295d7aa147f0d659823c8d99d32f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:26:53 +0100 Subject: [PATCH 0722/1234] Bump k8s.io/klog/v2 from 2.80.1 to 2.90.0 in /cmd/operator-opamp-bridge (#1424) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.80.1 to 2.90.0. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.80.1...v2.90.0) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 368edcdcd..002c60f5d 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -20,7 +20,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.0 - k8s.io/klog/v2 v2.80.1 + k8s.io/klog/v2 v2.90.0 sigs.k8s.io/controller-runtime v0.14.0 ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 591850f94..82878a0da 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -688,8 +688,8 @@ k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= +k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= From 2c9a16ef21900a5e6b2de7ad27ef44d722968420 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 2 Feb 2023 10:48:43 +0100 Subject: [PATCH 0723/1234] Fix daemonset-features E2E test for OpenShift (#1354) Signed-off-by: Israel Blancas --- hack/install-metrics-server.sh | 2 +- hack/install-openshift-routes.sh | 2 +- tests/e2e/daemonset-features/00-add-scc.yaml | 4 ++++ .../{00-install.yaml => 01-install.yaml} | 4 ++-- .../{00-assert.yaml => 02-assert.yaml} | 2 -- .../03-add-sa-collector.yaml | 4 ++++ tests/e2e/daemonset-features/03-assert.yaml | 8 +++++++ .../daemonset-features/add-sa-collector.sh | 5 +++++ .../daemonset-features/add-scc-openshift.sh | 10 +++++++++ tests/e2e/daemonset-features/scc.yaml | 22 +++++++++++++++++++ 10 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 tests/e2e/daemonset-features/00-add-scc.yaml rename tests/e2e/daemonset-features/{00-install.yaml => 01-install.yaml} (90%) rename tests/e2e/daemonset-features/{00-assert.yaml => 02-assert.yaml} (90%) create mode 100644 tests/e2e/daemonset-features/03-add-sa-collector.yaml create mode 100644 tests/e2e/daemonset-features/03-assert.yaml create mode 100755 tests/e2e/daemonset-features/add-sa-collector.sh create mode 100755 tests/e2e/daemonset-features/add-scc-openshift.sh create mode 100644 tests/e2e/daemonset-features/scc.yaml diff --git a/hack/install-metrics-server.sh b/hack/install-metrics-server.sh index 10720d16a..e217a3d34 100755 --- a/hack/install-metrics-server.sh +++ b/hack/install-metrics-server.sh @@ -5,7 +5,7 @@ # you can just add --addons "metrics-server" to the start command. -if [[ "$(kubectl api-resources)" =~ "openshift" ]]; then +if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then echo "Connected to an OpenShift cluster. metrics-server installation is not needed" elif [[ "$(kubectl get deployment metrics-server -n kube-system 2>&1 )" =~ "NotFound" ]]; then kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml diff --git a/hack/install-openshift-routes.sh b/hack/install-openshift-routes.sh index d34903dbf..41464b868 100755 --- a/hack/install-openshift-routes.sh +++ b/hack/install-openshift-routes.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ "$(kubectl api-resources)" =~ "openshift" ]]; then +if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then echo "Connected to an OpenShift cluster. OpenShift routes installation is not needed" else kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router_rbac.yaml diff --git a/tests/e2e/daemonset-features/00-add-scc.yaml b/tests/e2e/daemonset-features/00-add-scc.yaml new file mode 100644 index 000000000..63d417ea9 --- /dev/null +++ b/tests/e2e/daemonset-features/00-add-scc.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: ./add-scc-openshift.sh diff --git a/tests/e2e/daemonset-features/00-install.yaml b/tests/e2e/daemonset-features/01-install.yaml similarity index 90% rename from tests/e2e/daemonset-features/00-install.yaml rename to tests/e2e/daemonset-features/01-install.yaml index 3dde940cf..a5f75ad5a 100644 --- a/tests/e2e/daemonset-features/00-install.yaml +++ b/tests/e2e/daemonset-features/01-install.yaml @@ -1,9 +1,9 @@ apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: daemonset + name: daemonset spec: - mode: daemonset + mode: daemonset hostNetwork: true config: | receivers: diff --git a/tests/e2e/daemonset-features/00-assert.yaml b/tests/e2e/daemonset-features/02-assert.yaml similarity index 90% rename from tests/e2e/daemonset-features/00-assert.yaml rename to tests/e2e/daemonset-features/02-assert.yaml index d862c1f6a..03798dbd6 100644 --- a/tests/e2e/daemonset-features/00-assert.yaml +++ b/tests/e2e/daemonset-features/02-assert.yaml @@ -10,5 +10,3 @@ spec: - args: - --config=/conf/collector.yaml name: otc-container -status: - numberReady: 1 diff --git a/tests/e2e/daemonset-features/03-add-sa-collector.yaml b/tests/e2e/daemonset-features/03-add-sa-collector.yaml new file mode 100644 index 000000000..1da56ca21 --- /dev/null +++ b/tests/e2e/daemonset-features/03-add-sa-collector.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: ./add-sa-collector.sh diff --git a/tests/e2e/daemonset-features/03-assert.yaml b/tests/e2e/daemonset-features/03-assert.yaml new file mode 100644 index 000000000..102ea5139 --- /dev/null +++ b/tests/e2e/daemonset-features/03-assert.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + app.kubernetes.io/name: daemonset-collector + app.kubernetes.io/part-of: opentelemetry +status: + phase: Running diff --git a/tests/e2e/daemonset-features/add-sa-collector.sh b/tests/e2e/daemonset-features/add-sa-collector.sh new file mode 100755 index 000000000..cdd05f78f --- /dev/null +++ b/tests/e2e/daemonset-features/add-sa-collector.sh @@ -0,0 +1,5 @@ +#!/bin/bash +if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then + echo "Adding service account to the OpenTelemetry Collector" + kubectl patch otelcol daemonset --type=merge -p '{"spec":{"serviceAccount":"otel-collector-daemonset"}}' -n $NAMESPACE +fi diff --git a/tests/e2e/daemonset-features/add-scc-openshift.sh b/tests/e2e/daemonset-features/add-scc-openshift.sh new file mode 100755 index 000000000..7412a51d1 --- /dev/null +++ b/tests/e2e/daemonset-features/add-scc-openshift.sh @@ -0,0 +1,10 @@ +#!/bin/bash +if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then + echo "Running the test against an OpenShift Cluster" + echo "Creating an Service Account" + echo "Creating a Security Context Constrain" + echo "Setting the Service Account for the Daemonset" + echo "Adding the new policy to the Service Account" + kubectl apply -f scc.yaml -n $NAMESPACE + oc adm policy add-scc-to-user -z otel-collector-daemonset daemonset-with-hostport -n $NAMESPACE +fi diff --git a/tests/e2e/daemonset-features/scc.yaml b/tests/e2e/daemonset-features/scc.yaml new file mode 100644 index 000000000..20e211716 --- /dev/null +++ b/tests/e2e/daemonset-features/scc.yaml @@ -0,0 +1,22 @@ +kind: SecurityContextConstraints +apiVersion: security.openshift.io/v1 +metadata: + name: daemonset-with-hostport + annotations: + kubernetes.io/description: 'Allows DaemonSets to bind to a well-known host port' +runAsUser: + type: RunAsAny +seLinuxContext: + type: RunAsAny +allowHostPorts: true +allowHostDirVolumePlugin: false +allowHostIPC: false +allowHostNetwork: true +allowHostPID: false +allowPrivilegedContainer: false +readOnlyRootFilesystem: false +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: otel-collector-daemonset From b7ba8ff04b810d9138a47a4686b921d716446470 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:22:45 +0100 Subject: [PATCH 0724/1234] Bump sigs.k8s.io/controller-runtime in /cmd/operator-opamp-bridge (#1437) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.0 to 0.14.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.0...v0.14.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 10 +++++----- cmd/operator-opamp-bridge/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 002c60f5d..b075a470e 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -19,9 +19,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.1 - k8s.io/client-go v0.26.0 + k8s.io/client-go v0.26.1 k8s.io/klog/v2 v2.90.0 - sigs.k8s.io/controller-runtime v0.14.0 + sigs.k8s.io/controller-runtime v0.14.2 ) require ( @@ -83,9 +83,9 @@ require ( google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.26.0 // indirect - k8s.io/apiextensions-apiserver v0.26.0 // indirect - k8s.io/component-base v0.26.0 // indirect + k8s.io/api v0.26.1 // indirect + k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/component-base v0.26.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 82878a0da..f649038aa 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -678,16 +678,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I= -k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg= -k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= -k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= +k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= +k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= +k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= +k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= -k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8= -k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg= -k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs= -k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8= +k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= +k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= +k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= @@ -697,8 +697,8 @@ k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.0 h1:ju2xsov5Ara6FoQuddg+az+rAxsUsTYn2IYyEKCTyDc= -sigs.k8s.io/controller-runtime v0.14.0/go.mod h1:GaRkrY8a7UZF0kqFFbUKG7n9ICiTY5T55P1RiE3UZlU= +sigs.k8s.io/controller-runtime v0.14.2 h1:P6IwDhbsRWsBClt/8/h8Zy36bCuGuW5Op7MHpFrN/60= +sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From 1a12ac7bb23f78a39a1b6a7f216faa034342b2f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Feb 2023 14:23:13 +0100 Subject: [PATCH 0725/1234] Bump github.com/open-telemetry/opamp-go in /cmd/operator-opamp-bridge (#1436) Bumps [github.com/open-telemetry/opamp-go](https://github.com/open-telemetry/opamp-go) from 0.5.0 to 0.6.0. - [Release notes](https://github.com/open-telemetry/opamp-go/releases) - [Commits](https://github.com/open-telemetry/opamp-go/compare/v0.5.0...v0.6.0) --- updated-dependencies: - dependency-name: github.com/open-telemetry/opamp-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index b075a470e..79ee37730 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/go-logr/logr v1.2.3 github.com/oklog/ulid/v2 v2.0.2 - github.com/open-telemetry/opamp-go v0.5.0 + github.com/open-telemetry/opamp-go v0.6.0 github.com/open-telemetry/opentelemetry-operator v1.51.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index f649038aa..2eefbbb4c 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -244,8 +244,8 @@ github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/open-telemetry/opamp-go v0.5.0 h1:2YFbb6G4qBkq3yTRdVb5Nfz9hKHW/ldUyex352e1J7g= -github.com/open-telemetry/opamp-go v0.5.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= +github.com/open-telemetry/opamp-go v0.6.0 h1:pTnVvIp9FT3qEQ8P+evENhvaQGkF8i6vu73gawBPRLQ= +github.com/open-telemetry/opamp-go v0.6.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= github.com/open-telemetry/opentelemetry-operator v1.51.0 h1:mf6E24jBnv0JvxUH2nOujiqShwA7kJcCFbhd2vdMyQQ= github.com/open-telemetry/opentelemetry-operator v1.51.0/go.mod h1:2oXRmTlK6/4gc+ipK94KKHEEf6h3PWh2NiG3doAQnwo= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= From d76bef662c4e586f25687193c05bcd97c4864e15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:23:22 +0100 Subject: [PATCH 0726/1234] Bump github.com/oklog/ulid/v2 in /cmd/operator-opamp-bridge (#1445) Bumps [github.com/oklog/ulid/v2](https://github.com/oklog/ulid) from 2.0.2 to 2.1.0. - [Release notes](https://github.com/oklog/ulid/releases) - [Changelog](https://github.com/oklog/ulid/blob/main/CHANGELOG.md) - [Commits](https://github.com/oklog/ulid/compare/v2.0.2...v2.1.0) --- updated-dependencies: - dependency-name: github.com/oklog/ulid/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 79ee37730..3f571b3c9 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/go-logr/logr v1.2.3 - github.com/oklog/ulid/v2 v2.0.2 + github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.6.0 github.com/open-telemetry/opentelemetry-operator v1.51.0 github.com/shirou/gopsutil v3.21.11+incompatible diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 2eefbbb4c..f62633f84 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -240,8 +240,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= -github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= +github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= +github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/open-telemetry/opamp-go v0.6.0 h1:pTnVvIp9FT3qEQ8P+evENhvaQGkF8i6vu73gawBPRLQ= From 831a60ceb586fd616402172cad2af29ad1243fb3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:23:37 +0100 Subject: [PATCH 0727/1234] Bump go.opentelemetry.io/otel/sdk in /cmd/operator-opamp-bridge (#1435) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.12.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...v1.12.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 3f571b3c9..525a19d6a 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -13,7 +13,7 @@ require ( go.opentelemetry.io/otel v1.12.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 go.opentelemetry.io/otel/metric v0.34.0 - go.opentelemetry.io/otel/sdk v1.11.2 + go.opentelemetry.io/otel/sdk v1.12.0 go.opentelemetry.io/otel/sdk/metric v0.34.0 go.uber.org/multierr v1.6.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index f62633f84..f1db3fa85 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -331,8 +331,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 h1:t4A go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0/go.mod h1:WO7omosl4P7JoanH9NgInxDxEn2F2M5YinIh8EyeT8w= go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/sdk v1.11.2 h1:GF4JoaEx7iihdMFu30sOyRx52HDHOkl9xQ8SMqNXUiU= -go.opentelemetry.io/otel/sdk v1.11.2/go.mod h1:wZ1WxImwpq+lVRo4vsmSOxdd+xwoUJ6rqyLc3SyX9aU= +go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= +go.opentelemetry.io/otel/sdk v1.12.0/go.mod h1:WYcvtgquYvgODEvxOry5owO2y9MyciW7JqMz6cpXShE= go.opentelemetry.io/otel/sdk/metric v0.34.0 h1:7ElxfQpXCFZlRTvVRTkcUvK8Gt5DC8QzmzsLsO2gdzo= go.opentelemetry.io/otel/sdk/metric v0.34.0/go.mod h1:l4r16BIqiqPy5rd14kkxllPy/fOI4tWo1jkpD9Z3ffQ= go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= From bc6ba4097f97e28f516fc6de731c8de1428611db Mon Sep 17 00:00:00 2001 From: fsl <1171313930@qq.com> Date: Tue, 7 Feb 2023 00:50:50 +0800 Subject: [PATCH 0728/1234] [chore] Update package dependencies (#1441) Signed-off-by: fengshunli <1171313930@qq.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 64b98fbcb..38bc0c11a 100644 --- a/go.mod +++ b/go.mod @@ -114,11 +114,11 @@ require ( go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/net v0.5.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/term v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.61.0 // indirect diff --git a/go.sum b/go.sum index 02545db47..03371cc5c 100644 --- a/go.sum +++ b/go.sum @@ -1194,8 +1194,8 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1316,13 +1316,13 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1332,8 +1332,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 89e437d5ef0a4d999d4fb60f8ca77c8126775e57 Mon Sep 17 00:00:00 2001 From: fsl <1171313930@qq.com> Date: Tue, 7 Feb 2023 00:51:03 +0800 Subject: [PATCH 0729/1234] [docs] Update README.md document Kubernetes Operator Introduction (#1440) Signed-off-by: fengshunli <1171313930@qq.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 840051d94..894175707 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # OpenTelemetry Operator for Kubernetes -The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://coreos.com/operators/). +The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). The operator manages: * [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) From 4dfbab96fb701f7911bda3e2f7d8209a4a33eaca Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 6 Feb 2023 13:27:09 -0500 Subject: [PATCH 0730/1234] Promote @jaronoff97 to maintainer (#1419) * Promote @jaronoff97 to maintainer * order, name (#1420) * Alphabetically sort (#1432) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 894175707..09f498ba8 100644 --- a/README.md +++ b/README.md @@ -453,8 +453,15 @@ Emeritus Approvers: - [Owais Lone](https://github.com/owais), Splunk - [Pablo Baeyens](https://github.com/mx-psi), DataDog +Target Allocator Maintainers ([@open-telemetry/operator-ta-maintainers](https://github.com/orgs/open-telemetry/teams/operator-ta-maintainers)): + +- [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Kristina Pathak](https://github.com/kristinapathak), Lightstep +- [Sebastian Poxhofer](https://github.com/secustor) + Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): +- [Jacob Aronoff](https://github.com/jaronoff97), Lightstep - [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - [Pavol Loffay](https://github.com/pavolloffay), Red Hat - [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale From 473a55ff99d7f6ae956fef8b6416c8b67adc8290 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:05:17 +0100 Subject: [PATCH 0731/1234] [target-allocator] Update scrape config upon discovery config apply (#1413) --- .../1413-cache-scrape-config-response.yaml | 16 ++ cmd/otel-allocator/main.go | 5 +- cmd/otel-allocator/server/bench_test.go | 8 +- cmd/otel-allocator/server/mocks_test.go | 15 +- cmd/otel-allocator/server/server.go | 79 +++--- cmd/otel-allocator/server/server_test.go | 205 +------------- cmd/otel-allocator/target/discovery.go | 53 ++-- cmd/otel-allocator/target/discovery_test.go | 250 +++++++++++++++++- 8 files changed, 352 insertions(+), 279 deletions(-) create mode 100644 .chloggen/1413-cache-scrape-config-response.yaml diff --git a/.chloggen/1413-cache-scrape-config-response.yaml b/.chloggen/1413-cache-scrape-config-response.yaml new file mode 100644 index 000000000..85f3f35f2 --- /dev/null +++ b/.chloggen/1413-cache-scrape-config-response.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "target allocator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Save the scrape config response in the HTTP server upon relevant config change, instead of building it on every handler call. At the same time, this avoids data race when accessing the scrape configs map." + +# One or more tracking issues related to the change +issues: [1359] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index da8aed31f..fbb96e640 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -84,9 +84,11 @@ func main() { setupLog.Error(err, "Unable to initialize allocation strategy") os.Exit(1) } + srv := server.NewServer(log, allocator, cliConf.ListenAddr) + discoveryCtx, discoveryCancel := context.WithCancel(ctx) discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger()) - targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook) + targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook, srv) collectorWatcher, collectorWatcherErr := collector.NewClient(log, cliConf.ClusterConfig) if collectorWatcherErr != nil { setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") @@ -97,7 +99,6 @@ func main() { setupLog.Error(err, "Can't start the file watcher") os.Exit(1) } - srv := server.NewServer(log, allocator, targetDiscoverer, cliConf.ListenAddr) signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) defer close(interrupts) diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go index 2145101fb..cd9114afb 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/server/bench_test.go @@ -24,6 +24,7 @@ import ( "github.com/gin-gonic/gin" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" + "github.com/stretchr/testify/assert" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" @@ -53,7 +54,7 @@ func BenchmarkServerTargetsHandler(b *testing.B) { listenAddr := ":8080" a.SetCollectors(cols) a.SetTargets(targets) - s := NewServer(logger, a, nil, &listenAddr) + s := NewServer(logger, a, &listenAddr) b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { @@ -77,12 +78,11 @@ func BenchmarkScrapeConfigsHandler(b *testing.B) { tests := []int{0, 5, 10, 50, 100, 500} for _, n := range tests { data := makeNScrapeConfigs(n) + assert.NoError(b, s.UpdateScrapeConfigResponse(data)) + b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - s.compareHash = 0 - s.discoveryManager = &mockDiscoveryManager{m: data} - c, _ := gin.CreateTestContext(httptest.NewRecorder()) gin.SetMode(gin.ReleaseMode) c.Request = httptest.NewRequest("GET", "/scrape_configs", nil) diff --git a/cmd/otel-allocator/server/mocks_test.go b/cmd/otel-allocator/server/mocks_test.go index 3b3988880..e44b178fa 100644 --- a/cmd/otel-allocator/server/mocks_test.go +++ b/cmd/otel-allocator/server/mocks_test.go @@ -15,24 +15,11 @@ package server import ( - promconfig "github.com/prometheus/prometheus/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" ) -var ( - _ DiscoveryManager = &mockDiscoveryManager{} - _ allocation.Allocator = &mockAllocator{} -) - -type mockDiscoveryManager struct { - m map[string]*promconfig.ScrapeConfig -} - -func (m *mockDiscoveryManager) GetScrapeConfigs() map[string]*promconfig.ScrapeConfig { - return m.m -} +var _ allocation.Allocator = &mockAllocator{} // mockAllocator implements the Allocator interface, but all funcs other than // TargetItems() are a no-op. diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index a1aee2f45..c93cfe351 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -21,12 +21,12 @@ import ( "net/http" "net/http/pprof" "net/url" + "sync" "time" yaml2 "github.com/ghodss/yaml" "github.com/gin-gonic/gin" "github.com/go-logr/logr" - "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -49,26 +49,22 @@ type collectorJSON struct { Jobs []*target.Item `json:"targets"` } -type DiscoveryManager interface { - GetScrapeConfigs() map[string]*promconfig.ScrapeConfig -} - type Server struct { - logger logr.Logger - allocator allocation.Allocator - discoveryManager DiscoveryManager - server *http.Server - - compareHash uint64 + logger logr.Logger + allocator allocation.Allocator + server *http.Server + + // Use RWMutex to protect scrapeConfigResponse, since it + // will be predominantly read and only written when config + // is applied. + mtx sync.RWMutex scrapeConfigResponse []byte } -func NewServer(log logr.Logger, allocator allocation.Allocator, discoveryManager DiscoveryManager, listenAddr *string) *Server { +func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr *string) *Server { s := &Server{ - logger: log, - allocator: allocator, - discoveryManager: discoveryManager, - compareHash: uint64(0), + logger: log, + allocator: allocator, } router := gin.Default() @@ -95,38 +91,35 @@ func (s *Server) Shutdown(ctx context.Context) error { return s.server.Shutdown(ctx) } -// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. -// The target allocator first marshals these configurations such that the underlying prometheus marshaling is used. -// After that, the YAML is converted in to a JSON format for consumers to use. -func (s *Server) ScrapeConfigsHandler(c *gin.Context) { - configs := s.discoveryManager.GetScrapeConfigs() - - hash, err := hashstructure.Hash(configs, nil) +// UpdateScrapeConfigResponse updates the scrape config response. The target allocator first marshals these +// configurations such that the underlying prometheus marshaling is used. After that, the YAML is converted +// in to a JSON format for consumers to use. +func (s *Server) UpdateScrapeConfigResponse(configs map[string]*promconfig.ScrapeConfig) error { + var configBytes []byte + configBytes, err := yaml.Marshal(configs) if err != nil { - s.logger.Error(err, "failed to hash the config") - s.errorHandler(c.Writer, err) - return + return err } - // if the hashes are different, we need to recompute the scrape config - if hash != s.compareHash { - var configBytes []byte - configBytes, err = yaml.Marshal(configs) - if err != nil { - s.errorHandler(c.Writer, err) - return - } - var jsonConfig []byte - jsonConfig, err = yaml2.YAMLToJSON(configBytes) - if err != nil { - s.errorHandler(c.Writer, err) - return - } - s.scrapeConfigResponse = jsonConfig - s.compareHash = hash + var jsonConfig []byte + jsonConfig, err = yaml2.YAMLToJSON(configBytes) + if err != nil { + return err } + s.mtx.Lock() + s.scrapeConfigResponse = jsonConfig + s.mtx.Unlock() + return nil +} + +// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. +func (s *Server) ScrapeConfigsHandler(c *gin.Context) { + s.mtx.RLock() + result := s.scrapeConfigResponse + s.mtx.RUnlock() + // We don't use the jsonHandler method because we don't want our bytes to be re-encoded c.Writer.Header().Set("Content-Type", "application/json") - _, err = c.Writer.Write(s.scrapeConfigResponse) + _, err := c.Writer.Write(result) if err != nil { s.errorHandler(c.Writer, err) } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 9dd90728c..01fc819a8 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -24,7 +24,6 @@ import ( "testing" "time" - "github.com/gin-gonic/gin" "github.com/prometheus/common/config" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" @@ -155,7 +154,7 @@ func TestServer_TargetsHandler(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { listenAddr := ":8080" - s := NewServer(logger, tt.args.allocator, nil, &listenAddr) + s := NewServer(logger, tt.args.allocator, &listenAddr) tt.args.allocator.SetCollectors(map[string]*allocation.Collector{"test-collector": {Name: "test-collector"}}) tt.args.allocator.SetTargets(tt.args.cMap) request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/%s/targets?collector_id=%s", tt.args.job, tt.args.collector), nil) @@ -191,13 +190,13 @@ func TestServer_ScrapeConfigsHandler(t *testing.T) { description: "nil scrape config", scrapeConfigs: nil, expectedCode: http.StatusOK, - expectedBody: []byte{}, + expectedBody: []byte("{}"), }, { description: "empty scrape config", scrapeConfigs: map[string]*promconfig.ScrapeConfig{}, expectedCode: http.StatusOK, - expectedBody: []byte{}, + expectedBody: []byte("{}"), }, { description: "single entry", @@ -446,8 +445,9 @@ func TestServer_ScrapeConfigsHandler(t *testing.T) { for _, tc := range tests { t.Run(tc.description, func(t *testing.T) { listenAddr := ":8080" - dm := &mockDiscoveryManager{m: tc.scrapeConfigs} - s := NewServer(logger, nil, dm, &listenAddr) + s := NewServer(logger, nil, &listenAddr) + assert.NoError(t, s.UpdateScrapeConfigResponse(tc.scrapeConfigs)) + request := httptest.NewRequest("GET", "/scrape_configs", nil) w := httptest.NewRecorder() @@ -469,197 +469,6 @@ func TestServer_ScrapeConfigsHandler(t *testing.T) { } } -func TestScrapeConfigsHandler_Hashing(t *testing.T) { - s := &Server{logger: logger} - // these tests are meant to be run sequentially in this order, to test - // that hashing doesn't cause us to send the wrong information. - tests := []struct { - description string - scrapeConfigs map[string]*promconfig.ScrapeConfig - }{ - { - description: "base config", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - { - description: "different bool", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - { - description: "different job name", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - { - description: "different key", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/1": { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - { - description: "unset scrape interval", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/1": { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - //{ - // - // TODO: fix handler logic so this test passes. - // This test currently fails due to the regexp struct not having any - // exported fields for the hashing algorithm to hash on, causing the - // hashes to be the same even though the data is different. - // - // description: "different regex", - // scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - // "serviceMonitor/testapp/testapp/1": { - // JobName: "serviceMonitor/testapp/testapp/1", - // HonorTimestamps: false, - // ScrapeTimeout: model.Duration(30 * time.Second), - // MetricsPath: "/metrics", - // HTTPClientConfig: config.HTTPClientConfig{ - // FollowRedirects: true, - // }, - // RelabelConfigs: []*relabel.Config{ - // { - // SourceLabels: model.LabelNames{model.LabelName("job")}, - // Separator: ";", - // Regex: relabel.MustNewRegexp("something else"), - // TargetLabel: "__tmp_prometheus_job_name", - // Replacement: "$$1", - // Action: relabel.Replace, - // }, - // }, - // }, - // }, - //}, - } - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - dm := &mockDiscoveryManager{m: tc.scrapeConfigs} - s.discoveryManager = dm - w := httptest.NewRecorder() - c, _ := gin.CreateTestContext(w) - gin.SetMode(gin.ReleaseMode) - c.Request = httptest.NewRequest("GET", "/scrape_configs", nil) - - s.ScrapeConfigsHandler(c) - result := w.Result() - - assert.Equal(t, http.StatusOK, result.StatusCode) - bodyBytes, err := io.ReadAll(result.Body) - require.NoError(t, err) - scrapeConfigResult := map[string]*promconfig.ScrapeConfig{} - err = yaml.Unmarshal(bodyBytes, scrapeConfigResult) - require.NoError(t, err) - assert.Equal(t, tc.scrapeConfigs, scrapeConfigResult) - }) - } -} - func TestServer_JobHandler(t *testing.T) { tests := []struct { description string @@ -709,7 +518,7 @@ func TestServer_JobHandler(t *testing.T) { t.Run(tc.description, func(t *testing.T) { listenAddr := ":8080" a := &mockAllocator{targetItems: tc.targetItems} - s := NewServer(logger, a, nil, &listenAddr) + s := NewServer(logger, a, &listenAddr) request := httptest.NewRequest("GET", "/jobs", nil) w := httptest.NewRecorder() diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go index 4726fabc2..9b7639970 100644 --- a/cmd/otel-allocator/target/discovery.go +++ b/cmd/otel-allocator/target/discovery.go @@ -16,6 +16,7 @@ package target import ( "github.com/go-logr/logr" + "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" @@ -34,31 +35,34 @@ var ( ) type Discoverer struct { - log logr.Logger - manager *discovery.Manager - close chan struct{} - configsMap map[allocatorWatcher.EventSource]*config.Config - jobToScrapeConfig map[string]*config.ScrapeConfig - hook discoveryHook + log logr.Logger + manager *discovery.Manager + close chan struct{} + configsMap map[allocatorWatcher.EventSource]*config.Config + jobToScrapeConfig map[string]*config.ScrapeConfig + hook discoveryHook + scrapeConfigsHash uint64 + scrapeConfigsUpdater scrapeConfigsUpdater } type discoveryHook interface { SetConfig(map[string][]*relabel.Config) } -func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHook) *Discoverer { - return &Discoverer{ - log: log, - manager: manager, - close: make(chan struct{}), - configsMap: make(map[allocatorWatcher.EventSource]*config.Config), - jobToScrapeConfig: make(map[string]*config.ScrapeConfig), - hook: hook, - } +type scrapeConfigsUpdater interface { + UpdateScrapeConfigResponse(map[string]*config.ScrapeConfig) error } -func (m *Discoverer) GetScrapeConfigs() map[string]*config.ScrapeConfig { - return m.jobToScrapeConfig +func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHook, scrapeConfigsUpdater scrapeConfigsUpdater) *Discoverer { + return &Discoverer{ + log: log, + manager: manager, + close: make(chan struct{}), + configsMap: make(map[allocatorWatcher.EventSource]*config.Config), + jobToScrapeConfig: make(map[string]*config.ScrapeConfig), + hook: hook, + scrapeConfigsUpdater: scrapeConfigsUpdater, + } } func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { @@ -75,6 +79,21 @@ func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *confi } } + hash, err := hashstructure.Hash(m.jobToScrapeConfig, nil) + if err != nil { + return err + } + // If the hash has changed, updated stored hash and send the new config. + // Otherwise skip updating scrape configs. + if m.scrapeConfigsUpdater != nil && m.scrapeConfigsHash != hash { + err := m.scrapeConfigsUpdater.UpdateScrapeConfigResponse(m.jobToScrapeConfig) + if err != nil { + return err + } + + m.scrapeConfigsHash = hash + } + if m.hook != nil { m.hook.SetConfig(relabelCfg) } diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index ab9ad547c..6230c958a 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -16,11 +16,17 @@ package target import ( "context" + "errors" "sort" "testing" + "time" gokitlog "github.com/go-kit/log" + commonconfig "github.com/prometheus/common/config" + "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/assert" ctrl "sigs.k8s.io/controller-runtime" @@ -54,7 +60,7 @@ func TestDiscovery(t *testing.T) { } ctx, cancelFunc := context.WithCancel(context.Background()) d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, nil) defer close(manager.close) defer cancelFunc() @@ -88,3 +94,245 @@ func TestDiscovery(t *testing.T) { }) } } + +func TestDiscovery_ScrapeConfigHashing(t *testing.T) { + // these tests are meant to be run sequentially in this order, to test + // that hashing doesn't cause us to send the wrong information. + tests := []struct { + description string + cfg *promconfig.Config + expectErr bool + }{ + { + description: "base config", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, + { + description: "different bool", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, + { + description: "different job name", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, + { + description: "different key", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, + { + description: "unset scrape interval", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, + { + description: "mock error on update - no hash update", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "error", + }, + }, + }, + expectErr: true, + }, + // { + // TODO: fix handler logic so this test passes. + // This test currently fails due to the regexp struct not having any + // exported fields for the hashing algorithm to hash on, causing the + // hashes to be the same even though the data is different. + // description: "different regex", + // cfg: &promconfig.Config{ + // ScrapeConfigs: []*promconfig.ScrapeConfig{ + // { + // JobName: "serviceMonitor/testapp/testapp/1", + // HonorTimestamps: false, + // ScrapeTimeout: model.Duration(30 * time.Second), + // MetricsPath: "/metrics", + // HTTPClientConfig: commonconfig.HTTPClientConfig{ + // FollowRedirects: true, + // }, + // RelabelConfigs: []*relabel.Config{ + // { + // SourceLabels: model.LabelNames{model.LabelName("job")}, + // Separator: ";", + // Regex: relabel.MustNewRegexp("something else"), + // TargetLabel: "__tmp_prometheus_job_name", + // Replacement: "$$1", + // Action: relabel.Replace, + // }, + // }, + // }, + // }, + // }, + // }, + } + var ( + lastValidHash uint64 + lastValidConfig map[string]*promconfig.ScrapeConfig + ) + + scu := &mockScrapeConfigUpdater{} + ctx := context.Background() + d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) + + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, tc.cfg) + if !tc.expectErr { + assert.NoError(t, err) + assert.NotZero(t, manager.scrapeConfigsHash) + // Assert that scrape configs in manager are correctly + // reflected in the scrape job updater. + assert.Equal(t, manager.jobToScrapeConfig, scu.mockCfg) + + lastValidHash = manager.scrapeConfigsHash + lastValidConfig = manager.jobToScrapeConfig + } else { + // In case of error, assert that we retain the last + // known valid config. + assert.Error(t, err) + assert.Equal(t, lastValidHash, manager.scrapeConfigsHash) + assert.Equal(t, lastValidConfig, manager.jobToScrapeConfig) + assert.Equal(t, lastValidConfig, scu.mockCfg) + } + + }) + } +} + +var _ scrapeConfigsUpdater = &mockScrapeConfigUpdater{} + +// mockScrapeConfigUpdater is a mock implementation of the scrapeConfigsUpdater. +// If a job with name "error" is provided to the UpdateScrapeConfigResponse, +// it will return an error for testing purposes. +type mockScrapeConfigUpdater struct { + mockCfg map[string]*promconfig.ScrapeConfig +} + +func (m *mockScrapeConfigUpdater) UpdateScrapeConfigResponse(cfg map[string]*promconfig.ScrapeConfig) error { + if _, ok := cfg["error"]; ok { + return errors.New("error") + } + + m.mockCfg = cfg + return nil +} From cbc5958b4c989ef0bb801cb851616fd9d492aa77 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 7 Feb 2023 09:20:07 -0500 Subject: [PATCH 0732/1234] Update bridge and allocator dependencies (#1450) --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- cmd/otel-allocator/go.mod | 27 ++++++++++++----------- cmd/otel-allocator/go.sum | 37 ++++++++++++++++++++++++++++++++ 4 files changed, 55 insertions(+), 15 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 525a19d6a..301cd1478 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -71,7 +71,7 @@ require ( go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect + golang.org/x/net v0.4.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.3.0 // indirect golang.org/x/term v0.3.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index f1db3fa85..edd0662a4 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -419,8 +419,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= -golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 214cf5ec8..c01ba4b21 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -7,7 +7,7 @@ require ( github.com/cespare/xxhash/v2 v2.1.2 github.com/fsnotify/fsnotify v1.5.4 github.com/ghodss/yaml v1.0.0 - github.com/gin-gonic/gin v1.5.0 + github.com/gin-gonic/gin v1.8.2 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/mitchellh/hashstructure v1.1.0 @@ -19,7 +19,7 @@ require ( github.com/prometheus/common v0.37.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.24.3 k8s.io/apimachinery v0.24.3 @@ -77,10 +77,12 @@ require ( github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.21.1 // indirect github.com/go-openapi/validate v0.21.0 // indirect - github.com/go-playground/locales v0.13.0 // indirect - github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-playground/locales v0.14.0 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/validator/v10 v10.11.1 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect + github.com/goccy/go-json v0.9.11 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -116,11 +118,11 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect - github.com/leodido/go-urn v1.2.0 // indirect + github.com/leodido/go-urn v1.2.1 // indirect github.com/linode/linodego v1.8.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-isatty v0.0.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/miekg/dns v1.1.50 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -133,6 +135,7 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 // indirect @@ -144,9 +147,9 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.4.0 // indirect github.com/thanos-io/thanos v0.24.0-rc.1 // indirect - github.com/ugorji/go/codec v1.1.7 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - go.mongodb.org/mongo-driver v1.10.0 // indirect + go.mongodb.org/mongo-driver v1.11.1 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel v1.9.0 // indirect go.opentelemetry.io/otel/trace v1.9.0 // indirect @@ -156,12 +159,12 @@ require ( go.uber.org/zap v1.19.1 // indirect golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced // indirect + golang.org/x/net v0.4.0 // indirect golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 // indirect golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/term v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect golang.org/x/tools v0.1.12 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index caed1fb18..7e4cb61bf 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -442,6 +442,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.5.0 h1:fi+bqFAx/oLK54somfCtEZs9HeH1LHVoEPUgARpTqyc= github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= +github.com/gin-gonic/gin v1.8.2 h1:UzKToD9/PoFj/V4rvlKqTRKnQYyz8Sc1MJlv4JHPtvY= +github.com/gin-gonic/gin v1.8.2/go.mod h1:qw5AYuDrzRTnhvusDsrov+fDIxp9Dleuu12h8nfB398= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -589,10 +591,16 @@ github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvSc github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-redis/redis/v8 v8.0.0-beta.10.0.20200905143926-df7fe4e2ce72/go.mod h1:CJP1ZIHwhosNYwIdaHPZK9vHsM3+roNBaZ7U9Of1DXc= github.com/go-redis/redis/v8 v8.2.3/go.mod h1:ysgGY09J/QeDYbu3HikWEIPCwaeOkuNoTgKayTEaEOw= github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= @@ -634,6 +642,8 @@ github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY9 github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= github.com/gocql/gocql v0.0.0-20200121121104-95d072f1b5bb/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= @@ -1019,6 +1029,8 @@ github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkO github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -1064,6 +1076,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -1231,12 +1245,16 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1362,6 +1380,7 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= @@ -1442,6 +1461,7 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1452,6 +1472,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= @@ -1489,8 +1511,11 @@ github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1575,6 +1600,8 @@ go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4x go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= +go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= +go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1681,6 +1708,7 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= @@ -1820,6 +1848,8 @@ golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2002,11 +2032,16 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2018,6 +2053,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 3a8b54636d22f90a8ef323123b1d361d9067c02a Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Tue, 7 Feb 2023 23:37:21 +0100 Subject: [PATCH 0733/1234] Use assert.ElementsMatch instead of assert.Equal (#1457) Signed-off-by: Matej Gera --- cmd/otel-allocator/server/server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 01fc819a8..c58f5dc6b 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -174,7 +174,7 @@ func TestServer_TargetsHandler(t *testing.T) { var itemResponse []*target.Item err = json.Unmarshal(bodyBytes, &itemResponse) assert.NoError(t, err) - assert.Equal(t, tt.want.items, itemResponse) + assert.ElementsMatch(t, tt.want.items, itemResponse) }) } } From 55eaffcb4763ccf0513c5047c490dc286bb2e45b Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:55:59 +0100 Subject: [PATCH 0734/1234] [target-allocator] Use `gin` in release mode and without default logger middleware (#1414) * Use gin in release mode and without default logger middleware Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera --- .chloggen/1414-adjust-gin-config.yaml | 16 ++++++++++++++++ cmd/otel-allocator/server/server.go | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .chloggen/1414-adjust-gin-config.yaml diff --git a/.chloggen/1414-adjust-gin-config.yaml b/.chloggen/1414-adjust-gin-config.yaml new file mode 100644 index 000000000..95c455ab4 --- /dev/null +++ b/.chloggen/1414-adjust-gin-config.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "target allocator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Configure `gin` router to be used in release mode and do not use the default logging middleware which is noisy and not formatted properly." + +# One or more tracking issues related to the change +issues: [1352] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index c93cfe351..fe769bb4e 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -67,7 +67,9 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr *stri allocator: allocator, } - router := gin.Default() + gin.SetMode(gin.ReleaseMode) + router := gin.New() + router.Use(gin.Recovery()) router.UseRawPath = true router.UnescapePathValues = false router.Use(s.PrometheusMiddleware) From 1176738f07310e551a8e0850212eb38edef4f19b Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 8 Feb 2023 13:50:16 +0100 Subject: [PATCH 0735/1234] Release v0.69.0 (#1448) * Release v0.69.0 Signed-off-by: Yuri Sa * Remove all old chlogg files Signed-off-by: Yuri Sa * Adding new PRs Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/1305-apache-httpd-crd.yaml | 16 -------------- ...eplace-deperecated-gorilla-dependency.yaml | 16 -------------- .chloggen/allocator-pprof.yaml | 16 -------------- .chloggen/improve-server-tests.yaml | 16 -------------- .chloggen/inject-any-namespace.yaml | 16 -------------- CHANGELOG.md | 21 +++++++++++++++++++ README.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 6 +++--- 9 files changed, 28 insertions(+), 87 deletions(-) delete mode 100644 .chloggen/1305-apache-httpd-crd.yaml delete mode 100644 .chloggen/1383-replace-deperecated-gorilla-dependency.yaml delete mode 100755 .chloggen/allocator-pprof.yaml delete mode 100755 .chloggen/improve-server-tests.yaml delete mode 100755 .chloggen/inject-any-namespace.yaml diff --git a/.chloggen/1305-apache-httpd-crd.yaml b/.chloggen/1305-apache-httpd-crd.yaml deleted file mode 100644 index 01d80814b..000000000 --- a/.chloggen/1305-apache-httpd-crd.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR adds CRD for Apache HTTPD auto-instrumentation - -# One or more tracking issues related to the change -issues: [1305] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml b/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml deleted file mode 100644 index 55337914d..000000000 --- a/.chloggen/1383-replace-deperecated-gorilla-dependency.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "target allocator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Replace deprecated dependency `gorilla/mux` with `gin` and adjust HTTP method signatures and configuration to correspond functionally to existing code." - -# One or more tracking issues related to the change -issues: [1352] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/allocator-pprof.yaml b/.chloggen/allocator-pprof.yaml deleted file mode 100755 index 0f389d5b3..000000000 --- a/.chloggen/allocator-pprof.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Register pprof endpoints under `/debug/pprof`. - -# One or more tracking issues related to the change -issues: [188] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/improve-server-tests.yaml b/.chloggen/improve-server-tests.yaml deleted file mode 100755 index 582d0eaf4..000000000 --- a/.chloggen/improve-server-tests.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Added test coverage for server handling. - -# One or more tracking issues related to the change -issues: [1392] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/inject-any-namespace.yaml b/.chloggen/inject-any-namespace.yaml deleted file mode 100755 index 9288e9c39..000000000 --- a/.chloggen/inject-any-namespace.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Support sidecar injecton into any namespace. - -# One or more tracking issues related to the change -issues: [199] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0f7a732..ae6187444 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ Changes by Version ================== +0.69.0 +------------------ +### 🚩 Deprecations 🚩 +* `target allocator`: Replace deprecated `gorilla/mux` dependency with `gin` ([#1383](https://github.com/open-telemetry/opentelemetry-operator/pull/1383), [@matej-g](https://github.com/matej-g)) +### 💡 Enhancements 💡 +* `operator`: CRD defs for Apache HTTPD Autoinstrumentation ([#1305](https://github.com/open-telemetry/opentelemetry-operator/pull/1305), [@chrlic](https://github.com/chrlic)) +* `operator`: Inject otelcol sidecar into any namespace ([#1395](https://github.com/open-telemetry/opentelemetry-operator/pull/1395), [@pavolloffay](https://github.com/pavolloffay)) +* `operator`: Update bridge and allocator dependencies ([#1450](https://github.com/open-telemetry/opentelemetry-operator/pull/1450), [@jaronoff97](https://github.com/jaronoff97)) +* `target allocator`: register pprof endpoints for allocator ([#1408](https://github.com/open-telemetry/opentelemetry-operator/pull/1408), [@seankhliao](https://github.com/seankhliao)) +* `target allocator`: Addtl server unit tests ([#1357](https://github.com/open-telemetry/opentelemetry-operator/pull/1357), [@kristinapathak](https://github.com/kristinapathak)) +* `target-allocator`: Use `gin` in release mode and without default logger middleware ([#1414](https://github.com/open-telemetry/opentelemetry-operator/pull/1414), [@matej-g](https://github.com/matej-g)) +* `operator`: Update README.md document Kubernetes Operator Introduction ([#1440](https://github.com/open-telemetry/opentelemetry-operator/pull/1440), [@fengshunli](https://github.com/fengshunli)) +* `operator`: Update package dependencies ([#1441](https://github.com/open-telemetry/opentelemetry-operator/pull/1441), [@fengshunli](https://github.com/fengshunli)) +### 🧰 Bug fixes 🧰 +* `operator`: Fix daemonset-features E2E test for OpenShift ([#1354](https://github.com/open-telemetry/opentelemetry-operator/pull/1354), [@iblancasa](https://github.com/iblancasa)) +* `operator`: Fix E2E autoscale test for OpenShift ([#1365](https://github.com/open-telemetry/opentelemetry-operator/pull/1365), [@iblancasa](https://github.com/iblancasa)) +* `target allocator`: Fix Target Allocator tests ([#1403](https://github.com/open-telemetry/opentelemetry-operator/pull/1403), [@jaronoff97](https://github.com/jaronoff97)) +#### OpenTelemetry Collector and Contrib +* [OpenTelemetry Collector - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.69.0) +* [OpenTelemetry Contrib - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.69.0) + 0.68.0 ------------------ ### 🚩 Deprecations 🚩 diff --git a/README.md b/README.md index 09f498ba8..59e235c85 100644 --- a/README.md +++ b/README.md @@ -410,6 +410,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.69.0 | v1.19 to v1.25 | v1 | | v0.68.0 | v1.19 to v1.25 | v1 | | v0.67.0 | v1.19 to v1.25 | v1 | | v0.66.0 | v1.19 to v1.25 | v1 | @@ -431,7 +432,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.49.0 | v1.19 to v1.23 | v1alpha2 | | v0.48.0 | v1.19 to v1.23 | v1alpha2 | | v0.47.0 | v1.19 to v1.23 | v1alpha2 | -| v0.46.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index a4b06995b..0a215f816 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.68.0 + name: opentelemetry-operator.v0.69.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.68.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.69.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.68.0 + version: 0.69.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 88aa144d1..501d278dc 100644 --- a/versions.txt +++ b/versions.txt @@ -2,13 +2,13 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.68.0 +opentelemetry-collector=0.69.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.68.0 +operator=0.69.0 # Represents the current release of the Target Allocator. -targetallocator=0.68.0 +targetallocator=0.69.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From 75e9196ef8631df7fe441a7fb89fcb28b2aafb21 Mon Sep 17 00:00:00 2001 From: fsl <1171313930@qq.com> Date: Wed, 8 Feb 2023 22:51:44 +0800 Subject: [PATCH 0736/1234] [chore] Comment format (#1458) Signed-off-by: fengshunli <1171313930@qq.com> --- cmd/otel-allocator/target/target.go | 2 +- internal/config/main.go | 2 +- pkg/collector/volumeclaim_test.go | 2 +- pkg/instrumentation/upgrade/upgrade.go | 2 +- pkg/naming/main.go | 4 ++-- pkg/targetallocator/volume_test.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/target/target.go index 51940f47d..ee5d58cf9 100644 --- a/cmd/otel-allocator/target/target.go +++ b/cmd/otel-allocator/target/target.go @@ -21,7 +21,7 @@ import ( "github.com/prometheus/common/model" ) -// This package contains common structs and methods that relate to scrape targets. +// LinkJSON This package contains common structs and methods that relate to scrape targets. type LinkJSON struct { Link string `json:"_link"` } diff --git a/internal/config/main.go b/internal/config/main.go index 1f4ef087d..317b6945a 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -185,7 +185,7 @@ func (c *Config) AutoInstrumentationDotNetImage() string { return c.autoInstrumentationDotNetImage } -// Returns the filters converted to regex strings used to filter out unwanted labels from propagations. +// LabelsFilter Returns the filters converted to regex strings used to filter out unwanted labels from propagations. func (c *Config) LabelsFilter() []string { return c.labelsFilter } diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index 7cf47c42b..b082b4abd 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -59,7 +59,7 @@ func TestVolumeClaimAllowsUserToAdd(t *testing.T) { // check the access mode is correct assert.Equal(t, corev1.PersistentVolumeAccessMode("ReadWriteOnce"), volumeClaims[0].Spec.AccessModes[0]) - //check the storage is correct + // check the storage is correct assert.Equal(t, resource.MustParse("1Gi"), volumeClaims[0].Spec.Resources.Requests["storage"]) } diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 1dc9c7f54..b42d9cb90 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -34,7 +34,7 @@ type InstrumentationUpgrade struct { DefaultAutoInstDotNet string } -//+kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch // ManagedInstances upgrades managed instances by the opentelemetry-operator. func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { diff --git a/pkg/naming/main.go b/pkg/naming/main.go index ff7f7cd9a..af53636ef 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -59,12 +59,12 @@ func HorizontalPodAutoscaler(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } -// HorizontalPodAutoscaler builds the collector (deployment/daemonset) name based on the instance. +// OpenTelemetryCollector builds the collector (deployment/daemonset) name based on the instance. func OpenTelemetryCollector(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s", 63, otelcol.Name)) } -// HorizontalPodAutoscaler builds the collector (deployment/daemonset) name based on the instance. +// OpenTelemetryCollectorName builds the collector (deployment/daemonset) name based on the instance. func OpenTelemetryCollectorName(otelcolName string) string { return DNSName(Truncate("%s", 63, otelcolName)) } diff --git a/pkg/targetallocator/volume_test.go b/pkg/targetallocator/volume_test.go index aeaef7c92..d94d910ef 100644 --- a/pkg/targetallocator/volume_test.go +++ b/pkg/targetallocator/volume_test.go @@ -35,7 +35,7 @@ func TestVolumeNewDefault(t *testing.T) { // verify assert.Len(t, volumes, 1) - //check if the number of elements in the volume source items list is 1 + // check if the number of elements in the volume source items list is 1 assert.Len(t, volumes[0].VolumeSource.ConfigMap.Items, 1) // check that it's the ta-internal volume, with the config map From 6d3da4219a9027aa49728d14036b84d47071b347 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 8 Feb 2023 21:13:43 +0530 Subject: [PATCH 0737/1234] Adds Github action for publishing container image of Operator OpAMP Bridge (#1455) * adds github action for publishing container image of operator opamp bridge * changes version and fixes failing test * renames opamp bridge version variable * changes version of opamp bridge --- .../add-cicd-for-opamp-bridge-container.yaml | 16 +++++ .github/workflows/publish-images.yaml | 2 + .../publish-operator-opamp-bridge.yaml | 70 +++++++++++++++++++ Makefile | 2 +- versions.txt | 5 +- 5 files changed, 93 insertions(+), 2 deletions(-) create mode 100755 .chloggen/add-cicd-for-opamp-bridge-container.yaml create mode 100644 .github/workflows/publish-operator-opamp-bridge.yaml diff --git a/.chloggen/add-cicd-for-opamp-bridge-container.yaml b/.chloggen/add-cicd-for-opamp-bridge-container.yaml new file mode 100755 index 000000000..94de0b363 --- /dev/null +++ b/.chloggen/add-cicd-for-opamp-bridge-container.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: github action + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "This PR adds github action for publishing the `Operator OpAMP Bridge` container image to Github Container Registry." + +# One or more tracking issues related to the change +issues: [1369] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 56edfe467..b59d43933 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -24,6 +24,7 @@ jobs: run: | grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "TARGETALLOCATOR_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep operator-opamp-bridge | awk -F= '{print "OPERATOR_OPAMP_BRIDGE_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print "AUTO_INSTRUMENTATION_JAVA_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV @@ -79,6 +80,7 @@ jobs: VERSION_DATE=${{ env.VERSION_DATE }} OTELCOL_VERSION=${{ env.OTELCOL_VERSION }} TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }} + OPERATOR_OPAMP_BRIDGE_VERSION=${{ env.OPERATOR_OPAMP_BRIDGE_VERSION }} AUTO_INSTRUMENTATION_JAVA_VERSION=${{ env.AUTO_INSTRUMENTATION_JAVA_VERSION }} AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }} diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml new file mode 100644 index 000000000..c76354628 --- /dev/null +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -0,0 +1,70 @@ +name: "Publish Operator OpAMP Bridge" + +on: + push: + paths: + - 'cmd/operator-opamp-bridge/**' + - '.github/workflows/publish-operator-opamp-bridge.yaml' + branches: + - main + tags: + - 'v*' + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - name: Read version + run: | + echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV + echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{raw}} + type=ref,event=branch + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: cmd/operator-opamp-bridge + platforms: linux/amd64,linux/arm64 + push: true + build-args: | + VERSION=${{ env.VERSION }} + VERSION_DATE=${{ env.VERSION_DATE }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Makefile b/Makefile index a2f1d5bdf..58c051d23 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION ?= "$(shell git describe --tags | sed 's/^v//')" VERSION_DATE ?= $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/version" OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" -OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator | awk -F= '{print $$2}')" +OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator= | awk -F= '{print $$2}')" TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" diff --git a/versions.txt b/versions.txt index 501d278dc..ac4a508c7 100644 --- a/versions.txt +++ b/versions.txt @@ -10,6 +10,9 @@ operator=0.69.0 # Represents the current release of the Target Allocator. targetallocator=0.69.0 +# Represents the current release of the Operator OpAMP Bridge. +operator-opamp-bridge=0.69.0 + # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt autoinstrumentation-java=1.22.1 @@ -28,4 +31,4 @@ autoinstrumentation-dotnet=0.5.0 # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt -autoinstrumentation-apache-httpd=1.0.2 +autoinstrumentation-apache-httpd=1.0.2 \ No newline at end of file From c60815bb579346a742c2f03675f832f39c581ea8 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 14 Feb 2023 22:02:02 +0530 Subject: [PATCH 0738/1234] Add Operator-Opamp-Bridge build and version info to Operator (#1467) * adds operator-opamp-bridge build info to operator * adds changelog --- ...r-opamp-bridge-version-info-to-operator.yaml | 16 ++++++++++++++++ Dockerfile | 3 ++- Makefile | 5 +++-- internal/config/main.go | 2 ++ internal/config/options.go | 7 ++++++- internal/version/main.go | 17 ++++++++++++++++- main.go | 4 ++++ 7 files changed, 49 insertions(+), 5 deletions(-) create mode 100755 .chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml diff --git a/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml b/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml new file mode 100755 index 000000000..b02174d8b --- /dev/null +++ b/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Add `Operator-OpAMP-Bridge` version info to Operator" + +# One or more tracking issues related to the change +issues: [1455] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Dockerfile b/Dockerfile index 89a589723..6a025312c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,13 +22,14 @@ ARG VERSION ARG VERSION_DATE ARG OTELCOL_VERSION ARG TARGETALLOCATOR_VERSION +ARG OPERATOR_OPAMP_BRIDGE_VERSION ARG AUTO_INSTRUMENTATION_JAVA_VERSION ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION ARG AUTO_INSTRUMENTATION_DOTNET_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 58c051d23..febd731c7 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,13 @@ VERSION_PKG ?= "github.com/open-telemetry/opentelemetry-operator/internal/versio OTELCOL_VERSION ?= "$(shell grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print $$2}')" OPERATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator= | awk -F= '{print $$2}')" TARGETALLOCATOR_VERSION ?= "$(shell grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print $$2}')" +OPERATOR_OPAMP_BRIDGE_VERSION ?= "$(shell grep -v '\#' versions.txt | grep operator-opamp-bridge | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets @@ -192,7 +193,7 @@ scorecard-tests: operator-sdk # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . + docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push diff --git a/internal/config/main.go b/internal/config/main.go index 317b6945a..00ff35e20 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -38,6 +38,7 @@ type Config struct { autoDetect autodetect.AutoDetect logger logr.Logger targetAllocatorImage string + operatorOpAMPBridgeImage string autoInstrumentationPythonImage string collectorImage string collectorConfigMapEntry string @@ -75,6 +76,7 @@ func New(opts ...Option) Config { collectorImage: o.collectorImage, collectorConfigMapEntry: o.collectorConfigMapEntry, targetAllocatorImage: o.targetAllocatorImage, + operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, logger: o.logger, onPlatformChange: o.onPlatformChange, diff --git a/internal/config/options.go b/internal/config/options.go index c1e5993da..161ec8884 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -41,6 +41,7 @@ type options struct { collectorConfigMapEntry string targetAllocatorConfigMapEntry string targetAllocatorImage string + operatorOpAMPBridgeImage string onPlatformChange changeHandler labelsFilter []string platform platformStore @@ -63,7 +64,11 @@ func WithTargetAllocatorImage(s string) Option { o.targetAllocatorImage = s } } - +func WithOperatorOpAMPBridgeImage(s string) Option { + return func(o *options) { + o.operatorOpAMPBridgeImage = s + } +} func WithCollectorImage(s string) Option { return func(o *options) { o.collectorImage = s diff --git a/internal/version/main.go b/internal/version/main.go index d6e7cf1db..d941920a6 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -25,6 +25,7 @@ var ( buildDate string otelCol string targetAllocator string + operatorOpAMPBridge string autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string @@ -38,6 +39,7 @@ type Version struct { OpenTelemetryCollector string `json:"opentelemetry-collector-version"` Go string `json:"go-version"` TargetAllocator string `json:"target-allocator-version"` + OperatorOpAMPBridge string `json:"operator-opamp-bridge"` AutoInstrumentationJava string `json:"auto-instrumentation-java"` AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` AutoInstrumentationPython string `json:"auto-instrumentation-python"` @@ -52,6 +54,7 @@ func Get() Version { OpenTelemetryCollector: OpenTelemetryCollector(), Go: runtime.Version(), TargetAllocator: TargetAllocator(), + OperatorOpAMPBridge: OperatorOpAMPBridge(), AutoInstrumentationJava: AutoInstrumentationJava(), AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), AutoInstrumentationPython: AutoInstrumentationPython(), @@ -61,12 +64,13 @@ func Get() Version { func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, v.Go, v.TargetAllocator, + v.OperatorOpAMPBridge, v.AutoInstrumentationJava, v.AutoInstrumentationNodeJS, v.AutoInstrumentationPython, @@ -96,6 +100,17 @@ func TargetAllocator() string { return "0.0.0" } +// OperatorOpAMPBridge returns the default OperatorOpAMPBridge to use when no versions are specified via CLI or configuration. +func OperatorOpAMPBridge() string { + if len(operatorOpAMPBridge) > 0 { + // this should always be set, as it's specified during the build + return operatorOpAMPBridge + } + + // fallback value, useful for tests + return "0.0.0" +} + func AutoInstrumentationJava() string { if len(autoInstrumentationJava) > 0 { return autoInstrumentationJava diff --git a/main.go b/main.go index 797b6bcca..c2922eb2a 100644 --- a/main.go +++ b/main.go @@ -86,6 +86,7 @@ func main() { enableLeaderElection bool collectorImage string targetAllocatorImage string + operatorOpAMPBridgeImage string autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string @@ -102,6 +103,7 @@ func main() { "Enabling this will ensure there is only one active controller manager.") pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") @@ -119,6 +121,7 @@ func main() { "opentelemetry-operator", v.Operator, "opentelemetry-collector", collectorImage, "opentelemetry-targetallocator", targetAllocatorImage, + "operator-opamp-bridge", operatorOpAMPBridgeImage, "auto-instrumentation-java", autoInstrumentationJava, "auto-instrumentation-nodejs", autoInstrumentationNodeJS, "auto-instrumentation-python", autoInstrumentationPython, @@ -144,6 +147,7 @@ func main() { config.WithVersion(v), config.WithCollectorImage(collectorImage), config.WithTargetAllocatorImage(targetAllocatorImage), + config.WithOperatorOpAMPBridgeImage(operatorOpAMPBridgeImage), config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), From 39a2d19fab4e17f0039423e68b1ff7c76dee0977 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 16 Feb 2023 19:44:56 +0100 Subject: [PATCH 0739/1234] Document release managers with initial schedule (#1438) * Document release managers with initial schedule Signed-off-by: Pavol Loffay * Update RELEASE.md Co-authored-by: Jacob Aronoff * Update RELEASE.md * Update RELEASE.md --------- Signed-off-by: Pavol Loffay Co-authored-by: Ben B Co-authored-by: Jacob Aronoff --- README.md | 2 ++ RELEASE.md | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/README.md b/README.md index 59e235c85..0fb796ca5 100644 --- a/README.md +++ b/README.md @@ -439,6 +439,8 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, Please see [CONTRIBUTING.md](CONTRIBUTING.md). +In addition to the [core responsibilities](https://github.com/open-telemetry/community/blob/main/community-membership.md) the operator project requires approvers and maintainers to be responsible for releasing the project. See [RELEASE.md](./RELEASE.md) for more information and release schedule. + Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): - [Benedikt Bongartz](https://github.com/frzifus), Red Hat diff --git a/RELEASE.md b/RELEASE.md index 8ba66bba4..410de7729 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -23,3 +23,24 @@ make chlog-update ``` This will delete all entries (other than the template) in the `.chloggen` directory and create a populated Changelog.md entry. Make sure that the PR you are generating for the release has the `[chore]` prefix, otherwise CI will not pass. + + +## Release managers + +A release manager is the person responsible for a specific release. While the manager might request help from other folks, they are ultimately responsible for the success of a release. + +In order to have more people comfortable with the release process, and in order to decrease the burden on a small number of volunteers, all approvers and maintainers are release managers from time to time, listed under the Release Schedule section. That table is updated at every release, with the current manager adding themselves to the bottom of the table, removing themselves from the top of the table. + +## Release schedule + +The operator should be released within a week after the [OpenTelemetry collector release](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule). + +| Version | Release manager | +|---------------------------| +| v0.69.0 | @pavolloffay | +| v0.70.0 | @VineethReddy02 | +| v0.71.0 | @frzifus | +| v0.72.0 | @yuriolisa | +| v0.73.0 | @jaronoff97 | + + From e6407e2daf5fa100caf27339c417ffca07ed5c99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 09:41:38 +0100 Subject: [PATCH 0740/1234] Bump github.com/containerd/containerd from 1.5.16 to 1.5.18 (#1475) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.16 to 1.5.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.5.16...v1.5.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 38bc0c11a..6d01e6554 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/containerd v1.5.16 // indirect + github.com/containerd/containerd v1.5.18 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.62.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect diff --git a/go.sum b/go.sum index 03371cc5c..e6c0f836f 100644 --- a/go.sum +++ b/go.sum @@ -208,8 +208,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.16 h1:WsTS9tV0vQmRxkWAiiaoasHJ20jqVxVA15s93Bs4GIU= -github.com/containerd/containerd v1.5.16/go.mod h1:bVZZA+0blg2Lw6+I4xDml7L3gum0LsFKe3TnFELlSFw= +github.com/containerd/containerd v1.5.18 h1:doHr6cNxfOLTotWmZs6aZF6LrfJFcjmYFcWlRmQgYPM= +github.com/containerd/containerd v1.5.18/go.mod h1:7IN9MtIzTZH4WPEmD1gNH8bbTQXVX68yd3ZXxSHYCis= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= From 19814f5adc3868b3afc0b79997804229fe2643d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20H=C3=A9rail?= Date: Fri, 17 Feb 2023 00:43:18 -0800 Subject: [PATCH 0741/1234] docs: Fix broken link in the README (#1466) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guillaume Hérail --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fb796ca5..ea75581b6 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The default and only other acceptable value for `.Spec.UpgradeStrategy` is `auto ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/00-install.yaml) for reference. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/01-install.yaml) for reference. #### Sidecar injection From 55dd334b3fab3e0e7f74eb0cf4eca832d2a39f0e Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 17 Feb 2023 09:45:03 +0100 Subject: [PATCH 0742/1234] [chore] Refactor platform to be openshift routes availability (#1463) * Refactor platform to be openshift routes availability * Add minor changes asked in code review Signed-off-by: Israel Blancas * Add changelog Signed-off-by: Israel Blancas * Rename method Signed-off-by: Israel Blancas * Delete changelog as is not needed Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../opentelemetrycollector_controller.go | 20 +++--- .../opentelemetrycollector_controller_test.go | 17 +++-- internal/config/main.go | 63 ++++++++++--------- internal/config/main_test.go | 32 +++++----- internal/config/options.go | 17 +++-- pkg/autodetect/main.go | 14 ++--- pkg/autodetect/main_test.go | 28 ++------- .../main.go => autodetect/openshiftroutes.go} | 23 +++---- pkg/collector/horizontalpodautoscaler_test.go | 13 ++-- .../reconcile/horizontalpodautoscaler_test.go | 13 ++-- 10 files changed, 105 insertions(+), 135 deletions(-) rename pkg/{platform/main.go => autodetect/openshiftroutes.go} (50%) diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index ca171d2d1..efce335de 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -35,7 +35,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. @@ -67,9 +66,8 @@ type Params struct { Config config.Config } -func (r *OpenTelemetryCollectorReconciler) onPlatformChange() error { - // NOTE: At the time the reconciler gets created, the platform type is still unknown. - plt := r.config.Platform() +func (r *OpenTelemetryCollectorReconciler) onOpenShiftRoutesChange() error { + plt := r.config.OpenShiftRoutes() var ( routesIdx = -1 ) @@ -90,24 +88,24 @@ func (r *OpenTelemetryCollectorReconciler) onPlatformChange() error { return r.removeRouteTask(plt, routesIdx) } -func (r *OpenTelemetryCollectorReconciler) addRouteTask(plt platform.Platform, routesIdx int) error { +func (r *OpenTelemetryCollectorReconciler) addRouteTask(ora autodetect.OpenShiftRoutesAvailability, routesIdx int) error { r.muTasks.Lock() defer r.muTasks.Unlock() - // if exists and platform is openshift - if routesIdx == -1 && plt == platform.OpenShift { + // if exists and openshift routes are available + if routesIdx == -1 && ora == autodetect.OpenShiftRoutesAvailable { r.tasks = append([]Task{{reconcile.Routes, "routes", true}}, r.tasks...) } return nil } -func (r *OpenTelemetryCollectorReconciler) removeRouteTask(plt platform.Platform, routesIdx int) error { +func (r *OpenTelemetryCollectorReconciler) removeRouteTask(ora autodetect.OpenShiftRoutesAvailability, routesIdx int) error { r.muTasks.Lock() defer r.muTasks.Unlock() if len(r.tasks) < routesIdx { return fmt.Errorf("can not remove route task from reconciler") } - // if exists and platform is not openshift - if routesIdx != -1 && plt != platform.OpenShift { + // if exists and openshift routes are not available + if routesIdx != -1 && ora == autodetect.OpenShiftRoutesNotAvailable { r.tasks = append(r.tasks[:routesIdx], r.tasks[routesIdx+1:]...) } return nil @@ -172,7 +170,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { true, }, } - r.config.RegisterPlatformChangeCallback(r.onPlatformChange) + r.config.RegisterOpenShiftRoutesChangeCallback(r.onOpenShiftRoutesChange) } return r } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index b9d83572d..941bd6d0b 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -39,7 +39,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) var logger = logf.Log.WithName("unit-tests") @@ -47,8 +46,8 @@ var mockAutoDetector = &mockAutoDetect{ HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { return autodetect.AutoscalingVersionV2Beta2, nil }, - PlatformFunc: func() (platform.Platform, error) { - return platform.OpenShift, nil + OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { + return autodetect.OpenShiftRoutesAvailable, nil }, } @@ -379,17 +378,17 @@ func TestRegisterWithManager(t *testing.T) { var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { - PlatformFunc func() (platform.Platform, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) + OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) } func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { return m.HPAVersionFunc() } -func (m *mockAutoDetect) Platform() (platform.Platform, error) { - if m.PlatformFunc != nil { - return m.PlatformFunc() +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { + if m.OpenShiftRoutesAvailabilityFunc != nil { + return m.OpenShiftRoutesAvailabilityFunc() } - return platform.Unknown, nil + return autodetect.OpenShiftRoutesNotAvailable, nil } diff --git a/internal/config/main.go b/internal/config/main.go index 00ff35e20..44468decd 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -24,7 +24,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) const ( @@ -46,9 +45,9 @@ type Config struct { targetAllocatorConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string - onPlatformChange changeHandler + onOpenShiftRoutesChange changeHandler labelsFilter []string - platform platformStore + openshiftRoutes openshiftRoutesStore autoDetectFrequency time.Duration autoscalingVersion autodetect.AutoscalingVersion } @@ -61,10 +60,10 @@ func New(opts ...Option) Config { collectorConfigMapEntry: defaultCollectorConfigMapEntry, targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, logger: logf.Log.WithName("config"), - platform: newPlatformWrapper(), + openshiftRoutes: newOpenShiftRoutesWrapper(), version: version.Get(), autoscalingVersion: autodetect.DefaultAutoscalingVersion, - onPlatformChange: newOnChange(), + onOpenShiftRoutesChange: newOnChange(), } for _, opt := range opts { opt(&o) @@ -79,8 +78,8 @@ func New(opts ...Option) Config { operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, logger: o.logger, - onPlatformChange: o.onPlatformChange, - platform: o.platform, + openshiftRoutes: o.openshiftRoutes, + onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, @@ -113,15 +112,15 @@ func (c *Config) periodicAutoDetect() { func (c *Config) AutoDetect() error { c.logger.V(2).Info("auto-detecting the configuration based on the environment") - plt, err := c.autoDetect.Platform() + ora, err := c.autoDetect.OpenShiftRoutesAvailability() if err != nil { return err } - if c.platform.Get() != plt { - c.logger.V(1).Info("platform detected", "platform", plt) - c.platform.Set(plt) - if err = c.onPlatformChange.Do(); err != nil { + if c.openshiftRoutes.Get() != ora { + c.logger.V(1).Info("openshift routes detected", "available", ora) + c.openshiftRoutes.Set(ora) + if err = c.onOpenShiftRoutesChange.Do(); err != nil { // Don't fail if the callback failed, as auto-detection itself worked. c.logger.Error(err, "configuration change notification failed for callback") } @@ -157,9 +156,9 @@ func (c *Config) TargetAllocatorConfigMapEntry() string { return c.targetAllocatorConfigMapEntry } -// Platform represents the type of the platform this operator is running. -func (c *Config) Platform() platform.Platform { - return c.platform.Get() +// OpenShiftRoutes represents the availability of the OpenShift Routes API. +func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability { + return c.openshiftRoutes.Get() } // AutoscalingVersion represents the preferred version of autoscaling. @@ -192,35 +191,37 @@ func (c *Config) LabelsFilter() []string { return c.labelsFilter } -// RegisterPlatformChangeCallback registers the given function as a callback that -// is called when the platform detection detects a change. -func (c *Config) RegisterPlatformChangeCallback(f func() error) { - c.onPlatformChange.Register(f) +// RegisterOpenShiftRoutesChangeCallback registers the given function as a callback that +// is called when the OpenShift Routes detection detects a change. +func (c *Config) RegisterOpenShiftRoutesChangeCallback(f func() error) { + c.onOpenShiftRoutesChange.Register(f) } -type platformStore interface { - Set(plt platform.Platform) - Get() platform.Platform +type openshiftRoutesStore interface { + Set(ora autodetect.OpenShiftRoutesAvailability) + Get() autodetect.OpenShiftRoutesAvailability } -func newPlatformWrapper() platformStore { - return &platformWrapper{} +func newOpenShiftRoutesWrapper() openshiftRoutesStore { + return &openshiftRoutesWrapper{ + current: autodetect.OpenShiftRoutesNotAvailable, + } } -type platformWrapper struct { +type openshiftRoutesWrapper struct { mu sync.Mutex - current platform.Platform + current autodetect.OpenShiftRoutesAvailability } -func (p *platformWrapper) Set(plt platform.Platform) { +func (p *openshiftRoutesWrapper) Set(ora autodetect.OpenShiftRoutesAvailability) { p.mu.Lock() - p.current = plt + p.current = ora p.mu.Unlock() } -func (p *platformWrapper) Get() platform.Platform { +func (p *openshiftRoutesWrapper) Get() autodetect.OpenShiftRoutesAvailability { p.mu.Lock() - plt := p.current + ora := p.current p.mu.Unlock() - return plt + return ora } diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 92c8ad885..bca0fdb75 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -24,7 +24,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) func TestNewConfig(t *testing.T) { @@ -32,40 +31,40 @@ func TestNewConfig(t *testing.T) { cfg := config.New( config.WithCollectorImage("some-image"), config.WithCollectorConfigMapEntry("some-config.yaml"), - config.WithPlatform(platform.Kubernetes), + config.WithPlatform(autodetect.OpenShiftRoutesNotAvailable), ) // test assert.Equal(t, "some-image", cfg.CollectorImage()) assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) - assert.Equal(t, platform.Kubernetes, cfg.Platform()) + assert.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) } func TestOnPlatformChangeCallback(t *testing.T) { // prepare calledBack := false mock := &mockAutoDetect{ - PlatformFunc: func() (platform.Platform, error) { - return platform.OpenShift, nil + OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { + return autodetect.OpenShiftRoutesAvailable, nil }, } cfg := config.New( config.WithAutoDetect(mock), - config.WithOnPlatformChangeCallback(func() error { + config.WithOnOpenShiftRoutesChangeCallback(func() error { calledBack = true return nil }), ) // sanity check - require.Equal(t, platform.Unknown, cfg.Platform()) + require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) // test err := cfg.AutoDetect() require.NoError(t, err) // verify - assert.Equal(t, platform.OpenShift, cfg.Platform()) + assert.Equal(t, autodetect.OpenShiftRoutesAvailable, cfg.OpenShiftRoutes()) assert.True(t, calledBack) } @@ -74,10 +73,9 @@ func TestAutoDetectInBackground(t *testing.T) { wg := &sync.WaitGroup{} wg.Add(2) mock := &mockAutoDetect{ - PlatformFunc: func() (platform.Platform, error) { + OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { wg.Done() - // returning Unknown will cause the auto-detection to keep trying to detect the platform - return platform.Unknown, nil + return autodetect.OpenShiftRoutesNotAvailable, nil }, } cfg := config.New( @@ -86,7 +84,7 @@ func TestAutoDetectInBackground(t *testing.T) { ) // sanity check - require.Equal(t, platform.Unknown, cfg.Platform()) + require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) // test err := cfg.StartAutoDetect() @@ -99,16 +97,16 @@ func TestAutoDetectInBackground(t *testing.T) { var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { - PlatformFunc func() (platform.Platform, error) + OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) } func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { return autodetect.DefaultAutoscalingVersion, nil } -func (m *mockAutoDetect) Platform() (platform.Platform, error) { - if m.PlatformFunc != nil { - return m.PlatformFunc() +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { + if m.OpenShiftRoutesAvailabilityFunc != nil { + return m.OpenShiftRoutesAvailabilityFunc() } - return platform.Unknown, nil + return autodetect.OpenShiftRoutesNotAvailable, nil } diff --git a/internal/config/options.go b/internal/config/options.go index 161ec8884..fecb49bb0 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -23,7 +23,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) // Option represents one specific configuration option. @@ -42,9 +41,9 @@ type options struct { targetAllocatorConfigMapEntry string targetAllocatorImage string operatorOpAMPBridgeImage string - onPlatformChange changeHandler + onOpenShiftRoutesChange changeHandler labelsFilter []string - platform platformStore + openshiftRoutes openshiftRoutesStore autoDetectFrequency time.Duration autoscalingVersion autodetect.AutoscalingVersion } @@ -89,17 +88,17 @@ func WithLogger(logger logr.Logger) Option { o.logger = logger } } -func WithOnPlatformChangeCallback(f func() error) Option { +func WithOnOpenShiftRoutesChangeCallback(f func() error) Option { return func(o *options) { - if o.onPlatformChange == nil { - o.onPlatformChange = newOnChange() + if o.onOpenShiftRoutesChange == nil { + o.onOpenShiftRoutesChange = newOnChange() } - o.onPlatformChange.Register(f) + o.onOpenShiftRoutesChange.Register(f) } } -func WithPlatform(plt platform.Platform) Option { +func WithPlatform(ora autodetect.OpenShiftRoutesAvailability) Option { return func(o *options) { - o.platform.Set(plt) + o.openshiftRoutes.Set(ora) } } func WithVersion(v version.Version) Option { diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go index dc4c23736..8d1d29501 100644 --- a/pkg/autodetect/main.go +++ b/pkg/autodetect/main.go @@ -21,15 +21,13 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/rest" - - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) var _ AutoDetect = (*autoDetect)(nil) // AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. type AutoDetect interface { - Platform() (platform.Platform, error) + OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, error) HPAVersion() (AutoscalingVersion, error) } @@ -62,21 +60,21 @@ func New(restConfig *rest.Config) (AutoDetect, error) { }, nil } -// Platform returns the detected platform this operator is running on. Possible values: Kubernetes, OpenShift. -func (a *autoDetect) Platform() (platform.Platform, error) { +// OpenShiftRoutesAvailability checks if OpenShift Route are available. +func (a *autoDetect) OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, error) { apiList, err := a.dcl.ServerGroups() if err != nil { - return platform.Unknown, err + return OpenShiftRoutesNotAvailable, err } apiGroups := apiList.Groups for i := 0; i < len(apiGroups); i++ { if apiGroups[i].Name == "route.openshift.io" { - return platform.OpenShift, nil + return OpenShiftRoutesAvailable, nil } } - return platform.Kubernetes, nil + return OpenShiftRoutesNotAvailable, nil } func (a *autoDetect) HPAVersion() (AutoscalingVersion, error) { diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index eea043120..e41cb1ee6 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -26,17 +26,16 @@ import ( "k8s.io/client-go/rest" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { for _, tt := range []struct { apiGroupList *metav1.APIGroupList - expected platform.Platform + expected autodetect.OpenShiftRoutesAvailability }{ { &metav1.APIGroupList{}, - platform.Kubernetes, + autodetect.OpenShiftRoutesNotAvailable, }, { &metav1.APIGroupList{ @@ -46,7 +45,7 @@ func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { }, }, }, - platform.OpenShift, + autodetect.OpenShiftRoutesAvailable, }, } { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { @@ -64,31 +63,14 @@ func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { require.NoError(t, err) // test - plt, err := autoDetect.Platform() + ora, err := autoDetect.OpenShiftRoutesAvailability() // verify assert.NoError(t, err) - assert.Equal(t, tt.expected, plt) + assert.Equal(t, tt.expected, ora) } } -func TestUnknownPlatformOnError(t *testing.T) { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(http.StatusInternalServerError) - })) - defer server.Close() - - autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) - require.NoError(t, err) - - // test - plt, err := autoDetect.Platform() - - // verify - assert.Error(t, err) - assert.Equal(t, platform.Unknown, plt) -} - func TestAutoscalingVersionToString(t *testing.T) { assert.Equal(t, "v2", autodetect.AutoscalingVersionV2.String()) assert.Equal(t, "v2beta2", autodetect.AutoscalingVersionV2Beta2.String()) diff --git a/pkg/platform/main.go b/pkg/autodetect/openshiftroutes.go similarity index 50% rename from pkg/platform/main.go rename to pkg/autodetect/openshiftroutes.go index e4791a28e..19116a003 100644 --- a/pkg/platform/main.go +++ b/pkg/autodetect/openshiftroutes.go @@ -12,23 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package platform contains target platforms this operator might run on. -package platform +// Package autodetect is for auto-detecting traits from the environment (APIs, ...). +package autodetect -// Platform holds the auto-detected platform type. -type Platform int +// OpenShiftRoutesAvailability holds the auto-detected OpenShift Routes availability API. +type OpenShiftRoutesAvailability int const ( - // Unknown is used when the current platform can't be determined. - Unknown Platform = iota + // OpenShiftRoutesAvailable represents the route.openshift.io API is available. + OpenShiftRoutesAvailable OpenShiftRoutesAvailability = iota - // OpenShift represents a platform of type OpenShift. - OpenShift Platform = iota - - // Kubernetes represents a platform of type Kubernetes. - Kubernetes + // OpenShiftRoutesNotAvailable represents the route.openshift.io API is not available. + OpenShiftRoutesNotAvailable ) -func (p Platform) String() string { - return [...]string{"Unknown", "OpenShift", "Kubernetes"}[p] +func (p OpenShiftRoutesAvailability) String() string { + return [...]string{"Available", "NotAvailable"}[p] } diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index a24778ba1..4fc57c033 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -27,7 +27,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) func TestHPA(t *testing.T) { @@ -163,17 +162,17 @@ func TestConvertToV2Beta2SelectPolicy(t *testing.T) { var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { - PlatformFunc func() (platform.Platform, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) + OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) } func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { return m.HPAVersionFunc() } -func (m *mockAutoDetect) Platform() (platform.Platform, error) { - if m.PlatformFunc != nil { - return m.PlatformFunc() +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { + if m.OpenShiftRoutesAvailabilityFunc != nil { + return m.OpenShiftRoutesAvailabilityFunc() } - return platform.Unknown, nil + return autodetect.OpenShiftRoutesNotAvailable, nil } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index 933fa9fea..c7fef22da 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -35,7 +35,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/platform" ) var hpaUpdateErr error @@ -165,17 +164,17 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { - PlatformFunc func() (platform.Platform, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) + OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) } func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { return m.HPAVersionFunc() } -func (m *mockAutoDetect) Platform() (platform.Platform, error) { - if m.PlatformFunc != nil { - return m.PlatformFunc() +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { + if m.OpenShiftRoutesAvailabilityFunc != nil { + return m.OpenShiftRoutesAvailabilityFunc() } - return platform.Unknown, nil + return autodetect.OpenShiftRoutesNotAvailable, nil } From 43d914e3665d704c118e6c88a84a7328cf38ee01 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 17 Feb 2023 01:30:42 -0800 Subject: [PATCH 0743/1234] Update the javaagent version to 1.23.0 (#1474) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 6245beecd..a6c2798a4 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.22.1 +1.23.0 From 10c3c21c6975930441ce08db882a7e961785c1f7 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Fri, 17 Feb 2023 11:14:47 +0100 Subject: [PATCH 0744/1234] Update k8s registry domain (#1482) Signed-off-by: cpanato --- tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml | 2 +- tests/e2e/smoke-sidecar/01-install-app.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml index b85e38b91..d3aa32cdc 100644 --- a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml @@ -17,4 +17,4 @@ spec: spec: containers: - name: myapp - image: k8s.gcr.io/echoserver:1.4 + image: registry.k8s.io/echoserver:1.4 diff --git a/tests/e2e/smoke-sidecar/01-install-app.yaml b/tests/e2e/smoke-sidecar/01-install-app.yaml index 8a7396ef6..10c5e5c14 100644 --- a/tests/e2e/smoke-sidecar/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar/01-install-app.yaml @@ -16,4 +16,4 @@ spec: spec: containers: - name: myapp - image: k8s.gcr.io/echoserver:1.4 + image: registry.k8s.io/echoserver:1.4 From 1c9610ce5dc78643f72d46e864848b45b9f48888 Mon Sep 17 00:00:00 2001 From: PeterSzegedi Date: Fri, 17 Feb 2023 10:24:30 +0000 Subject: [PATCH 0745/1234] Default to UDP protocol for statsd receiver (#1433) * Default to UDP with statsd receiver * Add changelog entry * Add issue number * change the changelog file to yaml --- .chloggen/bugfix-statsd-receiver-protocol.yaml | 16 ++++++++++++++++ pkg/collector/parser/receiver_statsd.go | 16 ++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 .chloggen/bugfix-statsd-receiver-protocol.yaml diff --git a/.chloggen/bugfix-statsd-receiver-protocol.yaml b/.chloggen/bugfix-statsd-receiver-protocol.yaml new file mode 100644 index 000000000..b235adc2d --- /dev/null +++ b/.chloggen/bugfix-statsd-receiver-protocol.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: statsd-receiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Switched the protocol of statsd-receiver to UDP from TCP + +# One or more tracking issues related to the change +issues: [1476] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/parser/receiver_statsd.go b/pkg/collector/parser/receiver_statsd.go index c8603c26d..0ad153c9e 100644 --- a/pkg/collector/parser/receiver_statsd.go +++ b/pkg/collector/parser/receiver_statsd.go @@ -14,18 +14,22 @@ package parser -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" +) const parserNameStatsd = "__statsd" // NewStatsdReceiverParser builds a new parser for Statsd receivers, from the contrib repository. func NewStatsdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8125, - parserName: parserNameStatsd, + logger: logger, + name: name, + config: config, + defaultPort: 8125, + defaultProtocol: corev1.ProtocolUDP, + parserName: parserNameStatsd, } } From d17c62a3be2f823c946b25116486dd9d1f2279dd Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Fri, 17 Feb 2023 13:41:10 +0100 Subject: [PATCH 0746/1234] update echosever to use release 1.10 (#1485) Signed-off-by: cpanato --- tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml | 2 +- tests/e2e/smoke-sidecar/01-install-app.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml index d3aa32cdc..6afc425a9 100644 --- a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml @@ -17,4 +17,4 @@ spec: spec: containers: - name: myapp - image: registry.k8s.io/echoserver:1.4 + image: registry.k8s.io/echoserver:1.10 diff --git a/tests/e2e/smoke-sidecar/01-install-app.yaml b/tests/e2e/smoke-sidecar/01-install-app.yaml index 10c5e5c14..1a5ca1ada 100644 --- a/tests/e2e/smoke-sidecar/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar/01-install-app.yaml @@ -16,4 +16,4 @@ spec: spec: containers: - name: myapp - image: registry.k8s.io/echoserver:1.4 + image: registry.k8s.io/echoserver:1.10 From 3b81f7f138be198f1eb28270646d60f7864a97e0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 17 Feb 2023 13:54:56 +0100 Subject: [PATCH 0747/1234] Update release schedule during release (#1483) Signed-off-by: Pavol Loffay --- RELEASE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 410de7729..80201ce0f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -13,6 +13,7 @@ Steps to release a new version of the OpenTelemetry Operator: 9. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the `Community Operators repositories`: 1. one for the `community-operators-prod`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) 1. one for the `community-operators` directory, used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) +10. Update release schedule table, by moving the current release manager to the end of the table with updated release version. ## Generating the changelog @@ -37,10 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------------------------| -| v0.69.0 | @pavolloffay | | v0.70.0 | @VineethReddy02 | | v0.71.0 | @frzifus | | v0.72.0 | @yuriolisa | | v0.73.0 | @jaronoff97 | - +| v0.74.0 | @pavolloffay | From f490d1e00a447ac47c8d051dd5ec2f352a05be24 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 17 Feb 2023 13:55:35 +0100 Subject: [PATCH 0748/1234] Include component versions in the changelog (#1484) Signed-off-by: Pavol Loffay --- CHANGELOG.md | 6 +++++- RELEASE.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae6187444..d76991fbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,13 @@ Changes by Version * `operator`: Fix daemonset-features E2E test for OpenShift ([#1354](https://github.com/open-telemetry/opentelemetry-operator/pull/1354), [@iblancasa](https://github.com/iblancasa)) * `operator`: Fix E2E autoscale test for OpenShift ([#1365](https://github.com/open-telemetry/opentelemetry-operator/pull/1365), [@iblancasa](https://github.com/iblancasa)) * `target allocator`: Fix Target Allocator tests ([#1403](https://github.com/open-telemetry/opentelemetry-operator/pull/1403), [@jaronoff97](https://github.com/jaronoff97)) -#### OpenTelemetry Collector and Contrib +### Components * [OpenTelemetry Collector - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.69.0) * [OpenTelemetry Contrib - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.69.0) +* [Java auto-instrumentation - 1.22.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.22.1) +* [Dotnet auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) +* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) +* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) 0.68.0 ------------------ diff --git a/RELEASE.md b/RELEASE.md index 80201ce0f..6e745d818 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,8 +5,8 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `auto-instrumentation/`. 3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -4. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version, with N-2 being the lower bound. Make sure that the CI is currently testing the latest Kubernetes version! -5. Add the changes to the changelog +4. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. +5. Add the changes to the changelog. Manually add versions of all operator components. 6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` 7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` 8. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images From 7826785b4f8b4c80b459533573e71f93cd9c4b2b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 17 Feb 2023 14:37:15 +0100 Subject: [PATCH 0749/1234] Make sure changelog generation works (#1487) Signed-off-by: Pavol Loffay --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d76991fbc..bb88fc405 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changes by Version ================== + + + 0.69.0 ------------------ ### 🚩 Deprecations 🚩 From 7c734bd14050d6ef9d8385f7bcdff0a237b71924 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:11:58 +0100 Subject: [PATCH 0750/1234] Bump go.uber.org/multierr in /cmd/operator-opamp-bridge (#1453) Bumps [go.uber.org/multierr](https://github.com/uber-go/multierr) from 1.6.0 to 1.9.0. - [Release notes](https://github.com/uber-go/multierr/releases) - [Changelog](https://github.com/uber-go/multierr/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/multierr/compare/v1.6.0...v1.9.0) --- updated-dependencies: - dependency-name: go.uber.org/multierr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 301cd1478..46493c2e3 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -15,7 +15,7 @@ require ( go.opentelemetry.io/otel/metric v0.34.0 go.opentelemetry.io/otel/sdk v1.12.0 go.opentelemetry.io/otel/sdk/metric v0.34.0 - go.uber.org/multierr v1.6.0 + go.uber.org/multierr v1.9.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.1 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index edd0662a4..e03544a9e 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -345,8 +345,9 @@ go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= From 7d259d86812fb845ff1bcabfbae51f8bc34d688b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:12:27 +0100 Subject: [PATCH 0751/1234] Bump sigs.k8s.io/controller-runtime in /cmd/operator-opamp-bridge (#1452) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.2 to 0.14.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.2...v0.14.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 46493c2e3..6819a9f81 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.1 k8s.io/klog/v2 v2.90.0 - sigs.k8s.io/controller-runtime v0.14.2 + sigs.k8s.io/controller-runtime v0.14.4 ) require ( diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index e03544a9e..bd0049126 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -698,8 +698,8 @@ k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.2 h1:P6IwDhbsRWsBClt/8/h8Zy36bCuGuW5Op7MHpFrN/60= -sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From 01f781ad379d09874dd5bfaf0c1b0950351764c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:46:05 +0100 Subject: [PATCH 0752/1234] Bump golang.org/x/net from 0.4.0 to 0.7.0 in /cmd/operator-opamp-bridge (#1488) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 8 ++++---- cmd/operator-opamp-bridge/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 6819a9f81..40eba31f8 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -71,11 +71,11 @@ require ( go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.4.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index bd0049126..4627b5d8f 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -420,8 +420,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -486,12 +486,12 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -500,8 +500,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 4708b2225919a5fa12e2f45096393e74d8d4c1a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:46:27 +0100 Subject: [PATCH 0753/1234] Bump golang.org/x/net from 0.5.0 to 0.7.0 (#1489) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 6d01e6554..484cfd34a 100644 --- a/go.mod +++ b/go.mod @@ -114,11 +114,11 @@ require ( go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect - golang.org/x/net v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.61.0 // indirect diff --git a/go.sum b/go.sum index e6c0f836f..e75799063 100644 --- a/go.sum +++ b/go.sum @@ -1194,8 +1194,8 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1316,13 +1316,13 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1332,8 +1332,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= From 7e36ccfd1bfbe65a5c71b12983cb9a500da66adc Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:38:26 +0100 Subject: [PATCH 0754/1234] [target-allocator] Fix pprof endpoints (#1479) * Adjust pprof handlers to correctly handle all profiles Signed-off-by: Matej Gera * Clean go mod Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera --- ...9-fix-pprof-endpoint-target-allocator.yaml | 16 +++++++++++++ cmd/otel-allocator/go.mod | 1 - cmd/otel-allocator/go.sum | 20 +++------------- cmd/otel-allocator/server/server.go | 23 +++++++++++++++---- 4 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 .chloggen/1479-fix-pprof-endpoint-target-allocator.yaml diff --git a/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml b/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml new file mode 100644 index 000000000..e006b930f --- /dev/null +++ b/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "target allocator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Properly handle all types of profiles in the pprof endpoint. Previously, some profiles where unavailable, leading to 404 response." + +# One or more tracking issues related to the change +issues: [1478] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index c01ba4b21..5c6d5754e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -173,7 +173,6 @@ require ( google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 // indirect google.golang.org/grpc v1.48.0 // indirect google.golang.org/protobuf v1.28.1 // indirect - gopkg.in/go-playground/validator.v9 v9.29.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 7e4cb61bf..74e110c1a 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -440,7 +440,6 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.5.0 h1:fi+bqFAx/oLK54somfCtEZs9HeH1LHVoEPUgARpTqyc= github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.8.2 h1:UzKToD9/PoFj/V4rvlKqTRKnQYyz8Sc1MJlv4JHPtvY= github.com/gin-gonic/gin v1.8.2/go.mod h1:qw5AYuDrzRTnhvusDsrov+fDIxp9Dleuu12h8nfB398= @@ -587,14 +586,13 @@ github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI= github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= @@ -1027,7 +1025,6 @@ github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtB github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -1074,7 +1071,6 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -1245,7 +1241,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= @@ -1378,8 +1373,8 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -1459,8 +1454,8 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1470,7 +1465,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -1512,7 +1506,6 @@ github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= @@ -1598,7 +1591,6 @@ go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= -go.mongodb.org/mongo-driver v1.10.0 h1:UtV6N5k14upNp4LTduX0QCufG124fSu25Wz9tu94GLg= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= @@ -1846,7 +1838,6 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= @@ -2030,7 +2021,6 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= @@ -2038,7 +2028,6 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= @@ -2051,7 +2040,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= @@ -2407,9 +2395,7 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v9 v9.29.1 h1:SvGtYmN60a5CVKTOzMSyfzWDeZRxRuGvRQyEAKbw1xc= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index fe769bb4e..37ec9b0a0 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -21,6 +21,7 @@ import ( "net/http" "net/http/pprof" "net/url" + "strings" "sync" "time" @@ -190,10 +191,22 @@ func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]c return displayData } +// registerPprof registers the pprof handlers and either serves the requested +// specific profile or falls back to index handler. func registerPprof(g *gin.RouterGroup) { - g.GET("/", gin.WrapF(pprof.Index)) - g.GET("/cmdline", gin.WrapF(pprof.Cmdline)) - g.GET("/profile", gin.WrapF(pprof.Profile)) - g.GET("/symbol", gin.WrapF(pprof.Symbol)) - g.GET("/trace", gin.WrapF(pprof.Trace)) + g.GET("/*profile", func(c *gin.Context) { + path := c.Param("profile") + switch strings.TrimPrefix(path, "/") { + case "cmdline": + gin.WrapF(pprof.Cmdline)(c) + case "profile": + gin.WrapF(pprof.Profile)(c) + case "symbol": + gin.WrapF(pprof.Symbol)(c) + case "trace": + gin.WrapF(pprof.Trace)(c) + default: + gin.WrapF(pprof.Index)(c) + } + }) } From e9f1e4bc15891b90476e6b583e2acaa42138c060 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Fri, 17 Feb 2023 23:39:57 +0530 Subject: [PATCH 0755/1234] Release v0.70.0 (#1486) * Release v0.70.0 --- .../1413-cache-scrape-config-response.yaml | 16 -------------- .chloggen/1414-adjust-gin-config.yaml | 16 -------------- .../add-cicd-for-opamp-bridge-container.yaml | 16 -------------- ...opamp-bridge-version-info-to-operator.yaml | 16 -------------- .../bugfix-statsd-receiver-protocol.yaml | 16 -------------- CHANGELOG.md | 22 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 6 ++--- versions.txt | 10 ++++----- 10 files changed, 32 insertions(+), 90 deletions(-) delete mode 100644 .chloggen/1413-cache-scrape-config-response.yaml delete mode 100644 .chloggen/1414-adjust-gin-config.yaml delete mode 100755 .chloggen/add-cicd-for-opamp-bridge-container.yaml delete mode 100755 .chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml delete mode 100644 .chloggen/bugfix-statsd-receiver-protocol.yaml diff --git a/.chloggen/1413-cache-scrape-config-response.yaml b/.chloggen/1413-cache-scrape-config-response.yaml deleted file mode 100644 index 85f3f35f2..000000000 --- a/.chloggen/1413-cache-scrape-config-response.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "target allocator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Save the scrape config response in the HTTP server upon relevant config change, instead of building it on every handler call. At the same time, this avoids data race when accessing the scrape configs map." - -# One or more tracking issues related to the change -issues: [1359] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1414-adjust-gin-config.yaml b/.chloggen/1414-adjust-gin-config.yaml deleted file mode 100644 index 95c455ab4..000000000 --- a/.chloggen/1414-adjust-gin-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "target allocator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Configure `gin` router to be used in release mode and do not use the default logging middleware which is noisy and not formatted properly." - -# One or more tracking issues related to the change -issues: [1352] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/add-cicd-for-opamp-bridge-container.yaml b/.chloggen/add-cicd-for-opamp-bridge-container.yaml deleted file mode 100755 index 94de0b363..000000000 --- a/.chloggen/add-cicd-for-opamp-bridge-container.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: github action - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "This PR adds github action for publishing the `Operator OpAMP Bridge` container image to Github Container Registry." - -# One or more tracking issues related to the change -issues: [1369] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml b/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml deleted file mode 100755 index b02174d8b..000000000 --- a/.chloggen/add-operator-opamp-bridge-version-info-to-operator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Add `Operator-OpAMP-Bridge` version info to Operator" - -# One or more tracking issues related to the change -issues: [1455] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bugfix-statsd-receiver-protocol.yaml b/.chloggen/bugfix-statsd-receiver-protocol.yaml deleted file mode 100644 index b235adc2d..000000000 --- a/.chloggen/bugfix-statsd-receiver-protocol.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: statsd-receiver - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Switched the protocol of statsd-receiver to UDP from TCP - -# One or more tracking issues related to the change -issues: [1476] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index bb88fc405..333a10442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ Changes by Version +0.70.0 +------------------ +### 💡 Enhancements 💡 + +- `target allocator`: Save the scrape config response in the HTTP server upon relevant config change, instead of building it on every handler call. At the same time, this avoids data race when accessing the scrape configs map. (#1359) +- `target allocator`: Configure `gin` router to be used in release mode and do not use the default logging middleware which is noisy and not formatted properly. (#1352) +- `github action`: This PR adds github action for publishing the `Operator OpAMP Bridge` container image to Github Container Registry. (#1369) +- `operator`: Add `Operator-OpAMP-Bridge` version info to Operator (#1455) + +### 🧰 Bug fixes 🧰 + +- `statsd-receiver`: Switched the protocol of statsd-receiver to UDP from TCP (#1476) + +### Components + +* [OpenTelemetry Collector - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.70.0) +* [OpenTelemetry Contrib - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.70.0) +* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) +* [Dotnet auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) +* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) +* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) + 0.69.0 ------------------ ### 🚩 Deprecations 🚩 diff --git a/README.md b/README.md index ea75581b6..956a7ed94 100644 --- a/README.md +++ b/README.md @@ -410,6 +410,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.70.0 | v1.19 to v1.25 | v1 | | v0.69.0 | v1.19 to v1.25 | v1 | | v0.68.0 | v1.19 to v1.25 | v1 | | v0.67.0 | v1.19 to v1.25 | v1 | @@ -431,7 +432,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.50.0 | v1.19 to v1.23 | v1alpha2 | | v0.49.0 | v1.19 to v1.23 | v1alpha2 | | v0.48.0 | v1.19 to v1.23 | v1alpha2 | -| v0.47.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index 6e745d818..1fb5a9e61 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------------------------| -| v0.70.0 | @VineethReddy02 | | v0.71.0 | @frzifus | | v0.72.0 | @yuriolisa | | v0.73.0 | @jaronoff97 | | v0.74.0 | @pavolloffay | +| v0.75.0 | @VineethReddy02 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0a215f816..07e05cd7e 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.69.0 + name: opentelemetry-operator.v0.70.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.69.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.70.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.69.0 + version: 0.70.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index ac4a508c7..d2ecbfab9 100644 --- a/versions.txt +++ b/versions.txt @@ -2,20 +2,20 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.69.0 +opentelemetry-collector=0.70.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.69.0 +operator=0.70.0 # Represents the current release of the Target Allocator. -targetallocator=0.69.0 +targetallocator=0.70.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.69.0 +operator-opamp-bridge=0.70.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.22.1 +autoinstrumentation-java=1.23.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From 2abf24fcbc6b1db21f45fc428a9933d2d42d56d8 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 21 Feb 2023 14:36:13 +0100 Subject: [PATCH 0756/1234] [chore] Fix instrumentation E2E tests in OpenShift (#1470) * Fix instrumentation E2E tests in OpenShift Signed-off-by: Israel Blancas * Trigger build Signed-off-by: Israel Blancas * Apply changes requested to CR Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../00-install-collector.yaml | 9 ++++++ .../00-install-collector.yaml | 23 ------------- ...other-ns.yaml => 01-cleanup-other-ns.yaml} | 0 .../02-install-collector.yaml | 32 +++++++++++++++++++ ...n.yaml => 02-install-instrumentation.yaml} | 0 .../{01-assert.yaml => 03-assert.yaml} | 0 ...1-install-app.yaml => 03-install-app.yaml} | 0 .../04-cleanup-other-ns.yaml | 6 ++++ .../00-install-collector.yaml | 9 ++++++ .../00-install-collector.yaml | 9 ++++++ .../00-install-collector.yaml | 9 ++++++ 11 files changed, 74 insertions(+), 23 deletions(-) delete mode 100644 tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml rename tests/e2e/instrumentation-java-other-ns/{00-cleanup-other-ns.yaml => 01-cleanup-other-ns.yaml} (100%) create mode 100644 tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml rename tests/e2e/instrumentation-java-other-ns/{00-install-instrumentation.yaml => 02-install-instrumentation.yaml} (100%) rename tests/e2e/instrumentation-java-other-ns/{01-assert.yaml => 03-assert.yaml} (100%) rename tests/e2e/instrumentation-java-other-ns/{01-install-app.yaml => 03-install-app.yaml} (100%) create mode 100644 tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml diff --git a/tests/e2e/instrumentation-dotnet/00-install-collector.yaml b/tests/e2e/instrumentation-dotnet/00-install-collector.yaml index f8e1e98e0..b03a72e60 100644 --- a/tests/e2e/instrumentation-dotnet/00-install-collector.yaml +++ b/tests/e2e/instrumentation-dotnet/00-install-collector.yaml @@ -21,3 +21,12 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml b/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml deleted file mode 100644 index f8e1e98e0..000000000 --- a/tests/e2e/instrumentation-java-other-ns/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml b/tests/e2e/instrumentation-java-other-ns/01-cleanup-other-ns.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/00-cleanup-other-ns.yaml rename to tests/e2e/instrumentation-java-other-ns/01-cleanup-other-ns.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml b/tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml new file mode 100644 index 000000000..b03a72e60 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml @@ -0,0 +1,32 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml b/tests/e2e/instrumentation-java-other-ns/02-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/00-install-instrumentation.yaml rename to tests/e2e/instrumentation-java-other-ns/02-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/01-assert.yaml b/tests/e2e/instrumentation-java-other-ns/03-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/01-assert.yaml rename to tests/e2e/instrumentation-java-other-ns/03-assert.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/01-install-app.yaml b/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/01-install-app.yaml rename to tests/e2e/instrumentation-java-other-ns/03-install-app.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml b/tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml new file mode 100644 index 000000000..ee6bc7f70 --- /dev/null +++ b/tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: v1 + kind: Namespace + name: my-other-ns diff --git a/tests/e2e/instrumentation-java/00-install-collector.yaml b/tests/e2e/instrumentation-java/00-install-collector.yaml index f8e1e98e0..b03a72e60 100644 --- a/tests/e2e/instrumentation-java/00-install-collector.yaml +++ b/tests/e2e/instrumentation-java/00-install-collector.yaml @@ -21,3 +21,12 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml index f8e1e98e0..b03a72e60 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-collector.yaml @@ -21,3 +21,12 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e/instrumentation-python/00-install-collector.yaml b/tests/e2e/instrumentation-python/00-install-collector.yaml index f8e1e98e0..b03a72e60 100644 --- a/tests/e2e/instrumentation-python/00-install-collector.yaml +++ b/tests/e2e/instrumentation-python/00-install-collector.yaml @@ -21,3 +21,12 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite From 2f5ff1f9451fca48da00dd291834d84462896c89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Feb 2023 14:41:04 +0100 Subject: [PATCH 0757/1234] Bump go.opentelemetry.io/otel/sdk in /cmd/operator-opamp-bridge (#1494) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.12.0 to 1.13.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.12.0...v1.13.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 40eba31f8..13ad310ec 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,10 +10,10 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 - go.opentelemetry.io/otel v1.12.0 + go.opentelemetry.io/otel v1.13.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 go.opentelemetry.io/otel/metric v0.34.0 - go.opentelemetry.io/otel/sdk v1.12.0 + go.opentelemetry.io/otel/sdk v1.13.0 go.opentelemetry.io/otel/sdk/metric v0.34.0 go.uber.org/multierr v1.9.0 gopkg.in/yaml.v2 v2.4.0 @@ -67,7 +67,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 // indirect - go.opentelemetry.io/otel/trace v1.12.0 // indirect + go.opentelemetry.io/otel/trace v1.13.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 4627b5d8f..d1aaa467c 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -321,8 +321,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.12.0 h1:IgfC7kqQrRccIKuB7Cl+SRUmsKbEwSGPr0Eu+/ht1SQ= -go.opentelemetry.io/otel v1.12.0/go.mod h1:geaoz0L0r1BEOR81k7/n9W4TCXYCJ7bPO7K374jQHG0= +go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= +go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 h1:kpskzLZ60cJ48SJ4uxWa6waBL+4kSV6nVK8rP+QM8Wg= @@ -331,12 +331,12 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 h1:t4A go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0/go.mod h1:WO7omosl4P7JoanH9NgInxDxEn2F2M5YinIh8EyeT8w= go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= -go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= -go.opentelemetry.io/otel/sdk v1.12.0/go.mod h1:WYcvtgquYvgODEvxOry5owO2y9MyciW7JqMz6cpXShE= +go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= +go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= go.opentelemetry.io/otel/sdk/metric v0.34.0 h1:7ElxfQpXCFZlRTvVRTkcUvK8Gt5DC8QzmzsLsO2gdzo= go.opentelemetry.io/otel/sdk/metric v0.34.0/go.mod h1:l4r16BIqiqPy5rd14kkxllPy/fOI4tWo1jkpD9Z3ffQ= -go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= -go.opentelemetry.io/otel/trace v1.12.0/go.mod h1:pHlgBynn6s25qJ2szD+Bv+iwKJttjHSI3lUAyf0GNuQ= +go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= +go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= From eceb6ea2a2231d05f7e40eb8645b05028cab0c50 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:06:40 +0100 Subject: [PATCH 0758/1234] Fix table formating on release.md (#1504) Signed-off-by: Yuri Sa --- RELEASE.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 1fb5a9e61..ad617a491 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -37,10 +37,9 @@ In order to have more people comfortable with the release process, and in order The operator should be released within a week after the [OpenTelemetry collector release](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule). | Version | Release manager | -|---------------------------| +|---------|-----------------| | v0.71.0 | @frzifus | | v0.72.0 | @yuriolisa | | v0.73.0 | @jaronoff97 | | v0.74.0 | @pavolloffay | -| v0.75.0 | @VineethReddy02 | - +| v0.75.0 | @VineethReddy02 | \ No newline at end of file From 0067c3547b1032c0a1c9f7d45391e18d79b68289 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Thu, 23 Feb 2023 14:07:47 +0100 Subject: [PATCH 0759/1234] Use tagged images in e2e tests to not trigger docker.com rate limit (#1499) Kubernetes uses imagePullPolicy: Always for images with latest or no tag, which can trigger docker.com rate limits if one runs the e2e tests too often. Signed-off-by: Andreas Gerstmayr --- .../instrumentation-dotnet-multicontainer/01-install-app.yaml | 4 ++-- .../instrumentation-dotnet-multicontainer/02-install-app.yaml | 4 ++-- tests/e2e/instrumentation-dotnet/01-install-app.yaml | 2 +- .../instrumentation-java-multicontainer/01-install-app.yaml | 2 +- .../instrumentation-java-multicontainer/02-install-app.yaml | 2 +- .../instrumentation-nodejs-multicontainer/01-install-app.yaml | 2 +- .../instrumentation-nodejs-multicontainer/02-install-app.yaml | 2 +- .../instrumentation-python-multicontainer/01-install-app.yaml | 2 +- .../instrumentation-python-multicontainer/02-install-app.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml index e64bc4f56..c4a655e7f 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml index 9b86d167c..7afe58db2 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-dotnet/01-install-app.yaml b/tests/e2e/instrumentation-dotnet/01-install-app.yaml index 589b4d9c8..8591d4028 100644 --- a/tests/e2e/instrumentation-dotnet/01-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet/01-install-app.yaml @@ -21,4 +21,4 @@ spec: fsGroup: 2000 containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp:latest # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp diff --git a/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml index b05162435..8e7a803d2 100644 --- a/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/pavolloffay/spring-petclinic:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml index c963b8737..3e7371879 100644 --- a/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/pavolloffay/spring-petclinic:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml index 2514ba5e5..9f7dd9a67 100644 --- a/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/anuraaga/express-hello-world:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml index ea8f74d0b..0d02374fd 100644 --- a/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/anuraaga/express-hello-world:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml index 82910ec97..433050dfb 100644 --- a/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/anuraaga/flask-hello-world:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 diff --git a/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml index 8101f7d16..0f138fa81 100644 --- a/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml @@ -20,4 +20,4 @@ spec: - name: myapp image: ghcr.io/anuraaga/flask-hello-world:latest - name: myrabbit - image: rabbitmq + image: rabbitmq:3 From aadfac81140556f97e90c1e0e41bbd0d56d7ea32 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 23 Feb 2023 13:38:21 -0500 Subject: [PATCH 0760/1234] Target allocator version bumps (#1508) * Change the github action to match the operator * Add chloggen * Bump lots of versions * Set defaults * Add changelog entry * linting --- .chloggen/target-alloc-version-bumps.yaml | 16 ++ cmd/otel-allocator/go.mod | 144 ++++++++------- cmd/otel-allocator/go.sum | 204 +++++++++++++++++++++ cmd/otel-allocator/watcher/promOperator.go | 13 +- 4 files changed, 305 insertions(+), 72 deletions(-) create mode 100755 .chloggen/target-alloc-version-bumps.yaml diff --git a/.chloggen/target-alloc-version-bumps.yaml b/.chloggen/target-alloc-version-bumps.yaml new file mode 100755 index 000000000..44e13970f --- /dev/null +++ b/.chloggen/target-alloc-version-bumps.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Updates versions of many dependencies, sets defaults for prometheus operator to work. The breaking change introduced is the new RBAC requirement for "endpointslices" in the "discovery.k8s.io" api group. + +# One or more tracking issues related to the change +issues: [1464] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 5c6d5754e..9463dc367 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -4,32 +4,33 @@ go 1.19 require ( github.com/buraksezer/consistent v0.10.0 - github.com/cespare/xxhash/v2 v2.1.2 - github.com/fsnotify/fsnotify v1.5.4 + github.com/cespare/xxhash/v2 v2.2.0 + github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.8.2 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.53.1 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 - github.com/prometheus/client_golang v1.13.0 - github.com/prometheus/common v0.37.0 + github.com/prometheus-operator/prometheus-operator v0.63.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 + github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/common v0.40.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.24.3 - k8s.io/apimachinery v0.24.3 - k8s.io/client-go v0.24.3 - k8s.io/klog/v2 v2.70.0 - sigs.k8s.io/controller-runtime v0.11.0 + k8s.io/api v0.26.1 + k8s.io/apimachinery v0.26.1 + k8s.io/client-go v0.26.1 + k8s.io/klog/v2 v2.90.0 + sigs.k8s.io/controller-runtime v0.14.4 ) require ( - cloud.google.com/go/compute v1.7.0 // indirect + cloud.google.com/go/compute v1.13.0 // indirect + cloud.google.com/go/compute/metadata v0.2.1 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.28 // indirect @@ -43,40 +44,42 @@ require ( github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/armon/go-metrics v0.3.10 // indirect + github.com/armon/go-metrics v0.4.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/aws/aws-sdk-go v1.44.72 // indirect + github.com/aws/aws-sdk-go v1.44.187 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.82.0 // indirect - github.com/docker/distribution v2.8.0+incompatible // indirect + github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 // indirect + github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd // indirect github.com/emicklei/go-restful v2.16.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/go-control-plane v0.10.3 // indirect github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.0 // indirect - github.com/go-openapi/analysis v0.21.2 // indirect - github.com/go-openapi/errors v0.20.2 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.6 // indirect - github.com/go-openapi/loads v0.21.1 // indirect - github.com/go-openapi/runtime v0.23.1 // indirect - github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-openapi/analysis v0.21.4 // indirect + github.com/go-openapi/errors v0.20.3 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/loads v0.21.2 // indirect + github.com/go-openapi/runtime v0.25.0 // indirect + github.com/go-openapi/spec v0.20.7 // indirect github.com/go-openapi/strfmt v0.21.3 // indirect - github.com/go-openapi/swag v0.21.1 // indirect - github.com/go-openapi/validate v0.21.0 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/validate v0.22.0 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-playground/validator/v10 v10.11.1 // indirect @@ -84,21 +87,21 @@ require ( github.com/go-zookeeper/zk v1.0.3 // indirect github.com/goccy/go-json v0.9.11 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect + github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/google/gnostic v0.6.9 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.4.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gophercloud/gophercloud v0.25.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 // indirect - github.com/hashicorp/consul/api v1.14.0 // indirect + github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect + github.com/hashicorp/consul/api v1.15.3 // indirect github.com/hashicorp/cronexpr v1.1.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v0.16.2 // indirect @@ -106,12 +109,12 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.3.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c // indirect github.com/hashicorp/serf v0.9.7 // indirect github.com/hetznercloud/hcloud-go v1.35.2 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -123,7 +126,8 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect github.com/miekg/dns v1.1.50 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -137,51 +141,51 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 // indirect - github.com/prometheus/alertmanager v0.24.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus-community/prom-label-proxy v0.6.0 // indirect + github.com/prometheus/alertmanager v0.25.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/cobra v1.4.0 // indirect - github.com/thanos-io/thanos v0.24.0-rc.1 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/spf13/cobra v1.6.1 // indirect + github.com/thanos-io/thanos v0.30.2 // indirect github.com/ugorji/go/codec v1.2.7 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.mongodb.org/mongo-driver v1.11.1 // indirect - go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel v1.9.0 // indirect - go.opentelemetry.io/otel/trace v1.9.0 // indirect - go.uber.org/atomic v1.9.0 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/otel v1.11.2 // indirect + go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.2.0 // indirect - go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 // indirect - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect - golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect - golang.org/x/tools v0.1.12 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/crypto v0.1.0 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/oauth2 v0.4.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/term v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.4.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.91.0 // indirect + google.golang.org/api v0.103.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 // indirect - google.golang.org/grpc v1.48.0 // indirect + google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect + google.golang.org/grpc v1.52.1 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.23.0 // indirect - k8s.io/component-base v0.23.0 // indirect - k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect - k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect - sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/component-base v0.26.1 // indirect + k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect + k8s.io/utils v0.0.0-20230202215443-34013725500c // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 74e110c1a..e3ef7b678 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -32,6 +32,7 @@ cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Ud cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -48,6 +49,10 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -122,6 +127,7 @@ github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUM github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= @@ -176,6 +182,8 @@ github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4 github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= @@ -206,6 +214,8 @@ github.com/aws/aws-sdk-go v1.42.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+ github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.72 h1:i7J5XT7pjBjtl1OrdIhiQHzsG89wkZCcM1HhyK++3DI= github.com/aws/aws-sdk-go v1.44.72/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.187 h1:D5CsRomPnlwDHJCanL2mtaLIcbhjiWxNh5j8zvaWdJA= +github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= @@ -230,6 +240,7 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -251,6 +262,8 @@ github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tj github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= @@ -315,6 +328,7 @@ github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab/go.mod h1: github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -351,6 +365,8 @@ github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= +github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= @@ -376,6 +392,8 @@ github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6/go.mod h1:O github.com/efficientgo/tools/core v0.0.0-20210201224146-3d78f4d30648/go.mod h1:cFZoHUhKg31xkPnPjhPKFtevnx0Xcg67ptBRxbpaxtk= github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 h1:jIALuFymwBqVsF32JhgzVsbCB6QsWvXqhetn8QgyrZ4= github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= +github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd h1:svR6KxSP1xiPw10RN4Pd7g6BAVkEcNN628PAqZH31mM= +github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= github.com/efficientgo/tools/extkingpin v0.0.0-20210609125236-d73259166f20/go.mod h1:ZV0utlglOczUWv3ih2AbqPSoLoFzdplUYxwV62eZi6Q= github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= @@ -388,6 +406,10 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.16.0+incompatible h1:rgqiKNjTnFQA6kkhFe16D8epTksy9HQ1MyrbDXSdYhM= github.com/emicklei/go-restful v2.16.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -408,6 +430,10 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -419,6 +445,7 @@ github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4 github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -432,6 +459,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= @@ -471,6 +500,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= +github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -482,6 +513,8 @@ github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7 github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= +github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= +github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= @@ -494,6 +527,8 @@ github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpX github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= +github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= @@ -501,6 +536,8 @@ github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDB github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= @@ -509,6 +546,10 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -522,6 +563,8 @@ github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20 github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= +github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= +github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.3/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= @@ -533,6 +576,8 @@ github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVK github.com/go-openapi/runtime v0.19.29/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= github.com/go-openapi/runtime v0.23.1 h1:/Drg9R96eMmgKJHVWZADz78XbE39/6QiIiB45mc+epo= github.com/go-openapi/runtime v0.23.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= +github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= +github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= @@ -546,6 +591,9 @@ github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= +github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= @@ -575,6 +623,8 @@ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= @@ -586,6 +636,8 @@ github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI= github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= +github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= @@ -668,6 +720,8 @@ github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyHSnggXm/DvMMnTsQIc= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -728,6 +782,8 @@ github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSx github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= +github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -743,6 +799,8 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -781,6 +839,8 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -790,6 +850,8 @@ github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/Oth github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= @@ -815,6 +877,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1/go.mod h1:uPG2nyK4CtgNDmWv7qyzYcdI+S90kHHRWvHnBtEMBXM= github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 h1:uirlL/j72L93RhV4+mkWhjv0cov2I0MIgPOG9rMDr1k= github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -844,6 +908,8 @@ github.com/hashicorp/consul/api v1.9.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/F github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= github.com/hashicorp/consul/api v1.14.0 h1:Y64GIJ8hYTu+tuGekwO4G4ardXoiCivX9wv1iP/kihk= github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ= +github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= @@ -852,6 +918,8 @@ github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPA github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/consul/sdk v0.10.0 h1:rGLEh2AWK4K0KCMvqWAz2EYxQqgciIfMagWZ0nVe5MI= github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= +github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= @@ -901,6 +969,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -940,6 +1010,8 @@ github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ionos-cloud/sdk-go/v6 v6.1.2 h1:es5R5sVmjHFrYNBbJfAeHF+16GheaJMyc63xWxIAec4= @@ -1083,12 +1155,18 @@ github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= +github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= github.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= +github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= +github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1136,6 +1214,7 @@ github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0Gq github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1196,6 +1275,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -1259,18 +1339,28 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 h1:2TVScDEIfhUCwVNrUenXBGke17gURHMi4nIjZ5iOLBc= github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512/go.mod h1:qYNF+Y9Fm8LQEsYPHPx67Sw7gXNGNFSWtuQpL/4tvbk= +github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= +github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= github.com/prometheus-operator/prometheus-operator v0.53.1 h1:UN1/7cX0bcL321R2MdLMU0olHaTh0kWZzub26sBarpY= github.com/prometheus-operator/prometheus-operator v0.53.1/go.mod h1:fVDQolAz9K/ThjZ6Ze5Z/HmxJxYNcIA2Yfsq9yokV7g= +github.com/prometheus-operator/prometheus-operator v0.63.0 h1:LsOFPNzcOKirmM3xHEextfj5yaJyoWL4l42hbhvBSN8= +github.com/prometheus-operator/prometheus-operator v0.63.0/go.mod h1:vaMQs+VjHx0y1keJllae08t8cLidN4Zor8gXAGpsZjo= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 h1:VYWk40/hnOlk7T64najC0RIvYv4RJ9SwLAJyAu5qWyI= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 h1:efsW3CfymG5bZUpeIsYfdihB33YItCn7uHBOEbnHQG8= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0/go.mod h1:/UtstAaWVaS3Z9GK9jo8+4SN9T+RMSq7VlOcQMmiEsc= github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 h1:tKzmD3DQoK3OIcIxWhEmjdrjAr8ufVRpOO5JvpoDgic= github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1/go.mod h1:qP20QQUPGhQMp8yD68N17s3VvMeuLYrh+An0M4Q/zs0= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 h1:8Au9x/807lcDRCmypzfWvr9haO5eF/eX7hiMQCy1k4A= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0/go.mod h1:sjCnCbwVFVTO90iChFOK0eUat70C4Q11EVik0Rk3EeU= github.com/prometheus/alertmanager v0.19.0/go.mod h1:Eyp94Yi/T+kdeb2qvq66E3RGuph5T/jm/RBVh4yz1xo= github.com/prometheus/alertmanager v0.21.0/go.mod h1:h7tJ81NA0VLWvWEayi1QltevFkLF3KxmC/malTcT8Go= github.com/prometheus/alertmanager v0.21.1-0.20200911160112-1fdff6b3f939/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= @@ -1281,6 +1371,8 @@ github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xm github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA= github.com/prometheus/alertmanager v0.24.0 h1:HBWR3lk4uy3ys+naDZthDdV7yEsxpaNeZuUS+hJgrOw= github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= +github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= +github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= @@ -1302,6 +1394,8 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1310,6 +1404,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= @@ -1336,6 +1432,10 @@ github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= +github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= +github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= +github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= @@ -1413,6 +1513,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1436,6 +1538,10 @@ github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSW github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1485,6 +1591,8 @@ github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17/go.mod h1:zU8K github.com/thanos-io/thanos v0.22.0/go.mod h1:SZDWz3phcUcBr4MYFoPFRvl+Z9Nbi45HlwQlwSZSt+Q= github.com/thanos-io/thanos v0.24.0-rc.1 h1:DyR8rDMGbDVsxgX2EQZ5ye+AE4HyY4QevuBKhnJhw9o= github.com/thanos-io/thanos v0.24.0-rc.1/go.mod h1:sfnKJG7cDA41ixNL4gsTJEa3w9Qt8lwAjw+dqRMSDG0= +github.com/thanos-io/thanos v0.30.2 h1:JcazfBlpX/i747uRxBWHJMopX0g+eSaZYGjqMeQIkPo= +github.com/thanos-io/thanos v0.30.2/go.mod h1:k23ZcbQSK0Jd/siuEti6J6/3DeezIk+YLRBcYikzXl8= github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1532,6 +1640,9 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.0.0/go.mod h1:IoImgRak9i3zJyuxOKUP1v4UZd1tMoKkq/Cimt1uhCg= @@ -1604,6 +1715,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -1613,6 +1726,10 @@ go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzox go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= +go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= +go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= @@ -1629,6 +1746,10 @@ go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16g go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= +go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= +go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1640,6 +1761,8 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= @@ -1655,6 +1778,8 @@ go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKY go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -1665,6 +1790,8 @@ go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1705,6 +1832,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1752,6 +1881,10 @@ golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1839,8 +1972,13 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1871,6 +2009,8 @@ golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7Lm golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3AbpuWzV6f1LjnLrM4pe2SZrw= golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1887,6 +2027,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2019,18 +2161,30 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2041,8 +2195,13 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2056,6 +2215,8 @@ golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2147,6 +2308,10 @@ golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpd golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2210,6 +2375,8 @@ google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3 google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2299,6 +2466,7 @@ google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= @@ -2321,6 +2489,8 @@ google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 h1:7PEE9xCtufpGJzrqweakEEnTh7YFELmnKm/ee+5jmfQ= google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc= +google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -2364,6 +2534,10 @@ google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.52.1 h1:2NpOPk5g5Xtb0qebIEs7hNIa++PdtZLo2AQUpc1YnSU= +google.golang.org/grpc v1.52.1/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -2448,19 +2622,29 @@ k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjT k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= +k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= +k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= +k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= +k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= +k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= +k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= +k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= +k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= +k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -2472,15 +2656,27 @@ k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.70.0 h1:GMmmjoFOrNepPN0ZeGCzvD2Gh5IKRwdFx8W5PBxVTQU= k8s.io/klog/v2 v2.70.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= +k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= +k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= +k8s.io/utils v0.0.0-20230202215443-34013725500c/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -2488,14 +2684,22 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 49ce07f00..92855b5bd 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -56,7 +56,7 @@ func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfi monitoringv1.PodMonitorName: podMonitorInformers, } - generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), &monitoringv1.Prometheus{}) // TODO replace Nop? + generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), &monitoringv1.Prometheus{}, true) // TODO replace Nop? if err != nil { return nil, err } @@ -162,7 +162,16 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { OAuth2Assets: nil, SigV4Assets: nil, } - generatedConfig, err := w.configGenerator.Generate(&monitoringv1.Prometheus{}, serviceMonitorInstances, podMonitorInstances, map[string]*monitoringv1.Probe{}, &store, nil, nil, nil, []string{}) + // TODO: We should make these durations configurable + prom := &monitoringv1.Prometheus{ + Spec: monitoringv1.PrometheusSpec{ + EvaluationInterval: monitoringv1.Duration("30s"), + CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ + ScrapeInterval: monitoringv1.Duration("30s"), + }, + }, + } + generatedConfig, err := w.configGenerator.Generate(prom, serviceMonitorInstances, podMonitorInstances, map[string]*monitoringv1.Probe{}, &store, nil, nil, nil, []string{}) if err != nil { return nil, err } From 5c14ce9601ba9c771cbe15692f8db28062630a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraci=20Paix=C3=A3o=20Kr=C3=B6hling?= Date: Thu, 23 Feb 2023 17:24:42 -0300 Subject: [PATCH 0761/1234] jpkroehling resigns (#1449) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Juraci Paixão Kröhling --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 956a7ed94..6fc06230c 100644 --- a/README.md +++ b/README.md @@ -464,7 +464,6 @@ Target Allocator Maintainers ([@open-telemetry/operator-ta-maintainers](https:// Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)): - [Jacob Aronoff](https://github.com/jaronoff97), Lightstep -- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - [Pavol Loffay](https://github.com/pavolloffay), Red Hat - [Vineeth Pothulapati](https://github.com/VineethReddy02), Timescale @@ -472,6 +471,7 @@ Emeritus Maintainers - [Alex Boten](https://github.com/codeboten), Lightstep - [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk +- [Juraci Paixão Kröhling](https://github.com/jpkrohling), Grafana Labs - [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk Learn more about roles in the [community repository](https://github.com/open-telemetry/community/blob/main/community-membership.md). From e322367ad0dea891e8223bab223a2f5a9caf3165 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 23 Feb 2023 15:29:22 -0500 Subject: [PATCH 0762/1234] Update OpAMP Bridge with latest otel go version (#1512) * Change the github action to match the operator * Add chloggen * go mod update --- cmd/operator-opamp-bridge/go.mod | 18 ++++----- cmd/operator-opamp-bridge/go.sum | 39 +++++++++---------- cmd/operator-opamp-bridge/metrics/reporter.go | 36 +++++++---------- 3 files changed, 42 insertions(+), 51 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 13ad310ec..62a321df2 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -11,10 +11,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.13.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 - go.opentelemetry.io/otel/metric v0.34.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 + go.opentelemetry.io/otel/metric v0.36.0 go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.34.0 + go.opentelemetry.io/otel/sdk/metric v0.36.0 go.uber.org/multierr v1.9.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -45,7 +45,7 @@ require ( github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect github.com/imdario/mergo v0.3.12 // indirect @@ -65,22 +65,22 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 // indirect go.opentelemetry.io/otel/trace v1.13.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.51.0 // indirect + google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect + google.golang.org/grpc v1.52.3 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.26.1 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index d1aaa467c..1504e5e6d 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -63,7 +63,6 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -78,7 +77,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= @@ -182,8 +180,9 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= @@ -323,18 +322,18 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2 h1:htgM8vZIF8oPSCxa341e3IZ4yr/sKxgu8KZYllByiVY= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.2/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0 h1:kpskzLZ60cJ48SJ4uxWa6waBL+4kSV6nVK8rP+QM8Wg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.34.0/go.mod h1:4+x3i62TEegDHuzNva0bMcAN8oUi5w4liGb1d/VgPYo= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0 h1:t4Ajxj8JGjxkqoBtbkCOY2cDUl9RwiNE9LPQavooi9U= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.34.0/go.mod h1:WO7omosl4P7JoanH9NgInxDxEn2F2M5YinIh8EyeT8w= -go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8= -go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 h1:pa05sNT/P8OsIQ8mPZKTIyiBuzS/xDGLVx+DCt0y6Vs= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 h1:9uzubQUMa9RsQqQZc0Btl51pTLMdHgDHJszg6839rBQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0/go.mod h1:N+2vPD0QfUraV0HGpuiAEzM+rxpnH3Q+/+Qs6HQeWac= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 h1:o1NyoBU8j3tY5Vtff07/dNi2egBfC4R0qSuWI0z+8pA= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0/go.mod h1:OhE6QNMd4yb/mN0LFxiutl2U1HPekpBHv9hN3TzYKmE= +go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= +go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= -go.opentelemetry.io/otel/sdk/metric v0.34.0 h1:7ElxfQpXCFZlRTvVRTkcUvK8Gt5DC8QzmzsLsO2gdzo= -go.opentelemetry.io/otel/sdk/metric v0.34.0/go.mod h1:l4r16BIqiqPy5rd14kkxllPy/fOI4tWo1jkpD9Z3ffQ= +go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= +go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -429,8 +428,9 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -475,7 +475,6 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -612,8 +611,8 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -630,9 +629,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -646,7 +644,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/cmd/operator-opamp-bridge/metrics/reporter.go b/cmd/operator-opamp-bridge/metrics/reporter.go index 08dd8a5ef..16148e378 100644 --- a/cmd/operator-opamp-bridge/metrics/reporter.go +++ b/cmd/operator-opamp-bridge/metrics/reporter.go @@ -27,8 +27,6 @@ import ( "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/instrument/asyncfloat64" - "go.opentelemetry.io/otel/metric/instrument/asyncint64" sdkmetric "go.opentelemetry.io/otel/sdk/metric" otelresource "go.opentelemetry.io/otel/sdk/resource" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" @@ -50,8 +48,8 @@ type MetricReporter struct { process *process.Process // Some example metrics to report. - processMemoryPhysical asyncint64.Gauge - processCpuTime asyncfloat64.Counter + processMemoryPhysical instrument.Float64ObservableGauge + processCpuTime instrument.Float64ObservableCounter } // NewMetricReporter creates an OTLP/HTTP client to the destination address supplied by the server. @@ -124,49 +122,45 @@ func NewMetricReporter( // Create some metrics that will be reported according to OpenTelemetry semantic // conventions for process metrics (conventions are TBD for now). - reporter.processCpuTime, err = reporter.meter.AsyncFloat64().Counter( + reporter.processCpuTime, err = reporter.meter.Float64ObservableGauge( "process.cpu.time", + instrument.WithFloat64Callback(reporter.processCpuTimeFunc), ) if err != nil { return nil, fmt.Errorf("can't create process time metric: %w", err) } - err = reporter.meter.RegisterCallback([]instrument.Asynchronous{reporter.processCpuTime}, reporter.processCpuTimeFunc) - if err != nil { - return nil, fmt.Errorf("can't create register callback: %w", err) - } - reporter.processMemoryPhysical, err = reporter.meter.AsyncInt64().Gauge( + reporter.processMemoryPhysical, err = reporter.meter.Float64ObservableCounter( "process.memory.physical_usage", + instrument.WithFloat64Callback(reporter.processMemoryPhysicalFunc), ) if err != nil { return nil, fmt.Errorf("can't create memory metric: %w", err) } - err = reporter.meter.RegisterCallback([]instrument.Asynchronous{reporter.processMemoryPhysical}, reporter.processMemoryPhysicalFunc) - if err != nil { - return nil, fmt.Errorf("can't register callback: %w", err) - } reporter.meterShutdowner = func() { _ = provider.Shutdown(context.Background()) } return reporter, nil } -func (reporter *MetricReporter) processCpuTimeFunc(c context.Context) { +func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer instrument.Float64Observer) error { times, err := reporter.process.Times() if err != nil { reporter.logger.Errorf("Cannot get process CPU times: %w", err) } - reporter.processCpuTime.Observe(c, times.User, attribute.String("state", "user")) - reporter.processCpuTime.Observe(c, times.System, attribute.String("state", "system")) - reporter.processCpuTime.Observe(c, times.Iowait, attribute.String("state", "wait")) + observer.Observe(times.User, attribute.String("state", "user")) + observer.Observe(times.System, attribute.String("state", "system")) + observer.Observe(times.Iowait, attribute.String("state", "wait")) + return nil } -func (reporter *MetricReporter) processMemoryPhysicalFunc(ctx context.Context) { +func (reporter *MetricReporter) processMemoryPhysicalFunc(_ context.Context, observer instrument.Float64Observer) error { memory, err := reporter.process.MemoryInfo() if err != nil { reporter.logger.Errorf("Cannot get process memory information: %w", err) - return + return nil } - reporter.processMemoryPhysical.Observe(ctx, int64(memory.RSS)) + observer.Observe(float64(memory.RSS)) + return nil } func (reporter *MetricReporter) Shutdown() { From 73c4353f897c1eaf66cf40db423da338745139c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 12:20:41 -0500 Subject: [PATCH 0763/1234] Bump github.com/gin-gonic/gin from 1.8.2 to 1.9.0 in /cmd/otel-allocator (#1513) Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.2 to 1.9.0. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](https://github.com/gin-gonic/gin/compare/v1.8.2...v1.9.0) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 25 +- cmd/otel-allocator/go.sum | 1643 +------------------------------------ 2 files changed, 57 insertions(+), 1611 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 9463dc367..17d3044f4 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -7,7 +7,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.0 - github.com/gin-gonic/gin v1.8.2 + github.com/gin-gonic/gin v1.9.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 github.com/mitchellh/hashstructure v1.1.0 @@ -41,14 +41,14 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.1 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/aws/aws-sdk-go v1.44.187 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect + github.com/bytedance/sonic v1.8.0 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect @@ -59,7 +59,6 @@ require ( github.com/docker/go-units v0.4.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd // indirect - github.com/emicklei/go-restful v2.16.0+incompatible // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/go-control-plane v0.10.3 // indirect github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect @@ -80,12 +79,12 @@ require ( github.com/go-openapi/strfmt v0.21.3 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/go-openapi/validate v0.22.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect - github.com/go-playground/validator/v10 v10.11.1 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.11.2 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect - github.com/goccy/go-json v0.9.11 // indirect + github.com/goccy/go-json v0.10.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -108,7 +107,6 @@ require ( github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-version v1.3.0 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c // indirect github.com/hashicorp/serf v0.9.7 // indirect @@ -120,12 +118,13 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/cpuid/v2 v2.1.0 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/linode/linodego v1.8.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect github.com/miekg/dns v1.1.50 // indirect @@ -151,7 +150,8 @@ require ( github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/thanos-io/thanos v0.30.2 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.9 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.mongodb.org/mongo-driver v1.11.1 // indirect go.opencensus.io v0.24.0 // indirect @@ -161,7 +161,8 @@ require ( go.uber.org/goleak v1.2.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.1.0 // indirect + golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect + golang.org/x/crypto v0.5.0 // indirect golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.4.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index e3ef7b678..28aadc4d6 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1,14 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.49.0/go.mod h1:hGvAdzcWNbyuxS3nWhD7H2cIJxjRRTRLQVB0bdputVY= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -16,22 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.92.2/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= @@ -39,450 +20,176 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.1.0/go.mod h1:B6ByKcIdYmhoyDzmOnQxyOhN6r05qnewYIxxG6L0/b4= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.3.0/go.mod h1:9IAwXhoyBJ7z9LcAwkj0/7NnPzYaPeZxxVp3zm+5IqA= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/trace v0.1.0/go.mod h1:wxEwsoeRVPbeSkt7ZC9nWCgmoKQRAoySN7XHW2AmI7g= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= -github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= -github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= -github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= -github.com/Azure/azure-storage-blob-go v0.13.0/go.mod h1:pA9kNqtjUeQF2zOSu4s//nUdBD+e64lEuc4sVnuOfNs= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3-0.20191028180845-3492b2aff503/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.1-0.20191028180845-3492b2aff503/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.9.2/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.3.1-0.20191028180845-3492b2aff503/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.2.1-0.20191028180845-3492b2aff503/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5/go.mod h1:xnKTFzjGUiZtiOagBsfnvomW+nJg2usB1ZpordQWqNM= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.6/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= -github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= -github.com/alicebob/miniredis/v2 v2.14.3/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I= -github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.6/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.17.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.33.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.33.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.35.5/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go v1.35.31/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.37.8/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.42.8/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.72 h1:i7J5XT7pjBjtl1OrdIhiQHzsG89wkZCcM1HhyK++3DI= -github.com/aws/aws-sdk-go v1.44.72/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.187 h1:D5CsRomPnlwDHJCanL2mtaLIcbhjiWxNh5j8zvaWdJA= github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/baidubce/bce-sdk-go v0.9.81/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= -github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= -github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v1.0.0/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.0.2/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= -github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= +github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chromedp/cdproto v0.0.0-20200116234248-4da64dd111ac/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= -github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g= -github.com/chromedp/chromedp v0.5.3/go.mod h1:YLdPtndaHQ4rCpSpBG+IPpy9JvX0VD+7aaLxYgYj28w= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc h1:PYXxkRUBGUMa5xgMVMDl62vEklZvKpVaxQeN9ie7Hfk= github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk= -github.com/cockroachdb/datadriven v0.0.0-20190531201743-edce55837238/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cortexproject/cortex v0.6.1-0.20200228110116-92ab6cbe0995/go.mod h1:3Xa3DjJxtpXqxcMGdk850lcIRb81M0fyY1MQ6udY134= -github.com/cortexproject/cortex v1.2.1-0.20200805064754-d8edc95e2c91/go.mod h1:PVPxNLrxKH+yc8asaJOxuz7TiRmMizFfnSMOnRzM6oM= -github.com/cortexproject/cortex v1.3.1-0.20200923145333-8587ea61fe17/go.mod h1:dJ9gpW7dzQ7z09cKtNN9PfebumgyO4dtNdFQ6eQEed0= -github.com/cortexproject/cortex v1.4.1-0.20201030080541-83ad6df2abea/go.mod h1:kXo5F3jlF7Ky3+I31jt/bXTzOlQjl2X/vGDpy0RY1gU= -github.com/cortexproject/cortex v1.5.1-0.20201111110551-ba512881b076/go.mod h1:zFBGVsvRBfVp6ARXZ7pmiLaGlbjda5ZnA4Y6qSJyrQg= -github.com/cortexproject/cortex v1.6.1-0.20210108144208-6c2dab103f20/go.mod h1:fOsaeeFSyWrjd9nFJO8KVUpsikcxnYsjEzQyjURBoQk= -github.com/cortexproject/cortex v1.6.1-0.20210215155036-dfededd9f331/go.mod h1:8bRHNDawVx8te5lIqJ+/AcNTyfosYNC34Qah7+jX/8c= -github.com/cortexproject/cortex v1.7.1-0.20210224085859-66d6fb5b0d42/go.mod h1:u2dxcHInYbe45wxhLoWVdlFJyDhXewsMcxtnbq/QbH4= -github.com/cortexproject/cortex v1.7.1-0.20210316085356-3fedc1108a49/go.mod h1:/DBOW8TzYBTE/U+O7Whs7i7E2eeeZl1iRVDtIqxn5kg= -github.com/cortexproject/cortex v1.8.1-0.20210422151339-cf1c444e0905/go.mod h1:xxm4/CLvTmDxwE7yXwtClR4dIvkG4S09o5DygPOgc1U= -github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab/go.mod h1:njSBkQ1wUNx9X4knV/j65Pi4ItlJXX4QwXRKoMflJd8= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cucumber/godog v0.8.1/go.mod h1:vSh3r/lM+psC1BPXvdkSEuNjmXfpVqrMGYAElF6hxnA= -github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= -github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f/go.mod h1:8S58EK26zhXSxzv7NQFpnliaOQsmDUxvoQO3rt154Vg= -github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= -github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00/go.mod h1:olo7eAdKwJdXxb55TKGLiJ6xt1H0/tiiRCWKVLmtjY4= -github.com/cznic/lldb v1.1.0/go.mod h1:FIZVUmYUVhPwRiPzL8nD/mpFcJ/G7SSXjjXYG4uRI3A= -github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/cznic/ql v1.2.0/go.mod h1:FbpzhyZrqr0PVlK6ury+PoW3T0ODUV22OeWIxcaOrSE= -github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65/go.mod h1:q2w6Bg5jeox1B+QkJ6Wp/+Vn0G/bo3f1uY7Fn3vivIQ= -github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= -github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc/go.mod h1:Y1SNZ4dRUOKXshKUbwUapqNncRrho4mkjQebgEHZLj8= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c1yc= github.com/digitalocean/godo v1.82.0 h1:lqAit46H1CqJGjh7LDbsamng/UMBME5rvmfH3Vb5Yy8= github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.8.0+incompatible h1:l9EaZDICImO1ngI+uTifW+ZYvvz7fKISBAKpg+MbWbY= -github.com/docker/distribution v2.8.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v0.7.3-0.20190817195342-4760db040282/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47/go.mod h1:vDnF4AAEZmO0mvyFIATeDJPFaSRM7ywaOnKd61zaSoE= -github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= -github.com/efficientgo/tools/core v0.0.0-20210201224146-3d78f4d30648/go.mod h1:cFZoHUhKg31xkPnPjhPKFtevnx0Xcg67ptBRxbpaxtk= -github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208 h1:jIALuFymwBqVsF32JhgzVsbCB6QsWvXqhetn8QgyrZ4= -github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= +github.com/efficientgo/core v1.0.0-rc.0.0.20221201130417-ba593f67d2a4 h1:rydBwnBoywKQMjWF0z8SriYtQ+uUcaFsxuijMjJr5PI= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd h1:svR6KxSP1xiPw10RN4Pd7g6BAVkEcNN628PAqZH31mM= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= -github.com/efficientgo/tools/extkingpin v0.0.0-20210609125236-d73259166f20/go.mod h1:ZV0utlglOczUWv3ih2AbqPSoLoFzdplUYxwV62eZi6Q= -github.com/elastic/go-sysinfo v1.0.1/go.mod h1:O/D5m1VpYLwGjCYzEt63g3Z1uO3jXfwyzzjiW90t8cY= -github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.16.0+incompatible h1:rgqiKNjTnFQA6kkhFe16D8epTksy9HQ1MyrbDXSdYhM= -github.com/emicklei/go-restful v2.16.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structtag v1.1.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= -github.com/gin-gonic/gin v1.8.2 h1:UzKToD9/PoFj/V4rvlKqTRKnQYyz8Sc1MJlv4JHPtvY= -github.com/gin-gonic/gin v1.8.2/go.mod h1:qw5AYuDrzRTnhvusDsrov+fDIxp9Dleuu12h8nfB398= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= +github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -490,179 +197,60 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= -github.com/go-openapi/loads v0.21.1 h1:Wb3nVZpdEzDTcly8S4HMkey6fjARRzb7iEaySimlDW0= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.3/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= -github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.19.26/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/runtime v0.19.29/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/runtime v0.23.1 h1:/Drg9R96eMmgKJHVWZADz78XbE39/6QiIiB45mc+epo= -github.com/go-openapi/runtime v0.23.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= -github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.4/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= -github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI= -github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-redis/redis/v8 v8.0.0-beta.10.0.20200905143926-df7fe4e2ce72/go.mod h1:CJP1ZIHwhosNYwIdaHPZK9vHsM3+roNBaZ7U9Of1DXc= -github.com/go-redis/redis/v8 v8.2.3/go.mod h1:ysgGY09J/QeDYbu3HikWEIPCwaeOkuNoTgKayTEaEOw= -github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= +github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -689,52 +277,22 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= -github.com/gocql/gocql v0.0.0-20190301043612-f6df8288f9b4/go.mod h1:4Fw1eo5iaEhDUs8XyuhSVCVy52Jq3L+/3GJgYkwc+/0= -github.com/gocql/gocql v0.0.0-20200121121104-95d072f1b5bb/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= -github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= -github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= +github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-migrate/migrate/v4 v4.7.0/go.mod h1:Qvut3N4xKWjoH3sokBccML6WyHSnggXm/DvMMnTsQIc= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -742,9 +300,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -760,28 +315,14 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.8.4/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= -github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -797,133 +338,49 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200615235658-03e1cf38a040/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20220729232143-a41b82acbcb1/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/gophercloud/gophercloud v0.6.0/go.mod h1:GICNByuaEBibcjmjvI7QvYJSZEbGkcYwAR7EZK2WMqM= -github.com/gophercloud/gophercloud v0.12.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/gophercloud v0.13.0/go.mod h1:VX0Ibx85B60B5XOrZr6kaNwrmPUzcmMpwxvQ1WQIIWM= github.com/gophercloud/gophercloud v0.25.0 h1:C3Oae7y0fUVQGSsBrb3zliAjdX+riCSEh4lNMejFNI4= github.com/gophercloud/gophercloud v0.25.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1/go.mod h1:uPG2nyK4CtgNDmWv7qyzYcdI+S90kHHRWvHnBtEMBXM= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 h1:uirlL/j72L93RhV4+mkWhjv0cov2I0MIgPOG9rMDr1k= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware/providers/kit/v2 v2.0.0-20201002093600-73cf2ae9d891/go.mod h1:516cTXxZzi4NBUBbKcwmO4Eqbb6GHAEd3o4N+GYyCBY= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.4.1/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.5.0/go.mod h1:LqwrLNW876eYSuUOo4ZLHBcdKc038txr/IMfbLPATa4= -github.com/hashicorp/consul/api v1.7.0/go.mod h1:1NSuaUUkFaJzMasbfq/11wKYWSR67Xn6r2DXKhuDNFg= -github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= -github.com/hashicorp/consul/api v1.9.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.14.0 h1:Y64GIJ8hYTu+tuGekwO4G4ardXoiCivX9wv1iP/kihk= -github.com/hashicorp/consul/api v1.14.0/go.mod h1:bcaw5CSZ7NE9qfOfKCI1xb7ZKjzu/MyvQkCLTfqLqxQ= github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU= github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.5.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.6.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/consul/sdk v0.10.0 h1:rGLEh2AWK4K0KCMvqWAz2EYxQqgciIfMagWZ0nVe5MI= -github.com/hashicorp/consul/sdk v0.10.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4= github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= @@ -934,7 +391,6 @@ github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39 github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -948,8 +404,6 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -960,90 +414,42 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= -github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.5/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1vWZfM= github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c h1:lV5A4cLQr1Bh1xGSSQ2R0fDRK4GZnfXxYia4Q7aaTXc= github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c/go.mod h1:wPbfT+Daj0i4M73rK2TGvIHo9FUWMJ/hrhn8Xb4Puvc= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.8.5/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= -github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= -github.com/hashicorp/serf v0.9.3/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hetznercloud/hcloud-go v1.35.2 h1:eEDtmDiI2plZ2UQmj4YpiYse5XbtpXOUBpAdIOLxzgE= github.com/hetznercloud/hcloud-go v1.35.2/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= -github.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= -github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/ionos-cloud/sdk-go/v6 v6.1.2 h1:es5R5sVmjHFrYNBbJfAeHF+16GheaJMyc63xWxIAec4= github.com/ionos-cloud/sdk-go/v6 v6.1.2/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= -github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= -github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= -github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw= -github.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1051,24 +457,16 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= -github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= +github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b h1:iNjcivnc6lhbvJA3LD622NPrUponluJrBWPIwGG/3Bg= github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1079,47 +477,19 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pty v1.0.0/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kshvakov/clickhouse v1.3.5/go.mod h1:DMzX7FxRymoNkVgizH0DWAL8Cur7wHLgx3MUnGwJqpE= -github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lann/builder v0.0.0-20150808151131-f22ce00fd939/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= -github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o= -github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw= -github.com/leanovate/gopter v0.2.4/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= -github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.0/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.8.0 h1:7B2UaWu6C48tZZZrtINWRElAcwzk4TLnL9USjKf3xm0= github.com/linode/linodego v1.8.0/go.mod h1:heqhl91D8QTPVm2k9qZHP78zzbOdTFLXE9NJc3bcc50= -github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= -github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -1128,442 +498,161 @@ github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kN github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= -github.com/mattn/go-ieproxy v0.0.0-20191113090002-7c0f6868bffe/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= -github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= -github.com/matttproud/golang_protobuf_extensions v1.0.0/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc= -github.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA= -github.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M= -github.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY= -github.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.38/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio-go/v6 v6.0.44/go.mod h1:qD0lajrGW49lKZLtXKtCB4X/qkMf0a5tBvN2PaZg7Gg= -github.com/minio/minio-go/v6 v6.0.56/go.mod h1:KQMM+/44DSlSGSQWSfRrAZ12FVMmpWNuX37i2AX0jfI= -github.com/minio/minio-go/v7 v7.0.2/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns= -github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozillazg/go-cos v0.13.0/go.mod h1:Zp6DvvXn0RUOXGJ2chmWt2bLEqRAnJnS3DnAZsJsoaE= -github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/ncw/swift v1.0.50/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/ncw/swift v1.0.52/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= -github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.1-0.20200124165624-2876d2018785/go.mod h1:C+iumr2ni468+1jvcHXLCdqP9uQnoQbdX93F3aWahWU= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512 h1:2TVScDEIfhUCwVNrUenXBGke17gURHMi4nIjZ5iOLBc= -github.com/prometheus-community/prom-label-proxy v0.4.1-0.20211215142838-1eac0933d512/go.mod h1:qYNF+Y9Fm8LQEsYPHPx67Sw7gXNGNFSWtuQpL/4tvbk= github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= -github.com/prometheus-operator/prometheus-operator v0.53.1 h1:UN1/7cX0bcL321R2MdLMU0olHaTh0kWZzub26sBarpY= -github.com/prometheus-operator/prometheus-operator v0.53.1/go.mod h1:fVDQolAz9K/ThjZ6Ze5Z/HmxJxYNcIA2Yfsq9yokV7g= github.com/prometheus-operator/prometheus-operator v0.63.0 h1:LsOFPNzcOKirmM3xHEextfj5yaJyoWL4l42hbhvBSN8= github.com/prometheus-operator/prometheus-operator v0.63.0/go.mod h1:vaMQs+VjHx0y1keJllae08t8cLidN4Zor8gXAGpsZjo= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1 h1:VYWk40/hnOlk7T64najC0RIvYv4RJ9SwLAJyAu5qWyI= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.53.1/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 h1:efsW3CfymG5bZUpeIsYfdihB33YItCn7uHBOEbnHQG8= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0/go.mod h1:/UtstAaWVaS3Z9GK9jo8+4SN9T+RMSq7VlOcQMmiEsc= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1 h1:tKzmD3DQoK3OIcIxWhEmjdrjAr8ufVRpOO5JvpoDgic= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.53.1/go.mod h1:qP20QQUPGhQMp8yD68N17s3VvMeuLYrh+An0M4Q/zs0= github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 h1:8Au9x/807lcDRCmypzfWvr9haO5eF/eX7hiMQCy1k4A= github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0/go.mod h1:sjCnCbwVFVTO90iChFOK0eUat70C4Q11EVik0Rk3EeU= -github.com/prometheus/alertmanager v0.19.0/go.mod h1:Eyp94Yi/T+kdeb2qvq66E3RGuph5T/jm/RBVh4yz1xo= -github.com/prometheus/alertmanager v0.21.0/go.mod h1:h7tJ81NA0VLWvWEayi1QltevFkLF3KxmC/malTcT8Go= -github.com/prometheus/alertmanager v0.21.1-0.20200911160112-1fdff6b3f939/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= -github.com/prometheus/alertmanager v0.21.1-0.20201106142418-c39b78780054/go.mod h1:imXRHOP6QTsE0fFsIsAV/cXimS32m7gVZOiUj11m6Ig= -github.com/prometheus/alertmanager v0.21.1-0.20210310093010-0f9cab6991e6/go.mod h1:MTqVn+vIupE0dzdgo+sMcNCp37SCAi8vPrvKTTnTz9g= -github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1/go.mod h1:gsEqwD5BHHW9RNKvCuPOrrTMiP5I+faJUyLXvnivHik= -github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xmaDAZrqMgxIq3OXHk= -github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA= -github.com/prometheus/alertmanager v0.24.0 h1:HBWR3lk4uy3ys+naDZthDdV7yEsxpaNeZuUS+hJgrOw= -github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20180518154759-7600349dcfe1/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.8.0/go.mod h1:PC/OgXc+UN7B4ALwvn1yzVZmVwvhXp5JsbBv6wSv6i0= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.11.1/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.12.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.20.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.21.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= -github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= -github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= -github.com/prometheus/exporter-toolkit v0.6.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= -github.com/prometheus/procfs v0.0.0-20180612222113-7d6f385de8be/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/prometheus v0.38.0 h1:YSiJ5gDZmXnOntPRyHn1wb/6I1Frasj9dw57XowIqeA= github.com/prometheus/prometheus v0.38.0/go.mod h1:2zHO5FtRhM+iu995gwKIb99EXxjeZEuXpKUTIRq4YI0= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1/go.mod h1:JaY6n2sDr+z2WTsXkOmNRUfDy6FN0L6Nk7x06ndm4tY= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= -github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 h1:0roa6gXKgyta64uqh52AQG3wzZXH21unn+ltzQSXML0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M= -github.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8= -github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5-0.20210205191134-5ec6847320e5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1574,283 +663,92 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= -github.com/tencentyun/cos-go-sdk-v5 v0.7.31/go.mod h1:4E4+bQ2gBVJcgEC9Cufwylio4mXOct2iu05WjgEBx1o= -github.com/thanos-io/thanos v0.8.1-0.20200109203923-552ffa4c1a0d/go.mod h1:usT/TxtJQ7DzinTt+G9kinDQmRS5sxwu0unVKZ9vdcw= -github.com/thanos-io/thanos v0.13.1-0.20200731083140-69b87607decf/go.mod h1:G8caR6G7pSDreRDvFm9wFuyjEBztmr8Ag3kBYpa/fEc= -github.com/thanos-io/thanos v0.13.1-0.20200807203500-9b578afb4763/go.mod h1:KyW0a93tsh7v4hXAwo2CVAIRYuZT1Kkf4e04gisQjAg= -github.com/thanos-io/thanos v0.13.1-0.20201019130456-f41940581d9a/go.mod h1:A3qUEEbsVkplJnxyDLwuIuvTDaJPByTH+hMdTl9ujAA= -github.com/thanos-io/thanos v0.13.1-0.20201030101306-47f9a225cc52/go.mod h1:OqqX4x21cg5N5MMHd/yGQAc/V3wg8a7Do4Jk8HfaFZQ= -github.com/thanos-io/thanos v0.13.1-0.20210108102609-f85e4003ba51/go.mod h1:kPvI4H0AynFiHDN95ZB28/k70ZPGCx+pBrRh6RZPimw= -github.com/thanos-io/thanos v0.13.1-0.20210204123931-82545cdd16fe/go.mod h1:ZLDGYRNkgM+FCwYNOD+6tOV+DE2fpjzfV6iqXyOgFIw= -github.com/thanos-io/thanos v0.13.1-0.20210224074000-659446cab117/go.mod h1:kdqFpzdkveIKpNNECVJd75RPvgsAifQgJymwCdfev1w= -github.com/thanos-io/thanos v0.13.1-0.20210226164558-03dace0a1aa1/go.mod h1:gMCy4oCteKTT7VuXVvXLTPGzzjovX1VPE5p+HgL1hyU= -github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17/go.mod h1:zU8KqE+6A+HksK4wiep8e/3UvCZLm+Wrw9AqZGaAm9k= -github.com/thanos-io/thanos v0.22.0/go.mod h1:SZDWz3phcUcBr4MYFoPFRvl+Z9Nbi45HlwQlwSZSt+Q= -github.com/thanos-io/thanos v0.24.0-rc.1 h1:DyR8rDMGbDVsxgX2EQZ5ye+AE4HyY4QevuBKhnJhw9o= -github.com/thanos-io/thanos v0.24.0-rc.1/go.mod h1:sfnKJG7cDA41ixNL4gsTJEa3w9Qt8lwAjw+dqRMSDG0= github.com/thanos-io/thanos v0.30.2 h1:JcazfBlpX/i747uRxBWHJMopX0g+eSaZYGjqMeQIkPo= github.com/thanos-io/thanos v0.30.2/go.mod h1:k23ZcbQSK0Jd/siuEti6J6/3DeezIk+YLRBcYikzXl8= -github.com/tidwall/pretty v0.0.0-20180105212114-65a9db5fad51/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.20.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.24.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= +github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/weaveworks/common v0.0.0-20200206153930-760e36ae819a/go.mod h1:6enWAqfQBFrE8X/XdJwZr8IKgh1chStuFR0mjU/UOUw= -github.com/weaveworks/common v0.0.0-20200625145055-4b1847531bc9/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY= -github.com/weaveworks/common v0.0.0-20200914083218-61ffdd448099/go.mod h1:hz10LOsAdzC3K/iXaKoFxOKTDRgxJl+BTGX1GY+TzO4= -github.com/weaveworks/common v0.0.0-20201119133501-0619918236ec/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= -github.com/weaveworks/common v0.0.0-20210112142934-23c8d7fa6120/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= -github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624/go.mod h1:ykzWac1LtVfOxdCK+jD754at1Ws9dKCwFeUzkFBffPs= -github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78/go.mod h1:YU9FvnS7kUnRt6HY10G+2qHkwzP3n3Vb1XsXDsJTSp8= -github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= -github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xlab/treeprint v1.0.0/go.mod h1:IoImgRak9i3zJyuxOKUP1v4UZd1tMoKkq/Cimt1uhCg= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= -gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= -go.elastic.co/apm v1.5.0/go.mod h1:OdB9sPtM6Vt7oz3VXt7+KR96i9li74qrxBGHTQygFvk= -go.elastic.co/apm v1.11.0/go.mod h1:qoOSi09pnzJDh5fKnfY7bPmQgl8yl2tULdOu03xhui0= -go.elastic.co/apm/module/apmhttp v1.5.0/go.mod h1:1FbmNuyD3ddauwzgVwFB0fqY6KbZt3JkV187tGCYYhY= -go.elastic.co/apm/module/apmhttp v1.11.0/go.mod h1:5JFMIxdeS4vJy+D1PPPjINuX6hZ3AHalZXoOgyqZAkk= -go.elastic.co/apm/module/apmot v1.5.0/go.mod h1:d2KYwhJParTpyw2WnTNy8geNlHKKFX+4oK3YLlsesWE= -go.elastic.co/apm/module/apmot v1.11.0/go.mod h1:Qnbt3w1DvUd/5QugAF1AJ3mR4AG86EcJFBnAGW77EmU= -go.elastic.co/fastjson v1.0.0/go.mod h1:PmeUOMMtLHQr9ZS9J9owrAVg0FkaZDRZJEFTTGHtchs= -go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20190709142735-eb7dd97135a5/go.mod h1:N0RPWo9FXJYZQI4BTkDtQylrstIigYHeR18ONnyTufk= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= -go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= -go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0-alpha.0/go.mod h1:kdV+xzCJ3luEBSIeQyB/OEKkWKd8Zkux4sbDeANrosU= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0-alpha.0/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= -go.etcd.io/etcd/client/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0/go.mod h1:tV31atvwzcybuqejDoY3oaNRTtlD2l/Ot78Pc9w7DMY= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0-alpha.0/go.mod h1:FAwse6Zlm5v4tEWZaTjmNhe17Int4Oxbu7+2r0DiD3w= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a/go.mod h1:tsKetYpt980ZTpzl/gb+UOJj9RkIyCb1u4wjzMg90BQ= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.34.0/go.mod h1:548ZsYzmT4PL4zWKRd8q/N4z0Wxzn/ZxUE+lkEpwWQA= -go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= -go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw= -go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= -go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= -go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.9.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.9.0/go.mod h1:0EsCXjZAiiZGnLdEUXM9YjCKuuLZMYyglh2QDXcYKVA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.9.0/go.mod h1:K5G92gbtCrYJ0mn6zj9Pst7YFsDFuvSYEhYKRMcufnM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.9.0/go.mod h1:smUdtylgc0YQiUr2PuifS4hBXhAS5xtR6WQhxP1wiNA= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk v1.9.0/go.mod h1:AEZc8nt5bd2F7BC24J5R0mrjYnpEgYHyTcM/vrSple4= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= -go.opentelemetry.io/otel/trace v1.9.0 h1:oZaCNJUjWcg60VXWee8lJKlqhPbXAPB51URuR47pQYc= -go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= -go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= -go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.18.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.2.0/go.mod h1:YfO3fm683kQpzETxlTGZhGIVmXAhaw3gxeBADbpZtnU= -go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= -go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180608092829-8ac0e0d97ce4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191112222119-e1110fd1c708/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191029154019-8994fa331a53/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20200821190819-94841d0725da/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1863,7 +761,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= @@ -1874,51 +771,26 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1926,89 +798,36 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210324051636-2c4c8ecb7826/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210210192628-66670185b0cd/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3AbpuWzV6f1LjnLrM4pe2SZrw= -golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2020,314 +839,157 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200930132711-30421366ff76/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190102155601-82a175fd1598/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190425145619-16072639606e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190426135247-a129542de9ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210314195730-07df6a141424/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425222832-ad9eeb80039a/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191111182352-50fa39b762bc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200513201620-d5fe73897c97/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201014170642-d1624618ad65/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= -google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -2344,42 +1006,9 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.39.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.42.0/go.mod h1:+Oj4s6ch2SEGtPjGqfUfZonBH0GjQH89gTeKKAEGZKI= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.60.0/go.mod h1:d7rl65NZAkEQ90JFzqBjcRq1TVeG5ZoGV3sSpEnnVb4= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.91.0 h1:731+JzuwaJoZXRQGmPoBiV+SrsAfUaIkdMCWTcQNPyA= -google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -2387,25 +1016,18 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180608181217-32ee49c4dd80/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -2415,94 +1037,24 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200710124503-20a17af7bd0e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200724131911-43cab4749ae7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210312152112-fc591d9ea70f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276 h1:7PEE9xCtufpGJzrqweakEEnTh7YFELmnKm/ee+5jmfQ= -google.golang.org/genproto v0.0.0-20220808204814-fd01256a5276/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc= google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -2511,35 +1063,14 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.52.1 h1:2NpOPk5g5Xtb0qebIEs7hNIa++PdtZLo2AQUpc1YnSU= google.golang.org/grpc v1.52.1/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429/go.mod h1:gID3PKrg7pWKntu9Ss6zTLJ0ttC0X9IHgREOCZwbCVU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2556,7 +1087,6 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2564,36 +1094,16 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/telebot.v3 v3.0.0/go.mod h1:7rExV8/0mDDNu9epSrDm/8j22KLaActH1Tbee6YjzWg= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -2604,12 +1114,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2617,91 +1122,31 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.0.0-20191115095533-47f6de673b26/go.mod h1:iA/8arsvelvo4IDqIhX4IbjTEKBGgvsf2OraTuRtLFU= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.24.3 h1:tt55QEmKd6L2k5DP6G/ZzdMQKvG5ro4H4teClqm0sTY= -k8s.io/api v0.24.3/go.mod h1:elGR/XSZrS7z7cSZPzVWaycpJuGIw57j9b95/1PdJNI= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= -k8s.io/apiextensions-apiserver v0.23.0 h1:uii8BYmHYiT2ZTAJxmvc3X8UhNYMxl2A0z0Xq3Pm+WY= -k8s.io/apiextensions-apiserver v0.23.0/go.mod h1:xIFAEEDlAZgpVBl/1VSjGDmLoXAWRG40+GsWhKhAxY4= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.0.0-20191115015347-3c7067801da2/go.mod h1:dXFS2zaQR8fyzuvRdJDHw2Aerij/yVGJSre0bZQSVJA= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.24.3 h1:hrFiNSA2cBZqllakVYyH/VyEh4B581bQRmqATJSeQTg= -k8s.io/apimachinery v0.24.3/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= -k8s.io/apiserver v0.23.0/go.mod h1:Cec35u/9zAepDPPFyT+UMrgqOCjgJ5qtfVJDxjZYmt4= -k8s.io/client-go v0.23.0/go.mod h1:hrDnpnK1mSr65lHHcUuIZIXDgEbzc7/683c6hyG4jTA= -k8s.io/client-go v0.24.3 h1:Nl1840+6p4JqkFWEW2LnMKU667BUxw03REfLAVhuKQY= -k8s.io/client-go v0.24.3/go.mod h1:AAovolf5Z9bY1wIg2FZ8LPQlEdKHjLI7ZD4rw920BJw= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= -k8s.io/code-generator v0.23.0/go.mod h1:vQvOhDXhuzqiVfM/YHp+dmg10WDZCchJVObc9MvowsE= -k8s.io/component-base v0.23.0 h1:UAnyzjvVZ2ZR1lF35YwtNY6VMN94WtOnArcXBu34es8= -k8s.io/component-base v0.23.0/go.mod h1:DHH5uiFvLC1edCpvcTDV++NKULdYYU6pR9Tt3HIKMKI= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.0 h1:GMmmjoFOrNepPN0ZeGCzvD2Gh5IKRwdFx8W5PBxVTQU= -k8s.io/klog/v2 v2.70.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= -k8s.io/utils v0.0.0-20191114200735-6ca3b61696b6/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= k8s.io/utils v0.0.0-20230202215443-34013725500c/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From ba4fb1d47e4cb126031633387e6e0a7312586d2c Mon Sep 17 00:00:00 2001 From: Peter Lindsten Date: Sat, 25 Feb 2023 17:22:19 +0100 Subject: [PATCH 0764/1234] [target-allocator] Improve TargetAllocator README (#1316) (#1472) * [target-allocator] Improve TargetAllocator README (#1316) * [squash] Review changes round 1 * [squash] Review suggestion acceptance Co-authored-by: Matej Gera <38492574+matej-g@users.noreply.github.com> * [squash] Review suggestion accept (CRDs) Co-authored-by: Matej Gera <38492574+matej-g@users.noreply.github.com> * [squash] Review updates --------- Co-authored-by: Matej Gera <38492574+matej-g@users.noreply.github.com> --- README.md | 6 +- cmd/otel-allocator/README.md | 130 +++++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6fc06230c..38afcf3f0 100644 --- a/README.md +++ b/README.md @@ -348,7 +348,7 @@ spec: service: pipelines: - traces: + metrics: receivers: [prometheus] processors: [] exporters: [logging] @@ -381,7 +381,7 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con service: pipelines: - traces: + metrics: receivers: [prometheus] processors: [] exporters: [logging] @@ -389,6 +389,8 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con Note how the Operator added a `global` section and a new `http_sd_configs` to the `otel-collector` scrape config, pointing to a Target Allocator instance it provisioned. +More info on the TargetAllocator can be found [here](cmd/otel-allocator/README.md). + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index 88b4cee96..4746e68d2 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -4,6 +4,136 @@ The TargetAllocator is an optional separately deployed component of an OpenTelem distribute targets of the PrometheusReceiver on all deployed Collector instances. The release version matches the operator's most recent release as well. +In essence, Prometheus Receiver configs are overridden with a http_sd_configs directive that points to the +Allocator, these are then loadbalanced/sharded to the collectors. The Prometheus Receiver configs that are overridden +are what will be distributed with the same name. In addition to picking up receiver configs, the TargetAllocator +can discover targets via Prometheus CRs (currently ServiceMonitor, PodMonitor) which it presents as scrape configs +and jobs on the `/scrape_configs` and `/jobs` endpoints respectively. + +# Usage +The `spec.targetAllocator:` controls the TargetAllocator general properties. Full API spec can be found here: [api.md#opentelemetrycollectorspectargetallocator](../../docs/api.md#opentelemetrycollectorspectargetallocator) + +A basic example that deploys. +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: collector-with-ta +spec: + mode: statefulset + targetAllocator: + enabled: true + config: | + receivers: + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + exporters: + logging: + + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] +``` + +## PrometheusCR specifics +TargetAllocator discovery of PrometheusCRs can be turned on by setting +`.spec.targetAllocator.prometheusCR.enabled` to `true` + +The CRs can be filtered by labels as documented here: [api.md#opentelemetrycollectorspectargetallocatorprometheuscr](../../docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr) + +The prometheus receiver in the deployed collector also has to know where the Allocator service exists. This is done by a +OpenTelemetry Collector operator specific config. +```yaml + config: | + receivers: + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + target_allocator: + endpoint: http://my-targetallocator-service + interval: 30s + collector_id: "${POD_NAME}" +``` +Upstream documentation here: [Prometheusreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver#opentelemetry-operator) + +The TargetAllocator service is named based on the OpenTelemetryCollector CR name. `collector_id` should be unique per +collector instance, such as the pod name. The `POD_NAME` environment variable is convenient since this is supplied +to collector instance pods by default. + +The Prometheus CRDs also have to exist for the Allocator to pick them up. The best place to get them is from +prometheus-operator: [Releases](https://github.com/prometheus-operator/prometheus-operator/releases). Only the CRDs for +CRs that the Allocator watches for need to be deployed. They can be picked out from the bundle.yaml file. + +### RBAC +The ServiceAccount that the TargetAllocator runs as, has to have access to the CRs. A role like this will provide that +access. +```yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opentelemetry-targetallocator-cr-role +rules: +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + - podmonitors + verbs: + - '*' +``` +In addition, the TargetAllocator needs the same permissions as a Prometheus instance would to find the matching targets +from the CR instances. +```yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opentelemetry-targetallocator-role +rules: +- apiGroups: [""] + resources: + - nodes + - nodes/metrics + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: [""] + resources: + - configmaps + verbs: ["get"] +- apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +``` +These roles can be combined. + +A ServiceAccount bound with the above permissions in the namespaces that are to be monitored can then be referenced in +the `targetAllocator:` part of the OpenTelemetryCollector CR. +```yaml + targetAllocator: + enabled: true + serviceAccount: opentelemetry-targetallocator-sa + prometheusCR: + enabled: true +``` +**Note**: The Collector part of this same CR *also* has a serviceAccount key which only affects the collector and *not* +the TargetAllocator. + + # Design If the Allocator is activated, all Prometheus configurations will be transferred in a separate ConfigMap which get in From 8bfc694965a757dbcf76719dfca4373f2df2ca32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:43:50 -0500 Subject: [PATCH 0765/1234] Bump github.com/stretchr/testify in /cmd/otel-allocator (#1520) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 17d3044f4..9076b1b34 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -19,7 +19,7 @@ require ( github.com/prometheus/common v0.40.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.26.1 k8s.io/apimachinery v0.26.1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 28aadc4d6..ade31422d 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -661,8 +661,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/thanos-io/thanos v0.30.2 h1:JcazfBlpX/i747uRxBWHJMopX0g+eSaZYGjqMeQIkPo= github.com/thanos-io/thanos v0.30.2/go.mod h1:k23ZcbQSK0Jd/siuEti6J6/3DeezIk+YLRBcYikzXl8= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= From a3a99bf8ee3fd1df8d52546709e3a90f8ccfb754 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:44:11 -0500 Subject: [PATCH 0766/1234] Bump github.com/stretchr/testify in /cmd/operator-opamp-bridge (#1521) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 62a321df2..55e382072 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-operator v1.51.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.1 + github.com/stretchr/testify v1.8.2 go.opentelemetry.io/otel v1.13.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 go.opentelemetry.io/otel/metric v0.36.0 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 1504e5e6d..ce74f1eff 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -303,8 +303,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= From ae6006dba216233e35f3c95dbdc0de63b5d3de97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Feb 2023 10:16:00 -0500 Subject: [PATCH 0767/1234] Bump go.opentelemetry.io/otel in /cmd/operator-opamp-bridge (#1522) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 4 ++-- cmd/operator-opamp-bridge/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 55e382072..b7ded21aa 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,7 +10,7 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 - go.opentelemetry.io/otel v1.13.0 + go.opentelemetry.io/otel v1.14.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 go.opentelemetry.io/otel/metric v0.36.0 go.opentelemetry.io/otel/sdk v1.13.0 @@ -67,7 +67,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 // indirect - go.opentelemetry.io/otel/trace v1.13.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index ce74f1eff..3bea74115 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -320,8 +320,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= -go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 h1:pa05sNT/P8OsIQ8mPZKTIyiBuzS/xDGLVx+DCt0y6Vs= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 h1:9uzubQUMa9RsQqQZc0Btl51pTLMdHgDHJszg6839rBQ= @@ -334,8 +334,8 @@ go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5 go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= -go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= -go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= From 405fa140ed91c68c7a681f6a3863ae02410a2cdb Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 28 Feb 2023 08:26:57 -0700 Subject: [PATCH 0768/1234] [docs] Update sampler and propagation docs (#1442) * Update sampler and prop docs * Move new docs to api comments * generate CRDs * include file from bundle * Remove validator flag --- README.md | 7 +++++++ apis/v1alpha1/instrumentation_types.go | 4 ++++ bundle/manifests/opentelemetry.io_instrumentations.yaml | 9 ++++++--- config/crd/bases/opentelemetry.io_instrumentations.yaml | 9 ++++++--- docs/api.md | 6 +++--- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 38afcf3f0..41f7be3ec 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,13 @@ spec: EOF ``` +The values for `propagators` are added to the `OTEL_PROPAGATORS` environment variable. +Valid values for `propagators` are defined by the [OpenTelemetry Specification for OTEL_PROPAGATORS](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_propagators). + +The value for `sampler.type` is added to the `OTEL_TRACES_SAMPLER` envrionment variable. +Valid values for `sampler.type` are defined by the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler). +The value for `sampler.argument` is added to the `OTEL_TRACES_SAMPLER_ARG` environment variable. Valid values for `sampler.argument` will depend on the chosen sampler. See the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER_ARG](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler_arg) for more details. + The above CR can be queried by `kubectl get otelinst`. Then add an annotation to a pod to enable injection. The annotation can be added to a namespace, so that all pods within diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index ee952e8ab..972836239 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -30,6 +30,8 @@ type InstrumentationSpec struct { Resource Resource `json:"resource,omitempty"` // Propagators defines inter-process context propagation configuration. + // Values in this list will be set in the OTEL_PROPAGATORS env var. + // Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none // +optional Propagators []Propagator `json:"propagators,omitempty"` @@ -87,6 +89,7 @@ type Exporter struct { // Sampler defines sampling configuration. type Sampler struct { // Type defines sampler type. + // The value will be set in the OTEL_TRACES_SAMPLER env var. // The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... // +optional Type SamplerType `json:"type,omitempty"` @@ -94,6 +97,7 @@ type Sampler struct { // Argument defines sampler argument. // The value depends on the sampler type. // For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. + // The value will be set in the OTEL_TRACES_SAMPLER_ARG env var. // +optional Argument string `json:"argument,omitempty"` } diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 592686083..9e2a20357 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -801,7 +801,8 @@ spec: type: object propagators: description: Propagators defines inter-process context propagation - configuration. + configuration. Values in this list will be set in the OTEL_PROPAGATORS + env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none items: description: Propagator represents the propagation type. enum: @@ -961,10 +962,12 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. + sampler type it is a number in range [0..1] e.g. 0.25. The value + will be set in the OTEL_TRACES_SAMPLER_ARG env var. type: string type: - description: Type defines sampler type. The value can be for instance + description: Type defines sampler type. The value will be set + in the OTEL_TRACES_SAMPLER env var. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... enum: - always_on diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 20697e796..bacaaf437 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -800,7 +800,8 @@ spec: type: object propagators: description: Propagators defines inter-process context propagation - configuration. + configuration. Values in this list will be set in the OTEL_PROPAGATORS + env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none items: description: Propagator represents the propagation type. enum: @@ -960,10 +961,12 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. + sampler type it is a number in range [0..1] e.g. 0.25. The value + will be set in the OTEL_TRACES_SAMPLER_ARG env var. type: string type: - description: Type defines sampler type. The value can be for instance + description: Type defines sampler type. The value will be set + in the OTEL_TRACES_SAMPLER env var. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... enum: - always_on diff --git a/docs/api.md b/docs/api.md index 7329db833..0292eee02 100644 --- a/docs/api.md +++ b/docs/api.md @@ -131,7 +131,7 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen propagators []enum - Propagators defines inter-process context propagation configuration.
+ Propagators defines inter-process context propagation configuration. Values in this list will be set in the OTEL_PROPAGATORS env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none
false @@ -2153,14 +2153,14 @@ Sampler defines sampling configuration. argument string - Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
+ Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. The value will be set in the OTEL_TRACES_SAMPLER_ARG env var.
false type enum - Type defines sampler type. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...
+ Type defines sampler type. The value will be set in the OTEL_TRACES_SAMPLER env var. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...

Enum: always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio, jaeger_remote, xray
From a8f00b404babd6b9971ae9f041a9d2f930a0ce85 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Tue, 28 Feb 2023 18:37:44 +0100 Subject: [PATCH 0769/1234] use gsed on MacOS (#1500) Signed-off-by: Matej Gera --- Makefile | 6 +++++- hack/modify-test-images.sh | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index febd731c7..b17d0cc4e 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,10 @@ LOCALBIN ?= $(shell pwd)/bin $(LOCALBIN): mkdir -p $(LOCALBIN) +## On MacOS, use gsed instead of sed, to make sed behavior +## consistent with Linux. +SED ?= $(shell which gsed 2>/dev/null || which sed) + .PHONY: ensure-generate-is-noop ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) ensure-generate-is-noop: USER=open-telemetry @@ -182,7 +186,7 @@ e2e-log-operator: .PHONY: prepare-e2e prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server install-openshift-routes load-image-all deploy - TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) ./hack/modify-test-images.sh + TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh .PHONY: scorecard-tests scorecard-tests: operator-sdk diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 8950c7032..ee240ddbd 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -1,4 +1,6 @@ #!/bin/bash -sed -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/00-install.yaml -sed -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml +SED_BIN=${SED_BIN:-sed} + +${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/00-install.yaml +${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml From d03785f144d350953a686a8891d9251edde5d941 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 1 Mar 2023 17:56:09 +0100 Subject: [PATCH 0770/1234] Bump kustomize to 5.x (#1509) * Bump kustomize to 5.x Signed-off-by: Pavol Loffay * Remove unused installation script Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 3 --- .github/workflows/release.yaml | 3 --- Makefile | 4 ++-- hack/install-kustomize.sh | 4 ---- 4 files changed, 2 insertions(+), 12 deletions(-) delete mode 100755 hack/install-kustomize.sh diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 1ecdd99c6..cc97da748 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -22,9 +22,6 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh - - name: "install kustomize" - run: ./hack/install-kustomize.sh - - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d84b0272d..d07ec48ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,9 +17,6 @@ jobs: - name: "install kubebuilder" run: ./hack/install-kubebuilder.sh - - name: "install kustomize" - run: ./hack/install-kustomize.sh - - name: "generate release resources" run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" diff --git a/Makefile b/Makefile index b17d0cc4e..a0fac91bc 100644 --- a/Makefile +++ b/Makefile @@ -284,13 +284,13 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest CHLOGGEN ?= $(LOCALBIN)/chloggen ## Tool Versions -KUSTOMIZE_VERSION ?= v4.5.5 +KUSTOMIZE_VERSION ?= v5.0.0 CONTROLLER_TOOLS_VERSION ?= v0.9.2 .PHONY: kustomize kustomize: ## Download kustomize locally if necessary. - $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4,$(KUSTOMIZE_VERSION)) + $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5,$(KUSTOMIZE_VERSION)) .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. diff --git a/hack/install-kustomize.sh b/hack/install-kustomize.sh deleted file mode 100755 index 0b0405b43..000000000 --- a/hack/install-kustomize.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -sudo curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.2.0/kustomize_v4.2.0_linux_amd64.tar.gz | tar xvz -C /usr/local/bin/ -export PATH=$PATH:/usr/local/bin From 278a55e556a5012471d3b788f51083f05c04a2ac Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Wed, 1 Mar 2023 13:28:44 -0500 Subject: [PATCH 0771/1234] [HPA] Properly update HPA when an additional metric is added to the spec (#1462) * remove patch logic and replace with update request * test an update that adds another metric * minor fixes * rename chloggen * split tests up by version * use patch again instead of update * add error check * address review feedback * delete commented line * fix chloggen description * fix lint * simplify the logic - always replace the existing metrics with desired * fix lint * add to e2e tests * fix e2e bug * address review feedback * decrease stabilization window * cleanup * simplify e2e --- .chloggen/1439-fix-HPA-updates.yaml | 17 ++ .../reconcile/horizontalpodautoscaler.go | 21 +-- .../reconcile/horizontalpodautoscaler_test.go | 117 +++++++++---- tests/e2e/autoscale/00-install.yaml | 9 +- tests/e2e/autoscale/02-install.yaml | 40 +++++ tests/e2e/autoscale/03-assert.yaml | 3 +- tests/e2e/autoscale/03-install.yaml | 6 +- ...fy-simplest-set-collector-hpa-metrics.yaml | 4 + tests/e2e/autoscale/04-delete.yaml | 3 +- tests/e2e/autoscale/05-assert.yaml | 5 +- .../cmd/verify/wait-and-validate-metrics.go | 157 ++++++++++++++++++ 11 files changed, 329 insertions(+), 53 deletions(-) create mode 100644 .chloggen/1439-fix-HPA-updates.yaml create mode 100644 tests/e2e/autoscale/02-install.yaml create mode 100644 tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml create mode 100644 tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go diff --git a/.chloggen/1439-fix-HPA-updates.yaml b/.chloggen/1439-fix-HPA-updates.yaml new file mode 100644 index 000000000..7375fde2f --- /dev/null +++ b/.chloggen/1439-fix-HPA-updates.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Autoscaler + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix the issue where HPA fails to update when an additional metric is added to the spec. + +# One or more tracking issues related to the change +issues: + - 1439 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 64f8b0f56..cd90d3e51 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -20,7 +20,6 @@ import ( autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" - corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" @@ -85,7 +84,7 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect updated := existing.DeepCopyObject().(client.Object) updated.SetOwnerReferences(desired.GetOwnerReferences()) - setAutoscalerSpec(params, autoscalingVersion, updated) + setAutoscalerSpec(params, autoscalingVersion, updated, obj) annotations := updated.GetAnnotations() for k, v := range desired.GetAnnotations() { @@ -110,7 +109,7 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect return nil } -func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object) { +func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object, desired client.Object) { one := int32(1) if params.Instance.Spec.Autoscaler.MaxReplicas != nil { if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { @@ -120,8 +119,10 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV } else { updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics[0].Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization - } else { + + desiredMetrics := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics = desiredMetrics + } else { // autoscalingv2 updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas if params.Instance.Spec.Autoscaler.MinReplicas != nil { updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.Autoscaler.MinReplicas @@ -129,14 +130,8 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } - // This will update memory and CPU usage for now, and can be used to update other metrics in the future - for _, metric := range updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - metric.Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetCPUUtilization - } else if metric.Resource.Name == corev1.ResourceMemory { - metric.Resource.Target.AverageUtilization = params.Instance.Spec.Autoscaler.TargetMemoryUtilization - } - } + desiredMetrics := desired.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics = desiredMetrics } } } diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index c7fef22da..fcd9e8ebb 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" v1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -40,56 +41,114 @@ import ( var hpaUpdateErr error var withHPA bool -func TestExpectedHPA(t *testing.T) { +func TestExpectedHPAVersionV2Beta2(t *testing.T) { params := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) err := params.Config.AutoDetect() assert.NoError(t, err) - autoscalingVersion := params.Config.AutoscalingVersion() expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) t.Run("should create HPA", func(t *testing.T) { err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) - exists, hpaErr := populateObjectIfExists(t, &autoscalingv2beta2.HorizontalPodAutoscaler{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.True(t, exists) }) t.Run("should update HPA", func(t *testing.T) { minReplicas := int32(1) maxReplicas := int32(3) + memUtilization := int32(70) updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) updateParms.Instance.Spec.Autoscaler.MinReplicas = &minReplicas updateParms.Instance.Spec.Autoscaler.MaxReplicas = &maxReplicas + updateParms.Instance.Spec.Autoscaler.TargetMemoryUtilization = &memUtilization + updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) + + hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + require.NoError(t, hpaUpdateErr) + + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + withHPA, hpaUpdateErr = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, hpaUpdateErr) + assert.True(t, withHPA) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + assert.Len(t, actual.Spec.Metrics, 2) + + // check metric values + for _, metric := range actual.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, int32(90), *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, int32(70), *metric.Resource.Target.AverageUtilization) + } + } + }) + + t.Run("should delete HPA", func(t *testing.T) { + err = deleteHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) + assert.NoError(t, err) + + actual := v1.Deployment{} + exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collecto"}) + assert.False(t, exists) + }) +} + +func TestExpectedHPAVersionV2(t *testing.T) { + params := paramsWithHPA(autodetect.AutoscalingVersionV2) + err := params.Config.AutoDetect() + assert.NoError(t, err) + + expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) + t.Run("should create HPA", func(t *testing.T) { + err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) + assert.NoError(t, err) + + actual := autoscalingv2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + + assert.True(t, exists) + }) + + t.Run("should update HPA", func(t *testing.T) { + minReplicas := int32(1) + maxReplicas := int32(3) + memUtilization := int32(70) + updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2) + updateParms.Instance.Spec.Autoscaler.MinReplicas = &minReplicas + updateParms.Instance.Spec.Autoscaler.MaxReplicas = &maxReplicas + updateParms.Instance.Spec.Autoscaler.TargetMemoryUtilization = &memUtilization updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) - if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - updatedAutoscaler := *updatedHPA.(*autoscalingv2beta2.HorizontalPodAutoscaler) - createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) - hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - assert.NoError(t, hpaUpdateErr) - - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - withHPA, hpaUpdateErr = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, hpaUpdateErr) - assert.True(t, withHPA) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(3), actual.Spec.MaxReplicas) - } else { - updatedAutoscaler := *updatedHPA.(*autoscalingv2.HorizontalPodAutoscaler) - createObjectIfNotExists(t, "test-collector", &updatedAutoscaler) - hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - assert.NoError(t, hpaUpdateErr) - - actual := autoscalingv2.HorizontalPodAutoscaler{} - withHPA, hpaUpdateErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, hpaUpdateErr) - assert.True(t, withHPA) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) + require.NoError(t, hpaUpdateErr) + + actual := autoscalingv2.HorizontalPodAutoscaler{} + withHPA, hpaUpdateErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, hpaUpdateErr) + assert.True(t, withHPA) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(3), actual.Spec.MaxReplicas) + assert.Len(t, actual.Spec.Metrics, 2) + // check metric values + for _, metric := range actual.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, int32(90), *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, int32(70), *metric.Resource.Target.AverageUtilization) + } } }) diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index ad1a96a74..2b584163f 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -1,6 +1,8 @@ # This creates two different deployments: -# * The first one will be used to see if we scale properly -# * The second is to check the targetCPUUtilization option +# * The first one is to ensure an autoscaler is created without +# setting any metrics in the Spec. +# * The second is to check that scaling works properly and that +# spec updates are working as expected. # apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector @@ -53,6 +55,9 @@ spec: maxReplicas: 2 autoscaler: targetCPUUtilization: 50 + behavior: + scaleDown: + stabilizationWindowSeconds: 15 resources: limits: cpu: 500m diff --git a/tests/e2e/autoscale/02-install.yaml b/tests/e2e/autoscale/02-install.yaml new file mode 100644 index 000000000..655c37369 --- /dev/null +++ b/tests/e2e/autoscale/02-install.yaml @@ -0,0 +1,40 @@ +# This updates an existing deployment with a new Spec. +# Target memory utilization is now added. +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest-set-utilization +spec: + minReplicas: 1 + maxReplicas: 2 + autoscaler: + targetCPUUtilization: 50 + targetMemoryUtilization: 70 + behavior: + scaleDown: + stabilizationWindowSeconds: 15 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e/autoscale/03-assert.yaml b/tests/e2e/autoscale/03-assert.yaml index 3b9801016..8dc83f76b 100644 --- a/tests/e2e/autoscale/03-assert.yaml +++ b/tests/e2e/autoscale/03-assert.yaml @@ -1,8 +1,7 @@ -# Wait until tracegen has completed and the simplest deployment has scaled up to 2 apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: simplest + name: simplest-set-utilization status: scale: replicas: 2 diff --git a/tests/e2e/autoscale/03-install.yaml b/tests/e2e/autoscale/03-install.yaml index 041ccbeab..0c2ee6249 100644 --- a/tests/e2e/autoscale/03-install.yaml +++ b/tests/e2e/autoscale/03-install.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: tracegen + name: tracegen-set-utilization spec: template: spec: @@ -11,11 +11,11 @@ spec: command: - "./tracegen" args: - - -otlp-endpoint=simplest-collector-headless:4317 + - -otlp-endpoint=simplest-set-utilization-collector-headless:4317 - -otlp-insecure # High duration to ensure the trace creation doesn't stop. # It'll be stopped in step 4 - -duration=1m - -workers=20 restartPolicy: Never - backoffLimit: 4 + backoffLimit: 4 \ No newline at end of file diff --git a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml new file mode 100644 index 000000000..709f42dd2 --- /dev/null +++ b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 50 --memory-value 70 --hpa simplest-set-utilization-collector \ No newline at end of file diff --git a/tests/e2e/autoscale/04-delete.yaml b/tests/e2e/autoscale/04-delete.yaml index e6a6c0629..2e7041267 100644 --- a/tests/e2e/autoscale/04-delete.yaml +++ b/tests/e2e/autoscale/04-delete.yaml @@ -3,5 +3,6 @@ kind: TestStep delete: - apiVersion: batch/v1 kind: Job + propagationPolicy: Background metadata: - name: tracegen + name: tracegen-set-utilization \ No newline at end of file diff --git a/tests/e2e/autoscale/05-assert.yaml b/tests/e2e/autoscale/05-assert.yaml index c3400dfa3..dac0c9e10 100644 --- a/tests/e2e/autoscale/05-assert.yaml +++ b/tests/e2e/autoscale/05-assert.yaml @@ -1,8 +1,7 @@ -# Wait for the collector to scale back down to 1 apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: - name: simplest + name: simplest-set-utilization status: scale: - replicas: 1 + replicas: 1 \ No newline at end of file diff --git a/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go new file mode 100644 index 000000000..b707bcf7e --- /dev/null +++ b/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go @@ -0,0 +1,157 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "context" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/spf13/pflag" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" +) + +func main() { + var hpaName string + var timeout int + var numMetrics int + var kubeconfigPath string + var cpuValue int + var memoryValue int + + defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") + + pflag.IntVar(&timeout, "timeout", 600, "The timeout for the check.") + pflag.StringVar(&hpaName, "hpa", "", "HPA to check") + pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") + pflag.IntVar(&numMetrics, "num-metrics", 1, "number of expected metrics in Spec") + pflag.IntVar(&cpuValue, "cpu-value", -1, "value for target CPU utilization") + pflag.IntVar(&memoryValue, "memory-value", -1, "value for target memory utilization") + pflag.Parse() + + if len(hpaName) == 0 { + fmt.Println("hpa flag is mandatory") + os.Exit(1) + } + + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + fmt.Printf("Error reading the kubeconfig: %s\n", err) + os.Exit(1) + } + + client, err := kubernetes.NewForConfig(config) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), metav1.GetOptions{}) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + hpaClientV2 := client.AutoscalingV2().HorizontalPodAutoscalers(namespace.Name) + hpaClientV1 := client.AutoscalingV1().HorizontalPodAutoscalers(namespace.Name) + + pollInterval := time.Second + + // Search in v2 and v1 for an HPA with the given name + err = wait.Poll(pollInterval, 0, func() (done bool, err error) { + hpav2, err := hpaClientV2.Get( + context.Background(), + hpaName, + metav1.GetOptions{}, + ) + + if err != nil { + hpav1, err := hpaClientV1.Get( + context.Background(), + hpaName, + metav1.GetOptions{}, + ) + if err != nil { + fmt.Printf("HPA %s not found\n", hpaName) + return false, nil + } + + if hpav1.Status.CurrentCPUUtilizationPercentage == nil { + fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) + return false, nil + } + + if *hpav1.Spec.TargetCPUUtilizationPercentage != int32(cpuValue) { + fmt.Printf("Incorrect target CPU value found for HPA %s\n", hpaName) + return false, nil + } + return true, nil + } + + if hpav2.Status.CurrentMetrics == nil { + fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) + return false, nil + } + + numExpectedMetrics := 0 + if cpuValue != -1 { + numExpectedMetrics += 1 + } + if memoryValue != -1 { + numExpectedMetrics += 1 + } + if len(hpav2.Spec.Metrics) != numExpectedMetrics { + fmt.Printf("Metrics has incorrect length for HPA %s\n", hpaName) + return false, nil + } + + for _, metric := range hpav2.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + if cpuValue == -1 { + fmt.Printf("Unexpected CPU metric found for HPA %s\n", hpaName) + return false, nil + } + if int32(cpuValue) != *metric.Resource.Target.AverageUtilization { + fmt.Printf("Incorrect target CPU value found for HPA %s\n", hpaName) + return false, nil + } + } else if metric.Resource.Name == corev1.ResourceMemory { + if memoryValue == -1 { + fmt.Printf("Unexpected memory metric found for HPA %s\n", hpaName) + return false, nil + } + if int32(memoryValue) != *metric.Resource.Target.AverageUtilization { + fmt.Printf("Incorrect target memory value found for HPA %s\n", hpaName) + return false, nil + } + } + } + + return true, nil + }) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + fmt.Printf("%s is ready!\n", hpaName) +} From 73d023b37a73c88fca91d2cf7dd65f3ba0e061b7 Mon Sep 17 00:00:00 2001 From: Ben B Date: Thu, 2 Mar 2023 18:28:15 +0100 Subject: [PATCH 0772/1234] prepare changelog for release v0.71.0 (#1540) Signed-off-by: Benedikt Bongartz --- ...1479-fix-pprof-endpoint-target-allocator.yaml | 16 ---------------- .chloggen/target-alloc-version-bumps.yaml | 16 ---------------- CHANGELOG.md | 10 ++++++++++ README.md | 2 +- RELEASE.md | 4 ++-- ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- versions.txt | 10 +++++----- 7 files changed, 21 insertions(+), 43 deletions(-) delete mode 100644 .chloggen/1479-fix-pprof-endpoint-target-allocator.yaml delete mode 100755 .chloggen/target-alloc-version-bumps.yaml diff --git a/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml b/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml deleted file mode 100644 index e006b930f..000000000 --- a/.chloggen/1479-fix-pprof-endpoint-target-allocator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "target allocator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Properly handle all types of profiles in the pprof endpoint. Previously, some profiles where unavailable, leading to 404 response." - -# One or more tracking issues related to the change -issues: [1478] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/target-alloc-version-bumps.yaml b/.chloggen/target-alloc-version-bumps.yaml deleted file mode 100755 index 44e13970f..000000000 --- a/.chloggen/target-alloc-version-bumps.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Updates versions of many dependencies, sets defaults for prometheus operator to work. The breaking change introduced is the new RBAC requirement for "endpointslices" in the "discovery.k8s.io" api group. - -# One or more tracking issues related to the change -issues: [1464] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 333a10442..3f229d61a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ Changes by Version +## 0.63.1-125-ga8f00b4 + +### 🛑 Breaking changes 🛑 + +- `target allocator`: Updates versions of many dependencies, sets defaults for prometheus operator to work. The breaking change introduced is the new RBAC requirement for "endpointslices" in the "discovery.k8s.io" api group. (#1464) + +### 🧰 Bug fixes 🧰 + +- `target allocator`: Properly handle all types of profiles in the pprof endpoint. Previously, some profiles where unavailable, leading to 404 response. (#1478) + 0.70.0 ------------------ ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 41f7be3ec..ca4ae8a82 100644 --- a/README.md +++ b/README.md @@ -419,6 +419,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.71.0 | v1.19 to v1.25 | v1 | | v0.70.0 | v1.19 to v1.25 | v1 | | v0.69.0 | v1.19 to v1.25 | v1 | | v0.68.0 | v1.19 to v1.25 | v1 | @@ -440,7 +441,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.51.0 | v1.19 to v1.23 | v1alpha2 | | v0.50.0 | v1.19 to v1.23 | v1alpha2 | | v0.49.0 | v1.19 to v1.23 | v1alpha2 | -| v0.48.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index ad617a491..46d1ccf6c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.71.0 | @frzifus | | v0.72.0 | @yuriolisa | | v0.73.0 | @jaronoff97 | | v0.74.0 | @pavolloffay | -| v0.75.0 | @VineethReddy02 | \ No newline at end of file +| v0.75.0 | @VineethReddy02 | +| v0.76.0 | @frzifus | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 07e05cd7e..0126daa18 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -37,7 +37,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.70.0 + name: opentelemetry-operator.v0.71.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.70.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.71.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.70.0 + version: 0.71.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index d2ecbfab9..03b193779 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.70.0 +opentelemetry-collector=0.71.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.70.0 +operator=0.71.0 # Represents the current release of the Target Allocator. -targetallocator=0.70.0 +targetallocator=0.71.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.70.0 +operator-opamp-bridge=0.71.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -31,4 +31,4 @@ autoinstrumentation-dotnet=0.5.0 # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt -autoinstrumentation-apache-httpd=1.0.2 \ No newline at end of file +autoinstrumentation-apache-httpd=1.0.2 From c6f46900a6f3deb00a90a15d9bc25cc5cf7e87aa Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 2 Mar 2023 13:41:50 -0500 Subject: [PATCH 0773/1234] [chore] Fix Changelog (#1546) * Change the github action to match the operator * Add chloggen * Fix changelog version --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f229d61a..b1b2606b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ Changes by Version -## 0.63.1-125-ga8f00b4 +0.71.0 +------------------ ### 🛑 Breaking changes 🛑 From 3ed3976d5be8c2c70277d12361b3b790cd04a415 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:13:55 -0500 Subject: [PATCH 0774/1234] Bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 in /cmd/otel-allocator (#1543) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 9076b1b34..3ca7acb81 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -24,7 +24,7 @@ require ( k8s.io/api v0.26.1 k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.1 - k8s.io/klog/v2 v2.90.0 + k8s.io/klog/v2 v2.90.1 sigs.k8s.io/controller-runtime v0.14.4 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index ade31422d..112836a79 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1133,8 +1133,8 @@ k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= -k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= From ae6714c09e76a5809cd9499e73cb2347da1381ac Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 2 Mar 2023 15:41:43 -0500 Subject: [PATCH 0775/1234] [chore] Update the otel sdks to latest (#1527) * Change the github action to match the operator * Add chloggen * update all the otels --- cmd/operator-opamp-bridge/go.mod | 20 ++++++++++---------- cmd/operator-opamp-bridge/go.sum | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index b7ded21aa..aa1f88b99 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -11,10 +11,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 - go.opentelemetry.io/otel/metric v0.36.0 - go.opentelemetry.io/otel/sdk v1.13.0 - go.opentelemetry.io/otel/sdk/metric v0.36.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0 + go.opentelemetry.io/otel/metric v0.37.0 + go.opentelemetry.io/otel/sdk v1.14.0 + go.opentelemetry.io/otel/sdk/metric v0.37.0 go.uber.org/multierr v1.9.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -27,7 +27,7 @@ require ( require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect @@ -65,22 +65,22 @@ require ( github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect + golang.org/x/oauth2 v0.4.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect - google.golang.org/grpc v1.52.3 // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.26.1 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 3bea74115..64e9b7199 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -53,6 +53,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -324,16 +326,28 @@ go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 h1:pa05sNT/P8OsIQ8mPZKTIyiBuzS/xDGLVx+DCt0y6Vs= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 h1:9uzubQUMa9RsQqQZc0Btl51pTLMdHgDHJszg6839rBQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0/go.mod h1:N+2vPD0QfUraV0HGpuiAEzM+rxpnH3Q+/+Qs6HQeWac= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0 h1:22J9c9mxNAZugv86zhwjBnER0DbO0VVpW9Oo/j3jBBQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0/go.mod h1:QD8SSO9fgtBOvXYpcX5NXW+YnDJByTnh7a/9enQWFmw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 h1:o1NyoBU8j3tY5Vtff07/dNi2egBfC4R0qSuWI0z+8pA= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0/go.mod h1:OhE6QNMd4yb/mN0LFxiutl2U1HPekpBHv9hN3TzYKmE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0 h1:Ad4fpLq5t4s4+xB0chYBmbp1NNMqG4QRkseRmbx3bOw= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0/go.mod h1:hgpB6JpYB/K403Z2wCxtX5fENB1D4bSdAHG0vJI+Koc= go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= +go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= +go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU= +go.opentelemetry.io/otel/sdk/metric v0.37.0/go.mod h1:mO2WV1AZKKwhwHTV3AKOoIEb9LbUaENZDuGUQd+j4A0= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -431,6 +445,8 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -613,6 +629,8 @@ google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -631,6 +649,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 2352c0a76818e4392a100e70b85c4f897307ad82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 2 Mar 2023 22:13:57 +0100 Subject: [PATCH 0776/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 - part 1/2 (#1536) --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 8f0916f76..a918a2aa1 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.5.0 +0.6.0 From 4bae1d194f2f185f68065335574c1ff7e3a64a28 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Fri, 3 Mar 2023 19:43:38 +0100 Subject: [PATCH 0777/1234] Recreate stateful set on change in immutable field `volumeClaimTemplates` (#1492) * Simplify volume claim templates method Remove unused config parameter; simplify code; correct the docs Signed-off-by: Matej Gera * Delete and recrete on volume claim templates changes - When volume claim templates change is detected (immutable stateful set field), opt for deleting and recreating the stateful set - Adjusted and added test to cover this change Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera * Make volume claims templates comparison more robust Ensure we don't end up in an endless recreation loop - exclude automatically popualted fields from comparison when detecting immutable changes. Signed-off-by: Matej Gera * Add E2E test for stateful set recreation Signed-off-by: Matej Gera * Correct the changelog entry and formatting Signed-off-by: Matej Gera * Update pkg/collector/reconcile/statefulset.go Co-authored-by: Israel Blancas * Update pkg/collector/reconcile/statefulset.go Co-authored-by: Jacob Aronoff * Address feedback - fix unit test Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera Co-authored-by: Israel Blancas Co-authored-by: Jacob Aronoff --- .../1492-fix-stateful-set-reconcile.yaml | 16 +++++++ pkg/collector/reconcile/statefulset.go | 47 +++++++++++++++++-- pkg/collector/reconcile/statefulset_test.go | 46 +++++++++++++++++- pkg/collector/statefulset.go | 2 +- pkg/collector/volumeclaim.go | 15 ++---- pkg/collector/volumeclaim_test.go | 7 +-- tests/e2e/statefulset-features/01-assert.yaml | 41 ++++++++++++++++ .../01-update-volume-claim-templates.yaml | 34 ++++++++++++++ 8 files changed, 187 insertions(+), 21 deletions(-) create mode 100644 .chloggen/1492-fix-stateful-set-reconcile.yaml create mode 100644 tests/e2e/statefulset-features/01-assert.yaml create mode 100644 tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml diff --git a/.chloggen/1492-fix-stateful-set-reconcile.yaml b/.chloggen/1492-fix-stateful-set-reconcile.yaml new file mode 100644 index 000000000..a2d9d0278 --- /dev/null +++ b/.chloggen/1492-fix-stateful-set-reconcile.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "operator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Fixes inability of the operator to reconcile in stateful set mode when the immutable field `volumeClaimTemplates` is changed. If such change is detected, the operator will recreate the stateful set." + +# One or more tracking issues related to the change +issues: [1491] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index d36f0acee..2c023aa92 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -72,9 +72,10 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. return fmt.Errorf("failed to get: %w", err) } - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector statfulset will be created in the next reconcile cycle", "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) + // Check for immutable fields. If set, we cannot modify the stateful set, otherwise we will face reconciliation error. + if needsDeletion, fieldName := hasImmutableFieldChange(&desired, existing); needsDeletion { + params.Log.V(2).Info("Immutable field change detected, trying to delete, the new collector statefulset will be created in the next reconcile cycle", + "field", fieldName, "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) if err := params.Client.Delete(ctx, existing); err != nil { return fmt.Errorf("failed to delete statefulset: %w", err) @@ -145,3 +146,43 @@ func deleteStatefulSets(ctx context.Context, params Params, expected []appsv1.St return nil } + +func hasImmutableFieldChange(desired, existing *appsv1.StatefulSet) (bool, string) { + if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + return true, "Spec.Selector" + } + + if hasVolumeClaimsTemplatesChanged(desired, existing) { + return true, "Spec.VolumeClaimTemplates" + } + + return false, "" +} + +// hasVolumeClaimsTemplatesChanged if volume claims template change has been detected. +// We need to do this manually due to some fields being automatically filled by the API server +// and these needs to be excluded from the comparison to prevent false positives. +func hasVolumeClaimsTemplatesChanged(desired, existing *appsv1.StatefulSet) bool { + if len(desired.Spec.VolumeClaimTemplates) != len(existing.Spec.VolumeClaimTemplates) { + return true + } + + for i := range desired.Spec.VolumeClaimTemplates { + // VolumeMode is automatically set by the API server, so if it is not set in the CR, assume it's the same as the existing one. + if desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == nil || *desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == "" { + desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode = existing.Spec.VolumeClaimTemplates[i].Spec.VolumeMode + } + + if desired.Spec.VolumeClaimTemplates[i].Name != existing.Spec.VolumeClaimTemplates[i].Name { + return true + } + if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Annotations, existing.Spec.VolumeClaimTemplates[i].Annotations) { + return true + } + if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Spec, existing.Spec.VolumeClaimTemplates[i].Spec) { + return true + } + } + + return false +} diff --git a/pkg/collector/reconcile/statefulset_test.go b/pkg/collector/reconcile/statefulset_test.go index bf8353429..f8f59fdb6 100644 --- a/pkg/collector/reconcile/statefulset_test.go +++ b/pkg/collector/reconcile/statefulset_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" v1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -138,7 +139,7 @@ func TestExpectedStatefulsets(t *testing.T) { oldSs := collector.StatefulSet(param.Config, logger, param.Instance) oldSs.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" oldSs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" - oldSs.Name = "update-ss" + oldSs.Name = "update-selector" err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{oldSs}) assert.NoError(t, err) @@ -162,4 +163,47 @@ func TestExpectedStatefulsets(t *testing.T) { assert.True(t, exists) assert.Equal(t, newSs.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) }) + + t.Run("change Spec.VolumeClaimTemplates should recreate statefulset", func(t *testing.T) { + + oldSs := collector.StatefulSet(param.Config, logger, param.Instance) + oldSs.Name = "update-volumeclaimtemplates" + + err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{oldSs}) + assert.NoError(t, err) + exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + + newSs := collector.StatefulSet(param.Config, logger, param.Instance) + // Add a new vpersistent volume claim to test stateful set will be recreated. + volumeModeFilesystem := corev1.PersistentVolumeFilesystem + newSs.Spec.VolumeClaimTemplates = []corev1.PersistentVolumeClaim{{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default-volume", + }, + Spec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, + VolumeMode: &volumeModeFilesystem, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{"storage": resource.MustParse("50Mi")}, + }, + }}} + newSs.Name = oldSs.Name + + err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + assert.NoError(t, err) + exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.False(t, exists) + + err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + assert.NoError(t, err) + actual := v1.StatefulSet{} + exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) + assert.NoError(t, err) + assert.True(t, exists) + assert.Len(t, actual.Spec.VolumeClaimTemplates, 1) + assert.Equal(t, newSs.Spec.VolumeClaimTemplates[0].Spec, actual.Spec.VolumeClaimTemplates[0].Spec) + }) } diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 2ea7d77a0..b09462288 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -65,7 +65,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel }, Replicas: otelcol.Spec.Replicas, PodManagementPolicy: "Parallel", - VolumeClaimTemplates: VolumeClaimTemplates(cfg, otelcol), + VolumeClaimTemplates: VolumeClaimTemplates(otelcol), }, } } diff --git a/pkg/collector/volumeclaim.go b/pkg/collector/volumeclaim.go index c249e5813..c641a3831 100644 --- a/pkg/collector/volumeclaim.go +++ b/pkg/collector/volumeclaim.go @@ -19,22 +19,15 @@ import ( corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" ) // VolumeClaimTemplates builds the volumeClaimTemplates for the given instance, // including the config map volume mount. -func VolumeClaimTemplates(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.PersistentVolumeClaim { - - var volumeClaimTemplates []corev1.PersistentVolumeClaim - +func VolumeClaimTemplates(otelcol v1alpha1.OpenTelemetryCollector) []corev1.PersistentVolumeClaim { if otelcol.Spec.Mode != "statefulset" { - return volumeClaimTemplates + return []corev1.PersistentVolumeClaim{} } - // Add all user specified claims or use default. - volumeClaimTemplates = append(volumeClaimTemplates, - otelcol.Spec.VolumeClaimTemplates...) - - return volumeClaimTemplates + // Add all user specified claims. + return otelcol.Spec.VolumeClaimTemplates } diff --git a/pkg/collector/volumeclaim_test.go b/pkg/collector/volumeclaim_test.go index b082b4abd..3c084f61d 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/pkg/collector/volumeclaim_test.go @@ -23,7 +23,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) @@ -45,10 +44,9 @@ func TestVolumeClaimAllowsUserToAdd(t *testing.T) { }}, }, } - cfg := config.New() // test - volumeClaims := VolumeClaimTemplates(cfg, otelcol) + volumeClaims := VolumeClaimTemplates(otelcol) // verify that volume claim replaces assert.Len(t, volumeClaims, 1) @@ -81,10 +79,9 @@ func TestVolumeClaimChecksForStatefulset(t *testing.T) { }}, }, } - cfg := config.New() // test - volumeClaims := VolumeClaimTemplates(cfg, otelcol) + volumeClaims := VolumeClaimTemplates(otelcol) // verify that volume claim replaces assert.Len(t, volumeClaims, 0) diff --git a/tests/e2e/statefulset-features/01-assert.yaml b/tests/e2e/statefulset-features/01-assert.yaml new file mode 100644 index 000000000..fdccb0fad --- /dev/null +++ b/tests/e2e/statefulset-features/01-assert.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: stateful-collector +spec: + podManagementPolicy: Parallel + template: + spec: + containers: + - args: + - --config=/conf/collector.yaml + name: otc-container + volumeMounts: + - mountPath: /conf + name: otc-internal + - mountPath: /usr/share/testvolume + name: testvolume + volumes: + - configMap: + items: + - key: collector.yaml + path: collector.yaml + name: stateful-collector + name: otc-internal + - emptyDir: {} + name: testvolume + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: testvolume + spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi + volumeMode: Filesystem +status: + replicas: 3 + readyReplicas: 3 diff --git a/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml b/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml new file mode 100644 index 000000000..5c5a0b436 --- /dev/null +++ b/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + replicas: 3 + volumes: + - name: testvolume + volumeMounts: + - name: testvolume + mountPath: /usr/share/testvolume + volumeClaimTemplates: + - metadata: + name: testvolume + spec: + accessModes: [ "ReadWriteMany" ] # change accessMode to trigger statefulset recreation. + resources: + requests: + storage: 1Gi + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] From 5abbc81d57f073c5ed51aa2b11bbecf2422c813e Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:09:46 -0500 Subject: [PATCH 0778/1234] [HPA] Properly update HPA behavior field (#1553) * update behavior * chloggen and add to validation script * validate scaleUp * dereference pointer * change e2e test comment --- .chloggen/1516-update-HPA-behavior.yaml | 17 +++++++++++++++++ .../reconcile/horizontalpodautoscaler.go | 10 ++++++---- tests/e2e/autoscale/00-install.yaml | 3 --- tests/e2e/autoscale/02-install.yaml | 5 +++++ ...rify-simplest-set-collector-hpa-metrics.yaml | 2 +- .../cmd/verify/wait-and-validate-metrics.go | 14 ++++++++++++++ 6 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 .chloggen/1516-update-HPA-behavior.yaml diff --git a/.chloggen/1516-update-HPA-behavior.yaml b/.chloggen/1516-update-HPA-behavior.yaml new file mode 100644 index 000000000..399a5188e --- /dev/null +++ b/.chloggen/1516-update-HPA-behavior.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Autoscaler + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix the issue where HPA fails to update autoscaler behavior. + +# One or more tracking issues related to the change +issues: + - 1516 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index cd90d3e51..de03a96b4 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -120,8 +120,9 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } - desiredMetrics := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics = desiredMetrics + desiredSpec := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics = desiredSpec.Metrics + updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Behavior = desiredSpec.Behavior } else { // autoscalingv2 updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas if params.Instance.Spec.Autoscaler.MinReplicas != nil { @@ -130,8 +131,9 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one } - desiredMetrics := desired.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics = desiredMetrics + desiredSpec := desired.(*autoscalingv2.HorizontalPodAutoscaler).Spec + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics = desiredSpec.Metrics + updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Behavior = desiredSpec.Behavior } } } diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 2b584163f..61dd0ce9c 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -55,9 +55,6 @@ spec: maxReplicas: 2 autoscaler: targetCPUUtilization: 50 - behavior: - scaleDown: - stabilizationWindowSeconds: 15 resources: limits: cpu: 500m diff --git a/tests/e2e/autoscale/02-install.yaml b/tests/e2e/autoscale/02-install.yaml index 655c37369..09c356af3 100644 --- a/tests/e2e/autoscale/02-install.yaml +++ b/tests/e2e/autoscale/02-install.yaml @@ -1,5 +1,6 @@ # This updates an existing deployment with a new Spec. # Target memory utilization is now added. +# scaleDown and scaleUp behavior is now added. apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: @@ -10,9 +11,13 @@ spec: autoscaler: targetCPUUtilization: 50 targetMemoryUtilization: 70 + # Without this behavior the HPA will default to a scaledown stabilization + # window of 300 seconds. Tests should fail if this update is not successful. behavior: scaleDown: stabilizationWindowSeconds: 15 + scaleUp: + stabilizationWindowSeconds: 25 resources: limits: cpu: 500m diff --git a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml index 709f42dd2..fefa6a356 100644 --- a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml +++ b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml @@ -1,4 +1,4 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 50 --memory-value 70 --hpa simplest-set-utilization-collector \ No newline at end of file + - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 50 --memory-value 70 --scale-down 15 --scale-up 25 --hpa simplest-set-utilization-collector \ No newline at end of file diff --git a/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go index b707bcf7e..87316e8c9 100644 --- a/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go +++ b/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go @@ -37,6 +37,8 @@ func main() { var kubeconfigPath string var cpuValue int var memoryValue int + var scaleDownWindow int + var scaleUpWindow int defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") @@ -46,6 +48,8 @@ func main() { pflag.IntVar(&numMetrics, "num-metrics", 1, "number of expected metrics in Spec") pflag.IntVar(&cpuValue, "cpu-value", -1, "value for target CPU utilization") pflag.IntVar(&memoryValue, "memory-value", -1, "value for target memory utilization") + pflag.IntVar(&scaleDownWindow, "scale-down", -1, "value for scaleDown stabilization window") + pflag.IntVar(&scaleUpWindow, "scale-up", -1, "value for scaleUp stabilization window") pflag.Parse() if len(hpaName) == 0 { @@ -146,6 +150,16 @@ func main() { } } + // validate HPA behavior + if int32(scaleDownWindow) != *hpav2.Spec.Behavior.ScaleDown.StabilizationWindowSeconds { + fmt.Printf("Incorrect scaleDown stabilization window found for HPA %s\n", hpaName) + return false, nil + } + if int32(scaleUpWindow) != *hpav2.Spec.Behavior.ScaleUp.StabilizationWindowSeconds { + fmt.Printf("Incorrect scaleUp stabilization window found for HPA %s\n", hpaName) + return false, nil + } + return true, nil }) if err != nil { From 4afc2200425df0b0c8980646dec7206e0f862da1 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Mon, 6 Mar 2023 16:25:24 +0100 Subject: [PATCH 0779/1234] [chore] [target-allocator] Update docs with correct `ClusterRole` after latest release (#1556) * Add endpointslices to cluster role Signed-off-by: Matej Gera * Clarify use of [chore] directive Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera --- CONTRIBUTING.md | 2 ++ cmd/otel-allocator/README.md | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d98ea5f7c..7cc2550da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -143,6 +143,8 @@ Your pull-request should add a new `.yaml` file to this directory. The name of y During the collector release process, all `./.chloggen/*.yaml` files are transcribed into `CHANGELOG.md` and then deleted. +If a changelog entry is not required, add either `[chore]` to the title of the pull request or add the `"Skip Changelog"` label to disable this action. + **Recommended Steps** 1. Create an entry file using `make chlog-new`. This generates a file based on your current branch (e.g. `./.chloggen/my-branch.yaml`) 2. Fill in all fields in the new file diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index 4746e68d2..87ad7a217 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -111,6 +111,11 @@ rules: resources: - configmaps verbs: ["get"] +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: ["get", "list", watch"] - apiGroups: - networking.k8s.io resources: From 8b01e45a9ef9bddaf091d4f8d353afdb9d80335e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 8 Mar 2023 19:56:39 +0100 Subject: [PATCH 0780/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 - part 2/2 (#1539) --- .chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/Dockerfile | 2 +- pkg/instrumentation/dotnet.go | 2 +- .../01-assert.yaml | 4 ++-- .../02-assert.yaml | 2 +- tests/e2e/instrumentation-dotnet/01-assert.yaml | 2 +- versions.txt | 2 +- 7 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 .chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml diff --git a/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml b/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml new file mode 100644 index 000000000..a3da9d5b0 --- /dev/null +++ b/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 + +# One or more tracking issues related to the change +issues: [1538] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile index 2e7dd241a..58ca0b37d 100644 --- a/autoinstrumentation/dotnet/Dockerfile +++ b/autoinstrumentation/dotnet/Dockerfile @@ -5,7 +5,7 @@ # - Following environment variables are injected to the application container to enable the auto-instrumentation. # CORECLR_ENABLE_PROFILING=1 # CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} -# CORECLR_PROFILER_PATH=%InstallationLocation%/OpenTelemetry.AutoInstrumentation.Native.so +# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so # DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps # DOTNET_SHARED_STORE=%InstallationLocation%/store # DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index d10d7ad93..8d3f9b857 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -33,7 +33,7 @@ const ( envDotNetOTelAutoHome = "OTEL_DOTNET_AUTO_HOME" dotNetCoreClrEnableProfilingEnabled = "1" dotNetCoreClrProfilerID = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - dotNetCoreClrProfilerPath = "/otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetCoreClrProfilerPath = "/otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so" dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" dotNetOTelAutoHomePath = "/otel-auto-instrumentation" dotNetSharedStorePath = "/otel-auto-instrumentation/store" diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml index b33808640..8966767e9 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -18,7 +18,7 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS @@ -59,7 +59,7 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml index 128c64134..b162061c6 100644 --- a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -21,7 +21,7 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index 270549965..a5946f895 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -15,7 +15,7 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS diff --git a/versions.txt b/versions.txt index 03b193779..eb64121ce 100644 --- a/versions.txt +++ b/versions.txt @@ -27,7 +27,7 @@ autoinstrumentation-python=0.36b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.5.0 +autoinstrumentation-dotnet=0.6.0 # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From b1b437f99b3bc5a8bd52fabf3ec52cd7ff34418d Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 9 Mar 2023 11:01:48 +0100 Subject: [PATCH 0781/1234] Feature/upgrade operator-sdk 1.27.0 (#1498) * Adding new PRs Signed-off-by: Yuri Sa * Upgrading Operator-sdk Signed-off-by: Yuri Sa * Adding createdAt fix Signed-off-by: Yuri Sa * Adding createdAt fix Signed-off-by: Yuri Sa * Adding scorecard-test update Signed-off-by: Yuri Sa * Fixing tools version Signed-off-by: Yuri Sa * Fixing version Signed-off-by: Yuri Sa * Fixing controller-gen version Signed-off-by: Yuri Sa * Fixing kubebuilder-assets Signed-off-by: Yuri Sa * Fixing kubebuilder-assets Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- Makefile | 5 +++-- bundle.Dockerfile | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 4 ++-- .../manifests/opentelemetry.io_instrumentations.yaml | 2 +- .../opentelemetry.io_opentelemetrycollectors.yaml | 2 +- bundle/metadata/annotations.yaml | 2 +- bundle/tests/scorecard/config.yaml | 8 ++++---- .../crd/bases/opentelemetry.io_instrumentations.yaml | 2 +- .../opentelemetry.io_opentelemetrycollectors.yaml | 2 +- config/scorecard/patches/basic.config.yaml | 2 +- config/scorecard/patches/olm.config.yaml | 6 +++--- hack/ignore-createdAt-bundle.sh | 11 +++++++++++ 12 files changed, 30 insertions(+), 18 deletions(-) create mode 100755 hack/ignore-createdAt-bundle.sh diff --git a/Makefile b/Makefile index a0fac91bc..8e1a2f9e2 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ START_KIND_CLUSTER ?= true KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml -OPERATOR_SDK_VERSION ?= 1.23.0 +OPERATOR_SDK_VERSION ?= 1.27.0 CERTMANAGER_VERSION ?= 1.10.0 @@ -285,7 +285,7 @@ CHLOGGEN ?= $(LOCALBIN)/chloggen ## Tool Versions KUSTOMIZE_VERSION ?= v5.0.0 -CONTROLLER_TOOLS_VERSION ?= v0.9.2 +CONTROLLER_TOOLS_VERSION ?= v0.10.0 .PHONY: kustomize @@ -375,6 +375,7 @@ bundle: kustomize operator-sdk manifests set-image-controller $(OPERATOR_SDK) generate kustomize manifests -q $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS) $(OPERATOR_SDK) bundle validate ./bundle + ./hack/ignore-createdAt-bundle.sh # Build the bundle image, used only for local dev purposes .PHONY: bundle-build diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 4a211e0f1..63e886394 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.23.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.27.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 0126daa18..8ae9485c0 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,9 +31,9 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2020-12-16T13:37:00+00:00" + createdAt: "2023-03-02T10:14:11Z" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.23.0 + operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 9e2a20357..c16f7d8eb 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 778401ecb..6d38bb3ce 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 440076266..611c31608 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.23.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.27.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml index 36fd9c2e7..efe0cbadc 100644 --- a/bundle/tests/scorecard/config.yaml +++ b/bundle/tests/scorecard/config.yaml @@ -8,7 +8,7 @@ stages: - entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: basic test: basic-check-spec-test @@ -18,7 +18,7 @@ stages: - entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-bundle-validation-test @@ -28,7 +28,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-crds-have-validation-test @@ -38,7 +38,7 @@ stages: - entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-crds-have-resources-test diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index bacaaf437..64cc02588 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: instrumentations.opentelemetry.io spec: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 6cbd2e26a..c0decfdd4 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml index 90f7ef77d..fb742649c 100644 --- a/config/scorecard/patches/basic.config.yaml +++ b/config/scorecard/patches/basic.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: basic test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml index c4153b56f..adaaf65de 100644 --- a/config/scorecard/patches/olm.config.yaml +++ b/config/scorecard/patches/olm.config.yaml @@ -4,7 +4,7 @@ entrypoint: - scorecard-test - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-bundle-validation-test @@ -14,7 +14,7 @@ entrypoint: - scorecard-test - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-crds-have-validation-test @@ -24,7 +24,7 @@ entrypoint: - scorecard-test - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.23.0 + image: quay.io/operator-framework/scorecard-test:v1.27.0 labels: suite: olm test: olm-crds-have-resources-test diff --git a/hack/ignore-createdAt-bundle.sh b/hack/ignore-createdAt-bundle.sh new file mode 100755 index 000000000..ddc3df191 --- /dev/null +++ b/hack/ignore-createdAt-bundle.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Since operator-sdk 1.26.0, `make bundle` changes the `createdAt` field from the bundle +# even if it is patched: +# https://github.com/operator-framework/operator-sdk/pull/6136 +# This code checks if only the createdAt field. If is the only change, it is ignored. +# Else, it will do nothing. +# https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1415350333 +git diff --quiet -I'^ createdAt: ' bundle +if ((! $?)) ; then + git checkout bundle +fi \ No newline at end of file From 1acf39f1393d6951b42407e7cba541dec78e3262 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 9 Mar 2023 13:42:48 +0100 Subject: [PATCH 0782/1234] Remove unused kubebuilder (#1565) Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 3 --- .github/workflows/release.yaml | 3 --- hack/install-kubebuilder.sh | 7 ------- 3 files changed, 13 deletions(-) delete mode 100755 hack/install-kubebuilder.sh diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index cc97da748..84d51d525 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -19,9 +19,6 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v3 - - name: "install kubebuilder" - run: ./hack/install-kubebuilder.sh - - name: "basic checks" run: make ci diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d07ec48ce..0052a9b53 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,9 +14,6 @@ jobs: - uses: actions/checkout@v3 - - name: "install kubebuilder" - run: ./hack/install-kubebuilder.sh - - name: "generate release resources" run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" diff --git a/hack/install-kubebuilder.sh b/hack/install-kubebuilder.sh deleted file mode 100755 index 216de0a32..000000000 --- a/hack/install-kubebuilder.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -os=$(go env GOOS) -arch=$(go env GOARCH) -curl -L https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_${os}_${arch}.tar.gz | tar -xz -C /tmp/ -sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder -export PATH=$PATH:/usr/local/kubebuilder/bin From 9a19fb0654e457058fb2943a21c7a29286381136 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:39:13 +0100 Subject: [PATCH 0783/1234] Bump go.uber.org/multierr in /cmd/operator-opamp-bridge (#1564) Bumps [go.uber.org/multierr](https://github.com/uber-go/multierr) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/uber-go/multierr/releases) - [Changelog](https://github.com/uber-go/multierr/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/multierr/compare/v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: go.uber.org/multierr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index aa1f88b99..b1619be55 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -15,7 +15,7 @@ require ( go.opentelemetry.io/otel/metric v0.37.0 go.opentelemetry.io/otel/sdk v1.14.0 go.opentelemetry.io/otel/sdk/metric v0.37.0 - go.uber.org/multierr v1.9.0 + go.uber.org/multierr v1.10.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.1 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 64e9b7199..a506033c1 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -51,7 +51,6 @@ github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -324,28 +323,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 h1:pa05sNT/P8OsIQ8mPZKTIyiBuzS/xDGLVx+DCt0y6Vs= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0 h1:9uzubQUMa9RsQqQZc0Btl51pTLMdHgDHJszg6839rBQ= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.36.0/go.mod h1:N+2vPD0QfUraV0HGpuiAEzM+rxpnH3Q+/+Qs6HQeWac= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0 h1:22J9c9mxNAZugv86zhwjBnER0DbO0VVpW9Oo/j3jBBQ= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0/go.mod h1:QD8SSO9fgtBOvXYpcX5NXW+YnDJByTnh7a/9enQWFmw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0 h1:o1NyoBU8j3tY5Vtff07/dNi2egBfC4R0qSuWI0z+8pA= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.36.0/go.mod h1:OhE6QNMd4yb/mN0LFxiutl2U1HPekpBHv9hN3TzYKmE= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0 h1:Ad4fpLq5t4s4+xB0chYBmbp1NNMqG4QRkseRmbx3bOw= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0/go.mod h1:hgpB6JpYB/K403Z2wCxtX5fENB1D4bSdAHG0vJI+Koc= -go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= -go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/sdk v1.13.0 h1:BHib5g8MvdqS65yo2vV1s6Le42Hm6rrw08qU6yz5JaM= -go.opentelemetry.io/otel/sdk v1.13.0/go.mod h1:YLKPx5+6Vx/o1TCUYYs+bpymtkmazOMT6zoRrC7AQ7I= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/sdk/metric v0.36.0 h1:dEXpkkOAEcHiRiaZdvd63MouV+3bCtAB/bF3jlNKnr8= -go.opentelemetry.io/otel/sdk/metric v0.36.0/go.mod h1:Lv4HQQPSCSkhyBKzLNtE8YhTSdK4HCwNh3lh7CiR20s= go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU= go.opentelemetry.io/otel/sdk/metric v0.37.0/go.mod h1:mO2WV1AZKKwhwHTV3AKOoIEb9LbUaENZDuGUQd+j4A0= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= @@ -359,8 +346,8 @@ go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= @@ -443,8 +430,6 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -627,8 +612,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -647,8 +630,6 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= From ddcb2da4adbdc19155f7ba6a3906975410c9bcac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:39:30 +0100 Subject: [PATCH 0784/1234] Bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 in /cmd/operator-opamp-bridge (#1552) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index b1619be55..7ad1149fc 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -20,7 +20,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.1 - k8s.io/klog/v2 v2.90.0 + k8s.io/klog/v2 v2.90.1 sigs.k8s.io/controller-runtime v0.14.4 ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index a506033c1..b38aefb93 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -687,8 +687,8 @@ k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/klog/v2 v2.90.0 h1:VkTxIV/FjRXn1fgNNcKGM8cfmL1Z33ZjXRTVxKCoF5M= -k8s.io/klog/v2 v2.90.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= From 16aa4dbed04c8a1aa5ff5cdeb12b9392006568d5 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Thu, 9 Mar 2023 14:41:20 +0100 Subject: [PATCH 0785/1234] Use non-default kind cluster name (#1510) Signed-off-by: Matej Gera --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8e1a2f9e2..a48ad5cd7 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ START_KIND_CLUSTER ?= true KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml +KIND_CLUSTER_NAME ?= "otel-operator" OPERATOR_SDK_VERSION ?= 1.27.0 @@ -219,7 +220,7 @@ container-operator-opamp-bridge: .PHONY: start-kind start-kind: ifeq (true,$(START_KIND_CLUSTER)) - kind create cluster --config $(KIND_CONFIG) + kind create cluster --name $(KIND_CLUSTER_NAME) --config $(KIND_CONFIG) endif .PHONY: install-metrics-server @@ -236,7 +237,7 @@ load-image-all: load-image-operator load-image-target-allocator load-image-opera .PHONY: load-image-operator load-image-operator: container ifeq (true,$(START_KIND_CLUSTER)) - kind load docker-image $(IMG) + kind load --name $(KIND_CLUSTER_NAME) docker-image $(IMG) else $(MAKE) container-push endif @@ -245,7 +246,7 @@ endif .PHONY: load-image-target-allocator load-image-target-allocator: container-target-allocator ifeq (true,$(START_KIND_CLUSTER)) - kind load docker-image $(TARGETALLOCATOR_IMG) + kind load --name $(KIND_CLUSTER_NAME) docker-image $(TARGETALLOCATOR_IMG) else $(MAKE) container-target-allocator-push endif @@ -253,7 +254,7 @@ endif .PHONY: load-image-operator-opamp-bridge load-image-operator-opamp-bridge: - kind load docker-image ${OPERATOROPAMPBRIDGE_IMG} + kind load --name $(KIND_CLUSTER_NAME) docker-image ${OPERATOROPAMPBRIDGE_IMG} .PHONY: cert-manager cert-manager: cmctl From 11db9a42e0741d47e0f353be9a18d00587768c0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 15:13:28 +0100 Subject: [PATCH 0786/1234] Bump k8s.io/apimachinery in /cmd/operator-opamp-bridge (#1550) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 7ad1149fc..b06e7a5a3 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,7 +18,7 @@ require ( go.uber.org/multierr v1.10.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.26.1 + k8s.io/apimachinery v0.26.2 k8s.io/client-go v0.26.1 k8s.io/klog/v2 v2.90.1 sigs.k8s.io/controller-runtime v0.14.4 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index b38aefb93..9058b6737 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -681,8 +681,8 @@ k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= -k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= +k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= From 35f74b068240f6a0e8c20ce41770c0cca9238e34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Mar 2023 12:20:46 -0800 Subject: [PATCH 0787/1234] Bump github.com/prometheus/common in /cmd/otel-allocator (#1563) Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.42.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](https://github.com/prometheus/common/compare/v0.40.0...v0.42.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 3ca7acb81..94fcaba4c 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 github.com/prometheus/client_golang v1.14.0 - github.com/prometheus/common v0.40.0 + github.com/prometheus/common v0.42.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 @@ -165,7 +165,7 @@ require ( golang.org/x/crypto v0.5.0 // indirect golang.org/x/mod v0.7.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 112836a79..0b46d1f4d 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -605,8 +605,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= -github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -829,8 +829,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= From 5984749c8d55fee9e73dfc8a89316eb31576b0b9 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 9 Mar 2023 21:24:59 +0100 Subject: [PATCH 0788/1234] Bump k8s dependencies to 1.26.x (#1507) Signed-off-by: Pavol Loffay --- .chloggen/bump-k8s-deps-to-126.yaml | 16 ++ Makefile | 3 +- .../opentelemetry.io_instrumentations.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 207 ++++++++++++++---- .../opentelemetry.io_instrumentations.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 207 ++++++++++++++---- docs/api.md | 140 +++++++++++- go.mod | 58 +++-- go.sum | 115 ++++++---- pkg/collector/reconcile/configmap_test.go | 4 + 10 files changed, 574 insertions(+), 180 deletions(-) create mode 100755 .chloggen/bump-k8s-deps-to-126.yaml diff --git a/.chloggen/bump-k8s-deps-to-126.yaml b/.chloggen/bump-k8s-deps-to-126.yaml new file mode 100755 index 000000000..5ceaa621c --- /dev/null +++ b/.chloggen/bump-k8s-deps-to-126.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Kubernetes golang dependencies to 1.26.x + +# One or more tracking issues related to the change +issues: [1385] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Makefile b/Makefile index a48ad5cd7..655405202 100644 --- a/Makefile +++ b/Makefile @@ -284,9 +284,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen ENVTEST ?= $(LOCALBIN)/setup-envtest CHLOGGEN ?= $(LOCALBIN)/chloggen -## Tool Versions KUSTOMIZE_VERSION ?= v5.0.0 -CONTROLLER_TOOLS_VERSION ?= v0.10.0 +CONTROLLER_TOOLS_VERSION ?= v0.11.3 .PHONY: kustomize diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index c16f7d8eb..adfcb4df3 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 6d38bb3ce..647ba4c2a 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator @@ -1401,9 +1401,14 @@ spec: type: object supplementalGroups: description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID. If - unspecified, no groups will be added to any container. Note - that this field cannot be set when spec.os.name is windows. + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for the uid of the container process. If + unspecified, no additional groups are added to any container. + Note that group memberships defined in the container image for + the uid of the container process are still effective, even if + they are not included in this list. Note that this field cannot + be set when spec.os.name is windows. items: format: int64 type: integer @@ -1538,6 +1543,26 @@ spec: resources: description: Resources to set on the OpenTelemetry Collector pods. properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1899,9 +1924,12 @@ spec: * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will be copied + to dataSource when dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef will + not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1923,25 +1951,31 @@ spec: dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim - object. When this field is specified, volume binding will - only succeed if the type of the specified object matches - some installed volume populator or dynamic provisioner. - This field will replace the functionality of the DataSource + is desired. This may be any object from a non-empty API + group (non core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding will only + succeed if the type of the specified object matches some + installed volume populator or dynamic provisioner. This + field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must - have the same value. For backwards compatibility, both - fields (DataSource and DataSourceRef) will be set to the - same value automatically if one of them is empty and the - other is non-empty. There are two important differences - between DataSource and DataSourceRef: * While DataSource - only allows two specific types of objects, DataSourceRef - allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values - (dropping them), DataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - (Beta) Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + have the same value. For backwards compatibility, when + namespace isn''t specified in dataSourceRef, both fields + (dataSource and dataSourceRef) will be set to the same + value automatically if one of them is empty and the other + is non-empty. When namespace is specified in dataSourceRef, + dataSource isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows two + specific types of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While + dataSource ignores disallowed values (dropping them), + dataSourceRef preserves all values, and generates an error + if a disallowed value is specified. * While dataSource + only allows local objects, dataSourceRef allows objects + in any namespaces. (Beta) Using this field requires the + AnyVolumeDataSource feature gate to be enabled. (Alpha) + Using the namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1955,11 +1989,20 @@ spec: name: description: Name is the name of resource being referenced type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant object + is required in the referent namespace to allow that + namespace's owner to accept the reference. See the + ReferenceGrant documentation for details. (Alpha) + This field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string required: - kind - name type: object - x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -1968,6 +2011,29 @@ spec: still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2661,9 +2727,12 @@ spec: provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified - data source. If the AnyVolumeDataSource feature - gate is enabled, this field will always have the - same contents as the DataSourceRef field.' + data source. When the AnyVolumeDataSource feature + gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will + be copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -2689,27 +2758,35 @@ spec: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any - local object from a non-empty API group (non core - object) or a PersistentVolumeClaim object. When - this field is specified, volume binding will only - succeed if the type of the specified object matches - some installed volume populator or dynamic provisioner. + object from a non-empty API group (non core object) + or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. This field will replace the functionality of the - DataSource field and as such if both fields are + dataSource field and as such if both fields are non-empty, they must have the same value. For - backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value + backwards compatibility, when namespace isn''t + specified in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same value automatically if one of them is empty and the - other is non-empty. There are two important differences - between DataSource and DataSourceRef: * While - DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well - as PersistentVolumeClaim objects. * While DataSource - ignores disallowed values (dropping them), DataSourceRef - preserves all values, and generates an error if - a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature - gate to be enabled.' + other is non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t set to the + same value and must be empty. There are three + important differences between dataSource and dataSourceRef: + * While dataSource only allows two specific types + of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping + them), dataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + * While dataSource only allows local objects, + dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the + namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to + be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -2726,11 +2803,21 @@ spec: description: Name is the name of resource being referenced type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string required: - kind - name type: object - x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -2739,6 +2826,30 @@ spec: value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 64cc02588..3e870afeb 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: instrumentations.opentelemetry.io spec: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c0decfdd4..72d7893ef 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: opentelemetrycollectors.opentelemetry.io spec: @@ -1399,9 +1399,14 @@ spec: type: object supplementalGroups: description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID. If - unspecified, no groups will be added to any container. Note - that this field cannot be set when spec.os.name is windows. + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for the uid of the container process. If + unspecified, no additional groups are added to any container. + Note that group memberships defined in the container image for + the uid of the container process are still effective, even if + they are not included in this list. Note that this field cannot + be set when spec.os.name is windows. items: format: int64 type: integer @@ -1536,6 +1541,26 @@ spec: resources: description: Resources to set on the OpenTelemetry Collector pods. properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1897,9 +1922,12 @@ spec: * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will be copied + to dataSource when dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef will + not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1921,25 +1949,31 @@ spec: dataSourceRef: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim - object. When this field is specified, volume binding will - only succeed if the type of the specified object matches - some installed volume populator or dynamic provisioner. - This field will replace the functionality of the DataSource + is desired. This may be any object from a non-empty API + group (non core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding will only + succeed if the type of the specified object matches some + installed volume populator or dynamic provisioner. This + field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must - have the same value. For backwards compatibility, both - fields (DataSource and DataSourceRef) will be set to the - same value automatically if one of them is empty and the - other is non-empty. There are two important differences - between DataSource and DataSourceRef: * While DataSource - only allows two specific types of objects, DataSourceRef - allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values - (dropping them), DataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - (Beta) Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + have the same value. For backwards compatibility, when + namespace isn''t specified in dataSourceRef, both fields + (dataSource and dataSourceRef) will be set to the same + value automatically if one of them is empty and the other + is non-empty. When namespace is specified in dataSourceRef, + dataSource isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows two + specific types of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While + dataSource ignores disallowed values (dropping them), + dataSourceRef preserves all values, and generates an error + if a disallowed value is specified. * While dataSource + only allows local objects, dataSourceRef allows objects + in any namespaces. (Beta) Using this field requires the + AnyVolumeDataSource feature gate to be enabled. (Alpha) + Using the namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1953,11 +1987,20 @@ spec: name: description: Name is the name of resource being referenced type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace is specified, + a gateway.networking.k8s.io/ReferenceGrant object + is required in the referent namespace to allow that + namespace's owner to accept the reference. See the + ReferenceGrant documentation for details. (Alpha) + This field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. + type: string required: - kind - name type: object - x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -1966,6 +2009,29 @@ spec: still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2659,9 +2725,12 @@ spec: provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified - data source. If the AnyVolumeDataSource feature - gate is enabled, this field will always have the - same contents as the DataSourceRef field.' + data source. When the AnyVolumeDataSource feature + gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will + be copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -2687,27 +2756,35 @@ spec: description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any - local object from a non-empty API group (non core - object) or a PersistentVolumeClaim object. When - this field is specified, volume binding will only - succeed if the type of the specified object matches - some installed volume populator or dynamic provisioner. + object from a non-empty API group (non core object) + or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. This field will replace the functionality of the - DataSource field and as such if both fields are + dataSource field and as such if both fields are non-empty, they must have the same value. For - backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value + backwards compatibility, when namespace isn''t + specified in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same value automatically if one of them is empty and the - other is non-empty. There are two important differences - between DataSource and DataSourceRef: * While - DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well - as PersistentVolumeClaim objects. * While DataSource - ignores disallowed values (dropping them), DataSourceRef - preserves all values, and generates an error if - a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature - gate to be enabled.' + other is non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t set to the + same value and must be empty. There are three + important differences between dataSource and dataSourceRef: + * While dataSource only allows two specific types + of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping + them), dataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + * While dataSource only allows local objects, + dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the + namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to + be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -2724,11 +2801,21 @@ spec: description: Name is the name of resource being referenced type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. + type: string required: - kind - name type: object - x-kubernetes-map-type: atomic resources: description: 'resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure @@ -2737,6 +2824,30 @@ spec: value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: diff --git a/docs/api.md b/docs/api.md index 0292eee02..470b677a4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4582,7 +4582,7 @@ PodSecurityContext holds pod-level security attributes and common container sett supplementalGroups []integer - A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows.
+ A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows.
false @@ -4853,6 +4853,15 @@ Resources to set on the OpenTelemetry Collector pods. + claims + []object + + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable.
+ + false + limits map[string]int or string @@ -4870,6 +4879,33 @@ Resources to set on the OpenTelemetry Collector pods. +### OpenTelemetryCollector.spec.resources.claims[index] +[↩ Parent](#opentelemetrycollectorspecresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### OpenTelemetryCollector.spec.securityContext [↩ Parent](#opentelemetrycollectorspec) @@ -5444,14 +5480,14 @@ spec defines the desired characteristics of a volume requested by a pod author. dataSource object - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
false dataSourceRef object - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
false @@ -5498,7 +5534,7 @@ spec defines the desired characteristics of a volume requested by a pod author. -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. @@ -5539,7 +5575,7 @@ dataSource field can be used to specify either: * An existing VolumeSnapshot obj -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
@@ -5571,6 +5607,13 @@ dataSourceRef specifies the object from which to populate the volume with data, APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+ + + + +
false
namespacestring + Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+
false
@@ -5592,6 +5635,15 @@ resources represents the minimum resources the volume should have. If RecoverVol + claims + []object + + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable.
+ + false + limits map[string]int or string @@ -5609,6 +5661,33 @@ resources represents the minimum resources the volume should have. If RecoverVol +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.resources.claims[index] +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspecresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.selector [↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) @@ -6893,14 +6972,14 @@ The specification for the PersistentVolumeClaim. The entire content is copied un dataSource object - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
false dataSourceRef object - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
false @@ -6947,7 +7026,7 @@ The specification for the PersistentVolumeClaim. The entire content is copied un -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. @@ -6988,7 +7067,7 @@ dataSource field can be used to specify either: * An existing VolumeSnapshot obj -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
@@ -7020,6 +7099,13 @@ dataSourceRef specifies the object from which to populate the volume with data, APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+ + + + +
false
namespacestring + Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+
false
@@ -7041,6 +7127,15 @@ resources represents the minimum resources the volume should have. If RecoverVol + claims + []object + + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable.
+ + false + limits map[string]int or string @@ -7058,6 +7153,33 @@ resources represents the minimum resources the volume should have. If RecoverVol +### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources.claims[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespecresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector [↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) diff --git a/go.mod b/go.mod index 484cfd34a..3222e559a 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,13 @@ require ( github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.25.4 - k8s.io/apiextensions-apiserver v0.25.0 - k8s.io/apimachinery v0.25.4 - k8s.io/client-go v0.25.4 - k8s.io/component-base v0.25.4 - k8s.io/kubectl v0.25.4 - sigs.k8s.io/controller-runtime v0.13.1 + k8s.io/api v0.26.1 + k8s.io/apiextensions-apiserver v0.26.1 + k8s.io/apimachinery v0.26.1 + k8s.io/client-go v0.26.1 + k8s.io/component-base v0.26.1 + k8s.io/kubectl v0.26.1 + sigs.k8s.io/controller-runtime v0.14.4 ) require ( @@ -28,15 +28,13 @@ require ( github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.27 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect github.com/armon/go-metrics v0.3.3 // indirect github.com/aws/aws-sdk-go v1.38.60 // indirect @@ -49,15 +47,15 @@ require ( github.com/docker/docker v20.10.14+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-kit/log v0.1.0 // indirect - github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-kit/log v0.2.0 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/zapr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect @@ -81,7 +79,7 @@ require ( github.com/hashicorp/serf v0.9.5 // indirect github.com/hetznercloud/hcloud-go v1.26.2 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect @@ -101,37 +99,37 @@ require ( github.com/opencontainers/image-spec v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.7.3 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.37.0 // indirect + github.com/prometheus/procfs v0.8.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/spf13/cobra v1.4.0 // indirect + github.com/spf13/cobra v1.6.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/trace v1.11.2 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.21.0 // indirect - golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/crypto v0.1.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sys v0.5.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect + golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/api v0.61.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.47.0 // indirect - google.golang.org/protobuf v1.28.0 // indirect + google.golang.org/grpc v1.49.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.70.1 // indirect - k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect - k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect + k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect + k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index e75799063..4d8c7b132 100644 --- a/go.sum +++ b/go.sum @@ -76,6 +76,8 @@ github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4Uw github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= +github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= @@ -119,10 +121,8 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -214,7 +214,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -256,8 +256,8 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -286,6 +286,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= @@ -299,12 +301,14 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -344,8 +348,9 @@ github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3Hfo github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -412,7 +417,6 @@ github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= @@ -635,8 +639,9 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= @@ -774,7 +779,7 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -812,13 +817,16 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU= +github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= +github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= +github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -876,15 +884,17 @@ github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= @@ -896,8 +906,9 @@ github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= +github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -907,8 +918,9 @@ github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= @@ -956,8 +968,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1049,7 +1061,7 @@ go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1065,6 +1077,8 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1095,6 +1109,9 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1194,6 +1211,8 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1211,8 +1230,9 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1314,13 +1334,16 @@ golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1332,6 +1355,7 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1343,6 +1367,8 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1575,8 +1601,8 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1591,8 +1617,9 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1641,20 +1668,22 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.25.4 h1:3YO8J4RtmG7elEgaWMb4HgmpS2CfY1QlaOz9nwB+ZSs= -k8s.io/api v0.25.4/go.mod h1:IG2+RzyPQLllQxnhzD8KQNEu4c4YvyDTpSMztf4A0OQ= +k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= +k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= +k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= +k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc= -k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= +k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= +k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.25.4 h1:3RNRDffAkNU56M/a7gUfXaEzdhZlYhoW8dgViGy5fn8= -k8s.io/client-go v0.25.4/go.mod h1:8trHCAC83XKY0wsBIpbirZU4NTUpbuhc2JnI7OruGZw= -k8s.io/component-base v0.25.4 h1:n1bjg9Yt+G1C0WnIDJmg2fo6wbEU1UGMRiQSjmj7hNQ= -k8s.io/component-base v0.25.4/go.mod h1:nnZJU8OP13PJEm6/p5V2ztgX2oyteIaAGKGMYb2L2cY= +k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= +k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= +k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1663,25 +1692,29 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/kubectl v0.25.4 h1:O3OA1z4V1ZyvxCvScjq0pxAP7ABgznr8UvnVObgI6Dc= -k8s.io/kubectl v0.25.4/go.mod h1:CKMrQ67Bn2YCP26tZStPQGq62zr9pvzEf65A0navm8k= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= +k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= +k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 22bef856a..ca12d9e6e 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -103,8 +103,10 @@ receivers: metrics_path: /metrics scheme: http follow_redirects: true + enable_http2: true http_sd_configs: - follow_redirects: false + enable_http2: false url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME service: pipelines: @@ -152,8 +154,10 @@ receivers: metrics_path: /metrics scheme: http follow_redirects: true + enable_http2: true http_sd_configs: - follow_redirects: false + enable_http2: false url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME service: pipelines: From 34595742bf279cf909f01a8f540bb56ed812d521 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 10 Mar 2023 09:40:20 +0100 Subject: [PATCH 0789/1234] Use golang 1.20 (#1567) * Use golang 1.20 Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/golang119.yaml | 16 ++++++ .github/workflows/changelog.yaml | 2 +- .github/workflows/continuous-integration.yaml | 6 +-- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- Dockerfile | 2 +- cmd/operator-opamp-bridge/Dockerfile | 2 +- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/otel-allocator/Dockerfile | 2 +- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/server/bench_test.go | 52 +++++++++---------- go.mod | 2 +- 13 files changed, 55 insertions(+), 39 deletions(-) create mode 100755 .chloggen/golang119.yaml diff --git a/.chloggen/golang119.yaml b/.chloggen/golang119.yaml new file mode 100755 index 000000000..0975df278 --- /dev/null +++ b/.chloggen/golang119.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Build operator, target-allocator and opAMP bridge with golang 1.20. + +# One or more tracking issues related to the change +issues: [1566] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index b009cfbcd..48dea7613 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -33,7 +33,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - name: Cache Go id: go-cache uses: actions/cache@v3 diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 84d51d525..12eb0786a 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -32,7 +32,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: args: -v --timeout 5m - version: v1.48 + version: v1.51.2 working-directory: ${{ matrix.workdir }} security: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7e285901c..b74413e53 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0052a9b53..ff52c5b19 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - uses: actions/checkout@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index fa011fe7f..fe152a246 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: "1.20" - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 6a025312c..fcc24bc3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.20 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index ce62eca28..72d1db5c1 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -1,5 +1,5 @@ # Build the operator-opamp-bridge binary -FROM golang:1.19-alpine as builder +FROM golang:1.20-alpine as builder WORKDIR /app diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index b06e7a5a3..efcdff22d 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge -go 1.19 +go 1.20 require ( github.com/go-logr/logr v1.2.3 diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 5ba6d819f..25adbea78 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,5 +1,5 @@ # Build the otel-allocator binary -FROM golang:1.19-alpine as builder +FROM golang:1.20-alpine as builder WORKDIR /app diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 94fcaba4c..90f1063a5 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator -go 1.19 +go 1.20 require ( github.com/buraksezer/consistent v0.10.0 diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go index cd9114afb..c803faeac 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/server/bench_test.go @@ -31,7 +31,7 @@ import ( ) func BenchmarkServerTargetsHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) + random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec var table = []struct { numCollectors int numJobs int @@ -58,8 +58,8 @@ func BenchmarkServerTargetsHandler(b *testing.B) { b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { - randomJob := rand.Intn(v.numJobs) //nolint: gosec - randomCol := rand.Intn(v.numCollectors) //nolint: gosec + randomJob := random.Intn(v.numJobs) //nolint: gosec + randomCol := random.Intn(v.numCollectors) //nolint: gosec request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) w := httptest.NewRecorder() s.server.Handler.ServeHTTP(w, request) @@ -70,14 +70,14 @@ func BenchmarkServerTargetsHandler(b *testing.B) { } func BenchmarkScrapeConfigsHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) + random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec s := &Server{ logger: logger, } tests := []int{0, 5, 10, 50, 100, 500} for _, n := range tests { - data := makeNScrapeConfigs(n) + data := makeNScrapeConfigs(*random, n) assert.NoError(b, s.UpdateScrapeConfigResponse(data)) b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { @@ -94,7 +94,7 @@ func BenchmarkScrapeConfigsHandler(b *testing.B) { } func BenchmarkCollectorMapJSONHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) + random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec s := &Server{ logger: logger, } @@ -137,7 +137,7 @@ func BenchmarkCollectorMapJSONHandler(b *testing.B) { }, } for _, tc := range tests { - data := makeNCollectorJSON(tc.numCollectors, tc.numTargets) + data := makeNCollectorJSON(*random, tc.numCollectors, tc.numTargets) b.Run(fmt.Sprintf("%d_collectors_%d_targets", tc.numCollectors, tc.numTargets), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { @@ -149,7 +149,7 @@ func BenchmarkCollectorMapJSONHandler(b *testing.B) { } func BenchmarkTargetItemsJSONHandler(b *testing.B) { - rand.Seed(time.Now().UnixNano()) + random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec s := &Server{ logger: logger, } @@ -196,7 +196,7 @@ func BenchmarkTargetItemsJSONHandler(b *testing.B) { }, } for _, tc := range tests { - data := makeNTargetItems(tc.numTargets, tc.numLabels) + data := makeNTargetItems(*random, tc.numTargets, tc.numLabels) b.Run(fmt.Sprintf("%d_targets_%d_labels", tc.numTargets, tc.numLabels), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { @@ -209,22 +209,22 @@ func BenchmarkTargetItemsJSONHandler(b *testing.B) { var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/") -func randSeq(n int) string { +func randSeq(random rand.Rand, n int) string { b := make([]rune, n) for i := range b { - b[i] = letters[rand.Intn(len(letters))] //nolint:gosec + b[i] = letters[random.Intn(len(letters))] //nolint:gosec } return string(b) } -func makeNScrapeConfigs(n int) map[string]*promconfig.ScrapeConfig { +func makeNScrapeConfigs(random rand.Rand, n int) map[string]*promconfig.ScrapeConfig { items := make(map[string]*promconfig.ScrapeConfig, n) for i := 0; i < n; i++ { - items[randSeq(20)] = &promconfig.ScrapeConfig{ - JobName: randSeq(20), + items[randSeq(random, 20)] = &promconfig.ScrapeConfig{ + JobName: randSeq(random, 20), ScrapeInterval: model.Duration(30 * time.Second), ScrapeTimeout: model.Duration(time.Minute), - MetricsPath: randSeq(50), + MetricsPath: randSeq(random, 50), SampleLimit: 5, TargetLimit: 200, LabelLimit: 20, @@ -235,34 +235,34 @@ func makeNScrapeConfigs(n int) map[string]*promconfig.ScrapeConfig { return items } -func makeNCollectorJSON(numCollectors, numItems int) map[string]collectorJSON { +func makeNCollectorJSON(random rand.Rand, numCollectors, numItems int) map[string]collectorJSON { items := make(map[string]collectorJSON, numCollectors) for i := 0; i < numCollectors; i++ { - items[randSeq(20)] = collectorJSON{ - Link: randSeq(120), - Jobs: makeNTargetItems(numItems, 50), + items[randSeq(random, 20)] = collectorJSON{ + Link: randSeq(random, 120), + Jobs: makeNTargetItems(random, numItems, 50), } } return items } -func makeNTargetItems(numItems, numLabels int) []*target.Item { +func makeNTargetItems(random rand.Rand, numItems, numLabels int) []*target.Item { items := make([]*target.Item, 0, numItems) for i := 0; i < numItems; i++ { items = append(items, target.NewItem( - randSeq(80), - randSeq(150), - makeNNewLabels(numLabels), - randSeq(30), + randSeq(random, 80), + randSeq(random, 150), + makeNNewLabels(random, numLabels), + randSeq(random, 30), )) } return items } -func makeNNewLabels(n int) model.LabelSet { +func makeNNewLabels(random rand.Rand, n int) model.LabelSet { labels := make(map[model.LabelName]model.LabelValue, n) for i := 0; i < n; i++ { - labels[model.LabelName(randSeq(20))] = model.LabelValue(randSeq(20)) + labels[model.LabelName(randSeq(random, 20))] = model.LabelValue(randSeq(random, 20)) } return labels } diff --git a/go.mod b/go.mod index 3222e559a..18dac6b90 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.19 +go 1.20 retract v1.51.0 From 8d1fb4e51f145ef0d7e71db7f129d489bb952452 Mon Sep 17 00:00:00 2001 From: jvoravong <47871238+jvoravong@users.noreply.github.com> Date: Fri, 10 Mar 2023 02:10:32 -0700 Subject: [PATCH 0790/1234] Update Dockerfile comments for undocumented requirement (#1568) --- autoinstrumentation/dotnet/Dockerfile | 4 +++- autoinstrumentation/java/Dockerfile | 2 ++ autoinstrumentation/nodejs/Dockerfile | 2 ++ autoinstrumentation/python/Dockerfile | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile index 58ca0b37d..a9ffff3b5 100644 --- a/autoinstrumentation/dotnet/Dockerfile +++ b/autoinstrumentation/dotnet/Dockerfile @@ -9,7 +9,9 @@ # DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps # DOTNET_SHARED_STORE=%InstallationLocation%/store # DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll -# OTEL_DOTNET_AUTO_HOME=%InstallationLocation% +# OTEL_DOTNET_AUTO_HOME=%InstallationLocation% +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. FROM busybox diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile index c33093b87..41941402f 100644 --- a/autoinstrumentation/java/Dockerfile +++ b/autoinstrumentation/java/Dockerfile @@ -2,6 +2,8 @@ # - Download your customized `javaagent.jar` to `/javaagent.jar`. This is required as when instrumenting the pod, # one init container will be created to copy the jar to your app's container. # - Grant the necessary access to the jar. `chmod -R go+r /javaagent.jar` +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. FROM busybox ARG version diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 1e0fd96f9..080eed54c 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -7,6 +7,8 @@ # - Ensure you have `@opentelemetry/api`, `@opentelemetry/auto-instrumentations-node`, and `@opentelemetry/sdk-node` or your customized # alternatives installed. # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. FROM node:16 AS build WORKDIR /operator-build diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index 5355ed277..ed63eab4c 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -7,7 +7,8 @@ # - Ensure you have `opentelemetry-distro` and `opentelemetry-instrumentation` or your customized alternatives installed. # Those two packages are essential to Python auto-instrumentation. # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` - +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. FROM python:3.10-alpine AS build WORKDIR /operator-build From 41eebfa875860fddd739ccc9bb7a0c9c907c0298 Mon Sep 17 00:00:00 2001 From: zirain Date: Fri, 10 Mar 2023 17:44:52 +0800 Subject: [PATCH 0791/1234] set ServiceInternalTrafficPolicyLocal when using daemonset mode (#1517) * set ServiceInternalTrafficPolicyLocal when using daemonset mode Signed-off-by: hejianpeng * remove redundant empty lines Signed-off-by: hejianpeng * add changelog Signed-off-by: hejianpeng --------- Signed-off-by: hejianpeng --- ...7-fix-service-internal-traffic-policy.yaml | 16 +++++++++++ pkg/collector/reconcile/service.go | 12 ++++++-- pkg/collector/reconcile/service_test.go | 28 +++++++++++++++++-- pkg/collector/reconcile/suite_test.go | 5 ++++ 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 .chloggen/1517-fix-service-internal-traffic-policy.yaml diff --git a/.chloggen/1517-fix-service-internal-traffic-policy.yaml b/.chloggen/1517-fix-service-internal-traffic-policy.yaml new file mode 100644 index 000000000..c2f5e92ed --- /dev/null +++ b/.chloggen/1517-fix-service-internal-traffic-policy.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: "operator" + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Set `ServiceInternalTrafficPolicy`` to `Local` when using daemonset mode." + +# One or more tracking issues related to the change +issues: [1401] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 8589359a4..8272318dc 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -114,6 +114,11 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { return nil } + trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster + if params.Instance.Spec.Mode == v1alpha1.ModeDaemonSet { + trafficPolicy = corev1.ServiceInternalTrafficPolicyLocal + } + return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Service(params.Instance), @@ -122,9 +127,10 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { Annotations: params.Instance.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: collector.SelectorLabels(params.Instance), - ClusterIP: "", - Ports: ports, + InternalTrafficPolicy: &trafficPolicy, + Selector: collector.SelectorLabels(params.Instance), + ClusterIP: "", + Ports: ports, }, } } diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index c98553b20..a533fb5bd 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -130,6 +130,23 @@ func TestDesiredService(t *testing.T) { }) + t.Run("should return service with local internal traffic policy", func(t *testing.T) { + + grpc := "grpc" + jaegerPorts := v1.ServicePort{ + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + AppProtocol: &grpc, + } + p := paramsWithMode(v1alpha1.ModeDaemonSet) + ports := append(p.Instance.Spec.Ports, jaegerPorts) + expected := serviceWithInternalTrafficPolicy("test-collector", ports, v1.ServiceInternalTrafficPolicyLocal) + actual := desiredService(context.Background(), p) + + assert.Equal(t, expected, *actual) + }) + } func TestExpectedServices(t *testing.T) { @@ -230,6 +247,10 @@ func TestMonitoringService(t *testing.T) { } func service(name string, ports []v1.ServicePort) v1.Service { + return serviceWithInternalTrafficPolicy(name, ports, v1.ServiceInternalTrafficPolicyCluster) +} + +func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { labels := collector.Labels(params().Instance, []string{}) labels["app.kubernetes.io/name"] = name @@ -241,9 +262,10 @@ func service(name string, ports []v1.ServicePort) v1.Service { Annotations: params().Instance.Annotations, }, Spec: v1.ServiceSpec{ - Selector: collector.SelectorLabels(params().Instance), - ClusterIP: "", - Ports: ports, + InternalTrafficPolicy: &internalTrafficPolicy, + Selector: collector.SelectorLabels(params().Instance), + ClusterIP: "", + Ports: ports, }, } } diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 598807dd2..8bc3efcf4 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -176,6 +176,10 @@ func TestMain(m *testing.M) { } func params() Params { + return paramsWithMode(v1alpha1.ModeDeployment) +} + +func paramsWithMode(mode v1alpha1.Mode) Params { replicas := int32(2) configYAML, err := os.ReadFile("../testdata/test.yaml") if err != nil { @@ -207,6 +211,7 @@ func params() Params { }}, Replicas: &replicas, Config: string(configYAML), + Mode: mode, }, }, Scheme: testScheme, From f23dd8a180f256a0409702d867300b3d8c6109a5 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 10 Mar 2023 21:03:01 +0100 Subject: [PATCH 0792/1234] Notify users when webhooks are disabled (#1570) * Notify users when webhooks are disabled Signed-off-by: Pavol Loffay * fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index c2922eb2a..0d677edbc 100644 --- a/main.go +++ b/main.go @@ -241,6 +241,8 @@ func main() { instrumentation.NewMutator(logger, mgr.GetClient()), }), }) + } else { + ctrl.Log.Info("Webhooks are disabled, operator is running an unsupported mode", "ENABLE_WEBHOOKS", "false") } // +kubebuilder:scaffold:builder From 4953141d901e440f6cd4b523f2cf4eb11b74e83b Mon Sep 17 00:00:00 2001 From: Edwin Date: Mon, 13 Mar 2023 10:41:47 +0000 Subject: [PATCH 0793/1234] fix: enforce sorted args when creating a container object for consistent creation/reconcile (#1519) --- .../1460-fix-container-args-ordered.yaml | 16 ++++++++++++++ pkg/collector/container.go | 22 +++++++++++++++---- pkg/collector/container_test.go | 22 +++++++++++++++++++ 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100755 .chloggen/1460-fix-container-args-ordered.yaml diff --git a/.chloggen/1460-fix-container-args-ordered.yaml b/.chloggen/1460-fix-container-args-ordered.yaml new file mode 100755 index 000000000..352bb840f --- /dev/null +++ b/.chloggen/1460-fix-container-args-ordered.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: The args created for corev1.container object is not ordered and creates a situation where there is a diff detected during reconcile. Forces an ordered args. + +# One or more tracking issues related to the change +issues: [1460] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 621a1aac0..127578c26 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -57,12 +57,21 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if argsMap == nil { argsMap = map[string]string{} } + // defines the output (sorted) array for final output + var args []string + // When adding a config via v1alpha1.OpenTelemetryCollectorSpec.Config, we ensure that it is always the + // first item in the args. At the time of writing, although multiple configs are allowed in the + // opentelemetry collector, the operator has yet to implement such functionality. When multiple configs + // are present they should be merged in a deterministic manner using the order given, and because + // v1alpha1.OpenTelemetryCollectorSpec.Config is a required field we assume that it will always be the + // "primary" config and in the future additional configs can be appended to the container args in a simple manner. if addConfig { + // if key exists then delete key and excluded from the iteration after this block if _, exists := argsMap["config"]; exists { logger.Info("the 'config' flag isn't allowed and is being ignored") + delete(argsMap, "config") } - // this effectively overrides any 'config' entry that might exist in the CR - argsMap["config"] = fmt.Sprintf("/conf/%s", cfg.CollectorConfigMapEntry()) + args = append(args, fmt.Sprintf("--config=/conf/%s", cfg.CollectorConfigMapEntry())) volumeMounts = append(volumeMounts, corev1.VolumeMount{ Name: naming.ConfigMapVolume(), @@ -70,10 +79,15 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }) } - var args []string + // ensure that the v1alpha1.OpenTelemetryCollectorSpec.Args are ordered when moved to container.Args, + // where iterating over a map does not guarantee, so that reconcile will not be fooled by different + // ordering in args. + var sortedArgs []string for k, v := range argsMap { - args = append(args, fmt.Sprintf("--%s=%s", k, v)) + sortedArgs = append(sortedArgs, fmt.Sprintf("--%s=%s", k, v)) } + sort.Strings(sortedArgs) + args = append(args, sortedArgs...) if len(otelcol.Spec.VolumeMounts) > 0 { volumeMounts = append(volumeMounts, otelcol.Spec.VolumeMounts...) diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 2d4ffba36..c63169b85 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -366,6 +366,28 @@ func TestContainerArgs(t *testing.T) { assert.Contains(t, c.Args, "--log-level=debug") } +func TestContainerOrderedArgs(t *testing.T) { + // prepare a scenario where the debug level and a feature gate has been enabled + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Args: map[string]string{ + "log-level": "debug", + "feature-gates": "+random-feature", + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + // verify that the first args is (always) the config, and the remaining args are ordered alphabetically + // by the key + assert.Equal(t, "--config=/conf/collector.yaml", c.Args[0]) + assert.Equal(t, "--feature-gates=+random-feature", c.Args[1]) + assert.Equal(t, "--log-level=debug", c.Args[2]) +} + func TestContainerImagePullPolicy(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ From f7c4ada555c1b3cd8c55e5a8ac21c84c77b7608c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81ach?= Date: Mon, 13 Mar 2023 18:15:33 +0100 Subject: [PATCH 0794/1234] Add a note that dotnet autoinstrumentation defaults to http/protobuf (#1575) --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca4ae8a82..3affd7ca6 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,14 @@ spec: env: # Required if endpoint is set to 4317. # Python autoinstrumentation uses http/proto by default - # so data must be sent to 4318 instead of 4137. + # so data must be sent to 4318 instead of 4317. + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://otel-collector:4318 + dotnet: + env: + # Required if endpoint is set to 4317. + # Dotnet autoinstrumentation uses http/proto by default + # See https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/888e2cd216c77d12e56b54ee91dafbc4e7452a52/docs/config.md#otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://otel-collector:4318 EOF From b2227b04788f9fe3fbfe75097ef6113c489a57f1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 14 Mar 2023 12:35:34 +0100 Subject: [PATCH 0795/1234] Test on Kubernetes 1.26 (#1386) * Test on Kubernetes 1.26 Signed-off-by: Pavol Loffay * Keep using 1.24 in unit tests Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- kind-1.26.yaml | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 kind-1.26.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b74413e53..c5f34ff84 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ jobs: # should be compatible with them. kube-version: - "1.19" - - "1.25" + - "1.26" steps: diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index fe152a246..9d00e8032 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -14,7 +14,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.25" + - "1.26" steps: diff --git a/kind-1.26.yaml b/kind-1.26.yaml new file mode 100644 index 000000000..cc13fe7b6 --- /dev/null +++ b/kind-1.26.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352 From 0e39ee77693146e0924da3ca474a0fe14dc30b3a Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 15 Mar 2023 08:57:33 +0100 Subject: [PATCH 0796/1234] Release 0.72.0 (#1577) * Adding release 0.72.0 Signed-off-by: Yuri Sa * Adding release 0.72.0 Signed-off-by: Yuri Sa * Adding release 0.72.0 Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/1439-fix-HPA-updates.yaml | 17 ----------- .../1460-fix-container-args-ordered.yaml | 16 ----------- .../1492-fix-stateful-set-reconcile.yaml | 16 ----------- .chloggen/1516-update-HPA-behavior.yaml | 17 ----------- ...7-fix-service-internal-traffic-policy.yaml | 16 ----------- .../1538-bump-otel-net-auto-to-0.6.0.yaml | 16 ----------- .chloggen/bump-k8s-deps-to-126.yaml | 16 ----------- .chloggen/golang119.yaml | 16 ----------- CHANGELOG.md | 28 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 +++--- versions.txt | 8 +++--- 13 files changed, 38 insertions(+), 140 deletions(-) delete mode 100644 .chloggen/1439-fix-HPA-updates.yaml delete mode 100755 .chloggen/1460-fix-container-args-ordered.yaml delete mode 100644 .chloggen/1492-fix-stateful-set-reconcile.yaml delete mode 100644 .chloggen/1516-update-HPA-behavior.yaml delete mode 100644 .chloggen/1517-fix-service-internal-traffic-policy.yaml delete mode 100644 .chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml delete mode 100755 .chloggen/bump-k8s-deps-to-126.yaml delete mode 100755 .chloggen/golang119.yaml diff --git a/.chloggen/1439-fix-HPA-updates.yaml b/.chloggen/1439-fix-HPA-updates.yaml deleted file mode 100644 index 7375fde2f..000000000 --- a/.chloggen/1439-fix-HPA-updates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Autoscaler - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix the issue where HPA fails to update when an additional metric is added to the spec. - -# One or more tracking issues related to the change -issues: - - 1439 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1460-fix-container-args-ordered.yaml b/.chloggen/1460-fix-container-args-ordered.yaml deleted file mode 100755 index 352bb840f..000000000 --- a/.chloggen/1460-fix-container-args-ordered.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: The args created for corev1.container object is not ordered and creates a situation where there is a diff detected during reconcile. Forces an ordered args. - -# One or more tracking issues related to the change -issues: [1460] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1492-fix-stateful-set-reconcile.yaml b/.chloggen/1492-fix-stateful-set-reconcile.yaml deleted file mode 100644 index a2d9d0278..000000000 --- a/.chloggen/1492-fix-stateful-set-reconcile.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "operator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Fixes inability of the operator to reconcile in stateful set mode when the immutable field `volumeClaimTemplates` is changed. If such change is detected, the operator will recreate the stateful set." - -# One or more tracking issues related to the change -issues: [1491] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1516-update-HPA-behavior.yaml b/.chloggen/1516-update-HPA-behavior.yaml deleted file mode 100644 index 399a5188e..000000000 --- a/.chloggen/1516-update-HPA-behavior.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Autoscaler - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix the issue where HPA fails to update autoscaler behavior. - -# One or more tracking issues related to the change -issues: - - 1516 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1517-fix-service-internal-traffic-policy.yaml b/.chloggen/1517-fix-service-internal-traffic-policy.yaml deleted file mode 100644 index c2f5e92ed..000000000 --- a/.chloggen/1517-fix-service-internal-traffic-policy.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: "operator" - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Set `ServiceInternalTrafficPolicy`` to `Local` when using daemonset mode." - -# One or more tracking issues related to the change -issues: [1401] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml b/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml deleted file mode 100644 index a3da9d5b0..000000000 --- a/.chloggen/1538-bump-otel-net-auto-to-0.6.0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 - -# One or more tracking issues related to the change -issues: [1538] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-k8s-deps-to-126.yaml b/.chloggen/bump-k8s-deps-to-126.yaml deleted file mode 100755 index 5ceaa621c..000000000 --- a/.chloggen/bump-k8s-deps-to-126.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Kubernetes golang dependencies to 1.26.x - -# One or more tracking issues related to the change -issues: [1385] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/golang119.yaml b/.chloggen/golang119.yaml deleted file mode 100755 index 0975df278..000000000 --- a/.chloggen/golang119.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Build operator, target-allocator and opAMP bridge with golang 1.20. - -# One or more tracking issues related to the change -issues: [1566] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b2606b1..534505ea2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ Changes by Version +## 0.72.0 + +### 🛑 Breaking changes 🛑 + +- `operator`: Fixes inability of the operator to reconcile in stateful set mode when the immutable field `volumeClaimTemplates` is changed. If such change is detected, the operator will recreate the stateful set. (#1491) + +### 💡 Enhancements 💡 + +- `operator`: Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 (#1538) +- `operator`: Bump Kubernetes golang dependencies to 1.26.x (#1385) +- `operator`: Build operator, target-allocator and opAMP bridge with golang 1.20. (#1566) + +### 🧰 Bug fixes 🧰 + +- `Autoscaler`: Fix the issue where HPA fails to update when an additional metric is added to the spec. (#1439) +- `operator`: The args created for corev1.container object is not ordered and creates a situation where there is a diff detected during reconcile. Forces an ordered args. (#1460) +- `Autoscaler`: Fix the issue where HPA fails to update autoscaler behavior. (#1516) +- `operator`: Set `ServiceInternalTrafficPolicy`` to `Local` when using daemonset mode. (#1401) + +### Components + +* [OpenTelemetry Collector - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.72.0) +* [OpenTelemetry Contrib - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.72.0) +* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) +* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) + 0.71.0 ------------------ diff --git a/README.md b/README.md index 3affd7ca6..335593199 100644 --- a/README.md +++ b/README.md @@ -426,6 +426,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.72.0 | v1.19 to v1.26 | v1 | | v0.71.0 | v1.19 to v1.25 | v1 | | v0.70.0 | v1.19 to v1.25 | v1 | | v0.69.0 | v1.19 to v1.25 | v1 | @@ -447,7 +448,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.52.0 | v1.19 to v1.23 | v1 | | v0.51.0 | v1.19 to v1.23 | v1alpha2 | | v0.50.0 | v1.19 to v1.23 | v1alpha2 | -| v0.49.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index 46d1ccf6c..bb70a8320 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.72.0 | @yuriolisa | | v0.73.0 | @jaronoff97 | | v0.74.0 | @pavolloffay | | v0.75.0 | @VineethReddy02 | | v0.76.0 | @frzifus | +| v0.77.0 | @yuriolisa | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8ae9485c0..3b52f6452 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-03-02T10:14:11Z" + createdAt: "2023-03-14T11:39:39Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.71.0 + name: opentelemetry-operator.v0.72.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.71.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.72.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.71.0 + version: 0.72.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index eb64121ce..9f502992c 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.71.0 +opentelemetry-collector=0.72.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.71.0 +operator=0.72.0 # Represents the current release of the Target Allocator. -targetallocator=0.71.0 +targetallocator=0.72.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.71.0 +operator-opamp-bridge=0.72.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From eabe95a0abe6ae206987b51897983504f2edfb9f Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 16 Mar 2023 03:35:01 -0700 Subject: [PATCH 0797/1234] Update the javaagent version to 1.24.0 (#1578) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index a6c2798a4..53cc1a6f9 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.23.0 +1.24.0 From 2eb9f48536cfc31dfd0ac514e76b6ee3ada5200c Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 17 Mar 2023 02:28:06 -0600 Subject: [PATCH 0798/1234] Adjust autoscale test (#1582) --- tests/e2e/autoscale/00-install.yaml | 7 +++++-- tests/e2e/autoscale/02-install.yaml | 7 +++---- .../03-verify-simplest-set-collector-hpa-metrics.yaml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e/autoscale/00-install.yaml index 61dd0ce9c..5eb63bb85 100644 --- a/tests/e2e/autoscale/00-install.yaml +++ b/tests/e2e/autoscale/00-install.yaml @@ -54,10 +54,13 @@ spec: minReplicas: 1 maxReplicas: 2 autoscaler: - targetCPUUtilization: 50 + targetCPUUtilization: 99 + behavior: + scaleUp: + stabilizationWindowSeconds: 300 resources: limits: - cpu: 500m + cpu: 250m memory: 128Mi requests: cpu: 5m diff --git a/tests/e2e/autoscale/02-install.yaml b/tests/e2e/autoscale/02-install.yaml index 09c356af3..3fe9d8625 100644 --- a/tests/e2e/autoscale/02-install.yaml +++ b/tests/e2e/autoscale/02-install.yaml @@ -9,18 +9,17 @@ spec: minReplicas: 1 maxReplicas: 2 autoscaler: - targetCPUUtilization: 50 - targetMemoryUtilization: 70 + targetCPUUtilization: 60 # Without this behavior the HPA will default to a scaledown stabilization # window of 300 seconds. Tests should fail if this update is not successful. behavior: scaleDown: stabilizationWindowSeconds: 15 scaleUp: - stabilizationWindowSeconds: 25 + stabilizationWindowSeconds: 1 resources: limits: - cpu: 500m + cpu: 250m memory: 128Mi requests: cpu: 5m diff --git a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml index fefa6a356..6063958c8 100644 --- a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml +++ b/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml @@ -1,4 +1,4 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 50 --memory-value 70 --scale-down 15 --scale-up 25 --hpa simplest-set-utilization-collector \ No newline at end of file + - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 60 --scale-down 15 --scale-up 1 --hpa simplest-set-utilization-collector \ No newline at end of file From 6ca223ad8354d5f37b0c29489a155de751cdd2ef Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Sun, 19 Mar 2023 04:12:15 +0100 Subject: [PATCH 0799/1234] Bump setup-go to v4 and remove explicit go cache (#1583) Signed-off-by: Pavol Loffay --- .github/workflows/changelog.yaml | 10 +--------- .github/workflows/continuous-integration.yaml | 2 +- .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 48dea7613..2bbc7301c 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -31,17 +31,9 @@ jobs: with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "1.20" - - name: Cache Go - id: go-cache - uses: actions/cache@v3 - with: - path: | - ~/go/bin - ~/go/pkg/mod - key: changelog-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - name: Ensure no changes to the CHANGELOG run: | diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 12eb0786a..883d3337d 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -30,7 +30,7 @@ jobs: workdir: [".", "./cmd/otel-allocator", "./cmd/operator-opamp-bridge"] steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "1.20" - name: Check out code into the Go module directory diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index c5f34ff84..ead6ef072 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,7 +22,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "1.20" diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 9d00e8032..814982585 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: "1.20" From 55345764a210156619c6fcfb858b3798f8eddfc2 Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Mon, 20 Mar 2023 16:39:50 -0700 Subject: [PATCH 0800/1234] [target-allocator] use json iterator to marshal in server (#1410) --- .chloggen/json-iterator.yaml | 16 ++++++++++++++++ cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/server/bench_test.go | 6 ++++-- cmd/otel-allocator/server/server.go | 24 +++++++++++++++++------- go.sum | 25 +------------------------ 5 files changed, 39 insertions(+), 34 deletions(-) create mode 100755 .chloggen/json-iterator.yaml diff --git a/.chloggen/json-iterator.yaml b/.chloggen/json-iterator.yaml new file mode 100755 index 000000000..6a945038b --- /dev/null +++ b/.chloggen/json-iterator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Use jsoniter to marshal json + +# One or more tracking issues related to the change +issues: [1336] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 90f1063a5..7833408ac 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -10,6 +10,7 @@ require ( github.com/gin-gonic/gin v1.9.0 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.3 + github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.63.0 @@ -117,7 +118,6 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/cpuid/v2 v2.1.0 // indirect github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect github.com/leodido/go-urn v1.2.1 // indirect diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go index c803faeac..e2b90c136 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/server/bench_test.go @@ -96,7 +96,8 @@ func BenchmarkScrapeConfigsHandler(b *testing.B) { func BenchmarkCollectorMapJSONHandler(b *testing.B) { random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec s := &Server{ - logger: logger, + logger: logger, + jsonMarshaller: jsonConfig, } tests := []struct { @@ -151,7 +152,8 @@ func BenchmarkCollectorMapJSONHandler(b *testing.B) { func BenchmarkTargetItemsJSONHandler(b *testing.B) { random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec s := &Server{ - logger: logger, + logger: logger, + jsonMarshaller: jsonConfig, } tests := []struct { diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 37ec9b0a0..8351a85d3 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -16,7 +16,6 @@ package server import ( "context" - "encoding/json" "fmt" "net/http" "net/http/pprof" @@ -28,6 +27,7 @@ import ( yaml2 "github.com/ghodss/yaml" "github.com/gin-gonic/gin" "github.com/go-logr/logr" + jsoniter "github.com/json-iterator/go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -45,15 +45,24 @@ var ( }, []string{"path"}) ) +var ( + jsonConfig = jsoniter.Config{ + EscapeHTML: false, + MarshalFloatWith6Digits: true, + ObjectFieldMustBeSimpleString: true, + }.Froze() +) + type collectorJSON struct { Link string `json:"_link"` Jobs []*target.Item `json:"targets"` } type Server struct { - logger logr.Logger - allocator allocation.Allocator - server *http.Server + logger logr.Logger + allocator allocation.Allocator + server *http.Server + jsonMarshaller jsoniter.API // Use RWMutex to protect scrapeConfigResponse, since it // will be predominantly read and only written when config @@ -64,8 +73,9 @@ type Server struct { func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr *string) *Server { s := &Server{ - logger: log, - allocator: allocator, + logger: log, + allocator: allocator, + jsonMarshaller: jsonConfig, } gin.SetMode(gin.ReleaseMode) @@ -175,7 +185,7 @@ func (s *Server) errorHandler(w http.ResponseWriter, err error) { func (s *Server) jsonHandler(w http.ResponseWriter, data interface{}) { w.Header().Set("Content-Type", "application/json") - err := json.NewEncoder(w).Encode(data) + err := s.jsonMarshaller.NewEncoder(w).Encode(data) if err != nil { s.logger.Error(err, "failed to encode data for http response") } diff --git a/go.sum b/go.sum index 4d8c7b132..ca2fcf7ee 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,6 @@ github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyC github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= @@ -284,8 +282,6 @@ github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -807,7 +803,6 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= @@ -819,13 +814,10 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -1060,8 +1052,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1075,8 +1066,6 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1107,8 +1096,6 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= -golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= @@ -1336,7 +1323,6 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1365,8 +1351,6 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1635,7 +1619,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= @@ -1670,8 +1653,6 @@ k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= -k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTCZcZFY= -k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= @@ -1703,16 +1684,12 @@ k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= -k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.13.1 h1:tUsRCSJVM1QQOOeViGeX3GMT3dQF1eePPw6sEE3xSlg= -sigs.k8s.io/controller-runtime v0.13.1/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= From c4f8ffe8e221d9e0f7ce134de96f7aee02c3678d Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 23 Mar 2023 12:31:20 +0900 Subject: [PATCH 0801/1234] [chore] Release v0.73.0 (#1579) * prepare bundle * Update changelog * Remove unneccessary changes * remove java version * Release TA change * Fix released versions --- .chloggen/json-iterator.yaml | 16 ---------------- CHANGELOG.md | 16 ++++++++++++++++ README.md | 1 + RELEASE.md | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 8 ++++---- versions.txt | 8 ++++---- 6 files changed, 26 insertions(+), 25 deletions(-) delete mode 100755 .chloggen/json-iterator.yaml diff --git a/.chloggen/json-iterator.yaml b/.chloggen/json-iterator.yaml deleted file mode 100755 index 6a945038b..000000000 --- a/.chloggen/json-iterator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Use jsoniter to marshal json - -# One or more tracking issues related to the change -issues: [1336] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 534505ea2..b62219cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ Changes by Version +## 0.73.0 + +### 💡 Enhancements 💡 + +- `target allocator`: Use jsoniter to marshal json (#1336) + +### Components + +* [OpenTelemetry Collector - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.73.0) +* [OpenTelemetry Contrib - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.73.0) +* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) +* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) + + ## 0.72.0 ### 🛑 Breaking changes 🛑 diff --git a/README.md b/README.md index 335593199..c201b86fc 100644 --- a/README.md +++ b/README.md @@ -426,6 +426,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.73.0 | v1.19 to v1.26 | v1 | | v0.72.0 | v1.19 to v1.26 | v1 | | v0.71.0 | v1.19 to v1.25 | v1 | | v0.70.0 | v1.19 to v1.25 | v1 | diff --git a/RELEASE.md b/RELEASE.md index bb70a8320..7ebeace49 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.73.0 | @jaronoff97 | | v0.74.0 | @pavolloffay | | v0.75.0 | @VineethReddy02 | | v0.76.0 | @frzifus | | v0.77.0 | @yuriolisa | +| v0.78.0 | @jaronoff97 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3b52f6452..20cfbecae 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-03-14T11:39:39Z" + createdAt: "2023-03-19T03:04:54Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.72.0 + name: opentelemetry-operator.v0.73.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.72.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.73.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.72.0 + version: 0.73.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 9f502992c..e1c03afd5 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.72.0 +opentelemetry-collector=0.73.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.72.0 +operator=0.73.0 # Represents the current release of the Target Allocator. -targetallocator=0.72.0 +targetallocator=0.73.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.72.0 +operator-opamp-bridge=0.73.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From a62ad386e9cee160214506f89304198658ab37e2 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 28 Mar 2023 18:35:37 +0900 Subject: [PATCH 0802/1234] Update Kubernetes and subsequent dependency versions to latest (#1599) * Add all the versions * bundling * whoops * Docs too --- ...entelemetry-operator.clusterserviceversion.yaml | 2 +- .../opentelemetry.io_opentelemetrycollectors.yaml | 8 +++++--- cmd/operator-opamp-bridge/go.mod | 10 +++++----- cmd/operator-opamp-bridge/go.sum | 10 ++++++++++ cmd/otel-allocator/go.mod | 12 ++++++------ cmd/otel-allocator/go.sum | 12 ++++++++++++ .../opentelemetry.io_opentelemetrycollectors.yaml | 8 +++++--- docs/api.md | 6 +++--- go.mod | 14 +++++++------- go.sum | 14 ++++++++++++++ 10 files changed, 68 insertions(+), 28 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 20cfbecae..a45e06204 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-03-19T03:04:54Z" + createdAt: "2023-03-23T04:15:54Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 647ba4c2a..41fe73f82 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1547,7 +1547,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -2016,7 +2017,7 @@ spec: in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field - is immutable." + is immutable. It can only be set for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -2831,7 +2832,8 @@ spec: defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. + It can only be set for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index efcdff22d..1a662d650 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/go-logr/logr v1.2.3 github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.6.0 + github.com/open-telemetry/opamp-go v0.7.0 github.com/open-telemetry/opentelemetry-operator v1.51.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 @@ -18,10 +18,10 @@ require ( go.uber.org/multierr v1.10.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.26.2 - k8s.io/client-go v0.26.1 + k8s.io/apimachinery v0.26.3 + k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.90.1 - sigs.k8s.io/controller-runtime v0.14.4 + sigs.k8s.io/controller-runtime v0.14.5 ) require ( @@ -83,7 +83,7 @@ require ( google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.26.1 // indirect + k8s.io/api v0.26.3 // indirect k8s.io/apiextensions-apiserver v0.26.1 // indirect k8s.io/component-base v0.26.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 9058b6737..1b06b2cd4 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -246,6 +246,8 @@ github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/open-telemetry/opamp-go v0.6.0 h1:pTnVvIp9FT3qEQ8P+evENhvaQGkF8i6vu73gawBPRLQ= github.com/open-telemetry/opamp-go v0.6.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= +github.com/open-telemetry/opamp-go v0.7.0 h1:PbxBsSmJwA4mJQbL5mhmxZ8KxNKqn1HBcoDilXIcPR8= +github.com/open-telemetry/opamp-go v0.7.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= github.com/open-telemetry/opentelemetry-operator v1.51.0 h1:mf6E24jBnv0JvxUH2nOujiqShwA7kJcCFbhd2vdMyQQ= github.com/open-telemetry/opentelemetry-operator v1.51.0/go.mod h1:2oXRmTlK6/4gc+ipK94KKHEEf6h3PWh2NiG3doAQnwo= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= @@ -679,12 +681,18 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= +k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= +k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= +k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= +k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= +k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= @@ -698,6 +706,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= +sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 7833408ac..30b697651 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,11 +22,11 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.26.1 - k8s.io/apimachinery v0.26.1 - k8s.io/client-go v0.26.1 + k8s.io/api v0.26.3 + k8s.io/apimachinery v0.26.3 + k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.90.1 - sigs.k8s.io/controller-runtime v0.14.4 + sigs.k8s.io/controller-runtime v0.14.5 ) require ( @@ -181,8 +181,8 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/component-base v0.26.1 // indirect + k8s.io/apiextensions-apiserver v0.26.3 // indirect + k8s.io/component-base v0.26.3 // indirect k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect k8s.io/utils v0.0.0-20230202215443-34013725500c // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 0b46d1f4d..04d3f0379 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1125,14 +1125,24 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= +k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= +k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= +k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= +k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= +k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= +k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= @@ -1145,6 +1155,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= +sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 72d7893ef..c6f32882a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1545,7 +1545,8 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. It can only be set + for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -2014,7 +2015,7 @@ spec: in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. \n This field - is immutable." + is immutable. It can only be set for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -2829,7 +2830,8 @@ spec: defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable." + feature gate. \n This field is immutable. + It can only be set for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. diff --git a/docs/api.md b/docs/api.md index 470b677a4..ec4c1d4f9 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4858,7 +4858,7 @@ Resources to set on the OpenTelemetry Collector pods. Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable.
+ This field is immutable. It can only be set for containers.
false @@ -5640,7 +5640,7 @@ resources represents the minimum resources the volume should have. If RecoverVol Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable.
+ This field is immutable. It can only be set for containers.
false @@ -7132,7 +7132,7 @@ resources represents the minimum resources the volume should have. If RecoverVol Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable.
+ This field is immutable. It can only be set for containers.
false diff --git a/go.mod b/go.mod index 18dac6b90..dbc42a7a3 100644 --- a/go.mod +++ b/go.mod @@ -14,13 +14,13 @@ require ( github.com/stretchr/testify v1.8.1 go.opentelemetry.io/otel v1.11.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.26.1 - k8s.io/apiextensions-apiserver v0.26.1 - k8s.io/apimachinery v0.26.1 - k8s.io/client-go v0.26.1 - k8s.io/component-base v0.26.1 - k8s.io/kubectl v0.26.1 - sigs.k8s.io/controller-runtime v0.14.4 + k8s.io/api v0.26.3 + k8s.io/apiextensions-apiserver v0.26.3 + k8s.io/apimachinery v0.26.3 + k8s.io/client-go v0.26.3 + k8s.io/component-base v0.26.3 + k8s.io/kubectl v0.26.3 + sigs.k8s.io/controller-runtime v0.14.5 ) require ( diff --git a/go.sum b/go.sum index ca2fcf7ee..fa1887ef8 100644 --- a/go.sum +++ b/go.sum @@ -1653,18 +1653,28 @@ k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= +k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= +k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= +k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= +k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= +k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= +k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= +k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1681,6 +1691,8 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= +k8s.io/kubectl v0.26.3 h1:bZ5SgFyeEXw6XTc1Qji0iNdtqAC76lmeIIQULg2wNXM= +k8s.io/kubectl v0.26.3/go.mod h1:02+gv7Qn4dupzN3fi/9OvqqdW+uG/4Zi56vc4Zmsp1g= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1692,6 +1704,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= +sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= From c19cedb231552eb2920c5740780ac4480c9c537e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:20:59 +0200 Subject: [PATCH 0803/1234] Bump sigs.k8s.io/controller-runtime in /cmd/otel-allocator (#1605) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.5 to 0.14.6. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.5...v0.14.6) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 30b697651..8ae2f6eea 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.90.1 - sigs.k8s.io/controller-runtime v0.14.5 + sigs.k8s.io/controller-runtime v0.14.6 ) require ( diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 04d3f0379..e3a0d09fc 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1123,24 +1123,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= -k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= -k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= -k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= @@ -1153,10 +1143,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= -sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= -sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= +sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From b6ab1c622584ecd1937e894ecc3a75a03bd2c3e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:21:25 +0200 Subject: [PATCH 0804/1234] Bump go.opentelemetry.io/otel from 1.11.2 to 1.14.0 (#1602) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.11.2...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 26 ++++++-------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/go.mod b/go.mod index dbc42a7a3..3d8778125 100644 --- a/go.mod +++ b/go.mod @@ -11,8 +11,8 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.1 - go.opentelemetry.io/otel v1.11.2 + github.com/stretchr/testify v1.8.2 + go.opentelemetry.io/otel v1.14.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.26.3 k8s.io/apiextensions-apiserver v0.26.3 @@ -107,7 +107,7 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.6.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect diff --git a/go.sum b/go.sum index fa1887ef8..a056d09dd 100644 --- a/go.sum +++ b/go.sum @@ -985,8 +985,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= @@ -1039,10 +1039,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= -go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= -go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= -go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1651,28 +1651,18 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= -k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= -k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= -k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -1689,8 +1679,6 @@ k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kubectl v0.26.1 h1:K8A0Jjlwg8GqrxOXxAbjY5xtmXYeYjLU96cHp2WMQ7s= -k8s.io/kubectl v0.26.1/go.mod h1:miYFVzldVbdIiXMrHZYmL/EDWwJKM+F0sSsdxsATFPo= k8s.io/kubectl v0.26.3 h1:bZ5SgFyeEXw6XTc1Qji0iNdtqAC76lmeIIQULg2wNXM= k8s.io/kubectl v0.26.3/go.mod h1:02+gv7Qn4dupzN3fi/9OvqqdW+uG/4Zi56vc4Zmsp1g= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -1702,8 +1690,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= -sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= From 295efe464506355e0bcf790bcfa1197fb0b0e8af Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 29 Mar 2023 09:38:42 +0200 Subject: [PATCH 0805/1234] Automate release to operator hubs (#1573) * Automate release to operator hubs Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .github/workflows/release.yaml | 18 ++++ .../reusable-operator-hub-release.yaml | 88 +++++++++++++++++++ RELEASE.md | 6 +- 3 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/reusable-operator-hub-release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ff52c5b19..4805b47e5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,3 +26,21 @@ jobs: run: | OPERATOR_VERSION=$(git describe --tags) curl https://proxy.golang.org/github.com/open-telemetry/opentelemetry-operator/@v/${OPERATOR_VERSION}.info + + operator-hub-prod-release: + needs: release + uses: ./.github/workflows/reusable-operator-hub-release.yaml + with: + org: redhat-openshift-ecosystem + repo: community-operators-prod + secrets: + OPENTELEMETRYBOT_GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + + operator-hub-community-release: + needs: release + uses: ./.github/workflows/reusable-operator-hub-release.yaml + with: + org: k8s-operatorhub + repo: community-operators + secrets: + OPENTELEMETRYBOT_GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml new file mode 100644 index 000000000..88237e855 --- /dev/null +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -0,0 +1,88 @@ +name: Reusable - Create operator hub pull request + +on: + workflow_call: + inputs: + org: + type: string + required: true + repo: + type: string + required: true + secrets: + OPENTELEMETRYBOT_GITHUB_TOKEN: + required: true + +jobs: + create-operator-pull-request: + runs-on: ubuntu-latest + steps: + - name: Set version as env variable + env: + TAG: ${{ github.ref_name }} + run: | + echo $TAG + TAG=${TAG:1} # remove v (prefix) + echo version=${TAG} >> $GITHUB_ENV # update GitHub ENV vars + + - name: Sync fork + env: + GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + # synchronizing the fork is fast, and avoids the need to fetch the full upstream repo + # (fetching the upstream repo with "--depth 1" would lead to "shallow update not allowed" + # error when pushing back to the origin repo) + gh repo sync opentelemetrybot/${{ inputs.repo }} \ + --source ${{ inputs.org }}/${{ inputs.repo }} \ + --force + + - name: Checkout operatorhub repo + uses: actions/checkout@v3 + with: + repository: opentelemetrybot/${{ inputs.repo }} + token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + + - name: Checkout opentelemetry-operator to tmp/ directory + uses: actions/checkout@v3 + with: + repository: open-telemetry/opentelemetry-operator + token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + path: tmp/ + + - name: Update version + env: + VERSION: ${{ env.version }} + run: | + mkdir operators/opentelemetry-operator/${VERSION} + cp ./tmp/bundle -R operators/opentelemetry-operator/${VERSION} + rm -rf ./tmp + + - name: Use CLA approved github bot + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com + + - name: Create pull request against ${{ inputs.org }}/${{ inputs.repo }} + env: + VERSION: ${{ env.version }} + GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Update the opentelemetry to $VERSION" + body="Release opentelemetry-operator \`$VERSION\`. + + cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 + " + branch="update-opentelemetry-operator-to-${VERSION}" + + # gh pr create doesn't have a way to explicitly specify different head and base + # repositories currently, but it will implicitly pick up the head from a different + # repository if you set up a tracking branch + + git checkout -b $branch + git add -A + git commit -s -m "$message" + git push -f --set-upstream origin $branch + gh pr create --title "$message" \ + --body "$body" \ + --repo ${{ inputs.org }}/${{ inputs.repo }} \ + --base main diff --git a/RELEASE.md b/RELEASE.md index 7ebeace49..a2729bbcc 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,9 +10,9 @@ Steps to release a new version of the OpenTelemetry Operator: 6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` 7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` 8. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images -9. After the release, generate a new OLM bundle (`make bundle`) and create two PRs against the `Community Operators repositories`: - 1. one for the `community-operators-prod`, used by OLM on Kubernetes. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) - 1. one for the `community-operators` directory, used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) +9. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged. + 1. `community-operators-prod` is used by OLM on OpenShift. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) + 1. `community-operators` is used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) 10. Update release schedule table, by moving the current release manager to the end of the table with updated release version. ## Generating the changelog From b7db7c3ed1dfaf0179f8b3f69bf6dabe93f5aab8 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 29 Mar 2023 13:21:15 +0200 Subject: [PATCH 0806/1234] Prepare release v0.74.0 (#1608) * Prepare release v0.74.0 Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- CHANGELOG.md | 11 +++++++++++ README.md | 2 +- RELEASE.md | 2 +- .../opentelemetry-operator.clusterserviceversion.yaml | 8 ++++---- versions.txt | 8 ++++---- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62219cd3..9521fad68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ Changes by Version +## 0.74.0 + +### Components + +* [OpenTelemetry Collector - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.74.0) +* [OpenTelemetry Contrib - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.74.0) +* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) +* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) + ## 0.73.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index c201b86fc..032c47aac 100644 --- a/README.md +++ b/README.md @@ -426,6 +426,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.74.0 | v1.19 to v1.26 | v1 | | v0.73.0 | v1.19 to v1.26 | v1 | | v0.72.0 | v1.19 to v1.26 | v1 | | v0.71.0 | v1.19 to v1.25 | v1 | @@ -448,7 +449,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.53.0 | v1.19 to v1.24 | v1 | | v0.52.0 | v1.19 to v1.23 | v1 | | v0.51.0 | v1.19 to v1.23 | v1alpha2 | -| v0.50.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index a2729bbcc..4afb301e9 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.74.0 | @pavolloffay | | v0.75.0 | @VineethReddy02 | | v0.76.0 | @frzifus | | v0.77.0 | @yuriolisa | | v0.78.0 | @jaronoff97 | +| v0.79.0 | @pavolloffay | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index a45e06204..c08d6d7b9 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-03-23T04:15:54Z" + createdAt: "2023-03-29T08:21:43Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.73.0 + name: opentelemetry-operator.v0.74.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.73.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.74.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.73.0 + version: 0.74.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index e1c03afd5..0b02047f1 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.73.0 +opentelemetry-collector=0.74.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.73.0 +operator=0.74.0 # Represents the current release of the Target Allocator. -targetallocator=0.73.0 +targetallocator=0.74.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.73.0 +operator-opamp-bridge=0.74.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From d90c913756f4e7cc6c9ab2f2e0dceae80907d76a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 08:52:02 +0900 Subject: [PATCH 0807/1234] Bump sigs.k8s.io/controller-runtime in /cmd/operator-opamp-bridge (#1606) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.5 to 0.14.6. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.5...v0.14.6) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 1a662d650..2e9e7ecc4 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 k8s.io/klog/v2 v2.90.1 - sigs.k8s.io/controller-runtime v0.14.5 + sigs.k8s.io/controller-runtime v0.14.6 ) require ( diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 1b06b2cd4..d154db955 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -244,8 +244,6 @@ github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/open-telemetry/opamp-go v0.6.0 h1:pTnVvIp9FT3qEQ8P+evENhvaQGkF8i6vu73gawBPRLQ= -github.com/open-telemetry/opamp-go v0.6.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= github.com/open-telemetry/opamp-go v0.7.0 h1:PbxBsSmJwA4mJQbL5mhmxZ8KxNKqn1HBcoDilXIcPR8= github.com/open-telemetry/opamp-go v0.7.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= github.com/open-telemetry/opentelemetry-operator v1.51.0 h1:mf6E24jBnv0JvxUH2nOujiqShwA7kJcCFbhd2vdMyQQ= @@ -679,18 +677,12 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.1 h1:f+SWYiPd/GsiWwVRz+NbFyCgvv75Pk9NK6dlkZgpCRQ= -k8s.io/api v0.26.1/go.mod h1:xd/GBNgR0f707+ATNyPmQ1oyKSgndzXij81FzWGsejg= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.2 h1:da1u3D5wfR5u2RpLhE/ZtZS2P7QvDgLZTi9wrNZl/tQ= -k8s.io/apimachinery v0.26.2/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.1 h1:87CXzYJnAMGaa/IDDfRdhTzxk/wzGZ+/HUQpqgVSZXU= -k8s.io/client-go v0.26.1/go.mod h1:IWNSglg+rQ3OcvDkhY6+QLeasV4OYHDjdqeWkDQZwGE= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= @@ -704,10 +696,8 @@ k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= -sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= -sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= +sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From 3a334afc7b26b1a261ddee418c5b949a40d3c317 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 4 Apr 2023 11:06:10 +0200 Subject: [PATCH 0808/1234] Fix bundle path in opentelemetrybot PRs to operatorhubs (#1617) Signed-off-by: Pavol Loffay --- .github/workflows/reusable-operator-hub-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml index 88237e855..e3921406c 100644 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -54,7 +54,7 @@ jobs: VERSION: ${{ env.version }} run: | mkdir operators/opentelemetry-operator/${VERSION} - cp ./tmp/bundle -R operators/opentelemetry-operator/${VERSION} + cp -R ./tmp/bundle/* operators/opentelemetry-operator/${VERSION} rm -rf ./tmp - name: Use CLA approved github bot From fce73df5f51fd53eee1f7c40acc868de04e12f51 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 4 Apr 2023 09:06:17 -0600 Subject: [PATCH 0809/1234] Add ability to use feature-gates in the operator (#1619) * Add ability to use feature-gates in the operator * Add changelog * Apply feedback --- .chloggen/add-featuregates.yaml | 16 ++++++ go.mod | 3 +- go.sum | 5 +- main.go | 4 ++ pkg/featuregate/featuregate.go | 33 +++++++++++ pkg/featuregate/featuregate_test.go | 89 +++++++++++++++++++++++++++++ 6 files changed, 148 insertions(+), 2 deletions(-) create mode 100755 .chloggen/add-featuregates.yaml create mode 100644 pkg/featuregate/featuregate.go create mode 100644 pkg/featuregate/featuregate_test.go diff --git a/.chloggen/add-featuregates.yaml b/.chloggen/add-featuregates.yaml new file mode 100755 index 000000000..920d5664d --- /dev/null +++ b/.chloggen/add-featuregates.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add ability to use feature gates in the operator + +# One or more tracking issues related to the change +issues: [1619] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/go.mod b/go.mod index 3d8778125..824d0bbba 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 + go.opentelemetry.io/collector/featuregate v0.74.0 go.opentelemetry.io/otel v1.14.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.26.3 @@ -109,7 +110,7 @@ require ( go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.8.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/net v0.7.0 // indirect diff --git a/go.sum b/go.sum index a056d09dd..99c0d160f 100644 --- a/go.sum +++ b/go.sum @@ -1039,6 +1039,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/collector/featuregate v0.74.0 h1:hzkzhi6pvjqEK5+CkVBJX69wpEEYqgtTFMHGlZFsQyE= +go.opentelemetry.io/collector/featuregate v0.74.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= @@ -1057,8 +1059,9 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= diff --git a/main.go b/main.go index 0d677edbc..ea09f3807 100644 --- a/main.go +++ b/main.go @@ -26,6 +26,7 @@ import ( routev1 "github.com/openshift/api/route/v1" "github.com/spf13/pflag" + colfeaturegate "go.opentelemetry.io/collector/featuregate" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -47,6 +48,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation" instrumentationupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" @@ -74,8 +76,10 @@ func init() { func main() { // registers any flags that underlying libraries might use opts := zap.Options{} + flagset := featuregate.Flags(colfeaturegate.GlobalRegistry()) opts.BindFlags(flag.CommandLine) pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + pflag.CommandLine.AddGoFlagSet(flagset) v := version.Get() diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go new file mode 100644 index 000000000..da877c882 --- /dev/null +++ b/pkg/featuregate/featuregate.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package featuregate + +import ( + "flag" + + "go.opentelemetry.io/collector/featuregate" +) + +const ( + featureGatesFlag = "feature-gates" +) + +// Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. +func Flags(reg *featuregate.Registry) *flag.FlagSet { + flagSet := new(flag.FlagSet) + flagSet.Var(featuregate.NewFlag(reg), featureGatesFlag, + "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.") + return flagSet +} diff --git a/pkg/featuregate/featuregate_test.go b/pkg/featuregate/featuregate_test.go new file mode 100644 index 000000000..1321bfc34 --- /dev/null +++ b/pkg/featuregate/featuregate_test.go @@ -0,0 +1,89 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package featuregate + +import ( + "testing" + + "go.opentelemetry.io/collector/featuregate" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +const ( + basicGate = "basic" + advancedGate = "advanced" + falseGate = "false" +) + +func TestSetFlag(t *testing.T) { + featuregate.GlobalRegistry().MustRegister(basicGate, featuregate.StageAlpha) + featuregate.GlobalRegistry().MustRegister(advancedGate, featuregate.StageBeta) + featuregate.GlobalRegistry().MustRegister(falseGate, featuregate.StageStable, featuregate.WithRegisterRemovalVersion("v0.0.1")) + tests := []struct { + name string + args []string + expectedTrue []string + expectedFalse []string + expectedErr string + }{ + { + name: "simple set", + args: []string{"--feature-gates=basic"}, + expectedTrue: []string{basicGate}, + }, + { + name: "two flags", + args: []string{"--feature-gates=basic,advanced"}, + expectedTrue: []string{basicGate, advancedGate}, + }, + { + name: "one true one false", + args: []string{"--feature-gates=basic,-advanced"}, + expectedTrue: []string{basicGate}, + expectedFalse: []string{advancedGate}, + }, + { + name: "invalid set", + args: []string{"--feature-gates=01"}, + expectedErr: `no such feature gate -01`, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + flgs := Flags(featuregate.GlobalRegistry()) + err := flgs.Parse(tt.args) + if tt.expectedErr != "" { + require.Error(t, err) + } else { + require.NoError(t, err) + } + featuregate.GlobalRegistry().VisitAll(func(gate *featuregate.Gate) { + for _, id := range tt.expectedTrue { + if gate.ID() == id { + assert.True(t, gate.IsEnabled()) + } + } + for _, id := range tt.expectedFalse { + if gate.ID() == id { + assert.False(t, gate.IsEnabled()) + } + } + }) + }) + } +} From 3237bb1e2b997a457fc1234353b1451ac50d3830 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:06:45 -0400 Subject: [PATCH 0810/1234] Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 (#1610) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.3...v1.2.4) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 824d0bbba..86eabc043 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ retract v1.51.0 require ( github.com/Masterminds/semver/v3 v3.2.0 - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 diff --git a/go.sum b/go.sum index 99c0d160f..cb658eb65 100644 --- a/go.sum +++ b/go.sum @@ -309,8 +309,8 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= From 47be79489c95c73712f8fff016af0e1cf3d6ccf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 13:09:48 -0400 Subject: [PATCH 0811/1234] Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 in /cmd/otel-allocator (#1612) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.3...v1.2.4) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8ae2f6eea..8ffa1940d 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -9,7 +9,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.9.0 github.com/go-kit/log v0.2.1 - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index e3a0d09fc..be2b0b5e5 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -199,8 +199,8 @@ github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNV github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= From de67d4dc7619f82c6addc678555325bc2b330432 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 13:42:56 -0400 Subject: [PATCH 0812/1234] Bump github.com/go-logr/logr in /cmd/operator-opamp-bridge (#1615) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.3...v1.2.4) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 2e9e7ecc4..0fe987602 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridg go 1.20 require ( - github.com/go-logr/logr v1.2.3 + github.com/go-logr/logr v1.2.4 github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.7.0 github.com/open-telemetry/opentelemetry-operator v1.51.0 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index d154db955..1b94f7afd 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -100,8 +100,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= From a6c12444e60a758a7d778fcd1d2daffb1a13a4f0 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Tue, 4 Apr 2023 19:55:17 +0200 Subject: [PATCH 0813/1234] Bump dependencies in Node.JS autoinstrumentation to latest (#1626) * Bump Node.JS versions to latest Signed-off-by: svrnm * Update .chloggen/bump-nodejs-versions.yaml Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --------- Signed-off-by: svrnm Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- .chloggen/bump-nodejs-versions.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 18 +++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 .chloggen/bump-nodejs-versions.yaml diff --git a/.chloggen/bump-nodejs-versions.yaml b/.chloggen/bump-nodejs-versions.yaml new file mode 100644 index 000000000..aa5e19c38 --- /dev/null +++ b/.chloggen/bump-nodejs-versions.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump nodejs dependencies to latest versions + +# One or more tracking issues related to the change +issues: [1626] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 2e60e5008..fb7c9abbd 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,14 +14,14 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.3.0", - "@opentelemetry/auto-instrumentations-node": "0.35.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.34.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.27.3", - "@opentelemetry/resource-detector-aws": "1.2.1", - "@opentelemetry/resource-detector-container": "0.2.1", - "@opentelemetry/resource-detector-gcp": "0.27.4", - "@opentelemetry/resources": "1.9.0", - "@opentelemetry/sdk-node": "0.34.0" + "@opentelemetry/api": "1.4.1", + "@opentelemetry/auto-instrumentations-node": "0.36.4", + "@opentelemetry/exporter-trace-otlp-grpc": "0.37.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.4", + "@opentelemetry/resource-detector-aws": "1.2.2", + "@opentelemetry/resource-detector-container": "0.2.2", + "@opentelemetry/resource-detector-gcp": "0.28.0", + "@opentelemetry/resources": "1.11.0", + "@opentelemetry/sdk-node": "0.37.0" } } From cadcddc56c716d068882f67655e681fb017c782e Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Tue, 4 Apr 2023 23:06:24 +0200 Subject: [PATCH 0814/1234] Add metrics to nodejs (#1628) * Add metric export to nodejs auto instrumentation Signed-off-by: svrnm * Revert version updates Signed-off-by: svrnm * add changelog entry Signed-off-by: svrnm * fix dependencies Signed-off-by: svrnm --------- Signed-off-by: svrnm --- .chloggen/add-metrics-to-nodejs.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 2 ++ .../nodejs/src/autoinstrumentation.ts | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 .chloggen/add-metrics-to-nodejs.yaml diff --git a/.chloggen/add-metrics-to-nodejs.yaml b/.chloggen/add-metrics-to-nodejs.yaml new file mode 100644 index 000000000..021bb6f1d --- /dev/null +++ b/.chloggen/add-metrics-to-nodejs.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add metrics exporter to Node.JS autoinstrumentation + +# One or more tracking issues related to the change +issues: [1627] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index fb7c9abbd..0e848572a 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -16,12 +16,14 @@ "dependencies": { "@opentelemetry/api": "1.4.1", "@opentelemetry/auto-instrumentations-node": "0.36.4", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.37.0", "@opentelemetry/exporter-trace-otlp-grpc": "0.37.0", "@opentelemetry/resource-detector-alibaba-cloud": "0.27.4", "@opentelemetry/resource-detector-aws": "1.2.2", "@opentelemetry/resource-detector-container": "0.2.2", "@opentelemetry/resource-detector-gcp": "0.28.0", "@opentelemetry/resources": "1.11.0", + "@opentelemetry/sdk-metrics": "1.11.0", "@opentelemetry/sdk-node": "0.37.0" } } diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts index e2debe15c..317330766 100644 --- a/autoinstrumentation/nodejs/src/autoinstrumentation.ts +++ b/autoinstrumentation/nodejs/src/autoinstrumentation.ts @@ -1,5 +1,7 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; +import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc'; +import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'; import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'; import { awsEc2Detector, awsEksDetector } from '@opentelemetry/resource-detector-aws'; import { containerDetector } from '@opentelemetry/resource-detector-container'; @@ -12,6 +14,9 @@ const sdk = new NodeSDK({ autoDetectResources: true, instrumentations: [getNodeAutoInstrumentations()], traceExporter: new OTLPTraceExporter(), + metricReader: new PeriodicExportingMetricReader({ + exporter: new OTLPMetricExporter(), + }), resourceDetectors: [ // Standard resource detectors. From 59980bce3d9e0f329052428aa7d5dadf32fbfed7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:20:10 -0400 Subject: [PATCH 0815/1234] Bump github.com/docker/docker in /cmd/otel-allocator (#1631) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.17+incompatible to 20.10.24+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v20.10.17...v20.10.24) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8ffa1940d..870ed034d 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -55,7 +55,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.82.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.17+incompatible // indirect + github.com/docker/docker v20.10.24+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index be2b0b5e5..568712cbc 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -141,8 +141,8 @@ github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= +github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= From 9ba1652e94c63daf4abb1eb4e85e839b0b7d56b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:43:21 -0400 Subject: [PATCH 0816/1234] Bump github.com/docker/docker (#1630) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.14+incompatible to 20.10.24+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v20.10.14...v20.10.24) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 3 +-- go.sum | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 86eabc043..589bd33f5 100644 --- a/go.mod +++ b/go.mod @@ -41,11 +41,10 @@ require ( github.com/aws/aws-sdk-go v1.38.60 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/containerd v1.5.18 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.62.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.14+incompatible // indirect + github.com/docker/docker v20.10.24+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect diff --git a/go.sum b/go.sum index cb658eb65..70fa3e68e 100644 --- a/go.sum +++ b/go.sum @@ -206,8 +206,6 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.18 h1:doHr6cNxfOLTotWmZs6aZF6LrfJFcjmYFcWlRmQgYPM= -github.com/containerd/containerd v1.5.18/go.mod h1:7IN9MtIzTZH4WPEmD1gNH8bbTQXVX68yd3ZXxSHYCis= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -235,8 +233,8 @@ github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.14+incompatible h1:+T9/PRYWNDo5SZl5qS1r9Mo/0Q8AwxKKPtu9S1yxM0w= -github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= +github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -560,7 +558,6 @@ github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= From c3cef169c5bfe6c36b42162cf63dd44ecad8524e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:53:40 -0400 Subject: [PATCH 0817/1234] Bump sigs.k8s.io/controller-runtime from 0.14.5 to 0.14.6 (#1604) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.5 to 0.14.6. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.5...v0.14.6) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 589bd33f5..3f0521777 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/client-go v0.26.3 k8s.io/component-base v0.26.3 k8s.io/kubectl v0.26.3 - sigs.k8s.io/controller-runtime v0.14.5 + sigs.k8s.io/controller-runtime v0.14.6 ) require ( diff --git a/go.sum b/go.sum index 70fa3e68e..293d7c616 100644 --- a/go.sum +++ b/go.sum @@ -1690,8 +1690,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ9i+5s= -sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= +sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= From ea1bdf6466311e15ab163450491226e85b9abffd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 11:17:16 -0400 Subject: [PATCH 0818/1234] Bump github.com/prometheus-operator/prometheus-operator/pkg/client (#1613) Bumps [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) from 0.63.0 to 0.64.0. - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.63.0...v0.64.0) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 870ed034d..4cd2db91e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -14,8 +14,8 @@ require ( github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.63.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0 github.com/prometheus/client_golang v1.14.0 github.com/prometheus/common v0.42.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 568712cbc..7bcf23a82 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -580,10 +580,10 @@ github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTz github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= github.com/prometheus-operator/prometheus-operator v0.63.0 h1:LsOFPNzcOKirmM3xHEextfj5yaJyoWL4l42hbhvBSN8= github.com/prometheus-operator/prometheus-operator v0.63.0/go.mod h1:vaMQs+VjHx0y1keJllae08t8cLidN4Zor8gXAGpsZjo= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0 h1:efsW3CfymG5bZUpeIsYfdihB33YItCn7uHBOEbnHQG8= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.63.0/go.mod h1:/UtstAaWVaS3Z9GK9jo8+4SN9T+RMSq7VlOcQMmiEsc= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0 h1:8Au9x/807lcDRCmypzfWvr9haO5eF/eX7hiMQCy1k4A= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.63.0/go.mod h1:sjCnCbwVFVTO90iChFOK0eUat70C4Q11EVik0Rk3EeU= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0 h1:bqFOzWYCuSZEcuFx/ez8DFW+fqGiUEATrgezynCjpP4= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0 h1:bMvSvfmfL9NAuWnUyZoFSyb0jzzcTI3LCMs5vVnBfZ4= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0/go.mod h1:J51EiS4fKYZkSHLWo1t8Ad0iEw8RhhC6LLvYarM/+30= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= From 07720e814691c60d0e156e8cdfaba8def64d7386 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 12:56:33 -0400 Subject: [PATCH 0819/1234] Bump go.uber.org/multierr in /cmd/operator-opamp-bridge (#1614) Bumps [go.uber.org/multierr](https://github.com/uber-go/multierr) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/uber-go/multierr/releases) - [Changelog](https://github.com/uber-go/multierr/blob/master/CHANGELOG.md) - [Commits](https://github.com/uber-go/multierr/compare/v1.10.0...v1.11.0) --- updated-dependencies: - dependency-name: go.uber.org/multierr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 0fe987602..2a452faca 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -15,7 +15,7 @@ require ( go.opentelemetry.io/otel/metric v0.37.0 go.opentelemetry.io/otel/sdk v1.14.0 go.opentelemetry.io/otel/sdk/metric v0.37.0 - go.uber.org/multierr v1.10.0 + go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.3 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 1b94f7afd..0df4aa6a2 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -346,8 +346,8 @@ go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= From 73acd4c2bf3a2bcc21be2bedb5958fef97c1e739 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 12:57:10 -0400 Subject: [PATCH 0820/1234] Bump go.opentelemetry.io/collector/featuregate from 0.74.0 to 0.75.0 (#1632) Bumps [go.opentelemetry.io/collector/featuregate](https://github.com/open-telemetry/opentelemetry-collector) from 0.74.0 to 0.75.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.74.0...v0.75.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/collector/featuregate dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3f0521777..b75ab2bfe 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 - go.opentelemetry.io/collector/featuregate v0.74.0 + go.opentelemetry.io/collector/featuregate v0.75.0 go.opentelemetry.io/otel v1.14.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.26.3 diff --git a/go.sum b/go.sum index 293d7c616..cbfc6734e 100644 --- a/go.sum +++ b/go.sum @@ -1036,8 +1036,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector/featuregate v0.74.0 h1:hzkzhi6pvjqEK5+CkVBJX69wpEEYqgtTFMHGlZFsQyE= -go.opentelemetry.io/collector/featuregate v0.74.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= +go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= +go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= From c8a3f9f6662bbda337c7dc1a1b4cfd4ef19479cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:42:01 -0400 Subject: [PATCH 0821/1234] Bump github.com/Masterminds/semver/v3 from 3.2.0 to 3.2.1 (#1638) Bumps [github.com/Masterminds/semver/v3](https://github.com/Masterminds/semver) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/Masterminds/semver/releases) - [Changelog](https://github.com/Masterminds/semver/blob/master/CHANGELOG.md) - [Commits](https://github.com/Masterminds/semver/compare/v3.2.0...v3.2.1) --- updated-dependencies: - dependency-name: github.com/Masterminds/semver/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b75ab2bfe..753038307 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.20 retract v1.51.0 require ( - github.com/Masterminds/semver/v3 v3.2.0 + github.com/Masterminds/semver/v3 v3.2.1 github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible diff --git a/go.sum b/go.sum index cbfc6734e..2a816845f 100644 --- a/go.sum +++ b/go.sum @@ -109,8 +109,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= From 262d6a157fc41d6b27e4d32f53718afc84960845 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:02:46 -0600 Subject: [PATCH 0822/1234] [autoinstrumentation] Bump python dependencies (#1640) * Bump python versions * Add CPython dependencies --- autoinstrumentation/python/Dockerfile | 6 +- autoinstrumentation/python/requirements.txt | 92 +++++++++++---------- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index ed63eab4c..bac63435c 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -9,12 +9,16 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. -FROM python:3.10-alpine AS build +FROM python:3.11-alpine AS build WORKDIR /operator-build ADD requirements.txt . +RUN apk update && apk add gcc \ + libc-dev \ + libffi-dev + RUN mkdir workspace && pip install --target workspace -r requirements.txt FROM busybox diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 871b1dd1c..ba7584849 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,53 +1,55 @@ -opentelemetry-distro==0.36b0 +opentelemetry-distro==0.38b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.15.0 +opentelemetry-exporter-otlp-proto-http==1.17.0 -opentelemetry-propagator-b3==1.15.0 -opentelemetry-propagator-jaeger==1.15.0 +opentelemetry-propagator-b3==1.17.0 +opentelemetry-propagator-jaeger==1.17.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.36b0 -opentelemetry-propagator-ot-trace==0.36b0 +opentelemetry-instrumentation==0.38b0 +opentelemetry-propagator-ot-trace==0.38b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.36b0 -opentelemetry-instrumentation-aiohttp-client==0.36b0 -opentelemetry-instrumentation-aiopg==0.36b0 -opentelemetry-instrumentation-asgi==0.36b0 -opentelemetry-instrumentation-asyncpg==0.36b0 -opentelemetry-instrumentation-boto==0.36b0 -opentelemetry-instrumentation-boto3sqs==0.36b0 -opentelemetry-instrumentation-botocore==0.36b0 -opentelemetry-instrumentation-celery==0.36b0 -opentelemetry-instrumentation-confluent-kafka==0.36b0 -opentelemetry-instrumentation-dbapi==0.36b0 -opentelemetry-instrumentation-django==0.36b0 -opentelemetry-instrumentation-elasticsearch==0.36b0 -opentelemetry-instrumentation-falcon==0.36b0 -opentelemetry-instrumentation-fastapi==0.36b0 -opentelemetry-instrumentation-flask==0.36b0 -opentelemetry-instrumentation-grpc==0.36b0 -opentelemetry-instrumentation-httpx==0.36b0 -opentelemetry-instrumentation-jinja2==0.36b0 -opentelemetry-instrumentation-kafka-python==0.36b0 -opentelemetry-instrumentation-logging==0.36b0 -opentelemetry-instrumentation-mysql==0.36b0 -opentelemetry-instrumentation-pika==0.36b0 -opentelemetry-instrumentation-psycopg2==0.36b0 -opentelemetry-instrumentation-pymemcache==0.36b0 -opentelemetry-instrumentation-pymongo==0.36b0 -opentelemetry-instrumentation-pymysql==0.36b0 -opentelemetry-instrumentation-pyramid==0.36b0 -opentelemetry-instrumentation-redis==0.36b0 -opentelemetry-instrumentation-requests==0.36b0 -opentelemetry-instrumentation-sklearn==0.36b0 -opentelemetry-instrumentation-sqlalchemy==0.36b0 -opentelemetry-instrumentation-sqlite3==0.36b0 -opentelemetry-instrumentation-starlette==0.36b0 -opentelemetry-instrumentation-tornado==0.36b0 -opentelemetry-instrumentation-tortoiseorm==0.36b0 -opentelemetry-instrumentation-urllib==0.36b0 -opentelemetry-instrumentation-urllib3==0.36b0 -opentelemetry-instrumentation-wsgi==0.36b0 +opentelemetry-instrumentation-aio-pika==0.38b0 +opentelemetry-instrumentation-aiohttp-client==0.38b0 +opentelemetry-instrumentation-aiopg==0.38b0 +opentelemetry-instrumentation-asgi==0.38b0 +opentelemetry-instrumentation-asyncpg==0.38b0 +opentelemetry-instrumentation-boto==0.38b0 +opentelemetry-instrumentation-boto3sqs==0.38b0 +opentelemetry-instrumentation-botocore==0.38b0 +opentelemetry-instrumentation-celery==0.38b0 +opentelemetry-instrumentation-confluent-kafka==0.38b0 +opentelemetry-instrumentation-dbapi==0.38b0 +opentelemetry-instrumentation-django==0.38b0 +opentelemetry-instrumentation-elasticsearch==0.38b0 +opentelemetry-instrumentation-falcon==0.38b0 +opentelemetry-instrumentation-fastapi==0.38b0 +opentelemetry-instrumentation-flask==0.38b0 +opentelemetry-instrumentation-grpc==0.38b0 +opentelemetry-instrumentation-httpx==0.38b0 +opentelemetry-instrumentation-jinja2==0.38b0 +opentelemetry-instrumentation-kafka-python==0.38b0 +opentelemetry-instrumentation-logging==0.38b0 +opentelemetry-instrumentation-mysql==0.38b0 +opentelemetry-instrumentation-pika==0.38b0 +opentelemetry-instrumentation-psycopg2==0.38b0 +opentelemetry-instrumentation-pymemcache==0.38b0 +opentelemetry-instrumentation-pymongo==0.38b0 +opentelemetry-instrumentation-pymysql==0.38b0 +opentelemetry-instrumentation-pyramid==0.38b0 +opentelemetry-instrumentation-redis==0.38b0 +opentelemetry-instrumentation-remoulade==0.38b0 +opentelemetry-instrumentation-requests==0.38b0 +opentelemetry-instrumentation-sklearn==0.38b0 +opentelemetry-instrumentation-sqlalchemy==0.38b0 +opentelemetry-instrumentation-sqlite3==0.38b0 +opentelemetry-instrumentation-starlette==0.38b0 +opentelemetry-instrumentation-system-metrics==0.38b0 +opentelemetry-instrumentation-tornado==0.38b0 +opentelemetry-instrumentation-tortoiseorm==0.38b0 +opentelemetry-instrumentation-urllib==0.38b0 +opentelemetry-instrumentation-urllib3==0.38b0 +opentelemetry-instrumentation-wsgi==0.38b0 From 1ed268c48de2587422fea23b69b7f2f4eaf1ef65 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Thu, 13 Apr 2023 03:54:42 +0530 Subject: [PATCH 0823/1234] Prepare Release v0.75.0 (#1637) * Release v0.75.0 Signed-off-by: Vineeth Pothulapati * update supported versions matrix * Bump release PR to support python autoinst update --------- Signed-off-by: Vineeth Pothulapati --- .chloggen/add-featuregates.yaml | 0 CHANGELOG.md | 18 ++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...lemetry-operator.clusterserviceversion.yaml | 8 ++++---- versions.txt | 14 +++++++------- 6 files changed, 31 insertions(+), 13 deletions(-) mode change 100755 => 100644 .chloggen/add-featuregates.yaml diff --git a/.chloggen/add-featuregates.yaml b/.chloggen/add-featuregates.yaml old mode 100755 new mode 100644 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9521fad68..345a4a403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ Changes by Version +## 0.75.0 + +### 💡 Enhancements 💡 + +- `operator`: Add ability to use feature gates in the operator (#1619) +- `autoinstrumentation`: Add metrics exporter to Node.JS autoinstrumentation (#1627) +- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1626) +- `autoinstrumentation`: Bump python dependencies to latest versions (#1640) + +### Components + +* [OpenTelemetry Collector - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.75.0) +* [OpenTelemetry Contrib - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.75.0) +* [Java auto-instrumentation - 1.24.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.24.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.37.0) +* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) + ## 0.74.0 ### Components diff --git a/README.md b/README.md index 032c47aac..04430352c 100644 --- a/README.md +++ b/README.md @@ -426,6 +426,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.75.0 | v1.19 to v1.26 | v1 | | v0.74.0 | v1.19 to v1.26 | v1 | | v0.73.0 | v1.19 to v1.26 | v1 | | v0.72.0 | v1.19 to v1.26 | v1 | @@ -448,7 +449,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.54.0 | v1.19 to v1.24 | v1 | | v0.53.0 | v1.19 to v1.24 | v1 | | v0.52.0 | v1.19 to v1.23 | v1 | -| v0.51.0 | v1.19 to v1.23 | v1alpha2 | diff --git a/RELEASE.md b/RELEASE.md index 4afb301e9..d5d2a1bde 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.75.0 | @VineethReddy02 | | v0.76.0 | @frzifus | | v0.77.0 | @yuriolisa | | v0.78.0 | @jaronoff97 | | v0.79.0 | @pavolloffay | +| v0.80.0 | @VineethReddy02 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c08d6d7b9..c28a66a6d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-03-29T08:21:43Z" + createdAt: "2023-04-10T17:45:14Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.74.0 + name: opentelemetry-operator.v0.75.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.74.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.75.0 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.74.0 + version: 0.75.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 0b02047f1..6f0e28955 100644 --- a/versions.txt +++ b/versions.txt @@ -2,28 +2,28 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.74.0 +opentelemetry-collector=0.75.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.74.0 +operator=0.75.0 # Represents the current release of the Target Allocator. -targetallocator=0.74.0 +targetallocator=0.75.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.74.0 +operator-opamp-bridge=0.75.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.23.0 +autoinstrumentation-java=1.24.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.34.0 +autoinstrumentation-nodejs=0.37.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.36b0 +autoinstrumentation-python=0.38b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt From 20ea43a43bbe5ba4a512ffc7742a92d14cc3d7d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 13 Apr 2023 18:53:59 +0000 Subject: [PATCH 0824/1234] [target-allocator] fix updating scrape configs (#1620) * [target-allocator] fix updating scrape configs Only take scrape configs from the most recently applied config, and only save them if we've successfully updated. * [target-allocator] drop unnecessary job to scrape config map * [tatget-allocator] add discoverer benchmark --- ...targetallocator_update-scrape-configs.yaml | 16 +++++ cmd/otel-allocator/target/discovery.go | 9 ++- cmd/otel-allocator/target/discovery_test.go | 68 +++++++++++++++++-- cmd/otel-allocator/target/testdata/test.yaml | 3 + 4 files changed, 86 insertions(+), 10 deletions(-) create mode 100755 .chloggen/fix_targetallocator_update-scrape-configs.yaml diff --git a/.chloggen/fix_targetallocator_update-scrape-configs.yaml b/.chloggen/fix_targetallocator_update-scrape-configs.yaml new file mode 100755 index 000000000..7c4eb4718 --- /dev/null +++ b/.chloggen/fix_targetallocator_update-scrape-configs.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fix updating scrape configs + +# One or more tracking issues related to the change +issues: [1415] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go index 9b7639970..38d99b798 100644 --- a/cmd/otel-allocator/target/discovery.go +++ b/cmd/otel-allocator/target/discovery.go @@ -39,7 +39,6 @@ type Discoverer struct { manager *discovery.Manager close chan struct{} configsMap map[allocatorWatcher.EventSource]*config.Config - jobToScrapeConfig map[string]*config.ScrapeConfig hook discoveryHook scrapeConfigsHash uint64 scrapeConfigsUpdater scrapeConfigsUpdater @@ -59,7 +58,6 @@ func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHo manager: manager, close: make(chan struct{}), configsMap: make(map[allocatorWatcher.EventSource]*config.Config), - jobToScrapeConfig: make(map[string]*config.ScrapeConfig), hook: hook, scrapeConfigsUpdater: scrapeConfigsUpdater, } @@ -67,26 +65,27 @@ func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHo func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { m.configsMap[source] = cfg + jobToScrapeConfig := make(map[string]*config.ScrapeConfig) discoveryCfg := make(map[string]discovery.Configs) relabelCfg := make(map[string][]*relabel.Config) for _, value := range m.configsMap { for _, scrapeConfig := range value.ScrapeConfigs { - m.jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig + jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs relabelCfg[scrapeConfig.JobName] = scrapeConfig.RelabelConfigs } } - hash, err := hashstructure.Hash(m.jobToScrapeConfig, nil) + hash, err := hashstructure.Hash(jobToScrapeConfig, nil) if err != nil { return err } // If the hash has changed, updated stored hash and send the new config. // Otherwise skip updating scrape configs. if m.scrapeConfigsUpdater != nil && m.scrapeConfigsHash != hash { - err := m.scrapeConfigsUpdater.UpdateScrapeConfigResponse(m.jobToScrapeConfig) + err := m.scrapeConfigsUpdater.UpdateScrapeConfigResponse(jobToScrapeConfig) if err != nil { return err } diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index 6230c958a..de2f1070e 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -28,6 +28,7 @@ import ( "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ctrl "sigs.k8s.io/controller-runtime" "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" @@ -48,7 +49,7 @@ func TestDiscovery(t *testing.T) { args: args{ file: "./testdata/test.yaml", }, - want: []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "promfile.domain:1001", "promfile.domain:3000"}, + want: []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "prom.domain:8001", "promfile.domain:1001", "promfile.domain:3000"}, }, { name: "update", @@ -58,9 +59,10 @@ func TestDiscovery(t *testing.T) { want: []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"}, }, } + scu := &mockScrapeConfigUpdater{} ctx, cancelFunc := context.WithCancel(context.Background()) d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, nil) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) defer close(manager.close) defer cancelFunc() @@ -91,6 +93,13 @@ func TestDiscovery(t *testing.T) { sort.Strings(gotTargets) sort.Strings(tt.want) assert.Equal(t, tt.want, gotTargets) + + // check the updated scrape configs + expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} + for _, scrapeConfig := range cfg.Config.ScrapeConfigs { + expectedScrapeConfigs[scrapeConfig.JobName] = scrapeConfig + } + assert.Equal(t, expectedScrapeConfigs, scu.mockCfg) }) } } @@ -286,6 +295,7 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { } var ( lastValidHash uint64 + expectedConfig map[string]*promconfig.ScrapeConfig lastValidConfig map[string]*promconfig.ScrapeConfig ) @@ -298,20 +308,25 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { t.Run(tc.description, func(t *testing.T) { err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, tc.cfg) if !tc.expectErr { + expectedConfig = make(map[string]*promconfig.ScrapeConfig) + for _, value := range manager.configsMap { + for _, scrapeConfig := range value.ScrapeConfigs { + expectedConfig[scrapeConfig.JobName] = scrapeConfig + } + } assert.NoError(t, err) assert.NotZero(t, manager.scrapeConfigsHash) // Assert that scrape configs in manager are correctly // reflected in the scrape job updater. - assert.Equal(t, manager.jobToScrapeConfig, scu.mockCfg) + assert.Equal(t, expectedConfig, scu.mockCfg) lastValidHash = manager.scrapeConfigsHash - lastValidConfig = manager.jobToScrapeConfig + lastValidConfig = expectedConfig } else { // In case of error, assert that we retain the last // known valid config. assert.Error(t, err) assert.Equal(t, lastValidHash, manager.scrapeConfigsHash) - assert.Equal(t, lastValidConfig, manager.jobToScrapeConfig) assert.Equal(t, lastValidConfig, scu.mockCfg) } @@ -319,6 +334,49 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { } } +func BenchmarkApplyScrapeConfig(b *testing.B) { + numConfigs := 1000 + scrapeConfig := promconfig.ScrapeConfig{ + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + } + cfg := &promconfig.Config{ + ScrapeConfigs: make([]*promconfig.ScrapeConfig, numConfigs), + } + + for i := 0; i < numConfigs; i++ { + cfg.ScrapeConfigs[i] = &scrapeConfig + } + + scu := &mockScrapeConfigUpdater{} + ctx := context.Background() + d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg) + require.NoError(b, err) + } +} + var _ scrapeConfigsUpdater = &mockScrapeConfigUpdater{} // mockScrapeConfigUpdater is a mock implementation of the scrapeConfigsUpdater. diff --git a/cmd/otel-allocator/target/testdata/test.yaml b/cmd/otel-allocator/target/testdata/test.yaml index b6d1cf2f7..d38b0183a 100644 --- a/cmd/otel-allocator/target/testdata/test.yaml +++ b/cmd/otel-allocator/target/testdata/test.yaml @@ -12,3 +12,6 @@ config: - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] labels: my: label + - job_name: prometheus2 + static_configs: + - targets: ["prom.domain:8001"] From e5c1550d823f9d69765b4ba2870c7c41bd47507f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:06:20 -0400 Subject: [PATCH 0825/1234] Bump github.com/prometheus/client_golang in /cmd/otel-allocator (#1655) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 10 +++++----- cmd/otel-allocator/go.sum | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 4cd2db91e..9dc318bb0 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus-operator/prometheus-operator v0.63.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.15.0 github.com/prometheus/common v0.42.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 github.com/spf13/pflag v1.0.5 @@ -89,7 +89,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -145,7 +145,7 @@ require ( github.com/prometheus/alertmanager v0.25.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/cobra v1.6.1 // indirect @@ -167,7 +167,7 @@ require ( golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect + golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.3.0 // indirect @@ -177,7 +177,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect google.golang.org/grpc v1.52.1 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 7bcf23a82..8c008a0bc 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -315,8 +315,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -592,8 +593,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -614,8 +615,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/prometheus v0.38.0 h1:YSiJ5gDZmXnOntPRyHn1wb/6I1Frasj9dw57XowIqeA= github.com/prometheus/prometheus v0.38.0/go.mod h1:2zHO5FtRhM+iu995gwKIb99EXxjeZEuXpKUTIRq4YI0= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -908,8 +909,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1086,8 +1087,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 503904717be3c834837f2d145aff925fa793fcb0 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Mon, 17 Apr 2023 22:34:14 +0530 Subject: [PATCH 0826/1234] feat: Add lifecycle hooks and terminationGracePeriodSeconds support in collector spec (#1656) * support lifecycle hooks and terminationGracePeriodSeconds in collector spec * compares complete lifecycle object --- ...oks-and-terminationGracePeriodSeconds.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 6 + apis/v1alpha1/zz_generated.deepcopy.go | 10 + ...ntelemetry.io_opentelemetrycollectors.yaml | 194 ++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 194 ++++++++ docs/api.md | 432 ++++++++++++++++++ pkg/collector/container.go | 1 + pkg/collector/container_test.go | 32 ++ pkg/collector/deployment.go | 21 +- pkg/collector/deployment_test.go | 30 ++ 10 files changed, 926 insertions(+), 10 deletions(-) create mode 100755 .chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml diff --git a/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml b/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml new file mode 100755 index 000000000..7d7f08015 --- /dev/null +++ b/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "add support for `lifecycle` hooks and `terminationGracePeriodSeconds` in collector spec." + +# One or more tracking issues related to the change +issues: [1618] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 205b93122..457c6d700 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -173,6 +173,12 @@ type OpenTelemetryCollectorSpec struct { // If specified, indicates the pod's scheduling constraints // +optional Affinity *v1.Affinity `json:"affinity,omitempty"` + // Actions that the management system should take in response to container lifecycle events. Cannot be updated. + // +optional + Lifecycle *v1.Lifecycle `json:"lifecycle,omitempty"` + // Duration in seconds the pod needs to terminate gracefully upon probe failure. + // +optional + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9b0df017e..c99e7e94c 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -505,6 +505,16 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(v1.Affinity) (*in).DeepCopyInto(*out) } + if in.Lifecycle != nil { + in, out := &in.Lifecycle, &out.Lifecycle + *out = new(v1.Lifecycle) + (*in).DeepCopyInto(*out) + } + if in.TerminationGracePeriodSeconds != nil { + in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds + *out = new(int64) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 41fe73f82..cc75d5307 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1264,6 +1264,195 @@ spec: - route type: string type: object + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. The handler is not called if the container crashes or exits. + The Pod''s termination grace period countdown begins before + the PreStop hook is executed. Regardless of the outcome of the + handler, the container will eventually terminate within the + Pod''s termination grace period (unless delayed by finalizers). + Other management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" @@ -1821,6 +2010,11 @@ spec: will not automatically create a ServiceAccount for the TargetAllocator. type: string type: object + terminationGracePeriodSeconds: + description: Duration in seconds the pod needs to terminate gracefully + upon probe failure. + format: int64 + type: integer tolerations: description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index c6f32882a..fc27cdc58 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1262,6 +1262,195 @@ spec: - route type: string type: object + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. The handler is not called if the container crashes or exits. + The Pod''s termination grace period countdown begins before + the PreStop hook is executed. Regardless of the outcome of the + handler, the container will eventually terminate within the + Pod''s termination grace period (unless delayed by finalizers). + Other management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" @@ -1819,6 +2008,11 @@ spec: will not automatically create a ServiceAccount for the TargetAllocator. type: string type: object + terminationGracePeriodSeconds: + description: Duration in seconds the pod needs to terminate gracefully + upon probe failure. + format: int64 + type: integer tolerations: description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment diff --git a/docs/api.md b/docs/api.md index ec4c1d4f9..be1602b86 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2308,6 +2308,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Ingress is used to specify how OpenTelemetry Collector is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset.
false + + lifecycle + object + + Actions that the management system should take in response to container lifecycle events. Cannot be updated.
+ + false maxReplicas integer @@ -2407,6 +2414,15 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not.
false + + terminationGracePeriodSeconds + integer + + Duration in seconds the pod needs to terminate gracefully upon probe failure.
+
+ Format: int64
+ + false tolerations []object @@ -4505,6 +4521,422 @@ IngressTLS describes the transport layer security associated with an Ingress. +### OpenTelemetryCollector.spec.lifecycle +[↩ Parent](#opentelemetrycollectorspec) + + + +Actions that the management system should take in response to container lifecycle events. Cannot be updated. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
postStartobject + PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
preStopobject + PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.postStart +[↩ Parent](#opentelemetrycollectorspeclifecycle) + + + +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.postStart.exec +[↩ Parent](#opentelemetrycollectorspeclifecyclepoststart) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.postStart.httpGet +[↩ Parent](#opentelemetrycollectorspeclifecyclepoststart) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.postStart.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspeclifecyclepoststarthttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.lifecycle.postStart.tcpSocket +[↩ Parent](#opentelemetrycollectorspeclifecyclepoststart) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.preStop +[↩ Parent](#opentelemetrycollectorspeclifecycle) + + + +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.preStop.exec +[↩ Parent](#opentelemetrycollectorspeclifecycleprestop) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.preStop.httpGet +[↩ Parent](#opentelemetrycollectorspeclifecycleprestop) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.lifecycle.preStop.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspeclifecycleprestophttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.lifecycle.preStop.tcpSocket +[↩ Parent](#opentelemetrycollectorspeclifecycleprestop) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + ### OpenTelemetryCollector.spec.podSecurityContext [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 127578c26..f57cea7e1 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -138,6 +138,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Resources: otelcol.Spec.Resources, SecurityContext: otelcol.Spec.SecurityContext, LivenessProbe: livenessProbe, + Lifecycle: otelcol.Spec.Lifecycle, } } diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index c63169b85..84ef7a51c 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -458,3 +458,35 @@ service: assert.Equal(t, int32(13133), c.LivenessProbe.HTTPGet.Port.IntVal) assert.Equal(t, "", c.LivenessProbe.HTTPGet.Host) } + +func TestContainerLifecycle(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Lifecycle: &corev1.Lifecycle{ + PostStart: &corev1.LifecycleHandler{ + Exec: &corev1.ExecAction{Command: []string{"sh", "sleep 100"}}, + }, + PreStop: &corev1.LifecycleHandler{ + Exec: &corev1.ExecAction{Command: []string{"sh", "sleep 300"}}, + }, + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + expectedLifecycleHooks := corev1.Lifecycle{ + PostStart: &corev1.LifecycleHandler{ + Exec: &corev1.ExecAction{Command: []string{"sh", "sleep 100"}}, + }, + PreStop: &corev1.LifecycleHandler{ + Exec: &corev1.ExecAction{Command: []string{"sh", "sleep 300"}}, + }, + } + + // verify + assert.Equal(t, expectedLifecycleHooks, *c.Lifecycle) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 5df6b347e..4f3ed4fae 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -51,16 +51,17 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Annotations: podAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, - Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDNSPolicy(otelcol), - HostNetwork: otelcol.Spec.HostNetwork, - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - SecurityContext: otelcol.Spec.PodSecurityContext, - PriorityClassName: otelcol.Spec.PriorityClassName, - Affinity: otelcol.Spec.Affinity, + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, + Volumes: Volumes(cfg, otelcol), + DNSPolicy: getDNSPolicy(otelcol), + HostNetwork: otelcol.Spec.HostNetwork, + Tolerations: otelcol.Spec.Tolerations, + NodeSelector: otelcol.Spec.NodeSelector, + SecurityContext: otelcol.Spec.PodSecurityContext, + PriorityClassName: otelcol.Spec.PriorityClassName, + Affinity: otelcol.Spec.Affinity, + TerminationGracePeriodSeconds: otelcol.Spec.TerminationGracePeriodSeconds, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 601f22c59..70febf1c7 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -304,3 +304,33 @@ func TestDeploymentAffinity(t *testing.T) { assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } + +func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + d1 := Deployment(cfg, logger, otelcol1) + assert.Nil(t, d1.Spec.Template.Spec.TerminationGracePeriodSeconds) + + gracePeriodSec := int64(60) + + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-terminationGracePeriodSeconds", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TerminationGracePeriodSeconds: &gracePeriodSec, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol2) + assert.NotNil(t, d2.Spec.Template.Spec.TerminationGracePeriodSeconds) + assert.Equal(t, gracePeriodSec, *d2.Spec.Template.Spec.TerminationGracePeriodSeconds) +} From 923f9a208afddd51f66c2d54e8c852389bacad0d Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 20 Apr 2023 03:13:21 -0700 Subject: [PATCH 0827/1234] Update the javaagent version to 1.25.0 (#1654) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 53cc1a6f9..ad2191947 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.24.0 +1.25.0 From 536ad15742fe243f6b50291c419c1d38638ce34a Mon Sep 17 00:00:00 2001 From: Jacob Marble Date: Mon, 24 Apr 2023 13:29:42 -0700 Subject: [PATCH 0828/1234] chore: do not log error when receiver has no endpoint (#1666) * chore: do not log error when receiver has no endpoint Some receivers don't have an `endpoint` config value. No need to log a type error for these. * chore: integrate review feedback --- pkg/collector/parser/receiver.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index ef950c89b..a1823658b 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -115,11 +115,13 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in endpoint = getAddressFromConfig(logger, name, endpointKey, config) } - switch endpoint := endpoint.(type) { + switch e := endpoint.(type) { + case nil: + break case string: - port, err := portFromEndpoint(endpoint) + port, err := portFromEndpoint(e) if err != nil { - logger.WithValues(endpointKey, endpoint).Info("couldn't parse the endpoint's port") + logger.WithValues(endpointKey, e).Error(err, "couldn't parse the endpoint's port") return nil } @@ -128,7 +130,7 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in Port: port, } default: - logger.Info("receiver's endpoint isn't a string") + logger.WithValues(endpointKey, endpoint).Error(fmt.Errorf("unrecognized type %T", endpoint), "receiver's endpoint isn't a string") } return nil From 5b1d32c2071ec87b3d7a6ff62c79073724ebf6e5 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 25 Apr 2023 05:15:44 -0600 Subject: [PATCH 0829/1234] [pkg/instrumentation] Add feature gate for dotnet instrumentation (#1629) * Add feature gate for dotnet instrumentation * changelog * Apply feedback * Move gate into featuregate pkg * Add featuregates to info log * Add README entry for the new gate * Write event if feature gate is disabled * Add back error log --- .chloggen/add-featuregate-for-dotnet.yaml | 16 ++++ README.md | 15 +++ main.go | 4 +- pkg/featuregate/featuregate.go | 11 ++- pkg/instrumentation/podmutator.go | 13 ++- pkg/instrumentation/podmutator_test.go | 107 ++++++++++++++++++++-- pkg/instrumentation/upgrade/upgrade.go | 16 +++- 7 files changed, 166 insertions(+), 16 deletions(-) create mode 100755 .chloggen/add-featuregate-for-dotnet.yaml diff --git a/.chloggen/add-featuregate-for-dotnet.yaml b/.chloggen/add-featuregate-for-dotnet.yaml new file mode 100755 index 000000000..a2a2bdb57 --- /dev/null +++ b/.chloggen/add-featuregate-for-dotnet.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: pkg/instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add dotnet instrumentation capability behind a feature gate which is enabled by default. + +# One or more tracking issues related to the change +issues: [1629] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 04430352c..397a58ab7 100644 --- a/README.md +++ b/README.md @@ -334,6 +334,21 @@ You can configure the OpenTelemetry SDK for applications which can't currently b instrumentation.opentelemetry.io/inject-sdk: "true" ``` +#### Controlling Instrumentation Capabilities + +The operator allows specifying, via the feature gates, which languages the Instrumentation resource may instrument. +These feature gates must be passed to the operator via the `--feature-gates` flag. +The flag allows for a comma-delimited list of feature gate identifiers. +Prefix a gate with '-' to disable support for the corresponding language. +Prefixing a gate with '+' or no prefix will enable support for the corresponding language. +If a language is enabled by default its gate only needs to be supplied when disabling the gate. + +| Language | Gate | Default Value | +|----------|---------------------------------------|-----------------| +| .NET | `operator.autoinstrumentation.dotnet` | enabled | + +Language not specified in the table are always supported and cannot be disabled. + ### Target Allocator The OpenTelemetry Operator comes with an optional component, the Target Allocator (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: diff --git a/main.go b/main.go index ea09f3807..7245737a2 100644 --- a/main.go +++ b/main.go @@ -130,6 +130,7 @@ func main() { "auto-instrumentation-nodejs", autoInstrumentationNodeJS, "auto-instrumentation-python", autoInstrumentationPython, "auto-instrumentation-dotnet", autoInstrumentationDotNet, + "feature-gates", flagset.Lookup(featuregate.FeatureGatesFlag).Value.String(), "build-date", v.BuildDate, "go-version", v.Go, "go-arch", runtime.GOARCH, @@ -242,7 +243,7 @@ func main() { Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), mgr.GetClient(), []webhookhandler.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), - instrumentation.NewMutator(logger, mgr.GetClient()), + instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("opentelemetry-operator")), }), }) } else { @@ -297,6 +298,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), Client: mgr.GetClient(), + Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), } return u.ManagedInstances(c) })) diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index da877c882..9324faa9b 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -21,13 +21,20 @@ import ( ) const ( - featureGatesFlag = "feature-gates" + FeatureGatesFlag = "feature-gates" +) + +var ( + EnableDotnetAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.dotnet", + featuregate.StageBeta, + featuregate.WithRegisterDescription("controls whether the operator supports .NET auto-instrumentation")) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. func Flags(reg *featuregate.Registry) *flag.FlagSet { flagSet := new(flag.FlagSet) - flagSet.Var(featuregate.NewFlag(reg), featureGatesFlag, + flagSet.Var(featuregate.NewFlag(reg), FeatureGatesFlag, "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature.") return flagSet } diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index c18c66132..f3d318443 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -22,10 +22,12 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) var ( @@ -37,6 +39,7 @@ type instPodMutator struct { Client client.Client sdkInjector *sdkInjector Logger logr.Logger + Recorder record.EventRecorder } type languageInstrumentations struct { @@ -49,7 +52,7 @@ type languageInstrumentations struct { var _ webhookhandler.PodMutator = (*instPodMutator)(nil) -func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { +func NewMutator(logger logr.Logger, client client.Client, recorder record.EventRecorder) *instPodMutator { return &instPodMutator{ Logger: logger, Client: client, @@ -57,6 +60,7 @@ func NewMutator(logger logr.Logger, client client.Client) *instPodMutator { logger: logger, client: client, }, + Recorder: recorder, } } @@ -102,7 +106,12 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.DotNet = inst + if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() { + insts.DotNet = inst + } else { + logger.Error(nil, "support for .NET auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for .NET auto instrumentation is not enabled") + } if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectSdk); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 64a6e1fb0..f3816488a 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -22,23 +22,27 @@ import ( "github.com/go-logr/logr" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + colfeaturegate "go.opentelemetry.io/collector/featuregate" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) func TestMutatePod(t *testing.T) { - mutator := NewMutator(logr.Discard(), k8sClient) + mutator := NewMutator(logr.Discard(), k8sClient, record.NewFakeRecorder(1)) require.NotNil(t, mutator) tests := []struct { - name string - err string - pod corev1.Pod - expected corev1.Pod - inst v1alpha1.Instrumentation - ns corev1.Namespace + name string + err string + pod corev1.Pod + expected corev1.Pod + inst v1alpha1.Instrumentation + ns corev1.Namespace + setFeatureGates func(t *testing.T) }{ { name: "javaagent injection, true", @@ -746,6 +750,91 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "dotnet injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "dotnet-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "dotnet-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "missing annotation", ns: corev1.Namespace{ @@ -877,6 +966,10 @@ func TestMutatePod(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + if test.setFeatureGates != nil { + test.setFeatureGates(t) + } + err := k8sClient.Create(context.Background(), &test.ns) require.NoError(t, err) defer func() { diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index b42d9cb90..a0a041f97 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -20,14 +20,17 @@ import ( "reflect" "github.com/go-logr/logr" + "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) type InstrumentationUpgrade struct { Client client.Client Logger logr.Logger + Recorder record.EventRecorder DefaultAutoInstJava string DefaultAutoInstNodeJS string DefaultAutoInstPython string @@ -95,10 +98,15 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru } autoInstDotnet := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] if autoInstDotnet != "" { - // upgrade the image only if the image matches the annotation - if inst.Spec.DotNet.Image == autoInstDotnet { - inst.Spec.DotNet.Image = u.DefaultAutoInstDotNet - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] = u.DefaultAutoInstDotNet + if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.DotNet.Image == autoInstDotnet { + inst.Spec.DotNet.Image = u.DefaultAutoInstDotNet + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] = u.DefaultAutoInstDotNet + } + } else { + u.Logger.Error(nil, "support for .NET auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for .NET auto instrumentation is not enabled") } } return inst From 1563c2db92ceb0f786edbad52666978e519718df Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 25 Apr 2023 16:17:13 +0200 Subject: [PATCH 0830/1234] [chore] Ensure the autoscaling version is updated in the copies of autodetect (#1668) --- internal/config/main.go | 45 ++++++++++++++++++++++++++++++------ internal/config/main_test.go | 10 ++++++++ internal/config/options.go | 3 ++- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/internal/config/main.go b/internal/config/main.go index 44468decd..1d529379f 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -49,7 +49,7 @@ type Config struct { labelsFilter []string openshiftRoutes openshiftRoutesStore autoDetectFrequency time.Duration - autoscalingVersion autodetect.AutoscalingVersion + hpaVersion hpaVersionStore } // New constructs a new configuration based on the given options. @@ -61,8 +61,8 @@ func New(opts ...Option) Config { targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, logger: logf.Log.WithName("config"), openshiftRoutes: newOpenShiftRoutesWrapper(), + hpaVersion: newHPAVersionWrapper(), version: version.Get(), - autoscalingVersion: autodetect.DefaultAutoscalingVersion, onOpenShiftRoutesChange: newOnChange(), } for _, opt := range opts { @@ -79,13 +79,13 @@ func New(opts ...Option) Config { targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, logger: o.logger, openshiftRoutes: o.openshiftRoutes, + hpaVersion: o.hpaVersion, onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, labelsFilter: o.labelsFilter, - autoscalingVersion: o.autoscalingVersion, } } @@ -126,12 +126,14 @@ func (c *Config) AutoDetect() error { } } - hpaVersion, err := c.autoDetect.HPAVersion() + hpaV, err := c.autoDetect.HPAVersion() if err != nil { return err } - c.autoscalingVersion = hpaVersion - c.logger.V(2).Info("autoscaling version detected", "autoscaling-version", c.autoscalingVersion.String()) + if c.hpaVersion.Get() != hpaV { + c.logger.V(1).Info("HPA version detected", "version", hpaV) + c.hpaVersion.Set(hpaV) + } return nil } @@ -163,7 +165,7 @@ func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability { // AutoscalingVersion represents the preferred version of autoscaling. func (c *Config) AutoscalingVersion() autodetect.AutoscalingVersion { - return c.autoscalingVersion + return c.hpaVersion.Get() } // AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. @@ -197,6 +199,35 @@ func (c *Config) RegisterOpenShiftRoutesChangeCallback(f func() error) { c.onOpenShiftRoutesChange.Register(f) } +type hpaVersionStore interface { + Set(hpaV autodetect.AutoscalingVersion) + Get() autodetect.AutoscalingVersion +} + +func newHPAVersionWrapper() hpaVersionStore { + return &hpaVersionWrapper{ + current: autodetect.AutoscalingVersionUnknown, + } +} + +type hpaVersionWrapper struct { + mu sync.Mutex + current autodetect.AutoscalingVersion +} + +func (p *hpaVersionWrapper) Set(hpaV autodetect.AutoscalingVersion) { + p.mu.Lock() + p.current = hpaV + p.mu.Unlock() +} + +func (p *hpaVersionWrapper) Get() autodetect.AutoscalingVersion { + p.mu.Lock() + hpaV := p.current + p.mu.Unlock() + return hpaV +} + type openshiftRoutesStore interface { Set(ora autodetect.OpenShiftRoutesAvailability) Get() autodetect.OpenShiftRoutesAvailability diff --git a/internal/config/main_test.go b/internal/config/main_test.go index bca0fdb75..f08dc2626 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -38,6 +38,7 @@ func TestNewConfig(t *testing.T) { assert.Equal(t, "some-image", cfg.CollectorImage()) assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) assert.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) + assert.Equal(t, autodetect.AutoscalingVersionUnknown, cfg.AutoscalingVersion()) } func TestOnPlatformChangeCallback(t *testing.T) { @@ -77,6 +78,10 @@ func TestAutoDetectInBackground(t *testing.T) { wg.Done() return autodetect.OpenShiftRoutesNotAvailable, nil }, + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + wg.Done() + return autodetect.AutoscalingVersionV2, nil + }, } cfg := config.New( config.WithAutoDetect(mock), @@ -85,6 +90,7 @@ func TestAutoDetectInBackground(t *testing.T) { // sanity check require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) + require.Equal(t, autodetect.AutoscalingVersionUnknown, cfg.AutoscalingVersion()) // test err := cfg.StartAutoDetect() @@ -98,9 +104,13 @@ var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) + HPAVersionFunc func() (autodetect.AutoscalingVersion, error) } func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { + if m.HPAVersionFunc != nil { + return m.HPAVersionFunc() + } return autodetect.DefaultAutoscalingVersion, nil } diff --git a/internal/config/options.go b/internal/config/options.go index fecb49bb0..f86cdeb71 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -44,8 +44,8 @@ type options struct { onOpenShiftRoutesChange changeHandler labelsFilter []string openshiftRoutes openshiftRoutesStore + hpaVersion hpaVersionStore autoDetectFrequency time.Duration - autoscalingVersion autodetect.AutoscalingVersion } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -88,6 +88,7 @@ func WithLogger(logger logr.Logger) Option { o.logger = logger } } + func WithOnOpenShiftRoutesChangeCallback(f func() error) Option { return func(o *options) { if o.onOpenShiftRoutesChange == nil { From fda34ec521353a1f71378a7e036cb82cf8d3c3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 25 Apr 2023 16:55:38 +0200 Subject: [PATCH 0831/1234] [chore] Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 - part 1/2 (#1673) --- autoinstrumentation/dotnet/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index a918a2aa1..faef31a43 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.6.0 +0.7.0 From e0045e3a85f3a4bda5bb380f2c00326b57cd76ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 26 Apr 2023 13:58:30 +0200 Subject: [PATCH 0832/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 - part 2/2 (#1674) --- .chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml | 16 ++++++++++++++++ versions.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml diff --git a/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml b/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml new file mode 100644 index 000000000..41d81349b --- /dev/null +++ b/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 + +# One or more tracking issues related to the change +issues: [1672] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/versions.txt b/versions.txt index 6f0e28955..045327830 100644 --- a/versions.txt +++ b/versions.txt @@ -27,7 +27,7 @@ autoinstrumentation-python=0.38b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.6.0 +autoinstrumentation-dotnet=0.7.0 # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From eab056a3a384193965674c04bb57476a46911460 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:13:37 -0400 Subject: [PATCH 0833/1234] Bump github.com/prometheus-operator/prometheus-operator/pkg/client (#1677) Bumps [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) from 0.64.0 to 0.64.1. - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.64.0...v0.64.1) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 9dc318bb0..50fda0679 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -14,8 +14,8 @@ require ( github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.63.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 github.com/prometheus/client_golang v1.15.0 github.com/prometheus/common v0.42.0 github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 8c008a0bc..084402798 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -581,10 +581,10 @@ github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTz github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= github.com/prometheus-operator/prometheus-operator v0.63.0 h1:LsOFPNzcOKirmM3xHEextfj5yaJyoWL4l42hbhvBSN8= github.com/prometheus-operator/prometheus-operator v0.63.0/go.mod h1:vaMQs+VjHx0y1keJllae08t8cLidN4Zor8gXAGpsZjo= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0 h1:bqFOzWYCuSZEcuFx/ez8DFW+fqGiUEATrgezynCjpP4= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.0/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0 h1:bMvSvfmfL9NAuWnUyZoFSyb0jzzcTI3LCMs5vVnBfZ4= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.0/go.mod h1:J51EiS4fKYZkSHLWo1t8Ad0iEw8RhhC6LLvYarM/+30= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 h1:bvntWler8vOjDJtxBwGDakGNC6srSZmgawGM9Jf7HC8= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 h1:osAjfXA8xRsHY6pp8Me9xcmoRPYT7RnJcAbUtfxVy9I= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1/go.mod h1:bpL5voXLr7djhPRHpY7k269A5HXlgLFNWEV1wB9/Zi0= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= From a3ff19ffc92ca684cff29b2743cc6cb0489bed83 Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:48:28 +0200 Subject: [PATCH 0834/1234] chore(nodejs): update dependencies (#1681) * chore(nodejs): update dependencies * feat(changelog): add changelog * feat(changelog): add issue --- .chloggen/1681-update-nodejs-deps.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 .chloggen/1681-update-nodejs-deps.yaml diff --git a/.chloggen/1681-update-nodejs-deps.yaml b/.chloggen/1681-update-nodejs-deps.yaml new file mode 100644 index 000000000..e27d6df18 --- /dev/null +++ b/.chloggen/1681-update-nodejs-deps.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump nodejs dependencies to latest versions + +# One or more tracking issues related to the change +issues: [1682] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 0e848572a..bf4adf903 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,15 +15,15 @@ }, "dependencies": { "@opentelemetry/api": "1.4.1", - "@opentelemetry/auto-instrumentations-node": "0.36.4", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.37.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.37.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.27.4", - "@opentelemetry/resource-detector-aws": "1.2.2", - "@opentelemetry/resource-detector-container": "0.2.2", - "@opentelemetry/resource-detector-gcp": "0.28.0", - "@opentelemetry/resources": "1.11.0", - "@opentelemetry/sdk-metrics": "1.11.0", - "@opentelemetry/sdk-node": "0.37.0" + "@opentelemetry/auto-instrumentations-node": "0.36.6", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.38.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.38.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.5", + "@opentelemetry/resource-detector-aws": "1.2.3", + "@opentelemetry/resource-detector-container": "0.2.3", + "@opentelemetry/resource-detector-gcp": "0.28.1", + "@opentelemetry/resources": "1.12.0", + "@opentelemetry/sdk-metrics": "1.12.0", + "@opentelemetry/sdk-node": "0.38.0" } } From 6aa597790db904c78dbdb0a6afb132921814b9f9 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 27 Apr 2023 08:49:08 -0600 Subject: [PATCH 0835/1234] Prevent event and log when nil (#1678) --- pkg/instrumentation/podmutator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index f3d318443..0773153b8 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -106,7 +106,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() { + if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() || inst == nil { insts.DotNet = inst } else { logger.Error(nil, "support for .NET auto instrumentation is not enabled") From 6825b81441070908a467dc8704d0f3db1af94c6d Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 28 Apr 2023 08:31:44 -0700 Subject: [PATCH 0836/1234] Update the javaagent version to 1.25.1 (#1685) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index ad2191947..d905a6d1d 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.25.0 +1.25.1 From 6b016a7b6397f36a9e35915f2c0ce10e3e7e0c89 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Mon, 1 May 2023 12:01:36 -0600 Subject: [PATCH 0837/1234] [pkg/instrumentation] Add featuregate to python instrumentation (#1696) * Add featuregate for python instrumentation * Add changelog --- .chloggen/python-featuregate.yaml | 16 +++++ README.md | 3 +- pkg/featuregate/featuregate.go | 4 ++ pkg/instrumentation/podmutator.go | 7 +- pkg/instrumentation/podmutator_test.go | 95 +++++++++++++++++++++++++- pkg/instrumentation/upgrade/upgrade.go | 13 ++-- 6 files changed, 131 insertions(+), 7 deletions(-) create mode 100755 .chloggen/python-featuregate.yaml diff --git a/.chloggen/python-featuregate.yaml b/.chloggen/python-featuregate.yaml new file mode 100755 index 000000000..8b01d1fa7 --- /dev/null +++ b/.chloggen/python-featuregate.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: pkg/instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add python instrumentation capability behind a feature gate which is enabled by default. + +# One or more tracking issues related to the change +issues: [1696] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 397a58ab7..80220e2e9 100644 --- a/README.md +++ b/README.md @@ -345,7 +345,8 @@ If a language is enabled by default its gate only needs to be supplied when disa | Language | Gate | Default Value | |----------|---------------------------------------|-----------------| -| .NET | `operator.autoinstrumentation.dotnet` | enabled | +| Python | `operator.autoinstrumentation.python` | enabled | +| DotNet | `operator.autoinstrumentation.dotnet` | enabled | Language not specified in the table are always supported and cannot be disabled. diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 9324faa9b..c985724e8 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -29,6 +29,10 @@ var ( "operator.autoinstrumentation.dotnet", featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator supports .NET auto-instrumentation")) + EnablePythonAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.python", + featuregate.StageBeta, + featuregate.WithRegisterDescription("controls whether the operator supports Python auto-instrumentation")) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 0773153b8..33400b2a5 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -99,7 +99,12 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.Python = inst + if featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.Python = inst + } else { + logger.Error(nil, "support for Python auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Python auto instrumentation is not enabled") + } if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectDotNet); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index f3816488a..0444a297a 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -32,7 +32,7 @@ import ( ) func TestMutatePod(t *testing.T) { - mutator := NewMutator(logr.Discard(), k8sClient, record.NewFakeRecorder(1)) + mutator := NewMutator(logr.Discard(), k8sClient, record.NewFakeRecorder(100)) require.NotNil(t, mutator) tests := []struct { @@ -569,6 +569,99 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "python injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "python-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "python-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4318", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "dotnet injection, true", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index a0a041f97..f97b50ffe 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -90,10 +90,15 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru } autoInstPython := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] if autoInstPython != "" { - // upgrade the image only if the image matches the annotation - if inst.Spec.Python.Image == autoInstPython { - inst.Spec.Python.Image = u.DefaultAutoInstPython - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] = u.DefaultAutoInstPython + if featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.Python.Image == autoInstPython { + inst.Spec.Python.Image = u.DefaultAutoInstPython + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] = u.DefaultAutoInstPython + } + } else { + u.Logger.Error(nil, "support for Python auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Python auto instrumentation is not enabled") } } autoInstDotnet := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] From aebec0258a1f72aaa96a6c10480e44eeeaeef6ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 14:02:40 -0400 Subject: [PATCH 0838/1234] Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 in /cmd/otel-allocator (#1691) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.1 to 2.100.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 50fda0679..8a65c9dee 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -25,7 +25,7 @@ require ( k8s.io/api v0.26.3 k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 - k8s.io/klog/v2 v2.90.1 + k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.14.6 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 084402798..df23075c0 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1134,8 +1134,8 @@ k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= From 1048b84c43f7de177fd12a7d038a5e754cf86289 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 14:02:57 -0400 Subject: [PATCH 0839/1234] Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 in /cmd/operator-opamp-bridge (#1694) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.1 to 2.100.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 2a452faca..accb3c4e0 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -20,7 +20,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.26.3 k8s.io/client-go v0.26.3 - k8s.io/klog/v2 v2.90.1 + k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.14.6 ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 0df4aa6a2..cd1736efa 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -687,8 +687,8 @@ k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= From d91958327d2d2c34a711ee2a31ff405a3e1597b6 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Mon, 1 May 2023 13:43:45 -0600 Subject: [PATCH 0840/1234] [pkg/instrumentation] Add featuregate to java instrumentation (#1695) * Add featuregate to java instrumentation * Add changelog --- .chloggen/java-featuregate.yaml | 16 +++++ README.md | 1 + pkg/featuregate/featuregate.go | 4 ++ pkg/instrumentation/podmutator.go | 7 +- pkg/instrumentation/podmutator_test.go | 96 ++++++++++++++++++++++++++ pkg/instrumentation/upgrade/upgrade.go | 13 ++-- 6 files changed, 132 insertions(+), 5 deletions(-) create mode 100755 .chloggen/java-featuregate.yaml diff --git a/.chloggen/java-featuregate.yaml b/.chloggen/java-featuregate.yaml new file mode 100755 index 000000000..17e74fd11 --- /dev/null +++ b/.chloggen/java-featuregate.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: pkg/instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add java instrumentation capability behind a feature gate which is enabled by default. + +# One or more tracking issues related to the change +issues: [1695] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 80220e2e9..35842343f 100644 --- a/README.md +++ b/README.md @@ -345,6 +345,7 @@ If a language is enabled by default its gate only needs to be supplied when disa | Language | Gate | Default Value | |----------|---------------------------------------|-----------------| +| Java | `operator.autoinstrumentation.java` | enabled | | Python | `operator.autoinstrumentation.python` | enabled | | DotNet | `operator.autoinstrumentation.dotnet` | enabled | diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index c985724e8..4f9f8a904 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -33,6 +33,10 @@ var ( "operator.autoinstrumentation.python", featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator supports Python auto-instrumentation")) + EnableJavaAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.java", + featuregate.StageBeta, + featuregate.WithRegisterDescription("controls whether the operator supports Java auto-instrumentation")) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 33400b2a5..7b6615bbf 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -85,7 +85,12 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.Java = inst + if featuregate.EnableJavaAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.Java = inst + } else { + logger.Error(nil, "support for Java auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Java auto instrumentation is not enabled") + } if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectNodeJS); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 0444a297a..1ebbd954b 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -223,6 +223,102 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "javaagent injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "javaagent-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "javaagent-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.Java{ + Env: []corev1.EnvVar{ + { + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableJavaAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableJavaAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableJavaAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "nodejs injection, true", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index f97b50ffe..b54e2f1ee 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -74,10 +74,15 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) v1alpha1.Instrumentation { autoInstJava := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] if autoInstJava != "" { - // upgrade the image only if the image matches the annotation - if inst.Spec.Java.Image == autoInstJava { - inst.Spec.Java.Image = u.DefaultAutoInstJava - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstJava + if featuregate.EnableJavaAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.Java.Image == autoInstJava { + inst.Spec.Java.Image = u.DefaultAutoInstJava + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstJava + } + } else { + u.Logger.Error(nil, "support for Java auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Java auto instrumentation is not enabled") } } autoInstNodeJS := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] From f5a73c2611832e0859bd09017db29932b4e5878f Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 5 May 2023 00:43:47 -0400 Subject: [PATCH 0841/1234] Bump prometheus version (#1702) --- go.mod | 144 ++++++++++++++++++++++----------------- go.sum | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 291 insertions(+), 61 deletions(-) diff --git a/go.mod b/go.mod index 753038307..b9f836283 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible - github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 + github.com/prometheus/prometheus v0.43.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 go.opentelemetry.io/collector/featuregate v0.75.0 @@ -25,71 +25,86 @@ require ( ) require ( - cloud.google.com/go v0.99.0 // indirect - github.com/Azure/azure-sdk-for-go v55.2.0+incompatible // indirect + cloud.google.com/go v0.110.0 // indirect + cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.27 // indirect + github.com/Azure/go-autorest/autorest v0.11.28 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect - github.com/armon/go-metrics v0.3.3 // indirect - github.com/aws/aws-sdk-go v1.38.60 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/aws/aws-sdk-go v1.44.217 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/digitalocean/godo v1.62.0 // indirect + github.com/digitalocean/godo v1.97.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.24+incompatible // indirect + github.com/docker/docker v23.0.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // indirect + github.com/envoyproxy/go-control-plane v0.11.0 // indirect + github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.14.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-kit/log v0.2.0 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.15 // indirect - github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect - github.com/go-zookeeper/zk v1.0.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-resty/resty/v2 v2.7.0 // indirect + github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/go-querystring v1.0.0 // indirect - github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.1.1 // indirect - github.com/gophercloud/gophercloud v0.18.0 // indirect - github.com/hashicorp/consul/api v1.8.1 // indirect - github.com/hashicorp/go-cleanhttp v0.5.1 // indirect - github.com/hashicorp/go-hclog v0.12.2 // indirect - github.com/hashicorp/go-immutable-radix v1.2.0 // indirect + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.7.0 // indirect + github.com/gophercloud/gophercloud v1.2.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect + github.com/hashicorp/consul/api v1.20.0 // indirect + github.com/hashicorp/cronexpr v1.1.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/serf v0.9.5 // indirect - github.com/hetznercloud/hcloud-go v1.26.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/hashicorp/golang-lru v0.6.0 // indirect + github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b // indirect + github.com/hashicorp/serf v0.10.1 // indirect + github.com/hetznercloud/hcloud-go v1.41.0 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/linode/linodego v0.28.5 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect + github.com/linode/linodego v1.14.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.42 // indirect + github.com/miekg/dns v1.1.51 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -97,40 +112,47 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/ovh/go-ovh v1.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.6.0 // indirect - go.opencensus.io v0.23.0 // indirect + github.com/vultr/govultr/v2 v2.17.2 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/trace v1.14.0 // indirect - go.uber.org/atomic v1.8.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect + golang.org/x/mod v0.9.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/sys v0.6.0 // indirect + golang.org/x/term v0.6.0 // indirect + golang.org/x/text v0.8.0 // indirect golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.61.0 // indirect + google.golang.org/api v0.111.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.49.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect + google.golang.org/grpc v1.53.0 // indirect + google.golang.org/protobuf v1.29.0 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.80.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d // indirect + k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 2a816845f..a3cd636a2 100644 --- a/go.sum +++ b/go.sum @@ -29,6 +29,8 @@ cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -37,6 +39,10 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -53,6 +59,8 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= +github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -65,6 +73,8 @@ github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqe github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= +github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= +github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= @@ -115,6 +125,8 @@ github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= @@ -136,6 +148,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -148,6 +162,8 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= @@ -161,8 +177,11 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.44.217 h1:FcWC56MRl+k756aH3qeMQTylSdeJ58WN0iFz3fkyRz0= +github.com/aws/aws-sdk-go v1.44.217/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -176,6 +195,7 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -188,6 +208,8 @@ github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tj github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -203,6 +225,8 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= +github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -226,6 +250,8 @@ github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8 github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= +github.com/digitalocean/godo v1.97.0 h1:p9w1yCcWMZcxFSLPToNGXA96WfUVLXqoHti6GzVomL4= +github.com/digitalocean/godo v1.97.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= @@ -235,11 +261,15 @@ github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= +github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -254,6 +284,8 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -263,7 +295,11 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -274,6 +310,9 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= @@ -298,11 +337,15 @@ github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgO github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -337,6 +380,8 @@ github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDB github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= @@ -345,6 +390,8 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= @@ -397,6 +444,8 @@ github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/ github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= @@ -408,12 +457,16 @@ github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= +github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -452,6 +505,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= @@ -490,6 +545,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -499,6 +556,8 @@ github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= +github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -515,9 +574,13 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -543,11 +606,17 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= @@ -555,12 +624,18 @@ github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEo github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= +github.com/gophercloud/gophercloud v1.2.0 h1:1oXyj4g54KBg/kFtCdMM6jtxSzeIyg8wv4z1HoGPp1E= +github.com/gophercloud/gophercloud v1.2.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= +github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -571,27 +646,44 @@ github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoP github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= +github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= +github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= +github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.12.2 h1:F1fdYblUEsxKiailtkhCCG2g4bipEgaHiDc8vffNpD4= github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.2.0 h1:l6UW37iCXwZkZoAbEYnptSHVE/cQ5bOTPYG5W3vf9+8= github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= +github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -608,21 +700,31 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.2.3 h1:BwZa5IjREr75J0am7nblP+X5i95Rmp8EEbMI5vkUWdA= github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b h1:EkuSTU8c/63q4LMayj8ilgg/4I5PXDFVcnqKfs9qcwI= +github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b/go.mod h1:bKUb1ytds5KwUioHdvdq9jmrDqCThv95si0Ub7iNeBg= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hetznercloud/hcloud-go v1.26.2 h1:fI8BXAGJI4EFeCDd2a/I4EhqyK32cDdxGeWfYMGUi50= github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= +github.com/hetznercloud/hcloud-go v1.41.0 h1:KJGFRRc68QiVu4PrEP5BmCQVveCP2CM26UGQUKGpIUs= +github.com/hetznercloud/hcloud-go v1.41.0/go.mod h1:NaHg47L6C77mngZhwBG652dTAztYrsZ2/iITJKhQkHA= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= @@ -632,6 +734,8 @@ github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -651,6 +755,8 @@ github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bS github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= +github.com/ionos-cloud/sdk-go/v6 v6.1.4 h1:BJHhFA8Q1SZC7VOXqKKr2BV2ysQ2/4hlk1e4hZte7GY= +github.com/ionos-cloud/sdk-go/v6 v6.1.4/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -693,12 +799,15 @@ github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -711,6 +820,8 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= +github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= +github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -721,6 +832,8 @@ github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -729,6 +842,8 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -737,6 +852,9 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -748,8 +866,11 @@ github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3N github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= +github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= @@ -836,6 +957,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/ovh/go-ovh v1.3.0 h1:mvZaddk4E4kLcXhzb+cxBsMPYp2pHqiQpWYkInsuZPQ= +github.com/ovh/go-ovh v1.3.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -898,6 +1021,10 @@ github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -910,7 +1037,11 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= +github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= +github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -931,6 +1062,8 @@ github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0 github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= @@ -981,7 +1114,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -998,6 +1133,8 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= +github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= +github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1005,6 +1142,9 @@ github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= @@ -1014,6 +1154,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -1036,6 +1177,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= @@ -1050,6 +1193,8 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1097,8 +1242,11 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1112,6 +1260,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1138,6 +1288,10 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1193,15 +1347,23 @@ golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1220,6 +1382,8 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1233,6 +1397,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1323,15 +1489,28 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1342,8 +1521,11 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1433,6 +1615,10 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1477,6 +1663,8 @@ google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.111.0 h1:bwKi+z2BsdwYFRKrqwutM+axAlYLz83gt5pDSXCJT+0= +google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1550,8 +1738,11 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1587,6 +1778,8 @@ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1604,12 +1797,15 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0= +google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1618,6 +1814,9 @@ gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1 gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1636,6 +1835,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= @@ -1675,10 +1875,14 @@ k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU= +k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/kubectl v0.26.3 h1:bZ5SgFyeEXw6XTc1Qji0iNdtqAC76lmeIIQULg2wNXM= k8s.io/kubectl v0.26.3/go.mod h1:02+gv7Qn4dupzN3fi/9OvqqdW+uG/4Zi56vc4Zmsp1g= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -1686,6 +1890,8 @@ k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= +k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1694,6 +1900,8 @@ sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92 sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= From a74dc8eda809f50435a34edf0e9d5c489f8fd531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 5 May 2023 19:17:46 +0200 Subject: [PATCH 0842/1234] Add feature flag for target allocator config addition (#1688) * add feature flag for allocator config rewrite * clear Prometheus scrape configs if allocator rewrite enabled * add changelog entry * rename flag to operator.collector.rewritetargetallocator * fix changelog entry * document the ewritetargetallocator flag --------- Co-authored-by: Jacob Aronoff --- .chloggen/otelallocator-flag.yaml | 18 ++++++ README.md | 58 +++++++++++++++++++ pkg/collector/reconcile/config_replace.go | 29 +++++++--- .../reconcile/config_replace_test.go | 44 ++++++++++++-- pkg/collector/reconcile/configmap.go | 3 +- pkg/collector/reconcile/configmap_test.go | 56 +++++++++++++++++- pkg/featuregate/featuregate.go | 7 +++ .../adapters/config_to_prom_config.go | 14 +---- .../adapters/config_to_prom_config_test.go | 48 +++++++++++++-- 9 files changed, 242 insertions(+), 35 deletions(-) create mode 100755 .chloggen/otelallocator-flag.yaml diff --git a/.chloggen/otelallocator-flag.yaml b/.chloggen/otelallocator-flag.yaml new file mode 100755 index 000000000..844f88bfb --- /dev/null +++ b/.chloggen/otelallocator-flag.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduces a new feature flag "`operator.collector.rewritetargetallocator`" that allows an operator to add the target_allocator configuration to the collector configuration + +# One or more tracking issues related to the change +issues: [1581] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Note that the ConfigToPromConfig function in pkg/targetallocator/adapters now correctly returns the prometheus receiver config + in accordance with its docstring. It used to erroneously return the actual Prometheus config from a level lower. diff --git a/README.md b/README.md index 35842343f..74799b5d5 100644 --- a/README.md +++ b/README.md @@ -422,6 +422,64 @@ Note how the Operator added a `global` section and a new `http_sd_configs` to th More info on the TargetAllocator can be found [here](cmd/otel-allocator/README.md). +#### Target Allocator config rewriting + +Prometheus receiver now has explicit support for acquiring scrape targets from the target allocator. As such, it is now possible to have the +Operator add the necessary target allocator configuration automatically. This feature currently requires the `operator.collector.rewritetargetallocator` feature flag to be enabled. With the flag enabled, the configuration from the previous section would be rendered as: + +```yaml + receivers: + prometheus: + config: + global: + scrape_interval: 1m + scrape_timeout: 10s + evaluation_interval: 1m + target_allocator: + endpoint: http://collector-with-ta-targetallocator:80 + interval: 30s + collector_id: $POD_NAME + + exporters: + logging: + + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] +``` + +This also allows for a more straightforward collector configuration for target discovery using prometheus-operator CRDs. See below for a minimal example: + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: collector-with-ta-prometheus-cr +spec: + mode: statefulset + targetAllocator: + enabled: true + serviceAccount: everything-prometheus-operator-needs + prometheusCR: + enabled: true + config: | + receivers: + prometheus: + + exporters: + logging: + + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] +``` + ## Compatibility matrix ### OpenTelemetry Operator vs. OpenTelemetry Collector diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 6ad5ea098..b8b217ad9 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -17,8 +17,8 @@ package reconcile import ( "fmt" "net/url" + "time" - "github.com/mitchellh/mapstructure" promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/http" @@ -27,12 +27,20 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) +type targetAllocator struct { + Endpoint string `yaml:"endpoint"` + Interval time.Duration `yaml:"interval"` + CollectorID string `yaml:"collector_id"` +} + type Config struct { - PromConfig *promconfig.Config `yaml:"config"` + PromConfig *promconfig.Config `yaml:"config"` + TargetAllocConfig *targetAllocator `yaml:"target_allocator,omitempty"` } func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { @@ -50,9 +58,7 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { } // yaml marshaling/unsmarshaling is preferred because of the problems associated with the conversion of map to a struct using mapstructure - promCfg, marshalErr := yaml.Marshal(map[string]interface{}{ - "config": promCfgMap, - }) + promCfg, marshalErr := yaml.Marshal(promCfgMap) if marshalErr != nil { return "", marshalErr } @@ -71,13 +77,18 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { } } - updPromCfgMap := make(map[string]interface{}) - if err := mapstructure.Decode(cfg, &updPromCfgMap); err != nil { - return "", err + if featuregate.EnableTargetAllocatorRewrite.IsEnabled() { + cfg.TargetAllocConfig = &targetAllocator{ + Endpoint: fmt.Sprintf("http://%s:80", naming.TAService(instance)), + Interval: 30 * time.Second, + CollectorID: "${POD_NAME}", + } + // we don't need the scrape configs here anymore with target allocator enabled + cfg.PromConfig.ScrapeConfigs = []*promconfig.ScrapeConfig{} } // type coercion checks are handled in the ConfigToPromConfig method above - config["receivers"].(map[interface{}]interface{})["prometheus"].(map[interface{}]interface{})["config"] = updPromCfgMap["PromConfig"] + config["receivers"].(map[interface{}]interface{})["prometheus"] = cfg out, err := yaml.Marshal(config) if err != nil { diff --git a/pkg/collector/reconcile/config_replace_test.go b/pkg/collector/reconcile/config_replace_test.go index 3ccd43f07..2f8a3770d 100644 --- a/pkg/collector/reconcile/config_replace_test.go +++ b/pkg/collector/reconcile/config_replace_test.go @@ -16,11 +16,15 @@ package reconcile import ( "testing" + "time" + + colfeaturegate "go.opentelemetry.io/collector/featuregate" "github.com/prometheus/prometheus/discovery/http" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) @@ -37,9 +41,7 @@ func TestPrometheusParser(t *testing.T) { promCfgMap, err := ta.ConfigToPromConfig(actualConfig) assert.NoError(t, err) - promCfg, err := yaml.Marshal(map[string]interface{}{ - "config": promCfgMap, - }) + promCfg, err := yaml.Marshal(promCfgMap) assert.NoError(t, err) err = yaml.UnmarshalStrict(promCfg, &cfg) @@ -59,6 +61,37 @@ func TestPrometheusParser(t *testing.T) { for k := range expectedMap { assert.True(t, expectedMap[k], k) } + assert.True(t, cfg.TargetAllocConfig == nil) + }) + + t.Run("should update config with targetAllocator block", func(t *testing.T) { + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + param.Instance.Spec.TargetAllocator.Enabled = true + assert.NoError(t, err) + actualConfig, err := ReplaceConfig(param.Instance) + assert.NoError(t, err) + + // prepare + var cfg Config + promCfgMap, err := ta.ConfigToPromConfig(actualConfig) + assert.NoError(t, err) + + promCfg, err := yaml.Marshal(promCfgMap) + assert.NoError(t, err) + + err = yaml.UnmarshalStrict(promCfg, &cfg) + assert.NoError(t, err) + + // test + assert.Len(t, cfg.PromConfig.ScrapeConfigs, 0) + expectedTAConfig := &targetAllocator{ + Endpoint: "http://test-targetallocator:80", + Interval: 30 * time.Second, + CollectorID: "${POD_NAME}", + } + assert.Equal(t, expectedTAConfig, cfg.TargetAllocConfig) + err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + assert.NoError(t, err) }) t.Run("should not update config with http_sd_config", func(t *testing.T) { @@ -71,9 +104,7 @@ func TestPrometheusParser(t *testing.T) { promCfgMap, err := ta.ConfigToPromConfig(actualConfig) assert.NoError(t, err) - promCfg, err := yaml.Marshal(map[string]interface{}{ - "config": promCfgMap, - }) + promCfg, err := yaml.Marshal(promCfgMap) assert.NoError(t, err) err = yaml.UnmarshalStrict(promCfg, &cfg) @@ -93,6 +124,7 @@ func TestPrometheusParser(t *testing.T) { for k := range expectedMap { assert.True(t, expectedMap[k], k) } + assert.True(t, cfg.TargetAllocConfig == nil) }) } diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index b5e9906ed..f906fe68a 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -114,7 +114,8 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/component": "opentelemetry-collector", } - taConfig["config"] = promConfig + // We only take the "config" from the returned object, we don't need the "target_allocator" configuration here. + taConfig["config"] = promConfig["config"] if len(params.Instance.Spec.TargetAllocator.AllocationStrategy) > 0 { taConfig["allocation_strategy"] = params.Instance.Spec.TargetAllocator.AllocationStrategy } else { diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index ca12d9e6e..4f1c94568 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -18,6 +18,8 @@ import ( "context" "testing" + colfeaturegate "go.opentelemetry.io/collector/featuregate" + "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" @@ -28,6 +30,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) @@ -184,6 +187,55 @@ service: }) + t.Run("should return expected escaped collector config map with target_allocator config block", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "latest" + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + assert.NoError(t, err) + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + prometheus: + config: + global: + scrape_interval: 1m + scrape_timeout: 10s + evaluation_interval: 1m + target_allocator: + endpoint: http://test-targetallocator:80 + interval: 30s + collector_id: ${POD_NAME} +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus +`, + } + + param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test.yaml") + assert.NoError(t, err) + param.Instance.Spec.TargetAllocator.Enabled = true + actual := desiredConfigMap(context.Background(), param) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + // Reset the value + expectedLables["app.kubernetes.io/version"] = "0.47.0" + err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + assert.NoError(t, err) + + }) + t.Run("should return expected target allocator config map", func(t *testing.T) { expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" expectedLables["app.kubernetes.io/name"] = "test-targetallocator" @@ -358,7 +410,7 @@ func TestExpectedConfigMap(t *testing.T) { assert.True(t, exists) assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - parmConfig, err := ta.ConfigToPromConfig(params().Instance.Spec.Config) + promConfig, err := ta.ConfigToPromConfig(params().Instance.Spec.Config) assert.NoError(t, err) taConfig := make(map[interface{}]interface{}) @@ -367,7 +419,7 @@ func TestExpectedConfigMap(t *testing.T) { "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/component": "opentelemetry-collector", } - taConfig["config"] = parmConfig + taConfig["config"] = promConfig["config"] taConfig["allocation_strategy"] = "least-weighted" taConfigYAML, _ := yaml.Marshal(taConfig) diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 4f9f8a904..ea42c75e5 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -37,6 +37,13 @@ var ( "operator.autoinstrumentation.java", featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator supports Java auto-instrumentation")) + + // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should + // automatically be rewritten when the target allocator is enabled. + EnableTargetAllocatorRewrite = featuregate.GlobalRegistry().MustRegister( + "operator.collector.rewritetargetallocator", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("controls whether the operator should configure the collector's targetAllocator configuration")) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/pkg/targetallocator/adapters/config_to_prom_config.go index b4ba5f4d5..1029753ce 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config.go +++ b/pkg/targetallocator/adapters/config_to_prom_config.go @@ -28,7 +28,7 @@ func errorNotAMap(component string) error { return fmt.Errorf("%s property in the configuration doesn't contain valid %s", component, component) } -// ConfigToPromConfig converts the incoming configuration object into a the Prometheus receiver config. +// ConfigToPromConfig converts the incoming configuration object into the Prometheus receiver config. func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { config, err := adapters.ConfigFromString(cfg) if err != nil { @@ -55,15 +55,5 @@ func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { return nil, errorNotAMap("prometheus") } - prometheusConfigProperty, ok := prometheus["config"] - if !ok { - return nil, errorNoComponent("prometheusConfig") - } - - prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheusConfig") - } - - return prometheusConfig, nil + return prometheus, nil } diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/pkg/targetallocator/adapters/config_to_prom_config_test.go index ba5cc2978..f39aaecf7 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config_test.go +++ b/pkg/targetallocator/adapters/config_to_prom_config_test.go @@ -41,9 +41,11 @@ func TestExtractPromConfigFromConfig(t *testing.T) { endpoint: 0.0.0.0:15268 ` expectedData := map[interface{}]interface{}{ - "scrape_config": map[interface{}]interface{}{ - "job_name": "otel-collector", - "scrape_interval": "10s", + "config": map[interface{}]interface{}{ + "scrape_config": map[interface{}]interface{}{ + "job_name": "otel-collector", + "scrape_interval": "10s", + }, }, } @@ -55,7 +57,7 @@ func TestExtractPromConfigFromConfig(t *testing.T) { assert.Equal(t, expectedData, promConfig) } -func TestExtractPromConfigFromNullConfig(t *testing.T) { +func TestExtractPromConfigWithTAConfigFromConfig(t *testing.T) { configStr := `receivers: examplereceiver: endpoint: "0.0.0.0:12345" @@ -63,6 +65,42 @@ func TestExtractPromConfigFromNullConfig(t *testing.T) { endpoint: "0.0.0.0:12346" prometheus: config: + scrape_config: + job_name: otel-collector + scrape_interval: 10s + target_allocator: + endpoint: "test:80" + jaeger/custom: + protocols: + thrift_http: + endpoint: 0.0.0.0:15268 +` + expectedData := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_config": map[interface{}]interface{}{ + "job_name": "otel-collector", + "scrape_interval": "10s", + }, + }, + "target_allocator": map[interface{}]interface{}{ + "endpoint": "test:80", + }, + } + + // test + promConfig, err := ta.ConfigToPromConfig(configStr) + assert.NoError(t, err) + + // verify + assert.Equal(t, expectedData, promConfig) +} + +func TestExtractPromConfigFromNullConfig(t *testing.T) { + configStr := `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" + examplereceiver/settings: + endpoint: "0.0.0.0:12346" jaeger/custom: protocols: thrift_http: @@ -71,7 +109,7 @@ func TestExtractPromConfigFromNullConfig(t *testing.T) { // test promConfig, err := ta.ConfigToPromConfig(configStr) - assert.Equal(t, err, fmt.Errorf("%s property in the configuration doesn't contain valid %s", "prometheusConfig", "prometheusConfig")) + assert.Equal(t, err, fmt.Errorf("no prometheus available as part of the configuration")) // verify assert.True(t, reflect.ValueOf(promConfig).IsNil()) From 519bb7b35bf55e672b97b739cea8fb032297d1ad Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Mon, 8 May 2023 09:25:21 -0600 Subject: [PATCH 0843/1234] [pkg/instrumentation] Add featuregate to nodejs instrumentation (#1697) * Add featuregate to nodejs instrumentation * Add changelog * Fix changelog --- .chloggen/nodejs-featuregate.yaml | 16 +++++ README.md | 1 + pkg/featuregate/featuregate.go | 4 ++ pkg/instrumentation/podmutator.go | 7 +- pkg/instrumentation/podmutator_test.go | 89 ++++++++++++++++++++++++++ pkg/instrumentation/upgrade/upgrade.go | 13 ++-- 6 files changed, 125 insertions(+), 5 deletions(-) create mode 100755 .chloggen/nodejs-featuregate.yaml diff --git a/.chloggen/nodejs-featuregate.yaml b/.chloggen/nodejs-featuregate.yaml new file mode 100755 index 000000000..bf9d8414c --- /dev/null +++ b/.chloggen/nodejs-featuregate.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: pkg/instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add nodejs instrumentation capability behind a feature gate which is enabled by default. + +# One or more tracking issues related to the change +issues: [1697] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 74799b5d5..d784572a2 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,7 @@ If a language is enabled by default its gate only needs to be supplied when disa | Language | Gate | Default Value | |----------|---------------------------------------|-----------------| | Java | `operator.autoinstrumentation.java` | enabled | +| NodeJS | `operator.autoinstrumentation.nodejs` | enabled | | Python | `operator.autoinstrumentation.python` | enabled | | DotNet | `operator.autoinstrumentation.dotnet` | enabled | diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index ea42c75e5..c4f60ec1e 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -37,6 +37,10 @@ var ( "operator.autoinstrumentation.java", featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator supports Java auto-instrumentation")) + EnableNodeJSAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.nodejs", + featuregate.StageBeta, + featuregate.WithRegisterDescription("controls whether the operator supports NodeJS auto-instrumentation")) // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should // automatically be rewritten when the target allocator is enabled. diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 7b6615bbf..d9ffe414f 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -97,7 +97,12 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.NodeJS = inst + if featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.NodeJS = inst + } else { + logger.Error(nil, "support for NodeJS auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for NodeJS auto instrumentation is not enabled") + } if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectPython); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 1ebbd954b..da8ebd3af 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -484,6 +484,95 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "nodejs injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "nodejs-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "nodejs-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNodeJSAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNodeJSAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "python injection, true", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index b54e2f1ee..d4487dee8 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -87,10 +87,15 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru } autoInstNodeJS := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] if autoInstNodeJS != "" { - // upgrade the image only if the image matches the annotation - if inst.Spec.NodeJS.Image == autoInstNodeJS { - inst.Spec.NodeJS.Image = u.DefaultAutoInstNodeJS - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] = u.DefaultAutoInstNodeJS + if featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.NodeJS.Image == autoInstNodeJS { + inst.Spec.NodeJS.Image = u.DefaultAutoInstNodeJS + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] = u.DefaultAutoInstNodeJS + } + } else { + u.Logger.Error(nil, "support for NodeJS auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for NodeJS auto instrumentation is not enabled") } } autoInstPython := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] From 2e537f04a7bbc35b7c05f61b81ae559da0018204 Mon Sep 17 00:00:00 2001 From: YUANFAN PENG Date: Tue, 9 May 2023 01:24:40 -0700 Subject: [PATCH 0844/1234] Add liveness missing configs (#1686) * add configs for liveness probe * add testcase * add change log * make bundle * make bundle * make bundle * make bundle USER=open-telemetry VERSION=0.75.0 * update local controller-gen version * add missing newline * address comment revert file * add comments * add validator, make bundle * validator should ignore empty value, add testcases * Revert "validator should ignore empty value, add testcases" This reverts commit 2b0dd506dadd0978d5d5670c2b92386999d0a086. * Revert "add validator, make bundle" This reverts commit b65f1727e350ac8aaaf8077e81db381d4bcec964. * use webhook specCrd validator * make api-docs * adjust error msg * fix type * revert file * fix typo * add logs for probe config error. * Update comment in apis/v1alpha1/opentelemetrycollector_types.go Co-authored-by: Jacob Aronoff * make bundle * make api docs --------- Co-authored-by: Jacob Aronoff --- .chloggen/add-liveness-probe-configs.yaml | 16 ++++ apis/v1alpha1/opentelemetrycollector_types.go | 42 ++++++++++ .../opentelemetrycollector_webhook.go | 23 +++++- .../opentelemetrycollector_webhook_test.go | 68 ++++++++++++++++ apis/v1alpha1/zz_generated.deepcopy.go | 50 ++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 51 ++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 51 ++++++++++++ docs/api.md | 81 +++++++++++++++++++ pkg/collector/container.go | 30 ++++++- pkg/collector/container_test.go | 66 +++++++++++++++ 10 files changed, 476 insertions(+), 2 deletions(-) create mode 100644 .chloggen/add-liveness-probe-configs.yaml diff --git a/.chloggen/add-liveness-probe-configs.yaml b/.chloggen/add-liveness-probe-configs.yaml new file mode 100644 index 000000000..ec7567605 --- /dev/null +++ b/.chloggen/add-liveness-probe-configs.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add liveness probe configs + +# One or more tracking issues related to the change +issues: [760] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 457c6d700..25858165b 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -179,6 +179,10 @@ type OpenTelemetryCollectorSpec struct { // Duration in seconds the pod needs to terminate gracefully upon probe failure. // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. + // It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline. + // +optional + LivenessProbe *Probe `json:"livenessProbe,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. @@ -314,6 +318,44 @@ type AutoscalerSpec struct { TargetMemoryUtilization *int32 `json:"targetMemoryUtilization,omitempty"` } +// Probe defines the OpenTelemetry's pod probe config. Only Liveness probe is supported currently. +type Probe struct { + // Number of seconds after the container has started before liveness probes are initiated. + // Defaults to 0 seconds. Minimum value is 0. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + // How often (in seconds) to perform the probe. + // Default to 10 seconds. Minimum value is 1. + // +optional + PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + // Minimum consecutive successes for the probe to be considered successful after having failed. + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + // +optional + SuccessThreshold *int32 `json:"successThreshold,omitempty"` + // Minimum consecutive failures for the probe to be considered failed after having succeeded. + // Defaults to 3. Minimum value is 1. + // +optional + FailureThreshold *int32 `json:"failureThreshold,omitempty"` + // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + // The grace period is the duration in seconds after the processes running in the pod are sent + // a termination signal and the time when the processes are forcibly halted with a kill signal. + // Set this value longer than the expected cleanup time for your process. + // If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + // value overrides the value provided by the pod spec. + // Value must be non-negative integer. The value zero indicates stop immediately via + // the kill signal (no opportunity to shut down). + // This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + // Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + // +optional + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` +} + func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 66e7d2e42..7233a9241 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -222,10 +222,31 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { - return fmt.Errorf("the OptenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", + return fmt.Errorf("the OpenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", ModeDeployment, ModeDaemonSet, ModeStatefulSet, ) } + if r.Spec.LivenessProbe != nil { + if r.Spec.LivenessProbe.InitialDelaySeconds != nil && *r.Spec.LivenessProbe.InitialDelaySeconds < 0 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe InitialDelaySeconds configuration is incorrect. InitialDelaySeconds should be greater than or equal to 0") + } + if r.Spec.LivenessProbe.PeriodSeconds != nil && *r.Spec.LivenessProbe.PeriodSeconds < 1 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe PeriodSeconds configuration is incorrect. PeriodSeconds should be greater than or equal to 1") + } + if r.Spec.LivenessProbe.TimeoutSeconds != nil && *r.Spec.LivenessProbe.TimeoutSeconds < 1 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe TimeoutSeconds configuration is incorrect. TimeoutSeconds should be greater than or equal to 1") + } + if r.Spec.LivenessProbe.SuccessThreshold != nil && *r.Spec.LivenessProbe.SuccessThreshold < 1 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe SuccessThreshold configuration is incorrect. SuccessThreshold should be greater than or equal to 1") + } + if r.Spec.LivenessProbe.FailureThreshold != nil && *r.Spec.LivenessProbe.FailureThreshold < 1 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe FailureThreshold configuration is incorrect. FailureThreshold should be greater than or equal to 1") + } + if r.Spec.LivenessProbe.TerminationGracePeriodSeconds != nil && *r.Spec.LivenessProbe.TerminationGracePeriodSeconds < 1 { + return fmt.Errorf("the OpenTelemetry Spec LivenessProbe TerminationGracePeriodSeconds configuration is incorrect. TerminationGracePeriodSeconds should be greater than or equal to 1") + } + } + return nil } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index f0a7e6894..54c642067 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -171,7 +171,9 @@ func TestOTELColDefaultingWebhook(t *testing.T) { // deprecated and moved to .Spec.Autoscaler. Fine to use these fields to test that old CRD is // still supported but should eventually be updated. func TestOTELColValidatingWebhook(t *testing.T) { + minusOne := int32(-1) zero := int32(0) + zero64 := int64(0) one := int32(1) three := int32(3) five := int32(5) @@ -470,6 +472,72 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "does not support the attribute 'affinity'", }, + { + name: "invalid InitialDelaySeconds", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + InitialDelaySeconds: &minusOne, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe InitialDelaySeconds configuration is incorrect", + }, + { + name: "invalid PeriodSeconds", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + PeriodSeconds: &zero, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe PeriodSeconds configuration is incorrect", + }, + { + name: "invalid TimeoutSeconds", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + TimeoutSeconds: &zero, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe TimeoutSeconds configuration is incorrect", + }, + { + name: "invalid SuccessThreshold", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + SuccessThreshold: &zero, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe SuccessThreshold configuration is incorrect", + }, + { + name: "invalid FailureThreshold", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + FailureThreshold: &zero, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe FailureThreshold configuration is incorrect", + }, + { + name: "invalid TerminationGracePeriodSeconds", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + LivenessProbe: &Probe{ + TerminationGracePeriodSeconds: &zero64, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec LivenessProbe TerminationGracePeriodSeconds configuration is incorrect", + }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index c99e7e94c..e83652e78 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -515,6 +515,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(int64) **out = **in } + if in.LivenessProbe != nil { + in, out := &in.LivenessProbe, &out.LivenessProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. @@ -598,6 +603,51 @@ func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopy() *OpenTelemetryTar return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Probe) DeepCopyInto(out *Probe) { + *out = *in + if in.InitialDelaySeconds != nil { + in, out := &in.InitialDelaySeconds, &out.InitialDelaySeconds + *out = new(int32) + **out = **in + } + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int32) + **out = **in + } + if in.PeriodSeconds != nil { + in, out := &in.PeriodSeconds, &out.PeriodSeconds + *out = new(int32) + **out = **in + } + if in.SuccessThreshold != nil { + in, out := &in.SuccessThreshold, &out.SuccessThreshold + *out = new(int32) + **out = **in + } + if in.FailureThreshold != nil { + in, out := &in.FailureThreshold, &out.FailureThreshold + *out = new(int32) + **out = **in + } + if in.TerminationGracePeriodSeconds != nil { + in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds + *out = new(int64) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe. +func (in *Probe) DeepCopy() *Probe { + if in == nil { + return nil + } + out := new(Probe) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Python) DeepCopyInto(out *Python) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index cc75d5307..425c4c226 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1453,6 +1453,57 @@ spec: type: object type: object type: object + livenessProbe: + description: Liveness config for the OpenTelemetry Collector except + the probe handler which is auto generated from the health extension + of the collector. It is only effective when healthcheckextension + is configured in the OpenTelemetry Collector pipeline. + properties: + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. Defaults to 0 seconds. + Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Must + be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent a + termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates stop immediately + via the kill signal (no opportunity to shut down). This is a + beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index fc27cdc58..9300590ec 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1451,6 +1451,57 @@ spec: type: object type: object type: object + livenessProbe: + description: Liveness config for the OpenTelemetry Collector except + the probe handler which is auto generated from the health extension + of the collector. It is only effective when healthcheckextension + is configured in the OpenTelemetry Collector pipeline. + properties: + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. Defaults to 0 seconds. + Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Must + be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent a + termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates stop immediately + via the kill signal (no opportunity to shut down). This is a + beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" diff --git a/docs/api.md b/docs/api.md index be1602b86..d1f095eef 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2315,6 +2315,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Actions that the management system should take in response to container lifecycle events. Cannot be updated.
false + + livenessProbe + object + + Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
+ + false maxReplicas integer @@ -4937,6 +4944,80 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba +### OpenTelemetryCollector.spec.livenessProbe +[↩ Parent](#opentelemetrycollectorspec) + + + +Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. Defaults to 0 seconds. Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + ### OpenTelemetryCollector.spec.podSecurityContext [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/container.go b/pkg/collector/container.go index f57cea7e1..156202209 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -121,8 +121,10 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem var livenessProbe *corev1.Probe if config, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { - if probe, err := adapters.ConfigToContainerProbe(config); err == nil { + if probe, err := getLivenessProbe(config, otelcol.Spec.LivenessProbe); err == nil { livenessProbe = probe + } else { + logger.Error(err, "Cannot create liveness probe.") } } @@ -231,3 +233,29 @@ func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPo }) return ports } + +func getLivenessProbe(config map[interface{}]interface{}, probeConfig *v1alpha1.Probe) (*corev1.Probe, error) { + probe, err := adapters.ConfigToContainerProbe(config) + if err != nil { + return nil, err + } + if probeConfig != nil { + if probeConfig.InitialDelaySeconds != nil { + probe.InitialDelaySeconds = *probeConfig.InitialDelaySeconds + } + if probeConfig.PeriodSeconds != nil { + probe.PeriodSeconds = *probeConfig.PeriodSeconds + } + if probeConfig.FailureThreshold != nil { + probe.FailureThreshold = *probeConfig.FailureThreshold + } + if probeConfig.SuccessThreshold != nil { + probe.SuccessThreshold = *probeConfig.SuccessThreshold + } + if probeConfig.TimeoutSeconds != nil { + probe.TimeoutSeconds = *probeConfig.TimeoutSeconds + } + probe.TerminationGracePeriodSeconds = probeConfig.TerminationGracePeriodSeconds + } + return probe, nil +} diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 84ef7a51c..6f39364f3 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -440,6 +440,72 @@ func TestContainerEnvFrom(t *testing.T) { func TestContainerProbe(t *testing.T) { // prepare + initialDelaySeconds := int32(10) + timeoutSeconds := int32(11) + periodSeconds := int32(12) + successThreshold := int32(13) + failureThreshold := int32(14) + terminationGracePeriodSeconds := int64(15) + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `extensions: + health_check: +service: + extensions: [health_check]`, + LivenessProbe: &v1alpha1.Probe{ + InitialDelaySeconds: &initialDelaySeconds, + TimeoutSeconds: &timeoutSeconds, + PeriodSeconds: &periodSeconds, + SuccessThreshold: &successThreshold, + FailureThreshold: &failureThreshold, + TerminationGracePeriodSeconds: &terminationGracePeriodSeconds, + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + // verify + assert.Equal(t, "/", c.LivenessProbe.HTTPGet.Path) + assert.Equal(t, int32(13133), c.LivenessProbe.HTTPGet.Port.IntVal) + assert.Equal(t, "", c.LivenessProbe.HTTPGet.Host) + + assert.Equal(t, initialDelaySeconds, c.LivenessProbe.InitialDelaySeconds) + assert.Equal(t, timeoutSeconds, c.LivenessProbe.TimeoutSeconds) + assert.Equal(t, periodSeconds, c.LivenessProbe.PeriodSeconds) + assert.Equal(t, successThreshold, c.LivenessProbe.SuccessThreshold) + assert.Equal(t, failureThreshold, c.LivenessProbe.FailureThreshold) + assert.Equal(t, terminationGracePeriodSeconds, *c.LivenessProbe.TerminationGracePeriodSeconds) +} + +func TestContainerProbeEmptyConfig(t *testing.T) { + // prepare + + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: `extensions: + health_check: +service: + extensions: [health_check]`, + LivenessProbe: &v1alpha1.Probe{}, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + // verify + assert.Equal(t, "/", c.LivenessProbe.HTTPGet.Path) + assert.Equal(t, int32(13133), c.LivenessProbe.HTTPGet.Port.IntVal) + assert.Equal(t, "", c.LivenessProbe.HTTPGet.Host) +} + +func TestContainerProbeNoConfig(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: `extensions: From 4886a78142d92531b1c054d95f45e4a61fd726b4 Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 9 May 2023 15:54:42 +0200 Subject: [PATCH 0845/1234] Prepare release v0.76.1 (#1722) Signed-off-by: Benedikt Bongartz --- ...oks-and-terminationGracePeriodSeconds.yaml | 16 ---------- .../1672-bump-otel-net-auto-to-0.7.0.yaml | 16 ---------- .chloggen/1681-update-nodejs-deps.yaml | 16 ---------- .chloggen/add-featuregate-for-dotnet.yaml | 16 ---------- .chloggen/add-featuregates.yaml | 16 ---------- .chloggen/add-metrics-to-nodejs.yaml | 16 ---------- .chloggen/bump-nodejs-versions.yaml | 16 ---------- ...targetallocator_update-scrape-configs.yaml | 16 ---------- .chloggen/java-featuregate.yaml | 16 ---------- .chloggen/nodejs-featuregate.yaml | 16 ---------- .chloggen/otelallocator-flag.yaml | 18 ----------- .chloggen/python-featuregate.yaml | 16 ---------- CHANGELOG.md | 32 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- versions.txt | 12 +++---- 17 files changed, 44 insertions(+), 206 deletions(-) delete mode 100755 .chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml delete mode 100644 .chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml delete mode 100644 .chloggen/1681-update-nodejs-deps.yaml delete mode 100755 .chloggen/add-featuregate-for-dotnet.yaml delete mode 100644 .chloggen/add-featuregates.yaml delete mode 100644 .chloggen/add-metrics-to-nodejs.yaml delete mode 100644 .chloggen/bump-nodejs-versions.yaml delete mode 100755 .chloggen/fix_targetallocator_update-scrape-configs.yaml delete mode 100755 .chloggen/java-featuregate.yaml delete mode 100755 .chloggen/nodejs-featuregate.yaml delete mode 100755 .chloggen/otelallocator-flag.yaml delete mode 100755 .chloggen/python-featuregate.yaml diff --git a/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml b/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml deleted file mode 100755 index 7d7f08015..000000000 --- a/.chloggen/1618-support-lifecycle-hooks-and-terminationGracePeriodSeconds.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "add support for `lifecycle` hooks and `terminationGracePeriodSeconds` in collector spec." - -# One or more tracking issues related to the change -issues: [1618] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml b/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml deleted file mode 100644 index 41d81349b..000000000 --- a/.chloggen/1672-bump-otel-net-auto-to-0.7.0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 - -# One or more tracking issues related to the change -issues: [1672] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1681-update-nodejs-deps.yaml b/.chloggen/1681-update-nodejs-deps.yaml deleted file mode 100644 index e27d6df18..000000000 --- a/.chloggen/1681-update-nodejs-deps.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump nodejs dependencies to latest versions - -# One or more tracking issues related to the change -issues: [1682] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-featuregate-for-dotnet.yaml b/.chloggen/add-featuregate-for-dotnet.yaml deleted file mode 100755 index a2a2bdb57..000000000 --- a/.chloggen/add-featuregate-for-dotnet.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: pkg/instrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add dotnet instrumentation capability behind a feature gate which is enabled by default. - -# One or more tracking issues related to the change -issues: [1629] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-featuregates.yaml b/.chloggen/add-featuregates.yaml deleted file mode 100644 index 920d5664d..000000000 --- a/.chloggen/add-featuregates.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add ability to use feature gates in the operator - -# One or more tracking issues related to the change -issues: [1619] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-metrics-to-nodejs.yaml b/.chloggen/add-metrics-to-nodejs.yaml deleted file mode 100644 index 021bb6f1d..000000000 --- a/.chloggen/add-metrics-to-nodejs.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add metrics exporter to Node.JS autoinstrumentation - -# One or more tracking issues related to the change -issues: [1627] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-nodejs-versions.yaml b/.chloggen/bump-nodejs-versions.yaml deleted file mode 100644 index aa5e19c38..000000000 --- a/.chloggen/bump-nodejs-versions.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump nodejs dependencies to latest versions - -# One or more tracking issues related to the change -issues: [1626] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_targetallocator_update-scrape-configs.yaml b/.chloggen/fix_targetallocator_update-scrape-configs.yaml deleted file mode 100755 index 7c4eb4718..000000000 --- a/.chloggen/fix_targetallocator_update-scrape-configs.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fix updating scrape configs - -# One or more tracking issues related to the change -issues: [1415] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/java-featuregate.yaml b/.chloggen/java-featuregate.yaml deleted file mode 100755 index 17e74fd11..000000000 --- a/.chloggen/java-featuregate.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: pkg/instrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add java instrumentation capability behind a feature gate which is enabled by default. - -# One or more tracking issues related to the change -issues: [1695] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/nodejs-featuregate.yaml b/.chloggen/nodejs-featuregate.yaml deleted file mode 100755 index bf9d8414c..000000000 --- a/.chloggen/nodejs-featuregate.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: pkg/instrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add nodejs instrumentation capability behind a feature gate which is enabled by default. - -# One or more tracking issues related to the change -issues: [1697] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/otelallocator-flag.yaml b/.chloggen/otelallocator-flag.yaml deleted file mode 100755 index 844f88bfb..000000000 --- a/.chloggen/otelallocator-flag.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Introduces a new feature flag "`operator.collector.rewritetargetallocator`" that allows an operator to add the target_allocator configuration to the collector configuration - -# One or more tracking issues related to the change -issues: [1581] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - Note that the ConfigToPromConfig function in pkg/targetallocator/adapters now correctly returns the prometheus receiver config - in accordance with its docstring. It used to erroneously return the actual Prometheus config from a level lower. diff --git a/.chloggen/python-featuregate.yaml b/.chloggen/python-featuregate.yaml deleted file mode 100755 index 8b01d1fa7..000000000 --- a/.chloggen/python-featuregate.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: pkg/instrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add python instrumentation capability behind a feature gate which is enabled by default. - -# One or more tracking issues related to the change -issues: [1696] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 345a4a403..8c34ccf86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,38 @@ Changes by Version +## 0.76.1 + +### 💡 Enhancements 💡 + +- `operator`: add support for `lifecycle` hooks and `terminationGracePeriodSeconds` in collector spec. (#1618) +- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 (#1672) +- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1682) +- `pkg/instrumentation`: Add dotnet instrumentation capability behind a feature gate which is enabled by default. (#1629) +- `operator`: Add ability to use feature gates in the operator (#1619) +- `autoinstrumentation`: Add metrics exporter to Node.JS autoinstrumentation (#1627) +- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1626) +- `pkg/instrumentation`: Add java instrumentation capability behind a feature gate which is enabled by default. (#1695) +- `pkg/instrumentation`: Add nodejs instrumentation capability behind a feature gate which is enabled by default. (#1697) +- `operator`: Introduces a new feature flag "`operator.collector.rewritetargetallocator`" that allows an operator to add the target_allocator configuration to the collector configuration (#1581) + Note that the ConfigToPromConfig function in pkg/targetallocator/adapters now correctly returns the prometheus receiver config + in accordance with its docstring. It used to erroneously return the actual Prometheus config from a level lower. + +- `pkg/instrumentation`: Add python instrumentation capability behind a feature gate which is enabled by default. (#1696) + +### 🧰 Bug fixes 🧰 + +- `target allocator`: fix updating scrape configs (#1415) + +### Components + +* [OpenTelemetry Collector - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.76.1) +* [OpenTelemetry Contrib - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.76.1) +* [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) +* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) + ## 0.75.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index d784572a2..219acb4f2 100644 --- a/README.md +++ b/README.md @@ -502,6 +502,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.76.1 | v1.19 to v1.26 | v1 | | v0.75.0 | v1.19 to v1.26 | v1 | | v0.74.0 | v1.19 to v1.26 | v1 | | v0.73.0 | v1.19 to v1.26 | v1 | @@ -524,7 +525,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.55.0 | v1.19 to v1.24 | v1 | | v0.54.0 | v1.19 to v1.24 | v1 | | v0.53.0 | v1.19 to v1.24 | v1 | -| v0.52.0 | v1.19 to v1.23 | v1 | diff --git a/RELEASE.md b/RELEASE.md index d5d2a1bde..e2828ab3e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,8 +38,8 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.76.0 | @frzifus | | v0.77.0 | @yuriolisa | | v0.78.0 | @jaronoff97 | | v0.79.0 | @pavolloffay | | v0.80.0 | @VineethReddy02 | +| v0.81.0 | @frzifus | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c28a66a6d..11c43f1d8 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-04-10T17:45:14Z" + createdAt: "2023-05-08T15:42:30Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.75.0 + name: opentelemetry-operator.v0.76.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -307,7 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.75.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.76.1 livenessProbe: httpGet: path: /healthz @@ -414,7 +414,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.75.0 + version: 0.76.1 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 045327830..8e68a84cc 100644 --- a/versions.txt +++ b/versions.txt @@ -2,24 +2,24 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.75.0 +opentelemetry-collector=0.76.1 # Represents the current release of the OpenTelemetry Operator. -operator=0.75.0 +operator=0.76.1 # Represents the current release of the Target Allocator. -targetallocator=0.75.0 +targetallocator=0.76.1 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.75.0 +operator-opamp-bridge=0.76.1 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.24.0 +autoinstrumentation-java=1.25.1 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.37.0 +autoinstrumentation-nodejs=0.38.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt From 43869bf559ac8d3eb9d164b874ef64530b13d475 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 9 May 2023 11:27:38 -0400 Subject: [PATCH 0846/1234] Mirror images to Dockerhub (#1708) * Bump prometheus version * Docker hub mirror * remove another one * chlog * test creds * revert * changelog req --- .chloggen/mirror-to-dockerhub.yaml | 16 ++++++++++++++++ .../publish-autoinstrumentation-dotnet.yaml | 10 +++++++++- .../publish-autoinstrumentation-java.yaml | 10 +++++++++- .../publish-autoinstrumentation-nodejs.yaml | 10 +++++++++- .../publish-autoinstrumentation-python.yaml | 10 +++++++++- .github/workflows/publish-images.yaml | 10 +++++++++- .../workflows/publish-operator-opamp-bridge.yaml | 10 +++++++++- .github/workflows/publish-target-allocator.yaml | 10 +++++++++- 8 files changed, 79 insertions(+), 7 deletions(-) create mode 100755 .chloggen/mirror-to-dockerhub.yaml diff --git a/.chloggen/mirror-to-dockerhub.yaml b/.chloggen/mirror-to-dockerhub.yaml new file mode 100755 index 000000000..c68fe6383 --- /dev/null +++ b/.chloggen/mirror-to-dockerhub.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: github actions + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Publish image to dockerhub too + +# One or more tracking issues related to the change +issues: [1708] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index ad6bca3a0..8f5580bc1 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet + images: | + otel/autoinstrumentation-dotnet + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} @@ -45,6 +47,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 04f313ed6..03b4712d5 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java + images: | + otel/autoinstrumentation-java + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} @@ -45,6 +47,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 1180bcae4..9db13d692 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs + images: | + otel/autoinstrumentation-nodejs + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} @@ -45,6 +47,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 81ce065a1..a4b783c16 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python + images: | + otel/autoinstrumentation-python + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python tags: | type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} @@ -45,6 +47,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index b59d43933..69c22eb63 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -37,7 +37,9 @@ jobs: id: docker_meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator + images: | + otel/opentelemetry-operator + ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -58,6 +60,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index c76354628..452a623e4 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge + images: | + otel/operator-opamp-bridge + ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -48,6 +50,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index fcff14efe..b45005218 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -27,7 +27,9 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/target-allocator + images: | + otel/target-allocator + ghcr.io/open-telemetry/opentelemetry-operator/target-allocator tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -48,6 +50,12 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- + - name: Log into Docker.io + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Package Registry uses: docker/login-action@v2 with: From 8569bd460a17d9a8bfe20c1923b9858487a1f365 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 May 2023 18:06:22 +0200 Subject: [PATCH 0847/1234] Bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (#1713) Bumps google.golang.org/protobuf from 1.29.0 to 1.29.1. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 5 +- go.sum | 1007 +------------------------------------------------------- 2 files changed, 16 insertions(+), 996 deletions(-) diff --git a/go.mod b/go.mod index b9f836283..be6481f6d 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,6 @@ require ( ) require ( - cloud.google.com/go v0.110.0 // indirect cloud.google.com/go/compute v1.18.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect @@ -121,7 +120,6 @@ require ( github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.6.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect @@ -144,8 +142,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.29.0 // indirect - gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect + google.golang.org/protobuf v1.29.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index a3cd636a2..7bf83110f 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= @@ -15,36 +13,20 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/bigtable v1.3.0/go.mod h1:z5EyKrPE8OQmeg4h5MNdKvuSnI9CCT49Ki3f23aBzio= cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -54,160 +36,66 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= -github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.10.1/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= -github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A= -github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= -github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/SAP/go-hdb v0.14.1/go.mod h1:7fdQLVC2lER3urZLjZCm0AuMQfApof92n3aylBPEkMo= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 h1:AUNCr9CiJuwrRYS3XieqF+Z9B9gNxo/eANAJCF2eiN4= -github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= -github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.38.60 h1:MgyEsX0IMwivwth1VwEnesBpH0vxbjp5a0w1lurMOXY= -github.com/aws/aws-sdk-go v1.38.60/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.217 h1:FcWC56MRl+k756aH3qeMQTylSdeJ58WN0iFz3fkyRz0= github.com/aws/aws-sdk-go v1.44.217/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/immutable v0.2.1/go.mod h1:uc6OHo6PN2++n98KHLxW8ef4W42ylHiQSENghE1ezxI= -github.com/benbjohnson/tmpl v1.0.0/go.mod h1:igT620JFIi44B6awvU9IsDhR77IXWtFigTLil/RPdps= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0/go.mod h1:J4Y6YJm0qTWB9aFziB7cPeSyc6dOZFyJdteSeybVpXQ= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -215,303 +103,92 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-sip13 v0.0.0-20190329191031-25c5027a8c7b/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.62.0 h1:7Gw2KFsWkxl36qJa0s50tgXaE0Cgm51JdRP+MFQvNnM= -github.com/digitalocean/godo v1.62.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/digitalocean/godo v1.97.0 h1:p9w1yCcWMZcxFSLPToNGXA96WfUVLXqoHti6GzVomL4= github.com/digitalocean/godo v1.97.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= -github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15/go.mod h1:tPg4cp4nseejPd+UKxtCVQ2hUxNTZ7qQZJa7CLriIeo= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi v4.1.0+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= -github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= -github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.4/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= -github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= -github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= -github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= -github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= -github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= -github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= -github.com/go-openapi/runtime v0.19.28/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= -github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= -github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= -github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= -github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= -github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.8/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= -github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= -github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= -github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= -github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= -github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -524,9 +201,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -542,20 +216,12 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -569,211 +235,106 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200417002340-c6e0a841f49a/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.4.0/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gophercloud/gophercloud v0.10.0/go.mod h1:gmC5oQqMDOMO1t1gq5DquX/yAU808e/4mzjjDA76+Ss= -github.com/gophercloud/gophercloud v0.18.0 h1:V6hcuMPmjXg+js9flU8T3RIHDCjV7F5CG5GD0MRhP/w= -github.com/gophercloud/gophercloud v0.18.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= github.com/gophercloud/gophercloud v1.2.0 h1:1oXyj4g54KBg/kFtCdMM6jtxSzeIyg8wv4z1HoGPp1E= github.com/gophercloud/gophercloud v1.2.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.14.4/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= -github.com/hashicorp/consul/api v1.8.1 h1:BOEQaMWoGMhmQ29fC26bi0qb7/rId9JzZP2V0Xmx7m8= -github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.7.0 h1:H6R9d008jDcHPQPAqPNuydAshJ4v5/8URdFnUvK/+sc= -github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= +github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.12.2 h1:F1fdYblUEsxKiailtkhCCG2g4bipEgaHiDc8vffNpD4= -github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.2.0 h1:l6UW37iCXwZkZoAbEYnptSHVE/cQ5bOTPYG5W3vf9+8= -github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.2.3 h1:BwZa5IjREr75J0am7nblP+X5i95Rmp8EEbMI5vkUWdA= -github.com/hashicorp/memberlist v0.2.3/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b h1:EkuSTU8c/63q4LMayj8ilgg/4I5PXDFVcnqKfs9qcwI= github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b/go.mod h1:bKUb1ytds5KwUioHdvdq9jmrDqCThv95si0Ub7iNeBg= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= -github.com/hashicorp/serf v0.9.5 h1:EBWvyu9tcRszt3Bxp3KNssBMP1KuHWyO51lz9+786iM= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go v1.26.2 h1:fI8BXAGJI4EFeCDd2a/I4EhqyK32cDdxGeWfYMGUi50= -github.com/hetznercloud/hcloud-go v1.26.2/go.mod h1:2C5uMtBiMoFr3m7lBFPf7wXTdh33CevmZpQIIDPGYJI= github.com/hetznercloud/hcloud-go v1.41.0 h1:KJGFRRc68QiVu4PrEP5BmCQVveCP2CM26UGQUKGpIUs= github.com/hetznercloud/hcloud-go v1.41.0/go.mod h1:NaHg47L6C77mngZhwBG652dTAztYrsZ2/iITJKhQkHA= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/flux v0.65.0/go.mod h1:BwN2XG2lMszOoquQaFdPET8FRQfrXiZsWmcMO9rkaVY= -github.com/influxdata/flux v0.113.0/go.mod h1:3TJtvbm/Kwuo5/PEo5P6HUzwVg4bXWkb2wPQHPtQdlU= -github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA= -github.com/influxdata/influxdb v1.8.0/go.mod h1:SIzcnsjaHRFpmlxpJ4S3NT64qtEKYweNTUMb/vh0OMQ= -github.com/influxdata/influxdb v1.9.2/go.mod h1:UEe3MeD9AaP5rlPIes102IhYua3FhIWZuOXNHxDjSrI= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.0/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo= -github.com/influxdata/influxql v1.1.1-0.20210223160523-b6ab99450c93/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/pkg-config v0.2.6/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/pkg-config v0.2.7/go.mod h1:EMS7Ll0S4qkzDk53XS3Z72/egBsPInt+BeRxb0WeSwk= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/ionos-cloud/sdk-go/v6 v6.1.4 h1:BJHhFA8Q1SZC7VOXqKKr2BV2ysQ2/4hlk1e4hZte7GY= github.com/ionos-cloud/sdk-go/v6 v6.1.4/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -781,118 +342,57 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= -github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20160406211939-eadb3ce320cb/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= -github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= -github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= -github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5/go.mod h1:JWhYAp2EXqUtsxTKdeGlY8Wp44M7VxThC9FEoNGi2IE= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -901,217 +401,93 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ovh/go-ovh v1.3.0 h1:mvZaddk4E4kLcXhzb+cxBsMPYp2pHqiQpWYkInsuZPQ= github.com/ovh/go-ovh v1.3.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= -github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNkDYzz3xecMgSW/F+U= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= -github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= -github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44 h1:3egqo0Vut6daANFm7tOXdNAa8v5/uLU+sgCJrc88Meo= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/shoenig/test v0.6.2 h1:tdq+WGnznwE5xcOMXkqqXuudK75RkSGBazBGcP1lX6w= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/snowflakedb/gosnowflake v1.3.4/go.mod h1:NsRq2QeiMUuoNUJhp5Q6xGC4uBrsS9g6LwZVEkTWgsE= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -1119,64 +495,22 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU= -github.com/uber/athenadriver v1.1.4/go.mod h1:tQjho4NzXw55LGfSZEcETuYydpY1vtmixUabHkC1K/E= -github.com/uber/jaeger-client-go v2.23.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.2/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= -go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= @@ -1186,71 +520,30 @@ go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188Wl go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= -go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191202143827-86a70503ff7e/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -1262,7 +555,6 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1275,8 +567,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1285,27 +575,16 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -1314,12 +593,7 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191126235420-ef20fe5d7933/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1327,41 +601,25 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1369,26 +627,13 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1396,59 +641,39 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1456,39 +681,17 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210611083646-a4fc73990273/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1497,90 +700,55 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190813034749-528a2984e271/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191203134012-c197fd4bf371/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1589,32 +757,18 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304024140-c4206d458c3f/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200422205258-72e4a01eba43/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= @@ -1625,13 +779,6 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1648,25 +795,9 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0 h1:TXXKS1slM3b2bZNJwD5DV/Tp6/M2cLzLOLh9PjDhrw8= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.111.0 h1:bwKi+z2BsdwYFRKrqwutM+axAlYLz83gt5pDSXCJT+0= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -1679,17 +810,13 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -1699,7 +826,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200420144010-e5e8543f8aeb/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1709,78 +835,27 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1794,54 +869,36 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0= -google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1849,66 +906,32 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.17.5/go.mod h1:0zV5/ungglgy2Rlm3QK8fbxkXVs+BSJWpJP/+8gUVLY= -k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.17.5/go.mod h1:ioIo1G/a+uONV7Tv+ZmCbMG1/a3kVw5YcDdncd8ugQ0= -k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.17.5/go.mod h1:S8uZpBpjJJdEH/fEyxcqg7Rn0P5jH+ilkgBHjriSmNo= -k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200316234421-82d701f24f9d/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU= k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/kubectl v0.26.3 h1:bZ5SgFyeEXw6XTc1Qji0iNdtqAC76lmeIIQULg2wNXM= k8s.io/kubectl v0.26.3/go.mod h1:02+gv7Qn4dupzN3fi/9OvqqdW+uG/4Zi56vc4Zmsp1g= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= From 80dd330bb0dd3990061738a104dad7e21994408b Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 10 May 2023 14:29:18 -0600 Subject: [PATCH 0848/1234] Promote @TylerHelmuth to Approver (#1723) * Add TylerHelmuth as Approver * Add myself to release scehdule --- .github/workflows/reusable-operator-hub-release.yaml | 2 +- README.md | 1 + RELEASE.md | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml index e3921406c..b0563998b 100644 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -70,7 +70,7 @@ jobs: message="Update the opentelemetry to $VERSION" body="Release opentelemetry-operator \`$VERSION\`. - cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 + cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 @TylerHelmuth " branch="update-opentelemetry-operator-to-${VERSION}" diff --git a/README.md b/README.md index 219acb4f2..693b29897 100644 --- a/README.md +++ b/README.md @@ -537,6 +537,7 @@ In addition to the [core responsibilities](https://github.com/open-telemetry/com Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-telemetry/teams/operator-approvers)): - [Benedikt Bongartz](https://github.com/frzifus), Red Hat +- [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb - [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat Emeritus Approvers: diff --git a/RELEASE.md b/RELEASE.md index e2828ab3e..f1c07ad97 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -42,4 +42,5 @@ The operator should be released within a week after the [OpenTelemetry collector | v0.78.0 | @jaronoff97 | | v0.79.0 | @pavolloffay | | v0.80.0 | @VineethReddy02 | -| v0.81.0 | @frzifus | +| v0.81.0 | @TylerHelmuth | +| v0.82.0 | @frzifus | From 33a1acb007f937ecf3e8d163c3e5903a8f6cc964 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 May 2023 10:01:02 +0200 Subject: [PATCH 0849/1234] Bump github.com/docker/docker (#1714) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.1+incompatible to 23.0.3+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v23.0.1...v23.0.3) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index be6481f6d..18497b20d 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.97.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v23.0.1+incompatible // indirect + github.com/docker/docker v23.0.3+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect diff --git a/go.sum b/go.sum index 7bf83110f..37535c2b0 100644 --- a/go.sum +++ b/go.sum @@ -119,8 +119,8 @@ github.com/digitalocean/godo v1.97.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzK github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= +github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From 4de0d208a50394fe166dada924cdb4994c7e81b4 Mon Sep 17 00:00:00 2001 From: Ben B Date: Thu, 11 May 2023 17:15:20 +0200 Subject: [PATCH 0850/1234] set default resource limits for instrumentation init containers (#1571) * set default resource limits for instrumentation init containers Signed-off-by: Benedikt Bongartz * expose resource requirements for instrumentation init containers Signed-off-by: Benedikt Bongartz --------- Signed-off-by: Benedikt Bongartz --- .../default_limits_for_init_containers.yaml | 16 + apis/v1alpha1/instrumentation_types.go | 20 + apis/v1alpha1/instrumentation_webhook.go | 61 +++ apis/v1alpha1/zz_generated.deepcopy.go | 5 + .../opentelemetry.io_instrumentations.yaml | 240 +++++++++++ .../opentelemetry.io_instrumentations.yaml | 240 +++++++++++ docs/api.md | 385 ++++++++++++++++++ pkg/instrumentation/dotnet.go | 7 +- pkg/instrumentation/dotnet_test.go | 3 +- pkg/instrumentation/helper.go | 4 +- pkg/instrumentation/javaagent.go | 7 +- pkg/instrumentation/javaagent_test.go | 3 +- pkg/instrumentation/nodejs.go | 7 +- pkg/instrumentation/nodejs_test.go | 3 +- pkg/instrumentation/podmutator_test.go | 2 + pkg/instrumentation/python.go | 7 +- pkg/instrumentation/python_test.go | 3 +- pkg/instrumentation/sdk_test.go | 20 +- .../e2e/instrumentation-dotnet/01-assert.yaml | 7 + tests/e2e/instrumentation-java/01-assert.yaml | 7 + .../e2e/instrumentation-nodejs/01-assert.yaml | 8 + .../e2e/instrumentation-python/01-assert.yaml | 7 + 22 files changed, 1043 insertions(+), 19 deletions(-) create mode 100755 .chloggen/default_limits_for_init_containers.yaml diff --git a/.chloggen/default_limits_for_init_containers.yaml b/.chloggen/default_limits_for_init_containers.yaml new file mode 100755 index 000000000..fc75d9b71 --- /dev/null +++ b/.chloggen/default_limits_for_init_containers.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: set default resource limits for instrumentation init containers + +# One or more tracking issues related to the change +issues: [1407] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 972836239..ad4ce935f 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -113,6 +113,10 @@ type Java struct { // If the former var had been defined, then the other vars would be ignored. // +optional Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resources,omitempty"` } // NodeJS defines NodeJS SDK and instrumentation configuration. @@ -126,6 +130,10 @@ type NodeJS struct { // If the former var had been defined, then the other vars would be ignored. // +optional Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } // Python defines Python SDK and instrumentation configuration. @@ -139,8 +147,13 @@ type Python struct { // If the former var had been defined, then the other vars would be ignored. // +optional Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } +// DotNet defines DotNet SDK and instrumentation configuration. type DotNet struct { // Image is a container image with DotNet SDK and auto-instrumentation. // +optional @@ -151,8 +164,12 @@ type DotNet struct { // If the former var had been defined, then the other vars would be ignored. // +optional Env []corev1.EnvVar `json:"env,omitempty"` + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } +// ApacheHttpd defines Apache SDK and instrumentation configuration. type ApacheHttpd struct { // Image is a container image with Apache SDK and auto-instrumentation. // +optional @@ -178,6 +195,9 @@ type ApacheHttpd struct { // Needed only if different from default "/usr/local/apache2/conf" // +optional ConfigPath string `json:"configPath,omitempty"` + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } // InstrumentationStatus defines status of the instrumentation. diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 41a78f78f..fed2f182f 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -20,6 +20,7 @@ import ( "strings" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -64,26 +65,86 @@ func (r *Instrumentation) Default() { r.Spec.Java.Image = val } } + if r.Spec.Java.Resources.Limits == nil { + r.Spec.Java.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("64Mi"), + } + } + if r.Spec.Java.Resources.Requests == nil { + r.Spec.Java.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("50m"), + corev1.ResourceMemory: resource.MustParse("64Mi"), + } + } if r.Spec.NodeJS.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationNodeJS]; ok { r.Spec.NodeJS.Image = val } } + if r.Spec.NodeJS.Resources.Limits == nil { + r.Spec.NodeJS.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } + if r.Spec.NodeJS.Resources.Requests == nil { + r.Spec.NodeJS.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("50m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } if r.Spec.Python.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationPython]; ok { r.Spec.Python.Image = val } } + if r.Spec.Python.Resources.Limits == nil { + r.Spec.Python.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + } + } + if r.Spec.Python.Resources.Requests == nil { + r.Spec.Python.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("50m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + } + } if r.Spec.DotNet.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationDotNet]; ok { r.Spec.DotNet.Image = val } } + if r.Spec.DotNet.Resources.Limits == nil { + r.Spec.DotNet.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } + if r.Spec.DotNet.Resources.Requests == nil { + r.Spec.DotNet.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("50m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } if r.Spec.ApacheHttpd.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationApacheHttpd]; ok { r.Spec.ApacheHttpd.Image = val } } + if r.Spec.ApacheHttpd.Resources.Limits == nil { + r.Spec.ApacheHttpd.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } + if r.Spec.ApacheHttpd.Resources.Requests == nil { + r.Spec.ApacheHttpd.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + } if r.Spec.ApacheHttpd.Version == "" { r.Spec.ApacheHttpd.Version = "2.4" } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index e83652e78..9e5032922 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -43,6 +43,7 @@ func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApacheHttpd. @@ -105,6 +106,7 @@ func (in *DotNet) DeepCopyInto(out *DotNet) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DotNet. @@ -286,6 +288,7 @@ func (in *Java) DeepCopyInto(out *Java) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java. @@ -308,6 +311,7 @@ func (in *NodeJS) DeepCopyInto(out *NodeJS) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS. @@ -658,6 +662,7 @@ func (in *Python) DeepCopyInto(out *Python) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python. diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index adfcb4df3..2826ed300 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -298,6 +298,54 @@ spec: image: description: Image is a container image with Apache SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object version: description: Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 @@ -427,6 +475,54 @@ spec: image: description: Image is a container image with DotNet SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object env: description: 'Env defines common env vars. There are four layers for @@ -673,6 +769,54 @@ spec: description: Image is a container image with javaagent auto-instrumentation JAR. type: string + resources: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. @@ -798,6 +942,54 @@ spec: image: description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object propagators: description: Propagators defines inter-process context propagation @@ -940,6 +1132,54 @@ spec: image: description: Image is a container image with Python SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object resource: description: Resource defines the configuration for the resource attributes, diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 3e870afeb..95a842b31 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -297,6 +297,54 @@ spec: image: description: Image is a container image with Apache SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object version: description: Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 @@ -426,6 +474,54 @@ spec: image: description: Image is a container image with DotNet SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object env: description: 'Env defines common env vars. There are four layers for @@ -672,6 +768,54 @@ spec: description: Image is a container image with javaagent auto-instrumentation JAR. type: string + resources: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. @@ -797,6 +941,54 @@ spec: image: description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object propagators: description: Propagators defines inter-process context propagation @@ -939,6 +1131,54 @@ spec: image: description: Image is a container image with Python SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object resource: description: Resource defines the configuration for the resource attributes, diff --git a/docs/api.md b/docs/api.md index d1f095eef..2d3625edd 100644 --- a/docs/api.md +++ b/docs/api.md @@ -203,6 +203,13 @@ Apache defines configuration for Apache HTTPD auto-instrumentation. Image is a container image with Apache SDK and auto-instrumentation.
false + + resourceRequirements + object + + Resources describes the compute resource requirements.
+ + false version string @@ -706,6 +713,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.apacheHttpd.resourceRequirements +[↩ Parent](#instrumentationspecapachehttpd) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.apacheHttpd.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecapachehttpdresourcerequirements) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.dotnet [↩ Parent](#instrumentationspec) @@ -736,6 +813,13 @@ DotNet defines configuration for DotNet auto-instrumentation. Image is a container image with DotNet SDK and auto-instrumentation.
false + + resourceRequirements + object + + Resources describes the compute resource requirements.
+ + false @@ -986,6 +1070,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.dotnet.resourceRequirements +[↩ Parent](#instrumentationspecdotnet) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.dotnet.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecdotnetresourcerequirements) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.env[index] [↩ Parent](#instrumentationspec) @@ -1289,6 +1443,13 @@ Java defines configuration for java auto-instrumentation. Image is a container image with javaagent auto-instrumentation JAR.
false + + resources + object + + Resources describes the compute resource requirements.
+ + false @@ -1539,6 +1700,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.java.resources +[↩ Parent](#instrumentationspecjava) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.java.resources.claims[index] +[↩ Parent](#instrumentationspecjavaresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.nodejs [↩ Parent](#instrumentationspec) @@ -1569,6 +1800,13 @@ NodeJS defines configuration for nodejs auto-instrumentation. Image is a container image with NodeJS SDK and auto-instrumentation.
false + + resourceRequirements + object + + Resources describes the compute resource requirements.
+ + false @@ -1819,6 +2057,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.nodejs.resourceRequirements +[↩ Parent](#instrumentationspecnodejs) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.nodejs.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecnodejsresourcerequirements) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.python [↩ Parent](#instrumentationspec) @@ -1849,6 +2157,13 @@ Python defines configuration for python auto-instrumentation. Image is a container image with Python SDK and auto-instrumentation.
false + + resourceRequirements + object + + Resources describes the compute resource requirements.
+ + false @@ -2099,6 +2414,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.python.resourceRequirements +[↩ Parent](#instrumentationspecpython) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.python.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecpythonresourcerequirements) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.resource [↩ Parent](#instrumentationspec) diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 8d3f9b857..8d44e993f 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -103,9 +103,10 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: dotNetSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Name: initContainerName, + Image: dotNetSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Resources: dotNetSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, MountPath: "/otel-auto-instrumentation", diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 7bfc78a35..5855f100e 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -34,7 +34,7 @@ func TestInjectDotNetSDK(t *testing.T) { }{ { name: "CORECLR_ENABLE_PROFILING, CORECLR_PROFILER, CORECLR_PROFILER_PATH, DOTNET_STARTUP_HOOKS, DOTNET_SHARED_STORE, DOTNET_ADDITIONAL_DEPS, OTEL_DOTNET_AUTO_HOME not defined", - DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}, Resources: testResourceRequirements}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -61,6 +61,7 @@ func TestInjectDotNetSDK(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 7ade3b7b3..25d36387a 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -14,7 +14,9 @@ package instrumentation -import corev1 "k8s.io/api/core/v1" +import ( + corev1 "k8s.io/api/core/v1" +) // Calculate if we already inject InitContainers. func isInitContainerMissing(pod corev1.Pod) bool { diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 02688ac0d..9c3ba1238 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -66,9 +66,10 @@ func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1. }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: javaSpec.Image, - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Name: initContainerName, + Image: javaSpec.Image, + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Resources: javaSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, MountPath: "/otel-auto-instrumentation", diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index ab3a6f885..f20aa1dc7 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -85,7 +85,7 @@ func TestInjectJavaagent(t *testing.T) { }, { name: "JAVA_TOOL_OPTIONS defined", - Java: v1alpha1.Java{Image: "foo/bar:1"}, + Java: v1alpha1.Java{Image: "foo/bar:1", Resources: testResourceRequirements}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -119,6 +119,7 @@ func TestInjectJavaagent(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index d1a4e180e..427c7a763 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -66,9 +66,10 @@ func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: nodeJSSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Name: initContainerName, + Image: nodeJSSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Resources: nodeJSSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, MountPath: "/otel-auto-instrumentation", diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 3054f029a..95a072885 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -85,7 +85,7 @@ func TestInjectNodeJSSDK(t *testing.T) { }, { name: "NODE_OPTIONS defined", - NodeJS: v1alpha1.NodeJS{Image: "foo/bar:1"}, + NodeJS: v1alpha1.NodeJS{Image: "foo/bar:1", Resources: testResourceRequirements}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -119,6 +119,7 @@ func TestInjectNodeJSSDK(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index da8ebd3af..439f97fd0 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -72,6 +72,7 @@ func TestMutatePod(t *testing.T) { Value: "false", }, }, + Resources: testResourceRequirements, }, Env: []corev1.EnvVar{ { @@ -141,6 +142,7 @@ func TestMutatePod(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index b7eaebc68..47c7ff206 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -109,9 +109,10 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, - Image: pythonSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Name: initContainerName, + Image: pythonSpec.Image, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Resources: pythonSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ Name: volumeName, MountPath: "/otel-auto-instrumentation", diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 716f21fb3..787afd2c9 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -101,7 +101,7 @@ func TestInjectPythonSDK(t *testing.T) { }, { name: "PYTHONPATH defined", - Python: v1alpha1.Python{Image: "foo/bar:1"}, + Python: v1alpha1.Python{Image: "foo/bar:1", Resources: testResourceRequirements}, pod: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ @@ -135,6 +135,7 @@ func TestInjectPythonSDK(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 24e457ce7..314b2814d 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -25,11 +25,23 @@ import ( "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) +var testResourceRequirements = corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + }, +} + func TestSDKInjection(t *testing.T) { ns := corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -376,7 +388,8 @@ func TestInjectJava(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Java: v1alpha1.Java{ - Image: "img:1", + Image: "img:1", + Resources: testResourceRequirements, }, Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4317", @@ -419,6 +432,7 @@ func TestInjectJava(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ @@ -474,7 +488,8 @@ func TestInjectNodeJS(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ NodeJS: v1alpha1.NodeJS{ - Image: "img:1", + Image: "img:1", + Resources: testResourceRequirements, }, Exporter: v1alpha1.Exporter{ Endpoint: "https://collector:4318", @@ -517,6 +532,7 @@ func TestInjectNodeJS(t *testing.T) { Name: volumeName, MountPath: "/otel-auto-instrumentation", }}, + Resources: testResourceRequirements, }, }, Containers: []corev1.Container{ diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index a5946f895..fecefaaf7 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -50,5 +50,12 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + resources: + limits: + cpu: "500m" + memory: "128Mi" + requests: + cpu: "50m" + memory: "128Mi" status: phase: Running diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index d3505b046..c6bb4185a 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -44,5 +44,12 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + resources: + limits: + cpu: "500m" + memory: "64Mi" + requests: + cpu: "50m" + memory: "64Mi" status: phase: Running diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index 3190895a5..e5f840048 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -40,5 +40,13 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + resources: + limits: + cpu: "500m" + memory: "128Mi" + requests: + cpu: "50m" + memory: "128Mi" + status: phase: Running diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index 4b7c122ae..0e3bddd73 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -46,5 +46,12 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + resources: + limits: + cpu: "500m" + memory: "32Mi" + requests: + cpu: "50m" + memory: "32Mi" status: phase: Running From 45ebd3fea2721f8c9c60de7b7371215126a532e1 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 11 May 2023 14:23:38 -0400 Subject: [PATCH 0851/1234] add conditions to logins (#1731) --- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 ++ .github/workflows/publish-autoinstrumentation-java.yaml | 2 ++ .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 ++ .github/workflows/publish-autoinstrumentation-python.yaml | 2 ++ .github/workflows/publish-images.yaml | 2 ++ .github/workflows/publish-operator-opamp-bridge.yaml | 2 ++ .github/workflows/publish-target-allocator.yaml | 2 ++ 7 files changed, 14 insertions(+) diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 8f5580bc1..316f7904d 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -49,12 +49,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 03b4712d5..0a1c306ba 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -49,12 +49,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 9db13d692..a1f82c44e 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -49,12 +49,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index a4b783c16..7da7dd05b 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -49,12 +49,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 69c22eb63..22c552d54 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -62,12 +62,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 452a623e4..7934bb6eb 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -52,12 +52,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index b45005218..1b03c5546 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -52,12 +52,14 @@ jobs: - name: Log into Docker.io uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} with: registry: ghcr.io username: ${{ github.repository_owner }} From 87d4e103b2484fbedb7232d124c6e5cd7b2c84b7 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 11 May 2023 12:25:27 -0600 Subject: [PATCH 0852/1234] Add support for Go auto-instrumentation (#1555) * Add support for Golang instr * Handle container-names gracefully * Put Golang behind feature gate * Update apis/v1alpha1/instrumentation_types.go Co-authored-by: Jacob Aronoff * Update pkg/instrumentation/podmutator_test.go Co-authored-by: Jacob Aronoff * Update pkg/instrumentation/podmutator_test.go Co-authored-by: Jacob Aronoff * Make bundle * Fix argument for e2e testing * Use Go instead of Golang * Use opentelemetry-demo go image * Apply feedback * fix test * cleanup merge * Fix tests * Update to use otel image * Fix test assertion * Update exe annotation to match env var name * Revert file * Update README * Update OTEL_GO_AUTO_TARGET_EXE docs * Fix type --------- Co-authored-by: Jacob Aronoff --- .chloggen/add-go-instrumentation.yaml | 16 + Dockerfile | 3 +- Makefile | 5 +- README.md | 30 +- apis/v1alpha1/instrumentation_types.go | 19 ++ apis/v1alpha1/instrumentation_webhook.go | 9 + apis/v1alpha1/zz_generated.deepcopy.go | 23 ++ ...emetry-operator.clusterserviceversion.yaml | 3 +- .../opentelemetry.io_instrumentations.yaml | 130 ++++++++ .../opentelemetry.io_instrumentations.yaml | 130 ++++++++ config/default/manager_auth_proxy_patch.yaml | 1 + docs/api.md | 287 ++++++++++++++++++ internal/config/main.go | 6 + internal/config/options.go | 7 + internal/version/main.go | 13 +- main.go | 6 + pkg/featuregate/featuregate.go | 4 + pkg/instrumentation/annotation.go | 2 + pkg/instrumentation/golang.go | 94 ++++++ pkg/instrumentation/golang_test.go | 272 +++++++++++++++++ pkg/instrumentation/helper.go | 6 + pkg/instrumentation/podmutator.go | 15 +- pkg/instrumentation/podmutator_test.go | 252 +++++++++++++++ pkg/instrumentation/sdk.go | 47 ++- pkg/instrumentation/sdk_test.go | 282 ++++++++++++++++- pkg/instrumentation/upgrade/upgrade.go | 14 + pkg/instrumentation/upgrade/upgrade_test.go | 13 + .../00-install-collector.yaml | 23 ++ .../00-install-instrumentation.yaml | 26 ++ tests/e2e/instrumentation-go/01-assert.yaml | 44 +++ .../instrumentation-go/01-install-app.yaml | 21 ++ versions.txt | 3 + 32 files changed, 1783 insertions(+), 23 deletions(-) create mode 100755 .chloggen/add-go-instrumentation.yaml create mode 100644 pkg/instrumentation/golang.go create mode 100644 pkg/instrumentation/golang_test.go create mode 100644 tests/e2e/instrumentation-go/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-go/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-go/01-assert.yaml create mode 100644 tests/e2e/instrumentation-go/01-install-app.yaml diff --git a/.chloggen/add-go-instrumentation.yaml b/.chloggen/add-go-instrumentation.yaml new file mode 100755 index 000000000..767b9bdf0 --- /dev/null +++ b/.chloggen/add-go-instrumentation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for Go auto instrumentation + +# One or more tracking issues related to the change +issues: [1555] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Dockerfile b/Dockerfile index fcc24bc3c..c7b895fd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,9 +27,10 @@ ARG AUTO_INSTRUMENTATION_JAVA_VERSION ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION ARG AUTO_INSTRUMENTATION_DOTNET_VERSION +ARG AUTO_INSTRUMENTATION_GO_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 655405202..8e0d6bb96 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,9 @@ AUTO_INSTRUMENTATION_JAVA_VERSION ?= "$(shell grep -v '\#' versions.txt | grep a AUTO_INSTRUMENTATION_NODEJS_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" +AUTO_INSTRUMENTATION_GO_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION}" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION}" ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets @@ -198,7 +199,7 @@ scorecard-tests: operator-sdk # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} . + docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push diff --git a/README.md b/README.md index 693b29897..e332a5188 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ When using sidecar mode the OpenTelemetry collector container will have the envi ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently DotNet, Java, NodeJS and Python are supported. +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently DotNet, Go, Java, NodeJS and Python are supported. To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. @@ -253,6 +253,17 @@ DotNet: instrumentation.opentelemetry.io/inject-dotnet: "true" ``` +Go: + +Go auto-instrumentation also honors an annotation that will be used to set the [OTEL_GO_AUTO_TARGET_EXE env var](https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/main/docs/how-it-works.md). +This env var can also be set via the Instrumentation resource, with the annotation taking precedence. +Since Go auto-instrumentation requires `OTEL_GO_AUTO_TARGET_EXE` to be set, you must supply a valid +executable path via the annotation or the Instrumentation resource. Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. +```bash +instrumentation.opentelemetry.io/inject-go: "true" +instrumentation.opentelemetry.io/otel-go-auto-target-exe: "/path/to/container/executable" +``` + OpenTelemetry SDK environment variables only: ```bash instrumentation.opentelemetry.io/inject-sdk: "true" @@ -302,6 +313,8 @@ spec: In the above case, `myapp` and `myapp2` containers will be instrumented, `myapp3` will not. +**NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first pod should be the only pod you want instrumented. + #### Use customized or vendor instrumentation By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by @@ -321,6 +334,8 @@ spec: image: your-customized-auto-instrumentation-image:python dotnet: image: your-customized-auto-instrumentation-image:dotnet + go: + image: your-customized-auto-instrumentation-image:go ``` The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). @@ -343,12 +358,13 @@ Prefix a gate with '-' to disable support for the corresponding language. Prefixing a gate with '+' or no prefix will enable support for the corresponding language. If a language is enabled by default its gate only needs to be supplied when disabling the gate. -| Language | Gate | Default Value | -|----------|---------------------------------------|-----------------| -| Java | `operator.autoinstrumentation.java` | enabled | -| NodeJS | `operator.autoinstrumentation.nodejs` | enabled | -| Python | `operator.autoinstrumentation.python` | enabled | -| DotNet | `operator.autoinstrumentation.dotnet` | enabled | +| Language | Gate | Default Value | +|----------|---------------------------------------|---------------| +| Java | `operator.autoinstrumentation.java` | enabled | +| NodeJS | `operator.autoinstrumentation.nodejs` | enabled | +| Python | `operator.autoinstrumentation.python` | enabled | +| DotNet | `operator.autoinstrumentation.dotnet` | enabled | +| Go | `operator.autoinstrumentation.go` | disabled | Language not specified in the table are always supported and cannot be disabled. diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index ad4ce935f..91daf698e 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -61,6 +61,13 @@ type InstrumentationSpec struct { // +optional DotNet DotNet `json:"dotnet,omitempty"` + // Go defines configuration for Go auto-instrumentation. + // When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the + // Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. + // Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. + // +optional + Go Go `json:"go,omitempty"` + // Apache defines configuration for Apache HTTPD auto-instrumentation. // +optional ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"` @@ -169,6 +176,18 @@ type DotNet struct { Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } +type Go struct { + // Image is a container image with Go SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // Env defines Go specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` +} + // ApacheHttpd defines Apache SDK and instrumentation configuration. type ApacheHttpd struct { // Image is a container image with Apache SDK and auto-instrumentation. diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index fed2f182f..cbd750b68 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -32,6 +32,7 @@ const ( AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" + AnnotationDefaultAutoInstrumentationGo = "instrumentation.opentelemetry.io/default-auto-instrumentation-go-image" AnnotationDefaultAutoInstrumentationApacheHttpd = "instrumentation.opentelemetry.io/default-auto-instrumentation-apache-httpd-image" envPrefix = "OTEL_" envSplunkPrefix = "SPLUNK_" @@ -128,6 +129,11 @@ func (r *Instrumentation) Default() { corev1.ResourceMemory: resource.MustParse("128Mi"), } } + if r.Spec.Go.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationGo]; ok { + r.Spec.Go.Image = val + } + } if r.Spec.ApacheHttpd.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationApacheHttpd]; ok { r.Spec.ApacheHttpd.Image = val @@ -207,6 +213,9 @@ func (r *Instrumentation) validate() error { if err := r.validateEnv(r.Spec.DotNet.Env); err != nil { return err } + if err := r.validateEnv(r.Spec.Go.Env); err != nil { + return err + } if err := r.validateEnv(r.Spec.ApacheHttpd.Env); err != nil { return err } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9e5032922..570843c9a 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -134,6 +134,28 @@ func (in *Exporter) DeepCopy() *Exporter { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Go) DeepCopyInto(out *Go) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Go. +func (in *Go) DeepCopy() *Go { + if in == nil { + return nil + } + out := new(Go) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Ingress) DeepCopyInto(out *Ingress) { *out = *in @@ -250,6 +272,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { in.NodeJS.DeepCopyInto(&out.NodeJS) in.Python.DeepCopyInto(&out.Python) in.DotNet.DeepCopyInto(&out.DotNet) + in.Go.DeepCopyInto(&out.Go) in.ApacheHttpd.DeepCopyInto(&out.ApacheHttpd) } diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 11c43f1d8..01a035a83 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-05-08T15:42:30Z" + createdAt: "2023-05-09T13:51:52Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 @@ -307,6 +307,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano + - --feature-gates=+operator.autoinstrumentation.go image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.76.1 livenessProbe: httpGet: diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 2826ed300..c590192ba 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -644,6 +644,136 @@ spec: description: Endpoint is address of the collector with OTLP endpoint. type: string type: object + go: + description: Go defines configuration for Go auto-instrumentation. + When using Go auto-instrumenetation you must provide a value for + the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env + vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe + pod annotation. Failure to set this value causes instrumentation + injection to abort, leaving the original pod unchanged. + properties: + env: + description: 'Env defines Go specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Go SDK and auto-instrumentation. + type: string + type: object java: description: Java defines configuration for java auto-instrumentation. properties: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 95a842b31..d0d56ec65 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -643,6 +643,136 @@ spec: description: Endpoint is address of the collector with OTLP endpoint. type: string type: object + go: + description: Go defines configuration for Go auto-instrumentation. + When using Go auto-instrumenetation you must provide a value for + the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env + vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe + pod annotation. Failure to set this value causes instrumentation + injection to abort, leaving the original pod unchanged. + properties: + env: + description: 'Env defines Go specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Go SDK and auto-instrumentation. + type: string + type: object java: description: Java defines configuration for java auto-instrumentation. properties: diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index f44f9c71e..126a4ad43 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -33,3 +33,4 @@ spec: - "--enable-leader-election" - "--zap-log-level=info" - "--zap-time-encoding=rfc3339nano" + - "--feature-gates=+operator.autoinstrumentation.go" diff --git a/docs/api.md b/docs/api.md index 2d3625edd..681d312f4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -113,6 +113,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen Exporter defines exporter configuration.
false + + go + object + + Go defines configuration for Go auto-instrumentation. When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged.
+ + false java object @@ -1413,6 +1420,286 @@ Exporter defines exporter configuration. +### Instrumentation.spec.go +[↩ Parent](#instrumentationspec) + + + +Go defines configuration for Go auto-instrumentation. When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
env[]object + Env defines Go specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with Go SDK and auto-instrumentation.
+
false
+ + +### Instrumentation.spec.go.env[index] +[↩ Parent](#instrumentationspecgo) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.go.env[index].valueFrom +[↩ Parent](#instrumentationspecgoenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.go.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecgoenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.go.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecgoenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.go.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecgoenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.go.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecgoenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + ### Instrumentation.spec.java [↩ Parent](#instrumentationspec) diff --git a/internal/config/main.go b/internal/config/main.go index 1d529379f..2304e31fb 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -42,6 +42,7 @@ type Config struct { collectorImage string collectorConfigMapEntry string autoInstrumentationDotNetImage string + autoInstrumentationGoImage string targetAllocatorConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string @@ -188,6 +189,11 @@ func (c *Config) AutoInstrumentationDotNetImage() string { return c.autoInstrumentationDotNetImage } +// AutoInstrumentationGoImage returns OpenTelemetry Go auto-instrumentation container image. +func (c *Config) AutoInstrumentationGoImage() string { + return c.autoInstrumentationGoImage +} + // LabelsFilter Returns the filters converted to regex strings used to filter out unwanted labels from propagations. func (c *Config) LabelsFilter() []string { return c.labelsFilter diff --git a/internal/config/options.go b/internal/config/options.go index f86cdeb71..b8e57889c 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -33,6 +33,7 @@ type options struct { version version.Version logger logr.Logger autoInstrumentationDotNetImage string + autoInstrumentationGoImage string autoInstrumentationJavaImage string autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string @@ -132,6 +133,12 @@ func WithAutoInstrumentationDotNetImage(s string) Option { } } +func WithAutoInstrumentationGoImage(s string) Option { + return func(o *options) { + o.autoInstrumentationGoImage = s + } +} + func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/version/main.go b/internal/version/main.go index d941920a6..e132bd4b3 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -30,6 +30,7 @@ var ( autoInstrumentationNodeJS string autoInstrumentationPython string autoInstrumentationDotNet string + autoInstrumentationGo string ) // Version holds this Operator's version as well as the version of some of the components it uses. @@ -44,6 +45,7 @@ type Version struct { AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` AutoInstrumentationPython string `json:"auto-instrumentation-python"` AutoInstrumentationDotNet string `json:"auto-instrumentation-dotnet"` + AutoInstrumentationGo string `json:"auto-instrumentation-go"` } // Get returns the Version object with the relevant information. @@ -59,12 +61,13 @@ func Get() Version { AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), AutoInstrumentationPython: AutoInstrumentationPython(), AutoInstrumentationDotNet: AutoInstrumentationDotNet(), + AutoInstrumentationGo: AutoInstrumentationGo(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, @@ -75,6 +78,7 @@ func (v Version) String() string { v.AutoInstrumentationNodeJS, v.AutoInstrumentationPython, v.AutoInstrumentationDotNet, + v.AutoInstrumentationGo, ) } @@ -138,3 +142,10 @@ func AutoInstrumentationDotNet() string { } return "0.0.0" } + +func AutoInstrumentationGo() string { + if len(autoInstrumentationGo) > 0 { + return autoInstrumentationGo + } + return "0.0.0" +} diff --git a/main.go b/main.go index 7245737a2..4aed72a33 100644 --- a/main.go +++ b/main.go @@ -95,6 +95,7 @@ func main() { autoInstrumentationNodeJS string autoInstrumentationPython string autoInstrumentationDotNet string + autoInstrumentationGo string labelsFilter []string webhookPort int tlsOpt tlsConfig @@ -112,6 +113,7 @@ func main() { pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") @@ -130,6 +132,7 @@ func main() { "auto-instrumentation-nodejs", autoInstrumentationNodeJS, "auto-instrumentation-python", autoInstrumentationPython, "auto-instrumentation-dotnet", autoInstrumentationDotNet, + "auto-instrumentation-go", autoInstrumentationGo, "feature-gates", flagset.Lookup(featuregate.FeatureGatesFlag).Value.String(), "build-date", v.BuildDate, "go-version", v.Go, @@ -157,6 +160,7 @@ func main() { config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), config.WithAutoInstrumentationDotNetImage(autoInstrumentationDotNet), + config.WithAutoInstrumentationGoImage(autoInstrumentationGo), config.WithAutoDetect(ad), config.WithLabelFilters(labelsFilter), ) @@ -232,6 +236,7 @@ func main() { otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, + otelv1alpha1.AnnotationDefaultAutoInstrumentationGo: autoInstrumentationGo, }, }, }).SetupWebhookWithManager(mgr); err != nil { @@ -297,6 +302,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), + DefaultAutoInstGo: cfg.AutoInstrumentationDotNetImage(), Client: mgr.GetClient(), Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), } diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index c4f60ec1e..6fe2335a8 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -41,6 +41,10 @@ var ( "operator.autoinstrumentation.nodejs", featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator supports NodeJS auto-instrumentation")) + EnableGoAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.go", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("controls whether the operator supports Goland auto-instrumentation")) // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should // automatically be rewritten when the target allocator is enabled. diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 53817d5c8..a49ca6e36 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -27,6 +27,8 @@ const ( annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" + annotationInjectGo = "instrumentation.opentelemetry.io/inject-go" + annotationGoExecPath = "instrumentation.opentelemetry.io/otel-go-auto-target-exe" annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" ) diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go new file mode 100644 index 000000000..e52add1ae --- /dev/null +++ b/pkg/instrumentation/golang.go @@ -0,0 +1,94 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "strings" + + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + envOtelTargetExe = "OTEL_GO_AUTO_TARGET_EXE" + + kernelDebugVolumeName = "kernel-debug" + kernelDebugVolumePath = "/sys/kernel/debug" +) + +func injectGoSDK(goSpec v1alpha1.Go, pod corev1.Pod) (corev1.Pod, error) { + // skip instrumentation if share process namespaces is explicitly disabled + if pod.Spec.ShareProcessNamespace != nil && !*pod.Spec.ShareProcessNamespace { + return pod, fmt.Errorf("shared process namespace has been explicitly disabled") + } + + containerNames, ok := pod.Annotations[annotationInjectContainerName] + if ok && len(strings.Split(containerNames, ",")) > 1 { + return pod, fmt.Errorf("go instrumentation cannot be injected into a pod using instrumentation.opentelemetry.io/container-names with more than 1 container") + } + + true := true + zero := int64(0) + pod.Spec.ShareProcessNamespace = &true + + goAgent := corev1.Container{ + Name: sideCarName, + Image: goSpec.Image, + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + } + + // Annotation takes precedence for OTEL_GO_AUTO_TARGET_EXE + execPath, ok := pod.Annotations[annotationGoExecPath] + if ok { + goAgent.Env = append(goAgent.Env, corev1.EnvVar{ + Name: envOtelTargetExe, + Value: execPath, + }) + } + + // Inject Go instrumentation spec env vars. + // For Go, env vars must be added to the agent contain + for _, env := range goSpec.Env { + idx := getIndexOfEnv(goAgent.Env, env.Name) + if idx == -1 { + goAgent.Env = append(goAgent.Env, env) + } + } + + pod.Spec.Containers = append(pod.Spec.Containers, goAgent) + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }) + return pod, nil +} diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go new file mode 100644 index 000000000..058ca3c72 --- /dev/null +++ b/pkg/instrumentation/golang_test.go @@ -0,0 +1,272 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestInjectGoSDK(t *testing.T) { + falsee := false + true := true + zero := int64(0) + + tests := []struct { + name string + v1alpha1.Go + pod corev1.Pod + expected corev1.Pod + err error + }{ + { + name: "shared process namespace disabled", + Go: v1alpha1.Go{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &falsee, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &falsee, + }, + }, + err: fmt.Errorf("shared process namespace has been explicitly disabled"), + }, + { + name: "using container-names", + Go: v1alpha1.Go{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/container-names": "foo,bar", + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/container-names": "foo,bar", + }, + }, + }, + err: fmt.Errorf("go instrumentation cannot be injected into a pod using instrumentation.opentelemetry.io/container-names with more than 1 container"), + }, + { + name: "pod annotation takes precedence", + Go: v1alpha1.Go{ + Image: "foo/bar:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/otel-go-auto-target-exe": "bar", + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/otel-go-auto-target-exe": "bar", + }, + }, + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: sideCarName, + Image: "foo/bar:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "bar", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + }, + { + name: "use instrumentation env var", + Go: v1alpha1.Go{ + Image: "foo/bar:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/container-names": "foo", + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/container-names": "foo", + }, + }, + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: sideCarName, + Image: "foo/bar:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + }, + { + name: "inject env vars", + Go: v1alpha1.Go{ + Image: "foo/bar:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_1", + Value: "foo", + }, + { + Name: "OTEL_2", + Value: "bar", + }, + }, + }, + pod: corev1.Pod{}, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: sideCarName, + Image: "foo/bar:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_1", + Value: "foo", + }, + { + Name: "OTEL_2", + Value: "bar", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod, err := injectGoSDK(test.Go, test.pod) + assert.Equal(t, test.expected, pod) + assert.Equal(t, test.err, err) + }) + } +} diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 25d36387a..81c01652b 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -35,5 +35,11 @@ func isAutoInstrumentationInjected(pod corev1.Pod) bool { return true } } + // Go uses a side car + for _, cont := range pod.Spec.Containers { + if cont.Name == sideCarName { + return true + } + } return false } diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index d9ffe414f..629f89fff 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -47,6 +47,7 @@ type languageInstrumentations struct { NodeJS *v1alpha1.Instrumentation Python *v1alpha1.Instrumentation DotNet *v1alpha1.Instrumentation + Go *v1alpha1.Instrumentation Sdk *v1alpha1.Instrumentation } @@ -128,6 +129,18 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for .NET auto instrumentation is not enabled") } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectGo); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + if featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.Go = inst + } else { + logger.Error(err, "support for Go auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Go auto instrumentation is not enabled") + } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectSdk); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") @@ -135,7 +148,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } insts.Sdk = inst - if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Sdk == nil { + if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Go == nil && insts.Sdk == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 439f97fd0..86f535469 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -35,6 +35,9 @@ func TestMutatePod(t *testing.T) { mutator := NewMutator(logr.Discard(), k8sClient, record.NewFakeRecorder(100)) require.NotNil(t, mutator) + true := true + zero := int64(0) + tests := []struct { name string err string @@ -1115,6 +1118,255 @@ func TestMutatePod(t *testing.T) { }) }, }, + { + name: "go injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "go", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "go", + }, + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: "app", + }, + { + Name: sideCarName, + Image: "otel/go:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "/app", + }, + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=go,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "go injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "go-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "go-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index b126427d7..65aea489c 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -41,6 +41,7 @@ import ( const ( volumeName = "opentelemetry-auto-instrumentation" initContainerName = "opentelemetry-auto-instrumentation" + sideCarName = "opentelemetry-auto-instrumentation" ) // inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -73,7 +74,7 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations i.logger.Info("Skipping javaagent injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } } if insts.NodeJS != nil { @@ -85,7 +86,7 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations i.logger.Info("Skipping NodeJS SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } } if insts.Python != nil { @@ -97,7 +98,7 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations i.logger.Info("Skipping Python SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } } if insts.DotNet != nil { @@ -109,14 +110,35 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations i.logger.Info("Skipping DotNet SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + } + } + if insts.Go != nil { + origPod := pod + otelinst := *insts.Go + var err error + i.logger.V(1).Info("injecting Go instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + pod, err = injectGoSDK(otelinst.Spec.Go, pod) + if err != nil { + i.logger.Info("Skipping Go SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + // Common env vars and config need to be applied to the agent contain. + pod = i.injectCommonEnvVar(otelinst, pod, len(pod.Spec.Containers)-1) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, len(pod.Spec.Containers)-1, 0) + + // Ensure that after all the env var coalescing we have a value for OTEL_GO_AUTO_TARGET_EXE + idx := getIndexOfEnv(pod.Spec.Containers[len(pod.Spec.Containers)-1].Env, envOtelTargetExe) + if idx == -1 { + i.logger.Info("Skipping Go SDK injection", "reason", "OTEL_GO_AUTO_TARGET_EXE not set", "container", pod.Spec.Containers[index].Name) + pod = origPod + } } } if insts.Sdk != nil { otelinst := *insts.Sdk i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } return pod } @@ -132,14 +154,21 @@ func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod return pod } -func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) corev1.Pod { - container := &pod.Spec.Containers[index] - resourceMap := i.createResourceMap(ctx, otelinst, ns, pod, index) +// injectCommonSDKConfig adds common SDK configuration environment variables to the necessary pod +// agentIndex represents the index of the pod the needs the env vars to instrument the application. +// appIndex represents the index of the pod the will produce the telemetry. +// When the pod handling the instrumentation is the same as the pod producing the telemetry agentIndex +// and appIndex should be the same value. This is true for dotnet, java, nodejs, and python instrumentations. +// Go requires the agent to be a different container in the pod, so the agentIndex should represent this new sidecar +// and appIndex should represent the application being instrumented. +func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, agentIndex int, appIndex int) corev1.Pod { + container := &pod.Spec.Containers[agentIndex] + resourceMap := i.createResourceMap(ctx, otelinst, ns, pod, appIndex) idx := getIndexOfEnv(container.Env, constants.EnvOTELServiceName) if idx == -1 { container.Env = append(container.Env, corev1.EnvVar{ Name: constants.EnvOTELServiceName, - Value: chooseServiceName(pod, resourceMap, index), + Value: chooseServiceName(pod, resourceMap, appIndex), }) } if otelinst.Spec.Exporter.Endpoint != "" { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 314b2814d..c2c04beb9 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -376,7 +376,7 @@ func TestSDKInjection(t *testing.T) { inj := sdkInjector{ client: k8sClient, } - pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod, 0) + pod := inj.injectCommonSDKConfig(context.Background(), test.inst, corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: test.pod.Namespace}}, test.pod, 0, 0) _, err = json.MarshalIndent(pod, "", " ") assert.NoError(t, err) assert.Equal(t, test.expected, pod) @@ -821,6 +821,286 @@ func TestInjectDotNet(t *testing.T) { }, pod) } +func TestInjectGo(t *testing.T) { + falsee := false + true := true + zero := int64(0) + + tests := []struct { + name string + insts languageInstrumentations + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "shared process namespace disabled", + insts: languageInstrumentations{ + Go: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + }, + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &falsee, + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &falsee, + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "OTEL_GO_AUTO_TARGET_EXE not set", + insts: languageInstrumentations{ + Go: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + }, + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "OTEL_GO_AUTO_TARGET_EXE set by inst", + insts: languageInstrumentations{ + Go: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + }, + }, + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: "app", + }, + { + Name: sideCarName, + Image: "otel/go:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + }, + { + name: "OTEL_GO_AUTO_TARGET_EXE set by annotation", + insts: languageInstrumentations{ + Go: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/otel-go-auto-target-exe": "foo", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/otel-go-auto-target-exe": "foo", + }, + }, + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: "app", + }, + { + Name: sideCarName, + Image: "otel/go:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "foo", + }, + + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod, "") + assert.Equal(t, test.expected, pod) + }) + } +} + func TestInjectSdkOnly(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index d4487dee8..2edc4af7d 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -35,6 +35,7 @@ type InstrumentationUpgrade struct { DefaultAutoInstNodeJS string DefaultAutoInstPython string DefaultAutoInstDotNet string + DefaultAutoInstGo string } // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch @@ -124,5 +125,18 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for .NET auto instrumentation is not enabled") } } + autoInstGo := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo] + if autoInstGo != "" { + if featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.Go.Image == autoInstGo { + inst.Spec.Go.Image = u.DefaultAutoInstGo + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo] = u.DefaultAutoInstGo + } + } else { + u.Logger.Error(nil, "support for Go auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Go auto instrumentation is not enabled") + } + } return inst } diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 89a1c251d..139cfd8cf 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -22,14 +22,22 @@ import ( "github.com/go-logr/logr" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + colfeaturegate "go.opentelemetry.io/collector/featuregate" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) func TestUpgrade(t *testing.T) { + originalVal := featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal)) + }) + nsName := strings.ToLower(t.Name()) err := k8sClient.Create(context.Background(), &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -47,6 +55,7 @@ func TestUpgrade(t *testing.T) { v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", + v1alpha1.AnnotationDefaultAutoInstrumentationGo: "go:1", }, }, Spec: v1alpha1.InstrumentationSpec{ @@ -60,6 +69,7 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "nodejs:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python:1", inst.Spec.Python.Image) assert.Equal(t, "dotnet:1", inst.Spec.DotNet.Image) + assert.Equal(t, "go:1", inst.Spec.Go.Image) err = k8sClient.Create(context.Background(), inst) require.NoError(t, err) @@ -69,6 +79,7 @@ func TestUpgrade(t *testing.T) { DefaultAutoInstNodeJS: "nodejs:2", DefaultAutoInstPython: "python:2", DefaultAutoInstDotNet: "dotnet:2", + DefaultAutoInstGo: "go:2", Client: k8sClient, } err = up.ManagedInstances(context.Background()) @@ -88,4 +99,6 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "python:2", updated.Spec.Python.Image) assert.Equal(t, "dotnet:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet]) assert.Equal(t, "dotnet:2", updated.Spec.DotNet.Image) + assert.Equal(t, "go:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo]) + assert.Equal(t, "go:2", updated.Spec.Go.Image) } diff --git a/tests/e2e/instrumentation-go/00-install-collector.yaml b/tests/e2e/instrumentation-go/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e/instrumentation-go/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-go/00-install-instrumentation.yaml b/tests/e2e/instrumentation-go/00-install-instrumentation.yaml new file mode 100644 index 000000000..f5f640dbf --- /dev/null +++ b/tests/e2e/instrumentation-go/00-install-instrumentation.yaml @@ -0,0 +1,26 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: go +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" diff --git a/tests/e2e/instrumentation-go/01-assert.yaml b/tests/e2e/instrumentation-go/01-assert.yaml new file mode 100644 index 000000000..bc77cb40d --- /dev/null +++ b/tests/e2e/instrumentation-go/01-assert.yaml @@ -0,0 +1,44 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-go: "true" + instrumentation.opentelemetry.io/otel-go-auto-target-exe: /usr/src/app/productcatalogservice + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: productcatalogservice + - name: otc-container + - name: opentelemetry-auto-instrumentation + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.0-alpha + env: + - name: OTEL_GO_AUTO_TARGET_EXE + value: /usr/src/app/productcatalogservice + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - name: kernel-debug + mountPath: "/sys/kernel/debug" + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + +status: + phase: Running diff --git a/tests/e2e/instrumentation-go/01-install-app.yaml b/tests/e2e/instrumentation-go/01-install-app.yaml new file mode 100644 index 000000000..781d7ac18 --- /dev/null +++ b/tests/e2e/instrumentation-go/01-install-app.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-go: "true" + instrumentation.opentelemetry.io/otel-go-auto-target-exe: /usr/src/app/productcatalogservice + spec: + containers: + - name: productcatalogservice + image: ghcr.io/open-telemetry/demo:1.3.1-productcatalogservice diff --git a/versions.txt b/versions.txt index 8e68a84cc..a41790481 100644 --- a/versions.txt +++ b/versions.txt @@ -29,6 +29,9 @@ autoinstrumentation-python=0.38b0 # Should match autoinstrumentation/dotnet/version.txt autoinstrumentation-dotnet=0.7.0 +# Represents the current release of Go instrumentation. +autoinstrumentation-go=v0.2.0-alpha + # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt autoinstrumentation-apache-httpd=1.0.2 From 625d1e0ce3a866aa4582bc37b0d81680b133663d Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 12 May 2023 06:23:02 -0700 Subject: [PATCH 0853/1234] Update the javaagent version to 1.26.0 (#1730) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index d905a6d1d..5ff8c4f5d 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.25.1 +1.26.0 From 70e760e4db41bc9108981edaa1505a7cbab661a1 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 12 May 2023 10:22:13 -0600 Subject: [PATCH 0854/1234] Move autoscale to its own test suite (#1733) --- .github/workflows/e2e.yaml | 6 +++++- Makefile | 5 +++++ kuttl-test-autoscale.yaml | 6 ++++++ kuttl-test.yaml | 3 ++- tests/{e2e => e2e-autoscale}/autoscale/00-assert.yaml | 0 tests/{e2e => e2e-autoscale}/autoscale/00-install.yaml | 0 .../autoscale/01-check-simplest-collector-hpa.yaml | 0 .../02-check-simplest-set-utilization-collector-hpa.yaml | 0 tests/{e2e => e2e-autoscale}/autoscale/02-install.yaml | 2 +- tests/{e2e => e2e-autoscale}/autoscale/03-assert.yaml | 0 tests/{e2e => e2e-autoscale}/autoscale/03-install.yaml | 0 .../03-verify-simplest-set-collector-hpa-metrics.yaml | 0 tests/{e2e => e2e-autoscale}/autoscale/04-delete.yaml | 0 tests/{e2e => e2e-autoscale}/autoscale/05-assert.yaml | 0 .../autoscale/cmd/verify/wait-and-validate-metrics.go | 0 .../autoscale/wait-until-hpa-ready.go | 0 16 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 kuttl-test-autoscale.yaml rename tests/{e2e => e2e-autoscale}/autoscale/00-assert.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/00-install.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/01-check-simplest-collector-hpa.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/02-install.yaml (98%) rename tests/{e2e => e2e-autoscale}/autoscale/03-assert.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/03-install.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/04-delete.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/05-assert.yaml (100%) rename tests/{e2e => e2e-autoscale}/autoscale/cmd/verify/wait-and-validate-metrics.go (100%) rename tests/{e2e => e2e-autoscale}/autoscale/wait-until-hpa-ready.go (100%) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ead6ef072..0cbf35763 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -11,6 +11,7 @@ jobs: name: End-to-end tests runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: # The e2e tests are run on the lowest and highest supported k8s version. # All Kubernetes version in between expose the same APIs, hence the operator @@ -18,6 +19,9 @@ jobs: kube-version: - "1.19" - "1.26" + group: + - e2e e2e-upgrade + - e2e-autoscale steps: @@ -35,7 +39,7 @@ jobs: - name: "run tests" env: KUBE_VERSION: ${{ matrix.kube-version }} - run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION VERSION=e2e + run: make prepare-e2e ${{ matrix.group }} KUBE_VERSION=$KUBE_VERSION VERSION=e2e - name: "log operator if failed" if: ${{ failure() }} diff --git a/Makefile b/Makefile index 8e0d6bb96..6eaba7ae0 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,11 @@ e2e: e2e-upgrade: undeploy $(KUTTL) test --config kuttl-test-upgrade.yaml +# end-to-end-test for testing autoscale +.PHONY: e2e-autoscale +e2e-autoscale: + $(KUTTL) test --config kuttl-test-autoscale.yaml + .PHONY: e2e-log-operator e2e-log-operator: kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager diff --git a/kuttl-test-autoscale.yaml b/kuttl-test-autoscale.yaml new file mode 100644 index 000000000..93e94af6e --- /dev/null +++ b/kuttl-test-autoscale.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +artifactsDir: ./tests/_build/artifacts/ +testDirs: + - ./tests/e2e-autoscale/ +timeout: 150 diff --git a/kuttl-test.yaml b/kuttl-test.yaml index 3758415cb..401a47821 100644 --- a/kuttl-test.yaml +++ b/kuttl-test.yaml @@ -3,4 +3,5 @@ kind: TestSuite artifactsDir: ./tests/_build/artifacts/ testDirs: - ./tests/e2e/ -timeout: 150 \ No newline at end of file +timeout: 150 +parallel: 4 diff --git a/tests/e2e/autoscale/00-assert.yaml b/tests/e2e-autoscale/autoscale/00-assert.yaml similarity index 100% rename from tests/e2e/autoscale/00-assert.yaml rename to tests/e2e-autoscale/autoscale/00-assert.yaml diff --git a/tests/e2e/autoscale/00-install.yaml b/tests/e2e-autoscale/autoscale/00-install.yaml similarity index 100% rename from tests/e2e/autoscale/00-install.yaml rename to tests/e2e-autoscale/autoscale/00-install.yaml diff --git a/tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml b/tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml similarity index 100% rename from tests/e2e/autoscale/01-check-simplest-collector-hpa.yaml rename to tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml diff --git a/tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml b/tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml similarity index 100% rename from tests/e2e/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml rename to tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml diff --git a/tests/e2e/autoscale/02-install.yaml b/tests/e2e-autoscale/autoscale/02-install.yaml similarity index 98% rename from tests/e2e/autoscale/02-install.yaml rename to tests/e2e-autoscale/autoscale/02-install.yaml index 3fe9d8625..a9a6d549c 100644 --- a/tests/e2e/autoscale/02-install.yaml +++ b/tests/e2e-autoscale/autoscale/02-install.yaml @@ -19,7 +19,7 @@ spec: stabilizationWindowSeconds: 1 resources: limits: - cpu: 250m + cpu: 100m memory: 128Mi requests: cpu: 5m diff --git a/tests/e2e/autoscale/03-assert.yaml b/tests/e2e-autoscale/autoscale/03-assert.yaml similarity index 100% rename from tests/e2e/autoscale/03-assert.yaml rename to tests/e2e-autoscale/autoscale/03-assert.yaml diff --git a/tests/e2e/autoscale/03-install.yaml b/tests/e2e-autoscale/autoscale/03-install.yaml similarity index 100% rename from tests/e2e/autoscale/03-install.yaml rename to tests/e2e-autoscale/autoscale/03-install.yaml diff --git a/tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml b/tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml similarity index 100% rename from tests/e2e/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml rename to tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml diff --git a/tests/e2e/autoscale/04-delete.yaml b/tests/e2e-autoscale/autoscale/04-delete.yaml similarity index 100% rename from tests/e2e/autoscale/04-delete.yaml rename to tests/e2e-autoscale/autoscale/04-delete.yaml diff --git a/tests/e2e/autoscale/05-assert.yaml b/tests/e2e-autoscale/autoscale/05-assert.yaml similarity index 100% rename from tests/e2e/autoscale/05-assert.yaml rename to tests/e2e-autoscale/autoscale/05-assert.yaml diff --git a/tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go similarity index 100% rename from tests/e2e/autoscale/cmd/verify/wait-and-validate-metrics.go rename to tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go diff --git a/tests/e2e/autoscale/wait-until-hpa-ready.go b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go similarity index 100% rename from tests/e2e/autoscale/wait-until-hpa-ready.go rename to tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go From 0531d0574f5062fafe6eaa98c06f3f0410f8bb83 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Mon, 15 May 2023 14:23:16 -0600 Subject: [PATCH 0855/1234] Update PR actions to cancel when updated (#1741) --- .github/workflows/continuous-integration.yaml | 4 ++++ .github/workflows/e2e.yaml | 4 ++++ .../workflows/publish-autoinstrumentation-apache-httpd.yaml | 4 ++++ .github/workflows/publish-autoinstrumentation-dotnet.yaml | 4 ++++ .github/workflows/publish-autoinstrumentation-java.yaml | 5 +++++ .github/workflows/publish-autoinstrumentation-nodejs.yaml | 5 +++++ .github/workflows/publish-autoinstrumentation-python.yaml | 5 +++++ .github/workflows/scorecard.yaml | 4 ++++ 8 files changed, 35 insertions(+) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 883d3337d..3316834a1 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -6,6 +6,10 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: unit-tests: name: Unit tests diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0cbf35763..e596c4e99 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -6,6 +6,10 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: e2e-tests: name: End-to-end tests diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 6feacce80..37b0656cc 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -13,6 +13,10 @@ on: - '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 316f7904d..47e774a29 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -13,6 +13,10 @@ on: - '.github/workflows/publish-autoinstrumentation-dotnet.yaml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0a1c306ba..0c97b956c 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -13,6 +13,11 @@ on: - '.github/workflows/publish-autoinstrumentation-java.yaml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index a1f82c44e..cb5a465a7 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -13,6 +13,11 @@ on: - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 7da7dd05b..1ba357a29 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -13,6 +13,11 @@ on: - '.github/workflows/publish-autoinstrumentation-python.yaml' workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + jobs: publish: runs-on: ubuntu-20.04 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 814982585..7d9f415e6 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -6,6 +6,10 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: scorecard-tests: name: test on k8s From 7d746de5a8952056f9f356b46c5c0c01d39d5624 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 16:56:55 -0400 Subject: [PATCH 0856/1234] Bump github.com/docker/distribution in /cmd/otel-allocator (#1734) Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8a65c9dee..89eb1e006 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -54,7 +54,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.82.0 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v20.10.24+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index df23075c0..447381d41 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -139,8 +139,8 @@ github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgz github.com/digitalocean/godo v1.82.0 h1:lqAit46H1CqJGjh7LDbsamng/UMBME5rvmfH3Vb5Yy8= github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= From cec8b4408c5ad77ed2b2e6f2b570d126c3cda989 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 15 May 2023 17:07:32 -0400 Subject: [PATCH 0857/1234] Add fix for missing http_sd_config block (#1743) --- .chloggen/1742-fix-config.yaml | 16 ++++++++++ pkg/collector/reconcile/config_replace.go | 3 ++ pkg/collector/reconcile/configmap.go | 2 +- pkg/collector/reconcile/configmap_test.go | 8 ++++- ..._sd_config_servicemonitor_test_ta_set.yaml | 31 +++++++++++++++++++ 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100755 .chloggen/1742-fix-config.yaml create mode 100644 pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml diff --git a/.chloggen/1742-fix-config.yaml b/.chloggen/1742-fix-config.yaml new file mode 100755 index 000000000..df02608b7 --- /dev/null +++ b/.chloggen/1742-fix-config.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fixes a bug where setting the http_sd_config would crash the configmap replacement. + +# One or more tracking issues related to the change +issues: [1742] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index b8b217ad9..25f5083a5 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -36,6 +36,9 @@ type targetAllocator struct { Endpoint string `yaml:"endpoint"` Interval time.Duration `yaml:"interval"` CollectorID string `yaml:"collector_id"` + // HTTPSDConfig is a preference that can be set for the collector's target allocator, but the operator doesn't + // care about what the value is set to. We just need this for validation when unmarshalling the configmap. + HTTPSDConfig interface{} `yaml:"http_sd_config,omitempty"` } type Config struct { diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index f906fe68a..ca3840bfb 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -76,7 +76,7 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { } config, err := ReplaceConfig(params.Instance) if err != nil { - params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", err) + params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) } return corev1.ConfigMap{ diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 4f1c94568..1c2ff79c1 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -162,6 +162,12 @@ receivers: - follow_redirects: false enable_http2: false url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME + target_allocator: + endpoint: http://test-targetallocator:80 + interval: 30s + collector_id: ${POD_NAME} + http_sd_config: + refresh_interval: 60s service: pipelines: metrics: @@ -173,7 +179,7 @@ service: `, } - param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test.yaml") + param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test_ta_set.yaml") assert.NoError(t, err) param.Instance.Spec.TargetAllocator.Enabled = true actual := desiredConfigMap(context.Background(), param) diff --git a/pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml b/pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml new file mode 100644 index 000000000..6c2b004ba --- /dev/null +++ b/pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml @@ -0,0 +1,31 @@ +processors: +receivers: + prometheus: + config: + scrape_configs: + - job_name: serviceMonitor/test/test/0 + + static_configs: + - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] + labels: + my: label + + file_sd_configs: + - files: + - file2.json + target_allocator: + endpoint: http://test-targetallocator:80 + interval: 30s + collector_id: ${POD_NAME} + http_sd_config: + refresh_interval: 60s + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] From 81b7d0bb33162ecd3e37dcf016e4c5a1bec6c891 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 17:50:07 -0400 Subject: [PATCH 0858/1234] Bump github.com/docker/distribution (#1735) Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 18497b20d..52e9e04ce 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/digitalocean/godo v1.97.0 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v23.0.3+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect diff --git a/go.sum b/go.sum index 37535c2b0..e4f813195 100644 --- a/go.sum +++ b/go.sum @@ -117,8 +117,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/digitalocean/godo v1.97.0 h1:p9w1yCcWMZcxFSLPToNGXA96WfUVLXqoHti6GzVomL4= github.com/digitalocean/godo v1.97.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= From bc3ce30a9ead6d4df64b1bfc7bd64d84f221d363 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 16 May 2023 15:53:18 -0600 Subject: [PATCH 0859/1234] [instrumentation] Update to latest Go Instrumentation version (#1740) * Update to latest go instr version * changelog --- .chloggen/update-go-version.yaml | 16 ++++++++++++++++ tests/e2e/instrumentation-go/01-assert.yaml | 2 +- versions.txt | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 .chloggen/update-go-version.yaml diff --git a/.chloggen/update-go-version.yaml b/.chloggen/update-go-version.yaml new file mode 100755 index 000000000..5c10a53f4 --- /dev/null +++ b/.chloggen/update-go-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Go Instrumentation image from `v0.2.0-alpha` to `v0.2.1-alpha` + +# One or more tracking issues related to the change +issues: [1740] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/tests/e2e/instrumentation-go/01-assert.yaml b/tests/e2e/instrumentation-go/01-assert.yaml index bc77cb40d..ff2be5b3b 100644 --- a/tests/e2e/instrumentation-go/01-assert.yaml +++ b/tests/e2e/instrumentation-go/01-assert.yaml @@ -12,7 +12,7 @@ spec: - name: productcatalogservice - name: otc-container - name: opentelemetry-auto-instrumentation - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.0-alpha + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.1-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE value: /usr/src/app/productcatalogservice diff --git a/versions.txt b/versions.txt index a41790481..5669505f7 100644 --- a/versions.txt +++ b/versions.txt @@ -30,7 +30,7 @@ autoinstrumentation-python=0.38b0 autoinstrumentation-dotnet=0.7.0 # Represents the current release of Go instrumentation. -autoinstrumentation-go=v0.2.0-alpha +autoinstrumentation-go=v0.2.1-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From f9fc7e5b83d5c8f2cfdde2586d501d0d64585ac6 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 17 May 2023 22:38:08 +0200 Subject: [PATCH 0860/1234] Release v0.77.0 (#1738) * Release v0.77.0 Signed-off-by: Yuri Sa * Fix java version Signed-off-by: Yuri Sa * Rebase Signed-off-by: Yuri Sa * Added default values for TargetAllocator Signed-off-by: Yuri Sa * Fixed Changelog Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/1742-fix-config.yaml | 16 -------------- .chloggen/add-go-instrumentation.yaml | 16 -------------- .chloggen/add-liveness-probe-configs.yaml | 16 -------------- .../default_limits_for_init_containers.yaml | 16 -------------- .chloggen/mirror-to-dockerhub.yaml | 16 -------------- .chloggen/update-go-version.yaml | 16 -------------- CHANGELOG.md | 22 +++++++++++++++++++ RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 +++---- versions.txt | 10 ++++----- 10 files changed, 32 insertions(+), 106 deletions(-) delete mode 100755 .chloggen/1742-fix-config.yaml delete mode 100755 .chloggen/add-go-instrumentation.yaml delete mode 100644 .chloggen/add-liveness-probe-configs.yaml delete mode 100755 .chloggen/default_limits_for_init_containers.yaml delete mode 100755 .chloggen/mirror-to-dockerhub.yaml delete mode 100755 .chloggen/update-go-version.yaml diff --git a/.chloggen/1742-fix-config.yaml b/.chloggen/1742-fix-config.yaml deleted file mode 100755 index df02608b7..000000000 --- a/.chloggen/1742-fix-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fixes a bug where setting the http_sd_config would crash the configmap replacement. - -# One or more tracking issues related to the change -issues: [1742] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-go-instrumentation.yaml b/.chloggen/add-go-instrumentation.yaml deleted file mode 100755 index 767b9bdf0..000000000 --- a/.chloggen/add-go-instrumentation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add support for Go auto instrumentation - -# One or more tracking issues related to the change -issues: [1555] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-liveness-probe-configs.yaml b/.chloggen/add-liveness-probe-configs.yaml deleted file mode 100644 index ec7567605..000000000 --- a/.chloggen/add-liveness-probe-configs.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add liveness probe configs - -# One or more tracking issues related to the change -issues: [760] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/default_limits_for_init_containers.yaml b/.chloggen/default_limits_for_init_containers.yaml deleted file mode 100755 index fc75d9b71..000000000 --- a/.chloggen/default_limits_for_init_containers.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: set default resource limits for instrumentation init containers - -# One or more tracking issues related to the change -issues: [1407] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/mirror-to-dockerhub.yaml b/.chloggen/mirror-to-dockerhub.yaml deleted file mode 100755 index c68fe6383..000000000 --- a/.chloggen/mirror-to-dockerhub.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: github actions - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Publish image to dockerhub too - -# One or more tracking issues related to the change -issues: [1708] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/update-go-version.yaml b/.chloggen/update-go-version.yaml deleted file mode 100755 index 5c10a53f4..000000000 --- a/.chloggen/update-go-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: instrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Go Instrumentation image from `v0.2.0-alpha` to `v0.2.1-alpha` - -# One or more tracking issues related to the change -issues: [1740] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c34ccf86..cf09f0829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ Changes by Version ================== +## 0.77.0 + +### 💡 Enhancements 💡 + +- `operator`: Add support for Go auto instrumentation (#1555) +- `operator`: Add liveness probe configs (#760) +- `operator`: set default resource limits for instrumentation init containers (#1407) +- `github actions`: Publish image to dockerhub too (#1708) +- `instrumentation`: Bump Go Instrumentation image from `v0.2.0-alpha` to `v0.2.1-alpha` (#1740) + +### 🧰 Bug fixes 🧰 + +- `operator`: fixes a bug where setting the http_sd_config would crash the configmap replacement. (#1742) +### Components + +* [OpenTelemetry Collector - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.77.0) +* [OpenTelemetry Contrib - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.77.0) +* [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) +* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) +* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) +* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) ## 0.76.1 diff --git a/RELEASE.md b/RELEASE.md index f1c07ad97..41114b005 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.77.0 | @yuriolisa | | v0.78.0 | @jaronoff97 | | v0.79.0 | @pavolloffay | | v0.80.0 | @VineethReddy02 | | v0.81.0 | @TylerHelmuth | | v0.82.0 | @frzifus | +| v0.83.0 | @yuriolisa | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 01a035a83..152ccf466 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-05-09T13:51:52Z" + createdAt: "2023-05-15T08:04:44Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.76.1 + name: opentelemetry-operator.v0.77.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -308,7 +308,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.76.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.77.0 livenessProbe: httpGet: path: /healthz @@ -415,7 +415,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.76.1 + version: 0.77.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 5669505f7..d64646438 100644 --- a/versions.txt +++ b/versions.txt @@ -2,20 +2,20 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.76.1 +opentelemetry-collector=0.77.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.76.1 +operator=0.77.0 # Represents the current release of the Target Allocator. -targetallocator=0.76.1 +targetallocator=0.77.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.76.1 +operator-opamp-bridge=0.77.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.25.1 +autoinstrumentation-java=1.26.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From 0b26cbbfe904281713165235032a2fa351ebfbba Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 18 May 2023 02:24:49 +0200 Subject: [PATCH 0861/1234] Release Addendum (#1745) --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e332a5188..ec40efb8a 100644 --- a/README.md +++ b/README.md @@ -518,6 +518,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.77.0 | v1.19 to v1.26 | v1 | | v0.76.1 | v1.19 to v1.26 | v1 | | v0.75.0 | v1.19 to v1.26 | v1 | | v0.74.0 | v1.19 to v1.26 | v1 | @@ -540,8 +541,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.56.0 | v1.19 to v1.24 | v1 | | v0.55.0 | v1.19 to v1.24 | v1 | | v0.54.0 | v1.19 to v1.24 | v1 | -| v0.53.0 | v1.19 to v1.24 | v1 | - ## Contributing and Developing From 33afeb6d0d88ad19674da0dc7ce038383f01e6bf Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 18 May 2023 23:16:25 +0200 Subject: [PATCH 0862/1234] Set resource requests/limits for TargetAllocator (#1739) * Set resource requests/limits for TargetAllocator Signed-off-by: Yuri Sa * Set resource requests/limits for TargetAllocator Signed-off-by: Yuri Sa * Creating missing files Signed-off-by: Yuri Sa * Creating missing files Signed-off-by: Yuri Sa * Fixed e2e test Signed-off-by: Yuri Sa * Fix small nit Signed-off-by: Yuri Sa * Fix small nit Signed-off-by: Yuri Sa * Fix small nit Signed-off-by: Yuri Sa * Added default values for TargetAllocator Signed-off-by: Yuri Sa * Added default values for TargetAllocator Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- ...sources-requirements-target-allocator.yaml | 16 ++++ apis/v1alpha1/opentelemetrycollector_types.go | 3 + .../opentelemetrycollector_webhook.go | 15 ++++ apis/v1alpha1/zz_generated.deepcopy.go | 1 + ...ntelemetry.io_opentelemetrycollectors.yaml | 49 ++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 49 ++++++++++++ docs/api.md | 77 +++++++++++++++++++ pkg/targetallocator/container.go | 1 + pkg/targetallocator/container_test.go | 39 ++++++++++ .../targetallocator-features/00-assert.yaml | 7 ++ 10 files changed, 257 insertions(+) create mode 100755 .chloggen/add-resources-requirements-target-allocator.yaml diff --git a/.chloggen/add-resources-requirements-target-allocator.yaml b/.chloggen/add-resources-requirements-target-allocator.yaml new file mode 100755 index 000000000..dee07d093 --- /dev/null +++ b/.chloggen/add-resources-requirements-target-allocator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: targetallocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Set resource requests/limits for TargetAllocator + +# One or more tracking issues related to the change +issues: [1103] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 25858165b..bb402251b 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -192,6 +192,9 @@ type OpenTelemetryTargetAllocator struct { // that can be run in a high availability mode is consistent-hashing. // +optional Replicas *int32 `json:"replicas,omitempty"` + // Resources to set on the OpenTelemetryTargetAllocator containers. + // +optional + Resources v1.ResourceRequirements `json:"resources,omitempty"` // AllocationStrategy determines which strategy the target allocator should use for allocation. // The current options are least-weighted and consistent-hashing. The default option is least-weighted // +optional diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 7233a9241..381757e7c 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -17,6 +17,8 @@ package v1alpha1 import ( "fmt" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" @@ -67,6 +69,19 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.TargetAllocator.Replicas = &one } + if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Resources.Limits == nil { + r.Spec.TargetAllocator.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("200m"), + corev1.ResourceMemory: resource.MustParse("500Mi"), + } + } + if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Resources.Requests == nil { + r.Spec.TargetAllocator.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("250Mi"), + } + } + if r.Spec.MaxReplicas != nil || (r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil) { if r.Spec.Autoscaler == nil { r.Spec.Autoscaler = &AutoscalerSpec{} diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 570843c9a..2fc73e19e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -588,6 +588,7 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll *out = new(int32) **out = **in } + in.Resources.DeepCopyInto(&out.Resources) in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) } diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 425c4c226..246e22c78 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2055,6 +2055,55 @@ spec: high availability mode is consistent-hashing. format: int32 type: integer + resources: + description: Resources to set on the OpenTelemetryTargetAllocator + containers. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 9300590ec..cf74295ed 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2053,6 +2053,55 @@ spec: high availability mode is consistent-hashing. format: int32 type: integer + resources: + description: Resources to set on the OpenTelemetryTargetAllocator + containers. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator diff --git a/docs/api.md b/docs/api.md index 681d312f4..b69845236 100644 --- a/docs/api.md +++ b/docs/api.md @@ -6419,6 +6419,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all Format: int32
false + + resources + object + + Resources to set on the OpenTelemetryTargetAllocator containers.
+ + false serviceAccount string @@ -6471,6 +6478,76 @@ PrometheusCR defines the configuration for the retrieval of PrometheusOperator C +### OpenTelemetryCollector.spec.targetAllocator.resources +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +Resources to set on the OpenTelemetryTargetAllocator containers. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.resources.claims[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatorresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### OpenTelemetryCollector.spec.tolerations[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index b485f68cf..beb67b897 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -55,6 +55,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Image: image, Env: envVars, VolumeMounts: volumeMounts, + Resources: otelcol.Spec.TargetAllocator.Resources, Args: args, } } diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 504e6526c..5a6c179ff 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -18,6 +18,8 @@ import ( "testing" "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -77,3 +79,40 @@ func TestContainerVolumes(t *testing.T) { assert.Len(t, c.VolumeMounts, 1) assert.Equal(t, naming.TAConfigMapVolume(), c.VolumeMounts[0].Name) } + +func TestContainerResourceRequirements(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Resources: corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("128M"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("200m"), + corev1.ResourceMemory: resource.MustParse("256M"), + }, + }, + }, + }, + } + + cfg := config.New() + resourceTest := corev1.ResourceRequirements{ + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("128M"), + }, + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("200m"), + corev1.ResourceMemory: resource.MustParse("256M"), + }, + } + // test + c := Container(cfg, logger, otelcol) + resourcesValues := c.Resources + + // verify + assert.Equal(t, resourceTest, resourcesValues) +} diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index fa49547bb..6e1f4b453 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -56,6 +56,13 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 100m + memory: 250Mi volumeMounts: - mountPath: /conf name: ta-internal From c35c98f29210484b5ac0ccc1dbde6775414e6acb Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 19 May 2023 08:06:49 -0600 Subject: [PATCH 0863/1234] [instrumentation] Fix issue where default Go auto-instrumentation version was not being used in our release operator image. (#1757) * Fix publish images CI * changelog * Force string --- .chloggen/fix-go-release.yaml | 16 ++++++++++++++++ .github/workflows/publish-images.yaml | 2 ++ tests/e2e/instrumentation-go/01-install-app.yaml | 5 +++++ 3 files changed, 23 insertions(+) create mode 100755 .chloggen/fix-go-release.yaml diff --git a/.chloggen/fix-go-release.yaml b/.chloggen/fix-go-release.yaml new file mode 100755 index 000000000..b2911b821 --- /dev/null +++ b/.chloggen/fix-go-release.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix issue where the operator's released image did not correctly set the default go auto-instrumentation version + +# One or more tracking issues related to the change +issues: [1757] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 22c552d54..8c56d9aa6 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -29,6 +29,7 @@ jobs: grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print "AUTO_INSTRUMENTATION_DOTNET_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print "AUTO_INSTRUMENTATION_GO_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -95,6 +96,7 @@ jobs: AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }} AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }} + AUTO_INSTRUMENTATION_GO_VERSION=${{ env.AUTO_INSTRUMENTATION_GO_VERSION }} AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${{ env.AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/tests/e2e/instrumentation-go/01-install-app.yaml b/tests/e2e/instrumentation-go/01-install-app.yaml index 781d7ac18..1650adf30 100644 --- a/tests/e2e/instrumentation-go/01-install-app.yaml +++ b/tests/e2e/instrumentation-go/01-install-app.yaml @@ -19,3 +19,8 @@ spec: containers: - name: productcatalogservice image: ghcr.io/open-telemetry/demo:1.3.1-productcatalogservice + env: + - name: "PRODUCT_CATALOG_SERVICE_PORT" + value: "8080" + - name: "FEATURE_FLAG_GRPC_SERVICE_ADDR" + value: "localhost:50053" From 88022b42b7d89ec5779d2b6609821cf69c37211b Mon Sep 17 00:00:00 2001 From: Moh Osman <59479562+moh-osman3@users.noreply.github.com> Date: Mon, 22 May 2023 16:17:13 -0400 Subject: [PATCH 0864/1234] [HPA] Add v1alpha1.MetricSpec to support for Pod custom metrics (#1651) * add to api types and validate webhook * creation of metrics * chloggen and make generate * new MetricSpec * make bundle and api-docs * lint * add webhook test case * make bundle * updates * address review feedback * gofmt * add nil check and reorder validation * fix typo * lint --- .../1560-add-custom-metrics-support.yaml | 17 ++ apis/v1alpha1/opentelemetrycollector_types.go | 13 + .../opentelemetrycollector_webhook.go | 66 +++-- .../opentelemetrycollector_webhook_test.go | 67 +++++ apis/v1alpha1/zz_generated.deepcopy.go | 27 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 132 ++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 132 ++++++++++ docs/api.md | 234 ++++++++++++++++++ pkg/collector/horizontalpodautoscaler.go | 47 +++- pkg/collector/horizontalpodautoscaler_test.go | 43 ++++ .../reconcile/horizontalpodautoscaler.go | 4 +- 11 files changed, 764 insertions(+), 18 deletions(-) create mode 100644 .chloggen/1560-add-custom-metrics-support.yaml diff --git a/.chloggen/1560-add-custom-metrics-support.yaml b/.chloggen/1560-add-custom-metrics-support.yaml new file mode 100644 index 000000000..8faf9f7bc --- /dev/null +++ b/.chloggen/1560-add-custom-metrics-support.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Autoscaler + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Support scaling on Pod custom metrics. + +# One or more tracking issues related to the change +issues: + - 1560 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index bb402251b..6654343c5 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -312,6 +312,11 @@ type AutoscalerSpec struct { MaxReplicas *int32 `json:"maxReplicas,omitempty"` // +optional Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"` + // Metrics is meant to provide a customizable way to configure HPA metrics. + // currently the only supported custom metrics is type=Pod. + // Use TargetCPUUtilization or TargetMemoryUtilization instead if scaling on these common resource metrics. + // +optional + Metrics []MetricSpec `json:"metrics,omitempty"` // TargetCPUUtilization sets the target average CPU used across all replicas. // If average CPU exceeds this value, the HPA will scale up. Defaults to 90 percent. // +optional @@ -359,6 +364,14 @@ type Probe struct { TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } +// MetricSpec defines a subset of metrics to be defined for the HPA's metric array +// more metric type can be supported as needed. +// See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec for reference. +type MetricSpec struct { + Type autoscalingv2.MetricSourceType `json:"type"` + Pods *autoscalingv2.PodsMetricSource `json:"pods,omitempty"` +} + func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 381757e7c..e635870f0 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -17,6 +17,7 @@ package v1alpha1 import ( "fmt" + autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" @@ -199,6 +200,12 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } } + if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { + return fmt.Errorf("the OpenTelemetry Spec Ingress configuration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", + ModeDeployment, ModeDaemonSet, ModeStatefulSet, + ) + } + // validate autoscale with horizontal pod autoscaler if maxReplicas != nil { if *maxReplicas < int32(1) { @@ -217,22 +224,8 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") } - if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.Behavior != nil { - if r.Spec.Autoscaler.Behavior.ScaleDown != nil && r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds != nil && - *r.Spec.Autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds < int32(1) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleDown should be one or more") - } - - if r.Spec.Autoscaler.Behavior.ScaleUp != nil && r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds != nil && - *r.Spec.Autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds < int32(1) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") - } - } - if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.TargetCPUUtilization != nil && (*r.Spec.Autoscaler.TargetCPUUtilization < int32(1) || *r.Spec.Autoscaler.TargetCPUUtilization > int32(99)) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetCPUUtilization should be greater than 0 and less than 100") - } - if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.TargetMemoryUtilization != nil && (*r.Spec.Autoscaler.TargetMemoryUtilization < int32(1) || *r.Spec.Autoscaler.TargetMemoryUtilization > int32(99)) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetMemoryUtilization should be greater than 0 and less than 100") + if r.Spec.Autoscaler != nil { + return checkAutoscalerSpec(r.Spec.Autoscaler) } } @@ -265,3 +258,44 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return nil } + +func checkAutoscalerSpec(autoscaler *AutoscalerSpec) error { + if autoscaler.Behavior != nil { + if autoscaler.Behavior.ScaleDown != nil && autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds != nil && + *autoscaler.Behavior.ScaleDown.StabilizationWindowSeconds < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleDown should be one or more") + } + + if autoscaler.Behavior.ScaleUp != nil && autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds != nil && + *autoscaler.Behavior.ScaleUp.StabilizationWindowSeconds < int32(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more") + } + } + if autoscaler.TargetCPUUtilization != nil && (*autoscaler.TargetCPUUtilization < int32(1) || *autoscaler.TargetCPUUtilization > int32(99)) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetCPUUtilization should be greater than 0 and less than 100") + } + if autoscaler.TargetMemoryUtilization != nil && (*autoscaler.TargetMemoryUtilization < int32(1) || *autoscaler.TargetMemoryUtilization > int32(99)) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, targetMemoryUtilization should be greater than 0 and less than 100") + } + + for _, metric := range autoscaler.Metrics { + if metric.Type != autoscalingv2.PodsMetricSourceType { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, metric type unsupported. Expected metric of source type Pod") + } + + // pod metrics target only support value and averageValue. + if metric.Pods.Target.Type == autoscalingv2.AverageValueMetricType { + if val, ok := metric.Pods.Target.AverageValue.AsInt64(); !ok || val < int64(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, average value should be greater than 0") + } + } else if metric.Pods.Target.Type == autoscalingv2.ValueMetricType { + if val, ok := metric.Pods.Target.Value.AsInt64(); !ok || val < int64(1) { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, value should be greater than 0") + } + } else { + return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, invalid pods target type") + } + } + + return nil +} diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 54c642067..bba5c7d3e 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -422,6 +423,72 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas", }, + { + name: "invalid autoscaler metric type", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + Metrics: []MetricSpec{ + { + Type: autoscalingv2.ResourceMetricSourceType, + }, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, metric type unsupported. Expected metric of source type Pod", + }, + { + name: "invalid pod metric average value", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + Metrics: []MetricSpec{ + { + Type: autoscalingv2.PodsMetricSourceType, + Pods: &autoscalingv2.PodsMetricSource{ + Metric: autoscalingv2.MetricIdentifier{ + Name: "custom1", + }, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.AverageValueMetricType, + AverageValue: resource.NewQuantity(int64(0), resource.DecimalSI), + }, + }, + }, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, average value should be greater than 0", + }, + { + name: "utilization target is not valid with pod metrics", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + Autoscaler: &AutoscalerSpec{ + Metrics: []MetricSpec{ + { + Type: autoscalingv2.PodsMetricSourceType, + Pods: &autoscalingv2.PodsMetricSource{ + Metric: autoscalingv2.MetricIdentifier{ + Name: "custom1", + }, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, + AverageUtilization: &one, + }, + }, + }, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, invalid pods target type", + }, { name: "invalid deployment mode incompabible with ingress settings", otelcol: OpenTelemetryCollector{ diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 2fc73e19e..32930e39e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -74,6 +74,13 @@ func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec) { *out = new(v2.HorizontalPodAutoscalerBehavior) (*in).DeepCopyInto(*out) } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = make([]MetricSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.TargetCPUUtilization != nil { in, out := &in.TargetCPUUtilization, &out.TargetCPUUtilization *out = new(int32) @@ -324,6 +331,26 @@ func (in *Java) DeepCopy() *Java { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MetricSpec) DeepCopyInto(out *MetricSpec) { + *out = *in + if in.Pods != nil { + in, out := &in.Pods, &out.Pods + *out = new(v2.PodsMetricSource) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSpec. +func (in *MetricSpec) DeepCopy() *MetricSpec { + if in == nil { + return nil + } + out := new(MetricSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeJS) DeepCopyInto(out *NodeJS) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 246e22c78..acbd5339b 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1015,6 +1015,138 @@ spec: feature. If MaxReplicas is set autoscaling is enabled. format: int32 type: integer + metrics: + description: Metrics is meant to provide a customizable way to + configure HPA metrics. currently the only supported custom metrics + is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization + instead if scaling on these common resource metrics. + items: + description: MetricSpec defines a subset of metrics to be defined + for the HPA's metric array more metric type can be supported + as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec + for reference. + properties: + pods: + description: PodsMetricSource indicates how to scale on + a metric describing each pod in the current scale target + (for example, transactions-processed-per-second). The + values will be averaged together before being compared + to the target value. + properties: + metric: + description: metric identifies the target metric by + name and selector + properties: + name: + description: name is the name of the given metric + type: string + selector: + description: selector is the string-encoded form + of a standard kubernetes label selector for the + given metric When set, it is passed as an additional + parameter to the metrics server for more specific + metrics scoping. When unset, just the metricName + will be used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + description: target specifies the target value for the + given metric + properties: + averageUtilization: + description: averageUtilization is the target value + of the average of the resource metric across all + relevant pods, represented as a percentage of + the requested value of the resource for the pods. + Currently only valid for Resource metric source + type + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + description: averageValue is the target value of + the average of the metric across all relevant + pods (as a quantity) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + description: type represents whether the metric + type is Utilization, Value, or AverageValue + type: string + value: + anyOf: + - type: integer + - type: string + description: value is the target value of the metric + (as a quantity). + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + type: + description: MetricSourceType indicates the type of metric. + type: string + required: + - type + type: object + type: array minReplicas: description: MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index cf74295ed..5cd623002 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1013,6 +1013,138 @@ spec: feature. If MaxReplicas is set autoscaling is enabled. format: int32 type: integer + metrics: + description: Metrics is meant to provide a customizable way to + configure HPA metrics. currently the only supported custom metrics + is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization + instead if scaling on these common resource metrics. + items: + description: MetricSpec defines a subset of metrics to be defined + for the HPA's metric array more metric type can be supported + as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec + for reference. + properties: + pods: + description: PodsMetricSource indicates how to scale on + a metric describing each pod in the current scale target + (for example, transactions-processed-per-second). The + values will be averaged together before being compared + to the target value. + properties: + metric: + description: metric identifies the target metric by + name and selector + properties: + name: + description: name is the name of the given metric + type: string + selector: + description: selector is the string-encoded form + of a standard kubernetes label selector for the + given metric When set, it is passed as an additional + parameter to the metrics server for more specific + metrics scoping. When unset, just the metricName + will be used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + description: target specifies the target value for the + given metric + properties: + averageUtilization: + description: averageUtilization is the target value + of the average of the resource metric across all + relevant pods, represented as a percentage of + the requested value of the resource for the pods. + Currently only valid for Resource metric source + type + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + description: averageValue is the target value of + the average of the metric across all relevant + pods (as a quantity) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + description: type represents whether the metric + type is Utilization, Value, or AverageValue + type: string + value: + anyOf: + - type: integer + - type: string + description: value is the target value of the metric + (as a quantity). + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + type: + description: MetricSourceType indicates the type of metric. + type: string + required: + - type + type: object + type: array minReplicas: description: MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be diff --git a/docs/api.md b/docs/api.md index b69845236..876d3a3a4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4477,6 +4477,13 @@ Autoscaler specifies the pod autoscaling configuration to use for the OpenTeleme Format: int32
false + + metrics + []object + + Metrics is meant to provide a customizable way to configure HPA metrics. currently the only supported custom metrics is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization instead if scaling on these common resource metrics.
+ + false minReplicas integer @@ -4718,6 +4725,233 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in +### OpenTelemetryCollector.spec.autoscaler.metrics[index] +[↩ Parent](#opentelemetrycollectorspecautoscaler) + + + +MetricSpec defines a subset of metrics to be defined for the HPA's metric array more metric type can be supported as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec for reference. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + MetricSourceType indicates the type of metric.
+
true
podsobject + PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.metrics[index].pods +[↩ Parent](#opentelemetrycollectorspecautoscalermetricsindex) + + + +PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
metricobject + metric identifies the target metric by name and selector
+
true
targetobject + target specifies the target value for the given metric
+
true
+ + +### OpenTelemetryCollector.spec.autoscaler.metrics[index].pods.metric +[↩ Parent](#opentelemetrycollectorspecautoscalermetricsindexpods) + + + +metric identifies the target metric by name and selector + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + name is the name of the given metric
+
true
selectorobject + selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.metrics[index].pods.metric.selector +[↩ Parent](#opentelemetrycollectorspecautoscalermetricsindexpodsmetric) + + + +selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.metrics[index].pods.metric.selector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecautoscalermetricsindexpodsmetricselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + +### OpenTelemetryCollector.spec.autoscaler.metrics[index].pods.target +[↩ Parent](#opentelemetrycollectorspecautoscalermetricsindexpods) + + + +target specifies the target value for the given metric + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type represents whether the metric type is Utilization, Value, or AverageValue
+
true
averageUtilizationinteger + averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
+
+ Format: int32
+
false
averageValueint or string + averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
+
false
valueint or string + value is the target value of the metric (as a quantity).
+
false
+ + ### OpenTelemetryCollector.spec.env[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 2d3d74e56..bc89192b0 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -43,6 +43,12 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al Annotations: annotations, } + // defaulting webhook should always set this, but if unset then return nil. + if otelcol.Spec.Autoscaler == nil { + logger.Info("Autoscaler field is unset in Spec, skipping") + return nil + } + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { metrics := []autoscalingv2beta2.MetricSpec{} @@ -86,11 +92,17 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al }, } - if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.Behavior != nil { + if otelcol.Spec.Autoscaler.Behavior != nil { behavior := ConvertToV2beta2Behavior(*otelcol.Spec.Autoscaler.Behavior) autoscaler.Spec.Behavior = &behavior } + // check for custom metrics + if len(otelcol.Spec.Autoscaler.Metrics) > 0 { + metrics := ConvertToV2Beta2PodMetrics(otelcol.Spec.Autoscaler.Metrics) + autoscaler.Spec.Metrics = append(autoscaler.Spec.Metrics, metrics...) + } + result = &autoscaler } else { metrics := []autoscalingv2.MetricSpec{} @@ -139,12 +151,45 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al if otelcol.Spec.Autoscaler.Behavior != nil { autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior } + + // convert from v1alpha1.MetricSpec into a autoscalingv2.MetricSpec. + for _, metric := range otelcol.Spec.Autoscaler.Metrics { + if metric.Type == autoscalingv2.PodsMetricSourceType { + v2metric := autoscalingv2.MetricSpec{ + Type: metric.Type, + Pods: metric.Pods, + } + autoscaler.Spec.Metrics = append(autoscaler.Spec.Metrics, v2metric) + } // pod metrics + } result = &autoscaler } return result } +func ConvertToV2Beta2PodMetrics(v2metrics []v1alpha1.MetricSpec) []autoscalingv2beta2.MetricSpec { + metrics := make([]autoscalingv2beta2.MetricSpec, len(v2metrics)) + + for i, v2metric := range v2metrics { + metrics[i].Type = autoscalingv2beta2.MetricSourceType(v2metric.Type) + if v2metric.Pods != nil { + metrics[i].Pods = &autoscalingv2beta2.PodsMetricSource{ + Metric: autoscalingv2beta2.MetricIdentifier{ + Name: v2metric.Pods.Metric.Name, + Selector: v2metric.Pods.Metric.Selector, + }, + Target: autoscalingv2beta2.MetricTarget{ + Type: autoscalingv2beta2.MetricTargetType(v2metric.Pods.Target.Type), + AverageValue: v2metric.Pods.Target.AverageValue, + }, + } + } + } + + return metrics +} + // Create a v2beta2 HorizontalPodAutoscalerBehavior from a v2 instance. func ConvertToV2beta2Behavior(v2behavior autoscalingv2.HorizontalPodAutoscalerBehavior) autoscalingv2beta2.HorizontalPodAutoscalerBehavior { behavior := &autoscalingv2beta2.HorizontalPodAutoscalerBehavior{} diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index 4fc57c033..988a51f5a 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -21,6 +21,7 @@ import ( autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -106,6 +107,48 @@ func TestHPA(t *testing.T) { } } +func TestConvertToV2Beta2PodMetrics(t *testing.T) { + expectedValues := []int64{int64(10), int64(20)} + expectedNames := []string{"custom1", "custom2"} + + v2metrics := []v1alpha1.MetricSpec{ + { + Type: autoscalingv2.PodsMetricSourceType, + Pods: &autoscalingv2.PodsMetricSource{ + Metric: autoscalingv2.MetricIdentifier{ + Name: "custom1", + }, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.AverageValueMetricType, + AverageValue: resource.NewQuantity(int64(10), resource.DecimalSI), + }, + }, + }, + { + Type: autoscalingv2.PodsMetricSourceType, + Pods: &autoscalingv2.PodsMetricSource{ + Metric: autoscalingv2.MetricIdentifier{ + Name: "custom2", + }, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.AverageValueMetricType, + AverageValue: resource.NewQuantity(int64(20), resource.DecimalSI), + }, + }, + }, + } + + v2beta2metrics := ConvertToV2Beta2PodMetrics(v2metrics) + + for i, metric := range v2beta2metrics { + + assert.Equal(t, expectedNames[i], metric.Pods.Metric.Name) + val, ok := metric.Pods.Target.AverageValue.AsInt64() + assert.True(t, ok) + assert.Equal(t, expectedValues[i], val) + } +} + func TestConvertToV2beta2Behavior(t *testing.T) { ten := int32(10) thirty := int32(30) diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index de03a96b4..63cdb76f7 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -38,7 +38,9 @@ func HorizontalPodAutoscalers(ctx context.Context, params Params) error { // check if autoscale mode is on, e.g MaxReplicas is not nil if params.Instance.Spec.MaxReplicas != nil || (params.Instance.Spec.Autoscaler != nil && params.Instance.Spec.Autoscaler.MaxReplicas != nil) { - desired = append(desired, collector.HorizontalPodAutoscaler(params.Config, params.Log, params.Instance)) + if newcol := collector.HorizontalPodAutoscaler(params.Config, params.Log, params.Instance); newcol != nil { + desired = append(desired, newcol) + } } // first, handle the create/update parts From d111aeddec67380e701e6c0f67194bce89683555 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 23 May 2023 17:04:53 +0200 Subject: [PATCH 0865/1234] Fix annotation's propagation (#1759) * Fix annotation's propagation Signed-off-by: Yuri Sa * Added chlog Signed-off-by: Yuri Sa * Changed failling test Signed-off-by: Yuri Sa * Changed failling test Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/fix-pod-annotation-propagation.yaml | 16 ++++++++++++++++ pkg/collector/annotations.go | 7 +++++++ pkg/collector/annotations_test.go | 5 +++++ pkg/collector/daemonset_test.go | 14 +++++++++++++- pkg/collector/deployment_test.go | 14 +++++++++++++- pkg/collector/statefulset_test.go | 12 +++++++++++- 6 files changed, 65 insertions(+), 3 deletions(-) create mode 100755 .chloggen/fix-pod-annotation-propagation.yaml diff --git a/.chloggen/fix-pod-annotation-propagation.yaml b/.chloggen/fix-pod-annotation-propagation.yaml new file mode 100755 index 000000000..77b7b0c98 --- /dev/null +++ b/.chloggen/fix-pod-annotation-propagation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Propagate Metadata.Annotations to PodSpec.Annotations + +# One or more tracking issues related to the change +issues: [900] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go index 578f235dc..95d25f71d 100644 --- a/pkg/collector/annotations.go +++ b/pkg/collector/annotations.go @@ -53,6 +53,13 @@ func PodAnnotations(instance v1alpha1.OpenTelemetryCollector) map[string]string podAnnotations[k] = v } + // propagating annotations from metadata.annotations + for kMeta, vMeta := range Annotations(instance) { + if _, found := podAnnotations[kMeta]; !found { + podAnnotations[kMeta] = vMeta + } + } + // make sure sha256 for configMap is always calculated podAnnotations["opentelemetry-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) diff --git a/pkg/collector/annotations_test.go b/pkg/collector/annotations_test.go index dfd2246cd..ade8f7fba 100644 --- a/pkg/collector/annotations_test.go +++ b/pkg/collector/annotations_test.go @@ -44,6 +44,10 @@ func TestDefaultAnnotations(t *testing.T) { assert.Equal(t, "8888", annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", annotations["prometheus.io/path"]) assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) + //verify propagation from metadata.annotations to spec.template.spec.metadata.annotations + assert.Equal(t, "true", podAnnotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", podAnnotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", podAnnotations["prometheus.io/path"]) assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["opentelemetry-operator-config/sha256"]) } @@ -94,5 +98,6 @@ func TestAnnotationsPropagateDown(t *testing.T) { // verify assert.Len(t, annotations, 5) assert.Equal(t, "mycomponent", annotations["myapp"]) + assert.Equal(t, "mycomponent", podAnnotations["myapp"]) assert.Equal(t, "pod_annotation_value", podAnnotations["pod_annotation"]) } diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index e56187a73..2fffb875f 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -55,6 +55,9 @@ func TestDaemonSetNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) @@ -119,9 +122,18 @@ func TestDaemonsetPodAnnotations(t *testing.T) { // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + expectedAnnotations := map[string]string{ + "annotation-key": "annotation-value", + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + } + // verify assert.Equal(t, "my-instance-collector", ds.Name) - assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) + assert.Len(t, ds.Spec.Template.Annotations, 5) + assert.Equal(t, expectedAnnotations, ds.Spec.Template.Annotations) } func TestDaemonstPodSecurityContext(t *testing.T) { diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 70febf1c7..718738f93 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -81,6 +81,9 @@ func TestDeploymentNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) @@ -127,9 +130,18 @@ func TestDeploymentPodAnnotations(t *testing.T) { // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + expectedPodAnnotationValues := map[string]string{ + "annotation-key": "annotation-value", + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + } + // verify + assert.Len(t, d.Spec.Template.Annotations, 5) assert.Equal(t, "my-instance-collector", d.Name) - assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) + assert.Equal(t, expectedPodAnnotationValues, d.Spec.Template.Annotations) } func TestDeploymenttPodSecurityContext(t *testing.T) { diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 66ccbae38..39db85cfe 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -59,6 +59,9 @@ func TestStatefulSetNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, ss.Spec.Template.Annotations) @@ -168,9 +171,16 @@ func TestStatefulSetPodAnnotations(t *testing.T) { // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + expectedAnnotations := map[string]string{ + "annotation-key": "annotation-value", + "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + } // verify assert.Equal(t, "my-instance-collector", ss.Name) - assert.Equal(t, testPodAnnotationValues, ss.Spec.Template.Annotations) + assert.Equal(t, expectedAnnotations, ss.Spec.Template.Annotations) } func TestStatefulSetPodSecurityContext(t *testing.T) { From cec46657c6a20fe71d9e38091cf21132150ccd91 Mon Sep 17 00:00:00 2001 From: Ben B Date: Tue, 23 May 2023 17:05:31 +0200 Subject: [PATCH 0866/1234] provide default resource limits for go sidecar container (#1737) Signed-off-by: Benedikt Bongartz --- .../default_limits_for_go_init_container.yaml | 16 ++++ apis/v1alpha1/instrumentation_types.go | 4 + apis/v1alpha1/instrumentation_webhook.go | 12 +++ apis/v1alpha1/zz_generated.deepcopy.go | 1 + .../opentelemetry.io_instrumentations.yaml | 48 ++++++++++++ .../opentelemetry.io_instrumentations.yaml | 48 ++++++++++++ docs/api.md | 77 +++++++++++++++++++ pkg/instrumentation/golang.go | 5 +- pkg/instrumentation/golang_test.go | 6 +- tests/e2e/instrumentation-go/01-assert.yaml | 7 ++ 10 files changed, 220 insertions(+), 4 deletions(-) create mode 100755 .chloggen/default_limits_for_go_init_container.yaml diff --git a/.chloggen/default_limits_for_go_init_container.yaml b/.chloggen/default_limits_for_go_init_container.yaml new file mode 100755 index 000000000..8c271bfa4 --- /dev/null +++ b/.chloggen/default_limits_for_go_init_container.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: provide default resource limits for go sidecar container + +# One or more tracking issues related to the change +issues: [1732] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 91daf698e..4eb585eeb 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -186,6 +186,10 @@ type Go struct { // If the former var had been defined, then the other vars would be ignored. // +optional Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` } // ApacheHttpd defines Apache SDK and instrumentation configuration. diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index cbd750b68..89caec99f 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -134,6 +134,18 @@ func (r *Instrumentation) Default() { r.Spec.Go.Image = val } } + if r.Spec.Go.Resources.Limits == nil { + r.Spec.Go.Resources.Limits = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + } + } + if r.Spec.Go.Resources.Requests == nil { + r.Spec.Go.Resources.Requests = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("50m"), + corev1.ResourceMemory: resource.MustParse("32Mi"), + } + } if r.Spec.ApacheHttpd.Image == "" { if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationApacheHttpd]; ok { r.Spec.ApacheHttpd.Image = val diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 32930e39e..9f4701683 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -151,6 +151,7 @@ func (in *Go) DeepCopyInto(out *Go) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Resources.DeepCopyInto(&out.Resources) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Go. diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index c590192ba..1e83a0873 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -773,6 +773,54 @@ spec: image: description: Image is a container image with Go SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object java: description: Java defines configuration for java auto-instrumentation. diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index d0d56ec65..14a1265d8 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -772,6 +772,54 @@ spec: image: description: Image is a container image with Go SDK and auto-instrumentation. type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object type: object java: description: Java defines configuration for java auto-instrumentation. diff --git a/docs/api.md b/docs/api.md index 876d3a3a4..7100669d8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1450,6 +1450,13 @@ Go defines configuration for Go auto-instrumentation. When using Go auto-instrum Image is a container image with Go SDK and auto-instrumentation.
false + + resourceRequirements + object + + Resources describes the compute resource requirements.
+ + false @@ -1700,6 +1707,76 @@ Selects a key of a secret in the pod's namespace +### Instrumentation.spec.go.resourceRequirements +[↩ Parent](#instrumentationspecgo) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.go.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecgoresourcerequirements) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + ### Instrumentation.spec.java [↩ Parent](#instrumentationspec) diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go index e52add1ae..2dcb07057 100644 --- a/pkg/instrumentation/golang.go +++ b/pkg/instrumentation/golang.go @@ -46,8 +46,9 @@ func injectGoSDK(goSpec v1alpha1.Go, pod corev1.Pod) (corev1.Pod, error) { pod.Spec.ShareProcessNamespace = &true goAgent := corev1.Container{ - Name: sideCarName, - Image: goSpec.Image, + Name: sideCarName, + Image: goSpec.Image, + Resources: goSpec.Resources, SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go index 058ca3c72..28f723e6c 100644 --- a/pkg/instrumentation/golang_test.go +++ b/pkg/instrumentation/golang_test.go @@ -81,6 +81,7 @@ func TestInjectGoSDK(t *testing.T) { Value: "foo", }, }, + Resources: testResourceRequirements, }, pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -99,8 +100,9 @@ func TestInjectGoSDK(t *testing.T) { ShareProcessNamespace: &true, Containers: []corev1.Container{ { - Name: sideCarName, - Image: "foo/bar:1", + Name: sideCarName, + Resources: testResourceRequirements, + Image: "foo/bar:1", SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, diff --git a/tests/e2e/instrumentation-go/01-assert.yaml b/tests/e2e/instrumentation-go/01-assert.yaml index ff2be5b3b..90a36d351 100644 --- a/tests/e2e/instrumentation-go/01-assert.yaml +++ b/tests/e2e/instrumentation-go/01-assert.yaml @@ -12,6 +12,13 @@ spec: - name: productcatalogservice - name: otc-container - name: opentelemetry-auto-instrumentation + resources: + limits: + cpu: "500m" + memory: "32Mi" + requests: + cpu: "50m" + memory: "32Mi" image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.1-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE From 5805127145a4f38355ca689d78ab242ef55bbd72 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 23 May 2023 17:18:44 -0400 Subject: [PATCH 0867/1234] Switch to python:3.11 image (#1763) --- autoinstrumentation/python/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile index bac63435c..9a6dfa740 100644 --- a/autoinstrumentation/python/Dockerfile +++ b/autoinstrumentation/python/Dockerfile @@ -9,16 +9,12 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. -FROM python:3.11-alpine AS build +FROM python:3.11 AS build WORKDIR /operator-build ADD requirements.txt . -RUN apk update && apk add gcc \ - libc-dev \ - libffi-dev - RUN mkdir workspace && pip install --target workspace -r requirements.txt FROM busybox From a5537a1b34d3316eb992e696178cc0fa51b62695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 24 May 2023 17:18:29 +0100 Subject: [PATCH 0868/1234] Add e2e tests for prometheus receiver configuration (#1762) * Add e2e tests for prometheus receiver configuration * add new tests to the modify images script --- hack/modify-test-images.sh | 1 + .../00-assert.yaml | 25 +++++++ .../00-promreceiver-allocatorconfig.yaml | 69 +++++++++++++++++++ .../01-assert.yaml | 28 ++++++++ .../01-promreceiver-labeldrop.yaml | 49 +++++++++++++ .../02-assert.yaml | 25 +++++++ ...02-promreceiver-allocatorconfig-extra.yaml | 53 ++++++++++++++ .../03-assert.yaml | 25 +++++++ .../03-promreceiver-nopromconfig.yaml | 48 +++++++++++++ 9 files changed, 323 insertions(+) create mode 100644 tests/e2e/prometheus-config-validation/00-assert.yaml create mode 100644 tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml create mode 100644 tests/e2e/prometheus-config-validation/01-assert.yaml create mode 100644 tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml create mode 100644 tests/e2e/prometheus-config-validation/02-assert.yaml create mode 100644 tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml create mode 100644 tests/e2e/prometheus-config-validation/03-assert.yaml create mode 100644 tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index ee240ddbd..b43ee421b 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -4,3 +4,4 @@ SED_BIN=${SED_BIN:-sed} ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/00-install.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml +${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml diff --git a/tests/e2e/prometheus-config-validation/00-assert.yaml b/tests/e2e/prometheus-config-validation/00-assert.yaml new file mode 100644 index 000000000..3f4f17796 --- /dev/null +++ b/tests/e2e/prometheus-config-validation/00-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: promreceiver-allocatorconfig-collector +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: promreceiver-allocatorconfig-targetallocator +status: + replicas: 1 + readyReplicas: 1 +--- +# Print TA and operator logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/component=opentelemetry-targetallocator + - selector: app.kubernetes.io/component=opentelemetry-collector + - selector: app.kubernetes.io/name=opentelemetry-operator + namespace: opentelemetry-operator-system + container: manager diff --git a/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml b/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml new file mode 100644 index 000000000..b53f21314 --- /dev/null +++ b/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml @@ -0,0 +1,69 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ta +automountServiceAccountToken: true +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: pod-view +rules: +- apiGroups: [""] + resources: [ "pods" ] + verbs: [ "get", "list", "watch"] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: promreceiver-allocatorconfig +spec: + mode: statefulset + targetAllocator: + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + serviceAccount: ta + prometheusCR: + enabled: true + + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + target_allocator: + endpoint: http://promreceiver-allocatorconfig-targetallocator + interval: 30s + collector_id: ${POD_NAME} + + processors: + + exporters: + logging: + extensions: + health_check: + service: + telemetry: + metrics: + address: :8888 + extensions: + - health_check + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/prometheus-config-validation/01-assert.yaml b/tests/e2e/prometheus-config-validation/01-assert.yaml new file mode 100644 index 000000000..07d50c63c --- /dev/null +++ b/tests/e2e/prometheus-config-validation/01-assert.yaml @@ -0,0 +1,28 @@ +## Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved +## Unfortunately kuttl doesn't have a way to skip tests + +# apiVersion: apps/v1 +# kind: StatefulSet +# metadata: +# name: labeldrop-collector +# status: +# replicas: 1 +# readyReplicas: 1 +# --- +# apiVersion: apps/v1 +# kind: Deployment +# metadata: +# name: labeldrop-targetallocator +# status: +# replicas: 1 +# readyReplicas: 1 +# --- +# # Print TA and operator logs if test fails +# apiVersion: kuttl.dev/v1beta1 +# kind: TestAssert +# collectors: +# - selector: app.kubernetes.io/component=opentelemetry-targetallocator +# - selector: app.kubernetes.io/component=opentelemetry-collector +# - selector: app.kubernetes.io/name=opentelemetry-operator +# namespace: opentelemetry-operator-system +# container: manager diff --git a/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml b/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml new file mode 100644 index 000000000..1b57d9607 --- /dev/null +++ b/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml @@ -0,0 +1,49 @@ +## Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved +## Unfortunately kuttl doesn't have a way to skip tests + +# apiVersion: opentelemetry.io/v1alpha1 +# kind: OpenTelemetryCollector +# metadata: +# name: labeldrop +# spec: +# mode: statefulset +# targetAllocator: +# enabled: true +# image: "local/opentelemetry-operator-targetallocator:e2e" +# serviceAccount: ta +# prometheusCR: +# enabled: true + +# config: | +# receivers: +# jaeger: +# protocols: +# grpc: + +# # Collect own metrics +# prometheus: +# config: +# scrape_configs: +# - job_name: 'otel-collector' +# scrape_interval: 10s +# static_configs: +# - targets: [ '0.0.0.0:8888' ] +# metric_relabel_configs: +# - action: labeldrop +# regex: (id|name) + +# target_allocator: +# endpoint: http://labeldrop-targetallocator +# interval: 30s +# collector_id: ${POD_NAME} + +# processors: + +# exporters: +# logging: +# service: +# pipelines: +# traces: +# receivers: [jaeger] +# processors: [] +# exporters: [logging] diff --git a/tests/e2e/prometheus-config-validation/02-assert.yaml b/tests/e2e/prometheus-config-validation/02-assert.yaml new file mode 100644 index 000000000..33727878d --- /dev/null +++ b/tests/e2e/prometheus-config-validation/02-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: promreceiver-allocatorconfig-extra-collector +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: promreceiver-allocatorconfig-extra-targetallocator +status: + replicas: 1 + readyReplicas: 1 +--- +# Print TA and operator logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/component=opentelemetry-targetallocator + - selector: app.kubernetes.io/component=opentelemetry-collector + - selector: app.kubernetes.io/name=opentelemetry-operator + namespace: opentelemetry-operator-system + container: manager diff --git a/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml b/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml new file mode 100644 index 000000000..f6190e439 --- /dev/null +++ b/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml @@ -0,0 +1,53 @@ +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: promreceiver-allocatorconfig-extra +spec: + mode: statefulset + targetAllocator: + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + serviceAccount: ta + prometheusCR: + enabled: true + + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + target_allocator: + endpoint: http://promreceiver-allocatorconfig-extra-targetallocator + interval: 30s + collector_id: ${POD_NAME} + http_sd_config: + refresh_interval: 10s + + processors: + + exporters: + logging: + extensions: + health_check: + service: + telemetry: + metrics: + address: :8888 + extensions: + - health_check + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + diff --git a/tests/e2e/prometheus-config-validation/03-assert.yaml b/tests/e2e/prometheus-config-validation/03-assert.yaml new file mode 100644 index 000000000..b9c6d5d5e --- /dev/null +++ b/tests/e2e/prometheus-config-validation/03-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: promreceiver-nopromconfig-collector +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: promreceiver-nopromconfig-targetallocator +status: + replicas: 1 + readyReplicas: 1 +--- +# Print TA and operator logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/component=opentelemetry-targetallocator + - selector: app.kubernetes.io/component=opentelemetry-collector + - selector: app.kubernetes.io/name=opentelemetry-operator + namespace: opentelemetry-operator-system + container: manager diff --git a/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml b/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml new file mode 100644 index 000000000..5420bb58a --- /dev/null +++ b/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml @@ -0,0 +1,48 @@ +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: promreceiver-nopromconfig +spec: + mode: statefulset + targetAllocator: + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + serviceAccount: ta + prometheusCR: + enabled: true + + config: | + receivers: + jaeger: + protocols: + grpc: + + prometheus: + config: + scrape_configs: [] + target_allocator: + endpoint: http://promreceiver-nopromconfig-targetallocator + interval: 30s + collector_id: ${POD_NAME} + http_sd_config: + refresh_interval: 10s + + processors: + + exporters: + logging: + extensions: + health_check: + service: + telemetry: + metrics: + address: :8888 + extensions: + - health_check + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] + From 0a92a119f5acdcd775169e946638217ff5c78a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 24 May 2023 22:47:50 +0100 Subject: [PATCH 0869/1234] Improve config validation for prometheus receiver and target allocator (#1729) * Improve validation for prometheus receiver config * Improve config validation for target allocator * add changelog entry * review fixes * log empty Prometheus configs passed to discoverer * add tests for ValidateConfig --- .chloggen/fix_validate-ta-config.yaml | 16 +++++ .../opentelemetrycollector_webhook.go | 7 +- cmd/otel-allocator/config/config.go | 9 +++ cmd/otel-allocator/config/config_test.go | 61 +++++++++++++++++ .../config/testdata/no_config.yaml | 0 cmd/otel-allocator/main.go | 4 ++ cmd/otel-allocator/target/discovery.go | 4 ++ cmd/otel-allocator/target/discovery_test.go | 17 +++++ pkg/collector/reconcile/config_replace.go | 5 ++ pkg/collector/reconcile/configmap.go | 9 ++- .../adapters/config_to_prom_config.go | 26 +++++++ .../adapters/config_to_prom_config_test.go | 68 +++++++++++++++++++ 12 files changed, 222 insertions(+), 4 deletions(-) create mode 100755 .chloggen/fix_validate-ta-config.yaml create mode 100644 cmd/otel-allocator/config/testdata/no_config.yaml diff --git a/.chloggen/fix_validate-ta-config.yaml b/.chloggen/fix_validate-ta-config.yaml new file mode 100755 index 000000000..f3dda56b1 --- /dev/null +++ b/.chloggen/fix_validate-ta-config.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Improve config validation for prometheus receiver and target allocator + +# One or more tracking issues related to the change +issues: [1581] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index e635870f0..a9ef9c075 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -26,6 +26,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) @@ -160,7 +161,11 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { // validate Prometheus config for target allocation if r.Spec.TargetAllocator.Enabled { - _, err := ta.ConfigToPromConfig(r.Spec.Config) + promCfg, err := ta.ConfigToPromConfig(r.Spec.Config) + if err != nil { + return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) + } + err = ta.ValidatePromConfig(promCfg, r.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled()) if err != nil { return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 7185b5ce8..569eac851 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -129,3 +129,12 @@ func ParseCLI() (CLIConfig, error) { cLIConf.ClusterConfig = clusterConfig return cLIConf, nil } + +// ValidateConfig validates the cli and file configs together. +func ValidateConfig(config *Config, cliConfig *CLIConfig) error { + scrapeConfigsPresent := (config.Config != nil && len(config.Config.ScrapeConfigs) > 0) + if !(*cliConfig.PromCRWatcherConf.Enabled || scrapeConfigsPresent) { + return fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled") + } + return nil +} diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 26349d6d1..65e28aeef 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -91,6 +91,14 @@ func TestLoad(t *testing.T) { }, wantErr: assert.NoError, }, + { + name: "no config", + args: args{ + file: "./testdata/no_config.yaml", + }, + want: Config{}, + wantErr: assert.NoError, + }, { name: "service monitor pod monitor selector", args: args{ @@ -157,3 +165,56 @@ func TestLoad(t *testing.T) { }) } } + +func TestValidateConfig(t *testing.T) { + enabled := true + disabled := false + testCases := []struct { + name string + cliConfig CLIConfig + fileConfig Config + expectedErr error + }{ + { + name: "promCR enabled, no Prometheus config", + cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &enabled}}, + fileConfig: Config{Config: nil}, + expectedErr: nil, + }, + { + name: "promCR disabled, no Prometheus config", + cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, + fileConfig: Config{Config: nil}, + expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), + }, + { + name: "promCR disabled, Prometheus config present, no scrapeConfigs", + cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, + fileConfig: Config{Config: &promconfig.Config{}}, + expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), + }, + { + name: "promCR disabled, Prometheus config present, scrapeConfigs present", + cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, + fileConfig: Config{ + Config: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, + }, + expectedErr: nil, + }, + { + name: "promCR enabled, Prometheus config present, scrapeConfigs present", + cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &enabled}}, + fileConfig: Config{ + Config: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, + }, + expectedErr: nil, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := ValidateConfig(&tc.fileConfig, &tc.cliConfig) + assert.Equal(t, tc.expectedErr, err) + }) + } +} diff --git a/cmd/otel-allocator/config/testdata/no_config.yaml b/cmd/otel-allocator/config/testdata/no_config.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index fbb96e640..a33d31b48 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -74,6 +74,10 @@ func main() { setupLog.Error(configLoadErr, "Unable to load configuration") } + if validationErr := config.ValidateConfig(&cfg, &cliConf); validationErr != nil { + setupLog.Error(validationErr, "Invalid configuration") + } + cliConf.RootLogger.Info("Starting the Target Allocator") ctx := context.Background() log := ctrl.Log.WithName("allocator") diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go index 38d99b798..70cf82a37 100644 --- a/cmd/otel-allocator/target/discovery.go +++ b/cmd/otel-allocator/target/discovery.go @@ -64,6 +64,10 @@ func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHo } func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { + if cfg == nil { + m.log.Info("Service Discovery got empty Prometheus config", "source", source.String()) + return nil + } m.configsMap[source] = cfg jobToScrapeConfig := make(map[string]*config.ScrapeConfig) diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index de2f1070e..49bfaa471 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -334,6 +334,23 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { } } +func TestDiscovery_NoConfig(t *testing.T) { + scu := &mockScrapeConfigUpdater{mockCfg: map[string]*promconfig.ScrapeConfig{}} + ctx, cancelFunc := context.WithCancel(context.Background()) + d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) + manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) + defer close(manager.close) + defer cancelFunc() + + go func() { + err := d.Run() + assert.NoError(t, err) + }() + // check the updated scrape configs + expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} + assert.Equal(t, expectedScrapeConfigs, scu.mockCfg) +} + func BenchmarkApplyScrapeConfig(b *testing.B) { numConfigs := 1000 scrapeConfig := promconfig.ScrapeConfig{ diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 25f5083a5..8eca3842a 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -60,6 +60,11 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { return "", getCfgPromErr } + validateCfgPromErr := ta.ValidatePromConfig(promCfgMap, instance.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled()) + if validateCfgPromErr != nil { + return "", validateCfgPromErr + } + // yaml marshaling/unsmarshaling is preferred because of the problems associated with the conversion of map to a struct using mapstructure promCfg, marshalErr := yaml.Marshal(promCfgMap) if marshalErr != nil { diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index ca3840bfb..deb5142b1 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -103,7 +103,7 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { labels["app.kubernetes.io/version"] = "latest" } - promConfig, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) + prometheusReceiverConfig, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) if err != nil { return corev1.ConfigMap{}, err } @@ -114,8 +114,11 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/component": "opentelemetry-collector", } - // We only take the "config" from the returned object, we don't need the "target_allocator" configuration here. - taConfig["config"] = promConfig["config"] + // We only take the "config" from the returned object, if it's present + if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { + taConfig["config"] = prometheusConfig + } + if len(params.Instance.Spec.TargetAllocator.AllocationStrategy) > 0 { taConfig["allocation_strategy"] = params.Instance.Spec.TargetAllocator.AllocationStrategy } else { diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/pkg/targetallocator/adapters/config_to_prom_config.go index 1029753ce..1d0f86448 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config.go +++ b/pkg/targetallocator/adapters/config_to_prom_config.go @@ -15,6 +15,7 @@ package adapters import ( + "errors" "fmt" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" @@ -57,3 +58,28 @@ func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { return prometheus, nil } + +// ValidatePromConfig checks if the prometheus receiver config is valid given other collector-level settings. +func ValidatePromConfig(config map[interface{}]interface{}, targetAllocatorEnabled bool, targetAllocatorRewriteEnabled bool) error { + _, promConfigExists := config["config"] + + if targetAllocatorEnabled { + if targetAllocatorRewriteEnabled { // if rewrite is enabled, we will add a target_allocator section during rewrite + return nil + } + _, targetAllocatorExists := config["target_allocator"] + + // otherwise, either the target_allocator or config section needs to be here + if !(promConfigExists || targetAllocatorExists) { + return errors.New("either target allocator or prometheus config needs to be present") + } + + return nil + } + // if target allocator isn't enabled, we need a config section + if !promConfigExists { + return errorNoComponent("prometheusConfig") + } + + return nil +} diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/pkg/targetallocator/adapters/config_to_prom_config_test.go index f39aaecf7..a2b0a9688 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config_test.go +++ b/pkg/targetallocator/adapters/config_to_prom_config_test.go @@ -15,6 +15,7 @@ package adapters_test import ( + "errors" "fmt" "reflect" "testing" @@ -114,3 +115,70 @@ func TestExtractPromConfigFromNullConfig(t *testing.T) { // verify assert.True(t, reflect.ValueOf(promConfig).IsNil()) } + +func TestValidatePromConfig(t *testing.T) { + testCases := []struct { + description string + config map[interface{}]interface{} + targetAllocatorEnabled bool + targetAllocatorRewriteEnabled bool + expectedError error + }{ + { + description: "target_allocator and rewrite enabled", + config: map[interface{}]interface{}{}, + targetAllocatorEnabled: true, + targetAllocatorRewriteEnabled: true, + expectedError: nil, + }, + { + description: "target_allocator enabled, target_allocator section present", + config: map[interface{}]interface{}{ + "target_allocator": map[interface{}]interface{}{}, + }, + targetAllocatorEnabled: true, + targetAllocatorRewriteEnabled: false, + expectedError: nil, + }, + { + description: "target_allocator enabled, config section present", + config: map[interface{}]interface{}{ + "config": map[interface{}]interface{}{}, + }, + targetAllocatorEnabled: true, + targetAllocatorRewriteEnabled: false, + expectedError: nil, + }, + { + description: "target_allocator enabled, neither section present", + config: map[interface{}]interface{}{}, + targetAllocatorEnabled: true, + targetAllocatorRewriteEnabled: false, + expectedError: errors.New("either target allocator or prometheus config needs to be present"), + }, + { + description: "target_allocator disabled, config section present", + config: map[interface{}]interface{}{ + "config": map[interface{}]interface{}{}, + }, + targetAllocatorEnabled: false, + targetAllocatorRewriteEnabled: false, + expectedError: nil, + }, + { + description: "target_allocator disabled, config section not present", + config: map[interface{}]interface{}{}, + targetAllocatorEnabled: false, + targetAllocatorRewriteEnabled: false, + expectedError: fmt.Errorf("no %s available as part of the configuration", "prometheusConfig"), + }, + } + + for _, testCase := range testCases { + testCase := testCase + t.Run(testCase.description, func(t *testing.T) { + err := ta.ValidatePromConfig(testCase.config, testCase.targetAllocatorEnabled, testCase.targetAllocatorRewriteEnabled) + assert.Equal(t, testCase.expectedError, err) + }) + } +} From a684f366b832719ab0bcf9918fe7445f44fcf434 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Thu, 25 May 2023 17:03:00 +0200 Subject: [PATCH 0870/1234] Apache HTTPD Autoinstrumentation - webhook, readme, tests, etc. (#1444) * Branch create from main * Initial commit - webhook logic, readme, e2e tests * go.mod, go.sum revert * crlf last line * crlf on last lines at e2e tests * added chloggen * lint - logger param * lint - godot - comment fixex * e2e test image fix * e2e test fix * e2e test fix * e2e test fix * unit test fix * e2e test fix * e2e test fixes * e2e test fixes * e2e test fix * e2e test fix * e2e test fix * e2e test fixes * e2e test fix * e2e test fix * e2e test fix * e2e test fix * readme update * Merge internal/config/main.go from main * re-added ApacheHttpd to String() * Readme cleanup, e2e test otel repo image * image version bump * revert image version for e2e tests * updated to latest webserver instr. lib * revert e2e tests to v1.0.2 image * image revert to 1.0.2 * e2e test image removed to use default * default httpd image version * namespace annot removal * otel-namespace annot removed * Update README.md Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * unit tests * sync with main * recorder in main.go * Minor fixes after merge * Merge fix * Unit test fix * Unit test fix * Unit test fix * Unit test fixes * Unit test fix * Formatting * featuregate handling, restructured unit tests * unit test fix * unit test fix - featuregate * Update README.md Co-authored-by: Jacob Aronoff * README.md - ApacheHTTPD disabled by default * fixed merge after rebase * resource spec for initcontainers from i13n spec * comments on i13n principles * apache httpd versions explained in comment * apache httpd now StageAlpha (disbld by default) * image origin and license info * test - feature gate default disabled fix * upgrade_test fix for apache disabled by default * Apache HTTPD feature gate enabled * apache https feature gate enabled, merge * revert feature flag * feature flag re-enabled * correct feature flag re-enabled * make bundle for feature flag * make bundle for feature flag * make bundle feature flag * feature gate name change for apache * enable apache i13n by default * Update README.md Co-authored-by: Jacob Aronoff * Update README.md --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Jacob Aronoff --- .chloggen/1444-apache-httpd-final-v1.0.2.yaml | 16 ++ Dockerfile | 3 +- Makefile | 4 +- README.md | 44 ++- ...emetry-operator.clusterserviceversion.yaml | 2 +- internal/config/main.go | 73 ++--- internal/config/options.go | 43 +-- internal/version/main.go | 77 +++--- main.go | 60 ++-- pkg/featuregate/featuregate.go | 6 +- pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/apachehttpd.go | 258 ++++++++++++++++++ pkg/instrumentation/apachehttpd_test.go | 132 +++++++++ pkg/instrumentation/podmutator.go | 27 +- pkg/instrumentation/podmutator_test.go | 236 ++++++++++++++++ pkg/instrumentation/sdk.go | 9 + pkg/instrumentation/sdk_test.go | 149 ++++++++++ pkg/instrumentation/upgrade/upgrade.go | 30 +- pkg/instrumentation/upgrade/upgrade_test.go | 35 ++- .../00-install-collector.yaml | 21 ++ .../00-install-instrumentation.yaml | 17 ++ .../01-assert.yaml | 51 ++++ .../01-install-app.yaml | 32 +++ .../00-install-collector.yaml | 21 ++ .../00-install-instrumentation.yaml | 17 ++ .../01-assert.yaml | 70 +++++ .../01-install-app.yaml | 35 +++ .../02-assert.yaml | 67 +++++ .../02-install-app.yaml | 35 +++ 29 files changed, 1420 insertions(+), 151 deletions(-) create mode 100644 .chloggen/1444-apache-httpd-final-v1.0.2.yaml create mode 100644 pkg/instrumentation/apachehttpd.go create mode 100644 pkg/instrumentation/apachehttpd_test.go create mode 100644 tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-apache-httpd/01-assert.yaml create mode 100644 tests/e2e/instrumentation-apache-httpd/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml create mode 100644 tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml diff --git a/.chloggen/1444-apache-httpd-final-v1.0.2.yaml b/.chloggen/1444-apache-httpd-final-v1.0.2.yaml new file mode 100644 index 000000000..3d9e39a93 --- /dev/null +++ b/.chloggen/1444-apache-httpd-final-v1.0.2.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Added all webhook instrumentation logic, e2e tests, readme + +# One or more tracking issues related to the change +issues: [1444] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Dockerfile b/Dockerfile index c7b895fd0..81296bd41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,10 +27,11 @@ ARG AUTO_INSTRUMENTATION_JAVA_VERSION ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION ARG AUTO_INSTRUMENTATION_DOTNET_VERSION +ARG AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ARG AUTO_INSTRUMENTATION_GO_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 6eaba7ae0..36ffe33ec 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_GO_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION}" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}" ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets @@ -204,7 +204,7 @@ scorecard-tests: operator-sdk # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} . + docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} --build-arg AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push diff --git a/README.md b/README.md index ec40efb8a..c64b72289 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ When using sidecar mode the OpenTelemetry collector container will have the envi ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently DotNet, Go, Java, NodeJS and Python are supported. +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Apache HTTPD, DotNet, Go, Java, NodeJS and Python are supported. To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. @@ -264,6 +264,11 @@ instrumentation.opentelemetry.io/inject-go: "true" instrumentation.opentelemetry.io/otel-go-auto-target-exe: "/path/to/container/executable" ``` +Apache HTTPD: +```bash +instrumentation.opentelemetry.io/inject-apache-httpd: "true" +``` + OpenTelemetry SDK environment variables only: ```bash instrumentation.opentelemetry.io/inject-sdk: "true" @@ -336,11 +341,33 @@ spec: image: your-customized-auto-instrumentation-image:dotnet go: image: your-customized-auto-instrumentation-image:go + apacheHttpd: + image: your-customized-auto-instrumentation-image:apache-httpd ``` The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). Follow the instructions in the Dockerfiles on how to build a custom container image. +#### Using Apache HTTPD autoinstrumentation + +For `Apache HTTPD` autoinstrumentation, by default, instrumentation assumes httpd version 2.4 and httpd configuration directory `/usr/local/apache2/conf` as it is in the official `Apache HTTPD` image (f.e. docker.io/httpd:latest). If you need to use version 2.2, or your HTTPD configuration directory is different, and or you need to adjust agent attributes, customize the instrumentation specification per following example: +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: my-instrumentation + apache: + image: your-customized-auto-instrumentation-image:apache-httpd + version: 2.2 + configPath: /your-custom-config-path + attrs: + - name: ApacheModuleOtelMaxQueueSize + value: "4096" + - name: ... + value: ... +``` +List of all available attributes can be found at [otel-webserver-module](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module) + #### Inject OpenTelemetry SDK environment variables only You can configure the OpenTelemetry SDK for applications which can't currently be autoinstrumented by using `inject-sdk` in place of (e.g.) `inject-python` or `inject-java`. This will inject environment variables like `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_TRACES_SAMPLER`, and `OTEL_EXPORTER_OTLP_ENDPOINT`, that you can configure in the `Instrumentation`, but will not actually provide the SDK. @@ -358,13 +385,14 @@ Prefix a gate with '-' to disable support for the corresponding language. Prefixing a gate with '+' or no prefix will enable support for the corresponding language. If a language is enabled by default its gate only needs to be supplied when disabling the gate. -| Language | Gate | Default Value | -|----------|---------------------------------------|---------------| -| Java | `operator.autoinstrumentation.java` | enabled | -| NodeJS | `operator.autoinstrumentation.nodejs` | enabled | -| Python | `operator.autoinstrumentation.python` | enabled | -| DotNet | `operator.autoinstrumentation.dotnet` | enabled | -| Go | `operator.autoinstrumentation.go` | disabled | +| Language | Gate | Default Value | +|---------------|---------------------------------------------|---------------| +| Java | `operator.autoinstrumentation.java` | enabled | +| NodeJS | `operator.autoinstrumentation.nodejs` | enabled | +| Python | `operator.autoinstrumentation.python` | enabled | +| DotNet | `operator.autoinstrumentation.dotnet` | enabled | +| ApacheHttpD | `operator.autoinstrumentation.apache-httpd` | enabled | +| Go | `operator.autoinstrumentation.go` | disabled | Language not specified in the table are always supported and cannot be disabled. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 152ccf466..ff6d6b7ee 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-05-15T08:04:44Z" + createdAt: "2023-05-24T11:54:55Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/internal/config/main.go b/internal/config/main.go index 2304e31fb..225f590f6 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -34,23 +34,24 @@ const ( // Config holds the static configuration for this operator. type Config struct { - autoDetect autodetect.AutoDetect - logger logr.Logger - targetAllocatorImage string - operatorOpAMPBridgeImage string - autoInstrumentationPythonImage string - collectorImage string - collectorConfigMapEntry string - autoInstrumentationDotNetImage string - autoInstrumentationGoImage string - targetAllocatorConfigMapEntry string - autoInstrumentationNodeJSImage string - autoInstrumentationJavaImage string - onOpenShiftRoutesChange changeHandler - labelsFilter []string - openshiftRoutes openshiftRoutesStore - autoDetectFrequency time.Duration - hpaVersion hpaVersionStore + autoDetect autodetect.AutoDetect + logger logr.Logger + targetAllocatorImage string + operatorOpAMPBridgeImage string + autoInstrumentationPythonImage string + collectorImage string + collectorConfigMapEntry string + autoInstrumentationDotNetImage string + autoInstrumentationGoImage string + autoInstrumentationApacheHttpdImage string + targetAllocatorConfigMapEntry string + autoInstrumentationNodeJSImage string + autoInstrumentationJavaImage string + onOpenShiftRoutesChange changeHandler + labelsFilter []string + openshiftRoutes openshiftRoutesStore + autoDetectFrequency time.Duration + hpaVersion hpaVersionStore } // New constructs a new configuration based on the given options. @@ -71,22 +72,23 @@ func New(opts ...Option) Config { } return Config{ - autoDetect: o.autoDetect, - autoDetectFrequency: o.autoDetectFrequency, - collectorImage: o.collectorImage, - collectorConfigMapEntry: o.collectorConfigMapEntry, - targetAllocatorImage: o.targetAllocatorImage, - operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, - targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, - logger: o.logger, - openshiftRoutes: o.openshiftRoutes, - hpaVersion: o.hpaVersion, - onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, - autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, - autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, - autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, - autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, - labelsFilter: o.labelsFilter, + autoDetect: o.autoDetect, + autoDetectFrequency: o.autoDetectFrequency, + collectorImage: o.collectorImage, + collectorConfigMapEntry: o.collectorConfigMapEntry, + targetAllocatorImage: o.targetAllocatorImage, + operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, + targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, + logger: o.logger, + openshiftRoutes: o.openshiftRoutes, + hpaVersion: o.hpaVersion, + onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, + autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, + autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, + autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, + autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, + autoInstrumentationApacheHttpdImage: o.autoInstrumentationApacheHttpdImage, + labelsFilter: o.labelsFilter, } } @@ -194,6 +196,11 @@ func (c *Config) AutoInstrumentationGoImage() string { return c.autoInstrumentationGoImage } +// AutoInstrumentationApacheHttpdImage returns OpenTelemetry ApacheHttpd auto-instrumentation container image. +func (c *Config) AutoInstrumentationApacheHttpdImage() string { + return c.autoInstrumentationApacheHttpdImage +} + // LabelsFilter Returns the filters converted to regex strings used to filter out unwanted labels from propagations. func (c *Config) LabelsFilter() []string { return c.labelsFilter diff --git a/internal/config/options.go b/internal/config/options.go index b8e57889c..021968141 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -29,24 +29,25 @@ import ( type Option func(c *options) type options struct { - autoDetect autodetect.AutoDetect - version version.Version - logger logr.Logger - autoInstrumentationDotNetImage string - autoInstrumentationGoImage string - autoInstrumentationJavaImage string - autoInstrumentationNodeJSImage string - autoInstrumentationPythonImage string - collectorImage string - collectorConfigMapEntry string - targetAllocatorConfigMapEntry string - targetAllocatorImage string - operatorOpAMPBridgeImage string - onOpenShiftRoutesChange changeHandler - labelsFilter []string - openshiftRoutes openshiftRoutesStore - hpaVersion hpaVersionStore - autoDetectFrequency time.Duration + autoDetect autodetect.AutoDetect + version version.Version + logger logr.Logger + autoInstrumentationDotNetImage string + autoInstrumentationGoImage string + autoInstrumentationJavaImage string + autoInstrumentationNodeJSImage string + autoInstrumentationPythonImage string + autoInstrumentationApacheHttpdImage string + collectorImage string + collectorConfigMapEntry string + targetAllocatorConfigMapEntry string + targetAllocatorImage string + operatorOpAMPBridgeImage string + onOpenShiftRoutesChange changeHandler + labelsFilter []string + openshiftRoutes openshiftRoutesStore + hpaVersion hpaVersionStore + autoDetectFrequency time.Duration } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -139,6 +140,12 @@ func WithAutoInstrumentationGoImage(s string) Option { } } +func WithAutoInstrumentationApacheHttpdImage(s string) Option { + return func(o *options) { + o.autoInstrumentationApacheHttpdImage = s + } +} + func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/version/main.go b/internal/version/main.go index e132bd4b3..6b4883518 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -21,53 +21,56 @@ import ( ) var ( - version string - buildDate string - otelCol string - targetAllocator string - operatorOpAMPBridge string - autoInstrumentationJava string - autoInstrumentationNodeJS string - autoInstrumentationPython string - autoInstrumentationDotNet string - autoInstrumentationGo string + version string + buildDate string + otelCol string + targetAllocator string + operatorOpAMPBridge string + autoInstrumentationJava string + autoInstrumentationNodeJS string + autoInstrumentationPython string + autoInstrumentationDotNet string + autoInstrumentationApacheHttpd string + autoInstrumentationGo string ) // Version holds this Operator's version as well as the version of some of the components it uses. type Version struct { - Operator string `json:"opentelemetry-operator"` - BuildDate string `json:"build-date"` - OpenTelemetryCollector string `json:"opentelemetry-collector-version"` - Go string `json:"go-version"` - TargetAllocator string `json:"target-allocator-version"` - OperatorOpAMPBridge string `json:"operator-opamp-bridge"` - AutoInstrumentationJava string `json:"auto-instrumentation-java"` - AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` - AutoInstrumentationPython string `json:"auto-instrumentation-python"` - AutoInstrumentationDotNet string `json:"auto-instrumentation-dotnet"` - AutoInstrumentationGo string `json:"auto-instrumentation-go"` + Operator string `json:"opentelemetry-operator"` + BuildDate string `json:"build-date"` + OpenTelemetryCollector string `json:"opentelemetry-collector-version"` + Go string `json:"go-version"` + TargetAllocator string `json:"target-allocator-version"` + OperatorOpAMPBridge string `json:"operator-opamp-bridge"` + AutoInstrumentationJava string `json:"auto-instrumentation-java"` + AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` + AutoInstrumentationPython string `json:"auto-instrumentation-python"` + AutoInstrumentationDotNet string `json:"auto-instrumentation-dotnet"` + AutoInstrumentationGo string `json:"auto-instrumentation-go"` + AutoInstrumentationApacheHttpd string `json:"auto-instrumentation-apache-httpd"` } // Get returns the Version object with the relevant information. func Get() Version { return Version{ - Operator: version, - BuildDate: buildDate, - OpenTelemetryCollector: OpenTelemetryCollector(), - Go: runtime.Version(), - TargetAllocator: TargetAllocator(), - OperatorOpAMPBridge: OperatorOpAMPBridge(), - AutoInstrumentationJava: AutoInstrumentationJava(), - AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), - AutoInstrumentationPython: AutoInstrumentationPython(), - AutoInstrumentationDotNet: AutoInstrumentationDotNet(), - AutoInstrumentationGo: AutoInstrumentationGo(), + Operator: version, + BuildDate: buildDate, + OpenTelemetryCollector: OpenTelemetryCollector(), + Go: runtime.Version(), + TargetAllocator: TargetAllocator(), + OperatorOpAMPBridge: OperatorOpAMPBridge(), + AutoInstrumentationJava: AutoInstrumentationJava(), + AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), + AutoInstrumentationPython: AutoInstrumentationPython(), + AutoInstrumentationDotNet: AutoInstrumentationDotNet(), + AutoInstrumentationGo: AutoInstrumentationGo(), + AutoInstrumentationApacheHttpd: AutoInstrumentationApacheHttpd(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v', AutoInstrumentationApacheHttpd='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, @@ -79,6 +82,7 @@ func (v Version) String() string { v.AutoInstrumentationPython, v.AutoInstrumentationDotNet, v.AutoInstrumentationGo, + v.AutoInstrumentationApacheHttpd, ) } @@ -143,6 +147,13 @@ func AutoInstrumentationDotNet() string { return "0.0.0" } +func AutoInstrumentationApacheHttpd() string { + if len(autoInstrumentationApacheHttpd) > 0 { + return autoInstrumentationApacheHttpd + } + return "0.0.0" +} + func AutoInstrumentationGo() string { if len(autoInstrumentationGo) > 0 { return autoInstrumentationGo diff --git a/main.go b/main.go index 4aed72a33..4de6e3b25 100644 --- a/main.go +++ b/main.go @@ -85,20 +85,21 @@ func main() { // add flags related to this operator var ( - metricsAddr string - probeAddr string - enableLeaderElection bool - collectorImage string - targetAllocatorImage string - operatorOpAMPBridgeImage string - autoInstrumentationJava string - autoInstrumentationNodeJS string - autoInstrumentationPython string - autoInstrumentationDotNet string - autoInstrumentationGo string - labelsFilter []string - webhookPort int - tlsOpt tlsConfig + metricsAddr string + probeAddr string + enableLeaderElection bool + collectorImage string + targetAllocatorImage string + operatorOpAMPBridgeImage string + autoInstrumentationJava string + autoInstrumentationNodeJS string + autoInstrumentationPython string + autoInstrumentationDotNet string + autoInstrumentationApacheHttpd string + autoInstrumentationGo string + labelsFilter []string + webhookPort int + tlsOpt tlsConfig ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") @@ -114,6 +115,7 @@ func main() { pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") @@ -133,6 +135,7 @@ func main() { "auto-instrumentation-python", autoInstrumentationPython, "auto-instrumentation-dotnet", autoInstrumentationDotNet, "auto-instrumentation-go", autoInstrumentationGo, + "auto-instrumentation-apache-httpd", autoInstrumentationApacheHttpd, "feature-gates", flagset.Lookup(featuregate.FeatureGatesFlag).Value.String(), "build-date", v.BuildDate, "go-version", v.Go, @@ -161,6 +164,7 @@ func main() { config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), config.WithAutoInstrumentationDotNetImage(autoInstrumentationDotNet), config.WithAutoInstrumentationGoImage(autoInstrumentationGo), + config.WithAutoInstrumentationApacheHttpdImage(autoInstrumentationApacheHttpd), config.WithAutoDetect(ad), config.WithLabelFilters(labelsFilter), ) @@ -232,11 +236,12 @@ func main() { if err = (&otelv1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava, - otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, - otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, - otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, - otelv1alpha1.AnnotationDefaultAutoInstrumentationGo: autoInstrumentationGo, + otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava, + otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, + otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, + otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, + otelv1alpha1.AnnotationDefaultAutoInstrumentationGo: autoInstrumentationGo, + otelv1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: autoInstrumentationApacheHttpd, }, }, }).SetupWebhookWithManager(mgr); err != nil { @@ -297,14 +302,15 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v // adds the upgrade mechanism to be executed once the manager is ready err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { u := &instrumentationupgrade.InstrumentationUpgrade{ - Logger: ctrl.Log.WithName("instrumentation-upgrade"), - DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), - DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), - DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), - DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), - DefaultAutoInstGo: cfg.AutoInstrumentationDotNetImage(), - Client: mgr.GetClient(), - Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), + Logger: ctrl.Log.WithName("instrumentation-upgrade"), + DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), + DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), + DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), + DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), + DefaultAutoInstGo: cfg.AutoInstrumentationDotNetImage(), + DefaultAutoInstApacheHttpd: cfg.AutoInstrumentationApacheHttpdImage(), + Client: mgr.GetClient(), + Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), } return u.ManagedInstances(c) })) diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 6fe2335a8..901f6ae64 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -44,7 +44,11 @@ var ( EnableGoAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.go", featuregate.StageAlpha, - featuregate.WithRegisterDescription("controls whether the operator supports Goland auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports Golang auto-instrumentation")) + EnableApacheHTTPAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.apache-httpd", + featuregate.StageBeta, + featuregate.WithRegisterDescription("controls whether the operator supports Apache HTTPD auto-instrumentation")) // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should // automatically be rewritten when the target allocator is enabled. diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index a49ca6e36..6c518cf54 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -31,6 +31,7 @@ const ( annotationGoExecPath = "instrumentation.opentelemetry.io/otel-go-auto-target-exe" annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" + annotationInjectApacheHttpd = "instrumentation.opentelemetry.io/inject-apache-httpd" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go new file mode 100644 index 000000000..30e6f7b75 --- /dev/null +++ b/pkg/instrumentation/apachehttpd.go @@ -0,0 +1,258 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "sort" + "strings" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + apacheConfigDirectory = "/usr/local/apache2/conf" + apacheConfigFile = "httpd.conf" + apacheAgentConfigFile = "opentemetry_agent.conf" + apacheAgentDirectory = "/opt/opentelemetry-webserver" + apacheAgentSubDirectory = "/agent" + apacheAgentDirFull = apacheAgentDirectory + apacheAgentSubDirectory + apacheAgentConfigDirectory = "/source-conf" + apacheAgentConfDirFull = apacheAgentDirectory + apacheAgentConfigDirectory + apacheAgentInitContainerName = "otel-agent-attach-apache" + apacheAgentCloneContainerName = "otel-agent-source-container-clone" + apacheAgentConfigVolume = "otel-apache-conf-dir" + apacheAgentVolume = "otel-apache-agent" + apacheAttributesEnvVar = "OTEL_APACHE_AGENT_CONF" + apacheServiceInstanceId = "<>" + apacheServiceInstanceIdEnvVar = "APACHE_SERVICE_INSTANCE_ID" +) + +/* + Apache injection is different from other languages in: + - OpenTelemetry parameters are not passed as environmental variables, but via a configuration file + - OpenTelemetry module needs to be specified in the Apache HTTPD config file, but that is already specified by + an author of the application image and the configuration must be preserved + + Therefore, following approach is taken: + 1) Inject an init container created as a *clone* of the application container and copy config file to an empty shared volume + 2) Inject a second init container with the OpenTelemetry module itself - i.e. instrumentation image + 3) Take the Apache HTTPD configuration file saved on volume and inject reference to OpenTelemetry module into config + 4) Create on the same volume a configuration file for OpenTelemetry module + 5) Copy OpenTelemetry module from second init container (instrumentation image) to another shared volume + 6) Inject mounting of volumes / files into appropriate directories in application container +*/ + +func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod corev1.Pod, index int, otlpEndpoint string, resourceMap map[string]string) corev1.Pod { + + // caller checks if there is at least one container + container := &pod.Spec.Containers[index] + + // inject env vars + for _, env := range apacheSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + + // First make a clone of the instrumented container to take the existing Apache configuration from + // and create init container from it + if isApacheInitContainerMissing(pod, apacheAgentCloneContainerName) { + // Inject volume for original Apache configuration + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + cloneContainer := container.DeepCopy() + cloneContainer.Name = apacheAgentCloneContainerName + cloneContainer.Command = []string{"/bin/sh", "-c"} + cloneContainer.Args = []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentConfDirFull} + cloneContainer.VolumeMounts = append(cloneContainer.VolumeMounts, corev1.VolumeMount{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }) + // remove resource requirements since those are then reserved for the lifetime of a pod + // and we definitely do not need them for the init container for cp command + cloneContainer.Resources = apacheSpec.Resources + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, *cloneContainer) + + // drop volume mount with volume-provided Apache config from original container + // since it could over-write configuration provided by the injection + idxFound := -1 + for idx, volume := range container.VolumeMounts { + if strings.Contains(volume.MountPath, apacheConfigDirectory) { // potentially passes config, which we want to pass to init copy only + idxFound = idx + break + } + } + if idxFound >= 0 { + volumeMounts := container.VolumeMounts + volumeMounts = append(volumeMounts[:idxFound], volumeMounts[idxFound+1:]...) + container.VolumeMounts = volumeMounts + } + + // Inject volumes info instrumented container - Apache config dir + Apache agent + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: apacheAgentVolume, + MountPath: apacheAgentDirFull, + }) + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: apacheAgentConfigVolume, + MountPath: apacheConfigDirectory, + }) + } + + // Inject second init container with instrumentation image + // Create / update config files + // Copy OTEL module to a shared volume + if isApacheInitContainerMissing(pod, apacheAgentInitContainerName) { + // Inject volume for agent + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: apacheAgentInitContainerName, + Image: apacheSpec.Image, + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + // Copy agent binaries to shared volume + "cp -ar /opt/opentelemetry/* " + apacheAgentDirFull + " && " + + // setup logging configuration from template + "export agentLogDir=$(echo \"" + apacheAgentDirFull + "/logs\" | sed 's,/,\\\\/,g') && " + + "cat " + apacheAgentDirFull + "/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > " + apacheAgentDirFull + "/conf/appdynamics_sdk_log4cxx.xml &&" + + // Create agent configuration file by pasting content of env var to a file + "echo \"$" + apacheAttributesEnvVar + "\" > " + apacheAgentConfDirFull + "/" + apacheAgentConfigFile + " && " + + "sed -i 's/" + apacheServiceInstanceId + "/'${" + apacheServiceInstanceIdEnvVar + "}'/g' " + apacheAgentConfDirFull + "/" + apacheAgentConfigFile + " && " + + // Include a link to include Apache agent configuration file into httpd.conf + "echo 'Include " + apacheConfigDirectory + "/" + apacheAgentConfigFile + "' >> " + apacheAgentConfDirFull + "/" + apacheConfigFile, + }, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: getApacheOtelConfig(pod, apacheSpec, index, otlpEndpoint, resourceMap), + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + Resources: apacheSpec.Resources, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirFull, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }) + } + + return pod +} + +// Calculate if we already inject InitContainers. +func isApacheInitContainerMissing(pod corev1.Pod, containerName string) bool { + for _, initContainer := range pod.Spec.InitContainers { + if initContainer.Name == containerName { + return false + } + } + return true +} + +// Calculate Apache HTTPD agent configuration file based on attributes provided by the injection rules +// and by the pod values. +func getApacheOtelConfig(pod corev1.Pod, apacheSpec v1alpha1.ApacheHttpd, index int, otelEndpoint string, resourceMap map[string]string) string { + template := ` +#Load the Otel Webserver SDK +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_common.so +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_resources.so +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_trace.so +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_otlp_recordable.so +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so +#Load the Otel ApacheModule SDK +LoadFile %[1]s/sdk_lib/lib/libopentelemetry_webserver_sdk.so +#Load the Apache Module. In this example for Apache 2.4 +#LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel.so +#Load the Apache Module. In this example for Apache 2.2 +#LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel22.so +LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel%[2]s.so +#Attributes +` + if otelEndpoint == "" { + otelEndpoint = "http://localhost:4317/" + } + serviceName := chooseServiceName(pod, resourceMap, index) + serviceNamespace := pod.GetNamespace() + // Namespace name override TBD + + // There are two versions of the OTEL modules - for Apache HTTPD 2.4 and 2.2. + // 2.4 is default and the module does not have any version suffix + // 2.2 has version suffix "22" + versionSuffix := "" + if apacheSpec.Version == "2.2" { + versionSuffix = "22" + } + + attrMap := map[string]string{ + "ApacheModuleEnabled": "ON", + // ApacheModule Otel Exporter details + "ApacheModuleOtelSpanExporter": "otlp", + "ApacheModuleOtelExporterEndpoint": otelEndpoint, + // Service name and other IDs + "ApacheModuleServiceName": serviceName, + "ApacheModuleServiceNamespace": serviceNamespace, + "ApacheModuleServiceInstanceId": apacheServiceInstanceId, + + "ApacheModuleResolveBackends": " ON", + "ApacheModuleTraceAsError": " ON", + } + for _, attr := range apacheSpec.Attrs { + attrMap[attr.Name] = attr.Value + } + + configFileContent := fmt.Sprintf(template, + apacheAgentDirectory+apacheAgentSubDirectory, + versionSuffix) + + keys := make([]string, 0, len(attrMap)) + for key := range attrMap { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, key := range keys { + configFileContent += fmt.Sprintf("%s %s\n", key, attrMap[key]) + } + + return configFileContent +} diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go new file mode 100644 index 000000000..9ae5a9f9b --- /dev/null +++ b/pkg/instrumentation/apachehttpd_test.go @@ -0,0 +1,132 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestInjectApacheHttpdagent(t *testing.T) { + tests := []struct { + name string + v1alpha1.ApacheHttpd + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "Clone Container not present", + ApacheHttpd: v1alpha1.ApacheHttpd{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheConfigDirectory, + }, + }, + }, + }, + }, + }, + }, + } + + resourceMap := map[string]string{ + string(semconv.K8SDeploymentNameKey): "apache-httpd-service-name", + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectApacheHttpdagent(logr.Discard(), test.ApacheHttpd, test.pod, 0, "http://otlp-endpoint:4317", resourceMap) + assert.Equal(t, test.expected, pod) + }) + } +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 629f89fff..60c6059c6 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -43,12 +43,13 @@ type instPodMutator struct { } type languageInstrumentations struct { - Java *v1alpha1.Instrumentation - NodeJS *v1alpha1.Instrumentation - Python *v1alpha1.Instrumentation - DotNet *v1alpha1.Instrumentation - Go *v1alpha1.Instrumentation - Sdk *v1alpha1.Instrumentation + Java *v1alpha1.Instrumentation + NodeJS *v1alpha1.Instrumentation + Python *v1alpha1.Instrumentation + DotNet *v1alpha1.Instrumentation + ApacheHttpd *v1alpha1.Instrumentation + Go *v1alpha1.Instrumentation + Sdk *v1alpha1.Instrumentation } var _ webhookhandler.PodMutator = (*instPodMutator)(nil) @@ -141,6 +142,18 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Go auto instrumentation is not enabled") } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectApacheHttpd); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + if featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.ApacheHttpd = inst + } else { + logger.Error(nil, "support for Apache HTTPD auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Apache HTTPD auto instrumentation is not enabled") + } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectSdk); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") @@ -148,7 +161,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } insts.Sdk = inst - if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Go == nil && insts.Sdk == nil { + if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Go == nil && insts.ApacheHttpd == nil && insts.Sdk == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 86f535469..01e732626 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1367,6 +1367,242 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "apache httpd injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "apache-httpd", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "apache-httpd", + }, + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "otel/apache-httpd:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{}, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otel-apache-conf-dir", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: "otel-apache-agent", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "otel/apache-httpd:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://collector:12345\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + }, + { + Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheConfigDirectory, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=apache-httpd,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "apache httpd injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "apache-httpd-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "apache-httpd-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "otel/apache-httpd:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 65aea489c..de037bbcb 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -134,6 +134,15 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations } } } + if insts.ApacheHttpd != nil { + otelinst := *insts.ApacheHttpd + i.logger.V(1).Info("injecting Apache Httpd instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + // Apache agent is configured via config files rather than env vars. + // Therefore, service name, otlp endpoint and other attributes are passed to the agent injection method + pod = injectApacheHttpdagent(i.logger, otelinst.Spec.ApacheHttpd, pod, index, otelinst.Spec.Endpoint, i.createResourceMap(ctx, otelinst, ns, pod, index)) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + } if insts.Sdk != nil { otelinst := *insts.Sdk i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index c2c04beb9..2c0982bfb 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1101,6 +1101,155 @@ func TestInjectGo(t *testing.T) { } } +func TestInjectApacheHttpd(t *testing.T) { + + tests := []struct { + name string + insts languageInstrumentations + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "injection enabled, exporter set", + insts: languageInstrumentations{ + ApacheHttpd: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otel-apache-conf-dir", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: "otel-apache-agent", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "img:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint https://collector:4318\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheConfigDirectory, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "https://collector:4318", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod, "") + assert.Equal(t, test.expected, pod) + }) + } +} + func TestInjectSdkOnly(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 2edc4af7d..a3fed661e 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -28,14 +28,15 @@ import ( ) type InstrumentationUpgrade struct { - Client client.Client - Logger logr.Logger - Recorder record.EventRecorder - DefaultAutoInstJava string - DefaultAutoInstNodeJS string - DefaultAutoInstPython string - DefaultAutoInstDotNet string - DefaultAutoInstGo string + Client client.Client + Logger logr.Logger + Recorder record.EventRecorder + DefaultAutoInstJava string + DefaultAutoInstNodeJS string + DefaultAutoInstPython string + DefaultAutoInstDotNet string + DefaultAutoInstApacheHttpd string + DefaultAutoInstGo string } // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch @@ -138,5 +139,18 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Go auto instrumentation is not enabled") } } + autoInstApacheHttpd := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd] + if autoInstApacheHttpd != "" { + if featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.ApacheHttpd.Image == autoInstApacheHttpd { + inst.Spec.ApacheHttpd.Image = u.DefaultAutoInstApacheHttpd + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd] = u.DefaultAutoInstApacheHttpd + } + } else { + u.Logger.Error(nil, "support for Apache HTTPD auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Apache HTTPD auto instrumentation is not enabled") + } + } return inst } diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 139cfd8cf..88857742d 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -38,6 +38,12 @@ func TestUpgrade(t *testing.T) { require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal)) }) + originalVal = featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + }) + nsName := strings.ToLower(t.Name()) err := k8sClient.Create(context.Background(), &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -51,11 +57,12 @@ func TestUpgrade(t *testing.T) { Name: "my-inst", Namespace: nsName, Annotations: map[string]string{ - v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", - v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", - v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", - v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", - v1alpha1.AnnotationDefaultAutoInstrumentationGo: "go:1", + v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", + v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", + v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", + v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", + v1alpha1.AnnotationDefaultAutoInstrumentationGo: "go:1", + v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd:1", }, }, Spec: v1alpha1.InstrumentationSpec{ @@ -70,17 +77,19 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "python:1", inst.Spec.Python.Image) assert.Equal(t, "dotnet:1", inst.Spec.DotNet.Image) assert.Equal(t, "go:1", inst.Spec.Go.Image) + assert.Equal(t, "apache-httpd:1", inst.Spec.ApacheHttpd.Image) err = k8sClient.Create(context.Background(), inst) require.NoError(t, err) up := &InstrumentationUpgrade{ - Logger: logr.Discard(), - DefaultAutoInstJava: "java:2", - DefaultAutoInstNodeJS: "nodejs:2", - DefaultAutoInstPython: "python:2", - DefaultAutoInstDotNet: "dotnet:2", - DefaultAutoInstGo: "go:2", - Client: k8sClient, + Logger: logr.Discard(), + DefaultAutoInstJava: "java:2", + DefaultAutoInstNodeJS: "nodejs:2", + DefaultAutoInstPython: "python:2", + DefaultAutoInstDotNet: "dotnet:2", + DefaultAutoInstGo: "go:2", + DefaultAutoInstApacheHttpd: "apache-httpd:2", + Client: k8sClient, } err = up.ManagedInstances(context.Background()) require.NoError(t, err) @@ -101,4 +110,6 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "dotnet:2", updated.Spec.DotNet.Image) assert.Equal(t, "go:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo]) assert.Equal(t, "go:2", updated.Spec.Go.Image) + assert.Equal(t, "apache-httpd:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd]) + assert.Equal(t, "apache-httpd:2", updated.Spec.ApacheHttpd.Image) } diff --git a/tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml b/tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml new file mode 100644 index 000000000..f25801708 --- /dev/null +++ b/tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml b/tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml new file mode 100644 index 000000000..26bcbaf9e --- /dev/null +++ b/tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml @@ -0,0 +1,17 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: apache +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + apacheHttpd: + attrs: + - name: ApacheModuleOtelMaxQueueSize + value: "4096" diff --git a/tests/e2e/instrumentation-apache-httpd/01-assert.yaml b/tests/e2e/instrumentation-apache-httpd/01-assert.yaml new file mode 100644 index 000000000..58d146974 --- /dev/null +++ b/tests/e2e/instrumentation-apache-httpd/01-assert.yaml @@ -0,0 +1,51 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-apache-httpd: 'true' + sidecar.opentelemetry.io/inject: 'true' + labels: + app: my-apache +spec: + containers: + - env: + - name: OTEL_SERVICE_NAME + value: my-apache + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: '0.25' + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: otel-apache-agent + mountPath: /opt/opentelemetry-webserver/agent + - name: otel-apache-conf-dir + mountPath: /usr/local/apache2/conf + - args: + - --config=env:OTEL_CONFIG + name: otc-container + initContainers: + - args: + - cp -r /usr/local/apache2/conf/* /opt/opentelemetry-webserver/source-conf + name: otel-agent-source-container-clone + - args: + - cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo "/opt/opentelemetry-webserver/agent/logs" | sed 's,/,\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo "$OTEL_APACHE_AGENT_CONF" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf + name: otel-agent-attach-apache +status: + phase: Running diff --git a/tests/e2e/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e/instrumentation-apache-httpd/01-install-app.yaml new file mode 100644 index 000000000..0edb9c9e1 --- /dev/null +++ b/tests/e2e/instrumentation-apache-httpd/01-install-app.yaml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-apache +spec: + selector: + matchLabels: + app: my-apache + replicas: 1 + template: + metadata: + labels: + app: my-apache + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-apache-httpd: "true" + spec: + containers: + - name: myapp + image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e + # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd + # licensed under Apache 2.0 + imagePullPolicy: Always + ports: + - containerPort: 8080 + resources: + limits: + cpu: "1" + memory: 500Mi + requests: + cpu: 250m + memory: 100Mi diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f25801708 --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..26bcbaf9e --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,17 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: apache +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + apacheHttpd: + attrs: + - name: ApacheModuleOtelMaxQueueSize + value: "4096" diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml new file mode 100644 index 000000000..4a6ddc1ef --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml @@ -0,0 +1,70 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-apache-httpd: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + labels: + app: my-apache +spec: + containers: + - env: + - name: OTEL_SERVICE_NAME + value: my-apache + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /opt/opentelemetry-webserver/agent + name: otel-apache-agent + - mountPath: /usr/local/apache2/conf + name: otel-apache-conf-dir + - env: + - name: OTEL_SERVICE_NAME + value: my-apache + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myrabbit + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - args: + - --config=env:OTEL_CONFIG + name: otc-container +status: + phase: Running diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..d5e3b630e --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-apache +spec: + selector: + matchLabels: + app: my-apache + replicas: 1 + template: + metadata: + labels: + app: my-apache + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-apache-httpd: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + containers: + - name: myapp + image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e + # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd + # licensed under Apache 2.0 + imagePullPolicy: Always + ports: + - containerPort: 8080 + resources: + limits: + cpu: "1" + memory: 500Mi + requests: + cpu: 250m + memory: 100Mi + - name: myrabbit + image: rabbitmq diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml new file mode 100644 index 000000000..029982e32 --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml @@ -0,0 +1,67 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-apache-httpd: "true" + sidecar.opentelemetry.io/inject: "true" + labels: + app: my-apache +spec: + containers: + - env: + - name: OTEL_SERVICE_NAME + value: my-apache + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /opt/opentelemetry-webserver/agent + name: otel-apache-agent + - mountPath: /usr/local/apache2/conf + name: otel-apache-conf-dir + - env: + - name: OTEL_SERVICE_NAME + value: my-apache + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myrabbit + - args: + - --config=env:OTEL_CONFIG + name: otc-container +status: + phase: Running diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..232a8057f --- /dev/null +++ b/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-apache +spec: + selector: + matchLabels: + app: my-apache + replicas: 1 + template: + metadata: + labels: + app: my-apache + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-apache-httpd: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + containers: + - name: myapp + image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e + # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd + # licensed under Apache 2.0 + imagePullPolicy: Always + ports: + - containerPort: 8080 + resources: + limits: + cpu: "1" + memory: 500Mi + requests: + cpu: 250m + memory: 100Mi + - name: myrabbit + image: rabbitmq From e68ee345e6df1dab5fe621ebca8d7f98b559e814 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 31 May 2023 09:40:43 -0600 Subject: [PATCH 0871/1234] [chore] Add parent job that can check the matrix (#1769) * Add parent job that can check the matrix * Add check job for scorecard-tests * fix scorecard check --- .github/workflows/e2e.yaml | 17 +++++++++++++++++ .github/workflows/scorecard.yaml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e596c4e99..287a438b3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -50,3 +50,20 @@ jobs: env: KUBE_VERSION: ${{ matrix.kube-version }} run: make e2e-log-operator KUBE_VERSION=$KUBE_VERSION + + e2e-tests-check: + runs-on: ubuntu-20.04 + if: always() + needs: [e2e-tests] + steps: + - name: Print result + run: echo ${{ needs.e2e-tests.result }} + - name: Interpret result + run: | + if [[ success == ${{ needs.e2e-tests.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 7d9f415e6..ae0e5a734 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -43,3 +43,20 @@ jobs: - name: "run scorecard test" run: make scorecard-tests + + scorecard-tests-check: + runs-on: ubuntu-20.04 + if: always() + needs: [scorecard-tests] + steps: + - name: Print result + run: echo ${{ needs.scorecard-tests.result }} + - name: Interpret result + run: | + if [[ success == ${{ needs.scorecard-tests.result }} ]] + then + echo "All matrix jobs passed!" + else + echo "One or more matrix jobs failed." + false + fi From d6d9f2f628a80858460cddbbee85b4ca9f13fecf Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 31 May 2023 12:14:13 -0400 Subject: [PATCH 0872/1234] Bump kubernetes to 1.27 operator and target allocator (#1653) * Bump kubernetes to 1.27 everywhere * fix broken updates * Fix dep order * rename * upgrade controller-gen and kustomize * bump allocator deps * unbump opamp bridge for now * upgrade deprecations * fix kuttl test * bundle --- .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- Makefile | 4 +- apis/v1alpha1/instrumentation_webhook.go | 13 +- apis/v1alpha1/instrumentation_webhook_test.go | 14 +- .../opentelemetrycollector_webhook.go | 13 +- ...emetry-operator.clusterserviceversion.yaml | 2 +- .../opentelemetry.io_instrumentations.yaml | 20 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 51 ++- cmd/otel-allocator/go.mod | 151 +++---- cmd/otel-allocator/go.sum | 387 ++++++++---------- cmd/otel-allocator/prehook/relabel.go | 2 +- cmd/otel-allocator/watcher/promOperator.go | 26 +- .../opentelemetry.io_instrumentations.yaml | 21 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 52 +-- config/rbac/role.yaml | 1 - config/webhook/manifests.yaml | 2 - docs/api.md | 50 +-- go.mod | 38 +- go.sum | 99 ++--- hack/check-operator-ready.go | 10 +- internal/webhookhandler/webhookhandler.go | 9 +- .../webhookhandler/webhookhandler_test.go | 23 +- kind-1.27.yaml | 5 + main.go | 30 +- .../cmd/verify/wait-and-validate-metrics.go | 11 +- .../autoscale/wait-until-hpa-ready.go | 12 +- 27 files changed, 531 insertions(+), 519 deletions(-) create mode 100644 kind-1.27.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 287a438b3..a8e443e98 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,7 +22,7 @@ jobs: # should be compatible with them. kube-version: - "1.19" - - "1.26" + - "1.27" group: - e2e e2e-upgrade - e2e-autoscale diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index ae0e5a734..323671a7c 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -18,7 +18,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.26" + - "1.27" steps: diff --git a/Makefile b/Makefile index 36ffe33ec..e08da1a4c 100644 --- a/Makefile +++ b/Makefile @@ -290,8 +290,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen ENVTEST ?= $(LOCALBIN)/setup-envtest CHLOGGEN ?= $(LOCALBIN)/chloggen -KUSTOMIZE_VERSION ?= v5.0.0 -CONTROLLER_TOOLS_VERSION ?= v0.11.3 +KUSTOMIZE_VERSION ?= v5.0.3 +CONTROLLER_TOOLS_VERSION ?= v0.12.0 .PHONY: kustomize diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 89caec99f..303e33b1c 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -25,6 +25,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) const ( @@ -177,21 +178,21 @@ func (r *Instrumentation) Default() { var _ webhook.Validator = &Instrumentation{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateCreate() error { +func (r *Instrumentation) ValidateCreate() (admission.Warnings, error) { instrumentationlog.Info("validate create", "name", r.Name) - return r.validate() + return nil, r.validate() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateUpdate(old runtime.Object) error { +func (r *Instrumentation) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { instrumentationlog.Info("validate update", "name", r.Name) - return r.validate() + return nil, r.validate() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateDelete() error { +func (r *Instrumentation) ValidateDelete() (admission.Warnings, error) { instrumentationlog.Info("validate delete", "name", r.Name) - return nil + return nil, nil } func (r *Instrumentation) validate() error { diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index f390443b4..3f35d80df 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -96,12 +96,18 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { if test.err == "" { - assert.Nil(t, test.inst.ValidateCreate()) - assert.Nil(t, test.inst.ValidateUpdate(nil)) + warnings, err := test.inst.ValidateCreate() + assert.Nil(t, warnings) + assert.Nil(t, err) + warnings, err = test.inst.ValidateUpdate(nil) + assert.Nil(t, warnings) + assert.Nil(t, err) } else { - err := test.inst.ValidateCreate() + warnings, err := test.inst.ValidateCreate() + assert.Nil(t, warnings) assert.Contains(t, err.Error(), test.err) - err = test.inst.ValidateUpdate(nil) + warnings, err = test.inst.ValidateUpdate(nil) + assert.Nil(t, warnings) assert.Contains(t, err.Error(), test.err) } }) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index a9ef9c075..89e414aa3 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -25,6 +25,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" @@ -116,21 +117,21 @@ func (r *OpenTelemetryCollector) Default() { var _ webhook.Validator = &OpenTelemetryCollector{} // ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateCreate() error { +func (r *OpenTelemetryCollector) ValidateCreate() (admission.Warnings, error) { opentelemetrycollectorlog.Info("validate create", "name", r.Name) - return r.validateCRDSpec() + return nil, r.validateCRDSpec() } // ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) error { +func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { opentelemetrycollectorlog.Info("validate update", "name", r.Name) - return r.validateCRDSpec() + return nil, r.validateCRDSpec() } // ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateDelete() error { +func (r *OpenTelemetryCollector) ValidateDelete() (admission.Warnings, error) { opentelemetrycollectorlog.Info("validate delete", "name", r.Name) - return nil + return nil, nil } func (r *OpenTelemetryCollector) validateCRDSpec() error { diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index ff6d6b7ee..d58f127a2 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-05-24T11:54:55Z" + createdAt: "2023-05-31T15:42:55Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 1e83a0873..5832cee96 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.12.0 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator @@ -343,7 +343,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object version: @@ -520,7 +521,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -818,7 +820,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -992,7 +995,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -1165,7 +1169,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -1355,7 +1360,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index acbd5339b..9be7616e7 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.11.3 + controller-gen.kubebuilder.io/version: v0.12.0 creationTimestamp: null labels: app.kubernetes.io/name: opentelemetry-operator @@ -913,18 +913,18 @@ spec: must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -942,7 +942,7 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than @@ -969,18 +969,18 @@ spec: must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -998,7 +998,7 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than @@ -1367,10 +1367,10 @@ spec: description: TLS configuration. items: description: IngressTLS describes the transport layer security - associated with an Ingress. + associated with an ingress. properties: hosts: - description: Hosts are a list of hosts included in the TLS + description: hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, @@ -1380,12 +1380,13 @@ spec: type: array x-kubernetes-list-type: atomic secretName: - description: SecretName is the name of the secret used to + description: secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for - termination and value of the Host header is used for routing. + termination and value of the "Host" header is used for + routing. type: string type: object type: array @@ -1439,7 +1440,9 @@ spec: be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. type: string value: description: The header field value @@ -1534,7 +1537,9 @@ spec: be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. type: string value: description: The header field value @@ -1956,7 +1961,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object securityContext: @@ -2233,7 +2239,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceAccount: @@ -2482,7 +2489,7 @@ spec: of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined - value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: @@ -2591,7 +2598,7 @@ spec: volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. items: - description: PersistentVolumeClaimCondition contails details + description: PersistentVolumeClaimCondition contains details about state of pvc properties: lastProbeTime: @@ -3069,7 +3076,7 @@ spec: medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means - that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -3299,8 +3306,8 @@ spec: amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: - https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 89eb1e006..8698619cb 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -13,81 +13,81 @@ require ( github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.63.0 + github.com/prometheus-operator/prometheus-operator v0.64.1 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 - github.com/prometheus/client_golang v1.15.0 - github.com/prometheus/common v0.42.0 - github.com/prometheus/prometheus v1.8.2-0.20211214150951-52c693a63be1 + github.com/prometheus/client_golang v1.15.1 + github.com/prometheus/common v0.43.0 + github.com/prometheus/prometheus v0.43.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.26.3 - k8s.io/apimachinery v0.26.3 - k8s.io/client-go v0.26.3 + k8s.io/api v0.27.2 + k8s.io/apimachinery v0.27.2 + k8s.io/client-go v0.27.2 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.14.6 + sigs.k8s.io/controller-runtime v0.15.0 ) require ( - cloud.google.com/go/compute v1.13.0 // indirect - cloud.google.com/go/compute/metadata v0.2.1 // indirect + cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.28 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.5.1 // indirect + github.com/Microsoft/go-winio v0.6.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/armon/go-metrics v0.4.0 // indirect - github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/aws/aws-sdk-go v1.44.187 // indirect + github.com/armon/go-metrics v0.4.1 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/aws/aws-sdk-go v1.44.245 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.8.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect + github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.82.0 // indirect + github.com/digitalocean/godo v1.98.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v20.10.24+incompatible // indirect + github.com/docker/docker v23.0.4+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect - github.com/envoyproxy/go-control-plane v0.10.3 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.7 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/envoyproxy/go-control-plane v0.11.0 // indirect + github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.14.1 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.3 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/runtime v0.25.0 // indirect - github.com/go-openapi/spec v0.20.7 // indirect - github.com/go-openapi/strfmt v0.21.3 // indirect + github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/strfmt v0.21.7 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-openapi/validate v0.22.0 // indirect + github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.11.2 // indirect - github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect + github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/goccy/go-json v0.10.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.4.1 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -96,38 +96,40 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.7.0 // indirect - github.com/gophercloud/gophercloud v0.25.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/gophercloud/gophercloud v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.15.3 // indirect + github.com/hashicorp/consul/api v1.20.0 // indirect github.com/hashicorp/cronexpr v1.1.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v0.16.2 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c // indirect - github.com/hashicorp/serf v0.9.7 // indirect - github.com/hetznercloud/hcloud-go v1.35.2 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 // indirect + github.com/hashicorp/serf v0.10.1 // indirect + github.com/hetznercloud/hcloud-go v1.42.0 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.2 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.6 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/klauspost/cpuid/v2 v2.1.0 // indirect - github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect + github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/leodido/go-urn v1.2.1 // indirect - github.com/linode/linodego v1.8.0 // indirect + github.com/linode/linodego v1.16.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect - github.com/miekg/dns v1.1.50 // indirect + github.com/miekg/dns v1.1.53 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -138,60 +140,61 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/ovh/go-ovh v1.4.1 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.6.0 // indirect github.com/prometheus/alertmanager v0.25.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect github.com/spf13/cobra v1.6.1 // indirect - github.com/thanos-io/thanos v0.30.2 // indirect + github.com/thanos-io/thanos v0.31.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.9 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - go.mongodb.org/mongo-driver v1.11.1 // indirect + go.mongodb.org/mongo-driver v1.11.4 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.11.2 // indirect - go.opentelemetry.io/otel/trace v1.11.2 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/goleak v1.2.0 // indirect - go.uber.org/multierr v1.8.0 // indirect + go.uber.org/goleak v1.2.1 // indirect + go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect + go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect + go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/mod v0.7.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.4.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/api v0.103.0 // indirect + golang.org/x/tools v0.9.1 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 // indirect - google.golang.org/grpc v1.52.1 // indirect + google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect + google.golang.org/grpc v1.53.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.66.6 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.3 // indirect - k8s.io/component-base v0.26.3 // indirect - k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 // indirect - k8s.io/utils v0.0.0-20230202215443-34013725500c // indirect + k8s.io/apiextensions-apiserver v0.27.2 // indirect + k8s.io/component-base v0.27.2 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.38.0 - // A exclude directive is needed for k8s.io/client-go because Cortex (which // is an indirect dependency through Thanos and PrometheusOperator) has a requirement on v12.0.0. exclude k8s.io/client-go v12.0.0+incompatible diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 447381d41..78b82e786 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -13,20 +13,20 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,8 +45,8 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.21 h1:jjQnVFXPfekaqb8vIsv2G1lxshoW+oGv4MDlhRtnYZk= -github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= +github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -64,8 +64,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -79,17 +79,16 @@ github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8V github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.187 h1:D5CsRomPnlwDHJCanL2mtaLIcbhjiWxNh5j8zvaWdJA= -github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.245 h1:KtY2s4q31/kn33AdV63R5t77mdxsI7rq3YT7Mgo805M= +github.com/aws/aws-sdk-go v1.44.245/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -106,7 +105,6 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -122,13 +120,9 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc h1:PYXxkRUBGUMa5xgMVMDl62vEklZvKpVaxQeN9ie7Hfk= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= +github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -136,45 +130,44 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.82.0 h1:lqAit46H1CqJGjh7LDbsamng/UMBME5rvmfH3Vb5Yy8= -github.com/digitalocean/godo v1.82.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= +github.com/digitalocean/godo v1.98.0 h1:potyC1eD0N9n5/P4/WmJuKgg+OGYZOBWEW+/aKTX6QQ= +github.com/digitalocean/godo v1.98.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.24+incompatible h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE= -github.com/docker/docker v20.10.24+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek= +github.com/docker/docker v23.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/core v1.0.0-rc.0.0.20221201130417-ba593f67d2a4 h1:rydBwnBoywKQMjWF0z8SriYtQ+uUcaFsxuijMjJr5PI= +github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd h1:svR6KxSP1xiPw10RN4Pd7g6BAVkEcNN628PAqZH31mM= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= +github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7 h1:qcZcULcd/abmQg6dwigimCNEyi4gg31M/xaciQlDml8= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= +github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -195,16 +188,16 @@ github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBj github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= @@ -228,19 +221,20 @@ github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlP github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI= -github.com/go-openapi/spec v0.20.7/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= +github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= +github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= +github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y= -github.com/go-openapi/validate v0.22.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= +github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= +github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -248,9 +242,10 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 h1:JVrqSeQfdhYRFk24TvhTZWU0q8lfCojxZQFi3Ou7+uY= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= +github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -284,10 +279,9 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ= -github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -337,8 +331,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -355,91 +347,83 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/gophercloud/gophercloud v0.25.0 h1:C3Oae7y0fUVQGSsBrb3zliAjdX+riCSEh4lNMejFNI4= -github.com/gophercloud/gophercloud v0.25.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= +github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/gophercloud/gophercloud v1.3.0 h1:RUKyCMiZoQR3VlVR5E3K7PK1AC3/qppsWYo6dtBiqs8= +github.com/gophercloud/gophercloud v1.3.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU= -github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= -github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4= -github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= +github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= +github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= +github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c h1:lV5A4cLQr1Bh1xGSSQ2R0fDRK4GZnfXxYia4Q7aaTXc= -github.com/hashicorp/nomad/api v0.0.0-20220809212729-939d643fec2c/go.mod h1:wPbfT+Daj0i4M73rK2TGvIHo9FUWMJ/hrhn8Xb4Puvc= -github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= -github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hetznercloud/hcloud-go v1.35.2 h1:eEDtmDiI2plZ2UQmj4YpiYse5XbtpXOUBpAdIOLxzgE= -github.com/hetznercloud/hcloud-go v1.35.2/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= +github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 h1:I5xhKLePXpXgM6pZ4xZNTiurLLS3sGuZrZFFzAbM67A= +github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197/go.mod h1:2TCrNvonL09r7EiQ6M2rNt+Cmjbn1QbzchFoTWJFpj4= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= +github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hetznercloud/hcloud-go v1.42.0 h1:Es/CDOForQN3nOOP5Vxh1N/YHjpCg386iYEX5zCgi+A= +github.com/hetznercloud/hcloud-go v1.42.0/go.mod h1:YADL8AbmQYH0Eo+1lkuyoc8LutT0UeMvaKP47nNUb+Y= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.2 h1:es5R5sVmjHFrYNBbJfAeHF+16GheaJMyc63xWxIAec4= -github.com/ionos-cloud/sdk-go/v6 v6.1.2/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= +github.com/ionos-cloud/sdk-go/v6 v6.1.6 h1:0n4irdqNska+1s3YMCRhrAqKbibEgQ7SwwhAlHzYT5A= +github.com/ionos-cloud/sdk-go/v6 v6.1.6/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -468,12 +452,11 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b h1:iNjcivnc6lhbvJA3LD622NPrUponluJrBWPIwGG/3Bg= -github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -486,9 +469,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/linode/linodego v1.8.0 h1:7B2UaWu6C48tZZZrtINWRElAcwzk4TLnL9USjKf3xm0= -github.com/linode/linodego v1.8.0/go.mod h1:heqhl91D8QTPVm2k9qZHP78zzbOdTFLXE9NJc3bcc50= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= +github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -500,31 +482,31 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= -github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= +github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -532,7 +514,7 @@ github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -552,15 +534,16 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= +github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -571,7 +554,6 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -579,8 +561,8 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= -github.com/prometheus-operator/prometheus-operator v0.63.0 h1:LsOFPNzcOKirmM3xHEextfj5yaJyoWL4l42hbhvBSN8= -github.com/prometheus-operator/prometheus-operator v0.63.0/go.mod h1:vaMQs+VjHx0y1keJllae08t8cLidN4Zor8gXAGpsZjo= +github.com/prometheus-operator/prometheus-operator v0.64.1 h1:S5xTFyfcr3WhTXwVKXtY1r7C08QLBg6hHGN/ghdW3KU= +github.com/prometheus-operator/prometheus-operator v0.64.1/go.mod h1:VE2DK2v0ur3xgIbqDE6FwnqK93TvvWdcyyR/VcNPrvw= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 h1:bvntWler8vOjDJtxBwGDakGNC6srSZmgawGM9Jf7HC8= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 h1:osAjfXA8xRsHY6pp8Me9xcmoRPYT7RnJcAbUtfxVy9I= @@ -593,21 +575,21 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= -github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= +github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -617,31 +599,26 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.38.0 h1:YSiJ5gDZmXnOntPRyHn1wb/6I1Frasj9dw57XowIqeA= -github.com/prometheus/prometheus v0.38.0/go.mod h1:2zHO5FtRhM+iu995gwKIb99EXxjeZEuXpKUTIRq4YI0= +github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= +github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 h1:0roa6gXKgyta64uqh52AQG3wzZXH21unn+ltzQSXML0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= @@ -661,12 +638,13 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/thanos-io/thanos v0.30.2 h1:JcazfBlpX/i747uRxBWHJMopX0g+eSaZYGjqMeQIkPo= -github.com/thanos-io/thanos v0.30.2/go.mod h1:k23ZcbQSK0Jd/siuEti6J6/3DeezIk+YLRBcYikzXl8= +github.com/thanos-io/thanos v0.31.0 h1:jOCmaiIXwpByWXoVtHnktLm3YDB9xDQQzmZvd1XG5oY= +github.com/thanos-io/thanos v0.31.0/go.mod h1:5ux+jb2oKr59+3XsCC0mX+JuAbPGJEMijjhcmnL/PMo= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -694,8 +672,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= -go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.11.4 h1:4ayjakA013OdpGyL2K3ZqylTac/rMjrJOMZ1EHizXas= +go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -703,25 +681,29 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0= -go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI= -go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= -go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0= -go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go4.org/intern v0.0.0-20220617035311-6925f38cc365 h1:t9hFvR102YlOqU0fQn1wgwhNvSbHGBbbJxX9JKfU3l0= +go4.org/intern v0.0.0-20220617035311-6925f38cc365/go.mod h1:WXRv3p7T6gzt0CcJm43AAKdKVZmcQbwwC7EwquU5BZU= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 h1:QJ/xcIANMLApehfgPCHnfK1hZiaMmbaTVmPv7DAoTbo= +go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -729,17 +711,17 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -750,7 +732,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230206171751-46f607a40771 h1:xP7rWLUr1e1n2xkK5YB4LI0hPEy3LJC6Wk+D4pGlOJg= +golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 h1:5llv2sWeaMSnA3w2kS57ouQQ4pudlXrR0dCgw51QK9o= +golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -763,8 +746,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -774,10 +755,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -814,24 +794,22 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -845,8 +823,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -867,7 +845,6 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -899,23 +876,24 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -925,8 +903,9 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -981,17 +960,15 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1008,8 +985,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1048,11 +1025,9 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2 h1:O97sLx/Xmb/KIZHB/2/BzofxBs5QmmR0LcihPtllmbc= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1069,10 +1044,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.52.1 h1:2NpOPk5g5Xtb0qebIEs7hNIa++PdtZLo2AQUpc1YnSU= -google.golang.org/grpc v1.52.1/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1086,7 +1059,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1099,8 +1071,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= -gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1114,6 +1086,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= @@ -1124,28 +1097,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= -k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= -k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= -k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= -k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= +k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= +k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= +k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= +k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= +k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= +k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= +k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= +k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= +k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3 h1:vV3ZKAUX0nMjTflyfVea98dTfROpIxDaEsQws0FT2Ts= -k8s.io/kube-openapi v0.0.0-20230202010329-39b3636cbaa3/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0= -k8s.io/utils v0.0.0-20230202215443-34013725500c h1:YVqDar2X7YiQa/DVAXFMDIfGF8uGrHQemlrwRU5NlVI= -k8s.io/utils v0.0.0-20230202215443-34013725500c/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go index cb07ec98a..3595cb888 100644 --- a/cmd/otel-allocator/prehook/relabel.go +++ b/cmd/otel-allocator/prehook/relabel.go @@ -60,7 +60,7 @@ func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[ keepTarget := true lset := convertLabelToPromLabelSet(tItem.Labels) for _, cfg := range tf.relabelCfg[tItem.JobName] { - if newLset := relabel.Process(lset, cfg); newLset == nil { + if newLset, keep := relabel.Process(lset, cfg); !keep { keepTarget = false break // inner loop } else { diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 92855b5bd..cf6d3fe50 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -162,16 +162,22 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { OAuth2Assets: nil, SigV4Assets: nil, } - // TODO: We should make these durations configurable - prom := &monitoringv1.Prometheus{ - Spec: monitoringv1.PrometheusSpec{ - EvaluationInterval: monitoringv1.Duration("30s"), - CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ - ScrapeInterval: monitoringv1.Duration("30s"), - }, - }, - } - generatedConfig, err := w.configGenerator.Generate(prom, serviceMonitorInstances, podMonitorInstances, map[string]*monitoringv1.Probe{}, &store, nil, nil, nil, []string{}) + generatedConfig, err := w.configGenerator.GenerateServerConfiguration( + "30s", + "", + nil, + nil, + monitoringv1.TSDBSpec{}, + nil, + nil, + serviceMonitorInstances, + podMonitorInstances, + map[string]*monitoringv1.Probe{}, + &store, + nil, + nil, + nil, + []string{}) if err != nil { return nil, err } diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 14a1265d8..b84079a40 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.0 name: instrumentations.opentelemetry.io spec: group: opentelemetry.io @@ -342,7 +341,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object version: @@ -519,7 +519,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -817,7 +818,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -991,7 +993,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -1164,7 +1167,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object @@ -1354,7 +1358,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object type: object diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 5cd623002..24bac842a 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.0 name: opentelemetrycollectors.opentelemetry.io spec: group: opentelemetry.io @@ -911,18 +910,18 @@ spec: must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -940,7 +939,7 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than @@ -967,18 +966,18 @@ spec: must hold true for a specified past interval. properties: periodSeconds: - description: PeriodSeconds specifies the window + description: periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). format: int32 type: integer type: - description: Type is used to specify the scaling + description: type is used to specify the scaling policy. type: string value: - description: Value contains the amount of change + description: value contains the amount of change which is permitted by the policy. It must be greater than zero format: int32 @@ -996,7 +995,7 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'StabilizationWindowSeconds is the number + description: 'stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than @@ -1365,10 +1364,10 @@ spec: description: TLS configuration. items: description: IngressTLS describes the transport layer security - associated with an Ingress. + associated with an ingress. properties: hosts: - description: Hosts are a list of hosts included in the TLS + description: hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, @@ -1378,12 +1377,13 @@ spec: type: array x-kubernetes-list-type: atomic secretName: - description: SecretName is the name of the secret used to + description: secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for - termination and value of the Host header is used for routing. + termination and value of the "Host" header is used for + routing. type: string type: object type: array @@ -1437,7 +1437,9 @@ spec: be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. type: string value: description: The header field value @@ -1532,7 +1534,9 @@ spec: be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. type: string value: description: The header field value @@ -1954,7 +1958,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object securityContext: @@ -2231,7 +2236,8 @@ spec: description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object serviceAccount: @@ -2480,7 +2486,7 @@ spec: of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined - value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: @@ -2589,7 +2595,7 @@ spec: volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. items: - description: PersistentVolumeClaimCondition contails details + description: PersistentVolumeClaimCondition contains details about state of pvc properties: lastProbeTime: @@ -3067,7 +3073,7 @@ spec: medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means - that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -3297,8 +3303,8 @@ spec: amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: - https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 1d8a6c605..b907ad801 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: manager-role rules: - apiGroups: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 1fd17b825..d9adaf855 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: @@ -69,7 +68,6 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/docs/api.md b/docs/api.md index 7100669d8..10329196d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -756,7 +756,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -1113,7 +1113,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -1743,7 +1743,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -2100,7 +2100,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -2457,7 +2457,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -2814,7 +2814,7 @@ Resources describes the compute resource requirements. requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false @@ -4660,7 +4660,7 @@ scaleDown is scaling policy for scaling Down. If not set, the default value is t stabilizationWindowSeconds integer - StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+ stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).

Format: int32
@@ -4689,7 +4689,7 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in periodSeconds integer - PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
+ periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).

Format: int32
@@ -4698,14 +4698,14 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in type string - Type is used to specify the scaling policy.
+ type is used to specify the scaling policy.
true value integer - Value contains the amount of change which is permitted by the policy. It must be greater than zero
+ value contains the amount of change which is permitted by the policy. It must be greater than zero

Format: int32
@@ -4748,7 +4748,7 @@ scaleUp is scaling policy for scaling Up. If not set, the default value is the h stabilizationWindowSeconds integer - StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+ stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).

Format: int32
@@ -4777,7 +4777,7 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in periodSeconds integer - PeriodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
+ periodSeconds specifies the window of time for which the policy should hold true. PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).

Format: int32
@@ -4786,14 +4786,14 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in type string - Type is used to specify the scaling policy.
+ type is used to specify the scaling policy.
true value integer - Value contains the amount of change which is permitted by the policy. It must be greater than zero
+ value contains the amount of change which is permitted by the policy. It must be greater than zero

Format: int32
@@ -5482,7 +5482,7 @@ Route is an OpenShift specific section that is only considered when type "route" -IngressTLS describes the transport layer security associated with an Ingress. +IngressTLS describes the transport layer security associated with an ingress. @@ -5497,14 +5497,14 @@ IngressTLS describes the transport layer security associated with an Ingress. @@ -5688,7 +5688,7 @@ HTTPHeader describes a custom header to be used in HTTP probes @@ -5879,7 +5879,7 @@ HTTPHeader describes a custom header to be used in HTTP probes @@ -6368,7 +6368,7 @@ Resources to set on the OpenTelemetry Collector pods. @@ -6825,7 +6825,7 @@ Resources to set on the OpenTelemetryTargetAllocator containers. @@ -7227,7 +7227,7 @@ resources represents the minimum resources the volume should have. If RecoverVol @@ -7403,7 +7403,7 @@ status represents the current information/status of a persistent volume claim. R -PersistentVolumeClaimCondition contails details about state of pvc +PersistentVolumeClaimCondition contains details about state of pvc
hosts []string - Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
+ hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
false
secretName string - SecretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
+ secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the "Host" header is used for routing.
false
name string - The header field name
+ The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
true
name string - The header field name
+ The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
true
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false
@@ -8440,7 +8440,7 @@ emptyDir represents a temporary directory that shares a pod's lifetime. More inf @@ -8719,7 +8719,7 @@ resources represents the minimum resources the volume should have. If RecoverVol diff --git a/go.mod b/go.mod index 52e9e04ce..1e03d3e0f 100644 --- a/go.mod +++ b/go.mod @@ -15,13 +15,13 @@ require ( go.opentelemetry.io/collector/featuregate v0.75.0 go.opentelemetry.io/otel v1.14.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.26.3 - k8s.io/apiextensions-apiserver v0.26.3 - k8s.io/apimachinery v0.26.3 - k8s.io/client-go v0.26.3 - k8s.io/component-base v0.26.3 - k8s.io/kubectl v0.26.3 - sigs.k8s.io/controller-runtime v0.14.6 + k8s.io/api v0.27.2 + k8s.io/apiextensions-apiserver v0.27.2 + k8s.io/apimachinery v0.27.2 + k8s.io/client-go v0.27.2 + k8s.io/component-base v0.27.2 + k8s.io/kubectl v0.27.2 + sigs.k8s.io/controller-runtime v0.15.0 ) require ( @@ -57,7 +57,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect @@ -114,8 +114,8 @@ require ( github.com/ovh/go-ovh v1.3.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect @@ -129,25 +129,25 @@ require ( go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/mod v0.9.0 // indirect - golang.org/x/net v0.8.0 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.6.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.7.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.9.1 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/api v0.111.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.29.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect diff --git a/go.sum b/go.sum index e4f813195..bf8bac3d6 100644 --- a/go.sum +++ b/go.sum @@ -138,7 +138,6 @@ github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCw github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= @@ -165,11 +164,10 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= @@ -179,6 +177,7 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -251,6 +250,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -354,8 +354,8 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -393,7 +393,7 @@ github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -407,8 +407,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -433,14 +433,14 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -461,6 +461,7 @@ github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpC github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY= @@ -505,6 +506,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -523,12 +525,11 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -575,10 +576,11 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -620,8 +622,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -642,8 +644,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -700,14 +702,14 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -717,8 +719,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -741,7 +743,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -769,16 +770,17 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -869,8 +871,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -894,7 +896,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -906,29 +907,29 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= -k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= -k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= -k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.3 h1:oC0WMK/ggcbGDTkdcqefI4wIZRYdK3JySx9/HADpV0g= -k8s.io/component-base v0.26.3/go.mod h1:5kj1kZYwSC6ZstHJN7oHBqcJC6yyn41eR+Sqa/mQc8E= +k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= +k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= +k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= +k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= +k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= +k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= +k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= +k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= +k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= -k8s.io/kubectl v0.26.3 h1:bZ5SgFyeEXw6XTc1Qji0iNdtqAC76lmeIIQULg2wNXM= -k8s.io/kubectl v0.26.3/go.mod h1:02+gv7Qn4dupzN3fi/9OvqqdW+uG/4Zi56vc4Zmsp1g= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kubectl v0.27.2 h1:sSBM2j94MHBFRWfHIWtEXWCicViQzZsb177rNsKBhZg= +k8s.io/kubectl v0.27.2/go.mod h1:GCOODtxPcrjh+EC611MqREkU8RjYBh10ldQCQ6zpFKw= k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/hack/check-operator-ready.go b/hack/check-operator-ready.go index 57028f327..4bf6390cd 100644 --- a/hack/check-operator-ready.go +++ b/hack/check-operator-ready.go @@ -71,9 +71,10 @@ func main() { fmt.Println("Waiting until the OpenTelemetry Operator deployment is created") operatorDeployment := &appsv1.Deployment{} - err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { + ctx := context.Background() + err = wait.PollUntilContextTimeout(ctx, pollInterval, timeoutPoll, false, func(c context.Context) (done bool, err error) { err = clusterClient.Get( - context.Background(), + c, client.ObjectKey{ Name: "opentelemetry-operator-controller-manager", Namespace: "opentelemetry-operator-system", @@ -107,9 +108,10 @@ func main() { _ = clusterClient.Delete(context.Background(), &collectorInstance) fmt.Println("Check if the OpenTelemetry collector CR can be created.") - err = wait.Poll(pollInterval, timeoutPoll, func() (done bool, err error) { + collectorCtx := context.Background() + err = wait.PollUntilContextTimeout(collectorCtx, pollInterval, timeoutPoll, false, func(c context.Context) (done bool, err error) { err = clusterClient.Create( - context.Background(), + c, &collectorInstance, ) if err != nil { diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go index 4b2614ecc..11f166b79 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhookhandler/webhookhandler.go @@ -40,7 +40,6 @@ var _ WebhookHandler = (*podSidecarInjector)(nil) // WebhookHandler is a webhook handler that analyzes new pods and injects appropriate sidecars into it. type WebhookHandler interface { admission.Handler - admission.DecoderInjector } // the implementation. @@ -58,9 +57,10 @@ type PodMutator interface { } // NewWebhookHandler creates a new WebhookHandler. -func NewWebhookHandler(cfg config.Config, logger logr.Logger, cl client.Client, podMutators []PodMutator) WebhookHandler { +func NewWebhookHandler(cfg config.Config, logger logr.Logger, decoder *admission.Decoder, cl client.Client, podMutators []PodMutator) WebhookHandler { return &podSidecarInjector{ config: cfg, + decoder: decoder, logger: logger, client: cl, podMutators: podMutators, @@ -105,8 +105,3 @@ func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) } return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) } - -func (p *podSidecarInjector) InjectDecoder(d *admission.Decoder) error { - p.decoder = d - return nil -} diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index fab89e22c..1d7189439 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -150,12 +150,8 @@ func TestShouldInjectSidecar(t *testing.T) { // the webhook handler cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - require.NoError(t, err) - - injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - injectErr := injector.InjectDecoder(decoder) - require.NoError(t, injectErr) + decoder := admission.NewDecoder(scheme.Scheme) + injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) // test res := injector.Handle(context.Background(), req) @@ -372,11 +368,8 @@ func TestPodShouldNotBeChanged(t *testing.T) { // the webhook handler cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - require.NoError(t, err) - - injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - err = injector.InjectDecoder(decoder) + decoder := admission.NewDecoder(scheme.Scheme) + injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) require.NoError(t, err) // test @@ -433,12 +426,8 @@ func TestFailOnInvalidRequest(t *testing.T) { t.Run(tt.name, func(t *testing.T) { // prepare cfg := config.New() - decoder, err := admission.NewDecoder(scheme.Scheme) - require.NoError(t, err) - - injector := NewWebhookHandler(cfg, logger, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - err = injector.InjectDecoder(decoder) - require.NoError(t, err) + decoder := admission.NewDecoder(scheme.Scheme) + injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) // test res := injector.Handle(context.Background(), tt.req) diff --git a/kind-1.27.yaml b/kind-1.27.yaml new file mode 100644 index 000000000..f4e2e62be --- /dev/null +++ b/kind-1.27.yaml @@ -0,0 +1,5 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.27.0@sha256:c6b22e613523b1af67d4bc8a0c38a4c3ea3a2b8fbc5b367ae36345c9cb844518 diff --git a/main.go b/main.go index 4de6e3b25..9964d3d2a 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" @@ -184,24 +185,29 @@ func main() { optionsTlSOptsFuncs := []func(*tls.Config){ func(config *tls.Config) { tlsConfigSetting(config, tlsOpt) }, } + var namespaces []string + if strings.Contains(watchNamespace, ",") { + namespaces = strings.Split(watchNamespace, ",") + } else { + namespaces = []string{watchNamespace} + } mgrOptions := ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, - Port: webhookPort, - TLSOpts: optionsTlSOptsFuncs, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", - Namespace: watchNamespace, LeaseDuration: &leaseDuration, RenewDeadline: &renewDeadline, RetryPeriod: &retryPeriod, - } - - if strings.Contains(watchNamespace, ",") { - mgrOptions.Namespace = "" - mgrOptions.NewCache = cache.MultiNamespacedCacheBuilder(strings.Split(watchNamespace, ",")) + WebhookServer: webhook.NewServer(webhook.Options{ + Port: webhookPort, + TLSOpts: optionsTlSOptsFuncs, + }), + Cache: cache.Options{ + Namespaces: namespaces, + }, } mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), mgrOptions) @@ -248,9 +254,9 @@ func main() { setupLog.Error(err, "unable to create webhook", "webhook", "Instrumentation") os.Exit(1) } - + decoder := admission.NewDecoder(mgr.GetScheme()) mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{ - Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), mgr.GetClient(), + Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), decoder, mgr.GetClient(), []webhookhandler.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("opentelemetry-operator")), @@ -325,11 +331,11 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v // refer to https://pkg.go.dev/k8s.io/component-base/cli/flag func tlsConfigSetting(cfg *tls.Config, tlsOpt tlsConfig) { // TLSVersion helper function returns the TLS Version ID for the version name passed. - version, err := k8sapiflag.TLSVersion(tlsOpt.minVersion) + tlsVersion, err := k8sapiflag.TLSVersion(tlsOpt.minVersion) if err != nil { setupLog.Error(err, "TLS version invalid") } - cfg.MinVersion = version + cfg.MinVersion = tlsVersion // TLSCipherSuites helper function returns a list of cipher suite IDs from the cipher suite names passed. cipherSuiteIDs, err := k8sapiflag.TLSCipherSuites(tlsOpt.cipherSuites) diff --git a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go index 87316e8c9..65b1e7bd5 100644 --- a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go +++ b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go @@ -32,7 +32,7 @@ import ( func main() { var hpaName string - var timeout int + var timeout time.Duration var numMetrics int var kubeconfigPath string var cpuValue int @@ -42,7 +42,7 @@ func main() { defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") - pflag.IntVar(&timeout, "timeout", 600, "The timeout for the check.") + pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") pflag.StringVar(&hpaName, "hpa", "", "HPA to check") pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") pflag.IntVar(&numMetrics, "num-metrics", 1, "number of expected metrics in Spec") @@ -81,16 +81,17 @@ func main() { pollInterval := time.Second // Search in v2 and v1 for an HPA with the given name - err = wait.Poll(pollInterval, 0, func() (done bool, err error) { + ctx := context.Background() + err = wait.PollUntilContextTimeout(ctx, pollInterval, timeout, false, func(c context.Context) (done bool, err error) { hpav2, err := hpaClientV2.Get( - context.Background(), + c, hpaName, metav1.GetOptions{}, ) if err != nil { hpav1, err := hpaClientV1.Get( - context.Background(), + c, hpaName, metav1.GetOptions{}, ) diff --git a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go index 7bea80b2b..a5da97df1 100644 --- a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go +++ b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go @@ -31,12 +31,12 @@ import ( func main() { var hpaName string - var timeout int + var timeout time.Duration var kubeconfigPath string defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") - pflag.IntVar(&timeout, "timeout", 600, "The timeout for the check.") + pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") pflag.StringVar(&hpaName, "hpa", "", "HPA to check") pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") pflag.Parse() @@ -70,15 +70,17 @@ func main() { pollInterval := time.Second // Search in v2 and v1 for an HPA with the given name - err = wait.Poll(pollInterval, 0, func() (done bool, err error) { + + ctx := context.Background() + err = wait.PollUntilContextTimeout(ctx, pollInterval, timeout, false, func(c context.Context) (done bool, err error) { hpav2, err := hpaClientV2.Get( - context.Background(), + c, hpaName, metav1.GetOptions{}, ) if err != nil { hpav1, err := hpaClientV1.Get( - context.Background(), + c, hpaName, metav1.GetOptions{}, ) From b471aba8f7ea1542f2fccb8412fb9cf99922fb31 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 31 May 2023 20:40:18 -0400 Subject: [PATCH 0873/1234] Override the app label name (#1778) * Allow the overriding of the app name label, consolidate too * chloggen * override TA too * Comment to force build --- .chloggen/1777-override-label.yaml | 16 ++++++++++++ pkg/collector/daemonset.go | 4 +-- pkg/collector/deployment.go | 6 ++--- pkg/collector/horizontalpodautoscaler.go | 4 +-- pkg/collector/labels.go | 7 +++++- pkg/collector/labels_test.go | 31 +++++++++++++++--------- pkg/collector/reconcile/configmap.go | 13 +++------- pkg/collector/reconcile/opentelemetry.go | 3 +-- pkg/collector/reconcile/service.go | 17 ++++++------- pkg/collector/reconcile/service_test.go | 3 +-- pkg/collector/serviceaccount.go | 6 ++--- pkg/collector/statefulset.go | 6 ++--- pkg/targetallocator/deployment.go | 6 ++--- pkg/targetallocator/labels.go | 6 ++++- pkg/targetallocator/labels_test.go | 22 ++++++++++++----- pkg/targetallocator/serviceaccount.go | 6 ++--- 16 files changed, 95 insertions(+), 61 deletions(-) create mode 100755 .chloggen/1777-override-label.yaml diff --git a/.chloggen/1777-override-label.yaml b/.chloggen/1777-override-label.yaml new file mode 100755 index 000000000..fa61b82c7 --- /dev/null +++ b/.chloggen/1777-override-label.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fixes a previously undocumented behavior that a collector could not override the collector's app name + +# One or more tracking issues related to the change +issues: [1777] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index 591a020ce..f2e8a6731 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -27,8 +27,8 @@ import ( // DaemonSet builds the deployment for the given instance. func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { - labels := Labels(otelcol, cfg.LabelsFilter()) - labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + name := naming.Collector(otelcol) + labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 4f3ed4fae..658bc29fb 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -27,15 +27,15 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { - labels := Labels(otelcol, cfg.LabelsFilter()) - labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + name := naming.Collector(otelcol) + labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Collector(otelcol), + Name: name, Namespace: otelcol.Namespace, Labels: labels, Annotations: annotations, diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index bc89192b0..fa62ad8ef 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -31,8 +31,8 @@ import ( func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { autoscalingVersion := cfg.AutoscalingVersion() - labels := Labels(otelcol, cfg.LabelsFilter()) - labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + name := naming.Collector(otelcol) + labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) var result client.Object diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go index 311ba6f7e..56baeed14 100644 --- a/pkg/collector/labels.go +++ b/pkg/collector/labels.go @@ -32,7 +32,7 @@ func isFilteredLabel(label string, filterLabels []string) bool { } // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. -func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map[string]string { +func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels []string) map[string]string { // new map every time, so that we don't touch the instance's label base := map[string]string{} if nil != instance.Labels { @@ -54,6 +54,11 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, filterLabels []string) map base["app.kubernetes.io/version"] = "latest" } + // Don't override the app name if it already exists + if _, ok := base["app.kubernetes.io/name"]; !ok { + base["app.kubernetes.io/name"] = name + } + return base } diff --git a/pkg/collector/labels_test.go b/pkg/collector/labels_test.go index 2116b9f19..35ececf88 100644 --- a/pkg/collector/labels_test.go +++ b/pkg/collector/labels_test.go @@ -24,12 +24,17 @@ import ( . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) +const ( + collectorName = "my-instance" + collectorNamespace = "my-ns" +) + func TestLabelsCommonSet(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-ns", + Name: collectorName, + Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", @@ -37,7 +42,7 @@ func TestLabelsCommonSet(t *testing.T) { } // test - labels := Labels(otelcol, []string{}) + labels := Labels(otelcol, collectorName, []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "0.47.0", labels["app.kubernetes.io/version"]) @@ -49,8 +54,8 @@ func TestLabelsTagUnset(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-ns", + Name: collectorName, + Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", @@ -58,7 +63,7 @@ func TestLabelsTagUnset(t *testing.T) { } // test - labels := Labels(otelcol, []string{}) + labels := Labels(otelcol, collectorName, []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) @@ -70,16 +75,20 @@ func TestLabelsPropagateDown(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"myapp": "mycomponent"}, + Labels: map[string]string{ + "myapp": "mycomponent", + "app.kubernetes.io/name": "test", + }, }, } // test - labels := Labels(otelcol, []string{}) + labels := Labels(otelcol, collectorName, []string{}) // verify - assert.Len(t, labels, 6) + assert.Len(t, labels, 7) assert.Equal(t, "mycomponent", labels["myapp"]) + assert.Equal(t, "test", labels["app.kubernetes.io/name"]) } func TestLabelsFilter(t *testing.T) { @@ -90,10 +99,10 @@ func TestLabelsFilter(t *testing.T) { } // This requires the filter to be in regex match form and not the other simpler wildcard one. - labels := Labels(otelcol, []string{".*.bar.io"}) + labels := Labels(otelcol, collectorName, []string{".*.bar.io"}) // verify - assert.Len(t, labels, 6) + assert.Len(t, labels, 7) assert.NotContains(t, labels, "test.bar.io") assert.Equal(t, "bar", labels["test.foo.io"]) } diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index deb5142b1..602b61540 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -66,14 +66,8 @@ func ConfigMaps(ctx context.Context, params Params) error { func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { name := naming.ConfigMap(params.Instance) - version := strings.Split(params.Instance.Spec.Image, ":") - labels := collector.Labels(params.Instance, []string{}) - labels["app.kubernetes.io/name"] = name - if len(version) > 1 { - labels["app.kubernetes.io/version"] = version[len(version)-1] - } else { - labels["app.kubernetes.io/version"] = "latest" - } + labels := collector.Labels(params.Instance, name, []string{}) + config, err := ReplaceConfig(params.Instance) if err != nil { params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) @@ -95,8 +89,7 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { name := naming.TAConfigMap(params.Instance) version := strings.Split(params.Instance.Spec.Image, ":") - labels := targetallocator.Labels(params.Instance) - labels["app.kubernetes.io/name"] = name + labels := targetallocator.Labels(params.Instance, name) if len(version) > 1 { labels["app.kubernetes.io/version"] = version[len(version)-1] } else { diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index daaef753c..ff71d767b 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -67,8 +67,7 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change name := naming.Collector(*changed) // Set the scale selector - labels := collector.Labels(*changed, []string{}) - labels["app.kubernetes.io/name"] = name + labels := collector.Labels(*changed, name, []string{}) selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) if err != nil { return fmt.Errorf("failed to get selector for labelSelector: %w", err) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 8272318dc..ac471993e 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -74,8 +74,8 @@ func Services(ctx context.Context, params Params) error { } func desiredService(ctx context.Context, params Params) *corev1.Service { - labels := collector.Labels(params.Instance, []string{}) - labels["app.kubernetes.io/name"] = naming.Service(params.Instance) + name := naming.Service(params.Instance) + labels := collector.Labels(params.Instance, name, []string{}) config, err := adapters.ConfigFromString(params.Instance.Spec.Config) if err != nil { @@ -136,11 +136,10 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { } func desiredTAService(params Params) corev1.Service { - labels := targetallocator.Labels(params.Instance) - labels["app.kubernetes.io/name"] = naming.TAService(params.Instance) + name := naming.TAService(params.Instance) + labels := targetallocator.Labels(params.Instance, name) - selector := targetallocator.Labels(params.Instance) - selector["app.kubernetes.io/name"] = naming.TargetAllocator(params.Instance) + selector := targetallocator.Labels(params.Instance, name) return corev1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -182,12 +181,12 @@ func headless(ctx context.Context, params Params) *corev1.Service { } func monitoringService(ctx context.Context, params Params) *corev1.Service { - labels := collector.Labels(params.Instance, []string{}) - labels["app.kubernetes.io/name"] = naming.MonitoringService(params.Instance) + name := naming.MonitoringService(params.Instance) + labels := collector.Labels(params.Instance, name, []string{}) return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.MonitoringService(params.Instance), + Name: name, Namespace: params.Instance.Namespace, Labels: labels, Annotations: params.Instance.Annotations, diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index a533fb5bd..17cac5415 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -251,8 +251,7 @@ func service(name string, ports []v1.ServicePort) v1.Service { } func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { - labels := collector.Labels(params().Instance, []string{}) - labels["app.kubernetes.io/name"] = name + labels := collector.Labels(params().Instance, name, []string{}) return v1.Service{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index 4804b83b3..ef3815f3b 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -33,12 +33,12 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { - labels := Labels(otelcol, []string{}) - labels["app.kubernetes.io/name"] = naming.ServiceAccount(otelcol) + name := naming.ServiceAccount(otelcol) + labels := Labels(otelcol, name, []string{}) return corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.ServiceAccount(otelcol), + Name: name, Namespace: otelcol.Namespace, Labels: labels, Annotations: otelcol.Annotations, diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index b09462288..307c82d5c 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -27,15 +27,15 @@ import ( // StatefulSet builds the statefulset for the given instance. func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.StatefulSet { - labels := Labels(otelcol, cfg.LabelsFilter()) - labels["app.kubernetes.io/name"] = naming.Collector(otelcol) + name := naming.Collector(otelcol) + labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) return appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Collector(otelcol), + Name: name, Namespace: otelcol.Namespace, Labels: labels, Annotations: annotations, diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index 0eb919853..e4facab49 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -27,12 +27,12 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { - labels := Labels(otelcol) - labels["app.kubernetes.io/name"] = naming.TargetAllocator(otelcol) + name := naming.TargetAllocator(otelcol) + labels := Labels(otelcol, name) return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.TargetAllocator(otelcol), + Name: name, Namespace: otelcol.Namespace, Labels: labels, }, diff --git a/pkg/targetallocator/labels.go b/pkg/targetallocator/labels.go index 5cd4f5373..22bc7d4de 100644 --- a/pkg/targetallocator/labels.go +++ b/pkg/targetallocator/labels.go @@ -20,7 +20,7 @@ import ( ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. -func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { +func Labels(instance v1alpha1.OpenTelemetryCollector, name string) map[string]string { // new map every time, so that we don't touch the instance's label base := map[string]string{} if nil != instance.Labels { @@ -34,5 +34,9 @@ func Labels(instance v1alpha1.OpenTelemetryCollector) map[string]string { base["app.kubernetes.io/part-of"] = "opentelemetry" base["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + if _, ok := base["app.kubernetes.io/name"]; !ok { + base["app.kubernetes.io/name"] = name + } + return base } diff --git a/pkg/targetallocator/labels_test.go b/pkg/targetallocator/labels_test.go index abb56d35c..996128bea 100644 --- a/pkg/targetallocator/labels_test.go +++ b/pkg/targetallocator/labels_test.go @@ -23,35 +23,45 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) +const ( + name = "my-instance" + namespace = "my-ns" +) + func TestLabelsCommonSet(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-ns", + Name: name, + Namespace: namespace, }, } // test - labels := Labels(otelcol) + labels := Labels(otelcol, name) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) + assert.Equal(t, name, labels["app.kubernetes.io/name"]) } func TestLabelsPropagateDown(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{"myapp": "mycomponent"}, + Labels: map[string]string{ + "myapp": "mycomponent", + "app.kubernetes.io/name": "test", + }, }, } // test - labels := Labels(otelcol) + labels := Labels(otelcol, name) // verify - assert.Len(t, labels, 5) + assert.Len(t, labels, 6) assert.Equal(t, "mycomponent", labels["myapp"]) + assert.Equal(t, "test", labels["app.kubernetes.io/name"]) } diff --git a/pkg/targetallocator/serviceaccount.go b/pkg/targetallocator/serviceaccount.go index 78627f3bf..af904863b 100644 --- a/pkg/targetallocator/serviceaccount.go +++ b/pkg/targetallocator/serviceaccount.go @@ -33,12 +33,12 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { - labels := Labels(otelcol) - labels["app.kubernetes.io/name"] = naming.TargetAllocatorServiceAccount(otelcol) + name := naming.TargetAllocatorServiceAccount(otelcol) + labels := Labels(otelcol, name) return corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.TargetAllocatorServiceAccount(otelcol), + Name: name, Namespace: otelcol.Namespace, Labels: labels, Annotations: otelcol.Annotations, From ea980f8061f53e868b59da634590b13e25d36234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 1 Jun 2023 16:25:10 +0200 Subject: [PATCH 0874/1234] Fix .NET auto-instrumentation versions in Changelog (#1788) --- CHANGELOG.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf09f0829..a3167e1c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ Changes by Version * [OpenTelemetry Collector - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.77.0) * [OpenTelemetry Contrib - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.77.0) * [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) * [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) * [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) * [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) @@ -53,7 +53,7 @@ Changes by Version * [OpenTelemetry Collector - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.76.1) * [OpenTelemetry Contrib - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.76.1) * [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) * [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) * [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) @@ -71,7 +71,7 @@ Changes by Version * [OpenTelemetry Collector - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.75.0) * [OpenTelemetry Contrib - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.75.0) * [Java auto-instrumentation - 1.24.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.24.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) * [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.37.0) * [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) @@ -82,7 +82,7 @@ Changes by Version * [OpenTelemetry Collector - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.74.0) * [OpenTelemetry Contrib - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.74.0) * [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) * [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) * [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) @@ -97,7 +97,7 @@ Changes by Version * [OpenTelemetry Collector - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.73.0) * [OpenTelemetry Contrib - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.73.0) * [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) * [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) * [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) @@ -126,7 +126,7 @@ Changes by Version * [OpenTelemetry Collector - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.72.0) * [OpenTelemetry Contrib - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.72.0) * [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [Dotnet auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) +* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) * [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) * [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) @@ -159,7 +159,7 @@ Changes by Version * [OpenTelemetry Collector - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.70.0) * [OpenTelemetry Contrib - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.70.0) * [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [Dotnet auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) +* [.NET auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) * [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) * [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) @@ -184,7 +184,7 @@ Changes by Version * [OpenTelemetry Collector - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.69.0) * [OpenTelemetry Contrib - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.69.0) * [Java auto-instrumentation - 1.22.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.22.1) -* [Dotnet auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) +* [.NET auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) * [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) * [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) @@ -384,7 +384,7 @@ Changes by Version 0.57.2 ------------------- ### 🚀 New components 🚀 -* Support DotNet auto-instrumentation ([#976](https://github.com/open-telemetry/opentelemetry-operator/pull/976), [@avadhut123pisal](https://github.com/avadhut123pisal)) +* Support .NET auto-instrumentation ([#976](https://github.com/open-telemetry/opentelemetry-operator/pull/976), [@avadhut123pisal](https://github.com/avadhut123pisal)) * Enable instrumentation injecting only core SDK config ([#1000](https://github.com/open-telemetry/opentelemetry-operator/pull/1000), [@bilbof](https://github.com/bilbof)) * Instrument TA with prometheus ([#1030](https://github.com/open-telemetry/opentelemetry-operator/pull/1030), [@jaronoff97](https://github.com/jaronoff97)) ### 💡 Enhancements 💡 From e60c0875bfd33b0040bc6f8af24f1880b3fccac1 Mon Sep 17 00:00:00 2001 From: Anusha Reddy Narapureddy Date: Thu, 1 Jun 2023 09:06:31 -0700 Subject: [PATCH 0875/1234] fix issues related to prometheus relabel configs when target allocator is enabled (#1712) * Code fix for issues #1623, #1622, #958 * updated the PR with an alternative logic to fi the relabel config issue * fixed codelint issues * reverted the logic to update scrape_configs * fixed unit test case failures * fixed code lint issues * changes to replace_config to handle unamrshalling issue when tarallocatorewrite flag is enabled * fixed unit test case failure * updated e2e test to cover labelkeep usecase * updated unit test to escape $ signs * updated unit test to cover missing and invalig configs * resolved merge conflicts * updated tests, refactored logic based on the new commits * uncommented labeldrop e2e test * added back target allocator attribute * comment for unescaping TA config * updated the README document to reflect the traslations * updated the README document to reflect the traslations * updated the TA config section in the README document * addressed the review comment on README doc --------- Co-authored-by: Jacob Aronoff --- .chloggen/fix_prometheus_relabel-configs.yaml | 16 ++ README.md | 49 +++- pkg/collector/reconcile/config_replace.go | 57 +++-- .../reconcile/config_replace_test.go | 58 +++-- pkg/collector/reconcile/configmap.go | 4 +- pkg/collector/reconcile/configmap_test.go | 49 +--- ...elabel_config_expected_with_sd_config.yaml | 57 +++++ .../testdata/relabel_config_original.yaml | 51 +++++ .../adapters/config_to_prom_config.go | 214 ++++++++++++++++++ .../adapters/config_to_prom_config_test.go | 184 +++++++++++++++ .../01-promreceiver-labeldrop.yaml | 86 +++---- .../targetallocator-features/00-install.yaml | 17 +- 12 files changed, 698 insertions(+), 144 deletions(-) create mode 100755 .chloggen/fix_prometheus_relabel-configs.yaml create mode 100644 pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml create mode 100644 pkg/collector/testdata/relabel_config_original.yaml diff --git a/.chloggen/fix_prometheus_relabel-configs.yaml b/.chloggen/fix_prometheus_relabel-configs.yaml new file mode 100755 index 000000000..f0d77bb5f --- /dev/null +++ b/.chloggen/fix_prometheus_relabel-configs.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: pkg/collector, pkg/targetallocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fix issues related to prometheus relabel configs when target allocator is enabled + +# One or more tracking issues related to the change +issues: [958, 1622, 1623] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index c64b72289..df47b8fb9 100644 --- a/README.md +++ b/README.md @@ -418,6 +418,13 @@ spec: scrape_interval: 10s static_configs: - targets: [ '0.0.0.0:8888' ] + metric_relabel_configs: + - action: labeldrop + regex: (id|name) + replacement: $$1 + - action: labelmap + regex: label_(.+) + replacement: $$1 exporters: logging: @@ -429,6 +436,8 @@ spec: processors: [] exporters: [logging] ``` +The usage of `$$` in the replacement keys in the example above is based on the information provided in the Prometheus receiver [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) documentation, which states: +`Note: Since the collector configuration supports env variable substitution $ characters in your prometheus configuration are interpreted as environment variables. If you want to use $ characters in your prometheus configuration, you must escape them using $$.` Behind the scenes, the OpenTelemetry Operator will convert the Collector’s configuration after the reconciliation into the following: @@ -436,21 +445,18 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con receivers: prometheus: config: - global: - scrape_interval: 1m - scrape_timeout: 10s - evaluation_interval: 1m scrape_configs: - job_name: otel-collector - honor_timestamps: true scrape_interval: 10s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true http_sd_configs: - - follow_redirects: false - url: http://collector-with-ta-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME + - url: http://collector-with-ta-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME + metric_relabel_configs: + - action: labeldrop + regex: (id|name) + replacement: $$1 + - action: labelmap + regex: label_(.+) + replacement: $$1 exporters: logging: @@ -463,7 +469,26 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con exporters: [logging] ``` -Note how the Operator added a `global` section and a new `http_sd_configs` to the `otel-collector` scrape config, pointing to a Target Allocator instance it provisioned. +Note how the Operator removes any existing service discovery configurations (e.g., `static_configs`, `file_sd_configs`, etc.) from the `scrape_configs` section and adds an `http_sd_configs` configuration pointing to a Target Allocator instance it provisioned. + +The OpenTelemetry Operator will also convert the Target Allocator's promethueus configuration after the reconciliation into the following: + +```yaml + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + metric_relabel_configs: + - action: labeldrop + regex: (id|name) + replacement: $1 + - action: labelmap + regex: label_(.+) + replacement: $1 +``` +Note that in this case, the Operator replaces "$$" with a single "$" in the replacement keys. This is because the collector supports environment variable substitution, whereas the TA (Target Allocator) does not. Therefore, to ensure compatibility, the TA configuration should only contain a single "$" symbol. More info on the TargetAllocator can be found [here](cmd/otel-allocator/README.md). diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 8eca3842a..37ab3d813 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -15,13 +15,9 @@ package reconcile import ( - "fmt" - "net/url" "time" promconfig "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/discovery/http" _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. "gopkg.in/yaml.v2" @@ -47,12 +43,14 @@ type Config struct { } func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { + // Check if TargetAllocator is enabled, if not, return the original config if !instance.Spec.TargetAllocator.Enabled { return instance.Spec.Config, nil } - config, getStringErr := adapters.ConfigFromString(instance.Spec.Config) - if getStringErr != nil { - return "", getStringErr + + config, err := adapters.ConfigFromString(instance.Spec.Config) + if err != nil { + return "", err } promCfgMap, getCfgPromErr := ta.ConfigToPromConfig(instance.Spec.Config) @@ -65,42 +63,39 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { return "", validateCfgPromErr } - // yaml marshaling/unsmarshaling is preferred because of the problems associated with the conversion of map to a struct using mapstructure - promCfg, marshalErr := yaml.Marshal(promCfgMap) - if marshalErr != nil { - return "", marshalErr - } + if featuregate.EnableTargetAllocatorRewrite.IsEnabled() { + // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters + // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. + updPromCfgMap, getCfgPromErr := ta.AddTAConfigToPromConfig(promCfgMap, naming.TAService(instance)) + if getCfgPromErr != nil { + return "", getCfgPromErr + } - var cfg Config - if marshalErr = yaml.UnmarshalStrict(promCfg, &cfg); marshalErr != nil { - return "", fmt.Errorf("error unmarshaling YAML: %w", marshalErr) - } + // type coercion checks are handled in the AddTAConfigToPromConfig method above + config["receivers"].(map[interface{}]interface{})["prometheus"] = updPromCfgMap - for i := range cfg.PromConfig.ScrapeConfigs { - escapedJob := url.QueryEscape(cfg.PromConfig.ScrapeConfigs[i].JobName) - cfg.PromConfig.ScrapeConfigs[i].ServiceDiscoveryConfigs = discovery.Configs{ - &http.SDConfig{ - URL: fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", naming.TAService(instance), escapedJob), - }, + out, updCfgMarshalErr := yaml.Marshal(config) + if updCfgMarshalErr != nil { + return "", updCfgMarshalErr } + + return string(out), nil } - if featuregate.EnableTargetAllocatorRewrite.IsEnabled() { - cfg.TargetAllocConfig = &targetAllocator{ - Endpoint: fmt.Sprintf("http://%s:80", naming.TAService(instance)), - Interval: 30 * time.Second, - CollectorID: "${POD_NAME}", - } - // we don't need the scrape configs here anymore with target allocator enabled - cfg.PromConfig.ScrapeConfigs = []*promconfig.ScrapeConfig{} + // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters + // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. + updPromCfgMap, err := ta.AddHTTPSDConfigToPromConfig(promCfgMap, naming.TAService(instance)) + if err != nil { + return "", err } // type coercion checks are handled in the ConfigToPromConfig method above - config["receivers"].(map[interface{}]interface{})["prometheus"] = cfg + config["receivers"].(map[interface{}]interface{})["prometheus"] = updPromCfgMap out, err := yaml.Marshal(config) if err != nil { return "", err } + return string(out), nil } diff --git a/pkg/collector/reconcile/config_replace_test.go b/pkg/collector/reconcile/config_replace_test.go index 2f8a3770d..2b6f36364 100644 --- a/pkg/collector/reconcile/config_replace_test.go +++ b/pkg/collector/reconcile/config_replace_test.go @@ -15,8 +15,8 @@ package reconcile import ( + "os" "testing" - "time" colfeaturegate "go.opentelemetry.io/collector/featuregate" @@ -68,28 +68,28 @@ func TestPrometheusParser(t *testing.T) { err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) param.Instance.Spec.TargetAllocator.Enabled = true assert.NoError(t, err) + + // Set up the test scenario + param.Instance.Spec.TargetAllocator.Enabled = true actualConfig, err := ReplaceConfig(param.Instance) assert.NoError(t, err) - // prepare - var cfg Config + // Verify the expected changes in the config promCfgMap, err := ta.ConfigToPromConfig(actualConfig) assert.NoError(t, err) - promCfg, err := yaml.Marshal(promCfgMap) - assert.NoError(t, err) + prometheusConfig := promCfgMap["config"].(map[interface{}]interface{}) - err = yaml.UnmarshalStrict(promCfg, &cfg) - assert.NoError(t, err) + assert.NotContains(t, prometheusConfig, "scrape_configs") - // test - assert.Len(t, cfg.PromConfig.ScrapeConfigs, 0) - expectedTAConfig := &targetAllocator{ - Endpoint: "http://test-targetallocator:80", - Interval: 30 * time.Second, - CollectorID: "${POD_NAME}", + expectedTAConfig := map[interface{}]interface{}{ + "endpoint": "http://test-targetallocator:80", + "interval": "30s", + "collector_id": "${POD_NAME}", } - assert.Equal(t, expectedTAConfig, cfg.TargetAllocConfig) + assert.Equal(t, expectedTAConfig, promCfgMap["target_allocator"]) + + // Disable the feature flag err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) assert.NoError(t, err) }) @@ -128,3 +128,33 @@ func TestPrometheusParser(t *testing.T) { }) } + +func TestReplaceConfig(t *testing.T) { + param, err := newParams("test/test-img", "../testdata/relabel_config_original.yaml") + assert.NoError(t, err) + + t.Run("should not modify config when TargetAllocator is disabled", func(t *testing.T) { + param.Instance.Spec.TargetAllocator.Enabled = false + expectedConfigBytes, err := os.ReadFile("../testdata/relabel_config_original.yaml") + assert.NoError(t, err) + expectedConfig := string(expectedConfigBytes) + + actualConfig, err := ReplaceConfig(param.Instance) + assert.NoError(t, err) + + assert.Equal(t, expectedConfig, actualConfig) + }) + + t.Run("should rewrite scrape configs with SD config when TargetAllocator is enabled and feature flag is not set", func(t *testing.T) { + param.Instance.Spec.TargetAllocator.Enabled = true + + expectedConfigBytes, err := os.ReadFile("../testdata/relabel_config_expected_with_sd_config.yaml") + assert.NoError(t, err) + expectedConfig := string(expectedConfigBytes) + + actualConfig, err := ReplaceConfig(param.Instance) + assert.NoError(t, err) + + assert.Equal(t, expectedConfig, actualConfig) + }) +} diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 602b61540..2579eb549 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -96,7 +96,9 @@ func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { labels["app.kubernetes.io/version"] = "latest" } - prometheusReceiverConfig, err := ta.ConfigToPromConfig(params.Instance.Spec.Config) + // Collector supports environment variable substitution, but the TA does not. + // TA ConfigMap should have a single "$", as it does not support env var substitution + prometheusReceiverConfig, err := ta.UnescapeDollarSignsInPromConfig(params.Instance.Spec.Config) if err != nil { return corev1.ConfigMap{}, err } diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 1c2ff79c1..cd9d1a15e 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -94,23 +94,11 @@ receivers: grpc: null prometheus: config: - global: - scrape_interval: 1m - scrape_timeout: 10s - evaluation_interval: 1m scrape_configs: - - job_name: otel-collector - honor_timestamps: true + - http_sd_configs: + - url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME + job_name: otel-collector scrape_interval: 10s - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - http_sd_configs: - - follow_redirects: false - enable_http2: false - url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME service: pipelines: metrics: @@ -145,29 +133,16 @@ processors: null receivers: prometheus: config: - global: - scrape_interval: 1m - scrape_timeout: 10s - evaluation_interval: 1m scrape_configs: - - job_name: serviceMonitor/test/test/0 - honor_timestamps: true - scrape_interval: 1m - scrape_timeout: 10s - metrics_path: /metrics - scheme: http - follow_redirects: true - enable_http2: true - http_sd_configs: - - follow_redirects: false - enable_http2: false - url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME + - http_sd_configs: + - url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME + job_name: serviceMonitor/test/test/0 target_allocator: - endpoint: http://test-targetallocator:80 - interval: 30s collector_id: ${POD_NAME} + endpoint: http://test-targetallocator:80 http_sd_config: refresh_interval: 60s + interval: 30s service: pipelines: metrics: @@ -206,15 +181,11 @@ service: processors: null receivers: prometheus: - config: - global: - scrape_interval: 1m - scrape_timeout: 10s - evaluation_interval: 1m + config: {} target_allocator: + collector_id: ${POD_NAME} endpoint: http://test-targetallocator:80 interval: 30s - collector_id: ${POD_NAME} service: pipelines: metrics: diff --git a/pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml b/pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml new file mode 100644 index 000000000..542efcc63 --- /dev/null +++ b/pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml @@ -0,0 +1,57 @@ +exporters: null +logging: null +processors: null +receivers: + prometheus: + config: + global: + evaluation_interval: 1m + scrape_interval: 1m + scrape_timeout: 10s + scrape_configs: + - honor_labels: true + http_sd_configs: + - url: http://test-targetallocator:80/jobs/service-x/targets?collector_id=$POD_NAME + job_name: service-x + metric_relabel_configs: + - action: keep + regex: (.*) + separator: ; + source_labels: + - label1 + - action: labelmap + regex: (.*) + separator: ; + source_labels: + - label4 + metrics_path: /metrics + relabel_configs: + - action: keep + regex: (.*) + source_labels: + - label1 + - action: replace + regex: (.*) + replacement: $$1_$$2 + separator: ; + source_labels: + - label2 + target_label: label3 + - action: labelmap + regex: (.*) + separator: ; + source_labels: + - label4 + - action: labeldrop + regex: foo_.* + scheme: http + scrape_interval: 1m + scrape_timeout: 10s +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus diff --git a/pkg/collector/testdata/relabel_config_original.yaml b/pkg/collector/testdata/relabel_config_original.yaml new file mode 100644 index 000000000..78a844a4b --- /dev/null +++ b/pkg/collector/testdata/relabel_config_original.yaml @@ -0,0 +1,51 @@ +exporters: +logging: +processors: +receivers: + prometheus: + config: + global: + evaluation_interval: 1m + scrape_interval: 1m + scrape_timeout: 10s + scrape_configs: + - job_name: service-x + metrics_path: /metrics + scheme: http + scrape_interval: 1m + scrape_timeout: 10s + honor_labels: true + relabel_configs: + - source_labels: [label1] + action: keep + regex: (.*) + - target_label: label3 + source_labels: [label2] + action: replace + regex: (.*) + replacement: "$$1_$$2" + separator: ";" + - source_labels: [label4] + action: labelmap + regex: (.*) + separator: ";" + - regex: foo_.* + action: labeldrop + metric_relabel_configs: + - source_labels: [label1] + action: keep + regex: (.*) + separator: ";" + - regex: (.*) + action: labelmap + separator: ";" + source_labels: [label4] + +service: + pipelines: + metrics: + exporters: + - logging + receivers: + - prometheus + processors: [] diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/pkg/targetallocator/adapters/config_to_prom_config.go index 1d0f86448..aecf58547 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config.go +++ b/pkg/targetallocator/adapters/config_to_prom_config.go @@ -17,6 +17,9 @@ package adapters import ( "errors" "fmt" + "net/url" + "regexp" + "strings" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" ) @@ -25,10 +28,26 @@ func errorNoComponent(component string) error { return fmt.Errorf("no %s available as part of the configuration", component) } +func errorNotAMapAtIndex(component string, index int) error { + return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid map: %s", index, component, component) +} + func errorNotAMap(component string) error { return fmt.Errorf("%s property in the configuration doesn't contain valid %s", component, component) } +func errorNotAList(component string) error { + return fmt.Errorf("%s must be a list in the config", component) +} + +func errorNotAListAtIndex(component string, index int) error { + return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid index: %s", index, component, component) +} + +func errorNotAStringAtIndex(component string, index int) error { + return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid string: %s", index, component, component) +} + // ConfigToPromConfig converts the incoming configuration object into the Prometheus receiver config. func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { config, err := adapters.ConfigFromString(cfg) @@ -59,6 +78,201 @@ func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { return prometheus, nil } +// UnescapeDollarSignsInPromConfig replaces "$$" with "$" in the "replacement" fields of +// both "relabel_configs" and "metric_relabel_configs" in a Prometheus configuration file. +func UnescapeDollarSignsInPromConfig(cfg string) (map[interface{}]interface{}, error) { + prometheus, err := ConfigToPromConfig(cfg) + if err != nil { + return nil, err + } + + prometheusConfigProperty, ok := prometheus["config"] + if !ok { + return nil, errorNoComponent("prometheusConfig") + } + + prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheusConfig") + } + + scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] + if !ok { + return nil, errorNoComponent("scrape_configs") + } + + scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) + if !ok { + return nil, errorNotAList("scrape_configs") + } + + for i, config := range scrapeConfigs { + scrapeConfig, ok := config.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMapAtIndex("scrape_config", i) + } + + relabelConfigsProperty, ok := scrapeConfig["relabel_configs"] + if !ok { + continue + } + + relabelConfigs, ok := relabelConfigsProperty.([]interface{}) + if !ok { + return nil, errorNotAListAtIndex("relabel_configs", i) + } + + for i, rc := range relabelConfigs { + relabelConfig, rcErr := rc.(map[interface{}]interface{}) + if !rcErr { + return nil, errorNotAMapAtIndex("relabel_config", i) + } + + replacementProperty, rcErr := relabelConfig["replacement"] + if !rcErr { + continue + } + + replacement, rcErr := replacementProperty.(string) + if !rcErr { + return nil, errorNotAStringAtIndex("replacement", i) + } + + relabelConfig["replacement"] = strings.ReplaceAll(replacement, "$$", "$") + } + + metricRelabelConfigsProperty, ok := scrapeConfig["metric_relabel_configs"] + if !ok { + continue + } + + metricRelabelConfigs, ok := metricRelabelConfigsProperty.([]interface{}) + if !ok { + return nil, errorNotAListAtIndex("metric_relabel_configs", i) + } + + for i, rc := range metricRelabelConfigs { + relabelConfig, ok := rc.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMapAtIndex("metric_relabel_config", i) + } + + replacementProperty, ok := relabelConfig["replacement"] + if !ok { + continue + } + + replacement, ok := replacementProperty.(string) + if !ok { + return nil, errorNotAStringAtIndex("replacement", i) + } + + relabelConfig["replacement"] = strings.ReplaceAll(replacement, "$$", "$") + } + } + + return prometheus, nil +} + +// AddHTTPSDConfigToPromConfig adds HTTP SD (Service Discovery) configuration to the Prometheus configuration. +// This function removes any existing service discovery configurations (e.g., `sd_configs`, `dns_sd_configs`, `file_sd_configs`, etc.) +// from the `scrape_configs` section and adds a single `http_sd_configs` configuration. +// The `http_sd_configs` points to the TA (Target Allocator) endpoint that provides the list of targets for the given job. +func AddHTTPSDConfigToPromConfig(prometheus map[interface{}]interface{}, taServiceName string) (map[interface{}]interface{}, error) { + prometheusConfigProperty, ok := prometheus["config"] + if !ok { + return nil, errorNoComponent("prometheusConfig") + } + + prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheusConfig") + } + + scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] + if !ok { + return nil, errorNoComponent("scrape_configs") + } + + scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) + if !ok { + return nil, errorNotAList("scrape_configs") + } + + sdRegex := regexp.MustCompile(`^.*(sd|static)_configs$`) + + for i, config := range scrapeConfigs { + scrapeConfig, ok := config.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMapAtIndex("scrape_config", i) + } + + // Check for other types of service discovery configs (e.g. dns_sd_configs, file_sd_configs, etc.) + for key := range scrapeConfig { + keyStr, keyErr := key.(string) + if !keyErr { + continue + } + if sdRegex.MatchString(keyStr) { + delete(scrapeConfig, key) + } + } + + jobNameProperty, ok := scrapeConfig["job_name"] + if !ok { + return nil, errorNotAStringAtIndex("job_name", i) + } + + jobName, ok := jobNameProperty.(string) + if !ok { + return nil, errorNotAStringAtIndex("job_name is not a string", i) + } + + escapedJob := url.QueryEscape(jobName) + scrapeConfig["http_sd_configs"] = []interface{}{ + map[string]interface{}{ + "url": fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", taServiceName, escapedJob), + }, + } + } + + return prometheus, nil +} + +// AddTAConfigToPromConfig adds or updates the target_allocator configuration in the Prometheus configuration. +// If the `EnableTargetAllocatorRewrite` feature flag for the target allocator is enabled, this function +// removes the existing scrape_configs from the collector's Prometheus configuration as it's not required. +func AddTAConfigToPromConfig(prometheus map[interface{}]interface{}, taServiceName string) (map[interface{}]interface{}, error) { + prometheusConfigProperty, ok := prometheus["config"] + if !ok { + return nil, errorNoComponent("prometheusConfig") + } + + prometheusCfg, ok := prometheusConfigProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheusConfig") + } + + // Create the TargetAllocConfig dynamically if it doesn't exist + if prometheus["target_allocator"] == nil { + prometheus["target_allocator"] = make(map[interface{}]interface{}) + } + + targetAllocatorCfg, ok := prometheus["target_allocator"].(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("target_allocator") + } + + targetAllocatorCfg["endpoint"] = fmt.Sprintf("http://%s:80", taServiceName) + targetAllocatorCfg["interval"] = "30s" + targetAllocatorCfg["collector_id"] = "${POD_NAME}" + + // Remove the scrape_configs key from the map + delete(prometheusCfg, "scrape_configs") + + return prometheus, nil +} + // ValidatePromConfig checks if the prometheus receiver config is valid given other collector-level settings. func ValidatePromConfig(config map[interface{}]interface{}, targetAllocatorEnabled bool, targetAllocatorRewriteEnabled bool) error { _, promConfigExists := config["config"] diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/pkg/targetallocator/adapters/config_to_prom_config_test.go index a2b0a9688..74b363aa2 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config_test.go +++ b/pkg/targetallocator/adapters/config_to_prom_config_test.go @@ -17,6 +17,7 @@ package adapters_test import ( "errors" "fmt" + "net/url" "reflect" "testing" @@ -116,6 +117,189 @@ func TestExtractPromConfigFromNullConfig(t *testing.T) { assert.True(t, reflect.ValueOf(promConfig).IsNil()) } +func TestUnescapeDollarSignsInPromConfig(t *testing.T) { + actual := ` +receivers: + prometheus: + config: + scrape_configs: + - job_name: 'example' + relabel_configs: + - source_labels: ['__meta_service_id'] + target_label: 'job' + replacement: 'my_service_$$1' + - source_labels: ['__meta_service_name'] + target_label: 'instance' + replacement: '$1' + metric_relabel_configs: + - source_labels: ['job'] + target_label: 'job' + replacement: '$$1_$2' +` + expected := ` +receivers: + prometheus: + config: + scrape_configs: + - job_name: 'example' + relabel_configs: + - source_labels: ['__meta_service_id'] + target_label: 'job' + replacement: 'my_service_$1' + - source_labels: ['__meta_service_name'] + target_label: 'instance' + replacement: '$1' + metric_relabel_configs: + - source_labels: ['job'] + target_label: 'job' + replacement: '$1_$2' +` + + config, err := ta.UnescapeDollarSignsInPromConfig(actual) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + expectedConfig, err := ta.UnescapeDollarSignsInPromConfig(expected) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if !reflect.DeepEqual(config, expectedConfig) { + t.Errorf("unexpected config: got %v, want %v", config, expectedConfig) + } +} + +func TestAddHTTPSDConfigToPromConfig(t *testing.T) { + t.Run("ValidConfiguration, add http_sd_config", func(t *testing.T) { + cfg := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{ + map[interface{}]interface{}{ + "job_name": "test_job", + "static_configs": []interface{}{ + map[interface{}]interface{}{ + "targets": []interface{}{ + "localhost:9090", + }, + }, + }, + }, + }, + }, + } + taServiceName := "test-service" + expectedCfg := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{ + map[interface{}]interface{}{ + "job_name": "test_job", + "http_sd_configs": []interface{}{ + map[string]interface{}{ + "url": fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", taServiceName, url.QueryEscape("test_job")), + }, + }, + }, + }, + }, + } + + actualCfg, err := ta.AddHTTPSDConfigToPromConfig(cfg, taServiceName) + assert.NoError(t, err) + assert.Equal(t, expectedCfg, actualCfg) + }) + + t.Run("invalid config property, returns error", func(t *testing.T) { + cfg := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "job_name": "test_job", + "static_configs": []interface{}{ + map[interface{}]interface{}{ + "targets": []interface{}{ + "localhost:9090", + }, + }, + }, + }, + } + + taServiceName := "test-service" + + _, err := ta.AddHTTPSDConfigToPromConfig(cfg, taServiceName) + assert.Error(t, err) + assert.EqualError(t, err, "no scrape_configs available as part of the configuration") + }) +} + +func TestAddTAConfigToPromConfig(t *testing.T) { + t.Run("should return expected prom config map with TA config", func(t *testing.T) { + cfg := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{ + map[interface{}]interface{}{ + "job_name": "test_job", + "static_configs": []interface{}{ + map[interface{}]interface{}{ + "targets": []interface{}{ + "localhost:9090", + }, + }, + }, + }, + }, + }, + } + + taServiceName := "test-targetallocator" + + expectedResult := map[interface{}]interface{}{ + "config": map[interface{}]interface{}{}, + "target_allocator": map[interface{}]interface{}{ + "endpoint": "http://test-targetallocator:80", + "interval": "30s", + "collector_id": "${POD_NAME}", + }, + } + + result, err := ta.AddTAConfigToPromConfig(cfg, taServiceName) + + assert.NoError(t, err) + assert.Equal(t, expectedResult, result) + }) + + t.Run("missing or invalid prometheusConfig property, returns error", func(t *testing.T) { + testCases := []struct { + name string + cfg map[interface{}]interface{} + errText string + }{ + { + name: "missing config property", + cfg: map[interface{}]interface{}{}, + errText: "no prometheusConfig available as part of the configuration", + }, + { + name: "invalid config property", + cfg: map[interface{}]interface{}{ + "config": "invalid", + }, + errText: "prometheusConfig property in the configuration doesn't contain valid prometheusConfig", + }, + } + + taServiceName := "test-targetallocator" + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + _, err := ta.AddTAConfigToPromConfig(tc.cfg, taServiceName) + + assert.Error(t, err) + assert.EqualError(t, err, tc.errText) + }) + } + }) +} + func TestValidatePromConfig(t *testing.T) { testCases := []struct { description string diff --git a/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml b/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml index 1b57d9607..e725f5d1f 100644 --- a/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml +++ b/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml @@ -1,49 +1,49 @@ -## Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved -## Unfortunately kuttl doesn't have a way to skip tests +# Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved +# Unfortunately kuttl doesn't have a way to skip tests -# apiVersion: opentelemetry.io/v1alpha1 -# kind: OpenTelemetryCollector -# metadata: -# name: labeldrop -# spec: -# mode: statefulset -# targetAllocator: -# enabled: true -# image: "local/opentelemetry-operator-targetallocator:e2e" -# serviceAccount: ta -# prometheusCR: -# enabled: true +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: labeldrop +spec: + mode: statefulset + targetAllocator: + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + serviceAccount: ta + prometheusCR: + enabled: true -# config: | -# receivers: -# jaeger: -# protocols: -# grpc: + config: | + receivers: + jaeger: + protocols: + grpc: -# # Collect own metrics -# prometheus: -# config: -# scrape_configs: -# - job_name: 'otel-collector' -# scrape_interval: 10s -# static_configs: -# - targets: [ '0.0.0.0:8888' ] -# metric_relabel_configs: -# - action: labeldrop -# regex: (id|name) + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + metric_relabel_configs: + - action: labeldrop + regex: (id|name) -# target_allocator: -# endpoint: http://labeldrop-targetallocator -# interval: 30s -# collector_id: ${POD_NAME} + target_allocator: + endpoint: http://labeldrop-targetallocator + interval: 30s + collector_id: ${POD_NAME} -# processors: + processors: -# exporters: -# logging: -# service: -# pipelines: -# traces: -# receivers: [jaeger] -# processors: [] -# exporters: [logging] + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index 40849c7e3..d5c9f970a 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -53,10 +53,19 @@ spec: prometheus: config: scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + relabel_configs: + - regex: __meta_kubernetes_node_label_(.+) + action: labelmap + replacement: $$1 + - regex: test_.* + action: labeldrop + - regex: 'metrica_*|metricb.*' + action: labelkeep + replacement: $$1 processors: From 4502c6df2ab0ec3d97b6518dd4e8ed71673a1867 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 2 Jun 2023 08:55:59 -0600 Subject: [PATCH 0876/1234] Bump js packages (#1791) --- .chloggen/bump-oteljs-versions.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100755 .chloggen/bump-oteljs-versions.yaml diff --git a/.chloggen/bump-oteljs-versions.yaml b/.chloggen/bump-oteljs-versions.yaml new file mode 100755 index 000000000..b2a5929a4 --- /dev/null +++ b/.chloggen/bump-oteljs-versions.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentaiton/nodejs + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump js packages to latest versions + +# One or more tracking issues related to the change +issues: [1791] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index bf4adf903..93f7b944c 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,15 +15,15 @@ }, "dependencies": { "@opentelemetry/api": "1.4.1", - "@opentelemetry/auto-instrumentations-node": "0.36.6", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.38.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.38.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.27.5", - "@opentelemetry/resource-detector-aws": "1.2.3", - "@opentelemetry/resource-detector-container": "0.2.3", - "@opentelemetry/resource-detector-gcp": "0.28.1", - "@opentelemetry/resources": "1.12.0", - "@opentelemetry/sdk-metrics": "1.12.0", - "@opentelemetry/sdk-node": "0.38.0" + "@opentelemetry/auto-instrumentations-node": "0.37.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.39.1", + "@opentelemetry/exporter-trace-otlp-grpc": "0.39.1", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.6", + "@opentelemetry/resource-detector-aws": "1.2.4", + "@opentelemetry/resource-detector-container": "0.2.4", + "@opentelemetry/resource-detector-gcp": "0.28.2", + "@opentelemetry/resources": "1.13.0", + "@opentelemetry/sdk-metrics": "1.13.0", + "@opentelemetry/sdk-node": "0.39.1" } } From 7216fca04289bfcb29049a6da2a8b23d9abcd0c3 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:28:21 -0600 Subject: [PATCH 0877/1234] [instrumentation] Bump python to 1.18.0/0.39b0 (#1790) * Bump python to 1.18.0/0.39b0 * changelog --------- Co-authored-by: Jacob Aronoff --- .chloggen/bump-python-version.yaml | 16 ++++ autoinstrumentation/python/requirements.txt | 94 ++++++++++----------- 2 files changed, 63 insertions(+), 47 deletions(-) create mode 100755 .chloggen/bump-python-version.yaml diff --git a/.chloggen/bump-python-version.yaml b/.chloggen/bump-python-version.yaml new file mode 100755 index 000000000..1c800cdf1 --- /dev/null +++ b/.chloggen/bump-python-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation/python + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump python packages to 1.18.0/0.39b0 + +# One or more tracking issues related to the change +issues: [1790] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index ba7584849..2a47bf66f 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,55 +1,55 @@ -opentelemetry-distro==0.38b0 +opentelemetry-distro==0.39b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.17.0 +opentelemetry-exporter-otlp-proto-http==1.18.0 -opentelemetry-propagator-b3==1.17.0 -opentelemetry-propagator-jaeger==1.17.0 +opentelemetry-propagator-b3==1.18.0 +opentelemetry-propagator-jaeger==1.18.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.38b0 -opentelemetry-propagator-ot-trace==0.38b0 +opentelemetry-instrumentation==0.39b0 +opentelemetry-propagator-ot-trace==0.39b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.38b0 -opentelemetry-instrumentation-aiohttp-client==0.38b0 -opentelemetry-instrumentation-aiopg==0.38b0 -opentelemetry-instrumentation-asgi==0.38b0 -opentelemetry-instrumentation-asyncpg==0.38b0 -opentelemetry-instrumentation-boto==0.38b0 -opentelemetry-instrumentation-boto3sqs==0.38b0 -opentelemetry-instrumentation-botocore==0.38b0 -opentelemetry-instrumentation-celery==0.38b0 -opentelemetry-instrumentation-confluent-kafka==0.38b0 -opentelemetry-instrumentation-dbapi==0.38b0 -opentelemetry-instrumentation-django==0.38b0 -opentelemetry-instrumentation-elasticsearch==0.38b0 -opentelemetry-instrumentation-falcon==0.38b0 -opentelemetry-instrumentation-fastapi==0.38b0 -opentelemetry-instrumentation-flask==0.38b0 -opentelemetry-instrumentation-grpc==0.38b0 -opentelemetry-instrumentation-httpx==0.38b0 -opentelemetry-instrumentation-jinja2==0.38b0 -opentelemetry-instrumentation-kafka-python==0.38b0 -opentelemetry-instrumentation-logging==0.38b0 -opentelemetry-instrumentation-mysql==0.38b0 -opentelemetry-instrumentation-pika==0.38b0 -opentelemetry-instrumentation-psycopg2==0.38b0 -opentelemetry-instrumentation-pymemcache==0.38b0 -opentelemetry-instrumentation-pymongo==0.38b0 -opentelemetry-instrumentation-pymysql==0.38b0 -opentelemetry-instrumentation-pyramid==0.38b0 -opentelemetry-instrumentation-redis==0.38b0 -opentelemetry-instrumentation-remoulade==0.38b0 -opentelemetry-instrumentation-requests==0.38b0 -opentelemetry-instrumentation-sklearn==0.38b0 -opentelemetry-instrumentation-sqlalchemy==0.38b0 -opentelemetry-instrumentation-sqlite3==0.38b0 -opentelemetry-instrumentation-starlette==0.38b0 -opentelemetry-instrumentation-system-metrics==0.38b0 -opentelemetry-instrumentation-tornado==0.38b0 -opentelemetry-instrumentation-tortoiseorm==0.38b0 -opentelemetry-instrumentation-urllib==0.38b0 -opentelemetry-instrumentation-urllib3==0.38b0 -opentelemetry-instrumentation-wsgi==0.38b0 +opentelemetry-instrumentation-aio-pika==0.39b0 +opentelemetry-instrumentation-aiohttp-client==0.39b0 +opentelemetry-instrumentation-aiopg==0.39b0 +opentelemetry-instrumentation-asgi==0.39b0 +opentelemetry-instrumentation-asyncpg==0.39b0 +opentelemetry-instrumentation-boto==0.39b0 +opentelemetry-instrumentation-boto3sqs==0.39b0 +opentelemetry-instrumentation-botocore==0.39b0 +opentelemetry-instrumentation-celery==0.39b0 +opentelemetry-instrumentation-confluent-kafka==0.39b0 +opentelemetry-instrumentation-dbapi==0.39b0 +opentelemetry-instrumentation-django==0.39b0 +opentelemetry-instrumentation-elasticsearch==0.39b0 +opentelemetry-instrumentation-falcon==0.39b0 +opentelemetry-instrumentation-fastapi==0.39b0 +opentelemetry-instrumentation-flask==0.39b0 +opentelemetry-instrumentation-grpc==0.39b0 +opentelemetry-instrumentation-httpx==0.39b0 +opentelemetry-instrumentation-jinja2==0.39b0 +opentelemetry-instrumentation-kafka-python==0.39b0 +opentelemetry-instrumentation-logging==0.39b0 +opentelemetry-instrumentation-mysql==0.39b0 +opentelemetry-instrumentation-pika==0.39b0 +opentelemetry-instrumentation-psycopg2==0.39b0 +opentelemetry-instrumentation-pymemcache==0.39b0 +opentelemetry-instrumentation-pymongo==0.39b0 +opentelemetry-instrumentation-pymysql==0.39b0 +opentelemetry-instrumentation-pyramid==0.39b0 +opentelemetry-instrumentation-redis==0.39b0 +opentelemetry-instrumentation-remoulade==0.39b0 +opentelemetry-instrumentation-requests==0.39b0 +opentelemetry-instrumentation-sklearn==0.39b0 +opentelemetry-instrumentation-sqlalchemy==0.39b0 +opentelemetry-instrumentation-sqlite3==0.39b0 +opentelemetry-instrumentation-starlette==0.39b0 +opentelemetry-instrumentation-system-metrics==0.39b0 +opentelemetry-instrumentation-tornado==0.39b0 +opentelemetry-instrumentation-tortoiseorm==0.39b0 +opentelemetry-instrumentation-urllib==0.39b0 +opentelemetry-instrumentation-urllib3==0.39b0 +opentelemetry-instrumentation-wsgi==0.39b0 From 70f22dc199dd328a70f314e323f95910f8686d3d Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 2 Jun 2023 12:02:20 -0400 Subject: [PATCH 0878/1234] Release 0.78 (#1792) * release the operator * update changelog and versions * remove last compat * Fix changelog * more chlog --- .chloggen/1444-apache-httpd-final-v1.0.2.yaml | 16 --------- .../1560-add-custom-metrics-support.yaml | 17 --------- .chloggen/1777-override-label.yaml | 16 --------- ...sources-requirements-target-allocator.yaml | 16 --------- .chloggen/bump-oteljs-versions.yaml | 16 --------- .chloggen/bump-python-version.yaml | 16 --------- .../default_limits_for_go_init_container.yaml | 16 --------- .chloggen/fix-go-release.yaml | 16 --------- .chloggen/fix-pod-annotation-propagation.yaml | 16 --------- .chloggen/fix_prometheus_relabel-configs.yaml | 16 --------- .chloggen/fix_validate-ta-config.yaml | 16 --------- CHANGELOG.md | 35 +++++++++++++++++-- README.md | 2 +- RELEASE.md | 4 +-- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- versions.txt | 12 +++---- 16 files changed, 46 insertions(+), 192 deletions(-) delete mode 100644 .chloggen/1444-apache-httpd-final-v1.0.2.yaml delete mode 100644 .chloggen/1560-add-custom-metrics-support.yaml delete mode 100755 .chloggen/1777-override-label.yaml delete mode 100755 .chloggen/add-resources-requirements-target-allocator.yaml delete mode 100755 .chloggen/bump-oteljs-versions.yaml delete mode 100755 .chloggen/bump-python-version.yaml delete mode 100755 .chloggen/default_limits_for_go_init_container.yaml delete mode 100755 .chloggen/fix-go-release.yaml delete mode 100755 .chloggen/fix-pod-annotation-propagation.yaml delete mode 100755 .chloggen/fix_prometheus_relabel-configs.yaml delete mode 100755 .chloggen/fix_validate-ta-config.yaml diff --git a/.chloggen/1444-apache-httpd-final-v1.0.2.yaml b/.chloggen/1444-apache-httpd-final-v1.0.2.yaml deleted file mode 100644 index 3d9e39a93..000000000 --- a/.chloggen/1444-apache-httpd-final-v1.0.2.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Added all webhook instrumentation logic, e2e tests, readme - -# One or more tracking issues related to the change -issues: [1444] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1560-add-custom-metrics-support.yaml b/.chloggen/1560-add-custom-metrics-support.yaml deleted file mode 100644 index 8faf9f7bc..000000000 --- a/.chloggen/1560-add-custom-metrics-support.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Autoscaler - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Support scaling on Pod custom metrics. - -# One or more tracking issues related to the change -issues: - - 1560 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1777-override-label.yaml b/.chloggen/1777-override-label.yaml deleted file mode 100755 index fa61b82c7..000000000 --- a/.chloggen/1777-override-label.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fixes a previously undocumented behavior that a collector could not override the collector's app name - -# One or more tracking issues related to the change -issues: [1777] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-resources-requirements-target-allocator.yaml b/.chloggen/add-resources-requirements-target-allocator.yaml deleted file mode 100755 index dee07d093..000000000 --- a/.chloggen/add-resources-requirements-target-allocator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: targetallocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Set resource requests/limits for TargetAllocator - -# One or more tracking issues related to the change -issues: [1103] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-oteljs-versions.yaml b/.chloggen/bump-oteljs-versions.yaml deleted file mode 100755 index b2a5929a4..000000000 --- a/.chloggen/bump-oteljs-versions.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentaiton/nodejs - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump js packages to latest versions - -# One or more tracking issues related to the change -issues: [1791] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-python-version.yaml b/.chloggen/bump-python-version.yaml deleted file mode 100755 index 1c800cdf1..000000000 --- a/.chloggen/bump-python-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation/python - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump python packages to 1.18.0/0.39b0 - -# One or more tracking issues related to the change -issues: [1790] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/default_limits_for_go_init_container.yaml b/.chloggen/default_limits_for_go_init_container.yaml deleted file mode 100755 index 8c271bfa4..000000000 --- a/.chloggen/default_limits_for_go_init_container.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: provide default resource limits for go sidecar container - -# One or more tracking issues related to the change -issues: [1732] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix-go-release.yaml b/.chloggen/fix-go-release.yaml deleted file mode 100755 index b2911b821..000000000 --- a/.chloggen/fix-go-release.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix issue where the operator's released image did not correctly set the default go auto-instrumentation version - -# One or more tracking issues related to the change -issues: [1757] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix-pod-annotation-propagation.yaml b/.chloggen/fix-pod-annotation-propagation.yaml deleted file mode 100755 index 77b7b0c98..000000000 --- a/.chloggen/fix-pod-annotation-propagation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Propagate Metadata.Annotations to PodSpec.Annotations - -# One or more tracking issues related to the change -issues: [900] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_prometheus_relabel-configs.yaml b/.chloggen/fix_prometheus_relabel-configs.yaml deleted file mode 100755 index f0d77bb5f..000000000 --- a/.chloggen/fix_prometheus_relabel-configs.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: pkg/collector, pkg/targetallocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fix issues related to prometheus relabel configs when target allocator is enabled - -# One or more tracking issues related to the change -issues: [958, 1622, 1623] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_validate-ta-config.yaml b/.chloggen/fix_validate-ta-config.yaml deleted file mode 100755 index f3dda56b1..000000000 --- a/.chloggen/fix_validate-ta-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Improve config validation for prometheus receiver and target allocator - -# One or more tracking issues related to the change -issues: [1581] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index a3167e1c6..c0cefdb23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,37 @@ Changes by Version ================== + +## 0.78.0 + +### 💡 Enhancements 💡 + +- `autoinstrumentaiton/nodejs`: Bump js packages to latest versions (#1791) +- `autoinstrumentation/python`: Bump python packages to 1.18.0/0.39b0 (#1790) +- `operator`: Added all webhook instrumentation logic, e2e tests, readme (#1444) +- `Autoscaler`: Support scaling on Pod custom metrics. (#1560) +- `targetallocator`: Set resource requests/limits for TargetAllocator (#1103) +- `operator`: provide default resource limits for go sidecar container (#1732) +- `operator`: Propagate Metadata.Annotations to PodSpec.Annotations (#900) +- `operator`: Improve config validation for prometheus receiver and target allocator (#1581) + +### 🧰 Bug fixes 🧰 + +- `operator`: fixes a previously undocumented behavior that a collector could not override the collector's app name (#1777) +- `operator`: Fix issue where the operator's released image did not correctly set the default go auto-instrumentation version (#1757) +- `pkg/collector, pkg/targetallocator`: fix issues related to prometheus relabel configs when target allocator is enabled (#958, #1622, #1623) + +### Components + +* [OpenTelemetry Collector - v0.78.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.78.0) +* [OpenTelemetry Contrib - v0.78.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.78.0) +* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) +* [Node.JS - 0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.39.1) +* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) +* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) +* [ApacheHTTPD - 1.0.2](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.2) + ## 0.77.0 ### 💡 Enhancements 💡 @@ -21,7 +52,7 @@ Changes by Version * [OpenTelemetry Contrib - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.77.0) * [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) * [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) +* [Node.JS - 0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) * [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) * [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) @@ -54,7 +85,7 @@ Changes by Version * [OpenTelemetry Contrib - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.76.1) * [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) * [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) +* [Node.JS - 0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) * [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) ## 0.75.0 diff --git a/README.md b/README.md index df47b8fb9..2b218f02a 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.78.0 | v1.19 to v1.27 | v1 | | v0.77.0 | v1.19 to v1.26 | v1 | | v0.76.1 | v1.19 to v1.26 | v1 | | v0.75.0 | v1.19 to v1.26 | v1 | @@ -593,7 +594,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.57.2 | v1.19 to v1.24 | v1 | | v0.56.0 | v1.19 to v1.24 | v1 | | v0.55.0 | v1.19 to v1.24 | v1 | -| v0.54.0 | v1.19 to v1.24 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 41114b005..1af671c11 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. -2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `auto-instrumentation/`. +2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. 3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. 4. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. 5. Add the changes to the changelog. Manually add versions of all operator components. @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.78.0 | @jaronoff97 | | v0.79.0 | @pavolloffay | | v0.80.0 | @VineethReddy02 | | v0.81.0 | @TylerHelmuth | | v0.82.0 | @frzifus | | v0.83.0 | @yuriolisa | +| v0.84.0 | @jaronoff97 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index d58f127a2..8c5746371 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-05-31T15:42:55Z" + createdAt: "2023-06-01T18:31:31Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.77.0 + name: opentelemetry-operator.v0.78.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -308,7 +308,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.77.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.78.0 livenessProbe: httpGet: path: /healthz @@ -415,7 +415,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.77.0 + version: 0.78.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index d64646438..003f8cbfe 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.77.0 +opentelemetry-collector=0.78.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.77.0 +operator=0.78.0 # Represents the current release of the Target Allocator. -targetallocator=0.77.0 +targetallocator=0.78.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.77.0 +operator-opamp-bridge=0.78.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -19,11 +19,11 @@ autoinstrumentation-java=1.26.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.38.0 +autoinstrumentation-nodejs=0.39.1 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.38b0 +autoinstrumentation-python=0.39b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt From c19b60639432f661827c33fb84db322386401c9a Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 5 Jun 2023 13:52:27 -0400 Subject: [PATCH 0879/1234] Bump all the dependencies (#1795) * Bump all the deps * linter --- cmd/operator-opamp-bridge/go.mod | 91 +++--- cmd/operator-opamp-bridge/go.sum | 307 +++++++----------- cmd/operator-opamp-bridge/metrics/reporter.go | 24 +- cmd/operator-opamp-bridge/operator/client.go | 10 +- cmd/otel-allocator/go.mod | 37 ++- cmd/otel-allocator/go.sum | 73 +++-- cmd/otel-allocator/watcher/promOperator.go | 6 +- go.mod | 46 +-- go.sum | 114 ++++--- pkg/featuregate/featuregate_test.go | 2 +- 10 files changed, 325 insertions(+), 385 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index accb3c4e0..a7a172742 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -6,89 +6,90 @@ require ( github.com/go-logr/logr v1.2.4 github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.7.0 - github.com/open-telemetry/opentelemetry-operator v1.51.0 + github.com/open-telemetry/opentelemetry-operator v0.78.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 - go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0 - go.opentelemetry.io/otel/metric v0.37.0 - go.opentelemetry.io/otel/sdk v1.14.0 - go.opentelemetry.io/otel/sdk/metric v0.37.0 + go.opentelemetry.io/otel v1.15.1 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 + go.opentelemetry.io/otel/metric v0.38.1 + go.opentelemetry.io/otel/sdk v1.15.1 + go.opentelemetry.io/otel/sdk/metric v0.38.1 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.26.3 - k8s.io/client-go v0.26.3 + k8s.io/apimachinery v0.27.2 + k8s.io/client-go v0.27.2 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.14.6 + sigs.k8s.io/controller-runtime v0.15.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/collector/featuregate v0.75.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 // indirect + go.opentelemetry.io/otel/trace v1.15.1 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.8.0 // indirect + go.uber.org/atomic v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect + google.golang.org/grpc v1.54.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.26.3 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/component-base v0.26.1 // indirect - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/api v0.27.2 // indirect + k8s.io/apiextensions-apiserver v0.27.2 // indirect + k8s.io/component-base v0.27.2 // indirect + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index cd1736efa..04aa1213b 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -34,24 +34,17 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -70,8 +63,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= +github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -79,45 +72,34 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -150,12 +132,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= +github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -163,14 +146,13 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -180,140 +162,107 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= -github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= github.com/open-telemetry/opamp-go v0.7.0 h1:PbxBsSmJwA4mJQbL5mhmxZ8KxNKqn1HBcoDilXIcPR8= github.com/open-telemetry/opamp-go v0.7.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= -github.com/open-telemetry/opentelemetry-operator v1.51.0 h1:mf6E24jBnv0JvxUH2nOujiqShwA7kJcCFbhd2vdMyQQ= -github.com/open-telemetry/opentelemetry-operator v1.51.0/go.mod h1:2oXRmTlK6/4gc+ipK94KKHEEf6h3PWh2NiG3doAQnwo= +github.com/open-telemetry/opentelemetry-operator v0.78.0 h1:a5pjoL+JfU6rHWHaZ14qB2NCU5JuV/2p/ZvjgzEuE9I= +github.com/open-telemetry/opentelemetry-operator v0.78.0/go.mod h1:NexspHhRcEj5zGXuyrEKc7+zBw3xhJdiemfOI9lJ+yc= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -321,37 +270,37 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0 h1:22J9c9mxNAZugv86zhwjBnER0DbO0VVpW9Oo/j3jBBQ= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.37.0/go.mod h1:QD8SSO9fgtBOvXYpcX5NXW+YnDJByTnh7a/9enQWFmw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0 h1:Ad4fpLq5t4s4+xB0chYBmbp1NNMqG4QRkseRmbx3bOw= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.37.0/go.mod h1:hgpB6JpYB/K403Z2wCxtX5fENB1D4bSdAHG0vJI+Koc= -go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs= -go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU= -go.opentelemetry.io/otel/sdk/metric v0.37.0/go.mod h1:mO2WV1AZKKwhwHTV3AKOoIEb9LbUaENZDuGUQd+j4A0= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= +go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= +go.opentelemetry.io/otel v1.15.1 h1:3Iwq3lfRByPaws0f6bU3naAqOR1n5IeDWd9390kWHa8= +go.opentelemetry.io/otel v1.15.1/go.mod h1:mHHGEHVDLal6YrKMmk9LqC4a3sF5g+fHfrttQIB1NTc= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 h1:XYDQtNzdb2T4uM1pku2m76eSMDJgqhJ+6KzkqgQBALc= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1/go.mod h1:uOTV75+LOzV+ODmL8ahRLWkFA3eQcSC2aAsbxIu4duk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 h1:MSGZwWn8Ji4b6UWkB7pYPgTiTmWM3S4lro9Y+5c3WmE= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1/go.mod h1:GFYZ2ebv/Bwont+pVaXHTGncGz93MjvTgZrskegEOUI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 h1:I/hA2cEzAaYNIieIkQ1v3D+hjMfDJHzp17kGje5+Wgo= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1/go.mod h1:P1GVd+ukhaHORjU3CDbF6C4CGs5k7P6YkG8WU9MTQ7A= +go.opentelemetry.io/otel/metric v0.38.1 h1:2MM7m6wPw9B8Qv8iHygoAgkbejed59uUR6ezR5T3X2s= +go.opentelemetry.io/otel/metric v0.38.1/go.mod h1:FwqNHD3I/5iX9pfrRGZIlYICrJv0rHEUl2Ln5vdIVnQ= +go.opentelemetry.io/otel/sdk v1.15.1 h1:5FKR+skgpzvhPQHIEfcwMYjCBr14LWzs3uSqKiQzETI= +go.opentelemetry.io/otel/sdk v1.15.1/go.mod h1:8rVtxQfrbmbHKfqzpQkT5EzZMcbMBwTzNAggbEAM0KA= +go.opentelemetry.io/otel/sdk/metric v0.38.1 h1:EkO5wI4NT/fUaoPMGc0fKV28JaWe7q4vfVpEVasGb+8= +go.opentelemetry.io/otel/sdk/metric v0.38.1/go.mod h1:Rn4kSXFF9ZQZ5lL1pxQjCbK4seiO+U7s0ncmIFJaj34= +go.opentelemetry.io/otel/trace v1.15.1 h1:uXLo6iHJEzDfrNC0L0mNjItIp06SyaBQxu5t3xMlngY= +go.opentelemetry.io/otel/trace v1.15.1/go.mod h1:IWdQG/5N1x7f6YUlmdLeJvH9yxtuJAfc4VW5Agv9r/8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= -go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -387,9 +336,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -397,7 +346,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -417,21 +365,17 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= +golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -441,14 +385,11 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -458,7 +399,6 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -471,27 +411,19 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -499,9 +431,8 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -522,7 +453,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -550,12 +480,14 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -610,10 +542,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -630,8 +562,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= +google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -645,29 +577,24 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -677,29 +604,29 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= -k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= -k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= -k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= +k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= +k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= +k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= +k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= +k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= +k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= +k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= +k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= +k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/cmd/operator-opamp-bridge/metrics/reporter.go b/cmd/operator-opamp-bridge/metrics/reporter.go index 16148e378..e418ec294 100644 --- a/cmd/operator-opamp-bridge/metrics/reporter.go +++ b/cmd/operator-opamp-bridge/metrics/reporter.go @@ -26,7 +26,6 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/instrument" sdkmetric "go.opentelemetry.io/otel/sdk/metric" otelresource "go.opentelemetry.io/otel/sdk/resource" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" @@ -48,8 +47,8 @@ type MetricReporter struct { process *process.Process // Some example metrics to report. - processMemoryPhysical instrument.Float64ObservableGauge - processCpuTime instrument.Float64ObservableCounter + processMemoryPhysical metric.Float64ObservableGauge + processCpuTime metric.Float64ObservableCounter } // NewMetricReporter creates an OTLP/HTTP client to the destination address supplied by the server. @@ -122,16 +121,17 @@ func NewMetricReporter( // Create some metrics that will be reported according to OpenTelemetry semantic // conventions for process metrics (conventions are TBD for now). - reporter.processCpuTime, err = reporter.meter.Float64ObservableGauge( + reporter.processCpuTime, err = reporter.meter.Float64ObservableCounter( "process.cpu.time", - instrument.WithFloat64Callback(reporter.processCpuTimeFunc), + metric.WithFloat64Callback(reporter.processCpuTimeFunc), ) if err != nil { return nil, fmt.Errorf("can't create process time metric: %w", err) } - reporter.processMemoryPhysical, err = reporter.meter.Float64ObservableCounter( + + reporter.processMemoryPhysical, err = reporter.meter.Float64ObservableGauge( "process.memory.physical_usage", - instrument.WithFloat64Callback(reporter.processMemoryPhysicalFunc), + metric.WithFloat64Callback(reporter.processMemoryPhysicalFunc), ) if err != nil { return nil, fmt.Errorf("can't create memory metric: %w", err) @@ -142,18 +142,18 @@ func NewMetricReporter( return reporter, nil } -func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer instrument.Float64Observer) error { +func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer metric.Float64Observer) error { times, err := reporter.process.Times() if err != nil { reporter.logger.Errorf("Cannot get process CPU times: %w", err) } - observer.Observe(times.User, attribute.String("state", "user")) - observer.Observe(times.System, attribute.String("state", "system")) - observer.Observe(times.Iowait, attribute.String("state", "wait")) + observer.Observe(times.User, metric.WithAttributes(attribute.String("state", "user"))) + observer.Observe(times.System, metric.WithAttributes(attribute.String("state", "system"))) + observer.Observe(times.Iowait, metric.WithAttributes(attribute.String("state", "wait"))) return nil } -func (reporter *MetricReporter) processMemoryPhysicalFunc(_ context.Context, observer instrument.Float64Observer) error { +func (reporter *MetricReporter) processMemoryPhysicalFunc(_ context.Context, observer metric.Float64Observer) error { memory, err := reporter.process.MemoryInfo() if err != nil { reporter.logger.Errorf("Cannot get process memory information: %w", err) diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go index b83b476fb..685eb59bd 100644 --- a/cmd/operator-opamp-bridge/operator/client.go +++ b/cmd/operator-opamp-bridge/operator/client.go @@ -77,10 +77,13 @@ func (c Client) create(ctx context.Context, name string, namespace string, colle collector.ObjectMeta.Labels = map[string]string{} } collector.ObjectMeta.Labels[ResourceIdentifierKey] = ResourceIdentifierValue - err := collector.ValidateCreate() + warnings, err := collector.ValidateCreate() if err != nil { return err } + if warnings != nil { + c.log.Info("Some warnings present on collector: %v", warnings) + } c.log.Info("Creating collector") return c.k8sClient.Create(ctx, collector) } @@ -88,10 +91,13 @@ func (c Client) create(ctx context.Context, name string, namespace string, colle func (c Client) update(ctx context.Context, old *v1alpha1.OpenTelemetryCollector, new *v1alpha1.OpenTelemetryCollector) error { new.ObjectMeta = old.ObjectMeta new.TypeMeta = old.TypeMeta - err := new.ValidateUpdate(old) + warnings, err := new.ValidateUpdate(old) if err != nil { return err } + if warnings != nil { + c.log.Info("Some warnings present on collector: %v", warnings) + } c.log.Info("Updating collector") return c.k8sClient.Update(ctx, new) } diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8698619cb..5e8a5112e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -7,20 +7,20 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 github.com/fsnotify/fsnotify v1.6.0 github.com/ghodss/yaml v1.0.0 - github.com/gin-gonic/gin v1.9.0 + github.com/gin-gonic/gin v1.9.1 github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.4 github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.64.1 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 + github.com/prometheus-operator/prometheus-operator v0.65.2 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2 github.com/prometheus/client_golang v1.15.1 - github.com/prometheus/common v0.43.0 - github.com/prometheus/prometheus v0.43.0 + github.com/prometheus/common v0.44.0 + github.com/prometheus/prometheus v0.44.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.3 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.27.2 k8s.io/apimachinery v0.27.2 @@ -48,7 +48,7 @@ require ( github.com/aws/aws-sdk-go v1.44.245 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bytedance/sonic v1.8.0 // indirect + github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -66,6 +66,7 @@ require ( github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.14.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -82,10 +83,10 @@ require ( github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.11.2 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect - github.com/goccy/go-json v0.10.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -120,13 +121,13 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/klauspost/cpuid/v2 v2.1.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect - github.com/leodido/go-urn v1.2.1 // indirect + github.com/leodido/go-urn v1.2.4 // indirect github.com/linode/linodego v1.16.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect github.com/miekg/dns v1.1.53 // indirect @@ -141,7 +142,7 @@ require ( github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/ovh/go-ovh v1.4.1 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.6.0 // indirect @@ -151,9 +152,9 @@ require ( github.com/prometheus/procfs v0.9.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect github.com/spf13/cobra v1.6.1 // indirect - github.com/thanos-io/thanos v0.31.0 // indirect + github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.9 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.mongodb.org/mongo-driver v1.11.4 // indirect go.opencensus.io v0.24.0 // indirect @@ -165,8 +166,8 @@ require ( go.uber.org/zap v1.24.0 // indirect go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 // indirect - golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 78b82e786..8a3ea9b9c 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -102,8 +102,8 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= -github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -171,12 +171,14 @@ github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8Wlg github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= -github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -240,8 +242,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= -github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -272,8 +274,8 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA= -github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -347,7 +349,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= +github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -450,8 +452,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= -github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -467,8 +469,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -491,8 +493,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -548,8 +550,8 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -561,12 +563,12 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= -github.com/prometheus-operator/prometheus-operator v0.64.1 h1:S5xTFyfcr3WhTXwVKXtY1r7C08QLBg6hHGN/ghdW3KU= -github.com/prometheus-operator/prometheus-operator v0.64.1/go.mod h1:VE2DK2v0ur3xgIbqDE6FwnqK93TvvWdcyyR/VcNPrvw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1 h1:bvntWler8vOjDJtxBwGDakGNC6srSZmgawGM9Jf7HC8= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.64.1/go.mod h1:cfNgxpCPGyIydmt3HcwDqKDt0nYdlGRhzftl+DZH7WA= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1 h1:osAjfXA8xRsHY6pp8Me9xcmoRPYT7RnJcAbUtfxVy9I= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.64.1/go.mod h1:bpL5voXLr7djhPRHpY7k269A5HXlgLFNWEV1wB9/Zi0= +github.com/prometheus-operator/prometheus-operator v0.65.2 h1:MyAKMTYwdgiYKNUYwP209Jjq5mhbolq0fiksZB6U++k= +github.com/prometheus-operator/prometheus-operator v0.65.2/go.mod h1:4UQBzDsT16mP1Cx5K5REl//stnMpKlQxzAarS68P3Ic= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2 h1:DZzMjhqxx3+kAPpwWdng3ktO6NErh1wGuW5tXJamak8= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2/go.mod h1:xcfWyzl4BpEe5jnVkw7D1yCHU7GHjfjCERJsEfGbpSU= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2 h1:yEgVwicrOC7JzJ54NJ1c6Mn5/O9MUps0MuYNpsq262o= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2/go.mod h1:0vdMuIf2i4E/2IkOQ+2chULmXQCkAp+0L7oz73V781M= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -588,8 +590,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.43.0 h1:iq+BVjvYLei5f27wiuNiB1DN6DYQkp1c8Bx0Vykh5us= -github.com/prometheus/common v0.43.0/go.mod h1:NCvr5cQIh3Y/gy73/RdVtC9r8xxrxwJnB+2lB3BxrFc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -599,8 +601,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= -github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= +github.com/prometheus/prometheus v0.44.0 h1:sgn8Fdx+uE5tHQn0/622swlk2XnIj6udoZCnbVjHIgc= +github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/jeCdyOWWobLHNKQg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -641,17 +643,20 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/thanos-io/thanos v0.31.0 h1:jOCmaiIXwpByWXoVtHnktLm3YDB9xDQQzmZvd1XG5oY= github.com/thanos-io/thanos v0.31.0/go.mod h1:5ux+jb2oKr59+3XsCC0mX+JuAbPGJEMijjhcmnL/PMo= +github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2 h1:Zg52TbQ9LgQTynZoCB2XeA39m4f8zu9ybLo5oDSt4+A= +github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2/go.mod h1:yQifbihSzTuj12goHi9PGZpe26XICXalf1XsxHVhGI4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= -github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -704,8 +709,9 @@ go4.org/intern v0.0.0-20220617035311-6925f38cc365/go.mod h1:WXRv3p7T6gzt0CcJm43A go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 h1:QJ/xcIANMLApehfgPCHnfK1hZiaMmbaTVmPv7DAoTbo= go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -720,8 +726,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -886,6 +892,7 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index cf6d3fe50..5989977d8 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -17,10 +17,9 @@ package watcher import ( "fmt" - allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - "github.com/go-kit/log" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + promv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1" "github.com/prometheus-operator/prometheus-operator/pkg/assets" monitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" "github.com/prometheus-operator/prometheus-operator/pkg/informers" @@ -31,6 +30,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" + + allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { @@ -173,6 +174,7 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { serviceMonitorInstances, podMonitorInstances, map[string]*monitoringv1.Probe{}, + map[string]*promv1alpha1.ScrapeConfig{}, &store, nil, nil, diff --git a/go.mod b/go.mod index 1e03d3e0f..01b8eba2a 100644 --- a/go.mod +++ b/go.mod @@ -9,11 +9,11 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible - github.com/prometheus/prometheus v0.43.0 + github.com/prometheus/prometheus v0.44.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.2 - go.opentelemetry.io/collector/featuregate v0.75.0 - go.opentelemetry.io/otel v1.14.0 + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/featuregate v0.77.0 + go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.27.2 k8s.io/apiextensions-apiserver v0.27.2 @@ -30,7 +30,7 @@ require ( github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.28 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect @@ -39,19 +39,19 @@ require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.217 // indirect + github.com/aws/aws-sdk-go v1.44.245 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/digitalocean/godo v1.97.0 // indirect + github.com/digitalocean/godo v1.98.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.3+incompatible // indirect + github.com/docker/docker v23.0.4+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/go-control-plane v0.11.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect + github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.14.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -73,8 +73,8 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.0 // indirect - github.com/gophercloud/gophercloud v1.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/gophercloud/gophercloud v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect github.com/hashicorp/consul/api v1.20.0 // indirect @@ -87,23 +87,23 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b // indirect + github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go v1.41.0 // indirect + github.com/hetznercloud/hcloud-go v1.42.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.4 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.6 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect - github.com/linode/linodego v1.14.1 // indirect + github.com/linode/linodego v1.16.1 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.51 // indirect + github.com/miekg/dns v1.1.53 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -111,7 +111,7 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/ovh/go-ovh v1.3.0 // indirect + github.com/ovh/go-ovh v1.4.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.15.1 // indirect @@ -119,26 +119,26 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect github.com/spf13/cobra v1.6.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.1 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/api v0.111.0 // indirect + google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/grpc v1.53.0 // indirect diff --git a/go.sum b/go.sum index bf8bac3d6..603b70a52 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= +github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -83,8 +83,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.217 h1:FcWC56MRl+k756aH3qeMQTylSdeJ58WN0iFz3fkyRz0= -github.com/aws/aws-sdk-go v1.44.217/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.245 h1:KtY2s4q31/kn33AdV63R5t77mdxsI7rq3YT7Mgo805M= +github.com/aws/aws-sdk-go v1.44.245/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -114,13 +114,13 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.97.0 h1:p9w1yCcWMZcxFSLPToNGXA96WfUVLXqoHti6GzVomL4= -github.com/digitalocean/godo v1.97.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= +github.com/digitalocean/godo v1.98.0 h1:potyC1eD0N9n5/P4/WmJuKgg+OGYZOBWEW+/aKTX6QQ= +github.com/digitalocean/godo v1.98.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= -github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek= +github.com/docker/docker v23.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -136,8 +136,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= +github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= @@ -250,7 +250,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10 h1:CqYfpuYIjnlNxM3msdyPRKabhXZWbKjf3Q8BWROFBso= +github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -259,11 +259,10 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9 github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/gophercloud/gophercloud v1.2.0 h1:1oXyj4g54KBg/kFtCdMM6jtxSzeIyg8wv4z1HoGPp1E= -github.com/gophercloud/gophercloud v1.2.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/gophercloud/gophercloud v1.3.0 h1:RUKyCMiZoQR3VlVR5E3K7PK1AC3/qppsWYo6dtBiqs8= +github.com/gophercloud/gophercloud v1.3.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= @@ -312,19 +311,20 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b h1:EkuSTU8c/63q4LMayj8ilgg/4I5PXDFVcnqKfs9qcwI= -github.com/hashicorp/nomad/api v0.0.0-20230308192510-48e7d70fcd4b/go.mod h1:bKUb1ytds5KwUioHdvdq9jmrDqCThv95si0Ub7iNeBg= +github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 h1:I5xhKLePXpXgM6pZ4xZNTiurLLS3sGuZrZFFzAbM67A= +github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197/go.mod h1:2TCrNvonL09r7EiQ6M2rNt+Cmjbn1QbzchFoTWJFpj4= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go v1.41.0 h1:KJGFRRc68QiVu4PrEP5BmCQVveCP2CM26UGQUKGpIUs= -github.com/hetznercloud/hcloud-go v1.41.0/go.mod h1:NaHg47L6C77mngZhwBG652dTAztYrsZ2/iITJKhQkHA= +github.com/hetznercloud/hcloud-go v1.42.0 h1:Es/CDOForQN3nOOP5Vxh1N/YHjpCg386iYEX5zCgi+A= +github.com/hetznercloud/hcloud-go v1.42.0/go.mod h1:YADL8AbmQYH0Eo+1lkuyoc8LutT0UeMvaKP47nNUb+Y= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.4 h1:BJHhFA8Q1SZC7VOXqKKr2BV2ysQ2/4hlk1e4hZte7GY= -github.com/ionos-cloud/sdk-go/v6 v6.1.4/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= +github.com/ionos-cloud/sdk-go/v6 v6.1.6 h1:0n4irdqNska+1s3YMCRhrAqKbibEgQ7SwwhAlHzYT5A= +github.com/ionos-cloud/sdk-go/v6 v6.1.6/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -342,7 +342,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -360,8 +359,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linode/linodego v1.14.1 h1:uGxQyy0BidoEpLGdvfi4cPgEW+0YUFsEGrLEhcTfjNc= -github.com/linode/linodego v1.14.1/go.mod h1:NJlzvlNtdMRRkXb0oN6UWzUkj6t+IBsyveHgZ5Ppjyk= +github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= +github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -382,10 +381,11 @@ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.51 h1:0+Xg7vObnhrz/4ZCZcZh7zPXlmU0aveS2HDBd0m0qSo= -github.com/miekg/dns v1.1.51/go.mod h1:2Z9d3CP1LQWihRZUf29mQ19yDThaI4DAYzte2CaQW5c= +github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= +github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -415,8 +415,8 @@ github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrB github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/ovh/go-ovh v1.3.0 h1:mvZaddk4E4kLcXhzb+cxBsMPYp2pHqiQpWYkInsuZPQ= -github.com/ovh/go-ovh v1.3.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= +github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= +github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -457,23 +457,21 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.43.0 h1:18iCSfrbAHbXvYFvR38U1Pt4uZmU9SmDcCpCrBKUiGg= -github.com/prometheus/prometheus v0.43.0/go.mod h1:2BA14LgBeqlPuzObSEbh+Y+JwLH2GcqDlJKbF2sA6FM= +github.com/prometheus/prometheus v0.44.0 h1:sgn8Fdx+uE5tHQn0/622swlk2XnIj6udoZCnbVjHIgc= +github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/jeCdyOWWobLHNKQg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shoenig/test v0.6.2 h1:tdq+WGnznwE5xcOMXkqqXuudK75RkSGBazBGcP1lX6w= +github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= @@ -494,8 +492,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= @@ -515,12 +514,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= -go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= +go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= @@ -528,8 +527,8 @@ go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -542,6 +541,7 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -554,8 +554,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -578,7 +578,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -621,7 +620,7 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -630,8 +629,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -644,7 +643,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -701,13 +699,13 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -719,6 +717,7 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -732,7 +731,6 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -772,7 +770,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -797,8 +794,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.111.0 h1:bwKi+z2BsdwYFRKrqwutM+axAlYLz83gt5pDSXCJT+0= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= +google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= +google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -882,7 +879,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/pkg/featuregate/featuregate_test.go b/pkg/featuregate/featuregate_test.go index 1321bfc34..3bb5113df 100644 --- a/pkg/featuregate/featuregate_test.go +++ b/pkg/featuregate/featuregate_test.go @@ -32,7 +32,7 @@ const ( func TestSetFlag(t *testing.T) { featuregate.GlobalRegistry().MustRegister(basicGate, featuregate.StageAlpha) featuregate.GlobalRegistry().MustRegister(advancedGate, featuregate.StageBeta) - featuregate.GlobalRegistry().MustRegister(falseGate, featuregate.StageStable, featuregate.WithRegisterRemovalVersion("v0.0.1")) + featuregate.GlobalRegistry().MustRegister(falseGate, featuregate.StageStable, featuregate.WithRegisterToVersion("v0.0.1")) tests := []struct { name string args []string From 08376d773933cd6338005ac2c0c90cd4ca7d8be1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jun 2023 14:44:50 +0200 Subject: [PATCH 0880/1234] Bump github.com/stretchr/testify in /cmd/operator-opamp-bridge (#1807) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index a7a172742..be01bf465 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-operator v0.78.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 go.opentelemetry.io/otel v1.15.1 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 go.opentelemetry.io/otel/metric v0.38.1 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 04aa1213b..87f6e2154 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -249,8 +249,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= From 2a51ee9de49df0b4811a22f897c0d2dab66f7970 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 13:39:01 +0200 Subject: [PATCH 0881/1234] Bump go.opentelemetry.io/otel in /cmd/operator-opamp-bridge (#1813) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index be01bf465..537ff2abe 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,9 +10,9 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.15.1 + go.opentelemetry.io/otel v1.16.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 - go.opentelemetry.io/otel/metric v0.38.1 + go.opentelemetry.io/otel/metric v1.16.0 go.opentelemetry.io/otel/sdk v1.15.1 go.opentelemetry.io/otel/sdk/metric v0.38.1 go.uber.org/multierr v1.11.0 @@ -68,7 +68,7 @@ require ( go.opentelemetry.io/collector/featuregate v0.75.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 // indirect - go.opentelemetry.io/otel/trace v1.15.1 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 87f6e2154..55fee6a0d 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -272,22 +272,22 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= -go.opentelemetry.io/otel v1.15.1 h1:3Iwq3lfRByPaws0f6bU3naAqOR1n5IeDWd9390kWHa8= -go.opentelemetry.io/otel v1.15.1/go.mod h1:mHHGEHVDLal6YrKMmk9LqC4a3sF5g+fHfrttQIB1NTc= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 h1:XYDQtNzdb2T4uM1pku2m76eSMDJgqhJ+6KzkqgQBALc= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1/go.mod h1:uOTV75+LOzV+ODmL8ahRLWkFA3eQcSC2aAsbxIu4duk= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 h1:MSGZwWn8Ji4b6UWkB7pYPgTiTmWM3S4lro9Y+5c3WmE= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1/go.mod h1:GFYZ2ebv/Bwont+pVaXHTGncGz93MjvTgZrskegEOUI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 h1:I/hA2cEzAaYNIieIkQ1v3D+hjMfDJHzp17kGje5+Wgo= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1/go.mod h1:P1GVd+ukhaHORjU3CDbF6C4CGs5k7P6YkG8WU9MTQ7A= -go.opentelemetry.io/otel/metric v0.38.1 h1:2MM7m6wPw9B8Qv8iHygoAgkbejed59uUR6ezR5T3X2s= -go.opentelemetry.io/otel/metric v0.38.1/go.mod h1:FwqNHD3I/5iX9pfrRGZIlYICrJv0rHEUl2Ln5vdIVnQ= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/sdk v1.15.1 h1:5FKR+skgpzvhPQHIEfcwMYjCBr14LWzs3uSqKiQzETI= go.opentelemetry.io/otel/sdk v1.15.1/go.mod h1:8rVtxQfrbmbHKfqzpQkT5EzZMcbMBwTzNAggbEAM0KA= go.opentelemetry.io/otel/sdk/metric v0.38.1 h1:EkO5wI4NT/fUaoPMGc0fKV28JaWe7q4vfVpEVasGb+8= go.opentelemetry.io/otel/sdk/metric v0.38.1/go.mod h1:Rn4kSXFF9ZQZ5lL1pxQjCbK4seiO+U7s0ncmIFJaj34= -go.opentelemetry.io/otel/trace v1.15.1 h1:uXLo6iHJEzDfrNC0L0mNjItIp06SyaBQxu5t3xMlngY= -go.opentelemetry.io/otel/trace v1.15.1/go.mod h1:IWdQG/5N1x7f6YUlmdLeJvH9yxtuJAfc4VW5Agv9r/8= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= From a0558ad3e0993479ce913f567c0c5d6d47a04ba6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:27:31 +0200 Subject: [PATCH 0882/1234] Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#1810) Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.38.1 to 0.39.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/metric/v0.38.1...sdk/metric/v0.39.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 12 ++++++------ cmd/operator-opamp-bridge/go.sum | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 537ff2abe..d631700c8 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -11,10 +11,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/otel v1.16.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 go.opentelemetry.io/otel/metric v1.16.0 - go.opentelemetry.io/otel/sdk v1.15.1 - go.opentelemetry.io/otel/sdk/metric v0.38.1 + go.opentelemetry.io/otel/sdk v1.16.0 + go.opentelemetry.io/otel/sdk/metric v0.39.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -66,8 +66,8 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.75.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect @@ -81,7 +81,7 @@ require ( gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect - google.golang.org/grpc v1.54.0 // indirect + google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.27.2 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 55fee6a0d..2b7d383cf 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -103,8 +103,8 @@ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEe github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -274,18 +274,18 @@ go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73R go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 h1:XYDQtNzdb2T4uM1pku2m76eSMDJgqhJ+6KzkqgQBALc= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1/go.mod h1:uOTV75+LOzV+ODmL8ahRLWkFA3eQcSC2aAsbxIu4duk= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1 h1:MSGZwWn8Ji4b6UWkB7pYPgTiTmWM3S4lro9Y+5c3WmE= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.38.1/go.mod h1:GFYZ2ebv/Bwont+pVaXHTGncGz93MjvTgZrskegEOUI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1 h1:I/hA2cEzAaYNIieIkQ1v3D+hjMfDJHzp17kGje5+Wgo= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.38.1/go.mod h1:P1GVd+ukhaHORjU3CDbF6C4CGs5k7P6YkG8WU9MTQ7A= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVznctQ9V6KK7Vq6CjmYXJ7DeSs4E= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0/go.mod h1:UqL5mZ3qs6XYhDnZaW1Ps4upD+PX6LipH40AoeuIlwU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 h1:IZXpCEtI7BbX01DRQEWTGDkvjMB6hEhiEZXS+eg2YqY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0/go.mod h1:xY111jIZtWb+pUUgT4UiiSonAaY2cD2Ts5zvuKLki3o= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.15.1 h1:5FKR+skgpzvhPQHIEfcwMYjCBr14LWzs3uSqKiQzETI= -go.opentelemetry.io/otel/sdk v1.15.1/go.mod h1:8rVtxQfrbmbHKfqzpQkT5EzZMcbMBwTzNAggbEAM0KA= -go.opentelemetry.io/otel/sdk/metric v0.38.1 h1:EkO5wI4NT/fUaoPMGc0fKV28JaWe7q4vfVpEVasGb+8= -go.opentelemetry.io/otel/sdk/metric v0.38.1/go.mod h1:Rn4kSXFF9ZQZ5lL1pxQjCbK4seiO+U7s0ncmIFJaj34= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= +go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= +go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -562,8 +562,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 0b4f893d662044deab2e613480c5a6a991731ed4 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 7 Jun 2023 16:48:44 +0200 Subject: [PATCH 0883/1234] Added new information to CRD Status (#1789) * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added chlog Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa * Added new information to CRD Status Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/improve-crd-status.yaml | 16 +++++++++++++++ apis/v1alpha1/opentelemetrycollector_types.go | 14 ++++++++++++- ...ntelemetry.io_opentelemetrycollectors.yaml | 18 ++++++++++++++++- ...ntelemetry.io_opentelemetrycollectors.yaml | 18 ++++++++++++++++- docs/api.md | 16 ++++++++++++++- go.mod | 2 +- go.sum | 2 ++ pkg/collector/reconcile/opentelemetry.go | 20 +++++++++++++++++++ pkg/collector/reconcile/opentelemetry_test.go | 4 ++-- 9 files changed, 103 insertions(+), 7 deletions(-) create mode 100755 .chloggen/improve-crd-status.yaml diff --git a/.chloggen/improve-crd-status.yaml b/.chloggen/improve-crd-status.yaml new file mode 100755 index 000000000..3c4f783d8 --- /dev/null +++ b/.chloggen/improve-crd-status.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Added readyReplicas field to the status section and added Current,Desired and Image to the get operation." + +# One or more tracking issues related to the change +issues: [1355] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 6654343c5..9179402aa 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -82,7 +82,7 @@ type OpenTelemetryCollectorSpec struct { // Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling // +optional Replicas *int32 `json:"replicas,omitempty"` - // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 + // MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 // +optional // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead. MinReplicas *int32 `json:"minReplicas,omitempty"` @@ -248,6 +248,12 @@ type ScaleSubresourceStatus struct { // OpenTelemetryCollector's deployment or statefulSet. // +optional Replicas int32 `json:"replicas,omitempty"` + + // StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / + // Total number of non-terminated pods targeted by this OpenTelemetryCollector's (their labels match the selector). + // Deployment, Daemonset, StatefulSet. + // +optional + StatusReplicas string `json:"statusReplicas,omitempty"` } // OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. @@ -260,6 +266,10 @@ type OpenTelemetryCollectorStatus struct { // +optional Version string `json:"version,omitempty"` + // Image indicates the container image to use for the OpenTelemetry Collector. + // +optional + Image string `json:"image,omitempty"` + // Messages about actions performed by the operator on this resource. // +optional // +listType=atomic @@ -278,7 +288,9 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector // +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.mode",description="Deployment Mode" // +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" +// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.scale.statusReplicas" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".status.image" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Collector" // This annotation provides a hint for OLM which resources are managed by OpenTelemetryCollector kind. // It's not mandatory to list all resources. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 9be7616e7..8bafa50bd 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -29,9 +29,15 @@ spec: jsonPath: .status.version name: Version type: string + - jsonPath: .status.scale.statusReplicas + name: Ready + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.image + name: Image + type: string name: v1alpha1 schema: openAPIV3Schema: @@ -1649,7 +1655,7 @@ spec: type: integer minReplicas: description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if your are using autoscaling. It must be at least 1 Deprecated: + this if you are using autoscaling. It must be at least 1 Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' format: int32 type: integer @@ -4271,6 +4277,10 @@ spec: description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. properties: + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string messages: description: 'Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.' @@ -4297,6 +4307,12 @@ spec: description: The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods. type: string + statusReplicas: + description: StatusReplicas is the number of pods targeted by + this OpenTelemetryCollector's with a Ready Condition / Total + number of non-terminated pods targeted by this OpenTelemetryCollector's + (their labels match the selector). Deployment, Daemonset, StatefulSet. + type: string type: object version: description: Version of the managed OpenTelemetry Collector (operand) diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 24bac842a..7b5938ba2 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -26,9 +26,15 @@ spec: jsonPath: .status.version name: Version type: string + - jsonPath: .status.scale.statusReplicas + name: Ready + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .status.image + name: Image + type: string name: v1alpha1 schema: openAPIV3Schema: @@ -1646,7 +1652,7 @@ spec: type: integer minReplicas: description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if your are using autoscaling. It must be at least 1 Deprecated: + this if you are using autoscaling. It must be at least 1 Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' format: int32 type: integer @@ -4268,6 +4274,10 @@ spec: description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. properties: + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string messages: description: 'Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.' @@ -4294,6 +4304,12 @@ spec: description: The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods. type: string + statusReplicas: + description: StatusReplicas is the number of pods targeted by + this OpenTelemetryCollector's with a Ready Condition / Total + number of non-terminated pods targeted by this OpenTelemetryCollector's + (their labels match the selector). Deployment, Daemonset, StatefulSet. + type: string type: object version: description: Version of the managed OpenTelemetry Collector (operand) diff --git a/docs/api.md b/docs/api.md index 10329196d..f91554e9d 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3084,7 +3084,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -10467,6 +10467,13 @@ OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollecto + + + + + + + + + +
sizeLimit int or string - sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir
+ sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
false
minReplicas integer - MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.
+ MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.

Format: int32
imagestring + Image indicates the container image to use for the OpenTelemetry Collector.
+
false
messages []string @@ -10532,5 +10539,12 @@ Scale is the OpenTelemetryCollector's scale subresource status. The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods.
false
statusReplicasstring + StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / Total number of non-terminated pods targeted by this OpenTelemetryCollector's (their labels match the selector). Deployment, Daemonset, StatefulSet.
+
false
\ No newline at end of file diff --git a/go.mod b/go.mod index 01b8eba2a..dec7e42af 100644 --- a/go.mod +++ b/go.mod @@ -136,7 +136,7 @@ require ( golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.1 // indirect + golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 603b70a52..c71df55f2 100644 --- a/go.sum +++ b/go.sum @@ -772,6 +772,8 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= +golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index ff71d767b..a4bf95579 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -18,6 +18,7 @@ package reconcile import ( "context" "fmt" + "strconv" appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -81,6 +82,10 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change } var replicas int32 + var readyReplicas int32 + var statusReplicas string + var statusImage string + switch mode { // nolint:exhaustive case v1alpha1.ModeDeployment: obj := &appsv1.Deployment{} @@ -88,6 +93,9 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change return fmt.Errorf("failed to get deployment status.replicas: %w", err) } replicas = obj.Status.Replicas + readyReplicas = obj.Status.ReadyReplicas + statusReplicas = strconv.Itoa(int(readyReplicas)) + "/" + strconv.Itoa(int(replicas)) + statusImage = obj.Spec.Template.Spec.Containers[0].Image case v1alpha1.ModeStatefulSet: obj := &appsv1.StatefulSet{} @@ -95,8 +103,20 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change return fmt.Errorf("failed to get statefulSet status.replicas: %w", err) } replicas = obj.Status.Replicas + readyReplicas = obj.Status.ReadyReplicas + statusReplicas = strconv.Itoa(int(readyReplicas)) + "/" + strconv.Itoa(int(replicas)) + statusImage = obj.Spec.Template.Spec.Containers[0].Image + + case v1alpha1.ModeDaemonSet: + obj := &appsv1.DaemonSet{} + if err := cli.Get(ctx, objKey, obj); err != nil { + return fmt.Errorf("failed to get daemonSet status.replicas: %w", err) + } + statusImage = obj.Spec.Template.Spec.Containers[0].Image } changed.Status.Scale.Replicas = replicas + changed.Status.Image = statusImage + changed.Status.Scale.StatusReplicas = statusReplicas return nil } diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go index 59f5d7eba..a0254375f 100644 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ b/pkg/collector/reconcile/opentelemetry_test.go @@ -18,10 +18,10 @@ import ( "context" "testing" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) func TestSelf(t *testing.T) { From 1559349ac09687d21b4b91b9d7db92d9ae217589 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 11:25:30 -0400 Subject: [PATCH 0884/1234] Bump github.com/stretchr/testify in /cmd/otel-allocator (#1805) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 5e8a5112e..354ee254a 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -20,7 +20,7 @@ require ( github.com/prometheus/common v0.44.0 github.com/prometheus/prometheus v0.44.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.3 + github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.27.2 k8s.io/apimachinery v0.27.2 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 8a3ea9b9c..fe11084de 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -644,10 +644,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/thanos-io/thanos v0.31.0 h1:jOCmaiIXwpByWXoVtHnktLm3YDB9xDQQzmZvd1XG5oY= -github.com/thanos-io/thanos v0.31.0/go.mod h1:5ux+jb2oKr59+3XsCC0mX+JuAbPGJEMijjhcmnL/PMo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2 h1:Zg52TbQ9LgQTynZoCB2XeA39m4f8zu9ybLo5oDSt4+A= github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2/go.mod h1:yQifbihSzTuj12goHi9PGZpe26XICXalf1XsxHVhGI4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= From 90110fed790c99c325bdb901520f24c08df5a332 Mon Sep 17 00:00:00 2001 From: Kit Sutliff <38538497+KitSutliff@users.noreply.github.com> Date: Wed, 7 Jun 2023 11:46:18 -0700 Subject: [PATCH 0885/1234] Add OTEL service version to sdk injection (#1736) * add OTEL service version to sdk injection * fix service version injection - use resource attributes instead --------- Co-authored-by: Pavol Loffay Co-authored-by: Jacob Aronoff --- .../1736-add-service-version-injection.yaml | 17 ++ pkg/instrumentation/sdk.go | 20 ++ pkg/instrumentation/sdk_test.go | 174 +++++++++++++++--- 3 files changed, 182 insertions(+), 29 deletions(-) create mode 100644 .chloggen/1736-add-service-version-injection.yaml diff --git a/.chloggen/1736-add-service-version-injection.yaml b/.chloggen/1736-add-service-version-injection.yaml new file mode 100644 index 000000000..8256bb315 --- /dev/null +++ b/.chloggen/1736-add-service-version-injection.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add service version injection + +# One or more tracking issues related to the change +issues: [1670] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: Adds the ability to inject the service version into the environment of the instrumented application. + diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index de037bbcb..221546454 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -215,6 +215,15 @@ func (i *sdkInjector) injectCommonSDKConfig(ctx context.Context, otelinst v1alph resourceMap[string(semconv.K8SPodUIDKey)] = fmt.Sprintf("$(%s)", constants.EnvPodUID) } } + + idx = getIndexOfEnv(container.Env, constants.EnvOTELResourceAttrs) + if idx == -1 || !strings.Contains(container.Env[idx].Value, string(semconv.ServiceVersionKey)) { + vsn := chooseServiceVersion(pod, appIndex) + if vsn != "" { + resourceMap[string(semconv.ServiceVersionKey)] = vsn + } + } + if resourceMap[string(semconv.K8SNodeNameKey)] == "" { container.Env = append(container.Env, corev1.EnvVar{ Name: constants.EnvNodeName, @@ -299,6 +308,17 @@ func chooseServiceName(pod corev1.Pod, resources map[string]string, index int) s return pod.Spec.Containers[index].Name } +// obtains version by splitting image string on ":" and extracting final element from resulting array. +func chooseServiceVersion(pod corev1.Pod, index int) string { + parts := strings.Split(pod.Spec.Containers[index].Image, ":") + tag := parts[len(parts)-1] + //guard statement to handle case where image name has a port number + if strings.Contains(tag, "/") { + return "" + } + return tag +} + // createResourceMap creates resource attribute map. // User defined attributes (in explicitly set env var) have higher precedence. func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) map[string]string { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 2c0982bfb..7d4e73489 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -143,7 +143,8 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "application-name", + Name: "application-name", + Image: "app:latest", }, }, }, @@ -165,7 +166,8 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "application-name", + Name: "application-name", + Image: "app:latest", Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", @@ -197,7 +199,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid,service.version=latest", }, }, }, @@ -232,6 +234,7 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { + Image: "app:latest", Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", @@ -251,7 +254,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "foo=bar,k8s.container.name=other,", + Value: "foo=bar,k8s.container.name=other,service.version=explicitly_set,", }, }, }, @@ -266,6 +269,7 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { + Image: "app:latest", Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", @@ -293,7 +297,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "foo=bar,k8s.container.name=other,fromcr=val,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app", + Value: "foo=bar,k8s.container.name=other,service.version=explicitly_set,fromcr=val,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app", }, }, }, @@ -323,7 +327,8 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "application-name", + Name: "application-name", + Image: "app:latest", }, }, }, @@ -345,7 +350,8 @@ func TestSDKInjection(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "application-name", + Name: "application-name", + Image: "app:latest", Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", @@ -361,7 +367,103 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,service.version=latest", + }, + }, + }, + }, + }, + }, + }, + { + name: "SDK image with port number, no version", + inst: v1alpha1.Instrumentation{}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Image: "fictional.registry.example:10443/imagename", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Image: "fictional.registry.example:10443/imagename", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, + }, + { + name: "SDK image with port number, with version", + inst: v1alpha1.Instrumentation{}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Image: "fictional.registry.example:10443/imagename:latest", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Image: "fictional.registry.example:10443/imagename:latest", + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -408,7 +510,8 @@ func TestInjectJava(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -437,7 +540,8 @@ func TestInjectJava(t *testing.T) { }, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { Name: volumeName, @@ -475,7 +579,7 @@ func TestInjectJava(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -508,7 +612,8 @@ func TestInjectNodeJS(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -537,7 +642,8 @@ func TestInjectNodeJS(t *testing.T) { }, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { Name: volumeName, @@ -575,7 +681,7 @@ func TestInjectNodeJS(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -608,7 +714,8 @@ func TestInjectPython(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -636,7 +743,8 @@ func TestInjectPython(t *testing.T) { }, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { Name: volumeName, @@ -690,7 +798,7 @@ func TestInjectPython(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -722,7 +830,8 @@ func TestInjectDotNet(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -750,7 +859,8 @@ func TestInjectDotNet(t *testing.T) { }, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { Name: volumeName, @@ -812,7 +922,7 @@ func TestInjectDotNet(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -915,7 +1025,8 @@ func TestInjectGo(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -925,7 +1036,8 @@ func TestInjectGo(t *testing.T) { ShareProcessNamespace: &true, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, { Name: sideCarName, @@ -971,7 +1083,7 @@ func TestInjectGo(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -1009,7 +1121,8 @@ func TestInjectGo(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -1024,7 +1137,8 @@ func TestInjectGo(t *testing.T) { ShareProcessNamespace: &true, Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, { Name: sideCarName, @@ -1070,7 +1184,7 @@ func TestInjectGo(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, @@ -1271,7 +1385,8 @@ func TestInjectSdkOnly(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", }, }, }, @@ -1280,7 +1395,8 @@ func TestInjectSdkOnly(t *testing.T) { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app", + Image: "app:latest", Env: []corev1.EnvVar{ { Name: "OTEL_SERVICE_NAME", @@ -1308,7 +1424,7 @@ func TestInjectSdkOnly(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),service.version=latest", }, }, }, From c257a7e855618b62dac43082dbf1af8aeeffe3c8 Mon Sep 17 00:00:00 2001 From: Jakob Joachim Date: Thu, 8 Jun 2023 10:21:58 +0200 Subject: [PATCH 0886/1234] add prometheus metric exporter support for nodejs autoinstrumentation (#1798) * add prometheus metric exporter support * add test * Update .chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Pavol Loffay Co-authored-by: Jacob Aronoff --- ...v_vars_for_nodejs_autoinstrumentation.yaml | 16 ++++++++++++ autoinstrumentation/nodejs/package.json | 1 + .../nodejs/src/autoinstrumentation.ts | 26 ++++++++++++++++--- .../00-install-instrumentation.yaml | 2 ++ .../e2e/instrumentation-nodejs/01-assert.yaml | 2 ++ 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 .chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml diff --git a/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml b/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml new file mode 100644 index 000000000..289a65e11 --- /dev/null +++ b/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: nodejs autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "prometheus metric exporter support for nodejs autoinstrumentation" + +# One or more tracking issues related to the change +issues: [1798] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 93f7b944c..bf6f1fbb5 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -17,6 +17,7 @@ "@opentelemetry/api": "1.4.1", "@opentelemetry/auto-instrumentations-node": "0.37.0", "@opentelemetry/exporter-metrics-otlp-grpc": "0.39.1", + "@opentelemetry/exporter-prometheus": "0.39.1", "@opentelemetry/exporter-trace-otlp-grpc": "0.39.1", "@opentelemetry/resource-detector-alibaba-cloud": "0.27.6", "@opentelemetry/resource-detector-aws": "1.2.4", diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts index 317330766..928e6d557 100644 --- a/autoinstrumentation/nodejs/src/autoinstrumentation.ts +++ b/autoinstrumentation/nodejs/src/autoinstrumentation.ts @@ -1,22 +1,42 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc'; +import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'; import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'; import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'; import { awsEc2Detector, awsEksDetector } from '@opentelemetry/resource-detector-aws'; import { containerDetector } from '@opentelemetry/resource-detector-container'; import { gcpDetector } from '@opentelemetry/resource-detector-gcp'; import { envDetector, hostDetector, osDetector, processDetector } from '@opentelemetry/resources'; +import { diag } from '@opentelemetry/api'; import { NodeSDK } from '@opentelemetry/sdk-node'; +function getMetricReader() { + switch (process.env.OTEL_METRICS_EXPORTER) { + case undefined: + case '': + case 'otlp': + diag.info('using otel metrics exporter'); + return new PeriodicExportingMetricReader({ + exporter: new OTLPMetricExporter(), + }); + case 'prometheus': + diag.info('using prometheus metrics exporter'); + return new PrometheusExporter({}); + case 'none': + diag.info('disabling metrics reader'); + return undefined; + default: + throw Error(`no valid option for OTEL_METRICS_EXPORTER: ${process.env.OTEL_METRICS_EXPORTER}`) + } +} + const sdk = new NodeSDK({ autoDetectResources: true, instrumentations: [getNodeAutoInstrumentations()], traceExporter: new OTLPTraceExporter(), - metricReader: new PeriodicExportingMetricReader({ - exporter: new OTLPMetricExporter(), - }), + metricReader: getMetricReader(), resourceDetectors: [ // Standard resource detectors. diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml index 35154afb2..a87939b6c 100644 --- a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml @@ -16,6 +16,8 @@ spec: value: "0.85" - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED value: "true" + - name: OTEL_METRICS_EXPORTER + value: prometheus exporter: endpoint: http://localhost:4317 propagators: diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index e5f840048..53a5a1558 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -26,6 +26,8 @@ spec: value: "0.85" - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED value: "true" + - name: OTEL_METRICS_EXPORTER + value: prometheus - name: OTEL_SERVICE_NAME value: my-deployment-with-sidecar - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME From d6ed973309b4662040593364ec5b2506092c57da Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 8 Jun 2023 11:01:43 +0200 Subject: [PATCH 0887/1234] Fix version in status for OpenTelemetry Collector after upgrades (#1803) * Fix version in status for OpenTelemetry Collector after upgrades #1802 Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas * Fix unit tests Signed-off-by: Israel Blancas * Add unit test to cover this use case Signed-off-by: Israel Blancas * Add new log message Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...wn-version-is-incorrect-after-upgrade.yaml | 16 +++++++ pkg/collector/upgrade/upgrade.go | 18 ++++++-- pkg/collector/upgrade/upgrade_test.go | 45 ++++++++++++------- 3 files changed, 59 insertions(+), 20 deletions(-) create mode 100755 .chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml diff --git a/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml b/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml new file mode 100755 index 000000000..deb29cd87 --- /dev/null +++ b/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: The OpenTelemetry Collector version is not shown properly in the status field if no upgrade routines are performed. + +# One or more tracking issues related to the change +issues: [1802] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 7d6dae3bf..e5523e8d1 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -108,7 +108,20 @@ func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.Op } if instanceV.GreaterThan(&Latest.Version) { - u.Log.Info("skipping upgrade for OpenTelemetry Collector instance, as it's newer than our latest version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) + // Update with the latest known version, which is what we have from versions.txt + u.Log.Info("no upgrade routines are needed for the OpenTelemetry instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) + + otelColV, err := semver.NewVersion(u.Version.OpenTelemetryCollector) + if err != nil { + return otelcol, err + } + if instanceV.LessThan(otelColV) { + u.Log.Info("upgraded OpenTelemetry Collector version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) + otelcol.Status.Version = u.Version.OpenTelemetryCollector + } else { + u.Log.Info("skipping upgrade for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace) + } + return otelcol, nil } @@ -126,8 +139,7 @@ func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.Op otelcol = *upgraded } } - - // at the end of the process, we are up to date with the latest known version, which is what we have from versions.txt + // Update with the latest known version, which is what we have from versions.txt otelcol.Status.Version = u.Version.OpenTelemetryCollector u.Log.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 9b03382b0..9e0191aa8 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -84,25 +84,36 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { } func TestUpgradeUpToLatestKnownVersion(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn) - existing.Status.Version = "0.8.0" + for _, tt := range []struct { + desc string + v string + expectedV string + }{ + {"upgrade-routine", "0.8.0", "0.10.0"}, // we don't have a 0.10.0 upgrade, but we have a 0.9.0 + {"no-upgrade-routine", "0.61.1", "0.62.0"}, // No upgrade routines between these two versions + } { + t.Run(tt.desc, func(t *testing.T) { + // prepare + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + existing := makeOtelcol(nsn) + existing.Status.Version = tt.v - currentV := version.Get() - currentV.OpenTelemetryCollector = "0.10.0" // we don't have a 0.10.0 upgrade, but we have a 0.9.0 - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: currentV, - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - // test - res, err := up.ManagedInstance(context.Background(), existing) + currentV := version.Get() + currentV.OpenTelemetryCollector = tt.expectedV + up := &upgrade.VersionUpgrade{ + Log: logger, + Version: currentV, + Client: k8sClient, + Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), + } + // test + res, err := up.ManagedInstance(context.Background(), existing) - // verify - assert.NoError(t, err) - assert.Equal(t, "0.10.0", res.Status.Version) + // verify + assert.NoError(t, err) + assert.Equal(t, tt.expectedV, res.Status.Version) + }) + } } func TestVersionsShouldNotBeChanged(t *testing.T) { From 4534a6b7dd2e3a78354a480ea3c09284eef340f7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 8 Jun 2023 11:42:26 +0200 Subject: [PATCH 0888/1234] Prepare release v0.79.0 (#1816) * Prepare release v0.79.0 Signed-off-by: Pavol Loffay * Update Signed-off-by: Pavol Loffay * Update Signed-off-by: Pavol Loffay * Update Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .../1736-add-service-version-injection.yaml | 17 ------------- ...wn-version-is-incorrect-after-upgrade.yaml | 16 ------------- .chloggen/improve-crd-status.yaml | 16 ------------- ...v_vars_for_nodejs_autoinstrumentation.yaml | 16 ------------- CHANGELOG.md | 24 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 4 ++-- ...emetry-operator.clusterserviceversion.yaml | 8 +++---- versions.txt | 8 +++---- 9 files changed, 35 insertions(+), 76 deletions(-) delete mode 100644 .chloggen/1736-add-service-version-injection.yaml delete mode 100755 .chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml delete mode 100755 .chloggen/improve-crd-status.yaml delete mode 100644 .chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml diff --git a/.chloggen/1736-add-service-version-injection.yaml b/.chloggen/1736-add-service-version-injection.yaml deleted file mode 100644 index 8256bb315..000000000 --- a/.chloggen/1736-add-service-version-injection.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add service version injection - -# One or more tracking issues related to the change -issues: [1670] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: Adds the ability to inject the service version into the environment of the instrumented application. - diff --git a/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml b/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml deleted file mode 100755 index deb29cd87..000000000 --- a/.chloggen/collector-shown-version-is-incorrect-after-upgrade.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: The OpenTelemetry Collector version is not shown properly in the status field if no upgrade routines are performed. - -# One or more tracking issues related to the change -issues: [1802] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/improve-crd-status.yaml b/.chloggen/improve-crd-status.yaml deleted file mode 100755 index 3c4f783d8..000000000 --- a/.chloggen/improve-crd-status.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Added readyReplicas field to the status section and added Current,Desired and Image to the get operation." - -# One or more tracking issues related to the change -issues: [1355] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml b/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml deleted file mode 100644 index 289a65e11..000000000 --- a/.chloggen/read_env_vars_for_nodejs_autoinstrumentation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: nodejs autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "prometheus metric exporter support for nodejs autoinstrumentation" - -# One or more tracking issues related to the change -issues: [1798] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index c0cefdb23..86ca53a47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,30 @@ Changes by Version +## 0.79.0 + +### 💡 Enhancements 💡 + +- `nodejs autoinstrumentation`: Prometheus metric exporter support for nodejs autoinstrumentation (#1798) +- `operator`: Add service version injection (#1670) + Adds the ability to inject the service version into the environment of the instrumented application. +- `operator`: Added readyReplicas field to the status section and added Current,Desired and Image to the get operation. (#1355) + +### 🧰 Bug fixes 🧰 + +- `operator`: The OpenTelemetry Collector version is not shown properly in the status field if no upgrade routines are performed. (#1802) + +### Components + +* [OpenTelemetry Collector - v0.79.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.79.0) +* [OpenTelemetry Contrib - v0.79.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.79.0) +* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) +* [Node.JS - 0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.39.1) +* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) +* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) +* [ApacheHTTPD - 1.0.2](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.2) + ## 0.78.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 2b218f02a..1e87b2ba0 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.79.0 | v1.19 to v1.27 | v1 | | v0.78.0 | v1.19 to v1.27 | v1 | | v0.77.0 | v1.19 to v1.26 | v1 | | v0.76.1 | v1.19 to v1.26 | v1 | @@ -593,7 +594,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.58.0 | v1.19 to v1.24 | v1 | | v0.57.2 | v1.19 to v1.24 | v1 | | v0.56.0 | v1.19 to v1.24 | v1 | -| v0.55.0 | v1.19 to v1.24 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 1af671c11..48851c382 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,7 +5,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. 3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -4. Change the compatibility matrix in the readme file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. +4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. 5. Add the changes to the changelog. Manually add versions of all operator components. 6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` 7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.79.0 | @pavolloffay | | v0.80.0 | @VineethReddy02 | | v0.81.0 | @TylerHelmuth | | v0.82.0 | @frzifus | | v0.83.0 | @yuriolisa | | v0.84.0 | @jaronoff97 | +| v0.85.0 | @pavolloffay | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8c5746371..22d21eaef 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-06-01T18:31:31Z" + createdAt: "2023-06-08T08:15:18Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.27.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.78.0 + name: opentelemetry-operator.v0.79.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -308,7 +308,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.78.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.79.0 livenessProbe: httpGet: path: /healthz @@ -415,7 +415,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.78.0 + version: 0.79.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 003f8cbfe..9296b7b84 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.78.0 +opentelemetry-collector=0.79.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.78.0 +operator=0.79.0 # Represents the current release of the Target Allocator. -targetallocator=0.78.0 +targetallocator=0.79.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.78.0 +operator-opamp-bridge=0.79.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From 846046ccccf3d2bde63be9cb7f75537af5332638 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 9 Jun 2023 22:03:08 +0200 Subject: [PATCH 0889/1234] Fix Operator crash while upgrading OTEL Collector instance using the old approach for the HPA (#1800) * Fix crash while upgrading one OTEL Collector instance using the old approach for setting up the HPA Signed-off-by: Israel Blancas * Add changelog Signed-off-by: Israel Blancas * Fix lint Signed-off-by: Israel Blancas * Add testing Signed-off-by: Israel Blancas * Apply changes requested in CR Signed-off-by: Israel Blancas * Change the code to follow a similar approach to the defaulter webhook --------- Signed-off-by: Israel Blancas --- ...rash-upgrading-collector-with-old-hpa.yaml | 16 +++ pkg/collector/horizontalpodautoscaler.go | 12 ++ pkg/collector/horizontalpodautoscaler_test.go | 122 ++++++++++-------- 3 files changed, 98 insertions(+), 52 deletions(-) create mode 100755 .chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml diff --git a/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml b/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml new file mode 100755 index 000000000..d7f9a53e8 --- /dev/null +++ b/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix the upgrade mechanism to not crash when one OTEL Collector instance uses the old approach to set the autoscaler. + +# One or more tracking issues related to the change +issues: [1799] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index fa62ad8ef..3e721821b 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -49,6 +49,18 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al return nil } + if otelcol.Spec.Autoscaler.MaxReplicas == nil { + otelcol.Spec.Autoscaler.MaxReplicas = otelcol.Spec.MaxReplicas + } + + if otelcol.Spec.Autoscaler.MinReplicas == nil { + if otelcol.Spec.MinReplicas != nil { + otelcol.Spec.Autoscaler.MinReplicas = otelcol.Spec.MinReplicas + } else { + otelcol.Spec.Autoscaler.MinReplicas = otelcol.Spec.Replicas + } + } + if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { metrics := []autoscalingv2beta2.MetricSpec{} diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/pkg/collector/horizontalpodautoscaler_test.go index 988a51f5a..e98af9d98 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/pkg/collector/horizontalpodautoscaler_test.go @@ -44,67 +44,85 @@ func TestHPA(t *testing.T) { var cpuUtilization int32 = 66 var memoryUtilization int32 = 77 - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", + otelcols := []v1alpha1.OpenTelemetryCollector{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Autoscaler: &v1alpha1.AutoscalerSpec{ + MinReplicas: &minReplicas, + MaxReplicas: &maxReplicas, + TargetCPUUtilization: &cpuUtilization, + TargetMemoryUtilization: &memoryUtilization, + }, + }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Autoscaler: &v1alpha1.AutoscalerSpec{ - MinReplicas: &minReplicas, - MaxReplicas: &maxReplicas, - TargetCPUUtilization: &cpuUtilization, - TargetMemoryUtilization: &memoryUtilization, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + MinReplicas: &minReplicas, + MaxReplicas: &maxReplicas, + Autoscaler: &v1alpha1.AutoscalerSpec{ + TargetCPUUtilization: &cpuUtilization, + TargetMemoryUtilization: &memoryUtilization, + }, }, }, } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - mockAutoDetector := &mockAutoDetect{ - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - return test.autoscalingVersion, nil - }, - } - configuration := config.New(config.WithAutoDetect(mockAutoDetector)) - err := configuration.AutoDetect() - assert.NoError(t, err) - raw := HorizontalPodAutoscaler(configuration, logger, otelcol) - - if configuration.AutoscalingVersion() == autodetect.AutoscalingVersionV2Beta2 { - hpa := raw.(*autoscalingv2beta2.HorizontalPodAutoscaler) - - // verify - assert.Equal(t, "my-instance-collector", hpa.Name) - assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) - assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) - assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - for _, metric := range hpa.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) - } + for _, otelcol := range otelcols { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + mockAutoDetector := &mockAutoDetect{ + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + return test.autoscalingVersion, nil + }, } - } else { - hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) - - // verify - assert.Equal(t, "my-instance-collector", hpa.Name) - assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) - assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) - assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - assert.Equal(t, 2, len(hpa.Spec.Metrics)) - - for _, metric := range hpa.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) + configuration := config.New(config.WithAutoDetect(mockAutoDetector)) + err := configuration.AutoDetect() + assert.NoError(t, err) + raw := HorizontalPodAutoscaler(configuration, logger, otelcol) + + if configuration.AutoscalingVersion() == autodetect.AutoscalingVersionV2Beta2 { + hpa := raw.(*autoscalingv2beta2.HorizontalPodAutoscaler) + + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + for _, metric := range hpa.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) + } + } + } else { + hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) + + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + assert.Equal(t, 2, len(hpa.Spec.Metrics)) + + for _, metric := range hpa.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) + } } } - } - }) + }) + } } + } func TestConvertToV2Beta2PodMetrics(t *testing.T) { From c284db897ff06566c0623c057b1dbd5b59f05f29 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Wed, 14 Jun 2023 16:27:37 +0200 Subject: [PATCH 0890/1234] Apache instrumentation - more unit tests (#1826) * Unit tests * chloggen * chloggen --- .chloggen/1826-apache-instr-unit-tests.yaml | 16 +++++++ pkg/instrumentation/apachehttpd_test.go | 52 +++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100755 .chloggen/1826-apache-instr-unit-tests.yaml diff --git a/.chloggen/1826-apache-instr-unit-tests.yaml b/.chloggen/1826-apache-instr-unit-tests.yaml new file mode 100755 index 000000000..c17bc594c --- /dev/null +++ b/.chloggen/1826-apache-instr-unit-tests.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adding more tests to validate existence of init containers. + +# One or more tracking issues related to the change +issues: [1826] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index 9ae5a9f9b..b9d3782c3 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -130,3 +130,55 @@ func TestInjectApacheHttpdagent(t *testing.T) { }) } } + +func TestApacheInitContainerMissing(t *testing.T) { + tests := []struct { + name string + pod corev1.Pod + expected bool + }{ + { + name: "InitContainer_Already_Inject", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + { + Name: apacheAgentInitContainerName, + }, + }, + }, + }, + expected: false, + }, + { + name: "InitContainer_Absent_1", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + }, + }, + }, + expected: true, + }, + { + name: "InitContainer_Absent_2", + pod: corev1.Pod{ + Spec: corev1.PodSpec{}, + }, + expected: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + result := isApacheInitContainerMissing(test.pod, apacheAgentInitContainerName) + assert.Equal(t, test.expected, result) + }) + } +} From a835b7a512fd9892f0b38755296294f3a13e97d3 Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:44:47 +0200 Subject: [PATCH 0891/1234] [target allocator] Re-add default global scrape interval in Promethues CR watcher configuration. (#1822) * Re-add default global scrape interval Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera Co-authored-by: Jacob Aronoff --- .chloggen/1811-fix-empty-scrape-interval.yaml | 16 ++++++++++++++++ cmd/otel-allocator/watcher/promOperator.go | 11 ++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 .chloggen/1811-fix-empty-scrape-interval.yaml diff --git a/.chloggen/1811-fix-empty-scrape-interval.yaml b/.chloggen/1811-fix-empty-scrape-interval.yaml new file mode 100755 index 000000000..288684c4e --- /dev/null +++ b/.chloggen/1811-fix-empty-scrape-interval.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix the empty global scrape interval in Prometheus CR watcher, which causes configuration unmarshalling to fail. + +# One or more tracking issues related to the change +issues: [1811] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 5989977d8..128a11b38 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -57,7 +57,16 @@ func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfi monitoringv1.PodMonitorName: podMonitorInformers, } - generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), &monitoringv1.Prometheus{}, true) // TODO replace Nop? + // TODO: We should make these durations configurable + prom := &monitoringv1.Prometheus{ + Spec: monitoringv1.PrometheusSpec{ + CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ + ScrapeInterval: monitoringv1.Duration("30s"), + }, + }, + } + + generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), prom, true) // TODO replace Nop? if err != nil { return nil, err } From 232f6b1f24b3a7cbe6513c30878433fb7016a06b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 15 Jun 2023 13:37:25 -0400 Subject: [PATCH 0892/1234] Bump versions to latest for prometheus and kubernetes clients (#1845) Co-authored-by: Pavol Loffay --- cmd/operator-opamp-bridge/go.mod | 10 ++-- cmd/operator-opamp-bridge/go.sum | 20 ++++---- cmd/otel-allocator/go.mod | 40 ++++++++-------- cmd/otel-allocator/go.sum | 80 +++++++++++++++----------------- go.mod | 12 ++--- go.sum | 26 +++++------ 6 files changed, 89 insertions(+), 99 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index d631700c8..695568962 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,8 +18,8 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.27.2 - k8s.io/client-go v0.27.2 + k8s.io/apimachinery v0.27.3 + k8s.io/client-go v0.27.3 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.0 ) @@ -84,9 +84,9 @@ require ( google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.27.2 // indirect - k8s.io/apiextensions-apiserver v0.27.2 // indirect - k8s.io/component-base v0.27.2 // indirect + k8s.io/api v0.27.3 // indirect + k8s.io/apiextensions-apiserver v0.27.3 // indirect + k8s.io/component-base v0.27.3 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 2b7d383cf..a95d2897d 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -604,16 +604,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= -k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= -k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= -k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= -k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= -k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= -k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= +k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= +k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= +k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= +k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= +k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 354ee254a..dac6dcf32 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -13,18 +13,18 @@ require ( github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.65.2 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2 + github.com/prometheus-operator/prometheus-operator v0.66.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0 github.com/prometheus/client_golang v1.15.1 github.com/prometheus/common v0.44.0 github.com/prometheus/prometheus v0.44.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.2 - k8s.io/apimachinery v0.27.2 - k8s.io/client-go v0.27.2 + k8s.io/api v0.27.3 + k8s.io/apimachinery v0.27.3 + k8s.io/client-go v0.27.3 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.0 ) @@ -79,7 +79,7 @@ require ( github.com/go-openapi/runtime v0.25.0 // indirect github.com/go-openapi/spec v0.20.8 // indirect github.com/go-openapi/strfmt v0.21.7 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect @@ -116,7 +116,7 @@ require ( github.com/hashicorp/serf v0.10.1 // indirect github.com/hetznercloud/hcloud-go v1.42.0 // indirect github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.6 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -151,8 +151,8 @@ require ( github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect - github.com/spf13/cobra v1.6.1 // indirect - github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2 // indirect + github.com/spf13/cobra v1.7.0 // indirect + github.com/tidwall/pretty v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect @@ -164,18 +164,16 @@ require ( go.uber.org/goleak v1.2.1 // indirect go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect - go4.org/intern v0.0.0-20220617035311-6925f38cc365 // indirect - go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 // indirect + golang.org/x/crypto v0.10.0 // indirect + golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect + golang.org/x/net v0.11.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.9.0 // indirect + golang.org/x/term v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.1 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect @@ -187,10 +185,10 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.2 // indirect - k8s.io/component-base v0.27.2 // indirect + k8s.io/apiextensions-apiserver v0.27.3 // indirect + k8s.io/component-base v0.27.3 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index fe11084de..faaa15fa3 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -144,7 +144,6 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd h1:svR6KxSP1xiPw10RN4Pd7g6BAVkEcNN628PAqZH31mM= github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= @@ -233,8 +232,9 @@ github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KA github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= @@ -421,8 +421,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ionos-cloud/sdk-go/v6 v6.1.6 h1:0n4irdqNska+1s3YMCRhrAqKbibEgQ7SwwhAlHzYT5A= github.com/ionos-cloud/sdk-go/v6 v6.1.6/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= @@ -563,12 +563,12 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= -github.com/prometheus-operator/prometheus-operator v0.65.2 h1:MyAKMTYwdgiYKNUYwP209Jjq5mhbolq0fiksZB6U++k= -github.com/prometheus-operator/prometheus-operator v0.65.2/go.mod h1:4UQBzDsT16mP1Cx5K5REl//stnMpKlQxzAarS68P3Ic= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2 h1:DZzMjhqxx3+kAPpwWdng3ktO6NErh1wGuW5tXJamak8= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2/go.mod h1:xcfWyzl4BpEe5jnVkw7D1yCHU7GHjfjCERJsEfGbpSU= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2 h1:yEgVwicrOC7JzJ54NJ1c6Mn5/O9MUps0MuYNpsq262o= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2/go.mod h1:0vdMuIf2i4E/2IkOQ+2chULmXQCkAp+0L7oz73V781M= +github.com/prometheus-operator/prometheus-operator v0.66.0 h1:Jj4mbGAkfBbTih6ait03f2vUjEHB7Kb4gnlAmWu7AJ0= +github.com/prometheus-operator/prometheus-operator v0.66.0/go.mod h1:U7S3+u6YTxwCTMNIQxZWttEq70qBA4Qps7/c5mUZOpQ= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 h1:PPW01FLVjJHMNcbAL1DDD9EZceSQKMOU/VpK0irrxrI= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0 h1:gDJAO9dJbRZ3RAQ7MY+tjz1D3o1x7T4hd8Jbi0Xo854= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0/go.mod h1:gNFnGtaWQ8SziJCfahdiAUlArtoL1+cm1hAD7l6L14w= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -622,8 +622,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -647,10 +647,9 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2 h1:Zg52TbQ9LgQTynZoCB2XeA39m4f8zu9ybLo5oDSt4+A= -github.com/thanos-io/thanos v0.31.1-0.20230518071718-528944910da2/go.mod h1:yQifbihSzTuj12goHi9PGZpe26XICXalf1XsxHVhGI4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -703,11 +702,6 @@ go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go4.org/intern v0.0.0-20220617035311-6925f38cc365 h1:t9hFvR102YlOqU0fQn1wgwhNvSbHGBbbJxX9JKfU3l0= -go4.org/intern v0.0.0-20220617035311-6925f38cc365/go.mod h1:WXRv3p7T6gzt0CcJm43AAKdKVZmcQbwwC7EwquU5BZU= -go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296 h1:QJ/xcIANMLApehfgPCHnfK1hZiaMmbaTVmPv7DAoTbo= -go4.org/unsafe/assume-no-moving-gc v0.0.0-20230221090011-e4bae7ad2296/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -725,8 +719,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= +golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -737,8 +731,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 h1:5llv2sWeaMSnA3w2kS57ouQQ4pudlXrR0dCgw51QK9o= -golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -805,8 +799,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= +golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -892,14 +886,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -910,8 +904,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1103,22 +1097,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= -k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= -k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= -k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= -k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= -k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= -k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= +k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= +k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= +k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= +k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= +k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= +k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/go.mod b/go.mod index dec7e42af..26ebade09 100644 --- a/go.mod +++ b/go.mod @@ -15,12 +15,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.2 - k8s.io/apiextensions-apiserver v0.27.2 - k8s.io/apimachinery v0.27.2 - k8s.io/client-go v0.27.2 - k8s.io/component-base v0.27.2 - k8s.io/kubectl v0.27.2 + k8s.io/api v0.27.3 + k8s.io/apiextensions-apiserver v0.27.3 + k8s.io/apimachinery v0.27.3 + k8s.io/client-go v0.27.3 + k8s.io/component-base v0.27.3 + k8s.io/kubectl v0.27.3 sigs.k8s.io/controller-runtime v0.15.0 ) diff --git a/go.sum b/go.sum index c71df55f2..7a28b8ad2 100644 --- a/go.sum +++ b/go.sum @@ -770,8 +770,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -905,22 +903,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= -k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= -k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= -k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.2 h1:vDLSeuYvCHKeoQRhCXjxXO45nHVv2Ip4Fe0MfioMrhE= -k8s.io/client-go v0.27.2/go.mod h1:tY0gVmUsHrAmjzHX9zs7eCjxcBsf8IiNe7KQ52biTcQ= -k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= -k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= +k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= +k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= +k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= +k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= +k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= +k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/kubectl v0.27.2 h1:sSBM2j94MHBFRWfHIWtEXWCicViQzZsb177rNsKBhZg= -k8s.io/kubectl v0.27.2/go.mod h1:GCOODtxPcrjh+EC611MqREkU8RjYBh10ldQCQ6zpFKw= +k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw= +k8s.io/kubectl v0.27.3/go.mod h1:g9OQNCC2zxT+LT3FS09ZYqnDhlvsKAfFq76oyarBcq4= k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From b6f310f0f343b7fb3b0b7e5b2fa1eef7561b34ba Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Thu, 15 Jun 2023 23:36:42 +0200 Subject: [PATCH 0893/1234] Apache httpd - use latest library 1.0.3 for image (#1827) * instr library version bump * synced apache version with library version * chloggen * changed library url to latest format * removed arm64 arch image for apache * push image * image push * let build image only * remove commented-out code --------- Co-authored-by: Jacob Aronoff --- .chloggen/1827-apache-httpd-image-v-1-0-3.yaml | 16 ++++++++++++++++ ...publish-autoinstrumentation-apache-httpd.yaml | 2 +- autoinstrumentation/apache-httpd/Dockerfile | 3 +-- autoinstrumentation/apache-httpd/version.txt | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 .chloggen/1827-apache-httpd-image-v-1-0-3.yaml diff --git a/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml b/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml new file mode 100755 index 000000000..403a40181 --- /dev/null +++ b/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: For Apache HTTPD instrumentation, use latest instrumentation library v1.0.3. + +# One or more tracking issues related to the change +issues: [1827] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 37b0656cc..5da53ea34 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -60,7 +60,7 @@ jobs: uses: docker/build-push-action@v4 with: context: autoinstrumentation/apache-httpd - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} diff --git a/autoinstrumentation/apache-httpd/Dockerfile b/autoinstrumentation/apache-httpd/Dockerfile index 6b99e022c..748326b57 100644 --- a/autoinstrumentation/apache-httpd/Dockerfile +++ b/autoinstrumentation/apache-httpd/Dockerfile @@ -9,8 +9,7 @@ ARG version RUN mkdir /opt/opentelemetry WORKDIR /opt/opentelemetry -RUN wget https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz.zip -RUN unzip opentelemetry-webserver-sdk-x64-linux.tgz.zip +RUN wget https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz RUN mkdir agent RUN tar -xvf opentelemetry-webserver-sdk-x64-linux.tgz -C agent diff --git a/autoinstrumentation/apache-httpd/version.txt b/autoinstrumentation/apache-httpd/version.txt index e6d5cb833..e4c0d46e5 100644 --- a/autoinstrumentation/apache-httpd/version.txt +++ b/autoinstrumentation/apache-httpd/version.txt @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.0.3 \ No newline at end of file From 075898831e47bc2232958333b0909599073ca179 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Fri, 16 Jun 2023 14:09:17 +0530 Subject: [PATCH 0894/1234] Add ParentBasedJaegerRemote sampler & validate argument (#1801) * Add ParentBasedJaegerRemote sampler & validate argument * Fix lint * Add chloggen entry * Update error message using sampler type * Update apis/v1alpha1/instrumentation_webhook_test.go * Update func name * Update error message * Update apis/v1alpha1/instrumentation_webhook.go Co-authored-by: Jacob Aronoff * Fix type in func name --------- Co-authored-by: Jacob Aronoff --- .chloggen/parentbased-jaeger-remote.yaml | 16 +++++ apis/v1alpha1/instrumentation_webhook.go | 45 +++++++++++++- apis/v1alpha1/instrumentation_webhook_test.go | 61 +++++++++++++++++++ apis/v1alpha1/samplers.go | 2 + 4 files changed, 123 insertions(+), 1 deletion(-) create mode 100755 .chloggen/parentbased-jaeger-remote.yaml diff --git a/.chloggen/parentbased-jaeger-remote.yaml b/.chloggen/parentbased-jaeger-remote.yaml new file mode 100755 index 000000000..68c094cf7 --- /dev/null +++ b/.chloggen/parentbased-jaeger-remote.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: samplers + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add ParentBasedJaegerRemote sampler & validate argument + +# One or more tracking issues related to the change +issues: [1801] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 303e33b1c..9b256efaa 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -195,6 +195,37 @@ func (r *Instrumentation) ValidateDelete() (admission.Warnings, error) { return nil, nil } +func validateJaegerRemoteSamplerArgument(argument string) error { + parts := strings.Split(argument, ",") + + for _, part := range parts { + kv := strings.Split(part, "=") + if len(kv) != 2 { + return fmt.Errorf("invalid argument: %s, the argument should be in the form of key=value", part) + } + + switch kv[0] { + case "endpoint": + if kv[1] == "" { + return fmt.Errorf("endpoint cannot be empty") + } + case "pollingIntervalMs": + if _, err := strconv.Atoi(kv[1]); err != nil { + return fmt.Errorf("invalid pollingIntervalMs: %s", kv[1]) + } + case "initialSamplingRate": + rate, err := strconv.ParseFloat(kv[1], 64) + if err != nil { + return fmt.Errorf("invalid initialSamplingRate: %s", kv[1]) + } + if rate < 0 || rate > 1 { + return fmt.Errorf("initialSamplingRate should be in rage [0..1]: %s", kv[1]) + } + } + } + return nil +} + func (r *Instrumentation) validate() error { switch r.Spec.Sampler.Type { case TraceIDRatio, ParentBasedTraceIDRatio: @@ -207,7 +238,19 @@ func (r *Instrumentation) validate() error { return fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", r.Spec.Sampler.Argument) } } - case AlwaysOn, AlwaysOff, JaegerRemote, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: + case JaegerRemote, ParentBasedJaegerRemote: + // value is a comma separated list of endpoint, pollingIntervalMs, initialSamplingRate + // Example: `endpoint=http://localhost:14250,pollingIntervalMs=5000,initialSamplingRate=0.25` + if r.Spec.Sampler.Argument != "" { + err := validateJaegerRemoteSamplerArgument(r.Spec.Sampler.Argument) + + if err != nil { + return fmt.Errorf("spec.sampler.argument is not a valid argument for sampler %s: %w", r.Spec.Sampler.Type, err) + } + } + case AlwaysOn, AlwaysOff, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: + default: + return fmt.Errorf("spec.sampler.type is not valid: %s", r.Spec.Sampler.Type) } // validate env vars diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 3f35d80df..eadbee4ef 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -93,6 +93,7 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { }, }, } + for _, test := range tests { t.Run(test.name, func(t *testing.T) { if test.err == "" { @@ -113,3 +114,63 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { }) } } + +func TestInstrumentationJaegerRemote(t *testing.T) { + tests := []struct { + name string + err string + arg string + }{ + { + name: "pollingIntervalMs is not a number", + err: "invalid pollingIntervalMs: abc", + arg: "pollingIntervalMs=abc", + }, + { + name: "initialSamplingRate is out of range", + err: "initialSamplingRate should be in rage [0..1]", + arg: "initialSamplingRate=1.99", + }, + { + name: "endpoint is missing", + err: "endpoint cannot be empty", + arg: "endpoint=", + }, + { + name: "correct jaeger remote sampler configuration", + arg: "endpoint=http://jaeger-collector:14250/,initialSamplingRate=0.99,pollingIntervalMs=1000", + }, + } + + samplers := []SamplerType{JaegerRemote, ParentBasedJaegerRemote} + + for _, sampler := range samplers { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + inst := Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{ + Type: sampler, + Argument: test.arg, + }, + }, + } + if test.err == "" { + warnings, err := inst.ValidateCreate() + assert.Nil(t, warnings) + assert.Nil(t, err) + warnings, err = inst.ValidateUpdate(nil) + assert.Nil(t, warnings) + assert.Nil(t, err) + } else { + warnings, err := inst.ValidateCreate() + assert.Nil(t, warnings) + assert.Contains(t, err.Error(), test.err) + warnings, err = inst.ValidateUpdate(nil) + assert.Nil(t, warnings) + assert.Contains(t, err.Error(), test.err) + } + }) + } + } +} diff --git a/apis/v1alpha1/samplers.go b/apis/v1alpha1/samplers.go index beb01b7ce..ff0d23e10 100644 --- a/apis/v1alpha1/samplers.go +++ b/apis/v1alpha1/samplers.go @@ -35,6 +35,8 @@ const ( ParentBasedTraceIDRatio SamplerType = "parentbased_traceidratio" // JaegerRemote represents JaegerRemoteSampler. JaegerRemote SamplerType = "jaeger_remote" + // ParentBasedJaegerRemote represents ParentBased(root=JaegerRemoteSampler). + ParentBasedJaegerRemote SamplerType = "parentbased_jaeger_remote" // XRay represents AWS X-Ray Centralized Sampling. XRaySampler SamplerType = "xray" ) From 3462c9c2f01779bc8f492e3a0bfa1799c663fbde Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 16 Jun 2023 07:02:24 -0700 Subject: [PATCH 0895/1234] Move Java agent auto-update to the operator repo (#1829) --- .github/workflows/auto-update-java-agent.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/auto-update-java-agent.yaml diff --git a/.github/workflows/auto-update-java-agent.yaml b/.github/workflows/auto-update-java-agent.yaml new file mode 100644 index 000000000..6677de1a0 --- /dev/null +++ b/.github/workflows/auto-update-java-agent.yaml @@ -0,0 +1,81 @@ +name: Auto-update Java agent + +on: + schedule: + # Daily at 01:30 (UTC) + - cron: '30 1 * * *' + workflow_dispatch: + +jobs: + check-versions: + runs-on: ubuntu-latest + outputs: + current-version: ${{ steps.check-versions.outputs.current-version }} + latest-version: ${{ steps.check-versions.outputs.latest-version }} + already-opened: ${{ steps.check-versions.outputs.already-opened }} + steps: + - uses: actions/checkout@v3 + + - id: check-versions + name: Check versions + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + current_version=$(grep -Po "[0-9]+.[0-9]+.[0-9]+" autoinstrumentation/java/version.txt) + latest_version=$(gh release view \ + --repo open-telemetry/opentelemetry-java-instrumentation \ + --json tagName \ + --jq .tagName \ + | sed 's/^v//') + + matches=$(gh pr list \ + --author opentelemetrybot \ + --state open \ + --search "in:title \"Update the OpenTelemetry Java agent version to $latest_version\"") + if [ ! -z "$matches" ] + then + already_opened=true + fi + + echo "current-version=$current_version" >> $GITHUB_OUTPUT + echo "latest-version=$latest_version" >> $GITHUB_OUTPUT + echo "already-opened=$already_opened" >> $GITHUB_OUTPUT + + update-java-agent: + runs-on: ubuntu-latest + if: | + needs.check-versions.outputs.current-version != needs.check-versions.outputs.latest-version && + needs.check-versions.outputs.already-opened != 'true' + needs: + - check-versions + steps: + - uses: actions/checkout@v3 + + - name: Update version + env: + VERSION: ${{ needs.check-versions.outputs.latest-version }} + run: | + echo $VERSION > autoinstrumentation/java/version.txt + + - name: Use CLA approved github bot + run: | + git config user.name opentelemetrybot + git config user.email 107717825+opentelemetrybot@users.noreply.github.com + + - name: Create pull request against main + if: success() || failure() + env: + VERSION: ${{ needs.check-versions.outputs.latest-version }} + # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows + GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} + run: | + message="Update the OpenTelemetry Java agent version to $VERSION" + body="Update the OpenTelemetry Java agent version to \`$VERSION\`." + branch="opentelemetrybot/update-opentelemetry-java-agent-to-${VERSION}" + + git checkout -b $branch + git commit -a -m "$message" + git push --set-upstream origin $branch + gh pr create --title "$message" \ + --body "$body" \ + --base main From 38f47f0a144eda7bbb4456f23100cb3cd066152f Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 20 Jun 2023 19:17:56 +0200 Subject: [PATCH 0896/1234] Upgrade Operator-SDK v1.29.0 (#1855) Signed-off-by: Yuri Sa --- .chloggen/update-operator-sdk128.yaml | 16 ++++++++++++++++ Makefile | 4 ++-- bundle.Dockerfile | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 6 +++--- bundle/metadata/annotations.yaml | 2 +- config/default/manager_auth_proxy_patch.yaml | 2 +- 6 files changed, 24 insertions(+), 8 deletions(-) create mode 100755 .chloggen/update-operator-sdk128.yaml diff --git a/.chloggen/update-operator-sdk128.yaml b/.chloggen/update-operator-sdk128.yaml new file mode 100755 index 000000000..fdbafab10 --- /dev/null +++ b/.chloggen/update-operator-sdk128.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Operator-sdk upgrade to v1.29.0 + +# One or more tracking issues related to the change +issues: [1755] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Makefile b/Makefile index e08da1a4c..b448cf282 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ KUBE_VERSION ?= 1.24 KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml KIND_CLUSTER_NAME ?= "otel-operator" -OPERATOR_SDK_VERSION ?= 1.27.0 +OPERATOR_SDK_VERSION ?= 1.29.0 CERTMANAGER_VERSION ?= 1.10.0 @@ -301,7 +301,7 @@ kustomize: ## Download kustomize locally if necessary. .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) - test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 63e886394..af479f2fa 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.27.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 22d21eaef..1f1790eef 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,9 +31,9 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-06-08T08:15:18Z" + createdAt: "2023-06-20T11:50:16Z" description: Provides the OpenTelemetry components, including the Collector - operators.operatorframework.io/builder: operator-sdk-v1.27.0 + operators.operatorframework.io/builder: operator-sdk-v1.29.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community @@ -339,7 +339,7 @@ spec: - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 name: kube-rbac-proxy ports: - containerPort: 8443 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 611c31608..b0f3b4604 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -5,7 +5,7 @@ annotations: operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: opentelemetry-operator operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.27.0 + operators.operatorframework.io.metrics.builder: operator-sdk-v1.29.0 operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 126a4ad43..80999a45a 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -10,7 +10,7 @@ spec: spec: containers: - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" From 8aa43da813f0e80e95d2e9dea686939711043fb5 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 20 Jun 2023 12:40:17 -0600 Subject: [PATCH 0897/1234] update readme (#1857) Co-authored-by: Jacob Aronoff --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 1e87b2ba0..0f8467a1f 100644 --- a/README.md +++ b/README.md @@ -264,6 +264,17 @@ instrumentation.opentelemetry.io/inject-go: "true" instrumentation.opentelemetry.io/otel-go-auto-target-exe: "/path/to/container/executable" ``` +Go auto-instrumentation also requires elevated permissions. The below permissions are set automatically and are required. + +```yaml +securityContext: + capabilities: + add: + - SYS_PTRACE + privileged: true + runAsUser: 0 +``` + Apache HTTPD: ```bash instrumentation.opentelemetry.io/inject-apache-httpd: "true" From fa611d052f43f902e6baa78e457ed1d655bca0e1 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 22 Jun 2023 07:12:46 -0600 Subject: [PATCH 0898/1234] [autoinstrumentation/nodejs] Bump js packages (#1856) * Bump js packages * changelog --------- Co-authored-by: Jacob Aronoff --- .chloggen/bump-nodejs.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 22 +++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) create mode 100755 .chloggen/bump-nodejs.yaml diff --git a/.chloggen/bump-nodejs.yaml b/.chloggen/bump-nodejs.yaml new file mode 100755 index 000000000..2221d95cf --- /dev/null +++ b/.chloggen/bump-nodejs.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation/nodejs + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump python packages to 1.14.0/0.40.0 + +# One or more tracking issues related to the change +issues: [1790] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index bf6f1fbb5..dc3bb6a14 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,16 +15,16 @@ }, "dependencies": { "@opentelemetry/api": "1.4.1", - "@opentelemetry/auto-instrumentations-node": "0.37.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.39.1", - "@opentelemetry/exporter-prometheus": "0.39.1", - "@opentelemetry/exporter-trace-otlp-grpc": "0.39.1", - "@opentelemetry/resource-detector-alibaba-cloud": "0.27.6", - "@opentelemetry/resource-detector-aws": "1.2.4", - "@opentelemetry/resource-detector-container": "0.2.4", - "@opentelemetry/resource-detector-gcp": "0.28.2", - "@opentelemetry/resources": "1.13.0", - "@opentelemetry/sdk-metrics": "1.13.0", - "@opentelemetry/sdk-node": "0.39.1" + "@opentelemetry/auto-instrumentations-node": "0.37.1", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.40.0", + "@opentelemetry/exporter-prometheus": "0.40.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.40.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.27.7", + "@opentelemetry/resource-detector-aws": "1.2.5", + "@opentelemetry/resource-detector-container": "0.2.5", + "@opentelemetry/resource-detector-gcp": "0.28.3", + "@opentelemetry/resources": "1.14.0", + "@opentelemetry/sdk-metrics": "1.14.0", + "@opentelemetry/sdk-node": "0.40.0" } } From a8653601cd6a6e2b35fd7f3e1a28b4e9608fb794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 26 Jun 2023 08:42:34 +0100 Subject: [PATCH 0899/1234] Explicitly set kind version when running tests in CI (#1864) * Upgrade kuttl to 0.15.0 * Update kind images for kind 0.20.0 * Use older kind version for older k8s versions --- .github/workflows/e2e.yaml | 11 ++++++++++- .github/workflows/scorecard.yaml | 9 +++++++++ hack/install-kuttl.sh | 2 +- kind-1.19.yaml | 2 +- kind-1.20.yaml | 2 +- kind-1.21.yaml | 2 +- kind-1.22.yaml | 2 +- kind-1.23.yaml | 2 +- kind-1.24.yaml | 2 +- kind-1.25.yaml | 2 +- kind-1.26.yaml | 2 +- kind-1.27.yaml | 2 +- 12 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a8e443e98..ac4221771 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -10,6 +10,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +env: + CURRENT_KIND_VERSION: 0.20.0 + LEGACY_KIND_VERSION: 0.17.0 # for K8s versions latest kind doesn't support anymore + jobs: e2e-tests: name: End-to-end tests @@ -28,12 +32,17 @@ jobs: - e2e-autoscale steps: - + - name: Set up Go uses: actions/setup-go@v4 with: go-version: "1.20" + - name: Setup kind + env: + KIND_VERSION: ${{ matrix.kube_version >= 1.21 && env.KIND_VERSION || env.LEGACY_KIND_VERSION }} + run: go install sigs.k8s.io/kind@v${KIND_VERSION} + - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 323671a7c..3c6fbc497 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -10,6 +10,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +env: + CURRENT_KIND_VERSION: 0.20.0 + LEGACY_KIND_VERSION: 0.17.0 # for K8s versions latest kind doesn't support anymore + jobs: scorecard-tests: name: test on k8s @@ -27,6 +31,11 @@ jobs: with: go-version: "1.20" + - name: Setup kind + env: + KIND_VERSION: ${{ matrix.kube_version >= 1.21 && env.KIND_VERSION || env.LEGACY_KIND_VERSION }} + run: go install sigs.k8s.io/kind@v${KIND_VERSION} + - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh index 760e786fe..94326b52c 100755 --- a/hack/install-kuttl.sh +++ b/hack/install-kuttl.sh @@ -1,5 +1,5 @@ #!/bin/bash -sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.12.1/kubectl-kuttl_0.12.1_linux_x86_64 +sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 sudo chmod +x /usr/local/bin/kubectl-kuttl export PATH=$PATH:/usr/local/bin diff --git a/kind-1.19.yaml b/kind-1.19.yaml index 8b85a6a66..06d7e0c71 100644 --- a/kind-1.19.yaml +++ b/kind-1.19.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.19.16@sha256:707469aac7e6805e52c3bde2a8a8050ce2b15decff60db6c5077ba9975d28b98 + image: kindest/node:v1.19.16@sha256:476cb3269232888437b61deca013832fee41f9f074f9bed79f57e4280f7c48b7 diff --git a/kind-1.20.yaml b/kind-1.20.yaml index 44e7f6ae9..04e097cf5 100644 --- a/kind-1.20.yaml +++ b/kind-1.20.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.20.15@sha256:d67de8f84143adebe80a07672f370365ec7d23f93dc86866f0e29fa29ce026fe + image: kindest/node:v1.20.15@sha256:a32bf55309294120616886b5338f95dd98a2f7231519c7dedcec32ba29699394 diff --git a/kind-1.21.yaml b/kind-1.21.yaml index 2894a87c4..2aff9ffb3 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.21.14@sha256:f9b4d3d1112f24a7254d2ee296f177f628f9b4c1b32f0006567af11b91c1f301 + image: kindest/node:v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093 diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 27fe599db..6e6b29223 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.22.13@sha256:4904eda4d6e64b402169797805b8ec01f50133960ad6c19af45173a27eadf959 \ No newline at end of file + image: kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2 diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 5728285a1..3160afc91 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.23.10@sha256:f047448af6a656fae7bc909e2fab360c18c487ef3edc93f06d78cdfd864b2d12 + image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb diff --git a/kind-1.24.yaml b/kind-1.24.yaml index 56553b608..ece3f7cf7 100644 --- a/kind-1.24.yaml +++ b/kind-1.24.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.24.4@sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98 + image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab diff --git a/kind-1.25.yaml b/kind-1.25.yaml index fd8831adb..a0116eb23 100644 --- a/kind-1.25.yaml +++ b/kind-1.25.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.25.3@sha256:f1de3b0670462f43280114eccceab8bf1b9576d2afe0582f8f74529da6fd0365 + image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 diff --git a/kind-1.26.yaml b/kind-1.26.yaml index cc13fe7b6..49cf2ea24 100644 --- a/kind-1.26.yaml +++ b/kind-1.26.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352 + image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb diff --git a/kind-1.27.yaml b/kind-1.27.yaml index f4e2e62be..435977014 100644 --- a/kind-1.27.yaml +++ b/kind-1.27.yaml @@ -2,4 +2,4 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - image: kindest/node:v1.27.0@sha256:c6b22e613523b1af67d4bc8a0c38a4c3ea3a2b8fbc5b367ae36345c9cb844518 + image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 From 574f2822a9f2b1817590614dcdd661d36ce5328b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 27 Jun 2023 07:52:02 -0400 Subject: [PATCH 0900/1234] Add ability to set init containers (#1870) --- .chloggen/1684-init-containers.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 7 + apis/v1alpha1/zz_generated.deepcopy.go | 7 + ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 1274 +++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 1274 +++++++++ docs/api.md | 2353 +++++++++++++++++ pkg/collector/daemonset.go | 1 + pkg/collector/daemonset_test.go | 27 + pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 27 + pkg/collector/statefulset.go | 1 + pkg/collector/statefulset_test.go | 27 + pkg/sidecar/pod.go | 1 + pkg/sidecar/pod_test.go | 11 + .../e2e/smoke-init-containers/00-assert.yaml | 69 + .../e2e/smoke-init-containers/00-install.yaml | 29 + 17 files changed, 5126 insertions(+), 1 deletion(-) create mode 100755 .chloggen/1684-init-containers.yaml create mode 100644 tests/e2e/smoke-init-containers/00-assert.yaml create mode 100644 tests/e2e/smoke-init-containers/00-install.yaml diff --git a/.chloggen/1684-init-containers.yaml b/.chloggen/1684-init-containers.yaml new file mode 100755 index 000000000..23ee0ea26 --- /dev/null +++ b/.chloggen/1684-init-containers.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Collector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Adds ability to set init containers for collector + +# One or more tracking issues related to the change +issues: [1684] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 9179402aa..aaccccbe7 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -183,6 +183,13 @@ type OpenTelemetryCollectorSpec struct { // It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline. // +optional LivenessProbe *Probe `json:"livenessProbe,omitempty"` + // InitContainers allows injecting initContainers to the Collector's pod definition. + // These init containers can be used to fetch secrets for injection into the + // configuration from external sources, run added checks, etc. Any errors during the execution of + // an initContainer will lead to a restart of the Pod. More info: + // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + // +optional + InitContainers []v1.Container `json:"initContainers,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9f4701683..fba8484c7 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -575,6 +575,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(Probe) (*in).DeepCopyInto(*out) } + if in.InitContainers != nil { + in, out := &in.InitContainers, &out.InitContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1f1790eef..38e27379d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-06-20T11:50:16Z" + createdAt: "2023-06-26T19:16:11Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 8bafa50bd..e1567409f 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -1403,6 +1403,1280 @@ spec: - route type: string type: object + initContainers: + description: 'InitContainers allows injecting initContainers to the + Collector''s pod definition. These init containers can be used to + fetch secrets for injection into the configuration from external + sources, run added checks, etc. Any errors during the execution + of an initContainer will lead to a restart of the Pod. More info: + https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must only be set if type + is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is + alpha-level and will only be honored by components + that enable the WindowsHostProcessContainers feature + flag. Setting this field without the feature flag + will result in errors when validating the Pod. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a mix + of HostProcess containers and non-HostProcess containers). In + addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 7b5938ba2..4e925e612 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -1400,6 +1400,1280 @@ spec: - route type: string type: object + initContainers: + description: 'InitContainers allows injecting initContainers to the + Collector''s pod definition. These init containers can be used to + fetch secrets for injection into the configuration from external + sources, run added checks, etc. Any errors during the execution + of an initContainer will lead to a restart of the Pod. More info: + https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must only be set if type + is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is + alpha-level and will only be honored by components + that enable the WindowsHostProcessContainers feature + flag. Setting this field without the feature flag + will result in errors when validating the Pod. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a mix + of HostProcess containers and non-HostProcess containers). In + addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. diff --git a/docs/api.md b/docs/api.md index f91554e9d..27dce1b1e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3057,6 +3057,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Ingress is used to specify how OpenTelemetry Collector is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset.
false + + initContainers + []object + + InitContainers allows injecting initContainers to the Collector's pod definition. These init containers can be used to fetch secrets for injection into the configuration from external sources, run added checks, etc. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ + false lifecycle object @@ -5511,6 +5518,2352 @@ IngressTLS describes the transport layer security associated with an ingress. +### OpenTelemetryCollector.spec.initContainers[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +A single application container that you want to run within a pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
+
true
args[]string + Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+
false
command[]string + Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+
false
env[]object + List of environment variables to set in the container. Cannot be updated.
+
false
envFrom[]object + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
+
false
imagestring + Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
+
false
imagePullPolicystring + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+
false
lifecycleobject + Actions that the management system should take in response to container lifecycle events. Cannot be updated.
+
false
livenessProbeobject + Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
ports[]object + List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.
+
false
readinessProbeobject + Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
resizePolicy[]object + Resources resize policy for the container.
+
false
resourcesobject + Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
securityContextobject + SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+
false
startupProbeobject + StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
stdinboolean + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
+
false
stdinOnceboolean + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
+
false
terminationMessagePathstring + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
+
false
terminationMessagePolicystring + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
+
false
ttyboolean + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
+
false
volumeDevices[]object + volumeDevices is the list of block devices to be used by the container.
+
false
volumeMounts[]object + Pod volumes to mount into the container's filesystem. Cannot be updated.
+
false
workingDirstring + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index].valueFrom +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index].valueFrom.configMapKeyRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index].valueFrom.fieldRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index].valueFrom.resourceFieldRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].env[index].valueFrom.secretKeyRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].envFrom[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +EnvFromSource represents the source of a set of ConfigMaps + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapRefobject + The ConfigMap to select from
+
false
prefixstring + An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+
false
secretRefobject + The Secret to select from
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].envFrom[index].configMapRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvfromindex) + + + +The ConfigMap to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap must be defined
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].envFrom[index].secretRef +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexenvfromindex) + + + +The Secret to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret must be defined
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +Actions that the management system should take in response to container lifecycle events. Cannot be updated. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
postStartobject + PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
preStopobject + PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycle) + + + +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.exec +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststart) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.httpGet +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststart) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststarthttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.tcpSocket +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststart) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycle) + + + +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.exec +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestop) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.httpGet +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestop) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestophttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.tcpSocket +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestop) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe.exec +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlivenessprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe.grpc +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlivenessprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlivenessprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlivenessprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].livenessProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlivenessprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].ports[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +ContainerPort represents a network port in a single container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
containerPortinteger + Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
+
+ Format: int32
+
true
hostIPstring + What host IP to bind the external port to.
+
false
hostPortinteger + Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
+
+ Format: int32
+
false
namestring + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
+
false
protocolstring + Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
+
+ Default: TCP
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe.exec +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexreadinessprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe.grpc +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexreadinessprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexreadinessprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexreadinessprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].readinessProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexreadinessprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].resizePolicy[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +ContainerResizePolicy represents resource resize policy for the container. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourceNamestring + Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.
+
true
restartPolicystring + Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].resources +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].resources.claims[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].securityContext +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowPrivilegeEscalationboolean + AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
+
false
capabilitiesobject + The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
+
false
privilegedboolean + Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
+
false
procMountstring + procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
+
false
readOnlyRootFilesystemboolean + Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
false
seccompProfileobject + The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].securityContext.capabilities +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexsecuritycontext) + + + +The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
add[]string + Added capabilities
+
false
drop[]string + Removed capabilities
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].securityContext.seLinuxOptions +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexsecuritycontext) + + + +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].securityContext.seccompProfile +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexsecuritycontext) + + + +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].securityContext.windowsOptions +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe.exec +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexstartupprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe.grpc +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexstartupprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexstartupprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexstartupprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].startupProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexstartupprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.initContainers[index].volumeDevices[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +volumeDevice describes a mapping of a raw block device within a container. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
devicePathstring + devicePath is the path inside of the container that the device will be mapped to.
+
true
namestring + name must match the name of a persistentVolumeClaim in the pod
+
true
+ + +### OpenTelemetryCollector.spec.initContainers[index].volumeMounts[index] +[↩ Parent](#opentelemetrycollectorspecinitcontainersindex) + + + +VolumeMount describes a mounting of a Volume within a container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mountPathstring + Path within the container at which the volume should be mounted. Must not contain ':'.
+
true
namestring + This must match the Name of a Volume.
+
true
mountPropagationstring + mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
+
false
readOnlyboolean + Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
+
false
subPathstring + Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
+
false
subPathExprstring + Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+
false
+ + ### OpenTelemetryCollector.spec.lifecycle [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index f2e8a6731..f68d7bb70 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -50,6 +50,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), + InitContainers: otelcol.Spec.InitContainers, Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, diff --git a/pkg/collector/daemonset_test.go b/pkg/collector/daemonset_test.go index 2fffb875f..a4d492d40 100644 --- a/pkg/collector/daemonset_test.go +++ b/pkg/collector/daemonset_test.go @@ -276,3 +276,30 @@ func TestDaemonSetAffinity(t *testing.T) { assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } + +func TestDaemonSetInitContainer(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + InitContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + d := DaemonSet(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Len(t, d.Spec.Template.Spec.InitContainers, 1) +} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 658bc29fb..298d4e795 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -52,6 +52,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), + InitContainers: otelcol.Spec.InitContainers, Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index 718738f93..be2b77605 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -346,3 +346,30 @@ func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { assert.NotNil(t, d2.Spec.Template.Spec.TerminationGracePeriodSeconds) assert.Equal(t, gracePeriodSec, *d2.Spec.Template.Spec.TerminationGracePeriodSeconds) } + +func TestDeploymentSetInitContainer(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + InitContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Len(t, d.Spec.Template.Spec.InitContainers, 1) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 307c82d5c..05ad1a103 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -52,6 +52,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), + InitContainers: otelcol.Spec.InitContainers, Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 39db85cfe..7196af64b 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -355,3 +355,30 @@ func TestStatefulSetAffinity(t *testing.T) { assert.NotNil(t, sts2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *sts2.Spec.Template.Spec.Affinity) } + +func TestStatefulSetInitContainer(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + InitContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + s := StatefulSet(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", s.Name) + assert.Equal(t, "my-instance-collector", s.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", s.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", s.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", s.Annotations["prometheus.io/path"]) + assert.Len(t, s.Spec.Template.Spec.InitContainers, 1) +} diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index c86d2f3ae..1b153d82a 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -47,6 +47,7 @@ func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCo if !hasResourceAttributeEnvVar(container.Env) { container.Env = append(container.Env, attributes...) } + pod.Spec.InitContainers = append(pod.Spec.InitContainers, otelcol.Spec.InitContainers...) pod.Spec.Containers = append(pod.Spec.Containers, container) pod.Spec.Volumes = append(pod.Spec.Volumes, otelcol.Spec.Volumes...) diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index caee349b5..770bbc555 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -37,6 +37,11 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { Containers: []corev1.Container{ {Name: "my-app"}, }, + InitContainers: []corev1.Container{ + { + Name: "my-init", + }, + }, // cross-test: the pod has a volume already, make sure we don't remove it Volumes: []corev1.Volume{{}}, }, @@ -47,6 +52,11 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { Namespace: "some-app", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ + InitContainers: []corev1.Container{ + { + Name: "test", + }, + }, Config: ` receivers: exporters: @@ -62,6 +72,7 @@ processors: // verify assert.NoError(t, err) require.Len(t, changed.Spec.Containers, 2) + require.Len(t, changed.Spec.InitContainers, 2) require.Len(t, changed.Spec.Volumes, 1) assert.Equal(t, "some-app.otelcol-sample", changed.Labels["sidecar.opentelemetry.io/injected"]) assert.Equal(t, corev1.Container{ diff --git a/tests/e2e/smoke-init-containers/00-assert.yaml b/tests/e2e/smoke-init-containers/00-assert.yaml new file mode 100644 index 000000000..f3c164486 --- /dev/null +++ b/tests/e2e/smoke-init-containers/00-assert.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +spec: + template: + spec: + initContainers: + - name: init-test-echo +status: + readyReplicas: 1 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: jaeger-grpc + port: 14250 + protocol: TCP + targetPort: 14250 + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 diff --git a/tests/e2e/smoke-init-containers/00-install.yaml b/tests/e2e/smoke-init-containers/00-install.yaml new file mode 100644 index 000000000..762b7c543 --- /dev/null +++ b/tests/e2e/smoke-init-containers/00-install.yaml @@ -0,0 +1,29 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + initContainers: + - name: init-test-echo + image: alpine + command: ['sh', '-c', 'sleep 5 && echo "this is a test"'] + config: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger,otlp] + processors: [] + exporters: [logging] From 3b2627688db431ef99c514b93cc5460e158087ce Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Tue, 27 Jun 2023 14:45:43 +0200 Subject: [PATCH 0901/1234] Nginx Instrumentation crd (#1853) * Nginx Instrumentation crd * Nginx Instruemtnation crd * chloggen * typos * make generate crd * make bundle - crd * make bundle - versions * default resources * consts for resource settings * rename resource consts * rename resource consts --- .chloggen/1853-nginx-crd.yaml | 16 + apis/v1alpha1/instrumentation_types.go | 35 +- apis/v1alpha1/instrumentation_webhook.go | 37 +- apis/v1alpha1/zz_generated.deepcopy.go | 31 + .../opentelemetry.io_instrumentations.yaml | 296 ++++++++- .../opentelemetry.io_instrumentations.yaml | 296 ++++++++- docs/api.md | 628 +++++++++++++++++- 7 files changed, 1326 insertions(+), 13 deletions(-) create mode 100755 .chloggen/1853-nginx-crd.yaml diff --git a/.chloggen/1853-nginx-crd.yaml b/.chloggen/1853-nginx-crd.yaml new file mode 100755 index 000000000..81e655459 --- /dev/null +++ b/.chloggen/1853-nginx-crd.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Instrumentation crd for Nginx auto-instrumentation. + +# One or more tracking issues related to the change +issues: [1853] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 4eb585eeb..101d99f40 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -68,9 +68,13 @@ type InstrumentationSpec struct { // +optional Go Go `json:"go,omitempty"` - // Apache defines configuration for Apache HTTPD auto-instrumentation. + // ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. // +optional ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"` + + // Nginx defines configuration for Nginx auto-instrumentation. + // +optional + Nginx Nginx `json:"nginx,omitempty"` } // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. @@ -218,6 +222,35 @@ type ApacheHttpd struct { // Needed only if different from default "/usr/local/apache2/conf" // +optional ConfigPath string `json:"configPath,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// Nginx defines Nginx SDK and instrumentation configuration. +type Nginx struct { + // Image is a container image with Nginx SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // Env defines Nginx specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Attrs defines Nginx agent specific attributes. The precedence order is: + // `agent default attributes` > `instrument spec attributes` . + // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module + // +optional + Attrs []corev1.EnvVar `json:"attrs,omitempty"` + + // Location of Nginx configuration file. + // Needed only if different from default "/etx/nginx/nginx.conf" + // +optional + ConfigFile string `json:"configFile,omitempty"` + // Resources describes the compute resource requirements. // +optional Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 9b256efaa..26b376d7d 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -35,6 +35,7 @@ const ( AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" AnnotationDefaultAutoInstrumentationGo = "instrumentation.opentelemetry.io/default-auto-instrumentation-go-image" AnnotationDefaultAutoInstrumentationApacheHttpd = "instrumentation.opentelemetry.io/default-auto-instrumentation-apache-httpd-image" + AnnotationDefaultAutoInstrumentationNginx = "instrumentation.opentelemetry.io/default-auto-instrumentation-nginx-image" envPrefix = "OTEL_" envSplunkPrefix = "SPLUNK_" ) @@ -42,6 +43,15 @@ const ( // log is for logging in this package. var instrumentationlog = logf.Log.WithName("instrumentation-resource") +var initContainerDefaultLimitResources = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), +} +var initContainerDefaultRequestedResources = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), +} + func (r *Instrumentation) SetupWebhookWithManager(mgr ctrl.Manager) error { return ctrl.NewWebhookManagedBy(mgr). For(r). @@ -153,16 +163,10 @@ func (r *Instrumentation) Default() { } } if r.Spec.ApacheHttpd.Resources.Limits == nil { - r.Spec.ApacheHttpd.Resources.Limits = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("128Mi"), - } + r.Spec.ApacheHttpd.Resources.Limits = initContainerDefaultLimitResources } if r.Spec.ApacheHttpd.Resources.Requests == nil { - r.Spec.ApacheHttpd.Resources.Requests = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1m"), - corev1.ResourceMemory: resource.MustParse("128Mi"), - } + r.Spec.ApacheHttpd.Resources.Requests = initContainerDefaultRequestedResources } if r.Spec.ApacheHttpd.Version == "" { r.Spec.ApacheHttpd.Version = "2.4" @@ -170,6 +174,20 @@ func (r *Instrumentation) Default() { if r.Spec.ApacheHttpd.ConfigPath == "" { r.Spec.ApacheHttpd.ConfigPath = "/usr/local/apache2/conf" } + if r.Spec.Nginx.Image == "" { + if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationNginx]; ok { + r.Spec.Nginx.Image = val + } + } + if r.Spec.Nginx.Resources.Limits == nil { + r.Spec.Nginx.Resources.Limits = initContainerDefaultLimitResources + } + if r.Spec.Nginx.Resources.Requests == nil { + r.Spec.Nginx.Resources.Requests = initContainerDefaultRequestedResources + } + if r.Spec.Nginx.ConfigFile == "" { + r.Spec.Nginx.ConfigFile = "/etc/nginx/nginx.conf" + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -275,6 +293,9 @@ func (r *Instrumentation) validate() error { if err := r.validateEnv(r.Spec.ApacheHttpd.Env); err != nil { return err } + if err := r.validateEnv(r.Spec.Nginx.Env); err != nil { + return err + } return nil } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index fba8484c7..4262a70aa 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -282,6 +282,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { in.DotNet.DeepCopyInto(&out.DotNet) in.Go.DeepCopyInto(&out.Go) in.ApacheHttpd.DeepCopyInto(&out.ApacheHttpd) + in.Nginx.DeepCopyInto(&out.Nginx) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. @@ -352,6 +353,36 @@ func (in *MetricSpec) DeepCopy() *MetricSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Nginx) DeepCopyInto(out *Nginx) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Attrs != nil { + in, out := &in.Attrs, &out.Attrs + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nginx. +func (in *Nginx) DeepCopy() *Nginx { + if in == nil { + return nil + } + out := new(Nginx) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeJS) DeepCopyInto(out *NodeJS) { *out = *in diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 5832cee96..91aca60f2 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -54,7 +54,7 @@ spec: SDK and instrumentation. properties: apacheHttpd: - description: Apache defines configuration for Apache HTTPD auto-instrumentation. + description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. properties: attrs: description: 'Attrs defines Apache HTTPD agent specific attributes. @@ -1000,6 +1000,300 @@ spec: type: object type: object type: object + nginx: + description: Nginx defines configuration for Nginx auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Nginx agent specific attributes. The + precedence order is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configFile: + description: Location of Nginx configuration file. Needed only + if different from default "/etx/nginx/nginx.conf" + type: string + env: + description: 'Env defines Nginx specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Nginx SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index b84079a40..8765ee7fa 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -52,7 +52,7 @@ spec: SDK and instrumentation. properties: apacheHttpd: - description: Apache defines configuration for Apache HTTPD auto-instrumentation. + description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. properties: attrs: description: 'Attrs defines Apache HTTPD agent specific attributes. @@ -998,6 +998,300 @@ spec: type: object type: object type: object + nginx: + description: Nginx defines configuration for Nginx auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Nginx agent specific attributes. The + precedence order is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configFile: + description: Location of Nginx configuration file. Needed only + if different from default "/etx/nginx/nginx.conf" + type: string + env: + description: 'Env defines Nginx specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Nginx SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: diff --git a/docs/api.md b/docs/api.md index 27dce1b1e..ce9c294e6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -89,7 +89,7 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen apacheHttpd object - Apache defines configuration for Apache HTTPD auto-instrumentation.
+ ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation.
false @@ -127,6 +127,13 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen Java defines configuration for java auto-instrumentation.
false + + nginx + object + + Nginx defines configuration for Nginx auto-instrumentation.
+ + false nodejs object @@ -171,7 +178,7 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen -Apache defines configuration for Apache HTTPD auto-instrumentation. +ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. @@ -2112,6 +2119,623 @@ Resources describes the compute resource requirements. +ResourceClaim references one entry in PodSpec.ResourceClaims. + +
+ + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + +### Instrumentation.spec.nginx +[↩ Parent](#instrumentationspec) + + + +Nginx defines configuration for Nginx auto-instrumentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
attrs[]object + Attrs defines Nginx agent specific attributes. The precedence order is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+
false
configFilestring + Location of Nginx configuration file. Needed only if different from default "/etx/nginx/nginx.conf"
+
false
env[]object + Env defines Nginx specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+
false
imagestring + Image is a container image with Nginx SDK and auto-instrumentation.
+
false
resourceRequirementsobject + Resources describes the compute resource requirements.
+
false
+ + +### Instrumentation.spec.nginx.attrs[index] +[↩ Parent](#instrumentationspecnginx) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.nginx.attrs[index].valueFrom +[↩ Parent](#instrumentationspecnginxattrsindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.nginx.attrs[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecnginxattrsindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.nginx.attrs[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecnginxattrsindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.nginx.attrs[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecnginxattrsindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.nginx.attrs[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecnginxattrsindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.nginx.env[index] +[↩ Parent](#instrumentationspecnginx) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### Instrumentation.spec.nginx.env[index].valueFrom +[↩ Parent](#instrumentationspecnginxenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### Instrumentation.spec.nginx.env[index].valueFrom.configMapKeyRef +[↩ Parent](#instrumentationspecnginxenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### Instrumentation.spec.nginx.env[index].valueFrom.fieldRef +[↩ Parent](#instrumentationspecnginxenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### Instrumentation.spec.nginx.env[index].valueFrom.resourceFieldRef +[↩ Parent](#instrumentationspecnginxenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### Instrumentation.spec.nginx.env[index].valueFrom.secretKeyRef +[↩ Parent](#instrumentationspecnginxenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### Instrumentation.spec.nginx.resourceRequirements +[↩ Parent](#instrumentationspecnginx) + + + +Resources describes the compute resource requirements. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### Instrumentation.spec.nginx.resourceRequirements.claims[index] +[↩ Parent](#instrumentationspecnginxresourcerequirements) + + + ResourceClaim references one entry in PodSpec.ResourceClaims. From ea37704d21a018b413cc94448f461b2dca63cdaa Mon Sep 17 00:00:00 2001 From: Terje Torkelsen Date: Wed, 28 Jun 2023 05:11:03 +0200 Subject: [PATCH 0902/1234] Update README.md (#1873) --- cmd/otel-allocator/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index 87ad7a217..3339ccd5c 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -115,7 +115,7 @@ rules: - discovery.k8s.io resources: - endpointslices - verbs: ["get", "list", watch"] + verbs: ["get", "list", "watch"] - apiGroups: - networking.k8s.io resources: From 0bce4bbffc8de8c2499600fb2a5c077792d7f90d Mon Sep 17 00:00:00 2001 From: Matej Gera <38492574+matej-g@users.noreply.github.com> Date: Wed, 28 Jun 2023 15:50:44 +0200 Subject: [PATCH 0903/1234] [target-allocator] Populate store assets (authorization information) for Prometheus CR watcher (#1710) * Adjust Watcher interface Add context parameter to to LoadConfig method in perparation to use K8s client in the method. Signed-off-by: Matej Gera * Enhance the Prometheus CR watcher struct Add K8s client and logger, in preparation for obtaining service / pod monitor sotore assets. Signed-off-by: Matej Gera * Adds methods and logic to obtain store assets from service / pod monitors Signed-off-by: Matej Gera * Add unit tests for Promtehus CR watcher Signed-off-by: Matej Gera * Add changelog Signed-off-by: Matej Gera * Add disclaimer about secrets in the readme Signed-off-by: Matej Gera * Fix store param and tests after branch update Signed-off-by: Matej Gera * Fix botched merge Signed-off-by: Matej Gera --------- Signed-off-by: Matej Gera Signed-off-by: Matej Gera Co-authored-by: Jacob Aronoff Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Pavol Loffay --- ...ometheus-cr-scrape-config-credentials.yaml | 16 + cmd/otel-allocator/README.md | 6 + cmd/otel-allocator/main.go | 4 +- cmd/otel-allocator/watcher/file.go | 3 +- cmd/otel-allocator/watcher/promOperator.go | 146 ++++++-- .../watcher/promOperator_test.go | 345 ++++++++++++++++++ cmd/otel-allocator/watcher/watcher.go | 8 +- 7 files changed, 500 insertions(+), 28 deletions(-) create mode 100644 .chloggen/1710-prometheus-cr-scrape-config-credentials.yaml create mode 100644 cmd/otel-allocator/watcher/promOperator_test.go diff --git a/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml b/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml new file mode 100644 index 000000000..7231c5fcb --- /dev/null +++ b/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Populate credentials for Prometheus CR (service and pod monitor) scrape configs. + +# One or more tracking issues related to the change +issues: [1669] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index 3339ccd5c..e46fcd684 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -138,6 +138,12 @@ the `targetAllocator:` part of the OpenTelemetryCollector CR. **Note**: The Collector part of this same CR *also* has a serviceAccount key which only affects the collector and *not* the TargetAllocator. +### Service / Pod monitor endpoint credentials + +If your service or pod monitor endpoints require credentials or other supported form of authentication (bearer token, basic auth, OAuth2 etc.), you need to ensure that the collector has access to this information. Due to some limitations in how the endpoints configuration is handled, target allocator currently does **not** support credentials provided via secrets. It is only possible to provide credentials in a file (for more details see issue https://github.com/open-telemetry/opentelemetry-operator/issues/1669). + +In order to ensure your endpoints can be scraped, your collector instance needs to have the particular secret mounted as a file at the correct path. + # Design diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index a33d31b48..48f11403b 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -107,7 +107,7 @@ func main() { defer close(interrupts) if *cliConf.PromCRWatcherConf.Enabled { - promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(cfg, cliConf) + promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(setupLog.WithName("prometheus-cr-watcher"), cfg, cliConf) if err != nil { setupLog.Error(err, "Can't start the prometheus watcher") os.Exit(1) @@ -193,7 +193,7 @@ func main() { select { case event := <-eventChan: eventsMetric.WithLabelValues(event.Source.String()).Inc() - loadConfig, err := event.Watcher.LoadConfig() + loadConfig, err := event.Watcher.LoadConfig(ctx) if err != nil { setupLog.Error(err, "Unable to load configuration") continue diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index df561b918..95b5cfaaa 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -15,6 +15,7 @@ package watcher import ( + "context" "path/filepath" "github.com/fsnotify/fsnotify" @@ -48,7 +49,7 @@ func NewFileWatcher(logger logr.Logger, config config.CLIConfig) (*FileWatcher, }, nil } -func (f *FileWatcher) LoadConfig() (*promconfig.Config, error) { +func (f *FileWatcher) LoadConfig(_ context.Context) (*promconfig.Config, error) { cfg, err := config.Load(f.configFilePath) if err != nil { f.logger.Error(err, "Unable to load configuration") diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 128a11b38..9f26a9923 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -15,9 +15,11 @@ package watcher import ( + "context" "fmt" "github.com/go-kit/log" + "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1" "github.com/prometheus-operator/prometheus-operator/pkg/assets" @@ -29,34 +31,30 @@ import ( "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) -func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { +func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { mClient, err := monitoringclient.NewForConfig(cliConfig.ClusterConfig) if err != nil { return nil, err } - factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, allocatorconfig.DefaultResyncTime, nil) //TODO decide what strategy to use regarding namespaces - - serviceMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.ServiceMonitorName)) + clientset, err := kubernetes.NewForConfig(cliConfig.ClusterConfig) if err != nil { return nil, err } - podMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.PodMonitorName)) + factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, allocatorconfig.DefaultResyncTime, nil) //TODO decide what strategy to use regarding namespaces + + monitoringInformers, err := getInformers(factory) if err != nil { return nil, err } - monitoringInformers := map[string]*informers.ForResource{ - monitoringv1.ServiceMonitorName: serviceMonitorInformers, - monitoringv1.PodMonitorName: podMonitorInformers, - } - // TODO: We should make these durations configurable prom := &monitoringv1.Prometheus{ Spec: monitoringv1.PrometheusSpec{ @@ -76,7 +74,9 @@ func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfi podMonSelector := getSelector(cfg.PodMonitorSelector) return &PrometheusCRWatcher{ + logger: logger, kubeMonitoringClient: mClient, + k8sClient: clientset, informers: monitoringInformers, stopChannel: make(chan struct{}), configGenerator: generator, @@ -87,7 +87,9 @@ func NewPrometheusCRWatcher(cfg allocatorconfig.Config, cliConfig allocatorconfi } type PrometheusCRWatcher struct { - kubeMonitoringClient *monitoringclient.Clientset + logger logr.Logger + kubeMonitoringClient monitoringclient.Interface + k8sClient kubernetes.Interface informers map[string]*informers.ForResource stopChannel chan struct{} configGenerator *prometheus.ConfigGenerator @@ -98,13 +100,30 @@ type PrometheusCRWatcher struct { } func getSelector(s map[string]string) labels.Selector { - sel := labels.NewSelector() if s == nil { - return sel + return labels.NewSelector() } return labels.SelectorFromSet(s) } +// getInformers returns a map of informers for the given resources. +func getInformers(factory informers.FactoriesForNamespaces) (map[string]*informers.ForResource, error) { + serviceMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.ServiceMonitorName)) + if err != nil { + return nil, err + } + + podMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.PodMonitorName)) + if err != nil { + return nil, err + } + + return map[string]*informers.ForResource{ + monitoringv1.ServiceMonitorName: serviceMonitorInformers, + monitoringv1.PodMonitorName: podMonitorInformers, + }, nil +} + // Watch wrapped informers and wait for an initial sync. func (w *PrometheusCRWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { event := Event{ @@ -143,12 +162,13 @@ func (w *PrometheusCRWatcher) Close() error { return nil } -func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { +func (w *PrometheusCRWatcher) LoadConfig(ctx context.Context) (*promconfig.Config, error) { + store := assets.NewStore(w.k8sClient.CoreV1(), w.k8sClient.CoreV1()) serviceMonitorInstances := make(map[string]*monitoringv1.ServiceMonitor) - smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(w.serviceMonitorSelector, func(sm interface{}) { monitor := sm.(*monitoringv1.ServiceMonitor) key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) + w.addStoreAssetsForServiceMonitor(ctx, monitor.Name, monitor.Namespace, monitor.Spec.Endpoints, store) serviceMonitorInstances[key] = monitor }) if smRetrieveErr != nil { @@ -159,19 +179,13 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { pmRetrieveErr := w.informers[monitoringv1.PodMonitorName].ListAll(w.podMonitorSelector, func(pm interface{}) { monitor := pm.(*monitoringv1.PodMonitor) key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) + w.addStoreAssetsForPodMonitor(ctx, monitor.Name, monitor.Namespace, monitor.Spec.PodMetricsEndpoints, store) podMonitorInstances[key] = monitor }) if pmRetrieveErr != nil { return nil, pmRetrieveErr } - store := assets.Store{ - TLSAssets: nil, - TokenAssets: nil, - BasicAuthAssets: nil, - OAuth2Assets: nil, - SigV4Assets: nil, - } generatedConfig, err := w.configGenerator.GenerateServerConfiguration( "30s", "", @@ -184,7 +198,7 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { podMonitorInstances, map[string]*monitoringv1.Probe{}, map[string]*promv1alpha1.ScrapeConfig{}, - &store, + store, nil, nil, nil, @@ -211,3 +225,89 @@ func (w *PrometheusCRWatcher) LoadConfig() (*promconfig.Config, error) { } return promCfg, nil } + +// addStoreAssetsForServiceMonitor adds authentication / authorization related information to the assets store, +// based on the service monitor and endpoints specs. +// This code borrows from +// https://github.com/prometheus-operator/prometheus-operator/blob/06b5c4189f3f72737766d86103d049115c3aff48/pkg/prometheus/resource_selector.go#L73. +func (w *PrometheusCRWatcher) addStoreAssetsForServiceMonitor( + ctx context.Context, + smName, smNamespace string, + endps []monitoringv1.Endpoint, + store *assets.Store, +) { + var err error + for i, endp := range endps { + objKey := fmt.Sprintf("serviceMonitor/%s/%s/%d", smNamespace, smName, i) + + if err = store.AddBearerToken(ctx, smNamespace, endp.BearerTokenSecret, objKey); err != nil { + break + } + + if err = store.AddBasicAuth(ctx, smNamespace, endp.BasicAuth, objKey); err != nil { + break + } + + if endp.TLSConfig != nil { + if err = store.AddTLSConfig(ctx, smNamespace, endp.TLSConfig); err != nil { + break + } + } + + if err = store.AddOAuth2(ctx, smNamespace, endp.OAuth2, objKey); err != nil { + break + } + + smAuthKey := fmt.Sprintf("serviceMonitor/auth/%s/%s/%d", smNamespace, smName, i) + if err = store.AddSafeAuthorizationCredentials(ctx, smNamespace, endp.Authorization, smAuthKey); err != nil { + break + } + } + + if err != nil { + w.logger.Error(err, "Failed to obtain credentials for a ServiceMonitor", "serviceMonitor", smName) + } +} + +// addStoreAssetsForServiceMonitor adds authentication / authorization related information to the assets store, +// based on the service monitor and pod metrics endpoints specs. +// This code borrows from +// https://github.com/prometheus-operator/prometheus-operator/blob/06b5c4189f3f72737766d86103d049115c3aff48/pkg/prometheus/resource_selector.go#L314. +func (w *PrometheusCRWatcher) addStoreAssetsForPodMonitor( + ctx context.Context, + pmName, pmNamespace string, + podMetricsEndps []monitoringv1.PodMetricsEndpoint, + store *assets.Store, +) { + var err error + for i, endp := range podMetricsEndps { + objKey := fmt.Sprintf("podMonitor/%s/%s/%d", pmNamespace, pmName, i) + + if err = store.AddBearerToken(ctx, pmNamespace, endp.BearerTokenSecret, objKey); err != nil { + break + } + + if err = store.AddBasicAuth(ctx, pmNamespace, endp.BasicAuth, objKey); err != nil { + break + } + + if endp.TLSConfig != nil { + if err = store.AddSafeTLSConfig(ctx, pmNamespace, &endp.TLSConfig.SafeTLSConfig); err != nil { + break + } + } + + if err = store.AddOAuth2(ctx, pmNamespace, endp.OAuth2, objKey); err != nil { + break + } + + smAuthKey := fmt.Sprintf("podMonitor/auth/%s/%s/%d", pmNamespace, pmName, i) + if err = store.AddSafeAuthorizationCredentials(ctx, pmNamespace, endp.Authorization, smAuthKey); err != nil { + break + } + } + + if err != nil { + w.logger.Error(err, "Failed to obtain credentials for a PodMonitor", "podMonitor", pmName) + } +} diff --git a/cmd/otel-allocator/watcher/promOperator_test.go b/cmd/otel-allocator/watcher/promOperator_test.go new file mode 100644 index 000000000..aafdfe35c --- /dev/null +++ b/cmd/otel-allocator/watcher/promOperator_test.go @@ -0,0 +1,345 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package watcher + +import ( + "context" + "testing" + "time" + + "github.com/go-kit/log" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + fakemonitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned/fake" + "github.com/prometheus-operator/prometheus-operator/pkg/informers" + "github.com/prometheus-operator/prometheus-operator/pkg/prometheus" + "github.com/prometheus/common/config" + "github.com/prometheus/common/model" + promconfig "github.com/prometheus/prometheus/config" + "github.com/prometheus/prometheus/discovery" + kubeDiscovery "github.com/prometheus/prometheus/discovery/kubernetes" + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/fake" +) + +func TestLoadConfig(t *testing.T) { + tests := []struct { + name string + serviceMonitor *monitoringv1.ServiceMonitor + podMonitor *monitoringv1.PodMonitor + want *promconfig.Config + wantErr bool + }{ + { + name: "simple test", + serviceMonitor: &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "simple", + Namespace: "test", + }, + Spec: monitoringv1.ServiceMonitorSpec{ + JobLabel: "test", + Endpoints: []monitoringv1.Endpoint{ + { + Port: "web", + }, + }, + }, + }, + podMonitor: &monitoringv1.PodMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "simple", + Namespace: "test", + }, + Spec: monitoringv1.PodMonitorSpec{ + JobLabel: "test", + PodMetricsEndpoints: []monitoringv1.PodMetricsEndpoint{ + { + Port: "web", + }, + }, + }, + }, + want: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/test/simple/0", + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + HonorTimestamps: true, + HonorLabels: false, + Scheme: "http", + MetricsPath: "/metrics", + ServiceDiscoveryConfigs: []discovery.Config{ + &kubeDiscovery.SDConfig{ + Role: "endpointslice", + NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ + Names: []string{"test"}, + IncludeOwnNamespace: false, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + { + JobName: "podMonitor/test/simple/0", + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + HonorTimestamps: true, + HonorLabels: false, + Scheme: "http", + MetricsPath: "/metrics", + ServiceDiscoveryConfigs: []discovery.Config{ + &kubeDiscovery.SDConfig{ + Role: "pod", + NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ + Names: []string{"test"}, + IncludeOwnNamespace: false, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + }, + }, + }, + { + name: "basic auth (serviceMonitor)", + serviceMonitor: &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "auth", + Namespace: "test", + }, + Spec: monitoringv1.ServiceMonitorSpec{ + JobLabel: "auth", + Endpoints: []monitoringv1.Endpoint{ + { + Port: "web", + BasicAuth: &monitoringv1.BasicAuth{ + Username: v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "basic-auth", + }, + Key: "username", + }, + Password: v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "basic-auth", + }, + Key: "password", + }, + }, + }, + }, + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app": "auth", + }, + }, + }, + }, + want: &promconfig.Config{ + GlobalConfig: promconfig.GlobalConfig{}, + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/test/auth/0", + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + HonorTimestamps: true, + HonorLabels: false, + Scheme: "http", + MetricsPath: "/metrics", + ServiceDiscoveryConfigs: []discovery.Config{ + &kubeDiscovery.SDConfig{ + Role: "endpointslice", + NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ + Names: []string{"test"}, + IncludeOwnNamespace: false, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + }, + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + EnableHTTP2: true, + BasicAuth: &config.BasicAuth{ + Username: "admin", + Password: "password", + }, + }, + }, + }, + }, + }, + { + name: "bearer token (podMonitor)", + podMonitor: &monitoringv1.PodMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bearer", + Namespace: "test", + }, + Spec: monitoringv1.PodMonitorSpec{ + JobLabel: "bearer", + PodMetricsEndpoints: []monitoringv1.PodMetricsEndpoint{ + { + Port: "web", + BearerTokenSecret: v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "bearer", + }, + Key: "token", + }, + }, + }, + }, + }, + want: &promconfig.Config{ + GlobalConfig: promconfig.GlobalConfig{}, + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "podMonitor/test/bearer/0", + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(10 * time.Second), + HonorTimestamps: true, + HonorLabels: false, + Scheme: "http", + MetricsPath: "/metrics", + ServiceDiscoveryConfigs: []discovery.Config{ + &kubeDiscovery.SDConfig{ + Role: "pod", + NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ + Names: []string{"test"}, + IncludeOwnNamespace: false, + }, + HTTPClientConfig: config.DefaultHTTPClientConfig, + }, + }, + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + EnableHTTP2: true, + Authorization: &config.Authorization{ + Type: "Bearer", + Credentials: "bearer-token", + }, + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + w := getTestPrometheuCRWatcher(t, tt.serviceMonitor, tt.podMonitor) + for _, informer := range w.informers { + // Start informers in order to populate cache. + informer.Start(w.stopChannel) + } + + // Wait for informers to sync. + for _, informer := range w.informers { + for !informer.HasSynced() { + time.Sleep(50 * time.Millisecond) + } + } + + got, err := w.LoadConfig(context.Background()) + assert.NoError(t, err) + + sanitizeScrapeConfigsForTest(got.ScrapeConfigs) + assert.Equal(t, tt.want.ScrapeConfigs, got.ScrapeConfigs) + }) + } +} + +// getTestPrometheuCRWatcher creates a test instance of PrometheusCRWatcher with fake clients +// and test secrets. +func getTestPrometheuCRWatcher(t *testing.T, sm *monitoringv1.ServiceMonitor, pm *monitoringv1.PodMonitor) *PrometheusCRWatcher { + mClient := fakemonitoringclient.NewSimpleClientset() + if sm != nil { + _, err := mClient.MonitoringV1().ServiceMonitors("test").Create(context.Background(), sm, metav1.CreateOptions{}) + if err != nil { + t.Fatal(t, err) + } + } + if pm != nil { + _, err := mClient.MonitoringV1().PodMonitors("test").Create(context.Background(), pm, metav1.CreateOptions{}) + if err != nil { + t.Fatal(t, err) + } + } + + k8sClient := fake.NewSimpleClientset() + _, err := k8sClient.CoreV1().Secrets("test").Create(context.Background(), &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "basic-auth", + Namespace: "test", + }, + Data: map[string][]byte{"username": []byte("admin"), "password": []byte("password")}, + }, metav1.CreateOptions{}) + if err != nil { + t.Fatal(t, err) + } + _, err = k8sClient.CoreV1().Secrets("test").Create(context.Background(), &v1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "bearer", + Namespace: "test", + }, + Data: map[string][]byte{"token": []byte("bearer-token")}, + }, metav1.CreateOptions{}) + if err != nil { + t.Fatal(t, err) + } + + factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, 0, nil) + informers, err := getInformers(factory) + if err != nil { + t.Fatal(t, err) + } + + prom := &monitoringv1.Prometheus{ + Spec: monitoringv1.PrometheusSpec{ + CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ + ScrapeInterval: monitoringv1.Duration("30s"), + }, + }, + } + + generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), prom, true) + if err != nil { + t.Fatal(t, err) + } + + return &PrometheusCRWatcher{ + kubeMonitoringClient: mClient, + k8sClient: k8sClient, + informers: informers, + configGenerator: generator, + serviceMonitorSelector: getSelector(nil), + podMonitorSelector: getSelector(nil), + stopChannel: make(chan struct{}), + } +} + +// Remove relable configs fields from scrape configs for testing, +// since these are mutated and tested down the line with the hook(s). +func sanitizeScrapeConfigsForTest(scs []*promconfig.ScrapeConfig) { + for _, sc := range scs { + sc.RelabelConfigs = nil + sc.MetricRelabelConfigs = nil + } +} diff --git a/cmd/otel-allocator/watcher/watcher.go b/cmd/otel-allocator/watcher/watcher.go index a1b0e99fa..c970c7e47 100644 --- a/cmd/otel-allocator/watcher/watcher.go +++ b/cmd/otel-allocator/watcher/watcher.go @@ -14,12 +14,16 @@ package watcher -import promconfig "github.com/prometheus/prometheus/config" +import ( + "context" + + promconfig "github.com/prometheus/prometheus/config" +) type Watcher interface { // Watch watcher and supply channels which will receive change events Watch(upstreamEvents chan Event, upstreamErrors chan error) error - LoadConfig() (*promconfig.Config, error) + LoadConfig(ctx context.Context) (*promconfig.Config, error) Close() error } From efd37e34d85b8cd6b70537e2429319159110cd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 28 Jun 2023 16:08:33 +0100 Subject: [PATCH 0904/1234] Only admit configurations where Target Allocator has targets (#1860) --- .../targetallocator-reject-no-targets.yaml | 16 ++++ .../opentelemetrycollector_webhook.go | 4 + .../opentelemetrycollector_webhook_test.go | 6 +- .../adapters/config_to_prom_config.go | 68 +++++++++++---- .../adapters/config_to_prom_config_test.go | 82 +++++++++++++++++++ 5 files changed, 155 insertions(+), 21 deletions(-) create mode 100755 .chloggen/targetallocator-reject-no-targets.yaml diff --git a/.chloggen/targetallocator-reject-no-targets.yaml b/.chloggen/targetallocator-reject-no-targets.yaml new file mode 100755 index 000000000..703d2e883 --- /dev/null +++ b/.chloggen/targetallocator-reject-no-targets.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Only admit configurations where Target Allocator actually has targets + +# One or more tracking issues related to the change +issues: [1859] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 89e414aa3..e4a34b564 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -170,6 +170,10 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { if err != nil { return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } + err = ta.ValidateTargetAllocatorConfig(r.Spec.TargetAllocator.PrometheusCR.Enabled, promCfg) + if err != nil { + return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) + } } // validator port config diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index bba5c7d3e..a03a178f4 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -207,9 +207,9 @@ func TestOTELColValidatingWebhook(t *testing.T) { endpoint: "0.0.0.0:12346" prometheus: config: - scrape_config: - job_name: otel-collector - scrape_interval: 10s + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s jaeger/custom: protocols: thrift_http: diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/pkg/targetallocator/adapters/config_to_prom_config.go index aecf58547..9c865d654 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config.go +++ b/pkg/targetallocator/adapters/config_to_prom_config.go @@ -48,6 +48,31 @@ func errorNotAStringAtIndex(component string, index int) error { return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid string: %s", index, component, component) } +// getScrapeConfigsFromPromConfig extracts the scrapeConfig array from prometheus receiver config. +func getScrapeConfigsFromPromConfig(promReceiverConfig map[interface{}]interface{}) ([]interface{}, error) { + prometheusConfigProperty, ok := promReceiverConfig["config"] + if !ok { + return nil, errorNoComponent("prometheusConfig") + } + + prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) + if !ok { + return nil, errorNotAMap("prometheusConfig") + } + + scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] + if !ok { + return nil, errorNoComponent("scrape_configs") + } + + scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) + if !ok { + return nil, errorNotAList("scrape_configs") + } + + return scrapeConfigs, nil +} + // ConfigToPromConfig converts the incoming configuration object into the Prometheus receiver config. func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { config, err := adapters.ConfigFromString(cfg) @@ -86,24 +111,9 @@ func UnescapeDollarSignsInPromConfig(cfg string) (map[interface{}]interface{}, e return nil, err } - prometheusConfigProperty, ok := prometheus["config"] - if !ok { - return nil, errorNoComponent("prometheusConfig") - } - - prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheusConfig") - } - - scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] - if !ok { - return nil, errorNoComponent("scrape_configs") - } - - scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) - if !ok { - return nil, errorNotAList("scrape_configs") + scrapeConfigs, err := getScrapeConfigsFromPromConfig(prometheus) + if err != nil { + return nil, err } for i, config := range scrapeConfigs { @@ -297,3 +307,25 @@ func ValidatePromConfig(config map[interface{}]interface{}, targetAllocatorEnabl return nil } + +// ValidateTargetAllocatorConfig checks if the Target Allocator config is valid +// In order for Target Allocator to do anything useful, at least one of the following has to be true: +// - at least one scrape config has to be defined in Prometheus receiver configuration +// - PrometheusCR has to be enabled in target allocator settings +func ValidateTargetAllocatorConfig(targetAllocatorPrometheusCR bool, promReceiverConfig map[interface{}]interface{}) error { + + if targetAllocatorPrometheusCR { + return nil + } + // if PrometheusCR isn't enabled, we need at least one scrape config + scrapeConfigs, err := getScrapeConfigsFromPromConfig(promReceiverConfig) + if err != nil { + return err + } + + if len(scrapeConfigs) == 0 { + return fmt.Errorf("either at least one scrape config needs to be defined or PrometheusCR needs to be enabled") + } + + return nil +} diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/pkg/targetallocator/adapters/config_to_prom_config_test.go index 74b363aa2..5aa98cd60 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config_test.go +++ b/pkg/targetallocator/adapters/config_to_prom_config_test.go @@ -366,3 +366,85 @@ func TestValidatePromConfig(t *testing.T) { }) } } + +func TestValidateTargetAllocatorConfig(t *testing.T) { + testCases := []struct { + description string + config map[interface{}]interface{} + targetAllocatorPrometheusCR bool + expectedError error + }{ + { + description: "scrape configs present and PrometheusCR enabled", + config: map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{ + map[interface{}]interface{}{ + "job_name": "test_job", + "static_configs": []interface{}{ + map[interface{}]interface{}{ + "targets": []interface{}{ + "localhost:9090", + }, + }, + }, + }, + }, + }, + }, + targetAllocatorPrometheusCR: true, + expectedError: nil, + }, + { + description: "scrape configs present and PrometheusCR disabled", + config: map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{ + map[interface{}]interface{}{ + "job_name": "test_job", + "static_configs": []interface{}{ + map[interface{}]interface{}{ + "targets": []interface{}{ + "localhost:9090", + }, + }, + }, + }, + }, + }, + }, + targetAllocatorPrometheusCR: false, + expectedError: nil, + }, + { + description: "receiver config empty and PrometheusCR enabled", + config: map[interface{}]interface{}{}, + targetAllocatorPrometheusCR: true, + expectedError: nil, + }, + { + description: "receiver config empty and PrometheusCR disabled", + config: map[interface{}]interface{}{}, + targetAllocatorPrometheusCR: false, + expectedError: fmt.Errorf("no %s available as part of the configuration", "prometheusConfig"), + }, + { + description: "scrape configs empty and PrometheusCR disabled", + config: map[interface{}]interface{}{ + "config": map[interface{}]interface{}{ + "scrape_configs": []interface{}{}, + }, + }, + targetAllocatorPrometheusCR: false, + expectedError: fmt.Errorf("either at least one scrape config needs to be defined or PrometheusCR needs to be enabled"), + }, + } + + for _, testCase := range testCases { + testCase := testCase + t.Run(testCase.description, func(t *testing.T) { + err := ta.ValidateTargetAllocatorConfig(testCase.targetAllocatorPrometheusCR, testCase.config) + assert.Equal(t, testCase.expectedError, err) + }) + } +} From 0bfbea9e250899365856173d842bee4b797bc42b Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Wed, 28 Jun 2023 17:08:43 +0200 Subject: [PATCH 0905/1234] Fix for #1820 and #1821, unit tests (#1847) * fix #1820 & #1821 plus unit tests * unit test fix * chloggen * mount point fix --------- Co-authored-by: Pavol Loffay --- .chloggen/1847-fix-issues-1820-1821.yaml | 16 ++ pkg/instrumentation/apachehttpd.go | 27 +++- pkg/instrumentation/apachehttpd_test.go | 184 ++++++++++++++++++++++- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- 5 files changed, 223 insertions(+), 8 deletions(-) create mode 100644 .chloggen/1847-fix-issues-1820-1821.yaml diff --git a/.chloggen/1847-fix-issues-1820-1821.yaml b/.chloggen/1847-fix-issues-1820-1821.yaml new file mode 100644 index 000000000..7d8efde72 --- /dev/null +++ b/.chloggen/1847-fix-issues-1820-1821.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Fix for #1820 and #1821 plus added covering unit tests." + +# One or more tracking issues related to the change +issues: [1847] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index 30e6f7b75..c3aafe56d 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -26,7 +26,7 @@ import ( ) const ( - apacheConfigDirectory = "/usr/local/apache2/conf" + apacheDefaultConfigDirectory = "/usr/local/apache2/conf" apacheConfigFile = "httpd.conf" apacheAgentConfigFile = "opentemetry_agent.conf" apacheAgentDirectory = "/opt/opentelemetry-webserver" @@ -81,10 +81,12 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod EmptyDir: &corev1.EmptyDirVolumeSource{}, }}) + apacheConfDir := getApacheConfDir(apacheSpec.ConfigPath) + cloneContainer := container.DeepCopy() cloneContainer.Name = apacheAgentCloneContainerName cloneContainer.Command = []string{"/bin/sh", "-c"} - cloneContainer.Args = []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentConfDirFull} + cloneContainer.Args = []string{"cp -r " + apacheConfDir + "/* " + apacheAgentConfDirFull} cloneContainer.VolumeMounts = append(cloneContainer.VolumeMounts, corev1.VolumeMount{ Name: apacheAgentConfigVolume, MountPath: apacheAgentConfDirFull, @@ -92,6 +94,10 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod // remove resource requirements since those are then reserved for the lifetime of a pod // and we definitely do not need them for the init container for cp command cloneContainer.Resources = apacheSpec.Resources + // remove livenessProbe, readinessProbe, and startupProbe, since not supported on init containers + cloneContainer.LivenessProbe = nil + cloneContainer.ReadinessProbe = nil + cloneContainer.StartupProbe = nil pod.Spec.InitContainers = append(pod.Spec.InitContainers, *cloneContainer) @@ -99,7 +105,7 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod // since it could over-write configuration provided by the injection idxFound := -1 for idx, volume := range container.VolumeMounts { - if strings.Contains(volume.MountPath, apacheConfigDirectory) { // potentially passes config, which we want to pass to init copy only + if strings.Contains(volume.MountPath, apacheConfDir) { // potentially passes config, which we want to pass to init copy only idxFound = idx break } @@ -117,7 +123,7 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod }) container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ Name: apacheAgentConfigVolume, - MountPath: apacheConfigDirectory, + MountPath: apacheConfDir, }) } @@ -146,7 +152,7 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod "echo \"$" + apacheAttributesEnvVar + "\" > " + apacheAgentConfDirFull + "/" + apacheAgentConfigFile + " && " + "sed -i 's/" + apacheServiceInstanceId + "/'${" + apacheServiceInstanceIdEnvVar + "}'/g' " + apacheAgentConfDirFull + "/" + apacheAgentConfigFile + " && " + // Include a link to include Apache agent configuration file into httpd.conf - "echo 'Include " + apacheConfigDirectory + "/" + apacheAgentConfigFile + "' >> " + apacheAgentConfDirFull + "/" + apacheConfigFile, + "echo 'Include " + getApacheConfDir(apacheSpec.ConfigPath) + "/" + apacheAgentConfigFile + "' >> " + apacheAgentConfDirFull + "/" + apacheConfigFile, }, Env: []corev1.EnvVar{ { @@ -256,3 +262,14 @@ LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel%[2 return configFileContent } + +func getApacheConfDir(configuredDir string) string { + apacheConfDir := apacheDefaultConfigDirectory + if configuredDir != "" { + apacheConfDir = configuredDir + if apacheConfDir[len(apacheConfDir)-1] == '/' { + apacheConfDir = apacheConfDir[:len(apacheConfDir)-1] + } + } + return apacheConfDir +} diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index b9d3782c3..e74d9630b 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -109,7 +109,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { }, { Name: apacheAgentConfigVolume, - MountPath: apacheConfigDirectory, + MountPath: apacheDefaultConfigDirectory, }, }, }, @@ -117,6 +117,188 @@ func TestInjectApacheHttpdagent(t *testing.T) { }, }, }, + // === Test ConfigPath configuration ============================= + { + name: "ConfigPath honored", + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "foo/bar:1", + ConfigPath: "/opt/customPath", + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /opt/customPath/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /opt/customPath/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: "/opt/customPath", + }, + }, + }, + }, + }, + }, + }, + // === Test Removal of probes ============================= + { + name: "Probes removed on clone init container", + ApacheHttpd: v1alpha1.ApacheHttpd{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + ReadinessProbe: &corev1.Probe{}, + StartupProbe: &corev1.Probe{}, + LivenessProbe: &corev1.Probe{}, + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheDefaultConfigDirectory, + }, + }, + ReadinessProbe: &corev1.Probe{}, + StartupProbe: &corev1.Probe{}, + LivenessProbe: &corev1.Probe{}, + }, + }, + }, + }, + }, } resourceMap := map[string]string{ diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 01e732626..71a679381 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1477,7 +1477,7 @@ func TestMutatePod(t *testing.T) { }, { Name: apacheAgentConfigVolume, - MountPath: apacheConfigDirectory, + MountPath: apacheDefaultConfigDirectory, }, }, Env: []corev1.EnvVar{ diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 7d4e73489..84b0b1e12 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1314,7 +1314,7 @@ func TestInjectApacheHttpd(t *testing.T) { }, { Name: apacheAgentConfigVolume, - MountPath: apacheConfigDirectory, + MountPath: apacheDefaultConfigDirectory, }, }, Env: []corev1.EnvVar{ From 17e681d1df853be639c6351ad528677d8c33fba0 Mon Sep 17 00:00:00 2001 From: Chao Lv Date: Wed, 28 Jun 2023 23:08:51 +0800 Subject: [PATCH 0906/1234] feat: add skywalking parser to parse servicePort from config (#1650) Co-authored-by: Pavol Loffay --- .chloggen/add-skywalking-parser.yaml | 16 +++ pkg/collector/parser/receiver_skywalking.go | 128 ++++++++++++++++++ .../parser/receiver_skywalking_test.go | 108 +++++++++++++++ 3 files changed, 252 insertions(+) create mode 100644 .chloggen/add-skywalking-parser.yaml create mode 100644 pkg/collector/parser/receiver_skywalking.go create mode 100644 pkg/collector/parser/receiver_skywalking_test.go diff --git a/.chloggen/add-skywalking-parser.yaml b/.chloggen/add-skywalking-parser.yaml new file mode 100644 index 000000000..c5fef81f6 --- /dev/null +++ b/.chloggen/add-skywalking-parser.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: collector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add Skywalking parser to extract skywalking service port from config + +# One or more tracking issues related to the change +issues: [1634] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/parser/receiver_skywalking.go b/pkg/collector/parser/receiver_skywalking.go new file mode 100644 index 000000000..bddd92114 --- /dev/null +++ b/pkg/collector/parser/receiver_skywalking.go @@ -0,0 +1,128 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" +) + +var _ ReceiverParser = &SkywalkingReceiverParser{} + +const ( + parserNameSkywalking = "__skywalking" + + defaultSkywalkingGRPCPort int32 = 11800 + defaultSkywalkingHTTPPort int32 = 12800 +) + +// SkywalkingReceiverParser parses the configuration for Skywalking receivers. +type SkywalkingReceiverParser struct { + config map[interface{}]interface{} + logger logr.Logger + name string +} + +// NewSkywalkingReceiverParser builds a new parser for Skywalking receivers. +func NewSkywalkingReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { + return &SkywalkingReceiverParser{ + logger: logger, + name: name, + config: protocols, + } + } + + return &SkywalkingReceiverParser{ + name: name, + config: map[interface{}]interface{}{}, + } +} + +// Ports returns all the service ports for all protocols in this parser. +func (o *SkywalkingReceiverParser) Ports() ([]corev1.ServicePort, error) { + ports := []corev1.ServicePort{} + + for _, protocol := range []struct { + name string + defaultPorts []corev1.ServicePort + }{ + { + name: grpc, + defaultPorts: []corev1.ServicePort{ + { + Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultSkywalkingGRPCPort), + Port: defaultSkywalkingGRPCPort, + TargetPort: intstr.FromInt(int(defaultSkywalkingGRPCPort)), + AppProtocol: &grpc, + }, + }, + }, + { + name: http, + defaultPorts: []corev1.ServicePort{ + { + Name: portName(fmt.Sprintf("%s-http", o.name), defaultSkywalkingHTTPPort), + Port: defaultSkywalkingHTTPPort, + TargetPort: intstr.FromInt(int(defaultSkywalkingHTTPPort)), + AppProtocol: &http, + }, + }, + }, + } { + // do we have the protocol specified at all? + if receiverProtocol, ok := o.config[protocol.name]; ok { + // we have the specified protocol, we definitely need a service port + nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) + var protocolPort *corev1.ServicePort + + // do we have a configuration block for the protocol? + settings, ok := receiverProtocol.(map[interface{}]interface{}) + if ok { + protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) + } + + // have we parsed a port based on the configuration block? + // if not, we use the default port + if protocolPort == nil { + ports = append(ports, protocol.defaultPorts...) + } else { + // infer protocol and appProtocol from protocol.name + if protocol.name == grpc { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &grpc + } else if protocol.name == http { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &http + } + ports = append(ports, *protocolPort) + } + } + } + + return ports, nil +} + +// ParserName returns the name of this parser. +func (o *SkywalkingReceiverParser) ParserName() string { + return parserNameSkywalking +} + +func init() { + Register("skywalking", NewSkywalkingReceiverParser) +} diff --git a/pkg/collector/parser/receiver_skywalking_test.go b/pkg/collector/parser/receiver_skywalking_test.go new file mode 100644 index 000000000..46d60cd84 --- /dev/null +++ b/pkg/collector/parser/receiver_skywalking_test.go @@ -0,0 +1,108 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestSkywalkingSelfRegisters(t *testing.T) { + // verify + assert.True(t, IsRegistered("skywalking")) +} + +func TestSkywalkingIsFoundByName(t *testing.T) { + // test + p := For(logger, "skywalking", map[interface{}]interface{}{}) + + // verify + assert.Equal(t, "__skywalking", p.ParserName()) +} + +func TestSkywalkingPortsOverridden(t *testing.T) { + // prepare + builder := NewSkywalkingReceiverParser(logger, "skywalking", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, + "http": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1235", + }, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "skywalking-grpc": {portNumber: 1234}, + "skywalking-http": {portNumber: 1235}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, len(expectedResults)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} + +func TestSkywalkingExposeDefaultPorts(t *testing.T) { + // prepare + builder := NewSkywalkingReceiverParser(logger, "skywalking", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "http": map[interface{}]interface{}{}, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "skywalking-grpc": {portNumber: 11800}, + "skywalking-http": {portNumber: 12800}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, len(expectedResults)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} From 45704bb678795d3c1d27d2db39004e71f624e63b Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Wed, 28 Jun 2023 21:48:04 +0530 Subject: [PATCH 0907/1234] Prepare Release 0.80.0 (#1871) * Prepare Release 0.80.0 * rebase and update changelog * rebase-2 * rebase-3 --- .chloggen/1684-init-containers.yaml | 16 --------- ...ometheus-cr-scrape-config-credentials.yaml | 16 --------- ...rash-upgrading-collector-with-old-hpa.yaml | 16 --------- .chloggen/1811-fix-empty-scrape-interval.yaml | 16 --------- .chloggen/1826-apache-instr-unit-tests.yaml | 16 --------- .../1827-apache-httpd-image-v-1-0-3.yaml | 16 --------- .chloggen/1847-fix-issues-1820-1821.yaml | 16 --------- .chloggen/1853-nginx-crd.yaml | 16 --------- .chloggen/add-skywalking-parser.yaml | 16 --------- .chloggen/bump-nodejs.yaml | 16 --------- .chloggen/parentbased-jaeger-remote.yaml | 16 --------- .../targetallocator-reject-no-targets.yaml | 16 --------- .chloggen/update-operator-sdk128.yaml | 16 --------- CHANGELOG.md | 35 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- versions.txt | 12 +++---- 18 files changed, 47 insertions(+), 220 deletions(-) delete mode 100755 .chloggen/1684-init-containers.yaml delete mode 100644 .chloggen/1710-prometheus-cr-scrape-config-credentials.yaml delete mode 100755 .chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml delete mode 100755 .chloggen/1811-fix-empty-scrape-interval.yaml delete mode 100755 .chloggen/1826-apache-instr-unit-tests.yaml delete mode 100755 .chloggen/1827-apache-httpd-image-v-1-0-3.yaml delete mode 100644 .chloggen/1847-fix-issues-1820-1821.yaml delete mode 100755 .chloggen/1853-nginx-crd.yaml delete mode 100644 .chloggen/add-skywalking-parser.yaml delete mode 100755 .chloggen/bump-nodejs.yaml delete mode 100755 .chloggen/parentbased-jaeger-remote.yaml delete mode 100755 .chloggen/targetallocator-reject-no-targets.yaml delete mode 100755 .chloggen/update-operator-sdk128.yaml diff --git a/.chloggen/1684-init-containers.yaml b/.chloggen/1684-init-containers.yaml deleted file mode 100755 index 23ee0ea26..000000000 --- a/.chloggen/1684-init-containers.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Collector - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Adds ability to set init containers for collector - -# One or more tracking issues related to the change -issues: [1684] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml b/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml deleted file mode 100644 index 7231c5fcb..000000000 --- a/.chloggen/1710-prometheus-cr-scrape-config-credentials.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Populate credentials for Prometheus CR (service and pod monitor) scrape configs. - -# One or more tracking issues related to the change -issues: [1669] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml b/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml deleted file mode 100755 index d7f9a53e8..000000000 --- a/.chloggen/1799-fix-crash-upgrading-collector-with-old-hpa.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix the upgrade mechanism to not crash when one OTEL Collector instance uses the old approach to set the autoscaler. - -# One or more tracking issues related to the change -issues: [1799] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1811-fix-empty-scrape-interval.yaml b/.chloggen/1811-fix-empty-scrape-interval.yaml deleted file mode 100755 index 288684c4e..000000000 --- a/.chloggen/1811-fix-empty-scrape-interval.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix the empty global scrape interval in Prometheus CR watcher, which causes configuration unmarshalling to fail. - -# One or more tracking issues related to the change -issues: [1811] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1826-apache-instr-unit-tests.yaml b/.chloggen/1826-apache-instr-unit-tests.yaml deleted file mode 100755 index c17bc594c..000000000 --- a/.chloggen/1826-apache-instr-unit-tests.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Adding more tests to validate existence of init containers. - -# One or more tracking issues related to the change -issues: [1826] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml b/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml deleted file mode 100755 index 403a40181..000000000 --- a/.chloggen/1827-apache-httpd-image-v-1-0-3.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: For Apache HTTPD instrumentation, use latest instrumentation library v1.0.3. - -# One or more tracking issues related to the change -issues: [1827] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1847-fix-issues-1820-1821.yaml b/.chloggen/1847-fix-issues-1820-1821.yaml deleted file mode 100644 index 7d8efde72..000000000 --- a/.chloggen/1847-fix-issues-1820-1821.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Fix for #1820 and #1821 plus added covering unit tests." - -# One or more tracking issues related to the change -issues: [1847] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1853-nginx-crd.yaml b/.chloggen/1853-nginx-crd.yaml deleted file mode 100755 index 81e655459..000000000 --- a/.chloggen/1853-nginx-crd.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: new_component - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Instrumentation crd for Nginx auto-instrumentation. - -# One or more tracking issues related to the change -issues: [1853] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-skywalking-parser.yaml b/.chloggen/add-skywalking-parser.yaml deleted file mode 100644 index c5fef81f6..000000000 --- a/.chloggen/add-skywalking-parser.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: collector - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add Skywalking parser to extract skywalking service port from config - -# One or more tracking issues related to the change -issues: [1634] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-nodejs.yaml b/.chloggen/bump-nodejs.yaml deleted file mode 100755 index 2221d95cf..000000000 --- a/.chloggen/bump-nodejs.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation/nodejs - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump python packages to 1.14.0/0.40.0 - -# One or more tracking issues related to the change -issues: [1790] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/parentbased-jaeger-remote.yaml b/.chloggen/parentbased-jaeger-remote.yaml deleted file mode 100755 index 68c094cf7..000000000 --- a/.chloggen/parentbased-jaeger-remote.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: samplers - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add ParentBasedJaegerRemote sampler & validate argument - -# One or more tracking issues related to the change -issues: [1801] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/targetallocator-reject-no-targets.yaml b/.chloggen/targetallocator-reject-no-targets.yaml deleted file mode 100755 index 703d2e883..000000000 --- a/.chloggen/targetallocator-reject-no-targets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Only admit configurations where Target Allocator actually has targets - -# One or more tracking issues related to the change -issues: [1859] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/update-operator-sdk128.yaml b/.chloggen/update-operator-sdk128.yaml deleted file mode 100755 index fdbafab10..000000000 --- a/.chloggen/update-operator-sdk128.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Operator-sdk upgrade to v1.29.0 - -# One or more tracking issues related to the change -issues: [1755] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 86ca53a47..ae93d16f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,41 @@ Changes by Version +## 0.80.0 + +### 💡 Enhancements 💡 + +- `collector`: Add Skywalking parser to extract skywalking service port from config (#1634) +- `target allocator`: Only admit configurations where Target Allocator actually has targets (#1859) +- `target allocator`: Populate credentials for Prometheus CR (service and pod monitor) scrape configs. (#1669) +- `collector`: Adds ability to set init containers for collector (#1684) +- `operator`: Adding more tests to validate existence of init containers. (#1826) +- `operator`: For Apache HTTPD instrumentation, use latest instrumentation library v1.0.3. (#1827) +- `autoinstrumentation/nodejs`: Bump python packages to 1.14.0/0.40.0 (#1790) +- `samplers`: Add ParentBasedJaegerRemote sampler & validate argument (#1801) +- `operator`: Operator-sdk upgrade to v1.29.0 (#1755) + +### 🧰 Bug fixes 🧰 + +- `operator`: Fix for #1820 and #1821 plus added covering unit tests. (#1847) +- `operator`: Fix the upgrade mechanism to not crash when one OTEL Collector instance uses the old approach to set the autoscaler. (#1799) +- `target allocator`: Fix the empty global scrape interval in Prometheus CR watcher, which causes configuration unmarshalling to fail. (#1811) + +### 🚀 New components 🚀 + +- `operator`: Instrumentation crd for Nginx auto-instrumentation. (#1853) + +### Components + +* [OpenTelemetry Collector - v0.80.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.80.0) +* [OpenTelemetry Contrib - v0.80.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.80.0) +* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) +* [Node.JS - 0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.40.0) +* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) +* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) + ## 0.79.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 0f8467a1f..8e7d9c904 100644 --- a/README.md +++ b/README.md @@ -582,6 +582,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.80.0 | v1.19 to v1.27 | v1 | | v0.79.0 | v1.19 to v1.27 | v1 | | v0.78.0 | v1.19 to v1.27 | v1 | | v0.77.0 | v1.19 to v1.26 | v1 | @@ -604,7 +605,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.59.0 | v1.19 to v1.24 | v1 | | v0.58.0 | v1.19 to v1.24 | v1 | | v0.57.2 | v1.19 to v1.24 | v1 | -| v0.56.0 | v1.19 to v1.24 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 48851c382..0e1897d2f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.80.0 | @VineethReddy02 | | v0.81.0 | @TylerHelmuth | | v0.82.0 | @frzifus | | v0.83.0 | @yuriolisa | | v0.84.0 | @jaronoff97 | | v0.85.0 | @pavolloffay | +| v0.86.0 | @VineethReddy02 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 38e27379d..3bac4a0d6 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-06-26T19:16:11Z" + createdAt: "2023-06-27T04:32:56Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.79.0 + name: opentelemetry-operator.v0.80.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -308,7 +308,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.79.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.80.0 livenessProbe: httpGet: path: /healthz @@ -415,7 +415,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.79.0 + version: 0.80.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 9296b7b84..9f38586e6 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.79.0 +opentelemetry-collector=0.80.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.79.0 +operator=0.80.0 # Represents the current release of the Target Allocator. -targetallocator=0.79.0 +targetallocator=0.80.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.79.0 +operator-opamp-bridge=0.80.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -19,7 +19,7 @@ autoinstrumentation-java=1.26.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.39.1 +autoinstrumentation-nodejs=0.40.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt @@ -34,4 +34,4 @@ autoinstrumentation-go=v0.2.1-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt -autoinstrumentation-apache-httpd=1.0.2 +autoinstrumentation-apache-httpd=1.0.3 From 257741d5da8586ced34616381d1616180d9a3195 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 30 Jun 2023 19:39:59 +0530 Subject: [PATCH 0908/1234] [chore] Add Dockerfile for OpenShift containerized test execution on Prow CI. (#1865) --- tests/e2e-openshift/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/e2e-openshift/Dockerfile diff --git a/tests/e2e-openshift/Dockerfile b/tests/e2e-openshift/Dockerfile new file mode 100644 index 000000000..715598a53 --- /dev/null +++ b/tests/e2e-openshift/Dockerfile @@ -0,0 +1,22 @@ +# The Dockerfile's resulting image is purpose-built for executing OpenTelemetry Operator e2e tests within the OpenShift release (https://github.com/openshift/release) using Prow CI. + +FROM golang:1.20 + +# Copy the repository files +COPY . /tmp/opentelemetry-operator + +WORKDIR /tmp + +# Install kuttl +RUN curl -L -o kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 \ + && chmod +x kuttl \ + && mv kuttl /usr/local/bin/kuttl + +# Install kubectl and oc +RUN curl -L -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz \ + && tar -xvzf oc.tar.gz \ + && chmod +x kubectl oc \ + && mv oc kubectl /usr/local/bin/ + +# Set the working directory +WORKDIR /tmp/opentelemetry-operator From f2df49d97903765ade356e9d7d35ec6fddb883a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:44:55 +0200 Subject: [PATCH 0909/1234] Bump github.com/prometheus/client_golang in /cmd/otel-allocator (#1848) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pavol Loffay --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index dac6dcf32..bc353de36 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus-operator/prometheus-operator v0.66.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0 - github.com/prometheus/client_golang v1.15.1 + github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 github.com/prometheus/prometheus v0.44.0 github.com/spf13/pflag v1.0.5 @@ -149,7 +149,7 @@ require ( github.com/prometheus/alertmanager v0.25.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/tidwall/pretty v1.2.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index faaa15fa3..ef6050eee 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -577,8 +577,8 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -599,8 +599,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/prometheus v0.44.0 h1:sgn8Fdx+uE5tHQn0/622swlk2XnIj6udoZCnbVjHIgc= github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/jeCdyOWWobLHNKQg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= From a12d944b92074bf81c70a78ba9dbd2668f247519 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Jun 2023 18:50:44 +0200 Subject: [PATCH 0910/1234] Bump github.com/prometheus/prometheus from 0.44.0 to 0.45.0 (#1867) Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.44.0 to 0.45.0. - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.44.0...v0.45.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 54 ++++++++++++++------------ go.sum | 117 ++++++++++++++++++++++++++++++++------------------------- 2 files changed, 95 insertions(+), 76 deletions(-) diff --git a/go.mod b/go.mod index 26ebade09..75f301301 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible - github.com/prometheus/prometheus v0.44.0 + github.com/prometheus/prometheus v0.45.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 @@ -25,33 +25,37 @@ require ( ) require ( - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute v1.19.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.28 // indirect + github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.245 // indirect + github.com/aws/aws-sdk-go v1.44.276 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect + github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/digitalocean/godo v1.98.0 // indirect + github.com/digitalocean/godo v1.99.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.4+incompatible // indirect + github.com/docker/docker v24.0.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/envoyproxy/go-control-plane v0.11.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.1 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.14.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -74,10 +78,10 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.7.1 // indirect - github.com/gophercloud/gophercloud v1.3.0 // indirect + github.com/gophercloud/gophercloud v1.4.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.20.0 // indirect + github.com/hashicorp/consul/api v1.21.0 // indirect github.com/hashicorp/cronexpr v1.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -87,23 +91,24 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 // indirect + github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go v1.42.0 // indirect + github.com/hetznercloud/hcloud-go v1.45.1 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.6 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.7 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect - github.com/linode/linodego v1.16.1 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/linode/linodego v1.17.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.53 // indirect + github.com/miekg/dns v1.1.54 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -112,26 +117,27 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/ovh/go-ovh v1.4.1 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.15.1 // indirect github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 // indirect github.com/spf13/cobra v1.6.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + golang.org/x/crypto v0.8.0 // indirect + golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect @@ -140,13 +146,13 @@ require ( gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/api v0.114.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect - google.golang.org/grpc v1.53.0 // indirect + google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect + google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.90.1 // indirect + k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 7a28b8ad2..899a78a3a 100644 --- a/go.sum +++ b/go.sum @@ -20,8 +20,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= +cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -39,12 +39,18 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1 h1:gVXuXcWd1i4C2Ruxe321aU+IKGaStvGB/S90PUPB/W8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1/go.mod h1:DffdKW9RFqa5VgmsjUOsS7UE7eiA5iAvYUs63bhKQ0M= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 h1:T8quHYlUGyb/oqtSTwqlCr1ilJHrDv+ZtpSfo+hm1BU= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1/go.mod h1:gLa1CL2RNE4s7M3yopJ/p0iq5DdY6Yv5ZUt9MTRZOQM= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= +github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= +github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= @@ -60,6 +66,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 h1:oPdPEZFSbl7oSPEAIPMPBMUmiL+mqgzBJwM/9qYcwNg= +github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1/go.mod h1:4qFor3D/HDsvBME35Xy9rwW9DecL+M2sNw1ybjPtwA0= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -83,8 +91,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.245 h1:KtY2s4q31/kn33AdV63R5t77mdxsI7rq3YT7Mgo805M= -github.com/aws/aws-sdk-go v1.44.245/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.276 h1:ywPlx9C5Yc482dUgAZ9bHpQ6onVvJvYE9FJWsNDCEy0= +github.com/aws/aws-sdk-go v1.44.276/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -107,20 +115,20 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= -github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74 h1:zlUubfBUxApscKFsF4VSvvfhsBNTBu0eF/ddvpo96yk= +github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.98.0 h1:potyC1eD0N9n5/P4/WmJuKgg+OGYZOBWEW+/aKTX6QQ= -github.com/digitalocean/godo v1.98.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= +github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= +github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek= -github.com/docker/docker v23.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= +github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -136,8 +144,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.1 h1:kt9FtLiooDc0vbwTLhdg3dyNX1K9Qwa1EK9LcD4jVUQ= +github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= @@ -146,6 +154,7 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -184,7 +193,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -250,7 +258,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= +github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -261,15 +269,15 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/gophercloud/gophercloud v1.3.0 h1:RUKyCMiZoQR3VlVR5E3K7PK1AC3/qppsWYo6dtBiqs8= -github.com/gophercloud/gophercloud v1.3.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.4.0 h1:RqEu43vaX0lb0LanZr5BylK5ICVxjpFFoc0sxivyuHU= +github.com/gophercloud/gophercloud v1.4.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= -github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/api v1.21.0 h1:WMR2JiyuaQWRAMFaOGiYfY4Q4HRpyYRe/oYQofjyduM= +github.com/hashicorp/consul/api v1.21.0/go.mod h1:f8zVJwBcLdr1IQnfdfszjUM0xzp31Zl3bpws3pL9uFM= github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= @@ -311,19 +319,19 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 h1:I5xhKLePXpXgM6pZ4xZNTiurLLS3sGuZrZFFzAbM67A= -github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197/go.mod h1:2TCrNvonL09r7EiQ6M2rNt+Cmjbn1QbzchFoTWJFpj4= +github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f h1:yxjcAZRuYymIDC0W4IQHgTe9EQdu2BsjPlVmKwyVZT4= +github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f/go.mod h1:Xjd3OXUTfsWbCCBsQd3EdfPTz5evDi+fxqdvpN+WqQg= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go v1.42.0 h1:Es/CDOForQN3nOOP5Vxh1N/YHjpCg386iYEX5zCgi+A= -github.com/hetznercloud/hcloud-go v1.42.0/go.mod h1:YADL8AbmQYH0Eo+1lkuyoc8LutT0UeMvaKP47nNUb+Y= +github.com/hetznercloud/hcloud-go v1.45.1 h1:nl0OOklFfQT5J6AaNIOhl5Ruh3fhmGmhvZEqHbibVuk= +github.com/hetznercloud/hcloud-go v1.45.1/go.mod h1:aAUGxSfSnB8/lVXHNEDxtCT1jykaul8kqjD7f5KQXF8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.6 h1:0n4irdqNska+1s3YMCRhrAqKbibEgQ7SwwhAlHzYT5A= -github.com/ionos-cloud/sdk-go/v6 v6.1.6/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.7 h1:uVG1Q/ZDJ7YmCI9Oevpue9xJEH5UrUMyXv8gm7NTxIw= +github.com/ionos-cloud/sdk-go/v6 v6.1.7/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -359,8 +367,10 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= -github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/linode/linodego v1.17.0 h1:aWS98f0jUoY2lhsEuBxRdVkqyGM0nazPd68AEDF0EvU= +github.com/linode/linodego v1.17.0/go.mod h1:/omzPxie0/YI6S0sTw1q47qDt5IYSlbO/infRR4UG+A= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -384,8 +394,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= -github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= +github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -420,6 +430,8 @@ github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -446,8 +458,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -457,18 +469,18 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.44.0 h1:sgn8Fdx+uE5tHQn0/622swlk2XnIj6udoZCnbVjHIgc= -github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/jeCdyOWWobLHNKQg= +github.com/prometheus/prometheus v0.45.0 h1:O/uG+Nw4kNxx/jDPxmjsSDd+9Ohql6E7ZSY1x5x/0KI= +github.com/prometheus/prometheus v0.45.0/go.mod h1:jC5hyO8ItJBnDWGecbEucMyXjzxGv9cxsxsjS9u5s1w= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= +github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -522,8 +534,8 @@ go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZE go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -542,8 +554,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -554,8 +566,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -629,8 +641,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -690,6 +702,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -835,8 +848,8 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 h1:khxVcsk/FhnzxMKOyD+TDGwjbEOpcPuIpmafPGFmhMA= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -853,8 +866,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -913,8 +926,8 @@ k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw= From 878a402a770656571f8f3792c34d87273dc51884 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 3 Jul 2023 17:23:17 +0200 Subject: [PATCH 0911/1234] Added Bundle Image (#1877) * Added Bundle Image Signed-off-by: Yuri Sa * Added Bundle Image Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/1823-new-catalog-source.yaml | 16 ++++++++++ Makefile | 41 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100755 .chloggen/1823-new-catalog-source.yaml diff --git a/.chloggen/1823-new-catalog-source.yaml b/.chloggen/1823-new-catalog-source.yaml new file mode 100755 index 000000000..56948e05b --- /dev/null +++ b/.chloggen/1823-new-catalog-source.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Create index image to be used as a Catalog. + +# One or more tracking issues related to the change +issues: [1823] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Makefile b/Makefile index b448cf282..a6657d406 100644 --- a/Makefile +++ b/Makefile @@ -424,3 +424,44 @@ chlog-preview: chlog-install chlog-update: chlog-install $(CHLOGGEN) update --version $(VERSION) + +.PHONY: opm +OPM = ./bin/opm +opm: ## Download opm locally if necessary. +ifeq (,$(wildcard $(OPM))) +ifeq (,$(shell which opm 2>/dev/null)) + @{ \ + set -e ;\ + mkdir -p $(dir $(OPM)) ;\ + OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \ + curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.28.0/$${OS}-$${ARCH}-opm ;\ + chmod +x $(OPM) ;\ + } +else +OPM = $(shell which opm) +endif +endif + +# A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0). +# These images MUST exist in a registry and be pull-able. +BUNDLE_IMGS ?= $(BUNDLE_IMG) + +# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0). +CATALOG_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-catalog:${VERSION} + +# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image. +ifneq ($(origin CATALOG_BASE_IMG), undefined) +FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG) +endif + +# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'. +# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see: +# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator +.PHONY: catalog-build +catalog-build: opm bundle-build bundle-push ## Build a catalog image. + $(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) + +# Push the catalog image. +.PHONY: catalog-push +catalog-push: ## Push a catalog image. + docker push $(CATALOG_IMG) \ No newline at end of file From 92e5deea1203215657efa65003001b5405773880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 5 Jul 2023 08:46:47 +0100 Subject: [PATCH 0912/1234] Fix `.sampler.type` being incorrectly required for Instrumentation (#1887) --- .chloggen/fix_sampler-type-required.yaml | 16 ++++++++++++++++ apis/v1alpha1/instrumentation_webhook.go | 1 + apis/v1alpha1/instrumentation_webhook_test.go | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100755 .chloggen/fix_sampler-type-required.yaml diff --git a/.chloggen/fix_sampler-type-required.yaml b/.chloggen/fix_sampler-type-required.yaml new file mode 100755 index 000000000..836769360 --- /dev/null +++ b/.chloggen/fix_sampler-type-required.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix `.sampler.type` being incorrectly required for Instrumentation + +# One or more tracking issues related to the change +issues: [1886] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 26b376d7d..234784dd1 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -246,6 +246,7 @@ func validateJaegerRemoteSamplerArgument(argument string) error { func (r *Instrumentation) validate() error { switch r.Spec.Sampler.Type { + case "": // not set, do nothing case TraceIDRatio, ParentBasedTraceIDRatio: if r.Spec.Sampler.Argument != "" { rate, err := strconv.ParseFloat(r.Spec.Sampler.Argument, 64) diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index eadbee4ef..0ccd12346 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -47,6 +47,20 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { err string inst Instrumentation }{ + { + name: "all defaults", + inst: Instrumentation{ + Spec: InstrumentationSpec{}, + }, + }, + { + name: "sampler configuration not present", + inst: Instrumentation{ + Spec: InstrumentationSpec{ + Sampler: Sampler{}, + }, + }, + }, { name: "argument is not a number", err: "spec.sampler.argument is not a number", From e0d3fe859fa0b3dcb3589aadfe352a808f005cc5 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Wed, 5 Jul 2023 16:45:35 +0530 Subject: [PATCH 0913/1234] Add functional test for OTLP metrics collection and forward to prometheus (#1850) Signed-off-by: Ishwar Kanse Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- CONTRIBUTING.md | 9 ++++ Makefile | 5 ++ kuttl-test-openshift.yaml | 6 +++ .../otlp-metrics-traces/00-assert.yaml | 10 ++++ .../00-install-jaeger.yaml | 18 +++++++ .../otlp-metrics-traces/01-assert.yaml | 22 ++++++++ .../01-workload-monitoring.yaml | 11 ++++ .../otlp-metrics-traces/02-assert.yaml | 9 ++++ .../02-otel-metrics-collector.yaml | 39 ++++++++++++++ .../otlp-metrics-traces/03-assert.yaml | 25 +++++++++ .../otlp-metrics-traces/03-podmonitor.yaml | 26 ++++++++++ .../otlp-metrics-traces/04-assert.yaml | 22 ++++++++ .../04-metrics-traces-gen.yaml | 52 +++++++++++++++++++ .../otlp-metrics-traces/05-assert.yaml | 6 +++ .../otlp-metrics-traces/06-assert.yaml | 6 +++ .../otlp-metrics-traces/check_metrics.sh | 15 ++++++ .../otlp-metrics-traces/check_traces.sh | 12 +++++ 17 files changed, 293 insertions(+) create mode 100644 kuttl-test-openshift.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml create mode 100644 tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml create mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh create mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_traces.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7cc2550da..ed869bb3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -107,6 +107,15 @@ Once they are installed, the tests can be executed with `make prepare-e2e`, whic The tests are located under `tests/e2e` and are written to be used with `kuttl`. Refer to their documentation to understand how tests are written. +### OpenShift End to End tests +To run the end-to-end tests written for OpenShift, you'll need a OpenShift cluster. + +To install the OpenTelemetry operator, please follow the instructions in [Operator Lifecycle Manager (OLM)](https://github.com/open-telemetry/opentelemetry-operator/blob/main/CONTRIBUTING.md#operator-lifecycle-manager-olm) + +Once the operator is installed, the tests can be executed using `make e2e-openshift`, which will call to the `e2e-openshift` target. Note that `kind` is disabled for the TestSuite as the requirement is to use an OpenShift cluster for these test cases. + +The tests are located under `tests/e2e-openshift` and are written to be used with `kuttl`. + ### Undeploying the operator from the local cluster ```bash diff --git a/Makefile b/Makefile index a6657d406..7afc85001 100644 --- a/Makefile +++ b/Makefile @@ -186,6 +186,11 @@ e2e-upgrade: undeploy e2e-autoscale: $(KUTTL) test --config kuttl-test-autoscale.yaml +# end-to-end-test for testing OpenShift cases +.PHONY: e2e-openshift +e2e-openshift: + $(KUTTL) test --config kuttl-test-openshift.yaml + .PHONY: e2e-log-operator e2e-log-operator: kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager diff --git a/kuttl-test-openshift.yaml b/kuttl-test-openshift.yaml new file mode 100644 index 000000000..418598083 --- /dev/null +++ b/kuttl-test-openshift.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +startKIND: false +testDirs: + - ./tests/e2e-openshift/ +timeout: 150 diff --git a/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml new file mode 100644 index 000000000..ef885ad07 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: kuttl-otlp-metrics + name: jaeger-allinone +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 diff --git a/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml b/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml new file mode 100644 index 000000000..a941089d4 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml @@ -0,0 +1,18 @@ +#Create the "kuttl-otlp-metrics" project to fulfill the requirement of specifying the Jaeger and OTEL collector endpoints. This project is essential due to KUTTL's current lack of support for templating. +#For this test case you'll need to install the Jaeger operator (OpenShift Distributed Tracing Platform in OpenShift) + +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-otlp-metrics + +--- +apiVersion: jaegertracing.io/v1 +kind: Jaeger +metadata: + name: jaeger-allinone + namespace: kuttl-otlp-metrics +spec: + strategy: allinone + ingress: + security: none diff --git a/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml new file mode 100644 index 000000000..268aa391d --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml @@ -0,0 +1,22 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: openshift-user-workload-monitoring +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + namespace: openshift-user-workload-monitoring +status: + availableReplicas: 2 + currentReplicas: 2 + readyReplicas: 2 + replicas: 2 + updatedReplicas: 2 + diff --git a/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml b/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml new file mode 100644 index 000000000..1d5c5e4b1 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml @@ -0,0 +1,11 @@ +# oc -n openshift-user-workload-monitoring get pod +# https://docs.openshift.com/container-platform/4.13/monitoring/enabling-monitoring-for-user-defined-projects.html#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects + +apiVersion: v1 +kind: ConfigMap +metadata: + name: cluster-monitoring-config + namespace: openshift-monitoring +data: + config.yaml: | + enableUserWorkload: true diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml new file mode 100644 index 000000000..2413e2283 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: kuttl-otlp-metrics +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml new file mode 100644 index 000000000..83257f98a --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml @@ -0,0 +1,39 @@ +#https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/README.md + +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: cluster-collector + namespace: kuttl-otlp-metrics +spec: + mode: deployment + ports: + - name: promexporter + port: 8889 + protocol: TCP + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + jaeger: + endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:14250 + tls: + ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" + prometheus: + endpoint: 0.0.0.0:8889 + resource_to_telemetry_conversion: + enabled: true # by default resource attributes are dropped + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [jaeger] + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus] diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml new file mode 100644 index 000000000..faf3c91c8 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: otel-collector + namespace: kuttl-otlp-metrics +spec: + podMetricsEndpoints: + - port: metrics + - metricRelabelings: + - action: labeldrop + regex: instance + - action: labeldrop + regex: job + port: promexporter + relabelings: + - action: labeldrop + regex: pod + - action: labeldrop + regex: container + - action: labeldrop + regex: endpoint + selector: + matchLabels: + app.kubernetes.io/name: cluster-collector-collector diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml new file mode 100644 index 000000000..b0eaf4363 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml @@ -0,0 +1,26 @@ +#https://docs.openshift.com/container-platform/4.13/monitoring/managing-metrics.html +#https://docs.openshift.com/container-platform/4.13/rest_api/monitoring_apis/podmonitor-monitoring-coreos-com-v1.html +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: otel-collector + namespace: kuttl-otlp-metrics +spec: + selector: + matchLabels: + app.kubernetes.io/name: cluster-collector-collector + podMetricsEndpoints: + - port: metrics + - port: promexporter + relabelings: + - action: labeldrop + regex: pod + - action: labeldrop + regex: container + - action: labeldrop + regex: endpoint + metricRelabelings: + - action: labeldrop + regex: instance + - action: labeldrop + regex: job diff --git a/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml new file mode 100644 index 000000000..73bbb738a --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml @@ -0,0 +1,22 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +status: + active: 1 + ready: 1 + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-metrics +status: + active: 1 + ready: 1 + +--- +apiVersion: v1 +kind: Pod +status: + phase: Running diff --git a/tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml b/tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml new file mode 100644 index 000000000..441b8877a --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml @@ -0,0 +1,52 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +spec: + completions: 1 + parallelism: 1 + template: + metadata: + labels: + app: telemetrygen-traces + spec: + containers: + - name: telemetrygen-traces + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + command: ["./telemetrygen"] + args: + - "--otlp-endpoint=cluster-collector-collector-headless.kuttl-otlp-metrics.svc:4317" + - "--otlp-insecure=true" + - "--rate=1" + - "--duration=30s" + - "--otlp-attributes=telemetrygen=\"traces\"" + - "--otlp-header=telemetrygen=\"traces\"" + - "traces" + restartPolicy: Never + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-metrics +spec: + completions: 1 + parallelism: 1 + template: + metadata: + labels: + app: telemetrygen-metrics + spec: + containers: + - name: telemetrygen-metrics + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + command: ["./telemetrygen"] + args: + - "--otlp-endpoint=cluster-collector-collector-headless.kuttl-otlp-metrics.svc:4317" + - "--otlp-insecure=true" + - "--duration=30s" + - "--rate=1" + - "--otlp-attributes=telemetrygen=\"metrics\"" + - "--otlp-header=telemetrygen=\"traces\"" + - "metrics" + restartPolicy: Never diff --git a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml new file mode 100644 index 000000000..8dcf1e643 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +commands: +- script: ./tests/e2e-openshift/otlp-metrics/check_traces.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml new file mode 100644 index 000000000..63d8d22c4 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +commands: +- script: ./tests/e2e-openshift/otlp-metrics/check_metrics.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh b/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh new file mode 100755 index 000000000..dd44adc87 --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh @@ -0,0 +1,15 @@ +#!/bin/bash +SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}') +TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d) +THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host') + +response=$(curl -k -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" "https://$THANOS_QUERIER_HOST/api/v1/query?query=gen") + +count=$(echo "$response" | jq -r '.data.result | length') + +if [[ $count -eq 0 ]]; then + echo "No telemetrygen metrics count with value present. Exiting with status 1." + exit 1 +else + echo "telemetrygen metrics with value is present." +fi diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh b/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh new file mode 100755 index 000000000..9761284ae --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh @@ -0,0 +1,12 @@ +#!/bin/bash +JAEGER_URL=$(oc -n kuttl-otlp-metrics get route jaeger-allinone -o json | jq '.spec.host' -r) +SERVICE_NAME="telemetrygen" + +trace_exists=$(curl -ksSL "https://$JAEGER_URL/api/traces?service=$SERVICE_NAME&limit=1" | jq -r '.data | length') + +if [[ $trace_exists -gt 0 ]]; then + echo "Traces for $SERVICE_NAME exist in Jaeger." +else + echo "Trace for $SERVICE_NAME does not exist in Jaeger." + exit 1 # Fail the test step if the trace doesn't exist +fi From a133f82da63c634421f57453ad2b5a46b50866d1 Mon Sep 17 00:00:00 2001 From: Christian Mergenthaler <377953+cmergenthaler@users.noreply.github.com> Date: Wed, 5 Jul 2023 22:11:20 +0200 Subject: [PATCH 0914/1234] Fixed minimal target allocator example in readme (#1892) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8e7d9c904..b29f2049d 100644 --- a/README.md +++ b/README.md @@ -549,6 +549,7 @@ spec: config: | receivers: prometheus: + config: exporters: logging: From 7ccefde166f922c4e9e5d07db4e8ff20a5e0d1eb Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Thu, 6 Jul 2023 13:59:18 +0530 Subject: [PATCH 0915/1234] Skip service port for scraper receivers (#1866) * Skip service port for scraper receivers * Update list * Add map for lookups * Update pkg/collector/parser/receiver.go * Add CHANGELOG entry * fix lint --- .chloggen/service-ports.yaml | 16 ++++++++++ pkg/collector/parser/receiver.go | 45 +++++++++++++++++++++++---- pkg/collector/parser/receiver_test.go | 11 +++++++ 3 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 .chloggen/service-ports.yaml diff --git a/.chloggen/service-ports.yaml b/.chloggen/service-ports.yaml new file mode 100644 index 000000000..50a42d64a --- /dev/null +++ b/.chloggen/service-ports.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: receivers + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Skip service port for scraper receivers + +# One or more tracking issues related to the change +issues: [1866] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index a1823658b..e5b4a3ae4 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -77,8 +77,45 @@ func IsRegistered(name string) bool { var ( endpointKey = "endpoint" listenAddressKey = "listen_address" + scraperReceivers = map[string]struct{}{ + "prometheus": {}, + "kubeletstats": {}, + "sshcheck": {}, + "cloudfoundry": {}, + "vcenter": {}, + "oracledb": {}, + "snmp": {}, + "googlecloudpubsub": {}, + "chrony": {}, + "jmx": {}, + "podman_stats": {}, + "pulsar": {}, + "docker_stats": {}, + "aerospike": {}, + "zookeeper": {}, + "prometheus_simple": {}, + "saphana": {}, + "riak": {}, + "redis": {}, + "rabbitmq": {}, + "purefb": {}, + "postgresql": {}, + "nsxt": {}, + "nginx": {}, + "mysql": {}, + "memcached": {}, + "httpcheck": {}, + "haproxy": {}, + "flinkmetrics": {}, + "couchdb": {}, + } ) +func isScraperReceiver(name string) bool { + _, exists := scraperReceivers[name] + return exists +} + func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *v1.ServicePort { var endpoint interface{} switch { @@ -101,14 +138,10 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in case name == "tcplog" || name == "udplog": endpoint = getAddressFromConfig(logger, name, listenAddressKey, config) - // ignore kubeletstats receiver as it holds the field key endpoint, and it + // ignore the receiver as it holds the field key endpoint, and it // is a scraper, we only expose endpoint through k8s service objects for // receivers that aren't scrapers. - case name == "kubeletstats": - return nil - - // ignore prometheus receiver as it has no listening endpoint - case name == "prometheus": + case isScraperReceiver(name): return nil default: diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index 2566f7a7b..66c9bf083 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -147,3 +147,14 @@ func (m *mockParser) Ports() ([]corev1.ServicePort, error) { func (m *mockParser) ParserName() string { return "__mock" } + +func TestSkipPortsForScrapers(t *testing.T) { + for receiver := range scraperReceivers { + builder := NewGenericReceiverParser(logger, receiver, map[interface{}]interface{}{ + "endpoint": "0.0.0.0:42069", + }) + ports, err := builder.Ports() + assert.NoError(t, err) + assert.Len(t, ports, 0) + } +} From 41193ffc380f15bce8ae433ea5964147d83eff97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 7 Jul 2023 17:06:54 +0100 Subject: [PATCH 0916/1234] Install golangci-lint in the local tools dir (#1894) --- .github/workflows/continuous-integration.yaml | 19 +++++++++++-------- Makefile | 13 +++++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 3316834a1..757b3c41a 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -29,9 +29,6 @@ jobs: lint: name: Code standards (linting) runs-on: ubuntu-20.04 - strategy: - matrix: - workdir: [".", "./cmd/otel-allocator", "./cmd/operator-opamp-bridge"] steps: - name: Set up Go uses: actions/setup-go@v4 @@ -40,12 +37,18 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v3 - - name: Lint - uses: golangci/golangci-lint-action@v3 + - uses: actions/cache@v3 with: - args: -v --timeout 5m - version: v1.51.2 - working-directory: ${{ matrix.workdir }} + path: | + /home/runner/.cache/golangci-lint + /home/runner/go/pkg/mod + ./bin + key: golangcilint-${{ hashFiles('**/go.sum') }} + restore-keys: | + golangcilint- + + - name: Lint + run: make lint security: name: Security diff --git a/Makefile b/Makefile index 7afc85001..e508c41cc 100644 --- a/Makefile +++ b/Makefile @@ -161,10 +161,10 @@ vet: # Run go lint against code .PHONY: lint -lint: - golangci-lint run - cd cmd/otel-allocator && golangci-lint run - cd cmd/operator-opamp-bridge && golangci-lint run +lint: golangci-lint + $(GOLANGCI_LINT) run + cd cmd/otel-allocator && $(GOLANGCI_LINT) run + cd cmd/operator-opamp-bridge && $(GOLANGCI_LINT) run # Generate code .PHONY: generate @@ -294,15 +294,20 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen ENVTEST ?= $(LOCALBIN)/setup-envtest CHLOGGEN ?= $(LOCALBIN)/chloggen +GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint KUSTOMIZE_VERSION ?= v5.0.3 CONTROLLER_TOOLS_VERSION ?= v0.12.0 +GOLANGCI_LINT_VERSION ?= v1.51.2 .PHONY: kustomize kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5,$(KUSTOMIZE_VERSION)) +golangci-lint: ## Download golangci-lint locally if necessary. + $(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION)) + .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) From b44640fb306b3c812cb20b811c9111271f6abe86 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:03:49 -0600 Subject: [PATCH 0917/1234] Prepare Release 0.81.0 (#1897) * Prepare Release 0.81.0 * apply feedback --- .chloggen/1823-new-catalog-source.yaml | 16 -------------- .chloggen/fix_sampler-type-required.yaml | 16 -------------- .chloggen/service-ports.yaml | 16 -------------- CHANGELOG.md | 22 +++++++++++++++++++ README.md | 3 +-- RELEASE.md | 4 ++-- ...emetry-operator.clusterserviceversion.yaml | 8 +++---- versions.txt | 8 +++---- 8 files changed, 33 insertions(+), 60 deletions(-) delete mode 100755 .chloggen/1823-new-catalog-source.yaml delete mode 100755 .chloggen/fix_sampler-type-required.yaml delete mode 100644 .chloggen/service-ports.yaml diff --git a/.chloggen/1823-new-catalog-source.yaml b/.chloggen/1823-new-catalog-source.yaml deleted file mode 100755 index 56948e05b..000000000 --- a/.chloggen/1823-new-catalog-source.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Create index image to be used as a Catalog. - -# One or more tracking issues related to the change -issues: [1823] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_sampler-type-required.yaml b/.chloggen/fix_sampler-type-required.yaml deleted file mode 100755 index 836769360..000000000 --- a/.chloggen/fix_sampler-type-required.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix `.sampler.type` being incorrectly required for Instrumentation - -# One or more tracking issues related to the change -issues: [1886] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/service-ports.yaml b/.chloggen/service-ports.yaml deleted file mode 100644 index 50a42d64a..000000000 --- a/.chloggen/service-ports.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: receivers - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Skip service port for scraper receivers - -# One or more tracking issues related to the change -issues: [1866] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index ae93d16f1..01286b6f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,28 @@ Changes by Version +## 0.81.0 + +### 💡 Enhancements 💡 + +- `operator`: Create index image to be used as a Catalog. (#1823) + +### 🧰 Bug fixes 🧰 + +- `operator`: Fix `.sampler.type` being incorrectly required for Instrumentation (#1886) +- `receivers`: Skip service port for scraper receivers (#1866) + +### Components + +* [OpenTelemetry Collector - v0.81.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.81.0) +* [OpenTelemetry Contrib - v0.81.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.81.0) +* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) +* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) +* [Node.JS - 0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.40.0) +* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) +* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) + ## 0.80.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index b29f2049d..5b95778ea 100644 --- a/README.md +++ b/README.md @@ -583,6 +583,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.81.0 | v1.19 to v1.27 | v1 | | v0.80.0 | v1.19 to v1.27 | v1 | | v0.79.0 | v1.19 to v1.27 | v1 | | v0.78.0 | v1.19 to v1.27 | v1 | @@ -605,8 +606,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | | v0.58.0 | v1.19 to v1.24 | v1 | -| v0.57.2 | v1.19 to v1.24 | v1 | - ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 0e1897d2f..e259e8064 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,7 +5,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. 3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. +4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. 5. Add the changes to the changelog. Manually add versions of all operator components. 6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` 7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` @@ -38,9 +38,9 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.81.0 | @TylerHelmuth | | v0.82.0 | @frzifus | | v0.83.0 | @yuriolisa | | v0.84.0 | @jaronoff97 | | v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | +| v0.87.0 | @TylerHelmuth | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3bac4a0d6..1c40158fa 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-06-27T04:32:56Z" + createdAt: "2023-07-05T18:15:51Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.80.0 + name: opentelemetry-operator.v0.81.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -308,7 +308,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.80.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.81.0 livenessProbe: httpGet: path: /healthz @@ -415,7 +415,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.80.0 + version: 0.81.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 9f38586e6..b0a9e98c8 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.80.0 +opentelemetry-collector=0.81.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.80.0 +operator=0.81.0 # Represents the current release of the Target Allocator. -targetallocator=0.80.0 +targetallocator=0.81.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.80.0 +operator-opamp-bridge=0.81.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt From 9debece178ca096a1139b8b151e567d1c7824ffa Mon Sep 17 00:00:00 2001 From: Christian Mergenthaler <377953+cmergenthaler@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:17:02 +0200 Subject: [PATCH 0918/1234] Add support for TopologySpreadConstraints & nodeSelector on collector and target allocator (#1900) --- ...y-spread-constraints-and-nodeselector.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 16 + apis/v1alpha1/zz_generated.deepcopy.go | 21 + ...ntelemetry.io_opentelemetrycollectors.yaml | 364 ++++++++++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 364 ++++++++++++++++++ docs/api.md | 341 ++++++++++++++++ pkg/collector/deployment.go | 1 + pkg/collector/deployment_test.go | 44 +++ pkg/collector/statefulset.go | 23 +- pkg/collector/statefulset_test.go | 32 ++ pkg/targetallocator/deployment.go | 8 +- pkg/targetallocator/deployment_test.go | 79 ++++ 12 files changed, 1295 insertions(+), 14 deletions(-) create mode 100644 .chloggen/add-topology-spread-constraints-and-nodeselector.yaml diff --git a/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml b/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml new file mode 100644 index 000000000..3f4b6b8e0 --- /dev/null +++ b/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for TopologySpreadConstraints & nodeSelector on collector and target allocator + +# One or more tracking issues related to the change +issues: [1899] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index aaccccbe7..464bf14b0 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -190,6 +190,13 @@ type OpenTelemetryCollectorSpec struct { // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` + // TopologySpreadConstraints embedded kubernetes pod configuration option, + // controls how pods are spread across your cluster among failure-domains + // such as regions, zones, nodes, and other user-defined topology domains + // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + // This is only relevant to statefulset, and deployment mode + // +optional + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. @@ -199,6 +206,9 @@ type OpenTelemetryTargetAllocator struct { // that can be run in a high availability mode is consistent-hashing. // +optional Replicas *int32 `json:"replicas,omitempty"` + // NodeSelector to schedule OpenTelemetry TargetAllocator pods. + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Resources to set on the OpenTelemetryTargetAllocator containers. // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` @@ -225,6 +235,12 @@ type OpenTelemetryTargetAllocator struct { // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. // +optional PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` + // TopologySpreadConstraints embedded kubernetes pod configuration option, + // controls how pods are spread across your cluster among failure-domains + // such as regions, zones, nodes, and other user-defined topology domains + // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + // +optional + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` } type OpenTelemetryTargetAllocatorPrometheusCR struct { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 4262a70aa..9c511d9d8 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -613,6 +613,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. @@ -654,8 +661,22 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll *out = new(int32) **out = **in } + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } in.Resources.DeepCopyInto(&out.Resources) in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index e1567409f..5f6769f82 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3437,6 +3437,12 @@ spec: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry TargetAllocator + pods. + type: object prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 @@ -3528,6 +3534,188 @@ spec: service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator. type: string + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod + configuration option, controls how pods are spread across your + cluster among failure-domains such as regions, zones, nodes, + and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming pod + labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading + will be calculated for the incoming pod. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't + set. Keys that don't exist in the incoming pod labels + will be ignored. A null or empty list means only match + against labelSelector. \n This is a beta field and requires + the MatchLabelKeysInPodTopologySpread feature gate to + be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods + may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global + minimum. The global minimum is the minimum number of matching + pods in an eligible domain or zero if the number of eligible + domains is less than MinDomains. For example, in a 3-zone + cluster, MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | | P P | P P | P | - + if MaxSkew is 1, incoming pod can only be scheduled to + zone3 to become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) violate + MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled + onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that + satisfy it. It''s a required field. Default value is 1 + and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation + of Skew is performed. And when the number of eligible + domains with matching topology keys equals or greater + than minDomains, this value has no effect on scheduling. + As a result, when the number of eligible domains is less + than minDomains, scheduler won't schedule more than maxSkew + Pods to those domains. If value is nil, the constraint + behaves as if MinDomains is equal to 1. Valid values are + integers greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone cluster, + MaxSkew is set to 2, MinDomains is set to 5 and pods with + the same labelSelector spread as 2/2/2: | zone1 | zone2 + | zone3 | | P P | P P | P P | The number of domains + is less than 5(MinDomains), so \"global minimum\" is treated + as 0. In this situation, new pod with the same labelSelector + cannot be scheduled, because computed skew will be 3(3 + - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. \n This is a beta field and requires + the MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching + nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes + are included in the calculations. \n If this value is + nil, the behavior is equivalent to the Honor policy. This + is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + Options are: - Honor: nodes without taints, along with + tainted nodes for which the incoming pod has a toleration, + are included. - Ignore: node taints are ignored. All nodes + are included. \n If this value is nil, the behavior is + equivalent to the Ignore policy. This is a beta-level + feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. We consider each + as a "bucket", and try to put balanced number + of pods into each bucket. We define a domain as a particular + instance of a topology. Also, we define an eligible domain + as a domain whose nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with + a pod if it doesn''t satisfy the spread constraint. - + DoNotSchedule (default) tells the scheduler not to schedule + it. - ScheduleAnyway tells the scheduler to schedule the + pod in any location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered + "Unsatisfiable" for an incoming pod if and only if every + possible node assignment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread + as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming + pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) + as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). + In other words, the cluster can still be imbalanced, but + scheduler won''t make it *more* imbalanced. It''s a required + field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object terminationGracePeriodSeconds: description: Duration in seconds the pod needs to terminate gracefully @@ -3576,6 +3764,182 @@ spec: type: string type: object type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined topology domains + https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + This is only relevant to statefulset, and deployment mode + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. The keys + are used to lookup values from the incoming pod labels, those + key-value labels are ANDed with labelSelector to select the + group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in + both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot + be set when LabelSelector isn't set. Keys that don't exist + in the incoming pod labels will be ignored. A null or empty + list means only match against labelSelector. \n This is a + beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods may + be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods + in an eligible domain or zero if the number of eligible domains + is less than MinDomains. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. | + zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew + is 1, incoming pod can only be scheduled to zone3 to become + 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) + on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming + pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that satisfy + it. It''s a required field. Default value is 1 and 0 is not + allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation of + Skew is performed. And when the number of eligible domains + with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. As a result, when + the number of eligible domains is less than minDomains, scheduler + won't schedule more than maxSkew Pods to those domains. If + value is nil, the constraint behaves as if MinDomains is equal + to 1. Valid values are integers greater than 0. When value + is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For + example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains + is set to 5 and pods with the same labelSelector spread as + 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | + The number of domains is less than 5(MinDomains), so \"global + minimum\" is treated as 0. In this situation, new pod with + the same labelSelector cannot be scheduled, because computed + skew will be 3(3 - 0) if new Pod is scheduled to any of the + three zones, it will violate MaxSkew. \n This is a beta field + and requires the MinDomainsInPodTopologySpread feature gate + to be enabled (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector + are included in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. \n + If this value is nil, the behavior is equivalent to the Honor + policy. This is a beta-level feature default enabled by the + NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. Options + are: - Honor: nodes without taints, along with tainted nodes + for which the incoming pod has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + \n If this value is nil, the behavior is equivalent to the + Ignore policy. This is a beta-level feature default enabled + by the NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. We consider each + as a "bucket", and try to put balanced number of pods into + each bucket. We define a domain as a particular instance of + a topology. Also, we define an eligible domain as a domain + whose nodes meet the requirements of nodeAffinityPolicy and + nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain of + that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with a + pod if it doesn''t satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. - ScheduleAnyway + tells the scheduler to schedule the pod in any location, but + giving higher precedence to topologies that would help reduce + the skew. A constraint is considered "Unsatisfiable" for an + incoming pod if and only if every possible node assignment + for that pod would violate "MaxSkew" on some topology. For + example, in a 3-zone cluster, MaxSkew is set to 1, and pods + with the same labelSelector spread as 3/1/1: | zone1 | zone2 + | zone3 | | P P P | P | P | If WhenUnsatisfiable is + set to DoNotSchedule, incoming pod can only be scheduled to + zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on + zone2(zone3) satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t make it *more* + imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 4e925e612..184a89fe5 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3434,6 +3434,12 @@ spec: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry TargetAllocator + pods. + type: object prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 @@ -3525,6 +3531,188 @@ spec: service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator. type: string + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod + configuration option, controls how pods are spread across your + cluster among failure-domains such as regions, zones, nodes, + and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming pod + labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading + will be calculated for the incoming pod. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't + set. Keys that don't exist in the incoming pod labels + will be ignored. A null or empty list means only match + against labelSelector. \n This is a beta field and requires + the MatchLabelKeysInPodTopologySpread feature gate to + be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods + may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global + minimum. The global minimum is the minimum number of matching + pods in an eligible domain or zero if the number of eligible + domains is less than MinDomains. For example, in a 3-zone + cluster, MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | | P P | P P | P | - + if MaxSkew is 1, incoming pod can only be scheduled to + zone3 to become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) violate + MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled + onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that + satisfy it. It''s a required field. Default value is 1 + and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation + of Skew is performed. And when the number of eligible + domains with matching topology keys equals or greater + than minDomains, this value has no effect on scheduling. + As a result, when the number of eligible domains is less + than minDomains, scheduler won't schedule more than maxSkew + Pods to those domains. If value is nil, the constraint + behaves as if MinDomains is equal to 1. Valid values are + integers greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone cluster, + MaxSkew is set to 2, MinDomains is set to 5 and pods with + the same labelSelector spread as 2/2/2: | zone1 | zone2 + | zone3 | | P P | P P | P P | The number of domains + is less than 5(MinDomains), so \"global minimum\" is treated + as 0. In this situation, new pod with the same labelSelector + cannot be scheduled, because computed skew will be 3(3 + - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. \n This is a beta field and requires + the MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching + nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes + are included in the calculations. \n If this value is + nil, the behavior is equivalent to the Honor policy. This + is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + Options are: - Honor: nodes without taints, along with + tainted nodes for which the incoming pod has a toleration, + are included. - Ignore: node taints are ignored. All nodes + are included. \n If this value is nil, the behavior is + equivalent to the Ignore policy. This is a beta-level + feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. We consider each + as a "bucket", and try to put balanced number + of pods into each bucket. We define a domain as a particular + instance of a topology. Also, we define an eligible domain + as a domain whose nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with + a pod if it doesn''t satisfy the spread constraint. - + DoNotSchedule (default) tells the scheduler not to schedule + it. - ScheduleAnyway tells the scheduler to schedule the + pod in any location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered + "Unsatisfiable" for an incoming pod if and only if every + possible node assignment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread + as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming + pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) + as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). + In other words, the cluster can still be imbalanced, but + scheduler won''t make it *more* imbalanced. It''s a required + field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object terminationGracePeriodSeconds: description: Duration in seconds the pod needs to terminate gracefully @@ -3573,6 +3761,182 @@ spec: type: string type: object type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined topology domains + https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + This is only relevant to statefulset, and deployment mode + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. The keys + are used to lookup values from the incoming pod labels, those + key-value labels are ANDed with labelSelector to select the + group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in + both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot + be set when LabelSelector isn't set. Keys that don't exist + in the incoming pod labels will be ignored. A null or empty + list means only match against labelSelector. \n This is a + beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods may + be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods + in an eligible domain or zero if the number of eligible domains + is less than MinDomains. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. | + zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew + is 1, incoming pod can only be scheduled to zone3 to become + 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) + on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming + pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that satisfy + it. It''s a required field. Default value is 1 and 0 is not + allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation of + Skew is performed. And when the number of eligible domains + with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. As a result, when + the number of eligible domains is less than minDomains, scheduler + won't schedule more than maxSkew Pods to those domains. If + value is nil, the constraint behaves as if MinDomains is equal + to 1. Valid values are integers greater than 0. When value + is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For + example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains + is set to 5 and pods with the same labelSelector spread as + 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | + The number of domains is less than 5(MinDomains), so \"global + minimum\" is treated as 0. In this situation, new pod with + the same labelSelector cannot be scheduled, because computed + skew will be 3(3 - 0) if new Pod is scheduled to any of the + three zones, it will violate MaxSkew. \n This is a beta field + and requires the MinDomainsInPodTopologySpread feature gate + to be enabled (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector + are included in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. \n + If this value is nil, the behavior is equivalent to the Honor + policy. This is a beta-level feature default enabled by the + NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. Options + are: - Honor: nodes without taints, along with tainted nodes + for which the incoming pod has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + \n If this value is nil, the behavior is equivalent to the + Ignore policy. This is a beta-level feature default enabled + by the NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. We consider each + as a "bucket", and try to put balanced number of pods into + each bucket. We define a domain as a particular instance of + a topology. Also, we define an eligible domain as a domain + whose nodes meet the requirements of nodeAffinityPolicy and + nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain of + that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with a + pod if it doesn''t satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. - ScheduleAnyway + tells the scheduler to schedule the pod in any location, but + giving higher precedence to topologies that would help reduce + the skew. A constraint is considered "Unsatisfiable" for an + incoming pod if and only if every possible node assignment + for that pod would violate "MaxSkew" on some topology. For + example, in a 3-zone cluster, MaxSkew is set to 1, and pods + with the same labelSelector spread as 3/1/1: | zone1 | zone2 + | zone3 | | P P P | P | P | If WhenUnsatisfiable is + set to DoNotSchedule, incoming pod can only be scheduled to + zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on + zone2(zone3) satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t make it *more* + imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed diff --git a/docs/api.md b/docs/api.md index ce9c294e6..e59bc5744 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3817,6 +3817,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode
+ + + + + @@ -9691,6 +9698,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all Image indicates the container image to use for the OpenTelemetry TargetAllocator.
+ + + + + @@ -9721,6 +9735,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator.
+ + + + +
false
topologySpreadConstraints[]object + TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ This is only relevant to statefulset, and deployment mode
+
false
upgradeStrategy enum false
nodeSelectormap[string]string + NodeSelector to schedule OpenTelemetry TargetAllocator pods.
+
false
prometheusCR object false
topologySpreadConstraints[]object + TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+
false
@@ -9836,6 +9857,166 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. +### OpenTelemetryCollector.spec.targetAllocator.topologySpreadConstraints[index] +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +TopologySpreadConstraint specifies how to spread matching pods among the given topology. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxSkewinteger + MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
+
+ Format: int32
+
true
topologyKeystring + TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.
+
true
whenUnsatisfiablestring + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
+
true
labelSelectorobject + LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. + This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
+
false
minDomainsinteger + MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. + This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).
+
+ Format: int32
+
false
nodeAffinityPolicystring + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+
false
nodeTaintsPolicystring + NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. + If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.topologySpreadConstraints[index].labelSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatortopologyspreadconstraintsindex) + + + +LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.topologySpreadConstraints[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatortopologyspreadconstraintsindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + ### OpenTelemetryCollector.spec.tolerations[index] [↩ Parent](#opentelemetrycollectorspec) @@ -9893,6 +10074,166 @@ The pod this Toleration is attached to tolerates any taint that matches the trip +### OpenTelemetryCollector.spec.topologySpreadConstraints[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +TopologySpreadConstraint specifies how to spread matching pods among the given topology. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxSkewinteger + MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
+
+ Format: int32
+
true
topologyKeystring + TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.
+
true
whenUnsatisfiablestring + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
+
true
labelSelectorobject + LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. + This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
+
false
minDomainsinteger + MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. + This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).
+
+ Format: int32
+
false
nodeAffinityPolicystring + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+
false
nodeTaintsPolicystring + NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. + If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+
false
+ + +### OpenTelemetryCollector.spec.topologySpreadConstraints[index].labelSelector +[↩ Parent](#opentelemetrycollectorspectopologyspreadconstraintsindex) + + + +LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+
false
+ + +### OpenTelemetryCollector.spec.topologySpreadConstraints[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectopologyspreadconstraintsindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+
false
+ + ### OpenTelemetryCollector.spec.volumeClaimTemplates[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 298d4e795..7fa91725a 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -63,6 +63,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele PriorityClassName: otelcol.Spec.PriorityClassName, Affinity: otelcol.Spec.Affinity, TerminationGracePeriodSeconds: otelcol.Spec.TerminationGracePeriodSeconds, + TopologySpreadConstraints: otelcol.Spec.TopologySpreadConstraints, }, }, }, diff --git a/pkg/collector/deployment_test.go b/pkg/collector/deployment_test.go index be2b77605..3e2159c73 100644 --- a/pkg/collector/deployment_test.go +++ b/pkg/collector/deployment_test.go @@ -52,6 +52,19 @@ var testAffinityValue = &v1.Affinity{ }, } +var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ + { + MaxSkew: 1, + TopologyKey: "kubernetes.io/hostname", + WhenUnsatisfiable: "DoNotSchedule", + LabelSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + }, + }, +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ @@ -373,3 +386,34 @@ func TestDeploymentSetInitContainer(t *testing.T) { assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) assert.Len(t, d.Spec.Template.Spec.InitContainers, 1) } + +func TestDeploymentTopologySpreadConstraints(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + d1 := Deployment(cfg, logger, otelcol1) + assert.Equal(t, "my-instance-collector", d1.Name) + assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) + + // Test TopologySpreadConstraints + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-topologyspreadconstraint", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TopologySpreadConstraints: testTopologySpreadConstraintValue, + }, + } + + cfg = config.New() + d2 := Deployment(cfg, logger, otelcol2) + assert.Equal(t, "my-instance-topologyspreadconstraint-collector", d2.Name) + assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) +} diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index 05ad1a103..cb81d6a42 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -51,17 +51,18 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Annotations: podAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - InitContainers: otelcol.Spec.InitContainers, - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, - Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDNSPolicy(otelcol), - HostNetwork: otelcol.Spec.HostNetwork, - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - SecurityContext: otelcol.Spec.PodSecurityContext, - PriorityClassName: otelcol.Spec.PriorityClassName, - Affinity: otelcol.Spec.Affinity, + ServiceAccountName: ServiceAccountName(otelcol), + InitContainers: otelcol.Spec.InitContainers, + Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, + Volumes: Volumes(cfg, otelcol), + DNSPolicy: getDNSPolicy(otelcol), + HostNetwork: otelcol.Spec.HostNetwork, + Tolerations: otelcol.Spec.Tolerations, + NodeSelector: otelcol.Spec.NodeSelector, + SecurityContext: otelcol.Spec.PodSecurityContext, + PriorityClassName: otelcol.Spec.PriorityClassName, + Affinity: otelcol.Spec.Affinity, + TopologySpreadConstraints: otelcol.Spec.TopologySpreadConstraints, }, }, Replicas: otelcol.Spec.Replicas, diff --git a/pkg/collector/statefulset_test.go b/pkg/collector/statefulset_test.go index 7196af64b..8e776f40d 100644 --- a/pkg/collector/statefulset_test.go +++ b/pkg/collector/statefulset_test.go @@ -382,3 +382,35 @@ func TestStatefulSetInitContainer(t *testing.T) { assert.Equal(t, "/metrics", s.Annotations["prometheus.io/path"]) assert.Len(t, s.Spec.Template.Spec.InitContainers, 1) } + +func TestStatefulSetTopologySpreadConstraints(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + s1 := StatefulSet(cfg, logger, otelcol1) + assert.Equal(t, "my-instance-collector", s1.Name) + assert.Empty(t, s1.Spec.Template.Spec.TopologySpreadConstraints) + + // Test TopologySpreadConstraints + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-topologyspreadconstraint", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TopologySpreadConstraints: testTopologySpreadConstraintValue, + }, + } + + cfg = config.New() + + s2 := StatefulSet(cfg, logger, otelcol2) + assert.Equal(t, "my-instance-topologyspreadconstraint-collector", s2.Name) + assert.NotNil(t, s2.Spec.Template.Spec.TopologySpreadConstraints) + assert.NotEmpty(t, s2.Spec.Template.Spec.TopologySpreadConstraints) + assert.Equal(t, testTopologySpreadConstraintValue, s2.Spec.Template.Spec.TopologySpreadConstraints) +} diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index e4facab49..a0b75a5d9 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -47,9 +47,11 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Annotations: otelcol.Spec.PodAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, - Volumes: Volumes(cfg, otelcol), + ServiceAccountName: ServiceAccountName(otelcol), + Containers: []corev1.Container{Container(cfg, logger, otelcol)}, + Volumes: Volumes(cfg, otelcol), + NodeSelector: otelcol.Spec.TargetAllocator.NodeSelector, + TopologySpreadConstraints: otelcol.Spec.TargetAllocator.TopologySpreadConstraints, }, }, }, diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index 46b232262..50257bb59 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -18,12 +18,26 @@ import ( "testing" "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" ) +var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ + { + MaxSkew: 1, + TopologyKey: "kubernetes.io/hostname", + WhenUnsatisfiable: "DoNotSchedule", + LabelSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + }, + }, +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ @@ -69,3 +83,68 @@ func TestDeploymentPodAnnotations(t *testing.T) { assert.Equal(t, "my-instance-targetallocator", ds.Name) assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) } + +func TestDeploymentNodeSelector(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + d1 := Deployment(cfg, logger, otelcol1) + assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) + + // Test nodeSelector + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-nodeselector", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + NodeSelector: map[string]string{ + "node-key": "node-value", + }, + }, + }, + } + + cfg = config.New() + + d2 := Deployment(cfg, logger, otelcol2) + assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) +} + +func TestDeploymentTopologySpreadConstraints(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + d1 := Deployment(cfg, logger, otelcol1) + assert.Equal(t, "my-instance-targetallocator", d1.Name) + assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) + + // Test TopologySpreadConstraints + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-topologyspreadconstraint", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + TopologySpreadConstraints: testTopologySpreadConstraintValue, + }, + }, + } + + cfg = config.New() + d2 := Deployment(cfg, logger, otelcol2) + assert.Equal(t, "my-instance-topologyspreadconstraint-targetallocator", d2.Name) + assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) +} From a0e38525b8457e4f1374beb2f23f5281fcf41941 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Mon, 10 Jul 2023 21:48:13 +0530 Subject: [PATCH 0919/1234] [chore] Fix assert script paths for the test case otlp-metrics-traces (#1896) --- .../otlp-metrics-traces/01-assert.yaml | 26 +++---------------- .../otlp-metrics-traces/05-assert.yaml | 2 +- .../otlp-metrics-traces/06-assert.yaml | 3 +-- .../check_user_workload_monitoring.sh | 22 ++++++++++++++++ 4 files changed, 28 insertions(+), 25 deletions(-) create mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml index 268aa391d..b7e384989 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml @@ -1,22 +1,4 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: openshift-user-workload-monitoring -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - namespace: openshift-user-workload-monitoring -status: - availableReplicas: 2 - currentReplicas: 2 - readyReplicas: 2 - replicas: 2 - updatedReplicas: 2 - +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +commands: +- script: ./tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml index 8dcf1e643..9bec95f44 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml @@ -3,4 +3,4 @@ apiVersion: kuttl.dev/v1beta1 kind: TestAssert timeout: 30 commands: -- script: ./tests/e2e-openshift/otlp-metrics/check_traces.sh +- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml index 63d8d22c4..79570e05a 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml @@ -1,6 +1,5 @@ --- apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 commands: -- script: ./tests/e2e-openshift/otlp-metrics/check_metrics.sh +- script: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh b/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh new file mode 100755 index 000000000..5ecaebe3d --- /dev/null +++ b/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +check_replicas() { + replicas=$(oc get $1 $2 -n openshift-user-workload-monitoring -o 'jsonpath={.status.availableReplicas} {.status.readyReplicas} {.status.replicas}') + for count in $replicas; do + if [[ $count =~ ^[0-9]+$ ]]; then + if ((count < 1)); then + echo "The number of replicas is 0 for $1 $2" + exit 1 + fi + else + echo "Error: Replica count is not a valid number for $1 $2" + exit 1 + fi + done +} + +check_replicas deployment prometheus-operator +check_replicas statefulset prometheus-user-workload +check_replicas statefulset thanos-ruler-user-workload From 3055a7eae55953f55f5c9b141fd4da6d71130478 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 11 Jul 2023 16:13:10 +0200 Subject: [PATCH 0920/1234] Build and publish the bundle image (#1880) * Build and publish the bundle image Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas * Apply feedback from code review Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .chloggen/1879-publish-bundle-images.yaml | 16 ++++ .../workflows/publish-operator-bundle.yaml | 74 +++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100755 .chloggen/1879-publish-bundle-images.yaml create mode 100644 .github/workflows/publish-operator-bundle.yaml diff --git a/.chloggen/1879-publish-bundle-images.yaml b/.chloggen/1879-publish-bundle-images.yaml new file mode 100755 index 000000000..d1c0c99e3 --- /dev/null +++ b/.chloggen/1879-publish-bundle-images.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add a GitHub Actions Workflow to build and publish the operator bundle images + +# One or more tracking issues related to the change +issues: [1879] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml new file mode 100644 index 000000000..d8943de7a --- /dev/null +++ b/.github/workflows/publish-operator-bundle.yaml @@ -0,0 +1,74 @@ +name: "Publish operator bundle" + +on: + push: + paths: + - '.github/workflows/publish-operator-bundle.yaml' + - 'bundle.Dockerfile' + branches: + - main + tags: + - 'v*' + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Docker meta + id: docker_meta + uses: docker/metadata-action@v4 + with: + images: | + otel/opentelemetry-operator-bundle + ghcr.io/${{ github.repository }}/opentelemetry-operator-bundle + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{raw}} + type=ref,event=branch + + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Log into Docker.io + uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2 + if: ${{ github.event_name == 'push' }} + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Operator image + uses: docker/build-push-action@v4 + with: + context: . + file: ./bundle.Dockerfile + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache From e9af801033cbcc0b58c7a6211598109effd866de Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 11 Jul 2023 19:30:47 +0200 Subject: [PATCH 0921/1234] Fix the route E2E test for OpenShift and move to it to the OpenShift suite (#1912) Signed-off-by: Israel Blancas --- Makefile | 6 +----- hack/install-openshift-routes.sh | 10 ---------- tests/{e2e => e2e-openshift}/route/00-assert.yaml | 1 - tests/{e2e => e2e-openshift}/route/00-install.yaml | 0 4 files changed, 1 insertion(+), 16 deletions(-) delete mode 100755 hack/install-openshift-routes.sh rename tests/{e2e => e2e-openshift}/route/00-assert.yaml (97%) rename tests/{e2e => e2e-openshift}/route/00-install.yaml (100%) diff --git a/Makefile b/Makefile index e508c41cc..f6585b5ed 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,7 @@ e2e-log-operator: kubectl get deploy -A .PHONY: prepare-e2e -prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server install-openshift-routes load-image-all deploy +prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh .PHONY: scorecard-tests @@ -238,10 +238,6 @@ endif install-metrics-server: ./hack/install-metrics-server.sh -.PHONY: install-openshift-routes -install-openshift-routes: - ./hack/install-openshift-routes.sh - .PHONY: load-image-all load-image-all: load-image-operator load-image-target-allocator load-image-operator-opamp-bridge diff --git a/hack/install-openshift-routes.sh b/hack/install-openshift-routes.sh deleted file mode 100755 index 41464b868..000000000 --- a/hack/install-openshift-routes.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then - echo "Connected to an OpenShift cluster. OpenShift routes installation is not needed" -else - kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router_rbac.yaml - kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/route_crd.yaml - kubectl apply -f https://raw.githubusercontent.com/openshift/router/release-4.12/deploy/router.yaml - kubectl wait --for=condition=available deployment/ingress-router -n openshift-ingress --timeout=5m -fi diff --git a/tests/e2e/route/00-assert.yaml b/tests/e2e-openshift/route/00-assert.yaml similarity index 97% rename from tests/e2e/route/00-assert.yaml rename to tests/e2e-openshift/route/00-assert.yaml index 35ee38e2a..6269d9037 100644 --- a/tests/e2e/route/00-assert.yaml +++ b/tests/e2e-openshift/route/00-assert.yaml @@ -27,5 +27,4 @@ spec: to: kind: Service name: simplest-collector - weight: null wildcardPolicy: None diff --git a/tests/e2e/route/00-install.yaml b/tests/e2e-openshift/route/00-install.yaml similarity index 100% rename from tests/e2e/route/00-install.yaml rename to tests/e2e-openshift/route/00-install.yaml From fc9485bdaa8a1793472b602432af32ac78c8b6b1 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Wed, 12 Jul 2023 23:09:44 +0200 Subject: [PATCH 0922/1234] A fix for #1893 - ApacheModuleServiceNamespace falls back to instrumentation request namespace name or static default name (#1905) * fix for #1893 * chloggen --------- Co-authored-by: Jacob Aronoff --- .chloggen/fix-for-1893.yaml | 16 ++ pkg/instrumentation/apachehttpd.go | 8 + pkg/instrumentation/apachehttpd_test.go | 206 +++++++++++++++++++++++- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- 5 files changed, 229 insertions(+), 5 deletions(-) create mode 100644 .chloggen/fix-for-1893.yaml diff --git a/.chloggen/fix-for-1893.yaml b/.chloggen/fix-for-1893.yaml new file mode 100644 index 000000000..726cd70a8 --- /dev/null +++ b/.chloggen/fix-for-1893.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Fix for issue #1893" + +# One or more tracking issues related to the change +issues: [1905] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index c3aafe56d..60922bccf 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -20,6 +20,7 @@ import ( "strings" "github.com/go-logr/logr" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -219,6 +220,13 @@ LoadModule otel_apache_module %[1]s/WebServerModule/Apache/libmod_apache_otel%[2 } serviceName := chooseServiceName(pod, resourceMap, index) serviceNamespace := pod.GetNamespace() + if len(serviceNamespace) == 0 { + serviceNamespace = resourceMap[string(semconv.K8SNamespaceNameKey)] + if len(serviceNamespace) == 0 { + serviceNamespace = "apache-httpd" + } + + } // Namespace name override TBD // There are two versions of the OTEL modules - for Apache HTTPD 2.4 and 2.2. diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index e74d9630b..74c766129 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -78,7 +79,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace req-namespace\nApacheModuleTraceAsError ON\n", }, {Name: apacheServiceInstanceIdEnvVar, ValueFrom: &corev1.EnvVarSource{ @@ -167,7 +168,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace req-namespace\nApacheModuleTraceAsError ON\n", }, {Name: apacheServiceInstanceIdEnvVar, ValueFrom: &corev1.EnvVarSource{ @@ -257,7 +258,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace req-namespace\nApacheModuleTraceAsError ON\n", }, {Name: apacheServiceInstanceIdEnvVar, ValueFrom: &corev1.EnvVarSource{ @@ -299,6 +300,205 @@ func TestInjectApacheHttpdagent(t *testing.T) { }, }, }, + // Pod Namespace specified + { + name: "Pod Namespace specified", + ApacheHttpd: v1alpha1.ApacheHttpd{Image: "foo/bar:1"}, + pod: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Namespace: "my-namespace", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Namespace: "my-namespace", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace my-namespace\nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheDefaultConfigDirectory, + }, + }, + }, + }, + }, + }, + }, + } + + resourceMap := map[string]string{ + string(semconv.K8SDeploymentNameKey): "apache-httpd-service-name", + string(semconv.K8SNamespaceNameKey): "req-namespace", + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectApacheHttpdagent(logr.Discard(), test.ApacheHttpd, test.pod, 0, "http://otlp-endpoint:4317", resourceMap) + assert.Equal(t, test.expected, pod) + }) + } +} + +func TestInjectApacheHttpdagentUnknownNamespace(t *testing.T) { + tests := []struct { + name string + v1alpha1.ApacheHttpd + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "Clone Container not present, unknown namespace", + ApacheHttpd: v1alpha1.ApacheHttpd{Image: "foo/bar:1"}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: apacheAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: apacheAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://otlp-endpoint:4317\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName apache-httpd-service-name\nApacheModuleServiceNamespace apache-httpd\nApacheModuleTraceAsError ON\n", + }, + {Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheDefaultConfigDirectory, + }, + }, + }, + }, + }, + }, + }, } resourceMap := map[string]string{ diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 71a679381..4a3922157 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1444,7 +1444,7 @@ func TestMutatePod(t *testing.T) { Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://collector:12345\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://collector:12345\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace apache-httpd\nApacheModuleTraceAsError ON\n", }, { Name: apacheServiceInstanceIdEnvVar, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 84b0b1e12..915948d4d 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1282,7 +1282,7 @@ func TestInjectApacheHttpd(t *testing.T) { Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint https://collector:4318\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace \nApacheModuleTraceAsError ON\n", + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint https://collector:4318\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace apache-httpd\nApacheModuleTraceAsError ON\n", }, {Name: apacheServiceInstanceIdEnvVar, ValueFrom: &corev1.EnvVarSource{ From 02b4d30b5786dc1f0ec03ccf63a91013c229d515 Mon Sep 17 00:00:00 2001 From: Kit Sutliff <38538497+KitSutliff@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:11:57 -0700 Subject: [PATCH 0923/1234] adds envs handling to target allocator (#1875) --- .../1773-targetallocator-env-handling.yaml | 17 ++ apis/v1alpha1/opentelemetrycollector_types.go | 4 + apis/v1alpha1/zz_generated.deepcopy.go | 7 + ...ntelemetry.io_opentelemetrycollectors.yaml | 116 ++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 116 ++++++++ docs/api.md | 253 ++++++++++++++++++ pkg/targetallocator/container.go | 27 +- pkg/targetallocator/container_test.go | 103 +++++++ .../targetallocator-features/00-assert.yaml | 2 + .../targetallocator-features/00-install.yaml | 3 + 10 files changed, 640 insertions(+), 8 deletions(-) create mode 100644 .chloggen/1773-targetallocator-env-handling.yaml diff --git a/.chloggen/1773-targetallocator-env-handling.yaml b/.chloggen/1773-targetallocator-env-handling.yaml new file mode 100644 index 000000000..4ca451b73 --- /dev/null +++ b/.chloggen/1773-targetallocator-env-handling.yaml @@ -0,0 +1,17 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: | + Add support for environment variables in target allocator config. + +# One or more tracking issues related to the change +issues: [1773] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 464bf14b0..eb9aa6cd2 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -241,6 +241,10 @@ type OpenTelemetryTargetAllocator struct { // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ // +optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + // ENV vars to set on the OpenTelemetry TargetAllocator's Pods. These can then in certain cases be + // consumed in the config file for the TargetAllocator. + // +optional + Env []v1.EnvVar `json:"env,omitempty"` } type OpenTelemetryTargetAllocatorPrometheusCR struct { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9c511d9d8..6fb7da24e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -677,6 +677,13 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 5f6769f82..55b4cff92 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3427,6 +3427,122 @@ spec: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. type: boolean + env: + description: ENV vars to set on the OpenTelemetry TargetAllocator's + Pods. These can then in certain cases be consumed in the config + file for the TargetAllocator. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array filterStrategy: description: FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 184a89fe5..39950402f 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3424,6 +3424,122 @@ spec: description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. type: boolean + env: + description: ENV vars to set on the OpenTelemetry TargetAllocator's + Pods. These can then in certain cases be consumed in the config + file for the TargetAllocator. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array filterStrategy: description: FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option diff --git a/docs/api.md b/docs/api.md index e59bc5744..b41afc35c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -9684,6 +9684,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not.
false + + env + []object + + ENV vars to set on the OpenTelemetry TargetAllocator's Pods. These can then in certain cases be consumed in the config file for the TargetAllocator.
+ + false filterStrategy string @@ -9746,6 +9753,252 @@ TargetAllocator indicates a value which determines whether to spawn a target all +### OpenTelemetryCollector.spec.targetAllocator.env[index] +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.env[index].valueFrom +[↩ Parent](#opentelemetrycollectorspectargetallocatorenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.env[index].valueFrom.configMapKeyRef +[↩ Parent](#opentelemetrycollectorspectargetallocatorenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.env[index].valueFrom.fieldRef +[↩ Parent](#opentelemetrycollectorspectargetallocatorenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.env[index].valueFrom.resourceFieldRef +[↩ Parent](#opentelemetrycollectorspectargetallocatorenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.env[index].valueFrom.secretKeyRef +[↩ Parent](#opentelemetrycollectorspectargetallocatorenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + ### OpenTelemetryCollector.spec.targetAllocator.prometheusCR [↩ Parent](#opentelemetrycollectorspectargetallocator) diff --git a/pkg/targetallocator/container.go b/pkg/targetallocator/container.go index beb67b897..94ee084ec 100644 --- a/pkg/targetallocator/container.go +++ b/pkg/targetallocator/container.go @@ -35,16 +35,27 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem MountPath: "/conf", }} - envVars := []corev1.EnvVar{} + var envVars = otelcol.Spec.TargetAllocator.Env + if otelcol.Spec.TargetAllocator.Env == nil { + envVars = []corev1.EnvVar{} + } - envVars = append(envVars, corev1.EnvVar{ - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", + idx := -1 + for i := range envVars { + if envVars[i].Name == "OTELCOL_NAMESPACE" { + idx = i + } + } + if idx == -1 { + envVars = append(envVars, corev1.EnvVar{ + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, }, - }, - }) + }) + } var args []string if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { diff --git a/pkg/targetallocator/container_test.go b/pkg/targetallocator/container_test.go index 5a6c179ff..c5b91189f 100644 --- a/pkg/targetallocator/container_test.go +++ b/pkg/targetallocator/container_test.go @@ -116,3 +116,106 @@ func TestContainerResourceRequirements(t *testing.T) { // verify assert.Equal(t, resourceTest, resourcesValues) } + +func TestContainerHasEnvVars(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Env: []corev1.EnvVar{ + { + Name: "TEST_ENV", + Value: "test", + }, + }, + }, + }, + } + cfg := config.New(config.WithTargetAllocatorImage("default-image")) + + expected := corev1.Container{ + Name: "ta-container", + Image: "default-image", + Env: []corev1.EnvVar{ + { + Name: "TEST_ENV", + Value: "test", + }, + { + Name: "OTELCOL_NAMESPACE", + Value: "", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + APIVersion: "", + FieldPath: "metadata.namespace", + }, + ResourceFieldRef: nil, + ConfigMapKeyRef: nil, + SecretKeyRef: nil, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "ta-internal", + ReadOnly: false, + MountPath: "/conf", + SubPath: "", + MountPropagation: nil, + SubPathExpr: "", + }, + }, + } + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, expected, c) +} + +func TestContainerDoesNotOverrideEnvVars(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Env: []corev1.EnvVar{ + { + Name: "OTELCOL_NAMESPACE", + Value: "test", + }, + }, + }, + }, + } + cfg := config.New(config.WithTargetAllocatorImage("default-image")) + + expected := corev1.Container{ + Name: "ta-container", + Image: "default-image", + Env: []corev1.EnvVar{ + { + Name: "OTELCOL_NAMESPACE", + Value: "test", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "ta-internal", + ReadOnly: false, + MountPath: "/conf", + SubPath: "", + MountPropagation: nil, + SubPathExpr: "", + }, + }, + } + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, expected, c) +} diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index 6e1f4b453..866654e11 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -52,6 +52,8 @@ spec: args: - --enable-prometheus-cr-watcher env: + - name: TEST_ENV + value: "test" - name: OTELCOL_NAMESPACE valueFrom: fieldRef: diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index d5c9f970a..e38658dfd 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -43,6 +43,9 @@ spec: serviceAccount: ta prometheusCR: enabled: true + env: + - name: TEST_ENV + value: "test" config: | receivers: jaeger: From ecebb74f03bd4a7a18dbfa5f7a94f420457d70e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 13 Jul 2023 17:45:02 +0100 Subject: [PATCH 0924/1234] [target allocator] Restart target allocator when config changes (#1889) * Move target allocator ConfigMap to the targetallocator package * Restart target allocator when config changes * Use the right collector selector labels for TA --- .chloggen/feat_restart-targetallocator.yaml | 16 +++ hack/modify-test-images.sh | 2 +- pkg/collector/reconcile/configmap.go | 70 +----------- pkg/collector/reconcile/configmap_test.go | 80 +------------- pkg/targetallocator/annotations.go | 49 +++++++++ pkg/targetallocator/annotations_test.go | 46 ++++++++ pkg/targetallocator/configmap.go | 92 ++++++++++++++++ pkg/targetallocator/configmap_test.go | 102 ++++++++++++++++++ pkg/targetallocator/deployment.go | 3 +- pkg/targetallocator/deployment_test.go | 42 +++++--- pkg/targetallocator/testdata/test.yaml | 22 ++++ .../e2e/smoke-targetallocator/01-assert.yaml | 8 ++ .../01-change-ta-config.yaml | 37 +++++++ 13 files changed, 407 insertions(+), 162 deletions(-) create mode 100755 .chloggen/feat_restart-targetallocator.yaml create mode 100644 pkg/targetallocator/annotations.go create mode 100644 pkg/targetallocator/annotations_test.go create mode 100644 pkg/targetallocator/configmap.go create mode 100644 pkg/targetallocator/configmap_test.go create mode 100644 pkg/targetallocator/testdata/test.yaml create mode 100644 tests/e2e/smoke-targetallocator/01-assert.yaml create mode 100644 tests/e2e/smoke-targetallocator/01-change-ta-config.yaml diff --git a/.chloggen/feat_restart-targetallocator.yaml b/.chloggen/feat_restart-targetallocator.yaml new file mode 100755 index 000000000..fc34e1a3f --- /dev/null +++ b/.chloggen/feat_restart-targetallocator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Restart target allocator when its configuration changes + +# One or more tracking issues related to the change +issues: [1882] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index b43ee421b..93fe32716 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -2,6 +2,6 @@ SED_BIN=${SED_BIN:-sed} -${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/00-install.yaml +${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 2579eb549..03ee284b6 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -18,9 +18,7 @@ import ( "context" "fmt" "reflect" - "strings" - "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -28,11 +26,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete @@ -44,7 +40,7 @@ func ConfigMaps(ctx context.Context, params Params) error { } if params.Instance.Spec.TargetAllocator.Enabled { - cm, err := desiredTAConfigMap(params) + cm, err := targetallocator.ConfigMap(params.Instance) if err != nil { return fmt.Errorf("failed to parse config: %w", err) } @@ -86,70 +82,6 @@ func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { } } -func desiredTAConfigMap(params Params) (corev1.ConfigMap, error) { - name := naming.TAConfigMap(params.Instance) - version := strings.Split(params.Instance.Spec.Image, ":") - labels := targetallocator.Labels(params.Instance, name) - if len(version) > 1 { - labels["app.kubernetes.io/version"] = version[len(version)-1] - } else { - labels["app.kubernetes.io/version"] = "latest" - } - - // Collector supports environment variable substitution, but the TA does not. - // TA ConfigMap should have a single "$", as it does not support env var substitution - prometheusReceiverConfig, err := ta.UnescapeDollarSignsInPromConfig(params.Instance.Spec.Config) - if err != nil { - return corev1.ConfigMap{}, err - } - - taConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/component": "opentelemetry-collector", - } - // We only take the "config" from the returned object, if it's present - if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { - taConfig["config"] = prometheusConfig - } - - if len(params.Instance.Spec.TargetAllocator.AllocationStrategy) > 0 { - taConfig["allocation_strategy"] = params.Instance.Spec.TargetAllocator.AllocationStrategy - } else { - taConfig["allocation_strategy"] = v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted - } - - if len(params.Instance.Spec.TargetAllocator.FilterStrategy) > 0 { - taConfig["filter_strategy"] = params.Instance.Spec.TargetAllocator.FilterStrategy - } - - if params.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { - taConfig["service_monitor_selector"] = ¶ms.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector - } - - if params.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { - taConfig["pod_monitor_selector"] = ¶ms.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector - } - - taConfigYAML, err := yaml.Marshal(taConfig) - if err != nil { - return corev1.ConfigMap{}, err - } - - return corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Data: map[string]string{ - "targetallocator.yaml": string(taConfigYAML), - }, - }, nil -} - func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap, retry bool) error { for _, obj := range expected { desired := obj diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index cd9d1a15e..5030ab93a 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -31,6 +31,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) @@ -213,80 +214,11 @@ service: }) - t.Run("should return expected target allocator config map", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - expectedLables["app.kubernetes.io/name"] = "test-targetallocator" - - expectedData := map[string]string{ - "targetallocator.yaml": `allocation_strategy: least-weighted -config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: - - 0.0.0.0:8888 - - 0.0.0.0:9999 -label_selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -`, - } - - actual, err := desiredTAConfigMap(params()) - assert.NoError(t, err) - - assert.Equal(t, "test-targetallocator", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - t.Run("should return expected target allocator config map with label selectors", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - expectedLables["app.kubernetes.io/name"] = "test-targetallocator" - - expectedData := map[string]string{ - "targetallocator.yaml": `allocation_strategy: least-weighted -config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: - - 0.0.0.0:8888 - - 0.0.0.0:9999 -label_selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -pod_monitor_selector: - release: test -service_monitor_selector: - release: test -`, - } - p := params() - p.Instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector = map[string]string{ - "release": "test", - } - p.Instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector = map[string]string{ - "release": "test", - } - actual, err := desiredTAConfigMap(p) - assert.NoError(t, err) - - assert.Equal(t, "test-targetallocator", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - } func TestExpectedConfigMap(t *testing.T) { t.Run("should create collector and target allocator config maps", func(t *testing.T) { - configMap, err := desiredTAConfigMap(params()) + configMap, err := targetallocator.ConfigMap(params().Instance) assert.NoError(t, err) err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params()), configMap}, true) assert.NoError(t, err) @@ -340,7 +272,6 @@ func TestExpectedConfigMap(t *testing.T) { t.Run("should update target allocator config map", func(t *testing.T) { param := Params{ - Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -368,14 +299,12 @@ func TestExpectedConfigMap(t *testing.T) { Config: "", }, }, - Scheme: testScheme, - Log: logger, } - cm, err := desiredTAConfigMap(param) + cm, err := targetallocator.ConfigMap(param.Instance) assert.EqualError(t, err, "no receivers available as part of the configuration") createObjectIfNotExists(t, "test-targetallocator", &cm) - configMap, err := desiredTAConfigMap(params()) + configMap, err := targetallocator.ConfigMap(params().Instance) assert.NoError(t, err) err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{configMap}, true) assert.NoError(t, err) @@ -395,6 +324,7 @@ func TestExpectedConfigMap(t *testing.T) { "app.kubernetes.io/instance": "default.test", "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/part-of": "opentelemetry", } taConfig["config"] = promConfig["config"] taConfig["allocation_strategy"] = "least-weighted" diff --git a/pkg/targetallocator/annotations.go b/pkg/targetallocator/annotations.go new file mode 100644 index 000000000..c342841f5 --- /dev/null +++ b/pkg/targetallocator/annotations.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "crypto/sha256" + "fmt" + + v1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const configMapHashAnnotationKey = "opentelemetry-targetallocator-config/hash" + +// Annotations returns the annotations for the TargetAllocator Pod. +func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { + // Make a copy of PodAnnotations to be safe + annotations := make(map[string]string, len(instance.Spec.PodAnnotations)) + for key, value := range instance.Spec.PodAnnotations { + annotations[key] = value + } + + configMap, err := ConfigMap(instance) + if err == nil { + annotations[configMapHashAnnotationKey] = getConfigMapSHA(configMap) + } + + return annotations +} + +// getConfigMapSHA returns the hash of the content of the TA ConfigMap. +func getConfigMapSHA(configMap v1.ConfigMap) string { + configBytes := configMap.BinaryData[targetAllocatorFilename] + h := sha256.Sum256(configBytes) + return fmt.Sprintf("%x", h) +} diff --git a/pkg/targetallocator/annotations_test.go b/pkg/targetallocator/annotations_test.go new file mode 100644 index 000000000..b286c1adf --- /dev/null +++ b/pkg/targetallocator/annotations_test.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestPodAnnotations(t *testing.T) { + instance := collectorInstance() + instance.Spec.PodAnnotations = map[string]string{ + "key": "value", + } + annotations := Annotations(instance) + assert.Subset(t, annotations, instance.Spec.PodAnnotations) +} + +func TestConfigMapHash(t *testing.T) { + instance := collectorInstance() + annotations := Annotations(instance) + require.Contains(t, annotations, configMapHashAnnotationKey) + cmHash := annotations[configMapHashAnnotationKey] + assert.Len(t, cmHash, 64) +} + +func TestInvalidConfigNoHash(t *testing.T) { + instance := collectorInstance() + instance.Spec.Config = "" + annotations := Annotations(instance) + require.NotContains(t, annotations, configMapHashAnnotationKey) +} diff --git a/pkg/targetallocator/configmap.go b/pkg/targetallocator/configmap.go new file mode 100644 index 000000000..cc5ef855a --- /dev/null +++ b/pkg/targetallocator/configmap.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "strings" + + "gopkg.in/yaml.v2" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" +) + +const ( + targetAllocatorFilename = "targetallocator.yaml" +) + +func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, error) { + name := naming.TAConfigMap(instance) + version := strings.Split(instance.Spec.Image, ":") + labels := Labels(instance, name) + if len(version) > 1 { + labels["app.kubernetes.io/version"] = version[len(version)-1] + } else { + labels["app.kubernetes.io/version"] = "latest" + } + + // Collector supports environment variable substitution, but the TA does not. + // TA ConfigMap should have a single "$", as it does not support env var substitution + prometheusReceiverConfig, err := adapters.UnescapeDollarSignsInPromConfig(instance.Spec.Config) + if err != nil { + return corev1.ConfigMap{}, err + } + + taConfig := make(map[interface{}]interface{}) + taConfig["label_selector"] = collector.SelectorLabels(instance) + // We only take the "config" from the returned object, if it's present + if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { + taConfig["config"] = prometheusConfig + } + + if len(instance.Spec.TargetAllocator.AllocationStrategy) > 0 { + taConfig["allocation_strategy"] = instance.Spec.TargetAllocator.AllocationStrategy + } else { + taConfig["allocation_strategy"] = v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted + } + + if len(instance.Spec.TargetAllocator.FilterStrategy) > 0 { + taConfig["filter_strategy"] = instance.Spec.TargetAllocator.FilterStrategy + } + + if instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { + taConfig["service_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector + } + + if instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { + taConfig["pod_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector + } + + taConfigYAML, err := yaml.Marshal(taConfig) + if err != nil { + return corev1.ConfigMap{}, err + } + + return corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: instance.Namespace, + Labels: labels, + Annotations: instance.Annotations, + }, + Data: map[string]string{ + targetAllocatorFilename: string(taConfigYAML), + }, + }, nil +} diff --git a/pkg/targetallocator/configmap_test.go b/pkg/targetallocator/configmap_test.go new file mode 100644 index 000000000..2d2821d84 --- /dev/null +++ b/pkg/targetallocator/configmap_test.go @@ -0,0 +1,102 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDesiredConfigMap(t *testing.T) { + expectedLables := map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": "default.my-instance", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "0.47.0", + } + + t.Run("should return expected target allocator config map", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" + + expectedData := map[string]string{ + "targetallocator.yaml": `allocation_strategy: least-weighted +config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: + - 0.0.0.0:8888 + - 0.0.0.0:9999 +label_selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: default.my-instance + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry +`, + } + + actual, err := ConfigMap(collectorInstance()) + assert.NoError(t, err) + + assert.Equal(t, "my-instance-targetallocator", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + t.Run("should return expected target allocator config map with label selectors", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" + + expectedData := map[string]string{ + "targetallocator.yaml": `allocation_strategy: least-weighted +config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: + - 0.0.0.0:8888 + - 0.0.0.0:9999 +label_selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: default.my-instance + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry +pod_monitor_selector: + release: my-instance +service_monitor_selector: + release: my-instance +`, + } + instance := collectorInstance() + instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector = map[string]string{ + "release": "my-instance", + } + instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector = map[string]string{ + "release": "my-instance", + } + actual, err := ConfigMap(instance) + assert.NoError(t, err) + + assert.Equal(t, "my-instance-targetallocator", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + +} diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index a0b75a5d9..b3ab0a9ab 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -29,6 +29,7 @@ import ( func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { name := naming.TargetAllocator(otelcol) labels := Labels(otelcol, name) + annotations := Annotations(otelcol) return appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ @@ -44,7 +45,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: labels, - Annotations: otelcol.Spec.PodAnnotations, + Annotations: annotations, }, Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), diff --git a/pkg/targetallocator/deployment_test.go b/pkg/targetallocator/deployment_test.go index 50257bb59..fda0446b3 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/pkg/targetallocator/deployment_test.go @@ -15,6 +15,8 @@ package targetallocator import ( + "fmt" + "os" "testing" "github.com/stretchr/testify/assert" @@ -40,11 +42,7 @@ var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ func TestDeploymentNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } + otelcol := collectorInstance() cfg := config.New() // test @@ -56,8 +54,9 @@ func TestDeploymentNewDefault(t *testing.T) { assert.Len(t, d.Spec.Template.Spec.Containers, 1) - // none of the default annotations should propagate down to the pod - assert.Empty(t, d.Spec.Template.Annotations) + // should only have the ConfigMap hash annotation + assert.Contains(t, d.Spec.Template.Annotations, configMapHashAnnotationKey) + assert.Len(t, d.Spec.Template.Annotations, 1) // the pod selector should match the pod spec's labels assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) @@ -66,14 +65,8 @@ func TestDeploymentNewDefault(t *testing.T) { func TestDeploymentPodAnnotations(t *testing.T) { // prepare testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - PodAnnotations: testPodAnnotationValues, - }, - } + otelcol := collectorInstance() + otelcol.Spec.PodAnnotations = testPodAnnotationValues cfg := config.New() // test @@ -81,7 +74,24 @@ func TestDeploymentPodAnnotations(t *testing.T) { // verify assert.Equal(t, "my-instance-targetallocator", ds.Name) - assert.Equal(t, testPodAnnotationValues, ds.Spec.Template.Annotations) + assert.Subset(t, ds.Spec.Template.Annotations, testPodAnnotationValues) +} + +func collectorInstance() v1alpha1.OpenTelemetryCollector { + configYAML, err := os.ReadFile("testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + return v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "default", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Config: string(configYAML), + }, + } } func TestDeploymentNodeSelector(t *testing.T) { diff --git a/pkg/targetallocator/testdata/test.yaml b/pkg/targetallocator/testdata/test.yaml new file mode 100644 index 000000000..9738230f9 --- /dev/null +++ b/pkg/targetallocator/testdata/test.yaml @@ -0,0 +1,22 @@ +processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus, jaeger] + processors: [] + exporters: [logging] diff --git a/tests/e2e/smoke-targetallocator/01-assert.yaml b/tests/e2e/smoke-targetallocator/01-assert.yaml new file mode 100644 index 000000000..e420b0348 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/01-assert.yaml @@ -0,0 +1,8 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: stateful-targetallocator +status: + replicas: 1 + readyReplicas: 1 + observedGeneration: 2 diff --git a/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml b/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml new file mode 100644 index 000000000..094ab4158 --- /dev/null +++ b/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml @@ -0,0 +1,37 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: stateful +spec: + mode: statefulset + targetAllocator: + enabled: true + serviceAccount: ta + image: "local/opentelemetry-operator-targetallocator:e2e" + prometheusCR: + enabled: true + config: | + receivers: + jaeger: + protocols: + grpc: + + # Collect own metrics + prometheus: + config: + scrape_configs: + - job_name: 'otel-collector' + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888' ] + + processors: + + exporters: + logging: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [logging] From cbc4bb3c06d3d7c4b8054b3f021235dd19b6c1dc Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 13 Jul 2023 18:54:15 +0200 Subject: [PATCH 0925/1234] [chore] Use KUBECONFIG env var to find the config for wait-until-hpa-ready (#1910) * Use KUBECONFIG environment variable as the default to find the kubeconfig Signed-off-by: Israel Blancas * Fix lint --------- Signed-off-by: Israel Blancas --- .../e2e-autoscale/autoscale/wait-until-hpa-ready.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go index a5da97df1..3b74418dd 100644 --- a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go +++ b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go @@ -32,15 +32,19 @@ import ( func main() { var hpaName string var timeout time.Duration - var kubeconfigPath string - - defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") pflag.StringVar(&hpaName, "hpa", "", "HPA to check") - pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") pflag.Parse() + kubeconfigEnv := os.Getenv("KUBECONFIG") + kubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") + if kubeconfigEnv != "" { + if _, err := os.Stat(kubeconfigEnv); err != nil { + kubeconfigPath = kubeconfigEnv + } + } + if len(hpaName) == 0 { fmt.Println("hpa flag is mandatory") os.Exit(1) From ec0568fe1bc62217f12168864e039b4d05f27372 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:54:55 -0600 Subject: [PATCH 0926/1234] [autoinstrumentation] Bump java version (#1918) * Bump java version * changelog --- .chloggen/bump-java.yaml | 16 ++++++++++++++++ autoinstrumentation/java/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 .chloggen/bump-java.yaml diff --git a/.chloggen/bump-java.yaml b/.chloggen/bump-java.yaml new file mode 100755 index 000000000..207b14920 --- /dev/null +++ b/.chloggen/bump-java.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bumps java autoinstrumentation version to 1.28.0 + +# One or more tracking issues related to the change +issues: [1918] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 5ff8c4f5d..cfc730712 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.26.0 +1.28.0 From ec1e0a37ccbea8963de83783a682d599a35527b2 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 14 Jul 2023 16:56:10 +0200 Subject: [PATCH 0927/1234] Make the go-autoinstrumentation E2E test work in OpenShift (#1920) --- tests/e2e/instrumentation-go/01-add-scc.yaml | 16 ++++++++++++++++ .../{01-assert.yaml => 02-assert.yaml} | 0 ...1-install-app.yaml => 02-install-app.yaml} | 5 +++++ tests/e2e/instrumentation-go/add-scc.sh | 6 ++++++ tests/e2e/instrumentation-go/scc.yaml | 19 +++++++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 tests/e2e/instrumentation-go/01-add-scc.yaml rename tests/e2e/instrumentation-go/{01-assert.yaml => 02-assert.yaml} (100%) rename tests/e2e/instrumentation-go/{01-install-app.yaml => 02-install-app.yaml} (84%) create mode 100755 tests/e2e/instrumentation-go/add-scc.sh create mode 100644 tests/e2e/instrumentation-go/scc.yaml diff --git a/tests/e2e/instrumentation-go/01-add-scc.yaml b/tests/e2e/instrumentation-go/01-add-scc.yaml new file mode 100644 index 000000000..e8a82d749 --- /dev/null +++ b/tests/e2e/instrumentation-go/01-add-scc.yaml @@ -0,0 +1,16 @@ +# Create a SA to apply the SCC policy +apiVersion: v1 +kind: ServiceAccount +metadata: + name: otel-instrumentation-go +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - script: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=0/0 --overwrite + - script: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite + # Add the SCC + - script: ./add-scc.sh diff --git a/tests/e2e/instrumentation-go/01-assert.yaml b/tests/e2e/instrumentation-go/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-go/01-assert.yaml rename to tests/e2e/instrumentation-go/02-assert.yaml diff --git a/tests/e2e/instrumentation-go/01-install-app.yaml b/tests/e2e/instrumentation-go/02-install-app.yaml similarity index 84% rename from tests/e2e/instrumentation-go/01-install-app.yaml rename to tests/e2e/instrumentation-go/02-install-app.yaml index 1650adf30..527ca4491 100644 --- a/tests/e2e/instrumentation-go/01-install-app.yaml +++ b/tests/e2e/instrumentation-go/02-install-app.yaml @@ -16,6 +16,11 @@ spec: instrumentation.opentelemetry.io/inject-go: "true" instrumentation.opentelemetry.io/otel-go-auto-target-exe: /usr/src/app/productcatalogservice spec: + serviceAccountName: otel-instrumentation-go + securityContext: + runAsUser: 0 + runAsGroup: 3000 + fsGroup: 2000 containers: - name: productcatalogservice image: ghcr.io/open-telemetry/demo:1.3.1-productcatalogservice diff --git a/tests/e2e/instrumentation-go/add-scc.sh b/tests/e2e/instrumentation-go/add-scc.sh new file mode 100755 index 000000000..d5bb738b3 --- /dev/null +++ b/tests/e2e/instrumentation-go/add-scc.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then + kubectl apply -f scc.yaml + oc adm policy add-scc-to-user otel-go-instrumentation -z otel-instrumentation-go -n $NAMESPACE +fi diff --git a/tests/e2e/instrumentation-go/scc.yaml b/tests/e2e/instrumentation-go/scc.yaml new file mode 100644 index 000000000..45891eb6d --- /dev/null +++ b/tests/e2e/instrumentation-go/scc.yaml @@ -0,0 +1,19 @@ +apiVersion: security.openshift.io/v1 +kind: SecurityContextConstraints +metadata: + name: otel-go-instrumentation +allowHostDirVolumePlugin: true +allowPrivilegeEscalation: true +allowPrivilegedContainer: true +allowedCapabilities: +- 'SYS_PTRACE' +fsGroup: + type: RunAsAny +runAsUser: + type: RunAsAny +seLinuxContext: + type: RunAsAny +seccompProfiles: +- '*' +supplementalGroups: + type: RunAsAny From 56f5de94dd3f1f83ac7dbdba3b8b4a6379317b48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 14 Jul 2023 18:21:13 +0100 Subject: [PATCH 0928/1234] Fix Target Allocator config reload (#1924) --- pkg/targetallocator/annotations.go | 12 +++++++++--- pkg/targetallocator/annotations_test.go | 9 ++++++++- tests/e2e/smoke-targetallocator/00-assert.yaml | 1 + tests/e2e/smoke-targetallocator/00-install.yaml | 6 ++++-- .../smoke-targetallocator/01-change-ta-config.yaml | 6 ++++-- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/pkg/targetallocator/annotations.go b/pkg/targetallocator/annotations.go index c342841f5..5a35cd654 100644 --- a/pkg/targetallocator/annotations.go +++ b/pkg/targetallocator/annotations.go @@ -35,7 +35,10 @@ func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { configMap, err := ConfigMap(instance) if err == nil { - annotations[configMapHashAnnotationKey] = getConfigMapSHA(configMap) + cmHash := getConfigMapSHA(configMap) + if cmHash != "" { + annotations[configMapHashAnnotationKey] = getConfigMapSHA(configMap) + } } return annotations @@ -43,7 +46,10 @@ func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { // getConfigMapSHA returns the hash of the content of the TA ConfigMap. func getConfigMapSHA(configMap v1.ConfigMap) string { - configBytes := configMap.BinaryData[targetAllocatorFilename] - h := sha256.Sum256(configBytes) + configString, ok := configMap.Data[targetAllocatorFilename] + if !ok { + return "" + } + h := sha256.Sum256([]byte(configString)) return fmt.Sprintf("%x", h) } diff --git a/pkg/targetallocator/annotations_test.go b/pkg/targetallocator/annotations_test.go index b286c1adf..d5dbb74f1 100644 --- a/pkg/targetallocator/annotations_test.go +++ b/pkg/targetallocator/annotations_test.go @@ -15,6 +15,8 @@ package targetallocator import ( + "crypto/sha256" + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -32,10 +34,15 @@ func TestPodAnnotations(t *testing.T) { func TestConfigMapHash(t *testing.T) { instance := collectorInstance() + expectedConfigMap, err := ConfigMap(instance) + require.NoError(t, err) + expectedConfig := expectedConfigMap.Data[targetAllocatorFilename] + require.NotEmpty(t, expectedConfig) + expectedHash := sha256.Sum256([]byte(expectedConfig)) annotations := Annotations(instance) require.Contains(t, annotations, configMapHashAnnotationKey) cmHash := annotations[configMapHashAnnotationKey] - assert.Len(t, cmHash, 64) + assert.Equal(t, fmt.Sprintf("%x", expectedHash), cmHash) } func TestInvalidConfigNoHash(t *testing.T) { diff --git a/tests/e2e/smoke-targetallocator/00-assert.yaml b/tests/e2e/smoke-targetallocator/00-assert.yaml index 355df73c4..f7c6adfef 100644 --- a/tests/e2e/smoke-targetallocator/00-assert.yaml +++ b/tests/e2e/smoke-targetallocator/00-assert.yaml @@ -13,6 +13,7 @@ metadata: status: replicas: 1 readyReplicas: 1 + observedGeneration: 1 --- apiVersion: v1 kind: ConfigMap diff --git a/tests/e2e/smoke-targetallocator/00-install.yaml b/tests/e2e/smoke-targetallocator/00-install.yaml index 0bbdc5ce1..1711e686c 100644 --- a/tests/e2e/smoke-targetallocator/00-install.yaml +++ b/tests/e2e/smoke-targetallocator/00-install.yaml @@ -28,6 +28,8 @@ spec: enabled: true serviceAccount: ta image: "local/opentelemetry-operator-targetallocator:e2e" + prometheusCR: + enabled: true config: | receivers: jaeger: @@ -42,9 +44,9 @@ spec: scrape_interval: 10s static_configs: - targets: [ '0.0.0.0:8888' ] - + processors: - + exporters: logging: service: diff --git a/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml b/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml index 094ab4158..a19eeb410 100644 --- a/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml +++ b/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml @@ -10,6 +10,8 @@ spec: image: "local/opentelemetry-operator-targetallocator:e2e" prometheusCR: enabled: true + serviceMonitorSelector: + key: value # this is just an arbitrary change to the target allocator config config: | receivers: jaeger: @@ -24,9 +26,9 @@ spec: scrape_interval: 10s static_configs: - targets: [ '0.0.0.0:8888' ] - + processors: - + exporters: logging: service: From f9184d09b2f4b24efcdf566aca48838d9ad019cc Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:38:00 -0600 Subject: [PATCH 0929/1234] [autoinstrumentation] Bump python version (#1930) * Bump python version * Add changelog --- .chloggen/bump-python.yaml | 16 ++++ autoinstrumentation/python/requirements.txt | 95 +++++++++++---------- 2 files changed, 64 insertions(+), 47 deletions(-) create mode 100755 .chloggen/bump-python.yaml diff --git a/.chloggen/bump-python.yaml b/.chloggen/bump-python.yaml new file mode 100755 index 000000000..89836e194 --- /dev/null +++ b/.chloggen/bump-python.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump python packages to 1.19.0/0.40b0 + +# One or more tracking issues related to the change +issues: [1930] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 2a47bf66f..cb25a4c14 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,55 +1,56 @@ -opentelemetry-distro==0.39b0 +opentelemetry-distro==0.40b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.18.0 +opentelemetry-exporter-otlp-proto-http==1.19.0 -opentelemetry-propagator-b3==1.18.0 -opentelemetry-propagator-jaeger==1.18.0 +opentelemetry-propagator-b3==1.19.0 +opentelemetry-propagator-jaeger==1.19.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.39b0 -opentelemetry-propagator-ot-trace==0.39b0 +opentelemetry-instrumentation==0.40b0 +opentelemetry-propagator-ot-trace==0.40b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.39b0 -opentelemetry-instrumentation-aiohttp-client==0.39b0 -opentelemetry-instrumentation-aiopg==0.39b0 -opentelemetry-instrumentation-asgi==0.39b0 -opentelemetry-instrumentation-asyncpg==0.39b0 -opentelemetry-instrumentation-boto==0.39b0 -opentelemetry-instrumentation-boto3sqs==0.39b0 -opentelemetry-instrumentation-botocore==0.39b0 -opentelemetry-instrumentation-celery==0.39b0 -opentelemetry-instrumentation-confluent-kafka==0.39b0 -opentelemetry-instrumentation-dbapi==0.39b0 -opentelemetry-instrumentation-django==0.39b0 -opentelemetry-instrumentation-elasticsearch==0.39b0 -opentelemetry-instrumentation-falcon==0.39b0 -opentelemetry-instrumentation-fastapi==0.39b0 -opentelemetry-instrumentation-flask==0.39b0 -opentelemetry-instrumentation-grpc==0.39b0 -opentelemetry-instrumentation-httpx==0.39b0 -opentelemetry-instrumentation-jinja2==0.39b0 -opentelemetry-instrumentation-kafka-python==0.39b0 -opentelemetry-instrumentation-logging==0.39b0 -opentelemetry-instrumentation-mysql==0.39b0 -opentelemetry-instrumentation-pika==0.39b0 -opentelemetry-instrumentation-psycopg2==0.39b0 -opentelemetry-instrumentation-pymemcache==0.39b0 -opentelemetry-instrumentation-pymongo==0.39b0 -opentelemetry-instrumentation-pymysql==0.39b0 -opentelemetry-instrumentation-pyramid==0.39b0 -opentelemetry-instrumentation-redis==0.39b0 -opentelemetry-instrumentation-remoulade==0.39b0 -opentelemetry-instrumentation-requests==0.39b0 -opentelemetry-instrumentation-sklearn==0.39b0 -opentelemetry-instrumentation-sqlalchemy==0.39b0 -opentelemetry-instrumentation-sqlite3==0.39b0 -opentelemetry-instrumentation-starlette==0.39b0 -opentelemetry-instrumentation-system-metrics==0.39b0 -opentelemetry-instrumentation-tornado==0.39b0 -opentelemetry-instrumentation-tortoiseorm==0.39b0 -opentelemetry-instrumentation-urllib==0.39b0 -opentelemetry-instrumentation-urllib3==0.39b0 -opentelemetry-instrumentation-wsgi==0.39b0 +opentelemetry-instrumentation-aio-pika==0.40b0 +opentelemetry-instrumentation-aiohttp-client==0.40b0 +opentelemetry-instrumentation-aiopg==0.40b0 +opentelemetry-instrumentation-asgi==0.40b0 +opentelemetry-instrumentation-asyncpg==0.40b0 +opentelemetry-instrumentation-boto==0.40b0 +opentelemetry-instrumentation-boto3sqs==0.40b0 +opentelemetry-instrumentation-botocore==0.40b0 +opentelemetry-instrumentation-celery==0.40b0 +opentelemetry-instrumentation-confluent-kafka==0.40b0 +opentelemetry-instrumentation-dbapi==0.40b0 +opentelemetry-instrumentation-django==0.40b0 +opentelemetry-instrumentation-elasticsearch==0.40b0 +opentelemetry-instrumentation-falcon==0.40b0 +opentelemetry-instrumentation-fastapi==0.40b0 +opentelemetry-instrumentation-flask==0.40b0 +opentelemetry-instrumentation-grpc==0.40b0 +opentelemetry-instrumentation-httpx==0.40b0 +opentelemetry-instrumentation-jinja2==0.40b0 +opentelemetry-instrumentation-kafka-python==0.40b0 +opentelemetry-instrumentation-logging==0.40b0 +opentelemetry-instrumentation-mysql==0.40b0 +opentelemetry-instrumentation-mysqlclient==0.40b0 +opentelemetry-instrumentation-pika==0.40b0 +opentelemetry-instrumentation-psycopg2==0.40b0 +opentelemetry-instrumentation-pymemcache==0.40b0 +opentelemetry-instrumentation-pymongo==0.40b0 +opentelemetry-instrumentation-pymysql==0.40b0 +opentelemetry-instrumentation-pyramid==0.40b0 +opentelemetry-instrumentation-redis==0.40b0 +opentelemetry-instrumentation-remoulade==0.40b0 +opentelemetry-instrumentation-requests==0.40b0 +opentelemetry-instrumentation-sklearn==0.40b0 +opentelemetry-instrumentation-sqlalchemy==0.40b0 +opentelemetry-instrumentation-sqlite3==0.40b0 +opentelemetry-instrumentation-starlette==0.40b0 +opentelemetry-instrumentation-system-metrics==0.40b0 +opentelemetry-instrumentation-tornado==0.40b0 +opentelemetry-instrumentation-tortoiseorm==0.40b0 +opentelemetry-instrumentation-urllib==0.40b0 +opentelemetry-instrumentation-urllib3==0.40b0 +opentelemetry-instrumentation-wsgi==0.40b0 From 421a54518e207f19c3aefc9916a2a090d1729d70 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:59:44 -0600 Subject: [PATCH 0930/1234] Skip flaky test (#1937) --- .../00-install-collector.yaml | 43 +++--- .../00-install-instrumentation.yaml | 35 ++--- .../01-assert.yaml | 141 +++++++++--------- .../01-install-app.yaml | 71 ++++----- .../02-assert.yaml | 135 ++++++++--------- .../02-install-app.yaml | 71 ++++----- 6 files changed, 251 insertions(+), 245 deletions(-) diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml b/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml index f25801708..e51b1bd32 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml @@ -1,21 +1,22 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: opentelemetry.io/v1alpha1 +#kind: OpenTelemetryCollector +#metadata: +# name: sidecar +#spec: +# mode: sidecar +# config: | +# receivers: +# otlp: +# protocols: +# grpc: +# http: +# processors: +# exporters: +# logging: +# service: +# pipelines: +# traces: +# receivers: [otlp] +# processors: [] +# exporters: [logging] diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml b/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml index 26bcbaf9e..4d7a2b22f 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml @@ -1,17 +1,18 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: apache -spec: - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - apacheHttpd: - attrs: - - name: ApacheModuleOtelMaxQueueSize - value: "4096" +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: opentelemetry.io/v1alpha1 +#kind: Instrumentation +#metadata: +# name: apache +#spec: +# exporter: +# endpoint: http://localhost:4317 +# propagators: +# - jaeger +# - b3 +# sampler: +# type: parentbased_traceidratio +# argument: "0.25" +# apacheHttpd: +# attrs: +# - name: ApacheModuleOtelMaxQueueSize +# value: "4096" diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml index 4a6ddc1ef..c2f7496e9 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml @@ -1,70 +1,71 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-apache-httpd: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - labels: - app: my-apache -spec: - containers: - - env: - - name: OTEL_SERVICE_NAME - value: my-apache - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /opt/opentelemetry-webserver/agent - name: otel-apache-agent - - mountPath: /usr/local/apache2/conf - name: otel-apache-conf-dir - - env: - - name: OTEL_SERVICE_NAME - value: my-apache - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myrabbit - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - args: - - --config=env:OTEL_CONFIG - name: otc-container -status: - phase: Running +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: v1 +#kind: Pod +#metadata: +# annotations: +# sidecar.opentelemetry.io/inject: "true" +# instrumentation.opentelemetry.io/inject-apache-httpd: "true" +# instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" +# labels: +# app: my-apache +#spec: +# containers: +# - env: +# - name: OTEL_SERVICE_NAME +# value: my-apache +# - name: OTEL_EXPORTER_OTLP_ENDPOINT +# value: http://localhost:4317 +# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: metadata.name +# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: spec.nodeName +# - name: OTEL_PROPAGATORS +# value: jaeger,b3 +# - name: OTEL_TRACES_SAMPLER +# value: parentbased_traceidratio +# - name: OTEL_TRACES_SAMPLER_ARG +# value: "0.25" +# - name: OTEL_RESOURCE_ATTRIBUTES +# name: myapp +# volumeMounts: +# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount +# - mountPath: /opt/opentelemetry-webserver/agent +# name: otel-apache-agent +# - mountPath: /usr/local/apache2/conf +# name: otel-apache-conf-dir +# - env: +# - name: OTEL_SERVICE_NAME +# value: my-apache +# - name: OTEL_EXPORTER_OTLP_ENDPOINT +# value: http://localhost:4317 +# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: metadata.name +# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: spec.nodeName +# - name: OTEL_PROPAGATORS +# value: jaeger,b3 +# - name: OTEL_TRACES_SAMPLER +# value: parentbased_traceidratio +# - name: OTEL_TRACES_SAMPLER_ARG +# value: "0.25" +# - name: OTEL_RESOURCE_ATTRIBUTES +# name: myrabbit +# volumeMounts: +# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount +# - args: +# - --config=env:OTEL_CONFIG +# name: otc-container +#status: +# phase: Running diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml b/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml index d5e3b630e..1d7fbb025 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml @@ -1,35 +1,36 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-apache -spec: - selector: - matchLabels: - app: my-apache - replicas: 1 - template: - metadata: - labels: - app: my-apache - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-apache-httpd: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - containers: - - name: myapp - image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e - # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd - # licensed under Apache 2.0 - imagePullPolicy: Always - ports: - - containerPort: 8080 - resources: - limits: - cpu: "1" - memory: 500Mi - requests: - cpu: 250m - memory: 100Mi - - name: myrabbit - image: rabbitmq +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: apps/v1 +#kind: Deployment +#metadata: +# name: my-apache +#spec: +# selector: +# matchLabels: +# app: my-apache +# replicas: 1 +# template: +# metadata: +# labels: +# app: my-apache +# annotations: +# sidecar.opentelemetry.io/inject: "true" +# instrumentation.opentelemetry.io/inject-apache-httpd: "true" +# instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" +# spec: +# containers: +# - name: myapp +# image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e +# # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd +# # licensed under Apache 2.0 +# imagePullPolicy: Always +# ports: +# - containerPort: 8080 +# resources: +# limits: +# cpu: "1" +# memory: 500Mi +# requests: +# cpu: 250m +# memory: 100Mi +# - name: myrabbit +# image: rabbitmq diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml index 029982e32..dd2981899 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml @@ -1,67 +1,68 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-apache-httpd: "true" - sidecar.opentelemetry.io/inject: "true" - labels: - app: my-apache -spec: - containers: - - env: - - name: OTEL_SERVICE_NAME - value: my-apache - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /opt/opentelemetry-webserver/agent - name: otel-apache-agent - - mountPath: /usr/local/apache2/conf - name: otel-apache-conf-dir - - env: - - name: OTEL_SERVICE_NAME - value: my-apache - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myrabbit - - args: - - --config=env:OTEL_CONFIG - name: otc-container -status: - phase: Running +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: v1 +#kind: Pod +#metadata: +# annotations: +# instrumentation.opentelemetry.io/inject-apache-httpd: "true" +# sidecar.opentelemetry.io/inject: "true" +# labels: +# app: my-apache +#spec: +# containers: +# - env: +# - name: OTEL_SERVICE_NAME +# value: my-apache +# - name: OTEL_EXPORTER_OTLP_ENDPOINT +# value: http://localhost:4317 +# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: metadata.name +# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: spec.nodeName +# - name: OTEL_PROPAGATORS +# value: jaeger,b3 +# - name: OTEL_TRACES_SAMPLER +# value: parentbased_traceidratio +# - name: OTEL_TRACES_SAMPLER_ARG +# value: "0.25" +# - name: OTEL_RESOURCE_ATTRIBUTES +# name: myapp +# volumeMounts: +# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount +# - mountPath: /opt/opentelemetry-webserver/agent +# name: otel-apache-agent +# - mountPath: /usr/local/apache2/conf +# name: otel-apache-conf-dir +# - env: +# - name: OTEL_SERVICE_NAME +# value: my-apache +# - name: OTEL_EXPORTER_OTLP_ENDPOINT +# value: http://localhost:4317 +# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: metadata.name +# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME +# valueFrom: +# fieldRef: +# apiVersion: v1 +# fieldPath: spec.nodeName +# - name: OTEL_PROPAGATORS +# value: jaeger,b3 +# - name: OTEL_TRACES_SAMPLER +# value: parentbased_traceidratio +# - name: OTEL_TRACES_SAMPLER_ARG +# value: "0.25" +# - name: OTEL_RESOURCE_ATTRIBUTES +# name: myrabbit +# - args: +# - --config=env:OTEL_CONFIG +# name: otc-container +#status: +# phase: Running diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml b/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml index 232a8057f..8044cda2f 100644 --- a/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml +++ b/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml @@ -1,35 +1,36 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-apache -spec: - selector: - matchLabels: - app: my-apache - replicas: 1 - template: - metadata: - labels: - app: my-apache - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-apache-httpd: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - containers: - - name: myapp - image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e - # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd - # licensed under Apache 2.0 - imagePullPolicy: Always - ports: - - containerPort: 8080 - resources: - limits: - cpu: "1" - memory: 500Mi - requests: - cpu: 250m - memory: 100Mi - - name: myrabbit - image: rabbitmq +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +#apiVersion: apps/v1 +#kind: Deployment +#metadata: +# name: my-apache +#spec: +# selector: +# matchLabels: +# app: my-apache +# replicas: 1 +# template: +# metadata: +# labels: +# app: my-apache +# annotations: +# sidecar.opentelemetry.io/inject: "true" +# instrumentation.opentelemetry.io/inject-apache-httpd: "true" +# instrumentation.opentelemetry.io/container-names: "myrabbit" +# spec: +# containers: +# - name: myapp +# image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e +# # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd +# # licensed under Apache 2.0 +# imagePullPolicy: Always +# ports: +# - containerPort: 8080 +# resources: +# limits: +# cpu: "1" +# memory: 500Mi +# requests: +# cpu: 250m +# memory: 100Mi +# - name: myrabbit +# image: rabbitmq From d1ede76473a897a1cc9481695ebae6c44888395b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 19 Jul 2023 15:28:06 +0000 Subject: [PATCH 0931/1234] [target allocator] Make scrape interval configurable (#1923) * [target allocator] Make scrape interval configurable * Put PrometheusCR config for TA in a separate structure --- .../feat_scrape-config-configurable.yaml | 16 +++++++++ apis/v1alpha1/opentelemetrycollector_types.go | 6 ++++ apis/v1alpha1/zz_generated.deepcopy.go | 6 ++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ cmd/otel-allocator/config/config.go | 17 ++++++++- cmd/otel-allocator/config/config_test.go | 8 ++++- .../config/testdata/config_test.yaml | 4 ++- cmd/otel-allocator/watcher/promOperator.go | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 ++++ docs/api.md | 11 ++++++ pkg/targetallocator/configmap.go | 9 +++++ pkg/targetallocator/configmap_test.go | 36 +++++++++++++++++++ 12 files changed, 123 insertions(+), 4 deletions(-) create mode 100755 .chloggen/feat_scrape-config-configurable.yaml diff --git a/.chloggen/feat_scrape-config-configurable.yaml b/.chloggen/feat_scrape-config-configurable.yaml new file mode 100755 index 000000000..8c60b8655 --- /dev/null +++ b/.chloggen/feat_scrape-config-configurable.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Make the Target Allocator default scrape interval for Prometheus CRs configurable + +# One or more tracking issues related to the change +issues: [1925] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: Note that this only works for Prometheus CRs, raw Prometheus configuration from the receiver uses its own settings. diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index eb9aa6cd2..7c14e54b0 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -251,6 +251,12 @@ type OpenTelemetryTargetAllocatorPrometheusCR struct { // Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. // +optional Enabled bool `json:"enabled,omitempty"` + // Interval between consecutive scrapes. Equivalent to the same setting on the Prometheus CRD. + // + // Default: "30s" + // +kubebuilder:default:="30s" + // +kubebuilder:validation:Format:=duration + ScrapeInterval *metav1.Duration `json:"scrapeInterval,omitempty"` // PodMonitors to be selected for target discovery. // This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a // PodMonitor's meta labels. The requirements are ANDed. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 6fb7da24e..433a1b516 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -23,6 +23,7 @@ import ( "k8s.io/api/autoscaling/v2" "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -699,6 +700,11 @@ func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopyInto(out *OpenTelemetryTargetAllocatorPrometheusCR) { *out = *in + if in.ScrapeInterval != nil { + in, out := &in.ScrapeInterval, &out.ScrapeInterval + *out = new(metav1.Duration) + **out = **in + } if in.PodMonitorSelector != nil { in, out := &in.PodMonitorSelector, &out.PodMonitorSelector *out = make(map[string]string, len(*in)) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 55b4cff92..a7673696f 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3578,6 +3578,12 @@ spec: the map is going to exactly match a label in a PodMonitor's meta labels. The requirements are ANDed. type: object + scrapeInterval: + default: 30s + description: "Interval between consecutive scrapes. Equivalent + to the same setting on the Prometheus CRD. \n Default: \"30s\"" + format: duration + type: string serviceMonitorSelector: additionalProperties: type: string diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 569eac851..4828722bc 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -24,6 +24,7 @@ import ( "time" "github.com/go-logr/logr" + "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" _ "github.com/prometheus/prometheus/discovery/install" "github.com/spf13/pflag" @@ -38,16 +39,22 @@ import ( const DefaultResyncTime = 5 * time.Minute const DefaultConfigFilePath string = "/conf/targetallocator.yaml" +const DefaultCRScrapeInterval model.Duration = model.Duration(time.Second * 30) type Config struct { LabelSelector map[string]string `yaml:"label_selector,omitempty"` Config *promconfig.Config `yaml:"config"` AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` FilterStrategy *string `yaml:"filter_strategy,omitempty"` + PrometheusCR PrometheusCRConfig `yaml:"prometheus_cr,omitempty"` PodMonitorSelector map[string]string `yaml:"pod_monitor_selector,omitempty"` ServiceMonitorSelector map[string]string `yaml:"service_monitor_selector,omitempty"` } +type PrometheusCRConfig struct { + ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"` +} + func (c Config) GetAllocationStrategy() string { if c.AllocationStrategy != nil { return *c.AllocationStrategy @@ -77,7 +84,7 @@ type CLIConfig struct { } func Load(file string) (Config, error) { - var cfg Config + cfg := createDefaultConfig() if err := unmarshal(&cfg, file); err != nil { return Config{}, err } @@ -96,6 +103,14 @@ func unmarshal(cfg *Config, configFile string) error { return nil } +func createDefaultConfig() Config { + return Config{ + PrometheusCR: PrometheusCRConfig{ + ScrapeInterval: DefaultCRScrapeInterval, + }, + } +} + func ParseCLI() (CLIConfig, error) { opts := zap.Options{} opts.BindFlags(flag.CommandLine) diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 65e28aeef..91f0d63b7 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -48,6 +48,9 @@ func TestLoad(t *testing.T) { "app.kubernetes.io/instance": "default.test", "app.kubernetes.io/managed-by": "opentelemetry-operator", }, + PrometheusCR: PrometheusCRConfig{ + ScrapeInterval: model.Duration(time.Second * 60), + }, Config: &promconfig.Config{ GlobalConfig: promconfig.GlobalConfig{ ScrapeInterval: model.Duration(60 * time.Second), @@ -96,7 +99,7 @@ func TestLoad(t *testing.T) { args: args{ file: "./testdata/no_config.yaml", }, - want: Config{}, + want: createDefaultConfig(), wantErr: assert.NoError, }, { @@ -109,6 +112,9 @@ func TestLoad(t *testing.T) { "app.kubernetes.io/instance": "default.test", "app.kubernetes.io/managed-by": "opentelemetry-operator", }, + PrometheusCR: PrometheusCRConfig{ + ScrapeInterval: DefaultCRScrapeInterval, + }, Config: &promconfig.Config{ GlobalConfig: promconfig.GlobalConfig{ ScrapeInterval: model.Duration(60 * time.Second), diff --git a/cmd/otel-allocator/config/testdata/config_test.yaml b/cmd/otel-allocator/config/testdata/config_test.yaml index 67670f26f..efdc27bc3 100644 --- a/cmd/otel-allocator/config/testdata/config_test.yaml +++ b/cmd/otel-allocator/config/testdata/config_test.yaml @@ -1,6 +1,8 @@ label_selector: app.kubernetes.io/instance: default.test app.kubernetes.io/managed-by: opentelemetry-operator +prometheus_cr: + scrape_interval: 60s config: scrape_configs: - job_name: prometheus @@ -12,4 +14,4 @@ config: static_configs: - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] labels: - my: label \ No newline at end of file + my: label diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 9f26a9923..f5e05aea7 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -59,7 +59,7 @@ func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config, cliC prom := &monitoringv1.Prometheus{ Spec: monitoringv1.PrometheusSpec{ CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ - ScrapeInterval: monitoringv1.Duration("30s"), + ScrapeInterval: monitoringv1.Duration(cfg.PrometheusCR.ScrapeInterval.String()), }, }, } diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 39950402f..98fd85fd0 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3575,6 +3575,12 @@ spec: the map is going to exactly match a label in a PodMonitor's meta labels. The requirements are ANDed. type: object + scrapeInterval: + default: 30s + description: "Interval between consecutive scrapes. Equivalent + to the same setting on the Prometheus CRD. \n Default: \"30s\"" + format: duration + type: string serviceMonitorSelector: additionalProperties: type: string diff --git a/docs/api.md b/docs/api.md index b41afc35c..71f404816 100644 --- a/docs/api.md +++ b/docs/api.md @@ -10029,6 +10029,17 @@ PrometheusCR defines the configuration for the retrieval of PrometheusOperator C PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's meta labels. The requirements are ANDed.
false + + scrapeInterval + string + + Interval between consecutive scrapes. Equivalent to the same setting on the Prometheus CRD. + Default: "30s"
+
+ Format: duration
+ Default: 30s
+ + false serviceMonitorSelector map[string]string diff --git a/pkg/targetallocator/configmap.go b/pkg/targetallocator/configmap.go index cc5ef855a..210bd1c8b 100644 --- a/pkg/targetallocator/configmap.go +++ b/pkg/targetallocator/configmap.go @@ -49,6 +49,7 @@ func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, erro } taConfig := make(map[interface{}]interface{}) + prometheusCRConfig := make(map[interface{}]interface{}) taConfig["label_selector"] = collector.SelectorLabels(instance) // We only take the "config" from the returned object, if it's present if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { @@ -65,6 +66,10 @@ func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, erro taConfig["filter_strategy"] = instance.Spec.TargetAllocator.FilterStrategy } + if instance.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Size() > 0 { + prometheusCRConfig["scrape_interval"] = instance.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Duration + } + if instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { taConfig["service_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector } @@ -73,6 +78,10 @@ func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, erro taConfig["pod_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector } + if len(prometheusCRConfig) > 0 { + taConfig["prometheus_cr"] = prometheusCRConfig + } + taConfigYAML, err := yaml.Marshal(taConfig) if err != nil { return corev1.ConfigMap{}, err diff --git a/pkg/targetallocator/configmap_test.go b/pkg/targetallocator/configmap_test.go index 2d2821d84..5e2d239c7 100644 --- a/pkg/targetallocator/configmap_test.go +++ b/pkg/targetallocator/configmap_test.go @@ -16,8 +16,10 @@ package targetallocator import ( "testing" + "time" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) func TestDesiredConfigMap(t *testing.T) { @@ -98,5 +100,39 @@ service_monitor_selector: assert.Equal(t, expectedData, actual.Data) }) + t.Run("should return expected target allocator config map with scrape interval set", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" + expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" + + expectedData := map[string]string{ + "targetallocator.yaml": `allocation_strategy: least-weighted +config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: + - 0.0.0.0:8888 + - 0.0.0.0:9999 +label_selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: default.my-instance + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry +prometheus_cr: + scrape_interval: 30s +`, + } + + collector := collectorInstance() + collector.Spec.TargetAllocator.PrometheusCR.ScrapeInterval = &metav1.Duration{Duration: time.Second * 30} + actual, err := ConfigMap(collector) + assert.NoError(t, err) + + assert.Equal(t, "my-instance-targetallocator", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) } From 04dbbb48679f4869f01d735715dd7e936d05dec6 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Wed, 19 Jul 2023 23:06:28 +0530 Subject: [PATCH 0932/1234] Fix e2e-autoscale test case on OpenShift (#1927) Signed-off-by: Ishwar Kanse Co-authored-by: Jacob Aronoff --- tests/e2e-autoscale/autoscale/03-install.yaml | 2 +- tests/e2e-autoscale/autoscale/05-assert.yaml | 2 +- .../cmd/verify/wait-and-validate-metrics.go | 25 ++++++++++++---- .../autoscale/wait-until-hpa-ready.go | 30 +++++++++++-------- tests/e2e-openshift/Dockerfile | 25 ++++++++++++---- 5 files changed, 59 insertions(+), 25 deletions(-) diff --git a/tests/e2e-autoscale/autoscale/03-install.yaml b/tests/e2e-autoscale/autoscale/03-install.yaml index 0c2ee6249..d4401cae3 100644 --- a/tests/e2e-autoscale/autoscale/03-install.yaml +++ b/tests/e2e-autoscale/autoscale/03-install.yaml @@ -18,4 +18,4 @@ spec: - -duration=1m - -workers=20 restartPolicy: Never - backoffLimit: 4 \ No newline at end of file + backoffLimit: 4 diff --git a/tests/e2e-autoscale/autoscale/05-assert.yaml b/tests/e2e-autoscale/autoscale/05-assert.yaml index dac0c9e10..d67919fa3 100644 --- a/tests/e2e-autoscale/autoscale/05-assert.yaml +++ b/tests/e2e-autoscale/autoscale/05-assert.yaml @@ -4,4 +4,4 @@ metadata: name: simplest-set-utilization status: scale: - replicas: 1 \ No newline at end of file + replicas: 1 diff --git a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go index 65b1e7bd5..9126b3295 100644 --- a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go +++ b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go @@ -34,17 +34,13 @@ func main() { var hpaName string var timeout time.Duration var numMetrics int - var kubeconfigPath string var cpuValue int var memoryValue int var scaleDownWindow int var scaleUpWindow int - defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") - pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") pflag.StringVar(&hpaName, "hpa", "", "HPA to check") - pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") pflag.IntVar(&numMetrics, "num-metrics", 1, "number of expected metrics in Spec") pflag.IntVar(&cpuValue, "cpu-value", -1, "value for target CPU utilization") pflag.IntVar(&memoryValue, "memory-value", -1, "value for target memory utilization") @@ -57,7 +53,14 @@ func main() { os.Exit(1) } - config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + kubeconfigPath := getKubeconfigPath() + + configLoader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( + &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, + &clientcmd.ConfigOverrides{}, + ) + + config, err := configLoader.ClientConfig() if err != nil { fmt.Printf("Error reading the kubeconfig: %s\n", err) os.Exit(1) @@ -170,3 +173,15 @@ func main() { fmt.Printf("%s is ready!\n", hpaName) } + +func getKubeconfigPath() string { + kubeconfigEnv := os.Getenv("KUBECONFIG") + if kubeconfigEnv != "" { + if _, err := os.Stat(kubeconfigEnv); err == nil { + return kubeconfigEnv + } + } + + homeDir := homedir.HomeDir() + return filepath.Join(homeDir, ".kube", "config") +} diff --git a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go index 3b74418dd..51bc7328d 100644 --- a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go +++ b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go @@ -22,7 +22,7 @@ import ( "time" "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" @@ -37,19 +37,13 @@ func main() { pflag.StringVar(&hpaName, "hpa", "", "HPA to check") pflag.Parse() - kubeconfigEnv := os.Getenv("KUBECONFIG") - kubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") - if kubeconfigEnv != "" { - if _, err := os.Stat(kubeconfigEnv); err != nil { - kubeconfigPath = kubeconfigEnv - } - } - if len(hpaName) == 0 { fmt.Println("hpa flag is mandatory") os.Exit(1) } + kubeconfigPath := getKubeconfigPath() + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) if err != nil { fmt.Printf("Error reading the kubeconfig: %s\n", err) @@ -62,7 +56,7 @@ func main() { os.Exit(1) } - namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), metav1.GetOptions{}) + namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), v1.GetOptions{}) if err != nil { fmt.Println(err) os.Exit(1) @@ -80,13 +74,13 @@ func main() { hpav2, err := hpaClientV2.Get( c, hpaName, - metav1.GetOptions{}, + v1.GetOptions{}, ) if err != nil { hpav1, err := hpaClientV1.Get( c, hpaName, - metav1.GetOptions{}, + v1.GetOptions{}, ) if err != nil { fmt.Printf("HPA %s not found\n", hpaName) @@ -113,3 +107,15 @@ func main() { fmt.Printf("%s is ready!\n", hpaName) } + +func getKubeconfigPath() string { + kubeconfigEnv := os.Getenv("KUBECONFIG") + if kubeconfigEnv != "" { + if _, err := os.Stat(kubeconfigEnv); err == nil { + return kubeconfigEnv + } + } + + homeDir := homedir.HomeDir() + return filepath.Join(homeDir, ".kube", "config") +} diff --git a/tests/e2e-openshift/Dockerfile b/tests/e2e-openshift/Dockerfile index 715598a53..17e9b46e4 100644 --- a/tests/e2e-openshift/Dockerfile +++ b/tests/e2e-openshift/Dockerfile @@ -7,15 +7,28 @@ COPY . /tmp/opentelemetry-operator WORKDIR /tmp +# Set the Go path and Go cache environment variables +ENV GOPATH=/tmp/go +ENV GOBIN=/tmp/go/bin +ENV GOCACHE=/tmp/.cache/go-build +ENV PATH=$PATH:$GOBIN + +# Create the /tmp/go/bin and build cache directories, and grant read and write permissions to all users +RUN mkdir -p /tmp/go/bin $GOCACHE \ + && chmod -R 777 /tmp/go/bin $GOPATH $GOCACHE + +# Install dependencies required by test cases and debugging +RUN apt-get update && apt-get install -y jq vim libreadline-dev + # Install kuttl -RUN curl -L -o kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 \ - && chmod +x kuttl \ - && mv kuttl /usr/local/bin/kuttl +RUN curl -LO https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 \ + && chmod +x kubectl-kuttl_0.15.0_linux_x86_64 \ + && mv kubectl-kuttl_0.15.0_linux_x86_64 /usr/local/bin/kuttl # Install kubectl and oc -RUN curl -L -o oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz \ - && tar -xvzf oc.tar.gz \ - && chmod +x kubectl oc \ +RUN curl -LO https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz \ + && tar -xzf openshift-client-linux.tar.gz \ + && chmod +x oc kubectl \ && mv oc kubectl /usr/local/bin/ # Set the working directory From c5e438ba41bec98e3ef54e41417ab01789ef156b Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 20 Jul 2023 10:04:15 -0600 Subject: [PATCH 0933/1234] [autoinstrumentation] Bump go autoinstrumentation (#1915) * Bump go autoinstrumentation * add changelog * Update test --------- Co-authored-by: Jacob Aronoff --- .chloggen/bump-go-instrumentation.yaml | 16 ++++++++++++++++ tests/e2e/instrumentation-go/02-assert.yaml | 2 +- versions.txt | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 .chloggen/bump-go-instrumentation.yaml diff --git a/.chloggen/bump-go-instrumentation.yaml b/.chloggen/bump-go-instrumentation.yaml new file mode 100755 index 000000000..12a638e83 --- /dev/null +++ b/.chloggen/bump-go-instrumentation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump opentelemetry-go-instrumentation image to v0.2.2-alpha + +# One or more tracking issues related to the change +issues: [1915] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/tests/e2e/instrumentation-go/02-assert.yaml b/tests/e2e/instrumentation-go/02-assert.yaml index 90a36d351..de65955b4 100644 --- a/tests/e2e/instrumentation-go/02-assert.yaml +++ b/tests/e2e/instrumentation-go/02-assert.yaml @@ -19,7 +19,7 @@ spec: requests: cpu: "50m" memory: "32Mi" - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.1-alpha + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.2-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE value: /usr/src/app/productcatalogservice diff --git a/versions.txt b/versions.txt index b0a9e98c8..a20261dac 100644 --- a/versions.txt +++ b/versions.txt @@ -30,7 +30,7 @@ autoinstrumentation-python=0.39b0 autoinstrumentation-dotnet=0.7.0 # Represents the current release of Go instrumentation. -autoinstrumentation-go=v0.2.1-alpha +autoinstrumentation-go=v0.2.2-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From fe27564c00ff3c3078d5e21b89f82b358f1b6a37 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 20 Jul 2023 16:03:14 -0400 Subject: [PATCH 0934/1234] version bumps (#1948) --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 14 +++++++------- cmd/otel-allocator/go.mod | 6 +++--- cmd/otel-allocator/go.sum | 14 +++++++------- go.mod | 12 ++++++------ go.sum | 26 +++++++++++++------------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 695568962..3daeb79ad 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,8 +18,8 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.27.3 - k8s.io/client-go v0.27.3 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.0 ) @@ -84,7 +84,7 @@ require ( google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.27.3 // indirect + k8s.io/api v0.27.4 // indirect k8s.io/apiextensions-apiserver v0.27.3 // indirect k8s.io/component-base v0.27.3 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index a95d2897d..07b607ea8 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -232,7 +232,7 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -604,14 +604,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= -k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= -k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index bc353de36..9090ebbf6 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,9 +22,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.3 - k8s.io/apimachinery v0.27.3 - k8s.io/client-go v0.27.3 + k8s.io/api v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.0 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index ef6050eee..56babceaa 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -607,7 +607,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= @@ -1097,14 +1097,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= -k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= -k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= diff --git a/go.mod b/go.mod index 75f301301..f7c1380af 100644 --- a/go.mod +++ b/go.mod @@ -15,12 +15,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.3 - k8s.io/apiextensions-apiserver v0.27.3 - k8s.io/apimachinery v0.27.3 - k8s.io/client-go v0.27.3 - k8s.io/component-base v0.27.3 - k8s.io/kubectl v0.27.3 + k8s.io/api v0.27.4 + k8s.io/apiextensions-apiserver v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 + k8s.io/component-base v0.27.4 + k8s.io/kubectl v0.27.4 sigs.k8s.io/controller-runtime v0.15.0 ) diff --git a/go.sum b/go.sum index 899a78a3a..19faea5d2 100644 --- a/go.sum +++ b/go.sum @@ -473,7 +473,7 @@ github.com/prometheus/prometheus v0.45.0 h1:O/uG+Nw4kNxx/jDPxmjsSDd+9Ohql6E7ZSY1 github.com/prometheus/prometheus v0.45.0/go.mod h1:jC5hyO8ItJBnDWGecbEucMyXjzxGv9cxsxsjS9u5s1w= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4= @@ -916,22 +916,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= -k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= -k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= -k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= -k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= -k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= -k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= +k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= +k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/kubectl v0.27.3 h1:HyC4o+8rCYheGDWrkcOQHGwDmyLKR5bxXFgpvF82BOw= -k8s.io/kubectl v0.27.3/go.mod h1:g9OQNCC2zxT+LT3FS09ZYqnDhlvsKAfFq76oyarBcq4= +k8s.io/kubectl v0.27.4 h1:RV1TQLIbtL34+vIM+W7HaS3KfAbqvy9lWn6pWB9els4= +k8s.io/kubectl v0.27.4/go.mod h1:qtc1s3BouB9KixJkriZMQqTsXMc+OAni6FeKAhq7q14= k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From cdaa2c4777794011f3e0fb558d8ece9b7bd3b653 Mon Sep 17 00:00:00 2001 From: Hirotaka Tagawa / wafuwafu13 Date: Thu, 20 Jul 2023 21:20:00 +0100 Subject: [PATCH 0935/1234] docs: add StatefulSet to Deployment modes (#1913) * docs: add StatefulSet to Deployment modes * docs: add a --------- Co-authored-by: Jacob Aronoff --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b95778ea..da46c8ef3 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The default and only other acceptable value for `.Spec.UpgradeStrategy` is `auto ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/01-install.yaml) for reference. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, `StatefulSet` or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/01-install.yaml) for a reference of `DaemonSet`. #### Sidecar injection @@ -146,7 +146,7 @@ The possible values for the annotation can be: * "my-other-namespace/my-instrumentation" - name and namespace of `OpenTelemetryCollector` CR instance in another namespace. * "false" - do not inject -When using a pod-based workload, such as `Deployment` or `Statefulset`, make sure to add the annotation to the `PodTemplate` part. Like: +When using a pod-based workload, such as `Deployment` or `StatefulSet`, make sure to add the annotation to the `PodTemplate` part. Like: ```yaml kubectl apply -f - < Date: Fri, 21 Jul 2023 13:36:17 -0400 Subject: [PATCH 0936/1234] Update OTel Operator readme and Target Allocator readme (#1951) --- .chloggen/readme-updates.yaml | 16 +++++++++++++ README.md | 22 +++++++++++------- cmd/otel-allocator/README.md | 44 ++++++++++++++++++++++++----------- 3 files changed, 60 insertions(+), 22 deletions(-) create mode 100644 .chloggen/readme-updates.yaml diff --git a/.chloggen/readme-updates.yaml b/.chloggen/readme-updates.yaml new file mode 100644 index 000000000..af44f3b3e --- /dev/null +++ b/.chloggen/readme-updates.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Documentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update OTel Operator and Target Allocator readmes. + +# One or more tracking issues related to the change +issues: [1952] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index da46c8ef3..2cc6d6353 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The OpenTelemetry Operator is an implementation of a [Kubernetes Operator](https The operator manages: * [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) -* auto-instrumentation of the workloads using OpenTelemetry instrumentation libraries +* [auto-instrumentation](https://opentelemetry.io/docs/concepts/instrumentation/automatic/) of the workloads using OpenTelemetry instrumentation libraries ## Documentation @@ -66,7 +66,7 @@ This will create an OpenTelemetry Collector instance named `simplest`, exposing The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) documentation for a reference of the possible entries. -At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash. +> 🚨 **NOTE:** At this point, the Operator does *not* validate the contents of the configuration file: if the configuration is invalid, the instance will still be created but the underlying OpenTelemetry Collector might crash. The Operator does examine the configuration file to discover configured receivers and their ports. If it finds receivers with ports, it creates a pair of kubernetes services, one headless, exposing those ports within the cluster. The headless service contains a `service.beta.openshift.io/serving-cert-secret-name` annotation that will cause OpenShift to create a secret containing a certificate and key. This secret can be mounted as a volume and the certificate and key used in those receivers' TLS configurations. @@ -83,7 +83,13 @@ The default and only other acceptable value for `.Spec.UpgradeStrategy` is `auto ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the collector should run as a `DaemonSet`, `Sidecar`, `StatefulSet` or `Deployment` (default). Look at [this sample](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/01-install.yaml) for a reference of `DaemonSet`. +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the Collector should run as a [`DaemonSet`](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/), [`Sidecar`](https://kubernetes.io/docs/concepts/workloads/pods/#workload-resources-for-managing-pods), [`StatefulSet`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) or [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) (default). + +See below for examples of each deployment mode: +- [`Deployment`](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/ingress/00-install.yaml) +- [`DaemonSet`](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/daemonset-features/01-install.yaml) +- [`StatefulSet`](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/smoke-statefulset/00-install.yaml) +- [`Sidecar`](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/instrumentation-python/00-install-collector.yaml) #### Sidecar injection @@ -329,12 +335,12 @@ spec: In the above case, `myapp` and `myapp2` containers will be instrumented, `myapp3` will not. -**NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first pod should be the only pod you want instrumented. +> 🚨 **NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first pod should be the only pod you want instrumented. #### Use customized or vendor instrumentation By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by -overriding the image fields in a CR. +overriding the `image` fields in a CR. ```yaml apiVersion: opentelemetry.io/v1alpha1 @@ -381,7 +387,7 @@ List of all available attributes can be found at [otel-webserver-module](https:/ #### Inject OpenTelemetry SDK environment variables only -You can configure the OpenTelemetry SDK for applications which can't currently be autoinstrumented by using `inject-sdk` in place of (e.g.) `inject-python` or `inject-java`. This will inject environment variables like `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_TRACES_SAMPLER`, and `OTEL_EXPORTER_OTLP_ENDPOINT`, that you can configure in the `Instrumentation`, but will not actually provide the SDK. +You can configure the OpenTelemetry SDK for applications which can't currently be autoinstrumented by using `inject-sdk` in place of `inject-python` or `inject-java`, for example. This will inject environment variables like `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_TRACES_SAMPLER`, and `OTEL_EXPORTER_OTLP_ENDPOINT`, that you can configure in the `Instrumentation`, but will not actually provide the SDK. ```bash instrumentation.opentelemetry.io/inject-sdk: "true" @@ -409,7 +415,7 @@ Language not specified in the table are always supported and cannot be disabled. ### Target Allocator -The OpenTelemetry Operator comes with an optional component, the Target Allocator (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: +The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: ```yaml apiVersion: opentelemetry.io/v1alpha1 @@ -482,7 +488,7 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con Note how the Operator removes any existing service discovery configurations (e.g., `static_configs`, `file_sd_configs`, etc.) from the `scrape_configs` section and adds an `http_sd_configs` configuration pointing to a Target Allocator instance it provisioned. -The OpenTelemetry Operator will also convert the Target Allocator's promethueus configuration after the reconciliation into the following: +The OpenTelemetry Operator will also convert the Target Allocator's Prometheus configuration after the reconciliation into the following: ```yaml config: diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index e46fcd684..a5014811b 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -1,14 +1,25 @@ # Target Allocator -The TargetAllocator is an optional separately deployed component of an OpenTelemetry Collector setup, which is used to -distribute targets of the PrometheusReceiver on all deployed Collector instances. The release version matches the +Target Allocator is an optional component of the OpenTelemetry Collector [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CR). The release version matches the operator's most recent release as well. -In essence, Prometheus Receiver configs are overridden with a http_sd_configs directive that points to the -Allocator, these are then loadbalanced/sharded to the collectors. The Prometheus Receiver configs that are overridden -are what will be distributed with the same name. In addition to picking up receiver configs, the TargetAllocator -can discover targets via Prometheus CRs (currently ServiceMonitor, PodMonitor) which it presents as scrape configs -and jobs on the `/scrape_configs` and `/jobs` endpoints respectively. +In a nutshell, the TA is a mechanism for decoupling the service discovery and metric collection functions of Prometheus such that they can be scaled independently. The Collector manages Prometheus metrics without needing to install Prometheus. The TA manages the configuration of the Collector's [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). + +The TA serves two functions: +* Even distribution of Prometheus targets among a pool of Collectors +* Discovery of Prometheus Custom Resources + +## Even Distribution of Prometheus Targets + +The Target Allocator's first job is to discover targets to scrape and collectors to allocate targets to. Then it can distribute the targets it discovers among the collectors. This means that the OTel Collectors collect the metrics instead of a Prometheus [scraper](https://uzxmx.github.io/prometheus-scrape-internals.html). Metrics are ingested by the OTel Collectors by way of the [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). + +## Discovery of Prometheus Custom Resources + +The Target Allocator also provides for the discovery of [Prometheus Operator CRs](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md), namely the [ServiceMonitor and PodMonitor](https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator#target-allocator). The ServiceMonitor and the PodMonitor don’t do any scraping themselves; their purpose is to inform the Target Allocator (or Prometheus) to add a new job to their scrape configuration. These metrics are then ingested by way of the Prometheus Receiver on the OpenTelemetry Collector. + +Even though Prometheus is not required to be installed in your Kubernetes cluster to use the Target Allocator for Prometheus CR discovery, the TA does require that the ServiceMonitor and PodMonitor be installed. These CRs are bundled with Prometheus Operator; however, they can be installed standalone as well. + +The easiest way to do this is by going to the [Prometheus Operator’s Releases page](https://github.com/prometheus-operator/prometheus-operator/releases), grabbing a copy of the latest `bundle.yaml` file (for example, [this one](https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml)), and stripping out all of the YAML except the ServiceMonitor and PodMonitor YAML definitions. # Usage The `spec.targetAllocator:` controls the TargetAllocator general properties. Full API spec can be found here: [api.md#opentelemetrycollectorspectargetallocator](../../docs/api.md#opentelemetrycollectorspectargetallocator) @@ -44,14 +55,21 @@ spec: exporters: [logging] ``` +In essence, Prometheus Receiver configs are overridden with a `http_sd_config` directive that points to the +Allocator, these are then loadbalanced/sharded to the Collectors. The [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) configs that are overridden +are what will be distributed with the same name. + ## PrometheusCR specifics + TargetAllocator discovery of PrometheusCRs can be turned on by setting -`.spec.targetAllocator.prometheusCR.enabled` to `true` +`.spec.targetAllocator.prometheusCR.enabled` to `true`, which it presents as scrape configs +and jobs on the `/scrape_configs` and `/jobs` endpoints respectively. The CRs can be filtered by labels as documented here: [api.md#opentelemetrycollectorspectargetallocatorprometheuscr](../../docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr) -The prometheus receiver in the deployed collector also has to know where the Allocator service exists. This is done by a -OpenTelemetry Collector operator specific config. +The Prometheus Receiver in the deployed Collector also has to know where the Allocator service exists. This is done by a +OpenTelemetry Collector Operator-specific config. + ```yaml config: | receivers: @@ -64,15 +82,13 @@ OpenTelemetry Collector operator specific config. interval: 30s collector_id: "${POD_NAME}" ``` -Upstream documentation here: [Prometheusreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver#opentelemetry-operator) + +Upstream documentation here: [PrometheusReceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver#opentelemetry-operator) The TargetAllocator service is named based on the OpenTelemetryCollector CR name. `collector_id` should be unique per collector instance, such as the pod name. The `POD_NAME` environment variable is convenient since this is supplied to collector instance pods by default. -The Prometheus CRDs also have to exist for the Allocator to pick them up. The best place to get them is from -prometheus-operator: [Releases](https://github.com/prometheus-operator/prometheus-operator/releases). Only the CRDs for -CRs that the Allocator watches for need to be deployed. They can be picked out from the bundle.yaml file. ### RBAC The ServiceAccount that the TargetAllocator runs as, has to have access to the CRs. A role like this will provide that From 9e7fe16a3dbb463f2c72fd9a226ccb002d08a63a Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 24 Jul 2023 16:43:11 +0200 Subject: [PATCH 0937/1234] Expose the monitoring port depending on the configuration (#1950) * Create the monitoring service using the port specified by the user Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../1931-allow-customize-monitoring-port.yaml | 16 +++++ pkg/collector/adapters/config_to_ports.go | 37 ++++++++++ .../adapters/config_to_ports_test.go | 67 +++++++++++++++++++ pkg/collector/container.go | 39 +---------- pkg/collector/reconcile/service.go | 14 +++- pkg/collector/reconcile/service_test.go | 17 ++++- 6 files changed, 150 insertions(+), 40 deletions(-) create mode 100755 .chloggen/1931-allow-customize-monitoring-port.yaml diff --git a/.chloggen/1931-allow-customize-monitoring-port.yaml b/.chloggen/1931-allow-customize-monitoring-port.yaml new file mode 100755 index 000000000..3f214cf71 --- /dev/null +++ b/.chloggen/1931-allow-customize-monitoring-port.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: When an user specifies the monitoring port for their collector in the configuration, the monitoring service uses that port. + +# One or more tracking issues related to the change +issues: [1931] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go index c897bec83..55a165a14 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/pkg/collector/adapters/config_to_ports.go @@ -16,9 +16,12 @@ package adapters import ( "errors" + "net" "sort" + "strconv" "github.com/go-logr/logr" + "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" @@ -97,3 +100,37 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ return ports, nil } + +// ConfigToMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. +func ConfigToMetricsPort(logger logr.Logger, config map[interface{}]interface{}) (int32, error) { + // we don't need to unmarshal the whole config, just follow the keys down to + // the metrics address. + type metricsCfg struct { + Address string + } + type telemetryCfg struct { + Metrics metricsCfg + } + type serviceCfg struct { + Telemetry telemetryCfg + } + type cfg struct { + Service serviceCfg + } + var cOut cfg + err := mapstructure.Decode(config, &cOut) + if err != nil { + return 0, err + } + + _, port, err := net.SplitHostPort(cOut.Service.Telemetry.Metrics.Address) + if err != nil { + return 0, err + } + i64, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return 0, err + } + + return int32(i64), nil +} diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index fbc698955..09ead0cd8 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -206,6 +206,73 @@ func TestParserFailed(t *testing.T) { assert.True(t, mockParserCalled) } +func TestConfigToMetricsPort(t *testing.T) { + t.Run("custom port specified", func(t *testing.T) { + config := map[interface{}]interface{}{ + "service": map[interface{}]interface{}{ + "telemetry": map[interface{}]interface{}{ + "metrics": map[interface{}]interface{}{ + "address": "0.0.0.0:9090", + }, + }, + }, + } + + port, err := adapters.ConfigToMetricsPort(logger, config) + assert.NoError(t, err) + assert.Equal(t, int32(9090), port) + }) + + for _, tt := range []struct { + desc string + config map[interface{}]interface{} + }{ + { + "bad address", + map[interface{}]interface{}{ + "service": map[interface{}]interface{}{ + "telemetry": map[interface{}]interface{}{ + "metrics": map[interface{}]interface{}{ + "address": "0.0.0.0", + }, + }, + }, + }, + }, + { + "missing address", + map[interface{}]interface{}{ + "service": map[interface{}]interface{}{ + "telemetry": map[interface{}]interface{}{ + "metrics": map[interface{}]interface{}{ + "level": "detailed", + }, + }, + }, + }, + }, + { + "missing metrics", + map[interface{}]interface{}{ + "service": map[interface{}]interface{}{ + "telemetry": map[interface{}]interface{}{}, + }, + }, + }, + { + "missing telemetry", + map[interface{}]interface{}{ + "service": map[interface{}]interface{}{}, + }, + }, + } { + t.Run(tt.desc, func(t *testing.T) { + _, err := adapters.ConfigToMetricsPort(logger, tt.config) + assert.Error(t, err) + }) + } +} + type mockParser struct { portsFunc func() ([]corev1.ServicePort, error) } diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 156202209..716913b0b 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -16,12 +16,9 @@ package collector import ( "fmt" - "net" "sort" - "strconv" "github.com/go-logr/logr" - "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation" @@ -176,7 +173,7 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C } } - metricsPort, err := getMetricsPort(c) + metricsPort, err := adapters.ConfigToMetricsPort(logger, c) if err != nil { logger.Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) metricsPort = 8888 @@ -189,40 +186,6 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C return ports } -// getMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. -func getMetricsPort(c map[interface{}]interface{}) (int32, error) { - // we don't need to unmarshal the whole config, just follow the keys down to - // the metrics address. - type metricsCfg struct { - Address string - } - type telemetryCfg struct { - Metrics metricsCfg - } - type serviceCfg struct { - Telemetry telemetryCfg - } - type cfg struct { - Service serviceCfg - } - var cOut cfg - err := mapstructure.Decode(c, &cOut) - if err != nil { - return 0, err - } - - _, port, err := net.SplitHostPort(cOut.Service.Telemetry.Metrics.Address) - if err != nil { - return 0, err - } - i64, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return 0, err - } - - return int32(i64), nil -} - func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { ports := make([]corev1.ContainerPort, 0, len(portMap)) for _, p := range portMap { diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index ac471993e..715f892d5 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -184,6 +184,18 @@ func monitoringService(ctx context.Context, params Params) *corev1.Service { name := naming.MonitoringService(params.Instance) labels := collector.Labels(params.Instance, name, []string{}) + c, err := adapters.ConfigFromString(params.Instance.Spec.Config) + if err != nil { + params.Log.Error(err, "couldn't extract the configuration") + return nil + } + + metricsPort, err := adapters.ConfigToMetricsPort(params.Log, c) + if err != nil { + params.Log.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) + metricsPort = 8888 + } + return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -196,7 +208,7 @@ func monitoringService(ctx context.Context, params Params) *corev1.Service { ClusterIP: "", Ports: []corev1.ServicePort{{ Name: "monitoring", - Port: 8888, + Port: metricsPort, }}, }, } diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 17cac5415..18753982b 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -235,14 +235,29 @@ func TestHeadlessService(t *testing.T) { } func TestMonitoringService(t *testing.T) { - t.Run("returned service should expose monitoring port", func(t *testing.T) { + t.Run("returned service should expose monitoring port in the default port", func(t *testing.T) { expected := []v1.ServicePort{{ Name: "monitoring", Port: 8888, }} actual := monitoringService(context.Background(), params()) assert.Equal(t, expected, actual.Spec.Ports) + }) + t.Run("returned the service in a custom port", func(t *testing.T) { + expected := []v1.ServicePort{{ + Name: "monitoring", + Port: 9090, + }} + params := params() + params.Instance.Spec.Config = `service: + telemetry: + metrics: + level: detailed + address: 0.0.0.0:9090` + actual := monitoringService(context.Background(), params) + assert.NotNil(t, actual) + assert.Equal(t, expected, actual.Spec.Ports) }) } From e21920f1a217981b006dbc6f4453c434eaed6858 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 24 Jul 2023 23:42:06 +0200 Subject: [PATCH 0938/1234] Add version to the different feature flags (#1958) * Add version to the different feature flags Signed-off-by: Israel Blancas * Add missing version Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- pkg/featuregate/featuregate.go | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 901f6ae64..c2bcfd250 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -28,34 +28,48 @@ var ( EnableDotnetAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.dotnet", featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether the operator supports .NET auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports .NET auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.76.1"), + ) EnablePythonAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.python", featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether the operator supports Python auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports Python auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.76.1"), + ) EnableJavaAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.java", featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether the operator supports Java auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports Java auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.76.1"), + ) EnableNodeJSAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.nodejs", featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether the operator supports NodeJS auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports NodeJS auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.76.1"), + ) EnableGoAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.go", featuregate.StageAlpha, - featuregate.WithRegisterDescription("controls whether the operator supports Golang auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports Golang auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.77.0"), + ) EnableApacheHTTPAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.apache-httpd", featuregate.StageBeta, - featuregate.WithRegisterDescription("controls whether the operator supports Apache HTTPD auto-instrumentation")) + featuregate.WithRegisterDescription("controls whether the operator supports Apache HTTPD auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.80.0"), + ) // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should // automatically be rewritten when the target allocator is enabled. EnableTargetAllocatorRewrite = featuregate.GlobalRegistry().MustRegister( "operator.collector.rewritetargetallocator", featuregate.StageAlpha, - featuregate.WithRegisterDescription("controls whether the operator should configure the collector's targetAllocator configuration")) + featuregate.WithRegisterDescription("controls whether the operator should configure the collector's targetAllocator configuration"), + featuregate.WithRegisterFromVersion("v0.76.1"), + ) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. From 42ff92f19ebba2a3a2609a308fc25f0dc4a44ca2 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 25 Jul 2023 19:12:15 +0200 Subject: [PATCH 0939/1234] Create ServiceMonitors to gather metrics from the OTEL Operands (#1874) * Allow the creation of ServiceMonitors to gather metrics from the OpenTelemetry Collector instances Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas * Fix unprotected statement Signed-off-by: Israel Blancas * Fix lint issues Signed-off-by: Israel Blancas * Apply changes requested in code review Signed-off-by: Israel Blancas * Add missing generated files Signed-off-by: Israel Blancas * Change the way to enable the feature flag Signed-off-by: Israel Blancas * Change the way to enable the feature flag Signed-off-by: Israel Blancas * Fix merge * Fix enable feature flag * Change the name of the option and move the E2E tests to their own folder * Fix unit test * Fix docs * Fix CRD field * Fix CRD field * Add from version to feature gate Signed-off-by: Israel Blancas * Move the E2E tests to their own section for the CI Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../1768-gather-metrics-from-collectors.yaml | 16 ++ .github/workflows/e2e.yaml | 2 +- Makefile | 14 ++ apis/v1alpha1/opentelemetrycollector_types.go | 29 +++ apis/v1alpha1/zz_generated.deepcopy.go | 32 ++++ ...emetry-operator.clusterserviceversion.yaml | 24 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 13 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 13 ++ ...emetry-operator.clusterserviceversion.yaml | 12 ++ config/rbac/role.yaml | 12 ++ .../opentelemetrycollector_controller.go | 11 ++ docs/api.md | 61 +++++++ go.mod | 5 +- go.sum | 10 +- hack/install-prometheus-operator.sh | 7 + kuttl-test-prometheuscr.yaml | 20 +++ main.go | 2 + pkg/collector/reconcile/servicemonitor.go | 170 ++++++++++++++++++ .../reconcile/servicemonitor_test.go | 138 ++++++++++++++ pkg/collector/reconcile/suite_test.go | 11 +- pkg/collector/testdata/sm_crd.go | 38 ++++ pkg/featuregate/featuregate.go | 8 + pkg/naming/main.go | 5 + .../00-assert.yaml | 10 ++ .../00-install.yaml | 28 +++ 25 files changed, 683 insertions(+), 8 deletions(-) create mode 100755 .chloggen/1768-gather-metrics-from-collectors.yaml create mode 100755 hack/install-prometheus-operator.sh create mode 100644 kuttl-test-prometheuscr.yaml create mode 100644 pkg/collector/reconcile/servicemonitor.go create mode 100644 pkg/collector/reconcile/servicemonitor_test.go create mode 100644 pkg/collector/testdata/sm_crd.go create mode 100644 tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml create mode 100644 tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml diff --git a/.chloggen/1768-gather-metrics-from-collectors.yaml b/.chloggen/1768-gather-metrics-from-collectors.yaml new file mode 100755 index 000000000..27892054e --- /dev/null +++ b/.chloggen/1768-gather-metrics-from-collectors.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add the ability to the operator to create Service Monitors for the OpenTelemetry Collectors in order to gather the metrics they are generating + +# One or more tracking issues related to the change +issues: [1768] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index ac4221771..e790b3f2b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -29,10 +29,10 @@ jobs: - "1.27" group: - e2e e2e-upgrade + - e2e-prometheuscr - e2e-autoscale steps: - - name: Set up Go uses: actions/setup-go@v4 with: diff --git a/Makefile b/Makefile index f6585b5ed..553db2e2d 100644 --- a/Makefile +++ b/Makefile @@ -176,6 +176,11 @@ generate: controller-gen api-docs e2e: $(KUTTL) test +# end-to-end-test for PrometheusCR E2E tests +.PHONY: e2e-prometheuscr +e2e-prometheuscr: + $(KUTTL) test --config kuttl-test-prometheuscr.yaml + # end-to-end-test for testing upgrading .PHONY: e2e-upgrade e2e-upgrade: undeploy @@ -200,6 +205,11 @@ e2e-log-operator: prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh +.PHONY: enable-prometheus-feature-flag +enable-prometheus-feature-flag: + $(SED) -i "s#--feature-gates=+operator.autoinstrumentation.go#--feature-gates=+operator.autoinstrumentation.go,+operator.observability.prometheus#g" config/default/manager_auth_proxy_patch.yaml + + .PHONY: scorecard-tests scorecard-tests: operator-sdk $(OPERATOR_SDK) scorecard -w=5m bundle || (echo "scorecard test failed" && exit 1) @@ -238,6 +248,10 @@ endif install-metrics-server: ./hack/install-metrics-server.sh +.PHONY: install-prometheus-operator +install-prometheus-operator: + ./hack/install-prometheus-operator.sh + .PHONY: load-image-all load-image-all: load-image-operator load-image-target-allocator load-image-operator-opamp-bridge diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 7c14e54b0..443dd3f21 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -190,6 +190,14 @@ type OpenTelemetryCollectorSpec struct { // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` + + // ObservabilitySpec defines how telemetry data gets handled. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Observability" + Observability ObservabilitySpec `json:"observability,omitempty"` + // TopologySpreadConstraints embedded kubernetes pod configuration option, // controls how pods are spread across your cluster among failure-domains // such as regions, zones, nodes, and other user-defined topology domains @@ -371,6 +379,27 @@ type AutoscalerSpec struct { TargetMemoryUtilization *int32 `json:"targetMemoryUtilization,omitempty"` } +// MetricsConfigSpec defines a metrics config. +type MetricsConfigSpec struct { + // EnableMetrics specifies if ServiceMonitors should be created for the OpenTelemetry Collector. + // The operator.observability.prometheus feature gate must be enabled to use this feature. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Create ServiceMonitors for OpenTelemetry Collector" + EnableMetrics bool `json:"enableMetrics,omitempty"` +} + +// ObservabilitySpec defines how telemetry data gets handled. +type ObservabilitySpec struct { + // Metrics defines the metrics configuration for operands. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Metrics Config" + Metrics MetricsConfigSpec `json:"metrics,omitempty"` +} + // Probe defines the OpenTelemetry's pod probe config. Only Liveness probe is supported currently. type Probe struct { // Number of seconds after the container has started before liveness probes are initiated. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 433a1b516..800934266 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -354,6 +354,21 @@ func (in *MetricSpec) DeepCopy() *MetricSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MetricsConfigSpec) DeepCopyInto(out *MetricsConfigSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsConfigSpec. +func (in *MetricsConfigSpec) DeepCopy() *MetricsConfigSpec { + if in == nil { + return nil + } + out := new(MetricsConfigSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Nginx) DeepCopyInto(out *Nginx) { *out = *in @@ -407,6 +422,22 @@ func (in *NodeJS) DeepCopy() *NodeJS { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObservabilitySpec) DeepCopyInto(out *ObservabilitySpec) { + *out = *in + out.Metrics = in.Metrics +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilitySpec. +func (in *ObservabilitySpec) DeepCopy() *ObservabilitySpec { + if in == nil { + return nil + } + out := new(ObservabilitySpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenShiftRoute) DeepCopyInto(out *OpenShiftRoute) { *out = *in @@ -614,6 +645,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Observability = in.Observability if in.TopologySpreadConstraints != nil { in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints *out = make([]v1.TopologySpreadConstraint, len(*in)) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 1c40158fa..e402c3d1c 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -76,6 +76,18 @@ spec: - kind: StatefulSets name: "" version: apps/v1 + specDescriptors: + - description: ObservabilitySpec defines how telemetry data gets handled. + displayName: Observability + path: observability + - description: Metrics defines the metrics configuration for operands. + displayName: Metrics Config + path: observability.metrics + - description: EnableMetrics specifies if ServiceMonitors should be created + for the OpenTelemetry Collector. The operator.observability.prometheus feature + gate must be enabled to use this feature. + displayName: Create ServiceMonitors for OpenTelemetry Collector + path: observability.metrics.enableMetrics version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. @@ -209,6 +221,18 @@ spec: - get - list - update + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - networking.k8s.io resources: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index a7673696f..1a18ddb38 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2949,6 +2949,19 @@ spec: This is only relevant to daemonset, statefulset, and deployment mode type: object + observability: + description: ObservabilitySpec defines how telemetry data gets handled. + properties: + metrics: + description: Metrics defines the metrics configuration for operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitors should + be created for the OpenTelemetry Collector. The operator.observability.prometheus + feature gate must be enabled to use this feature. + type: boolean + type: object + type: object podAnnotations: additionalProperties: type: string diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 98fd85fd0..45c701979 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2946,6 +2946,19 @@ spec: This is only relevant to daemonset, statefulset, and deployment mode type: object + observability: + description: ObservabilitySpec defines how telemetry data gets handled. + properties: + metrics: + description: Metrics defines the metrics configuration for operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitors should + be created for the OpenTelemetry Collector. The operator.observability.prometheus + feature gate must be enabled to use this feature. + type: boolean + type: object + type: object podAnnotations: additionalProperties: type: string diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index b36f42e8e..8b814d4a9 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -56,6 +56,18 @@ spec: - kind: StatefulSets name: "" version: apps/v1 + specDescriptors: + - description: ObservabilitySpec defines how telemetry data gets handled. + displayName: Observability + path: observability + - description: Metrics defines the metrics configuration for operands. + displayName: Metrics Config + path: observability.metrics + - description: EnableMetrics specifies if ServiceMonitors should be created + for the OpenTelemetry Collector. The operator.observability.prometheus feature + gate must be enabled to use this feature. + displayName: Create ServiceMonitors for OpenTelemetry Collector + path: observability.metrics.enableMetrics version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index b907ad801..33dca0131 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -119,6 +119,18 @@ rules: - get - list - update +- apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - networking.k8s.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index efce335de..75b84a50b 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -21,6 +21,7 @@ import ( "sync" "github.com/go-logr/logr" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" @@ -35,6 +36,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. @@ -164,6 +166,11 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { "ingresses", true, }, + { + reconcile.ServiceMonitors, + "service monitors", + true, + }, { reconcile.Self, "opentelemetry", @@ -251,6 +258,10 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er Owns(&appsv1.DaemonSet{}). Owns(&appsv1.StatefulSet{}) + if featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + builder.Owns(&monitoringv1.ServiceMonitor{}) + } + autoscalingVersion := r.config.AutoscalingVersion() if autoscalingVersion == autodetect.AutoscalingVersionV2 { builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) diff --git a/docs/api.md b/docs/api.md index 71f404816..d1db878bf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3736,6 +3736,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. NodeSelector to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode
false + + observability + object + + ObservabilitySpec defines how telemetry data gets handled.
+ + false podAnnotations map[string]string @@ -8985,6 +8992,60 @@ Liveness config for the OpenTelemetry Collector except the probe handler which i +### OpenTelemetryCollector.spec.observability +[↩ Parent](#opentelemetrycollectorspec) + + + +ObservabilitySpec defines how telemetry data gets handled. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
metricsobject + Metrics defines the metrics configuration for operands.
+
false
+ + +### OpenTelemetryCollector.spec.observability.metrics +[↩ Parent](#opentelemetrycollectorspecobservability) + + + +Metrics defines the metrics configuration for operands. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
enableMetricsboolean + EnableMetrics specifies if ServiceMonitors should be created for the OpenTelemetry Collector. The operator.observability.prometheus feature gate must be enabled to use this feature.
+
false
+ + ### OpenTelemetryCollector.spec.podSecurityContext [↩ Parent](#opentelemetrycollectorspec) diff --git a/go.mod b/go.mod index f7c1380af..d7194f36a 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 github.com/prometheus/prometheus v0.45.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -140,7 +141,7 @@ require ( golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/text v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.9.3 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect @@ -154,7 +155,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect + k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 19faea5d2..b5d0b0207 100644 --- a/go.sum +++ b/go.sum @@ -440,6 +440,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 h1:PPW01FLVjJHMNcbAL1DDD9EZceSQKMOU/VpK0irrxrI= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -731,8 +733,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= +golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -932,8 +934,8 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/kubectl v0.27.4 h1:RV1TQLIbtL34+vIM+W7HaS3KfAbqvy9lWn6pWB9els4= k8s.io/kubectl v0.27.4/go.mod h1:qtc1s3BouB9KixJkriZMQqTsXMc+OAni6FeKAhq7q14= -k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= -k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= +k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/hack/install-prometheus-operator.sh b/hack/install-prometheus-operator.sh new file mode 100755 index 000000000..3809e9f15 --- /dev/null +++ b/hack/install-prometheus-operator.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [[ "$(kubectl api-resources --api-group=monitoring.coreos.com -o name)" ]]; then + echo "Prometheus CRDs are there" +else + kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml +fi diff --git a/kuttl-test-prometheuscr.yaml b/kuttl-test-prometheuscr.yaml new file mode 100644 index 000000000..266e5ccd8 --- /dev/null +++ b/kuttl-test-prometheuscr.yaml @@ -0,0 +1,20 @@ +# Make sure that the OT operator after upgrading itself, can upgrade the OT collectors without error. +# The test is based on the version v0.49.0, a breaking change was introduced from PR +# https://github.com/open-telemetry/opentelemetry-operator/pull/797, which added a version label "app.kubernetes.io/version", +# The version label would change between OT operator upgrade, and since at the time, the collector pod selector was the same +# as this labels, resulted in selector being modified during reconciliation which caused error due to the selector is immutable. +# Please be aware of that the collector labels are changeable in various ways, so this issue may happen in any operator < v0.52.0 +# which changed the selector to be a static set of labels. +# The fix for this issue including: +# https://github.com/open-telemetry/opentelemetry-operator/issues/840, make the selector be a static set of labels; +# https://github.com/open-telemetry/opentelemetry-operator/issues/1117, delete the old collector to let the operator +# create a new one when the selector changed. +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +commands: + - command: make undeploy + - command: make enable-prometheus-feature-flag deploy install-prometheus-operator + - command: go run hack/check-operator-ready.go +testDirs: + - ./tests/e2e-prometheuscr/ +timeout: 300 diff --git a/main.go b/main.go index 9964d3d2a..c7538a306 100644 --- a/main.go +++ b/main.go @@ -25,6 +25,7 @@ import ( "time" routev1 "github.com/openshift/api/route/v1" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/spf13/pflag" colfeaturegate "go.opentelemetry.io/collector/featuregate" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -71,6 +72,7 @@ func init() { utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) utilruntime.Must(routev1.AddToScheme(scheme)) + utilruntime.Must(monitoringv1.AddToScheme(scheme)) // +kubebuilder:scaffold:scheme } diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go new file mode 100644 index 000000000..7da2f275b --- /dev/null +++ b/pkg/collector/reconcile/servicemonitor.go @@ -0,0 +1,170 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "fmt" + + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" +) + +// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete + +// ServiceMonitors reconciles the service monitor(s) required for the instance in the current context. +func ServiceMonitors(ctx context.Context, params Params) error { + if !params.Instance.Spec.Observability.Metrics.EnableMetrics || !featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + return nil + } + + desired := desiredServiceMonitors(ctx, params) + + // first, handle the create/update parts + if err := expectedServiceMonitors(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the expected service monitors: %w", err) + } + + // then, delete the extra objects + if err := deleteServiceMonitors(ctx, params, desired); err != nil { + return fmt.Errorf("failed to reconcile the service monitors to be deleted: %w", err) + } + + return nil +} + +func desiredServiceMonitors(_ context.Context, params Params) []monitoringv1.ServiceMonitor { + col := params.Instance + return []monitoringv1.ServiceMonitor{ + { + ObjectMeta: metav1.ObjectMeta{ + Namespace: col.Namespace, + Name: naming.ServiceMonitor(col), + Labels: map[string]string{ + "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Endpoints: []monitoringv1.Endpoint{{ + Port: "monitoring", + }}, + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{col.Namespace}, + }, + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + }, + }, + } +} + +func expectedServiceMonitors(ctx context.Context, params Params, expected []monitoringv1.ServiceMonitor) error { + for _, obj := range expected { + desired := obj + + if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + return fmt.Errorf("failed to set controller reference: %w", err) + } + + existing := &monitoringv1.ServiceMonitor{} + nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} + err := params.Client.Get(ctx, nns, existing) + if err != nil && k8serrors.IsNotFound(err) { + if err = params.Client.Create(ctx, &desired); err != nil { + return fmt.Errorf("failed to create: %w", err) + } + params.Log.V(2).Info("created", "servicemonitor.name", desired.Name, "servicemonitor.namespace", desired.Namespace) + continue + } else if err != nil { + return fmt.Errorf("failed to get: %w", err) + } + + // it exists already, merge the two if the end result isn't identical to the existing one + updated := existing.DeepCopy() + if updated.Annotations == nil { + updated.Annotations = map[string]string{} + } + if updated.Labels == nil { + updated.Labels = map[string]string{} + } + updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences + updated.Spec.Endpoints = desired.Spec.Endpoints + updated.Spec.NamespaceSelector = desired.Spec.NamespaceSelector + updated.Spec.Selector = desired.Spec.Selector + + for k, v := range desired.ObjectMeta.Annotations { + updated.ObjectMeta.Annotations[k] = v + } + for k, v := range desired.ObjectMeta.Labels { + updated.ObjectMeta.Labels[k] = v + } + + patch := client.MergeFrom(existing) + + if err := params.Client.Patch(ctx, updated, patch); err != nil { + return fmt.Errorf("failed to apply changes: %w", err) + } + + params.Log.V(2).Info("applied", "servicemonitor.name", desired.Name, "servicemonitor.namespace", desired.Namespace) + } + return nil +} + +func deleteServiceMonitors(ctx context.Context, params Params, expected []monitoringv1.ServiceMonitor) error { + opts := []client.ListOption{ + client.InNamespace(params.Instance.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }), + } + + list := &monitoringv1.ServiceMonitorList{} + if err := params.Client.List(ctx, list, opts...); err != nil { + return fmt.Errorf("failed to list: %w", err) + } + + for i := range list.Items { + existing := list.Items[i] + del := true + for _, keep := range expected { + if keep.Name == existing.Name && keep.Namespace == existing.Namespace { + del = false + break + } + } + + if del { + if err := params.Client.Delete(ctx, existing); err != nil { + return fmt.Errorf("failed to delete: %w", err) + } + params.Log.V(2).Info("deleted", "servicemonitor.name", existing.Name, "servicemonitor.namespace", existing.Namespace) + } + } + + return nil +} diff --git a/pkg/collector/reconcile/servicemonitor_test.go b/pkg/collector/reconcile/servicemonitor_test.go new file mode 100644 index 000000000..d3ae598da --- /dev/null +++ b/pkg/collector/reconcile/servicemonitor_test.go @@ -0,0 +1,138 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package reconcile + +import ( + "context" + "testing" + + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + colfeaturegate "go.opentelemetry.io/collector/featuregate" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" +) + +func TestDesiredServiceMonitors(t *testing.T) { + params := params() + + actual := desiredServiceMonitors(context.Background(), params) + assert.NotNil(t, actual) +} + +func TestExpectedServiceMonitors(t *testing.T) { + originalVal := featuregate.PrometheusOperatorIsAvailable.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), originalVal)) + }) + + t.Run("should create the service monitor", func(t *testing.T) { + p := params() + p.Instance.Spec.Observability.Metrics.EnableMetrics = true + + err := expectedServiceMonitors( + context.Background(), + p, + []monitoringv1.ServiceMonitor{servicemonitor("test-collector")}, + ) + assert.NoError(t, err) + + exists, err := populateObjectIfExists(t, &monitoringv1.ServiceMonitor{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + + }) +} + +func TestDeleteServiceMonitors(t *testing.T) { + t.Run("should delete excess service monitors", func(t *testing.T) { + name := "sm-to-delete" + deleteServiceMonitor := servicemonitor(name) + createObjectIfNotExists(t, name, &deleteServiceMonitor) + + exists, err := populateObjectIfExists(t, &monitoringv1.ServiceMonitor{}, types.NamespacedName{Namespace: "default", Name: name}) + assert.NoError(t, err) + assert.True(t, exists) + + desired := desiredServiceMonitors(context.Background(), params()) + err = deleteServiceMonitors(context.Background(), params(), desired) + assert.NoError(t, err) + + exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: name}) + assert.NoError(t, err) + assert.False(t, exists) + }) +} + +func servicemonitor(name string) monitoringv1.ServiceMonitor { + return monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{"default"}, + }, + Endpoints: []monitoringv1.Endpoint{ + { + Port: "monitoring", + }, + }, + }, + } +} + +func TestServiceMonitors(t *testing.T) { + t.Run("not enabled", func(t *testing.T) { + ctx := context.Background() + err := ServiceMonitors(ctx, params()) + assert.Nil(t, err) + }) + + t.Run("enabled but featuregate not enabled", func(t *testing.T) { + ctx := context.Background() + p := params() + p.Instance.Spec.Observability.Metrics.EnableMetrics = true + err := ServiceMonitors(ctx, p) + assert.Nil(t, err) + }) + + t.Run("enabled and featuregate enabled", func(t *testing.T) { + originalVal := featuregate.PrometheusOperatorIsAvailable.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), originalVal)) + }) + + ctx := context.Background() + p := params() + p.Instance.Spec.Observability.Metrics.EnableMetrics = true + err := ServiceMonitors(ctx, p) + assert.Nil(t, err) + }) + +} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 8bc3efcf4..f0f37bba2 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -26,6 +26,7 @@ import ( "time" routev1 "github.com/openshift/api/route/v1" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -76,7 +77,10 @@ func TestMain(m *testing.M) { testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, CRDInstallOptions: envtest.CRDInstallOptions{ - CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, + CRDs: []*apiextensionsv1.CustomResourceDefinition{ + testdata.OpenShiftRouteCRD, + testdata.ServiceMonitorCRD, + }, }, WebhookInstallOptions: envtest.WebhookInstallOptions{ Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, @@ -97,6 +101,11 @@ func TestMain(m *testing.M) { fmt.Printf("failed to register scheme: %v", err) os.Exit(1) } + + if err = monitoringv1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } // +kubebuilder:scaffold:scheme k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) diff --git a/pkg/collector/testdata/sm_crd.go b/pkg/collector/testdata/sm_crd.go new file mode 100644 index 000000000..cb7322dbf --- /dev/null +++ b/pkg/collector/testdata/sm_crd.go @@ -0,0 +1,38 @@ +package testdata + +import ( + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ServiceMonitorCRD as go structure. +var ServiceMonitorCRD = &apiextensionsv1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "servicemonitors.monitoring.coreos.com", + }, + Spec: apiextensionsv1.CustomResourceDefinitionSpec{ + Group: "monitoring.coreos.com", + Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ + { + Name: "v1", + Served: true, + Storage: true, + Schema: &apiextensionsv1.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ + Type: "object", + XPreserveUnknownFields: func(v bool) *bool { return &v }(true), + }, + }, + Subresources: &apiextensionsv1.CustomResourceSubresources{ + Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, + }, + }, + }, + Scope: apiextensionsv1.NamespaceScoped, + Names: apiextensionsv1.CustomResourceDefinitionNames{ + Plural: "servicemonitors", + Singular: "servicemonitor", + Kind: "ServiceMonitor", + }, + }, +} diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index c2bcfd250..3f9f95bf4 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -70,6 +70,14 @@ var ( featuregate.WithRegisterDescription("controls whether the operator should configure the collector's targetAllocator configuration"), featuregate.WithRegisterFromVersion("v0.76.1"), ) + + // PrometheusOperatorIsAvailable is the feature gate that enables features associated to the Prometheus Operator. + PrometheusOperatorIsAvailable = featuregate.GlobalRegistry().MustRegister( + "operator.observability.prometheus", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("enables features associated to the Prometheus Operator"), + featuregate.WithRegisterFromVersion("v0.82.0"), + ) ) // Flags creates a new FlagSet that represents the available featuregate flags using the supplied featuregate registry. diff --git a/pkg/naming/main.go b/pkg/naming/main.go index af53636ef..d7117c41c 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -109,6 +109,11 @@ func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-collector", 63, otelcol.Name)) } +// ServiceMonitor builds the service account name based on the instance. +func ServiceMonitor(otelcol v1alpha1.OpenTelemetryCollector) string { + return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +} + // TargetAllocatorServiceAccount returns the TargetAllocator service account resource name. func TargetAllocatorServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) diff --git a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml b/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml new file mode 100644 index 000000000..586d61e94 --- /dev/null +++ b/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: simplest-collector +spec: + endpoints: + - port: monitoring + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml b/tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml new file mode 100644 index 000000000..dffa7a050 --- /dev/null +++ b/tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml @@ -0,0 +1,28 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + observability: + metrics: + enableMetrics: true + config: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger,otlp] + processors: [] + exporters: [logging] From 5b7a359fb26233661326fd0af0b58ebea1fd17da Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 28 Jul 2023 09:59:06 -0400 Subject: [PATCH 0940/1234] =?UTF-8?q?Add=20Miko=C5=82aj=20=C5=9Awi=C4=85te?= =?UTF-8?q?k=20as=20an=20approver=20(#1966)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add swiatekm as an approver * missed a spot --- .github/workflows/reusable-operator-hub-release.yaml | 2 +- README.md | 1 + RELEASE.md | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml index b0563998b..cc666db8a 100644 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -70,7 +70,7 @@ jobs: message="Update the opentelemetry to $VERSION" body="Release opentelemetry-operator \`$VERSION\`. - cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 @TylerHelmuth + cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 @TylerHelmuth @swiatekm-sumo " branch="update-opentelemetry-operator-to-${VERSION}" diff --git a/README.md b/README.md index 2cc6d6353..ab17b9b47 100644 --- a/README.md +++ b/README.md @@ -624,6 +624,7 @@ Approvers ([@open-telemetry/operator-approvers](https://github.com/orgs/open-tel - [Benedikt Bongartz](https://github.com/frzifus), Red Hat - [Tyler Helmuth](https://github.com/TylerHelmuth), Honeycomb - [Yuri Oliveira Sa](https://github.com/yuriolisa), Red Hat +- [Mikołaj Świątek](https://github.com/swiatekm-sumo), Sumo Logic Emeritus Approvers: diff --git a/RELEASE.md b/RELEASE.md index e259e8064..7985c4beb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -44,3 +44,4 @@ The operator should be released within a week after the [OpenTelemetry collector | v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | +| v0.88.0 | @swiatekm-sumo | From 8f5a7cd931991aaed642ee502863c959aa9f1ee6 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 1 Aug 2023 07:57:50 -0600 Subject: [PATCH 0941/1234] [autoinstrumention] Bump dotnet (#1978) * Bump dotnet * changelog --- .chloggen/bump-dotnet.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 .chloggen/bump-dotnet.yaml diff --git a/.chloggen/bump-dotnet.yaml b/.chloggen/bump-dotnet.yaml new file mode 100755 index 000000000..2315c57c2 --- /dev/null +++ b/.chloggen/bump-dotnet.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump dotnet dependency to 1.0.0-rc.1 + +# One or more tracking issues related to the change +issues: [1978] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index faef31a43..9c218192d 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -0.7.0 +1.0.0-rc.1 From 679f7b523f2b8a36594302454f97a172e009c4cb Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 1 Aug 2023 07:58:23 -0600 Subject: [PATCH 0942/1234] [autoinstrumentation] Bump NodeJS Dependencies (#1977) * Bump nodejs dependencies * changelog --- .chloggen/bump-js.yaml | 16 ++++++++++++++++ autoinstrumentation/nodejs/package.json | 22 +++++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) create mode 100755 .chloggen/bump-js.yaml diff --git a/.chloggen/bump-js.yaml b/.chloggen/bump-js.yaml new file mode 100755 index 000000000..96504fb2b --- /dev/null +++ b/.chloggen/bump-js.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentaion + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump NodeJS dependencies to 1.15.1/0.41.1 + +# One or more tracking issues related to the change +issues: [1977] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index dc3bb6a14..ed01e7828 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -15,16 +15,16 @@ }, "dependencies": { "@opentelemetry/api": "1.4.1", - "@opentelemetry/auto-instrumentations-node": "0.37.1", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.40.0", - "@opentelemetry/exporter-prometheus": "0.40.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.40.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.27.7", - "@opentelemetry/resource-detector-aws": "1.2.5", - "@opentelemetry/resource-detector-container": "0.2.5", - "@opentelemetry/resource-detector-gcp": "0.28.3", - "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-metrics": "1.14.0", - "@opentelemetry/sdk-node": "0.40.0" + "@opentelemetry/auto-instrumentations-node": "0.38.0", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.41.1", + "@opentelemetry/exporter-prometheus": "0.41.1", + "@opentelemetry/exporter-trace-otlp-grpc": "0.41.1", + "@opentelemetry/resource-detector-alibaba-cloud": "0.28.0", + "@opentelemetry/resource-detector-aws": "1.3.0", + "@opentelemetry/resource-detector-container": "0.3.0", + "@opentelemetry/resource-detector-gcp": "0.29.0", + "@opentelemetry/resources": "1.15.1", + "@opentelemetry/sdk-metrics": "1.15.1", + "@opentelemetry/sdk-node": "0.41.1" } } From c8fabb5201534a13a80f14049b4bced7b1746749 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 1 Aug 2023 21:51:04 +0200 Subject: [PATCH 0943/1234] Expose the Prometheus exporter port when specified in the config (#1953) * Expose Prometheus exporter port in the OTEL Collector Signed-off-by: Israel Blancas * Format Signed-off-by: Israel Blancas * Allow the usage of multiple exporters Signed-off-by: Israel Blancas * Format Signed-off-by: Israel Blancas * Fix tests Signed-off-by: Israel Blancas * Apply changes requested in CR --------- Signed-off-by: Israel Blancas --- ...e-prometheusexporter-pod-when-enabled.yaml | 16 +++++ pkg/collector/container.go | 59 +++++++++++++++++++ pkg/collector/container_test.go | 37 ++++++++++++ pkg/naming/ports.go | 40 +++++++++++++ pkg/naming/ports_test.go | 43 ++++++++++++++ 5 files changed, 195 insertions(+) create mode 100755 .chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml create mode 100644 pkg/naming/ports.go create mode 100644 pkg/naming/ports_test.go diff --git a/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml b/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml new file mode 100755 index 000000000..2545b5cbc --- /dev/null +++ b/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Expose the Prometheus exporter port in the OpenTelemetry Collector container when it is used in the configuration. + +# One or more tracking issues related to the change +issues: [1689] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 716913b0b..264d9a6eb 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -16,7 +16,10 @@ package collector import ( "fmt" + "net" "sort" + "strconv" + "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -183,9 +186,65 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C ContainerPort: metricsPort, Protocol: corev1.ProtocolTCP, } + + promExporterPorts, errs := getPrometheusExporterPorts(c) + for _, err := range errs { + logger.V(2).Info("There was a problem getting the prometheus exporter port: %s", err) + } + for _, promPort := range promExporterPorts { + ports[promPort.Name] = promPort + } + return ports } +func getPrometheusExporterPort(exporterConfig map[interface{}]interface{}) (int32, error) { + var promPort int32 = 0 + if endpoint, ok := exporterConfig["endpoint"]; ok { + _, port, err := net.SplitHostPort(endpoint.(string)) + if err != nil { + return 0, err + } + i64, err := strconv.ParseInt(port, 10, 32) + if err != nil { + return 0, err + } + promPort = int32(i64) + } + return promPort, nil +} + +func getPrometheusExporterPorts(c map[interface{}]interface{}) ([]corev1.ContainerPort, []error) { + errors := make([]error, 0) + ports := make([]corev1.ContainerPort, 0) + if exporters, ok := c["exporters"]; ok && exporters != nil { + for e, exporterConfig := range exporters.(map[interface{}]interface{}) { + exporterName := e.(string) + if strings.Contains(exporterName, "prometheus") { + containerPort, err := getPrometheusExporterPort(exporterConfig.(map[interface{}]interface{})) + if err != nil { + errors = append(errors, + fmt.Errorf( + "there was a problem getting the port. Exporter %s", + exporterName, + ), + ) + } + ports = append(ports, + corev1.ContainerPort{ + Name: naming.PortName(exporterName), + ContainerPort: containerPort, + Protocol: corev1.ProtocolTCP, + }, + ) + } + } + } else { + errors = append(errors, fmt.Errorf("no exporters specified in the configuration")) + } + return ports, errors +} + func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { ports := make([]corev1.ContainerPort, 0, len(portMap)) for _, p := range portMap { diff --git a/pkg/collector/container_test.go b/pkg/collector/container_test.go index 6f39364f3..4b7822df1 100644 --- a/pkg/collector/container_test.go +++ b/pkg/collector/container_test.go @@ -177,6 +177,43 @@ service: }, }, }, + { + description: "prometheus exporter", + specConfig: `exporters: + prometheus: + endpoint: "0.0.0.0:9090"`, + specPorts: []corev1.ServicePort{}, + expectedPorts: []corev1.ContainerPort{ + metricContainerPort, + { + Name: "prometheus", + ContainerPort: 9090, + Protocol: corev1.ProtocolTCP, + }, + }, + }, + { + description: "multiple prometheus exporters", + specConfig: `exporters: + prometheus/prod: + endpoint: "0.0.0.0:9090" + prometheus/dev: + endpoint: "0.0.0.0:9091"`, + specPorts: []corev1.ServicePort{}, + expectedPorts: []corev1.ContainerPort{ + metricContainerPort, + { + Name: "prometheus-prod", + ContainerPort: 9090, + Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-dev", + ContainerPort: 9091, + Protocol: corev1.ProtocolTCP, + }, + }, + }, } for _, testCase := range tests { diff --git a/pkg/naming/ports.go b/pkg/naming/ports.go new file mode 100644 index 000000000..108f8b75c --- /dev/null +++ b/pkg/naming/ports.go @@ -0,0 +1,40 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package naming + +import ( + "strings" + "unicode/utf8" +) + +// PortName returns a dns-safe string for the given name. +// Any char that is not [a-z0-9] is replaced by "-" or "a". +// Replacement character "a" is used only at the beginning or at the end of the name. +// The function does not change length of the string. +func PortName(name string) string { + var d []rune + + for i, x := range strings.ToLower(name) { + if regex.Match([]byte(string(x))) { + d = append(d, x) + } else if i == 0 || i == utf8.RuneCountInString(name)-1 { + d = append(d, 'a') + } else { + d = append(d, '-') + } + } + + return string(d) +} diff --git a/pkg/naming/ports_test.go b/pkg/naming/ports_test.go new file mode 100644 index 000000000..9e433c95f --- /dev/null +++ b/pkg/naming/ports_test.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package naming + +import ( + "regexp" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPortName(t *testing.T) { + var tests = []struct { + in string + out string + }{ + {"simplest", "simplest"}, + {"prometheus/dev", "prometheus-dev"}, + {"prometheus.dev", "prometheus-dev"}, + {"prometheus-", "prometheusa"}, + {"-prometheus", "aprometheus"}, + } + rule, err := regexp.Compile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`) + assert.NoError(t, err) + + for _, tt := range tests { + assert.Equal(t, tt.out, PortName(tt.in)) + matched := rule.Match([]byte(tt.out)) + assert.True(t, matched, "%v is not a valid name", tt.out) + } +} From 1c7b296150e0e6193e827a47d47e6d0ed9ad223e Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 2 Aug 2023 20:25:24 +0530 Subject: [PATCH 0944/1234] Add managementState field to collector crd spec (#1888) * adds managementState field to collector crd spec * changes e2e test case * cover new case in e2e test case * fix typo * fix e2e test cases * fix e2e test case * add assertion on config map state --- ...nagementstate-field-to-collector-spec.yaml | 16 ++++ apis/v1alpha1/opentelemetrycollector_types.go | 23 +++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 12 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 12 +++ .../opentelemetrycollector_controller.go | 6 ++ docs/api.md | 10 +++ pkg/collector/upgrade/upgrade.go | 6 ++ pkg/collector/upgrade/upgrade_test.go | 22 +++-- tests/e2e/managed-reconcile/00-assert.yaml | 58 +++++++++++++ tests/e2e/managed-reconcile/00-install.yaml | 22 +++++ tests/e2e/managed-reconcile/01-assert.yaml | 82 ++++++++++++++++++ .../01-disable-reconciliation.yaml | 51 ++++++++++++ tests/e2e/managed-reconcile/02-assert.yaml | 83 +++++++++++++++++++ .../02-enable-reconciliation.yaml | 23 +++++ 14 files changed, 418 insertions(+), 8 deletions(-) create mode 100755 .chloggen/1881-add-managementstate-field-to-collector-spec.yaml create mode 100644 tests/e2e/managed-reconcile/00-assert.yaml create mode 100644 tests/e2e/managed-reconcile/00-install.yaml create mode 100644 tests/e2e/managed-reconcile/01-assert.yaml create mode 100644 tests/e2e/managed-reconcile/01-disable-reconciliation.yaml create mode 100644 tests/e2e/managed-reconcile/02-assert.yaml create mode 100644 tests/e2e/managed-reconcile/02-enable-reconciliation.yaml diff --git a/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml b/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml new file mode 100755 index 000000000..a54005d2a --- /dev/null +++ b/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add a new field called `managementState` in the OpenTelemetry Collector CRD. + +# One or more tracking issues related to the change +issues: [1881] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 443dd3f21..2d599eb67 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -21,6 +21,21 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// ManagementStateType defines the type for CR management states. +// +// +kubebuilder:validation:Enum=Managed;Unmanaged +type ManagementStateType string + +const ( + // ManagementStateManaged when the OpenTelemetryCollector custom resource should be + // reconciled by the operator. + ManagementStateManaged ManagementStateType = "Managed" + + // ManagementStateUnmanaged when the OpenTelemetryCollector custom resource should not be + // reconciled by the operator. + ManagementStateUnmanaged ManagementStateType = "Unmanaged" +) + // Ingress is used to specify how OpenTelemetry Collector is exposed. This // functionality is only available if one of the valid modes is set. // Valid modes are: deployment, daemonset and statefulset. @@ -69,6 +84,13 @@ type OpenShiftRoute struct { // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. type OpenTelemetryCollectorSpec struct { + // ManagementState defines if the CR should be managed by the operator or not. + // Default is managed. + // + // +required + // +kubebuilder:validation:Required + // +kubebuilder:default:=Managed + ManagementState ManagementStateType `json:"managementState,omitempty"` // Resources to set on the OpenTelemetry Collector pods. // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` @@ -332,6 +354,7 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.scale.statusReplicas" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".status.image" +// +kubebuilder:printcolumn:name="Management",type="string",JSONPath=".spec.managementState",description="Management State" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Collector" // This annotation provides a hint for OLM which resources are managed by OpenTelemetryCollector kind. // It's not mandatory to list all resources. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 1a18ddb38..6357ffd4d 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -38,6 +38,10 @@ spec: - jsonPath: .status.image name: Image type: string + - description: Management State + jsonPath: .spec.managementState + name: Management + type: string name: v1alpha1 schema: openAPIV3Schema: @@ -2921,6 +2925,14 @@ spec: format: int32 type: integer type: object + managementState: + default: Managed + description: ManagementState defines if the CR should be managed by + the operator or not. Default is managed. + enum: + - Managed + - Unmanaged + type: string maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 45c701979..f1a732b9e 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -35,6 +35,10 @@ spec: - jsonPath: .status.image name: Image type: string + - description: Management State + jsonPath: .spec.managementState + name: Management + type: string name: v1alpha1 schema: openAPIV3Schema: @@ -2918,6 +2922,14 @@ spec: format: int32 type: integer type: object + managementState: + default: Managed + description: ManagementState defines if the CR should be managed by + the operator or not. Default is managed. + enum: + - Managed + - Unmanaged + type: string maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 75b84a50b..74691c8b2 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -206,6 +206,12 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, client.IgnoreNotFound(err) } + if instance.Spec.ManagementState != v1alpha1.ManagementStateManaged { + log.Info("Skipping reconciliation for unmanaged OpenTelemetryCollector resource", "name", req.String()) + // Stop requeueing for unmanaged OpenTelemetryCollector custom resources + return ctrl.Result{}, nil + } + params := reconcile.Params{ Config: r.config, Client: r.Client, diff --git a/docs/api.md b/docs/api.md index d1db878bf..9a0fe3bbf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3702,6 +3702,16 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
false + + managementState + enum + + ManagementState defines if the CR should be managed by the operator or not. Default is managed.
+
+ Enum: Managed, Unmanaged
+ Default: Managed
+ + false maxReplicas integer diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index e5523e8d1..1fed413c5 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -55,6 +55,12 @@ func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { for i := range list.Items { original := list.Items[i] itemLogger := u.Log.WithValues("name", original.Name, "namespace", original.Namespace) + + if original.Spec.ManagementState == v1alpha1.ManagementStateUnmanaged { + itemLogger.Info("skipping upgrade because instance is not managed") + continue + } + if original.Spec.UpgradeStrategy == v1alpha1.UpgradeStrategyNone { itemLogger.Info("skipping instance upgrade due to UpgradeStrategy") continue diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 9e0191aa8..500bf3068 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -48,7 +48,7 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { t.Run("spec.UpgradeStrategy = "+string(tt.strategy), func(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn) + existing := makeOtelcol(nsn, v1alpha1.ManagementStateManaged) err := k8sClient.Create(context.Background(), &existing) require.NoError(t, err) @@ -95,7 +95,7 @@ func TestUpgradeUpToLatestKnownVersion(t *testing.T) { t.Run(tt.desc, func(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn) + existing := makeOtelcol(nsn, v1alpha1.ManagementStateManaged) existing.Status.Version = tt.v currentV := version.Get() @@ -117,20 +117,23 @@ func TestUpgradeUpToLatestKnownVersion(t *testing.T) { } func TestVersionsShouldNotBeChanged(t *testing.T) { + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} for _, tt := range []struct { desc string v string expectedV string failureExpected bool + managementState v1alpha1.ManagementStateType }{ - {"new-instance", "", "", false}, - {"newer-than-our-newest", "100.0.0", "100.0.0", false}, - {"unparseable", "unparseable", "unparseable", true}, + {"new-instance", "", "", false, v1alpha1.ManagementStateManaged}, + {"newer-than-our-newest", "100.0.0", "100.0.0", false, v1alpha1.ManagementStateManaged}, + {"unparseable", "unparseable", "unparseable", true, v1alpha1.ManagementStateManaged}, + // Ignore unmanaged instances + {"unmanaged-instance", "1.0.0", "1.0.0", false, v1alpha1.ManagementStateUnmanaged}, } { t.Run(tt.desc, func(t *testing.T) { // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn) + existing := makeOtelcol(nsn, tt.managementState) existing.Status.Version = tt.v currentV := version.Get() @@ -157,8 +160,11 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { } } -func makeOtelcol(nsn types.NamespacedName) v1alpha1.OpenTelemetryCollector { +func makeOtelcol(nsn types.NamespacedName, managementState v1alpha1.ManagementStateType) v1alpha1.OpenTelemetryCollector { return v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ManagementState: managementState, + }, ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, diff --git a/tests/e2e/managed-reconcile/00-assert.yaml b/tests/e2e/managed-reconcile/00-assert.yaml new file mode 100644 index 000000000..09a06184b --- /dev/null +++ b/tests/e2e/managed-reconcile/00-assert.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 +spec: + template: + spec: + serviceAccountName: simplest-collector + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 diff --git a/tests/e2e/managed-reconcile/00-install.yaml b/tests/e2e/managed-reconcile/00-install.yaml new file mode 100644 index 000000000..e3d856a5c --- /dev/null +++ b/tests/e2e/managed-reconcile/00-install.yaml @@ -0,0 +1,22 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e/managed-reconcile/01-assert.yaml b/tests/e2e/managed-reconcile/01-assert.yaml new file mode 100644 index 000000000..17c266852 --- /dev/null +++ b/tests/e2e/managed-reconcile/01-assert.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: simplest-collector +data: + collector.yaml: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger, otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml b/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml new file mode 100644 index 000000000..ea52b8849 --- /dev/null +++ b/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml @@ -0,0 +1,51 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + managementState: Unmanaged + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] + +--- +# change config map in Unmanaged mode and it should not get overridden as reconciliation is disabled +apiVersion: v1 +kind: ConfigMap +metadata: + name: simplest-collector +data: + collector.yaml: | + receivers: + jaeger: + protocols: + grpc: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [jaeger, otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e/managed-reconcile/02-assert.yaml b/tests/e2e/managed-reconcile/02-assert.yaml new file mode 100644 index 000000000..90da4e64f --- /dev/null +++ b/tests/e2e/managed-reconcile/02-assert.yaml @@ -0,0 +1,83 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 +spec: + template: + spec: + serviceAccountName: simplest-collector + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector-headless +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - appProtocol: http + name: otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 4318 + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: simplest-collector +data: + collector.yaml: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml b/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml new file mode 100644 index 000000000..688ab25ed --- /dev/null +++ b/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + managementState: Managed + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file From 0524edb7c7d7071af1f9b53236073c69b4b979c3 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 2 Aug 2023 19:06:26 +0200 Subject: [PATCH 0945/1234] Remove legacy OTLP HTTP port (#1971) Signed-off-by: Pavol Loffay --- .chloggen/1954-remove-legacy-port.yaml | 16 ++++++++++++++++ pkg/collector/adapters/config_to_ports_test.go | 3 +-- pkg/collector/parser/receiver_otlp.go | 11 ++--------- pkg/collector/parser/receiver_otlp_test.go | 5 ++--- tests/e2e/ingress/00-assert.yaml | 7 ------- tests/e2e/managed-reconcile/00-assert.yaml | 10 ---------- tests/e2e/managed-reconcile/01-assert.yaml | 12 +----------- tests/e2e/managed-reconcile/02-assert.yaml | 12 +----------- tests/e2e/smoke-init-containers/00-assert.yaml | 10 ---------- tests/e2e/smoke-simplest/00-assert.yaml | 10 ---------- 10 files changed, 23 insertions(+), 73 deletions(-) create mode 100755 .chloggen/1954-remove-legacy-port.yaml diff --git a/.chloggen/1954-remove-legacy-port.yaml b/.chloggen/1954-remove-legacy-port.yaml new file mode 100755 index 000000000..cfff1101f --- /dev/null +++ b/.chloggen/1954-remove-legacy-port.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove legacy OTLP HTTP port + +# One or more tracking issues related to the change +issues: [1954] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 09ead0cd8..307f1b84d 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -85,7 +85,7 @@ func TestExtractPortsFromConfig(t *testing.T) { // test ports, err := adapters.ConfigToReceiverPorts(logger, config) assert.NoError(t, err) - assert.Len(t, ports, 11) + assert.Len(t, ports, 10) // verify httpAppProtocol := "http" @@ -104,7 +104,6 @@ func TestExtractPortsFromConfig(t *testing.T) { {Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 55555}, {Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: 4317, TargetPort: targetPort4317}, {Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: 4318, TargetPort: targetPort4318}, - {Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: 55681, TargetPort: targetPort4318}, {Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 9411}, } assert.ElementsMatch(t, expectedPorts, ports) diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index 2fa208fe9..a31d6c4af 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -27,9 +27,8 @@ var _ ReceiverParser = &OTLPReceiverParser{} const ( parserNameOTLP = "__otlp" - defaultOTLPGRPCPort int32 = 4317 - defaultOTLPHTTPLegacyPort int32 = 55681 - defaultOTLPHTTPPort int32 = 4318 + defaultOTLPGRPCPort int32 = 4317 + defaultOTLPHTTPPort int32 = 4318 ) var ( @@ -88,12 +87,6 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), AppProtocol: &http, }, - { - Name: portName(fmt.Sprintf("%s-http-legacy", o.name), defaultOTLPHTTPLegacyPort), - Port: defaultOTLPHTTPLegacyPort, - TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), // we target the official port, not the legacy - AppProtocol: &http, - }, }, }, } { diff --git a/pkg/collector/parser/receiver_otlp_test.go b/pkg/collector/parser/receiver_otlp_test.go index 6abca3b5d..7d2ed1649 100644 --- a/pkg/collector/parser/receiver_otlp_test.go +++ b/pkg/collector/parser/receiver_otlp_test.go @@ -85,9 +85,8 @@ func TestOTLPExposeDefaultPorts(t *testing.T) { portNumber int32 seen bool }{ - "otlp-grpc": {portNumber: 4317}, - "otlp-http": {portNumber: 4318}, - "otlp-http-legacy": {portNumber: 55681}, + "otlp-grpc": {portNumber: 4317}, + "otlp-http": {portNumber: 4318}, } // test diff --git a/tests/e2e/ingress/00-assert.yaml b/tests/e2e/ingress/00-assert.yaml index 7d98dc4c4..7d779f684 100644 --- a/tests/e2e/ingress/00-assert.yaml +++ b/tests/e2e/ingress/00-assert.yaml @@ -38,10 +38,3 @@ spec: name: otlp-http path: /otlp-http pathType: Prefix - - backend: - service: - name: simplest-collector - port: - name: otlp-http-legac - path: /otlp-http-legacy - pathType: Prefix diff --git a/tests/e2e/managed-reconcile/00-assert.yaml b/tests/e2e/managed-reconcile/00-assert.yaml index 09a06184b..2c6158305 100644 --- a/tests/e2e/managed-reconcile/00-assert.yaml +++ b/tests/e2e/managed-reconcile/00-assert.yaml @@ -27,11 +27,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -51,8 +46,3 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 diff --git a/tests/e2e/managed-reconcile/01-assert.yaml b/tests/e2e/managed-reconcile/01-assert.yaml index 17c266852..3990db3b2 100644 --- a/tests/e2e/managed-reconcile/01-assert.yaml +++ b/tests/e2e/managed-reconcile/01-assert.yaml @@ -23,11 +23,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -47,11 +42,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -79,4 +69,4 @@ data: traces: receivers: [jaeger, otlp] processors: [] - exporters: [logging] \ No newline at end of file + exporters: [logging] diff --git a/tests/e2e/managed-reconcile/02-assert.yaml b/tests/e2e/managed-reconcile/02-assert.yaml index 90da4e64f..a45ac3ba6 100644 --- a/tests/e2e/managed-reconcile/02-assert.yaml +++ b/tests/e2e/managed-reconcile/02-assert.yaml @@ -27,11 +27,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -51,11 +46,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -80,4 +70,4 @@ data: traces: receivers: [otlp] processors: [] - exporters: [logging] \ No newline at end of file + exporters: [logging] diff --git a/tests/e2e/smoke-init-containers/00-assert.yaml b/tests/e2e/smoke-init-containers/00-assert.yaml index f3c164486..3f0093781 100644 --- a/tests/e2e/smoke-init-containers/00-assert.yaml +++ b/tests/e2e/smoke-init-containers/00-assert.yaml @@ -33,11 +33,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -62,8 +57,3 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 diff --git a/tests/e2e/smoke-simplest/00-assert.yaml b/tests/e2e/smoke-simplest/00-assert.yaml index f19dd651a..17365cdac 100644 --- a/tests/e2e/smoke-simplest/00-assert.yaml +++ b/tests/e2e/smoke-simplest/00-assert.yaml @@ -28,11 +28,6 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 --- @@ -57,8 +52,3 @@ spec: port: 4318 protocol: TCP targetPort: 4318 - - appProtocol: http - name: otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 From 2998ccc3963557acdbc0676d4775e70d32a3b8a2 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 2 Aug 2023 19:45:17 +0200 Subject: [PATCH 0946/1234] Make sure port name in ingress and route match service (#1970) * Make sure port name in ingress and route match service Port name in service/ingress/route can be longer than 15 characters. The port name 15 characters is enforced in ports on pods. Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/1954.yaml | 16 +++++ .../adapters/config_to_ports_test.go | 8 +-- pkg/collector/container.go | 2 +- pkg/collector/daemonset.go | 4 +- pkg/collector/deployment.go | 2 +- pkg/collector/horizontalpodautoscaler.go | 8 +-- pkg/collector/parser/receiver.go | 23 +------ pkg/collector/parser/receiver_generic.go | 4 +- pkg/collector/parser/receiver_jaeger.go | 4 +- pkg/collector/parser/receiver_jaeger_test.go | 8 +-- pkg/collector/parser/receiver_otlp.go | 6 +- pkg/collector/parser/receiver_skywalking.go | 6 +- pkg/collector/parser/receiver_test.go | 4 +- pkg/collector/reconcile/config_replace.go | 4 +- pkg/collector/reconcile/configmap.go | 2 +- pkg/collector/reconcile/ingress.go | 9 ++- pkg/collector/reconcile/ingress_test.go | 4 +- pkg/collector/reconcile/opentelemetry.go | 4 +- pkg/collector/reconcile/route.go | 9 ++- pkg/collector/reconcile/route_test.go | 4 +- pkg/collector/reconcile/service.go | 12 ++-- pkg/collector/reconcile/servicemonitor.go | 4 +- pkg/collector/serviceaccount.go | 4 +- pkg/collector/statefulset.go | 4 +- pkg/collector/volume.go | 2 +- pkg/naming/main.go | 60 ++++++++-------- pkg/naming/port.go | 44 ++++++++++++ pkg/naming/port_test.go | 68 +++++++++++++++++++ pkg/naming/ports.go | 40 ----------- pkg/naming/ports_test.go | 43 ------------ pkg/targetallocator/configmap.go | 2 +- pkg/targetallocator/deployment.go | 2 +- pkg/targetallocator/serviceaccount.go | 4 +- pkg/targetallocator/volume.go | 2 +- 34 files changed, 226 insertions(+), 196 deletions(-) create mode 100755 .chloggen/1954.yaml create mode 100644 pkg/naming/port.go create mode 100644 pkg/naming/port_test.go delete mode 100644 pkg/naming/ports.go delete mode 100644 pkg/naming/ports_test.go diff --git a/.chloggen/1954.yaml b/.chloggen/1954.yaml new file mode 100755 index 000000000..67c259590 --- /dev/null +++ b/.chloggen/1954.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix port name matching between ingress/route and service. All ports are truncated to 15 characters. If the port name is longer it is changed to port-%d pattern. + +# One or more tracking issues related to the change +issues: [1954] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go index 307f1b84d..3bfe7ac26 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/pkg/collector/adapters/config_to_ports_test.go @@ -96,11 +96,11 @@ func TestExtractPortsFromConfig(t *testing.T) { expectedPorts := []corev1.ServicePort{ {Name: "examplereceiver", Port: 12345}, - {Name: "examplereceiver-settings", Port: 12346}, - {Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero}, + {Name: "port-12346", Port: 12346}, + {Name: "port-15268", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero}, {Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 14250}, - {Name: "jaeger-thrift-binary", Protocol: "UDP", Port: 6833}, - {Name: "jaeger-thrift-compact", Protocol: "UDP", Port: 6831}, + {Name: "port-6833", Protocol: "UDP", Port: 6833}, + {Name: "port-6831", Protocol: "UDP", Port: 6831}, {Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 55555}, {Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: 4317, TargetPort: targetPort4317}, {Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: 4318, TargetPort: targetPort4318}, diff --git a/pkg/collector/container.go b/pkg/collector/container.go index 264d9a6eb..0e4f3428d 100644 --- a/pkg/collector/container.go +++ b/pkg/collector/container.go @@ -232,7 +232,7 @@ func getPrometheusExporterPorts(c map[interface{}]interface{}) ([]corev1.Contain } ports = append(ports, corev1.ContainerPort{ - Name: naming.PortName(exporterName), + Name: naming.PortName(exporterName, containerPort), ContainerPort: containerPort, Protocol: corev1.ProtocolTCP, }, diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go index f68d7bb70..aee097503 100644 --- a/pkg/collector/daemonset.go +++ b/pkg/collector/daemonset.go @@ -27,14 +27,14 @@ import ( // DaemonSet builds the deployment for the given instance. func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { - name := naming.Collector(otelcol) + name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) return appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Collector(otelcol), + Name: naming.Collector(otelcol.Name), Namespace: otelcol.Namespace, Labels: labels, Annotations: annotations, diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go index 7fa91725a..7f4d0c898 100644 --- a/pkg/collector/deployment.go +++ b/pkg/collector/deployment.go @@ -27,7 +27,7 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { - name := naming.Collector(otelcol) + name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) diff --git a/pkg/collector/horizontalpodautoscaler.go b/pkg/collector/horizontalpodautoscaler.go index 3e721821b..4771a841a 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/pkg/collector/horizontalpodautoscaler.go @@ -31,13 +31,13 @@ import ( func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { autoscalingVersion := cfg.AutoscalingVersion() - name := naming.Collector(otelcol) + name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) var result client.Object objectMeta := metav1.ObjectMeta{ - Name: naming.HorizontalPodAutoscaler(otelcol), + Name: naming.HorizontalPodAutoscaler(otelcol.Name), Namespace: otelcol.Namespace, Labels: labels, Annotations: annotations, @@ -96,7 +96,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al ScaleTargetRef: autoscalingv2beta2.CrossVersionObjectReference{ APIVersion: v1alpha1.GroupVersion.String(), Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol), + Name: naming.OpenTelemetryCollector(otelcol.Name), }, MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, @@ -153,7 +153,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ APIVersion: v1alpha1.GroupVersion.String(), Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol), + Name: naming.OpenTelemetryCollector(otelcol.Name), }, MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, diff --git a/pkg/collector/parser/receiver.go b/pkg/collector/parser/receiver.go index e5b4a3ae4..c25ff2f73 100644 --- a/pkg/collector/parser/receiver.go +++ b/pkg/collector/parser/receiver.go @@ -25,11 +25,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" -) -var ( - // DNS_LABEL constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names - dnsLabelValidation = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$") + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // ReceiverParser is an interface that should be implemented by all receiver parsers. @@ -159,7 +156,7 @@ func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[in } return &corev1.ServicePort{ - Name: portName(name, port), + Name: naming.PortName(name, port), Port: port, } default: @@ -178,22 +175,6 @@ func getAddressFromConfig(logger logr.Logger, name, key string, config map[inter return endpoint } -func portName(receiverName string, port int32) string { - if len(receiverName) > 63 { - return fmt.Sprintf("port-%d", port) - } - - candidate := strings.ReplaceAll(receiverName, "/", "-") - candidate = strings.ReplaceAll(candidate, "_", "-") - - if !dnsLabelValidation.MatchString(candidate) { - return fmt.Sprintf("port-%d", port) - } - - // matches the pattern and has less than 63 chars -- the candidate name is good to go! - return candidate -} - func portFromEndpoint(endpoint string) (int32, error) { var err error var port int64 diff --git a/pkg/collector/parser/receiver_generic.go b/pkg/collector/parser/receiver_generic.go index 21b4e2ce5..dbf9bcc27 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/pkg/collector/parser/receiver_generic.go @@ -17,6 +17,8 @@ package parser import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) const parserNameGeneric = "__generic" @@ -59,7 +61,7 @@ func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { if g.defaultPort > 0 { return []corev1.ServicePort{{ Port: g.defaultPort, - Name: portName(g.name, g.defaultPort), + Name: naming.PortName(g.name, g.defaultPort), Protocol: g.defaultProtocol, AppProtocol: g.defaultAppProtocol, }}, nil diff --git a/pkg/collector/parser/receiver_jaeger.go b/pkg/collector/parser/receiver_jaeger.go index 428938c31..f36fe6aeb 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/pkg/collector/parser/receiver_jaeger.go @@ -19,6 +19,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) var _ ReceiverParser = &JaegerReceiverParser{} @@ -104,7 +106,7 @@ func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { // if not, we use the default port if protocolPort == nil { protocolPort = &corev1.ServicePort{ - Name: portName(nameWithProtocol, protocol.defaultPort), + Name: naming.PortName(nameWithProtocol, protocol.defaultPort), Port: protocol.defaultPort, } } diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/pkg/collector/parser/receiver_jaeger_test.go index 827c988c4..9bcdb4cb0 100644 --- a/pkg/collector/parser/receiver_jaeger_test.go +++ b/pkg/collector/parser/receiver_jaeger_test.go @@ -88,10 +88,10 @@ func TestJaegerExposeDefaultPorts(t *testing.T) { portNumber int32 seen bool }{ - "jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP}, - "jaeger-thrift-http": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP}, - "jaeger-thrift-compact": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP}, - "jaeger-thrift-binary": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP}, + "jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP}, + "port-14268": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP}, + "port-6831": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP}, + "port-6832": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP}, } // test diff --git a/pkg/collector/parser/receiver_otlp.go b/pkg/collector/parser/receiver_otlp.go index a31d6c4af..0cd822862 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/pkg/collector/parser/receiver_otlp.go @@ -20,6 +20,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) var _ ReceiverParser = &OTLPReceiverParser{} @@ -71,7 +73,7 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { name: grpc, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), + Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), Port: defaultOTLPGRPCPort, TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), AppProtocol: &grpc, @@ -82,7 +84,7 @@ func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { name: http, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), + Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), Port: defaultOTLPHTTPPort, TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), AppProtocol: &http, diff --git a/pkg/collector/parser/receiver_skywalking.go b/pkg/collector/parser/receiver_skywalking.go index bddd92114..339799911 100644 --- a/pkg/collector/parser/receiver_skywalking.go +++ b/pkg/collector/parser/receiver_skywalking.go @@ -20,6 +20,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) var _ ReceiverParser = &SkywalkingReceiverParser{} @@ -66,7 +68,7 @@ func (o *SkywalkingReceiverParser) Ports() ([]corev1.ServicePort, error) { name: grpc, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-grpc", o.name), defaultSkywalkingGRPCPort), + Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultSkywalkingGRPCPort), Port: defaultSkywalkingGRPCPort, TargetPort: intstr.FromInt(int(defaultSkywalkingGRPCPort)), AppProtocol: &grpc, @@ -77,7 +79,7 @@ func (o *SkywalkingReceiverParser) Ports() ([]corev1.ServicePort, error) { name: http, defaultPorts: []corev1.ServicePort{ { - Name: portName(fmt.Sprintf("%s-http", o.name), defaultSkywalkingHTTPPort), + Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultSkywalkingHTTPPort), Port: defaultSkywalkingHTTPPort, TargetPort: intstr.FromInt(int(defaultSkywalkingHTTPPort)), AppProtocol: &http, diff --git a/pkg/collector/parser/receiver_test.go b/pkg/collector/parser/receiver_test.go index 66c9bf083..411929ad2 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/pkg/collector/parser/receiver_test.go @@ -21,6 +21,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) var logger = logf.Log.WithName("unit-tests") @@ -38,7 +40,7 @@ func TestReceiverPortNames(t *testing.T) { {"name starting with invalid char", "-my-receiver", "port-123", 123}, } { t.Run(tt.desc, func(t *testing.T) { - assert.Equal(t, tt.expected, portName(tt.candidate, int32(tt.port))) + assert.Equal(t, tt.expected, naming.PortName(tt.candidate, int32(tt.port))) }) } } diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go index 37ab3d813..481f60d97 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/pkg/collector/reconcile/config_replace.go @@ -66,7 +66,7 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { if featuregate.EnableTargetAllocatorRewrite.IsEnabled() { // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. - updPromCfgMap, getCfgPromErr := ta.AddTAConfigToPromConfig(promCfgMap, naming.TAService(instance)) + updPromCfgMap, getCfgPromErr := ta.AddTAConfigToPromConfig(promCfgMap, naming.TAService(instance.Name)) if getCfgPromErr != nil { return "", getCfgPromErr } @@ -84,7 +84,7 @@ func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. - updPromCfgMap, err := ta.AddHTTPSDConfigToPromConfig(promCfgMap, naming.TAService(instance)) + updPromCfgMap, err := ta.AddHTTPSDConfigToPromConfig(promCfgMap, naming.TAService(instance.Name)) if err != nil { return "", err } diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index 03ee284b6..eb39776ca 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -61,7 +61,7 @@ func ConfigMaps(ctx context.Context, params Params) error { } func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { - name := naming.ConfigMap(params.Instance) + name := naming.ConfigMap(params.Instance.Name) labels := collector.Labels(params.Instance, name, []string{}) config, err := ReplaceConfig(params.Instance) diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go index fee7e8cd7..bc1f6b794 100644 --- a/pkg/collector/reconcile/ingress.go +++ b/pkg/collector/reconcile/ingress.go @@ -56,10 +56,9 @@ func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { PathType: &pathType, Backend: networkingv1.IngressBackend{ Service: &networkingv1.IngressServiceBackend{ - Name: naming.Service(params.Instance), + Name: naming.Service(params.Instance.Name), Port: networkingv1.ServiceBackendPort{ - // Valid names must be non-empty and no more than 15 characters long. - Name: naming.Truncate(p.Name, 15), + Name: naming.PortName(p.Name, p.Port), }, }, }, @@ -68,11 +67,11 @@ func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { return &networkingv1.Ingress{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance), + Name: naming.Ingress(params.Instance.Name), Namespace: params.Instance.Namespace, Annotations: params.Instance.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance), + "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index 9c03dd565..853de0c88 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -115,11 +115,11 @@ func TestDesiredIngresses(t *testing.T) { assert.NotEqual(t, &networkingv1.Ingress{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance), + Name: naming.Ingress(params.Instance.Name), Namespace: ns, Annotations: params.Instance.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance), + "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index a4bf95579..af709ae64 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -65,7 +65,7 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change return nil } - name := naming.Collector(*changed) + name := naming.Collector(changed.Name) // Set the scale selector labels := collector.Labels(*changed, name, []string{}) @@ -78,7 +78,7 @@ func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, change // Set the scale replicas objKey := client.ObjectKey{ Namespace: changed.GetNamespace(), - Name: naming.Collector(*changed), + Name: naming.Collector(changed.Name), } var replicas int32 diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go index 50783611d..09f6ff838 100644 --- a/pkg/collector/reconcile/route.go +++ b/pkg/collector/reconcile/route.go @@ -61,11 +61,11 @@ func desiredRoutes(_ context.Context, params Params) []routev1.Route { for i, p := range ports { routes[i] = routev1.Route{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance, p.Name), + Name: naming.Route(params.Instance.Name, p.Name), Namespace: params.Instance.Namespace, Annotations: params.Instance.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance, p.Name), + "app.kubernetes.io/name": naming.Route(params.Instance.Name, p.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, @@ -75,11 +75,10 @@ func desiredRoutes(_ context.Context, params Params) []routev1.Route { Path: "/" + p.Name, To: routev1.RouteTargetReference{ Kind: "Service", - Name: naming.Service(params.Instance), + Name: naming.Service(params.Instance.Name), }, Port: &routev1.RoutePort{ - // Valid names must be non-empty and no more than 15 characters long. - TargetPort: intstr.FromString(naming.Truncate(p.Name, 15)), + TargetPort: intstr.FromString(naming.PortName(p.Name, p.Port)), }, WildcardPolicy: routev1.WildcardPolicyNone, TLS: tlsCfg, diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go index 4ea82bc91..565645041 100644 --- a/pkg/collector/reconcile/route_test.go +++ b/pkg/collector/reconcile/route_test.go @@ -115,11 +115,11 @@ func TestDesiredRoutes(t *testing.T) { assert.NotEqual(t, &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance, ""), + Name: naming.Route(params.Instance.Name, ""), Namespace: ns, Annotations: params.Instance.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance, ""), + "app.kubernetes.io/name": naming.Route(params.Instance.Name, ""), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 715f892d5..59955e0af 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -74,7 +74,7 @@ func Services(ctx context.Context, params Params) error { } func desiredService(ctx context.Context, params Params) *corev1.Service { - name := naming.Service(params.Instance) + name := naming.Service(params.Instance.Name) labels := collector.Labels(params.Instance, name, []string{}) config, err := adapters.ConfigFromString(params.Instance.Spec.Config) @@ -121,7 +121,7 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Service(params.Instance), + Name: naming.Service(params.Instance.Name), Namespace: params.Instance.Namespace, Labels: labels, Annotations: params.Instance.Annotations, @@ -136,14 +136,14 @@ func desiredService(ctx context.Context, params Params) *corev1.Service { } func desiredTAService(params Params) corev1.Service { - name := naming.TAService(params.Instance) + name := naming.TAService(params.Instance.Name) labels := targetallocator.Labels(params.Instance, name) selector := targetallocator.Labels(params.Instance, name) return corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.TAService(params.Instance), + Name: naming.TAService(params.Instance.Name), Namespace: params.Instance.Namespace, Labels: labels, }, @@ -164,7 +164,7 @@ func headless(ctx context.Context, params Params) *corev1.Service { return nil } - h.Name = naming.HeadlessService(params.Instance) + h.Name = naming.HeadlessService(params.Instance.Name) h.Labels[headlessLabel] = headlessExists // copy to avoid modifying params.Instance.Annotations @@ -181,7 +181,7 @@ func headless(ctx context.Context, params Params) *corev1.Service { } func monitoringService(ctx context.Context, params Params) *corev1.Service { - name := naming.MonitoringService(params.Instance) + name := naming.MonitoringService(params.Instance.Name) labels := collector.Labels(params.Instance, name, []string{}) c, err := adapters.ConfigFromString(params.Instance.Spec.Config) diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go index 7da2f275b..942e16586 100644 --- a/pkg/collector/reconcile/servicemonitor.go +++ b/pkg/collector/reconcile/servicemonitor.go @@ -58,9 +58,9 @@ func desiredServiceMonitors(_ context.Context, params Params) []monitoringv1.Ser { ObjectMeta: metav1.ObjectMeta{ Namespace: col.Namespace, - Name: naming.ServiceMonitor(col), + Name: naming.ServiceMonitor(col.Name), Labels: map[string]string{ - "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance), + "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go index ef3815f3b..f4e41ed77 100644 --- a/pkg/collector/serviceaccount.go +++ b/pkg/collector/serviceaccount.go @@ -25,7 +25,7 @@ import ( // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { if len(instance.Spec.ServiceAccount) == 0 { - return naming.ServiceAccount(instance) + return naming.ServiceAccount(instance.Name) } return instance.Spec.ServiceAccount @@ -33,7 +33,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { - name := naming.ServiceAccount(otelcol) + name := naming.ServiceAccount(otelcol.Name) labels := Labels(otelcol, name, []string{}) return corev1.ServiceAccount{ diff --git a/pkg/collector/statefulset.go b/pkg/collector/statefulset.go index cb81d6a42..8e686dc0a 100644 --- a/pkg/collector/statefulset.go +++ b/pkg/collector/statefulset.go @@ -27,7 +27,7 @@ import ( // StatefulSet builds the statefulset for the given instance. func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.StatefulSet { - name := naming.Collector(otelcol) + name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) @@ -41,7 +41,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Annotations: annotations, }, Spec: appsv1.StatefulSetSpec{ - ServiceName: naming.Service(otelcol), + ServiceName: naming.Service(otelcol.Name), Selector: &metav1.LabelSelector{ MatchLabels: SelectorLabels(otelcol), }, diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go index b6fb467fa..cc524a068 100644 --- a/pkg/collector/volume.go +++ b/pkg/collector/volume.go @@ -29,7 +29,7 @@ func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev Name: naming.ConfigMapVolume(), VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: naming.ConfigMap(otelcol)}, + LocalObjectReference: corev1.LocalObjectReference{Name: naming.ConfigMap(otelcol.Name)}, Items: []corev1.KeyToPath{{ Key: cfg.CollectorConfigMapEntry(), Path: cfg.CollectorConfigMapEntry(), diff --git a/pkg/naming/main.go b/pkg/naming/main.go index d7117c41c..a45f99071 100644 --- a/pkg/naming/main.go +++ b/pkg/naming/main.go @@ -15,18 +15,14 @@ // Package naming is for determining the names for components (containers, services, ...). package naming -import ( - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - // ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. -func ConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func ConfigMap(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // TAConfigMap returns the name for the config map used in the TargetAllocator. -func TAConfigMap(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) +func TAConfigMap(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } // ConfigMapVolume returns the name to use for the config map's volume in the pod. @@ -50,18 +46,18 @@ func TAContainer() string { } // Collector builds the collector (deployment/daemonset) name based on the instance. -func Collector(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func Collector(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // HorizontalPodAutoscaler builds the autoscaler name based on the instance. -func HorizontalPodAutoscaler(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func HorizontalPodAutoscaler(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // OpenTelemetryCollector builds the collector (deployment/daemonset) name based on the instance. -func OpenTelemetryCollector(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s", 63, otelcol.Name)) +func OpenTelemetryCollector(otelcol string) string { + return DNSName(Truncate("%s", 63, otelcol)) } // OpenTelemetryCollectorName builds the collector (deployment/daemonset) name based on the instance. @@ -70,51 +66,51 @@ func OpenTelemetryCollectorName(otelcolName string) string { } // TargetAllocator returns the TargetAllocator deployment resource name. -func TargetAllocator(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) +func TargetAllocator(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } // HeadlessService builds the name for the headless service based on the instance. -func HeadlessService(otelcol v1alpha1.OpenTelemetryCollector) string { +func HeadlessService(otelcol string) string { return DNSName(Truncate("%s-headless", 63, Service(otelcol))) } // MonitoringService builds the name for the monitoring service based on the instance. -func MonitoringService(otelcol v1alpha1.OpenTelemetryCollector) string { +func MonitoringService(otelcol string) string { return DNSName(Truncate("%s-monitoring", 63, Service(otelcol))) } // Service builds the service name based on the instance. -func Service(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func Service(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // Ingress builds the ingress name based on the instance. -func Ingress(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-ingress", 63, otelcol.Name)) +func Ingress(otelcol string) string { + return DNSName(Truncate("%s-ingress", 63, otelcol)) } // Route builds the route name based on the instance. -func Route(otelcol v1alpha1.OpenTelemetryCollector, prefix string) string { - return DNSName(Truncate("%s-%s-route", 63, prefix, otelcol.Name)) +func Route(otelcol string, prefix string) string { + return DNSName(Truncate("%s-%s-route", 63, prefix, otelcol)) } // TAService returns the name to use for the TargetAllocator service. -func TAService(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) +func TAService(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } // ServiceAccount builds the service account name based on the instance. -func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func ServiceAccount(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // ServiceMonitor builds the service account name based on the instance. -func ServiceMonitor(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-collector", 63, otelcol.Name)) +func ServiceMonitor(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) } // TargetAllocatorServiceAccount returns the TargetAllocator service account resource name. -func TargetAllocatorServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) string { - return DNSName(Truncate("%s-targetallocator", 63, otelcol.Name)) +func TargetAllocatorServiceAccount(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } diff --git a/pkg/naming/port.go b/pkg/naming/port.go new file mode 100644 index 000000000..f4ba37aca --- /dev/null +++ b/pkg/naming/port.go @@ -0,0 +1,44 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package naming + +import ( + "fmt" + "regexp" + "strings" +) + +var ( + // DNS_LABEL constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names + dnsLabelValidation = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$") +) + +// PortName defines the port name used in services, ingresses and routes. +// The port name in pod and ingress spec has to be maximum 15 characters long. +func PortName(receiverName string, port int32) string { + if len(receiverName) > 15 { + return fmt.Sprintf("port-%d", port) + } + + candidate := strings.ReplaceAll(receiverName, "/", "-") + candidate = strings.ReplaceAll(candidate, "_", "-") + + if !dnsLabelValidation.MatchString(candidate) { + return fmt.Sprintf("port-%d", port) + } + + // matches the pattern and has less than 15 chars -- the candidate name is good to go! + return candidate +} diff --git a/pkg/naming/port_test.go b/pkg/naming/port_test.go new file mode 100644 index 000000000..172956b4c --- /dev/null +++ b/pkg/naming/port_test.go @@ -0,0 +1,68 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package naming + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test(t *testing.T) { + tests := []struct { + testName string + receiverName string + port int32 + expected string + }{ + { + testName: "too_long", + receiverName: "otlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttpotlphttp", + port: 4318, + expected: "port-4318", + }, + { + testName: "with underscore", + receiverName: "otlp_http", + port: 4318, + expected: "otlp-http", + }, + { + testName: "with slash", + receiverName: "otlp/http", + port: 4318, + expected: "otlp-http", + }, + { + testName: "not DNS", + receiverName: "otlp&&**http", + port: 4318, + expected: "port-4318", + }, + { + testName: "ok", + receiverName: "otlphttp", + port: 4318, + expected: "otlphttp", + }, + } + + for _, test := range tests { + t.Run(test.testName, func(t *testing.T) { + name := PortName(test.receiverName, test.port) + assert.Equal(t, test.expected, name) + }) + } +} diff --git a/pkg/naming/ports.go b/pkg/naming/ports.go deleted file mode 100644 index 108f8b75c..000000000 --- a/pkg/naming/ports.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package naming - -import ( - "strings" - "unicode/utf8" -) - -// PortName returns a dns-safe string for the given name. -// Any char that is not [a-z0-9] is replaced by "-" or "a". -// Replacement character "a" is used only at the beginning or at the end of the name. -// The function does not change length of the string. -func PortName(name string) string { - var d []rune - - for i, x := range strings.ToLower(name) { - if regex.Match([]byte(string(x))) { - d = append(d, x) - } else if i == 0 || i == utf8.RuneCountInString(name)-1 { - d = append(d, 'a') - } else { - d = append(d, '-') - } - } - - return string(d) -} diff --git a/pkg/naming/ports_test.go b/pkg/naming/ports_test.go deleted file mode 100644 index 9e433c95f..000000000 --- a/pkg/naming/ports_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package naming - -import ( - "regexp" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestPortName(t *testing.T) { - var tests = []struct { - in string - out string - }{ - {"simplest", "simplest"}, - {"prometheus/dev", "prometheus-dev"}, - {"prometheus.dev", "prometheus-dev"}, - {"prometheus-", "prometheusa"}, - {"-prometheus", "aprometheus"}, - } - rule, err := regexp.Compile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`) - assert.NoError(t, err) - - for _, tt := range tests { - assert.Equal(t, tt.out, PortName(tt.in)) - matched := rule.Match([]byte(tt.out)) - assert.True(t, matched, "%v is not a valid name", tt.out) - } -} diff --git a/pkg/targetallocator/configmap.go b/pkg/targetallocator/configmap.go index 210bd1c8b..30dea4154 100644 --- a/pkg/targetallocator/configmap.go +++ b/pkg/targetallocator/configmap.go @@ -32,7 +32,7 @@ const ( ) func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, error) { - name := naming.TAConfigMap(instance) + name := naming.TAConfigMap(instance.Name) version := strings.Split(instance.Spec.Image, ":") labels := Labels(instance, name) if len(version) > 1 { diff --git a/pkg/targetallocator/deployment.go b/pkg/targetallocator/deployment.go index b3ab0a9ab..70d9507a3 100644 --- a/pkg/targetallocator/deployment.go +++ b/pkg/targetallocator/deployment.go @@ -27,7 +27,7 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { - name := naming.TargetAllocator(otelcol) + name := naming.TargetAllocator(otelcol.Name) labels := Labels(otelcol, name) annotations := Annotations(otelcol) diff --git a/pkg/targetallocator/serviceaccount.go b/pkg/targetallocator/serviceaccount.go index af904863b..bc036c19e 100644 --- a/pkg/targetallocator/serviceaccount.go +++ b/pkg/targetallocator/serviceaccount.go @@ -25,7 +25,7 @@ import ( // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 { - return naming.ServiceAccount(instance) + return naming.ServiceAccount(instance.Name) } return instance.Spec.TargetAllocator.ServiceAccount @@ -33,7 +33,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { - name := naming.TargetAllocatorServiceAccount(otelcol) + name := naming.TargetAllocatorServiceAccount(otelcol.Name) labels := Labels(otelcol, name) return corev1.ServiceAccount{ diff --git a/pkg/targetallocator/volume.go b/pkg/targetallocator/volume.go index 7e1b6d1e0..47d2e3810 100644 --- a/pkg/targetallocator/volume.go +++ b/pkg/targetallocator/volume.go @@ -28,7 +28,7 @@ func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev Name: naming.TAConfigMapVolume(), VolumeSource: corev1.VolumeSource{ ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: naming.TAConfigMap(otelcol)}, + LocalObjectReference: corev1.LocalObjectReference{Name: naming.TAConfigMap(otelcol.Name)}, Items: []corev1.KeyToPath{ { Key: cfg.TargetAllocatorConfigMapEntry(), From 440f7a733ae09d8683b4d1af423231e52308ac19 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 2 Aug 2023 15:50:57 -0400 Subject: [PATCH 0947/1234] [chore] Refactor Manifest Generation to internal package (#1965) * parent 2998ccc3963557acdbc0676d4775e70d32a3b8a2 author Jacob Aronoff 1690402542 -0400 committer Jacob Aronoff 1691001855 -0400 Merge upstream, squash to main * Fix missing import * fix whoopsie --- .../opentelemetrycollector_webhook.go | 2 +- .../opentelemetrycollector_controller.go | 7 +- .../opentelemetrycollector_controller_test.go | 14 +- controllers/suite_test.go | 2 +- internal/manifests/builder.go | 41 +++ .../collector/adapters/config_from.go | 0 .../collector/adapters/config_from_test.go | 2 +- .../collector/adapters/config_to_ports.go | 2 +- .../adapters/config_to_ports_test.go | 4 +- .../collector/adapters/config_to_probe.go | 8 +- .../adapters/config_to_probe_test.go | 4 +- .../collector/adapters/config_validate.go | 0 .../adapters/config_validate_test.go | 0 .../manifests}/collector/annotations.go | 0 .../manifests}/collector/annotations_test.go | 0 internal/manifests/collector/collector.go | 69 +++++ .../manifests/collector}/config_replace.go | 8 +- .../collector}/config_replace_test.go | 15 +- internal/manifests/collector/configmap.go | 47 +++ .../manifests/collector/configmap_test.go | 207 +++++++++++++ .../manifests}/collector/container.go | 4 +- .../manifests}/collector/container_test.go | 2 +- .../manifests}/collector/daemonset.go | 6 +- .../manifests}/collector/daemonset_test.go | 2 +- .../manifests}/collector/deployment.go | 6 +- .../manifests}/collector/deployment_test.go | 2 +- .../collector/horizontalpodautoscaler.go | 5 +- .../collector/horizontalpodautoscaler_test.go | 2 +- internal/manifests/collector/ingress.go | 126 ++++++++ internal/manifests/collector/ingress_test.go | 176 +++++++++++ .../manifests}/collector/labels.go | 2 +- .../manifests}/collector/labels_test.go | 2 +- .../manifests}/collector/parser/receiver.go | 2 +- .../collector/parser/receiver_aws-xray.go | 0 .../parser/receiver_aws-xray_test.go | 0 .../collector/parser/receiver_carbon.go | 0 .../collector/parser/receiver_carbon_test.go | 0 .../collector/parser/receiver_collectd.go | 0 .../parser/receiver_collectd_test.go | 0 .../parser/receiver_fluent-forward.go | 0 .../parser/receiver_fluent-forward_test.go | 0 .../collector/parser/receiver_generic.go | 2 +- .../collector/parser/receiver_generic_test.go | 2 +- .../collector/parser/receiver_influxdb.go | 0 .../parser/receiver_influxdb_test.go | 0 .../collector/parser/receiver_jaeger.go | 2 +- .../collector/parser/receiver_jaeger_test.go | 0 .../collector/parser/receiver_oc.go | 0 .../collector/parser/receiver_oc_test.go | 0 .../collector/parser/receiver_otlp.go | 2 +- .../collector/parser/receiver_otlp_test.go | 0 .../collector/parser/receiver_sapm.go | 0 .../collector/parser/receiver_sapm_test.go | 0 .../collector/parser/receiver_signalfx.go | 0 .../parser/receiver_signalfx_test.go | 0 .../collector/parser/receiver_skywalking.go | 2 +- .../parser/receiver_skywalking_test.go | 0 .../collector/parser/receiver_splunk-hec.go | 0 .../parser/receiver_splunk-hec_test.go | 0 .../collector/parser/receiver_statsd.go | 0 .../collector/parser/receiver_statsd_test.go | 0 .../collector/parser/receiver_test.go | 2 +- .../collector/parser/receiver_wavefront.go | 0 .../parser/receiver_wavefront_test.go | 0 .../parser/receiver_zipkin-scribe.go | 0 .../parser/receiver_zipkin-scribe_test.go | 0 .../collector/parser/receiver_zipkin.go | 0 .../collector/parser/receiver_zipkin_test.go | 0 internal/manifests/collector/route.go | 96 ++++++ internal/manifests/collector/route_test.go | 155 ++++++++++ internal/manifests/collector/service.go | 191 ++++++++++++ internal/manifests/collector/service_test.go | 209 ++++++++++++++ .../manifests}/collector/serviceaccount.go | 8 +- .../collector/serviceaccount_test.go | 2 +- .../manifests/collector/servicemonitor.go | 55 ++++ .../collector/servicemonitor_test.go | 29 ++ .../manifests}/collector/statefulset.go | 6 +- .../manifests}/collector/statefulset_test.go | 2 +- internal/manifests/collector/suite_test.go | 273 ++++++++++++++++++ .../http_sd_config_servicemonitor_test.yaml | 0 ..._sd_config_servicemonitor_test_ta_set.yaml | 0 .../testdata/http_sd_config_test.yaml | 0 .../collector/testdata/ingress_testdata.yaml | 0 ...elabel_config_expected_with_sd_config.yaml | 0 .../testdata/relabel_config_original.yaml | 0 .../collector/testdata/route_crd.go | 0 .../manifests}/collector/testdata/sm_crd.go | 0 .../manifests}/collector/testdata/test.yaml | 0 .../manifests}/collector/utils.go | 0 .../manifests}/collector/volume.go | 2 +- .../manifests}/collector/volume_test.go | 4 +- .../manifests}/collector/volumeclaim.go | 0 .../manifests}/collector/volumeclaim_test.go | 2 +- .../manifests}/params.go | 2 +- .../adapters/config_to_prom_config.go | 2 +- .../adapters/config_to_prom_config_test.go | 4 +- .../manifests}/targetallocator/annotations.go | 7 +- .../targetallocator/annotations_test.go | 12 +- .../manifests}/targetallocator/configmap.go | 16 +- .../targetallocator/configmap_test.go | 14 +- .../manifests}/targetallocator/container.go | 2 +- .../targetallocator/container_test.go | 2 +- .../manifests}/targetallocator/deployment.go | 14 +- .../targetallocator/deployment_test.go | 4 +- .../manifests}/targetallocator/labels.go | 2 +- .../manifests}/targetallocator/labels_test.go | 0 internal/manifests/targetallocator/service.go | 49 ++++ .../targetallocator/serviceaccount.go | 9 +- .../targetallocator/serviceaccount_test.go | 0 .../targetallocator/targetallocator.go | 48 +++ .../targetallocator/testdata/test.yaml | 0 .../manifests}/targetallocator/volume.go | 2 +- .../manifests}/targetallocator/volume_test.go | 2 +- {pkg => internal}/naming/dns.go | 0 {pkg => internal}/naming/dns_test.go | 0 {pkg => internal}/naming/main.go | 0 {pkg => internal}/naming/port.go | 0 {pkg => internal}/naming/port_test.go | 0 {pkg => internal}/naming/triming.go | 0 {pkg => internal}/naming/triming_test.go | 0 .../webhookhandler/webhookhandler_test.go | 2 +- pkg/collector/reconcile/configmap.go | 47 +-- pkg/collector/reconcile/configmap_test.go | 227 ++------------- pkg/collector/reconcile/daemonset.go | 15 +- pkg/collector/reconcile/daemonset_test.go | 20 +- pkg/collector/reconcile/deployment.go | 17 +- pkg/collector/reconcile/deployment_test.go | 43 +-- .../reconcile/horizontalpodautoscaler.go | 15 +- .../reconcile/horizontalpodautoscaler_test.go | 12 +- pkg/collector/reconcile/ingress.go | 116 +------- pkg/collector/reconcile/ingress_test.go | 164 +---------- pkg/collector/reconcile/opentelemetry.go | 8 +- pkg/collector/reconcile/route.go | 78 +---- pkg/collector/reconcile/route_test.go | 131 +-------- pkg/collector/reconcile/service.go | 217 +------------- pkg/collector/reconcile/service_test.go | 184 +----------- pkg/collector/reconcile/serviceaccount.go | 36 ++- .../reconcile/serviceaccount_test.go | 52 +--- pkg/collector/reconcile/servicemonitor.go | 51 +--- .../reconcile/servicemonitor_test.go | 22 +- pkg/collector/reconcile/statefulset.go | 17 +- pkg/collector/reconcile/statefulset_test.go | 26 +- pkg/collector/reconcile/suite_test.go | 25 +- .../reconcile/testdata/ingress_testdata.yaml | 16 + .../reconcile/{ => testdata}/test.yaml | 10 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 2 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_36_0.go | 2 +- pkg/collector/upgrade/v0_38_0.go | 2 +- pkg/collector/upgrade/v0_39_0.go | 2 +- pkg/collector/upgrade/v0_41_0.go | 2 +- pkg/collector/upgrade/v0_43_0.go | 2 +- pkg/collector/upgrade/v0_56_0.go | 2 +- pkg/collector/upgrade/v0_57_2.go | 2 +- pkg/collector/upgrade/v0_61_0.go | 2 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/sidecar/pod.go | 7 +- pkg/sidecar/pod_test.go | 2 +- 160 files changed, 2198 insertions(+), 1394 deletions(-) create mode 100644 internal/manifests/builder.go rename {pkg => internal/manifests}/collector/adapters/config_from.go (100%) rename {pkg => internal/manifests}/collector/adapters/config_from_test.go (91%) rename {pkg => internal/manifests}/collector/adapters/config_to_ports.go (97%) rename {pkg => internal/manifests}/collector/adapters/config_to_ports_test.go (97%) rename {pkg => internal/manifests}/collector/adapters/config_to_probe.go (95%) rename {pkg => internal/manifests}/collector/adapters/config_to_probe_test.go (98%) rename {pkg => internal/manifests}/collector/adapters/config_validate.go (100%) rename {pkg => internal/manifests}/collector/adapters/config_validate_test.go (100%) rename {pkg => internal/manifests}/collector/annotations.go (100%) rename {pkg => internal/manifests}/collector/annotations_test.go (100%) create mode 100644 internal/manifests/collector/collector.go rename {pkg/collector/reconcile => internal/manifests/collector}/config_replace.go (92%) rename {pkg/collector/reconcile => internal/manifests/collector}/config_replace_test.go (91%) create mode 100644 internal/manifests/collector/configmap.go create mode 100644 internal/manifests/collector/configmap_test.go rename {pkg => internal/manifests}/collector/container.go (98%) rename {pkg => internal/manifests}/collector/container_test.go (99%) rename {pkg => internal/manifests}/collector/daemonset.go (93%) rename {pkg => internal/manifests}/collector/daemonset_test.go (99%) rename {pkg => internal/manifests}/collector/deployment.go (94%) rename {pkg => internal/manifests}/collector/deployment_test.go (99%) rename {pkg => internal/manifests}/collector/horizontalpodautoscaler.go (99%) rename {pkg => internal/manifests}/collector/horizontalpodautoscaler_test.go (98%) create mode 100644 internal/manifests/collector/ingress.go create mode 100644 internal/manifests/collector/ingress_test.go rename {pkg => internal/manifests}/collector/labels.go (97%) rename {pkg => internal/manifests}/collector/labels_test.go (97%) rename {pkg => internal/manifests}/collector/parser/receiver.go (98%) rename {pkg => internal/manifests}/collector/parser/receiver_aws-xray.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_aws-xray_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_carbon.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_carbon_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_collectd.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_collectd_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_fluent-forward.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_fluent-forward_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_generic.go (97%) rename {pkg => internal/manifests}/collector/parser/receiver_generic_test.go (97%) rename {pkg => internal/manifests}/collector/parser/receiver_influxdb.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_influxdb_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_jaeger.go (98%) rename {pkg => internal/manifests}/collector/parser/receiver_jaeger_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_oc.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_oc_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_otlp.go (98%) rename {pkg => internal/manifests}/collector/parser/receiver_otlp_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_sapm.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_sapm_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_signalfx.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_signalfx_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_skywalking.go (98%) rename {pkg => internal/manifests}/collector/parser/receiver_skywalking_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_splunk-hec.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_splunk-hec_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_statsd.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_statsd_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_test.go (98%) rename {pkg => internal/manifests}/collector/parser/receiver_wavefront.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_wavefront_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_zipkin-scribe.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_zipkin-scribe_test.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_zipkin.go (100%) rename {pkg => internal/manifests}/collector/parser/receiver_zipkin_test.go (100%) create mode 100644 internal/manifests/collector/route.go create mode 100644 internal/manifests/collector/route_test.go create mode 100644 internal/manifests/collector/service.go create mode 100644 internal/manifests/collector/service_test.go rename {pkg => internal/manifests}/collector/serviceaccount.go (81%) rename {pkg => internal/manifests}/collector/serviceaccount_test.go (94%) create mode 100644 internal/manifests/collector/servicemonitor.go create mode 100644 internal/manifests/collector/servicemonitor_test.go rename {pkg => internal/manifests}/collector/statefulset.go (94%) rename {pkg => internal/manifests}/collector/statefulset_test.go (99%) create mode 100644 internal/manifests/collector/suite_test.go rename {pkg => internal/manifests}/collector/testdata/http_sd_config_servicemonitor_test.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/http_sd_config_test.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/ingress_testdata.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/relabel_config_expected_with_sd_config.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/relabel_config_original.yaml (100%) rename {pkg => internal/manifests}/collector/testdata/route_crd.go (100%) rename {pkg => internal/manifests}/collector/testdata/sm_crd.go (100%) rename {pkg => internal/manifests}/collector/testdata/test.yaml (100%) rename {pkg => internal/manifests}/collector/utils.go (100%) rename {pkg => internal/manifests}/collector/volume.go (95%) rename {pkg => internal/manifests}/collector/volume_test.go (91%) rename {pkg => internal/manifests}/collector/volumeclaim.go (100%) rename {pkg => internal/manifests}/collector/volumeclaim_test.go (96%) rename {pkg/collector/reconcile => internal/manifests}/params.go (98%) rename {pkg => internal/manifests}/targetallocator/adapters/config_to_prom_config.go (99%) rename {pkg => internal/manifests}/targetallocator/adapters/config_to_prom_config_test.go (99%) rename {pkg => internal/manifests}/targetallocator/annotations.go (88%) rename {pkg => internal/manifests}/targetallocator/annotations_test.go (82%) rename {pkg => internal/manifests}/targetallocator/configmap.go (84%) rename {pkg => internal/manifests}/targetallocator/configmap_test.go (92%) rename {pkg => internal/manifests}/targetallocator/container.go (96%) rename {pkg => internal/manifests}/targetallocator/container_test.go (98%) rename {pkg => internal/manifests}/targetallocator/deployment.go (83%) rename {pkg => internal/manifests}/targetallocator/deployment_test.go (96%) rename {pkg => internal/manifests}/targetallocator/labels.go (95%) rename {pkg => internal/manifests}/targetallocator/labels_test.go (100%) create mode 100644 internal/manifests/targetallocator/service.go rename {pkg => internal/manifests}/targetallocator/serviceaccount.go (82%) rename {pkg => internal/manifests}/targetallocator/serviceaccount_test.go (100%) create mode 100644 internal/manifests/targetallocator/targetallocator.go rename {pkg => internal/manifests}/targetallocator/testdata/test.yaml (100%) rename {pkg => internal/manifests}/targetallocator/volume.go (95%) rename {pkg => internal/manifests}/targetallocator/volume_test.go (94%) rename {pkg => internal}/naming/dns.go (100%) rename {pkg => internal}/naming/dns_test.go (100%) rename {pkg => internal}/naming/main.go (100%) rename {pkg => internal}/naming/port.go (100%) rename {pkg => internal}/naming/port_test.go (100%) rename {pkg => internal}/naming/triming.go (100%) rename {pkg => internal}/naming/triming_test.go (100%) create mode 100644 pkg/collector/reconcile/testdata/ingress_testdata.yaml rename pkg/collector/reconcile/{ => testdata}/test.yaml (53%) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index e4a34b564..bff4099c7 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -27,8 +27,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) // log is for logging in this package. diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 74691c8b2..1605004be 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -34,6 +34,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" @@ -53,7 +54,7 @@ type OpenTelemetryCollectorReconciler struct { // Task represents a reconciliation task to be executed by the reconciler. type Task struct { - Do func(context.Context, reconcile.Params) error + Do func(context.Context, manifests.Params) error Name string BailOnError bool } @@ -212,7 +213,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, nil } - params := reconcile.Params{ + params := manifests.Params{ Config: r.config, Client: r.Client, Instance: instance, @@ -229,7 +230,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct } // RunTasks runs all the tasks associated with this reconciler. -func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { +func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params manifests.Params) error { r.muTasks.RLock() defer r.muTasks.RUnlock() for _, task := range r.tasks { diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 941bd6d0b..8ad258443 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -37,8 +37,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" ) var logger = logf.Log.WithName("unit-tests") @@ -254,14 +254,14 @@ func TestContinueOnRecoverableFailure(t *testing.T) { Tasks: []controllers.Task{ { Name: "should-fail", - Do: func(context.Context, reconcile.Params) error { + Do: func(context.Context, manifests.Params) error { return errors.New("should fail") }, BailOnError: false, }, { Name: "should-be-called", - Do: func(context.Context, reconcile.Params) error { + Do: func(context.Context, manifests.Params) error { taskCalled = true return nil }, @@ -270,7 +270,7 @@ func TestContinueOnRecoverableFailure(t *testing.T) { }) // test - err := reconciler.RunTasks(context.Background(), reconcile.Params{}) + err := reconciler.RunTasks(context.Background(), manifests.Params{}) // verify assert.NoError(t, err) @@ -291,7 +291,7 @@ func TestBreakOnUnrecoverableError(t *testing.T) { Tasks: []controllers.Task{ { Name: "should-fail", - Do: func(context.Context, reconcile.Params) error { + Do: func(context.Context, manifests.Params) error { taskCalled = true return expectedErr }, @@ -299,7 +299,7 @@ func TestBreakOnUnrecoverableError(t *testing.T) { }, { Name: "should-not-be-called", - Do: func(context.Context, reconcile.Params) error { + Do: func(context.Context, manifests.Params) error { assert.Fail(t, "should not have been called") return nil }, @@ -341,7 +341,7 @@ func TestSkipWhenInstanceDoesNotExist(t *testing.T) { Tasks: []controllers.Task{ { Name: "should-not-be-called", - Do: func(context.Context, reconcile.Params) error { + Do: func(context.Context, manifests.Params) error { assert.Fail(t, "should not have been called") return nil }, diff --git a/controllers/suite_test.go b/controllers/suite_test.go index be597e73c..1d8914bb6 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -37,7 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/envtest" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/testdata" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" // +kubebuilder:scaffold:imports ) diff --git a/internal/manifests/builder.go b/internal/manifests/builder.go new file mode 100644 index 000000000..caaa1c851 --- /dev/null +++ b/internal/manifests/builder.go @@ -0,0 +1,41 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package manifests + +import ( + "github.com/go-logr/logr" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +type Builder func(params Params) ([]client.Object, error) + +type ManifestFactory[T client.Object] func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (T, error) +type SimpleManifestFactory[T client.Object] func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) T +type K8sManifestFactory ManifestFactory[client.Object] + +func FactoryWithoutError[T client.Object](f SimpleManifestFactory[T]) K8sManifestFactory { + return func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (client.Object, error) { + return f(cfg, logger, otelcol), nil + } +} + +func Factory[T client.Object](f ManifestFactory[T]) K8sManifestFactory { + return func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (client.Object, error) { + return f(cfg, logger, otelcol) + } +} diff --git a/pkg/collector/adapters/config_from.go b/internal/manifests/collector/adapters/config_from.go similarity index 100% rename from pkg/collector/adapters/config_from.go rename to internal/manifests/collector/adapters/config_from.go diff --git a/pkg/collector/adapters/config_from_test.go b/internal/manifests/collector/adapters/config_from_test.go similarity index 91% rename from pkg/collector/adapters/config_from_test.go rename to internal/manifests/collector/adapters/config_from_test.go index 92fb0569b..809938708 100644 --- a/pkg/collector/adapters/config_from_test.go +++ b/internal/manifests/collector/adapters/config_from_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" ) func TestInvalidYAML(t *testing.T) { diff --git a/pkg/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go similarity index 97% rename from pkg/collector/adapters/config_to_ports.go rename to internal/manifests/collector/adapters/config_to_ports.go index 55a165a14..530898e5e 100644 --- a/pkg/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -24,7 +24,7 @@ import ( "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" ) var ( diff --git a/pkg/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go similarity index 97% rename from pkg/collector/adapters/config_to_ports_test.go rename to internal/manifests/collector/adapters/config_to_ports_test.go index 3bfe7ac26..5f1bd1fab 100644 --- a/pkg/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -25,8 +25,8 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/adapters/config_to_probe.go b/internal/manifests/collector/adapters/config_to_probe.go similarity index 95% rename from pkg/collector/adapters/config_to_probe.go rename to internal/manifests/collector/adapters/config_to_probe.go index 84b65eb01..897b7db06 100644 --- a/pkg/collector/adapters/config_to_probe.go +++ b/internal/manifests/collector/adapters/config_to_probe.go @@ -31,10 +31,10 @@ var ( errNoExtensionHealthCheck = errors.New("extensions property in the configuration does not contain the expected health_check extension") - errNoServiceExtensions = errors.New("service property in the configuration doesn't contain extensions") + ErrNoServiceExtensions = errors.New("service property in the configuration doesn't contain extensions") errServiceExtensionsNotSlice = errors.New("service extensions property in the configuration does not contain valid extensions") - errNoServiceExtensionHealthCheck = errors.New("no healthcheck extension available in service extension configuration") + ErrNoServiceExtensionHealthCheck = errors.New("no healthcheck extension available in service extension configuration") ) type probeConfiguration struct { @@ -60,7 +60,7 @@ func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, serviceExtensionsProperty, withExtension := service["extensions"] if !withExtension { - return nil, errNoServiceExtensions + return nil, ErrNoServiceExtensions } serviceExtensions, withExtProperty := serviceExtensionsProperty.([]interface{}) @@ -76,7 +76,7 @@ func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, } if len(healthCheckServiceExtensions) == 0 { - return nil, errNoServiceExtensionHealthCheck + return nil, ErrNoServiceExtensionHealthCheck } extensionsProperty, ok := config["extensions"] diff --git a/pkg/collector/adapters/config_to_probe_test.go b/internal/manifests/collector/adapters/config_to_probe_test.go similarity index 98% rename from pkg/collector/adapters/config_to_probe_test.go rename to internal/manifests/collector/adapters/config_to_probe_test.go index 6a2ae3398..89e1f9734 100644 --- a/pkg/collector/adapters/config_to_probe_test.go +++ b/internal/manifests/collector/adapters/config_to_probe_test.go @@ -146,7 +146,7 @@ service: desc: "NoHealthCheckInServiceExtensions", config: `service: extensions: [pprof]`, - expectedErr: errNoServiceExtensionHealthCheck, + expectedErr: ErrNoServiceExtensionHealthCheck, }, { desc: "BadlyFormattedServiceExtensions", config: `service: @@ -159,7 +159,7 @@ service: pipelines: traces: receivers: [otlp]`, - expectedErr: errNoServiceExtensions, + expectedErr: ErrNoServiceExtensions, }, { desc: "BadlyFormattedService", config: `extensions: diff --git a/pkg/collector/adapters/config_validate.go b/internal/manifests/collector/adapters/config_validate.go similarity index 100% rename from pkg/collector/adapters/config_validate.go rename to internal/manifests/collector/adapters/config_validate.go diff --git a/pkg/collector/adapters/config_validate_test.go b/internal/manifests/collector/adapters/config_validate_test.go similarity index 100% rename from pkg/collector/adapters/config_validate_test.go rename to internal/manifests/collector/adapters/config_validate_test.go diff --git a/pkg/collector/annotations.go b/internal/manifests/collector/annotations.go similarity index 100% rename from pkg/collector/annotations.go rename to internal/manifests/collector/annotations.go diff --git a/pkg/collector/annotations_test.go b/internal/manifests/collector/annotations_test.go similarity index 100% rename from pkg/collector/annotations_test.go rename to internal/manifests/collector/annotations_test.go diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go new file mode 100644 index 000000000..7fd2d22a8 --- /dev/null +++ b/internal/manifests/collector/collector.go @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" +) + +// Build is currently unused, but will be implemented to solve +// https://github.com/open-telemetry/opentelemetry-operator/issues/1876 +func Build(params manifests.Params) ([]client.Object, error) { + var resourceManifests []client.Object + var manifestFactories []manifests.K8sManifestFactory + switch params.Instance.Spec.Mode { + case v1alpha1.ModeDeployment: + manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(Deployment)) + case v1alpha1.ModeStatefulSet: + manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(StatefulSet)) + case v1alpha1.ModeDaemonSet: + manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(DaemonSet)) + case v1alpha1.ModeSidecar: + params.Log.V(5).Info("not building sidecar...") + } + manifestFactories = append(manifestFactories, []manifests.K8sManifestFactory{ + manifests.FactoryWithoutError(ConfigMap), + manifests.FactoryWithoutError(HorizontalPodAutoscaler), + manifests.FactoryWithoutError(ServiceAccount), + manifests.FactoryWithoutError(Service), + manifests.FactoryWithoutError(HeadlessService), + manifests.FactoryWithoutError(MonitoringService), + manifests.FactoryWithoutError(Ingress), + }...) + if params.Instance.Spec.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + manifestFactories = append(manifestFactories, manifests.Factory(ServiceMonitor)) + } + for _, factory := range manifestFactories { + res, err := factory(params.Config, params.Log, params.Instance) + if err != nil { + return nil, err + } else if res != nil { + // because of pointer semantics, res is still nil-able here as this is an interface pointer + // read here for details: + // https://github.com/open-telemetry/opentelemetry-operator/pull/1965#discussion_r1281705719 + resourceManifests = append(resourceManifests, res) + } + } + routes := Routes(params.Config, params.Log, params.Instance) + // NOTE: we cannot just unpack the slice, the type checker doesn't coerce the type correctly. + for _, route := range routes { + resourceManifests = append(resourceManifests, route) + } + return resourceManifests, nil +} diff --git a/pkg/collector/reconcile/config_replace.go b/internal/manifests/collector/config_replace.go similarity index 92% rename from pkg/collector/reconcile/config_replace.go rename to internal/manifests/collector/config_replace.go index 481f60d97..c6cc58ad4 100644 --- a/pkg/collector/reconcile/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package reconcile +package collector import ( "time" @@ -22,10 +22,10 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) type targetAllocator struct { diff --git a/pkg/collector/reconcile/config_replace_test.go b/internal/manifests/collector/config_replace_test.go similarity index 91% rename from pkg/collector/reconcile/config_replace_test.go rename to internal/manifests/collector/config_replace_test.go index 2b6f36364..1384da681 100644 --- a/pkg/collector/reconcile/config_replace_test.go +++ b/internal/manifests/collector/config_replace_test.go @@ -12,24 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -package reconcile +package collector import ( "os" "testing" - colfeaturegate "go.opentelemetry.io/collector/featuregate" - "github.com/prometheus/prometheus/discovery/http" "github.com/stretchr/testify/assert" + colfeaturegate "go.opentelemetry.io/collector/featuregate" "gopkg.in/yaml.v2" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" ) func TestPrometheusParser(t *testing.T) { - param, err := newParams("test/test-img", "../testdata/http_sd_config_test.yaml") + param, err := newParams("test/test-img", "testdata/http_sd_config_test.yaml") assert.NoError(t, err) t.Run("should update config with http_sd_config", func(t *testing.T) { @@ -130,12 +129,12 @@ func TestPrometheusParser(t *testing.T) { } func TestReplaceConfig(t *testing.T) { - param, err := newParams("test/test-img", "../testdata/relabel_config_original.yaml") + param, err := newParams("test/test-img", "testdata/relabel_config_original.yaml") assert.NoError(t, err) t.Run("should not modify config when TargetAllocator is disabled", func(t *testing.T) { param.Instance.Spec.TargetAllocator.Enabled = false - expectedConfigBytes, err := os.ReadFile("../testdata/relabel_config_original.yaml") + expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_original.yaml") assert.NoError(t, err) expectedConfig := string(expectedConfigBytes) @@ -148,7 +147,7 @@ func TestReplaceConfig(t *testing.T) { t.Run("should rewrite scrape configs with SD config when TargetAllocator is enabled and feature flag is not set", func(t *testing.T) { param.Instance.Spec.TargetAllocator.Enabled = true - expectedConfigBytes, err := os.ReadFile("../testdata/relabel_config_expected_with_sd_config.yaml") + expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_expected_with_sd_config.yaml") assert.NoError(t, err) expectedConfig := string(expectedConfigBytes) diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go new file mode 100644 index 000000000..2109b25ba --- /dev/null +++ b/internal/manifests/collector/configmap.go @@ -0,0 +1,47 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func ConfigMap(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ConfigMap { + name := naming.ConfigMap(otelcol.Name) + labels := Labels(otelcol, name, []string{}) + + replacedConf, err := ReplaceConfig(otelcol) + if err != nil { + logger.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) + } + + return &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: otelcol.Annotations, + }, + Data: map[string]string{ + "collector.yaml": replacedConf, + }, + } +} diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go new file mode 100644 index 000000000..6a48737cd --- /dev/null +++ b/internal/manifests/collector/configmap_test.go @@ -0,0 +1,207 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "testing" + + colfeaturegate "go.opentelemetry.io/collector/featuregate" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" +) + +func TestDesiredConfigMap(t *testing.T) { + expectedLables := map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "0.47.0", + } + + t.Run("should return expected collector config map", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "0.47.0" + + expectedData := map[string]string{ + "collector.yaml": `processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus, jaeger] + processors: [] + exporters: [logging]`, + } + + param := deploymentParams() + actual := ConfigMap(param.Config, param.Log, param.Instance) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + }) + + t.Run("should return expected collector config map with http_sd_config", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + jaeger: + protocols: + grpc: null + prometheus: + config: + scrape_configs: + - http_sd_configs: + - url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME + job_name: otel-collector + scrape_interval: 10s +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus + - jaeger +`, + } + + param := deploymentParams() + param.Instance.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param.Config, param.Log, param.Instance) + + assert.Equal(t, "test-collector", actual.GetName()) + assert.Equal(t, expectedLables, actual.GetLabels()) + assert.Equal(t, expectedData, actual.Data) + + }) + + t.Run("should return expected escaped collector config map with http_sd_config", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "latest" + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + prometheus: + config: + scrape_configs: + - http_sd_configs: + - url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME + job_name: serviceMonitor/test/test/0 + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://test-targetallocator:80 + http_sd_config: + refresh_interval: 60s + interval: 30s +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus +`, + } + + param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test_ta_set.yaml") + assert.NoError(t, err) + param.Instance.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param.Config, param.Log, param.Instance) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + // Reset the value + expectedLables["app.kubernetes.io/version"] = "0.47.0" + + }) + + t.Run("should return expected escaped collector config map with target_allocator config block", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" + expectedLables["app.kubernetes.io/name"] = "test-collector" + expectedLables["app.kubernetes.io/version"] = "latest" + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + assert.NoError(t, err) + + expectedData := map[string]string{ + "collector.yaml": `exporters: + logging: null +processors: null +receivers: + prometheus: + config: {} + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://test-targetallocator:80 + interval: 30s +service: + pipelines: + metrics: + exporters: + - logging + processors: [] + receivers: + - prometheus +`, + } + + param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test.yaml") + assert.NoError(t, err) + param.Instance.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param.Config, param.Log, param.Instance) + + assert.Equal(t, "test-collector", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + + // Reset the value + expectedLables["app.kubernetes.io/version"] = "0.47.0" + err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + assert.NoError(t, err) + + }) + +} diff --git a/pkg/collector/container.go b/internal/manifests/collector/container.go similarity index 98% rename from pkg/collector/container.go rename to internal/manifests/collector/container.go index 0e4f3428d..946a43340 100644 --- a/pkg/collector/container.go +++ b/internal/manifests/collector/container.go @@ -27,8 +27,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // maxPortLen allows us to truncate a port name according to what is considered valid port syntax: diff --git a/pkg/collector/container_test.go b/internal/manifests/collector/container_test.go similarity index 99% rename from pkg/collector/container_test.go rename to internal/manifests/collector/container_test.go index 4b7822df1..280e63d7a 100644 --- a/pkg/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -24,7 +24,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/daemonset.go b/internal/manifests/collector/daemonset.go similarity index 93% rename from pkg/collector/daemonset.go rename to internal/manifests/collector/daemonset.go index aee097503..fe08d0fc5 100644 --- a/pkg/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -22,17 +22,17 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // DaemonSet builds the deployment for the given instance. -func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.DaemonSet { +func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.DaemonSet { name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) - return appsv1.DaemonSet{ + return &appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Collector(otelcol.Name), Namespace: otelcol.Namespace, diff --git a/pkg/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go similarity index 99% rename from pkg/collector/daemonset_test.go rename to internal/manifests/collector/daemonset_test.go index a4d492d40..eac639819 100644 --- a/pkg/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -23,7 +23,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) func TestDaemonSetNewDefault(t *testing.T) { diff --git a/pkg/collector/deployment.go b/internal/manifests/collector/deployment.go similarity index 94% rename from pkg/collector/deployment.go rename to internal/manifests/collector/deployment.go index 7f4d0c898..e4df2cf71 100644 --- a/pkg/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -22,18 +22,18 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Deployment builds the deployment for the given instance. -func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { +func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.Deployment { name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) - return appsv1.Deployment{ + return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: otelcol.Namespace, diff --git a/pkg/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go similarity index 99% rename from pkg/collector/deployment_test.go rename to internal/manifests/collector/deployment_test.go index 3e2159c73..f0661653d 100644 --- a/pkg/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -23,7 +23,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) var testTolerationValues = []v1.Toleration{ diff --git a/pkg/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go similarity index 99% rename from pkg/collector/horizontalpodautoscaler.go rename to internal/manifests/collector/horizontalpodautoscaler.go index 4771a841a..a46d4a48c 100644 --- a/pkg/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -24,13 +24,11 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { - autoscalingVersion := cfg.AutoscalingVersion() - name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) @@ -48,6 +46,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al logger.Info("Autoscaler field is unset in Spec, skipping") return nil } + autoscalingVersion := cfg.AutoscalingVersion() if otelcol.Spec.Autoscaler.MaxReplicas == nil { otelcol.Spec.Autoscaler.MaxReplicas = otelcol.Spec.MaxReplicas diff --git a/pkg/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go similarity index 98% rename from pkg/collector/horizontalpodautoscaler_test.go rename to internal/manifests/collector/horizontalpodautoscaler_test.go index e98af9d98..294ab16a7 100644 --- a/pkg/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -26,8 +26,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) func TestHPA(t *testing.T) { diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go new file mode 100644 index 000000000..0d4c02693 --- /dev/null +++ b/internal/manifests/collector/ingress.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func Ingress(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *networkingv1.Ingress { + if otelcol.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { + return nil + } + + ports := servicePortsFromCfg(logger, otelcol) + + // if we have no ports, we don't need a ingress entry + if len(ports) == 0 { + logger.V(1).Info( + "the instance's configuration didn't yield any ports to open, skipping ingress", + "instance.name", otelcol.Name, + "instance.namespace", otelcol.Namespace, + ) + return nil + } + + pathType := networkingv1.PathTypePrefix + paths := make([]networkingv1.HTTPIngressPath, len(ports)) + for i, p := range ports { + paths[i] = networkingv1.HTTPIngressPath{ + Path: "/" + p.Name, + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: naming.Service(otelcol.Name), + Port: networkingv1.ServiceBackendPort{ + // Valid names must be non-empty and no more than 15 characters long. + Name: naming.Truncate(p.Name, 15), + }, + }, + }, + } + } + + return &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Ingress(otelcol.Name), + Namespace: otelcol.Namespace, + Annotations: otelcol.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Ingress(otelcol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: networkingv1.IngressSpec{ + TLS: otelcol.Spec.Ingress.TLS, + Rules: []networkingv1.IngressRule{ + { + Host: otelcol.Spec.Ingress.Hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: paths, + }, + }, + }, + }, + IngressClassName: otelcol.Spec.Ingress.IngressClassName, + }, + } +} + +// TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 +func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []corev1.ServicePort { + configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + logger.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(logger, configFromString) + if err != nil { + logger.Error(err, "couldn't build the ingress for this instance") + } + + if len(otelcol.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(otelcol.Spec.Ports) + var resultingInferredPorts []corev1.ServicePort + for _, inferred := range ports { + if filtered := filterPort(logger, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(otelcol.Spec.Ports, resultingInferredPorts...) + } + return ports +} diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go new file mode 100644 index 000000000..5ad7bb68b --- /dev/null +++ b/internal/manifests/collector/ingress_test.go @@ -0,0 +1,176 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + _ "embed" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +const testFileIngress = "testdata/ingress_testdata.yaml" + +func TestDesiredIngresses(t *testing.T) { + t.Run("should return nil invalid ingress type", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressType("unknown"), + }, + }, + }, + } + + actual := Ingress(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse config", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "!!!", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + }, + }, + }, + } + + actual := Ingress(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "---", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + }, + }, + }, + } + + actual := Ingress(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to do something else", func(t *testing.T) { + var ( + ns = "test" + hostname = "example.com" + ingressClassName = "nginx" + ) + + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = ns + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + IngressClassName: &ingressClassName, + } + + got := Ingress(params.Config, params.Log, params.Instance) + pathType := networkingv1.PathTypePrefix + + assert.NotEqual(t, &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Ingress(params.Instance.Name), + Namespace: ns, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: networkingv1.IngressSpec{ + IngressClassName: &ingressClassName, + Rules: []networkingv1.IngressRule{ + { + Host: hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/another-port", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "another-port", + }, + }, + }, + }, + { + Path: "/otlp-grpc", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-grpc", + }, + }, + }, + }, + { + Path: "/otlp-test-grpc", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-test-grpc", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, got) + }) + +} diff --git a/pkg/collector/labels.go b/internal/manifests/collector/labels.go similarity index 97% rename from pkg/collector/labels.go rename to internal/manifests/collector/labels.go index 56baeed14..d6aaa8ed4 100644 --- a/pkg/collector/labels.go +++ b/internal/manifests/collector/labels.go @@ -19,7 +19,7 @@ import ( "strings" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func isFilteredLabel(label string, filterLabels []string) bool { diff --git a/pkg/collector/labels_test.go b/internal/manifests/collector/labels_test.go similarity index 97% rename from pkg/collector/labels_test.go rename to internal/manifests/collector/labels_test.go index 35ececf88..222dec7cf 100644 --- a/pkg/collector/labels_test.go +++ b/internal/manifests/collector/labels_test.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) const ( diff --git a/pkg/collector/parser/receiver.go b/internal/manifests/collector/parser/receiver.go similarity index 98% rename from pkg/collector/parser/receiver.go rename to internal/manifests/collector/parser/receiver.go index c25ff2f73..dcf7a6f55 100644 --- a/pkg/collector/parser/receiver.go +++ b/internal/manifests/collector/parser/receiver.go @@ -26,7 +26,7 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // ReceiverParser is an interface that should be implemented by all receiver parsers. diff --git a/pkg/collector/parser/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver_aws-xray.go similarity index 100% rename from pkg/collector/parser/receiver_aws-xray.go rename to internal/manifests/collector/parser/receiver_aws-xray.go diff --git a/pkg/collector/parser/receiver_aws-xray_test.go b/internal/manifests/collector/parser/receiver_aws-xray_test.go similarity index 100% rename from pkg/collector/parser/receiver_aws-xray_test.go rename to internal/manifests/collector/parser/receiver_aws-xray_test.go diff --git a/pkg/collector/parser/receiver_carbon.go b/internal/manifests/collector/parser/receiver_carbon.go similarity index 100% rename from pkg/collector/parser/receiver_carbon.go rename to internal/manifests/collector/parser/receiver_carbon.go diff --git a/pkg/collector/parser/receiver_carbon_test.go b/internal/manifests/collector/parser/receiver_carbon_test.go similarity index 100% rename from pkg/collector/parser/receiver_carbon_test.go rename to internal/manifests/collector/parser/receiver_carbon_test.go diff --git a/pkg/collector/parser/receiver_collectd.go b/internal/manifests/collector/parser/receiver_collectd.go similarity index 100% rename from pkg/collector/parser/receiver_collectd.go rename to internal/manifests/collector/parser/receiver_collectd.go diff --git a/pkg/collector/parser/receiver_collectd_test.go b/internal/manifests/collector/parser/receiver_collectd_test.go similarity index 100% rename from pkg/collector/parser/receiver_collectd_test.go rename to internal/manifests/collector/parser/receiver_collectd_test.go diff --git a/pkg/collector/parser/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver_fluent-forward.go similarity index 100% rename from pkg/collector/parser/receiver_fluent-forward.go rename to internal/manifests/collector/parser/receiver_fluent-forward.go diff --git a/pkg/collector/parser/receiver_fluent-forward_test.go b/internal/manifests/collector/parser/receiver_fluent-forward_test.go similarity index 100% rename from pkg/collector/parser/receiver_fluent-forward_test.go rename to internal/manifests/collector/parser/receiver_fluent-forward_test.go diff --git a/pkg/collector/parser/receiver_generic.go b/internal/manifests/collector/parser/receiver_generic.go similarity index 97% rename from pkg/collector/parser/receiver_generic.go rename to internal/manifests/collector/parser/receiver_generic.go index dbf9bcc27..8ca401c87 100644 --- a/pkg/collector/parser/receiver_generic.go +++ b/internal/manifests/collector/parser/receiver_generic.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) const parserNameGeneric = "__generic" diff --git a/pkg/collector/parser/receiver_generic_test.go b/internal/manifests/collector/parser/receiver_generic_test.go similarity index 97% rename from pkg/collector/parser/receiver_generic_test.go rename to internal/manifests/collector/parser/receiver_generic_test.go index 15fd90359..7c99633d1 100644 --- a/pkg/collector/parser/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver_generic_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/parser/receiver_influxdb.go b/internal/manifests/collector/parser/receiver_influxdb.go similarity index 100% rename from pkg/collector/parser/receiver_influxdb.go rename to internal/manifests/collector/parser/receiver_influxdb.go diff --git a/pkg/collector/parser/receiver_influxdb_test.go b/internal/manifests/collector/parser/receiver_influxdb_test.go similarity index 100% rename from pkg/collector/parser/receiver_influxdb_test.go rename to internal/manifests/collector/parser/receiver_influxdb_test.go diff --git a/pkg/collector/parser/receiver_jaeger.go b/internal/manifests/collector/parser/receiver_jaeger.go similarity index 98% rename from pkg/collector/parser/receiver_jaeger.go rename to internal/manifests/collector/parser/receiver_jaeger.go index f36fe6aeb..fc5a7e153 100644 --- a/pkg/collector/parser/receiver_jaeger.go +++ b/internal/manifests/collector/parser/receiver_jaeger.go @@ -20,7 +20,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var _ ReceiverParser = &JaegerReceiverParser{} diff --git a/pkg/collector/parser/receiver_jaeger_test.go b/internal/manifests/collector/parser/receiver_jaeger_test.go similarity index 100% rename from pkg/collector/parser/receiver_jaeger_test.go rename to internal/manifests/collector/parser/receiver_jaeger_test.go diff --git a/pkg/collector/parser/receiver_oc.go b/internal/manifests/collector/parser/receiver_oc.go similarity index 100% rename from pkg/collector/parser/receiver_oc.go rename to internal/manifests/collector/parser/receiver_oc.go diff --git a/pkg/collector/parser/receiver_oc_test.go b/internal/manifests/collector/parser/receiver_oc_test.go similarity index 100% rename from pkg/collector/parser/receiver_oc_test.go rename to internal/manifests/collector/parser/receiver_oc_test.go diff --git a/pkg/collector/parser/receiver_otlp.go b/internal/manifests/collector/parser/receiver_otlp.go similarity index 98% rename from pkg/collector/parser/receiver_otlp.go rename to internal/manifests/collector/parser/receiver_otlp.go index 0cd822862..e2e0e46a3 100644 --- a/pkg/collector/parser/receiver_otlp.go +++ b/internal/manifests/collector/parser/receiver_otlp.go @@ -21,7 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var _ ReceiverParser = &OTLPReceiverParser{} diff --git a/pkg/collector/parser/receiver_otlp_test.go b/internal/manifests/collector/parser/receiver_otlp_test.go similarity index 100% rename from pkg/collector/parser/receiver_otlp_test.go rename to internal/manifests/collector/parser/receiver_otlp_test.go diff --git a/pkg/collector/parser/receiver_sapm.go b/internal/manifests/collector/parser/receiver_sapm.go similarity index 100% rename from pkg/collector/parser/receiver_sapm.go rename to internal/manifests/collector/parser/receiver_sapm.go diff --git a/pkg/collector/parser/receiver_sapm_test.go b/internal/manifests/collector/parser/receiver_sapm_test.go similarity index 100% rename from pkg/collector/parser/receiver_sapm_test.go rename to internal/manifests/collector/parser/receiver_sapm_test.go diff --git a/pkg/collector/parser/receiver_signalfx.go b/internal/manifests/collector/parser/receiver_signalfx.go similarity index 100% rename from pkg/collector/parser/receiver_signalfx.go rename to internal/manifests/collector/parser/receiver_signalfx.go diff --git a/pkg/collector/parser/receiver_signalfx_test.go b/internal/manifests/collector/parser/receiver_signalfx_test.go similarity index 100% rename from pkg/collector/parser/receiver_signalfx_test.go rename to internal/manifests/collector/parser/receiver_signalfx_test.go diff --git a/pkg/collector/parser/receiver_skywalking.go b/internal/manifests/collector/parser/receiver_skywalking.go similarity index 98% rename from pkg/collector/parser/receiver_skywalking.go rename to internal/manifests/collector/parser/receiver_skywalking.go index 339799911..b888edc24 100644 --- a/pkg/collector/parser/receiver_skywalking.go +++ b/internal/manifests/collector/parser/receiver_skywalking.go @@ -21,7 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var _ ReceiverParser = &SkywalkingReceiverParser{} diff --git a/pkg/collector/parser/receiver_skywalking_test.go b/internal/manifests/collector/parser/receiver_skywalking_test.go similarity index 100% rename from pkg/collector/parser/receiver_skywalking_test.go rename to internal/manifests/collector/parser/receiver_skywalking_test.go diff --git a/pkg/collector/parser/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver_splunk-hec.go similarity index 100% rename from pkg/collector/parser/receiver_splunk-hec.go rename to internal/manifests/collector/parser/receiver_splunk-hec.go diff --git a/pkg/collector/parser/receiver_splunk-hec_test.go b/internal/manifests/collector/parser/receiver_splunk-hec_test.go similarity index 100% rename from pkg/collector/parser/receiver_splunk-hec_test.go rename to internal/manifests/collector/parser/receiver_splunk-hec_test.go diff --git a/pkg/collector/parser/receiver_statsd.go b/internal/manifests/collector/parser/receiver_statsd.go similarity index 100% rename from pkg/collector/parser/receiver_statsd.go rename to internal/manifests/collector/parser/receiver_statsd.go diff --git a/pkg/collector/parser/receiver_statsd_test.go b/internal/manifests/collector/parser/receiver_statsd_test.go similarity index 100% rename from pkg/collector/parser/receiver_statsd_test.go rename to internal/manifests/collector/parser/receiver_statsd_test.go diff --git a/pkg/collector/parser/receiver_test.go b/internal/manifests/collector/parser/receiver_test.go similarity index 98% rename from pkg/collector/parser/receiver_test.go rename to internal/manifests/collector/parser/receiver_test.go index 411929ad2..d7e39e041 100644 --- a/pkg/collector/parser/receiver_test.go +++ b/internal/manifests/collector/parser/receiver_test.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/parser/receiver_wavefront.go b/internal/manifests/collector/parser/receiver_wavefront.go similarity index 100% rename from pkg/collector/parser/receiver_wavefront.go rename to internal/manifests/collector/parser/receiver_wavefront.go diff --git a/pkg/collector/parser/receiver_wavefront_test.go b/internal/manifests/collector/parser/receiver_wavefront_test.go similarity index 100% rename from pkg/collector/parser/receiver_wavefront_test.go rename to internal/manifests/collector/parser/receiver_wavefront_test.go diff --git a/pkg/collector/parser/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver_zipkin-scribe.go similarity index 100% rename from pkg/collector/parser/receiver_zipkin-scribe.go rename to internal/manifests/collector/parser/receiver_zipkin-scribe.go diff --git a/pkg/collector/parser/receiver_zipkin-scribe_test.go b/internal/manifests/collector/parser/receiver_zipkin-scribe_test.go similarity index 100% rename from pkg/collector/parser/receiver_zipkin-scribe_test.go rename to internal/manifests/collector/parser/receiver_zipkin-scribe_test.go diff --git a/pkg/collector/parser/receiver_zipkin.go b/internal/manifests/collector/parser/receiver_zipkin.go similarity index 100% rename from pkg/collector/parser/receiver_zipkin.go rename to internal/manifests/collector/parser/receiver_zipkin.go diff --git a/pkg/collector/parser/receiver_zipkin_test.go b/internal/manifests/collector/parser/receiver_zipkin_test.go similarity index 100% rename from pkg/collector/parser/receiver_zipkin_test.go rename to internal/manifests/collector/parser/receiver_zipkin_test.go diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go new file mode 100644 index 000000000..d3b9c52bc --- /dev/null +++ b/internal/manifests/collector/route.go @@ -0,0 +1,96 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/go-logr/logr" + routev1 "github.com/openshift/api/route/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []*routev1.Route { + if otelcol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { + return nil + } + + if otelcol.Spec.Mode == v1alpha1.ModeSidecar { + logger.V(3).Info("ingress settings are not supported in sidecar mode") + return nil + } + + var tlsCfg *routev1.TLSConfig + switch otelcol.Spec.Ingress.Route.Termination { + case v1alpha1.TLSRouteTerminationTypeInsecure: + // NOTE: insecure, no tls cfg. + case v1alpha1.TLSRouteTerminationTypeEdge: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationEdge} + case v1alpha1.TLSRouteTerminationTypePassthrough: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationPassthrough} + case v1alpha1.TLSRouteTerminationTypeReencrypt: + tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationReencrypt} + default: // NOTE: if unsupported, end here. + return nil + } + + ports := servicePortsFromCfg(logger, otelcol) + + // if we have no ports, we don't need a ingress entry + if len(ports) == 0 { + logger.V(1).Info( + "the instance's configuration didn't yield any ports to open, skipping ingress", + "instance.name", otelcol.Name, + "instance.namespace", otelcol.Namespace, + ) + return nil + } + + routes := make([]*routev1.Route, len(ports)) + for i, p := range ports { + routes[i] = &routev1.Route{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Route(otelcol.Name, p.Name), + Namespace: otelcol.Namespace, + Annotations: otelcol.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Route(otelcol.Name, p.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: routev1.RouteSpec{ + Host: p.Name + "." + otelcol.Spec.Ingress.Hostname, + Path: "/" + p.Name, + To: routev1.RouteTargetReference{ + Kind: "Service", + Name: naming.Service(otelcol.Name), + }, + Port: &routev1.RoutePort{ + // Valid names must be non-empty and no more than 15 characters long. + TargetPort: intstr.FromString(naming.Truncate(p.Name, 15)), + }, + WildcardPolicy: routev1.WildcardPolicyNone, + TLS: tlsCfg, + }, + } + } + return routes +} diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go new file mode 100644 index 000000000..2accf0310 --- /dev/null +++ b/internal/manifests/collector/route_test.go @@ -0,0 +1,155 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + _ "embed" + "fmt" + "testing" + + routev1 "github.com/openshift/api/route/v1" + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func TestDesiredRoutes(t *testing.T) { + t.Run("should return nil invalid ingress type", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressType("unknown"), + }, + }, + }, + } + + actual := Routes(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse config", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "!!!", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + }, + }, + }, + } + + actual := Routes(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Config: "---", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + }, + }, + }, + } + + actual := Routes(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + }) + + t.Run("should return nil unable to do something else", func(t *testing.T) { + var ( + ns = "test" + hostname = "example.com" + ) + + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = ns + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, + } + + routes := Routes(params.Config, params.Log, params.Instance) + got := routes[0] + + assert.NotEqual(t, &routev1.Route{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Route(params.Instance.Name, ""), + Namespace: ns, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Route(params.Instance.Name, ""), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: routev1.RouteSpec{ + Host: hostname, + Path: "/abc", + To: routev1.RouteTargetReference{ + Kind: "service", + Name: "test-collector", + }, + Port: &routev1.RoutePort{ + TargetPort: intstr.FromString("another-port"), + }, + WildcardPolicy: routev1.WildcardPolicyNone, + TLS: &routev1.TLSConfig{ + Termination: routev1.TLSTerminationPassthrough, + InsecureEdgeTerminationPolicy: routev1.InsecureEdgeTerminationPolicyAllow, + }, + }, + }, got) + }) +} + +func TestRoutes(t *testing.T) { + t.Run("wrong mode", func(t *testing.T) { + params := deploymentParams() + routes := Routes(params.Config, params.Log, params.Instance) + assert.Nil(t, routes) + }) + + t.Run("supported mode and service exists", func(t *testing.T) { + params := deploymentParams() + routes := Routes(params.Config, params.Log, params.Instance) + assert.Nil(t, routes) + }) + +} diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go new file mode 100644 index 000000000..84a6284a2 --- /dev/null +++ b/internal/manifests/collector/service.go @@ -0,0 +1,191 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// headless label is to differentiate the headless service from the clusterIP service. +const ( + headlessLabel = "operator.opentelemetry.io/collector-headless-service" + headlessExists = "Exists" +) + +func HeadlessService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { + h := Service(cfg, logger, otelcol) + if h == nil { + return h + } + + h.Name = naming.HeadlessService(otelcol.Name) + h.Labels[headlessLabel] = headlessExists + + // copy to avoid modifying otelcol.Annotations + annotations := map[string]string{ + "service.beta.openshift.io/serving-cert-secret-name": fmt.Sprintf("%s-tls", h.Name), + } + for k, v := range h.Annotations { + annotations[k] = v + } + h.Annotations = annotations + + h.Spec.ClusterIP = "None" + return h +} + +func MonitoringService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { + name := naming.MonitoringService(otelcol.Name) + labels := Labels(otelcol, name, []string{}) + + c, err := adapters.ConfigFromString(otelcol.Spec.Config) + // TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 + if err != nil { + logger.Error(err, "couldn't extract the configuration") + return nil + } + + metricsPort, err := adapters.ConfigToMetricsPort(logger, c) + if err != nil { + logger.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) + metricsPort = 8888 + } + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.ServiceSpec{ + Selector: SelectorLabels(otelcol), + ClusterIP: "", + Ports: []corev1.ServicePort{{ + Name: "monitoring", + Port: metricsPort, + }}, + }, + } +} + +func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { + name := naming.Service(otelcol.Name) + labels := Labels(otelcol, name, []string{}) + + configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + logger.Error(err, "couldn't extract the configuration from the context") + return nil + } + + ports, err := adapters.ConfigToReceiverPorts(logger, configFromString) + if err != nil { + logger.Error(err, "couldn't build the service for this instance") + return nil + } + + if len(otelcol.Spec.Ports) > 0 { + // we should add all the ports from the CR + // there are two cases where problems might occur: + // 1) when the port number is already being used by a receiver + // 2) same, but for the port name + // + // in the first case, we remove the port we inferred from the list + // in the second case, we rename our inferred port to something like "port-%d" + portNumbers, portNames := extractPortNumbersAndNames(otelcol.Spec.Ports) + var resultingInferredPorts []corev1.ServicePort + for _, inferred := range ports { + if filtered := filterPort(logger, inferred, portNumbers, portNames); filtered != nil { + resultingInferredPorts = append(resultingInferredPorts, *filtered) + } + } + + ports = append(otelcol.Spec.Ports, resultingInferredPorts...) + } + + // if we have no ports, we don't need a service + if len(ports) == 0 { + logger.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", otelcol.Name, "instance.namespace", otelcol.Namespace) + return nil + } + + trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster + if otelcol.Spec.Mode == v1alpha1.ModeDaemonSet { + trafficPolicy = corev1.ServiceInternalTrafficPolicyLocal + } + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Service(otelcol.Name), + Namespace: otelcol.Namespace, + Labels: labels, + Annotations: otelcol.Annotations, + }, + Spec: corev1.ServiceSpec{ + InternalTrafficPolicy: &trafficPolicy, + Selector: SelectorLabels(otelcol), + ClusterIP: "", + Ports: ports, + }, + } +} + +func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { + if portNumbers[candidate.Port] { + return nil + } + + // do we have the port name there already? + if portNames[candidate.Name] { + // there's already a port with the same name! do we have a 'port-%d' already? + fallbackName := fmt.Sprintf("port-%d", candidate.Port) + if portNames[fallbackName] { + // that wasn't expected, better skip this port + logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", + "inferred-port-name", candidate.Name, + "fallback-port-name", fallbackName, + ) + return nil + } + + candidate.Name = fallbackName + return &candidate + } + + // this port is unique, return as is + return &candidate +} + +func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { + numbers := map[int32]bool{} + names := map[string]bool{} + + for _, port := range ports { + numbers[port.Port] = true + names[port.Name] = true + } + + return numbers, names +} diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go new file mode 100644 index 000000000..10f22a7d7 --- /dev/null +++ b/internal/manifests/collector/service_test.go @@ -0,0 +1,209 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +func TestExtractPortNumbersAndNames(t *testing.T) { + t.Run("should return extracted port names and numbers", func(t *testing.T) { + ports := []v1.ServicePort{{Name: "web", Port: 8080}, {Name: "tcp", Port: 9200}} + expectedPortNames := map[string]bool{"web": true, "tcp": true} + expectedPortNumbers := map[int32]bool{8080: true, 9200: true} + + actualPortNumbers, actualPortNames := extractPortNumbersAndNames(ports) + assert.Equal(t, expectedPortNames, actualPortNames) + assert.Equal(t, expectedPortNumbers, actualPortNumbers) + + }) +} + +func TestFilterPort(t *testing.T) { + + tests := []struct { + name string + candidate v1.ServicePort + portNumbers map[int32]bool + portNames map[string]bool + expected v1.ServicePort + }{ + { + name: "should filter out duplicate port", + candidate: v1.ServicePort{Name: "web", Port: 8080}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"test": true, "metrics": true}, + }, + + { + name: "should not filter unique port", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"test": true, "metrics": true}, + expected: v1.ServicePort{Name: "web", Port: 8090}, + }, + + { + name: "should change the duplicate portName", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"web": true, "metrics": true}, + expected: v1.ServicePort{Name: "port-8090", Port: 8090}, + }, + + { + name: "should return nil if fallback name clashes with existing portName", + candidate: v1.ServicePort{Name: "web", Port: 8090}, + portNumbers: map[int32]bool{8080: true, 9200: true}, + portNames: map[string]bool{"web": true, "port-8090": true}, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + actual := filterPort(logger, test.candidate, test.portNumbers, test.portNames) + if test.expected != (v1.ServicePort{}) { + assert.Equal(t, test.expected, *actual) + return + } + assert.Nil(t, actual) + + }) + + } +} + +func TestDesiredService(t *testing.T) { + t.Run("should return nil service for unknown receiver and protocol", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + Instance: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `receivers: + test: + protocols: + unknown:`}, + }, + } + + actual := Service(params.Config, params.Log, params.Instance) + assert.Nil(t, actual) + + }) + t.Run("should return service with port mentioned in Instance.Spec.Ports and inferred ports", func(t *testing.T) { + + grpc := "grpc" + jaegerPorts := v1.ServicePort{ + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + AppProtocol: &grpc, + } + params := deploymentParams() + ports := append(params.Instance.Spec.Ports, jaegerPorts) + expected := service("test-collector", ports) + actual := Service(params.Config, params.Log, params.Instance) + + assert.Equal(t, expected, *actual) + + }) + + t.Run("should return service with local internal traffic policy", func(t *testing.T) { + + grpc := "grpc" + jaegerPorts := v1.ServicePort{ + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + AppProtocol: &grpc, + } + p := paramsWithMode(v1alpha1.ModeDaemonSet) + ports := append(p.Instance.Spec.Ports, jaegerPorts) + expected := serviceWithInternalTrafficPolicy("test-collector", ports, v1.ServiceInternalTrafficPolicyLocal) + actual := Service(p.Config, p.Log, p.Instance) + + assert.Equal(t, expected, *actual) + }) + +} + +func TestHeadlessService(t *testing.T) { + t.Run("should return headless service", func(t *testing.T) { + param := deploymentParams() + actual := HeadlessService(param.Config, param.Log, param.Instance) + assert.Equal(t, actual.GetAnnotations()["service.beta.openshift.io/serving-cert-secret-name"], "test-collector-headless-tls") + assert.Equal(t, actual.Spec.ClusterIP, "None") + }) +} + +func TestMonitoringService(t *testing.T) { + t.Run("returned service should expose monitoring port in the default port", func(t *testing.T) { + expected := []v1.ServicePort{{ + Name: "monitoring", + Port: 8888, + }} + param := deploymentParams() + actual := MonitoringService(param.Config, param.Log, param.Instance) + assert.Equal(t, expected, actual.Spec.Ports) + }) + + t.Run("returned the service in a custom port", func(t *testing.T) { + expected := []v1.ServicePort{{ + Name: "monitoring", + Port: 9090, + }} + params := deploymentParams() + params.Instance.Spec.Config = `service: + telemetry: + metrics: + level: detailed + address: 0.0.0.0:9090` + actual := MonitoringService(params.Config, params.Log, params.Instance) + assert.NotNil(t, actual) + assert.Equal(t, expected, actual.Spec.Ports) + }) +} + +func service(name string, ports []v1.ServicePort) v1.Service { + return serviceWithInternalTrafficPolicy(name, ports, v1.ServiceInternalTrafficPolicyCluster) +} + +func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { + params := deploymentParams() + labels := Labels(params.Instance, name, []string{}) + + return v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + Labels: labels, + Annotations: params.Instance.Annotations, + }, + Spec: v1.ServiceSpec{ + InternalTrafficPolicy: &internalTrafficPolicy, + Selector: SelectorLabels(params.Instance), + ClusterIP: "", + Ports: ports, + }, + } +} diff --git a/pkg/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go similarity index 81% rename from pkg/collector/serviceaccount.go rename to internal/manifests/collector/serviceaccount.go index f4e41ed77..d802dfa6d 100644 --- a/pkg/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -15,11 +15,13 @@ package collector import ( + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. @@ -32,11 +34,11 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { } // ServiceAccount returns the service account for the given instance. -func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { +func ServiceAccount(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ServiceAccount { name := naming.ServiceAccount(otelcol.Name) labels := Labels(otelcol, name, []string{}) - return corev1.ServiceAccount{ + return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: otelcol.Namespace, diff --git a/pkg/collector/serviceaccount_test.go b/internal/manifests/collector/serviceaccount_test.go similarity index 94% rename from pkg/collector/serviceaccount_test.go rename to internal/manifests/collector/serviceaccount_test.go index 33b82f172..6d9abafe2 100644 --- a/pkg/collector/serviceaccount_test.go +++ b/internal/manifests/collector/serviceaccount_test.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) func TestServiceAccountNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go new file mode 100644 index 000000000..387836c4c --- /dev/null +++ b/internal/manifests/collector/servicemonitor.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/go-logr/logr" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// ServiceMonitor returns the service account for the given instance. +func ServiceMonitor(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (*monitoringv1.ServiceMonitor, error) { + return &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: otelcol.Namespace, + Name: naming.ServiceMonitor(otelcol.Name), + Labels: map[string]string{ + "app.kubernetes.io/name": naming.ServiceMonitor(otelcol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Endpoints: []monitoringv1.Endpoint{{ + Port: "monitoring", + }}, + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{otelcol.Namespace}, + }, + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + }, + }, nil +} diff --git a/internal/manifests/collector/servicemonitor_test.go b/internal/manifests/collector/servicemonitor_test.go new file mode 100644 index 000000000..85ed4d939 --- /dev/null +++ b/internal/manifests/collector/servicemonitor_test.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDesiredServiceMonitors(t *testing.T) { + params := deploymentParams() + + actual, err := ServiceMonitor(params.Config, params.Log, params.Instance) + assert.NoError(t, err) + assert.NotNil(t, actual) +} diff --git a/pkg/collector/statefulset.go b/internal/manifests/collector/statefulset.go similarity index 94% rename from pkg/collector/statefulset.go rename to internal/manifests/collector/statefulset.go index 8e686dc0a..d00653967 100644 --- a/pkg/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -22,18 +22,18 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // StatefulSet builds the statefulset for the given instance. -func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.StatefulSet { +func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.StatefulSet { name := naming.Collector(otelcol.Name) labels := Labels(otelcol, name, cfg.LabelsFilter()) annotations := Annotations(otelcol) podAnnotations := PodAnnotations(otelcol) - return appsv1.StatefulSet{ + return &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: otelcol.Namespace, diff --git a/pkg/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go similarity index 99% rename from pkg/collector/statefulset_test.go rename to internal/manifests/collector/statefulset_test.go index 8e776f40d..c27903e8f 100644 --- a/pkg/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -26,7 +26,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) func TestStatefulSetNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go new file mode 100644 index 000000000..a756e5e28 --- /dev/null +++ b/internal/manifests/collector/suite_test.go @@ -0,0 +1,273 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "context" + "crypto/tls" + "fmt" + "net" + "os" + "path/filepath" + "sync" + "testing" + "time" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" + + routev1 "github.com/openshift/api/route/v1" + v1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/util/uuid" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/record" + "k8s.io/client-go/util/retry" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +var ( + k8sClient client.Client + testEnv *envtest.Environment + testScheme *runtime.Scheme = scheme.Scheme + ctx context.Context + cancel context.CancelFunc + + logger = logf.Log.WithName("unit-tests") + + instanceUID = uuid.NewUUID() + err error + cfg *rest.Config +) + +const ( + defaultCollectorImage = "default-collector" + defaultTaAllocationImage = "default-ta-allocator" +) + +func TestMain(m *testing.M) { + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, + CRDInstallOptions: envtest.CRDInstallOptions{ + CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, + }, + WebhookInstallOptions: envtest.WebhookInstallOptions{ + Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, + }, + } + cfg, err = testEnv.Start() + if err != nil { + fmt.Printf("failed to start testEnv: %v", err) + os.Exit(1) + } + + if err = routev1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + + if err = v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + // +kubebuilder:scaffold:scheme + + k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) + if err != nil { + fmt.Printf("failed to setup a Kubernetes client: %v", err) + os.Exit(1) + } + + // start webhook server using Manager + webhookInstallOptions := &testEnv.WebhookInstallOptions + mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ + Scheme: testScheme, + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + LeaderElection: false, + MetricsBindAddress: "0", + }) + if mgrErr != nil { + fmt.Printf("failed to start webhook server: %v", mgrErr) + os.Exit(1) + } + + if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + + ctx, cancel = context.WithCancel(context.TODO()) + defer cancel() + go func() { + if err = mgr.Start(ctx); err != nil { + fmt.Printf("failed to start manager: %v", err) + os.Exit(1) + } + }() + + // wait for the webhook server to get ready + wg := &sync.WaitGroup{} + wg.Add(1) + dialer := &net.Dialer{Timeout: time.Second} + addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) + go func(wg *sync.WaitGroup) { + defer wg.Done() + if err = retry.OnError(wait.Backoff{ + Steps: 20, + Duration: 10 * time.Millisecond, + Factor: 1.5, + Jitter: 0.1, + Cap: time.Second * 30, + }, func(error) bool { + return true + }, func() error { + // #nosec G402 + conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + if tlsErr != nil { + return tlsErr + } + _ = conn.Close() + return nil + }); err != nil { + fmt.Printf("failed to wait for webhook server to be ready: %v", err) + os.Exit(1) + } + }(wg) + wg.Wait() + + code := m.Run() + + err = testEnv.Stop() + if err != nil { + fmt.Printf("failed to stop testEnv: %v", err) + os.Exit(1) + } + + os.Exit(code) +} + +func deploymentParams() manifests.Params { + return paramsWithMode(v1alpha1.ModeDeployment) +} + +func paramsWithMode(mode v1alpha1.Mode) manifests.Params { + replicas := int32(2) + configYAML, err := os.ReadFile("testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + return manifests.Params{ + Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + Replicas: &replicas, + Config: string(configYAML), + Mode: mode, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + +func newParams(taContainerImage string, file string) (manifests.Params, error) { + replicas := int32(1) + var configYAML []byte + var err error + + if file == "" { + configYAML, err = os.ReadFile("testdata/test.yaml") + } else { + configYAML, err = os.ReadFile(file) + } + if err != nil { + return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) + } + + cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + + return manifests.Params{ + Config: cfg, + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Image: taContainerImage, + }, + Replicas: &replicas, + Config: string(configYAML), + }, + }, + Scheme: testScheme, + Log: logger, + }, nil +} diff --git a/pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml b/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml similarity index 100% rename from pkg/collector/testdata/http_sd_config_servicemonitor_test.yaml rename to internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml diff --git a/pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml b/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml similarity index 100% rename from pkg/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml rename to internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml diff --git a/pkg/collector/testdata/http_sd_config_test.yaml b/internal/manifests/collector/testdata/http_sd_config_test.yaml similarity index 100% rename from pkg/collector/testdata/http_sd_config_test.yaml rename to internal/manifests/collector/testdata/http_sd_config_test.yaml diff --git a/pkg/collector/testdata/ingress_testdata.yaml b/internal/manifests/collector/testdata/ingress_testdata.yaml similarity index 100% rename from pkg/collector/testdata/ingress_testdata.yaml rename to internal/manifests/collector/testdata/ingress_testdata.yaml diff --git a/pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml b/internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml similarity index 100% rename from pkg/collector/testdata/relabel_config_expected_with_sd_config.yaml rename to internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml diff --git a/pkg/collector/testdata/relabel_config_original.yaml b/internal/manifests/collector/testdata/relabel_config_original.yaml similarity index 100% rename from pkg/collector/testdata/relabel_config_original.yaml rename to internal/manifests/collector/testdata/relabel_config_original.yaml diff --git a/pkg/collector/testdata/route_crd.go b/internal/manifests/collector/testdata/route_crd.go similarity index 100% rename from pkg/collector/testdata/route_crd.go rename to internal/manifests/collector/testdata/route_crd.go diff --git a/pkg/collector/testdata/sm_crd.go b/internal/manifests/collector/testdata/sm_crd.go similarity index 100% rename from pkg/collector/testdata/sm_crd.go rename to internal/manifests/collector/testdata/sm_crd.go diff --git a/pkg/collector/testdata/test.yaml b/internal/manifests/collector/testdata/test.yaml similarity index 100% rename from pkg/collector/testdata/test.yaml rename to internal/manifests/collector/testdata/test.yaml diff --git a/pkg/collector/utils.go b/internal/manifests/collector/utils.go similarity index 100% rename from pkg/collector/utils.go rename to internal/manifests/collector/utils.go diff --git a/pkg/collector/volume.go b/internal/manifests/collector/volume.go similarity index 95% rename from pkg/collector/volume.go rename to internal/manifests/collector/volume.go index cc524a068..2afb4bc6b 100644 --- a/pkg/collector/volume.go +++ b/internal/manifests/collector/volume.go @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Volumes builds the volumes for the given instance, including the config map volume. diff --git a/pkg/collector/volume_test.go b/internal/manifests/collector/volume_test.go similarity index 91% rename from pkg/collector/volume_test.go rename to internal/manifests/collector/volume_test.go index 44ae84395..db575fa7e 100644 --- a/pkg/collector/volume_test.go +++ b/internal/manifests/collector/volume_test.go @@ -22,8 +22,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func TestVolumeNewDefault(t *testing.T) { diff --git a/pkg/collector/volumeclaim.go b/internal/manifests/collector/volumeclaim.go similarity index 100% rename from pkg/collector/volumeclaim.go rename to internal/manifests/collector/volumeclaim.go diff --git a/pkg/collector/volumeclaim_test.go b/internal/manifests/collector/volumeclaim_test.go similarity index 96% rename from pkg/collector/volumeclaim_test.go rename to internal/manifests/collector/volumeclaim_test.go index 3c084f61d..e7989ca24 100644 --- a/pkg/collector/volumeclaim_test.go +++ b/internal/manifests/collector/volumeclaim_test.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) func TestVolumeClaimAllowsUserToAdd(t *testing.T) { diff --git a/pkg/collector/reconcile/params.go b/internal/manifests/params.go similarity index 98% rename from pkg/collector/reconcile/params.go rename to internal/manifests/params.go index e704dc37d..c3c943402 100644 --- a/pkg/collector/reconcile/params.go +++ b/internal/manifests/params.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package reconcile +package manifests import ( "github.com/go-logr/logr" diff --git a/pkg/targetallocator/adapters/config_to_prom_config.go b/internal/manifests/targetallocator/adapters/config_to_prom_config.go similarity index 99% rename from pkg/targetallocator/adapters/config_to_prom_config.go rename to internal/manifests/targetallocator/adapters/config_to_prom_config.go index 9c865d654..139901daa 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config.go @@ -21,7 +21,7 @@ import ( "regexp" "strings" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" ) func errorNoComponent(component string) error { diff --git a/pkg/targetallocator/adapters/config_to_prom_config_test.go b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go similarity index 99% rename from pkg/targetallocator/adapters/config_to_prom_config_test.go rename to internal/manifests/targetallocator/adapters/config_to_prom_config_test.go index 5aa98cd60..cef21dca1 100644 --- a/pkg/targetallocator/adapters/config_to_prom_config_test.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go @@ -21,9 +21,9 @@ import ( "reflect" "testing" - "github.com/stretchr/testify/assert" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" + "github.com/stretchr/testify/assert" ) func TestExtractPromConfigFromConfig(t *testing.T) { diff --git a/pkg/targetallocator/annotations.go b/internal/manifests/targetallocator/annotations.go similarity index 88% rename from pkg/targetallocator/annotations.go rename to internal/manifests/targetallocator/annotations.go index 5a35cd654..72e648e5b 100644 --- a/pkg/targetallocator/annotations.go +++ b/internal/manifests/targetallocator/annotations.go @@ -26,15 +26,14 @@ import ( const configMapHashAnnotationKey = "opentelemetry-targetallocator-config/hash" // Annotations returns the annotations for the TargetAllocator Pod. -func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { +func Annotations(instance v1alpha1.OpenTelemetryCollector, configMap *v1.ConfigMap) map[string]string { // Make a copy of PodAnnotations to be safe annotations := make(map[string]string, len(instance.Spec.PodAnnotations)) for key, value := range instance.Spec.PodAnnotations { annotations[key] = value } - configMap, err := ConfigMap(instance) - if err == nil { + if configMap != nil { cmHash := getConfigMapSHA(configMap) if cmHash != "" { annotations[configMapHashAnnotationKey] = getConfigMapSHA(configMap) @@ -45,7 +44,7 @@ func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { } // getConfigMapSHA returns the hash of the content of the TA ConfigMap. -func getConfigMapSHA(configMap v1.ConfigMap) string { +func getConfigMapSHA(configMap *v1.ConfigMap) string { configString, ok := configMap.Data[targetAllocatorFilename] if !ok { return "" diff --git a/pkg/targetallocator/annotations_test.go b/internal/manifests/targetallocator/annotations_test.go similarity index 82% rename from pkg/targetallocator/annotations_test.go rename to internal/manifests/targetallocator/annotations_test.go index d5dbb74f1..e9cea2b14 100644 --- a/pkg/targetallocator/annotations_test.go +++ b/internal/manifests/targetallocator/annotations_test.go @@ -19,8 +19,11 @@ import ( "fmt" "testing" + "github.com/go-logr/logr" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" ) func TestPodAnnotations(t *testing.T) { @@ -28,18 +31,19 @@ func TestPodAnnotations(t *testing.T) { instance.Spec.PodAnnotations = map[string]string{ "key": "value", } - annotations := Annotations(instance) + annotations := Annotations(instance, nil) assert.Subset(t, annotations, instance.Spec.PodAnnotations) } func TestConfigMapHash(t *testing.T) { + cfg := config.New() instance := collectorInstance() - expectedConfigMap, err := ConfigMap(instance) + expectedConfigMap, err := ConfigMap(cfg, logr.Discard(), instance) require.NoError(t, err) expectedConfig := expectedConfigMap.Data[targetAllocatorFilename] require.NotEmpty(t, expectedConfig) expectedHash := sha256.Sum256([]byte(expectedConfig)) - annotations := Annotations(instance) + annotations := Annotations(instance, expectedConfigMap) require.Contains(t, annotations, configMapHashAnnotationKey) cmHash := annotations[configMapHashAnnotationKey] assert.Equal(t, fmt.Sprintf("%x", expectedHash), cmHash) @@ -48,6 +52,6 @@ func TestConfigMapHash(t *testing.T) { func TestInvalidConfigNoHash(t *testing.T) { instance := collectorInstance() instance.Spec.Config = "" - annotations := Annotations(instance) + annotations := Annotations(instance, nil) require.NotContains(t, annotations, configMapHashAnnotationKey) } diff --git a/pkg/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go similarity index 84% rename from pkg/targetallocator/configmap.go rename to internal/manifests/targetallocator/configmap.go index 30dea4154..0ddf44fa1 100644 --- a/pkg/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -17,21 +17,23 @@ package targetallocator import ( "strings" + "github.com/go-logr/logr" "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) const ( targetAllocatorFilename = "targetallocator.yaml" ) -func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, error) { +func ConfigMap(cfg config.Config, logger logr.Logger, instance v1alpha1.OpenTelemetryCollector) (*corev1.ConfigMap, error) { name := naming.TAConfigMap(instance.Name) version := strings.Split(instance.Spec.Image, ":") labels := Labels(instance, name) @@ -45,7 +47,7 @@ func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, erro // TA ConfigMap should have a single "$", as it does not support env var substitution prometheusReceiverConfig, err := adapters.UnescapeDollarSignsInPromConfig(instance.Spec.Config) if err != nil { - return corev1.ConfigMap{}, err + return &corev1.ConfigMap{}, err } taConfig := make(map[interface{}]interface{}) @@ -84,10 +86,10 @@ func ConfigMap(instance v1alpha1.OpenTelemetryCollector) (corev1.ConfigMap, erro taConfigYAML, err := yaml.Marshal(taConfig) if err != nil { - return corev1.ConfigMap{}, err + return &corev1.ConfigMap{}, err } - return corev1.ConfigMap{ + return &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: instance.Namespace, diff --git a/pkg/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go similarity index 92% rename from pkg/targetallocator/configmap_test.go rename to internal/manifests/targetallocator/configmap_test.go index 5e2d239c7..538d1d0af 100644 --- a/pkg/targetallocator/configmap_test.go +++ b/internal/manifests/targetallocator/configmap_test.go @@ -18,8 +18,11 @@ import ( "testing" "time" + "github.com/go-logr/logr" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" ) func TestDesiredConfigMap(t *testing.T) { @@ -51,8 +54,9 @@ label_selector: app.kubernetes.io/part-of: opentelemetry `, } - - actual, err := ConfigMap(collectorInstance()) + instance := collectorInstance() + cfg := config.New() + actual, err := ConfigMap(cfg, logr.Discard(), instance) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) @@ -92,7 +96,8 @@ service_monitor_selector: instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector = map[string]string{ "release": "my-instance", } - actual, err := ConfigMap(instance) + cfg := config.New() + actual, err := ConfigMap(cfg, logr.Discard(), instance) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) @@ -126,7 +131,8 @@ prometheus_cr: collector := collectorInstance() collector.Spec.TargetAllocator.PrometheusCR.ScrapeInterval = &metav1.Duration{Duration: time.Second * 30} - actual, err := ConfigMap(collector) + cfg := config.New() + actual, err := ConfigMap(cfg, logr.Discard(), collector) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) diff --git a/pkg/targetallocator/container.go b/internal/manifests/targetallocator/container.go similarity index 96% rename from pkg/targetallocator/container.go rename to internal/manifests/targetallocator/container.go index 94ee084ec..4b7e408c8 100644 --- a/pkg/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -20,7 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Container builds a container for the given TargetAllocator. diff --git a/pkg/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go similarity index 98% rename from pkg/targetallocator/container_test.go rename to internal/manifests/targetallocator/container_test.go index c5b91189f..534574961 100644 --- a/pkg/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -24,7 +24,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go similarity index 83% rename from pkg/targetallocator/deployment.go rename to internal/manifests/targetallocator/deployment.go index 70d9507a3..426e4d119 100644 --- a/pkg/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -22,16 +22,22 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Deployment builds the deployment for the given instance. -func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) appsv1.Deployment { +func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.Deployment { name := naming.TargetAllocator(otelcol.Name) labels := Labels(otelcol, name) - annotations := Annotations(otelcol) - return appsv1.Deployment{ + configMap, err := ConfigMap(cfg, logger, otelcol) + if err != nil { + logger.Info("failed to construct target allocator config map for annotations") + configMap = nil + } + annotations := Annotations(otelcol, configMap) + + return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: otelcol.Namespace, diff --git a/pkg/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go similarity index 96% rename from pkg/targetallocator/deployment_test.go rename to internal/manifests/targetallocator/deployment_test.go index fda0446b3..295fd791b 100644 --- a/pkg/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -49,8 +49,8 @@ func TestDeploymentNewDefault(t *testing.T) { d := Deployment(cfg, logger, otelcol) // verify - assert.Equal(t, "my-instance-targetallocator", d.Name) - assert.Equal(t, "my-instance-targetallocator", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "my-instance-targetallocator", d.GetName()) + assert.Equal(t, "my-instance-targetallocator", d.GetLabels()["app.kubernetes.io/name"]) assert.Len(t, d.Spec.Template.Spec.Containers, 1) diff --git a/pkg/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go similarity index 95% rename from pkg/targetallocator/labels.go rename to internal/manifests/targetallocator/labels.go index 22bc7d4de..3c9ae4dae 100644 --- a/pkg/targetallocator/labels.go +++ b/internal/manifests/targetallocator/labels.go @@ -16,7 +16,7 @@ package targetallocator import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/pkg/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go similarity index 100% rename from pkg/targetallocator/labels_test.go rename to internal/manifests/targetallocator/labels_test.go diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go new file mode 100644 index 000000000..3d8916631 --- /dev/null +++ b/internal/manifests/targetallocator/service.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { + name := naming.TAService(otelcol.Name) + labels := Labels(otelcol, name) + + selector := Labels(otelcol, name) + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.TAService(otelcol.Name), + Namespace: otelcol.Namespace, + Labels: labels, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + Ports: []corev1.ServicePort{{ + Name: "targetallocation", + Port: 80, + TargetPort: intstr.FromInt(8080), + }}, + }, + } +} diff --git a/pkg/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go similarity index 82% rename from pkg/targetallocator/serviceaccount.go rename to internal/manifests/targetallocator/serviceaccount.go index bc036c19e..56d5b1cd7 100644 --- a/pkg/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -15,11 +15,14 @@ package targetallocator import ( + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. @@ -32,11 +35,11 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { } // ServiceAccount returns the service account for the given instance. -func ServiceAccount(otelcol v1alpha1.OpenTelemetryCollector) corev1.ServiceAccount { +func ServiceAccount(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ServiceAccount { name := naming.TargetAllocatorServiceAccount(otelcol.Name) labels := Labels(otelcol, name) - return corev1.ServiceAccount{ + return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: otelcol.Namespace, diff --git a/pkg/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go similarity index 100% rename from pkg/targetallocator/serviceaccount_test.go rename to internal/manifests/targetallocator/serviceaccount_test.go diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go new file mode 100644 index 000000000..3a5146af3 --- /dev/null +++ b/internal/manifests/targetallocator/targetallocator.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +// Build is currently unused, but will be implemented to solve +// https://github.com/open-telemetry/opentelemetry-operator/issues/1876 +func Build(params manifests.Params) ([]client.Object, error) { + var resourceManifests []client.Object + if !params.Instance.Spec.TargetAllocator.Enabled { + return resourceManifests, nil + } + resourceFactories := []manifests.K8sManifestFactory{ + manifests.Factory(ConfigMap), + manifests.FactoryWithoutError(Deployment), + manifests.FactoryWithoutError(ServiceAccount), + manifests.FactoryWithoutError(Service), + } + for _, factory := range resourceFactories { + res, err := factory(params.Config, params.Log, params.Instance) + if err != nil { + return nil, err + } else if res != nil { + // because of pointer semantics, res is still nil-able here as this is an interface pointer + // read here for details: + // https://github.com/open-telemetry/opentelemetry-operator/pull/1965#discussion_r1281705719 + resourceManifests = append(resourceManifests, res) + } + } + return resourceManifests, nil +} diff --git a/pkg/targetallocator/testdata/test.yaml b/internal/manifests/targetallocator/testdata/test.yaml similarity index 100% rename from pkg/targetallocator/testdata/test.yaml rename to internal/manifests/targetallocator/testdata/test.yaml diff --git a/pkg/targetallocator/volume.go b/internal/manifests/targetallocator/volume.go similarity index 95% rename from pkg/targetallocator/volume.go rename to internal/manifests/targetallocator/volume.go index 47d2e3810..8200b00d3 100644 --- a/pkg/targetallocator/volume.go +++ b/internal/manifests/targetallocator/volume.go @@ -19,7 +19,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Volumes builds the volumes for the given instance, including the config map volume. diff --git a/pkg/targetallocator/volume_test.go b/internal/manifests/targetallocator/volume_test.go similarity index 94% rename from pkg/targetallocator/volume_test.go rename to internal/manifests/targetallocator/volume_test.go index d94d910ef..0b50006e4 100644 --- a/pkg/targetallocator/volume_test.go +++ b/internal/manifests/targetallocator/volume_test.go @@ -21,7 +21,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func TestVolumeNewDefault(t *testing.T) { diff --git a/pkg/naming/dns.go b/internal/naming/dns.go similarity index 100% rename from pkg/naming/dns.go rename to internal/naming/dns.go diff --git a/pkg/naming/dns_test.go b/internal/naming/dns_test.go similarity index 100% rename from pkg/naming/dns_test.go rename to internal/naming/dns_test.go diff --git a/pkg/naming/main.go b/internal/naming/main.go similarity index 100% rename from pkg/naming/main.go rename to internal/naming/main.go diff --git a/pkg/naming/port.go b/internal/naming/port.go similarity index 100% rename from pkg/naming/port.go rename to internal/naming/port.go diff --git a/pkg/naming/port_test.go b/internal/naming/port_test.go similarity index 100% rename from pkg/naming/port_test.go rename to internal/naming/port_test.go diff --git a/pkg/naming/triming.go b/internal/naming/triming.go similarity index 100% rename from pkg/naming/triming.go rename to internal/naming/triming.go diff --git a/pkg/naming/triming_test.go b/internal/naming/triming_test.go similarity index 100% rename from pkg/naming/triming_test.go rename to internal/naming/triming_test.go diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go index 1d7189439..91aa2c3cc 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhookhandler/webhookhandler_test.go @@ -32,8 +32,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" . "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go index eb39776ca..93be3475d 100644 --- a/pkg/collector/reconcile/configmap.go +++ b/pkg/collector/reconcile/configmap.go @@ -21,26 +21,25 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) // +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete // ConfigMaps reconciles the config map(s) required for the instance in the current context. -func ConfigMaps(ctx context.Context, params Params) error { - desired := []corev1.ConfigMap{ - desiredConfigMap(ctx, params), +func ConfigMaps(ctx context.Context, params manifests.Params) error { + desired := []*corev1.ConfigMap{ + collector.ConfigMap(params.Config, params.Log, params.Instance), } if params.Instance.Spec.TargetAllocator.Enabled { - cm, err := targetallocator.ConfigMap(params.Instance) + cm, err := targetallocator.ConfigMap(params.Config, params.Log, params.Instance) if err != nil { return fmt.Errorf("failed to parse config: %w", err) } @@ -60,33 +59,11 @@ func ConfigMaps(ctx context.Context, params Params) error { return nil } -func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { - name := naming.ConfigMap(params.Instance.Name) - labels := collector.Labels(params.Instance, name, []string{}) - - config, err := ReplaceConfig(params.Instance) - if err != nil { - params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) - } - - return corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Data: map[string]string{ - "collector.yaml": config, - }, - } -} - -func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap, retry bool) error { +func expectedConfigMaps(ctx context.Context, params manifests.Params, expected []*corev1.ConfigMap, retry bool) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -94,7 +71,7 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} clientGetErr := params.Client.Get(ctx, nns, existing) if clientGetErr != nil && errors.IsNotFound(clientGetErr) { - if clientCreateErr := params.Client.Create(ctx, &desired); clientCreateErr != nil { + if clientCreateErr := params.Client.Create(ctx, desired); clientCreateErr != nil { if errors.IsAlreadyExists(clientCreateErr) && retry { // let's try again? we probably had multiple updates at one, and now it exists already if err := expectedConfigMaps(ctx, params, expected, false); err != nil { @@ -138,7 +115,7 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co if err := params.Client.Patch(ctx, updated, patch); err != nil { return fmt.Errorf("failed to apply changes: %w", err) } - if configMapChanged(&desired, existing) { + if configMapChanged(desired, existing) { params.Recorder.Event(updated, "Normal", "ConfigUpdate ", fmt.Sprintf("OpenTelemetry Config changed - %s/%s", desired.Namespace, desired.Name)) } @@ -148,7 +125,7 @@ func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.Co return nil } -func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap) error { +func deleteConfigMaps(ctx context.Context, params manifests.Params, expected []*corev1.ConfigMap) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go index 5030ab93a..03d8c80df 100644 --- a/pkg/collector/reconcile/configmap_test.go +++ b/pkg/collector/reconcile/configmap_test.go @@ -18,209 +18,28 @@ import ( "context" "testing" - colfeaturegate "go.opentelemetry.io/collector/featuregate" - "github.com/stretchr/testify/assert" "gopkg.in/yaml.v2" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" - ta "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" ) -func TestDesiredConfigMap(t *testing.T) { - expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "0.47.0", - } - - t.Run("should return expected collector config map", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" - expectedLables["app.kubernetes.io/name"] = "test-collector" - expectedLables["app.kubernetes.io/version"] = "0.47.0" - - expectedData := map[string]string{ - "collector.yaml": `processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] - -exporters: - logging: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [logging]`, - } - - actual := desiredConfigMap(context.Background(), params()) - - assert.Equal(t, "test-collector", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - - t.Run("should return expected collector config map with http_sd_config", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" - expectedLables["app.kubernetes.io/name"] = "test-collector" - - expectedData := map[string]string{ - "collector.yaml": `exporters: - logging: null -processors: null -receivers: - jaeger: - protocols: - grpc: null - prometheus: - config: - scrape_configs: - - http_sd_configs: - - url: http://test-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME - job_name: otel-collector - scrape_interval: 10s -service: - pipelines: - metrics: - exporters: - - logging - processors: [] - receivers: - - prometheus - - jaeger -`, - } - - param := params() - param.Instance.Spec.TargetAllocator.Enabled = true - actual := desiredConfigMap(context.Background(), param) - - assert.Equal(t, "test-collector", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - - t.Run("should return expected escaped collector config map with http_sd_config", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" - expectedLables["app.kubernetes.io/name"] = "test-collector" - expectedLables["app.kubernetes.io/version"] = "latest" - - expectedData := map[string]string{ - "collector.yaml": `exporters: - logging: null -processors: null -receivers: - prometheus: - config: - scrape_configs: - - http_sd_configs: - - url: http://test-targetallocator:80/jobs/serviceMonitor%2Ftest%2Ftest%2F0/targets?collector_id=$POD_NAME - job_name: serviceMonitor/test/test/0 - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://test-targetallocator:80 - http_sd_config: - refresh_interval: 60s - interval: 30s -service: - pipelines: - metrics: - exporters: - - logging - processors: [] - receivers: - - prometheus -`, - } - - param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test_ta_set.yaml") - assert.NoError(t, err) - param.Instance.Spec.TargetAllocator.Enabled = true - actual := desiredConfigMap(context.Background(), param) - - assert.Equal(t, "test-collector", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - // Reset the value - expectedLables["app.kubernetes.io/version"] = "0.47.0" - - }) - - t.Run("should return expected escaped collector config map with target_allocator config block", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" - expectedLables["app.kubernetes.io/name"] = "test-collector" - expectedLables["app.kubernetes.io/version"] = "latest" - err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - assert.NoError(t, err) - - expectedData := map[string]string{ - "collector.yaml": `exporters: - logging: null -processors: null -receivers: - prometheus: - config: {} - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://test-targetallocator:80 - interval: 30s -service: - pipelines: - metrics: - exporters: - - logging - processors: [] - receivers: - - prometheus -`, - } - - param, err := newParams("test/test-img", "../testdata/http_sd_config_servicemonitor_test.yaml") - assert.NoError(t, err) - param.Instance.Spec.TargetAllocator.Enabled = true - actual := desiredConfigMap(context.Background(), param) - - assert.Equal(t, "test-collector", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - // Reset the value - expectedLables["app.kubernetes.io/version"] = "0.47.0" - err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) - assert.NoError(t, err) - - }) - -} - func TestExpectedConfigMap(t *testing.T) { t.Run("should create collector and target allocator config maps", func(t *testing.T) { - configMap, err := targetallocator.ConfigMap(params().Instance) + param := params() + configMap, err := targetallocator.ConfigMap(param.Config, param.Log, param.Instance) assert.NoError(t, err) - err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params()), configMap}, true) + + err = expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance), configMap}, true) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) @@ -236,9 +55,8 @@ func TestExpectedConfigMap(t *testing.T) { t.Run("should update collector config map", func(t *testing.T) { - param := Params{ + param := manifests.Params{ Config: config.New(), - Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -250,14 +68,14 @@ func TestExpectedConfigMap(t *testing.T) { UID: instanceUID, }, }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), + Log: logger, } - cm := desiredConfigMap(context.Background(), param) - createObjectIfNotExists(t, "test-collector", &cm) + cm := collector.ConfigMap(param.Config, param.Log, param.Instance) + createObjectIfNotExists(t, "test-collector", cm) + + param = params() - err := expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}, true) + err := expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance)}, true) assert.NoError(t, err) actual := v1.ConfigMap{} @@ -271,7 +89,7 @@ func TestExpectedConfigMap(t *testing.T) { t.Run("should update target allocator config map", func(t *testing.T) { - param := Params{ + param := manifests.Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -300,13 +118,14 @@ func TestExpectedConfigMap(t *testing.T) { }, }, } - cm, err := targetallocator.ConfigMap(param.Instance) + cm, err := targetallocator.ConfigMap(param.Config, param.Log, param.Instance) assert.EqualError(t, err, "no receivers available as part of the configuration") - createObjectIfNotExists(t, "test-targetallocator", &cm) + createObjectIfNotExists(t, "test-targetallocator", cm) - configMap, err := targetallocator.ConfigMap(params().Instance) + newParam := params() + configMap, err := targetallocator.ConfigMap(newParam.Config, newParam.Log, newParam.Instance) assert.NoError(t, err) - err = expectedConfigMaps(context.Background(), params(), []v1.ConfigMap{configMap}, true) + err = expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{configMap}, true) assert.NoError(t, err) actual := v1.ConfigMap{} @@ -349,8 +168,8 @@ func TestExpectedConfigMap(t *testing.T) { exists, _ := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) assert.True(t, exists) - - err := deleteConfigMaps(context.Background(), params(), []v1.ConfigMap{desiredConfigMap(context.Background(), params())}) + param := params() + err := deleteConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance)}) assert.NoError(t, err) exists, _ = populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go index 8a665a194..94e1058c0 100644 --- a/pkg/collector/reconcile/daemonset.go +++ b/pkg/collector/reconcile/daemonset.go @@ -25,14 +25,15 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) // +kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;list;watch;create;update;patch;delete // DaemonSets reconciles the daemon set(s) required for the instance in the current context. -func DaemonSets(ctx context.Context, params Params) error { - desired := []appsv1.DaemonSet{} +func DaemonSets(ctx context.Context, params manifests.Params) error { + var desired []*appsv1.DaemonSet if params.Instance.Spec.Mode == "daemonset" { desired = append(desired, collector.DaemonSet(params.Config, params.Log, params.Instance)) } @@ -50,11 +51,11 @@ func DaemonSets(ctx context.Context, params Params) error { return nil } -func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { +func expectedDaemonSets(ctx context.Context, params manifests.Params, expected []*appsv1.DaemonSet) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -62,7 +63,7 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + if clientErr := params.Client.Create(ctx, desired); clientErr != nil { return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) @@ -111,7 +112,7 @@ func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.Da return nil } -func deleteDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { +func deleteDaemonSets(ctx context.Context, params manifests.Params, expected []*appsv1.DaemonSet) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/daemonset_test.go b/pkg/collector/reconcile/daemonset_test.go index 02d8d0c8a..9d8021f61 100644 --- a/pkg/collector/reconcile/daemonset_test.go +++ b/pkg/collector/reconcile/daemonset_test.go @@ -18,13 +18,13 @@ import ( "context" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/stretchr/testify/assert" v1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) func TestExpectedDaemonsets(t *testing.T) { @@ -32,7 +32,7 @@ func TestExpectedDaemonsets(t *testing.T) { expectedDs := collector.DaemonSet(param.Config, logger, param.Instance) t.Run("should create Daemonset", func(t *testing.T) { - err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) @@ -42,8 +42,8 @@ func TestExpectedDaemonsets(t *testing.T) { }) t.Run("should update Daemonset", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", &expectedDs) - err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + createObjectIfNotExists(t, "test-collector", expectedDs) + err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) assert.NoError(t, err) actual := v1.DaemonSet{} @@ -83,7 +83,7 @@ func TestExpectedDaemonsets(t *testing.T) { createObjectIfNotExists(t, "dummy", &ds) - err := deleteDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + err := deleteDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) assert.NoError(t, err) actual := v1.DaemonSet{} @@ -121,7 +121,7 @@ func TestExpectedDaemonsets(t *testing.T) { createObjectIfNotExists(t, "dummy", &ds) - err := deleteDaemonSets(context.Background(), param, []v1.DaemonSet{expectedDs}) + err := deleteDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) assert.NoError(t, err) actual := v1.DaemonSet{} @@ -138,7 +138,7 @@ func TestExpectedDaemonsets(t *testing.T) { oldDs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" oldDs.Name = "update-ds" - err := expectedDaemonSets(context.Background(), param, []v1.DaemonSet{oldDs}) + err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{oldDs}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) assert.NoError(t, err) @@ -146,13 +146,13 @@ func TestExpectedDaemonsets(t *testing.T) { newDs := collector.DaemonSet(param.Config, logger, param.Instance) newDs.Name = oldDs.Name - err = expectedDaemonSets(context.Background(), param, []v1.DaemonSet{newDs}) + err = expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{newDs}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) assert.NoError(t, err) assert.False(t, exists) - err = expectedDaemonSets(context.Background(), param, []v1.DaemonSet{newDs}) + err = expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{newDs}) assert.NoError(t, err) actual := v1.DaemonSet{} exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go index 6e2a8c3ec..dab58eac7 100644 --- a/pkg/collector/reconcile/deployment.go +++ b/pkg/collector/reconcile/deployment.go @@ -26,15 +26,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) // +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete // Deployments reconciles the deployment(s) required for the instance in the current context. -func Deployments(ctx context.Context, params Params) error { - desired := []appsv1.Deployment{} +func Deployments(ctx context.Context, params manifests.Params) error { + desired := []*appsv1.Deployment{} if params.Instance.Spec.Mode == "deployment" { desired = append(desired, collector.Deployment(params.Config, params.Log, params.Instance)) } @@ -56,11 +57,11 @@ func Deployments(ctx context.Context, params Params) error { return nil } -func expectedDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { +func expectedDeployments(ctx context.Context, params manifests.Params, expected []*appsv1.Deployment) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -68,7 +69,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + if clientErr := params.Client.Create(ctx, desired); clientErr != nil { return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) @@ -118,7 +119,7 @@ func expectedDeployments(ctx context.Context, params Params, expected []appsv1.D return nil } -func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { +func deleteDeployments(ctx context.Context, params manifests.Params, expected []*appsv1.Deployment) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go index 00c4e0bb9..f343bab87 100644 --- a/pkg/collector/reconcile/deployment_test.go +++ b/pkg/collector/reconcile/deployment_test.go @@ -25,8 +25,9 @@ import ( "k8s.io/apimachinery/pkg/types" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) func TestExpectedDeployments(t *testing.T) { @@ -35,7 +36,7 @@ func TestExpectedDeployments(t *testing.T) { expectedTADeploy := targetallocator.Deployment(param.Config, logger, param.Instance) t.Run("should create collector deployment", func(t *testing.T) { - err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) @@ -46,7 +47,7 @@ func TestExpectedDeployments(t *testing.T) { }) t.Run("should create target allocator deployment", func(t *testing.T) { - err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedTADeploy}) + err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedTADeploy}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) @@ -57,7 +58,7 @@ func TestExpectedDeployments(t *testing.T) { }) t.Run("should not create target allocator deployment when targetallocator is not enabled", func(t *testing.T) { - paramTargetAllocator := Params{ + paramTargetAllocator := manifests.Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -92,7 +93,7 @@ func TestExpectedDeployments(t *testing.T) { }, Log: logger, } - expected := []v1.Deployment{} + expected := []*v1.Deployment{} if paramTargetAllocator.Instance.Spec.TargetAllocator.Enabled { expected = append(expected, targetallocator.Deployment(paramTargetAllocator.Config, paramTargetAllocator.Log, paramTargetAllocator.Instance)) } @@ -102,7 +103,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should update target allocator deployment when the prometheusCR is updated", func(t *testing.T) { ctx := context.Background() - createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) + createObjectIfNotExists(t, "test-targetallocator", expectedTADeploy) orgUID := expectedTADeploy.OwnerReferences[0].UID updatedParam, err := newParams(expectedTADeploy.Spec.Template.Spec.Containers[0].Image, "") @@ -110,7 +111,7 @@ func TestExpectedDeployments(t *testing.T) { updatedParam.Instance.Spec.TargetAllocator.PrometheusCR.Enabled = true updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) - err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) + err = expectedDeployments(ctx, param, []*v1.Deployment{updatedDeploy}) assert.NoError(t, err) actual := v1.Deployment{} @@ -126,7 +127,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { replicas, maxReplicas := int32(2), int32(10) oneReplica := int32(1) - paramMaxReplicas := Params{ + paramMaxReplicas := manifests.Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -167,7 +168,7 @@ func TestExpectedDeployments(t *testing.T) { }, Log: logger, } - expected := []v1.Deployment{} + expected := []*v1.Deployment{} allocator := targetallocator.Deployment(paramMaxReplicas.Config, paramMaxReplicas.Log, paramMaxReplicas.Instance) expected = append(expected, allocator) @@ -177,7 +178,7 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should update target allocator deployment replicas when changed", func(t *testing.T) { initialReplicas, nextReplicas := int32(1), int32(2) - paramReplicas := Params{ + paramReplicas := manifests.Params{ Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -217,7 +218,7 @@ func TestExpectedDeployments(t *testing.T) { }, Log: logger, } - expected := []v1.Deployment{} + expected := []*v1.Deployment{} allocator := targetallocator.Deployment(paramReplicas.Config, paramReplicas.Log, paramReplicas.Instance) expected = append(expected, allocator) @@ -229,8 +230,8 @@ func TestExpectedDeployments(t *testing.T) { }) t.Run("should update deployment", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", &expectedDeploy) - err := expectedDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + createObjectIfNotExists(t, "test-collector", expectedDeploy) + err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) assert.NoError(t, err) actual := v1.Deployment{} @@ -244,14 +245,14 @@ func TestExpectedDeployments(t *testing.T) { t.Run("should update target allocator deployment when the container image is updated", func(t *testing.T) { ctx := context.Background() - createObjectIfNotExists(t, "test-targetallocator", &expectedTADeploy) + createObjectIfNotExists(t, "test-targetallocator", expectedTADeploy) orgUID := expectedTADeploy.OwnerReferences[0].UID updatedParam, err := newParams("test/test-img", "") assert.NoError(t, err) updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) - err = expectedDeployments(ctx, param, []v1.Deployment{updatedDeploy}) + err = expectedDeployments(ctx, param, []*v1.Deployment{updatedDeploy}) assert.NoError(t, err) actual := v1.Deployment{} @@ -291,7 +292,7 @@ func TestExpectedDeployments(t *testing.T) { } createObjectIfNotExists(t, "dummy", &deploy) - err := deleteDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + err := deleteDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) assert.NoError(t, err) actual := v1.Deployment{} @@ -327,7 +328,7 @@ func TestExpectedDeployments(t *testing.T) { } createObjectIfNotExists(t, "dummy", &deploy) - err := deleteDeployments(context.Background(), param, []v1.Deployment{expectedDeploy}) + err := deleteDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) assert.NoError(t, err) actual := v1.Deployment{} @@ -344,7 +345,7 @@ func TestExpectedDeployments(t *testing.T) { oldDeploy.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" oldDeploy.Name = "update-deploy" - err := expectedDeployments(context.Background(), param, []v1.Deployment{oldDeploy}) + err := expectedDeployments(context.Background(), param, []*v1.Deployment{oldDeploy}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) assert.NoError(t, err) @@ -352,13 +353,13 @@ func TestExpectedDeployments(t *testing.T) { newDeploy := collector.Deployment(param.Config, logger, param.Instance) newDeploy.Name = oldDeploy.Name - err = expectedDeployments(context.Background(), param, []v1.Deployment{newDeploy}) + err = expectedDeployments(context.Background(), param, []*v1.Deployment{newDeploy}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) assert.NoError(t, err) assert.False(t, exists) - err = expectedDeployments(context.Background(), param, []v1.Deployment{newDeploy}) + err = expectedDeployments(context.Background(), param, []*v1.Deployment{newDeploy}) assert.NoError(t, err) actual := v1.Deployment{} exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go index 63cdb76f7..90c3ae316 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler.go @@ -26,15 +26,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) // +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete -// HorizontalPodAutoscaler reconciles HorizontalPodAutoscalers if autoscale is true and replicas is nil. -func HorizontalPodAutoscalers(ctx context.Context, params Params) error { - desired := []client.Object{} +// HorizontalPodAutoscalers reconciles HorizontalPodAutoscalers if autoscale is true and replicas is nil. +func HorizontalPodAutoscalers(ctx context.Context, params manifests.Params) error { + var desired []client.Object // check if autoscale mode is on, e.g MaxReplicas is not nil if params.Instance.Spec.MaxReplicas != nil || (params.Instance.Spec.Autoscaler != nil && params.Instance.Spec.Autoscaler.MaxReplicas != nil) { @@ -56,7 +57,7 @@ func HorizontalPodAutoscalers(ctx context.Context, params Params) error { return nil } -func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expected []client.Object) error { +func expectedHorizontalPodAutoscalers(ctx context.Context, params manifests.Params, expected []client.Object) error { autoscalingVersion := params.Config.AutoscalingVersion() var existing client.Object if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { @@ -111,7 +112,7 @@ func expectedHorizontalPodAutoscalers(ctx context.Context, params Params, expect return nil } -func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object, desired client.Object) { +func setAutoscalerSpec(params manifests.Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object, desired client.Object) { one := int32(1) if params.Instance.Spec.Autoscaler.MaxReplicas != nil { if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { @@ -140,7 +141,7 @@ func setAutoscalerSpec(params Params, autoscalingVersion autodetect.AutoscalingV } } -func deleteHorizontalPodAutoscalers(ctx context.Context, params Params, expected []client.Object) error { +func deleteHorizontalPodAutoscalers(ctx context.Context, params manifests.Params, expected []client.Object) error { autoscalingVersion := params.Config.AutoscalingVersion() opts := []client.ListOption{ diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go index fcd9e8ebb..38681f74b 100644 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ b/pkg/collector/reconcile/horizontalpodautoscaler_test.go @@ -20,6 +20,9 @@ import ( "os" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" v1 "k8s.io/api/apps/v1" @@ -35,7 +38,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) var hpaUpdateErr error @@ -47,6 +49,7 @@ func TestExpectedHPAVersionV2Beta2(t *testing.T) { assert.NoError(t, err) expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) + t.Run("should create HPA", func(t *testing.T) { err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) @@ -108,6 +111,7 @@ func TestExpectedHPAVersionV2(t *testing.T) { assert.NoError(t, err) expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) + t.Run("should create HPA", func(t *testing.T) { err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) assert.NoError(t, err) @@ -162,8 +166,8 @@ func TestExpectedHPAVersionV2(t *testing.T) { }) } -func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { - configYAML, err := os.ReadFile("../testdata/test.yaml") +func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) manifests.Params { + configYAML, err := os.ReadFile("testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } @@ -183,7 +187,7 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) Params { logger.Error(err, "configuration.autodetect failed") } - return Params{ + return manifests.Params{ Config: configuration, Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go index bc1f6b794..9aed9b462 100644 --- a/pkg/collector/reconcile/ingress.go +++ b/pkg/collector/reconcile/ingress.go @@ -21,80 +21,17 @@ import ( corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) -func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { - if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { - return nil - } - - ports := servicePortsFromCfg(params) - - // if we have no ports, we don't need a ingress entry - if len(ports) == 0 { - params.Log.V(1).Info( - "the instance's configuration didn't yield any ports to open, skipping ingress", - "instance.name", params.Instance.Name, - "instance.namespace", params.Instance.Namespace, - ) - return nil - } - - pathType := networkingv1.PathTypePrefix - paths := make([]networkingv1.HTTPIngressPath, len(ports)) - for i, p := range ports { - paths[i] = networkingv1.HTTPIngressPath{ - Path: "/" + p.Name, - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: naming.Service(params.Instance.Name), - Port: networkingv1.ServiceBackendPort{ - Name: naming.PortName(p.Name, p.Port), - }, - }, - }, - } - } - - return &networkingv1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance.Name), - Namespace: params.Instance.Namespace, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: networkingv1.IngressSpec{ - TLS: params.Instance.Spec.Ingress.TLS, - Rules: []networkingv1.IngressRule{ - { - Host: params.Instance.Spec.Ingress.Hostname, - IngressRuleValue: networkingv1.IngressRuleValue{ - HTTP: &networkingv1.HTTPIngressRuleValue{ - Paths: paths, - }, - }, - }, - }, - IngressClassName: params.Instance.Spec.Ingress.IngressClassName, - }, - } -} - // Ingresses reconciles the ingress(s) required for the instance in the current context. -func Ingresses(ctx context.Context, params Params) error { +func Ingresses(ctx context.Context, params manifests.Params) error { isSupportedMode := true if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { params.Log.V(3).Info("ingress settings are not supported in sidecar mode") @@ -105,10 +42,10 @@ func Ingresses(ctx context.Context, params Params) error { err := params.Client.Get(ctx, nns, &corev1.Service{}) // NOTE: check if service exists. serviceExists := err != nil - var desired []networkingv1.Ingress + var desired []*networkingv1.Ingress if isSupportedMode && serviceExists { - if d := desiredIngresses(ctx, params); d != nil { - desired = append(desired, *d) + if d := collector.Ingress(params.Config, params.Log, params.Instance); d != nil { + desired = append(desired, d) } } @@ -125,11 +62,11 @@ func Ingresses(ctx context.Context, params Params) error { return nil } -func expectedIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { +func expectedIngresses(ctx context.Context, params manifests.Params, expected []*networkingv1.Ingress) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -137,7 +74,7 @@ func expectedIngresses(ctx context.Context, params Params, expected []networking nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} clientGetErr := params.Client.Get(ctx, nns, existing) if clientGetErr != nil && k8serrors.IsNotFound(clientGetErr) { - if err := params.Client.Create(ctx, &desired); err != nil { + if err := params.Client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %w", err) } params.Log.V(2).Info("created", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) @@ -178,7 +115,7 @@ func expectedIngresses(ctx context.Context, params Params, expected []networking return nil } -func deleteIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { +func deleteIngresses(ctx context.Context, params manifests.Params, expected []*networkingv1.Ingress) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ @@ -211,36 +148,3 @@ func deleteIngresses(ctx context.Context, params Params, expected []networkingv1 return nil } - -func servicePortsFromCfg(params Params) []corev1.ServicePort { - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration from the context") - return nil - } - - ports, err := adapters.ConfigToReceiverPorts(params.Log, config) - if err != nil { - params.Log.Error(err, "couldn't build the ingress for this instance") - } - - if len(params.Instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) - } - return ports -} diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index 853de0c88..d51ce77f4 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -17,167 +17,17 @@ package reconcile import ( "context" _ "embed" - "fmt" "testing" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) -const testFileIngress = "../testdata/ingress_testdata.yaml" - -func TestDesiredIngresses(t *testing.T) { - t.Run("should return nil invalid ingress type", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressType("unknown"), - }, - }, - }, - } - - actual := desiredIngresses(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to parse config", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: "!!!", - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeNginx, - }, - }, - }, - } - - actual := desiredIngresses(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: "---", - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeNginx, - }, - }, - }, - } - - actual := desiredIngresses(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to do something else", func(t *testing.T) { - var ( - ns = "test" - hostname = "example.com" - ingressClassName = "nginx" - ) - - params, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - - params.Instance.Namespace = ns - params.Instance.Spec.Ingress = v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeNginx, - Hostname: hostname, - Annotations: map[string]string{"some.key": "some.value"}, - IngressClassName: &ingressClassName, - } - - got := desiredIngresses(context.Background(), params) - pathType := networkingv1.PathTypePrefix - - assert.NotEqual(t, &networkingv1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance.Name), - Namespace: ns, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: networkingv1.IngressSpec{ - IngressClassName: &ingressClassName, - Rules: []networkingv1.IngressRule{ - { - Host: hostname, - IngressRuleValue: networkingv1.IngressRuleValue{ - HTTP: &networkingv1.HTTPIngressRuleValue{ - Paths: []networkingv1.HTTPIngressPath{ - { - Path: "/another-port", - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: "test-collector", - Port: networkingv1.ServiceBackendPort{ - Name: "another-port", - }, - }, - }, - }, - { - Path: "/otlp-grpc", - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: "test-collector", - Port: networkingv1.ServiceBackendPort{ - Name: "otlp-grpc", - }, - }, - }, - }, - { - Path: "/otlp-test-grpc", - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: "test-collector", - Port: networkingv1.ServiceBackendPort{ - Name: "otlp-test-grpc", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, got) - }) - -} +const testFileIngress = "testdata/ingress_testdata.yaml" func TestExpectedIngresses(t *testing.T) { t.Run("should create and update ingress entry", func(t *testing.T) { @@ -189,7 +39,7 @@ func TestExpectedIngresses(t *testing.T) { } params.Instance.Spec.Ingress.Type = "ingress" - err = expectedIngresses(ctx, params, []networkingv1.Ingress{*desiredIngresses(ctx, params)}) + err = expectedIngresses(ctx, params, []*networkingv1.Ingress{collector.Ingress(params.Config, params.Log, params.Instance)}) assert.NoError(t, err) nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} @@ -202,7 +52,7 @@ func TestExpectedIngresses(t *testing.T) { params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} params.Instance.Spec.Ingress.Hostname = expectHostname - err = expectedIngresses(ctx, params, []networkingv1.Ingress{*desiredIngresses(ctx, params)}) + err = expectedIngresses(ctx, params, []*networkingv1.Ingress{collector.Ingress(params.Config, params.Log, params.Instance)}) assert.NoError(t, err) got := &networkingv1.Ingress{} @@ -231,7 +81,7 @@ func TestDeleteIngresses(t *testing.T) { } myParams.Instance.Spec.Ingress.Type = "ingress" - err = expectedIngresses(ctx, myParams, []networkingv1.Ingress{*desiredIngresses(ctx, myParams)}) + err = expectedIngresses(ctx, myParams, []*networkingv1.Ingress{collector.Ingress(myParams.Config, myParams.Log, myParams.Instance)}) assert.NoError(t, err) nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} @@ -240,7 +90,7 @@ func TestDeleteIngresses(t *testing.T) { assert.True(t, exists) // delete - if delIngressErr := deleteIngresses(ctx, params(), []networkingv1.Ingress{}); delIngressErr != nil { + if delIngressErr := deleteIngresses(ctx, params(), []*networkingv1.Ingress{}); delIngressErr != nil { t.Error(delIngressErr) } @@ -261,7 +111,7 @@ func TestIngresses(t *testing.T) { t.Run("supported mode and service exists", func(t *testing.T) { ctx := context.Background() myParams := params() - err := expectedServices(context.Background(), myParams, []corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) + err := expectedServices(context.Background(), myParams, []*corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) assert.NoError(t, err) assert.Nil(t, Ingresses(ctx, myParams)) diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index af709ae64..f9f74bca8 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -20,20 +20,22 @@ import ( "fmt" "strconv" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes // making params.Instance obsolete. Default values should be set in the Defaulter webhook, this should only be used // for the Status, which can't be set by the defaulter. -func Self(ctx context.Context, params Params) error { +func Self(ctx context.Context, params manifests.Params) error { changed := params.Instance // this field is only changed for new instances: on existing instances this diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go index 09f6ff838..3311a3c12 100644 --- a/pkg/collector/reconcile/route.go +++ b/pkg/collector/reconcile/route.go @@ -18,78 +18,20 @@ import ( "context" "fmt" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + routev1 "github.com/openshift/api/route/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -func desiredRoutes(_ context.Context, params Params) []routev1.Route { - var tlsCfg *routev1.TLSConfig - switch params.Instance.Spec.Ingress.Route.Termination { - case v1alpha1.TLSRouteTerminationTypeInsecure: - // NOTE: insecure, no tls cfg. - case v1alpha1.TLSRouteTerminationTypeEdge: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationEdge} - case v1alpha1.TLSRouteTerminationTypePassthrough: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationPassthrough} - case v1alpha1.TLSRouteTerminationTypeReencrypt: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationReencrypt} - default: // NOTE: if unsupported, end here. - return nil - } - - ports := servicePortsFromCfg(params) - - // if we have no ports, we don't need a route entry - if len(ports) == 0 { - params.Log.V(1).Info( - "the instance's configuration didn't yield any ports to open, skipping route", - "instance.name", params.Instance.Name, - "instance.namespace", params.Instance.Namespace, - ) - return nil - } - - routes := make([]routev1.Route, len(ports)) - for i, p := range ports { - routes[i] = routev1.Route{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance.Name, p.Name), - Namespace: params.Instance.Namespace, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance.Name, p.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: routev1.RouteSpec{ - Host: p.Name + "." + params.Instance.Spec.Ingress.Hostname, - Path: "/" + p.Name, - To: routev1.RouteTargetReference{ - Kind: "Service", - Name: naming.Service(params.Instance.Name), - }, - Port: &routev1.RoutePort{ - TargetPort: intstr.FromString(naming.PortName(p.Name, p.Port)), - }, - WildcardPolicy: routev1.WildcardPolicyNone, - TLS: tlsCfg, - }, - } - } - return routes -} - // Routes reconciles the route(s) required for the instance in the current context. -func Routes(ctx context.Context, params Params) error { +func Routes(ctx context.Context, params manifests.Params) error { if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { return nil } @@ -100,9 +42,9 @@ func Routes(ctx context.Context, params Params) error { isSupportedMode = false } - var desired []routev1.Route + var desired []*routev1.Route if isSupportedMode { - if r := desiredRoutes(ctx, params); r != nil { + if r := collector.Routes(params.Config, params.Log, params.Instance); r != nil { desired = append(desired, r...) } } @@ -120,11 +62,11 @@ func Routes(ctx context.Context, params Params) error { return nil } -func expectedRoutes(ctx context.Context, params Params, expected []routev1.Route) error { +func expectedRoutes(ctx context.Context, params manifests.Params, expected []*routev1.Route) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -132,7 +74,7 @@ func expectedRoutes(ctx context.Context, params Params, expected []routev1.Route nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err = params.Client.Create(ctx, &desired); err != nil { + if err = params.Client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %w", err) } params.Log.V(2).Info("created", "route.name", desired.Name, "route.namespace", desired.Namespace) @@ -173,7 +115,7 @@ func expectedRoutes(ctx context.Context, params Params, expected []routev1.Route return nil } -func deleteRoutes(ctx context.Context, params Params, expected []routev1.Route) error { +func deleteRoutes(ctx context.Context, params manifests.Params, expected []*routev1.Route) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go index 565645041..216ce2bf8 100644 --- a/pkg/collector/reconcile/route_test.go +++ b/pkg/collector/reconcile/route_test.go @@ -17,133 +17,19 @@ package reconcile import ( "context" _ "embed" - "fmt" "strings" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) -func TestDesiredRoutes(t *testing.T) { - t.Run("should return nil invalid ingress type", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressType("unknown"), - }, - }, - }, - } - - actual := desiredRoutes(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to parse config", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: "!!!", - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeRoute, - }, - }, - }, - } - - actual := desiredRoutes(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Config: "---", - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeRoute, - }, - }, - }, - } - - actual := desiredRoutes(context.Background(), params) - assert.Nil(t, actual) - }) - - t.Run("should return nil unable to do something else", func(t *testing.T) { - var ( - ns = "test" - hostname = "example.com" - ) - - params, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - - params.Instance.Namespace = ns - params.Instance.Spec.Ingress = v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeRoute, - Hostname: hostname, - Annotations: map[string]string{"some.key": "some.value"}, - Route: v1alpha1.OpenShiftRoute{ - Termination: v1alpha1.TLSRouteTerminationTypeInsecure, - }, - } - - got := desiredRoutes(context.Background(), params)[0] - - assert.NotEqual(t, &routev1.Route{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance.Name, ""), - Namespace: ns, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance.Name, ""), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: routev1.RouteSpec{ - Host: hostname, - Path: "/abc", - To: routev1.RouteTargetReference{ - Kind: "service", - Name: "test-collector", - }, - Port: &routev1.RoutePort{ - TargetPort: intstr.FromString("another-port"), - }, - WildcardPolicy: routev1.WildcardPolicyNone, - TLS: &routev1.TLSConfig{ - Termination: routev1.TLSTerminationPassthrough, - InsecureEdgeTerminationPolicy: routev1.InsecureEdgeTerminationPolicyAllow, - }, - }, - }, got) - }) -} - func TestExpectedRoutes(t *testing.T) { t.Run("should create and update route entry", func(t *testing.T) { ctx := context.Background() @@ -155,7 +41,8 @@ func TestExpectedRoutes(t *testing.T) { params.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute params.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - err = expectedRoutes(ctx, params, desiredRoutes(ctx, params)) + routes := collector.Routes(params.Config, params.Log, params.Instance) + err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: "otlp-grpc-test-route"} @@ -168,7 +55,8 @@ func TestExpectedRoutes(t *testing.T) { params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} params.Instance.Spec.Ingress.Hostname = expectHostname - err = expectedRoutes(ctx, params, desiredRoutes(ctx, params)) + routes = collector.Routes(params.Config, params.Log, params.Instance) + err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) got := &routev1.Route{} @@ -197,7 +85,8 @@ func TestDeleteRoutes(t *testing.T) { } myParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - err = expectedRoutes(ctx, myParams, desiredRoutes(ctx, myParams)) + routes := collector.Routes(myParams.Config, myParams.Log, myParams.Instance) + err = expectedRoutes(ctx, myParams, routes) assert.NoError(t, err) nns := types.NamespacedName{Namespace: "default", Name: "otlp-grpc-test-route"} @@ -206,7 +95,7 @@ func TestDeleteRoutes(t *testing.T) { assert.True(t, exists) // delete - if err = deleteRoutes(ctx, params(), []routev1.Route{}); err != nil { + if err = deleteRoutes(ctx, params(), []*routev1.Route{}); err != nil { t.Error(err) } @@ -227,7 +116,7 @@ func TestRoutes(t *testing.T) { t.Run("supported mode and service exists", func(t *testing.T) { ctx := context.Background() myParams := params() - err := expectedServices(context.Background(), myParams, []corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) + err := expectedServices(context.Background(), myParams, []*corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) assert.NoError(t, err) assert.Nil(t, Routes(ctx, myParams)) diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index 59955e0af..b9284f3c8 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -21,43 +21,35 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" -) - -// headless label is to differentiate the headless service from the clusterIP service. -const ( - headlessLabel = "operator.opentelemetry.io/collector-headless-service" - headlessExists = "Exists" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // Services reconciles the service(s) required for the instance in the current context. -func Services(ctx context.Context, params Params) error { - desired := []corev1.Service{} +func Services(ctx context.Context, params manifests.Params) error { + var desired []*corev1.Service if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { - type builder func(context.Context, Params) *corev1.Service - for _, builder := range []builder{desiredService, headless, monitoringService} { - svc := builder(ctx, params) + type builder func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service + for _, builder := range []builder{collector.Service, collector.HeadlessService, collector.MonitoringService} { + svc := builder(params.Config, params.Log, params.Instance) // add only the non-nil to the list if svc != nil { - desired = append(desired, *svc) + desired = append(desired, svc) } } } if params.Instance.Spec.TargetAllocator.Enabled { - desired = append(desired, desiredTAService(params)) + desired = append(desired, targetallocator.Service(params.Config, params.Log, params.Instance)) } // first, handle the create/update parts @@ -73,152 +65,11 @@ func Services(ctx context.Context, params Params) error { return nil } -func desiredService(ctx context.Context, params Params) *corev1.Service { - name := naming.Service(params.Instance.Name) - labels := collector.Labels(params.Instance, name, []string{}) - - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration from the context") - return nil - } - - ports, err := adapters.ConfigToReceiverPorts(params.Log, config) - if err != nil { - params.Log.Error(err, "couldn't build the service for this instance") - return nil - } - - if len(params.Instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) - } - - // if we have no ports, we don't need a service - if len(ports) == 0 { - params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.Instance.Name, "instance.namespace", params.Instance.Namespace) - return nil - } - - trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster - if params.Instance.Spec.Mode == v1alpha1.ModeDaemonSet { - trafficPolicy = corev1.ServiceInternalTrafficPolicyLocal - } - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Service(params.Instance.Name), - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - InternalTrafficPolicy: &trafficPolicy, - Selector: collector.SelectorLabels(params.Instance), - ClusterIP: "", - Ports: ports, - }, - } -} - -func desiredTAService(params Params) corev1.Service { - name := naming.TAService(params.Instance.Name) - labels := targetallocator.Labels(params.Instance, name) - - selector := targetallocator.Labels(params.Instance, name) - - return corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.TAService(params.Instance.Name), - Namespace: params.Instance.Namespace, - Labels: labels, - }, - Spec: corev1.ServiceSpec{ - Selector: selector, - Ports: []corev1.ServicePort{{ - Name: "targetallocation", - Port: 80, - TargetPort: intstr.FromInt(8080), - }}, - }, - } -} - -func headless(ctx context.Context, params Params) *corev1.Service { - h := desiredService(ctx, params) - if h == nil { - return nil - } - - h.Name = naming.HeadlessService(params.Instance.Name) - h.Labels[headlessLabel] = headlessExists - - // copy to avoid modifying params.Instance.Annotations - annotations := map[string]string{ - "service.beta.openshift.io/serving-cert-secret-name": fmt.Sprintf("%s-tls", h.Name), - } - for k, v := range h.Annotations { - annotations[k] = v - } - h.Annotations = annotations - - h.Spec.ClusterIP = "None" - return h -} - -func monitoringService(ctx context.Context, params Params) *corev1.Service { - name := naming.MonitoringService(params.Instance.Name) - labels := collector.Labels(params.Instance, name, []string{}) - - c, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration") - return nil - } - - metricsPort, err := adapters.ConfigToMetricsPort(params.Log, c) - if err != nil { - params.Log.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) - metricsPort = 8888 - } - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - Selector: collector.SelectorLabels(params.Instance), - ClusterIP: "", - Ports: []corev1.ServicePort{{ - Name: "monitoring", - Port: metricsPort, - }}, - }, - } -} - -func expectedServices(ctx context.Context, params Params, expected []corev1.Service) error { +func expectedServices(ctx context.Context, params manifests.Params, expected []*corev1.Service) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -226,7 +77,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + if clientErr := params.Client.Create(ctx, desired); clientErr != nil { return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "service.name", desired.Name, "service.namespace", desired.Namespace) @@ -266,7 +117,7 @@ func expectedServices(ctx context.Context, params Params, expected []corev1.Serv return nil } -func deleteServices(ctx context.Context, params Params, expected []corev1.Service) error { +func deleteServices(ctx context.Context, params manifests.Params, expected []*corev1.Service) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ @@ -299,41 +150,3 @@ func deleteServices(ctx context.Context, params Params, expected []corev1.Servic return nil } - -func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { - if portNumbers[candidate.Port] { - return nil - } - - // do we have the port name there already? - if portNames[candidate.Name] { - // there's already a port with the same name! do we have a 'port-%d' already? - fallbackName := fmt.Sprintf("port-%d", candidate.Port) - if portNames[fallbackName] { - // that wasn't expected, better skip this port - logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", - "inferred-port-name", candidate.Name, - "fallback-port-name", fallbackName, - ) - return nil - } - - candidate.Name = fallbackName - return &candidate - } - - // this port is unique, return as is - return &candidate -} - -func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { - numbers := map[int32]bool{} - names := map[string]bool{} - - for _, port := range ports { - numbers[port.Port] = true - names[port.Name] = true - } - - return numbers, names -} diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 18753982b..198648ab5 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -18,140 +18,18 @@ import ( "context" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) -func TestExtractPortNumbersAndNames(t *testing.T) { - t.Run("should return extracted port names and numbers", func(t *testing.T) { - ports := []v1.ServicePort{{Name: "web", Port: 8080}, {Name: "tcp", Port: 9200}} - expectedPortNames := map[string]bool{"web": true, "tcp": true} - expectedPortNumbers := map[int32]bool{8080: true, 9200: true} - - actualPortNumbers, actualPortNames := extractPortNumbersAndNames(ports) - assert.Equal(t, expectedPortNames, actualPortNames) - assert.Equal(t, expectedPortNumbers, actualPortNumbers) - - }) -} - -func TestFilterPort(t *testing.T) { - - tests := []struct { - name string - candidate v1.ServicePort - portNumbers map[int32]bool - portNames map[string]bool - expected v1.ServicePort - }{ - { - name: "should filter out duplicate port", - candidate: v1.ServicePort{Name: "web", Port: 8080}, - portNumbers: map[int32]bool{8080: true, 9200: true}, - portNames: map[string]bool{"test": true, "metrics": true}, - }, - - { - name: "should not filter unique port", - candidate: v1.ServicePort{Name: "web", Port: 8090}, - portNumbers: map[int32]bool{8080: true, 9200: true}, - portNames: map[string]bool{"test": true, "metrics": true}, - expected: v1.ServicePort{Name: "web", Port: 8090}, - }, - - { - name: "should change the duplicate portName", - candidate: v1.ServicePort{Name: "web", Port: 8090}, - portNumbers: map[int32]bool{8080: true, 9200: true}, - portNames: map[string]bool{"web": true, "metrics": true}, - expected: v1.ServicePort{Name: "port-8090", Port: 8090}, - }, - - { - name: "should return nil if fallback name clashes with existing portName", - candidate: v1.ServicePort{Name: "web", Port: 8090}, - portNumbers: map[int32]bool{8080: true, 9200: true}, - portNames: map[string]bool{"web": true, "port-8090": true}, - }, - } - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - actual := filterPort(logger, test.candidate, test.portNumbers, test.portNames) - if test.expected != (v1.ServicePort{}) { - assert.Equal(t, test.expected, *actual) - return - } - assert.Nil(t, actual) - - }) - - } -} - -func TestDesiredService(t *testing.T) { - t.Run("should return nil service for unknown receiver and protocol", func(t *testing.T) { - params := Params{ - Config: config.Config{}, - Client: k8sClient, - Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `receivers: - test: - protocols: - unknown:`}, - }, - } - - actual := desiredService(context.Background(), params) - assert.Nil(t, actual) - - }) - t.Run("should return service with port mentioned in Instance.Spec.Ports and inferred ports", func(t *testing.T) { - - grpc := "grpc" - jaegerPorts := v1.ServicePort{ - Name: "jaeger-grpc", - Protocol: "TCP", - Port: 14250, - AppProtocol: &grpc, - } - ports := append(params().Instance.Spec.Ports, jaegerPorts) - expected := service("test-collector", ports) - actual := desiredService(context.Background(), params()) - - assert.Equal(t, expected, *actual) - - }) - - t.Run("should return service with local internal traffic policy", func(t *testing.T) { - - grpc := "grpc" - jaegerPorts := v1.ServicePort{ - Name: "jaeger-grpc", - Protocol: "TCP", - Port: 14250, - AppProtocol: &grpc, - } - p := paramsWithMode(v1alpha1.ModeDaemonSet) - ports := append(p.Instance.Spec.Ports, jaegerPorts) - expected := serviceWithInternalTrafficPolicy("test-collector", ports, v1.ServiceInternalTrafficPolicyLocal) - actual := desiredService(context.Background(), p) - - assert.Equal(t, expected, *actual) - }) - -} - func TestExpectedServices(t *testing.T) { t.Run("should create the service", func(t *testing.T) { - err := expectedServices(context.Background(), params(), []v1.Service{service("test-collector", params().Instance.Spec.Ports)}) + err := expectedServices(context.Background(), params(), []*v1.Service{service("test-collector", params().Instance.Spec.Ports)}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) @@ -162,7 +40,7 @@ func TestExpectedServices(t *testing.T) { }) t.Run("should update service", func(t *testing.T) { serviceInstance := service("test-collector", params().Instance.Spec.Ports) - createObjectIfNotExists(t, "test-collector", &serviceInstance) + createObjectIfNotExists(t, "test-collector", serviceInstance) extraPorts := v1.ServicePort{ Name: "port-web", @@ -172,7 +50,7 @@ func TestExpectedServices(t *testing.T) { } ports := append(params().Instance.Spec.Ports, extraPorts) - err := expectedServices(context.Background(), params(), []v1.Service{service("test-collector", ports)}) + err := expectedServices(context.Background(), params(), []*v1.Service{service("test-collector", ports)}) assert.NoError(t, err) actual := v1.Service{} @@ -185,11 +63,11 @@ func TestExpectedServices(t *testing.T) { }) t.Run("should update service on version change", func(t *testing.T) { serviceInstance := service("test-collector", params().Instance.Spec.Ports) - createObjectIfNotExists(t, "test-collector", &serviceInstance) + createObjectIfNotExists(t, "test-collector", serviceInstance) newService := service("test-collector", params().Instance.Spec.Ports) newService.Spec.Selector["app.kubernetes.io/version"] = "Newest" - err := expectedServices(context.Background(), params(), []v1.Service{newService}) + err := expectedServices(context.Background(), params(), []*v1.Service{newService}) assert.NoError(t, err) actual := v1.Service{} @@ -209,14 +87,15 @@ func TestDeleteServices(t *testing.T) { Name: "web", }} deleteService := service("delete-service-collector", ports) - createObjectIfNotExists(t, "delete-service-collector", &deleteService) + createObjectIfNotExists(t, "delete-service-collector", deleteService) exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) assert.NoError(t, err) assert.True(t, exists) - desired := desiredService(context.Background(), params()) - err = deleteServices(context.Background(), params(), []v1.Service{*desired}) + param := params() + desired := collector.Service(param.Config, param.Log, param.Instance) + err = deleteServices(context.Background(), params(), []*v1.Service{desired}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) @@ -226,49 +105,14 @@ func TestDeleteServices(t *testing.T) { }) } -func TestHeadlessService(t *testing.T) { - t.Run("should return headless service", func(t *testing.T) { - actual := headless(context.Background(), params()) - assert.Equal(t, actual.Annotations["service.beta.openshift.io/serving-cert-secret-name"], "test-collector-headless-tls") - assert.Equal(t, actual.Spec.ClusterIP, "None") - }) -} - -func TestMonitoringService(t *testing.T) { - t.Run("returned service should expose monitoring port in the default port", func(t *testing.T) { - expected := []v1.ServicePort{{ - Name: "monitoring", - Port: 8888, - }} - actual := monitoringService(context.Background(), params()) - assert.Equal(t, expected, actual.Spec.Ports) - }) - - t.Run("returned the service in a custom port", func(t *testing.T) { - expected := []v1.ServicePort{{ - Name: "monitoring", - Port: 9090, - }} - params := params() - params.Instance.Spec.Config = `service: - telemetry: - metrics: - level: detailed - address: 0.0.0.0:9090` - actual := monitoringService(context.Background(), params) - assert.NotNil(t, actual) - assert.Equal(t, expected, actual.Spec.Ports) - }) -} - -func service(name string, ports []v1.ServicePort) v1.Service { +func service(name string, ports []v1.ServicePort) *v1.Service { return serviceWithInternalTrafficPolicy(name, ports, v1.ServiceInternalTrafficPolicyCluster) } -func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { +func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) *v1.Service { labels := collector.Labels(params().Instance, name, []string{}) - return v1.Service{ + return &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go index 77fadd7d7..c264dd430 100644 --- a/pkg/collector/reconcile/serviceaccount.go +++ b/pkg/collector/reconcile/serviceaccount.go @@ -25,15 +25,24 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) // +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete // ServiceAccounts reconciles the service account(s) required for the instance in the current context. -func ServiceAccounts(ctx context.Context, params Params) error { - desired := desiredServiceAccounts(params) +func ServiceAccounts(ctx context.Context, params manifests.Params) error { + var desired []*corev1.ServiceAccount + if params.Instance.Spec.Mode != v1alpha1.ModeSidecar && len(params.Instance.Spec.ServiceAccount) == 0 { + sa := collector.ServiceAccount(params.Config, params.Log, params.Instance) + desired = append(desired, sa) + } + if params.Instance.Spec.TargetAllocator.Enabled && len(params.Instance.Spec.TargetAllocator.ServiceAccount) == 0 { + sa := targetallocator.ServiceAccount(params.Config, params.Log, params.Instance) + desired = append(desired, sa) + } // first, handle the create/update parts if err := expectedServiceAccounts(ctx, params, desired); err != nil { @@ -48,22 +57,11 @@ func ServiceAccounts(ctx context.Context, params Params) error { return nil } -func desiredServiceAccounts(params Params) []corev1.ServiceAccount { - desired := []corev1.ServiceAccount{} - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar && len(params.Instance.Spec.ServiceAccount) == 0 { - desired = append(desired, collector.ServiceAccount(params.Instance)) - } - if params.Instance.Spec.TargetAllocator.Enabled && len(params.Instance.Spec.TargetAllocator.ServiceAccount) == 0 { - desired = append(desired, targetallocator.ServiceAccount(params.Instance)) - } - return desired -} - -func expectedServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { +func expectedServiceAccounts(ctx context.Context, params manifests.Params, expected []*corev1.ServiceAccount) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -71,7 +69,7 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + if clientErr := params.Client.Create(ctx, desired); clientErr != nil { return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) @@ -109,7 +107,7 @@ func expectedServiceAccounts(ctx context.Context, params Params, expected []core return nil } -func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { +func deleteServiceAccounts(ctx context.Context, params manifests.Params, expected []*corev1.ServiceAccount) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/serviceaccount_test.go b/pkg/collector/reconcile/serviceaccount_test.go index df6d69397..154b70eab 100644 --- a/pkg/collector/reconcile/serviceaccount_test.go +++ b/pkg/collector/reconcile/serviceaccount_test.go @@ -18,20 +18,21 @@ import ( "context" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" + "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/targetallocator" ) func TestExpectedServiceAccounts(t *testing.T) { t.Run("should create multiple service accounts", func(t *testing.T) { - desired := collector.ServiceAccount(params().Instance) - allocatorDesired := targetallocator.ServiceAccount(params().Instance) - err := expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{desired, allocatorDesired}) + param := params() + desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) + allocatorDesired := targetallocator.ServiceAccount(param.Config, param.Log, param.Instance) + err := expectedServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired, allocatorDesired}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) @@ -56,7 +57,9 @@ func TestExpectedServiceAccounts(t *testing.T) { assert.NoError(t, err) assert.True(t, exists) - err = expectedServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + param := params() + desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) + err = expectedServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) assert.NoError(t, err) actual := v1.ServiceAccount{} @@ -83,7 +86,9 @@ func TestDeleteServiceAccounts(t *testing.T) { assert.NoError(t, err) assert.True(t, exists) - err = deleteServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + param := params() + desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) + err = deleteServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) @@ -107,7 +112,9 @@ func TestDeleteServiceAccounts(t *testing.T) { assert.NoError(t, err) assert.True(t, exists) - err = deleteServiceAccounts(context.Background(), params(), []v1.ServiceAccount{collector.ServiceAccount(params().Instance)}) + param := params() + desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) + err = deleteServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) @@ -117,30 +124,3 @@ func TestDeleteServiceAccounts(t *testing.T) { }) } - -func TestDesiredServiceAccounts(t *testing.T) { - t.Run("should not create any service account", func(t *testing.T) { - params := params() - params.Instance.Spec.ServiceAccount = "existing-collector-sa" - params.Instance.Spec.TargetAllocator.Enabled = true - params.Instance.Spec.TargetAllocator.ServiceAccount = "existing-allocator-sa" - desired := desiredServiceAccounts(params) - assert.Len(t, desired, 0) - }) - - t.Run("should create collector service account", func(t *testing.T) { - params := params() - desired := desiredServiceAccounts(params) - assert.Len(t, desired, 1) - assert.Equal(t, collector.ServiceAccount(params.Instance), desired[0]) - }) - - t.Run("should create targetallocator service account", func(t *testing.T) { - params := params() - params.Instance.Spec.ServiceAccount = "existing-collector-sa" - params.Instance.Spec.TargetAllocator.Enabled = true - desired := desiredServiceAccounts(params) - assert.Len(t, desired, 1) - assert.Equal(t, targetallocator.ServiceAccount(params.Instance), desired[0]) - }) -} diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go index 942e16586..ac7231826 100644 --- a/pkg/collector/reconcile/servicemonitor.go +++ b/pkg/collector/reconcile/servicemonitor.go @@ -20,24 +20,29 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" ) // +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete // ServiceMonitors reconciles the service monitor(s) required for the instance in the current context. -func ServiceMonitors(ctx context.Context, params Params) error { +func ServiceMonitors(ctx context.Context, params manifests.Params) error { if !params.Instance.Spec.Observability.Metrics.EnableMetrics || !featuregate.PrometheusOperatorIsAvailable.IsEnabled() { return nil } - desired := desiredServiceMonitors(ctx, params) + var desired []*monitoringv1.ServiceMonitor + if sm, err := collector.ServiceMonitor(params.Config, params.Log, params.Instance); err != nil { + return err + } else { + desired = append(desired, sm) + } // first, handle the create/update parts if err := expectedServiceMonitors(ctx, params, desired); err != nil { @@ -52,41 +57,11 @@ func ServiceMonitors(ctx context.Context, params Params) error { return nil } -func desiredServiceMonitors(_ context.Context, params Params) []monitoringv1.ServiceMonitor { - col := params.Instance - return []monitoringv1.ServiceMonitor{ - { - ObjectMeta: metav1.ObjectMeta{ - Namespace: col.Namespace, - Name: naming.ServiceMonitor(col.Name), - Labels: map[string]string{ - "app.kubernetes.io/name": naming.ServiceMonitor(params.Instance.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: monitoringv1.ServiceMonitorSpec{ - Endpoints: []monitoringv1.Endpoint{{ - Port: "monitoring", - }}, - NamespaceSelector: monitoringv1.NamespaceSelector{ - MatchNames: []string{col.Namespace}, - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - }, - }, - } -} - -func expectedServiceMonitors(ctx context.Context, params Params, expected []monitoringv1.ServiceMonitor) error { +func expectedServiceMonitors(ctx context.Context, params manifests.Params, expected []*monitoringv1.ServiceMonitor) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -94,7 +69,7 @@ func expectedServiceMonitors(ctx context.Context, params Params, expected []moni nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if err = params.Client.Create(ctx, &desired); err != nil { + if err = params.Client.Create(ctx, desired); err != nil { return fmt.Errorf("failed to create: %w", err) } params.Log.V(2).Info("created", "servicemonitor.name", desired.Name, "servicemonitor.namespace", desired.Namespace) @@ -134,7 +109,7 @@ func expectedServiceMonitors(ctx context.Context, params Params, expected []moni return nil } -func deleteServiceMonitors(ctx context.Context, params Params, expected []monitoringv1.ServiceMonitor) error { +func deleteServiceMonitors(ctx context.Context, params manifests.Params, expected []*monitoringv1.ServiceMonitor) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/servicemonitor_test.go b/pkg/collector/reconcile/servicemonitor_test.go index d3ae598da..9f1a4d2e7 100644 --- a/pkg/collector/reconcile/servicemonitor_test.go +++ b/pkg/collector/reconcile/servicemonitor_test.go @@ -26,16 +26,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) -func TestDesiredServiceMonitors(t *testing.T) { - params := params() - - actual := desiredServiceMonitors(context.Background(), params) - assert.NotNil(t, actual) -} - func TestExpectedServiceMonitors(t *testing.T) { originalVal := featuregate.PrometheusOperatorIsAvailable.IsEnabled() require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), false)) @@ -50,7 +44,7 @@ func TestExpectedServiceMonitors(t *testing.T) { err := expectedServiceMonitors( context.Background(), p, - []monitoringv1.ServiceMonitor{servicemonitor("test-collector")}, + []*monitoringv1.ServiceMonitor{servicemonitor("test-collector")}, ) assert.NoError(t, err) @@ -66,14 +60,16 @@ func TestDeleteServiceMonitors(t *testing.T) { t.Run("should delete excess service monitors", func(t *testing.T) { name := "sm-to-delete" deleteServiceMonitor := servicemonitor(name) - createObjectIfNotExists(t, name, &deleteServiceMonitor) + createObjectIfNotExists(t, name, deleteServiceMonitor) exists, err := populateObjectIfExists(t, &monitoringv1.ServiceMonitor{}, types.NamespacedName{Namespace: "default", Name: name}) assert.NoError(t, err) assert.True(t, exists) - desired := desiredServiceMonitors(context.Background(), params()) - err = deleteServiceMonitors(context.Background(), params(), desired) + p := params() + desired, err := collector.ServiceMonitor(p.Config, p.Log, p.Instance) + assert.NoError(t, err) + err = deleteServiceMonitors(context.Background(), params(), []*monitoringv1.ServiceMonitor{desired}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: name}) @@ -82,8 +78,8 @@ func TestDeleteServiceMonitors(t *testing.T) { }) } -func servicemonitor(name string) monitoringv1.ServiceMonitor { - return monitoringv1.ServiceMonitor{ +func servicemonitor(name string) *monitoringv1.ServiceMonitor { + return &monitoringv1.ServiceMonitor{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go index 2c023aa92..eeddc9cbf 100644 --- a/pkg/collector/reconcile/statefulset.go +++ b/pkg/collector/reconcile/statefulset.go @@ -25,15 +25,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) // +kubebuilder:rbac:groups="apps",resources=statefulsets,verbs=get;list;watch;create;update;patch;delete // StatefulSets reconciles the stateful set(s) required for the instance in the current context. -func StatefulSets(ctx context.Context, params Params) error { +func StatefulSets(ctx context.Context, params manifests.Params) error { - desired := []appsv1.StatefulSet{} + var desired []*appsv1.StatefulSet if params.Instance.Spec.Mode == "statefulset" { desired = append(desired, collector.StatefulSet(params.Config, params.Log, params.Instance)) } @@ -51,11 +52,11 @@ func StatefulSets(ctx context.Context, params Params) error { return nil } -func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1.StatefulSet) error { +func expectedStatefulSets(ctx context.Context, params manifests.Params, expected []*appsv1.StatefulSet) error { for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -63,7 +64,7 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} err := params.Client.Get(ctx, nns, existing) if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { + if clientErr := params.Client.Create(ctx, desired); clientErr != nil { return fmt.Errorf("failed to create: %w", clientErr) } params.Log.V(2).Info("created", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) @@ -73,7 +74,7 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. } // Check for immutable fields. If set, we cannot modify the stateful set, otherwise we will face reconciliation error. - if needsDeletion, fieldName := hasImmutableFieldChange(&desired, existing); needsDeletion { + if needsDeletion, fieldName := hasImmutableFieldChange(desired, existing); needsDeletion { params.Log.V(2).Info("Immutable field change detected, trying to delete, the new collector statefulset will be created in the next reconcile cycle", "field", fieldName, "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) @@ -113,7 +114,7 @@ func expectedStatefulSets(ctx context.Context, params Params, expected []appsv1. return nil } -func deleteStatefulSets(ctx context.Context, params Params, expected []appsv1.StatefulSet) error { +func deleteStatefulSets(ctx context.Context, params manifests.Params, expected []*appsv1.StatefulSet) error { opts := []client.ListOption{ client.InNamespace(params.Instance.Namespace), client.MatchingLabels(map[string]string{ diff --git a/pkg/collector/reconcile/statefulset_test.go b/pkg/collector/reconcile/statefulset_test.go index f8f59fdb6..e2b4fcc2a 100644 --- a/pkg/collector/reconcile/statefulset_test.go +++ b/pkg/collector/reconcile/statefulset_test.go @@ -18,14 +18,14 @@ import ( "context" "testing" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/stretchr/testify/assert" v1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" ) func TestExpectedStatefulsets(t *testing.T) { @@ -33,7 +33,7 @@ func TestExpectedStatefulsets(t *testing.T) { expectedSs := collector.StatefulSet(param.Config, logger, param.Instance) t.Run("should create StatefulSet", func(t *testing.T) { - err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) assert.NoError(t, err) actual := v1.StatefulSet{} @@ -45,8 +45,8 @@ func TestExpectedStatefulsets(t *testing.T) { }) t.Run("should update statefulset", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", &expectedSs) - err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + createObjectIfNotExists(t, "test-collector", expectedSs) + err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) assert.NoError(t, err) actual := v1.StatefulSet{} @@ -86,7 +86,7 @@ func TestExpectedStatefulsets(t *testing.T) { createObjectIfNotExists(t, "dummy", &ds) - err := deleteStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + err := deleteStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) assert.NoError(t, err) actual := v1.StatefulSet{} @@ -124,7 +124,7 @@ func TestExpectedStatefulsets(t *testing.T) { createObjectIfNotExists(t, "dummy", &ds) - err := deleteStatefulSets(context.Background(), param, []v1.StatefulSet{expectedSs}) + err := deleteStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) assert.NoError(t, err) actual := v1.StatefulSet{} @@ -141,7 +141,7 @@ func TestExpectedStatefulsets(t *testing.T) { oldSs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" oldSs.Name = "update-selector" - err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{oldSs}) + err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{oldSs}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) assert.NoError(t, err) @@ -149,13 +149,13 @@ func TestExpectedStatefulsets(t *testing.T) { newSs := collector.StatefulSet(param.Config, logger, param.Instance) newSs.Name = oldSs.Name - err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) assert.NoError(t, err) assert.False(t, exists) - err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) assert.NoError(t, err) actual := v1.StatefulSet{} exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) @@ -169,7 +169,7 @@ func TestExpectedStatefulsets(t *testing.T) { oldSs := collector.StatefulSet(param.Config, logger, param.Instance) oldSs.Name = "update-volumeclaimtemplates" - err := expectedStatefulSets(context.Background(), param, []v1.StatefulSet{oldSs}) + err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{oldSs}) assert.NoError(t, err) exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) assert.NoError(t, err) @@ -191,13 +191,13 @@ func TestExpectedStatefulsets(t *testing.T) { }}} newSs.Name = oldSs.Name - err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) assert.NoError(t, err) exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) assert.NoError(t, err) assert.False(t, exists) - err = expectedStatefulSets(context.Background(), param, []v1.StatefulSet{newSs}) + err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) assert.NoError(t, err) actual := v1.StatefulSet{} exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index f0f37bba2..8e3e39409 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -25,6 +25,9 @@ import ( "testing" "time" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" + routev1 "github.com/openshift/api/route/v1" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/assert" @@ -38,7 +41,6 @@ import ( "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" @@ -48,7 +50,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/testdata" ) var ( @@ -61,8 +62,6 @@ var ( logger = logf.Log.WithName("unit-tests") instanceUID = uuid.NewUUID() - err error - cfg *rest.Config ) const ( @@ -86,7 +85,7 @@ func TestMain(m *testing.M) { Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, }, } - cfg, err = testEnv.Start() + cfg, err := testEnv.Start() if err != nil { fmt.Printf("failed to start testEnv: %v", err) os.Exit(1) @@ -184,17 +183,17 @@ func TestMain(m *testing.M) { os.Exit(code) } -func params() Params { +func params() manifests.Params { return paramsWithMode(v1alpha1.ModeDeployment) } -func paramsWithMode(mode v1alpha1.Mode) Params { +func paramsWithMode(mode v1alpha1.Mode) manifests.Params { replicas := int32(2) - configYAML, err := os.ReadFile("../testdata/test.yaml") + configYAML, err := os.ReadFile("testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } - return Params{ + return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ @@ -229,23 +228,23 @@ func paramsWithMode(mode v1alpha1.Mode) Params { } } -func newParams(taContainerImage string, file string) (Params, error) { +func newParams(taContainerImage string, file string) (manifests.Params, error) { replicas := int32(1) var configYAML []byte var err error if file == "" { - configYAML, err = os.ReadFile("../testdata/test.yaml") + configYAML, err = os.ReadFile("testdata/test.yaml") } else { configYAML, err = os.ReadFile(file) } if err != nil { - return Params{}, fmt.Errorf("Error getting yaml file: %w", err) + return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) } cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - return Params{ + return manifests.Params{ Config: cfg, Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ diff --git a/pkg/collector/reconcile/testdata/ingress_testdata.yaml b/pkg/collector/reconcile/testdata/ingress_testdata.yaml new file mode 100644 index 000000000..54f9342a7 --- /dev/null +++ b/pkg/collector/reconcile/testdata/ingress_testdata.yaml @@ -0,0 +1,16 @@ +--- +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:12345 + otlp/test: + protocols: + grpc: + endpoint: 0.0.0.0:98765 + +service: + pipelines: + traces: + receivers: [otlp, otlp/test] + exporters: [nop] diff --git a/pkg/collector/reconcile/test.yaml b/pkg/collector/reconcile/testdata/test.yaml similarity index 53% rename from pkg/collector/reconcile/test.yaml rename to pkg/collector/reconcile/testdata/test.yaml index e88b11024..abba475c0 100644 --- a/pkg/collector/reconcile/test.yaml +++ b/pkg/collector/reconcile/testdata/test.yaml @@ -6,10 +6,10 @@ receivers: prometheus: config: scrape_configs: - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] exporters: logging: @@ -17,6 +17,6 @@ exporters: service: pipelines: metrics: - receivers: [prometheus] + receivers: [prometheus, jaeger] processors: [] exporters: [logging] \ No newline at end of file diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index ff4f2cf7b..40969c706 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index fd33aaf75..e599469dc 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -25,8 +25,8 @@ import ( "k8s.io/client-go/tools/record" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index cdfdee0a3..41c2777ba 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 58b7fb1f9..fc9b28514 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 3ea3cc778..8cdce1f7e 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 3dbc6875c..901cb40c1 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -23,7 +23,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go index 10bc0196a..fcbc4996c 100644 --- a/pkg/collector/upgrade/v0_39_0.go +++ b/pkg/collector/upgrade/v0_39_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go index aafc6d1e3..634b7818e 100644 --- a/pkg/collector/upgrade/v0_41_0.go +++ b/pkg/collector/upgrade/v0_41_0.go @@ -19,7 +19,7 @@ import ( "strings" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go index 7a304d547..f9ef7887a 100644 --- a/pkg/collector/upgrade/v0_43_0.go +++ b/pkg/collector/upgrade/v0_43_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go index 9103a3d50..16ac0080d 100644 --- a/pkg/collector/upgrade/v0_56_0.go +++ b/pkg/collector/upgrade/v0_56_0.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go index 1d2e34651..0656e2a94 100644 --- a/pkg/collector/upgrade/v0_57_2.go +++ b/pkg/collector/upgrade/v0_57_2.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" ) func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go index dff6365a6..60699ecd1 100644 --- a/pkg/collector/upgrade/v0_61_0.go +++ b/pkg/collector/upgrade/v0_61_0.go @@ -20,7 +20,7 @@ import ( "strings" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" ) func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 5ba72f85d..49a791fa8 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -21,7 +21,7 @@ import ( "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 1b153d82a..3ac35d8cb 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -23,9 +23,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) const ( @@ -35,7 +34,7 @@ const ( // add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod, attributes []corev1.EnvVar) (corev1.Pod, error) { - otelColCfg, err := reconcile.ReplaceConfig(otelcol) + otelColCfg, err := collector.ReplaceConfig(otelcol) if err != nil { return pod, err } diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 770bbc555..aceb01d6b 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -25,7 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/naming" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") From 1e776ce2932e37038b15b3000513c0db0dfa6c3c Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 3 Aug 2023 13:29:43 -0400 Subject: [PATCH 0948/1234] Add dependabot grouping for common things (#1979) * Add groups * add chlog entry * remove chloggen --- .github/dependabot.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 788b9504c..720496b24 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,14 +4,54 @@ updates: directory: / schedule: interval: daily + # Create a group of dependencies to be updated together in one pull request + groups: + golang-org-x: + patterns: + - "golang.org/x/*" + prometheus: + patterns: + - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go/*" + kubernetes: + patterns: + - "k8s.io/*" + - "sigs.k8s.io/*" - package-ecosystem: gomod directory: /cmd/operator-opamp-bridge schedule: interval: daily + groups: + golang-org-x: + patterns: + - "golang.org/x/*" + prometheus: + patterns: + - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go/*" + kubernetes: + patterns: + - "k8s.io/*" + - "sigs.k8s.io/*" - package-ecosystem: gomod directory: /cmd/otel-allocator schedule: interval: daily + groups: + golang-org-x: + patterns: + - "golang.org/x/*" + prometheus: + patterns: + - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go/*" + kubernetes: + patterns: + - "k8s.io/*" + - "sigs.k8s.io/*" - package-ecosystem: github-actions directory: / From b9b0a8b69c394b30a0a462597020d74eec841f0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 11:32:35 +0200 Subject: [PATCH 0949/1234] Bump the prometheus group with 1 update (#1985) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.66.0...v0.67.1) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d7194f36a..0af0ab0f7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 github.com/prometheus/prometheus v0.45.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index b5d0b0207..3cae8000e 100644 --- a/go.sum +++ b/go.sum @@ -440,8 +440,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 h1:PPW01FLVjJHMNcbAL1DDD9EZceSQKMOU/VpK0irrxrI= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= From 7962291f1f918d4c2f7c2b89727ab828ecd10258 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:08:28 +0200 Subject: [PATCH 0950/1234] Bump github.com/prometheus/prometheus from 0.45.0 to 0.46.0 (#1961) Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.45.0 to 0.46.0. - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.45.0...v0.46.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 103 +++++++++++++------------- go.sum | 224 ++++++++++++++++++++++++++++++--------------------------- 2 files changed, 173 insertions(+), 154 deletions(-) diff --git a/go.mod b/go.mod index 0af0ab0f7..04a694cdb 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 - github.com/prometheus/prometheus v0.45.0 + github.com/prometheus/prometheus v0.46.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 @@ -26,11 +26,11 @@ require ( ) require ( - cloud.google.com/go/compute v1.19.0 // indirect + cloud.google.com/go/compute v1.22.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect @@ -40,32 +40,32 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.276 // indirect + github.com/aws/aws-sdk-go v1.44.302 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/digitalocean/godo v1.99.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.2+incompatible // indirect + github.com/docker/docker v24.0.4+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect - github.com/envoyproxy/go-control-plane v0.11.0 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.1 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/envoyproxy/go-control-plane v0.11.1 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -76,40 +76,41 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.1 // indirect - github.com/gophercloud/gophercloud v1.4.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/gophercloud/gophercloud v1.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.21.0 // indirect - github.com/hashicorp/cronexpr v1.1.1 // indirect + github.com/hashicorp/consul/api v1.22.0 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f // indirect + github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go v1.45.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.7 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/linode/linodego v1.17.0 // indirect + github.com/linode/linodego v1.19.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.54 // indirect + github.com/miekg/dns v1.1.55 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -120,13 +121,13 @@ require ( github.com/ovh/go-ovh v1.4.1 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 // indirect + github.com/prometheus/procfs v0.11.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 // indirect github.com/spf13/cobra v1.6.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect @@ -134,29 +135,31 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.8.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/tools v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/api v0.114.0 // indirect + google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect - google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/grpc v1.56.2 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect + k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 3cae8000e..97e44f2e5 100644 --- a/go.sum +++ b/go.sum @@ -13,20 +13,18 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.22.0 h1:cB8R6FtUtT1TYGl5R3xuxnW6OUIc/DrT2aiR16TTG7Y= +cloud.google.com/go/compute v1.22.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,10 +37,10 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1 h1:gVXuXcWd1i4C2Ruxe321aU+IKGaStvGB/S90PUPB/W8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.3.1/go.mod h1:DffdKW9RFqa5VgmsjUOsS7UE7eiA5iAvYUs63bhKQ0M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 h1:T8quHYlUGyb/oqtSTwqlCr1ilJHrDv+ZtpSfo+hm1BU= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1/go.mod h1:gLa1CL2RNE4s7M3yopJ/p0iq5DdY6Yv5ZUt9MTRZOQM= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= @@ -66,15 +64,15 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1 h1:oPdPEZFSbl7oSPEAIPMPBMUmiL+mqgzBJwM/9qYcwNg= -github.com/AzureAD/microsoft-authentication-library-for-go v0.8.1/go.mod h1:4qFor3D/HDsvBME35Xy9rwW9DecL+M2sNw1ybjPtwA0= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -91,8 +89,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.276 h1:ywPlx9C5Yc482dUgAZ9bHpQ6onVvJvYE9FJWsNDCEy0= -github.com/aws/aws-sdk-go v1.44.276/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= +github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -114,46 +112,52 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74 h1:zlUubfBUxApscKFsF4VSvvfhsBNTBu0eF/ddvpo96yk= -github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= -github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= +github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.1 h1:kt9FtLiooDc0vbwTLhdg3dyNX1K9Qwa1EK9LcD4jVUQ= -github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -177,12 +181,14 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -258,29 +264,31 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/gophercloud/gophercloud v1.4.0 h1:RqEu43vaX0lb0LanZr5BylK5ICVxjpFFoc0sxivyuHU= -github.com/gophercloud/gophercloud v1.4.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= +github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.21.0 h1:WMR2JiyuaQWRAMFaOGiYfY4Q4HRpyYRe/oYQofjyduM= -github.com/hashicorp/consul/api v1.21.0/go.mod h1:f8zVJwBcLdr1IQnfdfszjUM0xzp31Zl3bpws3pL9uFM= -github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= -github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= -github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= +github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= +github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -288,20 +296,20 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= -github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -309,7 +317,7 @@ github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0S github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -319,19 +327,19 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f h1:yxjcAZRuYymIDC0W4IQHgTe9EQdu2BsjPlVmKwyVZT4= -github.com/hashicorp/nomad/api v0.0.0-20230605233119-67e39d5d248f/go.mod h1:Xjd3OXUTfsWbCCBsQd3EdfPTz5evDi+fxqdvpN+WqQg= +github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= +github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go v1.45.1 h1:nl0OOklFfQT5J6AaNIOhl5Ruh3fhmGmhvZEqHbibVuk= -github.com/hetznercloud/hcloud-go v1.45.1/go.mod h1:aAUGxSfSnB8/lVXHNEDxtCT1jykaul8kqjD7f5KQXF8= +github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= +github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.7 h1:uVG1Q/ZDJ7YmCI9Oevpue9xJEH5UrUMyXv8gm7NTxIw= -github.com/ionos-cloud/sdk-go/v6 v6.1.7/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= +github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -369,8 +377,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/linode/linodego v1.17.0 h1:aWS98f0jUoY2lhsEuBxRdVkqyGM0nazPd68AEDF0EvU= -github.com/linode/linodego v1.17.0/go.mod h1:/omzPxie0/YI6S0sTw1q47qDt5IYSlbO/infRR4UG+A= +github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= +github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -386,16 +394,16 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -436,8 +444,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= @@ -447,8 +456,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -469,17 +478,17 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/prometheus v0.45.0 h1:O/uG+Nw4kNxx/jDPxmjsSDd+9Ohql6E7ZSY1x5x/0KI= -github.com/prometheus/prometheus v0.45.0/go.mod h1:jC5hyO8ItJBnDWGecbEucMyXjzxGv9cxsxsjS9u5s1w= +github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= +github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/prometheus v0.46.0 h1:9JSdXnsuT6YsbODEhSQMwxNkGwPExfmzqG73vCMk/Kw= +github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 h1:+1H+N9QFl2Sfvia0FBYfMrHYHYhmpZxhSE0wpPL2lYs= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= @@ -553,11 +562,12 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -568,8 +578,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -592,8 +602,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -635,16 +645,16 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -657,7 +667,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -715,14 +725,15 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -731,10 +742,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -785,8 +797,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -809,8 +821,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= +google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -850,8 +862,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 h1:khxVcsk/FhnzxMKOyD+TDGwjbEOpcPuIpmafPGFmhMA= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -868,8 +884,9 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -883,8 +900,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -907,7 +924,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= @@ -930,12 +946,12 @@ k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= +k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= +k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= k8s.io/kubectl v0.27.4 h1:RV1TQLIbtL34+vIM+W7HaS3KfAbqvy9lWn6pWB9els4= k8s.io/kubectl v0.27.4/go.mod h1:qtc1s3BouB9KixJkriZMQqTsXMc+OAni6FeKAhq7q14= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -943,7 +959,7 @@ sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0 sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 76cff59b0c0640da29c56d5ae91eae5fe843ae5b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 4 Aug 2023 16:43:31 +0200 Subject: [PATCH 0951/1234] Align management state constant with other constants (#1988) * Align management state constant with other constants Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- apis/v1alpha1/opentelemetrycollector_types.go | 8 ++++---- .../opentelemetry-operator.clusterserviceversion.yaml | 2 +- .../opentelemetry.io_opentelemetrycollectors.yaml | 6 +++--- .../bases/opentelemetry.io_opentelemetrycollectors.yaml | 6 +++--- docs/api.md | 4 ++-- .../e2e/managed-reconcile/01-disable-reconciliation.yaml | 4 ++-- tests/e2e/managed-reconcile/02-enable-reconciliation.yaml | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 2d599eb67..a4f9869b4 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -23,17 +23,17 @@ import ( // ManagementStateType defines the type for CR management states. // -// +kubebuilder:validation:Enum=Managed;Unmanaged +// +kubebuilder:validation:Enum=managed;unmanaged type ManagementStateType string const ( // ManagementStateManaged when the OpenTelemetryCollector custom resource should be // reconciled by the operator. - ManagementStateManaged ManagementStateType = "Managed" + ManagementStateManaged ManagementStateType = "managed" // ManagementStateUnmanaged when the OpenTelemetryCollector custom resource should not be // reconciled by the operator. - ManagementStateUnmanaged ManagementStateType = "Unmanaged" + ManagementStateUnmanaged ManagementStateType = "unmanaged" ) // Ingress is used to specify how OpenTelemetry Collector is exposed. This @@ -89,7 +89,7 @@ type OpenTelemetryCollectorSpec struct { // // +required // +kubebuilder:validation:Required - // +kubebuilder:default:=Managed + // +kubebuilder:default:=managed ManagementState ManagementStateType `json:"managementState,omitempty"` // Resources to set on the OpenTelemetry Collector pods. // +optional diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index e402c3d1c..7131706fe 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-07-05T18:15:51Z" + createdAt: "2023-08-04T13:28:05Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 6357ffd4d..d0401c562 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2926,12 +2926,12 @@ spec: type: integer type: object managementState: - default: Managed + default: managed description: ManagementState defines if the CR should be managed by the operator or not. Default is managed. enum: - - Managed - - Unmanaged + - managed + - unmanaged type: string maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index f1a732b9e..04d9bdc2c 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2923,12 +2923,12 @@ spec: type: integer type: object managementState: - default: Managed + default: managed description: ManagementState defines if the CR should be managed by the operator or not. Default is managed. enum: - - Managed - - Unmanaged + - managed + - unmanaged type: string maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. diff --git a/docs/api.md b/docs/api.md index 9a0fe3bbf..12cddde7a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3708,8 +3708,8 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. ManagementState defines if the CR should be managed by the operator or not. Default is managed.

- Enum: Managed, Unmanaged
- Default: Managed
+ Enum: managed, unmanaged
+ Default: managed
false diff --git a/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml b/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml index ea52b8849..7e1644c36 100644 --- a/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml +++ b/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml @@ -3,7 +3,7 @@ kind: OpenTelemetryCollector metadata: name: simplest spec: - managementState: Unmanaged + managementState: unmanaged config: | receivers: otlp: @@ -48,4 +48,4 @@ data: traces: receivers: [jaeger, otlp] processors: [] - exporters: [logging] \ No newline at end of file + exporters: [logging] diff --git a/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml b/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml index 688ab25ed..fcd9bc311 100644 --- a/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml +++ b/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml @@ -3,7 +3,7 @@ kind: OpenTelemetryCollector metadata: name: simplest spec: - managementState: Managed + managementState: managed config: | receivers: otlp: @@ -20,4 +20,4 @@ spec: traces: receivers: [otlp] processors: [] - exporters: [logging] \ No newline at end of file + exporters: [logging] From 4fdb4c59da4097201e387a709ce60524ca0ad532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=A5rtensson?= Date: Fri, 4 Aug 2023 17:21:57 +0200 Subject: [PATCH 0952/1234] Set securityContext on injected initContainer (#1273) Co-authored-by: Jacob Aronoff --- .chloggen/initcontainer-securitycontext.yaml | 16 ++++++++++++++++ pkg/instrumentation/sdk.go | 13 +++++++++++++ tests/e2e/instrumentation-dotnet/01-assert.yaml | 4 ++++ .../instrumentation-dotnet/01-install-app.yaml | 4 ++++ .../instrumentation-java-other-ns/03-assert.yaml | 4 ++++ .../03-install-app.yaml | 4 ++++ tests/e2e/instrumentation-java/01-assert.yaml | 4 ++++ .../e2e/instrumentation-java/01-install-app.yaml | 4 ++++ tests/e2e/instrumentation-nodejs/01-assert.yaml | 4 ++++ .../instrumentation-nodejs/01-install-app.yaml | 4 ++++ tests/e2e/instrumentation-python/01-assert.yaml | 4 ++++ .../instrumentation-python/01-install-app.yaml | 4 ++++ 12 files changed, 69 insertions(+) create mode 100755 .chloggen/initcontainer-securitycontext.yaml diff --git a/.chloggen/initcontainer-securitycontext.yaml b/.chloggen/initcontainer-securitycontext.yaml new file mode 100755 index 000000000..0c1aaf9cf --- /dev/null +++ b/.chloggen/initcontainer-securitycontext.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Set securityContext on injected initContainer based on existing containers. + +# One or more tracking issues related to the change +issues: [1084, 1058] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 221546454..eb72d8741 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -149,6 +149,19 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } + + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext) + + return pod +} + +func (i *sdkInjector) setInitContainerSecurityContext(pod corev1.Pod, securityContext *corev1.SecurityContext) corev1.Pod { + for i, initContainer := range pod.Spec.InitContainers { + if initContainer.Name == initContainerName { + pod.Spec.InitContainers[i].SecurityContext = securityContext + } + } + return pod } diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e/instrumentation-dotnet/01-assert.yaml index fecefaaf7..ef15d8693 100644 --- a/tests/e2e/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e/instrumentation-dotnet/01-assert.yaml @@ -50,6 +50,10 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] resources: limits: cpu: "500m" diff --git a/tests/e2e/instrumentation-dotnet/01-install-app.yaml b/tests/e2e/instrumentation-dotnet/01-install-app.yaml index 8591d4028..e7cce1a5e 100644 --- a/tests/e2e/instrumentation-dotnet/01-install-app.yaml +++ b/tests/e2e/instrumentation-dotnet/01-install-app.yaml @@ -22,3 +22,7 @@ spec: containers: - name: myapp image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] diff --git a/tests/e2e/instrumentation-java-other-ns/03-assert.yaml b/tests/e2e/instrumentation-java-other-ns/03-assert.yaml index fc4dd7535..d7fd949a3 100644 --- a/tests/e2e/instrumentation-java-other-ns/03-assert.yaml +++ b/tests/e2e/instrumentation-java-other-ns/03-assert.yaml @@ -44,5 +44,9 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] status: phase: Running diff --git a/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml b/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml index f566eb4c0..7674e6e61 100644 --- a/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml +++ b/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml @@ -22,3 +22,7 @@ spec: containers: - name: myapp image: ghcr.io/pavolloffay/spring-petclinic:latest + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e/instrumentation-java/01-assert.yaml index c6bb4185a..2094e9fff 100644 --- a/tests/e2e/instrumentation-java/01-assert.yaml +++ b/tests/e2e/instrumentation-java/01-assert.yaml @@ -44,6 +44,10 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] resources: limits: cpu: "500m" diff --git a/tests/e2e/instrumentation-java/01-install-app.yaml b/tests/e2e/instrumentation-java/01-install-app.yaml index 093bb8b4c..a68255bf8 100644 --- a/tests/e2e/instrumentation-java/01-install-app.yaml +++ b/tests/e2e/instrumentation-java/01-install-app.yaml @@ -22,3 +22,7 @@ spec: containers: - name: myapp image: ghcr.io/pavolloffay/spring-petclinic:latest + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e/instrumentation-nodejs/01-assert.yaml index 53a5a1558..ef7e7c349 100644 --- a/tests/e2e/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e/instrumentation-nodejs/01-assert.yaml @@ -42,6 +42,10 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] resources: limits: cpu: "500m" diff --git a/tests/e2e/instrumentation-nodejs/01-install-app.yaml b/tests/e2e/instrumentation-nodejs/01-install-app.yaml index 1a1a29888..1234d661f 100644 --- a/tests/e2e/instrumentation-nodejs/01-install-app.yaml +++ b/tests/e2e/instrumentation-nodejs/01-install-app.yaml @@ -22,3 +22,7 @@ spec: containers: - name: myapp image: ghcr.io/anuraaga/express-hello-world:latest + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e/instrumentation-python/01-assert.yaml index 0e3bddd73..1483b3c18 100644 --- a/tests/e2e/instrumentation-python/01-assert.yaml +++ b/tests/e2e/instrumentation-python/01-assert.yaml @@ -46,6 +46,10 @@ spec: - name: otc-container initContainers: - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] resources: limits: cpu: "500m" diff --git a/tests/e2e/instrumentation-python/01-install-app.yaml b/tests/e2e/instrumentation-python/01-install-app.yaml index e8e9e0f94..70648d61e 100644 --- a/tests/e2e/instrumentation-python/01-install-app.yaml +++ b/tests/e2e/instrumentation-python/01-install-app.yaml @@ -22,3 +22,7 @@ spec: containers: - name: myapp image: ghcr.io/anuraaga/flask-hello-world:latest + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] From d73bcb3d798321573c564d09d1129dc87789d81d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 10:37:41 -0400 Subject: [PATCH 0953/1234] Bump the kubernetes group with 1 update (#1993) Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.0...v0.15.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 04a694cdb..b5350a575 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( k8s.io/client-go v0.27.4 k8s.io/component-base v0.27.4 k8s.io/kubectl v0.27.4 - sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime v0.15.1 ) require ( diff --git a/go.sum b/go.sum index 97e44f2e5..256f00ca4 100644 --- a/go.sum +++ b/go.sum @@ -955,8 +955,8 @@ k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= +sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 4e0b7529bb8b98f6747dc6c82e5eb8200e0ad562 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 10:38:08 -0400 Subject: [PATCH 0954/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 1 update (#1991) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.0...v0.15.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 3daeb79ad..c1f20c42d 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/apimachinery v0.27.4 k8s.io/client-go v0.27.4 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime v0.15.1 ) require ( diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 07b607ea8..c62553e5e 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -623,8 +623,8 @@ k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= +sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From ad09d1336d7e72ceee626704cc3d0cd123b8425b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 7 Aug 2023 12:08:48 -0400 Subject: [PATCH 0955/1234] update prometheus deps (#1996) --- .github/dependabot.yml | 9 + cmd/otel-allocator/go.mod | 130 ++++----- cmd/otel-allocator/go.sum | 289 +++++++++++---------- cmd/otel-allocator/watcher/promOperator.go | 1 + 4 files changed, 238 insertions(+), 191 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 720496b24..7b29a7cb2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,8 +11,11 @@ updates: - "golang.org/x/*" prometheus: patterns: + - "github.com/prometheus-operator/prometheus-operator" - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus" - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go" - "github.com/prometheus/client_go/*" kubernetes: patterns: @@ -28,8 +31,11 @@ updates: - "golang.org/x/*" prometheus: patterns: + - "github.com/prometheus-operator/prometheus-operator" - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus" - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go" - "github.com/prometheus/client_go/*" kubernetes: patterns: @@ -45,8 +51,11 @@ updates: - "golang.org/x/*" prometheus: patterns: + - "github.com/prometheus-operator/prometheus-operator" - "github.com/prometheus-operator/prometheus-operator/*" + - "github.com/prometheus/prometheus" - "github.com/prometheus/prometheus/*" + - "github.com/prometheus/client_go" - "github.com/prometheus/client_go/*" kubernetes: patterns: diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 9090ebbf6..c3ef94e0e 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -13,12 +13,12 @@ require ( github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.66.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0 + github.com/prometheus-operator/prometheus-operator v0.67.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 - github.com/prometheus/prometheus v0.44.0 + github.com/prometheus/prometheus v0.46.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 @@ -30,54 +30,58 @@ require ( ) require ( - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute v1.22.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.28 // indirect + github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.44.245 // indirect + github.com/aws/aws-sdk-go v1.44.302 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.98.0 // indirect + github.com/digitalocean/godo v1.99.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.4+incompatible // indirect + github.com/docker/docker v24.0.4+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd // indirect + github.com/efficientgo/core v1.0.0-rc.2 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/envoyproxy/go-control-plane v0.11.0 // indirect - github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect + github.com/envoyproxy/go-control-plane v0.11.1 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fatih/color v1.14.1 // indirect + github.com/fatih/color v1.15.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.3 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/errors v0.20.4 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/runtime v0.25.0 // indirect - github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/runtime v0.26.0 // indirect + github.com/go-openapi/spec v0.20.9 // indirect github.com/go-openapi/strfmt v0.21.7 // indirect github.com/go-openapi/swag v0.22.4 // indirect github.com/go-openapi/validate v0.22.1 // indirect @@ -96,41 +100,44 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.1 // indirect - github.com/gophercloud/gophercloud v1.3.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/gophercloud/gophercloud v1.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.20.0 // indirect - github.com/hashicorp/cronexpr v1.1.1 // indirect + github.com/hashicorp/consul/api v1.22.0 // indirect + github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 // indirect + github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go v1.42.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.6 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.2.4 // indirect - github.com/linode/linodego v1.16.1 // indirect + github.com/linode/linodego v1.19.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect - github.com/miekg/dns v1.1.53 // indirect + github.com/miekg/dns v1.1.55 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -143,54 +150,57 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/ovh/go-ovh v1.4.1 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus-community/prom-label-proxy v0.6.0 // indirect + github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect github.com/prometheus/alertmanager v0.25.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 // indirect + github.com/prometheus/procfs v0.11.0 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 // indirect github.com/spf13/cobra v1.7.0 // indirect - github.com/tidwall/pretty v1.2.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - go.mongodb.org/mongo-driver v1.11.4 // indirect + go.mongodb.org/mongo-driver v1.12.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect - go.uber.org/atomic v1.10.0 // indirect + go.opentelemetry.io/otel v1.16.0 // indirect + go.opentelemetry.io/otel/metric v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.uber.org/atomic v1.11.0 // indirect go.uber.org/goleak v1.2.1 // indirect go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.10.0 // indirect - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/term v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.1 // indirect + golang.org/x/tools v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/api v0.114.0 // indirect + google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect - google.golang.org/grpc v1.53.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/grpc v1.56.2 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.3 // indirect - k8s.io/component-base v0.27.3 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + k8s.io/apiextensions-apiserver v0.27.4 // indirect + k8s.io/component-base v0.27.4 // indirect + k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect + k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 56babceaa..bdd33cbcf 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -13,20 +13,18 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute v1.22.0 h1:cB8R6FtUtT1TYGl5R3xuxnW6OUIc/DrT2aiR16TTG7Y= +cloud.google.com/go/compute v1.22.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,12 +37,18 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= +github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= +github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= @@ -60,12 +64,14 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= @@ -87,8 +93,8 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.245 h1:KtY2s4q31/kn33AdV63R5t77mdxsI7rq3YT7Mgo805M= -github.com/aws/aws-sdk-go v1.44.245/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= +github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -120,23 +126,28 @@ github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43 h1:XP+uhjN0yBCN/tPkr8Z0BNDc5rZam9RG6UWyf2FrSQ0= -github.com/cncf/xds/go v0.0.0-20230112175826-46e39c7b9b43/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.98.0 h1:potyC1eD0N9n5/P4/WmJuKgg+OGYZOBWEW+/aKTX6QQ= -github.com/digitalocean/godo v1.98.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= +github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= +github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.4+incompatible h1:Kd3Bh9V/rO+XpTP/BLqM+gx8z7+Yb0AA2Ibj+nNo4ek= -github.com/docker/docker v23.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= +github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -144,8 +155,8 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd h1:svR6KxSP1xiPw10RN4Pd7g6BAVkEcNN628PAqZH31mM= -github.com/efficientgo/tools/core v0.0.0-20220817170617-6c25e3b627dd/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M= +github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= +github.com/efficientgo/core v1.0.0-rc.2/go.mod h1:FfGdkzWarkuzOlY04VY+bGfb1lWrjaL6x/GLcQ4vJps= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -153,11 +164,12 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.0 h1:jtLewhRR2vMRNnq2ZZUoCjUlgut+Y0+sDDWPOfwOi1o= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -165,8 +177,9 @@ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= -github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -205,12 +218,13 @@ github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9Qy github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc= -github.com/go-openapi/errors v0.20.3/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= +github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= +github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= @@ -218,12 +232,12 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.25.0 h1:7yQTCdRbWhX8vnIjdzU8S00tBYf7Sg71EBeorlPHvhc= -github.com/go-openapi/runtime v0.25.0/go.mod h1:Ux6fikcHXyyob6LNWxtE96hWwjBPYF0DXgVFuMTneOs= +github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= +github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= -github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= +github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= @@ -280,7 +294,6 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -349,30 +362,32 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/gophercloud/gophercloud v1.3.0 h1:RUKyCMiZoQR3VlVR5E3K7PK1AC3/qppsWYo6dtBiqs8= -github.com/gophercloud/gophercloud v1.3.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= +github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= -github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= -github.com/hashicorp/consul/sdk v0.13.1 h1:EygWVWWMczTzXGpO93awkHFzfUka6hLYJ0qhETd+6lY= -github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= -github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= +github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= +github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= +github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= +github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= +github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -380,20 +395,20 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= -github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= -github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= +github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= +github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -401,7 +416,7 @@ github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0S github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -411,20 +426,20 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197 h1:I5xhKLePXpXgM6pZ4xZNTiurLLS3sGuZrZFFzAbM67A= -github.com/hashicorp/nomad/api v0.0.0-20230418003350-3067191c5197/go.mod h1:2TCrNvonL09r7EiQ6M2rNt+Cmjbn1QbzchFoTWJFpj4= +github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= +github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go v1.42.0 h1:Es/CDOForQN3nOOP5Vxh1N/YHjpCg386iYEX5zCgi+A= -github.com/hetznercloud/hcloud-go v1.42.0/go.mod h1:YADL8AbmQYH0Eo+1lkuyoc8LutT0UeMvaKP47nNUb+Y= +github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= +github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.6 h1:0n4irdqNska+1s3YMCRhrAqKbibEgQ7SwwhAlHzYT5A= -github.com/ionos-cloud/sdk-go/v6 v6.1.6/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= +github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -451,6 +466,8 @@ github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0Lh github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= @@ -469,10 +486,11 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/linode/linodego v1.16.1 h1:5otq57M4PdHycPERRfSFZ0s1yz1ETVWGjCp3hh7+F9w= -github.com/linode/linodego v1.16.1/go.mod h1:aESRAbpLY9R6IA1WGAWHikRI9DU9Lhesapv1MhKmPHM= +github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= +github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -503,8 +521,8 @@ github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQo github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.53 h1:ZBkuHr5dxHtB1caEOlZTLPo7D3L3TWckgUUs/RHfDxw= -github.com/miekg/dns v1.1.53/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -552,6 +570,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -561,14 +581,14 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-community/prom-label-proxy v0.6.0 h1:vRY29tUex8qI2MEimovTzJdieEwiSko+f7GuPCLjFkI= -github.com/prometheus-community/prom-label-proxy v0.6.0/go.mod h1:XyAyskjjhqEx0qnbGUVeAkYSz3Wm9gStT7/wXFxD8n0= -github.com/prometheus-operator/prometheus-operator v0.66.0 h1:Jj4mbGAkfBbTih6ait03f2vUjEHB7Kb4gnlAmWu7AJ0= -github.com/prometheus-operator/prometheus-operator v0.66.0/go.mod h1:U7S3+u6YTxwCTMNIQxZWttEq70qBA4Qps7/c5mUZOpQ= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0 h1:PPW01FLVjJHMNcbAL1DDD9EZceSQKMOU/VpK0irrxrI= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.66.0/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0 h1:gDJAO9dJbRZ3RAQ7MY+tjz1D3o1x7T4hd8Jbi0Xo854= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.66.0/go.mod h1:gNFnGtaWQ8SziJCfahdiAUlArtoL1+cm1hAD7l6L14w= +github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok= +github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA= +github.com/prometheus-operator/prometheus-operator v0.67.1 h1:LeGZIsI8KZ99A6qJcvXvrxPN7FKJQbDbNxd3UDzmTF4= +github.com/prometheus-operator/prometheus-operator v0.67.1/go.mod h1:8yYIaEL+Xt8+MxZ8s6uiIw0fvD/WiLmjuRTQTG55OEw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 h1:kC77/UqP9o9tDquMbE/eS1J2wi0tNlYzhNJSXx9KPS4= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1/go.mod h1:77dVxBmR4RbIrP6DSVeZCeknlxFZtS4287RaDXMMOoA= github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -599,10 +619,10 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.44.0 h1:sgn8Fdx+uE5tHQn0/622swlk2XnIj6udoZCnbVjHIgc= -github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/jeCdyOWWobLHNKQg= +github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= +github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/prometheus v0.46.0 h1:9JSdXnsuT6YsbODEhSQMwxNkGwPExfmzqG73vCMk/Kw= +github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -610,11 +630,11 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15 h1:Y7xOFbD+3jaPw+VN7lkakNJ/pa+ZSQVFp1ONtJaBxns= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.15/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 h1:+1H+N9QFl2Sfvia0FBYfMrHYHYhmpZxhSE0wpPL2lYs= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shoenig/test v0.6.3 h1:GVXWJFk9PiOjN0KoJ7VrJGH6uLPnqxR7/fe3HUPfE0c= +github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -648,8 +668,6 @@ github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= @@ -660,8 +678,10 @@ github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49 github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= @@ -675,8 +695,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.11.4 h1:4ayjakA013OdpGyL2K3ZqylTac/rMjrJOMZ1EHizXas= -go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= +go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -684,16 +704,17 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= +go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= +go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= @@ -715,12 +736,13 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -731,8 +753,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= -golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -755,8 +777,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -799,16 +821,16 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -822,8 +844,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -874,6 +896,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -886,14 +909,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -902,10 +925,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -931,7 +955,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -961,8 +984,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -985,8 +1008,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= +google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1026,8 +1049,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1044,8 +1071,9 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1059,8 +1087,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1086,7 +1114,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= @@ -1099,20 +1126,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= -k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= -k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= +k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= -k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= -k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= +k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= +k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= -k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= +k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= +k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= @@ -1121,7 +1148,7 @@ sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0 sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index f5e05aea7..3df39e095 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -187,6 +187,7 @@ func (w *PrometheusCRWatcher) LoadConfig(ctx context.Context) (*promconfig.Confi } generatedConfig, err := w.configGenerator.GenerateServerConfiguration( + ctx, "30s", "", nil, From 84ad4ee1c9eb033dbe0114c45c3aec8401d5d41b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 13:10:30 -0400 Subject: [PATCH 0956/1234] Bump the kubernetes group in /cmd/otel-allocator with 1 update (#1992) Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.0...v0.15.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index c3ef94e0e..8c165ed3d 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/apimachinery v0.27.4 k8s.io/client-go v0.27.4 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime v0.15.1 ) require ( diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index bdd33cbcf..e108252b7 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1144,8 +1144,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= +sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 5104e7241b61a536f24f5143df500831ccb1b73c Mon Sep 17 00:00:00 2001 From: Ben B Date: Wed, 9 Aug 2023 11:46:03 +0200 Subject: [PATCH 0957/1234] Prepare changelog for release v0.82.0 (#1999) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Benedikt Bongartz Co-authored-by: Mikołaj Świątek --- ...e-prometheusexporter-pod-when-enabled.yaml | 16 ------- .../1768-gather-metrics-from-collectors.yaml | 16 ------- .../1773-targetallocator-env-handling.yaml | 17 -------- .chloggen/1879-publish-bundle-images.yaml | 16 ------- ...nagementstate-field-to-collector-spec.yaml | 16 ------- .../1931-allow-customize-monitoring-port.yaml | 16 ------- .chloggen/1954-remove-legacy-port.yaml | 16 ------- .chloggen/1954.yaml | 16 ------- ...y-spread-constraints-and-nodeselector.yaml | 16 ------- .chloggen/bump-dotnet.yaml | 16 ------- .chloggen/bump-go-instrumentation.yaml | 16 ------- .chloggen/bump-java.yaml | 16 ------- .chloggen/bump-js.yaml | 16 ------- .chloggen/bump-python.yaml | 16 ------- .chloggen/feat_restart-targetallocator.yaml | 16 ------- .../feat_scrape-config-configurable.yaml | 16 ------- .chloggen/fix-for-1893.yaml | 16 ------- .chloggen/initcontainer-securitycontext.yaml | 16 ------- .chloggen/readme-updates.yaml | 16 ------- CHANGELOG.md | 43 +++++++++++++++++++ README.md | 12 +++--- RELEASE.md | 4 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++-- versions.txt | 16 +++---- 24 files changed, 63 insertions(+), 325 deletions(-) delete mode 100755 .chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml delete mode 100755 .chloggen/1768-gather-metrics-from-collectors.yaml delete mode 100644 .chloggen/1773-targetallocator-env-handling.yaml delete mode 100755 .chloggen/1879-publish-bundle-images.yaml delete mode 100755 .chloggen/1881-add-managementstate-field-to-collector-spec.yaml delete mode 100755 .chloggen/1931-allow-customize-monitoring-port.yaml delete mode 100755 .chloggen/1954-remove-legacy-port.yaml delete mode 100755 .chloggen/1954.yaml delete mode 100644 .chloggen/add-topology-spread-constraints-and-nodeselector.yaml delete mode 100755 .chloggen/bump-dotnet.yaml delete mode 100755 .chloggen/bump-go-instrumentation.yaml delete mode 100755 .chloggen/bump-java.yaml delete mode 100755 .chloggen/bump-js.yaml delete mode 100755 .chloggen/bump-python.yaml delete mode 100755 .chloggen/feat_restart-targetallocator.yaml delete mode 100755 .chloggen/feat_scrape-config-configurable.yaml delete mode 100644 .chloggen/fix-for-1893.yaml delete mode 100755 .chloggen/initcontainer-securitycontext.yaml delete mode 100644 .chloggen/readme-updates.yaml diff --git a/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml b/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml deleted file mode 100755 index 2545b5cbc..000000000 --- a/.chloggen/1689-expose-prometheusexporter-pod-when-enabled.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Expose the Prometheus exporter port in the OpenTelemetry Collector container when it is used in the configuration. - -# One or more tracking issues related to the change -issues: [1689] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1768-gather-metrics-from-collectors.yaml b/.chloggen/1768-gather-metrics-from-collectors.yaml deleted file mode 100755 index 27892054e..000000000 --- a/.chloggen/1768-gather-metrics-from-collectors.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add the ability to the operator to create Service Monitors for the OpenTelemetry Collectors in order to gather the metrics they are generating - -# One or more tracking issues related to the change -issues: [1768] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1773-targetallocator-env-handling.yaml b/.chloggen/1773-targetallocator-env-handling.yaml deleted file mode 100644 index 4ca451b73..000000000 --- a/.chloggen/1773-targetallocator-env-handling.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: | - Add support for environment variables in target allocator config. - -# One or more tracking issues related to the change -issues: [1773] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1879-publish-bundle-images.yaml b/.chloggen/1879-publish-bundle-images.yaml deleted file mode 100755 index d1c0c99e3..000000000 --- a/.chloggen/1879-publish-bundle-images.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add a GitHub Actions Workflow to build and publish the operator bundle images - -# One or more tracking issues related to the change -issues: [1879] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml b/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml deleted file mode 100755 index a54005d2a..000000000 --- a/.chloggen/1881-add-managementstate-field-to-collector-spec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add a new field called `managementState` in the OpenTelemetry Collector CRD. - -# One or more tracking issues related to the change -issues: [1881] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/1931-allow-customize-monitoring-port.yaml b/.chloggen/1931-allow-customize-monitoring-port.yaml deleted file mode 100755 index 3f214cf71..000000000 --- a/.chloggen/1931-allow-customize-monitoring-port.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: When an user specifies the monitoring port for their collector in the configuration, the monitoring service uses that port. - -# One or more tracking issues related to the change -issues: [1931] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1954-remove-legacy-port.yaml b/.chloggen/1954-remove-legacy-port.yaml deleted file mode 100755 index cfff1101f..000000000 --- a/.chloggen/1954-remove-legacy-port.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove legacy OTLP HTTP port - -# One or more tracking issues related to the change -issues: [1954] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1954.yaml b/.chloggen/1954.yaml deleted file mode 100755 index 67c259590..000000000 --- a/.chloggen/1954.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix port name matching between ingress/route and service. All ports are truncated to 15 characters. If the port name is longer it is changed to port-%d pattern. - -# One or more tracking issues related to the change -issues: [1954] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml b/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml deleted file mode 100644 index 3f4b6b8e0..000000000 --- a/.chloggen/add-topology-spread-constraints-and-nodeselector.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add support for TopologySpreadConstraints & nodeSelector on collector and target allocator - -# One or more tracking issues related to the change -issues: [1899] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-dotnet.yaml b/.chloggen/bump-dotnet.yaml deleted file mode 100755 index 2315c57c2..000000000 --- a/.chloggen/bump-dotnet.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump dotnet dependency to 1.0.0-rc.1 - -# One or more tracking issues related to the change -issues: [1978] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-go-instrumentation.yaml b/.chloggen/bump-go-instrumentation.yaml deleted file mode 100755 index 12a638e83..000000000 --- a/.chloggen/bump-go-instrumentation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump opentelemetry-go-instrumentation image to v0.2.2-alpha - -# One or more tracking issues related to the change -issues: [1915] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-java.yaml b/.chloggen/bump-java.yaml deleted file mode 100755 index 207b14920..000000000 --- a/.chloggen/bump-java.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bumps java autoinstrumentation version to 1.28.0 - -# One or more tracking issues related to the change -issues: [1918] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-js.yaml b/.chloggen/bump-js.yaml deleted file mode 100755 index 96504fb2b..000000000 --- a/.chloggen/bump-js.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentaion - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump NodeJS dependencies to 1.15.1/0.41.1 - -# One or more tracking issues related to the change -issues: [1977] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-python.yaml b/.chloggen/bump-python.yaml deleted file mode 100755 index 89836e194..000000000 --- a/.chloggen/bump-python.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump python packages to 1.19.0/0.40b0 - -# One or more tracking issues related to the change -issues: [1930] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/feat_restart-targetallocator.yaml b/.chloggen/feat_restart-targetallocator.yaml deleted file mode 100755 index fc34e1a3f..000000000 --- a/.chloggen/feat_restart-targetallocator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Restart target allocator when its configuration changes - -# One or more tracking issues related to the change -issues: [1882] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/feat_scrape-config-configurable.yaml b/.chloggen/feat_scrape-config-configurable.yaml deleted file mode 100755 index 8c60b8655..000000000 --- a/.chloggen/feat_scrape-config-configurable.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Make the Target Allocator default scrape interval for Prometheus CRs configurable - -# One or more tracking issues related to the change -issues: [1925] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: Note that this only works for Prometheus CRs, raw Prometheus configuration from the receiver uses its own settings. diff --git a/.chloggen/fix-for-1893.yaml b/.chloggen/fix-for-1893.yaml deleted file mode 100644 index 726cd70a8..000000000 --- a/.chloggen/fix-for-1893.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Fix for issue #1893" - -# One or more tracking issues related to the change -issues: [1905] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/initcontainer-securitycontext.yaml b/.chloggen/initcontainer-securitycontext.yaml deleted file mode 100755 index 0c1aaf9cf..000000000 --- a/.chloggen/initcontainer-securitycontext.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Set securityContext on injected initContainer based on existing containers. - -# One or more tracking issues related to the change -issues: [1084, 1058] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/readme-updates.yaml b/.chloggen/readme-updates.yaml deleted file mode 100644 index af44f3b3e..000000000 --- a/.chloggen/readme-updates.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Documentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Update OTel Operator and Target Allocator readmes. - -# One or more tracking issues related to the change -issues: [1952] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 01286b6f1..9a68102cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,49 @@ Changes by Version +## 0.82.0 + +### 🛑 Breaking changes 🛑 + +- `operator`: Remove legacy OTLP HTTP port (#1954) + +### 💡 Enhancements 💡 + +- `operator`: Expose the Prometheus exporter port in the OpenTelemetry Collector container when it is used in the configuration. (#1689) +- `operator`: Add the ability to the operator to create Service Monitors for the OpenTelemetry Collectors in order to gather the metrics they are generating (#1768) +- `target allocator`: Add support for environment variables in target allocator config. + (#1773) +- `operator`: Add a GitHub Actions Workflow to build and publish the operator bundle images (#1879) +- `operator`: Add a new field called `managementState` in the OpenTelemetry Collector CRD. (#1881) +- `operator`: When an user specifies the monitoring port for their collector in the configuration, the monitoring service uses that port. (#1931) +- `operator`: Add support for TopologySpreadConstraints & nodeSelector on collector and target allocator (#1899) +- `autoinstrumentation`: Bump dotnet dependency to 1.0.0-rc.1 (#1978) +- `autoinstrumentation`: Bump opentelemetry-go-instrumentation image to v0.2.2-alpha (#1915) +- `autoinstrumentation`: Bumps java autoinstrumentation version to 1.28.0 (#1918) +- `autoinstrumentaion`: Bump NodeJS dependencies to 1.15.1/0.41.1 (#1977) +- `autoinstrumentation`: Bump python packages to 1.19.0/0.40b0 (#1930) +- `target allocator`: Restart target allocator when its configuration changes (#1882) +- `target allocator`: Make the Target Allocator default scrape interval for Prometheus CRs configurable (#1925) + Note that this only works for Prometheus CRs, raw Prometheus configuration from the receiver uses its own settings. +- `operator`: Set securityContext on injected initContainer based on existing containers. (#1084, #1058) +- `Documentation`: Update OTel Operator and Target Allocator readmes. (#1952) + +### 🧰 Bug fixes 🧰 + +- `operator`: Fix port name matching between ingress/route and service. All ports are truncated to 15 characters. If the port name is longer it is changed to port-%d pattern. (#1954) +- `operator`: Fix for issue #1893 (#1905) + +### Components + +* [OpenTelemetry Collector - v0.82.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.82.0) +* [OpenTelemetry Contrib - v0.82.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.82.0) +* [Java auto-instrumentation - 1.28.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.28.0) +* [.NET auto-instrumentation - 1.0.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0-rc.1) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) +* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) + ## 0.81.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index ab17b9b47..b63b1ce96 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The default and only other acceptable value for `.Spec.UpgradeStrategy` is `auto ### Deployment modes -The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the Collector should run as a [`DaemonSet`](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/), [`Sidecar`](https://kubernetes.io/docs/concepts/workloads/pods/#workload-resources-for-managing-pods), [`StatefulSet`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) or [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) (default). +The `CustomResource` for the `OpenTelemetryCollector` exposes a property named `.Spec.Mode`, which can be used to specify whether the Collector should run as a [`DaemonSet`](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/), [`Sidecar`](https://kubernetes.io/docs/concepts/workloads/pods/#workload-resources-for-managing-pods), [`StatefulSet`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) or [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) (default). See below for examples of each deployment mode: - [`Deployment`](https://github.com/open-telemetry/opentelemetry-operator/blob/main/tests/e2e/ingress/00-install.yaml) @@ -231,7 +231,7 @@ Valid values for `propagators` are defined by the [OpenTelemetry Specification f The value for `sampler.type` is added to the `OTEL_TRACES_SAMPLER` envrionment variable. Valid values for `sampler.type` are defined by the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler). -The value for `sampler.argument` is added to the `OTEL_TRACES_SAMPLER_ARG` environment variable. Valid values for `sampler.argument` will depend on the chosen sampler. See the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER_ARG](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler_arg) for more details. +The value for `sampler.argument` is added to the `OTEL_TRACES_SAMPLER_ARG` environment variable. Valid values for `sampler.argument` will depend on the chosen sampler. See the [OpenTelemetry Specification for OTEL_TRACES_SAMPLER_ARG](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_traces_sampler_arg) for more details. The above CR can be queried by `kubectl get otelinst`. @@ -441,7 +441,7 @@ spec: replacement: $$1 - action: labelmap regex: label_(.+) - replacement: $$1 + replacement: $$1 exporters: logging: @@ -473,7 +473,7 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con replacement: $$1 - action: labelmap regex: label_(.+) - replacement: $$1 + replacement: $$1 exporters: logging: @@ -503,7 +503,7 @@ The OpenTelemetry Operator will also convert the Target Allocator's Prometheus c replacement: $1 - action: labelmap regex: label_(.+) - replacement: $1 + replacement: $1 ``` Note that in this case, the Operator replaces "$$" with a single "$" in the replacement keys. This is because the collector supports environment variable substitution, whereas the TA (Target Allocator) does not. Therefore, to ensure compatibility, the TA configuration should only contain a single "$" symbol. @@ -589,6 +589,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.82.0 | v1.19 to v1.27 | v1 | | v0.81.0 | v1.19 to v1.27 | v1 | | v0.80.0 | v1.19 to v1.27 | v1 | | v0.79.0 | v1.19 to v1.27 | v1 | @@ -611,7 +612,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.61.0 | v1.19 to v1.25 | v1 | | v0.60.0 | v1.19 to v1.25 | v1 | | v0.59.0 | v1.19 to v1.24 | v1 | -| v0.58.0 | v1.19 to v1.24 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 7985c4beb..cdf51e578 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. -2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. +2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. 3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. 4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. 5. Add the changes to the changelog. Manually add versions of all operator components. @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.82.0 | @frzifus | | v0.83.0 | @yuriolisa | | v0.84.0 | @jaronoff97 | | v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | +| v0.89.0 | @frzifus | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7131706fe..22ffb7baa 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-08-04T13:28:05Z" + createdAt: "2023-08-08T13:26:23Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.81.0 + name: opentelemetry-operator.v0.82.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -332,7 +332,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.81.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.82.0 livenessProbe: httpGet: path: /healthz @@ -439,7 +439,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.81.0 + version: 0.82.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index a20261dac..204c34f90 100644 --- a/versions.txt +++ b/versions.txt @@ -2,32 +2,32 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.81.0 +opentelemetry-collector=0.82.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.81.0 +operator=0.82.0 # Represents the current release of the Target Allocator. -targetallocator=0.81.0 +targetallocator=0.82.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.81.0 +operator-opamp-bridge=0.82.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.26.0 +autoinstrumentation-java=1.28.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.40.0 +autoinstrumentation-nodejs=0.41.1 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.39b0 +autoinstrumentation-python=0.40b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=0.7.0 +autoinstrumentation-dotnet=1.0.0-rc.1 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.2.2-alpha From cebfae1ff8d9d5081ccdf31a864822db9cd0c1c4 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 9 Aug 2023 18:50:57 +0200 Subject: [PATCH 0958/1234] Set the level 4 for the operator (#2003) * Set the level 4 for the operator Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .chloggen/2002-set-level-4-operator.yaml | 16 ++++++++++++++++ ...telemetry-operator.clusterserviceversion.yaml | 2 +- ...telemetry-operator.clusterserviceversion.yaml | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 .chloggen/2002-set-level-4-operator.yaml diff --git a/.chloggen/2002-set-level-4-operator.yaml b/.chloggen/2002-set-level-4-operator.yaml new file mode 100755 index 000000000..9bd3e04f9 --- /dev/null +++ b/.chloggen/2002-set-level-4-operator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Set the level 4 of capabilities in the CSV for the OpenTelemetry Operator. + +# One or more tracking issues related to the change +issues: [2002] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 22ffb7baa..28f58e983 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -27,7 +27,7 @@ metadata: } } ] - capabilities: Basic Install + capabilities: Deep Insights categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 8b814d4a9..c762dd3bf 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -3,7 +3,7 @@ kind: ClusterServiceVersion metadata: annotations: alm-examples: '[]' - capabilities: Basic Install + capabilities: Deep Insights categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator From 4ed9de46ac9be5458719533632359389c5ea0524 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:49:47 -0400 Subject: [PATCH 0959/1234] Bump golang from 1.20 to 1.21 (#2000) Bumps golang from 1.20 to 1.21. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 81296bd41..d097f82cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.20 as builder +FROM golang:1.21 as builder WORKDIR /workspace # Copy the Go Modules manifests From bf1362d885f84d43e4dd3d40dd493e4daa1ea238 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 9 Aug 2023 19:51:02 +0200 Subject: [PATCH 0960/1234] Expose the pprof server in the operator (#1998) * Add changelog Signed-off-by: Israel Blancas * Expose pprof server Signed-off-by: Israel Blancas * Fix changelog Signed-off-by: Israel Blancas * Apply changes requested in CR Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .chloggen/1997-expose-pprof-server.yaml | 16 ++++++++++++++++ main.go | 3 +++ 2 files changed, 19 insertions(+) create mode 100755 .chloggen/1997-expose-pprof-server.yaml diff --git a/.chloggen/1997-expose-pprof-server.yaml b/.chloggen/1997-expose-pprof-server.yaml new file mode 100755 index 000000000..3d3145600 --- /dev/null +++ b/.chloggen/1997-expose-pprof-server.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add flag to enable support for the pprof server in the operator. + +# One or more tracking issues related to the change +issues: [1997] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/main.go b/main.go index c7538a306..622a67a90 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,7 @@ func main() { var ( metricsAddr string probeAddr string + pprofAddr string enableLeaderElection bool collectorImage string targetAllocatorImage string @@ -107,6 +108,7 @@ func main() { pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") + pflag.StringVar(&pprofAddr, "pprof-addr", "", "The address to expose the pprof server. Default is empty string which disables the pprof server.") pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") @@ -203,6 +205,7 @@ func main() { LeaseDuration: &leaseDuration, RenewDeadline: &renewDeadline, RetryPeriod: &retryPeriod, + PprofBindAddress: pprofAddr, WebhookServer: webhook.NewServer(webhook.Options{ Port: webhookPort, TLSOpts: optionsTlSOptsFuncs, From 3bebd4b23deacdd533acd3427003f6eb01386c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 10 Aug 2023 14:42:16 +0000 Subject: [PATCH 0961/1234] Add dependabot rules for TA and opamp-bridge Dockerfiles (#2005) --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7b29a7cb2..86ba93a58 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -71,3 +71,13 @@ updates: directory: / schedule: interval: daily + + - package-ecosystem: docker + directory: /cmd/otel-allocator + schedule: + interval: daily + + - package-ecosystem: docker + directory: /cmd/operator-opamp-bridge + schedule: + interval: daily From e2ab1baedcf41d66c0825b28d758aefd9ceeef32 Mon Sep 17 00:00:00 2001 From: Matt Christiansen Date: Thu, 10 Aug 2023 10:44:53 -0700 Subject: [PATCH 0962/1234] Adding Additional Containers to the Collector spec (#1980) * Adding additional container specs to support sidecars and other containers in the collector pod Signed-off-by: Matt Christiansen * Addressing code review comments: Improving the godoc comment, adding changelog file * Update apis/v1alpha1/opentelemetrycollector_types.go Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * Update apis/v1alpha1/opentelemetrycollector_types.go Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * Adding in an assertion that the additional container equals input * Adding webhook validation and improving comments based on PR feedback --------- Signed-off-by: Matt Christiansen Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- ...adding-support-for-sidecar-containers.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 16 + .../opentelemetrycollector_webhook.go | 4 + .../opentelemetrycollector_webhook_test.go | 14 + apis/v1alpha1/zz_generated.deepcopy.go | 7 + ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 1280 +++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 1280 +++++++++ config/manager/kustomization.yaml | 6 + docs/api.md | 2355 +++++++++++++++++ internal/manifests/collector/daemonset.go | 2 +- .../manifests/collector/daemonset_test.go | 28 + internal/manifests/collector/deployment.go | 2 +- .../manifests/collector/deployment_test.go | 28 + internal/manifests/collector/statefulset.go | 2 +- .../manifests/collector/statefulset_test.go | 28 + 16 files changed, 5066 insertions(+), 4 deletions(-) create mode 100644 .chloggen/1987-adding-support-for-sidecar-containers.yaml diff --git a/.chloggen/1987-adding-support-for-sidecar-containers.yaml b/.chloggen/1987-adding-support-for-sidecar-containers.yaml new file mode 100644 index 000000000..99eacda19 --- /dev/null +++ b/.chloggen/1987-adding-support-for-sidecar-containers.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add `AdditionalContainers` to the collector spec allowing to configure sidecar containers. This only applies to Deployment/StatefulSet/DeamonSet deployment modes of the collector. + +# One or more tracking issues related to the change +issues: [1987] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index a4f9869b4..3b4dcccf3 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -213,6 +213,22 @@ type OpenTelemetryCollectorSpec struct { // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` + // AdditionalContainers allows injecting additional containers into the Collector's pod definition. + // These sidecar containers can be used for authentication proxies, log shipping sidecars, agents for shipping + // metrics to their cloud, or in general sidecars that do not support automatic injection. This option only + // applies to Deployment, DaemonSet, and StatefulSet deployment modes of the collector. It does not apply to the sidecar + // deployment mode. More info about sidecars: + // https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + // + // Container names managed by the operator: + // * `otc-container` + // + // Overriding containers managed by the operator is outside the scope of what the maintainers will support and by + // doing so, you wil accept the risk of it breaking things. + // + // +optional + AdditionalContainers []v1.Container `json:"additionalContainers,omitempty"` + // ObservabilitySpec defines how telemetry data gets handled. // // +optional diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index bff4099c7..685819e2e 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -155,6 +155,10 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'affinity'", r.Spec.Mode) } + if r.Spec.Mode == ModeSidecar && len(r.Spec.AdditionalContainers) > 0 { + return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'AdditionalContainers'", r.Spec.Mode) + } + // validate target allocation if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index a03a178f4..338a42ebb 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -605,6 +605,20 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "the OpenTelemetry Spec LivenessProbe TerminationGracePeriodSeconds configuration is incorrect", }, + { + name: "invalid AdditionalContainers", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + AdditionalContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'AdditionalContainers'", + }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 800934266..7bbb4f748 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -645,6 +645,13 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.AdditionalContainers != nil { + in, out := &in.AdditionalContainers, &out.AdditionalContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } out.Observability = in.Observability if in.TopologySpreadConstraints != nil { in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 28f58e983..c4c2874a1 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-08-08T13:26:23Z" + createdAt: "2023-08-09T22:53:11Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index d0401c562..f8c0fa37e 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -63,6 +63,1286 @@ spec: spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: + additionalContainers: + description: "AdditionalContainers allows injecting additional containers + into the Collector's pod definition. These sidecar containers can + be used for authentication proxies, log shipping sidecars, agents + for shipping metrics to their cloud, or in general sidecars that + do not support automatic injection. This option only applies to + Deployment, DaemonSet, and StatefulSet deployment modes of the collector. + It does not apply to the sidecar deployment mode. More info about + sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + \n Container names managed by the operator: * `otc-container` \n + Overriding containers managed by the operator is outside the scope + of what the maintainers will support and by doing so, you wil accept + the risk of it breaking things." + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must only be set if type + is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is + alpha-level and will only be honored by components + that enable the WindowsHostProcessContainers feature + flag. Setting this field without the feature flag + will result in errors when validating the Pod. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a mix + of HostProcess containers and non-HostProcess containers). In + addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array affinity: description: If specified, indicates the pod's scheduling constraints properties: diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 04d9bdc2c..99f422f2d 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -60,6 +60,1286 @@ spec: spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: + additionalContainers: + description: "AdditionalContainers allows injecting additional containers + into the Collector's pod definition. These sidecar containers can + be used for authentication proxies, log shipping sidecars, agents + for shipping metrics to their cloud, or in general sidecars that + do not support automatic injection. This option only applies to + Deployment, DaemonSet, and StatefulSet deployment modes of the collector. + It does not apply to the sidecar deployment mode. More info about + sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + \n Container names managed by the operator: * `otc-container` \n + Overriding containers managed by the operator is outside the scope + of what the maintainers will support and by doing so, you wil accept + the risk of it breaking things." + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must only be set if type + is "Localhost". + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. This field is + alpha-level and will only be honored by components + that enable the WindowsHostProcessContainers feature + flag. Setting this field without the feature flag + will result in errors when validating the Pod. All + of a Pod's containers must have the same effective + HostProcess value (it is not allowed to have a mix + of HostProcess containers and non-HostProcess containers). In + addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array affinity: description: If specified, indicates the pod's scheduling constraints properties: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..c7d0c9fab 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: ghcr.io/matt/opentelemetry-operator/opentelemetry-operator + newTag: 0.82.0-9-g6f4246c diff --git a/docs/api.md b/docs/api.md index 12cddde7a..c9a286552 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3612,6 +3612,15 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + additionalContainers + []object + + AdditionalContainers allows injecting additional containers into the Collector's pod definition. These sidecar containers can be used for authentication proxies, log shipping sidecars, agents for shipping metrics to their cloud, or in general sidecars that do not support automatic injection. This option only applies to Deployment, DaemonSet, and StatefulSet deployment modes of the collector. It does not apply to the sidecar deployment mode. More info about sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + Container names managed by the operator: * `otc-container` + Overriding containers managed by the operator is outside the scope of what the maintainers will support and by doing so, you wil accept the risk of it breaking things.
+ + false + affinity object @@ -3875,6 +3884,2352 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. +### OpenTelemetryCollector.spec.additionalContainers[index] +[↩ Parent](#opentelemetrycollectorspec) + + + +A single application container that you want to run within a pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
+
true
args[]string + Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+
false
command[]string + Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+
false
env[]object + List of environment variables to set in the container. Cannot be updated.
+
false
envFrom[]object + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
+
false
imagestring + Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
+
false
imagePullPolicystring + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+
false
lifecycleobject + Actions that the management system should take in response to container lifecycle events. Cannot be updated.
+
false
livenessProbeobject + Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
ports[]object + List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.
+
false
readinessProbeobject + Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
resizePolicy[]object + Resources resize policy for the container.
+
false
resourcesobject + Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
securityContextobject + SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+
false
startupProbeobject + StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
false
stdinboolean + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.
+
false
stdinOnceboolean + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
+
false
terminationMessagePathstring + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
+
false
terminationMessagePolicystring + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
+
false
ttyboolean + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.
+
false
volumeDevices[]object + volumeDevices is the list of block devices to be used by the container.
+
false
volumeMounts[]object + Pod volumes to mount into the container's filesystem. Cannot be updated.
+
false
workingDirstring + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index].valueFrom +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index].valueFrom.configMapKeyRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index].valueFrom.fieldRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index].valueFrom.resourceFieldRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].env[index].valueFrom.secretKeyRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].envFrom[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +EnvFromSource represents the source of a set of ConfigMaps + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapRefobject + The ConfigMap to select from
+
false
prefixstring + An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+
false
secretRefobject + The Secret to select from
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].envFrom[index].configMapRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvfromindex) + + + +The ConfigMap to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap must be defined
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].envFrom[index].secretRef +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexenvfromindex) + + + +The Secret to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret must be defined
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +Actions that the management system should take in response to container lifecycle events. Cannot be updated. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
postStartobject + PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
preStopobject + PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycle) + + + +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.exec +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststart) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.httpGet +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststart) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststarthttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststart) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycle) + + + +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
tcpSocketobject + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.exec +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestop) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.httpGet +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestop) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestophttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestop) + + + +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe.exec +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlivenessprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe.grpc +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlivenessprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlivenessprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlivenessprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlivenessprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].ports[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +ContainerPort represents a network port in a single container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
containerPortinteger + Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.
+
+ Format: int32
+
true
hostIPstring + What host IP to bind the external port to.
+
false
hostPortinteger + Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
+
+ Format: int32
+
false
namestring + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.
+
false
protocolstring + Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".
+
+ Default: TCP
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe.exec +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexreadinessprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe.grpc +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexreadinessprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexreadinessprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexreadinessprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].readinessProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexreadinessprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].resizePolicy[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +ContainerResizePolicy represents resource resize policy for the container. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourceNamestring + Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.
+
true
restartPolicystring + Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].resources +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + This field is immutable. It can only be set for containers.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].resources.claims[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].securityContext +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowPrivilegeEscalationboolean + AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
+
false
capabilitiesobject + The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
+
false
privilegedboolean + Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
+
false
procMountstring + procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
+
false
readOnlyRootFilesystemboolean + Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+
false
seccompProfileobject + The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].securityContext.capabilities +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexsecuritycontext) + + + +The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
add[]string + Added capabilities
+
false
drop[]string + Removed capabilities
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].securityContext.seLinuxOptions +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexsecuritycontext) + + + +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].securityContext.seccompProfile +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexsecuritycontext) + + + +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].securityContext.windowsOptions +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
execobject + Exec specifies the action to take.
+
false
failureThresholdinteger + Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.
+
+ Format: int32
+
false
grpcobject + GRPC specifies an action involving a GRPC port.
+
false
httpGetobject + HTTPGet specifies the http request to perform.
+
false
initialDelaySecondsinteger + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
periodSecondsinteger + How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.
+
+ Format: int32
+
false
successThresholdinteger + Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
+
+ Format: int32
+
false
tcpSocketobject + TCPSocket specifies an action involving a TCP port.
+
false
terminationGracePeriodSecondsinteger + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+
+ Format: int64
+
false
timeoutSecondsinteger + Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+
+ Format: int32
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe.exec +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexstartupprobe) + + + +Exec specifies the action to take. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
command[]string + Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe.grpc +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexstartupprobe) + + + +GRPC specifies an action involving a GRPC port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + Port number of the gRPC service. Number must be in the range 1 to 65535.
+
+ Format: int32
+
true
servicestring + Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this is not specified, the default behavior is defined by gRPC.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe.httpGet +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexstartupprobe) + + + +HTTPGet specifies the http request to perform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.
+
false
httpHeaders[]object + Custom headers to set in the request. HTTP allows repeated headers.
+
false
pathstring + Path to access on the HTTP server.
+
false
schemestring + Scheme to use for connecting to the host. Defaults to HTTP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe.httpGet.httpHeaders[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexstartupprobehttpget) + + + +HTTPHeader describes a custom header to be used in HTTP probes + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.
+
true
valuestring + The header field value
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].startupProbe.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexstartupprobe) + + + +TCPSocket specifies an action involving a TCP port. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].volumeDevices[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +volumeDevice describes a mapping of a raw block device within a container. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
devicePathstring + devicePath is the path inside of the container that the device will be mapped to.
+
true
namestring + name must match the name of a persistentVolumeClaim in the pod
+
true
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].volumeMounts[index] +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +VolumeMount describes a mounting of a Volume within a container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mountPathstring + Path within the container at which the volume should be mounted. Must not contain ':'.
+
true
namestring + This must match the Name of a Volume.
+
true
mountPropagationstring + mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
+
false
readOnlyboolean + Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
+
false
subPathstring + Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
+
false
subPathExprstring + Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+
false
+ + ### OpenTelemetryCollector.spec.affinity [↩ Parent](#opentelemetrycollectorspec) diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index fe08d0fc5..f947179c0 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -51,7 +51,7 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), InitContainers: otelcol.Spec.InitContainers, - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, + Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), Volumes: Volumes(cfg, otelcol), Tolerations: otelcol.Spec.Tolerations, NodeSelector: otelcol.Spec.NodeSelector, diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index eac639819..92f50326e 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -303,3 +303,31 @@ func TestDaemonSetInitContainer(t *testing.T) { assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) assert.Len(t, d.Spec.Template.Spec.InitContainers, 1) } + +func TestDaemonSetAdditionalContainer(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + AdditionalContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + d := DaemonSet(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Len(t, d.Spec.Template.Spec.Containers, 2) + assert.Equal(t, v1.Container{Name: "test"}, d.Spec.Template.Spec.Containers[0]) +} diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index e4df2cf71..6919e0196 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -53,7 +53,7 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), InitContainers: otelcol.Spec.InitContainers, - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, + Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, diff --git a/internal/manifests/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go index f0661653d..40c7acacc 100644 --- a/internal/manifests/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -417,3 +417,31 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) } + +func TestDeploymentAdditionalContainers(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + AdditionalContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + d := Deployment(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", d.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"]) + assert.Len(t, d.Spec.Template.Spec.Containers, 2) + assert.Equal(t, v1.Container{Name: "test"}, d.Spec.Template.Spec.Containers[0]) +} diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index d00653967..08da8dc00 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -53,7 +53,7 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Spec: corev1.PodSpec{ ServiceAccountName: ServiceAccountName(otelcol), InitContainers: otelcol.Spec.InitContainers, - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, + Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), Volumes: Volumes(cfg, otelcol), DNSPolicy: getDNSPolicy(otelcol), HostNetwork: otelcol.Spec.HostNetwork, diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index c27903e8f..e2e016da5 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -414,3 +414,31 @@ func TestStatefulSetTopologySpreadConstraints(t *testing.T) { assert.NotEmpty(t, s2.Spec.Template.Spec.TopologySpreadConstraints) assert.Equal(t, testTopologySpreadConstraintValue, s2.Spec.Template.Spec.TopologySpreadConstraints) } + +func TestStatefulSetAdditionalContainers(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + AdditionalContainers: []v1.Container{ + { + Name: "test", + }, + }, + }, + } + cfg := config.New() + + // test + s := StatefulSet(cfg, logger, otelcol) + assert.Equal(t, "my-instance-collector", s.Name) + assert.Equal(t, "my-instance-collector", s.Labels["app.kubernetes.io/name"]) + assert.Equal(t, "true", s.Annotations["prometheus.io/scrape"]) + assert.Equal(t, "8888", s.Annotations["prometheus.io/port"]) + assert.Equal(t, "/metrics", s.Annotations["prometheus.io/path"]) + assert.Len(t, s.Spec.Template.Spec.Containers, 2) + assert.Equal(t, v1.Container{Name: "test"}, s.Spec.Template.Spec.Containers[0]) +} From 45581922cc8f81a5cc05883159cead9b8e77d575 Mon Sep 17 00:00:00 2001 From: Angelo Poerio Date: Mon, 14 Aug 2023 16:52:54 +0200 Subject: [PATCH 0963/1234] get servicename from daemonset if possible (#2013) * get servicename from daemonset if possible Signed-off-by: Angelo Poerio * added changelog Signed-off-by: Angelo Poerio --------- Signed-off-by: Angelo Poerio --- .chloggen/servicename-daemonset.yaml | 16 ++++++++++++++++ pkg/instrumentation/sdk.go | 3 +++ 2 files changed, 19 insertions(+) create mode 100755 .chloggen/servicename-daemonset.yaml diff --git a/.chloggen/servicename-daemonset.yaml b/.chloggen/servicename-daemonset.yaml new file mode 100755 index 000000000..31645444c --- /dev/null +++ b/.chloggen/servicename-daemonset.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Daemonsets can be instrumented so the generated servicename should use their name for better discoverability" + +# One or more tracking issues related to the change +issues: [2015] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index eb72d8741..3b02720da 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -309,6 +309,9 @@ func chooseServiceName(pod corev1.Pod, resources map[string]string, index int) s if name := resources[string(semconv.K8SStatefulSetNameKey)]; name != "" { return name } + if name := resources[string(semconv.K8SDaemonSetNameKey)]; name != "" { + return name + } if name := resources[string(semconv.K8SJobNameKey)]; name != "" { return name } From cd1d136a539820a87bbc26fa2d8ff1fb821bbcf1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 16 Aug 2023 15:51:06 +0200 Subject: [PATCH 0964/1234] Make sure OTLP exporter can report data to OTLP ingress/route without additional configuration (#1981) * Make sure OTLP export can report data to OTLP ingress/route without additional configuration. Signed-off-by: Pavol Loffay * Trim CRD description size Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/1967-ingress-path.yaml | 21 + Makefile | 4 +- apis/v1alpha1/ingress_type.go | 15 + apis/v1alpha1/opentelemetrycollector_types.go | 8 +- .../opentelemetrycollector_webhook.go | 6 + .../opentelemetrycollector_webhook_test.go | 11 + .../opentelemetry.io_instrumentations.yaml | 288 +-- ...ntelemetry.io_opentelemetrycollectors.yaml | 1832 +++-------------- .../opentelemetry.io_instrumentations.yaml | 288 +-- ...ntelemetry.io_opentelemetrycollectors.yaml | 1832 +++-------------- config/manager/kustomization.yaml | 6 - docs/api.md | 909 ++++---- internal/manifests/collector/ingress.go | 95 +- internal/manifests/collector/ingress_test.go | 106 +- internal/manifests/collector/route.go | 8 +- kind-1.19.yaml | 13 + kind-1.20.yaml | 13 + kind-1.21.yaml | 13 + kind-1.22.yaml | 13 + kind-1.23.yaml | 13 + kind-1.24.yaml | 13 + kind-1.25.yaml | 13 + kind-1.26.yaml | 13 + kind-1.27.yaml | 13 + pkg/collector/reconcile/ingress_test.go | 5 +- tests/e2e-openshift/route/00-assert.yaml | 4 +- tests/e2e/ingress-subdomains/00-assert.yaml | 45 + tests/e2e/ingress-subdomains/00-install.yaml | 29 + .../01-report-http-spans.yaml | 8 + tests/e2e/ingress/00-assert.yaml | 2 + 30 files changed, 1718 insertions(+), 3921 deletions(-) create mode 100755 .chloggen/1967-ingress-path.yaml create mode 100644 tests/e2e/ingress-subdomains/00-assert.yaml create mode 100644 tests/e2e/ingress-subdomains/00-install.yaml create mode 100644 tests/e2e/ingress-subdomains/01-report-http-spans.yaml diff --git a/.chloggen/1967-ingress-path.yaml b/.chloggen/1967-ingress-path.yaml new file mode 100755 index 000000000..23bd6a1e0 --- /dev/null +++ b/.chloggen/1967-ingress-path.yaml @@ -0,0 +1,21 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Make sure OTLP export can report data to OTLP ingress/route without additional configuration + +# One or more tracking issues related to the change +issues: [1967] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + The ingress can be configured to create a single host with multiple paths or + multiple hosts with subdomains (one per receiver port). + The path from OpenShift route was removed. + The port names are truncate to 15 characters. Users with custom receivers + which create ports with longer name might need to update their configuration. diff --git a/Makefile b/Makefile index 553db2e2d..7d43d3c75 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL) endif BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) -CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true" +CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true,maxDescLen=200" # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -484,4 +484,4 @@ catalog-build: opm bundle-build bundle-push ## Build a catalog image. # Push the catalog image. .PHONY: catalog-push catalog-push: ## Push a catalog image. - docker push $(CATALOG_IMG) \ No newline at end of file + docker push $(CATALOG_IMG) diff --git a/apis/v1alpha1/ingress_type.go b/apis/v1alpha1/ingress_type.go index f7377617c..63ff85884 100644 --- a/apis/v1alpha1/ingress_type.go +++ b/apis/v1alpha1/ingress_type.go @@ -46,3 +46,18 @@ const ( // and re-encrypt using a new certificate. TLSRouteTerminationTypeReencrypt TLSRouteTerminationType = "reencrypt" ) + +// IngressRuleType defines how the collector receivers will be exposed in the Ingress. +// +// +kubebuilder:validation:Enum=path;subdomain +type IngressRuleType string + +const ( + // IngressRuleTypePath configures Ingress to use single host with multiple paths. + // This configuration might require additional ingress setting to rewrite paths. + IngressRuleTypePath IngressRuleType = "path" + + // IngressRuleTypeSubdomain configures Ingress to use multiple hosts - one for each exposed + // receiver port. The port name is used as a subdomain for the host defined in the Ingress e.g. otlp-http.example.com. + IngressRuleTypeSubdomain IngressRuleType = "subdomain" +) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 3b4dcccf3..35fa89e36 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -48,9 +48,15 @@ const ( // SEE: OpenTelemetryCollector.spec.ports[index]. type Ingress struct { // Type default value is: "" - // Supported types are: ingress + // Supported types are: ingress, route Type IngressType `json:"type,omitempty"` + // RuleType defines how Ingress exposes collector receivers. + // IngressRuleTypePath ("path") exposes each receiver port on a unique path on single domain defined in Hostname. + // IngressRuleTypeSubdomain ("subdomain") exposes each receiver port on a unique subdomain of Hostname. + // Default is IngressRuleTypePath ("path"). + RuleType IngressRuleType `json:"ruleType,omitempty"` + // Hostname by which the ingress proxy can be reached. // +optional Hostname string `json:"hostname,omitempty"` diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 685819e2e..0179c8559 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -109,6 +109,9 @@ func (r *OpenTelemetryCollector) Default() { if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge } + if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Ingress.RuleType == "" { + r.Spec.Ingress.RuleType = IngressRuleTypePath + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 @@ -248,6 +251,9 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { ModeDeployment, ModeDaemonSet, ModeStatefulSet, ) } + if r.Spec.Ingress.RuleType == IngressRuleTypeSubdomain && (r.Spec.Ingress.Hostname == "" || r.Spec.Ingress.Hostname == "*") { + return fmt.Errorf("a valid Ingress hostname has to be defined for subdomain ruleType") + } if r.Spec.LivenessProbe != nil { if r.Spec.LivenessProbe.InitialDelaySeconds != nil && *r.Spec.LivenessProbe.InitialDelaySeconds < 0 { diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 338a42ebb..ea44351e7 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -619,6 +619,17 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'AdditionalContainers'", }, + { + name: "missing ingress hostname for subdomain ruleType", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Ingress: Ingress{ + RuleType: IngressRuleTypeSubdomain, + }, + }, + }, + expectedErr: "a valid Ingress hostname has to be defined for subdomain ruleType", + }, } for _, test := range tests { diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 91aca60f2..817eacb1e 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -38,14 +38,14 @@ spec: description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object @@ -59,7 +59,7 @@ spec: attrs: description: 'Attrs defines Apache HTTPD agent specific attributes. The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + spec attributes` . Attributes are documented at https://github.' items: description: EnvVar represents an environment variable present in a Container. @@ -69,15 +69,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -106,8 +100,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -125,7 +118,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -177,12 +170,7 @@ spec: only if different from default "/usr/local/apache2/conf" type: string env: - description: 'Env defines Apache HTTPD specific env vars. There - are four layers for env vars'' definitions and the precedence - order is: `original container env vars` > `language specific - env vars` > `common env vars` > `instrument spec configs'' vars`. - If the former var had been defined, then the other vars would - be ignored.' + description: Env defines Apache HTTPD specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -192,15 +180,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -229,8 +211,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -248,7 +229,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -305,8 +286,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -340,11 +320,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object version: @@ -356,11 +333,7 @@ spec: description: DotNet defines configuration for DotNet auto-instrumentation. properties: env: - description: 'Env defines DotNet specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines DotNet specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -370,15 +343,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -407,8 +374,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -426,7 +392,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -483,8 +449,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -518,20 +483,13 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object env: - description: 'Env defines common env vars. There are four layers for - env vars'' definitions and the precedence order is: `original container - env vars` > `language specific env vars` > `common env vars` > `instrument - spec configs'' vars`. If the former var had been defined, then the - other vars would be ignored.' + description: Env defines common env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -540,15 +498,9 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -576,7 +528,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + status.' properties: apiVersion: description: Version of the schema the FieldPath is @@ -594,7 +546,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -648,18 +600,9 @@ spec: type: object go: description: Go defines configuration for Go auto-instrumentation. - When using Go auto-instrumenetation you must provide a value for - the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env - vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe - pod annotation. Failure to set this value causes instrumentation - injection to abort, leaving the original pod unchanged. properties: env: - description: 'Env defines Go specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines Go specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -669,15 +612,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -706,8 +643,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -725,7 +661,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -782,8 +718,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -817,11 +752,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -829,11 +761,7 @@ spec: description: Java defines configuration for java auto-instrumentation. properties: env: - description: 'Env defines java specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines java specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -843,15 +771,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -880,8 +802,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -899,7 +820,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -957,8 +878,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -992,11 +912,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1006,7 +923,7 @@ spec: attrs: description: 'Attrs defines Nginx agent specific attributes. The precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + spec attributes` . Attributes are documented at https://github.' items: description: EnvVar represents an environment variable present in a Container. @@ -1016,15 +933,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1053,8 +964,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1072,7 +982,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1124,11 +1034,7 @@ spec: if different from default "/etx/nginx/nginx.conf" type: string env: - description: 'Env defines Nginx specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines Nginx specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1138,15 +1044,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1175,8 +1075,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1194,7 +1093,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1251,8 +1150,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1286,11 +1184,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1298,11 +1193,7 @@ spec: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: env: - description: 'Env defines nodejs specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines nodejs specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1312,15 +1203,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1349,8 +1234,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1368,7 +1252,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1425,8 +1309,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1460,11 +1343,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1489,11 +1369,7 @@ spec: description: Python defines configuration for python auto-instrumentation. properties: env: - description: 'Env defines python specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines python specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1503,15 +1379,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1540,8 +1410,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1559,7 +1428,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1616,8 +1485,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1651,11 +1519,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1680,8 +1545,7 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. The value - will be set in the OTEL_TRACES_SAMPLER_ARG env var. + sampler type it is a number in range [0..1] e.g. 0.25. type: string type: description: Type defines sampler type. The value will be set diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index f8c0fa37e..af4726051 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -49,14 +49,14 @@ spec: API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object @@ -64,46 +64,24 @@ spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: additionalContainers: - description: "AdditionalContainers allows injecting additional containers - into the Collector's pod definition. These sidecar containers can - be used for authentication proxies, log shipping sidecars, agents - for shipping metrics to their cloud, or in general sidecars that - do not support automatic injection. This option only applies to - Deployment, DaemonSet, and StatefulSet deployment modes of the collector. - It does not apply to the sidecar deployment mode. More info about - sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ - \n Container names managed by the operator: * `otc-container` \n - Overriding containers managed by the operator is outside the scope - of what the maintainers will support and by doing so, you wil accept - the risk of it breaking things." + description: AdditionalContainers allows injecting additional containers + into the Collector's pod definition. items: description: A single application container that you want to run within a pod. properties: args: - description: 'Arguments to the entrypoint. The container image''s + description: Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If a variable - cannot be resolved, the reference in the input string will - be unchanged. Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + are expanded using the container's environment. items: type: string type: array command: - description: 'Entrypoint array. Not executed within a shell. - The container image''s ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the reference - in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: - i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether - the variable exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. items: type: string type: array @@ -119,16 +97,9 @@ spec: a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. - If a variable cannot be resolved, the reference in the - input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists - or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. @@ -158,8 +129,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -177,8 +147,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + requests.memory and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -229,11 +198,7 @@ spec: envFrom: description: List of sources to populate environment variables in the container. The keys defined within a source must be - a C_IDENTIFIER. All invalid keys will be reported as an event - when the container is starting. When a key exists in multiple - sources, the value associated with the last source will take - precedence. Values defined by an Env with a duplicate key - will take precedence. Cannot be updated. + a C_IDENTIFIER. items: description: EnvFromSource represents the source of a set of ConfigMaps @@ -272,26 +237,21 @@ spec: type: object type: array image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' + description: 'Container image name. More info: https://kubernetes.' type: string imagePullPolicy: description: 'Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + otherwise. Cannot be updated. More info: https://kubernetes.' type: string lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -300,12 +260,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -359,8 +314,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -379,17 +332,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource - contention, etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the container - will eventually terminate within the Pod''s termination - grace period (unless delayed by finalizers). Other management - of the container blocks until the hook completes or until - the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + contention, etc. properties: exec: description: Exec specifies the action to take. @@ -398,12 +344,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -457,8 +398,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -489,11 +428,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -513,10 +447,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -606,19 +538,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -636,11 +556,7 @@ spec: ports: description: List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0.0" - address inside a container will be accessible from the network. - Modifying this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. + exposed. Any port which is listening on the default "0.0.0. items: description: ContainerPort represents a network port in a single container. @@ -682,7 +598,7 @@ spec: readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + fails. Cannot be updated. More info: https://kubernetes.' properties: exec: description: Exec specifies the action to take. @@ -691,11 +607,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -715,10 +626,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -808,19 +717,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -858,8 +755,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -893,27 +789,20 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: - description: 'SecurityContext defines the security options the + description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. More - info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + override the equivalent fields of PodSecurityContext. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' + be set on the container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -946,9 +835,7 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + paths and masked paths. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root @@ -958,39 +845,24 @@ spec: runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a - non-root user. If true, the Kubelet will validate the - image at runtime to ensure that it does not run as UID - 0 (root) and fail to start the container if it does. If - unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + non-root user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + if unspecified. May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies @@ -1013,24 +885,17 @@ spec: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. - Note that this field cannot be set when spec.os.name is - windows. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile - must be preconfigured on the node to work. Must be - a descending path, relative to the kubelet's configured - seccomp profile location. Must only be set if type - is "Localhost". + must be preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be - used. RuntimeDefault - the container runtime default - profile should be used. Unconfined - no profile should - be applied." + used." type: string required: - type @@ -1038,10 +903,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -1055,36 +917,20 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is - alpha-level and will only be honored by components - that enable the WindowsHostProcessContainers feature - flag. Setting this field without the feature flag - will result in errors when validating the Pod. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a mix - of HostProcess containers and non-HostProcess containers). In - addition, if HostProcess is true then HostNetwork - must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. + in PodSecurityContext. type: string type: object type: object startupProbe: - description: 'StartupProbe indicates that the Pod has successfully + description: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until - this completes successfully. If this probe fails, the Pod - will be restarted, just as if the livenessProbe failed. This - can be used to provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time to load - data or warm a cache, than during steady-state operation. - This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + this completes successfully. properties: exec: description: Exec specifies the action to take. @@ -1093,11 +939,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1117,10 +958,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -1210,19 +1049,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -1242,32 +1069,18 @@ spec: description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across - multiple attach sessions. If stdinOnce is set to true, stdin - is opened on container start, is empty until the first client - attaches to stdin, and then remains open and accepts data - until the client disconnects, at which time stdin is closed - and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin - will never receive an EOF. Default is false + multiple attach sessions. type: boolean terminationMessagePath: description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted - into the container''s filesystem. Message written is intended - to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. - The total message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + into the container''s filesystem.' type: string terminationMessagePolicy: description: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and - failure. FallbackToLogsOnError will use the last chunk of - container log output if the termination message file is empty - and the container exited with an error. The log output is - limited to 2048 bytes or 80 lines, whichever is smaller. Defaults - to File. Cannot be updated. + failure. type: string tty: description: Whether this container should allocate a TTY for @@ -1323,11 +1136,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. + the container's volume should be mounted. type: string required: - mountPath @@ -1354,14 +1163,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or - more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node matches - the corresponding matchExpressions; the node(s) with the - highest sum are the most preferred. + more of the expressions. items: description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). @@ -1395,11 +1197,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1431,11 +1229,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1459,10 +1253,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to an update), the system may or may not try to - eventually evict the pod from its node. + scheduled onto the node. properties: nodeSelectorTerms: description: Required. A list of node selector terms. @@ -1496,11 +1287,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1532,11 +1319,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1561,14 +1344,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or - more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node has - pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. + more of the expressions. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) @@ -1606,9 +1382,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1621,11 +1395,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1634,9 +1404,6 @@ spec: that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. - null selector and null or empty namespaces list - means "this pod's namespace". An empty selector - ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label @@ -1663,9 +1430,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1678,11 +1443,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1691,19 +1452,16 @@ spec: of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by - namespaceSelector. null or empty namespaces list - and null namespaceSelector means "this pod's namespace". + namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey - matches that of any node on which any of the selected - pods is running. Empty topologyKey is not allowed. + whose ' type: string required: - topologyKey @@ -1721,21 +1479,12 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to a pod label update), the system may or may - not try to eventually evict the pod from its node. When - there are multiple elements, the lists of nodes corresponding - to each podAffinityTerm are intersected, i.e. all terms - must be satisfied. + scheduled onto the node. items: description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of - pods is running + (anti-affinity) with, where co-locate properties: labelSelector: description: A label query over a set of resources, @@ -1763,8 +1512,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -1777,11 +1525,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1789,9 +1533,7 @@ spec: description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and - the ones listed in the namespaces field. null selector - and null or empty namespaces list means "this pod's - namespace". An empty selector ({}) matches all namespaces. + the ones listed in the namespaces field. properties: matchExpressions: description: matchExpressions is a list of label @@ -1815,8 +1557,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -1829,11 +1570,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1841,20 +1578,15 @@ spec: description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. null or - empty namespaces list and null namespaceSelector means - "this pod's namespace". + and the ones selected by namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of - any node on which any of the selected pods is running. - Empty topologyKey is not allowed. + co-located is defined as running on a node whose ' type: string required: - topologyKey @@ -1870,14 +1602,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one - or more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node has - pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. + or more of the expressions. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) @@ -1915,9 +1640,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1930,11 +1653,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1943,9 +1662,6 @@ spec: that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. - null selector and null or empty namespaces list - means "this pod's namespace". An empty selector - ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label @@ -1972,9 +1688,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1987,11 +1701,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2000,19 +1710,16 @@ spec: of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by - namespaceSelector. null or empty namespaces list - and null namespaceSelector means "this pod's namespace". + namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey - matches that of any node on which any of the selected - pods is running. Empty topologyKey is not allowed. + whose ' type: string required: - topologyKey @@ -2030,21 +1737,12 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will - not be scheduled onto the node. If the anti-affinity requirements - specified by this field cease to be met at some point during - pod execution (e.g. due to a pod label update), the system - may or may not try to eventually evict the pod from its - node. When there are multiple elements, the lists of nodes - corresponding to each podAffinityTerm are intersected, i.e. - all terms must be satisfied. + not be scheduled onto the node. items: description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of - pods is running + (anti-affinity) with, where co-locate properties: labelSelector: description: A label query over a set of resources, @@ -2072,8 +1770,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -2086,11 +1783,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2098,9 +1791,7 @@ spec: description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and - the ones listed in the namespaces field. null selector - and null or empty namespaces list means "this pod's - namespace". An empty selector ({}) matches all namespaces. + the ones listed in the namespaces field. properties: matchExpressions: description: matchExpressions is a list of label @@ -2124,8 +1815,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -2138,11 +1828,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2150,20 +1836,15 @@ spec: description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. null or - empty namespaces list and null namespaceSelector means - "this pod's namespace". + and the ones selected by namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of - any node on which any of the selected pods is running. - Empty topologyKey is not allowed. + co-located is defined as running on a node whose ' type: string required: - topologyKey @@ -2190,8 +1871,7 @@ spec: description: scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window - (i.e., the highest recommendation for the last 300sec is - used). + (i.e. properties: policies: description: policies is a list of potential scaling polices @@ -2232,22 +1912,14 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'stabilizationWindowSeconds is the number + description: stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. StabilizationWindowSeconds - must be greater than or equal to zero and less than - or equal to 3600 (one hour). If not set, use the default - values: - For scale up: 0 (i.e. no stabilization is - done). - For scale down: 300 (i.e. the stabilization - window is 300 seconds long).' + considered while scaling up or scaling down. format: int32 type: integer type: object scaleUp: - description: 'scaleUp is scaling policy for scaling Up. If - not set, the default value is the higher of: * increase - no more than 4 pods per 60 seconds * double the number of - pods per 60 seconds No stabilization is used.' + description: scaleUp is scaling policy for scaling Up. properties: policies: description: policies is a list of potential scaling polices @@ -2288,14 +1960,9 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'stabilizationWindowSeconds is the number + description: stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. StabilizationWindowSeconds - must be greater than or equal to zero and less than - or equal to 3600 (one hour). If not set, use the default - values: - For scale up: 0 (i.e. no stabilization is - done). - For scale down: 300 (i.e. the stabilization - window is 300 seconds long).' + considered while scaling up or scaling down. format: int32 type: integer type: object @@ -2308,8 +1975,7 @@ spec: metrics: description: Metrics is meant to provide a customizable way to configure HPA metrics. currently the only supported custom metrics - is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization - instead if scaling on these common resource metrics. + is type=Pod. items: description: MetricSpec defines a subset of metrics to be defined for the HPA's metric array more metric type can be supported @@ -2319,9 +1985,7 @@ spec: pods: description: PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). The - values will be averaged together before being compared - to the target value. + (for example, transactions-processed-per-second). properties: metric: description: metric identifies the target metric by @@ -2335,8 +1999,7 @@ spec: of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific - metrics scoping. When unset, just the metricName - will be used to gather metrics. + metrics scopi properties: matchExpressions: description: matchExpressions is a list of label @@ -2363,9 +2026,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -2378,11 +2039,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2398,8 +2055,6 @@ spec: of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. - Currently only valid for Resource metric source - type format: int32 type: integer averageValue: @@ -2472,15 +2127,9 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -2508,7 +2157,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + status.' properties: apiVersion: description: Version of the schema the FieldPath is @@ -2526,7 +2175,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -2653,6 +2302,14 @@ spec: - reencrypt type: string type: object + ruleType: + description: RuleType defines how Ingress exposes collector receivers. + IngressRuleTypePath ("path") exposes each receiver port on a + unique path on single domain defined in Hostname. + enum: + - path + - subdomain + type: string tls: description: TLS configuration. items: @@ -2662,9 +2319,7 @@ spec: hosts: description: hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s - used in the tlsSecret. Defaults to the wildcard host setting - for the loadbalancer controller fulfilling this Ingress, - if left unspecified. + used in the tlsSecret. items: type: string type: array @@ -2672,56 +2327,37 @@ spec: secretName: description: secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. If the - SNI host in a listener conflicts with the "Host" header - field used by an IngressRule, the SNI host is used for - termination and value of the "Host" header is used for - routing. + to allow TLS routing based on SNI hostname alone. type: string type: object type: array type: - description: 'Type default value is: "" Supported types are: ingress' + description: 'Type default value is: "" Supported types are: ingress, + route' enum: - ingress - route type: string type: object initContainers: - description: 'InitContainers allows injecting initContainers to the - Collector''s pod definition. These init containers can be used to - fetch secrets for injection into the configuration from external - sources, run added checks, etc. Any errors during the execution - of an initContainer will lead to a restart of the Pod. More info: - https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + description: InitContainers allows injecting initContainers to the + Collector's pod definition. items: description: A single application container that you want to run within a pod. properties: args: - description: 'Arguments to the entrypoint. The container image''s + description: Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If a variable - cannot be resolved, the reference in the input string will - be unchanged. Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + are expanded using the container's environment. items: type: string type: array command: - description: 'Entrypoint array. Not executed within a shell. - The container image''s ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the reference - in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: - i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether - the variable exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. items: type: string type: array @@ -2737,16 +2373,9 @@ spec: a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. - If a variable cannot be resolved, the reference in the - input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists - or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. @@ -2776,8 +2405,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -2795,8 +2423,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + requests.memory and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -2847,11 +2474,7 @@ spec: envFrom: description: List of sources to populate environment variables in the container. The keys defined within a source must be - a C_IDENTIFIER. All invalid keys will be reported as an event - when the container is starting. When a key exists in multiple - sources, the value associated with the last source will take - precedence. Values defined by an Env with a duplicate key - will take precedence. Cannot be updated. + a C_IDENTIFIER. items: description: EnvFromSource represents the source of a set of ConfigMaps @@ -2890,26 +2513,21 @@ spec: type: object type: array image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' + description: 'Container image name. More info: https://kubernetes.' type: string imagePullPolicy: description: 'Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + otherwise. Cannot be updated. More info: https://kubernetes.' type: string lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -2918,12 +2536,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -2977,8 +2590,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -2997,17 +2608,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource - contention, etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the container - will eventually terminate within the Pod''s termination - grace period (unless delayed by finalizers). Other management - of the container blocks until the hook completes or until - the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + contention, etc. properties: exec: description: Exec specifies the action to take. @@ -3016,12 +2620,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -3075,8 +2674,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -3107,11 +2704,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3131,10 +2723,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3224,19 +2814,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3254,11 +2832,7 @@ spec: ports: description: List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0.0" - address inside a container will be accessible from the network. - Modifying this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. + exposed. Any port which is listening on the default "0.0.0. items: description: ContainerPort represents a network port in a single container. @@ -3300,7 +2874,7 @@ spec: readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + fails. Cannot be updated. More info: https://kubernetes.' properties: exec: description: Exec specifies the action to take. @@ -3309,11 +2883,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3333,10 +2902,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3426,19 +2993,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3476,8 +3031,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -3511,27 +3065,20 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: - description: 'SecurityContext defines the security options the + description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. More - info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + override the equivalent fields of PodSecurityContext. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' + be set on the container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -3564,9 +3111,7 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + paths and masked paths. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root @@ -3576,39 +3121,24 @@ spec: runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a - non-root user. If true, the Kubelet will validate the - image at runtime to ensure that it does not run as UID - 0 (root) and fail to start the container if it does. If - unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + non-root user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + if unspecified. May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies @@ -3631,24 +3161,17 @@ spec: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. - Note that this field cannot be set when spec.os.name is - windows. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile - must be preconfigured on the node to work. Must be - a descending path, relative to the kubelet's configured - seccomp profile location. Must only be set if type - is "Localhost". + must be preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be - used. RuntimeDefault - the container runtime default - profile should be used. Unconfined - no profile should - be applied." + used." type: string required: - type @@ -3656,10 +3179,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -3673,36 +3193,20 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is - alpha-level and will only be honored by components - that enable the WindowsHostProcessContainers feature - flag. Setting this field without the feature flag - will result in errors when validating the Pod. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a mix - of HostProcess containers and non-HostProcess containers). In - addition, if HostProcess is true then HostNetwork - must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. + in PodSecurityContext. type: string type: object type: object startupProbe: - description: 'StartupProbe indicates that the Pod has successfully + description: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until - this completes successfully. If this probe fails, the Pod - will be restarted, just as if the livenessProbe failed. This - can be used to provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time to load - data or warm a cache, than during steady-state operation. - This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + this completes successfully. properties: exec: description: Exec specifies the action to take. @@ -3711,11 +3215,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3735,10 +3234,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3828,19 +3325,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3860,32 +3345,18 @@ spec: description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across - multiple attach sessions. If stdinOnce is set to true, stdin - is opened on container start, is empty until the first client - attaches to stdin, and then remains open and accepts data - until the client disconnects, at which time stdin is closed - and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin - will never receive an EOF. Default is false + multiple attach sessions. type: boolean terminationMessagePath: description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted - into the container''s filesystem. Message written is intended - to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. - The total message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + into the container''s filesystem.' type: string terminationMessagePolicy: description: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and - failure. FallbackToLogsOnError will use the last chunk of - container log output if the termination message file is empty - and the container exited with an error. The log output is - limited to 2048 bytes or 80 lines, whichever is smaller. Defaults - to File. Cannot be updated. + failure. type: string tty: description: Whether this container should allocate a TTY for @@ -3941,11 +3412,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. + the container's volume should be mounted. type: string required: - mountPath @@ -3966,11 +3433,9 @@ spec: to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More info: - https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -3978,12 +3443,7 @@ spec: command: description: Command is the command line to execute inside the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. + root ('/') in the container's filesystem. items: type: string type: array @@ -4036,9 +3496,7 @@ spec: type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. There are no validation - of this field and lifecycle hooks will fail in runtime when - tcp handler is specified. + and kept for the backward compatibility. properties: host: description: 'Optional: Host name to connect to, defaults @@ -4057,17 +3515,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, - etc. The handler is not called if the container crashes or exits. - The Pod''s termination grace period countdown begins before - the PreStop hook is executed. Regardless of the outcome of the - handler, the container will eventually terminate within the - Pod''s termination grace period (unless delayed by finalizers). - Other management of the container blocks until the hook completes - or until the termination grace period is reached. More info: - https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + etc. properties: exec: description: Exec specifies the action to take. @@ -4075,12 +3526,7 @@ spec: command: description: Command is the command line to execute inside the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. + root ('/') in the container's filesystem. items: type: string type: array @@ -4133,9 +3579,7 @@ spec: type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. There are no validation - of this field and lifecycle hooks will fail in runtime when - tcp handler is specified. + and kept for the backward compatibility. properties: host: description: 'Optional: Host name to connect to, defaults @@ -4157,8 +3601,7 @@ spec: livenessProbe: description: Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension - of the collector. It is only effective when healthcheckextension - is configured in the OpenTelemetry Collector pipeline. + of the collector. properties: failureThreshold: description: Minimum consecutive failures for the probe to be @@ -4169,7 +3612,7 @@ spec: initialDelaySeconds: description: 'Number of seconds after the container has started before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + Minimum value is 0. More info: https://kubernetes.' format: int32 type: integer periodSeconds: @@ -4185,18 +3628,7 @@ spec: type: integer terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. The grace period is the duration - in seconds after the processes running in the pod are sent a - termination signal and the time when the processes are forcibly - halted with a kill signal. Set this value longer than the expected - cleanup time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. Value must - be non-negative integer. The value zero indicates stop immediately - via the kill signal (no opportunity to shut down). This is a - beta field and requires enabling ProbeTerminationGracePeriod - feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. + gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -4263,64 +3695,39 @@ spec: podSecurityContext: description: PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field - values of container.securityContext take precedence over field values - of PodSecurityContext. + values of container. properties: fsGroup: description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: - \n 1. The owning GID will be the FSGroup 2. The setgid bit is - set (new files created in the volume will be owned by FSGroup) - 3. The permission bits are OR'd with rw-rw---- \n If unset, - the Kubelet will not modify the ownership and permissions of - any volume. Note that this field cannot be set when spec.os.name - is windows." + \n 1." format: int64 type: integer fsGroupChangePolicy: - description: 'fsGroupChangePolicy defines behavior of changing + description: fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed - inside Pod. This field will only apply to volume types which - support fsGroup based ownership(and permissions). It will have - no effect on ephemeral volume types such as: secret, configmaps - and emptydir. Valid values are "OnRootMismatch" and "Always". - If not specified, "Always" is used. Note that this field cannot - be set when spec.os.name is windows.' + inside Pod. type: string runAsGroup: description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. + Uses runtime default if unset. May also be set in SecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail to start - the container if it does. If unset or false, no such validation - will be performed. May also be set in SecurityContext. If set - in both SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. Note that this field cannot - be set when spec.os.name is windows. + May also be set in SecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. + SELinux context for each container. May also be set in SecurityContext. properties: level: description: Level is SELinux level label that applies to @@ -4347,16 +3754,12 @@ spec: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be - preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must only be set if type is "Localhost". + preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used. RuntimeDefault - - the container runtime default profile should be used. - Unconfined - no profile should be applied." + defined in a file on the node should be used." type: string required: - type @@ -4365,12 +3768,7 @@ spec: description: A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in - the container image for the uid of the container process. If - unspecified, no additional groups are added to any container. - Note that group memberships defined in the container image for - the uid of the container process are still effective, even if - they are not included in this list. Note that this field cannot - be set when spec.os.name is windows. + the container image for th items: format: int64 type: integer @@ -4379,7 +3777,7 @@ spec: description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when - spec.os.name is windows. + spec.os. items: description: Sysctl defines a kernel parameter to be set properties: @@ -4397,9 +3795,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -4413,30 +3809,19 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is alpha-level - and will only be honored by components that enable the WindowsHostProcessContainers - feature flag. Setting this field without the feature flag - will result in errors when validating the Pod. All of a - Pod's containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess - is true then HostNetwork must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. - If set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. type: string type: object type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open additional ports that can't be inferred by the operator, - like for custom receivers. + ports by parsing the .Spec. items: description: ServicePort contains information on service's port. properties: @@ -4444,26 +3829,17 @@ spec: description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. + and https://www.iana. type: string name: description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. + unique names. type: string nodePort: - description: 'The port on each node on which this service is + description: The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. If a value is specified, in-range, and not - in use it will be used, otherwise the operation will fail. If - not specified, a port will be allocated if this Service requires - one. If this field is specified when creating a Service which - does not need it, creation will fail. This field will be wiped - when updating a Service to no longer need it (e.g. changing - type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + by the system. format: int32 type: integer port: @@ -4479,14 +3855,9 @@ spec: anyOf: - type: integer - type: string - description: 'Number or name of the port to access on the pods + description: Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port @@ -4509,8 +3880,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -4543,11 +3913,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: @@ -4555,12 +3922,10 @@ spec: context. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a process + description: AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the - container process. AllowPrivilegeEscalation is true always when - the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows.' + container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -4591,8 +3956,6 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. - This requires the ProcMountType feature flag to be enabled. - Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root filesystem. @@ -4601,37 +3964,23 @@ spec: type: boolean runAsGroup: description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note that this - field cannot be set when spec.os.name is windows. + Uses runtime default if unset. May also be set in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail to start - the container if it does. If unset or false, no such validation - will be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when spec.os.name - is windows. + May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note that this - field cannot be set when spec.os.name is windows. + SELinux context for each container. May also be set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies to @@ -4653,22 +4002,17 @@ spec: seccompProfile: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, - the container options override the pod options. Note that this - field cannot be set when spec.os.name is windows. + the container options override the pod options. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be - preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must only be set if type is "Localhost". + preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used. RuntimeDefault - - the container runtime default profile should be used. - Unconfined - no profile should be applied." + defined in a file on the node should be used." type: string required: - type @@ -4676,9 +4020,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will - be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is linux. + be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -4692,21 +4034,12 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is alpha-level - and will only be honored by components that enable the WindowsHostProcessContainers - feature flag. Setting this field without the feature flag - will result in errors when validating the Pod. All of a - Pod's containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess - is true then HostNetwork must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. - If set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. type: string type: object type: object @@ -4745,15 +4078,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -4782,8 +4109,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -4801,7 +4127,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -4852,7 +4178,6 @@ spec: description: FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option is relabel-config (drops targets based on prom relabel_config). - Filtering is disabled by default. type: string image: description: Image indicates the container image to use for the @@ -4867,9 +4192,7 @@ spec: prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR - instances which the ServiceAccount has access to will be retrieved. - This includes other namespaces. + and podmonitor.monitoring.coreos.com/v1 ) retrieval. properties: enabled: description: Enabled indicates whether to use a PrometheusOperator @@ -4881,7 +4204,7 @@ spec: description: PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's - meta labels. The requirements are ANDed. + meta labels. type: object scrapeInterval: default: 30s @@ -4895,15 +4218,13 @@ spec: description: ServiceMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a ServiceMonitor's - meta labels. The requirements are ANDed. + meta labels. type: object type: object replicas: description: Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value other than 1 if a strategy that allows for high availability is chosen. - Currently, the only allocation strategy that can be run in a - high availability mode is consistent-hashing. format: int32 type: integer resources: @@ -4914,8 +4235,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -4949,11 +4269,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object serviceAccount: @@ -4965,7 +4282,7 @@ spec: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, - and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + and other user-defined top items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -4997,8 +4314,6 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. items: type: string type: array @@ -5011,131 +4326,44 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: "MatchLabelKeys is a set of pod label keys - to select the pods over which spreading will be calculated. - The keys are used to lookup values from the incoming pod - labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading - will be calculated for the incoming pod. The same key - is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't - set. Keys that don't exist in the incoming pod labels - will be ignored. A null or empty list means only match - against labelSelector. \n This is a beta field and requires - the MatchLabelKeysInPodTopologySpread feature gate to - be enabled (enabled by default)." + description: MatchLabelKeys is a set of pod label keys to + select the pods over which spreading will be calculated. items: type: string type: array x-kubernetes-list-type: atomic maxSkew: - description: 'MaxSkew describes the degree to which pods - may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, - it is the maximum permitted difference between the number - of matching pods in the target topology and the global - minimum. The global minimum is the minimum number of matching - pods in an eligible domain or zero if the number of eligible - domains is less than MinDomains. For example, in a 3-zone - cluster, MaxSkew is set to 1, and pods with the same labelSelector - spread as 2/2/1: In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to - zone3 to become 2/2/2; scheduling it onto zone1(zone2) - would make the ActualSkew(3-1) on zone1(zone2) violate - MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled - onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, - it is used to give higher precedence to topologies that - satisfy it. It''s a required field. Default value is 1 - and 0 is not allowed.' + description: MaxSkew describes the degree to which pods + may be unevenly distributed. format: int32 type: integer minDomains: - description: "MinDomains indicates a minimum number of eligible - domains. When the number of eligible domains with matching - topology keys is less than minDomains, Pod Topology Spread - treats \"global minimum\" as 0, and then the calculation - of Skew is performed. And when the number of eligible - domains with matching topology keys equals or greater - than minDomains, this value has no effect on scheduling. - As a result, when the number of eligible domains is less - than minDomains, scheduler won't schedule more than maxSkew - Pods to those domains. If value is nil, the constraint - behaves as if MinDomains is equal to 1. Valid values are - integers greater than 0. When value is not nil, WhenUnsatisfiable - must be DoNotSchedule. \n For example, in a 3-zone cluster, - MaxSkew is set to 2, MinDomains is set to 5 and pods with - the same labelSelector spread as 2/2/2: | zone1 | zone2 - | zone3 | | P P | P P | P P | The number of domains - is less than 5(MinDomains), so \"global minimum\" is treated - as 0. In this situation, new pod with the same labelSelector - cannot be scheduled, because computed skew will be 3(3 - - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. \n This is a beta field and requires - the MinDomainsInPodTopologySpread feature gate to be enabled - (enabled by default)." + description: MinDomains indicates a minimum number of eligible + domains. format: int32 type: integer nodeAffinityPolicy: - description: "NodeAffinityPolicy indicates how we will treat + description: NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. Options are: - Honor: only nodes matching - nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes - are included in the calculations. \n If this value is - nil, the behavior is equivalent to the Honor policy. This - is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread - feature flag." + spread skew. type: string nodeTaintsPolicy: - description: "NodeTaintsPolicy indicates how we will treat + description: NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. - Options are: - Honor: nodes without taints, along with - tainted nodes for which the incoming pod has a toleration, - are included. - Ignore: node taints are ignored. All nodes - are included. \n If this value is nil, the behavior is - equivalent to the Ignore policy. This is a beta-level - feature default enabled by the NodeInclusionPolicyInPodTopologySpread - feature flag." type: string topologyKey: description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are - considered to be in the same topology. We consider each - as a "bucket", and try to put balanced number - of pods into each bucket. We define a domain as a particular - instance of a topology. Also, we define an eligible domain - as a domain whose nodes meet the requirements of nodeAffinityPolicy - and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", - each Node is a domain of that topology. And, if TopologyKey - is "topology.kubernetes.io/zone", each zone is a domain - of that topology. It's a required field. + considered to be in the same topology. type: string whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with - a pod if it doesn''t satisfy the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule - it. - ScheduleAnyway tells the scheduler to schedule the - pod in any location, but giving higher precedence to topologies - that would help reduce the skew. A constraint is considered - "Unsatisfiable" for an incoming pod if and only if every - possible node assignment for that pod would violate "MaxSkew" - on some topology. For example, in a 3-zone cluster, MaxSkew - is set to 1, and pods with the same labelSelector spread - as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming - pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) - as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). - In other words, the cluster can still be imbalanced, but - scheduler won''t make it *more* imbalanced. It''s a required - field.' + description: WhenUnsatisfiable indicates how to deal with + a pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. type: string required: - maxSkew @@ -5172,16 +4400,11 @@ spec: operator: description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod - can tolerate all taints of a particular category. type: string tolerationSeconds: description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, it - is not set, which means tolerate the taint forever (do not - evict). Zero and negative values will be treated as 0 (evict - immediately) by the system. + this field is ignored) tolerates the taint. format: int64 type: integer value: @@ -5194,9 +4417,7 @@ spec: topologySpreadConstraints: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - This is only relevant to statefulset, and deployment mode + such as regions, zones, nodes, and other user-defined top items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -5227,8 +4448,7 @@ spec: description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. + DoesNotExist, the values array must be empty. items: type: string type: array @@ -5241,125 +4461,44 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: "MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. The keys - are used to lookup values from the incoming pod labels, those - key-value labels are ANDed with labelSelector to select the - group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in - both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot - be set when LabelSelector isn't set. Keys that don't exist - in the incoming pod labels will be ignored. A null or empty - list means only match against labelSelector. \n This is a - beta field and requires the MatchLabelKeysInPodTopologySpread - feature gate to be enabled (enabled by default)." + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. items: type: string type: array x-kubernetes-list-type: atomic maxSkew: - description: 'MaxSkew describes the degree to which pods may - be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, - it is the maximum permitted difference between the number - of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods - in an eligible domain or zero if the number of eligible domains - is less than MinDomains. For example, in a 3-zone cluster, - MaxSkew is set to 1, and pods with the same labelSelector - spread as 2/2/1: In this case, the global minimum is 1. | - zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew - is 1, incoming pod can only be scheduled to zone3 to become - 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) - on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming - pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, - it is used to give higher precedence to topologies that satisfy - it. It''s a required field. Default value is 1 and 0 is not - allowed.' + description: MaxSkew describes the degree to which pods may + be unevenly distributed. format: int32 type: integer minDomains: - description: "MinDomains indicates a minimum number of eligible - domains. When the number of eligible domains with matching - topology keys is less than minDomains, Pod Topology Spread - treats \"global minimum\" as 0, and then the calculation of - Skew is performed. And when the number of eligible domains - with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. As a result, when - the number of eligible domains is less than minDomains, scheduler - won't schedule more than maxSkew Pods to those domains. If - value is nil, the constraint behaves as if MinDomains is equal - to 1. Valid values are integers greater than 0. When value - is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For - example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains - is set to 5 and pods with the same labelSelector spread as - 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | - The number of domains is less than 5(MinDomains), so \"global - minimum\" is treated as 0. In this situation, new pod with - the same labelSelector cannot be scheduled, because computed - skew will be 3(3 - 0) if new Pod is scheduled to any of the - three zones, it will violate MaxSkew. \n This is a beta field - and requires the MinDomainsInPodTopologySpread feature gate - to be enabled (enabled by default)." + description: MinDomains indicates a minimum number of eligible + domains. format: int32 type: integer nodeAffinityPolicy: - description: "NodeAffinityPolicy indicates how we will treat + description: NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector - are included in the calculations. - Ignore: nodeAffinity/nodeSelector - are ignored. All nodes are included in the calculations. \n - If this value is nil, the behavior is equivalent to the Honor - policy. This is a beta-level feature default enabled by the - NodeInclusionPolicyInPodTopologySpread feature flag." + spread skew. type: string nodeTaintsPolicy: - description: "NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. Options - are: - Honor: nodes without taints, along with tainted nodes - for which the incoming pod has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - \n If this value is nil, the behavior is equivalent to the - Ignore policy. This is a beta-level feature default enabled - by the NodeInclusionPolicyInPodTopologySpread feature flag." + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. type: string topologyKey: description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered - to be in the same topology. We consider each - as a "bucket", and try to put balanced number of pods into - each bucket. We define a domain as a particular instance of - a topology. Also, we define an eligible domain as a domain - whose nodes meet the requirements of nodeAffinityPolicy and - nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", - each Node is a domain of that topology. And, if TopologyKey - is "topology.kubernetes.io/zone", each zone is a domain of - that topology. It's a required field. + to be in the same topology. type: string whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a - pod if it doesn''t satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - ScheduleAnyway - tells the scheduler to schedule the pod in any location, but - giving higher precedence to topologies that would help reduce - the skew. A constraint is considered "Unsatisfiable" for an - incoming pod if and only if every possible node assignment - for that pod would violate "MaxSkew" on some topology. For - example, in a 3-zone cluster, MaxSkew is set to 1, and pods - with the same labelSelector spread as 3/1/1: | zone1 | zone2 - | zone3 | | P P P | P | P | If WhenUnsatisfiable is - set to DoNotSchedule, incoming pod can only be scheduled to - zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on - zone2(zone3) satisfies MaxSkew(1). In other words, the cluster - can still be imbalanced, but scheduler won''t make it *more* - imbalanced. It''s a required field.' + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. type: string required: - maxSkew @@ -5382,16 +4521,15 @@ spec: to a persistent volume properties: apiVersion: - description: 'APIVersion defines the versioned schema of this + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + values. type: string kind: - description: 'Kind is a string value representing the REST resource + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' @@ -5425,16 +4563,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will - not be copied to dataSource.' + * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -5454,33 +4583,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object from which + description: dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only - succeed if the type of the specified object matches some - installed volume populator or dynamic provisioner. This - field will replace the functionality of the dataSource - field and as such if both fields are non-empty, they must - have the same value. For backwards compatibility, when - namespace isn''t specified in dataSourceRef, both fields - (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other - is non-empty. When namespace is specified in dataSourceRef, - dataSource isn''t set to the same value and must be empty. - There are three important differences between dataSource - and dataSourceRef: * While dataSource only allows two - specific types of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. * While - dataSource ignores disallowed values (dropping them), - dataSourceRef preserves all values, and generates an error - if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' + is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -5497,31 +4602,21 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object - is required in the referent namespace to allow that - namespace's owner to accept the reference. See the - ReferenceGrant documentation for details. (Alpha) - This field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. + a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify resource - requirements that are lower than previous value but must - still be higher than capacity recorded in the status field - of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: resources represents the minimum resources + the volume should have. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." + DynamicResourceAllocation feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -5556,11 +4651,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount - of compute resources required. If Requests is omitted - for a container, it defaults to Limits if that is - explicitly specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of + compute resources required. type: object type: object selector: @@ -5589,8 +4681,6 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. items: type: string type: array @@ -5603,10 +4693,6 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -5644,15 +4730,7 @@ spec: description: allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. For storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used. If allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation. If a volume expansion - capacity request is lowered, allocatedResources is only - lowered if there are no expansion operations in progress - and if the actual volume capacity is equal or lower than - the requested capacity. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + a volume expansion operation is requested. type: object capacity: additionalProperties: @@ -5689,9 +4767,7 @@ spec: reason: description: reason is a unique, this should be a short, machine understandable string that gives - the reason for condition's last transition. If it - reports "ResizeStarted" that means the underlying - persistent volume is being resized. + the reason for condition's last transition. type: string status: type: string @@ -5711,8 +4787,7 @@ spec: description: resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize - controller or kubelet. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + controller or kubelet. type: string type: object type: object @@ -5748,10 +4823,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which the - container's volume should be mounted. Behaves similarly to - SubPath but environment variable references $(VAR_NAME) are - expanded using the container's environment. Defaults to "" - (volume's root). SubPathExpr and SubPath are mutually exclusive. + container's volume should be mounted. type: string required: - mountPath @@ -5769,23 +4841,19 @@ spec: awsElasticBlockStore: description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty).' + the partition as "1".' format: int32 type: integer readOnly: @@ -5825,7 +4893,7 @@ spec: description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data - disk (only in managed availability set). defaults to shared' + disk (only in managed availability set).' type: string readOnly: description: readOnly Defaults to false (read/write). ReadOnly @@ -5904,7 +4972,7 @@ spec: description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + be "ext4" if unspecified.' type: string readOnly: description: 'readOnly defaults to false (read/write). ReadOnly @@ -5936,24 +5004,14 @@ spec: description: 'defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the ConfigMap, the volume setup will error unless it is - marked optional. Paths must be relative and may not contain - the '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -5964,12 +5022,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -6013,10 +5066,7 @@ spec: description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the secret - object contains more than one secret, all secret references - are passed. + and NodeUnpublishVolume calls. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6045,14 +5095,7 @@ spec: defaultMode: description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set - permissions on created files by default. Must be an octal - value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + permissions on created files by default.' format: int32 type: integer items: @@ -6081,13 +5124,7 @@ spec: mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + and 0777 or a decimal value between 0 and 511.' format: int32 type: integer path: @@ -6132,64 +5169,29 @@ spec: shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'medium represents what type of storage medium + description: medium represents what type of storage medium should back this directory. The default is "" which means - to use the node''s default medium. Must be an empty string - (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + to use the node's default medium. Must be an empty string + (default) or Memory. type: string sizeLimit: anyOf: - type: integer - type: string - description: 'sizeLimit is the total amount of local storage + description: sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also - applicable for memory medium. The maximum usage on memory - medium EmptyDir would be the minimum value between the - SizeLimit specified here and the sum of memory limits - of all containers in a pod. The default is nil which means - that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + applicable for memory medium. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is tied - to the pod that defines it - it will be created before the - pod starts, and deleted when the pod is removed. \n Use this - if: a) the volume is only needed while the pod runs, b) features - of normal volumes like restoring from snapshot or capacity - tracking are needed, c) the storage driver is specified through - a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource - for more information on the connection between this volume - type and PersistentVolumeClaim). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n Use - CSI for light-weight local ephemeral volumes if the CSI driver - is meant to be used that way - see the documentation of the - driver for more information. \n A pod can use both types of - ephemeral volumes and persistent volumes at the same time." + description: ephemeral represents a volume that is handled by + a cluster storage driver. properties: volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to + description: Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the PVC - will be deleted together with the pod. The name of the - PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. - Pod validation will reject the pod if the concatenated - name is not valid for a PVC (for example, too long). \n - An existing PVC with that name that is not owned by the - pod will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC - is meant to be used by the pod, the PVC has to updated - with an owner reference to the pod once the pod exists. - Normally this should not be necessary, but it may be useful - when manually reconstructing a broken cluster. \n This - field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. \n Required, must - not be nil." + is embedded will be the owner of the PVC, i.e. properties: metadata: description: May contain labels and annotations that @@ -6216,8 +5218,7 @@ spec: spec: description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC - that gets created from this template. The same fields - as in a PersistentVolumeClaim are also valid here. + that gets created from this template. properties: accessModes: description: 'accessModes contains the desired access @@ -6227,17 +5228,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the - provisioner or an external controller can support - the specified data source, it will create a new - volume based on the contents of the specified - data source. When the AnyVolumeDataSource feature - gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will - be copied to dataSource when dataSourceRef.namespace - is not specified. If the namespace is specified, - then dataSourceRef will not be copied to dataSource.' + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -6260,38 +5251,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object + description: dataSourceRef specifies the object from which to populate the volume with data, if - a non-empty volume is desired. This may be any - object from a non-empty API group (non core object) - or a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. - This field will replace the functionality of the - dataSource field and as such if both fields are - non-empty, they must have the same value. For - backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same value - automatically if one of them is empty and the - other is non-empty. When namespace is specified - in dataSourceRef, dataSource isn''t set to the - same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types - of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - * While dataSource only allows local objects, - dataSourceRef allows objects in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource - feature gate to be enabled. (Alpha) Using the - namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to - be enabled.' + a non-empty volume is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -6311,33 +5273,22 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace - is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant documentation - for details. (Alpha) This field requires the - CrossNamespaceVolumeDataSource feature gate - to be enabled. + is specified, a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify - resource requirements that are lower than previous - value but must still be higher than capacity recorded - in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: resources represents the minimum resources + the volume should have. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -6373,12 +5324,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. If Requests - is omitted for a container, it defaults to - Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum + amount of compute resources required. type: object type: object selector: @@ -6410,9 +5357,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -6425,11 +5370,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -6458,11 +5399,10 @@ spec: pod. properties: fsType: - description: 'fsType is the filesystem type to mount. Must + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. TODO: how do we prevent errors in the - filesystem from compromising the machine' + if unspecified. type: string lun: description: 'lun is Optional: FC target lun number' @@ -6514,9 +5454,7 @@ spec: description: 'secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no - secret object is specified. If the secret object contains - more than one secret, all secrets are passed to the plugin - scripts.' + secret object is specified.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6545,24 +5483,19 @@ spec: gcePersistentDisk: description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + the partition as "1".' format: int32 type: integer pdName: @@ -6578,17 +5511,12 @@ spec: type: object gitRepo: description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' + revision. DEPRECATED: GitRepo is deprecated.' properties: directory: description: directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. + volume directory will be the git repository. type: string repository: description: repository is the URL @@ -6622,13 +5550,8 @@ spec: - path type: object hostPath: - description: 'hostPath represents a pre-existing file or directory + description: hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' properties: path: description: 'path of the directory on the host. If the @@ -6659,16 +5582,11 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string initiatorName: description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. + Name. type: string iqn: description: iqn is the target iSCSI Qualified Name. @@ -6740,7 +5658,7 @@ spec: persistentVolumeClaim: description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + More info: https://kubernetes.' properties: claimName: description: 'claimName is the name of a PersistentVolumeClaim @@ -6798,12 +5716,7 @@ spec: defaultMode: description: defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Directories within the path are - not affected by this setting. This might be in conflict - with other options that affect the file mode, like fsGroup, - and the result can be other mode bits set. + 0000 and 0777 or a decimal value between 0 and 511. format: int32 type: integer sources: @@ -6821,13 +5734,6 @@ spec: pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -6840,13 +5746,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -6907,14 +5807,7 @@ spec: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + a decimal value between 0 and 511.' format: int32 type: integer path: @@ -6966,13 +5859,6 @@ spec: pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -6985,13 +5871,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -7027,19 +5907,14 @@ spec: of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. + token. type: string expirationSeconds: description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate - the service account token. The kubelet will - start trying to rotate the token if the token - is older than 80 percent of its time to live - or if the token is older than 24 hours.Defaults - to 1 hour and must be at least 10 minutes. + the service account token. format: int64 type: integer path: @@ -7097,10 +5972,7 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string image: description: 'image is the rados image name. More info: @@ -7210,24 +6082,14 @@ spec: description: 'defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the Secret, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -7238,12 +6100,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -7299,12 +6156,7 @@ spec: volumeNamespace: description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS - for tighter integration. Set VolumeName to any name to - override the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will be created. + then the Pod's namespace will be used. type: string type: object vsphereVolume: @@ -7376,7 +6228,7 @@ spec: description: StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / Total number of non-terminated pods targeted by this OpenTelemetryCollector's - (their labels match the selector). Deployment, Daemonset, StatefulSet. + (their labels matc type: string type: object version: diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 8765ee7fa..cc170b110 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -36,14 +36,14 @@ spec: description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object @@ -57,7 +57,7 @@ spec: attrs: description: 'Attrs defines Apache HTTPD agent specific attributes. The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + spec attributes` . Attributes are documented at https://github.' items: description: EnvVar represents an environment variable present in a Container. @@ -67,15 +67,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -104,8 +98,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -123,7 +116,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -175,12 +168,7 @@ spec: only if different from default "/usr/local/apache2/conf" type: string env: - description: 'Env defines Apache HTTPD specific env vars. There - are four layers for env vars'' definitions and the precedence - order is: `original container env vars` > `language specific - env vars` > `common env vars` > `instrument spec configs'' vars`. - If the former var had been defined, then the other vars would - be ignored.' + description: Env defines Apache HTTPD specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -190,15 +178,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -227,8 +209,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -246,7 +227,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -303,8 +284,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -338,11 +318,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object version: @@ -354,11 +331,7 @@ spec: description: DotNet defines configuration for DotNet auto-instrumentation. properties: env: - description: 'Env defines DotNet specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines DotNet specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -368,15 +341,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -405,8 +372,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -424,7 +390,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -481,8 +447,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -516,20 +481,13 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object env: - description: 'Env defines common env vars. There are four layers for - env vars'' definitions and the precedence order is: `original container - env vars` > `language specific env vars` > `common env vars` > `instrument - spec configs'' vars`. If the former var had been defined, then the - other vars would be ignored.' + description: Env defines common env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -538,15 +496,9 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -574,7 +526,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + status.' properties: apiVersion: description: Version of the schema the FieldPath is @@ -592,7 +544,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -646,18 +598,9 @@ spec: type: object go: description: Go defines configuration for Go auto-instrumentation. - When using Go auto-instrumenetation you must provide a value for - the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env - vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe - pod annotation. Failure to set this value causes instrumentation - injection to abort, leaving the original pod unchanged. properties: env: - description: 'Env defines Go specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines Go specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -667,15 +610,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -704,8 +641,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -723,7 +659,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -780,8 +716,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -815,11 +750,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -827,11 +759,7 @@ spec: description: Java defines configuration for java auto-instrumentation. properties: env: - description: 'Env defines java specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines java specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -841,15 +769,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -878,8 +800,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -897,7 +818,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -955,8 +876,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -990,11 +910,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1004,7 +921,7 @@ spec: attrs: description: 'Attrs defines Nginx agent specific attributes. The precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + spec attributes` . Attributes are documented at https://github.' items: description: EnvVar represents an environment variable present in a Container. @@ -1014,15 +931,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1051,8 +962,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1070,7 +980,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1122,11 +1032,7 @@ spec: if different from default "/etx/nginx/nginx.conf" type: string env: - description: 'Env defines Nginx specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines Nginx specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1136,15 +1042,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1173,8 +1073,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1192,7 +1091,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1249,8 +1148,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1284,11 +1182,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1296,11 +1191,7 @@ spec: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: env: - description: 'Env defines nodejs specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines nodejs specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1310,15 +1201,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1347,8 +1232,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1366,7 +1250,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1423,8 +1307,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1458,11 +1341,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1487,11 +1367,7 @@ spec: description: Python defines configuration for python auto-instrumentation. properties: env: - description: 'Env defines python specific env vars. There are - four layers for env vars'' definitions and the precedence order - is: `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines python specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -1501,15 +1377,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -1538,8 +1408,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1557,7 +1426,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -1614,8 +1483,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1649,11 +1517,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object type: object @@ -1678,8 +1543,7 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. The value - will be set in the OTEL_TRACES_SAMPLER_ARG env var. + sampler type it is a number in range [0..1] e.g. 0.25. type: string type: description: Type defines sampler type. The value will be set diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 99f422f2d..523ca6be3 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -46,14 +46,14 @@ spec: API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object @@ -61,46 +61,24 @@ spec: description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: additionalContainers: - description: "AdditionalContainers allows injecting additional containers - into the Collector's pod definition. These sidecar containers can - be used for authentication proxies, log shipping sidecars, agents - for shipping metrics to their cloud, or in general sidecars that - do not support automatic injection. This option only applies to - Deployment, DaemonSet, and StatefulSet deployment modes of the collector. - It does not apply to the sidecar deployment mode. More info about - sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ - \n Container names managed by the operator: * `otc-container` \n - Overriding containers managed by the operator is outside the scope - of what the maintainers will support and by doing so, you wil accept - the risk of it breaking things." + description: AdditionalContainers allows injecting additional containers + into the Collector's pod definition. items: description: A single application container that you want to run within a pod. properties: args: - description: 'Arguments to the entrypoint. The container image''s + description: Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If a variable - cannot be resolved, the reference in the input string will - be unchanged. Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + are expanded using the container's environment. items: type: string type: array command: - description: 'Entrypoint array. Not executed within a shell. - The container image''s ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the reference - in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: - i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether - the variable exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. items: type: string type: array @@ -116,16 +94,9 @@ spec: a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. - If a variable cannot be resolved, the reference in the - input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists - or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. @@ -155,8 +126,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -174,8 +144,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + requests.memory and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -226,11 +195,7 @@ spec: envFrom: description: List of sources to populate environment variables in the container. The keys defined within a source must be - a C_IDENTIFIER. All invalid keys will be reported as an event - when the container is starting. When a key exists in multiple - sources, the value associated with the last source will take - precedence. Values defined by an Env with a duplicate key - will take precedence. Cannot be updated. + a C_IDENTIFIER. items: description: EnvFromSource represents the source of a set of ConfigMaps @@ -269,26 +234,21 @@ spec: type: object type: array image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' + description: 'Container image name. More info: https://kubernetes.' type: string imagePullPolicy: description: 'Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + otherwise. Cannot be updated. More info: https://kubernetes.' type: string lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -297,12 +257,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -356,8 +311,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -376,17 +329,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource - contention, etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the container - will eventually terminate within the Pod''s termination - grace period (unless delayed by finalizers). Other management - of the container blocks until the hook completes or until - the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + contention, etc. properties: exec: description: Exec specifies the action to take. @@ -395,12 +341,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -454,8 +395,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -486,11 +425,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -510,10 +444,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -603,19 +535,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -633,11 +553,7 @@ spec: ports: description: List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0.0" - address inside a container will be accessible from the network. - Modifying this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. + exposed. Any port which is listening on the default "0.0.0. items: description: ContainerPort represents a network port in a single container. @@ -679,7 +595,7 @@ spec: readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + fails. Cannot be updated. More info: https://kubernetes.' properties: exec: description: Exec specifies the action to take. @@ -688,11 +604,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -712,10 +623,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -805,19 +714,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -855,8 +752,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -890,27 +786,20 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: - description: 'SecurityContext defines the security options the + description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. More - info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + override the equivalent fields of PodSecurityContext. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' + be set on the container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -943,9 +832,7 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + paths and masked paths. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root @@ -955,39 +842,24 @@ spec: runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a - non-root user. If true, the Kubelet will validate the - image at runtime to ensure that it does not run as UID - 0 (root) and fail to start the container if it does. If - unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + non-root user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + if unspecified. May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies @@ -1010,24 +882,17 @@ spec: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. - Note that this field cannot be set when spec.os.name is - windows. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile - must be preconfigured on the node to work. Must be - a descending path, relative to the kubelet's configured - seccomp profile location. Must only be set if type - is "Localhost". + must be preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be - used. RuntimeDefault - the container runtime default - profile should be used. Unconfined - no profile should - be applied." + used." type: string required: - type @@ -1035,10 +900,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -1052,36 +914,20 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is - alpha-level and will only be honored by components - that enable the WindowsHostProcessContainers feature - flag. Setting this field without the feature flag - will result in errors when validating the Pod. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a mix - of HostProcess containers and non-HostProcess containers). In - addition, if HostProcess is true then HostNetwork - must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. + in PodSecurityContext. type: string type: object type: object startupProbe: - description: 'StartupProbe indicates that the Pod has successfully + description: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until - this completes successfully. If this probe fails, the Pod - will be restarted, just as if the livenessProbe failed. This - can be used to provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time to load - data or warm a cache, than during steady-state operation. - This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + this completes successfully. properties: exec: description: Exec specifies the action to take. @@ -1090,11 +936,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -1114,10 +955,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -1207,19 +1046,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -1239,32 +1066,18 @@ spec: description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across - multiple attach sessions. If stdinOnce is set to true, stdin - is opened on container start, is empty until the first client - attaches to stdin, and then remains open and accepts data - until the client disconnects, at which time stdin is closed - and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin - will never receive an EOF. Default is false + multiple attach sessions. type: boolean terminationMessagePath: description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted - into the container''s filesystem. Message written is intended - to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. - The total message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + into the container''s filesystem.' type: string terminationMessagePolicy: description: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and - failure. FallbackToLogsOnError will use the last chunk of - container log output if the termination message file is empty - and the container exited with an error. The log output is - limited to 2048 bytes or 80 lines, whichever is smaller. Defaults - to File. Cannot be updated. + failure. type: string tty: description: Whether this container should allocate a TTY for @@ -1320,11 +1133,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. + the container's volume should be mounted. type: string required: - mountPath @@ -1351,14 +1160,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or - more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node matches - the corresponding matchExpressions; the node(s) with the - highest sum are the most preferred. + more of the expressions. items: description: An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). @@ -1392,11 +1194,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1428,11 +1226,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1456,10 +1250,7 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to an update), the system may or may not try to - eventually evict the pod from its node. + scheduled onto the node. properties: nodeSelectorTerms: description: Required. A list of node selector terms. @@ -1493,11 +1284,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1529,11 +1316,7 @@ spec: the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array - must be empty. If the operator is Gt or - Lt, the values array must have a single - element, which will be interpreted as an - integer. This array is replaced during a - strategic merge patch. + must be empty. items: type: string type: array @@ -1558,14 +1341,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or - more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node has - pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. + more of the expressions. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) @@ -1603,9 +1379,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1618,11 +1392,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1631,9 +1401,6 @@ spec: that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. - null selector and null or empty namespaces list - means "this pod's namespace". An empty selector - ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label @@ -1660,9 +1427,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1675,11 +1440,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1688,19 +1449,16 @@ spec: of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by - namespaceSelector. null or empty namespaces list - and null namespaceSelector means "this pod's namespace". + namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey - matches that of any node on which any of the selected - pods is running. Empty topologyKey is not allowed. + whose ' type: string required: - topologyKey @@ -1718,21 +1476,12 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the affinity requirements specified by this field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to a pod label update), the system may or may - not try to eventually evict the pod from its node. When - there are multiple elements, the lists of nodes corresponding - to each podAffinityTerm are intersected, i.e. all terms - must be satisfied. + scheduled onto the node. items: description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of - pods is running + (anti-affinity) with, where co-locate properties: labelSelector: description: A label query over a set of resources, @@ -1760,8 +1509,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -1774,11 +1522,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1786,9 +1530,7 @@ spec: description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and - the ones listed in the namespaces field. null selector - and null or empty namespaces list means "this pod's - namespace". An empty selector ({}) matches all namespaces. + the ones listed in the namespaces field. properties: matchExpressions: description: matchExpressions is a list of label @@ -1812,8 +1554,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -1826,11 +1567,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1838,20 +1575,15 @@ spec: description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. null or - empty namespaces list and null namespaceSelector means - "this pod's namespace". + and the ones selected by namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of - any node on which any of the selected pods is running. - Empty topologyKey is not allowed. + co-located is defined as running on a node whose ' type: string required: - topologyKey @@ -1867,14 +1599,7 @@ spec: description: The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one - or more of the expressions. The node that is most preferred - is the one with the greatest sum of weights, i.e. for each - node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, - etc.), compute a sum by iterating through the elements of - this field and adding "weight" to the sum if the node has - pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. + or more of the expressions. items: description: The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) @@ -1912,9 +1637,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1927,11 +1650,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1940,9 +1659,6 @@ spec: that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. - null selector and null or empty namespaces list - means "this pod's namespace". An empty selector - ({}) matches all namespaces. properties: matchExpressions: description: matchExpressions is a list of label @@ -1969,9 +1685,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1984,11 +1698,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1997,19 +1707,16 @@ spec: of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by - namespaceSelector. null or empty namespaces list - and null namespaceSelector means "this pod's namespace". + namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey - matches that of any node on which any of the selected - pods is running. Empty topologyKey is not allowed. + whose ' type: string required: - topologyKey @@ -2027,21 +1734,12 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: description: If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will - not be scheduled onto the node. If the anti-affinity requirements - specified by this field cease to be met at some point during - pod execution (e.g. due to a pod label update), the system - may or may not try to eventually evict the pod from its - node. When there are multiple elements, the lists of nodes - corresponding to each podAffinityTerm are intersected, i.e. - all terms must be satisfied. + not be scheduled onto the node. items: description: Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of - pods is running + (anti-affinity) with, where co-locate properties: labelSelector: description: A label query over a set of resources, @@ -2069,8 +1767,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -2083,11 +1780,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2095,9 +1788,7 @@ spec: description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and - the ones listed in the namespaces field. null selector - and null or empty namespaces list means "this pod's - namespace". An empty selector ({}) matches all namespaces. + the ones listed in the namespaces field. properties: matchExpressions: description: matchExpressions is a list of label @@ -2121,8 +1812,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the - values array must be empty. This array is - replaced during a strategic merge patch. + values array must be empty. items: type: string type: array @@ -2135,11 +1825,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". The - requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2147,20 +1833,15 @@ spec: description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. null or - empty namespaces list and null namespaceSelector means - "this pod's namespace". + and the ones selected by namespaceSelector. items: type: string type: array topologyKey: - description: This pod should be co-located (affinity) + description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of - any node on which any of the selected pods is running. - Empty topologyKey is not allowed. + co-located is defined as running on a node whose ' type: string required: - topologyKey @@ -2187,8 +1868,7 @@ spec: description: scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window - (i.e., the highest recommendation for the last 300sec is - used). + (i.e. properties: policies: description: policies is a list of potential scaling polices @@ -2229,22 +1909,14 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'stabilizationWindowSeconds is the number + description: stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. StabilizationWindowSeconds - must be greater than or equal to zero and less than - or equal to 3600 (one hour). If not set, use the default - values: - For scale up: 0 (i.e. no stabilization is - done). - For scale down: 300 (i.e. the stabilization - window is 300 seconds long).' + considered while scaling up or scaling down. format: int32 type: integer type: object scaleUp: - description: 'scaleUp is scaling policy for scaling Up. If - not set, the default value is the higher of: * increase - no more than 4 pods per 60 seconds * double the number of - pods per 60 seconds No stabilization is used.' + description: scaleUp is scaling policy for scaling Up. properties: policies: description: policies is a list of potential scaling polices @@ -2285,14 +1957,9 @@ spec: used. type: string stabilizationWindowSeconds: - description: 'stabilizationWindowSeconds is the number + description: stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. StabilizationWindowSeconds - must be greater than or equal to zero and less than - or equal to 3600 (one hour). If not set, use the default - values: - For scale up: 0 (i.e. no stabilization is - done). - For scale down: 300 (i.e. the stabilization - window is 300 seconds long).' + considered while scaling up or scaling down. format: int32 type: integer type: object @@ -2305,8 +1972,7 @@ spec: metrics: description: Metrics is meant to provide a customizable way to configure HPA metrics. currently the only supported custom metrics - is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization - instead if scaling on these common resource metrics. + is type=Pod. items: description: MetricSpec defines a subset of metrics to be defined for the HPA's metric array more metric type can be supported @@ -2316,9 +1982,7 @@ spec: pods: description: PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). The - values will be averaged together before being compared - to the target value. + (for example, transactions-processed-per-second). properties: metric: description: metric identifies the target metric by @@ -2332,8 +1996,7 @@ spec: of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific - metrics scoping. When unset, just the metricName - will be used to gather metrics. + metrics scopi properties: matchExpressions: description: matchExpressions is a list of label @@ -2360,9 +2023,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -2375,11 +2036,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -2395,8 +2052,6 @@ spec: of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. - Currently only valid for Resource metric source - type format: int32 type: integer averageValue: @@ -2469,15 +2124,9 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. Cannot @@ -2505,7 +2154,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + status.' properties: apiVersion: description: Version of the schema the FieldPath is @@ -2523,7 +2172,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -2650,6 +2299,14 @@ spec: - reencrypt type: string type: object + ruleType: + description: RuleType defines how Ingress exposes collector receivers. + IngressRuleTypePath ("path") exposes each receiver port on a + unique path on single domain defined in Hostname. + enum: + - path + - subdomain + type: string tls: description: TLS configuration. items: @@ -2659,9 +2316,7 @@ spec: hosts: description: hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s - used in the tlsSecret. Defaults to the wildcard host setting - for the loadbalancer controller fulfilling this Ingress, - if left unspecified. + used in the tlsSecret. items: type: string type: array @@ -2669,56 +2324,37 @@ spec: secretName: description: secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. If the - SNI host in a listener conflicts with the "Host" header - field used by an IngressRule, the SNI host is used for - termination and value of the "Host" header is used for - routing. + to allow TLS routing based on SNI hostname alone. type: string type: object type: array type: - description: 'Type default value is: "" Supported types are: ingress' + description: 'Type default value is: "" Supported types are: ingress, + route' enum: - ingress - route type: string type: object initContainers: - description: 'InitContainers allows injecting initContainers to the - Collector''s pod definition. These init containers can be used to - fetch secrets for injection into the configuration from external - sources, run added checks, etc. Any errors during the execution - of an initContainer will lead to a restart of the Pod. More info: - https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + description: InitContainers allows injecting initContainers to the + Collector's pod definition. items: description: A single application container that you want to run within a pod. properties: args: - description: 'Arguments to the entrypoint. The container image''s + description: Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container''s environment. If a variable - cannot be resolved, the reference in the input string will - be unchanged. Double $$ are reduced to a single $, which allows - for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will - produce the string literal "$(VAR_NAME)". Escaped references - will never be expanded, regardless of whether the variable - exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + are expanded using the container's environment. items: type: string type: array command: - description: 'Entrypoint array. Not executed within a shell. - The container image''s ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container''s - environment. If a variable cannot be resolved, the reference - in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: - i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether - the variable exists or not. Cannot be updated. More info: - https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. items: type: string type: array @@ -2734,16 +2370,9 @@ spec: a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. - If a variable cannot be resolved, the reference in the - input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists - or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. @@ -2773,8 +2402,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -2792,8 +2420,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.ephemeral-storage) - are currently supported.' + requests.memory and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -2844,11 +2471,7 @@ spec: envFrom: description: List of sources to populate environment variables in the container. The keys defined within a source must be - a C_IDENTIFIER. All invalid keys will be reported as an event - when the container is starting. When a key exists in multiple - sources, the value associated with the last source will take - precedence. Values defined by an Env with a duplicate key - will take precedence. Cannot be updated. + a C_IDENTIFIER. items: description: EnvFromSource represents the source of a set of ConfigMaps @@ -2887,26 +2510,21 @@ spec: type: object type: array image: - description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images - This field is optional to allow higher level config management - to default or override container images in workload controllers - like Deployments and StatefulSets.' + description: 'Container image name. More info: https://kubernetes.' type: string imagePullPolicy: description: 'Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + otherwise. Cannot be updated. More info: https://kubernetes.' type: string lifecycle: description: Actions that the management system should take in response to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More - info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -2915,12 +2533,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -2974,8 +2587,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -2994,17 +2605,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource - contention, etc. The handler is not called if the container - crashes or exits. The Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the container - will eventually terminate within the Pod''s termination - grace period (unless delayed by finalizers). Other management - of the container blocks until the hook completes or until - the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + contention, etc. properties: exec: description: Exec specifies the action to take. @@ -3013,12 +2617,7 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's - filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions - ('|', etc) won't work. To use a shell, you need - to explicitly call out to that shell. Exit status - of 0 is treated as live/healthy and non-zero is - unhealthy. + filesystem. items: type: string type: array @@ -3072,8 +2671,6 @@ spec: tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. properties: host: description: 'Optional: Host name to connect to, @@ -3104,11 +2701,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3128,10 +2720,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3221,19 +2811,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3251,11 +2829,7 @@ spec: ports: description: List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0.0" - address inside a container will be accessible from the network. - Modifying this array with strategic merge patch may corrupt - the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. - Cannot be updated. + exposed. Any port which is listening on the default "0.0.0. items: description: ContainerPort represents a network port in a single container. @@ -3297,7 +2871,7 @@ spec: readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + fails. Cannot be updated. More info: https://kubernetes.' properties: exec: description: Exec specifies the action to take. @@ -3306,11 +2880,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3330,10 +2899,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3423,19 +2990,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3473,8 +3028,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -3508,27 +3062,20 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: - description: 'SecurityContext defines the security options the + description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. More - info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + override the equivalent fields of PodSecurityContext. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether - a process can gain more privileges than its parent process. + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will - be set on the container process. AllowPrivilegeEscalation - is true always when the container is: 1) run as Privileged - 2) has CAP_SYS_ADMIN Note that this field cannot be set - when spec.os.name is windows.' + be set on the container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -3561,9 +3108,7 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly - paths and masked paths. This requires the ProcMountType - feature flag to be enabled. Note that this field cannot - be set when spec.os.name is windows. + paths and masked paths. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root @@ -3573,39 +3118,24 @@ spec: runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a - non-root user. If true, the Kubelet will validate the - image at runtime to ensure that it does not run as UID - 0 (root) and fail to start the container if it does. If - unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + non-root user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. + if unspecified. May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. + set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies @@ -3628,24 +3158,17 @@ spec: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. - Note that this field cannot be set when spec.os.name is - windows. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile - must be preconfigured on the node to work. Must be - a descending path, relative to the kubelet's configured - seccomp profile location. Must only be set if type - is "Localhost". + must be preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be - used. RuntimeDefault - the container runtime default - profile should be used. Unconfined - no profile should - be applied." + used." type: string required: - type @@ -3653,10 +3176,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -3670,36 +3190,20 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is - alpha-level and will only be honored by components - that enable the WindowsHostProcessContainers feature - flag. Setting this field without the feature flag - will result in errors when validating the Pod. All - of a Pod's containers must have the same effective - HostProcess value (it is not allowed to have a mix - of HostProcess containers and non-HostProcess containers). In - addition, if HostProcess is true then HostNetwork - must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. + in PodSecurityContext. type: string type: object type: object startupProbe: - description: 'StartupProbe indicates that the Pod has successfully + description: StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until - this completes successfully. If this probe fails, the Pod - will be restarted, just as if the livenessProbe failed. This - can be used to provide different probe parameters at the beginning - of a Pod''s lifecycle, when it might take a long time to load - data or warm a cache, than during steady-state operation. - This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + this completes successfully. properties: exec: description: Exec specifies the action to take. @@ -3708,11 +3212,6 @@ spec: description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. - The command is simply exec'd, it is not run inside - a shell, so traditional shell instructions ('|', etc) - won't work. To use a shell, you need to explicitly - call out to that shell. Exit status of 0 is treated - as live/healthy and non-zero is unhealthy. items: type: string type: array @@ -3732,10 +3231,8 @@ spec: format: int32 type: integer service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - port @@ -3825,19 +3322,7 @@ spec: type: object terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. The grace - period is the duration in seconds after the processes - running in the pod are sent a termination signal and the - time when the processes are forcibly halted with a kill - signal. Set this value longer than the expected cleanup - time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, - this value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates - stop immediately via the kill signal (no opportunity to - shut down). This is a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. + to terminate gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -3857,32 +3342,18 @@ spec: description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across - multiple attach sessions. If stdinOnce is set to true, stdin - is opened on container start, is empty until the first client - attaches to stdin, and then remains open and accepts data - until the client disconnects, at which time stdin is closed - and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin - will never receive an EOF. Default is false + multiple attach sessions. type: boolean terminationMessagePath: description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted - into the container''s filesystem. Message written is intended - to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. - The total message length across all containers will be limited - to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + into the container''s filesystem.' type: string terminationMessagePolicy: description: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and - failure. FallbackToLogsOnError will use the last chunk of - container log output if the termination message file is empty - and the container exited with an error. The log output is - limited to 2048 bytes or 80 lines, whichever is smaller. Defaults - to File. Cannot be updated. + failure. type: string tty: description: Whether this container should allocate a TTY for @@ -3938,11 +3409,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which - the container's volume should be mounted. Behaves similarly - to SubPath but environment variable references $(VAR_NAME) - are expanded using the container's environment. Defaults - to "" (volume's root). SubPathExpr and SubPath are mutually - exclusive. + the container's volume should be mounted. type: string required: - mountPath @@ -3963,11 +3430,9 @@ spec: to container lifecycle events. Cannot be updated. properties: postStart: - description: 'PostStart is called immediately after a container + description: PostStart is called immediately after a container is created. If the handler fails, the container is terminated - and restarted according to its restart policy. Other management - of the container blocks until the hook completes. More info: - https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + and restarted according to its restart policy. properties: exec: description: Exec specifies the action to take. @@ -3975,12 +3440,7 @@ spec: command: description: Command is the command line to execute inside the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. + root ('/') in the container's filesystem. items: type: string type: array @@ -4033,9 +3493,7 @@ spec: type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. There are no validation - of this field and lifecycle hooks will fail in runtime when - tcp handler is specified. + and kept for the backward compatibility. properties: host: description: 'Optional: Host name to connect to, defaults @@ -4054,17 +3512,10 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container + description: PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, - etc. The handler is not called if the container crashes or exits. - The Pod''s termination grace period countdown begins before - the PreStop hook is executed. Regardless of the outcome of the - handler, the container will eventually terminate within the - Pod''s termination grace period (unless delayed by finalizers). - Other management of the container blocks until the hook completes - or until the termination grace period is reached. More info: - https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + etc. properties: exec: description: Exec specifies the action to take. @@ -4072,12 +3523,7 @@ spec: command: description: Command is the command line to execute inside the container, the working directory for the command is - root ('/') in the container's filesystem. The command - is simply exec'd, it is not run inside a shell, so traditional - shell instructions ('|', etc) won't work. To use a shell, - you need to explicitly call out to that shell. Exit - status of 0 is treated as live/healthy and non-zero - is unhealthy. + root ('/') in the container's filesystem. items: type: string type: array @@ -4130,9 +3576,7 @@ spec: type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. There are no validation - of this field and lifecycle hooks will fail in runtime when - tcp handler is specified. + and kept for the backward compatibility. properties: host: description: 'Optional: Host name to connect to, defaults @@ -4154,8 +3598,7 @@ spec: livenessProbe: description: Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension - of the collector. It is only effective when healthcheckextension - is configured in the OpenTelemetry Collector pipeline. + of the collector. properties: failureThreshold: description: Minimum consecutive failures for the probe to be @@ -4166,7 +3609,7 @@ spec: initialDelaySeconds: description: 'Number of seconds after the container has started before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + Minimum value is 0. More info: https://kubernetes.' format: int32 type: integer periodSeconds: @@ -4182,18 +3625,7 @@ spec: type: integer terminationGracePeriodSeconds: description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. The grace period is the duration - in seconds after the processes running in the pod are sent a - termination signal and the time when the processes are forcibly - halted with a kill signal. Set this value longer than the expected - cleanup time for your process. If this value is nil, the pod's - terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. Value must - be non-negative integer. The value zero indicates stop immediately - via the kill signal (no opportunity to shut down). This is a - beta field and requires enabling ProbeTerminationGracePeriod - feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds - is used if unset. + gracefully upon probe failure. format: int64 type: integer timeoutSeconds: @@ -4260,64 +3692,39 @@ spec: podSecurityContext: description: PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field - values of container.securityContext take precedence over field values - of PodSecurityContext. + values of container. properties: fsGroup: description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: - \n 1. The owning GID will be the FSGroup 2. The setgid bit is - set (new files created in the volume will be owned by FSGroup) - 3. The permission bits are OR'd with rw-rw---- \n If unset, - the Kubelet will not modify the ownership and permissions of - any volume. Note that this field cannot be set when spec.os.name - is windows." + \n 1." format: int64 type: integer fsGroupChangePolicy: - description: 'fsGroupChangePolicy defines behavior of changing + description: fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed - inside Pod. This field will only apply to volume types which - support fsGroup based ownership(and permissions). It will have - no effect on ephemeral volume types such as: secret, configmaps - and emptydir. Valid values are "OnRootMismatch" and "Always". - If not specified, "Always" is used. Note that this field cannot - be set when spec.os.name is windows.' + inside Pod. type: string runAsGroup: description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. + Uses runtime default if unset. May also be set in SecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail to start - the container if it does. If unset or false, no such validation - will be performed. May also be set in SecurityContext. If set - in both SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. + user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. Note that this field cannot - be set when spec.os.name is windows. + May also be set in SecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. + SELinux context for each container. May also be set in SecurityContext. properties: level: description: Level is SELinux level label that applies to @@ -4344,16 +3751,12 @@ spec: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be - preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must only be set if type is "Localhost". + preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used. RuntimeDefault - - the container runtime default profile should be used. - Unconfined - no profile should be applied." + defined in a file on the node should be used." type: string required: - type @@ -4362,12 +3765,7 @@ spec: description: A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in - the container image for the uid of the container process. If - unspecified, no additional groups are added to any container. - Note that group memberships defined in the container image for - the uid of the container process are still effective, even if - they are not included in this list. Note that this field cannot - be set when spec.os.name is windows. + the container image for th items: format: int64 type: integer @@ -4376,7 +3774,7 @@ spec: description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when - spec.os.name is windows. + spec.os. items: description: Sysctl defines a kernel parameter to be set properties: @@ -4394,9 +3792,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is linux. + will be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -4410,30 +3806,19 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is alpha-level - and will only be honored by components that enable the WindowsHostProcessContainers - feature flag. Setting this field without the feature flag - will result in errors when validating the Pod. All of a - Pod's containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess - is true then HostNetwork must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. - If set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. type: string type: object type: object ports: description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open additional ports that can't be inferred by the operator, - like for custom receivers. + ports by parsing the .Spec. items: description: ServicePort contains information on service's port. properties: @@ -4441,26 +3826,17 @@ spec: description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. + and https://www.iana. type: string name: description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. + unique names. type: string nodePort: - description: 'The port on each node on which this service is + description: The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. If a value is specified, in-range, and not - in use it will be used, otherwise the operation will fail. If - not specified, a port will be allocated if this Service requires - one. If this field is specified when creating a Service which - does not need it, creation will fail. This field will be wiped - when updating a Service to no longer need it (e.g. changing - type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + by the system. format: int32 type: integer port: @@ -4476,14 +3852,9 @@ spec: anyOf: - type: integer - type: string - description: 'Number or name of the port to access on the pods + description: Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + 65535. Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true required: - port @@ -4506,8 +3877,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -4540,11 +3910,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object securityContext: @@ -4552,12 +3919,10 @@ spec: context. properties: allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a process + description: AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the - container process. AllowPrivilegeEscalation is true always when - the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows.' + container process. type: boolean capabilities: description: The capabilities to add/drop when running containers. @@ -4588,8 +3953,6 @@ spec: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. - This requires the ProcMountType feature flag to be enabled. - Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root filesystem. @@ -4598,37 +3961,23 @@ spec: type: boolean runAsGroup: description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note that this - field cannot be set when spec.os.name is windows. + Uses runtime default if unset. May also be set in PodSecurityContext. format: int64 type: integer runAsNonRoot: description: Indicates that the container must run as a non-root - user. If true, the Kubelet will validate the image at runtime - to ensure that it does not run as UID 0 (root) and fail to start - the container if it does. If unset or false, no such validation - will be performed. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + user. type: boolean runAsUser: description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when spec.os.name - is windows. + May also be set in PodSecurityContext. format: int64 type: integer seLinuxOptions: description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. Note that this - field cannot be set when spec.os.name is windows. + SELinux context for each container. May also be set in PodSecurityContext. properties: level: description: Level is SELinux level label that applies to @@ -4650,22 +3999,17 @@ spec: seccompProfile: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, - the container options override the pod options. Note that this - field cannot be set when spec.os.name is windows. + the container options override the pod options. properties: localhostProfile: description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be - preconfigured on the node to work. Must be a descending - path, relative to the kubelet's configured seccomp profile - location. Must only be set if type is "Localhost". + preconfigured on the node to work. type: string type: description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used. RuntimeDefault - - the container runtime default profile should be used. - Unconfined - no profile should be applied." + defined in a file on the node should be used." type: string required: - type @@ -4673,9 +4017,7 @@ spec: windowsOptions: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will - be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is linux. + be used. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -4689,21 +4031,12 @@ spec: type: string hostProcess: description: HostProcess determines if a container should - be run as a 'Host Process' container. This field is alpha-level - and will only be honored by components that enable the WindowsHostProcessContainers - feature flag. Setting this field without the feature flag - will result in errors when validating the Pod. All of a - Pod's containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess containers - and non-HostProcess containers). In addition, if HostProcess - is true then HostNetwork must also be set to true. + be run as a 'Host Process' container. type: boolean runAsUserName: description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. - If set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. type: string type: object type: object @@ -4742,15 +4075,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -4779,8 +4106,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -4798,7 +4124,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -4849,7 +4175,6 @@ spec: description: FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option is relabel-config (drops targets based on prom relabel_config). - Filtering is disabled by default. type: string image: description: Image indicates the container image to use for the @@ -4864,9 +4189,7 @@ spec: prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR - instances which the ServiceAccount has access to will be retrieved. - This includes other namespaces. + and podmonitor.monitoring.coreos.com/v1 ) retrieval. properties: enabled: description: Enabled indicates whether to use a PrometheusOperator @@ -4878,7 +4201,7 @@ spec: description: PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's - meta labels. The requirements are ANDed. + meta labels. type: object scrapeInterval: default: 30s @@ -4892,15 +4215,13 @@ spec: description: ServiceMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a ServiceMonitor's - meta labels. The requirements are ANDed. + meta labels. type: object type: object replicas: description: Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value other than 1 if a strategy that allows for high availability is chosen. - Currently, the only allocation strategy that can be run in a - high availability mode is consistent-hashing. format: int32 type: integer resources: @@ -4911,8 +4232,7 @@ spec: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -4946,11 +4266,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object serviceAccount: @@ -4962,7 +4279,7 @@ spec: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, - and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + and other user-defined top items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -4994,8 +4311,6 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. items: type: string type: array @@ -5008,131 +4323,44 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: "MatchLabelKeys is a set of pod label keys - to select the pods over which spreading will be calculated. - The keys are used to lookup values from the incoming pod - labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading - will be calculated for the incoming pod. The same key - is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't - set. Keys that don't exist in the incoming pod labels - will be ignored. A null or empty list means only match - against labelSelector. \n This is a beta field and requires - the MatchLabelKeysInPodTopologySpread feature gate to - be enabled (enabled by default)." + description: MatchLabelKeys is a set of pod label keys to + select the pods over which spreading will be calculated. items: type: string type: array x-kubernetes-list-type: atomic maxSkew: - description: 'MaxSkew describes the degree to which pods - may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, - it is the maximum permitted difference between the number - of matching pods in the target topology and the global - minimum. The global minimum is the minimum number of matching - pods in an eligible domain or zero if the number of eligible - domains is less than MinDomains. For example, in a 3-zone - cluster, MaxSkew is set to 1, and pods with the same labelSelector - spread as 2/2/1: In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to - zone3 to become 2/2/2; scheduling it onto zone1(zone2) - would make the ActualSkew(3-1) on zone1(zone2) violate - MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled - onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, - it is used to give higher precedence to topologies that - satisfy it. It''s a required field. Default value is 1 - and 0 is not allowed.' + description: MaxSkew describes the degree to which pods + may be unevenly distributed. format: int32 type: integer minDomains: - description: "MinDomains indicates a minimum number of eligible - domains. When the number of eligible domains with matching - topology keys is less than minDomains, Pod Topology Spread - treats \"global minimum\" as 0, and then the calculation - of Skew is performed. And when the number of eligible - domains with matching topology keys equals or greater - than minDomains, this value has no effect on scheduling. - As a result, when the number of eligible domains is less - than minDomains, scheduler won't schedule more than maxSkew - Pods to those domains. If value is nil, the constraint - behaves as if MinDomains is equal to 1. Valid values are - integers greater than 0. When value is not nil, WhenUnsatisfiable - must be DoNotSchedule. \n For example, in a 3-zone cluster, - MaxSkew is set to 2, MinDomains is set to 5 and pods with - the same labelSelector spread as 2/2/2: | zone1 | zone2 - | zone3 | | P P | P P | P P | The number of domains - is less than 5(MinDomains), so \"global minimum\" is treated - as 0. In this situation, new pod with the same labelSelector - cannot be scheduled, because computed skew will be 3(3 - - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. \n This is a beta field and requires - the MinDomainsInPodTopologySpread feature gate to be enabled - (enabled by default)." + description: MinDomains indicates a minimum number of eligible + domains. format: int32 type: integer nodeAffinityPolicy: - description: "NodeAffinityPolicy indicates how we will treat + description: NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. Options are: - Honor: only nodes matching - nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes - are included in the calculations. \n If this value is - nil, the behavior is equivalent to the Honor policy. This - is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread - feature flag." + spread skew. type: string nodeTaintsPolicy: - description: "NodeTaintsPolicy indicates how we will treat + description: NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. - Options are: - Honor: nodes without taints, along with - tainted nodes for which the incoming pod has a toleration, - are included. - Ignore: node taints are ignored. All nodes - are included. \n If this value is nil, the behavior is - equivalent to the Ignore policy. This is a beta-level - feature default enabled by the NodeInclusionPolicyInPodTopologySpread - feature flag." type: string topologyKey: description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are - considered to be in the same topology. We consider each - as a "bucket", and try to put balanced number - of pods into each bucket. We define a domain as a particular - instance of a topology. Also, we define an eligible domain - as a domain whose nodes meet the requirements of nodeAffinityPolicy - and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", - each Node is a domain of that topology. And, if TopologyKey - is "topology.kubernetes.io/zone", each zone is a domain - of that topology. It's a required field. + considered to be in the same topology. type: string whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with - a pod if it doesn''t satisfy the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule - it. - ScheduleAnyway tells the scheduler to schedule the - pod in any location, but giving higher precedence to topologies - that would help reduce the skew. A constraint is considered - "Unsatisfiable" for an incoming pod if and only if every - possible node assignment for that pod would violate "MaxSkew" - on some topology. For example, in a 3-zone cluster, MaxSkew - is set to 1, and pods with the same labelSelector spread - as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming - pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) - as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). - In other words, the cluster can still be imbalanced, but - scheduler won''t make it *more* imbalanced. It''s a required - field.' + description: WhenUnsatisfiable indicates how to deal with + a pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. type: string required: - maxSkew @@ -5169,16 +4397,11 @@ spec: operator: description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod - can tolerate all taints of a particular category. type: string tolerationSeconds: description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, it - is not set, which means tolerate the taint forever (do not - evict). Zero and negative values will be treated as 0 (evict - immediately) by the system. + this field is ignored) tolerates the taint. format: int64 type: integer value: @@ -5191,9 +4414,7 @@ spec: topologySpreadConstraints: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - This is only relevant to statefulset, and deployment mode + such as regions, zones, nodes, and other user-defined top items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -5224,8 +4445,7 @@ spec: description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. + DoesNotExist, the values array must be empty. items: type: string type: array @@ -5238,125 +4458,44 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic matchLabelKeys: - description: "MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. The keys - are used to lookup values from the incoming pod labels, those - key-value labels are ANDed with labelSelector to select the - group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in - both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot - be set when LabelSelector isn't set. Keys that don't exist - in the incoming pod labels will be ignored. A null or empty - list means only match against labelSelector. \n This is a - beta field and requires the MatchLabelKeysInPodTopologySpread - feature gate to be enabled (enabled by default)." + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. items: type: string type: array x-kubernetes-list-type: atomic maxSkew: - description: 'MaxSkew describes the degree to which pods may - be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, - it is the maximum permitted difference between the number - of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods - in an eligible domain or zero if the number of eligible domains - is less than MinDomains. For example, in a 3-zone cluster, - MaxSkew is set to 1, and pods with the same labelSelector - spread as 2/2/1: In this case, the global minimum is 1. | - zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew - is 1, incoming pod can only be scheduled to zone3 to become - 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) - on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming - pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, - it is used to give higher precedence to topologies that satisfy - it. It''s a required field. Default value is 1 and 0 is not - allowed.' + description: MaxSkew describes the degree to which pods may + be unevenly distributed. format: int32 type: integer minDomains: - description: "MinDomains indicates a minimum number of eligible - domains. When the number of eligible domains with matching - topology keys is less than minDomains, Pod Topology Spread - treats \"global minimum\" as 0, and then the calculation of - Skew is performed. And when the number of eligible domains - with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. As a result, when - the number of eligible domains is less than minDomains, scheduler - won't schedule more than maxSkew Pods to those domains. If - value is nil, the constraint behaves as if MinDomains is equal - to 1. Valid values are integers greater than 0. When value - is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For - example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains - is set to 5 and pods with the same labelSelector spread as - 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | - The number of domains is less than 5(MinDomains), so \"global - minimum\" is treated as 0. In this situation, new pod with - the same labelSelector cannot be scheduled, because computed - skew will be 3(3 - 0) if new Pod is scheduled to any of the - three zones, it will violate MaxSkew. \n This is a beta field - and requires the MinDomainsInPodTopologySpread feature gate - to be enabled (enabled by default)." + description: MinDomains indicates a minimum number of eligible + domains. format: int32 type: integer nodeAffinityPolicy: - description: "NodeAffinityPolicy indicates how we will treat + description: NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector - are included in the calculations. - Ignore: nodeAffinity/nodeSelector - are ignored. All nodes are included in the calculations. \n - If this value is nil, the behavior is equivalent to the Honor - policy. This is a beta-level feature default enabled by the - NodeInclusionPolicyInPodTopologySpread feature flag." + spread skew. type: string nodeTaintsPolicy: - description: "NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. Options - are: - Honor: nodes without taints, along with tainted nodes - for which the incoming pod has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - \n If this value is nil, the behavior is equivalent to the - Ignore policy. This is a beta-level feature default enabled - by the NodeInclusionPolicyInPodTopologySpread feature flag." + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. type: string topologyKey: description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered - to be in the same topology. We consider each - as a "bucket", and try to put balanced number of pods into - each bucket. We define a domain as a particular instance of - a topology. Also, we define an eligible domain as a domain - whose nodes meet the requirements of nodeAffinityPolicy and - nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", - each Node is a domain of that topology. And, if TopologyKey - is "topology.kubernetes.io/zone", each zone is a domain of - that topology. It's a required field. + to be in the same topology. type: string whenUnsatisfiable: - description: 'WhenUnsatisfiable indicates how to deal with a - pod if it doesn''t satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - ScheduleAnyway - tells the scheduler to schedule the pod in any location, but - giving higher precedence to topologies that would help reduce - the skew. A constraint is considered "Unsatisfiable" for an - incoming pod if and only if every possible node assignment - for that pod would violate "MaxSkew" on some topology. For - example, in a 3-zone cluster, MaxSkew is set to 1, and pods - with the same labelSelector spread as 3/1/1: | zone1 | zone2 - | zone3 | | P P P | P | P | If WhenUnsatisfiable is - set to DoNotSchedule, incoming pod can only be scheduled to - zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on - zone2(zone3) satisfies MaxSkew(1). In other words, the cluster - can still be imbalanced, but scheduler won''t make it *more* - imbalanced. It''s a required field.' + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. type: string required: - maxSkew @@ -5379,16 +4518,15 @@ spec: to a persistent volume properties: apiVersion: - description: 'APIVersion defines the versioned schema of this + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + values. type: string kind: - description: 'Kind is a string value representing the REST resource + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' @@ -5422,16 +4560,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will - not be copied to dataSource.' + * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -5451,33 +4580,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object from which + description: dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only - succeed if the type of the specified object matches some - installed volume populator or dynamic provisioner. This - field will replace the functionality of the dataSource - field and as such if both fields are non-empty, they must - have the same value. For backwards compatibility, when - namespace isn''t specified in dataSourceRef, both fields - (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other - is non-empty. When namespace is specified in dataSourceRef, - dataSource isn''t set to the same value and must be empty. - There are three important differences between dataSource - and dataSourceRef: * While dataSource only allows two - specific types of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. * While - dataSource ignores disallowed values (dropping them), - dataSourceRef preserves all values, and generates an error - if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' + is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -5494,31 +4599,21 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object - is required in the referent namespace to allow that - namespace's owner to accept the reference. See the - ReferenceGrant documentation for details. (Alpha) - This field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. + a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify resource - requirements that are lower than previous value but must - still be higher than capacity recorded in the status field - of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: resources represents the minimum resources + the volume should have. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." + DynamicResourceAllocation feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -5553,11 +4648,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount - of compute resources required. If Requests is omitted - for a container, it defaults to Limits if that is - explicitly specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of + compute resources required. type: object type: object selector: @@ -5586,8 +4678,6 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. items: type: string type: array @@ -5600,10 +4690,6 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -5641,15 +4727,7 @@ spec: description: allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. For storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used. If allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation. If a volume expansion - capacity request is lowered, allocatedResources is only - lowered if there are no expansion operations in progress - and if the actual volume capacity is equal or lower than - the requested capacity. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + a volume expansion operation is requested. type: object capacity: additionalProperties: @@ -5686,9 +4764,7 @@ spec: reason: description: reason is a unique, this should be a short, machine understandable string that gives - the reason for condition's last transition. If it - reports "ResizeStarted" that means the underlying - persistent volume is being resized. + the reason for condition's last transition. type: string status: type: string @@ -5708,8 +4784,7 @@ spec: description: resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize - controller or kubelet. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + controller or kubelet. type: string type: object type: object @@ -5745,10 +4820,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which the - container's volume should be mounted. Behaves similarly to - SubPath but environment variable references $(VAR_NAME) are - expanded using the container's environment. Defaults to "" - (volume's root). SubPathExpr and SubPath are mutually exclusive. + container's volume should be mounted. type: string required: - mountPath @@ -5766,23 +4838,19 @@ spec: awsElasticBlockStore: description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty).' + the partition as "1".' format: int32 type: integer readOnly: @@ -5822,7 +4890,7 @@ spec: description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data - disk (only in managed availability set). defaults to shared' + disk (only in managed availability set).' type: string readOnly: description: readOnly Defaults to false (read/write). ReadOnly @@ -5901,7 +4969,7 @@ spec: description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + be "ext4" if unspecified.' type: string readOnly: description: 'readOnly defaults to false (read/write). ReadOnly @@ -5933,24 +5001,14 @@ spec: description: 'defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the ConfigMap, the volume setup will error unless it is - marked optional. Paths must be relative and may not contain - the '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -5961,12 +5019,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -6010,10 +5063,7 @@ spec: description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the secret - object contains more than one secret, all secret references - are passed. + and NodeUnpublishVolume calls. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6042,14 +5092,7 @@ spec: defaultMode: description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set - permissions on created files by default. Must be an octal - value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + permissions on created files by default.' format: int32 type: integer items: @@ -6078,13 +5121,7 @@ spec: mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + and 0777 or a decimal value between 0 and 511.' format: int32 type: integer path: @@ -6129,64 +5166,29 @@ spec: shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'medium represents what type of storage medium + description: medium represents what type of storage medium should back this directory. The default is "" which means - to use the node''s default medium. Must be an empty string - (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + to use the node's default medium. Must be an empty string + (default) or Memory. type: string sizeLimit: anyOf: - type: integer - type: string - description: 'sizeLimit is the total amount of local storage + description: sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also - applicable for memory medium. The maximum usage on memory - medium EmptyDir would be the minimum value between the - SizeLimit specified here and the sum of memory limits - of all containers in a pod. The default is nil which means - that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + applicable for memory medium. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is tied - to the pod that defines it - it will be created before the - pod starts, and deleted when the pod is removed. \n Use this - if: a) the volume is only needed while the pod runs, b) features - of normal volumes like restoring from snapshot or capacity - tracking are needed, c) the storage driver is specified through - a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource - for more information on the connection between this volume - type and PersistentVolumeClaim). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n Use - CSI for light-weight local ephemeral volumes if the CSI driver - is meant to be used that way - see the documentation of the - driver for more information. \n A pod can use both types of - ephemeral volumes and persistent volumes at the same time." + description: ephemeral represents a volume that is handled by + a cluster storage driver. properties: volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to + description: Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the PVC - will be deleted together with the pod. The name of the - PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. - Pod validation will reject the pod if the concatenated - name is not valid for a PVC (for example, too long). \n - An existing PVC with that name that is not owned by the - pod will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC - is meant to be used by the pod, the PVC has to updated - with an owner reference to the pod once the pod exists. - Normally this should not be necessary, but it may be useful - when manually reconstructing a broken cluster. \n This - field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. \n Required, must - not be nil." + is embedded will be the owner of the PVC, i.e. properties: metadata: description: May contain labels and annotations that @@ -6213,8 +5215,7 @@ spec: spec: description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC - that gets created from this template. The same fields - as in a PersistentVolumeClaim are also valid here. + that gets created from this template. properties: accessModes: description: 'accessModes contains the desired access @@ -6224,17 +5225,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the - provisioner or an external controller can support - the specified data source, it will create a new - volume based on the contents of the specified - data source. When the AnyVolumeDataSource feature - gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will - be copied to dataSource when dataSourceRef.namespace - is not specified. If the namespace is specified, - then dataSourceRef will not be copied to dataSource.' + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -6257,38 +5248,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object + description: dataSourceRef specifies the object from which to populate the volume with data, if - a non-empty volume is desired. This may be any - object from a non-empty API group (non core object) - or a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. - This field will replace the functionality of the - dataSource field and as such if both fields are - non-empty, they must have the same value. For - backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same value - automatically if one of them is empty and the - other is non-empty. When namespace is specified - in dataSourceRef, dataSource isn''t set to the - same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types - of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - * While dataSource only allows local objects, - dataSourceRef allows objects in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource - feature gate to be enabled. (Alpha) Using the - namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to - be enabled.' + a non-empty volume is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -6308,33 +5270,22 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace - is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant documentation - for details. (Alpha) This field requires the - CrossNamespaceVolumeDataSource feature gate - to be enabled. + is specified, a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify - resource requirements that are lower than previous - value but must still be higher than capacity recorded - in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: resources represents the minimum resources + the volume should have. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -6370,12 +5321,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. If Requests - is omitted for a container, it defaults to - Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum + amount of compute resources required. type: object type: object selector: @@ -6407,9 +5354,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -6422,11 +5367,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -6455,11 +5396,10 @@ spec: pod. properties: fsType: - description: 'fsType is the filesystem type to mount. Must + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. TODO: how do we prevent errors in the - filesystem from compromising the machine' + if unspecified. type: string lun: description: 'lun is Optional: FC target lun number' @@ -6511,9 +5451,7 @@ spec: description: 'secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no - secret object is specified. If the secret object contains - more than one secret, all secrets are passed to the plugin - scripts.' + secret object is specified.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6542,24 +5480,19 @@ spec: gcePersistentDisk: description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + the partition as "1".' format: int32 type: integer pdName: @@ -6575,17 +5508,12 @@ spec: type: object gitRepo: description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' + revision. DEPRECATED: GitRepo is deprecated.' properties: directory: description: directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. + volume directory will be the git repository. type: string repository: description: repository is the URL @@ -6619,13 +5547,8 @@ spec: - path type: object hostPath: - description: 'hostPath represents a pre-existing file or directory + description: hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' properties: path: description: 'path of the directory on the host. If the @@ -6656,16 +5579,11 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string initiatorName: description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. + Name. type: string iqn: description: iqn is the target iSCSI Qualified Name. @@ -6737,7 +5655,7 @@ spec: persistentVolumeClaim: description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + More info: https://kubernetes.' properties: claimName: description: 'claimName is the name of a PersistentVolumeClaim @@ -6795,12 +5713,7 @@ spec: defaultMode: description: defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Directories within the path are - not affected by this setting. This might be in conflict - with other options that affect the file mode, like fsGroup, - and the result can be other mode bits set. + 0000 and 0777 or a decimal value between 0 and 511. format: int32 type: integer sources: @@ -6818,13 +5731,6 @@ spec: pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -6837,13 +5743,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -6904,14 +5804,7 @@ spec: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + a decimal value between 0 and 511.' format: int32 type: integer path: @@ -6963,13 +5856,6 @@ spec: pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -6982,13 +5868,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -7024,19 +5904,14 @@ spec: of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. + token. type: string expirationSeconds: description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate - the service account token. The kubelet will - start trying to rotate the token if the token - is older than 80 percent of its time to live - or if the token is older than 24 hours.Defaults - to 1 hour and must be at least 10 minutes. + the service account token. format: int64 type: integer path: @@ -7094,10 +5969,7 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string image: description: 'image is the rados image name. More info: @@ -7207,24 +6079,14 @@ spec: description: 'defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the Secret, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -7235,12 +6097,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -7296,12 +6153,7 @@ spec: volumeNamespace: description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS - for tighter integration. Set VolumeName to any name to - override the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will be created. + then the Pod's namespace will be used. type: string type: object vsphereVolume: @@ -7373,7 +6225,7 @@ spec: description: StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / Total number of non-terminated pods targeted by this OpenTelemetryCollector's - (their labels match the selector). Deployment, Daemonset, StatefulSet. + (their labels matc type: string type: object version: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index c7d0c9fab..5c5f0b84c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,8 +1,2 @@ resources: - manager.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: ghcr.io/matt/opentelemetry-operator/opentelemetry-operator - newTag: 0.82.0-9-g6f4246c diff --git a/docs/api.md b/docs/api.md index c9a286552..cf7628e93 100644 --- a/docs/api.md +++ b/docs/api.md @@ -103,7 +103,7 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen env []object - Env defines common env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines common env vars.
false @@ -117,7 +117,7 @@ InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumen go object - Go defines configuration for Go auto-instrumentation. When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged.
+ Go defines configuration for Go auto-instrumentation.
false @@ -193,7 +193,7 @@ ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. attrs []object - Attrs defines Apache HTTPD agent specific attributes. The precedence is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+ Attrs defines Apache HTTPD agent specific attributes. The precedence is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.
false @@ -207,7 +207,7 @@ ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. env []object - Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines Apache HTTPD specific env vars.
false @@ -262,7 +262,7 @@ EnvVar represents an environment variable present in a Container. value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false @@ -303,14 +303,14 @@ Source for the environment variable's value. Cannot be used if value is not empt fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false @@ -370,7 +370,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status. @@ -404,7 +404,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -508,7 +508,7 @@ EnvVar represents an environment variable present in a Container. @@ -549,14 +549,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -616,7 +616,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -650,7 +650,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -748,8 +748,7 @@ Resources describes the compute resource requirements. @@ -763,7 +762,7 @@ Resources describes the compute resource requirements. @@ -817,7 +816,7 @@ DotNet defines configuration for DotNet auto-instrumentation. @@ -865,7 +864,7 @@ EnvVar represents an environment variable present in a Container. @@ -906,14 +905,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -973,7 +972,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
env []object - Env defines DotNet specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines DotNet specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -1007,7 +1006,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -1105,8 +1104,7 @@ Resources describes the compute resource requirements. @@ -1120,7 +1118,7 @@ Resources describes the compute resource requirements. @@ -1181,7 +1179,7 @@ EnvVar represents an environment variable present in a Container. @@ -1222,14 +1220,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -1289,7 +1287,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -1323,7 +1321,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -1432,7 +1430,7 @@ Exporter defines exporter configuration. -Go defines configuration for Go auto-instrumentation. When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. +Go defines configuration for Go auto-instrumentation.
@@ -1447,7 +1445,7 @@ Go defines configuration for Go auto-instrumentation. When using Go auto-instrum @@ -1495,7 +1493,7 @@ EnvVar represents an environment variable present in a Container. @@ -1536,14 +1534,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -1603,7 +1601,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
env []object - Env defines Go specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines Go specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -1637,7 +1635,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -1735,8 +1733,7 @@ Resources describes the compute resource requirements. @@ -1750,7 +1747,7 @@ Resources describes the compute resource requirements. @@ -1804,7 +1801,7 @@ Java defines configuration for java auto-instrumentation. @@ -1852,7 +1849,7 @@ EnvVar represents an environment variable present in a Container. @@ -1893,14 +1890,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -1960,7 +1957,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
env []object - Env defines java specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines java specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -1994,7 +1991,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -2092,8 +2089,7 @@ Resources describes the compute resource requirements. @@ -2107,7 +2103,7 @@ Resources describes the compute resource requirements. @@ -2161,7 +2157,7 @@ Nginx defines configuration for Nginx auto-instrumentation. @@ -2175,7 +2171,7 @@ Nginx defines configuration for Nginx auto-instrumentation. @@ -2223,7 +2219,7 @@ EnvVar represents an environment variable present in a Container. @@ -2264,14 +2260,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -2331,7 +2327,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
attrs []object - Attrs defines Nginx agent specific attributes. The precedence order is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module
+ Attrs defines Nginx agent specific attributes. The precedence order is: `agent default attributes` > `instrument spec attributes` . Attributes are documented at https://github.
false
env []object - Env defines Nginx specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines Nginx specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -2365,7 +2361,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -2469,7 +2465,7 @@ EnvVar represents an environment variable present in a Container. @@ -2510,14 +2506,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -2577,7 +2573,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -2611,7 +2607,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -2709,8 +2705,7 @@ Resources describes the compute resource requirements. @@ -2724,7 +2719,7 @@ Resources describes the compute resource requirements. @@ -2778,7 +2773,7 @@ NodeJS defines configuration for nodejs auto-instrumentation. @@ -2826,7 +2821,7 @@ EnvVar represents an environment variable present in a Container. @@ -2867,14 +2862,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -2934,7 +2929,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
env []object - Env defines nodejs specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines nodejs specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -2968,7 +2963,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -3066,8 +3061,7 @@ Resources describes the compute resource requirements. @@ -3081,7 +3075,7 @@ Resources describes the compute resource requirements. @@ -3135,7 +3129,7 @@ Python defines configuration for python auto-instrumentation. @@ -3183,7 +3177,7 @@ EnvVar represents an environment variable present in a Container. @@ -3224,14 +3218,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -3291,7 +3285,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
env []object - Env defines python specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
+ Env defines python specific env vars.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -3325,7 +3319,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -3423,8 +3417,7 @@ Resources describes the compute resource requirements. @@ -3438,7 +3431,7 @@ Resources describes the compute resource requirements. @@ -3526,7 +3519,7 @@ Sampler defines sampling configuration. @@ -3615,9 +3608,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3694,7 +3685,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3708,7 +3699,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3773,14 +3764,14 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3847,7 +3838,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. @@ -3911,14 +3902,14 @@ A single application container that you want to run within a pod. @@ -3932,21 +3923,21 @@ A single application container that you want to run within a pod. @@ -3967,14 +3958,14 @@ A single application container that you want to run within a pod. @@ -3995,14 +3986,14 @@ A single application container that you want to run within a pod. @@ -4016,21 +4007,21 @@ A single application container that you want to run within a pod. @@ -4092,7 +4083,7 @@ EnvVar represents an environment variable present in a Container. @@ -4133,14 +4124,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -4200,7 +4191,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
argument string - Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. The value will be set in the OTEL_TRACES_SAMPLER_ARG env var.
+ Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25.
false
additionalContainers []object - AdditionalContainers allows injecting additional containers into the Collector's pod definition. These sidecar containers can be used for authentication proxies, log shipping sidecars, agents for shipping metrics to their cloud, or in general sidecars that do not support automatic injection. This option only applies to Deployment, DaemonSet, and StatefulSet deployment modes of the collector. It does not apply to the sidecar deployment mode. More info about sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ - Container names managed by the operator: * `otc-container` - Overriding containers managed by the operator is outside the scope of what the maintainers will support and by doing so, you wil accept the risk of it breaking things.
+ AdditionalContainers allows injecting additional containers into the Collector's pod definition.
false
initContainers []object - InitContainers allows injecting initContainers to the Collector's pod definition. These init containers can be used to fetch secrets for injection into the configuration from external sources, run added checks, etc. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
+ InitContainers allows injecting initContainers to the Collector's pod definition.
false
livenessProbe object - Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline.
+ Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector.
false
podSecurityContext object - PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
+ PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.
false
ports []object - Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open additional ports that can't be inferred by the operator, like for custom receivers.
+ Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.
false
topologySpreadConstraints []object - TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ This is only relevant to statefulset, and deployment mode
+ TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined top
false
args []string - Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
false
command []string - Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
false
envFrom []object - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
+ List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER.
false
image string - Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
+ Container image name. More info: https://kubernetes.
false
imagePullPolicy string - Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.
false
ports []object - List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.
+ List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.
false
readinessProbe object - Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.
false
securityContext object - SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
false
startupProbe object - StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully.
false
stdinOnce boolean - Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
+ Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions.
false
terminationMessagePath string - Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
+ Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem.
false
terminationMessagePolicy string - Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
+ Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -4234,7 +4225,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -4440,14 +4431,14 @@ Actions that the management system should take in response to container lifecycl @@ -4459,7 +4450,7 @@ Actions that the management system should take in response to container lifecycl -PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
postStart object - PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
false
preStop object - PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
false
@@ -4488,7 +4479,7 @@ PostStart is called immediately after a container is created. If the handler fai @@ -4515,7 +4506,7 @@ Exec specifies the action to take. @@ -4616,7 +4607,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -4650,7 +4641,7 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba -PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
@@ -4679,7 +4670,7 @@ PreStop is called immediately before a container is terminated due to an API req @@ -4706,7 +4697,7 @@ Exec specifies the action to take. @@ -4807,7 +4798,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -4920,7 +4911,7 @@ Periodic probe of container liveness. Container will be restarted if the probe f @@ -4958,7 +4949,7 @@ Exec specifies the action to take. @@ -4994,8 +4985,7 @@ GRPC specifies an action involving a GRPC port. @@ -5191,7 +5181,7 @@ ContainerPort represents a network port in a single container. -Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
@@ -5270,7 +5260,7 @@ Periodic probe of container service readiness. Container will be removed from se @@ -5308,7 +5298,7 @@ Exec specifies the action to take. @@ -5344,8 +5334,7 @@ GRPC specifies an action involving a GRPC port. @@ -5530,8 +5519,7 @@ Compute Resources required by this container. Cannot be updated. More info: http @@ -5545,7 +5533,7 @@ Compute Resources required by this container. Cannot be updated. More info: http @@ -5584,7 +5572,7 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. -SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
@@ -5599,7 +5587,7 @@ SecurityContext defines the security options the container should be run with. I @@ -5620,7 +5608,7 @@ SecurityContext defines the security options the container should be run with. I @@ -5634,7 +5622,7 @@ SecurityContext defines the security options the container should be run with. I @@ -5643,14 +5631,14 @@ SecurityContext defines the security options the container should be run with. I @@ -5659,21 +5647,21 @@ SecurityContext defines the security options the container should be run with. I @@ -5719,7 +5707,7 @@ The capabilities to add/drop when running containers. Defaults to the default se -The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
allowPrivilegeEscalation boolean - AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
+ AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process.
false
procMount string - procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
+ procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.

Format: int64
runAsNonRoot boolean - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ Indicates that the container must run as a non-root user.
false
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.

Format: int64
seLinuxOptions object - The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
false
seccompProfile object - The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
+ The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+ The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
false
@@ -5767,7 +5755,7 @@ The SELinux context to be applied to the container. If unspecified, the containe -The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
@@ -5783,14 +5771,14 @@ The seccomp options to use by this container. If seccomp options are provided at @@ -5802,7 +5790,7 @@ The seccomp options to use by this container. If seccomp options are provided at -The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
string type indicates which kind of seccomp profile will be applied. Valid options are: - Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+ Localhost - a profile defined in a file on the node should be used.
true
localhostProfile string - localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+ localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
false
@@ -5831,14 +5819,14 @@ The Windows specific settings applied to all containers. If unspecified, the opt @@ -5850,7 +5838,7 @@ The Windows specific settings applied to all containers. If unspecified, the opt -StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully.
hostProcess boolean - HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+ HostProcess determines if a container should be run as a 'Host Process' container.
false
runAsUserName string - The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
false
@@ -5929,7 +5917,7 @@ StartupProbe indicates that the Pod has successfully initialized. If specified, @@ -5967,7 +5955,7 @@ Exec specifies the action to take. @@ -6003,8 +5991,7 @@ GRPC specifies an action involving a GRPC port. @@ -6223,7 +6210,7 @@ VolumeMount describes a mounting of a Volume within a container. @@ -6291,14 +6278,14 @@ Describes node affinity scheduling rules for the pod. @@ -6409,7 +6396,7 @@ A node selector requirement is a selector that contains values, a key, and an op @@ -6450,7 +6437,7 @@ A node selector requirement is a selector that contains values, a key, and an op @@ -6462,7 +6449,7 @@ A node selector requirement is a selector that contains values, a key, and an op -If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. +If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
subPathExpr string - Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ Expanded path within the volume from which the container's volume should be mounted.
false
preferredDuringSchedulingIgnoredDuringExecution []object - The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
+ The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
false
requiredDuringSchedulingIgnoredDuringExecution object - If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
+ If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
false
values []string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
values []string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -6552,7 +6539,7 @@ A node selector requirement is a selector that contains values, a key, and an op @@ -6593,7 +6580,7 @@ A node selector requirement is a selector that contains values, a key, and an op @@ -6620,14 +6607,14 @@ Describes pod affinity scheduling rules (e.g. co-locate this pod in the same nod @@ -6690,7 +6677,7 @@ Required. A pod affinity term, associated with the corresponding weight. @@ -6704,14 +6691,14 @@ Required. A pod affinity term, associated with the corresponding weight. @@ -6745,7 +6732,7 @@ A label query over a set of resources, in this case pods. @@ -6786,7 +6773,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -6798,7 +6785,7 @@ A label selector requirement is a selector that contains values, a key, and an o -A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
values []string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
values []string - An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
+ An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
preferredDuringSchedulingIgnoredDuringExecution []object - The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
+ The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
false
requiredDuringSchedulingIgnoredDuringExecution []object - If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
false
topologyKey string - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
true
namespaceSelector object - A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
false
namespaces []string - namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -6820,7 +6807,7 @@ A label query over the set of namespaces that the term applies to. The term is a @@ -6861,7 +6848,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -6873,7 +6860,7 @@ A label selector requirement is a selector that contains values, a key, and an o -Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -6888,7 +6875,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g @@ -6902,14 +6889,14 @@ Defines a set of pods (namely those matching the labelSelector relative to the g @@ -6943,7 +6930,7 @@ A label query over a set of resources, in this case pods. @@ -6984,7 +6971,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -6996,7 +6983,7 @@ A label selector requirement is a selector that contains values, a key, and an o -A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
topologyKey string - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
true
namespaceSelector object - A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
false
namespaces []string - namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -7018,7 +7005,7 @@ A label query over the set of namespaces that the term applies to. The term is a @@ -7059,7 +7046,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -7086,14 +7073,14 @@ Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the @@ -7156,7 +7143,7 @@ Required. A pod affinity term, associated with the corresponding weight. @@ -7170,14 +7157,14 @@ Required. A pod affinity term, associated with the corresponding weight. @@ -7211,7 +7198,7 @@ A label query over a set of resources, in this case pods. @@ -7252,7 +7239,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -7264,7 +7251,7 @@ A label selector requirement is a selector that contains values, a key, and an o -A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
preferredDuringSchedulingIgnoredDuringExecution []object - The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
+ The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
false
requiredDuringSchedulingIgnoredDuringExecution []object - If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
+ If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
false
topologyKey string - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
true
namespaceSelector object - A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
false
namespaces []string - namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -7286,7 +7273,7 @@ A label query over the set of namespaces that the term applies to. The term is a @@ -7327,7 +7314,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -7339,7 +7326,7 @@ A label selector requirement is a selector that contains values, a key, and an o -Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -7354,7 +7341,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g @@ -7368,14 +7355,14 @@ Defines a set of pods (namely those matching the labelSelector relative to the g @@ -7409,7 +7396,7 @@ A label query over a set of resources, in this case pods. @@ -7450,7 +7437,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -7462,7 +7449,7 @@ A label selector requirement is a selector that contains values, a key, and an o -A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
topologyKey string - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
+ This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
true
namespaceSelector object - A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
+ A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
false
namespaces []string - namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
+ namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
@@ -7484,7 +7471,7 @@ A label query over the set of namespaces that the term applies to. The term is a @@ -7525,7 +7512,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -7568,7 +7555,7 @@ Autoscaler specifies the pod autoscaling configuration to use for the OpenTeleme @@ -7622,14 +7609,14 @@ HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in @@ -7641,7 +7628,7 @@ HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in -scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used). +scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e.
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
metrics []object - Metrics is meant to provide a customizable way to configure HPA metrics. currently the only supported custom metrics is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization instead if scaling on these common resource metrics.
+ Metrics is meant to provide a customizable way to configure HPA metrics. currently the only supported custom metrics is type=Pod.
false
scaleDown object - scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).
+ scaleDown is scaling policy for scaling Down. If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e.
false
scaleUp object - scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used.
+ scaleUp is scaling policy for scaling Up.
false
@@ -7670,7 +7657,7 @@ scaleDown is scaling policy for scaling Down. If not set, the default value is t @@ -7729,7 +7716,7 @@ HPAScalingPolicy is a single policy which must hold true for a specified past in -scaleUp is scaling policy for scaling Up. If not set, the default value is the higher of: * increase no more than 4 pods per 60 seconds * double the number of pods per 60 seconds No stabilization is used. +scaleUp is scaling policy for scaling Up.
stabilizationWindowSeconds integer - stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+ stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down.

Format: int32
@@ -7758,7 +7745,7 @@ scaleUp is scaling policy for scaling Up. If not set, the default value is the h @@ -7839,7 +7826,7 @@ MetricSpec defines a subset of metrics to be defined for the HPA's metric array @@ -7851,7 +7838,7 @@ MetricSpec defines a subset of metrics to be defined for the HPA's metric array -PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value. +PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
stabilizationWindowSeconds integer - stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
+ stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down.

Format: int32
pods object - PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
+ PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
false
@@ -7907,7 +7894,7 @@ metric identifies the target metric by name and selector @@ -7919,7 +7906,7 @@ metric identifies the target metric by name and selector -selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics. +selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scopi
selector object - selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
+ selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scopi
false
@@ -7941,7 +7928,7 @@ selector is the string-encoded form of a standard kubernetes label selector for @@ -7982,7 +7969,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -8016,7 +8003,7 @@ target specifies the target value for the given metric @@ -8066,7 +8053,7 @@ EnvVar represents an environment variable present in a Container. @@ -8107,14 +8094,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -8174,7 +8161,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
averageUtilization integer - averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type
+ averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.

Format: int32
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -8208,7 +8195,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -8438,6 +8425,15 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function Route is an OpenShift specific section that is only considered when type "route" is used.
+ + + + + @@ -8449,7 +8445,7 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function @@ -8507,14 +8503,14 @@ IngressTLS describes the transport layer security associated with an ingress. @@ -8548,14 +8544,14 @@ A single application container that you want to run within a pod. @@ -8569,21 +8565,21 @@ A single application container that you want to run within a pod. @@ -8604,14 +8600,14 @@ A single application container that you want to run within a pod. @@ -8632,14 +8628,14 @@ A single application container that you want to run within a pod. @@ -8653,21 +8649,21 @@ A single application container that you want to run within a pod. @@ -8729,7 +8725,7 @@ EnvVar represents an environment variable present in a Container. @@ -8770,14 +8766,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -8837,7 +8833,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
ruleTypeenum + RuleType defines how Ingress exposes collector receivers. IngressRuleTypePath ("path") exposes each receiver port on a unique path on single domain defined in Hostname.
+
+ Enum: path, subdomain
+
false
tls []objecttype enum - Type default value is: "" Supported types are: ingress
+ Type default value is: "" Supported types are: ingress, route

Enum: ingress, route
hosts []string - hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
+ hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret.
false
secretName string - secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the "Host" header is used for routing.
+ secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone.
false
args []string - Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
false
command []string - Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
+ Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
false
envFrom []object - List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
+ List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER.
false
image string - Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.
+ Container image name. More info: https://kubernetes.
false
imagePullPolicy string - Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
+ Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.
false
ports []object - List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.
+ List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.
false
readinessProbe object - Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.
false
securityContext object - SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
false
startupProbe object - StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully.
false
stdinOnce boolean - Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false
+ Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions.
false
terminationMessagePath string - Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.
+ Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem.
false
terminationMessagePolicy string - Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
+ Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure.
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -8871,7 +8867,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -9077,14 +9073,14 @@ Actions that the management system should take in response to container lifecycl @@ -9096,7 +9092,7 @@ Actions that the management system should take in response to container lifecycl -PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
postStart object - PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
false
preStop object - PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
false
@@ -9125,7 +9121,7 @@ PostStart is called immediately after a container is created. If the handler fai @@ -9152,7 +9148,7 @@ Exec specifies the action to take. @@ -9253,7 +9249,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -9287,7 +9283,7 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba -PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
@@ -9316,7 +9312,7 @@ PreStop is called immediately before a container is terminated due to an API req @@ -9343,7 +9339,7 @@ Exec specifies the action to take. @@ -9444,7 +9440,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -9557,7 +9553,7 @@ Periodic probe of container liveness. Container will be restarted if the probe f @@ -9595,7 +9591,7 @@ Exec specifies the action to take. @@ -9631,8 +9627,7 @@ GRPC specifies an action involving a GRPC port. @@ -9828,7 +9823,7 @@ ContainerPort represents a network port in a single container. -Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
@@ -9907,7 +9902,7 @@ Periodic probe of container service readiness. Container will be removed from se @@ -9945,7 +9940,7 @@ Exec specifies the action to take. @@ -9981,8 +9976,7 @@ GRPC specifies an action involving a GRPC port. @@ -10167,8 +10161,7 @@ Compute Resources required by this container. Cannot be updated. More info: http @@ -10182,7 +10175,7 @@ Compute Resources required by this container. Cannot be updated. More info: http @@ -10221,7 +10214,7 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. -SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
@@ -10236,7 +10229,7 @@ SecurityContext defines the security options the container should be run with. I @@ -10257,7 +10250,7 @@ SecurityContext defines the security options the container should be run with. I @@ -10271,7 +10264,7 @@ SecurityContext defines the security options the container should be run with. I @@ -10280,14 +10273,14 @@ SecurityContext defines the security options the container should be run with. I @@ -10296,21 +10289,21 @@ SecurityContext defines the security options the container should be run with. I @@ -10356,7 +10349,7 @@ The capabilities to add/drop when running containers. Defaults to the default se -The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
allowPrivilegeEscalation boolean - AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
+ AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process.
false
procMount string - procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
+ procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.

Format: int64
runAsNonRoot boolean - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ Indicates that the container must run as a non-root user.
false
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.

Format: int64
seLinuxOptions object - The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
false
seccompProfile object - The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
+ The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+ The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
false
@@ -10404,7 +10397,7 @@ The SELinux context to be applied to the container. If unspecified, the containe -The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
@@ -10420,14 +10413,14 @@ The seccomp options to use by this container. If seccomp options are provided at @@ -10439,7 +10432,7 @@ The seccomp options to use by this container. If seccomp options are provided at -The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
string type indicates which kind of seccomp profile will be applied. Valid options are: - Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+ Localhost - a profile defined in a file on the node should be used.
true
localhostProfile string - localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+ localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
false
@@ -10468,14 +10461,14 @@ The Windows specific settings applied to all containers. If unspecified, the opt @@ -10487,7 +10480,7 @@ The Windows specific settings applied to all containers. If unspecified, the opt -StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully.
hostProcess boolean - HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+ HostProcess determines if a container should be run as a 'Host Process' container.
false
runAsUserName string - The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
false
@@ -10566,7 +10559,7 @@ StartupProbe indicates that the Pod has successfully initialized. If specified, @@ -10604,7 +10597,7 @@ Exec specifies the action to take. @@ -10640,8 +10633,7 @@ GRPC specifies an action involving a GRPC port. @@ -10860,7 +10852,7 @@ VolumeMount describes a mounting of a Volume within a container. @@ -10887,14 +10879,14 @@ Actions that the management system should take in response to container lifecycl @@ -10906,7 +10898,7 @@ Actions that the management system should take in response to container lifecycl -PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
service string - Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If this is not specified, the default behavior is defined by gRPC.
+ Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
false
subPathExpr string - Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ Expanded path within the volume from which the container's volume should be mounted.
false
postStart object - PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy.
false
preStop object - PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
+ PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
false
@@ -10935,7 +10927,7 @@ PostStart is called immediately after a container is created. If the handler fai @@ -10962,7 +10954,7 @@ Exec specifies the action to take. @@ -11063,7 +11055,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -11097,7 +11089,7 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba -PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks +PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
@@ -11126,7 +11118,7 @@ PreStop is called immediately before a container is terminated due to an API req @@ -11153,7 +11145,7 @@ Exec specifies the action to take. @@ -11254,7 +11246,7 @@ HTTPHeader describes a custom header to be used in HTTP probes -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
tcpSocket object - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
+ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility.
false
command []string - Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
+ Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem.
false
@@ -11288,7 +11280,7 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba -Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline. +Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector.
@@ -11312,7 +11304,7 @@ Liveness config for the OpenTelemetry Collector except the probe handler which i @@ -11339,7 +11331,7 @@ Liveness config for the OpenTelemetry Collector except the probe handler which i @@ -11416,7 +11408,7 @@ Metrics defines the metrics configuration for operands. -PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. +PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.
initialDelaySeconds integer - Number of seconds after the container has started before liveness probes are initiated. Defaults to 0 seconds. Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
+ Number of seconds after the container has started before liveness probes are initiated. Defaults to 0 seconds. Minimum value is 0. More info: https://kubernetes.

Format: int32
terminationGracePeriodSeconds integer - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
+ Optional duration in seconds the pod needs to terminate gracefully upon probe failure.

Format: int64
@@ -11432,8 +11424,7 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -11442,14 +11433,14 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -11458,14 +11449,14 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -11474,7 +11465,7 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -11488,21 +11479,21 @@ PodSecurityContext holds pod-level security attributes and common container sett @@ -11514,7 +11505,7 @@ PodSecurityContext holds pod-level security attributes and common container sett -The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. +The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext.
integer A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: - 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- - If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.
+ 1.

Format: int64
fsGroupChangePolicy string - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.
+ fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.

Format: int64
runAsNonRoot boolean - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ Indicates that the container must run as a non-root user.
false
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext.

Format: int64
seLinuxOptions object - The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
+ The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext.
false
supplementalGroups []integer - A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows.
+ A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for th
false
sysctls []object - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.
+ Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+ The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used.
false
@@ -11578,14 +11569,14 @@ The seccomp options to use by the containers in this pod. Note that this field c @@ -11631,7 +11622,7 @@ Sysctl defines a kernel parameter to be set -The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used.
string type indicates which kind of seccomp profile will be applied. Valid options are: - Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+ Localhost - a profile defined in a file on the node should be used.
true
localhostProfile string - localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+ localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
false
@@ -11660,14 +11651,14 @@ The Windows specific settings applied to all containers. If unspecified, the opt @@ -11703,21 +11694,21 @@ ServicePort contains information on service's port. @@ -11735,7 +11726,7 @@ ServicePort contains information on service's port. @@ -11763,8 +11754,7 @@ Resources to set on the OpenTelemetry Collector pods. @@ -11778,7 +11768,7 @@ Resources to set on the OpenTelemetry Collector pods. @@ -11832,7 +11822,7 @@ SecurityContext will be set as the container security context. @@ -11853,7 +11843,7 @@ SecurityContext will be set as the container security context. @@ -11867,7 +11857,7 @@ SecurityContext will be set as the container security context. @@ -11876,14 +11866,14 @@ SecurityContext will be set as the container security context. @@ -11892,21 +11882,21 @@ SecurityContext will be set as the container security context. @@ -11952,7 +11942,7 @@ The capabilities to add/drop when running containers. Defaults to the default se -The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
hostProcess boolean - HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+ HostProcess determines if a container should be run as a 'Host Process' container.
false
runAsUserName string - The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
false
appProtocol string - The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
+ The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.
false
name string - The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.
+ The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names.
false
nodePort integer - The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
+ The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system.

Format: int32
targetPort int or string - Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
+ Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
false
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
allowPrivilegeEscalation boolean - AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
+ AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process.
false
procMount string - procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
+ procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths.
false
runAsGroup integer - The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.

Format: int64
runAsNonRoot boolean - Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ Indicates that the container must run as a non-root user.
false
runAsUser integer - The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.

Format: int64
seLinuxOptions object - The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
+ The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
false
seccompProfile object - The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
+ The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
false
windowsOptions object - The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
+ The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
false
@@ -12000,7 +11990,7 @@ The SELinux context to be applied to the container. If unspecified, the containe -The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
@@ -12016,14 +12006,14 @@ The seccomp options to use by this container. If seccomp options are provided at @@ -12035,7 +12025,7 @@ The seccomp options to use by this container. If seccomp options are provided at -The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
string type indicates which kind of seccomp profile will be applied. Valid options are: - Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
+ Localhost - a profile defined in a file on the node should be used.
true
localhostProfile string - localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost".
+ localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
false
@@ -12064,14 +12054,14 @@ The Windows specific settings applied to all containers. If unspecified, the opt @@ -12121,7 +12111,7 @@ TargetAllocator indicates a value which determines whether to spawn a target all @@ -12142,14 +12132,14 @@ TargetAllocator indicates a value which determines whether to spawn a target all @@ -12172,7 +12162,7 @@ TargetAllocator indicates a value which determines whether to spawn a target all @@ -12206,7 +12196,7 @@ EnvVar represents an environment variable present in a Container. @@ -12247,14 +12237,14 @@ Source for the environment variable's value. Cannot be used if value is not empt @@ -12314,7 +12304,7 @@ Selects a key of a ConfigMap. -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
hostProcess boolean - HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
+ HostProcess determines if a container should be run as a 'Host Process' container.
false
runAsUserName string - The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
+ The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
false
filterStrategy string - FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option is relabel-config (drops targets based on prom relabel_config). Filtering is disabled by default.
+ FilterStrategy determines how to filter targets before allocating them among the collectors. The only current option is relabel-config (drops targets based on prom relabel_config).
false
prometheusCR object - PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces.
+ PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval.
false
replicas integer - Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value other than 1 if a strategy that allows for high availability is chosen. Currently, the only allocation strategy that can be run in a high availability mode is consistent-hashing.
+ Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value other than 1 if a strategy that allows for high availability is chosen.

Format: int32
topologySpreadConstraints []object - TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
+ TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined top
false
value string - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
+ Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
false
fieldRef object - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
+ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
false
resourceFieldRef object - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
+ Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
false
@@ -12348,7 +12338,7 @@ Selects a field of the pod: supports metadata.name, metadata.namespace, `metadat -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
@@ -12430,7 +12420,7 @@ Selects a key of a secret in the pod's namespace -PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. +PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval.
@@ -12452,7 +12442,7 @@ PrometheusCR defines the configuration for the retrieval of PrometheusOperator C @@ -12470,7 +12460,7 @@ PrometheusCR defines the configuration for the retrieval of PrometheusOperator C @@ -12498,8 +12488,7 @@ Resources to set on the OpenTelemetryTargetAllocator containers. @@ -12513,7 +12502,7 @@ Resources to set on the OpenTelemetryTargetAllocator containers. @@ -12567,7 +12556,7 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12576,14 +12565,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12597,17 +12586,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12616,16 +12602,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12659,7 +12643,7 @@ LabelSelector is used to find matching pods. Pods that match this label selector @@ -12700,7 +12684,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -12741,14 +12725,14 @@ The pod this Toleration is attached to tolerates any taint that matches the trip @@ -12784,7 +12768,7 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12793,14 +12777,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12814,17 +12798,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12833,16 +12814,14 @@ TopologySpreadConstraint specifies how to spread matching pods among the given t @@ -12876,7 +12855,7 @@ LabelSelector is used to find matching pods. Pods that match this label selector @@ -12917,7 +12896,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -12944,14 +12923,14 @@ PersistentVolumeClaim is a user's request for and claim to a persistent volume @@ -13061,21 +13040,21 @@ spec defines the desired characteristics of a volume requested by a pod author. @@ -13115,7 +13094,7 @@ spec defines the desired characteristics of a volume requested by a pod author. -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.
podMonitorSelector map[string]string - PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's meta labels. The requirements are ANDed.
+ PodMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a PodMonitor's meta labels.
false
serviceMonitorSelector map[string]string - ServiceMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a ServiceMonitor's meta labels. The requirements are ANDed.
+ ServiceMonitors to be selected for target discovery. This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a ServiceMonitor's meta labels.
false
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
maxSkew integer - MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
+ MaxSkew describes the degree to which pods may be unevenly distributed.

Format: int32
topologyKey string - TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.
+ TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology.
true
whenUnsatisfiable string - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
+ WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it.
true
matchLabelKeys []string - MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
+ MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated.
false
minDomains integer - MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. - This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).
+ MinDomains indicates a minimum number of eligible domains.

Format: int32
nodeAffinityPolicy string - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+ NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew.
false
nodeTaintsPolicy string - NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. - If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+ NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
operator string - Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
+ Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal.
false
tolerationSeconds integer - TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
+ TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.

Format: int64
maxSkew integer - MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
+ MaxSkew describes the degree to which pods may be unevenly distributed.

Format: int32
topologyKey string - TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.
+ TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology.
true
whenUnsatisfiable string - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
+ WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it.
true
matchLabelKeys []string - MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
+ MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated.
false
minDomains integer - MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. - This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).
+ MinDomains indicates a minimum number of eligible domains.

Format: int32
nodeAffinityPolicy string - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+ NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew.
false
nodeTaintsPolicy string - NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. - If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
+ NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
apiVersion string - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.
false
kind string - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.
false
dataSource object - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.
false
dataSourceRef object - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
false
resources object - resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ resources represents the minimum resources the volume should have.
false
@@ -13156,7 +13135,7 @@ dataSource field can be used to specify either: * An existing VolumeSnapshot obj -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
@@ -13192,7 +13171,7 @@ dataSourceRef specifies the object from which to populate the volume with data, @@ -13204,7 +13183,7 @@ dataSourceRef specifies the object from which to populate the volume with data, -resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +resources represents the minimum resources the volume should have.
namespace string - Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+ Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.
false
@@ -13220,8 +13199,7 @@ resources represents the minimum resources the volume should have. If RecoverVol @@ -13235,7 +13213,7 @@ resources represents the minimum resources the volume should have. If RecoverVol @@ -13296,7 +13274,7 @@ selector is a label query over volumes to consider for binding. @@ -13337,7 +13315,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -13371,7 +13349,7 @@ status represents the current information/status of a persistent volume claim. R @@ -13399,7 +13377,7 @@ status represents the current information/status of a persistent volume claim. R @@ -13465,7 +13443,7 @@ PersistentVolumeClaimCondition contains details about state of pvc @@ -13527,7 +13505,7 @@ VolumeMount describes a mounting of a Volume within a container. @@ -13561,7 +13539,7 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -13624,11 +13602,7 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -13656,14 +13630,14 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -13677,7 +13651,7 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -13698,7 +13672,7 @@ Volume represents a named volume in a pod that may be accessed by any container @@ -13773,7 +13747,7 @@ Volume represents a named volume in a pod that may be accessed by any container -awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore +awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
allocatedResources map[string]int or string - allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+ allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested.
false
resizeStatus string - resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
+ resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet.
false
reason string - reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized.
+ reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition.
false
subPathExpr string - Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
+ Expanded path within the volume from which the container's volume should be mounted.
false
awsElasticBlockStore object - awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+ awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
false
ephemeral object - ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time.
+ ephemeral represents a volume that is handled by a cluster storage driver.
false
gcePersistentDisk object - gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
false
gitRepo object - gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
+ gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated.
false
hostPath object - hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
+ hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.
false
persistentVolumeClaim object - persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+ persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.
false
@@ -13795,14 +13769,14 @@ awsElasticBlockStore represents an AWS Disk resource that is attached to a kubel @@ -13866,7 +13840,7 @@ azureDisk represents an Azure Data Disk mount on the host and bind mount to the @@ -14037,7 +14011,7 @@ cinder represents a cinder volume attached and mounted on kubelets host machine. @@ -14105,7 +14079,7 @@ configMap represents a configMap that should populate this volume @@ -14114,7 +14088,7 @@ configMap represents a configMap that should populate this volume @@ -14169,7 +14143,7 @@ Maps a string key to a path within a volume. @@ -14212,7 +14186,7 @@ csi (Container Storage Interface) represents ephemeral storage that is handled b @@ -14238,7 +14212,7 @@ csi (Container Storage Interface) represents ephemeral storage that is handled b -nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. +nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls.
fsType string - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
false
partition integer - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
+ partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1".

Format: int32
kind string - kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
+ kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set).
false
fsType string - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
defaultMode integer - defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
items []object - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
false
mode integer - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
nodePublishSecretRef object - nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
+ nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls.
false
@@ -14280,7 +14254,7 @@ downwardAPI represents downward API about the pod that should populate this volu @@ -14330,7 +14304,7 @@ DownwardAPIVolumeFile represents information to create the file containing the p @@ -14441,14 +14415,14 @@ emptyDir represents a temporary directory that shares a pod's lifetime. More inf @@ -14460,11 +14434,7 @@ emptyDir represents a temporary directory that shares a pod's lifetime. More inf -ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time. +ephemeral represents a volume that is handled by a cluster storage driver.
defaultMode integer - Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default.

Format: int32
mode integer - Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
medium string - medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory.
false
sizeLimit int or string - sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium.
false
@@ -14479,10 +14449,7 @@ ephemeral represents a volume that is handled by a cluster storage driver. The v @@ -14494,10 +14461,7 @@ ephemeral represents a volume that is handled by a cluster storage driver. The v -Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. - Required, must not be nil. +Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e.
volumeClaimTemplate object - Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. - Required, must not be nil.
+ Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e.
false
@@ -14512,7 +14476,7 @@ Will be used to create a stand-alone PVC to provision the volume. The pod in whi @@ -14531,7 +14495,7 @@ Will be used to create a stand-alone PVC to provision the volume. The pod in whi -The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. +The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template.
spec object - The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.
+ The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template.
true
@@ -14553,21 +14517,21 @@ The specification for the PersistentVolumeClaim. The entire content is copied un @@ -14607,7 +14571,7 @@ The specification for the PersistentVolumeClaim. The entire content is copied un -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.
dataSource object - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
+ dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.
false
dataSourceRef object - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+ dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
false
resources object - resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
+ resources represents the minimum resources the volume should have.
false
@@ -14648,7 +14612,7 @@ dataSource field can be used to specify either: * An existing VolumeSnapshot obj -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
@@ -14684,7 +14648,7 @@ dataSourceRef specifies the object from which to populate the volume with data, @@ -14696,7 +14660,7 @@ dataSourceRef specifies the object from which to populate the volume with data, -resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +resources represents the minimum resources the volume should have.
namespace string - Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
+ Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.
false
@@ -14712,8 +14676,7 @@ resources represents the minimum resources the volume should have. If RecoverVol @@ -14727,7 +14690,7 @@ resources represents the minimum resources the volume should have. If RecoverVol @@ -14788,7 +14751,7 @@ selector is a label query over volumes to consider for binding. @@ -14829,7 +14792,7 @@ A label selector requirement is a selector that contains values, a key, and an o @@ -14911,7 +14874,7 @@ fc represents a Fibre Channel resource that is attached to a kubelet's host mach @@ -14996,7 +14959,7 @@ flexVolume represents a generic volume resource that is provisioned/attached usi @@ -15008,7 +14971,7 @@ flexVolume represents a generic volume resource that is provisioned/attached usi -secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. +secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified.
[]object Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
+ This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
false
requests map[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ Requests describes the minimum amount of compute resources required.
false
matchLabels map[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
+ matchLabels is a map of {key,value} pairs.
false
values []string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
+ values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
false
fsType string - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
false
secretRef object - secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
+ secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified.
false
@@ -15069,7 +15032,7 @@ flocker represents a Flocker volume attached to a kubelet's host machine. This d -gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
@@ -15091,14 +15054,14 @@ gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's @@ -15119,7 +15082,7 @@ gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's -gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. +gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated.
fsType string - fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
false
partition integer - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+ partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1".

Format: int32
@@ -15141,7 +15104,7 @@ gitRepo represents a git repository at a particular revision. DEPRECATED: GitRep @@ -15201,7 +15164,7 @@ glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. -hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. +hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.
directory string - directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
+ directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository.
false
@@ -15287,14 +15250,14 @@ iscsi represents an ISCSI Disk resource that is attached to a kubelet's host mac @@ -15402,7 +15365,7 @@ nfs represents an NFS mount on the host that shares a pod's lifetime More info: -persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.
fsType string - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
false
initiatorName string - initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
+ initiatorName is the custom iSCSI Initiator Name.
false
@@ -15526,7 +15489,7 @@ projected items for all in one resources secrets, configmaps, and downward API @@ -15610,7 +15573,7 @@ configMap information about the configMap data to project @@ -15665,7 +15628,7 @@ Maps a string key to a path within a volume. @@ -15735,7 +15698,7 @@ DownwardAPIVolumeFile represents information to create the file containing the p @@ -15846,7 +15809,7 @@ secret information about the secret data to project @@ -15901,7 +15864,7 @@ Maps a string key to a path within a volume. @@ -15937,14 +15900,14 @@ serviceAccountToken is information about the serviceAccountToken data to project @@ -16049,7 +16012,7 @@ rbd represents a Rados Block Device mount on the host that shares a pod's lifeti @@ -16255,7 +16218,7 @@ secret represents a secret that should populate this volume. More info: https:// @@ -16264,7 +16227,7 @@ secret represents a secret that should populate this volume. More info: https:// @@ -16319,7 +16282,7 @@ Maps a string key to a path within a volume. @@ -16376,7 +16339,7 @@ storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes @@ -16551,7 +16514,7 @@ Scale is the OpenTelemetryCollector's scale subresource status. diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index 0d4c02693..b458d952a 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -45,22 +45,12 @@ func Ingress(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemet return nil } - pathType := networkingv1.PathTypePrefix - paths := make([]networkingv1.HTTPIngressPath, len(ports)) - for i, p := range ports { - paths[i] = networkingv1.HTTPIngressPath{ - Path: "/" + p.Name, - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: naming.Service(otelcol.Name), - Port: networkingv1.ServiceBackendPort{ - // Valid names must be non-empty and no more than 15 characters long. - Name: naming.Truncate(p.Name, 15), - }, - }, - }, - } + var rules []networkingv1.IngressRule + switch otelcol.Spec.Ingress.RuleType { + case v1alpha1.IngressRuleTypePath, "": + rules = []networkingv1.IngressRule{createPathIngressRules(otelcol.Name, otelcol.Spec.Ingress.Hostname, ports)} + case v1alpha1.IngressRuleTypeSubdomain: + rules = createSubdomainIngressRules(otelcol.Name, otelcol.Spec.Ingress.Hostname, ports) } return &networkingv1.Ingress{ @@ -75,22 +65,77 @@ func Ingress(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemet }, }, Spec: networkingv1.IngressSpec{ - TLS: otelcol.Spec.Ingress.TLS, - Rules: []networkingv1.IngressRule{ - { - Host: otelcol.Spec.Ingress.Hostname, - IngressRuleValue: networkingv1.IngressRuleValue{ - HTTP: &networkingv1.HTTPIngressRuleValue{ - Paths: paths, - }, + TLS: otelcol.Spec.Ingress.TLS, + Rules: rules, + IngressClassName: otelcol.Spec.Ingress.IngressClassName, + }, + } +} + +func createPathIngressRules(otelcol string, hostname string, ports []corev1.ServicePort) networkingv1.IngressRule { + pathType := networkingv1.PathTypePrefix + paths := make([]networkingv1.HTTPIngressPath, len(ports)) + for i, port := range ports { + portName := naming.PortName(port.Name, port.Port) + paths[i] = networkingv1.HTTPIngressPath{ + Path: "/" + port.Name, + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: naming.Service(otelcol), + Port: networkingv1.ServiceBackendPort{ + Name: portName, }, }, }, - IngressClassName: otelcol.Spec.Ingress.IngressClassName, + } + } + return networkingv1.IngressRule{ + Host: hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: paths, + }, }, } } +func createSubdomainIngressRules(otelcol string, hostname string, ports []corev1.ServicePort) []networkingv1.IngressRule { + var rules []networkingv1.IngressRule + pathType := networkingv1.PathTypePrefix + for _, port := range ports { + portName := naming.PortName(port.Name, port.Port) + + host := fmt.Sprintf("%s.%s", portName, hostname) + // This should not happen due to validation in the webhook. + if hostname == "" || hostname == "*" { + host = portName + } + rules = append(rules, networkingv1.IngressRule{ + Host: host, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: naming.Service(otelcol), + Port: networkingv1.ServiceBackendPort{ + Name: portName, + }, + }, + }, + }, + }, + }, + }, + }) + } + return rules +} + // TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []corev1.ServicePort { configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index 5ad7bb68b..aa6b9998e 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -86,7 +86,7 @@ func TestDesiredIngresses(t *testing.T) { assert.Nil(t, actual) }) - t.Run("should return nil unable to do something else", func(t *testing.T) { + t.Run("path per port", func(t *testing.T) { var ( ns = "test" hostname = "example.com" @@ -172,5 +172,109 @@ func TestDesiredIngresses(t *testing.T) { }, }, got) }) + t.Run("subdomain per port", func(t *testing.T) { + var ( + ns = "test" + hostname = "example.com" + ingressClassName = "nginx" + ) + + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = ns + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + RuleType: v1alpha1.IngressRuleTypeSubdomain, + Hostname: hostname, + Annotations: map[string]string{"some.key": "some.value"}, + IngressClassName: &ingressClassName, + } + got := Ingress(params.Config, params.Log, params.Instance) + pathType := networkingv1.PathTypePrefix + + assert.NotEqual(t, &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: naming.Ingress(params.Instance.Name), + Namespace: ns, + Annotations: params.Instance.Spec.Ingress.Annotations, + Labels: map[string]string{ + "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: networkingv1.IngressSpec{ + IngressClassName: &ingressClassName, + Rules: []networkingv1.IngressRule{ + { + Host: "another-port." + hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "another-port", + }, + }, + }, + }, + }, + }, + }, + }, + { + Host: "otlp-grpc." + hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-grpc", + }, + }, + }, + }, + }, + }, + }, + }, + { + Host: "otlp-test-grpc." + hostname, + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/", + PathType: &pathType, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "otlp-test-grpc", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, got) + }) } diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index d3b9c52bc..ed283a77d 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -65,6 +65,7 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr routes := make([]*routev1.Route, len(ports)) for i, p := range ports { + portName := naming.PortName(p.Name, p.Port) routes[i] = &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Route(otelcol.Name, p.Name), @@ -77,15 +78,14 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr }, }, Spec: routev1.RouteSpec{ - Host: p.Name + "." + otelcol.Spec.Ingress.Hostname, - Path: "/" + p.Name, + Host: fmt.Sprintf("%s.%s", portName, otelcol.Spec.Ingress.Hostname), + Path: "/", To: routev1.RouteTargetReference{ Kind: "Service", Name: naming.Service(otelcol.Name), }, Port: &routev1.RoutePort{ - // Valid names must be non-empty and no more than 15 characters long. - TargetPort: intstr.FromString(naming.Truncate(p.Name, 15)), + TargetPort: intstr.FromString(portName), }, WildcardPolicy: routev1.WildcardPolicyNone, TLS: tlsCfg, diff --git a/kind-1.19.yaml b/kind-1.19.yaml index 06d7e0c71..6720d5f67 100644 --- a/kind-1.19.yaml +++ b/kind-1.19.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.19.16@sha256:476cb3269232888437b61deca013832fee41f9f074f9bed79f57e4280f7c48b7 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.20.yaml b/kind-1.20.yaml index 04e097cf5..cd05acf93 100644 --- a/kind-1.20.yaml +++ b/kind-1.20.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.20.15@sha256:a32bf55309294120616886b5338f95dd98a2f7231519c7dedcec32ba29699394 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.21.yaml b/kind-1.21.yaml index 2aff9ffb3..c6de06b57 100644 --- a/kind-1.21.yaml +++ b/kind-1.21.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.22.yaml b/kind-1.22.yaml index 6e6b29223..cde627420 100644 --- a/kind-1.22.yaml +++ b/kind-1.22.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 3160afc91..9662441c6 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.24.yaml b/kind-1.24.yaml index ece3f7cf7..0d76591c1 100644 --- a/kind-1.24.yaml +++ b/kind-1.24.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.25.yaml b/kind-1.25.yaml index a0116eb23..340110f54 100644 --- a/kind-1.25.yaml +++ b/kind-1.25.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.26.yaml b/kind-1.26.yaml index 49cf2ea24..5a7ae790d 100644 --- a/kind-1.26.yaml +++ b/kind-1.26.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/kind-1.27.yaml b/kind-1.27.yaml index 435977014..53b8f092b 100644 --- a/kind-1.27.yaml +++ b/kind-1.27.yaml @@ -3,3 +3,16 @@ apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go index d51ce77f4..67dfe0d8d 100644 --- a/pkg/collector/reconcile/ingress_test.go +++ b/pkg/collector/reconcile/ingress_test.go @@ -59,10 +59,7 @@ func TestExpectedIngresses(t *testing.T) { err = params.Client.Get(ctx, nns, got) assert.NoError(t, err) - gotHostname := got.Spec.Rules[0].Host - if gotHostname != expectHostname { - t.Errorf("host name is not up-to-date. expect: %s, got: %s", expectHostname, gotHostname) - } + assert.Equal(t, "something-else.com", got.Spec.Rules[0].Host) if v, ok := got.Annotations["blub"]; !ok || v != "blob" { t.Error("annotations are not up-to-date. Missing entry or value is invalid.") diff --git a/tests/e2e-openshift/route/00-assert.yaml b/tests/e2e-openshift/route/00-assert.yaml index 6269d9037..18f1e0265 100644 --- a/tests/e2e-openshift/route/00-assert.yaml +++ b/tests/e2e-openshift/route/00-assert.yaml @@ -3,6 +3,8 @@ apiVersion: apps/v1 kind: Deployment metadata: name: simplest-collector +status: + readyReplicas: 1 --- apiVersion: route.openshift.io/v1 kind: Route @@ -21,7 +23,7 @@ metadata: name: simplest spec: host: otlp-grpc.example.com - path: /otlp-grpc + path: / port: targetPort: otlp-grpc to: diff --git a/tests/e2e/ingress-subdomains/00-assert.yaml b/tests/e2e/ingress-subdomains/00-assert.yaml new file mode 100644 index 000000000..d92353b3d --- /dev/null +++ b/tests/e2e/ingress-subdomains/00-assert.yaml @@ -0,0 +1,45 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-collector +status: + readyReplicas: 1 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + something.com: "true" + labels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-ingress + name: simplest-ingress + ownerReferences: + - apiVersion: opentelemetry.io/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: OpenTelemetryCollector + name: simplest +spec: + rules: + - host: otlp-grpc.test.otel + http: + paths: + - backend: + service: + name: simplest-collector + port: + name: otlp-grpc + path: / + pathType: Prefix + - host: otlp-http.test.otel + http: + paths: + - backend: + service: + name: simplest-collector + port: + name: otlp-http + path: / + pathType: Prefix diff --git a/tests/e2e/ingress-subdomains/00-install.yaml b/tests/e2e/ingress-subdomains/00-install.yaml new file mode 100644 index 000000000..a49320fa9 --- /dev/null +++ b/tests/e2e/ingress-subdomains/00-install.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + mode: "deployment" + ingress: + type: ingress + ruleType: subdomain + hostname: "test.otel" + annotations: + something.com: "true" + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e/ingress-subdomains/01-report-http-spans.yaml b/tests/e2e/ingress-subdomains/01-report-http-spans.yaml new file mode 100644 index 000000000..b20290f8a --- /dev/null +++ b/tests/e2e/ingress-subdomains/01-report-http-spans.yaml @@ -0,0 +1,8 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + #!/bin/bash + set -ex + # Export empty payload and check of collector accepted it with 2xx status code + for i in {1..40}; do curl --fail -ivX POST --resolve 'otlp-http.test.otel:80:127.0.0.1' http://otlp-http.test.otel:80/v1/traces -H "Content-Type: application/json" -d '{}' && break || sleep 1; done diff --git a/tests/e2e/ingress/00-assert.yaml b/tests/e2e/ingress/00-assert.yaml index 7d779f684..5604513d1 100644 --- a/tests/e2e/ingress/00-assert.yaml +++ b/tests/e2e/ingress/00-assert.yaml @@ -3,6 +3,8 @@ apiVersion: apps/v1 kind: Deployment metadata: name: simplest-collector +status: + readyReplicas: 1 --- apiVersion: networking.k8s.io/v1 kind: Ingress From 19c4ae67f159e5b0bd752f47acd5b4c559ea2166 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 16 Aug 2023 16:04:46 +0200 Subject: [PATCH 0965/1234] Use golang 1.21 (#2009) * Use golang 1.21 Signed-off-by: Pavol Loffay * Use golang 1.21 Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/golang121.yaml | 16 ++++++++++++++++ .github/workflows/continuous-integration.yaml | 4 ++-- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- Makefile | 2 +- cmd/operator-opamp-bridge/Dockerfile | 2 +- cmd/otel-allocator/Dockerfile | 2 +- internal/config/main_test.go | 2 +- 9 files changed, 25 insertions(+), 9 deletions(-) create mode 100755 .chloggen/golang121.yaml diff --git a/.chloggen/golang121.yaml b/.chloggen/golang121.yaml new file mode 100755 index 000000000..3fcf8f100 --- /dev/null +++ b/.chloggen/golang121.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Golang to 1.21 + +# One or more tracking issues related to the change +issues: [2009] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 757b3c41a..de829d719 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: "1.20" + go-version: "1.21" - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -33,7 +33,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e790b3f2b..b1a5cf788 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -36,7 +36,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" - name: Setup kind env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4805b47e5..f0214129f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: "1.20" + go-version: "1.21" - uses: actions/checkout@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 3c6fbc497..6f2970541 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" - name: Setup kind env: diff --git a/Makefile b/Makefile index 7d43d3c75..7cb15a43e 100644 --- a/Makefile +++ b/Makefile @@ -308,7 +308,7 @@ GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint KUSTOMIZE_VERSION ?= v5.0.3 CONTROLLER_TOOLS_VERSION ?= v0.12.0 -GOLANGCI_LINT_VERSION ?= v1.51.2 +GOLANGCI_LINT_VERSION ?= v1.54.0 .PHONY: kustomize diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index 72d1db5c1..0ec1b6581 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -1,5 +1,5 @@ # Build the operator-opamp-bridge binary -FROM golang:1.20-alpine as builder +FROM golang:1.21-alpine as builder WORKDIR /app diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 25adbea78..47bd2baeb 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,5 +1,5 @@ # Build the otel-allocator binary -FROM golang:1.20-alpine as builder +FROM golang:1.21-alpine as builder WORKDIR /app diff --git a/internal/config/main_test.go b/internal/config/main_test.go index f08dc2626..e6085ead6 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -85,7 +85,7 @@ func TestAutoDetectInBackground(t *testing.T) { } cfg := config.New( config.WithAutoDetect(mock), - config.WithAutoDetectFrequency(100*time.Millisecond), + config.WithAutoDetectFrequency(500*time.Second), ) // sanity check From c8d75eda2722d9aeaf943025fb5d030b75635244 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 11:23:23 -0400 Subject: [PATCH 0966/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 2 updates (#2027) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 2 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/apimachinery` from 0.27.4 to 0.28.0 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.27.4...v0.28.0) Updates `k8s.io/client-go` from 0.27.4 to 0.28.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.27.4...v0.28.0) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 24 ++++++------ cmd/operator-opamp-bridge/go.sum | 64 +++++++++++++------------------- 2 files changed, 37 insertions(+), 51 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index c1f20c42d..d230fecf4 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,8 +18,8 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.27.4 - k8s.io/client-go v0.27.4 + k8s.io/apimachinery v0.28.0 + k8s.io/client-go v0.28.0 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.1 ) @@ -30,7 +30,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -42,7 +42,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect @@ -72,11 +72,11 @@ require ( go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.6.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.13.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -84,11 +84,11 @@ require ( google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.27.4 // indirect + k8s.io/api v0.28.0 // indirect k8s.io/apiextensions-apiserver v0.27.3 // indirect k8s.io/component-base v0.27.3 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230308161112-d77c459e9343 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index c62553e5e..e5a83a088 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -39,7 +39,6 @@ github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLj github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -62,7 +61,6 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -72,11 +70,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -137,8 +134,8 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -189,7 +186,6 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -232,13 +228,12 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -255,9 +250,6 @@ github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+Kd github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -365,17 +357,16 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.6.0 h1:Lh8GPgSKBfWSwFvtuWOfeI3aAAnbXTSutYxJiOJFgIw= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -415,24 +406,22 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -543,7 +532,6 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -581,7 +569,6 @@ google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cn google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= @@ -593,7 +580,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -604,22 +590,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= -k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= +k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= -k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= -k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= +k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= +k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/utils v0.0.0-20230308161112-d77c459e9343 h1:m7tbIjXGcGIAtpmQr7/NAi7RsWoW3E7Zcm4jI1HicTc= -k8s.io/utils v0.0.0-20230308161112-d77c459e9343/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 2788853948b52765fec52b2576ce7e8bf7640f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 17 Aug 2023 16:09:14 +0000 Subject: [PATCH 0967/1234] Bump k8s dependencies to 0.28.0 (#2031) --- ...ntelemetry.io_opentelemetrycollectors.yaml | 43 ++++++++---- ...ntelemetry.io_opentelemetrycollectors.yaml | 43 ++++++++---- docs/api.md | 32 ++++++--- go.mod | 22 +++---- go.sum | 65 +++++++------------ 5 files changed, 115 insertions(+), 90 deletions(-) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index af4726051..60be57f87 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -793,6 +793,11 @@ spec: resources required. type: object type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string securityContext: description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext @@ -3069,6 +3074,11 @@ spec: resources required. type: object type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string securityContext: description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext @@ -3826,10 +3836,10 @@ spec: description: ServicePort contains information on service's port. properties: appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana. + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. type: string name: description: The name of this port within the service. This @@ -4720,6 +4730,18 @@ spec: items: type: string type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. + type: object + x-kubernetes-map-type: granular allocatedResources: additionalProperties: anyOf: @@ -4727,10 +4749,9 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: allocatedResources is the storage resource - within AllocatedResources tracks the capacity allocated - to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. + description: allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. type: object capacity: additionalProperties: @@ -4783,12 +4804,6 @@ spec: phase: description: phase represents the current phase of PersistentVolumeClaim. type: string - resizeStatus: - description: resizeStatus stores status of resize operation. - ResizeStatus is not set by default but when expansion - is complete resizeStatus is set to empty string by resize - controller or kubelet. - type: string type: object type: object type: array diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 523ca6be3..11a873975 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -790,6 +790,11 @@ spec: resources required. type: object type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string securityContext: description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext @@ -3066,6 +3071,11 @@ spec: resources required. type: object type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string securityContext: description: SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext @@ -3823,10 +3833,10 @@ spec: description: ServicePort contains information on service's port. properties: appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana. + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. type: string name: description: The name of this port within the service. This @@ -4717,6 +4727,18 @@ spec: items: type: string type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. + type: object + x-kubernetes-map-type: granular allocatedResources: additionalProperties: anyOf: @@ -4724,10 +4746,9 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: allocatedResources is the storage resource - within AllocatedResources tracks the capacity allocated - to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. + description: allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. type: object capacity: additionalProperties: @@ -4780,12 +4801,6 @@ spec: phase: description: phase represents the current phase of PersistentVolumeClaim. type: string - resizeStatus: - description: resizeStatus stores status of resize operation. - ResizeStatus is not set by default but when expansion - is complete resizeStatus is set to empty string by resize - controller or kubelet. - type: string type: object type: object type: array diff --git a/docs/api.md b/docs/api.md index cf7628e93..3142057b8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3982,6 +3982,13 @@ A single application container that you want to run within a pod. Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ + + + + @@ -8624,6 +8631,13 @@ A single application container that you want to run within a pod. Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+ + + + + @@ -11694,7 +11708,7 @@ ServicePort contains information on service's port. @@ -13345,11 +13359,18 @@ status represents the current information/status of a persistent volume claim. R accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+ + + + + @@ -13373,13 +13394,6 @@ status represents the current information/status of a persistent volume claim. R phase represents the current phase of PersistentVolumeClaim.
- - - - -
defaultMode integer - defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
items []object - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
false
mode integer - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
mode integer - Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
items []object - items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value.
false
mode integer - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
audience string - audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
+ audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token.
false
expirationSeconds integer - expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.
+ expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token.

Format: int64
fsType string - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine
+ fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
false
defaultMode integer - defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
items []object - items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
+ items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value.
false
mode integer - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
+ mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.

Format: int32
volumeNamespace string - volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
+ volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used.
false
statusReplicas string - StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / Total number of non-terminated pods targeted by this OpenTelemetryCollector's (their labels match the selector). Deployment, Daemonset, StatefulSet.
+ StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / Total number of non-terminated pods targeted by this OpenTelemetryCollector's (their labels matc
false
false
restartPolicystring + RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is "Always".
+
false
securityContext object false
restartPolicystring + RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is "Always".
+
false
securityContext objectappProtocol string - The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.
+ The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax.
false
false
allocatedResourceStatusesmap[string]string + allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax.
+
false
allocatedResources map[string]int or string - allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested.
+ allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax.
false
false
resizeStatusstring - resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet.
-
false
diff --git a/go.mod b/go.mod index b5350a575..07015b297 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.4 - k8s.io/apiextensions-apiserver v0.27.4 - k8s.io/apimachinery v0.27.4 - k8s.io/client-go v0.27.4 - k8s.io/component-base v0.27.4 - k8s.io/kubectl v0.27.4 + k8s.io/api v0.28.0 + k8s.io/apiextensions-apiserver v0.28.0 + k8s.io/apimachinery v0.28.0 + k8s.io/client-go v0.28.0 + k8s.io/component-base v0.28.0 + k8s.io/kubectl v0.28.0 sigs.k8s.io/controller-runtime v0.15.1 ) @@ -72,7 +72,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -97,7 +97,7 @@ require ( github.com/hashicorp/serf v0.10.1 // indirect github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect github.com/imdario/mergo v0.3.16 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -128,7 +128,7 @@ require ( github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 // indirect - github.com/spf13/cobra v1.6.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect @@ -138,7 +138,7 @@ require ( golang.org/x/crypto v0.11.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/term v0.10.0 // indirect @@ -157,7 +157,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect diff --git a/go.sum b/go.sum index 256f00ca4..6db68e53d 100644 --- a/go.sum +++ b/go.sum @@ -73,7 +73,6 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -98,9 +97,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -113,7 +110,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -136,21 +132,19 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -159,7 +153,6 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -235,8 +228,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -336,8 +329,8 @@ github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfI github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= @@ -368,7 +361,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -495,12 +487,10 @@ github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -521,9 +511,6 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -639,14 +626,13 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -739,7 +725,6 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= @@ -861,7 +846,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= @@ -883,7 +867,6 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= @@ -899,7 +882,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -923,7 +905,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= @@ -934,22 +915,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= -k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= -k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= -k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= -k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= -k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= -k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= -k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= -k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= +k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= +k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= +k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= +k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= +k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= +k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= -k8s.io/kubectl v0.27.4 h1:RV1TQLIbtL34+vIM+W7HaS3KfAbqvy9lWn6pWB9els4= -k8s.io/kubectl v0.27.4/go.mod h1:qtc1s3BouB9KixJkriZMQqTsXMc+OAni6FeKAhq7q14= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kubectl v0.28.0 h1:qhfju0OaU+JGeBlToPeeIg2UJUWP++QwTkpio6nlPKg= +k8s.io/kubectl v0.28.0/go.mod h1:1We+E5nSX3/TVoSQ6y5Bzld5OhTBHZHlKEYl7g/NaTk= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 0492819292c95c665918d0c6f64a4dfe9ebcf3a6 Mon Sep 17 00:00:00 2001 From: hzhhong Date: Fri, 18 Aug 2023 04:03:37 +0800 Subject: [PATCH 0968/1234] Fix getPrometheusExporterPorts incorrectly matching to prometheusremotewrite exporter (#2016) (#2017) * Fix getPrometheusExporterPorts incorrectly matching to prometheusremotewrite exporter * add unit test for collector prometheus rw exporter * standardized code format --- internal/manifests/collector/container.go | 3 +- .../manifests/collector/container_test.go | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 946a43340..f7e1e1b60 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -220,7 +220,8 @@ func getPrometheusExporterPorts(c map[interface{}]interface{}) ([]corev1.Contain if exporters, ok := c["exporters"]; ok && exporters != nil { for e, exporterConfig := range exporters.(map[interface{}]interface{}) { exporterName := e.(string) - if strings.Contains(exporterName, "prometheus") { + // Note that receivers, processors, exporters and/or pipelines are defined via component identifiers in type[/name] format (e.g. otlp or otlp/2). Components of a given type can be defined more than once as long as the identifiers are unique. + if strings.Split(exporterName, "/")[0] == "prometheus" { containerPort, err := getPrometheusExporterPort(exporterConfig.(map[interface{}]interface{})) if err != nil { errors = append(errors, diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index 280e63d7a..b20c2bc99 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -214,6 +214,38 @@ service: }, }, }, + { + description: "prometheus RW exporter", + specConfig: `exporters: + prometheusremotewrite/prometheus: + endpoint: http://prometheus-server.monitoring/api/v1/write`, + specPorts: []corev1.ServicePort{}, + expectedPorts: []corev1.ContainerPort{metricContainerPort}, + }, + { + description: "multiple prometheus exporters and prometheus RW exporter", + specConfig: `exporters: + prometheus/prod: + endpoint: "0.0.0.0:9090" + prometheus/dev: + endpoint: "0.0.0.0:9091" + prometheusremotewrite/prometheus: + endpoint: http://prometheus-server.monitoring/api/v1/write`, + specPorts: []corev1.ServicePort{}, + expectedPorts: []corev1.ContainerPort{ + metricContainerPort, + { + Name: "prometheus-prod", + ContainerPort: 9090, + Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-dev", + ContainerPort: 9091, + Protocol: corev1.ProtocolTCP, + }, + }, + }, } for _, testCase := range tests { From a86cea16c263cd943752e9bafb2e29806d0058e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 18 Aug 2023 16:06:52 +0200 Subject: [PATCH 0969/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.0-rc.2 (#2030) --- .chloggen/bump-dotnet.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/bump-dotnet.yaml diff --git a/.chloggen/bump-dotnet.yaml b/.chloggen/bump-dotnet.yaml new file mode 100644 index 000000000..14981c23f --- /dev/null +++ b/.chloggen/bump-dotnet.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.0-rc.2 + +# One or more tracking issues related to the change +issues: [2030] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 9c218192d..fedbd0b1a 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.0.0-rc.1 +1.0.0-rc.2 From 7d2aa56d46e3071b8a037ac02f9a3ffdd3856abf Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 18 Aug 2023 07:15:27 -0700 Subject: [PATCH 0970/1234] Update the OpenTelemetry Java agent version to 1.29.0 (#2034) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index cfc730712..5e57fb895 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.28.0 +1.29.0 From 5d59034e9366b269113f9e320cf4024697054f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 18 Aug 2023 14:24:31 +0000 Subject: [PATCH 0971/1234] Use scratch as the base image for operator (#2014) --- .chloggen/chore_dockerfile-base-scratch.yaml | 16 ++++++++++++++++ Dockerfile | 15 +++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100755 .chloggen/chore_dockerfile-base-scratch.yaml diff --git a/.chloggen/chore_dockerfile-base-scratch.yaml b/.chloggen/chore_dockerfile-base-scratch.yaml new file mode 100755 index 000000000..c9276d722 --- /dev/null +++ b/.chloggen/chore_dockerfile-base-scratch.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Use scratch as the base image for operator + +# One or more tracking issues related to the change +issues: [2011] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/Dockerfile b/Dockerfile index d097f82cf..4dfecd17a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.21-alpine as builder WORKDIR /workspace + +RUN apk --no-cache add ca-certificates + # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum @@ -33,10 +36,14 @@ ARG AUTO_INSTRUMENTATION_GO_VERSION # Build RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}" -a -o manager main.go -# Use distroless as minimal base image to package the manager binary -# Refer to https://github.com/GoogleContainerTools/distroless for more details -FROM gcr.io/distroless/static:nonroot +######## Start a new stage from scratch ####### +FROM scratch + WORKDIR / + +# Copy the certs from the builder +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + COPY --from=builder /workspace/manager . USER 65532:65532 From 09901de6872d5cf69ec0bea9789f2685c2f0e1d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:24:37 -0400 Subject: [PATCH 0972/1234] Bump the kubernetes group in /cmd/otel-allocator with 2 updates (#2025) Bumps the kubernetes group in /cmd/otel-allocator with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/api` from 0.27.4 to 0.28.0 - [Commits](https://github.com/kubernetes/api/compare/v0.27.4...v0.28.0) Updates `k8s.io/client-go` from 0.27.4 to 0.28.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.27.4...v0.28.0) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 12 ++++++------ cmd/otel-allocator/go.sum | 41 ++++++++++++--------------------------- 2 files changed, 18 insertions(+), 35 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8c165ed3d..39485197c 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,9 +22,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.27.4 - k8s.io/apimachinery v0.27.4 - k8s.io/client-go v0.27.4 + k8s.io/api v0.28.0 + k8s.io/apimachinery v0.28.0 + k8s.io/client-go v0.28.0 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.15.1 ) @@ -96,7 +96,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -176,7 +176,7 @@ require ( golang.org/x/crypto v0.11.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.10.0 // indirect @@ -197,7 +197,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.27.4 // indirect k8s.io/component-base v0.27.4 // indirect - k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index e108252b7..a7bbcc49c 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -72,7 +72,6 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -104,14 +103,12 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -127,7 +124,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -152,7 +148,6 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= @@ -163,7 +158,6 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= @@ -180,7 +174,6 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= @@ -333,8 +326,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -478,7 +471,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -640,14 +632,12 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -682,9 +672,6 @@ github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3k github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -815,14 +802,13 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1048,7 +1034,6 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= @@ -1070,7 +1055,6 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= @@ -1086,7 +1070,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1124,20 +1107,20 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= -k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= +k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= +k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= -k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= -k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= -k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= +k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= +k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= +k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From c3d8153f1d0b090d9d71ff8fd320419139971ef4 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 18 Aug 2023 12:05:22 -0400 Subject: [PATCH 0973/1234] Release v0.83.0 (#2035) * Bump versions * Release notes * version fix, components, etc. --- .chloggen/1967-ingress-path.yaml | 21 ----------- ...adding-support-for-sidecar-containers.yaml | 16 -------- .chloggen/1997-expose-pprof-server.yaml | 16 -------- .chloggen/2002-set-level-4-operator.yaml | 16 -------- .chloggen/bump-dotnet.yaml | 16 -------- .chloggen/chore_dockerfile-base-scratch.yaml | 16 -------- .chloggen/golang121.yaml | 16 -------- .chloggen/servicename-daemonset.yaml | 16 -------- CHANGELOG.md | 37 +++++++++++++++++++ Makefile | 2 +- README.md | 2 +- RELEASE.md | 4 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++-- versions.txt | 12 +++--- 14 files changed, 51 insertions(+), 147 deletions(-) delete mode 100755 .chloggen/1967-ingress-path.yaml delete mode 100644 .chloggen/1987-adding-support-for-sidecar-containers.yaml delete mode 100755 .chloggen/1997-expose-pprof-server.yaml delete mode 100755 .chloggen/2002-set-level-4-operator.yaml delete mode 100644 .chloggen/bump-dotnet.yaml delete mode 100755 .chloggen/chore_dockerfile-base-scratch.yaml delete mode 100755 .chloggen/golang121.yaml delete mode 100755 .chloggen/servicename-daemonset.yaml diff --git a/.chloggen/1967-ingress-path.yaml b/.chloggen/1967-ingress-path.yaml deleted file mode 100755 index 23bd6a1e0..000000000 --- a/.chloggen/1967-ingress-path.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Make sure OTLP export can report data to OTLP ingress/route without additional configuration - -# One or more tracking issues related to the change -issues: [1967] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - The ingress can be configured to create a single host with multiple paths or - multiple hosts with subdomains (one per receiver port). - The path from OpenShift route was removed. - The port names are truncate to 15 characters. Users with custom receivers - which create ports with longer name might need to update their configuration. diff --git a/.chloggen/1987-adding-support-for-sidecar-containers.yaml b/.chloggen/1987-adding-support-for-sidecar-containers.yaml deleted file mode 100644 index 99eacda19..000000000 --- a/.chloggen/1987-adding-support-for-sidecar-containers.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add `AdditionalContainers` to the collector spec allowing to configure sidecar containers. This only applies to Deployment/StatefulSet/DeamonSet deployment modes of the collector. - -# One or more tracking issues related to the change -issues: [1987] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1997-expose-pprof-server.yaml b/.chloggen/1997-expose-pprof-server.yaml deleted file mode 100755 index 3d3145600..000000000 --- a/.chloggen/1997-expose-pprof-server.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add flag to enable support for the pprof server in the operator. - -# One or more tracking issues related to the change -issues: [1997] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/2002-set-level-4-operator.yaml b/.chloggen/2002-set-level-4-operator.yaml deleted file mode 100755 index 9bd3e04f9..000000000 --- a/.chloggen/2002-set-level-4-operator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Set the level 4 of capabilities in the CSV for the OpenTelemetry Operator. - -# One or more tracking issues related to the change -issues: [2002] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-dotnet.yaml b/.chloggen/bump-dotnet.yaml deleted file mode 100644 index 14981c23f..000000000 --- a/.chloggen/bump-dotnet.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.0-rc.2 - -# One or more tracking issues related to the change -issues: [2030] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/chore_dockerfile-base-scratch.yaml b/.chloggen/chore_dockerfile-base-scratch.yaml deleted file mode 100755 index c9276d722..000000000 --- a/.chloggen/chore_dockerfile-base-scratch.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Use scratch as the base image for operator - -# One or more tracking issues related to the change -issues: [2011] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/golang121.yaml b/.chloggen/golang121.yaml deleted file mode 100755 index 3fcf8f100..000000000 --- a/.chloggen/golang121.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Golang to 1.21 - -# One or more tracking issues related to the change -issues: [2009] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/servicename-daemonset.yaml b/.chloggen/servicename-daemonset.yaml deleted file mode 100755 index 31645444c..000000000 --- a/.chloggen/servicename-daemonset.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Daemonsets can be instrumented so the generated servicename should use their name for better discoverability" - -# One or more tracking issues related to the change -issues: [2015] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a68102cc..f6c240bbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,43 @@ Changes by Version +## 0.83.0 + +### 🛑 Breaking changes 🛑 + +- `operator`: Make sure OTLP export can report data to OTLP ingress/route without additional configuration (#1967) + The ingress can be configured to create a single host with multiple paths or + multiple hosts with subdomains (one per receiver port). + The path from OpenShift route was removed. + The port names are truncate to 15 characters. Users with custom receivers + which create ports with longer name might need to update their configuration. + + +### 💡 Enhancements 💡 + +- `operator`: Add `AdditionalContainers` to the collector spec allowing to configure sidecar containers. This only applies to Deployment/StatefulSet/DeamonSet deployment modes of the collector. (#1987) +- `operator`: Add flag to enable support for the pprof server in the operator. (#1997) +- `operator`: Set the level 4 of capabilities in the CSV for the OpenTelemetry Operator. (#2002) +- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.0-rc.2 (#2030) +- `operator`: Use scratch as the base image for operator (#2011) +- `operator`: Bump Golang to 1.21 (#2009) +- `operator`: Daemonsets can be instrumented so the generated servicename should use their name for better discoverability (#2015) + +### 🧰 Bug fixes 🧰 + +- `operator`: fixes bug introduced in v0.82.0 where Prometheus exporters weren't being generated correctly (#2016) + +### Components + +* [OpenTelemetry Collector - v0.83.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.83.0) +* [OpenTelemetry Contrib - v0.83.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.83.0) +* [Java auto-instrumentation - 1.29.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.29.0) +* [.NET auto-instrumentation - 1.0.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0-rc.2) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) +* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) + ## 0.82.0 ### 🛑 Breaking changes 🛑 diff --git a/Makefile b/Makefile index 7cb15a43e..e92c52537 100644 --- a/Makefile +++ b/Makefile @@ -425,7 +425,7 @@ api-docs: crdoc kustomize .PHONY: chlog-install chlog-install: $(CHLOGGEN) $(CHLOGGEN): $(LOCALBIN) - GOBIN=$(LOCALBIN) go install go.opentelemetry.io/build-tools/chloggen@v0.3.0 + GOBIN=$(LOCALBIN) go install go.opentelemetry.io/build-tools/chloggen@v0.11.0 FILENAME?=$(shell git branch --show-current) .PHONY: chlog-new diff --git a/README.md b/README.md index b63b1ce96..ac77c4c21 100644 --- a/README.md +++ b/README.md @@ -589,6 +589,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.83.0 | v1.19 to v1.27 | v1 | | v0.82.0 | v1.19 to v1.27 | v1 | | v0.81.0 | v1.19 to v1.27 | v1 | | v0.80.0 | v1.19 to v1.27 | v1 | @@ -611,7 +612,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.62.1 | v1.19 to v1.25 | v1 | | v0.61.0 | v1.19 to v1.25 | v1 | | v0.60.0 | v1.19 to v1.25 | v1 | -| v0.59.0 | v1.19 to v1.24 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index cdf51e578..7e6d8d80a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.83.0 | @yuriolisa | -| v0.84.0 | @jaronoff97 | +| v0.84.0 | @yuriolisa | | v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | +| v0.90.0 | @jaronoff97 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c4c2874a1..39850294e 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-08-09T22:53:11Z" + createdAt: "2023-08-18T14:30:49Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.82.0 + name: opentelemetry-operator.v0.83.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -332,7 +332,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.82.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.83.0 livenessProbe: httpGet: path: /healthz @@ -439,7 +439,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.82.0 + version: 0.83.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 204c34f90..194d56810 100644 --- a/versions.txt +++ b/versions.txt @@ -2,20 +2,20 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.82.0 +opentelemetry-collector=0.83.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.82.0 +operator=0.83.0 # Represents the current release of the Target Allocator. -targetallocator=0.82.0 +targetallocator=0.83.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.82.0 +operator-opamp-bridge=0.83.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.28.0 +autoinstrumentation-java=1.29.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json @@ -27,7 +27,7 @@ autoinstrumentation-python=0.40b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=1.0.0-rc.1 +autoinstrumentation-dotnet=1.0.0-rc.2 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.2.2-alpha From d3c98ae529fee23ccc92c6722ca2141406a3dc40 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 21 Aug 2023 14:26:07 +0200 Subject: [PATCH 0974/1234] Create Service Monitors for the Prometheus exporters (#1983) * Create Service Monitors for the Prometheus exporters * Remove testing changes Signed-off-by: Israel Blancas * Remove pull policy Signed-off-by: Israel Blancas * Apply changes requested in PR * Fix E2E test Signed-off-by: Israel Blancas * Update E2E test to use the enableMetrics flag Signed-off-by: Israel Blancas * Use the enable metrics to create the SM or not Signed-off-by: Israel Blancas * Update field description Signed-off-by: Israel Blancas * Add missing docs Signed-off-by: Israel Blancas * Remove config Signed-off-by: Israel Blancas * Ensue the ServiceMonitor matches a specific OpenTelemetry Collector instance Signed-off-by: Israel Blancas * Update generated files Signed-off-by: Israel Blancas * Fix comment Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...ice-monitors-for-prometheus-exporters.yaml | 16 ++ apis/v1alpha1/opentelemetrycollector_types.go | 2 +- ...emetry-operator.clusterserviceversion.yaml | 6 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +- ...emetry-operator.clusterserviceversion.yaml | 6 +- docs/api.md | 2 +- go.mod | 1 + go.sum | 4 +- .../collector/adapters/config_to_ports.go | 97 +++++++++++- .../adapters/config_to_ports_test.go | 4 +- .../collector/adapters/config_validate.go | 42 +++--- internal/manifests/collector/container.go | 65 +------- .../manifests/collector/container_test.go | 44 +++--- .../collector/parser/exporter/exporter.go | 139 ++++++++++++++++++ .../parser/exporter/exporter_prometheus.go | 76 ++++++++++ .../parser/{ => receiver}/receiver.go | 4 +- .../{ => receiver}/receiver_aws-xray.go | 2 +- .../{ => receiver}/receiver_aws-xray_test.go | 2 +- .../parser/{ => receiver}/receiver_carbon.go | 2 +- .../{ => receiver}/receiver_carbon_test.go | 2 +- .../{ => receiver}/receiver_collectd.go | 2 +- .../{ => receiver}/receiver_collectd_test.go | 2 +- .../{ => receiver}/receiver_fluent-forward.go | 2 +- .../receiver_fluent-forward_test.go | 2 +- .../parser/{ => receiver}/receiver_generic.go | 2 +- .../{ => receiver}/receiver_generic_test.go | 36 ++--- .../{ => receiver}/receiver_influxdb.go | 2 +- .../{ => receiver}/receiver_influxdb_test.go | 2 +- .../parser/{ => receiver}/receiver_jaeger.go | 2 +- .../{ => receiver}/receiver_jaeger_test.go | 2 +- .../parser/{ => receiver}/receiver_oc.go | 2 +- .../parser/{ => receiver}/receiver_oc_test.go | 2 +- .../parser/{ => receiver}/receiver_otlp.go | 2 +- .../{ => receiver}/receiver_otlp_test.go | 2 +- .../parser/{ => receiver}/receiver_sapm.go | 2 +- .../{ => receiver}/receiver_sapm_test.go | 2 +- .../{ => receiver}/receiver_signalfx.go | 2 +- .../{ => receiver}/receiver_signalfx_test.go | 2 +- .../{ => receiver}/receiver_skywalking.go | 2 +- .../receiver_skywalking_test.go | 2 +- .../{ => receiver}/receiver_splunk-hec.go | 2 +- .../receiver_splunk-hec_test.go | 2 +- .../parser/{ => receiver}/receiver_statsd.go | 2 +- .../{ => receiver}/receiver_statsd_test.go | 2 +- .../parser/{ => receiver}/receiver_test.go | 2 +- .../{ => receiver}/receiver_wavefront.go | 2 +- .../{ => receiver}/receiver_wavefront_test.go | 2 +- .../{ => receiver}/receiver_zipkin-scribe.go | 2 +- .../receiver_zipkin-scribe_test.go | 2 +- .../parser/{ => receiver}/receiver_zipkin.go | 2 +- .../{ => receiver}/receiver_zipkin_test.go | 2 +- internal/manifests/collector/service.go | 6 +- .../manifests/collector/servicemonitor.go | 56 ++++++- .../collector/servicemonitor_test.go | 21 +++ .../testdata/prometheus-exporter.yaml | 19 +++ pkg/collector/reconcile/servicemonitor.go | 10 +- .../00-install.yaml | 4 + .../01-assert.yaml | 65 ++++++++ .../01-install.yaml | 29 ++++ .../02-assert.yaml | 42 ++++++ .../02-install.yaml} | 14 +- .../03-assert.yaml | 21 +++ .../03-install.yaml | 26 ++++ .../04-error.yaml | 19 +++ .../04-install.yaml | 26 ++++ .../05-assert.yaml | 21 +++ .../05-error.yaml | 22 +++ .../05-install.yaml | 32 ++++ .../06-assert.yaml | 20 +++ .../06-install.yaml | 29 ++++ .../07-delete.yaml | 8 + .../07-error.yaml | 5 + .../00-assert.yaml | 10 -- 74 files changed, 927 insertions(+), 202 deletions(-) create mode 100755 .chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml create mode 100644 internal/manifests/collector/parser/exporter/exporter.go create mode 100644 internal/manifests/collector/parser/exporter/exporter_prometheus.go rename internal/manifests/collector/parser/{ => receiver}/receiver.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_aws-xray.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_aws-xray_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_carbon.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_carbon_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_collectd.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_collectd_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_fluent-forward.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_fluent-forward_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_generic.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_generic_test.go (67%) rename internal/manifests/collector/parser/{ => receiver}/receiver_influxdb.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_influxdb_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_jaeger.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_jaeger_test.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_oc.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_oc_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_otlp.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_otlp_test.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_sapm.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_sapm_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_signalfx.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_signalfx_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_skywalking.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_skywalking_test.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_splunk-hec.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_splunk-hec_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_statsd.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_statsd_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_test.go (99%) rename internal/manifests/collector/parser/{ => receiver}/receiver_wavefront.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_wavefront_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_zipkin-scribe.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_zipkin-scribe_test.go (97%) rename internal/manifests/collector/parser/{ => receiver}/receiver_zipkin.go (98%) rename internal/manifests/collector/parser/{ => receiver}/receiver_zipkin_test.go (97%) create mode 100644 internal/manifests/collector/testdata/prometheus-exporter.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml rename tests/e2e-prometheuscr/{gather-metrics-from-operands/00-install.yaml => create-sm-prometheus-exporters/02-install.yaml} (64%) create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml delete mode 100644 tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml diff --git a/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml b/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml new file mode 100755 index 000000000..5ca0eddad --- /dev/null +++ b/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Create ServiceMonitors when the Prometheus exporters are used. + +# One or more tracking issues related to the change +issues: [1963] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 35fa89e36..c95d64e43 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -426,7 +426,7 @@ type AutoscalerSpec struct { // MetricsConfigSpec defines a metrics config. type MetricsConfigSpec struct { - // EnableMetrics specifies if ServiceMonitors should be created for the OpenTelemetry Collector. + // EnableMetrics specifies if ServiceMonitor should be created for the OpenTelemetry Collector and Prometheus Exporters. // The operator.observability.prometheus feature gate must be enabled to use this feature. // // +optional diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 39850294e..64d5b2402 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -83,9 +83,9 @@ spec: - description: Metrics defines the metrics configuration for operands. displayName: Metrics Config path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitors should be created - for the OpenTelemetry Collector. The operator.observability.prometheus feature - gate must be enabled to use this feature. + - description: EnableMetrics specifies if ServiceMonitor should be created for + the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.prometheus + feature gate must be enabled to use this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics version: v1alpha1 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 60be57f87..c0b671a75 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3690,9 +3690,9 @@ spec: description: Metrics defines the metrics configuration for operands. properties: enableMetrics: - description: EnableMetrics specifies if ServiceMonitors should - be created for the OpenTelemetry Collector. The operator.observability.prometheus - feature gate must be enabled to use this feature. + description: EnableMetrics specifies if ServiceMonitor should + be created for the OpenTelemetry Collector and Prometheus + Exporters. The operator.observability. type: boolean type: object type: object diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 11a873975..708270faa 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3687,9 +3687,9 @@ spec: description: Metrics defines the metrics configuration for operands. properties: enableMetrics: - description: EnableMetrics specifies if ServiceMonitors should - be created for the OpenTelemetry Collector. The operator.observability.prometheus - feature gate must be enabled to use this feature. + description: EnableMetrics specifies if ServiceMonitor should + be created for the OpenTelemetry Collector and Prometheus + Exporters. The operator.observability. type: boolean type: object type: object diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index c762dd3bf..cfeef3041 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -63,9 +63,9 @@ spec: - description: Metrics defines the metrics configuration for operands. displayName: Metrics Config path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitors should be created - for the OpenTelemetry Collector. The operator.observability.prometheus feature - gate must be enabled to use this feature. + - description: EnableMetrics specifies if ServiceMonitor should be created for + the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.prometheus + feature gate must be enabled to use this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics version: v1alpha1 diff --git a/docs/api.md b/docs/api.md index 3142057b8..ad00221c4 100644 --- a/docs/api.md +++ b/docs/api.md @@ -11410,7 +11410,7 @@ Metrics defines the metrics configuration for operands. enableMetrics boolean - EnableMetrics specifies if ServiceMonitors should be created for the OpenTelemetry Collector. The operator.observability.prometheus feature gate must be enabled to use this feature.
+ EnableMetrics specifies if ServiceMonitor should be created for the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.
false diff --git a/go.mod b/go.mod index 07015b297..db19580b0 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 + go.opentelemetry.io/collector/semconv v0.82.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.0 diff --git a/go.sum b/go.sum index 6db68e53d..71848726a 100644 --- a/go.sum +++ b/go.sum @@ -311,7 +311,7 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= @@ -526,6 +526,8 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= +go.opentelemetry.io/collector/semconv v0.82.0 h1:WUeT2a+uZjI6kLvwcBaJnGvo7KSQ/9dIFRcxOQdXucc= +go.opentelemetry.io/collector/semconv v0.82.0/go.mod h1:TlYPtzvsXyHOgr5eATi43qEMqwSmIziivJB2uctKswo= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index 530898e5e..6b11f3c3c 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -24,17 +24,91 @@ import ( "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + exporterParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/exporter" + receiverParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) var ( + // ErrNoExporters indicates that there are no exporters in the configuration. + ErrNoExporters = errors.New("no exporters available as part of the configuration") + // ErrNoReceivers indicates that there are no receivers in the configuration. ErrNoReceivers = errors.New("no receivers available as part of the configuration") // ErrReceiversNotAMap indicates that the receivers property isn't a map of values. ErrReceiversNotAMap = errors.New("receivers property in the configuration doesn't contain valid receivers") + + // ErrExportersNotAMap indicates that the exporters property isn't a map of values. + ErrExportersNotAMap = errors.New("exporters property in the configuration doesn't contain valid exporters") ) +// ConfigToExporterPorts converts the incoming configuration object into a set of service ports required by the exporters. +func ConfigToExporterPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { + // now, we gather which ports we might need to open + // for that, we get all the exporters and check their `endpoint` properties, + // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: + // ${instance.Name}-${exporter.name}-${exporter.qualifier} + // the exporter-name is typically the node name from the exporters map + // the exporter-qualifier is what comes after the slash in the exporter name, but typically nil + // examples: + // ```yaml + // exporters: + // exampleexporter: + // endpoint: 0.0.0.0:12345 + // exampleexporter/settings: + // endpoint: 0.0.0.0:12346 + // in this case, we have two ports, named: "exampleexporter" and "exampleexporter-settings" + exportersProperty, ok := config["exporters"] + if !ok { + return nil, ErrNoExporters + } + expEnabled := GetEnabledExporters(logger, config) + if expEnabled == nil { + return nil, ErrExportersNotAMap + } + exporters, ok := exportersProperty.(map[interface{}]interface{}) + if !ok { + return nil, ErrExportersNotAMap + } + + ports := []corev1.ServicePort{} + for key, val := range exporters { + // This check will pass only the enabled exporters, + // then only the related ports will be opened. + if !expEnabled[key] { + continue + } + exporter, ok := val.(map[interface{}]interface{}) + if !ok { + logger.Info("exporter doesn't seem to be a map of properties", "exporter", key) + exporter = map[interface{}]interface{}{} + } + + exprtName := key.(string) + exprtParser, err := exporterParser.For(logger, exprtName, exporter) + if err != nil { + logger.V(2).Info("no parser found for '%s'", exprtName) + continue + } + + exprtPorts, err := exprtParser.Ports() + if err != nil { + logger.Error(err, "parser for '%s' has returned an error: %w", exprtName, err) + continue + } + + if len(exprtPorts) > 0 { + ports = append(ports, exprtPorts...) + } + } + + sort.Slice(ports, func(i, j int) bool { + return ports[i].Name < ports[j].Name + }) + + return ports, nil +} + // ConfigToReceiverPorts converts the incoming configuration object into a set of service ports required by the receivers. func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { // now, we gather which ports we might need to open @@ -78,7 +152,7 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ } rcvrName := key.(string) - rcvrParser := parser.For(logger, rcvrName, receiver) + rcvrParser := receiverParser.For(logger, rcvrName, receiver) rcvrPorts, err := rcvrParser.Ports() if err != nil { @@ -101,6 +175,25 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ return ports, nil } +func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) []corev1.ServicePort { + ports, err := ConfigToReceiverPorts(logger, config) + if err != nil { + logger.Error(err, "there was a problem while getting the ports from the receivers") + } + + exporterPorts, err := ConfigToExporterPorts(logger, config) + if err != nil { + logger.Error(err, "there was a problem while getting the ports from the exporters") + } + ports = append(ports, exporterPorts...) + + sort.Slice(ports, func(i, j int) bool { + return ports[i].Name < ports[j].Name + }) + + return ports +} + // ConfigToMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. func ConfigToMetricsPort(logger logr.Logger, config map[interface{}]interface{}) (int32, error) { // we don't need to unmarshal the whole config, just follow the keys down to diff --git a/internal/manifests/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go index 5f1bd1fab..07be4f0ba 100644 --- a/internal/manifests/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -26,7 +26,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) var logger = logf.Log.WithName("unit-tests") @@ -179,7 +179,7 @@ func TestParserFailed(t *testing.T) { return nil, errors.New("mocked error") }, } - parser.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ReceiverParser { + receiver.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) receiver.ReceiverParser { return mockParser }) diff --git a/internal/manifests/collector/adapters/config_validate.go b/internal/manifests/collector/adapters/config_validate.go index 37c6e6ec9..221a4f21a 100644 --- a/internal/manifests/collector/adapters/config_validate.go +++ b/internal/manifests/collector/adapters/config_validate.go @@ -21,25 +21,33 @@ import ( // Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. // GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { - cfgReceivers, ok := config["receivers"] + return getEnabledComponents(config, "receivers") +} + +func GetEnabledExporters(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { + return getEnabledComponents(config, "exporters") +} + +func getEnabledComponents(config map[interface{}]interface{}, componentType string) map[interface{}]bool { + cfgComponents, ok := config[componentType] if !ok { return nil } - receivers, ok := cfgReceivers.(map[interface{}]interface{}) + components, ok := cfgComponents.(map[interface{}]interface{}) if !ok { return nil } - availableReceivers := map[interface{}]bool{} + availableComponents := map[interface{}]bool{} - for recvID := range receivers { + for compID := range components { //Safe Cast - receiverID, withReceiver := recvID.(string) - if !withReceiver { + componentID, withComponent := compID.(string) + if !withComponent { return nil } - //Getting all receivers present in the receivers section and setting them to false. - availableReceivers[receiverID] = false + //Getting all components present in the components (exporters,receivers...) section and setting them to false. + availableComponents[componentID] = false } cfgService, withService := config["service"].(map[interface{}]interface{}) @@ -77,29 +85,29 @@ func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[ return nil } for pipSpecID, pipSpecCfg := range pipelineDesc { - if pipSpecID.(string) == "receivers" { + if pipSpecID.(string) == componentType { receiversList, ok := pipSpecCfg.([]interface{}) if !ok { continue } // If receiversList is empty means that we haven't any enabled Receiver. if len(receiversList) == 0 { - availableReceivers = nil + availableComponents = nil } else { // All enabled receivers will be set as true - for _, recKey := range receiversList { + for _, comKey := range receiversList { //Safe Cast - receiverKey, ok := recKey.(string) + receiverKey, ok := comKey.(string) if !ok { return nil } - availableReceivers[receiverKey] = true + availableComponents[receiverKey] = true } } //Removing all non-enabled receivers - for recID, recKey := range availableReceivers { - if !(recKey) { - delete(availableReceivers, recID) + for comID, comKey := range availableComponents { + if !(comKey) { + delete(availableComponents, comID) } } } @@ -107,5 +115,5 @@ func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[ } } } - return availableReceivers + return availableComponents } diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index f7e1e1b60..b9e00d41b 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -16,10 +16,7 @@ package collector import ( "fmt" - "net" "sort" - "strconv" - "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -151,10 +148,8 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C logger.Error(err, "couldn't extract the configuration") return ports } - ps, err := adapters.ConfigToReceiverPorts(logger, c) - if err != nil { - logger.Error(err, "couldn't build container ports from configuration") - } else { + ps := adapters.ConfigToPorts(logger, c) + if len(ps) > 0 { for _, p := range ps { truncName := naming.Truncate(p.Name, maxPortLen) if p.Name != truncName { @@ -187,65 +182,9 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C Protocol: corev1.ProtocolTCP, } - promExporterPorts, errs := getPrometheusExporterPorts(c) - for _, err := range errs { - logger.V(2).Info("There was a problem getting the prometheus exporter port: %s", err) - } - for _, promPort := range promExporterPorts { - ports[promPort.Name] = promPort - } - return ports } -func getPrometheusExporterPort(exporterConfig map[interface{}]interface{}) (int32, error) { - var promPort int32 = 0 - if endpoint, ok := exporterConfig["endpoint"]; ok { - _, port, err := net.SplitHostPort(endpoint.(string)) - if err != nil { - return 0, err - } - i64, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return 0, err - } - promPort = int32(i64) - } - return promPort, nil -} - -func getPrometheusExporterPorts(c map[interface{}]interface{}) ([]corev1.ContainerPort, []error) { - errors := make([]error, 0) - ports := make([]corev1.ContainerPort, 0) - if exporters, ok := c["exporters"]; ok && exporters != nil { - for e, exporterConfig := range exporters.(map[interface{}]interface{}) { - exporterName := e.(string) - // Note that receivers, processors, exporters and/or pipelines are defined via component identifiers in type[/name] format (e.g. otlp or otlp/2). Components of a given type can be defined more than once as long as the identifiers are unique. - if strings.Split(exporterName, "/")[0] == "prometheus" { - containerPort, err := getPrometheusExporterPort(exporterConfig.(map[interface{}]interface{})) - if err != nil { - errors = append(errors, - fmt.Errorf( - "there was a problem getting the port. Exporter %s", - exporterName, - ), - ) - } - ports = append(ports, - corev1.ContainerPort{ - Name: naming.PortName(exporterName, containerPort), - ContainerPort: containerPort, - Protocol: corev1.ProtocolTCP, - }, - ) - } - } - } else { - errors = append(errors, fmt.Errorf("no exporters specified in the configuration")) - } - return ports, errors -} - func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { ports := make([]corev1.ContainerPort, 0, len(portMap)) for _, p := range portMap { diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index b20c2bc99..cfb30c3f0 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -181,14 +181,19 @@ service: description: "prometheus exporter", specConfig: `exporters: prometheus: - endpoint: "0.0.0.0:9090"`, + endpoint: "0.0.0.0:9090" +service: + pipelines: + metrics: + exporters: [prometheus] +`, + specPorts: []corev1.ServicePort{}, expectedPorts: []corev1.ContainerPort{ metricContainerPort, { Name: "prometheus", ContainerPort: 9090, - Protocol: corev1.ProtocolTCP, }, }, }, @@ -198,19 +203,22 @@ service: prometheus/prod: endpoint: "0.0.0.0:9090" prometheus/dev: - endpoint: "0.0.0.0:9091"`, + endpoint: "0.0.0.0:9091" +service: + pipelines: + metrics: + exporters: [prometheus/prod, prometheus/dev] +`, specPorts: []corev1.ServicePort{}, expectedPorts: []corev1.ContainerPort{ metricContainerPort, - { - Name: "prometheus-prod", - ContainerPort: 9090, - Protocol: corev1.ProtocolTCP, - }, { Name: "prometheus-dev", ContainerPort: 9091, - Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-prod", + ContainerPort: 9090, }, }, }, @@ -230,19 +238,21 @@ service: prometheus/dev: endpoint: "0.0.0.0:9091" prometheusremotewrite/prometheus: - endpoint: http://prometheus-server.monitoring/api/v1/write`, + endpoint: http://prometheus-server.monitoring/api/v1/write +service: + pipelines: + metrics: + exporters: [prometheus/prod, prometheus/dev, prometheusremotewrite/prometheus]`, specPorts: []corev1.ServicePort{}, expectedPorts: []corev1.ContainerPort{ metricContainerPort, - { - Name: "prometheus-prod", - ContainerPort: 9090, - Protocol: corev1.ProtocolTCP, - }, { Name: "prometheus-dev", ContainerPort: 9091, - Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-prod", + ContainerPort: 9090, }, }, }, @@ -263,7 +273,7 @@ service: c := Container(cfg, logger, otelcol, true) // verify - assert.ElementsMatch(t, testCase.expectedPorts, c.Ports) + assert.ElementsMatch(t, testCase.expectedPorts, c.Ports, testCase.description) }) } } diff --git a/internal/manifests/collector/parser/exporter/exporter.go b/internal/manifests/collector/parser/exporter/exporter.go new file mode 100644 index 000000000..ae0282f73 --- /dev/null +++ b/internal/manifests/collector/parser/exporter/exporter.go @@ -0,0 +1,139 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package parser is for parsing the OpenTelemetry Collector configuration. +package exporter + +import ( + "errors" + "fmt" + "regexp" + "strconv" + "strings" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// ExporterParser is an interface that should be implemented by all exporter parsers. +type ExporterParser interface { + // Ports returns the service ports parsed based on the exporter's configuration + Ports() ([]corev1.ServicePort, error) + + // ParserName returns the name of this parser + ParserName() string +} + +// Builder specifies the signature required for parser builders. +type Builder func(logr.Logger, string, map[interface{}]interface{}) ExporterParser + +// registry holds a record of all known parsers. +var registry = make(map[string]Builder) + +// BuilderFor returns a parser builder for the given exporter name. +func BuilderFor(name string) Builder { + return registry[exporterType(name)] +} + +// For returns a new parser for the given exporter name + config. +func For(logger logr.Logger, name string, config map[interface{}]interface{}) (ExporterParser, error) { + builder := BuilderFor(name) + if builder == nil { + return nil, fmt.Errorf("no builders for %s", name) + } + return builder(logger, name, config), nil +} + +// Register adds a new parser builder to the list of known builders. +func Register(name string, builder Builder) { + registry[name] = builder +} + +// IsRegistered checks whether a parser is registered with the given name. +func IsRegistered(name string) bool { + _, ok := registry[name] + return ok +} + +var ( + endpointKey = "endpoint" +) + +func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *corev1.ServicePort { + endpoint := getAddressFromConfig(logger, name, endpointKey, config) + + switch e := endpoint.(type) { + case nil: + break + case string: + port, err := portFromEndpoint(e) + if err != nil { + logger.WithValues(endpointKey, e).Error(err, "couldn't parse the endpoint's port") + return nil + } + + return &corev1.ServicePort{ + Name: naming.PortName(name, port), + Port: port, + } + default: + logger.WithValues(endpointKey, endpoint).Error(fmt.Errorf("unrecognized type %T", endpoint), "exporter's endpoint isn't a string") + } + + return nil +} + +func getAddressFromConfig(logger logr.Logger, name, key string, config map[interface{}]interface{}) interface{} { + endpoint, ok := config[key] + if !ok { + logger.V(2).Info("%s exporter doesn't have an %s", name, key) + return nil + } + return endpoint +} + +func portFromEndpoint(endpoint string) (int32, error) { + var err error + var port int64 + + r := regexp.MustCompile(":[0-9]+") + + if r.MatchString(endpoint) { + port, err = strconv.ParseInt(strings.Replace(r.FindString(endpoint), ":", "", -1), 10, 32) + + if err != nil { + return 0, err + } + } + + if port == 0 { + return 0, errors.New("port should not be empty") + } + + return int32(port), err +} + +func exporterType(name string) string { + // exporters have a name like: + // - myexporter/custom + // - myexporter + // we extract the "myexporter" part and see if we have a parser for the exporter + if strings.Contains(name, "/") { + return name[:strings.Index(name, "/")] + } + + return name +} diff --git a/internal/manifests/collector/parser/exporter/exporter_prometheus.go b/internal/manifests/collector/parser/exporter/exporter_prometheus.go new file mode 100644 index 000000000..cc9e17748 --- /dev/null +++ b/internal/manifests/collector/parser/exporter/exporter_prometheus.go @@ -0,0 +1,76 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package exporter + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +var _ ExporterParser = &PrometheusExporterParser{} + +const ( + parserNamePrometheus = "__prometheus" + defaultPrometheusPort = 8888 +) + +// PrometheusExporterParser parses the configuration for OTLP receivers. +type PrometheusExporterParser struct { + config map[interface{}]interface{} + logger logr.Logger + name string +} + +// NewPrometheusExporterParser builds a new parser for OTLP receivers. +func NewPrometheusExporterParser(logger logr.Logger, name string, config map[interface{}]interface{}) ExporterParser { + return &PrometheusExporterParser{ + logger: logger, + name: name, + config: config, + } +} + +// Ports returns all the service ports for all protocols in this parser. +func (o *PrometheusExporterParser) Ports() ([]corev1.ServicePort, error) { + ports := []corev1.ServicePort{} + if o.config == nil { + ports = append(ports, + corev1.ServicePort{ + Name: naming.PortName(o.name, defaultPrometheusPort), + Port: defaultPrometheusPort, + TargetPort: intstr.FromInt(int(defaultPrometheusPort)), + Protocol: corev1.ProtocolTCP, + }, + ) + } else { + ports = append( + ports, *singlePortFromConfigEndpoint(o.logger, o.name, o.config), + ) + } + + return ports, nil +} + +// ParserName returns the name of this parser. +func (o *PrometheusExporterParser) ParserName() string { + return parserNamePrometheus +} + +func init() { + Register("prometheus", NewPrometheusExporterParser) +} diff --git a/internal/manifests/collector/parser/receiver.go b/internal/manifests/collector/parser/receiver/receiver.go similarity index 98% rename from internal/manifests/collector/parser/receiver.go rename to internal/manifests/collector/parser/receiver/receiver.go index dcf7a6f55..88c6b4bcf 100644 --- a/internal/manifests/collector/parser/receiver.go +++ b/internal/manifests/collector/parser/receiver/receiver.go @@ -13,7 +13,7 @@ // limitations under the License. // Package parser is for parsing the OpenTelemetry Collector configuration. -package parser +package receiver import ( "errors" @@ -190,7 +190,7 @@ func portFromEndpoint(endpoint string) (int32, error) { } if port == 0 { - return 0, errors.New("Port should not be empty") + return 0, errors.New("port should not be empty") } return int32(port), err diff --git a/internal/manifests/collector/parser/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go similarity index 98% rename from internal/manifests/collector/parser/receiver_aws-xray.go rename to internal/manifests/collector/parser/receiver/receiver_aws-xray.go index 6d8f92c7b..f5569f247 100644 --- a/internal/manifests/collector/parser/receiver_aws-xray.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_aws-xray_test.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_aws-xray_test.go rename to internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go index bbd752f08..5a99f9e89 100644 --- a/internal/manifests/collector/parser/receiver_aws-xray_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the AWS XRAY parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_carbon.go b/internal/manifests/collector/parser/receiver/receiver_carbon.go similarity index 98% rename from internal/manifests/collector/parser/receiver_carbon.go rename to internal/manifests/collector/parser/receiver/receiver_carbon.go index 26f073ebe..45c3c0447 100644 --- a/internal/manifests/collector/parser/receiver_carbon.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_carbon_test.go b/internal/manifests/collector/parser/receiver/receiver_carbon_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_carbon_test.go rename to internal/manifests/collector/parser/receiver/receiver_carbon_test.go index 22a5cb927..370732182 100644 --- a/internal/manifests/collector/parser/receiver_carbon_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Carbon parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_collectd.go b/internal/manifests/collector/parser/receiver/receiver_collectd.go similarity index 98% rename from internal/manifests/collector/parser/receiver_collectd.go rename to internal/manifests/collector/parser/receiver/receiver_collectd.go index 9426399a4..d18e6b72b 100644 --- a/internal/manifests/collector/parser/receiver_collectd.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_collectd_test.go b/internal/manifests/collector/parser/receiver/receiver_collectd_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_collectd_test.go rename to internal/manifests/collector/parser/receiver/receiver_collectd_test.go index fe63c75cf..5e0e6d012 100644 --- a/internal/manifests/collector/parser/receiver_collectd_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Collectd parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go similarity index 98% rename from internal/manifests/collector/parser/receiver_fluent-forward.go rename to internal/manifests/collector/parser/receiver/receiver_fluent-forward.go index 94170fa05..c55debd96 100644 --- a/internal/manifests/collector/parser/receiver_fluent-forward.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_fluent-forward_test.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_fluent-forward_test.go rename to internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go index ee8959260..af1500698 100644 --- a/internal/manifests/collector/parser/receiver_fluent-forward_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the FluentForward parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_generic.go b/internal/manifests/collector/parser/receiver/receiver_generic.go similarity index 99% rename from internal/manifests/collector/parser/receiver_generic.go rename to internal/manifests/collector/parser/receiver/receiver_generic.go index 8ca401c87..42d5975ec 100644 --- a/internal/manifests/collector/parser/receiver_generic.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go similarity index 67% rename from internal/manifests/collector/parser/receiver_generic_test.go rename to internal/manifests/collector/parser/receiver/receiver_generic_test.go index 7c99633d1..4b6580d29 100644 --- a/internal/manifests/collector/parser/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser_test +package receiver_test import ( "testing" @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) var logger = logf.Log.WithName("unit-tests") @@ -29,7 +29,7 @@ var logger = logf.Log.WithName("unit-tests") func TestParseEndpoint(t *testing.T) { // prepare // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + builder := receiver.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ "endpoint": "0.0.0.0:1234", }) @@ -45,7 +45,7 @@ func TestParseEndpoint(t *testing.T) { func TestFailedToParseEndpoint(t *testing.T) { // prepare // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := parser.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ + builder := receiver.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ "endpoint": "0.0.0.0", }) @@ -59,27 +59,27 @@ func TestFailedToParseEndpoint(t *testing.T) { func TestDownstreamParsers(t *testing.T) { for _, tt := range []struct { - builder func(logr.Logger, string, map[interface{}]interface{}) parser.ReceiverParser + builder func(logr.Logger, string, map[interface{}]interface{}) receiver.ReceiverParser desc string receiverName string parserName string defaultPort int }{ - {parser.NewZipkinReceiverParser, "zipkin", "zipkin", "__zipkin", 9411}, - {parser.NewOpenCensusReceiverParser, "opencensus", "opencensus", "__opencensus", 55678}, + {receiver.NewZipkinReceiverParser, "zipkin", "zipkin", "__zipkin", 9411}, + {receiver.NewOpenCensusReceiverParser, "opencensus", "opencensus", "__opencensus", 55678}, // contrib receivers - {parser.NewCarbonReceiverParser, "carbon", "carbon", "__carbon", 2003}, - {parser.NewCollectdReceiverParser, "collectd", "collectd", "__collectd", 8081}, - {parser.NewSAPMReceiverParser, "sapm", "sapm", "__sapm", 7276}, - {parser.NewSignalFxReceiverParser, "signalfx", "signalfx", "__signalfx", 9943}, - {parser.NewWavefrontReceiverParser, "wavefront", "wavefront", "__wavefront", 2003}, - {parser.NewZipkinScribeReceiverParser, "zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410}, - {parser.NewFluentForwardReceiverParser, "fluentforward", "fluentforward", "__fluentforward", 8006}, - {parser.NewStatsdReceiverParser, "statsd", "statsd", "__statsd", 8125}, - {parser.NewInfluxdbReceiverParser, "influxdb", "influxdb", "__influxdb", 8086}, - {parser.NewSplunkHecReceiverParser, "splunk-hec", "splunk-hec", "__splunk_hec", 8088}, - {parser.NewAWSXrayReceiverParser, "awsxray", "awsxray", "__awsxray", 2000}, + {receiver.NewCarbonReceiverParser, "carbon", "carbon", "__carbon", 2003}, + {receiver.NewCollectdReceiverParser, "collectd", "collectd", "__collectd", 8081}, + {receiver.NewSAPMReceiverParser, "sapm", "sapm", "__sapm", 7276}, + {receiver.NewSignalFxReceiverParser, "signalfx", "signalfx", "__signalfx", 9943}, + {receiver.NewWavefrontReceiverParser, "wavefront", "wavefront", "__wavefront", 2003}, + {receiver.NewZipkinScribeReceiverParser, "zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410}, + {receiver.NewFluentForwardReceiverParser, "fluentforward", "fluentforward", "__fluentforward", 8006}, + {receiver.NewStatsdReceiverParser, "statsd", "statsd", "__statsd", 8125}, + {receiver.NewInfluxdbReceiverParser, "influxdb", "influxdb", "__influxdb", 8086}, + {receiver.NewSplunkHecReceiverParser, "splunk-hec", "splunk-hec", "__splunk_hec", 8088}, + {receiver.NewAWSXrayReceiverParser, "awsxray", "awsxray", "__awsxray", 2000}, } { t.Run(tt.receiverName, func(t *testing.T) { t.Run("builds successfully", func(t *testing.T) { diff --git a/internal/manifests/collector/parser/receiver_influxdb.go b/internal/manifests/collector/parser/receiver/receiver_influxdb.go similarity index 98% rename from internal/manifests/collector/parser/receiver_influxdb.go rename to internal/manifests/collector/parser/receiver/receiver_influxdb.go index 55e393f2f..d2e9cc3e5 100644 --- a/internal/manifests/collector/parser/receiver_influxdb.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_influxdb_test.go b/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_influxdb_test.go rename to internal/manifests/collector/parser/receiver/receiver_influxdb_test.go index 859720448..94f596ee0 100644 --- a/internal/manifests/collector/parser/receiver_influxdb_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Influxdb parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_jaeger.go b/internal/manifests/collector/parser/receiver/receiver_jaeger.go similarity index 99% rename from internal/manifests/collector/parser/receiver_jaeger.go rename to internal/manifests/collector/parser/receiver/receiver_jaeger.go index fc5a7e153..26329a6ec 100644 --- a/internal/manifests/collector/parser/receiver_jaeger.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "fmt" diff --git a/internal/manifests/collector/parser/receiver_jaeger_test.go b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go similarity index 99% rename from internal/manifests/collector/parser/receiver_jaeger_test.go rename to internal/manifests/collector/parser/receiver/receiver_jaeger_test.go index 9bcdb4cb0..84f343a2c 100644 --- a/internal/manifests/collector/parser/receiver_jaeger_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "testing" diff --git a/internal/manifests/collector/parser/receiver_oc.go b/internal/manifests/collector/parser/receiver/receiver_oc.go similarity index 98% rename from internal/manifests/collector/parser/receiver_oc.go rename to internal/manifests/collector/parser/receiver/receiver_oc.go index 5deb0fe5f..c2515a0ad 100644 --- a/internal/manifests/collector/parser/receiver_oc.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_oc_test.go b/internal/manifests/collector/parser/receiver/receiver_oc_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_oc_test.go rename to internal/manifests/collector/parser/receiver/receiver_oc_test.go index b14b4f9b1..74b606242 100644 --- a/internal/manifests/collector/parser/receiver_oc_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the OpenCensus parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_otlp.go b/internal/manifests/collector/parser/receiver/receiver_otlp.go similarity index 99% rename from internal/manifests/collector/parser/receiver_otlp.go rename to internal/manifests/collector/parser/receiver/receiver_otlp.go index e2e0e46a3..471ca10c8 100644 --- a/internal/manifests/collector/parser/receiver_otlp.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "fmt" diff --git a/internal/manifests/collector/parser/receiver_otlp_test.go b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go similarity index 99% rename from internal/manifests/collector/parser/receiver_otlp_test.go rename to internal/manifests/collector/parser/receiver/receiver_otlp_test.go index 7d2ed1649..4f5e4bcb1 100644 --- a/internal/manifests/collector/parser/receiver_otlp_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "testing" diff --git a/internal/manifests/collector/parser/receiver_sapm.go b/internal/manifests/collector/parser/receiver/receiver_sapm.go similarity index 98% rename from internal/manifests/collector/parser/receiver_sapm.go rename to internal/manifests/collector/parser/receiver/receiver_sapm.go index a9b8b574c..e0a3756ab 100644 --- a/internal/manifests/collector/parser/receiver_sapm.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_sapm_test.go b/internal/manifests/collector/parser/receiver/receiver_sapm_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_sapm_test.go rename to internal/manifests/collector/parser/receiver/receiver_sapm_test.go index 6a0c3de59..094008626 100644 --- a/internal/manifests/collector/parser/receiver_sapm_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the SAPM parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_signalfx.go b/internal/manifests/collector/parser/receiver/receiver_signalfx.go similarity index 98% rename from internal/manifests/collector/parser/receiver_signalfx.go rename to internal/manifests/collector/parser/receiver/receiver_signalfx.go index f4140c470..a3ecc6873 100644 --- a/internal/manifests/collector/parser/receiver_signalfx.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_signalfx_test.go b/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_signalfx_test.go rename to internal/manifests/collector/parser/receiver/receiver_signalfx_test.go index cd196ee5d..eaee10189 100644 --- a/internal/manifests/collector/parser/receiver_signalfx_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the SignalFx parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_skywalking.go b/internal/manifests/collector/parser/receiver/receiver_skywalking.go similarity index 99% rename from internal/manifests/collector/parser/receiver_skywalking.go rename to internal/manifests/collector/parser/receiver/receiver_skywalking.go index b888edc24..5bee2cb03 100644 --- a/internal/manifests/collector/parser/receiver_skywalking.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "fmt" diff --git a/internal/manifests/collector/parser/receiver_skywalking_test.go b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go similarity index 99% rename from internal/manifests/collector/parser/receiver_skywalking_test.go rename to internal/manifests/collector/parser/receiver/receiver_skywalking_test.go index 46d60cd84..e373e16d8 100644 --- a/internal/manifests/collector/parser/receiver_skywalking_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "testing" diff --git a/internal/manifests/collector/parser/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go similarity index 98% rename from internal/manifests/collector/parser/receiver_splunk-hec.go rename to internal/manifests/collector/parser/receiver/receiver_splunk-hec.go index 09f75a123..aa7b478bf 100644 --- a/internal/manifests/collector/parser/receiver_splunk-hec.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_splunk-hec_test.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_splunk-hec_test.go rename to internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go index 3ffc6c0ee..e6f99f785 100644 --- a/internal/manifests/collector/parser/receiver_splunk-hec_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Splunk Hec parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_statsd.go b/internal/manifests/collector/parser/receiver/receiver_statsd.go similarity index 98% rename from internal/manifests/collector/parser/receiver_statsd.go rename to internal/manifests/collector/parser/receiver/receiver_statsd.go index 0ad153c9e..725fb2727 100644 --- a/internal/manifests/collector/parser/receiver_statsd.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_statsd_test.go b/internal/manifests/collector/parser/receiver/receiver_statsd_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_statsd_test.go rename to internal/manifests/collector/parser/receiver/receiver_statsd_test.go index 0ab151935..338971ba4 100644 --- a/internal/manifests/collector/parser/receiver_statsd_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Statsd parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_test.go b/internal/manifests/collector/parser/receiver/receiver_test.go similarity index 99% rename from internal/manifests/collector/parser/receiver_test.go rename to internal/manifests/collector/parser/receiver/receiver_test.go index d7e39e041..c972f7cd2 100644 --- a/internal/manifests/collector/parser/receiver_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "testing" diff --git a/internal/manifests/collector/parser/receiver_wavefront.go b/internal/manifests/collector/parser/receiver/receiver_wavefront.go similarity index 98% rename from internal/manifests/collector/parser/receiver_wavefront.go rename to internal/manifests/collector/parser/receiver/receiver_wavefront.go index 00c3f17e1..658d192c2 100644 --- a/internal/manifests/collector/parser/receiver_wavefront.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_wavefront_test.go b/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_wavefront_test.go rename to internal/manifests/collector/parser/receiver/receiver_wavefront_test.go index 6bea4d91e..0dd31b947 100644 --- a/internal/manifests/collector/parser/receiver_wavefront_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Wavefront parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go similarity index 98% rename from internal/manifests/collector/parser/receiver_zipkin-scribe.go rename to internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go index 1c6fa3631..c45968b1d 100644 --- a/internal/manifests/collector/parser/receiver_zipkin-scribe.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_zipkin-scribe_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_zipkin-scribe_test.go rename to internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go index dc057612b..6475eb02f 100644 --- a/internal/manifests/collector/parser/receiver_zipkin-scribe_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the ZipkinScribe parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver_zipkin.go b/internal/manifests/collector/parser/receiver/receiver_zipkin.go similarity index 98% rename from internal/manifests/collector/parser/receiver_zipkin.go rename to internal/manifests/collector/parser/receiver/receiver_zipkin.go index d96d951e0..412a8b6cf 100644 --- a/internal/manifests/collector/parser/receiver_zipkin.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver import ( "github.com/go-logr/logr" diff --git a/internal/manifests/collector/parser/receiver_zipkin_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go similarity index 97% rename from internal/manifests/collector/parser/receiver_zipkin_test.go rename to internal/manifests/collector/parser/receiver/receiver_zipkin_test.go index 87bfecc08..8f1af43c5 100644 --- a/internal/manifests/collector/parser/receiver_zipkin_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go @@ -12,6 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -package parser +package receiver // all tests for the Zipkin parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 84a6284a2..518a0d3b9 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -100,11 +100,7 @@ func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemet return nil } - ports, err := adapters.ConfigToReceiverPorts(logger, configFromString) - if err != nil { - logger.Error(err, "couldn't build the service for this instance") - return nil - } + ports := adapters.ConfigToPorts(logger, configFromString) if len(otelcol.Spec.Ports) > 0 { // we should add all the ports from the CR diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 387836c4c..4c5ed9b78 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -16,6 +16,7 @@ package collector import ( "fmt" + "strings" "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -23,12 +24,21 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -// ServiceMonitor returns the service account for the given instance. +// ServiceMonitor returns the service monitor for the given instance. func ServiceMonitor(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (*monitoringv1.ServiceMonitor, error) { - return &monitoringv1.ServiceMonitor{ + if !otelcol.Spec.Observability.Metrics.EnableMetrics { + logger.V(2).Info("Metrics disabled for this OTEL Collector", + "otelcol.name", otelcol.Name, + "otelcol.namespace", otelcol.Namespace, + ) + return nil, nil + } + + sm := monitoringv1.ServiceMonitor{ ObjectMeta: metav1.ObjectMeta{ Namespace: otelcol.Namespace, Name: naming.ServiceMonitor(otelcol.Name), @@ -39,17 +49,51 @@ func ServiceMonitor(cfg config.Config, logger logr.Logger, otelcol v1alpha1.Open }, }, Spec: monitoringv1.ServiceMonitorSpec{ - Endpoints: []monitoringv1.Endpoint{{ - Port: "monitoring", - }}, + Endpoints: []monitoringv1.Endpoint{}, NamespaceSelector: monitoringv1.NamespaceSelector{ MatchNames: []string{otelcol.Namespace}, }, Selector: metav1.LabelSelector{ MatchLabels: map[string]string{ "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), }, }, }, - }, nil + } + + endpoints := []monitoringv1.Endpoint{ + { + Port: "monitoring", + }, + } + + sm.Spec.Endpoints = append(endpoints, endpointsFromConfig(logger, otelcol)...) + return &sm, nil +} + +func endpointsFromConfig(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []monitoringv1.Endpoint { + c, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + logger.V(2).Error(err, "Error while parsing the configuration") + return []monitoringv1.Endpoint{} + } + + exporterPorts, err := adapters.ConfigToExporterPorts(logger, c) + if err != nil { + logger.Error(err, "couldn't build service monitors from configuration") + return []monitoringv1.Endpoint{} + } + + endpoints := []monitoringv1.Endpoint{} + + for _, port := range exporterPorts { + if strings.Contains(port.Name, "prometheus") { + e := monitoringv1.Endpoint{ + Port: port.Name, + } + endpoints = append(endpoints, e) + } + } + return endpoints } diff --git a/internal/manifests/collector/servicemonitor_test.go b/internal/manifests/collector/servicemonitor_test.go index 85ed4d939..9c1605c95 100644 --- a/internal/manifests/collector/servicemonitor_test.go +++ b/internal/manifests/collector/servicemonitor_test.go @@ -15,6 +15,7 @@ package collector import ( + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -25,5 +26,25 @@ func TestDesiredServiceMonitors(t *testing.T) { actual, err := ServiceMonitor(params.Config, params.Log, params.Instance) assert.NoError(t, err) + assert.Nil(t, actual) + + params.Instance.Spec.Observability.Metrics.EnableMetrics = true + actual, err = ServiceMonitor(params.Config, params.Log, params.Instance) + assert.NoError(t, err) + assert.NotNil(t, actual) + assert.Equal(t, fmt.Sprintf("%s-collector", params.Instance.Name), actual.Name) + assert.Equal(t, params.Instance.Namespace, actual.Namespace) + assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) + + params, err = newParams("", "testdata/prometheus-exporter.yaml") + assert.NoError(t, err) + params.Instance.Spec.Observability.Metrics.EnableMetrics = true + actual, err = ServiceMonitor(params.Config, params.Log, params.Instance) + assert.NoError(t, err) assert.NotNil(t, actual) + assert.Equal(t, fmt.Sprintf("%s-collector", params.Instance.Name), actual.Name) + assert.Equal(t, params.Instance.Namespace, actual.Namespace) + assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) + assert.Equal(t, "prometheus-dev", actual.Spec.Endpoints[1].Port) + assert.Equal(t, "prometheus-prod", actual.Spec.Endpoints[2].Port) } diff --git a/internal/manifests/collector/testdata/prometheus-exporter.yaml b/internal/manifests/collector/testdata/prometheus-exporter.yaml new file mode 100644 index 000000000..546d900f7 --- /dev/null +++ b/internal/manifests/collector/testdata/prometheus-exporter.yaml @@ -0,0 +1,19 @@ +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + prometheus/prod: + endpoint: 0.0.0.0:8884 + + prometheus/dev: + endpoint: 0.0.0.0:8885 + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/dev, prometheus/prod] diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go index ac7231826..2edee33a1 100644 --- a/pkg/collector/reconcile/servicemonitor.go +++ b/pkg/collector/reconcile/servicemonitor.go @@ -33,14 +33,18 @@ import ( // ServiceMonitors reconciles the service monitor(s) required for the instance in the current context. func ServiceMonitors(ctx context.Context, params manifests.Params) error { - if !params.Instance.Spec.Observability.Metrics.EnableMetrics || !featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + if !featuregate.PrometheusOperatorIsAvailable.IsEnabled() { return nil } var desired []*monitoringv1.ServiceMonitor - if sm, err := collector.ServiceMonitor(params.Config, params.Log, params.Instance); err != nil { + + sm, err := collector.ServiceMonitor(params.Config, params.Log, params.Instance) + if err != nil { return err - } else { + } + + if sm != nil { desired = append(desired, sm) } diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml new file mode 100644 index 000000000..0121963c6 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: create-sm-prometheus diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml new file mode 100644 index 000000000..0a3c07d13 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml @@ -0,0 +1,65 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-dev + - port: prometheus-prod + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-sm-prometheus.simplest +--- +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector + namespace: create-sm-prometheus +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - name: prometheus-dev + port: 8885 + protocol: TCP + targetPort: 8885 + - name: prometheus-prod + port: 8884 + protocol: TCP + targetPort: 8884 +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector-monitoring + app.kubernetes.io/part-of: opentelemetry + name: simplest-collector-monitoring + namespace: create-sm-prometheus +spec: + ports: + - name: monitoring + port: 8888 + protocol: TCP + targetPort: 8888 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml new file mode 100644 index 000000000..b03318eb4 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml @@ -0,0 +1,29 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:8884 + + prometheus/dev: + endpoint: 0.0.0.0:8885 + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/dev, prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml new file mode 100644 index 000000000..b79840724 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml @@ -0,0 +1,42 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-prod + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-sm-prometheus.simplest +--- +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector + namespace: create-sm-prometheus +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - name: prometheus-prod + port: 8884 + protocol: TCP + targetPort: 8884 \ No newline at end of file diff --git a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml similarity index 64% rename from tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml rename to tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml index dffa7a050..e275da42e 100644 --- a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-install.yaml +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml @@ -2,27 +2,25 @@ apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: simplest + namespace: create-sm-prometheus spec: observability: metrics: enableMetrics: true config: | receivers: - jaeger: - protocols: - grpc: otlp: protocols: grpc: http: - processors: exporters: - logging: + prometheus/prod: + endpoint: 0.0.0.0:8884 service: pipelines: - traces: - receivers: [jaeger,otlp] + metrics: + receivers: [otlp] processors: [] - exporters: [logging] + exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml new file mode 100644 index 000000000..6590ac393 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: simplest-collector + namespace: create-sm-prometheus +spec: + ports: + - appProtocol: grpc + name: otlp-grpc + port: 4317 + protocol: TCP + targetPort: 4317 + - appProtocol: http + name: otlp-http + port: 4318 + protocol: TCP + targetPort: 4318 + - name: prometheus-prod + port: 9091 + protocol: TCP + targetPort: 9091 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml new file mode 100644 index 000000000..fe782b4d3 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml @@ -0,0 +1,26 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:9091 + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml new file mode 100644 index 000000000..61ad50e38 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-prod + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml new file mode 100644 index 000000000..5578a7da8 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml @@ -0,0 +1,26 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + observability: + metrics: + enableMetrics: false + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:9091 + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml new file mode 100644 index 000000000..f56ec033c --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml @@ -0,0 +1,21 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-dev + - port: prometheus-prod + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml new file mode 100644 index 000000000..ecb59ba1f --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml @@ -0,0 +1,22 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-dev + - port: prometheus-prod + - port: prometheusremotewrite/prometheus + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml new file mode 100644 index 000000000..8e300294e --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml @@ -0,0 +1,32 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:8884 + + prometheus/dev: + endpoint: 0.0.0.0:8885 + + prometheusremotewrite/prometheus: + endpoint: http://prometheus-server.monitoring/api/v1/write + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/dev, prometheus/prod, prometheusremotewrite/prometheus] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml new file mode 100644 index 000000000..8df94a598 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml @@ -0,0 +1,20 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-sm-prometheus +spec: + endpoints: + - port: monitoring + - port: prometheus-dev + namespaceSelector: + matchNames: + - create-sm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml new file mode 100644 index 000000000..028458da1 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml @@ -0,0 +1,29 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:8884 + + prometheus/dev: + endpoint: 0.0.0.0:8885 + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/dev] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml new file mode 100644 index 000000000..76798588b --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml @@ -0,0 +1,8 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: + - apiVersion: opentelemetry.io/v1alpha1 + kind: OpenTelemetryCollector + metadata: + name: simplest + namespace: create-sm-prometheus \ No newline at end of file diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml new file mode 100644 index 000000000..263dbb3c6 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml @@ -0,0 +1,5 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: simplest-collector + namespace: create-sm-prometheus diff --git a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml b/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml deleted file mode 100644 index 586d61e94..000000000 --- a/tests/e2e-prometheuscr/gather-metrics-from-operands/00-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: simplest-collector -spec: - endpoints: - - port: monitoring - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator From 7865a0227b07c9fd07c13213815011b493dd6ed1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 22 Aug 2023 11:23:41 +0200 Subject: [PATCH 0975/1234] Make OpenShift Route work with gRPC receivers (#2028) * Make OpenShift Route work with gRPC receivers Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/route-grpc.yaml | 16 ++++++++++++++++ internal/manifests/collector/route.go | 7 ++++++- internal/manifests/collector/service.go | 10 ++++++++++ internal/manifests/collector/service_test.go | 19 ++++++++++++++++++- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100755 .chloggen/route-grpc.yaml diff --git a/.chloggen/route-grpc.yaml b/.chloggen/route-grpc.yaml new file mode 100755 index 000000000..d2e2642b9 --- /dev/null +++ b/.chloggen/route-grpc.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Make OpenShift Route work with gRPC receivers by using h2c appProtocol + +# One or more tracking issues related to the change +issues: [1969] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index ed283a77d..d84fa1854 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -66,6 +66,11 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr routes := make([]*routev1.Route, len(ports)) for i, p := range ports { portName := naming.PortName(p.Name, p.Port) + path := "/" + // passthrough termination does not support paths + if otelcol.Spec.Ingress.Route.Termination == v1alpha1.TLSRouteTerminationTypePassthrough { + path = "" + } routes[i] = &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Route(otelcol.Name, p.Name), @@ -79,7 +84,7 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr }, Spec: routev1.RouteSpec{ Host: fmt.Sprintf("%s.%s", portName, otelcol.Spec.Ingress.Hostname), - Path: "/", + Path: path, To: routev1.RouteTargetReference{ Kind: "Service", Name: naming.Service(otelcol.Name), diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 518a0d3b9..c9430f621 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -16,6 +16,7 @@ package collector import ( "fmt" + "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -102,6 +103,15 @@ func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemet ports := adapters.ConfigToPorts(logger, configFromString) + // set appProtocol to h2c for grpc ports on OpenShift. + // OpenShift uses HA proxy that uses appProtocol for its configuration. + for i := range ports { + h2c := "h2c" + if otelcol.Spec.Ingress.Type == v1alpha1.IngressTypeRoute && ports[i].AppProtocol != nil && strings.EqualFold(*ports[i].AppProtocol, "grpc") { + ports[i].AppProtocol = &h2c + } + } + if len(otelcol.Spec.Ports) > 0 { // we should add all the ports from the CR // there are two cases where problems might occur: diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index 10f22a7d7..51b10139a 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -128,6 +128,24 @@ func TestDesiredService(t *testing.T) { }) + t.Run("on OpenShift gRPC appProtocol should be h2c", func(t *testing.T) { + h2c := "h2c" + jaegerPort := v1.ServicePort{ + Name: "jaeger-grpc", + Protocol: "TCP", + Port: 14250, + AppProtocol: &h2c, + } + + params := deploymentParams() + params.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + actual := Service(params.Config, params.Log, params.Instance) + + ports := append(params.Instance.Spec.Ports, jaegerPort) + expected := service("test-collector", ports) + assert.Equal(t, expected, *actual) + }) + t.Run("should return service with local internal traffic policy", func(t *testing.T) { grpc := "grpc" @@ -144,7 +162,6 @@ func TestDesiredService(t *testing.T) { assert.Equal(t, expected, *actual) }) - } func TestHeadlessService(t *testing.T) { From 3f23b153e06f5fe193f892c807524f6d254107c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:15:12 +0200 Subject: [PATCH 0976/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 1 update (#2042) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.1...v0.16.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 24 +++++----- cmd/operator-opamp-bridge/go.sum | 80 ++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 36 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index d230fecf4..5e917d0b4 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/apimachinery v0.28.0 k8s.io/client-go v0.28.0 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.15.1 + sigs.k8s.io/controller-runtime v0.16.0 ) require ( @@ -58,10 +58,10 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.15.1 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect @@ -70,23 +70,25 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/zap v1.24.0 // indirect + go.uber.org/zap v1.25.0 // indirect + golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect + google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.0 // indirect - k8s.io/apiextensions-apiserver v0.27.3 // indirect - k8s.io/component-base v0.27.3 // indirect + k8s.io/apiextensions-apiserver v0.28.0 // indirect + k8s.io/component-base v0.28.0 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index e5a83a088..eb5e05835 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -33,12 +33,16 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -57,6 +61,8 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -74,6 +80,7 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -134,6 +141,7 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -168,6 +176,7 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= @@ -176,6 +185,7 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -205,8 +215,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= -github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/open-telemetry/opamp-go v0.7.0 h1:PbxBsSmJwA4mJQbL5mhmxZ8KxNKqn1HBcoDilXIcPR8= github.com/open-telemetry/opamp-go v0.7.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= github.com/open-telemetry/opentelemetry-operator v0.78.0 h1:a5pjoL+JfU6rHWHaZ14qB2NCU5JuV/2p/ZvjgzEuE9I= @@ -217,23 +227,25 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= -github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -257,6 +269,9 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -264,6 +279,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= @@ -272,6 +289,8 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVzn go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0/go.mod h1:UqL5mZ3qs6XYhDnZaW1Ps4upD+PX6LipH40AoeuIlwU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 h1:IZXpCEtI7BbX01DRQEWTGDkvjMB6hEhiEZXS+eg2YqY= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0/go.mod h1:xY111jIZtWb+pUUgT4UiiSonAaY2cD2Ts5zvuKLki3o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= @@ -284,20 +303,20 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -308,6 +327,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= +golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -377,6 +398,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -409,8 +431,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= @@ -470,13 +492,13 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -532,8 +554,12 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= +google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= +google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -574,6 +600,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -592,16 +619,18 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= -k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= -k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= -k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= -k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= +k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= +k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= @@ -609,8 +638,9 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= -sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= +sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= +sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From fe94a6e4b8a311839b5f1e4dcb040b9e0c2bbd85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:15:32 +0200 Subject: [PATCH 0977/1234] Bump the kubernetes group in /cmd/otel-allocator with 1 update (#2041) Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.1...v0.16.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 14 +++++----- cmd/otel-allocator/go.sum | 54 ++++++++++++++++++++++++++++----------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 39485197c..6305c71f4 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/apimachinery v0.28.0 k8s.io/client-go v0.28.0 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.15.1 + sigs.k8s.io/controller-runtime v0.16.0 ) require ( @@ -170,8 +170,8 @@ require ( go.opentelemetry.io/otel/trace v1.16.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/goleak v1.2.1 // indirect - go.uber.org/multierr v1.9.0 // indirect - go.uber.org/zap v1.24.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect @@ -179,12 +179,12 @@ require ( golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect @@ -195,8 +195,8 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.4 // indirect - k8s.io/component-base v0.27.4 // indirect + k8s.io/apiextensions-apiserver v0.28.0 // indirect + k8s.io/component-base v0.28.0 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index a7bbcc49c..69d965dbd 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -72,6 +72,7 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -82,6 +83,7 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -108,6 +110,7 @@ github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0ma github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -129,6 +132,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -326,6 +331,7 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -375,7 +381,10 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= @@ -546,8 +555,8 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= -github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -638,6 +647,7 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -679,6 +689,9 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -691,14 +704,20 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -706,10 +725,11 @@ go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -895,8 +915,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -976,8 +996,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1084,6 +1104,7 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1109,16 +1130,18 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= -k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= -k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= -k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= -k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= +k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= +k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= @@ -1127,8 +1150,9 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= -sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= +sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= +sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 1c4528a3ffa3373a9a5f30cb8909720fee8f3931 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:06:14 +0200 Subject: [PATCH 0978/1234] Bump go.opentelemetry.io/collector/semconv from 0.82.0 to 0.83.0 (#2037) Bumps [go.opentelemetry.io/collector/semconv](https://github.com/open-telemetry/opentelemetry-collector) from 0.82.0 to 0.83.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-collector/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG-API.md) - [Commits](https://github.com/open-telemetry/opentelemetry-collector/compare/v0.82.0...v0.83.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/collector/semconv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index db19580b0..b784b1453 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,6 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/collector/semconv v0.82.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.0 @@ -93,6 +92,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect github.com/hashicorp/serf v0.10.1 // indirect diff --git a/go.sum b/go.sum index 71848726a..22dde8aed 100644 --- a/go.sum +++ b/go.sum @@ -312,6 +312,7 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= @@ -526,8 +527,6 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/collector/semconv v0.82.0 h1:WUeT2a+uZjI6kLvwcBaJnGvo7KSQ/9dIFRcxOQdXucc= -go.opentelemetry.io/collector/semconv v0.82.0/go.mod h1:TlYPtzvsXyHOgr5eATi43qEMqwSmIziivJB2uctKswo= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= From a0c9d76a342f3f32e6b5b20bdc734ed5337f1b9a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 23 Aug 2023 16:29:56 +0200 Subject: [PATCH 0979/1234] Update controller-runtime to 0.16 (#2046) * Bump the kubernetes group with 1 update Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.15.1...v0.16.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] * Fixes Signed-off-by: Pavol Loffay --------- Signed-off-by: dependabot[bot] Signed-off-by: Pavol Loffay Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- controllers/suite_test.go | 18 ++++--- go.mod | 9 ++-- go.sum | 51 ++++++++++++++----- internal/manifests/collector/suite_test.go | 23 +++++---- .../webhookhandler_suite_test.go | 18 ++++--- main.go | 18 ++++--- pkg/collector/reconcile/suite_test.go | 23 +++++---- pkg/collector/upgrade/suite_test.go | 18 ++++--- 8 files changed, 118 insertions(+), 60 deletions(-) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 1d8914bb6..ea3f41fea 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -35,6 +35,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" @@ -88,12 +90,16 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: testScheme, + LeaderElection: false, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) if mgrErr != nil { fmt.Printf("failed to start webhook server: %v", mgrErr) diff --git a/go.mod b/go.mod index b784b1453..7fce741b1 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( k8s.io/client-go v0.28.0 k8s.io/component-base v0.28.0 k8s.io/kubectl v0.28.0 - sigs.k8s.io/controller-runtime v0.15.1 + sigs.k8s.io/controller-runtime v0.16.0 ) require ( @@ -133,20 +133,19 @@ require ( github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel/trace v1.16.0 // indirect - go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect + go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.11.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.13.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.10.0 // indirect + golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.132.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect diff --git a/go.sum b/go.sum index 22dde8aed..c7e996e17 100644 --- a/go.sum +++ b/go.sum @@ -73,6 +73,7 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -81,22 +82,26 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -115,6 +120,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -172,6 +179,7 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= @@ -228,6 +236,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -276,7 +285,10 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= @@ -418,8 +430,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= -github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -492,6 +504,7 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -518,6 +531,9 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -527,21 +543,28 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= +go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -713,8 +736,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -789,8 +812,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= -gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -896,6 +919,7 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -922,12 +946,14 @@ k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPON k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.28.0 h1:qhfju0OaU+JGeBlToPeeIg2UJUWP++QwTkpio6nlPKg= @@ -937,8 +963,9 @@ k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= -sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= +sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= +sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index a756e5e28..6def56f8e 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -25,9 +25,6 @@ import ( "testing" "time" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" - routev1 "github.com/openshift/api/route/v1" v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -44,9 +41,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" ) var ( @@ -107,12 +108,16 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: testScheme, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, + LeaderElection: false, }) if mgrErr != nil { fmt.Printf("failed to start webhook server: %v", mgrErr) diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go index 4e0d26be6..5c188e7dd 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhookhandler/webhookhandler_suite_test.go @@ -33,6 +33,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" // +kubebuilder:scaffold:imports @@ -79,12 +81,16 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: testScheme, + LeaderElection: false, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) if mgrErr != nil { fmt.Printf("failed to start webhook server: %v", mgrErr) diff --git a/main.go b/main.go index 622a67a90..61cb218a7 100644 --- a/main.go +++ b/main.go @@ -40,6 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/controller-runtime/pkg/manager" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" @@ -189,16 +190,19 @@ func main() { optionsTlSOptsFuncs := []func(*tls.Config){ func(config *tls.Config) { tlsConfigSetting(config, tlsOpt) }, } - var namespaces []string + var namespaces map[string]cache.Config if strings.Contains(watchNamespace, ",") { - namespaces = strings.Split(watchNamespace, ",") - } else { - namespaces = []string{watchNamespace} + namespaces = map[string]cache.Config{} + for _, ns := range strings.Split(watchNamespace, ",") { + namespaces[ns] = cache.Config{} + } } mgrOptions := ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, + Scheme: scheme, + Metrics: metricsserver.Options{ + BindAddress: metricsAddr, + }, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, LeaderElectionID: "9f7554c3.opentelemetry.io", @@ -211,7 +215,7 @@ func main() { TLSOpts: optionsTlSOptsFuncs, }), Cache: cache.Options{ - Namespaces: namespaces, + DefaultNamespaces: namespaces, }, } diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 8e3e39409..55a60b1d7 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -25,9 +25,6 @@ import ( "testing" "time" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" - routev1 "github.com/openshift/api/route/v1" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/assert" @@ -47,9 +44,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" ) var ( @@ -116,12 +117,16 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: testScheme, + LeaderElection: false, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) if mgrErr != nil { fmt.Printf("failed to start webhook server: %v", mgrErr) diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index e17404a26..63c5cf493 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -33,6 +33,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" // +kubebuilder:scaffold:imports @@ -80,12 +82,16 @@ func TestMain(m *testing.M) { // start webhook server using Manager webhookInstallOptions := &testEnv.WebhookInstallOptions mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", + Scheme: testScheme, + LeaderElection: false, + WebhookServer: webhook.NewServer(webhook.Options{ + Host: webhookInstallOptions.LocalServingHost, + Port: webhookInstallOptions.LocalServingPort, + CertDir: webhookInstallOptions.LocalServingCertDir, + }), + Metrics: metricsserver.Options{ + BindAddress: "0", + }, }) if mgrErr != nil { fmt.Printf("failed to start webhook server: %v", mgrErr) From 406bfa1528a462fcfed9c14e62664241ddefe4d7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 23 Aug 2023 17:12:20 +0200 Subject: [PATCH 0980/1234] Run e2e tests on Kubernetes 1.28 (#2047) * Run e2e tests on Kubernetes 1.28 Signed-off-by: Pavol Loffay * Run e2e tests on Kubernetes 1.28 Signed-off-by: Pavol Loffay * Run e2e tests on Kubernetes 1.28 Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/kube128.yaml | 16 ++++++++++++++++ .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- kind-1.28.yaml | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100755 .chloggen/kube128.yaml create mode 100644 kind-1.28.yaml diff --git a/.chloggen/kube128.yaml b/.chloggen/kube128.yaml new file mode 100755 index 000000000..65b12a176 --- /dev/null +++ b/.chloggen/kube128.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Run end-to-end tests on Kubernetes 1.28 + +# One or more tracking issues related to the change +issues: [2047] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b1a5cf788..06fa5dd21 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -26,7 +26,7 @@ jobs: # should be compatible with them. kube-version: - "1.19" - - "1.27" + - "1.28" group: - e2e e2e-upgrade - e2e-prometheuscr diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 6f2970541..4aa55e31d 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -22,7 +22,7 @@ jobs: matrix: kube-version: - "1.19" - - "1.27" + - "1.28" steps: diff --git a/kind-1.28.yaml b/kind-1.28.yaml new file mode 100644 index 000000000..711640f95 --- /dev/null +++ b/kind-1.28.yaml @@ -0,0 +1,18 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31 + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP From 42e7f57546c59e6b817bb0873ab976f0aadf022f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:29:51 +0200 Subject: [PATCH 0981/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 2 updates (#2056) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 2 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/apimachinery` from 0.28.0 to 0.28.1 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.0...v0.28.1) Updates `k8s.io/client-go` from 0.28.0 to 0.28.1 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.0...v0.28.1) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 5e917d0b4..db87b50b5 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,8 +18,8 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.28.0 - k8s.io/client-go v0.28.0 + k8s.io/apimachinery v0.28.1 + k8s.io/client-go v0.28.1 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.16.0 ) @@ -86,7 +86,7 @@ require ( google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.28.0 // indirect + k8s.io/api v0.28.1 // indirect k8s.io/apiextensions-apiserver v0.28.0 // indirect k8s.io/component-base v0.28.0 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index eb5e05835..f6cd3c061 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -617,15 +617,15 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= -k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= +k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= +k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= -k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= +k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= -k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= -k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= +k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= +k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= From 91fbb02bfd82cdef4988a756af6f4bef218d4b11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:30:08 +0200 Subject: [PATCH 0982/1234] Bump the kubernetes group with 3 updates (#2055) Bumps the kubernetes group with 3 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) and [k8s.io/kubectl](https://github.com/kubernetes/kubectl). Updates `k8s.io/api` from 0.28.0 to 0.28.1 - [Commits](https://github.com/kubernetes/api/compare/v0.28.0...v0.28.1) Updates `k8s.io/apiextensions-apiserver` from 0.28.0 to 0.28.1 - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.28.0...v0.28.1) Updates `k8s.io/kubectl` from 0.28.0 to 0.28.1 - [Commits](https://github.com/kubernetes/kubectl/compare/v0.28.0...v0.28.1) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 7fce741b1..0ff3ba3a6 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.16.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.0 - k8s.io/apiextensions-apiserver v0.28.0 - k8s.io/apimachinery v0.28.0 - k8s.io/client-go v0.28.0 - k8s.io/component-base v0.28.0 - k8s.io/kubectl v0.28.0 + k8s.io/api v0.28.1 + k8s.io/apiextensions-apiserver v0.28.1 + k8s.io/apimachinery v0.28.1 + k8s.io/client-go v0.28.1 + k8s.io/component-base v0.28.1 + k8s.io/kubectl v0.28.1 sigs.k8s.io/controller-runtime v0.16.0 ) diff --git a/go.sum b/go.sum index c7e996e17..baadaa25f 100644 --- a/go.sum +++ b/go.sum @@ -940,24 +940,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= -k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= -k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= -k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= -k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= -k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= -k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= -k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= -k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= +k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= +k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= +k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTKSmQZw= +k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= +k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= +k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apiserver v0.28.1 h1:dw2/NKauDZCnOUAzIo2hFhtBRUo6gQK832NV8kuDbGM= +k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= +k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= +k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= +k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= +k8s.io/kms v0.28.1 h1:QLNTIc0k7Yebkt9yobj9Y9qBoRCMB4dq+pFCxVXVBnY= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.0 h1:qhfju0OaU+JGeBlToPeeIg2UJUWP++QwTkpio6nlPKg= -k8s.io/kubectl v0.28.0/go.mod h1:1We+E5nSX3/TVoSQ6y5Bzld5OhTBHZHlKEYl7g/NaTk= +k8s.io/kubectl v0.28.1 h1:jAq4yKEqQL+fwkWcEsUWxhJ7uIRcOYQraJxx4SyAMTY= +k8s.io/kubectl v0.28.1/go.mod h1:a0nk/lMMeKBulp0lMTJAKbkjZg1ykqfLfz/d6dnv1ak= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 0c6effb26fb4d090c9e7814ccc11626d98251a6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 11:30:23 +0200 Subject: [PATCH 0983/1234] Bump the kubernetes group in /cmd/otel-allocator with 2 updates (#2054) Bumps the kubernetes group in /cmd/otel-allocator with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/api` from 0.28.0 to 0.28.1 - [Commits](https://github.com/kubernetes/api/compare/v0.28.0...v0.28.1) Updates `k8s.io/client-go` from 0.28.0 to 0.28.1 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.0...v0.28.1) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 6 +++--- cmd/otel-allocator/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 6305c71f4..631cb710f 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,9 +22,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.0 - k8s.io/apimachinery v0.28.0 - k8s.io/client-go v0.28.0 + k8s.io/api v0.28.1 + k8s.io/apimachinery v0.28.1 + k8s.io/client-go v0.28.1 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.16.0 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 69d965dbd..0c1d2fba4 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1128,15 +1128,15 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= -k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= +k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= +k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= -k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= +k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= -k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= -k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= +k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= +k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= From 465eb2d85800f49dbf48a1c7e56a613fb77d3570 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Aug 2023 10:35:22 -0400 Subject: [PATCH 0984/1234] Bump github.com/prometheus/alertmanager in /cmd/otel-allocator (#2057) Bumps [github.com/prometheus/alertmanager](https://github.com/prometheus/alertmanager) from 0.25.0 to 0.25.1. - [Release notes](https://github.com/prometheus/alertmanager/releases) - [Changelog](https://github.com/prometheus/alertmanager/blob/v0.25.1/CHANGELOG.md) - [Commits](https://github.com/prometheus/alertmanager/compare/v0.25.0...v0.25.1) --- updated-dependencies: - dependency-name: github.com/prometheus/alertmanager dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 631cb710f..efbaa6143 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -154,7 +154,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect - github.com/prometheus/alertmanager v0.25.0 // indirect + github.com/prometheus/alertmanager v0.25.1 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 0c1d2fba4..b6a61479a 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -590,8 +590,8 @@ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 h1:kC77/UqP9o9tDquMbE/eS1J2wi0tNlYzhNJSXx9KPS4= github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1/go.mod h1:77dVxBmR4RbIrP6DSVeZCeknlxFZtS4287RaDXMMOoA= -github.com/prometheus/alertmanager v0.25.0 h1:vbXKUR6PYRiZPRIKfmXaG+dmCKG52RtPL4Btl8hQGvg= -github.com/prometheus/alertmanager v0.25.0/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= +github.com/prometheus/alertmanager v0.25.1 h1:LGBNMspOfv8h7brb+LWj2wnwBCg2ZuuKWTh6CAVw2/Y= +github.com/prometheus/alertmanager v0.25.1/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= From 7c5799fb4aa5d1bafc8ffaf5f6e185a3c28f2c2f Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 25 Aug 2023 13:55:51 -0400 Subject: [PATCH 0985/1234] Fix ci (#2052) --- .github/workflows/e2e.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 06fa5dd21..0d31f7c11 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -28,7 +28,8 @@ jobs: - "1.19" - "1.28" group: - - e2e e2e-upgrade + - e2e + - e2e-upgrade - e2e-prometheuscr - e2e-autoscale From a1bb07ccf6d448babac7b40a2a87e134f926ac85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:24:53 +0200 Subject: [PATCH 0986/1234] Bump go.opentelemetry.io/otel from 1.16.0 to 1.17.0 (#2067) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 0ff3ba3a6..d24315d27 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/otel v1.16.0 + go.opentelemetry.io/otel v1.17.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.1 k8s.io/apiextensions-apiserver v0.28.1 @@ -132,7 +132,7 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.17.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.11.0 // indirect diff --git a/go.sum b/go.sum index baadaa25f..2328cc220 100644 --- a/go.sum +++ b/go.sum @@ -545,15 +545,15 @@ go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5z go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= +go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= +go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= +go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From d3ebde2a78bf0e0ddff8fd9e6057ddea8c564bee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:25:42 +0200 Subject: [PATCH 0987/1234] Bump go.opentelemetry.io/otel in /cmd/operator-opamp-bridge (#2065) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index db87b50b5..02ed7d2fa 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,9 +10,9 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.16.0 + go.opentelemetry.io/otel v1.17.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 - go.opentelemetry.io/otel/metric v1.16.0 + go.opentelemetry.io/otel/metric v1.17.0 go.opentelemetry.io/otel/sdk v1.16.0 go.opentelemetry.io/otel/sdk/metric v0.39.0 go.uber.org/multierr v1.11.0 @@ -68,7 +68,7 @@ require ( go.opentelemetry.io/collector/featuregate v0.75.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.opentelemetry.io/otel/trace v1.17.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index f6cd3c061..93ff207a0 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -281,8 +281,8 @@ go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73R go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= +go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= +go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVznctQ9V6KK7Vq6CjmYXJ7DeSs4E= @@ -291,14 +291,14 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 h1:IZX go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0/go.mod h1:xY111jIZtWb+pUUgT4UiiSonAaY2cD2Ts5zvuKLki3o= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= +go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= +go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= +go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= +go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= From e1b03056dfdafb1afb31d1679ddf004214f6b74c Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 29 Aug 2023 13:49:54 +0200 Subject: [PATCH 0988/1234] Avoid rerunning the pod mutator for the instrumentation injection more than one time (#2048) * Avoid running the instrumentation pod mutator for already instrumented pods Signed-off-by: Israel Blancas * Add missing changelog Signed-off-by: Israel Blancas * Fix E2E tests Signed-off-by: Israel Blancas * Apply changes requested in code review Signed-off-by: Israel Blancas * Add unit test for hte golang and env variable situations Signed-off-by: Israel Blancas * Fix lint Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...ion-pod-mutator-for-instrumented-pods.yaml | 16 +++++++++ pkg/instrumentation/helper.go | 18 +++++++++- pkg/instrumentation/helper_test.go | 36 +++++++++++++++++++ .../00-install-collector.yaml | 9 +++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100755 .chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml diff --git a/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml b/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml new file mode 100755 index 000000000..0efb1d8f3 --- /dev/null +++ b/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Avoid running the auto-instrumentation pod mutator for pods already auto-instrumented" + +# One or more tracking issues related to the change +issues: [1366] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 81c01652b..adb4b6186 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -16,6 +16,9 @@ package instrumentation import ( corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) // Calculate if we already inject InitContainers. @@ -35,11 +38,24 @@ func isAutoInstrumentationInjected(pod corev1.Pod) bool { return true } } - // Go uses a side car + for _, cont := range pod.Spec.Containers { + // Go uses a sidecar if cont.Name == sideCarName { return true } + + // This environment variable is set in the sidecar and in the + // collector containers. We look for it in any container that is not + // the sidecar container to check if we already injected the + // instrumentation or not + if cont.Name != naming.Container() { + for _, envVar := range cont.Env { + if envVar.Name == constants.EnvNodeName { + return true + } + } + } } return false } diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go index b2f37d1c0..9ed445ff4 100644 --- a/pkg/instrumentation/helper_test.go +++ b/pkg/instrumentation/helper_test.go @@ -19,6 +19,8 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) func TestInitContainerMissing(t *testing.T) { @@ -95,6 +97,40 @@ func TestAutoInstrumentationInjected(t *testing.T) { }, expected: true, }, + { + name: "AutoInstrumentation_Already_Inject_go", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{}, + Containers: []corev1.Container{ + { + Name: sideCarName, + }, + }, + }, + }, + expected: true, + }, + { + name: "AutoInstrumentation_Already_Inject_no_init_containers", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{}, + Containers: []corev1.Container{ + { + Name: "my-app", + Env: []corev1.EnvVar{ + { + Name: constants.EnvNodeName, + Value: "value", + }, + }, + }, + }, + }, + }, + expected: true, + }, { name: "AutoInstrumentation_Absent_1", pod: corev1.Pod{ diff --git a/tests/e2e/instrumentation-sdk/00-install-collector.yaml b/tests/e2e/instrumentation-sdk/00-install-collector.yaml index f8e1e98e0..b03a72e60 100644 --- a/tests/e2e/instrumentation-sdk/00-install-collector.yaml +++ b/tests/e2e/instrumentation-sdk/00-install-collector.yaml @@ -21,3 +21,12 @@ spec: receivers: [otlp] processors: [] exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite From 2d58edb60cc657314054f449d33ddf77bc700fdb Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 29 Aug 2023 14:32:25 +0200 Subject: [PATCH 0989/1234] Use Monitoring OLM category (#2062) Signed-off-by: Pavol Loffay Co-authored-by: Ben B --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 +- .../bases/opentelemetry-operator.clusterserviceversion.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 64d5b2402..34231b32c 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -28,7 +28,7 @@ metadata: } ] capabilities: Deep Insights - categories: Logging & Tracing + categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2023-08-18T14:30:49Z" diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index cfeef3041..1e463adcb 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -4,7 +4,7 @@ metadata: annotations: alm-examples: '[]' capabilities: Deep Insights - categories: Logging & Tracing + categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" From b04cb0fc8c0d1fb2bf861a690c4ca033e45b15f8 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 31 Aug 2023 16:21:23 +0200 Subject: [PATCH 0990/1234] Limit auto-instrumentation volume size (#2045) * Make OpenShift Route work with gRPC receivers (#2028) * Make OpenShift Route work with gRPC receivers Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/limit-volume-inst.yaml | 16 ++++++ apis/v1alpha1/instrumentation_types.go | 29 ++++++++++ apis/v1alpha1/zz_generated.deepcopy.go | 35 ++++++++++++ .../opentelemetry.io_instrumentations.yaml | 56 +++++++++++++++++++ .../opentelemetry.io_instrumentations.yaml | 56 +++++++++++++++++++ docs/api.md | 49 ++++++++++++++++ pkg/instrumentation/apachehttpd.go | 8 ++- pkg/instrumentation/apachehttpd_test.go | 40 +++++++++---- pkg/instrumentation/dotnet.go | 4 +- pkg/instrumentation/dotnet_test.go | 8 ++- pkg/instrumentation/helper.go | 10 ++++ pkg/instrumentation/javaagent.go | 4 +- pkg/instrumentation/javaagent_test.go | 8 ++- pkg/instrumentation/nodejs.go | 4 +- pkg/instrumentation/nodejs_test.go | 8 ++- pkg/instrumentation/podmutator_test.go | 24 ++++++-- pkg/instrumentation/python.go | 4 +- pkg/instrumentation/python_test.go | 16 ++++-- pkg/instrumentation/sdk_test.go | 26 +++++++-- 19 files changed, 367 insertions(+), 38 deletions(-) create mode 100755 .chloggen/limit-volume-inst.yaml diff --git a/.chloggen/limit-volume-inst.yaml b/.chloggen/limit-volume-inst.yaml new file mode 100755 index 000000000..6a2f3a32a --- /dev/null +++ b/.chloggen/limit-volume-inst.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Limit auto-instrumentation emptydir volume size + +# One or more tracking issues related to the change +issues: [2044] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 101d99f40..c836e1cd8 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -16,6 +16,7 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -119,6 +120,10 @@ type Java struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines java specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -136,6 +141,10 @@ type NodeJS struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines nodejs specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -153,6 +162,10 @@ type Python struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines python specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -170,6 +183,10 @@ type DotNet struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines DotNet specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -185,6 +202,10 @@ type Go struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines Go specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -202,6 +223,10 @@ type ApacheHttpd struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. @@ -234,6 +259,10 @@ type Nginx struct { // +optional Image string `json:"image,omitempty"` + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 150Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + // Env defines Nginx specific env vars. There are four layers for env vars' definitions and // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. // If the former var had been defined, then the other vars would be ignored. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 7bbb4f748..8bb377dcb 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -30,6 +30,11 @@ import ( // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -107,6 +112,11 @@ func (in *AutoscalerSpec) DeepCopy() *AutoscalerSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DotNet) DeepCopyInto(out *DotNet) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -145,6 +155,11 @@ func (in *Exporter) DeepCopy() *Exporter { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Go) DeepCopyInto(out *Go) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -314,6 +329,11 @@ func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Java) DeepCopyInto(out *Java) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -372,6 +392,11 @@ func (in *MetricsConfigSpec) DeepCopy() *MetricsConfigSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Nginx) DeepCopyInto(out *Nginx) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -402,6 +427,11 @@ func (in *Nginx) DeepCopy() *Nginx { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeJS) DeepCopyInto(out *NodeJS) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) @@ -818,6 +848,11 @@ func (in *Probe) DeepCopy() *Probe { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Python) DeepCopyInto(out *Python) { *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 817eacb1e..8df533951 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -328,6 +328,14 @@ spec: description: Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 type: string + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object dotnet: description: DotNet defines configuration for DotNet auto-instrumentation. @@ -487,6 +495,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object env: description: Env defines common env vars. @@ -756,6 +772,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object java: description: Java defines configuration for java auto-instrumentation. @@ -916,6 +940,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object nginx: description: Nginx defines configuration for Nginx auto-instrumentation. @@ -1188,6 +1220,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. @@ -1347,6 +1387,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object propagators: description: Propagators defines inter-process context propagation @@ -1523,6 +1571,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object resource: description: Resource defines the configuration for the resource attributes, diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index cc170b110..8708a1830 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -326,6 +326,14 @@ spec: description: Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 type: string + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object dotnet: description: DotNet defines configuration for DotNet auto-instrumentation. @@ -485,6 +493,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object env: description: Env defines common env vars. @@ -754,6 +770,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object java: description: Java defines configuration for java auto-instrumentation. @@ -914,6 +938,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object nginx: description: Nginx defines configuration for Nginx auto-instrumentation. @@ -1186,6 +1218,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. @@ -1345,6 +1385,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object propagators: description: Propagators defines inter-process context propagation @@ -1521,6 +1569,14 @@ spec: resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object resource: description: Resource defines the configuration for the resource attributes, diff --git a/docs/api.md b/docs/api.md index ad00221c4..8406d5775 100644 --- a/docs/api.md +++ b/docs/api.md @@ -231,6 +231,13 @@ ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -833,6 +840,13 @@ DotNet defines configuration for DotNet auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -1462,6 +1476,13 @@ Go defines configuration for Go auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -1818,6 +1839,13 @@ Java defines configuration for java auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -2188,6 +2216,13 @@ Nginx defines configuration for Nginx auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -2790,6 +2825,13 @@ NodeJS defines configuration for nodejs auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false @@ -3146,6 +3188,13 @@ Python defines configuration for python auto-instrumentation. Resources describes the compute resource requirements.
false + + volumeLimitSize + int or string + + VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ + false diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index 60922bccf..18be9ed34 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -79,7 +79,9 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(apacheSpec.VolumeSizeLimit), + }, }}) apacheConfDir := getApacheConfDir(apacheSpec.ConfigPath) @@ -136,7 +138,9 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(apacheSpec.VolumeSizeLimit), + }, }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index 74c766129..eeca7a2e9 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -49,13 +49,17 @@ func TestInjectApacheHttpdagent(t *testing.T) { { Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -138,13 +142,17 @@ func TestInjectApacheHttpdagent(t *testing.T) { { Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -228,13 +236,17 @@ func TestInjectApacheHttpdagent(t *testing.T) { { Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -323,13 +335,17 @@ func TestInjectApacheHttpdagent(t *testing.T) { { Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -430,13 +446,17 @@ func TestInjectApacheHttpdagentUnknownNamespace(t *testing.T) { { Name: apacheAgentConfigVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: apacheAgentVolume, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 8d44e993f..7473b54c5 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -99,7 +99,9 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(dotNetSpec.VolumeSizeLimit), + }, }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 5855f100e..9f4cc9e29 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -48,7 +48,9 @@ func TestInjectDotNetSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -151,7 +153,9 @@ func TestInjectDotNetSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index adb4b6186..91d9ba376 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -16,11 +16,14 @@ package instrumentation import ( corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) +var defaultSize = resource.MustParse("150Mi") + // Calculate if we already inject InitContainers. func isInitContainerMissing(pod corev1.Pod) bool { for _, initContainer := range pod.Spec.InitContainers { @@ -59,3 +62,10 @@ func isAutoInstrumentationInjected(pod corev1.Pod) bool { } return false } + +func volumeSize(quantity *resource.Quantity) *resource.Quantity { + if quantity == nil { + return &defaultSize + } + return quantity +} diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 9c3ba1238..fd2448df6 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -62,7 +62,9 @@ func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1. pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(javaSpec.VolumeSizeLimit), + }, }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index f20aa1dc7..643ea8ff9 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -48,7 +48,9 @@ func TestInjectJavaagent(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -106,7 +108,9 @@ func TestInjectJavaagent(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 427c7a763..f84a50573 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -62,7 +62,9 @@ func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (cor pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(nodeJSSpec.VolumeSizeLimit), + }, }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 95a072885..abf43f2d3 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -48,7 +48,9 @@ func TestInjectNodeJSSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -106,7 +108,9 @@ func TestInjectNodeJSSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 4a3922157..624b11935 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -133,7 +133,9 @@ func TestMutatePod(t *testing.T) { { Name: "opentelemetry-auto-instrumentation", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -402,7 +404,9 @@ func TestMutatePod(t *testing.T) { { Name: "opentelemetry-auto-instrumentation", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -660,7 +664,9 @@ func TestMutatePod(t *testing.T) { { Name: "opentelemetry-auto-instrumentation", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -926,7 +932,9 @@ func TestMutatePod(t *testing.T) { { Name: "opentelemetry-auto-instrumentation", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -1414,13 +1422,17 @@ func TestMutatePod(t *testing.T) { { Name: "otel-apache-conf-dir", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: "otel-apache-agent", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 47c7ff206..8964d5f8f 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -105,7 +105,9 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: volumeSize(pythonSpec.VolumeSizeLimit), + }, }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 787afd2c9..3f383ef7a 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -48,7 +48,9 @@ func TestInjectPythonSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -122,7 +124,9 @@ func TestInjectPythonSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -197,7 +201,9 @@ func TestInjectPythonSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -271,7 +277,9 @@ func TestInjectPythonSDK(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 915948d4d..6c762ca9a 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -31,6 +31,8 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) +var defaultVolumeLimitSize = resource.MustParse("150Mi") + var testResourceRequirements = corev1.ResourceRequirements{ Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("500m"), @@ -522,7 +524,9 @@ func TestInjectJava(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -624,7 +628,9 @@ func TestInjectNodeJS(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -726,7 +732,9 @@ func TestInjectPython(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -842,7 +850,9 @@ func TestInjectDotNet(t *testing.T) { { Name: volumeName, VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, @@ -1252,13 +1262,17 @@ func TestInjectApacheHttpd(t *testing.T) { { Name: "otel-apache-conf-dir", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, { Name: "otel-apache-agent", VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{}, + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, }, }, }, From 6ff9662e68467f77b606a23e56363febfb62f20b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:45:47 +0200 Subject: [PATCH 0991/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 1 update (#2077) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.0...v0.16.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 4 ++-- cmd/operator-opamp-bridge/go.sum | 33 ++++---------------------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 02ed7d2fa..fb957e962 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/apimachinery v0.28.1 k8s.io/client-go v0.28.1 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.0 + sigs.k8s.io/controller-runtime v0.16.1 ) require ( @@ -88,7 +88,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.1 // indirect k8s.io/apiextensions-apiserver v0.28.0 // indirect - k8s.io/component-base v0.28.0 // indirect + k8s.io/component-base v0.28.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 93ff207a0..c067fa2cb 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -33,16 +33,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -61,8 +57,6 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -80,7 +74,6 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -141,7 +134,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -176,7 +168,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= @@ -185,7 +176,6 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -242,10 +232,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -269,9 +257,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -279,8 +264,6 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= @@ -289,8 +272,6 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVzn go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0/go.mod h1:UqL5mZ3qs6XYhDnZaW1Ps4upD+PX6LipH40AoeuIlwU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 h1:IZXpCEtI7BbX01DRQEWTGDkvjMB6hEhiEZXS+eg2YqY= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0/go.mod h1:xY111jIZtWb+pUUgT4UiiSonAaY2cD2Ts5zvuKLki3o= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= @@ -316,7 +297,6 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -398,7 +378,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -600,7 +579,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -623,14 +601,12 @@ k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPON k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= -k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= -k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= +k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= +k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= @@ -638,9 +614,8 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= -sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= -sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= +sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= +sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From 755c7e654a8e719a0c850cf8fd6dedb52c21115b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:47:24 +0200 Subject: [PATCH 0992/1234] Bump the kubernetes group with 1 update (#2076) Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.0...v0.16.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 32 ++------------------------------ 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index d24315d27..cdcc96986 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( k8s.io/client-go v0.28.1 k8s.io/component-base v0.28.1 k8s.io/kubectl v0.28.1 - sigs.k8s.io/controller-runtime v0.16.0 + sigs.k8s.io/controller-runtime v0.16.1 ) require ( diff --git a/go.sum b/go.sum index 2328cc220..2194c948c 100644 --- a/go.sum +++ b/go.sum @@ -73,7 +73,6 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -82,14 +81,12 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= @@ -100,8 +97,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -120,8 +115,6 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -179,7 +172,6 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= @@ -236,7 +228,6 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -285,10 +276,7 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= @@ -504,7 +492,6 @@ github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -531,9 +518,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -543,19 +527,11 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= -go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= @@ -919,7 +895,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -946,14 +921,12 @@ k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTK k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/apiserver v0.28.1 h1:dw2/NKauDZCnOUAzIo2hFhtBRUo6gQK832NV8kuDbGM= k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.28.1 h1:QLNTIc0k7Yebkt9yobj9Y9qBoRCMB4dq+pFCxVXVBnY= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.28.1 h1:jAq4yKEqQL+fwkWcEsUWxhJ7uIRcOYQraJxx4SyAMTY= @@ -963,9 +936,8 @@ k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= -sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= -sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= +sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= +sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 29e4d3833926283c223aba117b842855d107d29a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:47:53 +0200 Subject: [PATCH 0993/1234] Bump the kubernetes group in /cmd/otel-allocator with 1 update (#2075) Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.0...v0.16.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 31 ++++--------------------------- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index efbaa6143..d58f0bee1 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/apimachinery v0.28.1 k8s.io/client-go v0.28.1 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.0 + sigs.k8s.io/controller-runtime v0.16.1 ) require ( @@ -196,7 +196,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.28.0 // indirect - k8s.io/component-base v0.28.0 // indirect + k8s.io/component-base v0.28.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index b6a61479a..bcc3534c4 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -72,7 +72,6 @@ github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -83,7 +82,6 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -110,7 +108,6 @@ github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0ma github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -132,8 +129,6 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -331,7 +326,6 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/cel-go v0.16.0 h1:DG9YQ8nFCFXAs/FDDwBxmL1tpKNrdlGUM9U3537bX/Y= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -381,10 +375,7 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= @@ -647,7 +638,6 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -689,9 +679,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -704,20 +691,14 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 h1:pginetY7+onl4qN1vl0xW/V/v6OBZ0vVdH+esuJgvmM= go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 h1:TVQp/bboR4mhZSav+MdgXB8FaRho1RC8UwVn3T0vjVc= go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -1104,7 +1085,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1134,14 +1114,12 @@ k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPON k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/apiserver v0.28.0 h1:wVh7bK6Xj7hq+5ntInysTeQRAOqqFoKGUOW2yj8DXrY= k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= -k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= -k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= +k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= +k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kms v0.28.0 h1:BwJhU9qPcJhHLUcQjtelOSjYti+1/caJLr+4jHbKzTA= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= @@ -1150,9 +1128,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= -sigs.k8s.io/controller-runtime v0.16.0 h1:5koYaaRVBHDr0LZAJjO5dWzUjMsh6cwa7q1Mmusrdvk= -sigs.k8s.io/controller-runtime v0.16.0/go.mod h1:77DnuwA8+J7AO0njzv3wbNlMOnGuLrwFr8JPNwx3J7g= +sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= +sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 583a064abcaeb7aa884cfc2825fb1b84698464d9 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 1 Sep 2023 10:53:02 +0200 Subject: [PATCH 0994/1234] Allow copy of files for non-root user (#2069) Signed-off-by: Israel Blancas --- ...e-httpd-autoinstrumentation-for-non-root.yaml | 16 ++++++++++++++++ autoinstrumentation/apache-httpd/Dockerfile | 1 + 2 files changed, 17 insertions(+) create mode 100755 .chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml diff --git a/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml b/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml new file mode 100755 index 000000000..fed0105e5 --- /dev/null +++ b/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow the usage of the Apache HTTPD autoinstrumentation to be run as non-root user. Change the files permission to allow their copy from a non-root user. + +# One or more tracking issues related to the change +issues: [2068] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/apache-httpd/Dockerfile b/autoinstrumentation/apache-httpd/Dockerfile index 748326b57..af9c12e6c 100644 --- a/autoinstrumentation/apache-httpd/Dockerfile +++ b/autoinstrumentation/apache-httpd/Dockerfile @@ -20,6 +20,7 @@ FROM alpine:latest COPY --from=agent /opt/opentelemetry/agent/opentelemetry-webserver-sdk /opt/opentelemetry +RUN chmod 775 -R /opt/opentelemetry/ RUN chmod a+w /opt/opentelemetry/logs CMD ["cat", "Just delivering the Opentelemetry Apache/Nginx agent"] \ No newline at end of file From 763cc19c0205b7abcecf6167c49818ec801b0bad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 11:21:35 +0200 Subject: [PATCH 0995/1234] Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#2066) Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.39.0 to 0.40.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/sdk/metric/v0.39.0...sdk/metric/v0.40.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 22 +- cmd/operator-opamp-bridge/go.sum | 395 ++----------------------------- 2 files changed, 31 insertions(+), 386 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index fb957e962..47f4bf917 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -11,10 +11,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/otel v1.17.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 go.opentelemetry.io/otel/metric v1.17.0 - go.opentelemetry.io/otel/sdk v1.16.0 - go.opentelemetry.io/otel/sdk/metric v0.39.0 + go.opentelemetry.io/otel/sdk v1.17.0 + go.opentelemetry.io/otel/sdk/metric v0.40.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -47,7 +47,7 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -66,10 +66,9 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.75.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 // indirect go.opentelemetry.io/otel/trace v1.17.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/net v0.13.0 // indirect @@ -80,11 +79,10 @@ require ( golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect - google.golang.org/grpc v1.55.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/grpc v1.57.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.1 // indirect k8s.io/apiextensions-apiserver v0.28.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index c067fa2cb..1922f3551 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -1,85 +1,23 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= @@ -99,81 +37,29 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -181,8 +67,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -219,27 +103,21 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -250,39 +128,29 @@ github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+Kd github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 h1:f6BwB2OACc3FCbYVznctQ9V6KK7Vq6CjmYXJ7DeSs4E= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0/go.mod h1:UqL5mZ3qs6XYhDnZaW1Ps4upD+PX6LipH40AoeuIlwU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0 h1:IZXpCEtI7BbX01DRQEWTGDkvjMB6hEhiEZXS+eg2YqY= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.39.0/go.mod h1:xY111jIZtWb+pUUgT4UiiSonAaY2cD2Ts5zvuKLki3o= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 h1:MZbjiZeMmn5wFMORhozpouGKDxj9POHTuU5UA8msBQk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0/go.mod h1:C7tOYVCJmrDTCwxNny0MuUtnDIR3032vFHYke0F2ZrU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 h1:SZaSbubADNhH2Gxm+1GaZ/cFsGiYefZoodMMX79AOd4= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0/go.mod h1:N65FzQDfQH7NY7umgb0U+7ypGKVYKwwE24L6KXT4OA8= go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/sdk/metric v0.39.0 h1:Kun8i1eYf48kHH83RucG93ffz0zGV1sh46FAScOTuDI= -go.opentelemetry.io/otel/sdk/metric v0.39.0/go.mod h1:piDIRgjcK7u0HCL5pCA4e74qpK/jk3NiUoAHATVAmiI= +go.opentelemetry.io/otel/sdk v1.17.0 h1:FLN2X66Ke/k5Sg3V623Q7h7nt3cHXaW1FOvKKrW0IpE= +go.opentelemetry.io/otel/sdk v1.17.0/go.mod h1:U87sE0f5vQB7hwUoW98pW5Rz4ZDuCFBZFNUBlSgmDFQ= +go.opentelemetry.io/otel/sdk/metric v0.40.0 h1:qOM29YaGcxipWjL5FzpyZDpCYrDREvX0mVlmXdOjCHU= +go.opentelemetry.io/otel/sdk/metric v0.40.0/go.mod h1:dWxHtdzdJvg+ciJUKLTKwrMe5P6Dv3FyDbh8UkfgkVs= go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= @@ -293,117 +161,33 @@ go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -415,60 +199,17 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= @@ -478,109 +219,25 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e h1:Ao9GzfUMPH3zjVfzXG5rlWlk+Q8MXWKwWpwVQE1MXfw= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -588,13 +245,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= @@ -611,9 +261,6 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5Ohx k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 2bdbe77ba95fdd8ac143e334ac360f8c1ecc67b3 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 4 Sep 2023 13:56:02 +0200 Subject: [PATCH 0996/1234] Make OpenShift routes work with missing hostname (#2074) * Make OpenShift routes work with missing hostname Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * Fix the changelog entry Signed-off-by: Pavol Loffay * Update .chloggen/route-use-defaults.yaml Co-authored-by: Israel Blancas --------- Signed-off-by: Pavol Loffay Co-authored-by: Ben B Co-authored-by: Israel Blancas --- .chloggen/route-use-defaults.yaml | 16 +++++++ internal/manifests/collector/route.go | 11 +++-- internal/manifests/collector/route_test.go | 42 +++++++++++++++++++ tests/e2e-openshift/route/00-assert.yaml | 25 ++++++++++- tests/e2e-openshift/route/00-install.yaml | 2 +- .../route/01-report-empty-otlphttp-spans.yaml | 9 ++++ ...ml => 01-report-empty-otlphttp-spans.yaml} | 0 7 files changed, 96 insertions(+), 9 deletions(-) create mode 100755 .chloggen/route-use-defaults.yaml create mode 100644 tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml rename tests/e2e/ingress-subdomains/{01-report-http-spans.yaml => 01-report-empty-otlphttp-spans.yaml} (100%) diff --git a/.chloggen/route-use-defaults.yaml b/.chloggen/route-use-defaults.yaml new file mode 100755 index 000000000..f14593125 --- /dev/null +++ b/.chloggen/route-use-defaults.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Make OpenShift routes work with missing hostname + +# One or more tracking issues related to the change +issues: [2074] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: If the Ingress hostname is not specified OpenShift route hostname is set to `--route--basedomain`. diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index d84fa1854..d8e8899a9 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -66,11 +66,11 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr routes := make([]*routev1.Route, len(ports)) for i, p := range ports { portName := naming.PortName(p.Name, p.Port) - path := "/" - // passthrough termination does not support paths - if otelcol.Spec.Ingress.Route.Termination == v1alpha1.TLSRouteTerminationTypePassthrough { - path = "" + host := "" + if otelcol.Spec.Ingress.Hostname != "" { + host = fmt.Sprintf("%s.%s", portName, otelcol.Spec.Ingress.Hostname) } + routes[i] = &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ Name: naming.Route(otelcol.Name, p.Name), @@ -83,8 +83,7 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr }, }, Spec: routev1.RouteSpec{ - Host: fmt.Sprintf("%s.%s", portName, otelcol.Spec.Ingress.Hostname), - Path: path, + Host: host, To: routev1.RouteTargetReference{ Kind: "Service", Name: naming.Service(otelcol.Name), diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 2accf0310..395f54c67 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -21,6 +21,7 @@ import ( routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -137,6 +138,47 @@ func TestDesiredRoutes(t *testing.T) { }, }, got) }) + t.Run("hostname is set", func(t *testing.T) { + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = "test" + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Hostname: "example.com", + Type: v1alpha1.IngressTypeRoute, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, + } + + routes := Routes(params.Config, params.Log, params.Instance) + require.Equal(t, 3, len(routes)) + assert.Equal(t, "web.example.com", routes[0].Spec.Host) + assert.Equal(t, "otlp-grpc.example.com", routes[1].Spec.Host) + assert.Equal(t, "otlp-test-grpc.example.com", routes[2].Spec.Host) + }) + t.Run("hostname is not set", func(t *testing.T) { + params, err := newParams("something:tag", testFileIngress) + if err != nil { + t.Fatal(err) + } + + params.Instance.Namespace = "test" + params.Instance.Spec.Ingress = v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeRoute, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, + } + + routes := Routes(params.Config, params.Log, params.Instance) + require.Equal(t, 3, len(routes)) + assert.Equal(t, "", routes[0].Spec.Host) + assert.Equal(t, "", routes[1].Spec.Host) + assert.Equal(t, "", routes[2].Spec.Host) + }) } func TestRoutes(t *testing.T) { diff --git a/tests/e2e-openshift/route/00-assert.yaml b/tests/e2e-openshift/route/00-assert.yaml index 18f1e0265..f0366fa18 100644 --- a/tests/e2e-openshift/route/00-assert.yaml +++ b/tests/e2e-openshift/route/00-assert.yaml @@ -22,11 +22,32 @@ metadata: kind: OpenTelemetryCollector name: simplest spec: - host: otlp-grpc.example.com - path: / port: targetPort: otlp-grpc to: kind: Service name: simplest-collector wildcardPolicy: None +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + something.com: "true" + labels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-http-simplest-route + name: otlp-http-simplest-route + ownerReferences: + - apiVersion: opentelemetry.io/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: OpenTelemetryCollector + name: simplest +spec: + port: + targetPort: otlp-http + to: + kind: Service + name: simplest-collector + wildcardPolicy: None diff --git a/tests/e2e-openshift/route/00-install.yaml b/tests/e2e-openshift/route/00-install.yaml index b2f47baaf..44bc7aeca 100644 --- a/tests/e2e-openshift/route/00-install.yaml +++ b/tests/e2e-openshift/route/00-install.yaml @@ -7,7 +7,6 @@ spec: mode: "deployment" ingress: type: route - hostname: "example.com" annotations: something.com: "true" route: @@ -18,6 +17,7 @@ spec: otlp: protocols: grpc: + http: exporters: logging: diff --git a/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml b/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml new file mode 100644 index 000000000..406d66cef --- /dev/null +++ b/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml @@ -0,0 +1,9 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: | + #!/bin/bash + set -ex + # Export empty payload and check of collector accepted it with 2xx status code + otlp_http_host=$(kubectl get route otlp-http-simplest-route -n $NAMESPACE -o jsonpath='{.spec.host}') + for i in {1..40}; do curl --fail -ivX POST http://${otlp_http_host}:80/v1/traces -H "Content-Type: application/json" -d '{}' && break || sleep 1; done diff --git a/tests/e2e/ingress-subdomains/01-report-http-spans.yaml b/tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml similarity index 100% rename from tests/e2e/ingress-subdomains/01-report-http-spans.yaml rename to tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml From 8d3000ead69556f18a6d7e909468015ff636cf66 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 5 Sep 2023 12:16:16 +0200 Subject: [PATCH 0997/1234] Move the instrumentation E2E tests to their own folder (#2084) Signed-off-by: Israel Blancas --- .github/workflows/e2e.yaml | 1 + Makefile | 6 ++++++ kuttl-test-instrumentation.yaml | 5 +++++ .../instrumentation-apache-httpd/00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-apache-httpd/01-assert.yaml | 0 .../instrumentation-apache-httpd/01-install-app.yaml | 4 ++++ .../00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-apache-multicontainer/01-assert.yaml | 0 .../01-install-app.yaml | 0 .../instrumentation-apache-multicontainer/02-assert.yaml | 0 .../02-install-app.yaml | 0 .../00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-dotnet-multicontainer/01-assert.yaml | 0 .../01-install-app.yaml | 0 .../instrumentation-dotnet-multicontainer/02-assert.yaml | 0 .../02-install-app.yaml | 0 .../instrumentation-dotnet/00-install-collector.yaml | 0 .../instrumentation-dotnet/00-install-instrumentation.yaml | 0 .../instrumentation-dotnet/01-assert.yaml | 0 .../instrumentation-dotnet/01-install-app.yaml | 0 .../instrumentation-go/00-install-collector.yaml | 0 .../instrumentation-go/00-install-instrumentation.yaml | 0 .../instrumentation-go/01-add-scc.yaml | 0 .../instrumentation-go/02-assert.yaml | 0 .../instrumentation-go/02-install-app.yaml | 0 .../instrumentation-go/add-scc.sh | 0 .../instrumentation-go/scc.yaml | 0 .../00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-java-multicontainer/01-assert.yaml | 0 .../instrumentation-java-multicontainer/01-install-app.yaml | 0 .../instrumentation-java-multicontainer/02-assert.yaml | 0 .../instrumentation-java-multicontainer/02-install-app.yaml | 0 .../instrumentation-java-other-ns/01-cleanup-other-ns.yaml | 0 .../instrumentation-java-other-ns/02-install-collector.yaml | 0 .../02-install-instrumentation.yaml | 0 .../instrumentation-java-other-ns/03-assert.yaml | 0 .../instrumentation-java-other-ns/03-install-app.yaml | 0 .../instrumentation-java-other-ns/04-cleanup-other-ns.yaml | 0 .../instrumentation-java/00-install-collector.yaml | 0 .../instrumentation-java/00-install-instrumentation.yaml | 0 .../instrumentation-java/01-assert.yaml | 0 .../instrumentation-java/01-install-app.yaml | 0 .../00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-nodejs-multicontainer/01-assert.yaml | 0 .../01-install-app.yaml | 0 .../instrumentation-nodejs-multicontainer/02-assert.yaml | 0 .../02-install-app.yaml | 0 .../instrumentation-nodejs/00-install-collector.yaml | 0 .../instrumentation-nodejs/00-install-instrumentation.yaml | 0 .../instrumentation-nodejs/01-assert.yaml | 0 .../instrumentation-nodejs/01-install-app.yaml | 0 .../00-install-collector.yaml | 0 .../00-install-instrumentation.yaml | 0 .../instrumentation-python-multicontainer/01-assert.yaml | 0 .../01-install-app.yaml | 0 .../instrumentation-python-multicontainer/02-assert.yaml | 0 .../02-install-app.yaml | 0 .../instrumentation-python/00-install-collector.yaml | 0 .../instrumentation-python/00-install-instrumentation.yaml | 0 .../instrumentation-python/01-assert.yaml | 0 .../instrumentation-python/01-install-app.yaml | 0 .../instrumentation-sdk/00-install-collector.yaml | 0 .../instrumentation-sdk/00-install-instrumentation.yaml | 0 .../instrumentation-sdk/01-assert.yaml | 0 .../instrumentation-sdk/01-install-app.yaml | 0 70 files changed, 16 insertions(+) create mode 100644 kuttl-test-instrumentation.yaml rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-httpd/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-httpd/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-httpd/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-httpd/01-install-app.yaml (90%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-apache-multicontainer/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet-multicontainer/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-dotnet/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/01-add-scc.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/add-scc.sh (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-go/scc.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-multicontainer/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/01-cleanup-other-ns.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/02-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/02-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/03-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/03-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java-other-ns/04-cleanup-other-ns.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-java/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs-multicontainer/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-nodejs/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/02-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python-multicontainer/02-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-python/01-install-app.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-sdk/00-install-collector.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-sdk/00-install-instrumentation.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-sdk/01-assert.yaml (100%) rename tests/{e2e => e2e-instrumentation}/instrumentation-sdk/01-install-app.yaml (100%) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0d31f7c11..47138c296 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -29,6 +29,7 @@ jobs: - "1.28" group: - e2e + - e2e-instrumentation - e2e-upgrade - e2e-prometheuscr - e2e-autoscale diff --git a/Makefile b/Makefile index e92c52537..a61d95696 100644 --- a/Makefile +++ b/Makefile @@ -176,6 +176,12 @@ generate: controller-gen api-docs e2e: $(KUTTL) test + +# instrumentation end-to-tests +.PHONY: e2e-instrumentation +e2e-instrumentation: + $(KUTTL) test --config kuttl-test-instrumentation.yaml + # end-to-end-test for PrometheusCR E2E tests .PHONY: e2e-prometheuscr e2e-prometheuscr: diff --git a/kuttl-test-instrumentation.yaml b/kuttl-test-instrumentation.yaml new file mode 100644 index 000000000..545357c42 --- /dev/null +++ b/kuttl-test-instrumentation.yaml @@ -0,0 +1,5 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +testDirs: + - ./tests/e2e-instrumentation/ +timeout: 300 diff --git a/tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-httpd/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-httpd/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-apache-httpd/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-httpd/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml diff --git a/tests/e2e/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml similarity index 90% rename from tests/e2e/instrumentation-apache-httpd/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml index 0edb9c9e1..fcad1439a 100644 --- a/tests/e2e/instrumentation-apache-httpd/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml @@ -15,6 +15,10 @@ spec: sidecar.opentelemetry.io/inject: "true" instrumentation.opentelemetry.io/inject-apache-httpd: "true" spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 containers: - name: myapp image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml diff --git a/tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml diff --git a/tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-apache-multicontainer/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml diff --git a/tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet-multicontainer/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml diff --git a/tests/e2e/instrumentation-dotnet/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-dotnet/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml diff --git a/tests/e2e/instrumentation-dotnet/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-dotnet/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml diff --git a/tests/e2e/instrumentation-go/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-go/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-go/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-go/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-go/01-add-scc.yaml b/tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml similarity index 100% rename from tests/e2e/instrumentation-go/01-add-scc.yaml rename to tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml diff --git a/tests/e2e/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-go/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-go/02-assert.yaml diff --git a/tests/e2e/instrumentation-go/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-go/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml diff --git a/tests/e2e/instrumentation-go/add-scc.sh b/tests/e2e-instrumentation/instrumentation-go/add-scc.sh similarity index 100% rename from tests/e2e/instrumentation-go/add-scc.sh rename to tests/e2e-instrumentation/instrumentation-go/add-scc.sh diff --git a/tests/e2e/instrumentation-go/scc.yaml b/tests/e2e-instrumentation/instrumentation-go/scc.yaml similarity index 100% rename from tests/e2e/instrumentation-go/scc.yaml rename to tests/e2e-instrumentation/instrumentation-go/scc.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml diff --git a/tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-java-multicontainer/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/01-cleanup-other-ns.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/01-cleanup-other-ns.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/02-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/02-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/02-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/03-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/03-assert.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/03-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/03-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml diff --git a/tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml similarity index 100% rename from tests/e2e/instrumentation-java-other-ns/04-cleanup-other-ns.yaml rename to tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml diff --git a/tests/e2e/instrumentation-java/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-java/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-java/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-java/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-java/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-java/01-assert.yaml diff --git a/tests/e2e/instrumentation-java/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-java/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml diff --git a/tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs-multicontainer/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml diff --git a/tests/e2e/instrumentation-nodejs/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-nodejs/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml diff --git a/tests/e2e/instrumentation-nodejs/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-nodejs/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/02-assert.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml diff --git a/tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-python-multicontainer/02-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml diff --git a/tests/e2e/instrumentation-python/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-python/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-python/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-python/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-python/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-python/01-assert.yaml diff --git a/tests/e2e/instrumentation-python/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-python/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml diff --git a/tests/e2e/instrumentation-sdk/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml similarity index 100% rename from tests/e2e/instrumentation-sdk/00-install-collector.yaml rename to tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml diff --git a/tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml similarity index 100% rename from tests/e2e/instrumentation-sdk/00-install-instrumentation.yaml rename to tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml diff --git a/tests/e2e/instrumentation-sdk/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml similarity index 100% rename from tests/e2e/instrumentation-sdk/01-assert.yaml rename to tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml diff --git a/tests/e2e/instrumentation-sdk/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml similarity index 100% rename from tests/e2e/instrumentation-sdk/01-install-app.yaml rename to tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml From a7a9c9506fa84695981bfd590c35e37bdd904220 Mon Sep 17 00:00:00 2001 From: Christian Mergenthaler <377953+cmergenthaler@users.noreply.github.com> Date: Tue, 5 Sep 2023 17:19:47 +0200 Subject: [PATCH 0998/1234] Fixes reconciling Internal Traffic Policy changes and adds test (#2060) * Fixes reconciling Internal Traffic Policy changes and add tests * add changelog * issue in changelog --- ...ix-otel-collector-service-reconciliation.yaml | 16 ++++++++++++++++ pkg/collector/reconcile/service.go | 1 + pkg/collector/reconcile/service_test.go | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100755 .chloggen/fix-otel-collector-service-reconciliation.yaml diff --git a/.chloggen/fix-otel-collector-service-reconciliation.yaml b/.chloggen/fix-otel-collector-service-reconciliation.yaml new file mode 100755 index 000000000..7a8c250c1 --- /dev/null +++ b/.chloggen/fix-otel-collector-service-reconciliation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fixes reconciling otel-collector service's internal traffic policy changes. + +# One or more tracking issues related to the change +issues: [2061] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go index b9284f3c8..37b999850 100644 --- a/pkg/collector/reconcile/service.go +++ b/pkg/collector/reconcile/service.go @@ -104,6 +104,7 @@ func expectedServices(ctx context.Context, params manifests.Params, expected []* } updated.Spec.Ports = desired.Spec.Ports updated.Spec.Selector = desired.Spec.Selector + updated.Spec.InternalTrafficPolicy = desired.Spec.InternalTrafficPolicy patch := client.MergeFrom(existing) diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go index 198648ab5..3fb0323ca 100644 --- a/pkg/collector/reconcile/service_test.go +++ b/pkg/collector/reconcile/service_test.go @@ -78,6 +78,22 @@ func TestExpectedServices(t *testing.T) { assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) assert.Equal(t, "Newest", actual.Spec.Selector["app.kubernetes.io/version"]) }) + t.Run("should update service on internal traffic policy change", func(t *testing.T) { + serviceInstance := service("test-collector", params().Instance.Spec.Ports) + createObjectIfNotExists(t, "test-collector", serviceInstance) + + newService := serviceWithInternalTrafficPolicy("test-collector", params().Instance.Spec.Ports, v1.ServiceInternalTrafficPolicyLocal) + err := expectedServices(context.Background(), params(), []*v1.Service{newService}) + assert.NoError(t, err) + + actual := v1.Service{} + exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) + + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) + assert.Equal(t, v1.ServiceInternalTrafficPolicyLocal, *actual.Spec.InternalTrafficPolicy) + }) } func TestDeleteServices(t *testing.T) { From ddc83f27132f3b2040c8b7ea71c171bde1cb152d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Sep 2023 11:20:47 -0400 Subject: [PATCH 0999/1234] Bump actions/checkout from 3 to 4 (#2083) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/auto-update-java-agent.yaml | 4 ++-- .github/workflows/changelog.yaml | 2 +- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 2 +- .../workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/reusable-operator-hub-release.yaml | 4 ++-- .github/workflows/scorecard.yaml | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/auto-update-java-agent.yaml b/.github/workflows/auto-update-java-agent.yaml index 6677de1a0..c6df7768e 100644 --- a/.github/workflows/auto-update-java-agent.yaml +++ b/.github/workflows/auto-update-java-agent.yaml @@ -14,7 +14,7 @@ jobs: latest-version: ${{ steps.check-versions.outputs.latest-version }} already-opened: ${{ steps.check-versions.outputs.already-opened }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: check-versions name: Check versions @@ -49,7 +49,7 @@ jobs: needs: - check-versions steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update version env: diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 2bbc7301c..396886c52 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Go diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index de829d719..3ed227297 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -21,7 +21,7 @@ jobs: go-version: "1.21" - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "basic checks" run: make ci @@ -35,7 +35,7 @@ jobs: with: go-version: "1.21" - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/cache@v3 with: @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 47138c296..a7df52f47 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -46,7 +46,7 @@ jobs: run: go install sigs.k8s.io/kind@v${KIND_VERSION} - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 5da53ea34..836d62c8d 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: echo "VERSION=$(cat autoinstrumentation/apache-httpd/version.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 47e774a29..9cf052191 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: echo "VERSION=$(cat autoinstrumentation/dotnet/version.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 0c97b956c..941770f67 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: echo "VERSION=$(cat autoinstrumentation/java/version.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index cb5a465a7..5ae1ae627 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: echo VERSION=$(cat autoinstrumentation/nodejs/package.json | jq -r '.dependencies."@opentelemetry/sdk-node"') >> $GITHUB_ENV diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 1ba357a29..dd7f4c22e 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: echo VERSION=$(head -n 1 autoinstrumentation/python/requirements.txt | cut -d '=' -f3) >> $GITHUB_ENV diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 8c56d9aa6..496c68abe 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -12,7 +12,7 @@ jobs: name: Publish container images runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Unshallow run: git fetch --prune --unshallow diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index d8943de7a..eb9824dc2 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker meta id: docker_meta diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 7934bb6eb..c04abb552 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: | diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 1b03c5546..26408ac21 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Read version run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f0214129f..02dc6cec8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,7 +12,7 @@ jobs: with: go-version: "1.21" - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: "generate release resources" run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml index cc666db8a..e6e90f744 100644 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ b/.github/workflows/reusable-operator-hub-release.yaml @@ -37,13 +37,13 @@ jobs: --force - name: Checkout operatorhub repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: opentelemetrybot/${{ inputs.repo }} token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - name: Checkout opentelemetry-operator to tmp/ directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: open-telemetry/opentelemetry-operator token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 4aa55e31d..4d7cecc94 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -37,7 +37,7 @@ jobs: run: go install sigs.k8s.io/kind@v${KIND_VERSION} - name: Check out code into the Go module directory - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "install kuttl and kind" run: ./hack/install-kuttl.sh From 4d978d46b2c509002d57cfcb2f1dbc9fc732baac Mon Sep 17 00:00:00 2001 From: Jonathan Yu Date: Tue, 5 Sep 2023 08:22:23 -0700 Subject: [PATCH 1000/1234] Update godoc for pod and container security context (#1279) * chore: update godoc for pod and container security context Add detailed description of SecurityContext and PodSecurityContext fields. * make bundle * re-run make api-docs --- apis/v1alpha1/opentelemetrycollector_types.go | 19 +++++++++++++++++-- ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 10 +++++----- ...ntelemetry.io_opentelemetrycollectors.yaml | 10 +++++----- docs/api.md | 8 ++++---- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index c95d64e43..e572afe59 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -123,10 +123,25 @@ type OpenTelemetryCollectorSpec struct { // // +optional Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"` - // SecurityContext will be set as the container security context. + // SecurityContext configures the container security context for + // the opentelemetry-collector container. + // + // In deployment, daemonset, or statefulset mode, this controls + // the security context settings for the primary application + // container. + // + // In sidecar mode, this controls the security context for the + // injected sidecar container. + // // +optional SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` - + // PodSecurityContext configures the pod security context for the + // opentelemetry-collector pod, when running as a deployment, daemonset, + // or statefulset. + // + // In sidecar mode, the opentelemetry-operator will ignore this setting. + // + // +optional PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` // PodAnnotations is the set of annotations that will be attached to // Collector and Target Allocator pods. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 34231b32c..3d29a7ce0 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-08-18T14:30:49Z" + createdAt: "2023-08-28T17:54:06Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index c0b671a75..b8ea7b1ec 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3703,9 +3703,9 @@ spec: attached to Collector and Target Allocator pods. type: object podSecurityContext: - description: PodSecurityContext holds pod-level security attributes - and common container settings. Some fields are also present in container.securityContext. Field - values of container. + description: PodSecurityContext configures the pod security context + for the opentelemetry-collector pod, when running as a deployment, + daemonset, or statefulset. properties: fsGroup: description: "A special supplemental group that applies to all @@ -3928,8 +3928,8 @@ spec: type: object type: object securityContext: - description: SecurityContext will be set as the container security - context. + description: SecurityContext configures the container security context + for the opentelemetry-collector container. properties: allowPrivilegeEscalation: description: AllowPrivilegeEscalation controls whether a process diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 708270faa..efef24c32 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3700,9 +3700,9 @@ spec: attached to Collector and Target Allocator pods. type: object podSecurityContext: - description: PodSecurityContext holds pod-level security attributes - and common container settings. Some fields are also present in container.securityContext. Field - values of container. + description: PodSecurityContext configures the pod security context + for the opentelemetry-collector pod, when running as a deployment, + daemonset, or statefulset. properties: fsGroup: description: "A special supplemental group that applies to all @@ -3925,8 +3925,8 @@ spec: type: object type: object securityContext: - description: SecurityContext will be set as the container security - context. + description: SecurityContext configures the container security context + for the opentelemetry-collector container. properties: allowPrivilegeEscalation: description: AllowPrivilegeEscalation controls whether a process diff --git a/docs/api.md b/docs/api.md index 8406d5775..0782a6b6e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3813,7 +3813,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. podSecurityContext object - PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.
+ PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, daemonset, or statefulset.
false @@ -3850,7 +3850,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. securityContext object - SecurityContext will be set as the container security context.
+ SecurityContext configures the container security context for the opentelemetry-collector container.
false @@ -11471,7 +11471,7 @@ Metrics defines the metrics configuration for operands. -PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container. +PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, daemonset, or statefulset. @@ -11870,7 +11870,7 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. -SecurityContext will be set as the container security context. +SecurityContext configures the container security context for the opentelemetry-collector container.
From a43879e2f971553bfd62ed0d1034666c076c32e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 7 Sep 2023 16:48:29 +0200 Subject: [PATCH 1001/1234] .NET auto-instrumentation include musl in docker image (#2087) * [.NET AutoInstrumentation] Docker image includes musl library * Replace ADD by get command * Remove redundant files from docker image * Execute all commands in one layer * Fix passing arguments * revert to ADD as wget is failing on CI * Typo fix Co-authored-by: Paulo Janotti --------- Co-authored-by: Paulo Janotti --- autoinstrumentation/dotnet/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile index a9ffff3b5..29527b2af 100644 --- a/autoinstrumentation/dotnet/Dockerfile +++ b/autoinstrumentation/dotnet/Dockerfile @@ -5,7 +5,8 @@ # - Following environment variables are injected to the application container to enable the auto-instrumentation. # CORECLR_ENABLE_PROFILING=1 # CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} -# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so +# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so # for glibc based images +# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so # for musl based images # DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps # DOTNET_SHARED_STORE=%InstallationLocation%/store # DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll @@ -20,7 +21,9 @@ ARG version WORKDIR /autoinstrumentation ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-glibc.zip . +ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-musl.zip . -RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip - -RUN chmod -R go+r . \ No newline at end of file +RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip &&\ + unzip opentelemetry-dotnet-instrumentation-linux-musl.zip "linux-musl-x64/*" -d . &&\ + rm opentelemetry-dotnet-instrumentation-linux-glibc.zip opentelemetry-dotnet-instrumentation-linux-musl.zip &&\ + chmod -R go+r . \ No newline at end of file From c91baab3dc64fe29ea024ca861a4464e59fce96e Mon Sep 17 00:00:00 2001 From: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Date: Thu, 7 Sep 2023 07:52:45 -0700 Subject: [PATCH 1002/1234] [chore] Update go version used in workflows (#2088) * Update go version used in workflows * Use correct patch version --- .github/workflows/continuous-integration.yaml | 4 ++-- .github/workflows/e2e.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 3ed227297..7aacae132 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: "1.21" + go-version: "~1.21.1" - name: Check out code into the Go module directory uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version: "~1.21.1" - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a7df52f47..7782825e6 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -38,7 +38,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version: "~1.21.1" - name: Setup kind env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02dc6cec8..7b9b38084 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: "1.21" + go-version: "~1.21.1" - uses: actions/checkout@v4 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 4d7cecc94..5b8fc568a 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.21" + go-version: "~1.21.1" - name: Setup kind env: From 607d5d36dfff3622514497f8d42133eb9da65fa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:53:15 -0400 Subject: [PATCH 1003/1234] Bump the prometheus group with 1 update (#2090) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.46.0...v0.47.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index cdcc96986..92bf014be 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 - github.com/prometheus/prometheus v0.46.0 + github.com/prometheus/prometheus v0.47.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 @@ -128,7 +128,7 @@ require ( github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect diff --git a/go.sum b/go.sum index 2194c948c..4adfbc42e 100644 --- a/go.sum +++ b/go.sum @@ -473,15 +473,15 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.46.0 h1:9JSdXnsuT6YsbODEhSQMwxNkGwPExfmzqG73vCMk/Kw= -github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= +github.com/prometheus/prometheus v0.47.0 h1:tIJJKZGlmrMVsvIt6rMfB8he7CRHEc8ZxS5ubcZtbkM= +github.com/prometheus/prometheus v0.47.0/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 h1:+1H+N9QFl2Sfvia0FBYfMrHYHYhmpZxhSE0wpPL2lYs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= From 2afa9aae7c3c5f191eafd838a0c6a660b277a08d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:53:50 -0400 Subject: [PATCH 1004/1234] Bump the prometheus group in /cmd/otel-allocator with 1 update (#2091) Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.46.0...v0.47.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index d58f0bee1..3b37faea8 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -18,7 +18,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 - github.com/prometheus/prometheus v0.46.0 + github.com/prometheus/prometheus v0.47.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 @@ -158,7 +158,7 @@ require ( github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index bcc3534c4..071805e58 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -613,8 +613,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.46.0 h1:9JSdXnsuT6YsbODEhSQMwxNkGwPExfmzqG73vCMk/Kw= -github.com/prometheus/prometheus v0.46.0/go.mod h1:10L5IJE5CEsjee1FnOcVswYXlPIscDWWt3IJ2UDYrz4= +github.com/prometheus/prometheus v0.47.0 h1:tIJJKZGlmrMVsvIt6rMfB8he7CRHEc8ZxS5ubcZtbkM= +github.com/prometheus/prometheus v0.47.0/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -622,8 +622,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19 h1:+1H+N9QFl2Sfvia0FBYfMrHYHYhmpZxhSE0wpPL2lYs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.19/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= From fecddf0449bde837bc800bff7d749ac123397bdf Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 7 Sep 2023 09:07:59 -0600 Subject: [PATCH 1005/1234] [autoinstrumentation] Bump dotnet to 1.0.0 (#2096) * bump dotnet * Update .chloggen/upgrade-dotnet.yaml --- .chloggen/upgrade-dotnet.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 .chloggen/upgrade-dotnet.yaml diff --git a/.chloggen/upgrade-dotnet.yaml b/.chloggen/upgrade-dotnet.yaml new file mode 100755 index 000000000..3f3ad1661 --- /dev/null +++ b/.chloggen/upgrade-dotnet.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump dotnet instrumentation version to 1.0.0 + +# One or more tracking issues related to the change +issues: [2096] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index fedbd0b1a..3eefcb9dd 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.0.0-rc.2 +1.0.0 From 06c5dcefa67683e32d8a91cfce22ed55767c87c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 11:37:50 -0400 Subject: [PATCH 1006/1234] Bump the prometheus group with 1 update (#2101) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.67.1...v0.68.0) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 +++++++------- go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 92bf014be..3cf588cc7 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 github.com/prometheus/prometheus v0.47.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -135,14 +135,14 @@ require ( go.opentelemetry.io/otel/trace v1.17.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.13.0 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect @@ -158,7 +158,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 4adfbc42e..2159bbead 100644 --- a/go.sum +++ b/go.sum @@ -442,8 +442,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 h1:yl9ceUSUBo9woQIO+8eoWpcxZkdZgm89g+rVvu37TUw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0/go.mod h1:9Uuu3pEU2jB8PwuqkHvegQ0HV/BlZRJUyfTYAqfdVF8= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -553,8 +553,8 @@ golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -631,8 +631,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -712,14 +712,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -730,8 +730,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -931,8 +931,8 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5Ohx k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.28.1 h1:jAq4yKEqQL+fwkWcEsUWxhJ7uIRcOYQraJxx4SyAMTY= k8s.io/kubectl v0.28.1/go.mod h1:a0nk/lMMeKBulp0lMTJAKbkjZg1ykqfLfz/d6dnv1ak= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 9cf9e332c35890503871fe05bc182e18b40710d8 Mon Sep 17 00:00:00 2001 From: PeterSzegedi Date: Tue, 12 Sep 2023 15:34:43 +0100 Subject: [PATCH 1007/1234] Remove TargetAllocator resource defaults (#2040) * Remove TargetAllocator resource defaults * Add changelog entry * Update e2e test for target allocator * trigger tests * Add heads up for change of behaviour --- .chloggen/remove_ta_defaults.yaml | 16 ++++++++++++++++ apis/v1alpha1/opentelemetrycollector_webhook.go | 15 --------------- .../e2e/targetallocator-features/00-assert.yaml | 7 ------- 3 files changed, 16 insertions(+), 22 deletions(-) create mode 100755 .chloggen/remove_ta_defaults.yaml diff --git a/.chloggen/remove_ta_defaults.yaml b/.chloggen/remove_ta_defaults.yaml new file mode 100755 index 000000000..af64a954f --- /dev/null +++ b/.chloggen/remove_ta_defaults.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove default cpu and mem requests and limits from target allocator to match otel-collector behaviour + +# One or more tracking issues related to the change +issues: [1914] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: To preserve the old behaviour for the case when the requests/limits were not explicitely set during the deployment, make sure to set the requests/limits of 100m/200m for CPU and 250Mi/500Mi for memory. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 0179c8559..40b4df050 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -18,8 +18,6 @@ import ( "fmt" autoscalingv2 "k8s.io/api/autoscaling/v2" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" @@ -72,19 +70,6 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.TargetAllocator.Replicas = &one } - if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Resources.Limits == nil { - r.Spec.TargetAllocator.Resources.Limits = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("200m"), - corev1.ResourceMemory: resource.MustParse("500Mi"), - } - } - if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Resources.Requests == nil { - r.Spec.TargetAllocator.Resources.Requests = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("250Mi"), - } - } - if r.Spec.MaxReplicas != nil || (r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil) { if r.Spec.Autoscaler == nil { r.Spec.Autoscaler = &AutoscalerSpec{} diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index 866654e11..d7676d9b1 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -58,13 +58,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - resources: - limits: - cpu: 200m - memory: 500Mi - requests: - cpu: 100m - memory: 250Mi volumeMounts: - mountPath: /conf name: ta-internal From 20d7ca4bd0433485ed472a7cf55559bcfd8efe1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:01:42 +0200 Subject: [PATCH 1008/1234] Bump go.opentelemetry.io/otel/metric in /cmd/operator-opamp-bridge (#2120) Bumps [go.opentelemetry.io/otel/metric](https://github.com/open-telemetry/opentelemetry-go) from 1.17.0 to 1.18.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.17.0...v1.18.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/metric dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 47f4bf917..4427ccdbb 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,9 +10,9 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.17.0 + go.opentelemetry.io/otel v1.18.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 - go.opentelemetry.io/otel/metric v1.17.0 + go.opentelemetry.io/otel/metric v1.18.0 go.opentelemetry.io/otel/sdk v1.17.0 go.opentelemetry.io/otel/sdk/metric v0.40.0 go.uber.org/multierr v1.11.0 @@ -67,7 +67,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.75.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 // indirect - go.opentelemetry.io/otel/trace v1.17.0 // indirect + go.opentelemetry.io/otel/trace v1.18.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 1922f3551..cb29c44ba 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -135,20 +135,20 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= -go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= -go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= +go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= +go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 h1:MZbjiZeMmn5wFMORhozpouGKDxj9POHTuU5UA8msBQk= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0/go.mod h1:C7tOYVCJmrDTCwxNny0MuUtnDIR3032vFHYke0F2ZrU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 h1:SZaSbubADNhH2Gxm+1GaZ/cFsGiYefZoodMMX79AOd4= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0/go.mod h1:N65FzQDfQH7NY7umgb0U+7ypGKVYKwwE24L6KXT4OA8= -go.opentelemetry.io/otel/metric v1.17.0 h1:iG6LGVz5Gh+IuO0jmgvpTB6YVrCGngi8QGm+pMd8Pdc= -go.opentelemetry.io/otel/metric v1.17.0/go.mod h1:h4skoxdZI17AxwITdmdZjjYJQH5nzijUUjm+wtPph5o= +go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= +go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= go.opentelemetry.io/otel/sdk v1.17.0 h1:FLN2X66Ke/k5Sg3V623Q7h7nt3cHXaW1FOvKKrW0IpE= go.opentelemetry.io/otel/sdk v1.17.0/go.mod h1:U87sE0f5vQB7hwUoW98pW5Rz4ZDuCFBZFNUBlSgmDFQ= go.opentelemetry.io/otel/sdk/metric v0.40.0 h1:qOM29YaGcxipWjL5FzpyZDpCYrDREvX0mVlmXdOjCHU= go.opentelemetry.io/otel/sdk/metric v0.40.0/go.mod h1:dWxHtdzdJvg+ciJUKLTKwrMe5P6Dv3FyDbh8UkfgkVs= -go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= -go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= +go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= +go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From 31562476d54c4a1b0a5989054630597c7cfc372f Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 13 Sep 2023 10:36:07 +0200 Subject: [PATCH 1009/1234] Align version of ubuntu GHA runner (#2121) Signed-off-by: Pavol Loffay --- .github/workflows/continuous-integration.yaml | 6 +++--- .github/workflows/e2e.yaml | 4 ++-- .../workflows/publish-autoinstrumentation-apache-httpd.yaml | 4 ++-- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 4 ++-- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 7aacae132..788d14eed 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -13,7 +13,7 @@ concurrency: jobs: unit-tests: name: Unit tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Set up Go uses: actions/setup-go@v3 @@ -28,7 +28,7 @@ jobs: lint: name: Code standards (linting) - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Set up Go uses: actions/setup-go@v4 @@ -52,7 +52,7 @@ jobs: security: name: Security - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7782825e6..093839316 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ env: jobs: e2e-tests: name: End-to-end tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -63,7 +63,7 @@ jobs: run: make e2e-log-operator KUBE_VERSION=$KUBE_VERSION e2e-tests-check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: always() needs: [e2e-tests] steps: diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 836d62c8d..a85a927e8 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -19,7 +19,7 @@ concurrency: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -66,4 +66,4 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 9cf052191..877ba1cd6 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -19,7 +19,7 @@ concurrency: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 941770f67..e924062a4 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -20,7 +20,7 @@ concurrency: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 5ae1ae627..5a38c6f0d 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -20,7 +20,7 @@ concurrency: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index dd7f4c22e..824383978 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -20,7 +20,7 @@ concurrency: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 496c68abe..1c610391a 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -10,7 +10,7 @@ on: jobs: publish: name: Publish container images - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index c04abb552..c087bfe24 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -13,7 +13,7 @@ on: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 26408ac21..5c7f76961 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -13,7 +13,7 @@ on: jobs: publish: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b9b38084..1048a76ad 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,7 +5,7 @@ on: jobs: release: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Set up Go uses: actions/setup-go@v3 diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 5b8fc568a..6090e640f 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -17,7 +17,7 @@ env: jobs: scorecard-tests: name: test on k8s - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: kube-version: @@ -54,7 +54,7 @@ jobs: run: make scorecard-tests scorecard-tests-check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: always() needs: [scorecard-tests] steps: From e779d51cc5ec51afce0643a69afd3329db0bf225 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:36:40 +0200 Subject: [PATCH 1010/1234] Bump the kubernetes group in /cmd/otel-allocator with 1 update (#2111) Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.1...v0.16.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 3b37faea8..570dfd358 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -26,7 +26,7 @@ require ( k8s.io/apimachinery v0.28.1 k8s.io/client-go v0.28.1 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.1 + sigs.k8s.io/controller-runtime v0.16.2 ) require ( diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 071805e58..dce53f901 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1128,8 +1128,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= -sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 9d3f32a671dbe518509f268502c709210a87bdaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:35:38 +0200 Subject: [PATCH 1011/1234] Bump the kubernetes group with 1 update (#2109) Bumps the kubernetes group with 1 update: [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.1...v0.16.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3cf588cc7..5dd01e910 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( k8s.io/client-go v0.28.1 k8s.io/component-base v0.28.1 k8s.io/kubectl v0.28.1 - sigs.k8s.io/controller-runtime v0.16.1 + sigs.k8s.io/controller-runtime v0.16.2 ) require ( diff --git a/go.sum b/go.sum index 2159bbead..c1a248d84 100644 --- a/go.sum +++ b/go.sum @@ -936,8 +936,8 @@ k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= -sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 19b0ec18bc6f58cc7fbc3f7fc27e1c61eb35c4e2 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 13 Sep 2023 14:36:13 +0200 Subject: [PATCH 1012/1234] Release 0.84.0 (#2092) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Release 0.84.0 Signed-off-by: Yuri Sa * .NET auto-instrumentation include musl in docker image (#2087) * [.NET AutoInstrumentation] Docker image includes musl library * Replace ADD by get command * Remove redundant files from docker image * Execute all commands in one layer * Fix passing arguments * revert to ADD as wget is failing on CI * Typo fix Co-authored-by: Paulo Janotti --------- Co-authored-by: Paulo Janotti * [chore] Update go version used in workflows (#2088) * Update go version used in workflows * Use correct patch version * Bump the prometheus group with 1 update (#2090) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.46.0...v0.47.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump the prometheus group in /cmd/otel-allocator with 1 update (#2091) Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.46.0...v0.47.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [autoinstrumentation] Bump dotnet to 1.0.0 (#2096) * bump dotnet * Update .chloggen/upgrade-dotnet.yaml * Bump the prometheus group with 1 update (#2101) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.67.1...v0.68.0) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Release 0.84.0 Signed-off-by: Yuri Sa * Release 0.84.0 Signed-off-by: Yuri Sa * Release 0.84.0 Signed-off-by: Yuri Sa * Release 0.84.0 Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa Signed-off-by: dependabot[bot] Co-authored-by: Piotr Kiełkowicz Co-authored-by: Paulo Janotti Co-authored-by: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- ...ion-pod-mutator-for-instrumented-pods.yaml | 16 ---------- ...ice-monitors-for-prometheus-exporters.yaml | 16 ---------- ...ttpd-autoinstrumentation-for-non-root.yaml | 16 ---------- ...otel-collector-service-reconciliation.yaml | 16 ---------- .chloggen/kube128.yaml | 16 ---------- .chloggen/limit-volume-inst.yaml | 16 ---------- .chloggen/remove_ta_defaults.yaml | 16 ---------- .chloggen/route-grpc.yaml | 16 ---------- .chloggen/route-use-defaults.yaml | 16 ---------- .chloggen/upgrade-dotnet.yaml | 16 ---------- CHANGELOG.md | 30 ++++++++++++++++++- README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- versions.txt | 10 +++---- 15 files changed, 40 insertions(+), 172 deletions(-) delete mode 100755 .chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml delete mode 100755 .chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml delete mode 100755 .chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml delete mode 100755 .chloggen/fix-otel-collector-service-reconciliation.yaml delete mode 100755 .chloggen/kube128.yaml delete mode 100755 .chloggen/limit-volume-inst.yaml delete mode 100755 .chloggen/remove_ta_defaults.yaml delete mode 100755 .chloggen/route-grpc.yaml delete mode 100755 .chloggen/route-use-defaults.yaml delete mode 100755 .chloggen/upgrade-dotnet.yaml diff --git a/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml b/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml deleted file mode 100755 index 0efb1d8f3..000000000 --- a/.chloggen/1366-avoid-running-the-instrumentation-pod-mutator-for-instrumented-pods.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Avoid running the auto-instrumentation pod mutator for pods already auto-instrumented" - -# One or more tracking issues related to the change -issues: [1366] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml b/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml deleted file mode 100755 index 5ca0eddad..000000000 --- a/.chloggen/1963-create-service-monitors-for-prometheus-exporters.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Create ServiceMonitors when the Prometheus exporters are used. - -# One or more tracking issues related to the change -issues: [1963] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml b/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml deleted file mode 100755 index fed0105e5..000000000 --- a/.chloggen/2068-fix-apache-httpd-autoinstrumentation-for-non-root.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Allow the usage of the Apache HTTPD autoinstrumentation to be run as non-root user. Change the files permission to allow their copy from a non-root user. - -# One or more tracking issues related to the change -issues: [2068] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix-otel-collector-service-reconciliation.yaml b/.chloggen/fix-otel-collector-service-reconciliation.yaml deleted file mode 100755 index 7a8c250c1..000000000 --- a/.chloggen/fix-otel-collector-service-reconciliation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fixes reconciling otel-collector service's internal traffic policy changes. - -# One or more tracking issues related to the change -issues: [2061] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/kube128.yaml b/.chloggen/kube128.yaml deleted file mode 100755 index 65b12a176..000000000 --- a/.chloggen/kube128.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Run end-to-end tests on Kubernetes 1.28 - -# One or more tracking issues related to the change -issues: [2047] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/limit-volume-inst.yaml b/.chloggen/limit-volume-inst.yaml deleted file mode 100755 index 6a2f3a32a..000000000 --- a/.chloggen/limit-volume-inst.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Limit auto-instrumentation emptydir volume size - -# One or more tracking issues related to the change -issues: [2044] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/remove_ta_defaults.yaml b/.chloggen/remove_ta_defaults.yaml deleted file mode 100755 index af64a954f..000000000 --- a/.chloggen/remove_ta_defaults.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove default cpu and mem requests and limits from target allocator to match otel-collector behaviour - -# One or more tracking issues related to the change -issues: [1914] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: To preserve the old behaviour for the case when the requests/limits were not explicitely set during the deployment, make sure to set the requests/limits of 100m/200m for CPU and 250Mi/500Mi for memory. diff --git a/.chloggen/route-grpc.yaml b/.chloggen/route-grpc.yaml deleted file mode 100755 index d2e2642b9..000000000 --- a/.chloggen/route-grpc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Make OpenShift Route work with gRPC receivers by using h2c appProtocol - -# One or more tracking issues related to the change -issues: [1969] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/route-use-defaults.yaml b/.chloggen/route-use-defaults.yaml deleted file mode 100755 index f14593125..000000000 --- a/.chloggen/route-use-defaults.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Make OpenShift routes work with missing hostname - -# One or more tracking issues related to the change -issues: [2074] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: If the Ingress hostname is not specified OpenShift route hostname is set to `--route--basedomain`. diff --git a/.chloggen/upgrade-dotnet.yaml b/.chloggen/upgrade-dotnet.yaml deleted file mode 100755 index 3f3ad1661..000000000 --- a/.chloggen/upgrade-dotnet.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump dotnet instrumentation version to 1.0.0 - -# One or more tracking issues related to the change -issues: [2096] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c240bbd..a03a9b671 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,36 @@ Changes by Version ================== - +## 0.84.0 + +### 💡 Enhancements 💡 + +- `autoinstrumentation`: Bump dotnet instrumentation version to 1.0.0 (#2096) +- `operator`: Remove default cpu and mem requests and limits from target allocator to match otel-collector behaviour (#1914) + To preserve the old behaviour for the case when the requests/limits were not explicitely set during the deployment, make sure to set the requests/limits of 100m/200m for CPU and 250Mi/500Mi for memory. +- `operator`: Create ServiceMonitors when the Prometheus exporters are used. (#1963) +- `operator`: Run end-to-end tests on Kubernetes 1.28 (#2047) +- `operator`: Limit auto-instrumentation emptydir volume size (#2044) +- `operator`: Make OpenShift routes work with missing hostname (#2074) + If the Ingress hostname is not specified OpenShift route hostname is set to `--route--basedomain`. + +### 🧰 Bug fixes 🧰 + +- `operator`: Avoid running the auto-instrumentation pod mutator for pods already auto-instrumented (#1366) +- `autoinstrumentation`: Allow the usage of the Apache HTTPD autoinstrumentation to be run as non-root user. Change the files permission to allow their copy from a non-root user. (#2068) +- `operator`: Fixes reconciling otel-collector service's internal traffic policy changes. (#2061) +- `operator`: Make OpenShift Route work with gRPC receivers by using h2c appProtocol (#1969) +### Components + +* [OpenTelemetry Collector - v0.84.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.84.0) +* [OpenTelemetry Contrib - v0.84.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.84.0) +* [Java auto-instrumentation - 1.29.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.29.0) +* [.NET auto-instrumentation - 1.0.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) +* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) ## 0.83.0 ### 🛑 Breaking changes 🛑 diff --git a/README.md b/README.md index ac77c4c21..7061667d6 100644 --- a/README.md +++ b/README.md @@ -589,6 +589,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.84.0 | v1.19 to v1.28 | v1 | | v0.83.0 | v1.19 to v1.27 | v1 | | v0.82.0 | v1.19 to v1.27 | v1 | | v0.81.0 | v1.19 to v1.27 | v1 | @@ -611,7 +612,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.63.1 | v1.19 to v1.25 | v1 | | v0.62.1 | v1.19 to v1.25 | v1 | | v0.61.0 | v1.19 to v1.25 | v1 | -| v0.60.0 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 7e6d8d80a..5636d19b6 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.84.0 | @yuriolisa | | v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | +| v0.91.0 | @yuriolisa | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3d29a7ce0..6ca83ae09 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-08-28T17:54:06Z" + createdAt: "2023-09-07T09:45:03Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.83.0 + name: opentelemetry-operator.v0.84.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -332,7 +332,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.83.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.84.0 livenessProbe: httpGet: path: /healthz @@ -439,7 +439,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.83.0 + version: 0.84.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 194d56810..184b84db3 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.83.0 +opentelemetry-collector=0.84.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.83.0 +operator=0.84.0 # Represents the current release of the Target Allocator. -targetallocator=0.83.0 +targetallocator=0.84.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.83.0 +operator-opamp-bridge=0.84.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -27,7 +27,7 @@ autoinstrumentation-python=0.40b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=1.0.0-rc.2 +autoinstrumentation-dotnet=1.0.0 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.2.2-alpha From 30a115b89a03c026b58e50cb264ccc12c4bb9485 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:43:14 -0400 Subject: [PATCH 1013/1234] Bump docker/setup-qemu-action from 2 to 3 (#2116) --- .github/workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index a85a927e8..3034815b1 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -36,7 +36,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 877ba1cd6..7047ee9c5 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -38,7 +38,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index e924062a4..a84a85ad6 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -39,7 +39,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 5a38c6f0d..f4e747cbc 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -39,7 +39,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 824383978..28cab1b35 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -39,7 +39,7 @@ jobs: type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 1c610391a..3c4d5513d 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -48,7 +48,7 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index eb9824dc2..41887954e 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -33,7 +33,7 @@ jobs: - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index c087bfe24..de608f3b9 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -37,7 +37,7 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 5c7f76961..5fbb783d8 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -37,7 +37,7 @@ jobs: type=ref,event=branch - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 From d99888daad7a7d5d09eab2f5b0eacd09ac2630e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:43:57 -0400 Subject: [PATCH 1014/1234] Bump docker/metadata-action from 4 to 5 (#2114) --- .github/workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 3034815b1..0c94f957b 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd tags: | diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 7047ee9c5..d4f0bcf44 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -29,7 +29,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/autoinstrumentation-dotnet diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index a84a85ad6..3a435a7cb 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/autoinstrumentation-java diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index f4e747cbc..5f69034fa 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/autoinstrumentation-nodejs diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 28cab1b35..f48f4b244 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -30,7 +30,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/autoinstrumentation-python diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 3c4d5513d..ecb6578da 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -36,7 +36,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/opentelemetry-operator diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 41887954e..c61b8a971 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -20,7 +20,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/opentelemetry-operator-bundle diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index de608f3b9..60d8dd8f5 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/operator-opamp-bridge diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 5fbb783d8..555e2b245 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | otel/target-allocator From 6d935050ca7eaff7f01dac18bc2a215f0ba1be3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:35:15 -0400 Subject: [PATCH 1015/1234] Bump docker/setup-buildx-action from 2 to 3 (#2115) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 0c94f957b..ae65e4ac3 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -39,7 +39,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index d4f0bcf44..565583d60 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -41,7 +41,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 3a435a7cb..5399c9e89 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -42,7 +42,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 5f69034fa..1c60ab283 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -42,7 +42,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index f48f4b244..e30c4aa9c 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -42,7 +42,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index ecb6578da..cbdda8179 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -51,7 +51,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index c61b8a971..1a05ea68f 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -36,7 +36,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 60d8dd8f5..6bafca09c 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -40,7 +40,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 555e2b245..246c66cad 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -40,7 +40,7 @@ jobs: uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 From 75f72045b6c302b7d93a2aecc287682c0fbec443 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:35:22 -0400 Subject: [PATCH 1016/1234] Bump docker/login-action from 2 to 3 (#2113) Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 4 ++-- .github/workflows/publish-autoinstrumentation-java.yaml | 4 ++-- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 4 ++-- .github/workflows/publish-autoinstrumentation-python.yaml | 4 ++-- .github/workflows/publish-images.yaml | 4 ++-- .github/workflows/publish-operator-bundle.yaml | 4 ++-- .github/workflows/publish-operator-opamp-bridge.yaml | 4 ++-- .github/workflows/publish-target-allocator.yaml | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index ae65e4ac3..83745824b 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -50,7 +50,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index 565583d60..af2ec8cc2 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -52,14 +52,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 5399c9e89..647f945c8 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -53,14 +53,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 1c60ab283..9bb49d4fc 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -53,14 +53,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index e30c4aa9c..b8f1cb42e 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -53,14 +53,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index cbdda8179..8f10d8335 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -62,14 +62,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 1a05ea68f..1c371e5ae 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -47,14 +47,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 6bafca09c..3d08bf624 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -51,14 +51,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 246c66cad..2170c2365 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -51,14 +51,14 @@ jobs: ${{ runner.os }}-buildx- - name: Log into Docker.io - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 if: ${{ github.event_name == 'push' }} with: registry: ghcr.io From e8882e8852ce976ac1b22183fa7a76643206bbd0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 13 Sep 2023 18:00:19 +0200 Subject: [PATCH 1017/1234] Fix publishing of bundle image to GHCR (#2122) * Fix publishing of bundle image to GHCR Signed-off-by: Pavol Loffay * Expand paths Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .github/workflows/publish-operator-bundle.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 1c371e5ae..541feaa16 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -5,6 +5,7 @@ on: paths: - '.github/workflows/publish-operator-bundle.yaml' - 'bundle.Dockerfile' + - 'bundle/**' branches: - main tags: @@ -24,7 +25,7 @@ jobs: with: images: | otel/opentelemetry-operator-bundle - ghcr.io/${{ github.repository }}/opentelemetry-operator-bundle + ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator-bundle tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} From 1a54542bdccb86534d76d14237162c14c9f3c295 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:58:10 -0600 Subject: [PATCH 1018/1234] [autoinstrumentation] bump go autoinstrumentation to 0.3.0-alpha (#2123) * bump go autoinstrumentation * changelog --- .chloggen/bump-go-autoinstrumentation.yaml | 16 ++++++++++++++++ .../instrumentation-go/02-assert.yaml | 2 +- versions.txt | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 .chloggen/bump-go-autoinstrumentation.yaml diff --git a/.chloggen/bump-go-autoinstrumentation.yaml b/.chloggen/bump-go-autoinstrumentation.yaml new file mode 100755 index 000000000..6dbe6ae8c --- /dev/null +++ b/.chloggen/bump-go-autoinstrumentation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Go auto-instrumentation support to v0.3.0-alpha. + +# One or more tracking issues related to the change +issues: [2123] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml index de65955b4..a4ea68f7a 100644 --- a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml @@ -19,7 +19,7 @@ spec: requests: cpu: "50m" memory: "32Mi" - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.2.2-alpha + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.3.0-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE value: /usr/src/app/productcatalogservice diff --git a/versions.txt b/versions.txt index 184b84db3..22e7661fb 100644 --- a/versions.txt +++ b/versions.txt @@ -30,7 +30,7 @@ autoinstrumentation-python=0.40b0 autoinstrumentation-dotnet=1.0.0 # Represents the current release of Go instrumentation. -autoinstrumentation-go=v0.2.2-alpha +autoinstrumentation-go=v0.3.0-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From 7db327a2b4bca30f9785cee74b42d0cec90a4026 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 17:24:19 -0400 Subject: [PATCH 1019/1234] Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#2119) Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.40.0 to 0.41.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/sdk/metric/v0.40.0...sdk/metric/v0.41.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 18 +++++++-------- cmd/operator-opamp-bridge/go.sum | 38 ++++++++++++++++---------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 4427ccdbb..37c494e7b 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -11,10 +11,10 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.17.0 - go.opentelemetry.io/otel/sdk/metric v0.40.0 + go.opentelemetry.io/otel/sdk v1.18.0 + go.opentelemetry.io/otel/sdk/metric v0.41.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -66,22 +66,22 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.75.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect go.opentelemetry.io/otel/trace v1.18.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect golang.org/x/net v0.13.0 // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.12.0 // indirect golang.org/x/term v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.57.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/grpc v1.58.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.1 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index cb29c44ba..caac448be 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -137,16 +137,16 @@ go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73R go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0 h1:MZbjiZeMmn5wFMORhozpouGKDxj9POHTuU5UA8msBQk= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.40.0/go.mod h1:C7tOYVCJmrDTCwxNny0MuUtnDIR3032vFHYke0F2ZrU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0 h1:SZaSbubADNhH2Gxm+1GaZ/cFsGiYefZoodMMX79AOd4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.40.0/go.mod h1:N65FzQDfQH7NY7umgb0U+7ypGKVYKwwE24L6KXT4OA8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 h1:iV3BOgW4fry1Riw9dwypigqlIYWXvSRVT2RJmblzo40= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0/go.mod h1:7PGzqlKrxIRmbj5tlNW0nTkYZ5fHXDgk6Fy8/KjR0CI= go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.17.0 h1:FLN2X66Ke/k5Sg3V623Q7h7nt3cHXaW1FOvKKrW0IpE= -go.opentelemetry.io/otel/sdk v1.17.0/go.mod h1:U87sE0f5vQB7hwUoW98pW5Rz4ZDuCFBZFNUBlSgmDFQ= -go.opentelemetry.io/otel/sdk/metric v0.40.0 h1:qOM29YaGcxipWjL5FzpyZDpCYrDREvX0mVlmXdOjCHU= -go.opentelemetry.io/otel/sdk/metric v0.40.0/go.mod h1:dWxHtdzdJvg+ciJUKLTKwrMe5P6Dv3FyDbh8UkfgkVs= +go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= +go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= +go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= +go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -178,8 +178,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -194,8 +194,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= @@ -221,13 +221,13 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e h1:Ao9GzfUMPH3zjVfzXG5rlWlk+Q8MXWKwWpwVQE1MXfw= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= +google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 98b2f3748afc43c79ce6336bb94925db6560c250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Wed, 13 Sep 2023 23:24:36 +0200 Subject: [PATCH 1020/1234] [chore] typo fixes (#2099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Piotr Kiełkowicz --- apis/v1alpha1/instrumentation_types.go | 2 +- pkg/instrumentation/dotnet.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index c836e1cd8..63ccea7f1 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -63,7 +63,7 @@ type InstrumentationSpec struct { DotNet DotNet `json:"dotnet,omitempty"` // Go defines configuration for Go auto-instrumentation. - // When using Go auto-instrumenetation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the + // When using Go auto-instrumentation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the // Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. // Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. // +optional diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 7473b54c5..901cb623c 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -56,7 +56,7 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the container") } - // check if OTEL_DOTNET_AUTO_HOME env var is already set in the .NET instrumentatiom spec + // check if OTEL_DOTNET_AUTO_HOME env var is already set in the .NET instrumentation spec // if it is already set, then we assume that .NET Auto-instrumentation is already configured for this container if getIndexOfEnv(dotNetSpec.Env, envDotNetOTelAutoHome) > -1 { return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec") From b17792adf98046e2327a356217bff835b7fe32af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:28:33 -0400 Subject: [PATCH 1021/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 3 updates (#2126) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 3 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go) and [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Updates `k8s.io/apimachinery` from 0.28.1 to 0.28.2 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.1...v0.28.2) Updates `k8s.io/client-go` from 0.28.1 to 0.28.2 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.1...v0.28.2) Updates `sigs.k8s.io/controller-runtime` from 0.16.1 to 0.16.2 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.1...v0.16.2) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 8 ++++---- cmd/operator-opamp-bridge/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 37c494e7b..e1257eb42 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,10 +18,10 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.28.1 - k8s.io/client-go v0.28.1 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.1 + sigs.k8s.io/controller-runtime v0.16.2 ) require ( @@ -84,7 +84,7 @@ require ( google.golang.org/grpc v1.58.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.28.1 // indirect + k8s.io/api v0.28.2 // indirect k8s.io/apiextensions-apiserver v0.28.0 // indirect k8s.io/component-base v0.28.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index caac448be..645f9370a 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -245,14 +245,14 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= -k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= -k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= -k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= @@ -261,8 +261,8 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5Ohx k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0= -sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= From b0d28b58770378ababa69ee84ca58907932c3328 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:28:47 -0400 Subject: [PATCH 1022/1234] Bump the kubernetes group with 3 updates (#2125) Bumps the kubernetes group with 3 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) and [k8s.io/kubectl](https://github.com/kubernetes/kubectl). Updates `k8s.io/api` from 0.28.1 to 0.28.2 - [Commits](https://github.com/kubernetes/api/compare/v0.28.1...v0.28.2) Updates `k8s.io/apiextensions-apiserver` from 0.28.1 to 0.28.2 - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.28.1...v0.28.2) Updates `k8s.io/kubectl` from 0.28.1 to 0.28.2 - [Commits](https://github.com/kubernetes/kubectl/compare/v0.28.1...v0.28.2) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 5dd01e910..c7ced2490 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.17.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.1 - k8s.io/apiextensions-apiserver v0.28.1 - k8s.io/apimachinery v0.28.1 - k8s.io/client-go v0.28.1 - k8s.io/component-base v0.28.1 - k8s.io/kubectl v0.28.1 + k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 + k8s.io/component-base v0.28.2 + k8s.io/kubectl v0.28.2 sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/go.sum b/go.sum index c1a248d84..913fb4dd3 100644 --- a/go.sum +++ b/go.sum @@ -915,22 +915,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= -k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= -k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTKSmQZw= -k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= -k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= -k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= -k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= -k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= -k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.1 h1:jAq4yKEqQL+fwkWcEsUWxhJ7uIRcOYQraJxx4SyAMTY= -k8s.io/kubectl v0.28.1/go.mod h1:a0nk/lMMeKBulp0lMTJAKbkjZg1ykqfLfz/d6dnv1ak= +k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM= +k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From cd0066324899e04d4e1c91c294430cb22ee38ca9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:29:11 -0400 Subject: [PATCH 1023/1234] Bump the kubernetes group in /cmd/otel-allocator with 2 updates (#2124) Bumps the kubernetes group in /cmd/otel-allocator with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/api` from 0.28.1 to 0.28.2 - [Commits](https://github.com/kubernetes/api/compare/v0.28.1...v0.28.2) Updates `k8s.io/client-go` from 0.28.1 to 0.28.2 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.1...v0.28.2) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 6 +++--- cmd/otel-allocator/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 570dfd358..38c2ed0a3 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,9 +22,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.1 - k8s.io/apimachinery v0.28.1 - k8s.io/client-go v0.28.1 + k8s.io/api v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index dce53f901..add523c36 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1108,14 +1108,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= -k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= -k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= -k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= -k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= -k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= From 7d503f6d89a6cc9823988bb7d33439d216af99ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:43:14 -0400 Subject: [PATCH 1024/1234] Bump docker/build-push-action from 4 to 5 (#2112) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-apache-httpd.yaml | 2 +- .github/workflows/publish-autoinstrumentation-dotnet.yaml | 2 +- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml index 83745824b..53de1e159 100644 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml @@ -57,7 +57,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: autoinstrumentation/apache-httpd platforms: linux/amd64 diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml index af2ec8cc2..27c194937 100644 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ b/.github/workflows/publish-autoinstrumentation-dotnet.yaml @@ -67,7 +67,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: autoinstrumentation/dotnet platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 647f945c8..6b3e74f33 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -68,7 +68,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: autoinstrumentation/java platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 9bb49d4fc..1fea43e54 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -68,7 +68,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: autoinstrumentation/nodejs platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index b8f1cb42e..7f1018764 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -68,7 +68,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: autoinstrumentation/python platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 8f10d8335..707f98ce3 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -77,7 +77,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 541feaa16..9b3939b08 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -63,7 +63,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Operator image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./bundle.Dockerfile diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 3d08bf624..3fa3e86e2 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -66,7 +66,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: cmd/operator-opamp-bridge platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 2170c2365..2f8bce1b7 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -66,7 +66,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: cmd/otel-allocator platforms: linux/amd64,linux/arm64 From 3dee26b7b73c3cb3f8aa26c55e65f733bc34f352 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Thu, 14 Sep 2023 19:13:09 +0200 Subject: [PATCH 1025/1234] Run the upgrade of a collector instance after the status changes from unmanaged to managed (#2086) * Run the upgrade of a collector instance after the status changes from unmanaged to managed Signed-off-by: Israel Blancas * Add changelog Signed-off-by: Israel Blancas * Use the recorder Signed-off-by: Israel Blancas * Move import Signed-off-by: Israel Blancas * Fix imports Signed-off-by: Israel Blancas * Don't fail when the upgrade cannot be done as part of the reconciliation Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...grade-for-previously-unmanaged-instances.yaml | 16 ++++++++++++++++ pkg/collector/reconcile/opentelemetry.go | 15 ++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 .chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml diff --git a/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml b/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml new file mode 100755 index 000000000..6dd820a69 --- /dev/null +++ b/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Run the upgrade mechanism when there is a change in an instance to ensure it is upgraded. This is useful for cases where the instance uses the unmanaged state, the operator is upgraded and the instance changes to use a managed state." + +# One or more tracking issues related to the change +issues: [1890] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/collector/reconcile/opentelemetry.go b/pkg/collector/reconcile/opentelemetry.go index f9f74bca8..e8dcb1dc6 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/pkg/collector/reconcile/opentelemetry.go @@ -30,6 +30,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/version" + collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) // Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes @@ -38,6 +39,18 @@ import ( func Self(ctx context.Context, params manifests.Params) error { changed := params.Instance + up := &collectorupgrade.VersionUpgrade{ + Log: params.Log, + Version: version.Get(), + Client: params.Client, + Recorder: params.Recorder, + } + changed, err := up.ManagedInstance(ctx, changed) + if err != nil { + // don't fail to allow setting the status + params.Log.Error(err, "failed to upgrade the OpenTelemetry CR") + } + // this field is only changed for new instances: on existing instances this // field is reconciled when the operator is first started, i.e. during // the upgrade mechanism @@ -46,7 +59,7 @@ func Self(ctx context.Context, params manifests.Params) error { changed.Status.Version = version.OpenTelemetryCollector() } - if err := updateScaleSubResourceStatus(ctx, params.Client, &changed); err != nil { + if err = updateScaleSubResourceStatus(ctx, params.Client, &changed); err != nil { return fmt.Errorf("failed to update the scale subresource status for the OpenTelemetry CR: %w", err) } From bb1b116494e3f5b6edd5f0961017b270e5e609c5 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:36:44 +0200 Subject: [PATCH 1026/1234] Enabling collector to mount multiple configMaps (#1989) * Enabling collector to mount multiple configMaps Signed-off-by: Yuri Sa * Fixed lints Signed-off-by: Yuri Sa * Fixed new copies Signed-off-by: Yuri Sa * Removed unnecessary kustomization Signed-off-by: Yuri Sa * Removed unnecessary kustomization Signed-off-by: Yuri Sa * Implemented path on ConfigMapsSpec Signed-off-by: Yuri Sa * Implemented path on ConfigMapsSpec Signed-off-by: Yuri Sa * Removed the name's append on VolumeMount Signed-off-by: Yuri Sa * Fix format Signed-off-by: Yuri Sa * Fix bundle Signed-off-by: Yuri Sa * Added e2e tests Signed-off-by: Yuri Sa * Added e2e tests Signed-off-by: Yuri Sa * Fixed comments regarding validations * Fixed comments regarding validations --------- Signed-off-by: Yuri Sa --- .chloggen/add-more-configmaps.yaml | 16 ++++++ apis/v1alpha1/opentelemetrycollector_types.go | 11 ++++ apis/v1alpha1/zz_generated.deepcopy.go | 20 ++++++++ ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 17 +++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 17 +++++++ docs/api.md | 41 +++++++++++++++ internal/manifests/collector/container.go | 10 ++++ .../manifests/collector/container_test.go | 26 ++++++++++ internal/manifests/collector/volume.go | 15 ++++++ internal/manifests/collector/volume_test.go | 26 ++++++++++ internal/naming/main.go | 5 ++ tests/e2e/multiple-configmaps/00-assert.yaml | 51 +++++++++++++++++++ tests/e2e/multiple-configmaps/00-install.yaml | 43 ++++++++++++++++ 14 files changed, 299 insertions(+), 1 deletion(-) create mode 100755 .chloggen/add-more-configmaps.yaml create mode 100644 tests/e2e/multiple-configmaps/00-assert.yaml create mode 100644 tests/e2e/multiple-configmaps/00-install.yaml diff --git a/.chloggen/add-more-configmaps.yaml b/.chloggen/add-more-configmaps.yaml new file mode 100755 index 000000000..4a172ea8d --- /dev/null +++ b/.chloggen/add-more-configmaps.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow the collector CRD to specify a list of configmaps to mount + +# One or more tracking issues related to the change +issues: [1819] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index e572afe59..0852da766 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -264,6 +264,11 @@ type OpenTelemetryCollectorSpec struct { // This is only relevant to statefulset, and deployment mode // +optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + + // ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector + // object, which shall be mounted into the Collector Pods. + // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`. + ConfigMaps []ConfigMapsSpec `json:"configmaps,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. @@ -506,6 +511,12 @@ type MetricSpec struct { Pods *autoscalingv2.PodsMetricSource `json:"pods,omitempty"` } +type ConfigMapsSpec struct { + // Configmap defines name and path where the configMaps should be mounted. + Name string `json:"name"` + MountPath string `json:"mountpath"` +} + func init() { SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 8bb377dcb..d90a2d74d 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -109,6 +109,21 @@ func (in *AutoscalerSpec) DeepCopy() *AutoscalerSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigMapsSpec) DeepCopyInto(out *ConfigMapsSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapsSpec. +func (in *ConfigMapsSpec) DeepCopy() *ConfigMapsSpec { + if in == nil { + return nil + } + out := new(ConfigMapsSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DotNet) DeepCopyInto(out *DotNet) { *out = *in @@ -690,6 +705,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]ConfigMapsSpec, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 6ca83ae09..2a1ce63df 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-09-07T09:45:03Z" + createdAt: "2023-09-18T13:46:11Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index b8ea7b1ec..1f6c6f51a 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -2120,6 +2120,23 @@ spec: configuration. Refer to the OpenTelemetry Collector documentation for details. type: string + configmaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the OpenTelemetryCollector object, which shall be mounted into + the Collector Pods. + items: + properties: + mountpath: + type: string + name: + description: Configmap defines name and path where the configMaps + should be mounted. + type: string + required: + - mountpath + - name + type: object + type: array env: description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index efef24c32..560496ee0 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -2117,6 +2117,23 @@ spec: configuration. Refer to the OpenTelemetry Collector documentation for details. type: string + configmaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the OpenTelemetryCollector object, which shall be mounted into + the Collector Pods. + items: + properties: + mountpath: + type: string + name: + description: Configmap defines name and path where the configMaps + should be mounted. + type: string + required: + - mountpath + - name + type: object + type: array env: description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for diff --git a/docs/api.md b/docs/api.md index 0782a6b6e..4f5f5efbd 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3688,6 +3688,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details.
+ + + + + @@ -8082,6 +8089,40 @@ target specifies the target value for the given metric
false
configmaps[]object + ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector object, which shall be mounted into the Collector Pods.
+
false
env []object
+### OpenTelemetryCollector.spec.configmaps[index] +[↩ Parent](#opentelemetrycollectorspec) + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mountpathstring +
+
true
namestring + Configmap defines name and path where the configMaps should be mounted.
+
true
+ + ### OpenTelemetryCollector.spec.env[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index b9e00d41b..92d0bf967 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -16,6 +16,7 @@ package collector import ( "fmt" + "path" "sort" "github.com/go-logr/logr" @@ -104,6 +105,15 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }, }) + if len(otelcol.Spec.ConfigMaps) > 0 { + for keyCfgMap := range otelcol.Spec.ConfigMaps { + volumeMounts = append(volumeMounts, corev1.VolumeMount{ + Name: naming.ConfigMapExtra(otelcol.Spec.ConfigMaps[keyCfgMap].Name), + MountPath: path.Join("/var/conf", otelcol.Spec.ConfigMaps[keyCfgMap].MountPath, naming.ConfigMapExtra(otelcol.Spec.ConfigMaps[keyCfgMap].Name)), + }) + } + } + if otelcol.Spec.TargetAllocator.Enabled { // We need to add a SHARD here so the collector is able to keep targets after the hashmod operation which is // added by default by the Prometheus operator's config generator. diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index cfb30c3f0..d2c491238 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -318,6 +318,32 @@ func TestContainerCustomVolumes(t *testing.T) { assert.Equal(t, "custom-volume-mount", c.VolumeMounts[1].Name) } +func TestContainerCustomConfigMapsVolumes(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ConfigMaps: []v1alpha1.ConfigMapsSpec{{ + Name: "test", + MountPath: "/", + }, { + Name: "test2", + MountPath: "/dir", + }}, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + // verify + assert.Len(t, c.VolumeMounts, 3) + assert.Equal(t, "configmap-test", c.VolumeMounts[1].Name) + assert.Equal(t, "/var/conf/configmap-test", c.VolumeMounts[1].MountPath) + assert.Equal(t, "configmap-test2", c.VolumeMounts[2].Name) + assert.Equal(t, "/var/conf/dir/configmap-test2", c.VolumeMounts[2].MountPath) +} + func TestContainerCustomSecurityContext(t *testing.T) { // default config without security context c1 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{Spec: v1alpha1.OpenTelemetryCollectorSpec{}}, true) diff --git a/internal/manifests/collector/volume.go b/internal/manifests/collector/volume.go index 2afb4bc6b..6b014eba8 100644 --- a/internal/manifests/collector/volume.go +++ b/internal/manifests/collector/volume.go @@ -42,5 +42,20 @@ func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev volumes = append(volumes, otelcol.Spec.Volumes...) } + if len(otelcol.Spec.ConfigMaps) > 0 { + for keyCfgMap := range otelcol.Spec.ConfigMaps { + volumes = append(volumes, corev1.Volume{ + Name: naming.ConfigMapExtra(otelcol.Spec.ConfigMaps[keyCfgMap].Name), + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: otelcol.Spec.ConfigMaps[keyCfgMap].Name, + }, + }, + }, + }) + } + } + return volumes } diff --git a/internal/manifests/collector/volume_test.go b/internal/manifests/collector/volume_test.go index db575fa7e..6232b39c4 100644 --- a/internal/manifests/collector/volume_test.go +++ b/internal/manifests/collector/volume_test.go @@ -61,3 +61,29 @@ func TestVolumeAllowsMoreToBeAdded(t *testing.T) { // check that it's the otc-internal volume, with the config map assert.Equal(t, "my-volume", volumes[1].Name) } + +func TestVolumeWithMoreConfigMaps(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + ConfigMaps: []v1alpha1.ConfigMapsSpec{{ + Name: "configmap-test", + MountPath: "/", + }, { + Name: "configmap-test2", + MountPath: "/dir", + }}, + }, + } + cfg := config.New() + + // test + volumes := Volumes(cfg, otelcol) + + // verify + assert.Len(t, volumes, 3) + + // check if the volume with the configmap prefix is mounted after defining the config map. + assert.Equal(t, "configmap-configmap-test", volumes[1].Name) + assert.Equal(t, "configmap-configmap-test2", volumes[2].Name) +} diff --git a/internal/naming/main.go b/internal/naming/main.go index a45f99071..b1ed7dd22 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -30,6 +30,11 @@ func ConfigMapVolume() string { return "otc-internal" } +// ConfigMapExtra returns the prefix to use for the extras mounted configmaps in the pod. +func ConfigMapExtra(extraConfigMapName string) string { + return DNSName(Truncate("configmap-%s", 63, extraConfigMapName)) +} + // TAConfigMapVolume returns the name to use for the config map's volume in the TargetAllocator pod. func TAConfigMapVolume() string { return "ta-internal" diff --git a/tests/e2e/multiple-configmaps/00-assert.yaml b/tests/e2e/multiple-configmaps/00-assert.yaml new file mode 100644 index 000000000..14c929470 --- /dev/null +++ b/tests/e2e/multiple-configmaps/00-assert.yaml @@ -0,0 +1,51 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mount-test1 +data: + export.ini: | + - EXPORT=true +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mount-test2 +data: + otel.ini: | + - OTEL_ENDPOINT=localhost +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: simplest-with-configmaps-collector +spec: + template: + spec: + volumes: + - name: otc-internal + configMap: + name: simplest-with-configmaps-collector + items: + - key: collector.yaml + path: collector.yaml + defaultMode: 420 + - name: configmap-mount-test1 + configMap: + name: mount-test1 + defaultMode: 420 + - name: configmap-mount-test2 + configMap: + name: mount-test2 + defaultMode: 420 + containers: + - name: otc-container + volumeMounts: + - name: otc-internal + mountPath: /conf + - name: configmap-mount-test1 + mountPath: /var/conf/configmap-mount-test1 + - name: configmap-mount-test2 + mountPath: /var/conf/dir/configmap-mount-test2 +status: + readyReplicas: 1 diff --git a/tests/e2e/multiple-configmaps/00-install.yaml b/tests/e2e/multiple-configmaps/00-install.yaml new file mode 100644 index 000000000..0dc18245f --- /dev/null +++ b/tests/e2e/multiple-configmaps/00-install.yaml @@ -0,0 +1,43 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: mount-test1 +data: + export.ini: | + - EXPORT=true +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mount-test2 +data: + otel.ini: | + - OTEL_ENDPOINT=localhost +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest-with-configmaps +spec: + mode: "deployment" + configmaps: + - name: mount-test1 + mountpath: / + - name: mount-test2 + mountpath: /dir + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From de281edc0bebd05514b81db4487d393d2e064544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 11:00:10 -0400 Subject: [PATCH 1027/1234] Bump go.opentelemetry.io/otel from 1.17.0 to 1.18.0 (#2110) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.17.0 to 1.18.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.17.0...v1.18.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c7ced2490..c4f6d3bce 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/otel v1.17.0 + go.opentelemetry.io/otel v1.18.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.2 k8s.io/apiextensions-apiserver v0.28.2 @@ -132,7 +132,7 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.17.0 // indirect + go.opentelemetry.io/otel/trace v1.18.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.13.0 // indirect diff --git a/go.sum b/go.sum index 913fb4dd3..fee311ee0 100644 --- a/go.sum +++ b/go.sum @@ -527,10 +527,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.17.0 h1:MW+phZ6WZ5/uk2nd93ANk/6yJ+dVrvNWUjGhnnFU5jM= -go.opentelemetry.io/otel v1.17.0/go.mod h1:I2vmBGtFaODIVMBSTPVDlJSzBDNf93k60E6Ft0nyjo0= -go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ= -go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY= +go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= +go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= +go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= +go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= From 7d0fe427ef60743019439fb257131357243b7d05 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 18 Sep 2023 08:00:46 -0700 Subject: [PATCH 1028/1234] Update the OpenTelemetry Java agent version to 1.30.0 (#2127) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 5e57fb895..034552a83 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.29.0 +1.30.0 From c85ee3fd196a1cc62ad9417d9f0ef6c051031064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 18 Sep 2023 17:01:31 +0200 Subject: [PATCH 1029/1234] [dotnet-auto] Add support for musl based images (#2103) * [dotnet-auto] Add support for musl based images * PR feedback * scaffolding based on instrumentation-dotnet * adjust code to use musl annotation * include value in the error * add missing annotation * PR feedback - typo fix * PR feedback - use official .NET RID names --- .chloggen/1849-dotnet-auto-musl-support.yaml | 16 ++ README.md | 7 +- pkg/instrumentation/annotation.go | 1 + pkg/instrumentation/dotnet.go | 22 +- pkg/instrumentation/dotnet_test.go | 208 +++++++++++++++++- pkg/instrumentation/podmutator_test.go | 8 +- pkg/instrumentation/sdk_test.go | 2 +- .../00-install-collector.yaml | 32 +++ .../00-install-instrumentation.yaml | 26 +++ .../01-assert.yaml | 66 ++++++ .../01-install-app.yaml | 29 +++ 11 files changed, 409 insertions(+), 8 deletions(-) create mode 100644 .chloggen/1849-dotnet-auto-musl-support.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml diff --git a/.chloggen/1849-dotnet-auto-musl-support.yaml b/.chloggen/1849-dotnet-auto-musl-support.yaml new file mode 100644 index 000000000..fc5d7fc10 --- /dev/null +++ b/.chloggen/1849-dotnet-auto-musl-support.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: .NET Automatic Instrumentation support for Alpine-based images + +# One or more tracking issues related to the change +issues: [1849] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index 7061667d6..7ab43f964 100644 --- a/README.md +++ b/README.md @@ -254,9 +254,14 @@ Python: instrumentation.opentelemetry.io/inject-python: "true" ``` -DotNet: +.NET: +.NET auto-instrumentation also honors an annotation that will be used to set the .NET [Runtime Identifiers](https://learn.microsoft.com/en-us/dotnet/core/rid-catalog)(RIDs). +Currently, only two RIDs are supported: `linux-x64` and `linux-musl-x64`. +By default `linux-x64` is used. ```bash instrumentation.opentelemetry.io/inject-dotnet: "true" +instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-x64" # for Linux glibc based images, this is default value and can be omitted +instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-musl-x64" # for Linux musl based images ``` Go: diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 6c518cf54..661bfc785 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -27,6 +27,7 @@ const ( annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" + annotationDotNetRuntime = "instrumentation.opentelemetry.io/otel-dotnet-auto-runtime" annotationInjectGo = "instrumentation.opentelemetry.io/inject-go" annotationGoExecPath = "instrumentation.opentelemetry.io/otel-go-auto-target-exe" annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 901cb623c..c78d33982 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -33,13 +33,20 @@ const ( envDotNetOTelAutoHome = "OTEL_DOTNET_AUTO_HOME" dotNetCoreClrEnableProfilingEnabled = "1" dotNetCoreClrProfilerID = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - dotNetCoreClrProfilerPath = "/otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetCoreClrProfilerGlibcPath = "/otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetCoreClrProfilerMuslPath = "/otel-auto-instrumentation/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so" dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" dotNetOTelAutoHomePath = "/otel-auto-instrumentation" dotNetSharedStorePath = "/otel-auto-instrumentation/store" dotNetStartupHookPath = "/otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" ) +// Supported .NET runtime identifiers (https://learn.microsoft.com/en-us/dotnet/core/rid-catalog), can be set by instrumentation.opentelemetry.io/inject-dotnet. +const ( + dotNetRuntimeLinuxGlibc = "linux-x64" + dotNetRuntimeLinuxMusl = "linux-musl-x64" +) + func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (corev1.Pod, error) { // caller checks if there is at least one container. @@ -62,6 +69,17 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec") } + runtime := pod.Annotations[annotationDotNetRuntime] + coreClrProfilerPath := "" + switch runtime { + case "", dotNetRuntimeLinuxGlibc: + coreClrProfilerPath = dotNetCoreClrProfilerGlibcPath + case dotNetRuntimeLinuxMusl: + coreClrProfilerPath = dotNetCoreClrProfilerMuslPath + default: + return pod, fmt.Errorf("provided instrumentation.opentelemetry.io/dotnet-runtime annotation value '%s' is not supported", runtime) + } + // inject .NET instrumentation spec env vars. for _, env := range dotNetSpec.Env { idx := getIndexOfEnv(container.Env, env.Name) @@ -79,7 +97,7 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor setDotNetEnvVar(container, envDotNetCoreClrProfiler, dotNetCoreClrProfilerID, doNotConcatEnvValues) - setDotNetEnvVar(container, envDotNetCoreClrProfilerPath, dotNetCoreClrProfilerPath, doNotConcatEnvValues) + setDotNetEnvVar(container, envDotNetCoreClrProfilerPath, coreClrProfilerPath, doNotConcatEnvValues) setDotNetEnvVar(container, envDotNetStartupHook, dotNetStartupHookPath, concatEnvValues) diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 9f4cc9e29..b89f4b9e2 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -20,6 +20,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -85,7 +86,7 @@ func TestInjectDotNetSDK(t *testing.T) { }, { Name: envDotNetCoreClrProfilerPath, - Value: dotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, }, { Name: envDotNetStartupHook, @@ -365,6 +366,211 @@ func TestInjectDotNetSDK(t *testing.T) { }, err: fmt.Errorf("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec"), }, + { + name: "runtime linux-x64", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}, Resources: testResourceRequirements}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: dotNetRuntimeLinuxGlibc, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + Resources: testResourceRequirements, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + }, + }, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: dotNetRuntimeLinuxGlibc, + }, + }, + }, + err: nil, + }, + { + name: "runtime linux-musl-x64", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}, Resources: testResourceRequirements}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: volumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: initContainerName, + Image: "foo/bar:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }}, + Resources: testResourceRequirements, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: volumeName, + MountPath: "/otel-auto-instrumentation", + }, + }, + Env: []corev1.EnvVar{ + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerMuslPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + }, + }, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, + }, + }, + }, + err: nil, + }, + { + name: "runtime not-supported", + DotNet: v1alpha1.DotNet{Image: "foo/bar:1", Env: []corev1.EnvVar{}, Resources: testResourceRequirements}, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: "not-supported", + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationDotNetRuntime: "not-supported", + }, + }, + }, + err: fmt.Errorf("provided instrumentation.opentelemetry.io/dotnet-runtime annotation value 'not-supported' is not supported"), + }, } for _, test := range tests { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 624b11935..92964ff0d 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -910,7 +910,8 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectDotNet: "true", + annotationInjectDotNet: "true", + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, }, }, Spec: corev1.PodSpec{ @@ -924,7 +925,8 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectDotNet: "true", + annotationInjectDotNet: "true", + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, }, }, Spec: corev1.PodSpec{ @@ -971,7 +973,7 @@ func TestMutatePod(t *testing.T) { }, { Name: envDotNetCoreClrProfilerPath, - Value: dotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerMuslPath, }, { Name: envDotNetStartupHook, diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 6c762ca9a..0a1fbcb2c 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -888,7 +888,7 @@ func TestInjectDotNet(t *testing.T) { }, { Name: envDotNetCoreClrProfilerPath, - Value: dotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, }, { Name: envDotNetStartupHook, diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml new file mode 100644 index 000000000..b03a72e60 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml @@ -0,0 +1,32 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml new file mode 100644 index 000000000..80ca25ca5 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml @@ -0,0 +1,26 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: dotnet +spec: + env: + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3multi + sampler: + type: parentbased_traceidratio + argument: "0.25" diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml new file mode 100644 index 000000000..e3b160a27 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-musl-x64" + labels: + app: my-pod-with-sidecar +spec: + containers: + - name: myapp + env: + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so + - name: DOTNET_STARTUP_HOOKS + value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + - name: DOTNET_ADDITIONAL_DEPS + value: /otel-auto-instrumentation/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation/store + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_EXPORTER_OTLP_TIMEOUT + value: "20" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED + value: "true" + - name: OTEL_SERVICE_NAME + value: my-deployment-with-sidecar + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3multi + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation + name: opentelemetry-auto-instrumentation + - name: otc-container + initContainers: + - name: opentelemetry-auto-instrumentation + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + resources: + limits: + cpu: "500m" + memory: "128Mi" + requests: + cpu: "50m" + memory: "128Mi" +status: + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml new file mode 100644 index 000000000..c987a0e56 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-sidecar +spec: + selector: + matchLabels: + app: my-pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-musl-x64" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] From ed407f1ab187c0714f5ee8d5610c0d567d539494 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 20 Sep 2023 10:34:57 -0400 Subject: [PATCH 1030/1234] Refactor Reconciliation Flow (#1995) * save * bump * :shrug: * should b good * change delete logic * change error comparison * gomod * Working status * remove cruft * fix selector check for deepequals * add controller references * Fix lint and test * facepalm * Record field * Fix diffing bug * Add lots of tests * Remove old logic entirely * dont forget the kube builder * update comment, reusable builder * respond to feedback * update based on feedback * update comments, remove method that does nothing * naming --- .chloggen/reconcile-change.yaml | 16 + ...emetry-operator.clusterserviceversion.yaml | 50 +- config/rbac/role.yaml | 50 +- controllers/builder_test.go | 601 ++++++++++++++++++ .../opentelemetrycollector_controller.go | 171 +++-- .../opentelemetrycollector_controller_test.go | 77 +-- controllers/reconcile_test.go | 569 +++++++++++++++++ controllers/suite_test.go | 184 ++++++ controllers/testdata/ingress_testdata.yaml | 16 + controllers/testdata/test.yaml | 22 + controllers/testdata/test_ta_update.yaml | 22 + go.mod | 2 +- internal/manifests/builder.go | 9 + .../collector/adapters/config_to_ports.go | 2 +- internal/manifests/collector/collector.go | 8 +- internal/manifests/collector/container.go | 11 +- .../collector/horizontalpodautoscaler.go | 2 +- internal/manifests/collector/suite_test.go | 147 +---- internal/manifests/mutate.go | 355 +++++++++++ .../targetallocator/targetallocator.go | 8 +- .../status/collector.go | 49 +- internal/status/handle.go | 72 +++ pkg/collector/reconcile/configmap.go | 165 ----- pkg/collector/reconcile/configmap_test.go | 178 ------ pkg/collector/reconcile/daemonset.go | 147 ----- pkg/collector/reconcile/daemonset_test.go | 163 ----- pkg/collector/reconcile/deployment.go | 167 ----- pkg/collector/reconcile/deployment_test.go | 388 ----------- .../reconcile/horizontalpodautoscaler.go | 206 ------ .../reconcile/horizontalpodautoscaler_test.go | 243 ------- pkg/collector/reconcile/ingress.go | 150 ----- pkg/collector/reconcile/ingress_test.go | 117 ---- pkg/collector/reconcile/opentelemetry_test.go | 42 -- pkg/collector/reconcile/route.go | 2 + pkg/collector/reconcile/route_test.go | 19 - pkg/collector/reconcile/service.go | 153 ----- pkg/collector/reconcile/service_test.go | 145 ----- pkg/collector/reconcile/serviceaccount.go | 142 ----- .../reconcile/serviceaccount_test.go | 126 ---- pkg/collector/reconcile/servicemonitor.go | 149 ----- .../reconcile/servicemonitor_test.go | 134 ---- pkg/collector/reconcile/statefulset.go | 189 ------ pkg/collector/reconcile/statefulset_test.go | 209 ------ pkg/collector/reconcile/suite_test.go | 14 +- 44 files changed, 2019 insertions(+), 3672 deletions(-) create mode 100755 .chloggen/reconcile-change.yaml create mode 100644 controllers/builder_test.go create mode 100644 controllers/reconcile_test.go create mode 100644 controllers/testdata/ingress_testdata.yaml create mode 100644 controllers/testdata/test.yaml create mode 100644 controllers/testdata/test_ta_update.yaml create mode 100644 internal/manifests/mutate.go rename pkg/collector/reconcile/opentelemetry.go => internal/status/collector.go (64%) create mode 100644 internal/status/handle.go delete mode 100644 pkg/collector/reconcile/configmap.go delete mode 100644 pkg/collector/reconcile/configmap_test.go delete mode 100644 pkg/collector/reconcile/daemonset.go delete mode 100644 pkg/collector/reconcile/daemonset_test.go delete mode 100644 pkg/collector/reconcile/deployment.go delete mode 100644 pkg/collector/reconcile/deployment_test.go delete mode 100644 pkg/collector/reconcile/horizontalpodautoscaler.go delete mode 100644 pkg/collector/reconcile/horizontalpodautoscaler_test.go delete mode 100644 pkg/collector/reconcile/ingress.go delete mode 100644 pkg/collector/reconcile/ingress_test.go delete mode 100644 pkg/collector/reconcile/opentelemetry_test.go delete mode 100644 pkg/collector/reconcile/service.go delete mode 100644 pkg/collector/reconcile/service_test.go delete mode 100644 pkg/collector/reconcile/serviceaccount.go delete mode 100644 pkg/collector/reconcile/serviceaccount_test.go delete mode 100644 pkg/collector/reconcile/servicemonitor.go delete mode 100644 pkg/collector/reconcile/servicemonitor_test.go delete mode 100644 pkg/collector/reconcile/statefulset.go delete mode 100644 pkg/collector/reconcile/statefulset_test.go diff --git a/.chloggen/reconcile-change.yaml b/.chloggen/reconcile-change.yaml new file mode 100755 index 000000000..259a99476 --- /dev/null +++ b/.chloggen/reconcile-change.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduces a new method of reconciliation to reduce duplication and complexity + +# One or more tracking issues related to the change +issues: [1959] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 2a1ce63df..6f43cb076 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -110,6 +110,8 @@ spec: - "" resources: - configmaps + - serviceaccounts + - services verbs: - create - delete @@ -132,46 +134,12 @@ spec: verbs: - list - watch - - apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - apps resources: - daemonsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - deployments + - statefulsets verbs: - create - delete @@ -188,18 +156,6 @@ spec: - get - list - watch - - apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - autoscaling resources: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 33dca0131..093332c89 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -8,6 +8,8 @@ rules: - "" resources: - configmaps + - serviceaccounts + - services verbs: - create - delete @@ -30,46 +32,12 @@ rules: verbs: - list - watch -- apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - apps resources: - daemonsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - deployments + - statefulsets verbs: - create - delete @@ -86,18 +54,6 @@ rules: - get - list - watch -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - autoscaling resources: diff --git a/controllers/builder_test.go b/controllers/builder_test.go new file mode 100644 index 000000000..99e1f3400 --- /dev/null +++ b/controllers/builder_test.go @@ -0,0 +1,601 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/require" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +var ( + selectorLabels = map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + } + basePolicy = corev1.ServiceInternalTrafficPolicyCluster + pathTypePrefix = networkingv1.PathTypePrefix +) + +func TestBuildAll(t *testing.T) { + var goodConfig = `receivers: + examplereceiver: + endpoint: "0.0.0.0:12345" +service: + pipelines: + metrics: + receivers: [examplereceiver] + exporters: [logging] +` + one := int32(1) + type args struct { + instance v1alpha1.OpenTelemetryCollector + } + tests := []struct { + name string + args args + want []client.Object + wantErr bool + }{ + { + name: "base case", + args: args{ + instance: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + Mode: "deployment", + Image: "test", + Config: goodConfig, + }, + }, + }, + want: []client.Object{ + &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: selectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otc-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-collector", + }, + Items: []corev1.KeyToPath{ + { + Key: "collector.yaml", + Path: "collector.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "otc-container", + Image: "test", + Args: []string{ + "--config=/conf/collector.yaml", + }, + Ports: []corev1.ContainerPort{ + { + Name: "examplereceiver", + HostPort: 0, + ContainerPort: 12345, + }, + { + Name: "metrics", + HostPort: 0, + ContainerPort: 8888, + Protocol: "TCP", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "otc-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "test-collector", + }, + }, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-headless", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + "operator.opentelemetry.io/collector-headless-service": "Exists", + }, + Annotations: map[string]string{ + "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", + }, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + ClusterIP: "None", + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-monitoring", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector-monitoring", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "monitoring", + Port: 8888, + }, + }, + Selector: selectorLabels, + }, + }, + }, + wantErr: false, + }, + { + name: "ingress", + args: args{ + instance: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + Mode: "deployment", + Image: "test", + Ingress: v1alpha1.Ingress{ + Type: v1alpha1.IngressTypeNginx, + Hostname: "example.com", + Annotations: map[string]string{ + "something": "true", + }, + }, + Config: goodConfig, + }, + }, + }, + want: []client.Object{ + &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: selectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otc-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-collector", + }, + Items: []corev1.KeyToPath{ + { + Key: "collector.yaml", + Path: "collector.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "otc-container", + Image: "test", + Args: []string{ + "--config=/conf/collector.yaml", + }, + Ports: []corev1.ContainerPort{ + { + Name: "examplereceiver", + HostPort: 0, + ContainerPort: 12345, + }, + { + Name: "metrics", + HostPort: 0, + ContainerPort: 8888, + Protocol: "TCP", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "otc-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "test-collector", + }, + }, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-headless", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + "operator.opentelemetry.io/collector-headless-service": "Exists", + }, + Annotations: map[string]string{ + "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", + }, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + ClusterIP: "None", + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-monitoring", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector-monitoring", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "monitoring", + Port: 8888, + }, + }, + Selector: selectorLabels, + }, + }, + &networkingv1.Ingress{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-ingress", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-ingress", + }, + Annotations: map[string]string{ + "something": "true", + }, + }, + Spec: networkingv1.IngressSpec{ + Rules: []networkingv1.IngressRule{ + { + Host: "example.com", + IngressRuleValue: networkingv1.IngressRuleValue{ + HTTP: &networkingv1.HTTPIngressRuleValue{ + Paths: []networkingv1.HTTPIngressPath{ + { + Path: "/examplereceiver", + PathType: &pathTypePrefix, + Backend: networkingv1.IngressBackend{ + Service: &networkingv1.IngressServiceBackend{ + Name: "test-collector", + Port: networkingv1.ServiceBackendPort{ + Name: "examplereceiver", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := config.New( + config.WithCollectorImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + ) + reconciler := NewReconciler(Params{ + Log: logr.Discard(), + Config: cfg, + }) + params := reconciler.getParams(tt.args.instance) + got, err := reconciler.BuildAll(params) + if (err != nil) != tt.wantErr { + t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) + return + } + require.Equal(t, tt.want, got) + }) + } +} diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 1605004be..65caeb303 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -17,6 +17,7 @@ package controllers import ( "context" + "errors" "fmt" "sync" @@ -26,6 +27,7 @@ import ( autoscalingv2 "k8s.io/api/autoscaling/v2" autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" + rbacv1 "k8s.io/api/rbac/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" @@ -35,6 +37,9 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" + "github.com/open-telemetry/opentelemetry-operator/internal/status" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" @@ -114,6 +119,73 @@ func (r *OpenTelemetryCollectorReconciler) removeRouteTask(ora autodetect.OpenSh return nil } +func (r *OpenTelemetryCollectorReconciler) doCRUD(ctx context.Context, params manifests.Params) error { + // Collect all objects owned by the operator, to be able to prune objects + // which exist in the cluster but are not managed by the operator anymore. + desiredObjects, err := r.BuildAll(params) + if err != nil { + return err + } + var errs []error + for _, desired := range desiredObjects { + l := r.log.WithValues( + "object_name", desired.GetName(), + "object_kind", desired.GetObjectKind(), + ) + if isNamespaceScoped(desired) { + if setErr := ctrl.SetControllerReference(¶ms.Instance, desired, params.Scheme); setErr != nil { + l.Error(setErr, "failed to set controller owner reference to desired") + errs = append(errs, setErr) + continue + } + } + + // existing is an object the controller runtime will hydrate for us + // we obtain the existing object by deep copying the desired object because it's the most convenient way + existing := desired.DeepCopyObject().(client.Object) + mutateFn := manifests.MutateFuncFor(existing, desired) + op, crudErr := ctrl.CreateOrUpdate(ctx, r.Client, existing, mutateFn) + if crudErr != nil && errors.Is(crudErr, manifests.ImmutableChangeErr) { + l.Error(crudErr, "detected immutable field change, trying to delete, new object will be created on next reconcile", "existing", existing.GetName()) + delErr := r.Client.Delete(ctx, existing) + if delErr != nil { + return delErr + } + continue + } else if crudErr != nil { + l.Error(crudErr, "failed to configure desired") + errs = append(errs, crudErr) + continue + } + + l.V(1).Info(fmt.Sprintf("desired has been %s", op)) + } + if len(errs) > 0 { + return fmt.Errorf("failed to create objects for Collector %s: %w", params.Instance.GetName(), errors.Join(errs...)) + } + return nil +} + +func isNamespaceScoped(obj client.Object) bool { + switch obj.(type) { + case *rbacv1.ClusterRole, *rbacv1.ClusterRoleBinding: + return false + default: + return true + } +} + +func (r *OpenTelemetryCollectorReconciler) getParams(instance v1alpha1.OpenTelemetryCollector) manifests.Params { + return manifests.Params{ + Config: r.config, + Client: r.Client, + Instance: instance, + Log: r.log, + Scheme: r.scheme, + Recorder: r.recorder, + } +} + // NewReconciler creates a new reconciler for OpenTelemetryCollector objects. func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { r := &OpenTelemetryCollectorReconciler{ @@ -126,70 +198,24 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { } if len(r.tasks) == 0 { - r.tasks = []Task{ - { - reconcile.ConfigMaps, - "config maps", - true, - }, - { - reconcile.ServiceAccounts, - "service accounts", - true, - }, - { - reconcile.Services, - "services", - true, - }, - { - reconcile.Deployments, - "deployments", - true, - }, - { - reconcile.HorizontalPodAutoscalers, - "horizontal pod autoscalers", - true, - }, - { - reconcile.DaemonSets, - "daemon sets", - true, - }, - { - reconcile.StatefulSets, - "stateful sets", - true, - }, - { - reconcile.Ingresses, - "ingresses", - true, - }, - { - reconcile.ServiceMonitors, - "service monitors", - true, - }, - { - reconcile.Self, - "opentelemetry", - true, - }, - } + // TODO: put this in line with the rest of how we generate manifests + // https://github.com/open-telemetry/opentelemetry-operator/issues/2108 r.config.RegisterOpenShiftRoutesChangeCallback(r.onOpenShiftRoutesChange) } return r } +// +kubebuilder:rbac:groups="",resources=configmaps;services;serviceaccounts,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch +// +kubebuilder:rbac:groups=apps,resources=daemonsets;deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update +// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch -// +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update -// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state. func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -213,20 +239,13 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, nil } - params := manifests.Params{ - Config: r.config, - Client: r.Client, - Instance: instance, - Log: log, - Scheme: r.scheme, - Recorder: r.recorder, - } - + params := r.getParams(instance) if err := r.RunTasks(ctx, params); err != nil { return ctrl.Result{}, err } - return ctrl.Result{}, nil + err := r.doCRUD(ctx, params) + return status.HandleReconcileStatus(ctx, log, params, err) } // RunTasks runs all the tasks associated with this reconciler. @@ -246,13 +265,29 @@ func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params } } } - return nil } +// BuildAll returns the generation and collected errors of all manifests for a given instance. +func (r *OpenTelemetryCollectorReconciler) BuildAll(params manifests.Params) ([]client.Object, error) { + builders := []manifests.Builder{ + collector.Build, + targetallocator.Build, + } + var resources []client.Object + for _, builder := range builders { + objs, err := builder(params) + if err != nil { + return nil, err + } + resources = append(resources, objs...) + } + return resources, nil +} + // SetupWithManager tells the manager what our controller is interested in. func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { - err := r.config.AutoDetect() // We need to call this so we can get the correct autodetect version + err := r.config.AutoDetect() // We need to call this, so we can get the correct autodetect version if err != nil { return err } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 8ad258443..27441d45f 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -27,6 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" "k8s.io/kubectl/pkg/scheme" "sigs.k8s.io/controller-runtime/pkg/client" k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" @@ -60,10 +61,11 @@ func TestNewObjectsOnReconciliation(t *testing.T) { ) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Config: cfg, + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Recorder: record.NewFakeRecorder(10), + Config: cfg, }) require.NoError(t, cfg.AutoDetect()) created := &v1alpha1.OpenTelemetryCollector{ @@ -158,6 +160,12 @@ func TestNewObjectsOnReconciliation(t *testing.T) { // cleanup require.NoError(t, k8sClient.Delete(context.Background(), created)) + // cleanup the deployment deliberately, otherwise a local tester will always fail as there is no gc event. + list := &appsv1.DeploymentList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.Len(t, list.Items, 1) + require.NoError(t, k8sClient.Delete(context.Background(), list.Items[0].DeepCopy())) } func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { @@ -165,10 +173,11 @@ func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { cfg := config.New(config.WithAutoDetect(mockAutoDetector)) nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Config: cfg, + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Recorder: record.NewFakeRecorder(10), + Config: cfg, }) created := &v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -277,58 +286,6 @@ func TestContinueOnRecoverableFailure(t *testing.T) { assert.True(t, taskCalled) } -func TestBreakOnUnrecoverableError(t *testing.T) { - // prepare - cfg := config.New() - taskCalled := false - expectedErr := errors.New("should fail") - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: scheme.Scheme, - Config: cfg, - Tasks: []controllers.Task{ - { - Name: "should-fail", - Do: func(context.Context, manifests.Params) error { - taskCalled = true - return expectedErr - }, - BailOnError: true, - }, - { - Name: "should-not-be-called", - Do: func(context.Context, manifests.Params) error { - assert.Fail(t, "should not have been called") - return nil - }, - }, - }, - }) - created := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - } - err := k8sClient.Create(context.Background(), created) - require.NoError(t, err) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(context.Background(), req) - - // verify - assert.Equal(t, expectedErr, err) - assert.True(t, taskCalled) - - // cleanup - assert.NoError(t, k8sClient.Delete(context.Background(), created)) -} - func TestSkipWhenInstanceDoesNotExist(t *testing.T) { // prepare cfg := config.New() diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go new file mode 100644 index 000000000..3a87607e4 --- /dev/null +++ b/controllers/reconcile_test.go @@ -0,0 +1,569 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers_test + +import ( + "context" + "testing" + + routev1 "github.com/openshift/api/route/v1" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v2" + appsv1 "k8s.io/api/apps/v1" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + v1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/tools/record" + controllerruntime "sigs.k8s.io/controller-runtime" + k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" +) + +const ( + baseTaImage = "something:tag" + updatedTaImage = "another:tag" + expectHostname = "something-else.com" + labelName = "something" + labelVal = "great" + annotationName = "io.opentelemetry/test" + annotationVal = "true" +) + +var ( + extraPorts = v1.ServicePort{ + Name: "port-web", + Protocol: "TCP", + Port: 8080, + TargetPort: intstr.FromInt32(8080), + } +) + +type check func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) + +func newParamsAssertNoErr(t *testing.T, taContainerImage string, file string) manifests.Params { + p, err := newParams(taContainerImage, file) + assert.NoError(t, err) + if len(taContainerImage) == 0 { + p.Instance.Spec.TargetAllocator.Enabled = false + } + return p +} + +func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { + addedMetadataDeployment := paramsWithMode(v1alpha1.ModeDeployment) + addedMetadataDeployment.Instance.Labels = map[string]string{ + labelName: labelVal, + } + addedMetadataDeployment.Instance.Annotations = map[string]string{ + annotationName: annotationVal, + } + deploymentExtraPorts := paramsWithModeAndReplicas(v1alpha1.ModeDeployment, 3) + deploymentExtraPorts.Instance.Spec.Ports = append(deploymentExtraPorts.Instance.Spec.Ports, extraPorts) + ingressParams := newParamsAssertNoErr(t, "", testFileIngress) + ingressParams.Instance.Spec.Ingress.Type = "ingress" + updatedIngressParams := newParamsAssertNoErr(t, "", testFileIngress) + updatedIngressParams.Instance.Spec.Ingress.Type = "ingress" + updatedIngressParams.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} + updatedIngressParams.Instance.Spec.Ingress.Hostname = expectHostname + routeParams := newParamsAssertNoErr(t, "", testFileIngress) + routeParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + routeParams.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + updatedRouteParams := newParamsAssertNoErr(t, "", testFileIngress) + updatedRouteParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + updatedRouteParams.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + updatedRouteParams.Instance.Spec.Ingress.Hostname = expectHostname + + type args struct { + params manifests.Params + // an optional list of updates to supply after the initial object + updates []manifests.Params + } + type want struct { + // result check + result controllerruntime.Result + // a check to run against the current state applied + checks []check + // if an error from creation validation is expected + validateErr assert.ErrorAssertionFunc + // if an error from reconciliation is expected + wantErr assert.ErrorAssertionFunc + } + tests := []struct { + name string + args args + want []want + }{ + { + name: "deployment collector", + args: args{ + params: addedMetadataDeployment, + updates: []manifests.Params{deploymentExtraPorts}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + d := appsv1.Deployment{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(2), *d.Spec.Replicas) + assert.Contains(t, d.Annotations, annotationName) + assert.Contains(t, d.Labels, labelName) + exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(appliedInstance, naming.Service)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(appliedInstance, naming.ServiceAccount)) + assert.NoError(t, err) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + d := appsv1.Deployment{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(3), *d.Spec.Replicas) + // confirm that we don't remove annotations and labels even if we don't set them + assert.Contains(t, d.Annotations, annotationName) + assert.Contains(t, d.Labels, labelName) + actual := v1.Service{} + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.Service)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Contains(t, actual.Spec.Ports, extraPorts) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "invalid mode", + args: args{ + params: paramsWithMode("bad"), + updates: []manifests.Params{}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{}, + wantErr: assert.NoError, + validateErr: func(t assert.TestingT, err2 error, msgAndArgs ...interface{}) bool { + return assert.ErrorContains(t, err2, "Unsupported value: \"bad\"", msgAndArgs) + }, + }, + }, + }, + { + name: "invalid prometheus configuration", + args: args{ + params: newParamsAssertNoErr(t, baseTaImage, testFileIngress), + updates: []manifests.Params{}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{}, + wantErr: assert.NoError, + validateErr: func(t assert.TestingT, err2 error, msgAndArgs ...interface{}) bool { + return assert.ErrorContains(t, err2, "no prometheus available as part of the configuration", msgAndArgs) + }, + }, + }, + }, + { + name: "deployment collector with ingress", + args: args{ + params: ingressParams, + updates: []manifests.Params{updatedIngressParams}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + d := networkingv1.Ingress{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Ingress)) + assert.NoError(t, err) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + d := networkingv1.Ingress{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Ingress)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, "something-else.com", d.Spec.Rules[0].Host) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "deployment collector with routes", + args: args{ + params: routeParams, + updates: []manifests.Params{updatedRouteParams}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + got := routev1.Route{} + nsn := types.NamespacedName{Namespace: appliedInstance.Namespace, Name: "otlp-grpc-test-route"} + exists, err := populateObjectIfExists(t, &got, nsn) + assert.NoError(t, err) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + got := routev1.Route{} + nsn := types.NamespacedName{Namespace: appliedInstance.Namespace, Name: "otlp-grpc-test-route"} + exists, err := populateObjectIfExists(t, &got, nsn) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, "otlp-grpc.something-else.com", got.Spec.Host) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "hpa v2beta2 deployment collector", + args: args{ + params: paramsWithHPA(autodetect.AutoscalingVersionV2Beta2, 3, 5), + updates: []manifests.Params{paramsWithHPA(autodetect.AutoscalingVersionV2Beta2, 1, 9)}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.Equal(t, int32(3), *actual.Spec.MinReplicas) + assert.Equal(t, int32(5), actual.Spec.MaxReplicas) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(9), actual.Spec.MaxReplicas) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "hpa v2 deployment collector", + args: args{ + params: paramsWithHPA(autodetect.AutoscalingVersionV2, 3, 5), + updates: []manifests.Params{paramsWithHPA(autodetect.AutoscalingVersionV2, 1, 9)}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.Equal(t, int32(3), *actual.Spec.MinReplicas) + assert.Equal(t, int32(5), actual.Spec.MaxReplicas) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, hpaErr) + require.Len(t, actual.Spec.Metrics, 1) + assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) + assert.Equal(t, int32(1), *actual.Spec.MinReplicas) + assert.Equal(t, int32(9), actual.Spec.MaxReplicas) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "daemonset collector", + args: args{ + params: paramsWithMode(v1alpha1.ModeDaemonSet), + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + exists, err := populateObjectIfExists(t, &appsv1.DaemonSet{}, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + { + name: "stateful should update collector with TA", + args: args{ + params: paramsWithMode(v1alpha1.ModeStatefulSet), + updates: []manifests.Params{ + newParamsAssertNoErr(t, baseTaImage, promFile), + newParamsAssertNoErr(t, baseTaImage, updatedPromFile), + newParamsAssertNoErr(t, updatedTaImage, updatedPromFile), + }, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &appsv1.StatefulSet{}, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + // Check the TA doesn't exist + exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.False(t, exists) + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.False(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + actual := v1.ConfigMap{} + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(appliedInstance, naming.TargetAllocatorServiceAccount)) + assert.NoError(t, err) + assert.True(t, exists) + + promConfig, err := ta.ConfigToPromConfig(newParamsAssertNoErr(t, baseTaImage, promFile).Instance.Spec.Config) + assert.NoError(t, err) + + taConfig := make(map[interface{}]interface{}) + taConfig["label_selector"] = map[string]string{ + "app.kubernetes.io/instance": "default.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/part-of": "opentelemetry", + } + taConfig["config"] = promConfig["config"] + taConfig["allocation_strategy"] = "least-weighted" + taConfig["prometheus_cr"] = map[string]string{ + "scrape_interval": "30s", + } + taConfigYAML, _ := yaml.Marshal(taConfig) + assert.Equal(t, string(taConfigYAML), actual.Data["targetallocator.yaml"]) + assert.NotContains(t, actual.Data["targetallocator.yaml"], "0.0.0.0:10100") + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + assert.NoError(t, err) + assert.True(t, exists) + actual := v1.ConfigMap{} + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Contains(t, actual.Data["targetallocator.yaml"], "0.0.0.0:10100") + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := appsv1.Deployment{} + exists, err := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, actual.Spec.Template.Spec.Containers[0].Image, updatedTaImage) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + testContext := context.Background() + nsn := types.NamespacedName{Name: tt.args.params.Instance.Name, Namespace: tt.args.params.Instance.Namespace} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Recorder: record.NewFakeRecorder(20), + Config: config.New( + config.WithCollectorImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + ), + }) + assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") + firstCheck := tt.want[0] + createErr := k8sClient.Create(testContext, &tt.args.params.Instance) + if !firstCheck.validateErr(t, createErr) { + return + } + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + got, reconcileErr := reconciler.Reconcile(testContext, req) + if !firstCheck.wantErr(t, reconcileErr) { + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.Instance)) + return + } + assert.Equal(t, firstCheck.result, got) + for _, check := range firstCheck.checks { + check(t, tt.args.params.Instance) + } + // run the next set of checks + for pid, updateParam := range tt.args.updates { + existing := v1alpha1.OpenTelemetryCollector{} + found, err := populateObjectIfExists(t, &existing, nsn) + assert.True(t, found) + assert.NoError(t, err) + + updateParam.Instance.SetResourceVersion(existing.ResourceVersion) + updateParam.Instance.SetUID(existing.UID) + err = k8sClient.Update(testContext, &updateParam.Instance) + assert.NoError(t, err) + if err != nil { + continue + } + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(testContext, req) + // account for already checking the initial group + checkGroup := tt.want[pid+1] + if !checkGroup.wantErr(t, err) { + return + } + assert.Equal(t, checkGroup.result, got) + for _, check := range checkGroup.checks { + check(t, updateParam.Instance) + } + } + // Only delete upon a successful creation + if createErr == nil { + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.Instance)) + } + }) + } +} + +func namespacedObjectName(instance v1alpha1.OpenTelemetryCollector, namingFunc func(string) string) types.NamespacedName { + return types.NamespacedName{ + Namespace: instance.Namespace, + Name: namingFunc(instance.Name), + } +} diff --git a/controllers/suite_test.go b/controllers/suite_test.go index ea3f41fea..bf9bbc1ef 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -26,11 +26,18 @@ import ( "time" routev1 "github.com/openshift/api/route/v1" + v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" + "k8s.io/client-go/tools/record" "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -39,7 +46,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" // +kubebuilder:scaffold:imports ) @@ -51,6 +61,16 @@ var ( cancel context.CancelFunc err error cfg *rest.Config + + instanceUID = uuid.NewUUID() +) + +const ( + defaultCollectorImage = "default-collector" + defaultTaAllocationImage = "default-ta-allocator" + promFile = "testdata/test.yaml" + updatedPromFile = "testdata/test_ta_update.yaml" + testFileIngress = "testdata/ingress_testdata.yaml" ) func TestMain(m *testing.M) { @@ -160,3 +180,167 @@ func TestMain(m *testing.M) { os.Exit(code) } + +func paramsWithMode(mode v1alpha1.Mode) manifests.Params { + replicas := int32(2) + return paramsWithModeAndReplicas(mode, replicas) +} + +func paramsWithModeAndReplicas(mode v1alpha1.Mode, replicas int32) manifests.Params { + configYAML, err := os.ReadFile("testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + return manifests.Params{ + Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + Replicas: &replicas, + Config: string(configYAML), + Mode: mode, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + +func newParams(taContainerImage string, file string) (manifests.Params, error) { + replicas := int32(1) + var configYAML []byte + var err error + + if file == "" { + configYAML, err = os.ReadFile("testdata/test.yaml") + } else { + configYAML, err = os.ReadFile(file) + } + if err != nil { + return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) + } + + cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + + return manifests.Params{ + Config: cfg, + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Image: taContainerImage, + }, + Replicas: &replicas, + Config: string(configYAML), + }, + }, + Scheme: testScheme, + Log: logger, + }, nil +} + +func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion, minReps, maxReps int32) manifests.Params { + configYAML, err := os.ReadFile("testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + + cpuUtilization := int32(90) + + mockAutoDetector := &mockAutoDetect{ + HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { + return autoscalingVersion, nil + }, + } + configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + err = configuration.AutoDetect() + if err != nil { + logger.Error(err, "configuration.autodetect failed") + } + + return manifests.Params{ + Config: configuration, + Client: k8sClient, + Instance: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "hpatest", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + Config: string(configYAML), + Autoscaler: &v1alpha1.AutoscalerSpec{ + MinReplicas: &minReps, + MaxReplicas: &maxReps, + TargetCPUUtilization: &cpuUtilization, + }, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + +func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { + t.Helper() + err := k8sClient.Get(context.Background(), namespacedName, object) + if errors.IsNotFound(err) { + return false, nil + } + if err != nil { + return false, err + } + return true, nil +} diff --git a/controllers/testdata/ingress_testdata.yaml b/controllers/testdata/ingress_testdata.yaml new file mode 100644 index 000000000..70011de0a --- /dev/null +++ b/controllers/testdata/ingress_testdata.yaml @@ -0,0 +1,16 @@ +--- +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:12345 + otlp/test: + protocols: + grpc: + endpoint: 0.0.0.0:12346 + +service: + pipelines: + traces: + receivers: [otlp, otlp/test] + exporters: [nop] diff --git a/controllers/testdata/test.yaml b/controllers/testdata/test.yaml new file mode 100644 index 000000000..abba475c0 --- /dev/null +++ b/controllers/testdata/test.yaml @@ -0,0 +1,22 @@ +processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus, jaeger] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/controllers/testdata/test_ta_update.yaml b/controllers/testdata/test_ta_update.yaml new file mode 100644 index 000000000..b024fede6 --- /dev/null +++ b/controllers/testdata/test_ta_update.yaml @@ -0,0 +1,22 @@ +processors: +receivers: + jaeger: + protocols: + grpc: + prometheus: + config: + scrape_configs: + - job_name: otel-collector + scrape_interval: 10s + static_configs: + - targets: [ '0.0.0.0:8888', '0.0.0.0:9999', '0.0.0.0:10100' ] + +exporters: + logging: + +service: + pipelines: + metrics: + receivers: [prometheus, jaeger] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/go.mod b/go.mod index c4f6d3bce..6389132e5 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ retract v1.51.0 require ( github.com/Masterminds/semver/v3 v3.2.1 github.com/go-logr/logr v1.2.4 + github.com/imdario/mergo v0.3.16 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 @@ -97,7 +98,6 @@ require ( github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect diff --git a/internal/manifests/builder.go b/internal/manifests/builder.go index caaa1c851..d7f298ed5 100644 --- a/internal/manifests/builder.go +++ b/internal/manifests/builder.go @@ -15,6 +15,8 @@ package manifests import ( + "reflect" + "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" @@ -39,3 +41,10 @@ func Factory[T client.Object](f ManifestFactory[T]) K8sManifestFactory { return f(cfg, logger, otelcol) } } + +// ObjectIsNotNil ensures that we only create an object IFF it isn't nil, +// and it's concrete type isn't nil either. This works around the Go type system +// by using reflection to verify its concrete type isn't nil. +func ObjectIsNotNil(obj client.Object) bool { + return obj != nil && !reflect.ValueOf(obj).IsNil() +} diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index 6b11f3c3c..1741e6a18 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -80,7 +80,7 @@ func ConfigToExporterPorts(logger logr.Logger, config map[interface{}]interface{ } exporter, ok := val.(map[interface{}]interface{}) if !ok { - logger.Info("exporter doesn't seem to be a map of properties", "exporter", key) + logger.V(2).Info("exporter doesn't seem to be a map of properties", "exporter", key) exporter = map[interface{}]interface{}{} } diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 7fd2d22a8..7920a9535 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -22,8 +22,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) -// Build is currently unused, but will be implemented to solve -// https://github.com/open-telemetry/opentelemetry-operator/issues/1876 +// Build creates the manifest for the collector resource. func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object var manifestFactories []manifests.K8sManifestFactory @@ -53,10 +52,7 @@ func Build(params manifests.Params) ([]client.Object, error) { res, err := factory(params.Config, params.Log, params.Instance) if err != nil { return nil, err - } else if res != nil { - // because of pointer semantics, res is still nil-able here as this is an interface pointer - // read here for details: - // https://github.com/open-telemetry/opentelemetry-operator/pull/1965#discussion_r1281705719 + } else if manifests.ObjectIsNotNil(res) { resourceManifests = append(resourceManifests, res) } } diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 92d0bf967..0b9d324d8 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -15,6 +15,7 @@ package collector import ( + "errors" "fmt" "path" "sort" @@ -127,11 +128,15 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } var livenessProbe *corev1.Probe - if config, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { - if probe, err := getLivenessProbe(config, otelcol.Spec.LivenessProbe); err == nil { + if configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { + if probe, err := getLivenessProbe(configFromString, otelcol.Spec.LivenessProbe); err == nil { livenessProbe = probe + } else if errors.Is(err, adapters.ErrNoServiceExtensions) { + logger.Info("extensions not configured, skipping liveness probe creation") + } else if errors.Is(err, adapters.ErrNoServiceExtensionHealthCheck) { + logger.Info("healthcheck extension not configured, skipping liveness probe creation") } else { - logger.Error(err, "Cannot create liveness probe.") + logger.Error(err, "cannot create liveness probe.") } } diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index a46d4a48c..c06a16e22 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -43,7 +43,7 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al // defaulting webhook should always set this, but if unset then return nil. if otelcol.Spec.Autoscaler == nil { - logger.Info("Autoscaler field is unset in Spec, skipping") + logger.Info("hpa field is unset in Spec, skipping autoscaler creation") return nil } autoscalingVersion := cfg.AutoscalingVersion() diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index 6def56f8e..4fb783119 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -15,53 +15,24 @@ package collector import ( - "context" - "crypto/tls" "fmt" - "net" "os" - "path/filepath" - "sync" - "testing" - "time" - routev1 "github.com/openshift/api/route/v1" v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/retry" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" logf "sigs.k8s.io/controller-runtime/pkg/log" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" ) var ( - k8sClient client.Client - testEnv *envtest.Environment - testScheme *runtime.Scheme = scheme.Scheme - ctx context.Context - cancel context.CancelFunc - - logger = logf.Log.WithName("unit-tests") - + logger = logf.Log.WithName("unit-tests") instanceUID = uuid.NewUUID() - err error - cfg *rest.Config ) const ( @@ -69,116 +40,6 @@ const ( defaultTaAllocationImage = "default-ta-allocator" ) -func TestMain(m *testing.M) { - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, - CRDInstallOptions: envtest.CRDInstallOptions{ - CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, - }, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, - }, - } - cfg, err = testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err = routev1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - if err = v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - WebhookServer: webhook.NewServer(webhook.Options{ - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - }), - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - LeaderElection: false, - }) - if mgrErr != nil { - fmt.Printf("failed to start webhook server: %v", mgrErr) - os.Exit(1) - } - - if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - go func() { - if err = mgr.Start(ctx); err != nil { - fmt.Printf("failed to start manager: %v", err) - os.Exit(1) - } - }() - - // wait for the webhook server to get ready - wg := &sync.WaitGroup{} - wg.Add(1) - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - go func(wg *sync.WaitGroup) { - defer wg.Done() - if err = retry.OnError(wait.Backoff{ - Steps: 20, - Duration: 10 * time.Millisecond, - Factor: 1.5, - Jitter: 0.1, - Cap: time.Second * 30, - }, func(error) bool { - return true - }, func() error { - // #nosec G402 - conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if tlsErr != nil { - return tlsErr - } - _ = conn.Close() - return nil - }); err != nil { - fmt.Printf("failed to wait for webhook server to be ready: %v", err) - os.Exit(1) - } - }(wg) - wg.Wait() - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} - func deploymentParams() manifests.Params { return paramsWithMode(v1alpha1.ModeDeployment) } @@ -191,7 +52,6 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { } return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), - Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -218,7 +78,6 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { Mode: mode, }, }, - Scheme: testScheme, Log: logger, Recorder: record.NewFakeRecorder(10), } @@ -242,7 +101,6 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, - Client: k8sClient, Instance: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", @@ -272,7 +130,6 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { Config: string(configYAML), }, }, - Scheme: testScheme, - Log: logger, + Log: logger, }, nil } diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go new file mode 100644 index 000000000..b11513f31 --- /dev/null +++ b/internal/manifests/mutate.go @@ -0,0 +1,355 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package manifests + +import ( + "errors" + "fmt" + "reflect" + + "github.com/imdario/mergo" + routev1 "github.com/openshift/api/route/v1" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + appsv1 "k8s.io/api/apps/v1" + autoscalingv2 "k8s.io/api/autoscaling/v2" + autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + rbacv1 "k8s.io/api/rbac/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" +) + +var ( + ImmutableChangeErr = errors.New("immutable field change attempted") +) + +// MutateFuncFor returns a mutate function based on the +// existing resource's concrete type. It supports currently +// only the following types or else panics: +// - ConfigMap +// - Service +// - ServiceAccount +// - ClusterRole +// - ClusterRoleBinding +// - Role +// - RoleBinding +// - Deployment +// - DaemonSet +// - StatefulSet +// - ServiceMonitor +// - Ingress +// - HorizontalPodAutoscaler +// - Route +// - Secret +// In order for the operator to reconcile other types, they must be added here. +// The function returned takes no arguments but instead uses the existing and desired inputs here. Existing is expected +// to be set by the controller-runtime package through a client get call. +func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn { + return func() error { + // Get the existing annotations and override any conflicts with the desired annotations + // This will preserve any annotations on the existing set. + existingAnnotations := existing.GetAnnotations() + if err := mergeWithOverride(&existingAnnotations, desired.GetAnnotations()); err != nil { + return err + } + existing.SetAnnotations(existingAnnotations) + + // Get the existing labels and override any conflicts with the desired labels + // This will preserve any labels on the existing set. + existingLabels := existing.GetLabels() + if err := mergeWithOverride(&existingLabels, desired.GetLabels()); err != nil { + return err + } + existing.SetLabels(existingLabels) + + if ownerRefs := desired.GetOwnerReferences(); len(ownerRefs) > 0 { + existing.SetOwnerReferences(ownerRefs) + } + + switch existing.(type) { + case *corev1.ConfigMap: + cm := existing.(*corev1.ConfigMap) + wantCm := desired.(*corev1.ConfigMap) + mutateConfigMap(cm, wantCm) + + case *corev1.Service: + svc := existing.(*corev1.Service) + wantSvc := desired.(*corev1.Service) + return mutateService(svc, wantSvc) + + case *corev1.ServiceAccount: + sa := existing.(*corev1.ServiceAccount) + wantSa := desired.(*corev1.ServiceAccount) + mutateServiceAccount(sa, wantSa) + + case *rbacv1.ClusterRole: + cr := existing.(*rbacv1.ClusterRole) + wantCr := desired.(*rbacv1.ClusterRole) + mutateClusterRole(cr, wantCr) + + case *rbacv1.ClusterRoleBinding: + crb := existing.(*rbacv1.ClusterRoleBinding) + wantCrb := desired.(*rbacv1.ClusterRoleBinding) + mutateClusterRoleBinding(crb, wantCrb) + + case *rbacv1.Role: + r := existing.(*rbacv1.Role) + wantR := desired.(*rbacv1.Role) + mutateRole(r, wantR) + + case *rbacv1.RoleBinding: + rb := existing.(*rbacv1.RoleBinding) + wantRb := desired.(*rbacv1.RoleBinding) + mutateRoleBinding(rb, wantRb) + + case *appsv1.Deployment: + dpl := existing.(*appsv1.Deployment) + wantDpl := desired.(*appsv1.Deployment) + return mutateDeployment(dpl, wantDpl) + + case *appsv1.DaemonSet: + dpl := existing.(*appsv1.DaemonSet) + wantDpl := desired.(*appsv1.DaemonSet) + return mutateDaemonset(dpl, wantDpl) + + case *appsv1.StatefulSet: + sts := existing.(*appsv1.StatefulSet) + wantSts := desired.(*appsv1.StatefulSet) + return mutateStatefulSet(sts, wantSts) + + case *monitoringv1.ServiceMonitor: + svcMonitor := existing.(*monitoringv1.ServiceMonitor) + wantSvcMonitor := desired.(*monitoringv1.ServiceMonitor) + mutateServiceMonitor(svcMonitor, wantSvcMonitor) + + case *networkingv1.Ingress: + ing := existing.(*networkingv1.Ingress) + wantIng := desired.(*networkingv1.Ingress) + mutateIngress(ing, wantIng) + + case *autoscalingv2beta2.HorizontalPodAutoscaler: + existingHPA := existing.(*autoscalingv2beta2.HorizontalPodAutoscaler) + desiredHPA := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler) + mutateV2BetaHPA(existingHPA, desiredHPA) + + case *autoscalingv2.HorizontalPodAutoscaler: + existingHPA := existing.(*autoscalingv2.HorizontalPodAutoscaler) + desiredHPA := desired.(*autoscalingv2.HorizontalPodAutoscaler) + mutateAutoscalingHPA(existingHPA, desiredHPA) + + case *routev1.Route: + rt := existing.(*routev1.Route) + wantRt := desired.(*routev1.Route) + mutateRoute(rt, wantRt) + + case *corev1.Secret: + pr := existing.(*corev1.Secret) + wantPr := desired.(*corev1.Secret) + mutateSecret(pr, wantPr) + + default: + t := reflect.TypeOf(existing).String() + return fmt.Errorf("missing mutate implementation for resource type: %s", t) + } + return nil + } +} + +func mergeWithOverride(dst, src interface{}) error { + return mergo.Merge(dst, src, mergo.WithOverride) +} + +func mutateSecret(existing, desired *corev1.Secret) { + existing.Labels = desired.Labels + existing.Annotations = desired.Annotations + existing.Data = desired.Data +} + +func mutateConfigMap(existing, desired *corev1.ConfigMap) { + existing.BinaryData = desired.BinaryData + existing.Data = desired.Data +} + +func mutateServiceAccount(existing, desired *corev1.ServiceAccount) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels +} + +func mutateClusterRole(existing, desired *rbacv1.ClusterRole) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Rules = desired.Rules +} + +func mutateClusterRoleBinding(existing, desired *rbacv1.ClusterRoleBinding) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Subjects = desired.Subjects +} + +func mutateRole(existing, desired *rbacv1.Role) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Rules = desired.Rules +} + +func mutateRoleBinding(existing, desired *rbacv1.RoleBinding) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Subjects = desired.Subjects +} + +func mutateV2BetaHPA(existing, desired *autoscalingv2beta2.HorizontalPodAutoscaler) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + +func mutateAutoscalingHPA(existing, desired *autoscalingv2.HorizontalPodAutoscaler) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + +func mutateIngress(existing, desired *networkingv1.Ingress) { + existing.Labels = desired.Labels + existing.Annotations = desired.Annotations + existing.Spec.DefaultBackend = desired.Spec.DefaultBackend + existing.Spec.Rules = desired.Spec.Rules + existing.Spec.TLS = desired.Spec.TLS +} + +func mutateRoute(existing, desired *routev1.Route) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + +func mutateServiceMonitor(existing, desired *monitoringv1.ServiceMonitor) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + +func mutateService(existing, desired *corev1.Service) error { + existing.Spec.Ports = desired.Spec.Ports + if err := mergeWithOverride(&existing.Spec.Selector, desired.Spec.Selector); err != nil { + return err + } + return nil +} + +func mutateDaemonset(existing, desired *appsv1.DaemonSet) error { + if !existing.CreationTimestamp.IsZero() && !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + return ImmutableChangeErr + } + // Daemonset selector is immutable so we set this value only if + // a new object is going to be created + if existing.CreationTimestamp.IsZero() { + existing.Spec.Selector = desired.Spec.Selector + } + + if err := mergeWithOverride(&existing.Spec, desired.Spec); err != nil { + return err + } + return nil +} + +func mutateDeployment(existing, desired *appsv1.Deployment) error { + if !existing.CreationTimestamp.IsZero() && !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + return ImmutableChangeErr + } + // Deployment selector is immutable so we set this value only if + // a new object is going to be created + if existing.CreationTimestamp.IsZero() { + existing.Spec.Selector = desired.Spec.Selector + } + existing.Spec.Replicas = desired.Spec.Replicas + if err := mergeWithOverride(&existing.Spec.Template, desired.Spec.Template); err != nil { + return err + } + if err := mergeWithOverride(&existing.Spec.Strategy, desired.Spec.Strategy); err != nil { + return err + } + return nil +} + +func mutateStatefulSet(existing, desired *appsv1.StatefulSet) error { + if hasChange, field := hasImmutableFieldChange(existing, desired); hasChange { + return fmt.Errorf("%s is being changed, %w", field, ImmutableChangeErr) + } + // StatefulSet selector is immutable so we set this value only if + // a new object is going to be created + if existing.CreationTimestamp.IsZero() { + existing.Spec.Selector = desired.Spec.Selector + } + existing.Spec.PodManagementPolicy = desired.Spec.PodManagementPolicy + existing.Spec.Replicas = desired.Spec.Replicas + + for i := range existing.Spec.VolumeClaimTemplates { + existing.Spec.VolumeClaimTemplates[i].TypeMeta = desired.Spec.VolumeClaimTemplates[i].TypeMeta + existing.Spec.VolumeClaimTemplates[i].ObjectMeta = desired.Spec.VolumeClaimTemplates[i].ObjectMeta + existing.Spec.VolumeClaimTemplates[i].Spec = desired.Spec.VolumeClaimTemplates[i].Spec + } + if err := mergeWithOverride(&existing.Spec.Template, desired.Spec.Template); err != nil { + return err + } + return nil +} + +func hasImmutableFieldChange(existing, desired *appsv1.StatefulSet) (bool, string) { + if existing.CreationTimestamp.IsZero() { + return false, "" + } + if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { + return true, fmt.Sprintf("Spec.Selector: desired: %s existing: %s", desired.Spec.Selector, existing.Spec.Selector) + } + + if hasVolumeClaimsTemplatesChanged(existing, desired) { + return true, "Spec.VolumeClaimTemplates" + } + + return false, "" +} + +// hasVolumeClaimsTemplatesChanged if volume claims template change has been detected. +// We need to do this manually due to some fields being automatically filled by the API server +// and these needs to be excluded from the comparison to prevent false positives. +func hasVolumeClaimsTemplatesChanged(existing, desired *appsv1.StatefulSet) bool { + if len(desired.Spec.VolumeClaimTemplates) != len(existing.Spec.VolumeClaimTemplates) { + return true + } + + for i := range desired.Spec.VolumeClaimTemplates { + // VolumeMode is automatically set by the API server, so if it is not set in the CR, assume it's the same as the existing one. + if desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == nil || *desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == "" { + desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode = existing.Spec.VolumeClaimTemplates[i].Spec.VolumeMode + } + + if desired.Spec.VolumeClaimTemplates[i].Name != existing.Spec.VolumeClaimTemplates[i].Name { + return true + } + if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Annotations, existing.Spec.VolumeClaimTemplates[i].Annotations) { + return true + } + if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Spec, existing.Spec.VolumeClaimTemplates[i].Spec) { + return true + } + } + + return false +} diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 3a5146af3..2a21ccdfd 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -20,8 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) -// Build is currently unused, but will be implemented to solve -// https://github.com/open-telemetry/opentelemetry-operator/issues/1876 +// Build creates the manifest for the TargetAllocator resource. func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object if !params.Instance.Spec.TargetAllocator.Enabled { @@ -37,10 +36,7 @@ func Build(params manifests.Params) ([]client.Object, error) { res, err := factory(params.Config, params.Log, params.Instance) if err != nil { return nil, err - } else if res != nil { - // because of pointer semantics, res is still nil-able here as this is an interface pointer - // read here for details: - // https://github.com/open-telemetry/opentelemetry-operator/pull/1965#discussion_r1281705719 + } else if manifests.ObjectIsNotNil(res) { resourceManifests = append(resourceManifests, res) } } diff --git a/pkg/collector/reconcile/opentelemetry.go b/internal/status/collector.go similarity index 64% rename from pkg/collector/reconcile/opentelemetry.go rename to internal/status/collector.go index e8dcb1dc6..20699bda3 100644 --- a/pkg/collector/reconcile/opentelemetry.go +++ b/internal/status/collector.go @@ -12,71 +12,32 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package reconcile contains reconciliation logic for OpenTelemetry Collector components. -package reconcile +package status import ( "context" "fmt" "strconv" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" - appsv1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/internal/version" - collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" ) -// Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes -// making params.Instance obsolete. Default values should be set in the Defaulter webhook, this should only be used -// for the Status, which can't be set by the defaulter. -func Self(ctx context.Context, params manifests.Params) error { - changed := params.Instance - - up := &collectorupgrade.VersionUpgrade{ - Log: params.Log, - Version: version.Get(), - Client: params.Client, - Recorder: params.Recorder, - } - changed, err := up.ManagedInstance(ctx, changed) - if err != nil { - // don't fail to allow setting the status - params.Log.Error(err, "failed to upgrade the OpenTelemetry CR") - } - - // this field is only changed for new instances: on existing instances this - // field is reconciled when the operator is first started, i.e. during - // the upgrade mechanism - if params.Instance.Status.Version == "" { +func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpenTelemetryCollector) error { + if changed.Status.Version == "" { // a version is not set, otherwise let the upgrade mechanism take care of it! changed.Status.Version = version.OpenTelemetryCollector() } - - if err = updateScaleSubResourceStatus(ctx, params.Client, &changed); err != nil { - return fmt.Errorf("failed to update the scale subresource status for the OpenTelemetry CR: %w", err) - } - - statusPatch := client.MergeFrom(¶ms.Instance) - if err := params.Client.Status().Patch(ctx, &changed, statusPatch); err != nil { - return fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) - } - - return nil -} - -func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpenTelemetryCollector) error { mode := changed.Spec.Mode if mode != v1alpha1.ModeDeployment && mode != v1alpha1.ModeStatefulSet { changed.Status.Scale.Replicas = 0 changed.Status.Scale.Selector = "" - return nil } diff --git a/internal/status/handle.go b/internal/status/handle.go new file mode 100644 index 000000000..0b5614615 --- /dev/null +++ b/internal/status/handle.go @@ -0,0 +1,72 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package status + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/version" + collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" +) + +const ( + eventTypeNormal = "Normal" + eventTypeWarning = "Warning" + + reasonError = "Error" + reasonStatusFailure = "StatusFailure" + reasonInfo = "Info" +) + +// HandleReconcileStatus handles updating the status of the CRDs managed by the operator. +// TODO: make the status more useful https://github.com/open-telemetry/opentelemetry-operator/issues/1972 +func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { + log.V(2).Info("updating collector status") + if err != nil { + params.Recorder.Event(¶ms.Instance, eventTypeWarning, reasonError, err.Error()) + return ctrl.Result{}, err + } + changed := params.Instance.DeepCopy() + + up := &collectorupgrade.VersionUpgrade{ + Log: params.Log, + Version: version.Get(), + Client: params.Client, + Recorder: params.Recorder, + } + upgraded, upgradeErr := up.ManagedInstance(ctx, *changed) + if upgradeErr != nil { + // don't fail to allow setting the status + params.Log.Error(upgradeErr, "failed to upgrade the OpenTelemetry CR") + } + changed = &upgraded + statusErr := UpdateCollectorStatus(ctx, params.Client, changed) + if statusErr != nil { + params.Recorder.Event(changed, eventTypeWarning, reasonStatusFailure, statusErr.Error()) + return ctrl.Result{}, statusErr + } + statusPatch := client.MergeFrom(¶ms.Instance) + if err := params.Client.Status().Patch(ctx, changed, statusPatch); err != nil { + return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) + } + params.Recorder.Event(changed, eventTypeNormal, reasonInfo, "applied status changes") + return ctrl.Result{}, nil +} diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go deleted file mode 100644 index 93be3475d..000000000 --- a/pkg/collector/reconcile/configmap.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - "reflect" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" -) - -// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete - -// ConfigMaps reconciles the config map(s) required for the instance in the current context. -func ConfigMaps(ctx context.Context, params manifests.Params) error { - desired := []*corev1.ConfigMap{ - collector.ConfigMap(params.Config, params.Log, params.Instance), - } - - if params.Instance.Spec.TargetAllocator.Enabled { - cm, err := targetallocator.ConfigMap(params.Config, params.Log, params.Instance) - if err != nil { - return fmt.Errorf("failed to parse config: %w", err) - } - desired = append(desired, cm) - } - - // first, handle the create/update parts - if err := expectedConfigMaps(ctx, params, desired, true); err != nil { - return fmt.Errorf("failed to reconcile the expected configmaps: %w", err) - } - - // then, delete the extra objects - if err := deleteConfigMaps(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the configmaps to be deleted: %w", err) - } - - return nil -} - -func expectedConfigMaps(ctx context.Context, params manifests.Params, expected []*corev1.ConfigMap, retry bool) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.ConfigMap{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - clientGetErr := params.Client.Get(ctx, nns, existing) - if clientGetErr != nil && errors.IsNotFound(clientGetErr) { - if clientCreateErr := params.Client.Create(ctx, desired); clientCreateErr != nil { - if errors.IsAlreadyExists(clientCreateErr) && retry { - // let's try again? we probably had multiple updates at one, and now it exists already - if err := expectedConfigMaps(ctx, params, expected, false); err != nil { - // somethin else happened now... - return err - } - - // we succeeded in the retry, exit this attempt - return nil - } - return fmt.Errorf("failed to create: %w", clientCreateErr) - } - params.Log.V(2).Info("created", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) - continue - } else if clientGetErr != nil { - return fmt.Errorf("failed to get: %w", clientGetErr) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Data = desired.Data - updated.BinaryData = desired.BinaryData - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - if configMapChanged(desired, existing) { - params.Recorder.Event(updated, "Normal", "ConfigUpdate ", fmt.Sprintf("OpenTelemetry Config changed - %s/%s", desired.Namespace, desired.Name)) - } - - params.Log.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) - } - - return nil -} - -func deleteConfigMaps(ctx context.Context, params manifests.Params, expected []*corev1.ConfigMap) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &corev1.ConfigMapList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) - } - } - - return nil -} - -func configMapChanged(desired *corev1.ConfigMap, actual *corev1.ConfigMap) bool { - return !reflect.DeepEqual(desired.Data, actual.Data) - -} diff --git a/pkg/collector/reconcile/configmap_test.go b/pkg/collector/reconcile/configmap_test.go deleted file mode 100644 index 03d8c80df..000000000 --- a/pkg/collector/reconcile/configmap_test.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v2" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" -) - -func TestExpectedConfigMap(t *testing.T) { - t.Run("should create collector and target allocator config maps", func(t *testing.T) { - param := params() - configMap, err := targetallocator.ConfigMap(param.Config, param.Log, param.Instance) - assert.NoError(t, err) - - err = expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance), configMap}, true) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - - exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - }) - - t.Run("should update collector config map", func(t *testing.T) { - - param := manifests.Params{ - Config: config.New(), - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - }, - Log: logger, - } - cm := collector.ConfigMap(param.Config, param.Log, param.Instance) - createObjectIfNotExists(t, "test-collector", cm) - - param = params() - - err := expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance)}, true) - assert.NoError(t, err) - - actual := v1.ConfigMap{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - assert.Equal(t, params().Instance.Spec.Config, actual.Data["collector.yaml"]) - }) - - t.Run("should update target allocator config map", func(t *testing.T) { - - param := manifests.Params{ - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeStatefulSet, - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - }, - Config: "", - }, - }, - } - cm, err := targetallocator.ConfigMap(param.Config, param.Log, param.Instance) - assert.EqualError(t, err, "no receivers available as part of the configuration") - createObjectIfNotExists(t, "test-targetallocator", cm) - - newParam := params() - configMap, err := targetallocator.ConfigMap(newParam.Config, newParam.Log, newParam.Instance) - assert.NoError(t, err) - err = expectedConfigMaps(context.Background(), params(), []*v1.ConfigMap{configMap}, true) - assert.NoError(t, err) - - actual := v1.ConfigMap{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - - promConfig, err := ta.ConfigToPromConfig(params().Instance.Spec.Config) - assert.NoError(t, err) - - taConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/part-of": "opentelemetry", - } - taConfig["config"] = promConfig["config"] - taConfig["allocation_strategy"] = "least-weighted" - taConfigYAML, _ := yaml.Marshal(taConfig) - - assert.Equal(t, string(taConfigYAML), actual.Data["targetallocator.yaml"]) - }) - - t.Run("should delete config map", func(t *testing.T) { - - deletecm := v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-delete-collector", - Namespace: "default", - Labels: map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - } - createObjectIfNotExists(t, "test-delete-collector", &deletecm) - - exists, _ := populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.True(t, exists) - param := params() - err := deleteConfigMaps(context.Background(), params(), []*v1.ConfigMap{collector.ConfigMap(param.Config, param.Log, param.Instance)}) - assert.NoError(t, err) - - exists, _ = populateObjectIfExists(t, &v1.ConfigMap{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.False(t, exists) - }) -} diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go deleted file mode 100644 index 94e1058c0..000000000 --- a/pkg/collector/reconcile/daemonset.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" -) - -// +kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;list;watch;create;update;patch;delete - -// DaemonSets reconciles the daemon set(s) required for the instance in the current context. -func DaemonSets(ctx context.Context, params manifests.Params) error { - var desired []*appsv1.DaemonSet - if params.Instance.Spec.Mode == "daemonset" { - desired = append(desired, collector.DaemonSet(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected daemon sets: %w", err) - } - - // then, delete the extra objects - if err := deleteDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the daemon sets to be deleted: %w", err) - } - - return nil -} - -func expectedDaemonSets(ctx context.Context, params manifests.Params, expected []*appsv1.DaemonSet) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &appsv1.DaemonSet{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector daemonset will be created in the next reconcile cycle", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) - - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to request deleting daemonset: %w", err) - } - continue - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) - } - - return nil -} - -func deleteDaemonSets(ctx context.Context, params manifests.Params, expected []*appsv1.DaemonSet) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &appsv1.DaemonSetList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/daemonset_test.go b/pkg/collector/reconcile/daemonset_test.go deleted file mode 100644 index 9d8021f61..000000000 --- a/pkg/collector/reconcile/daemonset_test.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -func TestExpectedDaemonsets(t *testing.T) { - param := params() - expectedDs := collector.DaemonSet(param.Config, logger, param.Instance) - - t.Run("should create Daemonset", func(t *testing.T) { - err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - - }) - t.Run("should update Daemonset", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", expectedDs) - err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) - assert.NoError(t, err) - - actual := v1.DaemonSet{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - }) - - t.Run("should delete daemonset", func(t *testing.T) { - - labels := map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - } - ds := v1.DaemonSet{} - ds.Name = "dummy" - ds.Namespace = "default" - ds.Labels = labels - ds.Spec = v1.DaemonSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - - createObjectIfNotExists(t, "dummy", &ds) - - err := deleteDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) - assert.NoError(t, err) - - actual := v1.DaemonSet{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.False(t, exists) - - }) - - t.Run("should not delete daemonset", func(t *testing.T) { - - labels := map[string]string{ - "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", - } - ds := v1.DaemonSet{} - ds.Name = "dummy" - ds.Namespace = "default" - ds.Labels = labels - ds.Spec = v1.DaemonSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - - createObjectIfNotExists(t, "dummy", &ds) - - err := deleteDaemonSets(context.Background(), param, []*v1.DaemonSet{expectedDs}) - assert.NoError(t, err) - - actual := v1.DaemonSet{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.True(t, exists) - - }) - - t.Run("change Spec.Selector should recreate daemonset", func(t *testing.T) { - - oldDs := collector.DaemonSet(param.Config, logger, param.Instance) - oldDs.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" - oldDs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" - oldDs.Name = "update-ds" - - err := expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{oldDs}) - assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - - newDs := collector.DaemonSet(param.Config, logger, param.Instance) - newDs.Name = oldDs.Name - err = expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{newDs}) - assert.NoError(t, err) - exists, err = populateObjectIfExists(t, &v1.DaemonSet{}, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) - assert.NoError(t, err) - assert.False(t, exists) - - err = expectedDaemonSets(context.Background(), param, []*v1.DaemonSet{newDs}) - assert.NoError(t, err) - actual := v1.DaemonSet{} - exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, newDs.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) - }) -} diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go deleted file mode 100644 index dab58eac7..000000000 --- a/pkg/collector/reconcile/deployment.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" -) - -// +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete - -// Deployments reconciles the deployment(s) required for the instance in the current context. -func Deployments(ctx context.Context, params manifests.Params) error { - desired := []*appsv1.Deployment{} - if params.Instance.Spec.Mode == "deployment" { - desired = append(desired, collector.Deployment(params.Config, params.Log, params.Instance)) - } - - if params.Instance.Spec.TargetAllocator.Enabled { - desired = append(desired, targetallocator.Deployment(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %w", err) - } - - // then, delete the extra objects - if err := deleteDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %w", err) - } - - return nil -} - -func expectedDeployments(ctx context.Context, params manifests.Params, expected []*appsv1.Deployment) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &appsv1.Deployment{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector deployment will be created in the next reconcile cycle ", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) - - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to delete deployment: %w", err) - } - continue - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) - } - - return nil -} - -func deleteDeployments(ctx context.Context, params manifests.Params, expected []*appsv1.Deployment) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &appsv1.DeploymentList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) - } - } - - return nil -} - -// currentReplicasWithHPA calculates deployment replicas if HPA is enabled. -func currentReplicasWithHPA(spec v1alpha1.OpenTelemetryCollectorSpec, curr int32) int32 { - if curr < *spec.Replicas { - return *spec.Replicas - } - - if curr > *spec.MaxReplicas { - return *spec.MaxReplicas - } - - return curr -} diff --git a/pkg/collector/reconcile/deployment_test.go b/pkg/collector/reconcile/deployment_test.go deleted file mode 100644 index f343bab87..000000000 --- a/pkg/collector/reconcile/deployment_test.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" -) - -func TestExpectedDeployments(t *testing.T) { - param := params() - expectedDeploy := collector.Deployment(param.Config, logger, param.Instance) - expectedTADeploy := targetallocator.Deployment(param.Config, logger, param.Instance) - - t.Run("should create collector deployment", func(t *testing.T) { - err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - - }) - - t.Run("should create target allocator deployment", func(t *testing.T) { - err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedTADeploy}) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - - }) - - t.Run("should not create target allocator deployment when targetallocator is not enabled", func(t *testing.T) { - paramTargetAllocator := manifests.Params{ - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeStatefulSet, - Config: ` - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] - - `, - }, - }, - Log: logger, - } - expected := []*v1.Deployment{} - if paramTargetAllocator.Instance.Spec.TargetAllocator.Enabled { - expected = append(expected, targetallocator.Deployment(paramTargetAllocator.Config, paramTargetAllocator.Log, paramTargetAllocator.Instance)) - } - - assert.Len(t, expected, 0) - }) - - t.Run("should update target allocator deployment when the prometheusCR is updated", func(t *testing.T) { - ctx := context.Background() - createObjectIfNotExists(t, "test-targetallocator", expectedTADeploy) - orgUID := expectedTADeploy.OwnerReferences[0].UID - - updatedParam, err := newParams(expectedTADeploy.Spec.Template.Spec.Containers[0].Image, "") - assert.NoError(t, err) - updatedParam.Instance.Spec.TargetAllocator.PrometheusCR.Enabled = true - updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) - - err = expectedDeployments(ctx, param, []*v1.Deployment{updatedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) - assert.ElementsMatch(t, actual.Spec.Template.Spec.Containers[0].Args, []string{"--enable-prometheus-cr-watcher"}) - assert.Equal(t, int32(1), *actual.Spec.Replicas) - }) - - t.Run("should not update target allocator deployment replicas when collector max replicas is set", func(t *testing.T) { - replicas, maxReplicas := int32(2), int32(10) - oneReplica := int32(1) - paramMaxReplicas := manifests.Params{ - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - MaxReplicas: &maxReplicas, - Replicas: &replicas, - Mode: v1alpha1.ModeStatefulSet, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &oneReplica, - }, - Config: ` - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] - - `, - }, - }, - Log: logger, - } - expected := []*v1.Deployment{} - allocator := targetallocator.Deployment(paramMaxReplicas.Config, paramMaxReplicas.Log, paramMaxReplicas.Instance) - expected = append(expected, allocator) - - assert.Len(t, expected, 1) - assert.Equal(t, *allocator.Spec.Replicas, int32(1)) - }) - - t.Run("should update target allocator deployment replicas when changed", func(t *testing.T) { - initialReplicas, nextReplicas := int32(1), int32(2) - paramReplicas := manifests.Params{ - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Replicas: &initialReplicas, - Mode: v1alpha1.ModeStatefulSet, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &initialReplicas, - }, - Config: ` - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [logging] - - `, - }, - }, - Log: logger, - } - expected := []*v1.Deployment{} - allocator := targetallocator.Deployment(paramReplicas.Config, paramReplicas.Log, paramReplicas.Instance) - expected = append(expected, allocator) - - assert.Len(t, expected, 1) - assert.Equal(t, *allocator.Spec.Replicas, int32(1)) - param.Instance.Spec.TargetAllocator.Replicas = &nextReplicas - finalAllocator := targetallocator.Deployment(param.Config, param.Log, param.Instance) - assert.Equal(t, *finalAllocator.Spec.Replicas, int32(2)) - }) - - t.Run("should update deployment", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", expectedDeploy) - err := expectedDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - assert.Equal(t, int32(2), *actual.Spec.Replicas) - }) - - t.Run("should update target allocator deployment when the container image is updated", func(t *testing.T) { - ctx := context.Background() - createObjectIfNotExists(t, "test-targetallocator", expectedTADeploy) - orgUID := expectedTADeploy.OwnerReferences[0].UID - - updatedParam, err := newParams("test/test-img", "") - assert.NoError(t, err) - updatedDeploy := targetallocator.Deployment(updatedParam.Config, logger, updatedParam.Instance) - - err = expectedDeployments(ctx, param, []*v1.Deployment{updatedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, orgUID, actual.OwnerReferences[0].UID) - assert.NotEqual(t, expectedTADeploy.Spec.Template.Spec.Containers[0].Image, actual.Spec.Template.Spec.Containers[0].Image) - assert.Equal(t, int32(1), *actual.Spec.Replicas) - }) - - t.Run("should delete deployment", func(t *testing.T) { - labels := map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - } - deploy := v1.Deployment{} - deploy.Name = "dummy" - deploy.Namespace = "default" - deploy.Labels = labels - deploy.Spec = v1.DeploymentSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - createObjectIfNotExists(t, "dummy", &deploy) - - err := deleteDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.False(t, exists) - - }) - - t.Run("should not delete deployment", func(t *testing.T) { - labels := map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", - } - deploy := v1.Deployment{} - deploy.Name = "dummy" - deploy.Namespace = "default" - deploy.Spec = v1.DeploymentSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - createObjectIfNotExists(t, "dummy", &deploy) - - err := deleteDeployments(context.Background(), param, []*v1.Deployment{expectedDeploy}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.True(t, exists) - - }) - - t.Run("change Spec.Selector should recreate deployment", func(t *testing.T) { - - oldDeploy := collector.Deployment(param.Config, logger, param.Instance) - oldDeploy.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" - oldDeploy.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" - oldDeploy.Name = "update-deploy" - - err := expectedDeployments(context.Background(), param, []*v1.Deployment{oldDeploy}) - assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) - assert.NoError(t, err) - assert.True(t, exists) - - newDeploy := collector.Deployment(param.Config, logger, param.Instance) - newDeploy.Name = oldDeploy.Name - err = expectedDeployments(context.Background(), param, []*v1.Deployment{newDeploy}) - assert.NoError(t, err) - exists, err = populateObjectIfExists(t, &v1.Deployment{}, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) - assert.NoError(t, err) - assert.False(t, exists) - - err = expectedDeployments(context.Background(), param, []*v1.Deployment{newDeploy}) - assert.NoError(t, err) - actual := v1.Deployment{} - exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldDeploy.Name}) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, newDeploy.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) - }) -} - -func TestCurrentReplicasWithHPA(t *testing.T) { - minReplicas := int32(2) - maxReplicas := int32(5) - spec := v1alpha1.OpenTelemetryCollectorSpec{ - Replicas: &minReplicas, - MaxReplicas: &maxReplicas, - } - - res := currentReplicasWithHPA(spec, 10) - assert.Equal(t, int32(5), res) - - res = currentReplicasWithHPA(spec, 1) - assert.Equal(t, int32(2), res) - - res = currentReplicasWithHPA(spec, 3) - assert.Equal(t, int32(3), res) -} diff --git a/pkg/collector/reconcile/horizontalpodautoscaler.go b/pkg/collector/reconcile/horizontalpodautoscaler.go deleted file mode 100644 index 90c3ae316..000000000 --- a/pkg/collector/reconcile/horizontalpodautoscaler.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" -) - -// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete - -// HorizontalPodAutoscalers reconciles HorizontalPodAutoscalers if autoscale is true and replicas is nil. -func HorizontalPodAutoscalers(ctx context.Context, params manifests.Params) error { - var desired []client.Object - - // check if autoscale mode is on, e.g MaxReplicas is not nil - if params.Instance.Spec.MaxReplicas != nil || (params.Instance.Spec.Autoscaler != nil && params.Instance.Spec.Autoscaler.MaxReplicas != nil) { - if newcol := collector.HorizontalPodAutoscaler(params.Config, params.Log, params.Instance); newcol != nil { - desired = append(desired, newcol) - } - } - - // first, handle the create/update parts - if err := expectedHorizontalPodAutoscalers(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected horizontal pod autoscalers: %w", err) - } - - // then, delete the extra objects - if err := deleteHorizontalPodAutoscalers(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the horizontal pod autoscalers: %w", err) - } - - return nil -} - -func expectedHorizontalPodAutoscalers(ctx context.Context, params manifests.Params, expected []client.Object) error { - autoscalingVersion := params.Config.AutoscalingVersion() - var existing client.Object - if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - existing = &autoscalingv2beta2.HorizontalPodAutoscaler{} - } else { - existing = &autoscalingv2.HorizontalPodAutoscaler{} - } - - for _, obj := range expected { - desired, _ := meta.Accessor(obj) - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - nns := types.NamespacedName{Namespace: desired.GetNamespace(), Name: desired.GetName()} - err := params.Client.Get(ctx, nns, existing) - if k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, obj); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "hpa.name", desired.GetName(), "hpa.namespace", desired.GetNamespace()) - continue - } else if err != nil { - return fmt.Errorf("failed to get %w", err) - } - - updated := existing.DeepCopyObject().(client.Object) - updated.SetOwnerReferences(desired.GetOwnerReferences()) - setAutoscalerSpec(params, autoscalingVersion, updated, obj) - - annotations := updated.GetAnnotations() - for k, v := range desired.GetAnnotations() { - annotations[k] = v - } - updated.SetAnnotations(annotations) - labels := updated.GetLabels() - for k, v := range desired.GetLabels() { - labels[k] = v - } - updated.SetLabels(labels) - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "hpa.name", desired.GetName(), "hpa.namespace", desired.GetNamespace()) - } - - return nil -} - -func setAutoscalerSpec(params manifests.Params, autoscalingVersion autodetect.AutoscalingVersion, updated client.Object, desired client.Object) { - one := int32(1) - if params.Instance.Spec.Autoscaler.MaxReplicas != nil { - if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas - if params.Instance.Spec.Autoscaler.MinReplicas != nil { - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.Autoscaler.MinReplicas - } else { - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.MinReplicas = &one - } - - desiredSpec := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Metrics = desiredSpec.Metrics - updated.(*autoscalingv2beta2.HorizontalPodAutoscaler).Spec.Behavior = desiredSpec.Behavior - } else { // autoscalingv2 - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MaxReplicas = *params.Instance.Spec.Autoscaler.MaxReplicas - if params.Instance.Spec.Autoscaler.MinReplicas != nil { - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = params.Instance.Spec.Autoscaler.MinReplicas - } else { - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.MinReplicas = &one - } - - desiredSpec := desired.(*autoscalingv2.HorizontalPodAutoscaler).Spec - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Metrics = desiredSpec.Metrics - updated.(*autoscalingv2.HorizontalPodAutoscaler).Spec.Behavior = desiredSpec.Behavior - } - } -} - -func deleteHorizontalPodAutoscalers(ctx context.Context, params manifests.Params, expected []client.Object) error { - autoscalingVersion := params.Config.AutoscalingVersion() - - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - - if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - list := &autoscalingv2beta2.HorizontalPodAutoscalerList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, k := range expected { - keep := k.(*autoscalingv2beta2.HorizontalPodAutoscaler) - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) - } - } - } else { - list := &autoscalingv2.HorizontalPodAutoscalerList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, k := range expected { - keep := k.(*autoscalingv2.HorizontalPodAutoscaler) - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "hpa.name", existing.Name, "hpa.namespace", existing.Namespace) - } - } - } - - return nil -} diff --git a/pkg/collector/reconcile/horizontalpodautoscaler_test.go b/pkg/collector/reconcile/horizontalpodautoscaler_test.go deleted file mode 100644 index 38681f74b..000000000 --- a/pkg/collector/reconcile/horizontalpodautoscaler_test.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - "os" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - v1 "k8s.io/api/apps/v1" - autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" -) - -var hpaUpdateErr error -var withHPA bool - -func TestExpectedHPAVersionV2Beta2(t *testing.T) { - params := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) - err := params.Config.AutoDetect() - assert.NoError(t, err) - - expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) - - t.Run("should create HPA", func(t *testing.T) { - err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) - assert.NoError(t, err) - - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - - assert.True(t, exists) - }) - - t.Run("should update HPA", func(t *testing.T) { - minReplicas := int32(1) - maxReplicas := int32(3) - memUtilization := int32(70) - updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2Beta2) - updateParms.Instance.Spec.Autoscaler.MinReplicas = &minReplicas - updateParms.Instance.Spec.Autoscaler.MaxReplicas = &maxReplicas - updateParms.Instance.Spec.Autoscaler.TargetMemoryUtilization = &memUtilization - updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) - - hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - require.NoError(t, hpaUpdateErr) - - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - withHPA, hpaUpdateErr = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, hpaUpdateErr) - assert.True(t, withHPA) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(3), actual.Spec.MaxReplicas) - assert.Len(t, actual.Spec.Metrics, 2) - - // check metric values - for _, metric := range actual.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, int32(90), *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, int32(70), *metric.Resource.Target.AverageUtilization) - } - } - }) - - t.Run("should delete HPA", func(t *testing.T) { - err = deleteHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collecto"}) - assert.False(t, exists) - }) -} - -func TestExpectedHPAVersionV2(t *testing.T) { - params := paramsWithHPA(autodetect.AutoscalingVersionV2) - err := params.Config.AutoDetect() - assert.NoError(t, err) - - expectedHPA := collector.HorizontalPodAutoscaler(params.Config, logger, params.Instance) - - t.Run("should create HPA", func(t *testing.T) { - err = expectedHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) - assert.NoError(t, err) - - actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - - assert.True(t, exists) - }) - - t.Run("should update HPA", func(t *testing.T) { - minReplicas := int32(1) - maxReplicas := int32(3) - memUtilization := int32(70) - updateParms := paramsWithHPA(autodetect.AutoscalingVersionV2) - updateParms.Instance.Spec.Autoscaler.MinReplicas = &minReplicas - updateParms.Instance.Spec.Autoscaler.MaxReplicas = &maxReplicas - updateParms.Instance.Spec.Autoscaler.TargetMemoryUtilization = &memUtilization - updatedHPA := collector.HorizontalPodAutoscaler(updateParms.Config, logger, updateParms.Instance) - - hpaUpdateErr = expectedHorizontalPodAutoscalers(context.Background(), updateParms, []client.Object{updatedHPA}) - require.NoError(t, hpaUpdateErr) - - actual := autoscalingv2.HorizontalPodAutoscaler{} - withHPA, hpaUpdateErr := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, hpaUpdateErr) - assert.True(t, withHPA) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(3), actual.Spec.MaxReplicas) - assert.Len(t, actual.Spec.Metrics, 2) - // check metric values - for _, metric := range actual.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, int32(90), *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, int32(70), *metric.Resource.Target.AverageUtilization) - } - } - }) - - t.Run("should delete HPA", func(t *testing.T) { - err = deleteHorizontalPodAutoscalers(context.Background(), params, []client.Object{expectedHPA}) - assert.NoError(t, err) - - actual := v1.Deployment{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collecto"}) - assert.False(t, exists) - }) -} - -func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion) manifests.Params { - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - - minReplicas := int32(3) - maxReplicas := int32(5) - cpuUtilization := int32(90) - - mockAutoDetector := &mockAutoDetect{ - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - return autoscalingVersion, nil - }, - } - configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - err = configuration.AutoDetect() - if err != nil { - logger.Error(err, "configuration.autodetect failed") - } - - return manifests.Params{ - Config: configuration, - Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Ports: []corev1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - Config: string(configYAML), - Autoscaler: &v1alpha1.AutoscalerSpec{ - MinReplicas: &minReplicas, - MaxReplicas: &maxReplicas, - TargetCPUUtilization: &cpuUtilization, - }, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) - -type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) -} - -func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { - return m.HPAVersionFunc() -} - -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { - if m.OpenShiftRoutesAvailabilityFunc != nil { - return m.OpenShiftRoutesAvailabilityFunc() - } - return autodetect.OpenShiftRoutesNotAvailable, nil -} diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go deleted file mode 100644 index 9aed9b462..000000000 --- a/pkg/collector/reconcile/ingress.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - corev1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" -) - -// Ingresses reconciles the ingress(s) required for the instance in the current context. -func Ingresses(ctx context.Context, params manifests.Params) error { - isSupportedMode := true - if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { - params.Log.V(3).Info("ingress settings are not supported in sidecar mode") - isSupportedMode = false - } - - nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: params.Instance.Name} - err := params.Client.Get(ctx, nns, &corev1.Service{}) // NOTE: check if service exists. - serviceExists := err != nil - - var desired []*networkingv1.Ingress - if isSupportedMode && serviceExists { - if d := collector.Ingress(params.Config, params.Log, params.Instance); d != nil { - desired = append(desired, d) - } - } - - // first, handle the create/update parts - if err := expectedIngresses(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected ingresses: %w", err) - } - - // then, delete the extra objects - if err := deleteIngresses(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the ingresses to be deleted: %w", err) - } - - return nil -} - -func expectedIngresses(ctx context.Context, params manifests.Params, expected []*networkingv1.Ingress) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &networkingv1.Ingress{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - clientGetErr := params.Client.Get(ctx, nns, existing) - if clientGetErr != nil && k8serrors.IsNotFound(clientGetErr) { - if err := params.Client.Create(ctx, desired); err != nil { - return fmt.Errorf("failed to create: %w", err) - } - params.Log.V(2).Info("created", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) - return nil - } else if clientGetErr != nil { - return fmt.Errorf("failed to get: %w", clientGetErr) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - updated.Spec.Rules = desired.Spec.Rules - updated.Spec.TLS = desired.Spec.TLS - updated.Spec.DefaultBackend = desired.Spec.DefaultBackend - updated.Spec.IngressClassName = desired.Spec.IngressClassName - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) - } - return nil -} - -func deleteIngresses(ctx context.Context, params manifests.Params, expected []*networkingv1.Ingress) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &networkingv1.IngressList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "ingress.name", existing.Name, "ingress.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/ingress_test.go b/pkg/collector/reconcile/ingress_test.go deleted file mode 100644 index 67dfe0d8d..000000000 --- a/pkg/collector/reconcile/ingress_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - _ "embed" - "testing" - - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" -) - -const testFileIngress = "testdata/ingress_testdata.yaml" - -func TestExpectedIngresses(t *testing.T) { - t.Run("should create and update ingress entry", func(t *testing.T) { - ctx := context.Background() - - params, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - params.Instance.Spec.Ingress.Type = "ingress" - - err = expectedIngresses(ctx, params, []*networkingv1.Ingress{collector.Ingress(params.Config, params.Log, params.Instance)}) - assert.NoError(t, err) - - nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} - exists, err := populateObjectIfExists(t, &networkingv1.Ingress{}, nns) - assert.NoError(t, err) - assert.True(t, exists) - - // update fields - const expectHostname = "something-else.com" - params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} - params.Instance.Spec.Ingress.Hostname = expectHostname - - err = expectedIngresses(ctx, params, []*networkingv1.Ingress{collector.Ingress(params.Config, params.Log, params.Instance)}) - assert.NoError(t, err) - - got := &networkingv1.Ingress{} - err = params.Client.Get(ctx, nns, got) - assert.NoError(t, err) - - assert.Equal(t, "something-else.com", got.Spec.Rules[0].Host) - - if v, ok := got.Annotations["blub"]; !ok || v != "blob" { - t.Error("annotations are not up-to-date. Missing entry or value is invalid.") - } - }) -} - -func TestDeleteIngresses(t *testing.T) { - t.Run("should delete excess ingress", func(t *testing.T) { - // create - ctx := context.Background() - - myParams, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - myParams.Instance.Spec.Ingress.Type = "ingress" - - err = expectedIngresses(ctx, myParams, []*networkingv1.Ingress{collector.Ingress(myParams.Config, myParams.Log, myParams.Instance)}) - assert.NoError(t, err) - - nns := types.NamespacedName{Namespace: "default", Name: "test-ingress"} - exists, err := populateObjectIfExists(t, &networkingv1.Ingress{}, nns) - assert.NoError(t, err) - assert.True(t, exists) - - // delete - if delIngressErr := deleteIngresses(ctx, params(), []*networkingv1.Ingress{}); delIngressErr != nil { - t.Error(delIngressErr) - } - - // check - exists, err = populateObjectIfExists(t, &networkingv1.Ingress{}, nns) - assert.NoError(t, err) - assert.False(t, exists) - }) -} - -func TestIngresses(t *testing.T) { - t.Run("wrong mode", func(t *testing.T) { - ctx := context.Background() - err := Ingresses(ctx, params()) - assert.Nil(t, err) - }) - - t.Run("supported mode and service exists", func(t *testing.T) { - ctx := context.Background() - myParams := params() - err := expectedServices(context.Background(), myParams, []*corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) - assert.NoError(t, err) - - assert.Nil(t, Ingresses(ctx, myParams)) - }) - -} diff --git a/pkg/collector/reconcile/opentelemetry_test.go b/pkg/collector/reconcile/opentelemetry_test.go deleted file mode 100644 index a0254375f..000000000 --- a/pkg/collector/reconcile/opentelemetry_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - - "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/types" -) - -func TestSelf(t *testing.T) { - t.Run("should add version to the status", func(t *testing.T) { - instance := params().Instance - createObjectIfNotExists(t, "test", &instance) - err := Self(context.Background(), params()) - assert.NoError(t, err) - - actual := v1alpha1.OpenTelemetryCollector{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test"}) - assert.NoError(t, err) - assert.True(t, exists) - - assert.Equal(t, actual.Status.Version, "0.0.0") - - }) -} diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go index 3311a3c12..8288edbe9 100644 --- a/pkg/collector/reconcile/route.go +++ b/pkg/collector/reconcile/route.go @@ -31,6 +31,8 @@ import ( ) // Routes reconciles the route(s) required for the instance in the current context. +// TODO: This functionality should be put with the rest of reconciliation logic in the mutate.go +// https://github.com/open-telemetry/opentelemetry-operator/issues/2108 func Routes(ctx context.Context, params manifests.Params) error { if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { return nil diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go index 216ce2bf8..8852e96be 100644 --- a/pkg/collector/reconcile/route_test.go +++ b/pkg/collector/reconcile/route_test.go @@ -24,7 +24,6 @@ import ( routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -105,21 +104,3 @@ func TestDeleteRoutes(t *testing.T) { assert.False(t, exists) }) } - -func TestRoutes(t *testing.T) { - t.Run("wrong mode", func(t *testing.T) { - ctx := context.Background() - err := Routes(ctx, params()) - assert.Nil(t, err) - }) - - t.Run("supported mode and service exists", func(t *testing.T) { - ctx := context.Background() - myParams := params() - err := expectedServices(context.Background(), myParams, []*corev1.Service{service("test-collector", params().Instance.Spec.Ports)}) - assert.NoError(t, err) - - assert.Nil(t, Routes(ctx, myParams)) - }) - -} diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go deleted file mode 100644 index 37b999850..000000000 --- a/pkg/collector/reconcile/service.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" -) - -// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete - -// Services reconciles the service(s) required for the instance in the current context. -func Services(ctx context.Context, params manifests.Params) error { - var desired []*corev1.Service - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { - type builder func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service - for _, builder := range []builder{collector.Service, collector.HeadlessService, collector.MonitoringService} { - svc := builder(params.Config, params.Log, params.Instance) - // add only the non-nil to the list - if svc != nil { - desired = append(desired, svc) - } - } - } - - if params.Instance.Spec.TargetAllocator.Enabled { - desired = append(desired, targetallocator.Service(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected services: %w", err) - } - - // then, delete the extra objects - if err := deleteServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the services to be deleted: %w", err) - } - - return nil -} - -func expectedServices(ctx context.Context, params manifests.Params, expected []*corev1.Service) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.Service{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "service.name", desired.Name, "service.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - updated.Spec.Ports = desired.Spec.Ports - updated.Spec.Selector = desired.Spec.Selector - updated.Spec.InternalTrafficPolicy = desired.Spec.InternalTrafficPolicy - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) - } - - return nil -} - -func deleteServices(ctx context.Context, params manifests.Params, expected []*corev1.Service) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &corev1.ServiceList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/service_test.go b/pkg/collector/reconcile/service_test.go deleted file mode 100644 index 3fb0323ca..000000000 --- a/pkg/collector/reconcile/service_test.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" -) - -func TestExpectedServices(t *testing.T) { - t.Run("should create the service", func(t *testing.T) { - err := expectedServices(context.Background(), params(), []*v1.Service{service("test-collector", params().Instance.Spec.Ports)}) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - - }) - t.Run("should update service", func(t *testing.T) { - serviceInstance := service("test-collector", params().Instance.Spec.Ports) - createObjectIfNotExists(t, "test-collector", serviceInstance) - - extraPorts := v1.ServicePort{ - Name: "port-web", - Protocol: "TCP", - Port: 8080, - TargetPort: intstr.FromInt(8080), - } - - ports := append(params().Instance.Spec.Ports, extraPorts) - err := expectedServices(context.Background(), params(), []*v1.Service{service("test-collector", ports)}) - assert.NoError(t, err) - - actual := v1.Service{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - assert.Contains(t, actual.Spec.Ports, extraPorts) - }) - t.Run("should update service on version change", func(t *testing.T) { - serviceInstance := service("test-collector", params().Instance.Spec.Ports) - createObjectIfNotExists(t, "test-collector", serviceInstance) - - newService := service("test-collector", params().Instance.Spec.Ports) - newService.Spec.Selector["app.kubernetes.io/version"] = "Newest" - err := expectedServices(context.Background(), params(), []*v1.Service{newService}) - assert.NoError(t, err) - - actual := v1.Service{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - assert.Equal(t, "Newest", actual.Spec.Selector["app.kubernetes.io/version"]) - }) - t.Run("should update service on internal traffic policy change", func(t *testing.T) { - serviceInstance := service("test-collector", params().Instance.Spec.Ports) - createObjectIfNotExists(t, "test-collector", serviceInstance) - - newService := serviceWithInternalTrafficPolicy("test-collector", params().Instance.Spec.Ports, v1.ServiceInternalTrafficPolicyLocal) - err := expectedServices(context.Background(), params(), []*v1.Service{newService}) - assert.NoError(t, err) - - actual := v1.Service{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - assert.Equal(t, v1.ServiceInternalTrafficPolicyLocal, *actual.Spec.InternalTrafficPolicy) - }) -} - -func TestDeleteServices(t *testing.T) { - t.Run("should delete excess services", func(t *testing.T) { - ports := []v1.ServicePort{{ - Port: 80, - Name: "web", - }} - deleteService := service("delete-service-collector", ports) - createObjectIfNotExists(t, "delete-service-collector", deleteService) - - exists, err := populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - param := params() - desired := collector.Service(param.Config, param.Log, param.Instance) - err = deleteServices(context.Background(), params(), []*v1.Service{desired}) - assert.NoError(t, err) - - exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: "delete-service-collector"}) - assert.NoError(t, err) - assert.False(t, exists) - - }) -} - -func service(name string, ports []v1.ServicePort) *v1.Service { - return serviceWithInternalTrafficPolicy(name, ports, v1.ServiceInternalTrafficPolicyCluster) -} - -func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) *v1.Service { - labels := collector.Labels(params().Instance, name, []string{}) - - return &v1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: "default", - Labels: labels, - Annotations: params().Instance.Annotations, - }, - Spec: v1.ServiceSpec{ - InternalTrafficPolicy: &internalTrafficPolicy, - Selector: collector.SelectorLabels(params().Instance), - ClusterIP: "", - Ports: ports, - }, - } -} diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go deleted file mode 100644 index c264dd430..000000000 --- a/pkg/collector/reconcile/serviceaccount.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" -) - -// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete - -// ServiceAccounts reconciles the service account(s) required for the instance in the current context. -func ServiceAccounts(ctx context.Context, params manifests.Params) error { - var desired []*corev1.ServiceAccount - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar && len(params.Instance.Spec.ServiceAccount) == 0 { - sa := collector.ServiceAccount(params.Config, params.Log, params.Instance) - desired = append(desired, sa) - } - if params.Instance.Spec.TargetAllocator.Enabled && len(params.Instance.Spec.TargetAllocator.ServiceAccount) == 0 { - sa := targetallocator.ServiceAccount(params.Config, params.Log, params.Instance) - desired = append(desired, sa) - } - - // first, handle the create/update parts - if err := expectedServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected service accounts: %w", err) - } - - // then, delete the extra objects - if err := deleteServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the service accounts to be deleted: %w", err) - } - - return nil -} - -func expectedServiceAccounts(ctx context.Context, params manifests.Params, expected []*corev1.ServiceAccount) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.ServiceAccount{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) - } - - return nil -} - -func deleteServiceAccounts(ctx context.Context, params manifests.Params, expected []*corev1.ServiceAccount) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &corev1.ServiceAccountList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "serviceaccount.name", existing.Name, "serviceaccount.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/serviceaccount_test.go b/pkg/collector/reconcile/serviceaccount_test.go deleted file mode 100644 index 154b70eab..000000000 --- a/pkg/collector/reconcile/serviceaccount_test.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -func TestExpectedServiceAccounts(t *testing.T) { - t.Run("should create multiple service accounts", func(t *testing.T) { - param := params() - desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) - allocatorDesired := targetallocator.ServiceAccount(param.Config, param.Log, param.Instance) - err := expectedServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired, allocatorDesired}) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - allocatorExists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-targetallocator"}) - assert.NoError(t, err) - assert.True(t, allocatorExists) - - }) - - t.Run("should update existing service account", func(t *testing.T) { - existing := v1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "default", - }, - } - createObjectIfNotExists(t, "test-collector", &existing) - exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - param := params() - desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) - err = expectedServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) - assert.NoError(t, err) - - actual := v1.ServiceAccount{} - _, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - assert.NoError(t, err) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - }) -} - -func TestDeleteServiceAccounts(t *testing.T) { - t.Run("should delete the managed service account", func(t *testing.T) { - existing := v1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-delete-collector", - Namespace: "default", - Labels: map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - } - createObjectIfNotExists(t, "test-delete-collector", &existing) - exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - param := params() - desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) - err = deleteServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) - assert.NoError(t, err) - - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.NoError(t, err) - assert.False(t, exists) - - }) - t.Run("should not delete unrelated service account", func(t *testing.T) { - existing := v1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-delete-collector", - Namespace: "default", - Labels: map[string]string{ - "app.kubernetes.io/instance": "default.testing", - "app.kubernetes.io/managed-by": "helm-opentelemetry", - }, - }, - } - createObjectIfNotExists(t, "test-delete-collector", &existing) - exists, err := populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - param := params() - desired := collector.ServiceAccount(param.Config, param.Log, param.Instance) - err = deleteServiceAccounts(context.Background(), params(), []*v1.ServiceAccount{desired}) - assert.NoError(t, err) - - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, types.NamespacedName{Namespace: "default", Name: "test-delete-collector"}) - assert.NoError(t, err) - assert.True(t, exists) - - }) - -} diff --git a/pkg/collector/reconcile/servicemonitor.go b/pkg/collector/reconcile/servicemonitor.go deleted file mode 100644 index 2edee33a1..000000000 --- a/pkg/collector/reconcile/servicemonitor.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" -) - -// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete - -// ServiceMonitors reconciles the service monitor(s) required for the instance in the current context. -func ServiceMonitors(ctx context.Context, params manifests.Params) error { - if !featuregate.PrometheusOperatorIsAvailable.IsEnabled() { - return nil - } - - var desired []*monitoringv1.ServiceMonitor - - sm, err := collector.ServiceMonitor(params.Config, params.Log, params.Instance) - if err != nil { - return err - } - - if sm != nil { - desired = append(desired, sm) - } - - // first, handle the create/update parts - if err := expectedServiceMonitors(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected service monitors: %w", err) - } - - // then, delete the extra objects - if err := deleteServiceMonitors(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the service monitors to be deleted: %w", err) - } - - return nil -} - -func expectedServiceMonitors(ctx context.Context, params manifests.Params, expected []*monitoringv1.ServiceMonitor) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &monitoringv1.ServiceMonitor{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if err = params.Client.Create(ctx, desired); err != nil { - return fmt.Errorf("failed to create: %w", err) - } - params.Log.V(2).Info("created", "servicemonitor.name", desired.Name, "servicemonitor.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - updated.Spec.Endpoints = desired.Spec.Endpoints - updated.Spec.NamespaceSelector = desired.Spec.NamespaceSelector - updated.Spec.Selector = desired.Spec.Selector - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "servicemonitor.name", desired.Name, "servicemonitor.namespace", desired.Namespace) - } - return nil -} - -func deleteServiceMonitors(ctx context.Context, params manifests.Params, expected []*monitoringv1.ServiceMonitor) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - - list := &monitoringv1.ServiceMonitorList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "servicemonitor.name", existing.Name, "servicemonitor.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/servicemonitor_test.go b/pkg/collector/reconcile/servicemonitor_test.go deleted file mode 100644 index 9f1a4d2e7..000000000 --- a/pkg/collector/reconcile/servicemonitor_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - colfeaturegate "go.opentelemetry.io/collector/featuregate" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" -) - -func TestExpectedServiceMonitors(t *testing.T) { - originalVal := featuregate.PrometheusOperatorIsAvailable.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), false)) - t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), originalVal)) - }) - - t.Run("should create the service monitor", func(t *testing.T) { - p := params() - p.Instance.Spec.Observability.Metrics.EnableMetrics = true - - err := expectedServiceMonitors( - context.Background(), - p, - []*monitoringv1.ServiceMonitor{servicemonitor("test-collector")}, - ) - assert.NoError(t, err) - - exists, err := populateObjectIfExists(t, &monitoringv1.ServiceMonitor{}, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - - }) -} - -func TestDeleteServiceMonitors(t *testing.T) { - t.Run("should delete excess service monitors", func(t *testing.T) { - name := "sm-to-delete" - deleteServiceMonitor := servicemonitor(name) - createObjectIfNotExists(t, name, deleteServiceMonitor) - - exists, err := populateObjectIfExists(t, &monitoringv1.ServiceMonitor{}, types.NamespacedName{Namespace: "default", Name: name}) - assert.NoError(t, err) - assert.True(t, exists) - - p := params() - desired, err := collector.ServiceMonitor(p.Config, p.Log, p.Instance) - assert.NoError(t, err) - err = deleteServiceMonitors(context.Background(), params(), []*monitoringv1.ServiceMonitor{desired}) - assert.NoError(t, err) - - exists, err = populateObjectIfExists(t, &v1.Service{}, types.NamespacedName{Namespace: "default", Name: name}) - assert.NoError(t, err) - assert.False(t, exists) - }) -} - -func servicemonitor(name string) *monitoringv1.ServiceMonitor { - return &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: "default", - }, - Spec: monitoringv1.ServiceMonitorSpec{ - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - NamespaceSelector: monitoringv1.NamespaceSelector{ - MatchNames: []string{"default"}, - }, - Endpoints: []monitoringv1.Endpoint{ - { - Port: "monitoring", - }, - }, - }, - } -} - -func TestServiceMonitors(t *testing.T) { - t.Run("not enabled", func(t *testing.T) { - ctx := context.Background() - err := ServiceMonitors(ctx, params()) - assert.Nil(t, err) - }) - - t.Run("enabled but featuregate not enabled", func(t *testing.T) { - ctx := context.Background() - p := params() - p.Instance.Spec.Observability.Metrics.EnableMetrics = true - err := ServiceMonitors(ctx, p) - assert.Nil(t, err) - }) - - t.Run("enabled and featuregate enabled", func(t *testing.T) { - originalVal := featuregate.PrometheusOperatorIsAvailable.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), false)) - t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.PrometheusOperatorIsAvailable.ID(), originalVal)) - }) - - ctx := context.Background() - p := params() - p.Instance.Spec.Observability.Metrics.EnableMetrics = true - err := ServiceMonitors(ctx, p) - assert.Nil(t, err) - }) - -} diff --git a/pkg/collector/reconcile/statefulset.go b/pkg/collector/reconcile/statefulset.go deleted file mode 100644 index eeddc9cbf..000000000 --- a/pkg/collector/reconcile/statefulset.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" -) - -// +kubebuilder:rbac:groups="apps",resources=statefulsets,verbs=get;list;watch;create;update;patch;delete - -// StatefulSets reconciles the stateful set(s) required for the instance in the current context. -func StatefulSets(ctx context.Context, params manifests.Params) error { - - var desired []*appsv1.StatefulSet - if params.Instance.Spec.Mode == "statefulset" { - desired = append(desired, collector.StatefulSet(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedStatefulSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected stateful sets: %w", err) - } - - // then, delete the extra objects - if err := deleteStatefulSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the stateful sets to be deleted: %w", err) - } - - return nil -} - -func expectedStatefulSets(ctx context.Context, params manifests.Params, expected []*appsv1.StatefulSet) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &appsv1.StatefulSet{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // Check for immutable fields. If set, we cannot modify the stateful set, otherwise we will face reconciliation error. - if needsDeletion, fieldName := hasImmutableFieldChange(desired, existing); needsDeletion { - params.Log.V(2).Info("Immutable field change detected, trying to delete, the new collector statefulset will be created in the next reconcile cycle", - "field", fieldName, "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) - - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to delete statefulset: %w", err) - } - continue - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "statefulset.name", desired.Name, "statefulset.namespace", desired.Namespace) - } - - return nil -} - -func deleteStatefulSets(ctx context.Context, params manifests.Params, expected []*appsv1.StatefulSet) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &appsv1.StatefulSetList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "statefulset.name", existing.Name, "statefulset.namespace", existing.Namespace) - } - } - - return nil -} - -func hasImmutableFieldChange(desired, existing *appsv1.StatefulSet) (bool, string) { - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - return true, "Spec.Selector" - } - - if hasVolumeClaimsTemplatesChanged(desired, existing) { - return true, "Spec.VolumeClaimTemplates" - } - - return false, "" -} - -// hasVolumeClaimsTemplatesChanged if volume claims template change has been detected. -// We need to do this manually due to some fields being automatically filled by the API server -// and these needs to be excluded from the comparison to prevent false positives. -func hasVolumeClaimsTemplatesChanged(desired, existing *appsv1.StatefulSet) bool { - if len(desired.Spec.VolumeClaimTemplates) != len(existing.Spec.VolumeClaimTemplates) { - return true - } - - for i := range desired.Spec.VolumeClaimTemplates { - // VolumeMode is automatically set by the API server, so if it is not set in the CR, assume it's the same as the existing one. - if desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == nil || *desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode == "" { - desired.Spec.VolumeClaimTemplates[i].Spec.VolumeMode = existing.Spec.VolumeClaimTemplates[i].Spec.VolumeMode - } - - if desired.Spec.VolumeClaimTemplates[i].Name != existing.Spec.VolumeClaimTemplates[i].Name { - return true - } - if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Annotations, existing.Spec.VolumeClaimTemplates[i].Annotations) { - return true - } - if !apiequality.Semantic.DeepEqual(desired.Spec.VolumeClaimTemplates[i].Spec, existing.Spec.VolumeClaimTemplates[i].Spec) { - return true - } - } - - return false -} diff --git a/pkg/collector/reconcile/statefulset_test.go b/pkg/collector/reconcile/statefulset_test.go deleted file mode 100644 index e2b4fcc2a..000000000 --- a/pkg/collector/reconcile/statefulset_test.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -func TestExpectedStatefulsets(t *testing.T) { - param := params() - expectedSs := collector.StatefulSet(param.Config, logger, param.Instance) - - t.Run("should create StatefulSet", func(t *testing.T) { - err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) - assert.NoError(t, err) - - actual := v1.StatefulSet{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, int32(2), *actual.Spec.Replicas) - - }) - t.Run("should update statefulset", func(t *testing.T) { - createObjectIfNotExists(t, "test-collector", expectedSs) - err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) - assert.NoError(t, err) - - actual := v1.StatefulSet{} - exists, err := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "test-collector"}) - - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, instanceUID, actual.OwnerReferences[0].UID) - }) - - t.Run("should delete statefulset", func(t *testing.T) { - - labels := map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - } - ds := v1.StatefulSet{} - ds.Name = "dummy" - ds.Namespace = "default" - ds.Labels = labels - ds.Spec = v1.StatefulSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - - createObjectIfNotExists(t, "dummy", &ds) - - err := deleteStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) - assert.NoError(t, err) - - actual := v1.StatefulSet{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.False(t, exists) - - }) - - t.Run("should not delete statefulset", func(t *testing.T) { - - labels := map[string]string{ - "app.kubernetes.io/managed-by": "helm-opentelemetry-operator", - } - ds := v1.StatefulSet{} - ds.Name = "dummy" - ds.Namespace = "default" - ds.Labels = labels - ds.Spec = v1.StatefulSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: labels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: "dummy", - Image: "busybox", - }}, - }, - }, - } - - createObjectIfNotExists(t, "dummy", &ds) - - err := deleteStatefulSets(context.Background(), param, []*v1.StatefulSet{expectedSs}) - assert.NoError(t, err) - - actual := v1.StatefulSet{} - exists, _ := populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: "dummy"}) - - assert.True(t, exists) - - }) - - t.Run("change Spec.Selector should recreate statefulset", func(t *testing.T) { - - oldSs := collector.StatefulSet(param.Config, logger, param.Instance) - oldSs.Spec.Selector.MatchLabels["app.kubernetes.io/version"] = "latest" - oldSs.Spec.Template.Labels["app.kubernetes.io/version"] = "latest" - oldSs.Name = "update-selector" - - err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{oldSs}) - assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - - newSs := collector.StatefulSet(param.Config, logger, param.Instance) - newSs.Name = oldSs.Name - err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) - assert.NoError(t, err) - exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.False(t, exists) - - err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) - assert.NoError(t, err) - actual := v1.StatefulSet{} - exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, newSs.Spec.Selector.MatchLabels, actual.Spec.Selector.MatchLabels) - }) - - t.Run("change Spec.VolumeClaimTemplates should recreate statefulset", func(t *testing.T) { - - oldSs := collector.StatefulSet(param.Config, logger, param.Instance) - oldSs.Name = "update-volumeclaimtemplates" - - err := expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{oldSs}) - assert.NoError(t, err) - exists, err := populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - - newSs := collector.StatefulSet(param.Config, logger, param.Instance) - // Add a new vpersistent volume claim to test stateful set will be recreated. - volumeModeFilesystem := corev1.PersistentVolumeFilesystem - newSs.Spec.VolumeClaimTemplates = []corev1.PersistentVolumeClaim{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "default-volume", - }, - Spec: corev1.PersistentVolumeClaimSpec{ - AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - VolumeMode: &volumeModeFilesystem, - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{"storage": resource.MustParse("50Mi")}, - }, - }}} - newSs.Name = oldSs.Name - - err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) - assert.NoError(t, err) - exists, err = populateObjectIfExists(t, &v1.StatefulSet{}, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.False(t, exists) - - err = expectedStatefulSets(context.Background(), param, []*v1.StatefulSet{newSs}) - assert.NoError(t, err) - actual := v1.StatefulSet{} - exists, err = populateObjectIfExists(t, &actual, types.NamespacedName{Namespace: "default", Name: oldSs.Name}) - assert.NoError(t, err) - assert.True(t, exists) - assert.Len(t, actual.Spec.VolumeClaimTemplates, 1) - assert.Equal(t, newSs.Spec.VolumeClaimTemplates[0].Spec, actual.Spec.VolumeClaimTemplates[0].Spec) - }) -} diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 55a60b1d7..d517a10d0 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// TODO: This file can be deleted when Routes is removed from this package. +// https://github.com/open-telemetry/opentelemetry-operator/issues/2108 package reconcile import ( @@ -27,7 +29,6 @@ import ( routev1 "github.com/openshift/api/route/v1" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -68,6 +69,7 @@ var ( const ( defaultCollectorImage = "default-collector" defaultTaAllocationImage = "default-ta-allocator" + testFileIngress = "testdata/ingress_testdata.yaml" ) func TestMain(m *testing.M) { @@ -286,15 +288,6 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { }, nil } -func createObjectIfNotExists(tb testing.TB, name string, object client.Object) { - tb.Helper() - err := k8sClient.Get(context.Background(), client.ObjectKey{Namespace: "default", Name: name}, object) - if errors.IsNotFound(err) { - err := k8sClient.Create(context.Background(), object) - assert.NoError(tb, err) - } -} - func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { t.Helper() err := k8sClient.Get(context.Background(), namespacedName, object) @@ -305,5 +298,4 @@ func populateObjectIfExists(t testing.TB, object client.Object, namespacedName t return false, err } return true, nil - } From 7dbb29ac1c1c3a87ec6717c95a095789d63525f0 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 20 Sep 2023 18:26:38 +0200 Subject: [PATCH 1031/1234] Prepare release 0.85.0 (#2137) Signed-off-by: Pavol Loffay --- .chloggen/1849-dotnet-auto-musl-support.yaml | 16 ------------ ...de-for-previously-unmanaged-instances.yaml | 16 ------------ .chloggen/add-more-configmaps.yaml | 16 ------------ .chloggen/bump-go-autoinstrumentation.yaml | 16 ------------ .chloggen/reconcile-change.yaml | 16 ------------ CHANGELOG.md | 25 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 +++--- versions.txt | 10 ++++---- 10 files changed, 36 insertions(+), 91 deletions(-) delete mode 100644 .chloggen/1849-dotnet-auto-musl-support.yaml delete mode 100755 .chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml delete mode 100755 .chloggen/add-more-configmaps.yaml delete mode 100755 .chloggen/bump-go-autoinstrumentation.yaml delete mode 100755 .chloggen/reconcile-change.yaml diff --git a/.chloggen/1849-dotnet-auto-musl-support.yaml b/.chloggen/1849-dotnet-auto-musl-support.yaml deleted file mode 100644 index fc5d7fc10..000000000 --- a/.chloggen/1849-dotnet-auto-musl-support.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: .NET Automatic Instrumentation support for Alpine-based images - -# One or more tracking issues related to the change -issues: [1849] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml b/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml deleted file mode 100755 index 6dd820a69..000000000 --- a/.chloggen/1890-run-upgrade-for-previously-unmanaged-instances.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Run the upgrade mechanism when there is a change in an instance to ensure it is upgraded. This is useful for cases where the instance uses the unmanaged state, the operator is upgraded and the instance changes to use a managed state." - -# One or more tracking issues related to the change -issues: [1890] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-more-configmaps.yaml b/.chloggen/add-more-configmaps.yaml deleted file mode 100755 index 4a172ea8d..000000000 --- a/.chloggen/add-more-configmaps.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Allow the collector CRD to specify a list of configmaps to mount - -# One or more tracking issues related to the change -issues: [1819] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-go-autoinstrumentation.yaml b/.chloggen/bump-go-autoinstrumentation.yaml deleted file mode 100755 index 6dbe6ae8c..000000000 --- a/.chloggen/bump-go-autoinstrumentation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Go auto-instrumentation support to v0.3.0-alpha. - -# One or more tracking issues related to the change -issues: [2123] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/reconcile-change.yaml b/.chloggen/reconcile-change.yaml deleted file mode 100755 index 259a99476..000000000 --- a/.chloggen/reconcile-change.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Introduces a new method of reconciliation to reduce duplication and complexity - -# One or more tracking issues related to the change -issues: [1959] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index a03a9b671..c69bb290c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,31 @@ Changes by Version ================== + +## 0.85.0 + +### 💡 Enhancements 💡 + +- `autoinstrumentation`: .NET Automatic Instrumentation support for Alpine-based images (#1849) +- `operator`: Allow the collector CRD to specify a list of configmaps to mount (#1819) +- `autoinstrumentation`: Bump Go auto-instrumentation support to v0.3.0-alpha. (#2123) +- `operator`: Introduces a new method of reconciliation to reduce duplication and complexity (#1959) + +### 🧰 Bug fixes 🧰 + +- `operator`: Run the upgrade mechanism when there is a change in an instance to ensure it is upgraded. This is useful for cases where the instance uses the unmanaged state, the operator is upgraded and the instance changes to use a managed state. (#1890) + +### Components + +* [OpenTelemetry Collector - v0.85.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.85.0) +* [OpenTelemetry Contrib - v0.85.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.85.0) +* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) +* [.NET auto-instrumentation - 1.0.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) +* [Go - v0.3.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.3.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) + ## 0.84.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 7ab43f964..13042200a 100644 --- a/README.md +++ b/README.md @@ -594,6 +594,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.85.0 | v1.19 to v1.28 | v1 | | v0.84.0 | v1.19 to v1.28 | v1 | | v0.83.0 | v1.19 to v1.27 | v1 | | v0.82.0 | v1.19 to v1.27 | v1 | @@ -616,7 +617,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.64.1 | v1.19 to v1.25 | v1 | | v0.63.1 | v1.19 to v1.25 | v1 | | v0.62.1 | v1.19 to v1.25 | v1 | -| v0.61.0 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 5636d19b6..9a67efaa2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.85.0 | @pavolloffay | | v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | +| v0.92.0 | @pavolloffay | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 6f43cb076..4486b92ff 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-09-18T13:46:11Z" + createdAt: "2023-09-20T15:05:15Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.84.0 + name: opentelemetry-operator.v0.85.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -288,7 +288,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.84.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.85.0 livenessProbe: httpGet: path: /healthz @@ -395,7 +395,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.84.0 + version: 0.85.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 22e7661fb..086276688 100644 --- a/versions.txt +++ b/versions.txt @@ -2,20 +2,20 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.84.0 +opentelemetry-collector=0.85.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.84.0 +operator=0.85.0 # Represents the current release of the Target Allocator. -targetallocator=0.84.0 +targetallocator=0.85.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.84.0 +operator-opamp-bridge=0.85.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.29.0 +autoinstrumentation-java=1.30.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json From 7eead2250abfa2d2025db872dd50b5feefd706fd Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Wed, 20 Sep 2023 18:40:26 +0200 Subject: [PATCH 1032/1234] Fix publishing of bundle image (#2138) Signed-off-by: Pavol Loffay --- .github/workflows/publish-operator-bundle.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 9b3939b08..75b02f8e1 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -12,6 +12,10 @@ on: - 'v*' workflow_dispatch: +permissions: + contents: read + packages: write + jobs: publish: runs-on: ubuntu-22.04 From affeee80e20def5a429897b5d1dea422bcd9b64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 21 Sep 2023 17:38:45 +0200 Subject: [PATCH 1033/1234] Bump .NET AutoInstrumentation to 1.0.1 (#2142) --- .chloggen/bump-dotnet-1.0.1.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/bump-dotnet-1.0.1.yaml diff --git a/.chloggen/bump-dotnet-1.0.1.yaml b/.chloggen/bump-dotnet-1.0.1.yaml new file mode 100644 index 000000000..4ec74f301 --- /dev/null +++ b/.chloggen/bump-dotnet-1.0.1.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.1 + +# One or more tracking issues related to the change +issues: [2142] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 3eefcb9dd..7dea76edb 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.0.0 +1.0.1 From 88bfe1c03a50b54dc5d66640c3213ee658548719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 21 Sep 2023 15:50:21 +0000 Subject: [PATCH 1034/1234] Refactor target allocator config handling (#1957) * Refactor target allocator config handling * Move TargetAllocator flags to a separate file * Fix yaml annotation on the TA config struct * Clearly separate loading config from CLI and file * Use an explicit flag set for target allocator flags * Add changelog entry * Pass config by value to PrometheusCRWatcher --- .chloggen/feat_ta-cliconfig.yaml | 16 +++ cmd/otel-allocator/config/config.go | 118 +++++++++++--------- cmd/otel-allocator/config/config_test.go | 34 +++--- cmd/otel-allocator/config/flags.go | 64 +++++++++++ cmd/otel-allocator/config/flags_test.go | 91 +++++++++++++++ cmd/otel-allocator/main.go | 26 ++--- cmd/otel-allocator/server/bench_test.go | 2 +- cmd/otel-allocator/server/server.go | 4 +- cmd/otel-allocator/server/server_test.go | 6 +- cmd/otel-allocator/target/discovery_test.go | 9 +- cmd/otel-allocator/watcher/file.go | 9 +- cmd/otel-allocator/watcher/promOperator.go | 8 +- 12 files changed, 284 insertions(+), 103 deletions(-) create mode 100755 .chloggen/feat_ta-cliconfig.yaml create mode 100644 cmd/otel-allocator/config/flags.go create mode 100644 cmd/otel-allocator/config/flags_test.go diff --git a/.chloggen/feat_ta-cliconfig.yaml b/.chloggen/feat_ta-cliconfig.yaml new file mode 100755 index 000000000..6d42bb7f1 --- /dev/null +++ b/.chloggen/feat_ta-cliconfig.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow target allocator to be completely configured via the config file + +# One or more tracking issues related to the change +issues: [2129] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 4828722bc..2db285d4a 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -16,11 +16,9 @@ package config import ( "errors" - "flag" "fmt" "io/fs" "os" - "path/filepath" "time" "github.com/go-logr/logr" @@ -31,7 +29,6 @@ import ( "gopkg.in/yaml.v2" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" "k8s.io/klog/v2" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log/zap" @@ -42,8 +39,12 @@ const DefaultConfigFilePath string = "/conf/targetallocator.yaml" const DefaultCRScrapeInterval model.Duration = model.Duration(time.Second * 30) type Config struct { + ListenAddr string `yaml:"listen_addr,omitempty"` + KubeConfigFilePath string `yaml:"kube_config_file_path,omitempty"` + ClusterConfig *rest.Config `yaml:"-"` + RootLogger logr.Logger `yaml:"-"` LabelSelector map[string]string `yaml:"label_selector,omitempty"` - Config *promconfig.Config `yaml:"config"` + PromConfig *promconfig.Config `yaml:"config"` AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` FilterStrategy *string `yaml:"filter_strategy,omitempty"` PrometheusCR PrometheusCRConfig `yaml:"prometheus_cr,omitempty"` @@ -52,6 +53,7 @@ type Config struct { } type PrometheusCRConfig struct { + Enabled bool `yaml:"enabled,omitempty"` ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"` } @@ -69,26 +71,45 @@ func (c Config) GetTargetsFilterStrategy() string { return "" } -type PrometheusCRWatcherConfig struct { - Enabled *bool +func LoadFromFile(file string, target *Config) error { + return unmarshal(target, file) } -type CLIConfig struct { - ListenAddr *string - ConfigFilePath *string - ClusterConfig *rest.Config - // KubeConfigFilePath empty if in cluster configuration is in use - KubeConfigFilePath string - RootLogger logr.Logger - PromCRWatcherConf PrometheusCRWatcherConfig -} +func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { + var err error + // set the rest of the config attributes based on command-line flag values + target.RootLogger = zap.New(zap.UseFlagOptions(&zapCmdLineOpts)) + klog.SetLogger(target.RootLogger) + ctrl.SetLogger(target.RootLogger) + + target.KubeConfigFilePath, err = getKubeConfigFilePath(flagSet) + if err != nil { + return err + } + clusterConfig, err := clientcmd.BuildConfigFromFlags("", target.KubeConfigFilePath) + if err != nil { + pathError := &fs.PathError{} + if ok := errors.As(err, &pathError); !ok { + return err + } + clusterConfig, err = rest.InClusterConfig() + if err != nil { + return err + } + } + target.ClusterConfig = clusterConfig -func Load(file string) (Config, error) { - cfg := createDefaultConfig() - if err := unmarshal(&cfg, file); err != nil { - return Config{}, err + target.ListenAddr, err = getListenAddr(flagSet) + if err != nil { + return err + } + + target.PrometheusCR.Enabled, err = getPrometheusCREnabled(flagSet) + if err != nil { + return err } - return cfg, nil + + return nil } func unmarshal(cfg *Config, configFile string) error { @@ -103,7 +124,7 @@ func unmarshal(cfg *Config, configFile string) error { return nil } -func createDefaultConfig() Config { +func CreateDefaultConfig() Config { return Config{ PrometheusCR: PrometheusCRConfig{ ScrapeInterval: DefaultCRScrapeInterval, @@ -111,44 +132,39 @@ func createDefaultConfig() Config { } } -func ParseCLI() (CLIConfig, error) { - opts := zap.Options{} - opts.BindFlags(flag.CommandLine) - cLIConf := CLIConfig{ - ListenAddr: pflag.String("listen-addr", ":8080", "The address where this service serves."), - ConfigFilePath: pflag.String("config-file", DefaultConfigFilePath, "The path to the config file."), - PromCRWatcherConf: PrometheusCRWatcherConfig{ - Enabled: pflag.Bool("enable-prometheus-cr-watcher", false, "Enable Prometheus CRs as target sources"), - }, +func Load() (*Config, string, error) { + var err error + + flagSet := getFlagSet(pflag.ExitOnError) + err = flagSet.Parse(os.Args) + if err != nil { + return nil, "", err } - kubeconfigPath := pflag.String("kubeconfig-path", filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") - pflag.Parse() - cLIConf.RootLogger = zap.New(zap.UseFlagOptions(&opts)) - klog.SetLogger(cLIConf.RootLogger) - ctrl.SetLogger(cLIConf.RootLogger) + config := CreateDefaultConfig() - clusterConfig, err := clientcmd.BuildConfigFromFlags("", *kubeconfigPath) - cLIConf.KubeConfigFilePath = *kubeconfigPath + // load the config from the config file + configFilePath, err := getConfigFilePath(flagSet) if err != nil { - pathError := &fs.PathError{} - if ok := errors.As(err, &pathError); !ok { - return CLIConfig{}, err - } - clusterConfig, err = rest.InClusterConfig() - if err != nil { - return CLIConfig{}, err - } - cLIConf.KubeConfigFilePath = "" // reset as we use in cluster configuration + return nil, "", err + } + err = LoadFromFile(configFilePath, &config) + if err != nil { + return nil, "", err } - cLIConf.ClusterConfig = clusterConfig - return cLIConf, nil + + err = LoadFromCLI(&config, flagSet) + if err != nil { + return nil, "", err + } + + return &config, configFilePath, nil } // ValidateConfig validates the cli and file configs together. -func ValidateConfig(config *Config, cliConfig *CLIConfig) error { - scrapeConfigsPresent := (config.Config != nil && len(config.Config.ScrapeConfigs) > 0) - if !(*cliConfig.PromCRWatcherConf.Enabled || scrapeConfigsPresent) { +func ValidateConfig(config *Config) error { + scrapeConfigsPresent := (config.PromConfig != nil && len(config.PromConfig.ScrapeConfigs) > 0) + if !(config.PrometheusCR.Enabled || scrapeConfigsPresent) { return fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled") } return nil diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go index 91f0d63b7..89f6307d8 100644 --- a/cmd/otel-allocator/config/config_test.go +++ b/cmd/otel-allocator/config/config_test.go @@ -51,7 +51,7 @@ func TestLoad(t *testing.T) { PrometheusCR: PrometheusCRConfig{ ScrapeInterval: model.Duration(time.Second * 60), }, - Config: &promconfig.Config{ + PromConfig: &promconfig.Config{ GlobalConfig: promconfig.GlobalConfig{ ScrapeInterval: model.Duration(60 * time.Second), ScrapeTimeout: model.Duration(10 * time.Second), @@ -99,7 +99,7 @@ func TestLoad(t *testing.T) { args: args{ file: "./testdata/no_config.yaml", }, - want: createDefaultConfig(), + want: CreateDefaultConfig(), wantErr: assert.NoError, }, { @@ -115,7 +115,7 @@ func TestLoad(t *testing.T) { PrometheusCR: PrometheusCRConfig{ ScrapeInterval: DefaultCRScrapeInterval, }, - Config: &promconfig.Config{ + PromConfig: &promconfig.Config{ GlobalConfig: promconfig.GlobalConfig{ ScrapeInterval: model.Duration(60 * time.Second), ScrapeTimeout: model.Duration(10 * time.Second), @@ -163,7 +163,8 @@ func TestLoad(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := Load(tt.args.file) + got := CreateDefaultConfig() + err := LoadFromFile(tt.args.file, &got) if !tt.wantErr(t, err, fmt.Sprintf("Load(%v)", tt.args.file)) { return } @@ -173,45 +174,38 @@ func TestLoad(t *testing.T) { } func TestValidateConfig(t *testing.T) { - enabled := true - disabled := false testCases := []struct { name string - cliConfig CLIConfig fileConfig Config expectedErr error }{ { name: "promCR enabled, no Prometheus config", - cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &enabled}}, - fileConfig: Config{Config: nil}, + fileConfig: Config{PromConfig: nil, PrometheusCR: PrometheusCRConfig{Enabled: true}}, expectedErr: nil, }, { name: "promCR disabled, no Prometheus config", - cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, - fileConfig: Config{Config: nil}, + fileConfig: Config{PromConfig: nil}, expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), }, { name: "promCR disabled, Prometheus config present, no scrapeConfigs", - cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, - fileConfig: Config{Config: &promconfig.Config{}}, + fileConfig: Config{PromConfig: &promconfig.Config{}}, expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), }, { - name: "promCR disabled, Prometheus config present, scrapeConfigs present", - cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &disabled}}, + name: "promCR disabled, Prometheus config present, scrapeConfigs present", fileConfig: Config{ - Config: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, + PromConfig: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, }, expectedErr: nil, }, { - name: "promCR enabled, Prometheus config present, scrapeConfigs present", - cliConfig: CLIConfig{PromCRWatcherConf: PrometheusCRWatcherConfig{Enabled: &enabled}}, + name: "promCR enabled, Prometheus config present, scrapeConfigs present", fileConfig: Config{ - Config: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, + PromConfig: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, + PrometheusCR: PrometheusCRConfig{Enabled: true}, }, expectedErr: nil, }, @@ -219,7 +213,7 @@ func TestValidateConfig(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - err := ValidateConfig(&tc.fileConfig, &tc.cliConfig) + err := ValidateConfig(&tc.fileConfig) assert.Equal(t, tc.expectedErr, err) }) } diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/config/flags.go new file mode 100644 index 000000000..bb7dbbb34 --- /dev/null +++ b/cmd/otel-allocator/config/flags.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "flag" + "path/filepath" + + "github.com/spf13/pflag" + "k8s.io/client-go/util/homedir" + "sigs.k8s.io/controller-runtime/pkg/log/zap" +) + +// Flag names. +const ( + targetAllocatorName = "target-allocator" + configFilePathFlagName = "config-file" + listenAddrFlagName = "listen-addr" + prometheusCREnabledFlagName = "enable-prometheus-cr-watcher" + kubeConfigPathFlagName = "kubeconfig-path" +) + +// We can't bind this flag to our FlagSet, so we need to handle it separately. +var zapCmdLineOpts zap.Options + +func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { + flagSet := pflag.NewFlagSet(targetAllocatorName, errorHandling) + flagSet.String(configFilePathFlagName, DefaultConfigFilePath, "The path to the config file.") + flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") + flagSet.Bool(prometheusCREnabledFlagName, false, "Enable Prometheus CRs as target sources") + flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) + zapCmdLineOpts.BindFlags(zapFlagSet) + flagSet.AddGoFlagSet(zapFlagSet) + return flagSet +} + +func getConfigFilePath(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(configFilePathFlagName) +} + +func getKubeConfigFilePath(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(kubeConfigPathFlagName) +} + +func getListenAddr(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(listenAddrFlagName) +} + +func getPrometheusCREnabled(flagSet *pflag.FlagSet) (bool, error) { + return flagSet.GetBool(prometheusCREnabledFlagName) +} diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/config/flags_test.go new file mode 100644 index 000000000..b1bf11b6c --- /dev/null +++ b/cmd/otel-allocator/config/flags_test.go @@ -0,0 +1,91 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "path/filepath" + "testing" + + "github.com/spf13/pflag" + "github.com/stretchr/testify/assert" +) + +func TestGetFlagSet(t *testing.T) { + fs := getFlagSet(pflag.ExitOnError) + + // Check if each flag exists + assert.NotNil(t, fs.Lookup(configFilePathFlagName), "Flag %s not found", configFilePathFlagName) + assert.NotNil(t, fs.Lookup(listenAddrFlagName), "Flag %s not found", listenAddrFlagName) + assert.NotNil(t, fs.Lookup(prometheusCREnabledFlagName), "Flag %s not found", prometheusCREnabledFlagName) + assert.NotNil(t, fs.Lookup(kubeConfigPathFlagName), "Flag %s not found", kubeConfigPathFlagName) +} + +func TestFlagGetters(t *testing.T) { + tests := []struct { + name string + flagArgs []string + expectedValue interface{} + expectedErr bool + getterFunc func(*pflag.FlagSet) (interface{}, error) + }{ + { + name: "GetConfigFilePath", + flagArgs: []string{"--" + configFilePathFlagName, "/path/to/config"}, + expectedValue: "/path/to/config", + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, + }, + { + name: "GetKubeConfigFilePath", + flagArgs: []string{"--" + kubeConfigPathFlagName, filepath.Join("~", ".kube", "config")}, + expectedValue: filepath.Join("~", ".kube", "config"), + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getKubeConfigFilePath(fs) }, + }, + { + name: "GetListenAddr", + flagArgs: []string{"--" + listenAddrFlagName, ":8081"}, + expectedValue: ":8081", + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getListenAddr(fs) }, + }, + { + name: "GetPrometheusCREnabled", + flagArgs: []string{"--" + prometheusCREnabledFlagName, "true"}, + expectedValue: true, + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getPrometheusCREnabled(fs) }, + }, + { + name: "InvalidFlag", + flagArgs: []string{"--invalid-flag", "value"}, + expectedErr: true, + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + fs := getFlagSet(pflag.ContinueOnError) + err := fs.Parse(tt.flagArgs) + + // If an error is expected during parsing, we check it here. + if tt.expectedErr { + assert.Error(t, err) + return + } + + got, err := tt.getterFunc(fs) + assert.NoError(t, err) + assert.Equal(t, tt.expectedValue, got) + }) + } +} diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 48f11403b..0a7cf8dad 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -16,6 +16,7 @@ package main import ( "context" + "fmt" "os" "os/signal" "syscall" @@ -64,21 +65,18 @@ func main() { interrupts = make(chan os.Signal, 1) errChan = make(chan error) ) - cliConf, err := config.ParseCLI() + cfg, configFilePath, err := config.Load() if err != nil { - setupLog.Error(err, "Failed to parse parameters") + fmt.Printf("Failed to load config: %v", err) os.Exit(1) } - cfg, configLoadErr := config.Load(*cliConf.ConfigFilePath) - if configLoadErr != nil { - setupLog.Error(configLoadErr, "Unable to load configuration") - } + ctrl.SetLogger(cfg.RootLogger) - if validationErr := config.ValidateConfig(&cfg, &cliConf); validationErr != nil { + if validationErr := config.ValidateConfig(cfg); validationErr != nil { setupLog.Error(validationErr, "Invalid configuration") } - cliConf.RootLogger.Info("Starting the Target Allocator") + cfg.RootLogger.Info("Starting the Target Allocator") ctx := context.Background() log := ctrl.Log.WithName("allocator") @@ -88,17 +86,17 @@ func main() { setupLog.Error(err, "Unable to initialize allocation strategy") os.Exit(1) } - srv := server.NewServer(log, allocator, cliConf.ListenAddr) + srv := server.NewServer(log, allocator, cfg.ListenAddr) discoveryCtx, discoveryCancel := context.WithCancel(ctx) discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger()) targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook, srv) - collectorWatcher, collectorWatcherErr := collector.NewClient(log, cliConf.ClusterConfig) + collectorWatcher, collectorWatcherErr := collector.NewClient(log, cfg.ClusterConfig) if collectorWatcherErr != nil { setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") os.Exit(1) } - fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), cliConf) + fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath) if err != nil { setupLog.Error(err, "Can't start the file watcher") os.Exit(1) @@ -106,8 +104,8 @@ func main() { signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) defer close(interrupts) - if *cliConf.PromCRWatcherConf.Enabled { - promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(setupLog.WithName("prometheus-cr-watcher"), cfg, cliConf) + if cfg.PrometheusCR.Enabled { + promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(setupLog.WithName("prometheus-cr-watcher"), *cfg) if err != nil { setupLog.Error(err, "Can't start the prometheus watcher") os.Exit(1) @@ -152,7 +150,7 @@ func main() { runGroup.Add( func() error { // Initial loading of the config file's scrape config - err = targetDiscoverer.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.Config) + err = targetDiscoverer.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.PromConfig) if err != nil { setupLog.Error(err, "Unable to apply initial configuration") return err diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go index e2b90c136..8fcea90b0 100644 --- a/cmd/otel-allocator/server/bench_test.go +++ b/cmd/otel-allocator/server/bench_test.go @@ -54,7 +54,7 @@ func BenchmarkServerTargetsHandler(b *testing.B) { listenAddr := ":8080" a.SetCollectors(cols) a.SetTargets(targets) - s := NewServer(logger, a, &listenAddr) + s := NewServer(logger, a, listenAddr) b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; i++ { diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 8351a85d3..c9c93951d 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -71,7 +71,7 @@ type Server struct { scrapeConfigResponse []byte } -func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr *string) *Server { +func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr string) *Server { s := &Server{ logger: log, allocator: allocator, @@ -90,7 +90,7 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr *stri router.GET("/metrics", gin.WrapH(promhttp.Handler())) registerPprof(router.Group("/debug/pprof/")) - s.server = &http.Server{Addr: *listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} + s.server = &http.Server{Addr: listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} return s } diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index c58f5dc6b..975df83ac 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -154,7 +154,7 @@ func TestServer_TargetsHandler(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { listenAddr := ":8080" - s := NewServer(logger, tt.args.allocator, &listenAddr) + s := NewServer(logger, tt.args.allocator, listenAddr) tt.args.allocator.SetCollectors(map[string]*allocation.Collector{"test-collector": {Name: "test-collector"}}) tt.args.allocator.SetTargets(tt.args.cMap) request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/%s/targets?collector_id=%s", tt.args.job, tt.args.collector), nil) @@ -445,7 +445,7 @@ func TestServer_ScrapeConfigsHandler(t *testing.T) { for _, tc := range tests { t.Run(tc.description, func(t *testing.T) { listenAddr := ":8080" - s := NewServer(logger, nil, &listenAddr) + s := NewServer(logger, nil, listenAddr) assert.NoError(t, s.UpdateScrapeConfigResponse(tc.scrapeConfigs)) request := httptest.NewRequest("GET", "/scrape_configs", nil) @@ -518,7 +518,7 @@ func TestServer_JobHandler(t *testing.T) { t.Run(tc.description, func(t *testing.T) { listenAddr := ":8080" a := &mockAllocator{targetItems: tc.targetItems} - s := NewServer(logger, a, &listenAddr) + s := NewServer(logger, a, listenAddr) request := httptest.NewRequest("GET", "/jobs", nil) w := httptest.NewRecorder() diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index 49bfaa471..25a44b641 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -83,10 +83,11 @@ func TestDiscovery(t *testing.T) { }() for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - cfg, err := config.Load(tt.args.file) + cfg := config.CreateDefaultConfig() + err := config.LoadFromFile(tt.args.file, &cfg) assert.NoError(t, err) - assert.True(t, len(cfg.Config.ScrapeConfigs) > 0) - err = manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg.Config) + assert.True(t, len(cfg.PromConfig.ScrapeConfigs) > 0) + err = manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg.PromConfig) assert.NoError(t, err) gotTargets := <-results @@ -96,7 +97,7 @@ func TestDiscovery(t *testing.T) { // check the updated scrape configs expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} - for _, scrapeConfig := range cfg.Config.ScrapeConfigs { + for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { expectedScrapeConfigs[scrapeConfig.JobName] = scrapeConfig } assert.Equal(t, expectedScrapeConfigs, scu.mockCfg) diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index 95b5cfaaa..a6bbd15fd 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -34,7 +34,7 @@ type FileWatcher struct { closer chan bool } -func NewFileWatcher(logger logr.Logger, config config.CLIConfig) (*FileWatcher, error) { +func NewFileWatcher(logger logr.Logger, configFilePath string) (*FileWatcher, error) { fileWatcher, err := fsnotify.NewWatcher() if err != nil { logger.Error(err, "Can't start the watcher") @@ -43,19 +43,20 @@ func NewFileWatcher(logger logr.Logger, config config.CLIConfig) (*FileWatcher, return &FileWatcher{ logger: logger, - configFilePath: *config.ConfigFilePath, + configFilePath: configFilePath, watcher: fileWatcher, closer: make(chan bool), }, nil } func (f *FileWatcher) LoadConfig(_ context.Context) (*promconfig.Config, error) { - cfg, err := config.Load(f.configFilePath) + cfg := config.CreateDefaultConfig() + err := config.LoadFromFile(f.configFilePath, &cfg) if err != nil { f.logger.Error(err, "Unable to load configuration") return nil, err } - return cfg.Config, nil + return cfg.PromConfig, nil } func (f *FileWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 3df39e095..2eb91fe7a 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -37,13 +37,13 @@ import ( allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) -func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config, cliConfig allocatorconfig.CLIConfig) (*PrometheusCRWatcher, error) { - mClient, err := monitoringclient.NewForConfig(cliConfig.ClusterConfig) +func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*PrometheusCRWatcher, error) { + mClient, err := monitoringclient.NewForConfig(cfg.ClusterConfig) if err != nil { return nil, err } - clientset, err := kubernetes.NewForConfig(cliConfig.ClusterConfig) + clientset, err := kubernetes.NewForConfig(cfg.ClusterConfig) if err != nil { return nil, err } @@ -80,7 +80,7 @@ func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config, cliC informers: monitoringInformers, stopChannel: make(chan struct{}), configGenerator: generator, - kubeConfigPath: cliConfig.KubeConfigFilePath, + kubeConfigPath: cfg.KubeConfigFilePath, serviceMonitorSelector: servMonSelector, podMonitorSelector: podMonSelector, }, nil From d821037587f5b74936b7f7d85c849728e4535685 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 22 Sep 2023 10:10:57 -0400 Subject: [PATCH 1035/1234] Bump TA and bridge deps (#2144) --- cmd/operator-opamp-bridge/go.mod | 41 +++++------ cmd/operator-opamp-bridge/go.sum | 83 ++++++++++++---------- cmd/otel-allocator/go.mod | 36 +++++----- cmd/otel-allocator/go.sum | 77 ++++++++++---------- cmd/otel-allocator/watcher/promOperator.go | 2 +- 5 files changed, 122 insertions(+), 117 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index e1257eb42..d64ee78f0 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -5,8 +5,8 @@ go 1.20 require ( github.com/go-logr/logr v1.2.4 github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.7.0 - github.com/open-telemetry/opentelemetry-operator v0.78.0 + github.com/open-telemetry/opamp-go v0.9.0 + github.com/open-telemetry/opentelemetry-operator v0.85.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -28,17 +28,17 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.4 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -48,48 +48,49 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/procfs v0.11.0 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/featuregate v0.75.0 // indirect + go.opentelemetry.io/collector/featuregate v0.77.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect go.opentelemetry.io/otel/trace v1.18.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/exp v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/net v0.13.0 // indirect + golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect + golang.org/x/net v0.15.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/grpc v1.58.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.2 // indirect - k8s.io/apiextensions-apiserver v0.28.0 // indirect - k8s.io/component-base v0.28.1 // indirect + k8s.io/apiextensions-apiserver v0.28.2 // indirect + k8s.io/component-base v0.28.2 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 645f9370a..edddf3292 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -8,10 +8,11 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -28,12 +29,14 @@ github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -60,8 +63,8 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -80,6 +83,8 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -91,24 +96,25 @@ github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/open-telemetry/opamp-go v0.7.0 h1:PbxBsSmJwA4mJQbL5mhmxZ8KxNKqn1HBcoDilXIcPR8= -github.com/open-telemetry/opamp-go v0.7.0/go.mod h1:IMdeuHGVc5CjKSu5/oNV0o+UmiXuahoHvoZ4GOmAI9M= -github.com/open-telemetry/opentelemetry-operator v0.78.0 h1:a5pjoL+JfU6rHWHaZ14qB2NCU5JuV/2p/ZvjgzEuE9I= -github.com/open-telemetry/opentelemetry-operator v0.78.0/go.mod h1:NexspHhRcEj5zGXuyrEKc7+zBw3xhJdiemfOI9lJ+yc= +github.com/open-telemetry/opamp-go v0.9.0 h1:S6Mwn8uxYjcttE6ZJ6AXoiOuryU67zjKysz3xRfYL9k= +github.com/open-telemetry/opamp-go v0.9.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= +github.com/open-telemetry/opentelemetry-operator v0.85.0 h1:HwKfaxePbGJCbl3y2rselSnT1QUw1Xd+81DkYTEvws8= +github.com/open-telemetry/opentelemetry-operator v0.85.0/go.mod h1:6od0b2oGG/cqr8+nyOB4wsz1fg7QjnIsZDuynZqzBPE= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= +github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -133,8 +139,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector/featuregate v0.75.0 h1:543kdhXh7/dHTwpHsjv+lgIz73RJD2lCkLrFi4UjZjk= -go.opentelemetry.io/collector/featuregate v0.75.0/go.mod h1:pmVMr98Ps6QKyEHiVPN7o3Qd8K//M2NapfOv5BMWvA0= +go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= +go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= @@ -163,8 +169,8 @@ go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833 h1:SChBja7BCQewoTAU7IgvucQKMIXrEpFxNMs0spT3/5s= -golang.org/x/exp v0.0.0-20230307190834-24139beb5833/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= +golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -176,8 +182,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -197,13 +203,13 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -212,7 +218,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= +golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -221,11 +227,11 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= +google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= @@ -242,30 +248,29 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= -k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= -k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 38c2ed0a3..ddb7f8b58 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -13,9 +13,9 @@ require ( github.com/json-iterator/go v1.1.12 github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.67.1 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 + github.com/prometheus-operator/prometheus-operator v0.68.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 github.com/prometheus/client_golang v1.16.0 github.com/prometheus/common v0.44.0 github.com/prometheus/prometheus v0.47.0 @@ -49,7 +49,7 @@ require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.44.302 // indirect + github.com/aws/aws-sdk-go v1.44.317 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect @@ -64,7 +64,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/efficientgo/core v1.0.0-rc.2 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/go-control-plane v0.11.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect @@ -101,7 +101,7 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gophercloud/gophercloud v1.5.0 // indirect @@ -127,7 +127,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/klauspost/compress v1.16.7 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.2.4 // indirect @@ -154,7 +154,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect - github.com/prometheus/alertmanager v0.25.1 // indirect + github.com/prometheus/alertmanager v0.26.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.0 // indirect @@ -173,20 +173,20 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.11.0 // indirect + golang.org/x/crypto v0.13.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.13.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.132.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect @@ -195,10 +195,10 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.0 // indirect + k8s.io/apiextensions-apiserver v0.28.1 // indirect k8s.io/component-base v0.28.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index add523c36..11685f23c 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -92,10 +92,10 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= -github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.317 h1:+8XWrLmGMwPPXSRSLPzhgcGnzJ2mYkgkrcB9C/GnSOU= +github.com/aws/aws-sdk-go v1.44.317/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -152,8 +152,8 @@ github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= github.com/efficientgo/core v1.0.0-rc.2/go.mod h1:FfGdkzWarkuzOlY04VY+bGfb1lWrjaL6x/GLcQ4vJps= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -361,8 +361,8 @@ github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -462,8 +462,8 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -575,14 +575,14 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok= github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA= -github.com/prometheus-operator/prometheus-operator v0.67.1 h1:LeGZIsI8KZ99A6qJcvXvrxPN7FKJQbDbNxd3UDzmTF4= -github.com/prometheus-operator/prometheus-operator v0.67.1/go.mod h1:8yYIaEL+Xt8+MxZ8s6uiIw0fvD/WiLmjuRTQTG55OEw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1 h1:kC77/UqP9o9tDquMbE/eS1J2wi0tNlYzhNJSXx9KPS4= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.67.1/go.mod h1:77dVxBmR4RbIrP6DSVeZCeknlxFZtS4287RaDXMMOoA= -github.com/prometheus/alertmanager v0.25.1 h1:LGBNMspOfv8h7brb+LWj2wnwBCg2ZuuKWTh6CAVw2/Y= -github.com/prometheus/alertmanager v0.25.1/go.mod h1:MEZ3rFVHqKZsw7IcNS/m4AWZeXThmJhumpiWR4eHU/w= +github.com/prometheus-operator/prometheus-operator v0.68.0 h1:cbsqyRh0rLKiLas5lG8pQQaITLQl/PVvw0K/xC0CZ4w= +github.com/prometheus-operator/prometheus-operator v0.68.0/go.mod h1:BrMWJOfNvXRaO2Y7fUuxOLzuTM8wzzlC96d0opwzWnk= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 h1:yl9ceUSUBo9woQIO+8eoWpcxZkdZgm89g+rVvu37TUw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0/go.mod h1:9Uuu3pEU2jB8PwuqkHvegQ0HV/BlZRJUyfTYAqfdVF8= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 h1:8FS0sXpFkFPxp2gfkxyEMnhZV9yhf7xPbpsIeUZHlzM= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0/go.mod h1:ul4ND0BMCcOX1OSZvbJA1/lh7yQ2ILHNKuZIojGISe4= +github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= +github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -729,8 +729,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -808,16 +808,16 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -888,7 +888,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -896,14 +895,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -915,8 +914,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1003,8 +1002,8 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1100,7 +1099,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1110,8 +1109,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= -k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTKSmQZw= +k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= @@ -1120,10 +1119,10 @@ k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= +k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 2eb91fe7a..9bb219b7b 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -284,7 +284,7 @@ func (w *PrometheusCRWatcher) addStoreAssetsForPodMonitor( for i, endp := range podMetricsEndps { objKey := fmt.Sprintf("podMonitor/%s/%s/%d", pmNamespace, pmName, i) - if err = store.AddBearerToken(ctx, pmNamespace, endp.BearerTokenSecret, objKey); err != nil { + if err = store.AddBearerToken(ctx, pmNamespace, &endp.BearerTokenSecret, objKey); err != nil { break } From 088b4c786a70fda0779143f615a1b6cd74231290 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 22 Sep 2023 16:16:05 +0200 Subject: [PATCH 1036/1234] [chore] Build and publish application hosted in the repository for the Golang instrumentation E2E test (#2097) * Build and publish the Golang E2E image Signed-off-by: Israel Blancas * Fix the CI Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Add missing header Signed-off-by: Israel Blancas * Use alpine image for builder Signed-off-by: Israel Blancas * Change image name Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...ublish-autoinstrumentation-e2e-images.yaml | 61 +++++++++++++++++++ .../golang/Dockerfile | 8 +++ tests/instrumentation-e2e-apps/golang/main.go | 37 +++++++++++ 3 files changed, 106 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-e2e-images.yaml create mode 100644 tests/instrumentation-e2e-apps/golang/Dockerfile create mode 100644 tests/instrumentation-e2e-apps/golang/main.go diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml new file mode 100644 index 000000000..aeedb5a66 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -0,0 +1,61 @@ +name: "Publish instrumentation E2E images" + +on: + push: + paths: + - 'tests/instrumentation-e2e-apps/**' + - '.github/workflows/publish-autoinstrumentation-e2e-images.yaml' + branches: + - main + pull_request: + paths: + - 'tests/instrumentation-e2e-apps/**' + - '.github/workflows/publish-autoinstrumentation-e2e-images.yaml' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + golang: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to GitHub Package Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: tests/instrumentation-e2e-apps/golang + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + push: ${{ github.event_name == 'push' }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/tests/instrumentation-e2e-apps/golang/Dockerfile b/tests/instrumentation-e2e-apps/golang/Dockerfile new file mode 100644 index 000000000..fd80c06f1 --- /dev/null +++ b/tests/instrumentation-e2e-apps/golang/Dockerfile @@ -0,0 +1,8 @@ +FROM golang:1.21-alpine as builder + +COPY main.go . +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -o app main.go + +FROM scratch +COPY --from=builder /go/app . +ENTRYPOINT ["./app"] diff --git a/tests/instrumentation-e2e-apps/golang/main.go b/tests/instrumentation-e2e-apps/golang/main.go new file mode 100644 index 000000000..ad3641037 --- /dev/null +++ b/tests/instrumentation-e2e-apps/golang/main.go @@ -0,0 +1,37 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "fmt" + "net/http" + "time" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + fmt.Println("Hi") + }) + + server := &http.Server{ + Addr: ":8080", + ReadHeaderTimeout: 3 * time.Second, + } + + err := server.ListenAndServe() + if err != nil { + panic(err) + } +} From 51469b92336a2db5cb6e4e11250628f48c023df7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:47:01 +0200 Subject: [PATCH 1037/1234] Bump docker/setup-buildx-action from 2 to 3 (#2152) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index aeedb5a66..368c54463 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -34,7 +34,7 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers uses: actions/cache@v3 From 6f6fb7ca4e538b935f815d646da11f4972d835c7 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 25 Sep 2023 10:06:25 +0200 Subject: [PATCH 1038/1234] Propagate proxy env vars (#2146) * Propagate proxy env vars Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- .chloggen/proxy.yaml | 16 ++++++++++ go.mod | 1 + go.sum | 5 +++ internal/manifests/collector/container.go | 2 ++ .../manifests/collector/container_test.go | 22 +++++++++++++ .../manifests/targetallocator/container.go | 2 ++ .../targetallocator/container_test.go | 32 +++++++++++++++++++ 7 files changed, 80 insertions(+) create mode 100755 .chloggen/proxy.yaml diff --git a/.chloggen/proxy.yaml b/.chloggen/proxy.yaml new file mode 100755 index 000000000..5b2bf7715 --- /dev/null +++ b/.chloggen/proxy.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Propagate proxy environment variables to operands. + +# One or more tracking issues related to the change +issues: [2146] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/go.mod b/go.mod index 6389132e5..7055c7f2b 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/imdario/mergo v0.3.16 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible + github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 github.com/prometheus/prometheus v0.47.0 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index fee311ee0..3e93d7b6c 100644 --- a/go.sum +++ b/go.sum @@ -418,6 +418,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -426,6 +428,8 @@ github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrB github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/operator-framework/operator-lib v0.11.0 h1:eYzqpiOfq9WBI4Trddisiq/X9BwCisZd3rIzmHRC9Z8= +github.com/operator-framework/operator-lib v0.11.0/go.mod h1:RpyKhFAoG6DmKTDIwMuO6pI3LRc8IE9rxEYWy476o6g= github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -895,6 +899,7 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 0b9d324d8..be5a50c74 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -21,6 +21,7 @@ import ( "sort" "github.com/go-logr/logr" + "github.com/operator-framework/operator-lib/proxy" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation" @@ -140,6 +141,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } } + envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) return corev1.Container{ Name: naming.Container(), Image: image, diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index d2c491238..6502bbc10 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -15,9 +15,11 @@ package collector_test import ( + "os" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -409,6 +411,26 @@ func TestContainerDefaultEnvVars(t *testing.T) { assert.Equal(t, c.Env[0].Name, "POD_NAME") } +func TestContainerProxyEnvVars(t *testing.T) { + err := os.Setenv("NO_PROXY", "localhost") + require.NoError(t, err) + defer os.Unsetenv("NO_PROXY") + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + } + + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol, true) + + // verify + require.Len(t, c.Env, 3) + assert.Equal(t, "POD_NAME", c.Env[0].Name) + assert.Equal(t, corev1.EnvVar{Name: "NO_PROXY", Value: "localhost"}, c.Env[1]) + assert.Equal(t, corev1.EnvVar{Name: "no_proxy", Value: "localhost"}, c.Env[2]) +} + func TestContainerResourceRequirements(t *testing.T) { otelcol := v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 4b7e408c8..8c88b41ea 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -16,6 +16,7 @@ package targetallocator import ( "github.com/go-logr/logr" + "github.com/operator-framework/operator-lib/proxy" corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -61,6 +62,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { args = append(args, "--enable-prometheus-cr-watcher") } + envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) return corev1.Container{ Name: naming.TAContainer(), Image: image, diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 534574961..1661e319a 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -15,9 +15,11 @@ package targetallocator import ( + "os" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -175,6 +177,36 @@ func TestContainerHasEnvVars(t *testing.T) { assert.Equal(t, expected, c) } +func TestContainerHasProxyEnvVars(t *testing.T) { + err := os.Setenv("NO_PROXY", "localhost") + require.NoError(t, err) + defer os.Unsetenv("NO_PROXY") + + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Env: []corev1.EnvVar{ + { + Name: "TEST_ENV", + Value: "test", + }, + }, + }, + }, + } + cfg := config.New(config.WithTargetAllocatorImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + require.Len(t, c.Env, 4) + assert.Equal(t, corev1.EnvVar{Name: "NO_PROXY", Value: "localhost"}, c.Env[2]) + assert.Equal(t, corev1.EnvVar{Name: "no_proxy", Value: "localhost"}, c.Env[3]) +} + func TestContainerDoesNotOverrideEnvVars(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ From c370b9b311c060348395126e23aff3221c510c28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:08:37 +0200 Subject: [PATCH 1039/1234] Bump docker/metadata-action from 4 to 5 (#2151) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 368c54463..0bd268f96 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -26,7 +26,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang From 138eabaaf282a3e405c5b01bf534408592dc0cf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:09:04 +0200 Subject: [PATCH 1040/1234] Bump docker/login-action from 2 to 3 (#2150) Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 0bd268f96..3d7a13175 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -45,7 +45,7 @@ jobs: ${{ runner.os }}-buildx- - name: Login to GitHub Package Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} From 5df78ad4ddab9143ee8be8785e218333f4a3d15f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:14:52 +0200 Subject: [PATCH 1041/1234] Bump docker/build-push-action from 4 to 5 (#2149) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 3d7a13175..d9173e3cc 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -52,7 +52,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: tests/instrumentation-e2e-apps/golang platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le From af2e01ad65c71b3962ff6113f5b52698e2fce5bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:15:11 +0200 Subject: [PATCH 1042/1234] Bump actions/checkout from 3 to 4 (#2148) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index d9173e3cc..11a5828d2 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker meta id: meta From 9f669d14c725b0cdf90142c3d23d002553d61dab Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 25 Sep 2023 12:46:52 +0200 Subject: [PATCH 1043/1234] Dependabot group for GHA docker actions (#2153) Signed-off-by: Pavol Loffay --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 86ba93a58..c00d2ffcf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -66,6 +66,10 @@ updates: directory: / schedule: interval: daily + groups: + gha-docker: + patterns: + - "docker/*" - package-ecosystem: docker directory: / From 454c2062526d0e42c468329931236946cbbd0994 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 15:24:11 +0200 Subject: [PATCH 1044/1234] Bump the gha-docker group with 1 update (#2156) Bumps the gha-docker group with 1 update: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action). - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: gha-docker ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/publish-autoinstrumentation-e2e-images.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 11a5828d2..1d2a16efd 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -31,7 +31,7 @@ jobs: images: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From a8109a63a541a7f660e5f1e3a43ed174ceee28b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 28 Sep 2023 13:46:38 +0200 Subject: [PATCH 1045/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.2 (#2168) --- .chloggen/{bump-dotnet-1.0.1.yaml => bump-dotnet-1.0.2.yaml} | 4 ++-- autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .chloggen/{bump-dotnet-1.0.1.yaml => bump-dotnet-1.0.2.yaml} (89%) diff --git a/.chloggen/bump-dotnet-1.0.1.yaml b/.chloggen/bump-dotnet-1.0.2.yaml similarity index 89% rename from .chloggen/bump-dotnet-1.0.1.yaml rename to .chloggen/bump-dotnet-1.0.2.yaml index 4ec74f301..b2e14cc9e 100644 --- a/.chloggen/bump-dotnet-1.0.1.yaml +++ b/.chloggen/bump-dotnet-1.0.2.yaml @@ -5,10 +5,10 @@ change_type: enhancement component: autoinstrumentation # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.1 +note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.2 # One or more tracking issues related to the change -issues: [2142] +issues: [2168] # (Optional) One or more lines of additional information to render under the primary note. # These lines will be padded with 2 spaces and then inserted directly into the document. diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 7dea76edb..6d7de6e6a 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.0.1 +1.0.2 From 29e8ba373934711587902b1838e66613a4b94aa7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:52:58 +0200 Subject: [PATCH 1046/1234] Bump github.com/prometheus/client_golang in /cmd/otel-allocator (#2167) Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/v1.17.0/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.16.0...v1.17.0) --- updated-dependencies: - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 6 +++--- cmd/otel-allocator/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index ddb7f8b58..801bcbed6 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus-operator/prometheus-operator v0.68.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 github.com/prometheus/prometheus v0.47.0 github.com/spf13/pflag v1.0.5 @@ -155,9 +155,9 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect github.com/prometheus/alertmanager v0.26.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 11685f23c..cc5a1bdf2 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -589,14 +589,14 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -611,8 +611,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/prometheus/prometheus v0.47.0 h1:tIJJKZGlmrMVsvIt6rMfB8he7CRHEc8ZxS5ubcZtbkM= github.com/prometheus/prometheus v0.47.0/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= From 37cf662557235cf082836064712703e737851716 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Thu, 28 Sep 2023 18:43:37 +0200 Subject: [PATCH 1047/1234] feat: Bump lowest supported k8s version to 1.23 (#2162) * feat: Bump lowest supported k8s version to 1.23 Signed-off-by: Jorge Turrado * u8ndo the format Signed-off-by: Jorge Turrado * undo wrong change Signed-off-by: Jorge Turrado * update kind-yaml Signed-off-by: Jorge Turrado * unify stykle Signed-off-by: Jorge Turrado * revert the change * apply feedback Signed-off-by: Jorge Turrado * apply feedback Signed-off-by: Jorge Turrado * apply feedback Signed-off-by: Jorge Turrado --------- Signed-off-by: Jorge Turrado --- .chloggen/get-rid-of-autoscaling-v2beta2.yaml | 20 ++ .github/workflows/e2e.yaml | 8 +- .github/workflows/scorecard.yaml | 8 +- .../opentelemetrycollector_controller.go | 8 +- .../opentelemetrycollector_controller_test.go | 8 - controllers/reconcile_test.go | 48 +--- controllers/suite_test.go | 14 +- internal/config/main.go | 46 ---- internal/config/main_test.go | 14 - internal/config/options.go | 1 - .../collector/horizontalpodautoscaler.go | 250 +++--------------- .../collector/horizontalpodautoscaler_test.go | 174 ++---------- kind-1.19.yaml | 18 -- kind-1.20.yaml | 18 -- kind-1.21.yaml | 18 -- kind-1.22.yaml | 18 -- kind-1.23.yaml | 30 +-- pkg/autodetect/main.go | 62 ----- pkg/autodetect/main_test.go | 12 - tests/e2e-autoscale/autoscale/00-assert.yaml | 73 +++++ tests/e2e-autoscale/autoscale/01-assert.yaml | 36 +++ .../01-check-simplest-collector-hpa.yaml | 4 - tests/e2e-autoscale/autoscale/01-install.yaml | 44 +++ .../{05-assert.yaml => 02-assert.yaml} | 2 +- ...implest-set-utilization-collector-hpa.yaml | 4 - tests/e2e-autoscale/autoscale/02-install.yaml | 61 ++--- tests/e2e-autoscale/autoscale/03-assert.yaml | 2 +- .../{04-delete.yaml => 03-delete.yaml} | 0 tests/e2e-autoscale/autoscale/03-install.yaml | 21 -- ...fy-simplest-set-collector-hpa-metrics.yaml | 4 - .../cmd/verify/wait-and-validate-metrics.go | 187 ------------- .../autoscale/wait-until-hpa-ready.go | 121 --------- 32 files changed, 277 insertions(+), 1057 deletions(-) create mode 100644 .chloggen/get-rid-of-autoscaling-v2beta2.yaml delete mode 100644 kind-1.19.yaml delete mode 100644 kind-1.20.yaml delete mode 100644 kind-1.21.yaml delete mode 100644 kind-1.22.yaml create mode 100644 tests/e2e-autoscale/autoscale/01-assert.yaml delete mode 100644 tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml create mode 100644 tests/e2e-autoscale/autoscale/01-install.yaml rename tests/e2e-autoscale/autoscale/{05-assert.yaml => 02-assert.yaml} (88%) delete mode 100644 tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml rename tests/e2e-autoscale/autoscale/{04-delete.yaml => 03-delete.yaml} (100%) delete mode 100644 tests/e2e-autoscale/autoscale/03-install.yaml delete mode 100644 tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml delete mode 100644 tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go delete mode 100644 tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go diff --git a/.chloggen/get-rid-of-autoscaling-v2beta2.yaml b/.chloggen/get-rid-of-autoscaling-v2beta2.yaml new file mode 100644 index 000000000..554ccd15e --- /dev/null +++ b/.chloggen/get-rid-of-autoscaling-v2beta2.yaml @@ -0,0 +1,20 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Get rid of autoscaling/v2beta2 + +# One or more tracking issues related to the change +issues: + - 2145 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Kubernetes 1.23 is the minimum available version everywhere after 1.22 deprecation, + due to it, the minimum required version has been updated to it, dropping support for + autoscaling/v2beta2 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 093839316..fa3acafe7 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -10,10 +10,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true -env: - CURRENT_KIND_VERSION: 0.20.0 - LEGACY_KIND_VERSION: 0.17.0 # for K8s versions latest kind doesn't support anymore - jobs: e2e-tests: name: End-to-end tests @@ -25,7 +21,7 @@ jobs: # All Kubernetes version in between expose the same APIs, hence the operator # should be compatible with them. kube-version: - - "1.19" + - "1.23" - "1.28" group: - e2e @@ -42,7 +38,7 @@ jobs: - name: Setup kind env: - KIND_VERSION: ${{ matrix.kube_version >= 1.21 && env.KIND_VERSION || env.LEGACY_KIND_VERSION }} + KIND_VERSION: "0.20.0" run: go install sigs.k8s.io/kind@v${KIND_VERSION} - name: Check out code into the Go module directory diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 6090e640f..10e6a2d0e 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -10,10 +10,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true -env: - CURRENT_KIND_VERSION: 0.20.0 - LEGACY_KIND_VERSION: 0.17.0 # for K8s versions latest kind doesn't support anymore - jobs: scorecard-tests: name: test on k8s @@ -21,7 +17,7 @@ jobs: strategy: matrix: kube-version: - - "1.19" + - "1.23" - "1.28" steps: @@ -33,7 +29,7 @@ jobs: - name: Setup kind env: - KIND_VERSION: ${{ matrix.kube_version >= 1.21 && env.KIND_VERSION || env.LEGACY_KIND_VERSION }} + KIND_VERSION: "0.20.0" run: go install sigs.k8s.io/kind@v${KIND_VERSION} - name: Check out code into the Go module directory diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 65caeb303..4cde37c46 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -25,7 +25,6 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -304,12 +303,7 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er builder.Owns(&monitoringv1.ServiceMonitor{}) } - autoscalingVersion := r.config.AutoscalingVersion() - if autoscalingVersion == autodetect.AutoscalingVersionV2 { - builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) - } else { - builder = builder.Owns(&autoscalingv2beta2.HorizontalPodAutoscaler{}) - } + builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) return builder.Complete(r) } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 27441d45f..261115c08 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -44,9 +44,6 @@ import ( var logger = logf.Log.WithName("unit-tests") var mockAutoDetector = &mockAutoDetect{ - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - return autodetect.AutoscalingVersionV2Beta2, nil - }, OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { return autodetect.OpenShiftRoutesAvailable, nil }, @@ -336,11 +333,6 @@ var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) -} - -func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { - return m.HPAVersionFunc() } func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 3a87607e4..03ca153b1 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -38,7 +38,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) const ( @@ -276,54 +275,11 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }, }, }, - { - name: "hpa v2beta2 deployment collector", - args: args{ - params: paramsWithHPA(autodetect.AutoscalingVersionV2Beta2, 3, 5), - updates: []manifests.Params{paramsWithHPA(autodetect.AutoscalingVersionV2Beta2, 1, 9)}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - assert.Equal(t, int32(3), *actual.Spec.MinReplicas) - assert.Equal(t, int32(5), actual.Spec.MaxReplicas) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(9), actual.Spec.MaxReplicas) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, { name: "hpa v2 deployment collector", args: args{ - params: paramsWithHPA(autodetect.AutoscalingVersionV2, 3, 5), - updates: []manifests.Params{paramsWithHPA(autodetect.AutoscalingVersionV2, 1, 9)}, + params: paramsWithHPA(3, 5), + updates: []manifests.Params{paramsWithHPA(1, 9)}, }, want: []want{ { diff --git a/controllers/suite_test.go b/controllers/suite_test.go index bf9bbc1ef..d44eb5f2b 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -49,7 +49,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" // +kubebuilder:scaffold:imports ) @@ -277,7 +276,7 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { }, nil } -func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion, minReps, maxReps int32) manifests.Params { +func paramsWithHPA(minReps, maxReps int32) manifests.Params { configYAML, err := os.ReadFile("testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) @@ -285,16 +284,7 @@ func paramsWithHPA(autoscalingVersion autodetect.AutoscalingVersion, minReps, ma cpuUtilization := int32(90) - mockAutoDetector := &mockAutoDetect{ - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - return autoscalingVersion, nil - }, - } - configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - err = configuration.AutoDetect() - if err != nil { - logger.Error(err, "configuration.autodetect failed") - } + configuration := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) return manifests.Params{ Config: configuration, diff --git a/internal/config/main.go b/internal/config/main.go index 225f590f6..64d2beec8 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -51,7 +51,6 @@ type Config struct { labelsFilter []string openshiftRoutes openshiftRoutesStore autoDetectFrequency time.Duration - hpaVersion hpaVersionStore } // New constructs a new configuration based on the given options. @@ -63,7 +62,6 @@ func New(opts ...Option) Config { targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, logger: logf.Log.WithName("config"), openshiftRoutes: newOpenShiftRoutesWrapper(), - hpaVersion: newHPAVersionWrapper(), version: version.Get(), onOpenShiftRoutesChange: newOnChange(), } @@ -81,7 +79,6 @@ func New(opts ...Option) Config { targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, logger: o.logger, openshiftRoutes: o.openshiftRoutes, - hpaVersion: o.hpaVersion, onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, @@ -129,15 +126,6 @@ func (c *Config) AutoDetect() error { } } - hpaV, err := c.autoDetect.HPAVersion() - if err != nil { - return err - } - if c.hpaVersion.Get() != hpaV { - c.logger.V(1).Info("HPA version detected", "version", hpaV) - c.hpaVersion.Set(hpaV) - } - return nil } @@ -166,11 +154,6 @@ func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability { return c.openshiftRoutes.Get() } -// AutoscalingVersion represents the preferred version of autoscaling. -func (c *Config) AutoscalingVersion() autodetect.AutoscalingVersion { - return c.hpaVersion.Get() -} - // AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. func (c *Config) AutoInstrumentationJavaImage() string { return c.autoInstrumentationJavaImage @@ -212,35 +195,6 @@ func (c *Config) RegisterOpenShiftRoutesChangeCallback(f func() error) { c.onOpenShiftRoutesChange.Register(f) } -type hpaVersionStore interface { - Set(hpaV autodetect.AutoscalingVersion) - Get() autodetect.AutoscalingVersion -} - -func newHPAVersionWrapper() hpaVersionStore { - return &hpaVersionWrapper{ - current: autodetect.AutoscalingVersionUnknown, - } -} - -type hpaVersionWrapper struct { - mu sync.Mutex - current autodetect.AutoscalingVersion -} - -func (p *hpaVersionWrapper) Set(hpaV autodetect.AutoscalingVersion) { - p.mu.Lock() - p.current = hpaV - p.mu.Unlock() -} - -func (p *hpaVersionWrapper) Get() autodetect.AutoscalingVersion { - p.mu.Lock() - hpaV := p.current - p.mu.Unlock() - return hpaV -} - type openshiftRoutesStore interface { Set(ora autodetect.OpenShiftRoutesAvailability) Get() autodetect.OpenShiftRoutesAvailability diff --git a/internal/config/main_test.go b/internal/config/main_test.go index e6085ead6..7bda3f64c 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -38,7 +38,6 @@ func TestNewConfig(t *testing.T) { assert.Equal(t, "some-image", cfg.CollectorImage()) assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) assert.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) - assert.Equal(t, autodetect.AutoscalingVersionUnknown, cfg.AutoscalingVersion()) } func TestOnPlatformChangeCallback(t *testing.T) { @@ -78,10 +77,6 @@ func TestAutoDetectInBackground(t *testing.T) { wg.Done() return autodetect.OpenShiftRoutesNotAvailable, nil }, - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - wg.Done() - return autodetect.AutoscalingVersionV2, nil - }, } cfg := config.New( config.WithAutoDetect(mock), @@ -90,7 +85,6 @@ func TestAutoDetectInBackground(t *testing.T) { // sanity check require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) - require.Equal(t, autodetect.AutoscalingVersionUnknown, cfg.AutoscalingVersion()) // test err := cfg.StartAutoDetect() @@ -104,14 +98,6 @@ var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) -} - -func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { - if m.HPAVersionFunc != nil { - return m.HPAVersionFunc() - } - return autodetect.DefaultAutoscalingVersion, nil } func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { diff --git a/internal/config/options.go b/internal/config/options.go index 021968141..13d88b508 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -46,7 +46,6 @@ type options struct { onOpenShiftRoutesChange changeHandler labelsFilter []string openshiftRoutes openshiftRoutesStore - hpaVersion hpaVersionStore autoDetectFrequency time.Duration } diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index c06a16e22..719e2bf9d 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -17,7 +17,6 @@ package collector import ( "github.com/go-logr/logr" autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -25,7 +24,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { @@ -46,7 +44,6 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al logger.Info("hpa field is unset in Spec, skipping autoscaler creation") return nil } - autoscalingVersion := cfg.AutoscalingVersion() if otelcol.Spec.Autoscaler.MaxReplicas == nil { otelcol.Spec.Autoscaler.MaxReplicas = otelcol.Spec.MaxReplicas @@ -60,225 +57,64 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al } } - if autoscalingVersion == autodetect.AutoscalingVersionV2Beta2 { - metrics := []autoscalingv2beta2.MetricSpec{} + metrics := []autoscalingv2.MetricSpec{} - if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { - utilizationTarget := autoscalingv2beta2.MetricSpec{ - Type: autoscalingv2beta2.ResourceMetricSourceType, - Resource: &autoscalingv2beta2.ResourceMetricSource{ - Name: corev1.ResourceMemory, - Target: autoscalingv2beta2.MetricTarget{ - Type: autoscalingv2beta2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, - }, + if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { + memoryTarget := autoscalingv2.MetricSpec{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ + Name: corev1.ResourceMemory, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, + AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, }, - } - metrics = append(metrics, utilizationTarget) + }, } + metrics = append(metrics, memoryTarget) + } - targetCPUUtilization := autoscalingv2beta2.MetricSpec{ - Type: autoscalingv2beta2.ResourceMetricSourceType, - Resource: &autoscalingv2beta2.ResourceMetricSource{ + if otelcol.Spec.Autoscaler.TargetCPUUtilization != nil { + cpuTarget := autoscalingv2.MetricSpec{ + Type: autoscalingv2.ResourceMetricSourceType, + Resource: &autoscalingv2.ResourceMetricSource{ Name: corev1.ResourceCPU, - Target: autoscalingv2beta2.MetricTarget{ - Type: autoscalingv2beta2.UtilizationMetricType, + Target: autoscalingv2.MetricTarget{ + Type: autoscalingv2.UtilizationMetricType, AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, }, }, } - metrics = append(metrics, targetCPUUtilization) - - autoscaler := autoscalingv2beta2.HorizontalPodAutoscaler{ - ObjectMeta: objectMeta, - Spec: autoscalingv2beta2.HorizontalPodAutoscalerSpec{ - ScaleTargetRef: autoscalingv2beta2.CrossVersionObjectReference{ - APIVersion: v1alpha1.GroupVersion.String(), - Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol.Name), - }, - MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, - MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, - Metrics: metrics, - }, - } - - if otelcol.Spec.Autoscaler.Behavior != nil { - behavior := ConvertToV2beta2Behavior(*otelcol.Spec.Autoscaler.Behavior) - autoscaler.Spec.Behavior = &behavior - } - - // check for custom metrics - if len(otelcol.Spec.Autoscaler.Metrics) > 0 { - metrics := ConvertToV2Beta2PodMetrics(otelcol.Spec.Autoscaler.Metrics) - autoscaler.Spec.Metrics = append(autoscaler.Spec.Metrics, metrics...) - } - - result = &autoscaler - } else { - metrics := []autoscalingv2.MetricSpec{} - - if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { - utilizationTarget := autoscalingv2.MetricSpec{ - Type: autoscalingv2.ResourceMetricSourceType, - Resource: &autoscalingv2.ResourceMetricSource{ - Name: corev1.ResourceMemory, - Target: autoscalingv2.MetricTarget{ - Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, - }, - }, - } - metrics = append(metrics, utilizationTarget) - } - - if otelcol.Spec.Autoscaler.TargetCPUUtilization != nil { - targetCPUUtilization := autoscalingv2.MetricSpec{ - Type: autoscalingv2.ResourceMetricSourceType, - Resource: &autoscalingv2.ResourceMetricSource{ - Name: corev1.ResourceCPU, - Target: autoscalingv2.MetricTarget{ - Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, - }, - }, - } - metrics = append(metrics, targetCPUUtilization) - } - - autoscaler := autoscalingv2.HorizontalPodAutoscaler{ - ObjectMeta: objectMeta, - Spec: autoscalingv2.HorizontalPodAutoscalerSpec{ - ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ - APIVersion: v1alpha1.GroupVersion.String(), - Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol.Name), - }, - MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, - MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, - Metrics: metrics, - }, - } - if otelcol.Spec.Autoscaler.Behavior != nil { - autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior - } - - // convert from v1alpha1.MetricSpec into a autoscalingv2.MetricSpec. - for _, metric := range otelcol.Spec.Autoscaler.Metrics { - if metric.Type == autoscalingv2.PodsMetricSourceType { - v2metric := autoscalingv2.MetricSpec{ - Type: metric.Type, - Pods: metric.Pods, - } - autoscaler.Spec.Metrics = append(autoscaler.Spec.Metrics, v2metric) - } // pod metrics - } - result = &autoscaler + metrics = append(metrics, cpuTarget) } - return result -} - -func ConvertToV2Beta2PodMetrics(v2metrics []v1alpha1.MetricSpec) []autoscalingv2beta2.MetricSpec { - metrics := make([]autoscalingv2beta2.MetricSpec, len(v2metrics)) - - for i, v2metric := range v2metrics { - metrics[i].Type = autoscalingv2beta2.MetricSourceType(v2metric.Type) - if v2metric.Pods != nil { - metrics[i].Pods = &autoscalingv2beta2.PodsMetricSource{ - Metric: autoscalingv2beta2.MetricIdentifier{ - Name: v2metric.Pods.Metric.Name, - Selector: v2metric.Pods.Metric.Selector, - }, - Target: autoscalingv2beta2.MetricTarget{ - Type: autoscalingv2beta2.MetricTargetType(v2metric.Pods.Target.Type), - AverageValue: v2metric.Pods.Target.AverageValue, - }, - } - } + autoscaler := autoscalingv2.HorizontalPodAutoscaler{ + ObjectMeta: objectMeta, + Spec: autoscalingv2.HorizontalPodAutoscalerSpec{ + ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ + APIVersion: v1alpha1.GroupVersion.String(), + Kind: "OpenTelemetryCollector", + Name: naming.OpenTelemetryCollector(otelcol.Name), + }, + MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, + MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, + Metrics: metrics, + }, } - - return metrics -} - -// Create a v2beta2 HorizontalPodAutoscalerBehavior from a v2 instance. -func ConvertToV2beta2Behavior(v2behavior autoscalingv2.HorizontalPodAutoscalerBehavior) autoscalingv2beta2.HorizontalPodAutoscalerBehavior { - behavior := &autoscalingv2beta2.HorizontalPodAutoscalerBehavior{} - - if v2behavior.ScaleUp != nil { - scaleUpRules := &autoscalingv2beta2.HPAScalingRules{} - scaleUpTime := *v2behavior.ScaleUp.StabilizationWindowSeconds - scaleUpRules.StabilizationWindowSeconds = &scaleUpTime - - if v2behavior.ScaleUp.SelectPolicy != nil { - scaleUpSelectPolicy := ConvertToV2Beta2SelectPolicy(*v2behavior.ScaleUp.SelectPolicy) - scaleUpRules.SelectPolicy = &scaleUpSelectPolicy - } - if v2behavior.ScaleUp.Policies != nil { - scaleUpPolicies := []autoscalingv2beta2.HPAScalingPolicy{} - for _, policy := range v2behavior.ScaleUp.Policies { - v2beta2policy := ConvertToV2Beta2HPAScalingPolicy(policy) - scaleUpPolicies = append(scaleUpPolicies, v2beta2policy) - } - scaleUpRules.Policies = scaleUpPolicies - } - - behavior.ScaleUp = scaleUpRules + if otelcol.Spec.Autoscaler.Behavior != nil { + autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior } - if v2behavior.ScaleDown != nil { - scaleDownRules := &autoscalingv2beta2.HPAScalingRules{} - scaleDownTime := *v2behavior.ScaleDown.StabilizationWindowSeconds - scaleDownRules.StabilizationWindowSeconds = &scaleDownTime - - if v2behavior.ScaleDown.SelectPolicy != nil { - scaleDownSelectPolicy := ConvertToV2Beta2SelectPolicy(*v2behavior.ScaleDown.SelectPolicy) - scaleDownRules.SelectPolicy = &scaleDownSelectPolicy - } - if v2behavior.ScaleDown.Policies != nil { - ScaleDownPolicies := []autoscalingv2beta2.HPAScalingPolicy{} - for _, policy := range v2behavior.ScaleDown.Policies { - v2beta2policy := ConvertToV2Beta2HPAScalingPolicy(policy) - ScaleDownPolicies = append(ScaleDownPolicies, v2beta2policy) + // convert from v1alpha1.MetricSpec into a autoscalingv2.MetricSpec. + for _, metric := range otelcol.Spec.Autoscaler.Metrics { + if metric.Type == autoscalingv2.PodsMetricSourceType { + v2metric := autoscalingv2.MetricSpec{ + Type: metric.Type, + Pods: metric.Pods, } - scaleDownRules.Policies = ScaleDownPolicies - } - - behavior.ScaleDown = scaleDownRules - } - - return *behavior -} - -func ConvertToV2Beta2HPAScalingPolicy(v2policy autoscalingv2.HPAScalingPolicy) autoscalingv2beta2.HPAScalingPolicy { - v2beta2Policy := &autoscalingv2beta2.HPAScalingPolicy{ - Value: v2policy.Value, - PeriodSeconds: v2policy.PeriodSeconds, + autoscaler.Spec.Metrics = append(autoscaler.Spec.Metrics, v2metric) + } // pod metrics } + result = &autoscaler - switch v2policy.Type { - case autoscalingv2.PodsScalingPolicy: - v2beta2Policy.Type = autoscalingv2beta2.PodsScalingPolicy - case autoscalingv2.PercentScalingPolicy: - v2beta2Policy.Type = autoscalingv2beta2.PercentScalingPolicy - } - - return *v2beta2Policy -} - -func ConvertToV2Beta2SelectPolicy(scalingPolicy autoscalingv2.ScalingPolicySelect) autoscalingv2beta2.ScalingPolicySelect { - max := autoscalingv2beta2.MaxPolicySelect - min := autoscalingv2beta2.MinPolicySelect - disabled := autoscalingv2beta2.DisabledPolicySelect - - switch scalingPolicy { - case autoscalingv2.MaxChangePolicySelect: - return max - case autoscalingv2.MinChangePolicySelect: - return min - case autoscalingv2.DisabledPolicySelect: - return disabled - } - - return disabled + return result } diff --git a/internal/manifests/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go index 294ab16a7..282271c62 100644 --- a/internal/manifests/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -19,25 +19,20 @@ import ( "github.com/stretchr/testify/assert" autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) func TestHPA(t *testing.T) { type test struct { - name string - autoscalingVersion autodetect.AutoscalingVersion + name string } - v2Test := test{autodetect.AutoscalingVersionV2.String(), autodetect.AutoscalingVersionV2} - v2beta2Test := test{autodetect.AutoscalingVersionV2Beta2.String(), autodetect.AutoscalingVersionV2Beta2} - tests := []test{v2Test, v2beta2Test} + v2Test := test{} + tests := []test{v2Test} var minReplicas int32 = 3 var maxReplicas int32 = 5 @@ -76,47 +71,23 @@ func TestHPA(t *testing.T) { for _, otelcol := range otelcols { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - mockAutoDetector := &mockAutoDetect{ - HPAVersionFunc: func() (autodetect.AutoscalingVersion, error) { - return test.autoscalingVersion, nil - }, - } - configuration := config.New(config.WithAutoDetect(mockAutoDetector)) - err := configuration.AutoDetect() - assert.NoError(t, err) + configuration := config.New() raw := HorizontalPodAutoscaler(configuration, logger, otelcol) - if configuration.AutoscalingVersion() == autodetect.AutoscalingVersionV2Beta2 { - hpa := raw.(*autoscalingv2beta2.HorizontalPodAutoscaler) - - // verify - assert.Equal(t, "my-instance-collector", hpa.Name) - assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) - assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) - assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - for _, metric := range hpa.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) - } - } - } else { - hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) + hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) - // verify - assert.Equal(t, "my-instance-collector", hpa.Name) - assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) - assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) - assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) - assert.Equal(t, 2, len(hpa.Spec.Metrics)) + // verify + assert.Equal(t, "my-instance-collector", hpa.Name) + assert.Equal(t, "my-instance-collector", hpa.Labels["app.kubernetes.io/name"]) + assert.Equal(t, int32(3), *hpa.Spec.MinReplicas) + assert.Equal(t, int32(5), hpa.Spec.MaxReplicas) + assert.Equal(t, 2, len(hpa.Spec.Metrics)) - for _, metric := range hpa.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) - } else if metric.Resource.Name == corev1.ResourceMemory { - assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) - } + for _, metric := range hpa.Spec.Metrics { + if metric.Resource.Name == corev1.ResourceCPU { + assert.Equal(t, cpuUtilization, *metric.Resource.Target.AverageUtilization) + } else if metric.Resource.Name == corev1.ResourceMemory { + assert.Equal(t, memoryUtilization, *metric.Resource.Target.AverageUtilization) } } }) @@ -124,116 +95,3 @@ func TestHPA(t *testing.T) { } } - -func TestConvertToV2Beta2PodMetrics(t *testing.T) { - expectedValues := []int64{int64(10), int64(20)} - expectedNames := []string{"custom1", "custom2"} - - v2metrics := []v1alpha1.MetricSpec{ - { - Type: autoscalingv2.PodsMetricSourceType, - Pods: &autoscalingv2.PodsMetricSource{ - Metric: autoscalingv2.MetricIdentifier{ - Name: "custom1", - }, - Target: autoscalingv2.MetricTarget{ - Type: autoscalingv2.AverageValueMetricType, - AverageValue: resource.NewQuantity(int64(10), resource.DecimalSI), - }, - }, - }, - { - Type: autoscalingv2.PodsMetricSourceType, - Pods: &autoscalingv2.PodsMetricSource{ - Metric: autoscalingv2.MetricIdentifier{ - Name: "custom2", - }, - Target: autoscalingv2.MetricTarget{ - Type: autoscalingv2.AverageValueMetricType, - AverageValue: resource.NewQuantity(int64(20), resource.DecimalSI), - }, - }, - }, - } - - v2beta2metrics := ConvertToV2Beta2PodMetrics(v2metrics) - - for i, metric := range v2beta2metrics { - - assert.Equal(t, expectedNames[i], metric.Pods.Metric.Name) - val, ok := metric.Pods.Target.AverageValue.AsInt64() - assert.True(t, ok) - assert.Equal(t, expectedValues[i], val) - } -} - -func TestConvertToV2beta2Behavior(t *testing.T) { - ten := int32(10) - thirty := int32(30) - max := autoscalingv2.MaxChangePolicySelect - min := autoscalingv2.MinChangePolicySelect - - v2ScaleUp := &autoscalingv2.HPAScalingRules{ - StabilizationWindowSeconds: &thirty, - SelectPolicy: &max, - } - - v2ScaleDown := &autoscalingv2.HPAScalingRules{ - StabilizationWindowSeconds: &ten, - SelectPolicy: &min, - } - - v2Behavior := &autoscalingv2.HorizontalPodAutoscalerBehavior{ - ScaleUp: v2ScaleUp, - ScaleDown: v2ScaleDown, - } - - v2Beta2Behavior := ConvertToV2beta2Behavior(*v2Behavior) - - assert.Equal(t, thirty, *v2Beta2Behavior.ScaleUp.StabilizationWindowSeconds) - assert.Equal(t, ten, *v2Beta2Behavior.ScaleDown.StabilizationWindowSeconds) - assert.Equal(t, autoscalingv2beta2.MaxPolicySelect, *v2Beta2Behavior.ScaleUp.SelectPolicy) - assert.EqualValues(t, autoscalingv2beta2.MinPolicySelect, *v2Beta2Behavior.ScaleDown.SelectPolicy) -} - -func TestConvertToV2Beta2HPAScalingPolicy(t *testing.T) { - v2Policy := autoscalingv2.HPAScalingPolicy{ - Type: autoscalingv2.PodsScalingPolicy, - Value: 5, - PeriodSeconds: 10, - } - - v2Beta2Policy := ConvertToV2Beta2HPAScalingPolicy(v2Policy) - assert.Equal(t, autoscalingv2beta2.PodsScalingPolicy, v2Beta2Policy.Type) - assert.Equal(t, int32(5), v2Beta2Policy.Value) - assert.Equal(t, int32(10), v2Beta2Policy.PeriodSeconds) - -} - -func TestConvertToV2Beta2SelectPolicy(t *testing.T) { - min := autoscalingv2.MinChangePolicySelect - max := autoscalingv2.MaxChangePolicySelect - disabled := autoscalingv2.DisabledPolicySelect - - assert.Equal(t, autoscalingv2beta2.MinPolicySelect, ConvertToV2Beta2SelectPolicy(min)) - assert.Equal(t, autoscalingv2beta2.MaxPolicySelect, ConvertToV2Beta2SelectPolicy(max)) - assert.Equal(t, autoscalingv2beta2.DisabledPolicySelect, ConvertToV2Beta2SelectPolicy(disabled)) -} - -var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) - -type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) - HPAVersionFunc func() (autodetect.AutoscalingVersion, error) -} - -func (m *mockAutoDetect) HPAVersion() (autodetect.AutoscalingVersion, error) { - return m.HPAVersionFunc() -} - -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { - if m.OpenShiftRoutesAvailabilityFunc != nil { - return m.OpenShiftRoutesAvailabilityFunc() - } - return autodetect.OpenShiftRoutesNotAvailable, nil -} diff --git a/kind-1.19.yaml b/kind-1.19.yaml deleted file mode 100644 index 6720d5f67..000000000 --- a/kind-1.19.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: -- role: control-plane - image: kindest/node:v1.19.16@sha256:476cb3269232888437b61deca013832fee41f9f074f9bed79f57e4280f7c48b7 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.20.yaml b/kind-1.20.yaml deleted file mode 100644 index cd05acf93..000000000 --- a/kind-1.20.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: -- role: control-plane - image: kindest/node:v1.20.15@sha256:a32bf55309294120616886b5338f95dd98a2f7231519c7dedcec32ba29699394 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.21.yaml b/kind-1.21.yaml deleted file mode 100644 index c6de06b57..000000000 --- a/kind-1.21.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: -- role: control-plane - image: kindest/node:v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.22.yaml b/kind-1.22.yaml deleted file mode 100644 index cde627420..000000000 --- a/kind-1.22.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: -- role: control-plane - image: kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.23.yaml b/kind-1.23.yaml index 9662441c6..09a2521d8 100644 --- a/kind-1.23.yaml +++ b/kind-1.23.yaml @@ -1,18 +1,18 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: -- role: control-plane - image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP + - role: control-plane + image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/pkg/autodetect/main.go b/pkg/autodetect/main.go index 8d1d29501..d12d19b29 100644 --- a/pkg/autodetect/main.go +++ b/pkg/autodetect/main.go @@ -16,9 +16,6 @@ package autodetect import ( - "errors" - "sort" - "k8s.io/client-go/discovery" "k8s.io/client-go/rest" ) @@ -28,23 +25,12 @@ var _ AutoDetect = (*autoDetect)(nil) // AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. type AutoDetect interface { OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, error) - HPAVersion() (AutoscalingVersion, error) } type autoDetect struct { dcl discovery.DiscoveryInterface } -type AutoscalingVersion int - -const ( - AutoscalingVersionV2 AutoscalingVersion = iota - AutoscalingVersionV2Beta2 - AutoscalingVersionUnknown -) - -const DefaultAutoscalingVersion = AutoscalingVersionV2 - // New creates a new auto-detection worker, using the given client when talking to the current cluster. func New(restConfig *rest.Config) (AutoDetect, error) { dcl, err := discovery.NewDiscoveryClientForConfig(restConfig) @@ -76,51 +62,3 @@ func (a *autoDetect) OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, return OpenShiftRoutesNotAvailable, nil } - -func (a *autoDetect) HPAVersion() (AutoscalingVersion, error) { - apiList, err := a.dcl.ServerGroups() - if err != nil { - return AutoscalingVersionUnknown, err - } - - for _, apiGroup := range apiList.Groups { - if apiGroup.Name == "autoscaling" { - // Sort this so we can make sure to get v2 before v2beta2 - versions := apiGroup.Versions - sort.Slice(versions, func(i, j int) bool { - return versions[i].Version < versions[j].Version - }) - - for _, version := range versions { - if version.Version == "v2" || version.Version == "v2beta2" { - return ToAutoScalingVersion(version.Version), nil - } - } - return AutoscalingVersionUnknown, errors.New("Failed to find appropriate version of apiGroup autoscaling, only v2 and v2beta2 are supported") - } - } - - return AutoscalingVersionUnknown, errors.New("Failed to find apiGroup autoscaling") -} - -func (v AutoscalingVersion) String() string { - switch v { - case AutoscalingVersionV2: - return "v2" - case AutoscalingVersionV2Beta2: - return "v2beta2" - case AutoscalingVersionUnknown: - return "unknown" - } - return "unknown" -} - -func ToAutoScalingVersion(version string) AutoscalingVersion { - switch version { - case "v2": - return AutoscalingVersionV2 - case "v2beta2": - return AutoscalingVersionV2Beta2 - } - return AutoscalingVersionUnknown -} diff --git a/pkg/autodetect/main_test.go b/pkg/autodetect/main_test.go index e41cb1ee6..18a9640f0 100644 --- a/pkg/autodetect/main_test.go +++ b/pkg/autodetect/main_test.go @@ -70,15 +70,3 @@ func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { assert.Equal(t, tt.expected, ora) } } - -func TestAutoscalingVersionToString(t *testing.T) { - assert.Equal(t, "v2", autodetect.AutoscalingVersionV2.String()) - assert.Equal(t, "v2beta2", autodetect.AutoscalingVersionV2Beta2.String()) - assert.Equal(t, "unknown", autodetect.AutoscalingVersionUnknown.String()) -} - -func TestToAutoScalingVersion(t *testing.T) { - assert.Equal(t, autodetect.AutoscalingVersionV2, autodetect.ToAutoScalingVersion("v2")) - assert.Equal(t, autodetect.AutoscalingVersionV2Beta2, autodetect.ToAutoScalingVersion("v2beta2")) - assert.Equal(t, autodetect.AutoscalingVersionUnknown, autodetect.ToAutoScalingVersion("fred")) -} diff --git a/tests/e2e-autoscale/autoscale/00-assert.yaml b/tests/e2e-autoscale/autoscale/00-assert.yaml index a0edb1230..2546b5462 100644 --- a/tests/e2e-autoscale/autoscale/00-assert.yaml +++ b/tests/e2e-autoscale/autoscale/00-assert.yaml @@ -11,3 +11,76 @@ metadata: name: simplest-set-utilization-collector status: readyReplicas: 1 +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: simplest-collector +spec: + scaleTargetRef: + kind: OpenTelemetryCollector + name: simplest + apiVersion: opentelemetry.io/v1alpha1 + minReplicas: 1 + maxReplicas: 2 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 90 + behavior: + scaleUp: + stabilizationWindowSeconds: 10 + selectPolicy: Max + policies: + - type: Pods + value: 4 + periodSeconds: 15 + - type: Percent + value: 100 + periodSeconds: 15 + scaleDown: + stabilizationWindowSeconds: 15 + selectPolicy: Max + policies: + - type: Percent + value: 100 + periodSeconds: 15 +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: simplest-set-utilization-collector +spec: + scaleTargetRef: + kind: OpenTelemetryCollector + name: simplest-set-utilization + apiVersion: opentelemetry.io/v1alpha1 + minReplicas: 1 + maxReplicas: 2 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 99 + behavior: + scaleUp: + stabilizationWindowSeconds: 300 + selectPolicy: Max + policies: + - type: Pods + value: 4 + periodSeconds: 15 + - type: Percent + value: 100 + periodSeconds: 15 + scaleDown: + selectPolicy: Max + policies: + - type: Percent + value: 100 + periodSeconds: 15 diff --git a/tests/e2e-autoscale/autoscale/01-assert.yaml b/tests/e2e-autoscale/autoscale/01-assert.yaml new file mode 100644 index 000000000..faae4da95 --- /dev/null +++ b/tests/e2e-autoscale/autoscale/01-assert.yaml @@ -0,0 +1,36 @@ +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: simplest-set-utilization-collector +spec: + scaleTargetRef: + kind: OpenTelemetryCollector + name: simplest-set-utilization + apiVersion: opentelemetry.io/v1alpha1 + minReplicas: 1 + maxReplicas: 2 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 60 + behavior: + scaleUp: + stabilizationWindowSeconds: 1 + selectPolicy: Max + policies: + - type: Pods + value: 4 + periodSeconds: 15 + - type: Percent + value: 100 + periodSeconds: 15 + scaleDown: + stabilizationWindowSeconds: 15 + selectPolicy: Max + policies: + - type: Percent + value: 100 + periodSeconds: 15 diff --git a/tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml b/tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml deleted file mode 100644 index c01035210..000000000 --- a/tests/e2e-autoscale/autoscale/01-check-simplest-collector-hpa.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: go run ./wait-until-hpa-ready.go --hpa simplest-collector diff --git a/tests/e2e-autoscale/autoscale/01-install.yaml b/tests/e2e-autoscale/autoscale/01-install.yaml new file mode 100644 index 000000000..a9a6d549c --- /dev/null +++ b/tests/e2e-autoscale/autoscale/01-install.yaml @@ -0,0 +1,44 @@ +# This updates an existing deployment with a new Spec. +# Target memory utilization is now added. +# scaleDown and scaleUp behavior is now added. +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest-set-utilization +spec: + minReplicas: 1 + maxReplicas: 2 + autoscaler: + targetCPUUtilization: 60 + # Without this behavior the HPA will default to a scaledown stabilization + # window of 300 seconds. Tests should fail if this update is not successful. + behavior: + scaleDown: + stabilizationWindowSeconds: 15 + scaleUp: + stabilizationWindowSeconds: 1 + resources: + limits: + cpu: 100m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e-autoscale/autoscale/05-assert.yaml b/tests/e2e-autoscale/autoscale/02-assert.yaml similarity index 88% rename from tests/e2e-autoscale/autoscale/05-assert.yaml rename to tests/e2e-autoscale/autoscale/02-assert.yaml index d67919fa3..8dc83f76b 100644 --- a/tests/e2e-autoscale/autoscale/05-assert.yaml +++ b/tests/e2e-autoscale/autoscale/02-assert.yaml @@ -4,4 +4,4 @@ metadata: name: simplest-set-utilization status: scale: - replicas: 1 + replicas: 2 diff --git a/tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml b/tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml deleted file mode 100644 index 21dad9ff4..000000000 --- a/tests/e2e-autoscale/autoscale/02-check-simplest-set-utilization-collector-hpa.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: go run ./wait-until-hpa-ready.go --hpa simplest-set-utilization-collector diff --git a/tests/e2e-autoscale/autoscale/02-install.yaml b/tests/e2e-autoscale/autoscale/02-install.yaml index a9a6d549c..d4401cae3 100644 --- a/tests/e2e-autoscale/autoscale/02-install.yaml +++ b/tests/e2e-autoscale/autoscale/02-install.yaml @@ -1,44 +1,21 @@ -# This updates an existing deployment with a new Spec. -# Target memory utilization is now added. -# scaleDown and scaleUp behavior is now added. -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector +apiVersion: batch/v1 +kind: Job metadata: - name: simplest-set-utilization + name: tracegen-set-utilization spec: - minReplicas: 1 - maxReplicas: 2 - autoscaler: - targetCPUUtilization: 60 - # Without this behavior the HPA will default to a scaledown stabilization - # window of 300 seconds. Tests should fail if this update is not successful. - behavior: - scaleDown: - stabilizationWindowSeconds: 15 - scaleUp: - stabilizationWindowSeconds: 1 - resources: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] \ No newline at end of file + template: + spec: + containers: + - name: tracegen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:latest + command: + - "./tracegen" + args: + - -otlp-endpoint=simplest-set-utilization-collector-headless:4317 + - -otlp-insecure + # High duration to ensure the trace creation doesn't stop. + # It'll be stopped in step 4 + - -duration=1m + - -workers=20 + restartPolicy: Never + backoffLimit: 4 diff --git a/tests/e2e-autoscale/autoscale/03-assert.yaml b/tests/e2e-autoscale/autoscale/03-assert.yaml index 8dc83f76b..d67919fa3 100644 --- a/tests/e2e-autoscale/autoscale/03-assert.yaml +++ b/tests/e2e-autoscale/autoscale/03-assert.yaml @@ -4,4 +4,4 @@ metadata: name: simplest-set-utilization status: scale: - replicas: 2 + replicas: 1 diff --git a/tests/e2e-autoscale/autoscale/04-delete.yaml b/tests/e2e-autoscale/autoscale/03-delete.yaml similarity index 100% rename from tests/e2e-autoscale/autoscale/04-delete.yaml rename to tests/e2e-autoscale/autoscale/03-delete.yaml diff --git a/tests/e2e-autoscale/autoscale/03-install.yaml b/tests/e2e-autoscale/autoscale/03-install.yaml deleted file mode 100644 index d4401cae3..000000000 --- a/tests/e2e-autoscale/autoscale/03-install.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: tracegen-set-utilization -spec: - template: - spec: - containers: - - name: tracegen - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:latest - command: - - "./tracegen" - args: - - -otlp-endpoint=simplest-set-utilization-collector-headless:4317 - - -otlp-insecure - # High duration to ensure the trace creation doesn't stop. - # It'll be stopped in step 4 - - -duration=1m - - -workers=20 - restartPolicy: Never - backoffLimit: 4 diff --git a/tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml b/tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml deleted file mode 100644 index 6063958c8..000000000 --- a/tests/e2e-autoscale/autoscale/03-verify-simplest-set-collector-hpa-metrics.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: go run ./cmd/verify/wait-and-validate-metrics.go --cpu-value 60 --scale-down 15 --scale-up 1 --hpa simplest-set-utilization-collector \ No newline at end of file diff --git a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go b/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go deleted file mode 100644 index 9126b3295..000000000 --- a/tests/e2e-autoscale/autoscale/cmd/verify/wait-and-validate-metrics.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "os" - "path/filepath" - "time" - - "github.com/spf13/pflag" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" -) - -func main() { - var hpaName string - var timeout time.Duration - var numMetrics int - var cpuValue int - var memoryValue int - var scaleDownWindow int - var scaleUpWindow int - - pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") - pflag.StringVar(&hpaName, "hpa", "", "HPA to check") - pflag.IntVar(&numMetrics, "num-metrics", 1, "number of expected metrics in Spec") - pflag.IntVar(&cpuValue, "cpu-value", -1, "value for target CPU utilization") - pflag.IntVar(&memoryValue, "memory-value", -1, "value for target memory utilization") - pflag.IntVar(&scaleDownWindow, "scale-down", -1, "value for scaleDown stabilization window") - pflag.IntVar(&scaleUpWindow, "scale-up", -1, "value for scaleUp stabilization window") - pflag.Parse() - - if len(hpaName) == 0 { - fmt.Println("hpa flag is mandatory") - os.Exit(1) - } - - kubeconfigPath := getKubeconfigPath() - - configLoader := clientcmd.NewNonInteractiveDeferredLoadingClientConfig( - &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, - &clientcmd.ConfigOverrides{}, - ) - - config, err := configLoader.ClientConfig() - if err != nil { - fmt.Printf("Error reading the kubeconfig: %s\n", err) - os.Exit(1) - } - - client, err := kubernetes.NewForConfig(config) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), metav1.GetOptions{}) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - hpaClientV2 := client.AutoscalingV2().HorizontalPodAutoscalers(namespace.Name) - hpaClientV1 := client.AutoscalingV1().HorizontalPodAutoscalers(namespace.Name) - - pollInterval := time.Second - - // Search in v2 and v1 for an HPA with the given name - ctx := context.Background() - err = wait.PollUntilContextTimeout(ctx, pollInterval, timeout, false, func(c context.Context) (done bool, err error) { - hpav2, err := hpaClientV2.Get( - c, - hpaName, - metav1.GetOptions{}, - ) - - if err != nil { - hpav1, err := hpaClientV1.Get( - c, - hpaName, - metav1.GetOptions{}, - ) - if err != nil { - fmt.Printf("HPA %s not found\n", hpaName) - return false, nil - } - - if hpav1.Status.CurrentCPUUtilizationPercentage == nil { - fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) - return false, nil - } - - if *hpav1.Spec.TargetCPUUtilizationPercentage != int32(cpuValue) { - fmt.Printf("Incorrect target CPU value found for HPA %s\n", hpaName) - return false, nil - } - return true, nil - } - - if hpav2.Status.CurrentMetrics == nil { - fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) - return false, nil - } - - numExpectedMetrics := 0 - if cpuValue != -1 { - numExpectedMetrics += 1 - } - if memoryValue != -1 { - numExpectedMetrics += 1 - } - if len(hpav2.Spec.Metrics) != numExpectedMetrics { - fmt.Printf("Metrics has incorrect length for HPA %s\n", hpaName) - return false, nil - } - - for _, metric := range hpav2.Spec.Metrics { - if metric.Resource.Name == corev1.ResourceCPU { - if cpuValue == -1 { - fmt.Printf("Unexpected CPU metric found for HPA %s\n", hpaName) - return false, nil - } - if int32(cpuValue) != *metric.Resource.Target.AverageUtilization { - fmt.Printf("Incorrect target CPU value found for HPA %s\n", hpaName) - return false, nil - } - } else if metric.Resource.Name == corev1.ResourceMemory { - if memoryValue == -1 { - fmt.Printf("Unexpected memory metric found for HPA %s\n", hpaName) - return false, nil - } - if int32(memoryValue) != *metric.Resource.Target.AverageUtilization { - fmt.Printf("Incorrect target memory value found for HPA %s\n", hpaName) - return false, nil - } - } - } - - // validate HPA behavior - if int32(scaleDownWindow) != *hpav2.Spec.Behavior.ScaleDown.StabilizationWindowSeconds { - fmt.Printf("Incorrect scaleDown stabilization window found for HPA %s\n", hpaName) - return false, nil - } - if int32(scaleUpWindow) != *hpav2.Spec.Behavior.ScaleUp.StabilizationWindowSeconds { - fmt.Printf("Incorrect scaleUp stabilization window found for HPA %s\n", hpaName) - return false, nil - } - - return true, nil - }) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - fmt.Printf("%s is ready!\n", hpaName) -} - -func getKubeconfigPath() string { - kubeconfigEnv := os.Getenv("KUBECONFIG") - if kubeconfigEnv != "" { - if _, err := os.Stat(kubeconfigEnv); err == nil { - return kubeconfigEnv - } - } - - homeDir := homedir.HomeDir() - return filepath.Join(homeDir, ".kube", "config") -} diff --git a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go b/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go deleted file mode 100644 index 51bc7328d..000000000 --- a/tests/e2e-autoscale/autoscale/wait-until-hpa-ready.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "os" - "path/filepath" - "time" - - "github.com/spf13/pflag" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" -) - -func main() { - var hpaName string - var timeout time.Duration - - pflag.DurationVar(&timeout, "timeout", 5*time.Minute, "The timeout for the check.") - pflag.StringVar(&hpaName, "hpa", "", "HPA to check") - pflag.Parse() - - if len(hpaName) == 0 { - fmt.Println("hpa flag is mandatory") - os.Exit(1) - } - - kubeconfigPath := getKubeconfigPath() - - config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) - if err != nil { - fmt.Printf("Error reading the kubeconfig: %s\n", err) - os.Exit(1) - } - - client, err := kubernetes.NewForConfig(config) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - namespace, err := client.CoreV1().Namespaces().Get(context.Background(), os.Getenv("NAMESPACE"), v1.GetOptions{}) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - hpaClientV2 := client.AutoscalingV2().HorizontalPodAutoscalers(namespace.Name) - hpaClientV1 := client.AutoscalingV1().HorizontalPodAutoscalers(namespace.Name) - - pollInterval := time.Second - - // Search in v2 and v1 for an HPA with the given name - - ctx := context.Background() - err = wait.PollUntilContextTimeout(ctx, pollInterval, timeout, false, func(c context.Context) (done bool, err error) { - hpav2, err := hpaClientV2.Get( - c, - hpaName, - v1.GetOptions{}, - ) - if err != nil { - hpav1, err := hpaClientV1.Get( - c, - hpaName, - v1.GetOptions{}, - ) - if err != nil { - fmt.Printf("HPA %s not found\n", hpaName) - return false, nil - } - - if hpav1.Status.CurrentCPUUtilizationPercentage == nil { - fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) - return false, nil - } - return true, nil - } - - if hpav2.Status.CurrentMetrics == nil { - fmt.Printf("Current metrics are not set yet for HPA %s\n", hpaName) - return false, nil - } - return true, nil - }) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - fmt.Printf("%s is ready!\n", hpaName) -} - -func getKubeconfigPath() string { - kubeconfigEnv := os.Getenv("KUBECONFIG") - if kubeconfigEnv != "" { - if _, err := os.Stat(kubeconfigEnv); err == nil { - return kubeconfigEnv - } - } - - homeDir := homedir.HomeDir() - return filepath.Join(homeDir, ".kube", "config") -} From bd9f8043994b8a79dd3cf811aae1a6eabc1f2917 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:14:33 +0200 Subject: [PATCH 1048/1234] Bump go.opentelemetry.io/otel from 1.18.0 to 1.19.0 (#2173) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.18.0 to 1.19.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.18.0...v1.19.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 7055c7f2b..58f9fa785 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/otel v1.18.0 + go.opentelemetry.io/otel v1.19.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.2 k8s.io/apiextensions-apiserver v0.28.2 @@ -133,7 +133,7 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.13.0 // indirect diff --git a/go.sum b/go.sum index 3e93d7b6c..bf42bf712 100644 --- a/go.sum +++ b/go.sum @@ -531,10 +531,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= From ac63f917cf0a356cc9acf712a688b7b021a963e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Fri, 29 Sep 2023 12:34:15 +0000 Subject: [PATCH 1049/1234] Enable discovery manager metrics in target allocator (#2169) --- .chloggen/discoverymanager_metrics.yaml | 16 ++++++++++++++++ cmd/otel-allocator/main.go | 2 ++ 2 files changed, 18 insertions(+) create mode 100755 .chloggen/discoverymanager_metrics.yaml diff --git a/.chloggen/discoverymanager_metrics.yaml b/.chloggen/discoverymanager_metrics.yaml new file mode 100755 index 000000000..7bfe64534 --- /dev/null +++ b/.chloggen/discoverymanager_metrics.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Enable discovery manager metrics in target allocator + +# One or more tracking issues related to the change +issues: [2170] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 0a7cf8dad..297b7d58d 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -90,6 +90,8 @@ func main() { discoveryCtx, discoveryCancel := context.WithCancel(ctx) discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger()) + discovery.RegisterMetrics() // discovery manager metrics need to be enabled explicitly + targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook, srv) collectorWatcher, collectorWatcherErr := collector.NewClient(log, cfg.ClusterConfig) if collectorWatcherErr != nil { From 8f0c9f97ada7c45c310bf30a5dee137ee44275c2 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 29 Sep 2023 20:55:58 +0530 Subject: [PATCH 1050/1234] Fix failing test case. (#2178) --- .../otlp-metrics-traces/02-assert.yaml | 22 ++++++++++ .../02-otel-metrics-collector.yaml | 15 +++---- .../otlp-metrics-traces/03-assert.yaml | 43 +++++++++---------- ...es-gen.yaml => 03-metrics-traces-gen.yaml} | 0 .../otlp-metrics-traces/03-podmonitor.yaml | 26 ----------- .../otlp-metrics-traces/04-assert.yaml | 26 +++-------- .../otlp-metrics-traces/05-assert.yaml | 3 +- .../otlp-metrics-traces/06-assert.yaml | 5 --- 8 files changed, 55 insertions(+), 85 deletions(-) rename tests/e2e-openshift/otlp-metrics-traces/{04-metrics-traces-gen.yaml => 03-metrics-traces-gen.yaml} (100%) delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml index 2413e2283..8315633e8 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml @@ -7,3 +7,25 @@ status: availableReplicas: 1 readyReplicas: 1 replicas: 1 + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector + name: cluster-collector-collector + namespace: kuttl-otlp-metrics +spec: + endpoints: + - port: monitoring + - port: prometheus + namespaceSelector: + matchNames: + - kuttl-otlp-metrics + selector: + matchLabels: + app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector + app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml index 83257f98a..632b99445 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml @@ -7,10 +7,9 @@ metadata: namespace: kuttl-otlp-metrics spec: mode: deployment - ports: - - name: promexporter - port: 8889 - protocol: TCP + observability: + metrics: + enableMetrics: true config: | receivers: otlp: @@ -19,10 +18,10 @@ spec: http: processors: exporters: - jaeger: - endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:14250 + otlp: + endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:4317 tls: - ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" + insecure: true prometheus: endpoint: 0.0.0.0:8889 resource_to_telemetry_conversion: @@ -32,7 +31,7 @@ spec: traces: receivers: [otlp] processors: [] - exporters: [jaeger] + exporters: [otlp] metrics: receivers: [otlp] processors: [] diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml index faf3c91c8..73bbb738a 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml @@ -1,25 +1,22 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +status: + active: 1 + ready: 1 + --- -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor +apiVersion: batch/v1 +kind: Job metadata: - name: otel-collector - namespace: kuttl-otlp-metrics -spec: - podMetricsEndpoints: - - port: metrics - - metricRelabelings: - - action: labeldrop - regex: instance - - action: labeldrop - regex: job - port: promexporter - relabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: container - - action: labeldrop - regex: endpoint - selector: - matchLabels: - app.kubernetes.io/name: cluster-collector-collector + name: telemetrygen-metrics +status: + active: 1 + ready: 1 + +--- +apiVersion: v1 +kind: Pod +status: + phase: Running diff --git a/tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml similarity index 100% rename from tests/e2e-openshift/otlp-metrics-traces/04-metrics-traces-gen.yaml rename to tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml deleted file mode 100644 index b0eaf4363..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/03-podmonitor.yaml +++ /dev/null @@ -1,26 +0,0 @@ -#https://docs.openshift.com/container-platform/4.13/monitoring/managing-metrics.html -#https://docs.openshift.com/container-platform/4.13/rest_api/monitoring_apis/podmonitor-monitoring-coreos-com-v1.html -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: otel-collector - namespace: kuttl-otlp-metrics -spec: - selector: - matchLabels: - app.kubernetes.io/name: cluster-collector-collector - podMetricsEndpoints: - - port: metrics - - port: promexporter - relabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: container - - action: labeldrop - regex: endpoint - metricRelabelings: - - action: labeldrop - regex: instance - - action: labeldrop - regex: job diff --git a/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml index 73bbb738a..9bec95f44 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml @@ -1,22 +1,6 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -status: - active: 1 - ready: 1 - --- -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-metrics -status: - active: 1 - ready: 1 - ---- -apiVersion: v1 -kind: Pod -status: - phase: Running +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +commands: +- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml index 9bec95f44..79570e05a 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml @@ -1,6 +1,5 @@ --- apiVersion: kuttl.dev/v1beta1 kind: TestAssert -timeout: 30 commands: -- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh +- script: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml deleted file mode 100644 index 79570e05a..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/06-assert.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh From 0ca7cd3e69c893edf8ad2b08afcf356ae383f6fc Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:41:02 +0200 Subject: [PATCH 1051/1234] feat: add support for multi container instrumentation pod (#1901) * feat(annotations): add new instrumentation specific annotations * feat(dotnet): add instrumentation specific volume and initcont * feat(go): update containers names specific annotation * feat(injection): improve check for instrumentation status * feat(java): add instrumentation specific volume and initcont * feat(nodejs): add instrumentation specific volume and initcont * feat(python): add instrumentation specific volume and initcont * feat(mutator): add possibility to specify instrumentation specific containers * feat(sdkinjection): add possibility to instrument language specific containers * chore(e2e): update tests * chore: update go.sum * chore(e2e): bring back container-names annotation * chore(e2e): add multi-instrumentation tests * feat(instr): add multi-instrumentation support feature gate * chore(e2e): add multi-instrumentation tests to actions * chore(go): update container-names annotation check * chore(e2e): fix tests * chore: add changelog * chore(e2e): add and fix tests * chore(go): fix go tests * chore(mutator): add helpers and tests * feat(instr): improve multi instrumentation and specific cases handling * chore(helper): sort duplicates - fix tests * chore(feature): add from version * chore(instr): move funcs to languageInstrumentations struct * chore(instr): avoid reflection * feat(docs): add information about multi-instrumentation support * Update pkg/instrumentation/podmutator.go Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * chore(instr): add new cases * chore(instr): log error for invalid instr conf * chore(instr): ret err for duplicates, improve conditions * chore(go): improve containers check condition * feat(sdk): fix initcontainer caps * feat(sdk): fix securitycontext injection * feat: update featuregate version * feat: update fg registration version * chore: update tests with vol sizelimit * feat: update readme * fix: dotnet tests * fix dotnet e2e test * fix: sort only if duplicates * chore: featuregate update fromversion --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- .chloggen/1901-support-multi-cont-instr.yaml | 16 + .github/workflows/e2e.yaml | 1 + Makefile | 7 +- README.md | 94 +- hack/modify-test-images.sh | 2 + kuttl-test-multi-instr.yaml | 9 + pkg/featuregate/featuregate.go | 6 + pkg/instrumentation/annotation.go | 27 +- pkg/instrumentation/dotnet.go | 31 +- pkg/instrumentation/dotnet_test.go | 56 +- pkg/instrumentation/golang.go | 13 +- pkg/instrumentation/golang_test.go | 45 +- pkg/instrumentation/helper.go | 64 +- pkg/instrumentation/helper_test.go | 85 +- pkg/instrumentation/javaagent.go | 23 +- pkg/instrumentation/javaagent_test.go | 28 +- pkg/instrumentation/nodejs.go | 23 +- pkg/instrumentation/nodejs_test.go | 32 +- pkg/instrumentation/podmutator.go | 192 +- pkg/instrumentation/podmutator_test.go | 3991 +++++++++++++++-- pkg/instrumentation/python.go | 23 +- pkg/instrumentation/python_test.go | 64 +- pkg/instrumentation/sdk.go | 167 +- pkg/instrumentation/sdk_test.go | 118 +- .../01-assert.yaml | 28 +- .../02-assert.yaml | 14 +- .../01-assert.yaml | 16 +- .../instrumentation-dotnet/01-assert.yaml | 16 +- .../01-assert.yaml | 12 +- .../02-assert.yaml | 6 +- .../03-assert.yaml | 8 +- .../instrumentation-java/01-assert.yaml | 8 +- .../01-assert.yaml | 12 +- .../02-assert.yaml | 6 +- .../instrumentation-nodejs/01-assert.yaml | 8 +- .../01-assert.yaml | 12 +- .../02-assert.yaml | 6 +- .../instrumentation-python/01-assert.yaml | 8 +- .../00-install-collector.yaml | 23 + .../00-install-instrumentation.yaml | 40 + .../01-assert.yaml | 129 + .../01-install-app.yaml | 40 + .../00-install-collector.yaml | 23 + .../00-install-instrumentation.yaml | 40 + .../01-assert.yaml | 22 + .../01-install-app.yaml | 29 + .../00-install-collector.yaml | 23 + .../00-install-instrumentation.yaml | 40 + .../01-assert.yaml | 38 + .../01-install-app.yaml | 25 + .../manager_deployment_feature_gate.yaml | 63 + 51 files changed, 5005 insertions(+), 807 deletions(-) create mode 100755 .chloggen/1901-support-multi-cont-instr.yaml create mode 100644 kuttl-test-multi-instr.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml create mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml create mode 100644 tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml diff --git a/.chloggen/1901-support-multi-cont-instr.yaml b/.chloggen/1901-support-multi-cont-instr.yaml new file mode 100755 index 000000000..e7a33cc4a --- /dev/null +++ b/.chloggen/1901-support-multi-cont-instr.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Add support for multi instrumentation" + +# One or more tracking issues related to the change +issues: [1717] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index fa3acafe7..01caa85c3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -29,6 +29,7 @@ jobs: - e2e-upgrade - e2e-prometheuscr - e2e-autoscale + - e2e-multi-instrumentation steps: - name: Set up Go diff --git a/Makefile b/Makefile index a61d95696..76d3a703e 100644 --- a/Makefile +++ b/Makefile @@ -207,9 +207,14 @@ e2e-log-operator: kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager kubectl get deploy -A +# end-to-tests for multi-instrumentation +.PHONY: e2e-multi-instrumentation +e2e-multi-instrumentation: + $(KUTTL) test --config kuttl-test-multi-instr.yaml + .PHONY: prepare-e2e prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy - TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh + TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh .PHONY: enable-prometheus-feature-flag enable-prometheus-feature-flag: diff --git a/README.md b/README.md index 13042200a..7cce244cd 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ The possible values for the annotation can be * `"my-other-namespace/my-instrumentation"` - name and namespace of `Instrumentation` CR instance in another namespace. * `"false"` - do not inject -#### Multi-container pods +#### Multi-container pods with single instrumentation If nothing else is specified, instrumentation is performed on the first container available in the pod spec. In some cases (for example in the case of the injection of an Istio sidecar) it becomes necessary to specify on which container(s) this injection must be performed. @@ -342,6 +342,90 @@ In the above case, `myapp` and `myapp2` containers will be instrumented, `myapp3 > 🚨 **NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first pod should be the only pod you want instrumented. +#### Multi-container pods with multiple instrumentations + +Works only when `operator.autoinstrumentation.multi-instrumentation` feature is `enabled`. + +Annotations defining which language instrumentation will be injected are required. When feature is enabled, specific for Instrumentation language containers annotations are used: + +Java: +```bash +instrumentation.opentelemetry.io/java-container-names: "java1,java2" +``` + +NodeJS: +```bash +instrumentation.opentelemetry.io/nodejs-container-names: "nodejs1,nodejs2" +``` + +Python: +```bash +instrumentation.opentelemetry.io/python-container-names: "python1,python3" +``` + +DotNet: +```bash +instrumentation.opentelemetry.io/dotnet-container-names: "dotnet1,dotnet2" +``` + +Go: +```bash +instrumentation.opentelemetry.io/go-container-names: "go1" +``` + +ApacheHttpD: +```bash +instrumentation.opentelemetry.io/apache-httpd-container-names: "apache1,apache2" +``` + +SDK: +```bash +instrumentation.opentelemetry.io/sdk-container-names: "app1,app2" +``` + +If language instrumentation specific container names are not specified, instrumentation is performed on the first container available in the pod spec (only if single instrumentation injection is configured). + +In some cases containers in the pod are using different technologies. It becomes necessary to specify language instrumentation for container(s) on which this injection must be performed. + +For this, we will use language instrumentation specific container names annotation for which we will indicate one or more container names (`.spec.containers.name`) on which the injection must be made: + +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-deployment-with-multi-containers-multi-instrumentations +spec: + selector: + matchLabels: + app: my-pod-with-multi-containers-multi-instrumentations + replicas: 1 + template: + metadata: + labels: + app: my-pod-with-multi-containers-multi-instrumentations + annotations: + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/java-container-names: "myapp,myapp2" + instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/python-container-names: "myapp3" + spec: + containers: + - name: myapp + image: myImage1 + - name: myapp2 + image: myImage2 + - name: myapp3 + image: myImage3 +``` + +In the above case, `myapp` and `myapp2` containers will be instrumented using Java and `myapp3` using Python instrumentation. + +**NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first container should be the only you want to instrument. + +**NOTE**: This type of instrumentation **does not** allow to instrument a container with multiple language instrumentations. + +**NOTE**: `instrumentation.opentelemetry.io/container-names` annotation is not used for this feature. + #### Use customized or vendor instrumentation By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by @@ -403,8 +487,8 @@ instrumentation.opentelemetry.io/inject-sdk: "true" The operator allows specifying, via the feature gates, which languages the Instrumentation resource may instrument. These feature gates must be passed to the operator via the `--feature-gates` flag. The flag allows for a comma-delimited list of feature gate identifiers. -Prefix a gate with '-' to disable support for the corresponding language. -Prefixing a gate with '+' or no prefix will enable support for the corresponding language. +Prefix a gate with '-' to disable support for the corresponding language or multi instrumentation feature. +Prefixing a gate with '+' or no prefix will enable support for the corresponding language or multi instrumentation feature. If a language is enabled by default its gate only needs to be supplied when disabling the gate. | Language | Gate | Default Value | @@ -418,6 +502,10 @@ If a language is enabled by default its gate only needs to be supplied when disa Language not specified in the table are always supported and cannot be disabled. +OpenTelemetry Operator allows to instrument multiple containers using multiple language specific instrumentations. +These feature can be enabled using `operator.autoinstrumentation.multi-instrumentation` flag. By default flag is `disabled`. +For more information about multi-instrumentation feature capabilities please see [Multi-container pods with multiple instrumentations](#Multi-container-pods-with-multiple-instrumentations). + ### Target Allocator The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 93fe32716..89f03c7a9 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -5,3 +5,5 @@ SED_BIN=${SED_BIN:-sed} ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml + +${SED_BIN} -i "s#local/opentelemetry-operator:e2e#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml diff --git a/kuttl-test-multi-instr.yaml b/kuttl-test-multi-instr.yaml new file mode 100644 index 000000000..5381f3bd9 --- /dev/null +++ b/kuttl-test-multi-instr.yaml @@ -0,0 +1,9 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +artifactsDir: ./tests/_build/artifacts/ +commands: + - command: kubectl apply -f ./tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml + - command: go run hack/check-operator-ready.go +testDirs: + - ./tests/e2e-multi-instrumentation/ +timeout: 150 diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 3f9f95bf4..200c997a0 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -62,6 +62,12 @@ var ( featuregate.WithRegisterFromVersion("v0.80.0"), ) + EnableMultiInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.multi-instrumentation", + featuregate.StageAlpha, + featuregate.WithRegisterFromVersion("0.86.0"), + featuregate.WithRegisterDescription("controls whether the operator supports multi instrumentation")) + // EnableTargetAllocatorRewrite is the feature gate that controls whether the collector's configuration should // automatically be rewritten when the target allocator is enabled. EnableTargetAllocatorRewrite = featuregate.GlobalRegistry().MustRegister( diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 661bfc785..bcf62fec0 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -23,16 +23,23 @@ import ( const ( // annotationInjectJava indicates whether java auto-instrumentation should be injected or not. // Possible values are "true", "false" or "" name. - annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" - annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" - annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" - annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" - annotationDotNetRuntime = "instrumentation.opentelemetry.io/otel-dotnet-auto-runtime" - annotationInjectGo = "instrumentation.opentelemetry.io/inject-go" - annotationGoExecPath = "instrumentation.opentelemetry.io/otel-go-auto-target-exe" - annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" - annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" - annotationInjectApacheHttpd = "instrumentation.opentelemetry.io/inject-apache-httpd" + annotationInjectContainerName = "instrumentation.opentelemetry.io/container-names" + annotationInjectJava = "instrumentation.opentelemetry.io/inject-java" + annotationInjectJavaContainersName = "instrumentation.opentelemetry.io/java-container-names" + annotationInjectNodeJS = "instrumentation.opentelemetry.io/inject-nodejs" + annotationInjectNodeJSContainersName = "instrumentation.opentelemetry.io/nodejs-container-names" + annotationInjectPython = "instrumentation.opentelemetry.io/inject-python" + annotationInjectPythonContainersName = "instrumentation.opentelemetry.io/python-container-names" + annotationInjectDotNet = "instrumentation.opentelemetry.io/inject-dotnet" + annotationDotNetRuntime = "instrumentation.opentelemetry.io/otel-dotnet-auto-runtime" + annotationInjectDotnetContainersName = "instrumentation.opentelemetry.io/dotnet-container-names" + annotationInjectGo = "instrumentation.opentelemetry.io/inject-go" + annotationInjectGoContainersName = "instrumentation.opentelemetry.io/go-container-names" + annotationGoExecPath = "instrumentation.opentelemetry.io/otel-go-auto-target-exe" + annotationInjectSdk = "instrumentation.opentelemetry.io/inject-sdk" + annotationInjectSdkContainersName = "instrumentation.opentelemetry.io/sdk-container-names" + annotationInjectApacheHttpd = "instrumentation.opentelemetry.io/inject-apache-httpd" + annotationInjectApacheHttpdContainersName = "instrumentation.opentelemetry.io/apache-httpd-container-names" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index c78d33982..77dd814f6 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -33,12 +33,15 @@ const ( envDotNetOTelAutoHome = "OTEL_DOTNET_AUTO_HOME" dotNetCoreClrEnableProfilingEnabled = "1" dotNetCoreClrProfilerID = "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - dotNetCoreClrProfilerGlibcPath = "/otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so" - dotNetCoreClrProfilerMuslPath = "/otel-auto-instrumentation/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so" - dotNetAdditionalDepsPath = "/otel-auto-instrumentation/AdditionalDeps" - dotNetOTelAutoHomePath = "/otel-auto-instrumentation" - dotNetSharedStorePath = "/otel-auto-instrumentation/store" - dotNetStartupHookPath = "/otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + dotNetCoreClrProfilerGlibcPath = "/otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetCoreClrProfilerMuslPath = "/otel-auto-instrumentation-dotnet/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so" + dotNetAdditionalDepsPath = "/otel-auto-instrumentation-dotnet/AdditionalDeps" + dotNetOTelAutoHomePath = "/otel-auto-instrumentation-dotnet" + dotNetSharedStorePath = "/otel-auto-instrumentation-dotnet/store" + dotNetStartupHookPath = "/otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll" + dotnetVolumeName = volumeName + "-dotnet" + dotnetInitContainerName = initContainerName + "-dotnet" + dotnetInstrMountPath = "/otel-auto-instrumentation-dotnet" ) // Supported .NET runtime identifiers (https://learn.microsoft.com/en-us/dotnet/core/rid-catalog), can be set by instrumentation.opentelemetry.io/inject-dotnet. @@ -108,14 +111,14 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor setDotNetEnvVar(container, envDotNetSharedStore, dotNetSharedStorePath, concatEnvValues) container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }) // We just inject Volumes and init containers for the first processed container. - if isInitContainerMissing(pod) { + if isInitContainerMissing(pod, dotnetInitContainerName) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, + Name: dotnetVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: volumeSize(dotNetSpec.VolumeSizeLimit), @@ -123,13 +126,13 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, + Name: dotnetInitContainerName, Image: dotNetSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, Resources: dotNetSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }}, }) } diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index b89f4b9e2..f17a04745 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -47,7 +47,7 @@ func TestInjectDotNetSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-dotnet", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -57,12 +57,12 @@ func TestInjectDotNetSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-dotnet", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-dotnet"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-dotnet", + MountPath: "/otel-auto-instrumentation-dotnet", }}, Resources: testResourceRequirements, }, @@ -71,8 +71,8 @@ func TestInjectDotNetSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-dotnet", + MountPath: "/otel-auto-instrumentation-dotnet", }, }, Env: []corev1.EnvVar{ @@ -152,7 +152,7 @@ func TestInjectDotNetSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-dotnet", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -162,12 +162,12 @@ func TestInjectDotNetSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-dotnet", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-dotnet"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-dotnet", + MountPath: "/otel-auto-instrumentation-dotnet", }}, }, }, @@ -175,8 +175,8 @@ func TestInjectDotNetSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-dotnet", + MountPath: "/otel-auto-instrumentation-dotnet", }, }, Env: []corev1.EnvVar{ @@ -385,7 +385,7 @@ func TestInjectDotNetSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: dotnetVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -395,12 +395,12 @@ func TestInjectDotNetSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: dotnetInitContainerName, Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-dotnet"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: "/otel-auto-instrumentation-dotnet", }}, Resources: testResourceRequirements, }, @@ -409,8 +409,8 @@ func TestInjectDotNetSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: "/otel-auto-instrumentation-dotnet", }, }, Env: []corev1.EnvVar{ @@ -473,7 +473,7 @@ func TestInjectDotNetSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: dotnetVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -483,12 +483,12 @@ func TestInjectDotNetSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: dotnetInitContainerName, Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-dotnet"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: "/otel-auto-instrumentation-dotnet", }}, Resources: testResourceRequirements, }, @@ -497,8 +497,8 @@ func TestInjectDotNetSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: "/otel-auto-instrumentation-dotnet", }, }, Env: []corev1.EnvVar{ diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go index 2dcb07057..ef78e1b6a 100644 --- a/pkg/instrumentation/golang.go +++ b/pkg/instrumentation/golang.go @@ -21,6 +21,7 @@ import ( corev1 "k8s.io/api/core/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) const ( @@ -36,9 +37,17 @@ func injectGoSDK(goSpec v1alpha1.Go, pod corev1.Pod) (corev1.Pod, error) { return pod, fmt.Errorf("shared process namespace has been explicitly disabled") } - containerNames, ok := pod.Annotations[annotationInjectContainerName] + // skip instrumentation when more than one containers provided + containerNames := "" + ok := false + if featuregate.EnableMultiInstrumentationSupport.IsEnabled() { + containerNames, ok = pod.Annotations[annotationInjectGoContainersName] + } else { + containerNames, ok = pod.Annotations[annotationInjectContainerName] + } + if ok && len(strings.Split(containerNames, ",")) > 1 { - return pod, fmt.Errorf("go instrumentation cannot be injected into a pod using instrumentation.opentelemetry.io/container-names with more than 1 container") + return pod, fmt.Errorf("go instrumentation cannot be injected into a pod, multiple containers configured") } true := true diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go index 28f723e6c..ba3ed7ca9 100644 --- a/pkg/instrumentation/golang_test.go +++ b/pkg/instrumentation/golang_test.go @@ -19,10 +19,13 @@ import ( "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + colfeaturegate "go.opentelemetry.io/collector/featuregate" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) func TestInjectGoSDK(t *testing.T) { @@ -33,9 +36,10 @@ func TestInjectGoSDK(t *testing.T) { tests := []struct { name string v1alpha1.Go - pod corev1.Pod - expected corev1.Pod - err error + pod corev1.Pod + expected corev1.Pod + err error + setFeatureGates func(t *testing.T) }{ { name: "shared process namespace disabled", @@ -52,6 +56,32 @@ func TestInjectGoSDK(t *testing.T) { }, err: fmt.Errorf("shared process namespace has been explicitly disabled"), }, + { + name: "using go-container-names", + Go: v1alpha1.Go{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/go-container-names": "foo,bar", + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + "instrumentation.opentelemetry.io/go-container-names": "foo,bar", + }, + }, + }, + err: fmt.Errorf("go instrumentation cannot be injected into a pod, multiple containers configured"), + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) + }) + }, + }, { name: "using container-names", Go: v1alpha1.Go{Image: "foo/bar:1", Env: []corev1.EnvVar{}}, @@ -69,7 +99,7 @@ func TestInjectGoSDK(t *testing.T) { }, }, }, - err: fmt.Errorf("go instrumentation cannot be injected into a pod using instrumentation.opentelemetry.io/container-names with more than 1 container"), + err: fmt.Errorf("go instrumentation cannot be injected into a pod, multiple containers configured"), }, { name: "pod annotation takes precedence", @@ -151,14 +181,14 @@ func TestInjectGoSDK(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - "instrumentation.opentelemetry.io/container-names": "foo", + "instrumentation.opentelemetry.io/go-container-names": "foo", }, }, }, expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - "instrumentation.opentelemetry.io/container-names": "foo", + "instrumentation.opentelemetry.io/go-container-names": "foo", }, }, Spec: corev1.PodSpec{ @@ -266,6 +296,9 @@ func TestInjectGoSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + if test.setFeatureGates != nil { + test.setFeatureGates(t) + } pod, err := injectGoSDK(test.Go, test.pod) assert.Equal(t, test.expected, pod) assert.Equal(t, test.err, err) diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 91d9ba376..7dbc7fb16 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -15,8 +15,13 @@ package instrumentation import ( + "fmt" + "sort" + "strings" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/utils/strings/slices" "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/pkg/constants" @@ -25,9 +30,9 @@ import ( var defaultSize = resource.MustParse("150Mi") // Calculate if we already inject InitContainers. -func isInitContainerMissing(pod corev1.Pod) bool { +func isInitContainerMissing(pod corev1.Pod, containerName string) bool { for _, initContainer := range pod.Spec.InitContainers { - if initContainer.Name == initContainerName { + if initContainer.Name == containerName { return false } } @@ -37,7 +42,8 @@ func isInitContainerMissing(pod corev1.Pod) bool { // Checks if Pod is already instrumented by checking Instrumentation InitContainer presence. func isAutoInstrumentationInjected(pod corev1.Pod) bool { for _, cont := range pod.Spec.InitContainers { - if cont.Name == initContainerName { + if slices.Contains([]string{dotnetInitContainerName, javaInitContainerName, + nodejsInitContainerName, pythonInitContainerName, apacheAgentInitContainerName}, cont.Name) { return true } } @@ -63,6 +69,58 @@ func isAutoInstrumentationInjected(pod corev1.Pod) bool { return false } +// Look for duplicates in the provided containers. +func findDuplicatedContainers(ctrs []string) error { + // Merge is needed because of multiple containers can be provided for single instrumentation. + mergedContainers := strings.Join(ctrs, ",") + + // Split all containers. + splitContainers := strings.Split(mergedContainers, ",") + + countMap := make(map[string]int) + var duplicates []string + for _, str := range splitContainers { + countMap[str]++ + } + + // Find and collect the duplicates + for str, count := range countMap { + // omit empty container names + if str == "" { + continue + } + + if count > 1 { + duplicates = append(duplicates, str) + } + } + + if duplicates != nil { + sort.Strings(duplicates) + return fmt.Errorf("duplicated container names detected: %s", duplicates) + } + + return nil +} + +// Return positive for instrumentation with defined containers. +func isInstrWithContainers(inst instrumentationWithContainers) int { + if inst.Containers != "" { + return 1 + } + + return 0 +} + +// Return positive for instrumentation without defined containers. +func isInstrWithoutContainers(inst instrumentationWithContainers) int { + if inst.Containers == "" { + return 1 + } + + return 0 +} + func volumeSize(quantity *resource.Quantity) *resource.Quantity { if quantity == nil { return &defaultSize diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go index 9ed445ff4..72db0b4f2 100644 --- a/pkg/instrumentation/helper_test.go +++ b/pkg/instrumentation/helper_test.go @@ -15,6 +15,7 @@ package instrumentation import ( + "fmt" "testing" "github.com/stretchr/testify/assert" @@ -38,7 +39,7 @@ func TestInitContainerMissing(t *testing.T) { Name: "istio-init", }, { - Name: initContainerName, + Name: javaInitContainerName, }, }, }, @@ -69,7 +70,7 @@ func TestInitContainerMissing(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - result := isInitContainerMissing(test.pod) + result := isInitContainerMissing(test.pod, javaInitContainerName) assert.Equal(t, test.expected, result) }) } @@ -90,7 +91,7 @@ func TestAutoInstrumentationInjected(t *testing.T) { Name: "magic-init", }, { - Name: initContainerName, + Name: nodejsInitContainerName, }, }, }, @@ -160,3 +161,81 @@ func TestAutoInstrumentationInjected(t *testing.T) { }) } } + +func TestDuplicatedContainers(t *testing.T) { + tests := []struct { + name string + containers []string + expectedDuplicates error + }{ + { + name: "No duplicates", + containers: []string{"app1,app2", "app3", "app4,app5"}, + expectedDuplicates: nil, + }, + { + name: "Duplicates in containers", + containers: []string{"app1,app2", "app1", "app1,app3,app4", "app4"}, + expectedDuplicates: fmt.Errorf("duplicated container names detected: [app1 app4]"), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ok := findDuplicatedContainers(test.containers) + assert.Equal(t, test.expectedDuplicates, ok) + }) + } +} + +func TestInstrWithContainers(t *testing.T) { + tests := []struct { + name string + containers instrumentationWithContainers + expectedResult int + }{ + { + name: "No containers", + containers: instrumentationWithContainers{Containers: ""}, + expectedResult: 0, + }, + { + name: "With containers", + containers: instrumentationWithContainers{Containers: "ct1"}, + expectedResult: 1, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + res := isInstrWithContainers(test.containers) + assert.Equal(t, test.expectedResult, res) + }) + } +} + +func TestInstrWithoutContainers(t *testing.T) { + tests := []struct { + name string + containers instrumentationWithContainers + expectedResult int + }{ + { + name: "No containers", + containers: instrumentationWithContainers{Containers: ""}, + expectedResult: 1, + }, + { + name: "With containers", + containers: instrumentationWithContainers{Containers: "ct1"}, + expectedResult: 0, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + res := isInstrWithoutContainers(test.containers) + assert.Equal(t, test.expectedResult, res) + }) + } +} diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index fd2448df6..5422cc08a 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -21,8 +21,11 @@ import ( ) const ( - envJavaToolsOptions = "JAVA_TOOL_OPTIONS" - javaJVMArgument = " -javaagent:/otel-auto-instrumentation/javaagent.jar" + envJavaToolsOptions = "JAVA_TOOL_OPTIONS" + javaJVMArgument = " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" + javaInitContainerName = initContainerName + "-java" + javaVolumeName = volumeName + "-java" + javaInstrMountPath = "/otel-auto-instrumentation-java" ) func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1.Pod, error) { @@ -53,14 +56,14 @@ func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1. } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, }) // We just inject Volumes and init containers for the first processed container. - if isInitContainerMissing(pod) { + if isInitContainerMissing(pod, javaInitContainerName) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, + Name: javaVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: volumeSize(javaSpec.VolumeSizeLimit), @@ -68,13 +71,13 @@ func injectJavaagent(javaSpec v1alpha1.Java, pod corev1.Pod, index int) (corev1. }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, + Name: javaInitContainerName, Image: javaSpec.Image, - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, Resources: javaSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, }}, }) } diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 643ea8ff9..3a8c43b84 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -46,7 +46,7 @@ func TestInjectJavaagent(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-java", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -56,12 +56,12 @@ func TestInjectJavaagent(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-java", Image: "foo/bar:1", - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation-java/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-java", + MountPath: "/otel-auto-instrumentation-java", }}, }, }, @@ -69,8 +69,8 @@ func TestInjectJavaagent(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-java", + MountPath: "/otel-auto-instrumentation-java", }, }, Env: []corev1.EnvVar{ @@ -106,7 +106,7 @@ func TestInjectJavaagent(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-java", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -116,12 +116,12 @@ func TestInjectJavaagent(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-java", Image: "foo/bar:1", - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation-java/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-java", + MountPath: "/otel-auto-instrumentation-java", }}, Resources: testResourceRequirements, }, @@ -130,8 +130,8 @@ func TestInjectJavaagent(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-java", + MountPath: "/otel-auto-instrumentation-java", }, }, Env: []corev1.EnvVar{ diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index f84a50573..6d06bea36 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -21,8 +21,11 @@ import ( ) const ( - envNodeOptions = "NODE_OPTIONS" - nodeRequireArgument = " --require /otel-auto-instrumentation/autoinstrumentation.js" + envNodeOptions = "NODE_OPTIONS" + nodeRequireArgument = " --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js" + nodejsInitContainerName = initContainerName + "-nodejs" + nodejsVolumeName = volumeName + "-nodejs" + nodejsInstrMountPath = "/otel-auto-instrumentation-nodejs" ) func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (corev1.Pod, error) { @@ -53,14 +56,14 @@ func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (cor } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }) // We just inject Volumes and init containers for the first processed container - if isInitContainerMissing(pod) { + if isInitContainerMissing(pod, nodejsInitContainerName) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, + Name: nodejsVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: volumeSize(nodeJSSpec.VolumeSizeLimit), @@ -68,13 +71,13 @@ func injectNodeJSSDK(nodeJSSpec v1alpha1.NodeJS, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, + Name: nodejsInitContainerName, Image: nodeJSSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, Resources: nodeJSSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }}, }) } diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index abf43f2d3..4b5d22dd8 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -46,7 +46,7 @@ func TestInjectNodeJSSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-nodejs", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -56,12 +56,12 @@ func TestInjectNodeJSSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-nodejs", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-nodejs"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-nodejs", + MountPath: "/otel-auto-instrumentation-nodejs", }}, }, }, @@ -69,14 +69,14 @@ func TestInjectNodeJSSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-nodejs", + MountPath: "/otel-auto-instrumentation-nodejs", }, }, Env: []corev1.EnvVar{ { Name: "NODE_OPTIONS", - Value: nodeRequireArgument, + Value: " --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js", }, }, }, @@ -106,7 +106,7 @@ func TestInjectNodeJSSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-nodejs", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -116,12 +116,12 @@ func TestInjectNodeJSSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-nodejs", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-nodejs"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-nodejs", + MountPath: "/otel-auto-instrumentation-nodejs", }}, Resources: testResourceRequirements, }, @@ -130,14 +130,14 @@ func TestInjectNodeJSSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-nodejs", + MountPath: "/otel-auto-instrumentation-nodejs", }, }, Env: []corev1.EnvVar{ { Name: "NODE_OPTIONS", - Value: "-Dbaz=bar" + nodeRequireArgument, + Value: "-Dbaz=bar" + " --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js", }, }, }, diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 60c6059c6..49cc9731c 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -17,6 +17,7 @@ package instrumentation import ( "context" "errors" + "fmt" "strings" "github.com/go-logr/logr" @@ -42,14 +43,139 @@ type instPodMutator struct { Recorder record.EventRecorder } +type instrumentationWithContainers struct { + Instrumentation *v1alpha1.Instrumentation + Containers string +} + type languageInstrumentations struct { - Java *v1alpha1.Instrumentation - NodeJS *v1alpha1.Instrumentation - Python *v1alpha1.Instrumentation - DotNet *v1alpha1.Instrumentation - ApacheHttpd *v1alpha1.Instrumentation - Go *v1alpha1.Instrumentation - Sdk *v1alpha1.Instrumentation + Java instrumentationWithContainers + NodeJS instrumentationWithContainers + Python instrumentationWithContainers + DotNet instrumentationWithContainers + ApacheHttpd instrumentationWithContainers + Go instrumentationWithContainers + Sdk instrumentationWithContainers +} + +// Check if single instrumentation is configured for Pod and return which is configured. +func (langInsts languageInstrumentations) isSingleInstrumentationEnabled() bool { + count := 0 + + if langInsts.Java.Instrumentation != nil { + count++ + } + if langInsts.NodeJS.Instrumentation != nil { + count++ + } + if langInsts.Python.Instrumentation != nil { + count++ + } + if langInsts.DotNet.Instrumentation != nil { + count++ + } + if langInsts.ApacheHttpd.Instrumentation != nil { + count++ + } + if langInsts.Go.Instrumentation != nil { + count++ + } + if langInsts.Sdk.Instrumentation != nil { + count++ + } + + return count == 1 +} + +// Check if specific containers are provided for configured instrumentation. +func (langInsts languageInstrumentations) areContainerNamesConfiguredForMultipleInstrumentations() (bool, error) { + var instrWithoutContainers int + var instrWithContainers int + var allContainers []string + + // Check for instrumentations with and without containers. + if langInsts.Java.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.Java) + instrWithoutContainers += isInstrWithoutContainers(langInsts.Java) + allContainers = append(allContainers, langInsts.Java.Containers) + } + if langInsts.NodeJS.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.NodeJS) + instrWithoutContainers += isInstrWithoutContainers(langInsts.NodeJS) + allContainers = append(allContainers, langInsts.NodeJS.Containers) + } + if langInsts.Python.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.Python) + instrWithoutContainers += isInstrWithoutContainers(langInsts.Python) + allContainers = append(allContainers, langInsts.Python.Containers) + } + if langInsts.DotNet.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.DotNet) + instrWithoutContainers += isInstrWithoutContainers(langInsts.DotNet) + allContainers = append(allContainers, langInsts.DotNet.Containers) + } + if langInsts.ApacheHttpd.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.ApacheHttpd) + instrWithoutContainers += isInstrWithoutContainers(langInsts.ApacheHttpd) + allContainers = append(allContainers, langInsts.ApacheHttpd.Containers) + } + if langInsts.Go.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.Go) + instrWithoutContainers += isInstrWithoutContainers(langInsts.Go) + allContainers = append(allContainers, langInsts.Go.Containers) + } + if langInsts.Sdk.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.Sdk) + instrWithoutContainers += isInstrWithoutContainers(langInsts.Sdk) + allContainers = append(allContainers, langInsts.Sdk.Containers) + } + + // Look for duplicated containers. + containerDuplicates := findDuplicatedContainers(allContainers) + if containerDuplicates != nil { + return false, containerDuplicates + } + + // Look for mixed multiple instrumentations with and without container names. + if instrWithoutContainers > 0 && instrWithContainers > 0 { + return false, fmt.Errorf("incorrect instrumentation configuration - please provide container names for all instrumentations") + } + + // Look for multiple instrumentations without container names. + if instrWithoutContainers > 1 && instrWithContainers == 0 { + return false, fmt.Errorf("incorrect instrumentation configuration - please provide container names for all instrumentations") + } + + if instrWithoutContainers == 0 && instrWithContainers == 0 { + return false, fmt.Errorf("instrumentation configuration not provided") + } + + return true, nil +} + +// Set containers for configured instrumentation. +func (langInsts *languageInstrumentations) setInstrumentationLanguageContainers(containers string) { + if langInsts.Java.Instrumentation != nil { + langInsts.Java.Containers = containers + } + if langInsts.NodeJS.Instrumentation != nil { + langInsts.NodeJS.Containers = containers + } + if langInsts.Python.Instrumentation != nil { + langInsts.Python.Containers = containers + } + if langInsts.DotNet.Instrumentation != nil { + langInsts.DotNet.Containers = containers + } + if langInsts.ApacheHttpd.Instrumentation != nil { + langInsts.ApacheHttpd.Containers = containers + } + if langInsts.Go.Instrumentation != nil { + langInsts.Go.Containers = containers + } + if langInsts.Sdk.Instrumentation != nil { + langInsts.Sdk.Containers = containers + } } var _ webhookhandler.PodMutator = (*instPodMutator)(nil) @@ -88,7 +214,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnableJavaAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.Java = inst + insts.Java.Instrumentation = inst } else { logger.Error(nil, "support for Java auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Java auto instrumentation is not enabled") @@ -100,7 +226,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.NodeJS = inst + insts.NodeJS.Instrumentation = inst } else { logger.Error(nil, "support for NodeJS auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for NodeJS auto instrumentation is not enabled") @@ -112,7 +238,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.Python = inst + insts.Python.Instrumentation = inst } else { logger.Error(nil, "support for Python auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Python auto instrumentation is not enabled") @@ -124,7 +250,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.DotNet = inst + insts.DotNet.Instrumentation = inst } else { logger.Error(nil, "support for .NET auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for .NET auto instrumentation is not enabled") @@ -136,7 +262,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.Go = inst + insts.Go.Instrumentation = inst } else { logger.Error(err, "support for Go auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Go auto instrumentation is not enabled") @@ -148,7 +274,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c return pod, err } if featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() || inst == nil { - insts.ApacheHttpd = inst + insts.ApacheHttpd.Instrumentation = inst } else { logger.Error(nil, "support for Apache HTTPD auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Apache HTTPD auto instrumentation is not enabled") @@ -159,22 +285,50 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") return pod, err } - insts.Sdk = inst + insts.Sdk.Instrumentation = inst - if insts.Java == nil && insts.NodeJS == nil && insts.Python == nil && insts.DotNet == nil && insts.Go == nil && insts.ApacheHttpd == nil && insts.Sdk == nil { + if insts.Java.Instrumentation == nil && insts.NodeJS.Instrumentation == nil && insts.Python.Instrumentation == nil && + insts.DotNet.Instrumentation == nil && insts.Go.Instrumentation == nil && insts.ApacheHttpd.Instrumentation == nil && + insts.Sdk.Instrumentation == nil { logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } // We retrieve the annotation for podname - var targetContainers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectContainerName) + if featuregate.EnableMultiInstrumentationSupport.IsEnabled() { + // We use annotations specific for instrumentation language + insts.Java.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectJavaContainersName) + insts.NodeJS.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectNodeJSContainersName) + insts.Python.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectPythonContainersName) + insts.DotNet.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectDotnetContainersName) + insts.Go.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectGoContainersName) + insts.ApacheHttpd.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectApacheHttpdContainersName) + insts.Sdk.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectSdkContainersName) + + // We check if provided annotations and instrumentations are valid + ok, msg := insts.areContainerNamesConfiguredForMultipleInstrumentations() + if !ok { + logger.V(1).Error(msg, "skipping instrumentation injection") + return pod, nil + } + } else { + // We use general annotation for container names + // only when multi instrumentation is disabled + singleInstrEnabled := insts.isSingleInstrumentationEnabled() + if singleInstrEnabled { + generalContainerNames := annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectContainerName) + insts.setInstrumentationLanguageContainers(generalContainerNames) + } else { + logger.V(1).Error(fmt.Errorf("multiple injection annotations present"), "skipping instrumentation injection") + return pod, nil + } + + } // once it's been determined that instrumentation is desired, none exists yet, and we know which instance it should talk to, // we should inject the instrumentation. modifiedPod := pod - for _, currentContainer := range strings.Split(targetContainers, ",") { - modifiedPod = pm.sdkInjector.inject(ctx, insts, ns, modifiedPod, strings.TrimSpace(currentContainer)) - } + modifiedPod = pm.sdkInjector.inject(ctx, insts, ns, modifiedPod) return modifiedPod, nil } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 92964ff0d..996e44b6a 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -131,7 +131,7 @@ func TestMutatePod(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "opentelemetry-auto-instrumentation", + Name: javaVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -141,11 +141,11 @@ func TestMutatePod(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Name: javaInitContainerName, + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, }}, Resources: testResourceRequirements, }, @@ -221,8 +221,271 @@ func TestMutatePod(t *testing.T) { }, VolumeMounts: []corev1.VolumeMount{ { - Name: "opentelemetry-auto-instrumentation", - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + }, + }, + }, + }, + { + name: "javaagent injection multiple containers, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "javaagent-multiple-containers", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "javaagent-multiple-containers", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.Java{ + Env: []corev1.EnvVar{ + { + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, + }, + Resources: testResourceRequirements, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + annotationInjectContainerName: "app1,app2", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app1", + }, + { + Name: "app2", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "true", + annotationInjectContainerName: "app1,app2", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: javaVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: javaInitContainerName, + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }}, + Resources: testResourceRequirements, + }, + }, + Containers: []corev1.Container{ + { + Name: "app1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app1", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app1,k8s.namespace.name=javaagent-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + { + Name: "app2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_JAVAAGENT_DEBUG", + Value: "true", + }, + { + Name: "OTEL_INSTRUMENTATION_JDBC_ENABLED", + Value: "false", + }, + { + Name: "SPLUNK_PROFILER_ENABLED", + Value: "false", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app2", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app2,k8s.namespace.name=javaagent-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, }, }, }, @@ -402,7 +665,7 @@ func TestMutatePod(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "opentelemetry-auto-instrumentation", + Name: nodejsVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -412,12 +675,12 @@ func TestMutatePod(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: nodejsInitContainerName, Image: "otel/nodejs:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }}, }, }, @@ -484,8 +747,8 @@ func TestMutatePod(t *testing.T) { }, VolumeMounts: []corev1.VolumeMount{ { - Name: "opentelemetry-auto-instrumentation", - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }, }, }, @@ -494,16 +757,16 @@ func TestMutatePod(t *testing.T) { }, }, { - name: "nodejs injection feature gate disabled", + name: "nodejs injection multiple containers, true", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "nodejs-disabled", + Name: "nodejs-multiple-containers", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "nodejs-disabled", + Namespace: "nodejs-multiple-containers", }, Spec: v1alpha1.InstrumentationSpec{ NodeJS: v1alpha1.NodeJS{ @@ -549,13 +812,17 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectNodeJS: "true", + annotationInjectNodeJS: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app1", + }, + { + Name: "app2", }, }, }, @@ -563,16 +830,251 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectNodeJS: "true", + annotationInjectNodeJS: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ - Containers: []corev1.Container{ + Volumes: []corev1.Volume{ { - Name: "app", + Name: nodejsVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, }, }, - }, + InitContainers: []corev1.Container{ + { + Name: nodejsInitContainerName, + Image: "otel/nodejs:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app1", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app1,k8s.namespace.name=nodejs-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + { + Name: "app2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app2", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app2,k8s.namespace.name=nodejs-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + }, + }, + }, + }, + { + name: "nodejs injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "nodejs-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "nodejs-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_NODEJS_DEBUG", + Value: "true", + }, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectNodeJS: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, }, setFeatureGates: func(t *testing.T) { originalVal := featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() @@ -662,7 +1164,7 @@ func TestMutatePod(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "opentelemetry-auto-instrumentation", + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -672,12 +1174,12 @@ func TestMutatePod(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: pythonInitContainerName, Image: "otel/python:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }}, }, }, @@ -756,8 +1258,8 @@ func TestMutatePod(t *testing.T) { }, VolumeMounts: []corev1.VolumeMount{ { - Name: "opentelemetry-auto-instrumentation", - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }, }, }, @@ -766,16 +1268,16 @@ func TestMutatePod(t *testing.T) { }, }, { - name: "python injection feature gate disabled", + name: "python injection multiple containers, true", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "python-disabled", + Name: "python-multiple-containers", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "python-disabled", + Namespace: "python-multiple-containers", }, Spec: v1alpha1.InstrumentationSpec{ Python: v1alpha1.Python{ @@ -825,13 +1327,17 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectPython: "true", + annotationInjectPython: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app1", + }, + { + Name: "app2", }, }, }, @@ -839,157 +1345,142 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectPython: "true", + annotationInjectPython: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ - Containers: []corev1.Container{ + Volumes: []corev1.Volume{ { - Name: "app", - }, - }, - }, - }, - setFeatureGates: func(t *testing.T) { - originalVal := featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), false)) - t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), originalVal)) - }) - }, - }, - { - name: "dotnet injection, true", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "dotnet", - }, - }, - inst: v1alpha1.Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-inst", - Namespace: "dotnet", - }, - Spec: v1alpha1.InstrumentationSpec{ - DotNet: v1alpha1.DotNet{ - Image: "otel/dotnet:1", - Env: []corev1.EnvVar{ - { - Name: "OTEL_LOG_LEVEL", - Value: "debug", - }, - { - Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", - }, - }, - }, - Exporter: v1alpha1.Exporter{ - Endpoint: "http://collector:12345", - }, - Env: []corev1.EnvVar{ - { - Name: "OTEL_EXPORTER_OTLP_TIMEOUT", - Value: "20", - }, - { - Name: "OTEL_TRACES_SAMPLER", - Value: "parentbased_traceidratio", - }, - { - Name: "OTEL_TRACES_SAMPLER_ARG", - Value: "0.85", - }, - { - Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", - Value: "true", - }, - }, - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationInjectDotNet: "true", - annotationDotNetRuntime: dotNetRuntimeLinuxMusl, - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Name: "app", - }, - }, - }, - }, - expected: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationInjectDotNet: "true", - annotationDotNetRuntime: dotNetRuntimeLinuxMusl, - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "opentelemetry-auto-instrumentation", - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{ - SizeLimit: &defaultVolumeLimitSize, - }, - }, + Name: pythonVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, }, }, InitContainers: []corev1.Container{ { - Name: initContainerName, - Image: "otel/dotnet:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Name: pythonInitContainerName, + Image: "otel/python:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }}, }, }, Containers: []corev1.Container{ { - Name: "app", + Name: "app1", Env: []corev1.EnvVar{ { Name: "OTEL_LOG_LEVEL", Value: "debug", }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", + Value: "http://localhost:4318", }, { - Name: envDotNetCoreClrEnableProfiling, - Value: dotNetCoreClrEnableProfilingEnabled, + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), }, { - Name: envDotNetCoreClrProfiler, - Value: dotNetCoreClrProfilerID, + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", }, { - Name: envDotNetCoreClrProfilerPath, - Value: dotNetCoreClrProfilerMuslPath, + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, { - Name: envDotNetStartupHook, - Value: dotNetStartupHookPath, + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", }, { - Name: envDotNetAdditionalDeps, - Value: dotNetAdditionalDepsPath, + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", }, { - Name: envDotNetOTelAutoHome, - Value: dotNetOTelAutoHomePath, + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", }, { - Name: envDotNetSharedStore, - Value: dotNetSharedStorePath, + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app1", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app1,k8s.namespace.name=python-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }, + }, + }, + { + Name: "app2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4318", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", }, { Name: "OTEL_EXPORTER_OTLP_TIMEOUT", @@ -1009,7 +1500,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_SERVICE_NAME", - Value: "app", + Value: "app2", }, { Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", @@ -1029,13 +1520,13 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=dotnet,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app2,k8s.namespace.name=python-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, }, VolumeMounts: []corev1.VolumeMount{ { - Name: "opentelemetry-auto-instrumentation", - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }, }, }, @@ -1044,28 +1535,36 @@ func TestMutatePod(t *testing.T) { }, }, { - name: "dotnet injection feature gate disabled", + name: "python injection feature gate disabled", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "dotnet-disabled", + Name: "python-disabled", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "dotnet-disabled", + Namespace: "python-disabled", }, Spec: v1alpha1.InstrumentationSpec{ - DotNet: v1alpha1.DotNet{ - Image: "otel/dotnet:1", + Python: v1alpha1.Python{ + Image: "otel/python:1", Env: []corev1.EnvVar{ { Name: "OTEL_LOG_LEVEL", Value: "debug", }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, { Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", + Value: "http://localhost:4318", }, }, }, @@ -1095,7 +1594,7 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectDotNet: "true", + annotationInjectPython: "true", }, }, Spec: corev1.PodSpec{ @@ -1109,7 +1608,7 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectDotNet: "true", + annotationInjectPython: "true", }, }, Spec: corev1.PodSpec{ @@ -1121,28 +1620,28 @@ func TestMutatePod(t *testing.T) { }, }, setFeatureGates: func(t *testing.T) { - originalVal := featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), false)) + originalVal := featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), false)) t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), originalVal)) + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnablePythonAutoInstrumentationSupport.ID(), originalVal)) }) }, }, { - name: "go injection, true", + name: "dotnet injection, true", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "go", + Name: "dotnet", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "go", + Namespace: "dotnet", }, Spec: v1alpha1.InstrumentationSpec{ - Go: v1alpha1.Go{ - Image: "otel/go:1", + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", Env: []corev1.EnvVar{ { Name: "OTEL_LOG_LEVEL", @@ -1180,8 +1679,8 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectGo: "true", - annotationGoExecPath: "/app", + annotationInjectDotNet: "true", + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, }, }, Spec: corev1.PodSpec{ @@ -1195,37 +1694,36 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectGo: "true", - annotationGoExecPath: "/app", + annotationInjectDotNet: "true", + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, }, }, Spec: corev1.PodSpec{ - ShareProcessNamespace: &true, - Containers: []corev1.Container{ - { - Name: "app", - }, + Volumes: []corev1.Volume{ { - Name: sideCarName, - Image: "otel/go:1", - SecurityContext: &corev1.SecurityContext{ - RunAsUser: &zero, - Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - MountPath: "/sys/kernel/debug", - Name: kernelDebugVolumeName, + Name: dotnetVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, }, }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", Env: []corev1.EnvVar{ - { - Name: "OTEL_GO_AUTO_TARGET_EXE", - Value: "/app", - }, { Name: "OTEL_LOG_LEVEL", Value: "debug", @@ -1235,8 +1733,36 @@ func TestMutatePod(t *testing.T) { Value: "http://localhost:4317", }, { - Name: "OTEL_EXPORTER_OTLP_TIMEOUT", - Value: "20", + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerMuslPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", }, { Name: "OTEL_TRACES_SAMPLER", @@ -1272,46 +1798,35 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=go,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app,k8s.namespace.name=dotnet,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, }, - }, - }, - Volumes: []corev1.Volume{ - { - Name: kernelDebugVolumeName, - VolumeSource: corev1.VolumeSource{ - HostPath: &corev1.HostPathVolumeSource{ - Path: kernelDebugVolumePath, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }, }, }, }, }, }, - setFeatureGates: func(t *testing.T) { - originalVal := featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), true)) - t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal)) - }) - }, }, { - name: "go injection feature gate disabled", + name: "dotnet injection multiple containers, true", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "go-disabled", + Name: "dotnet-multiple-containers", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "go-disabled", + Namespace: "dotnet-multiple-containers", }, Spec: v1alpha1.InstrumentationSpec{ - Go: v1alpha1.Go{ - Image: "otel/go:1", + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", Env: []corev1.EnvVar{ { Name: "OTEL_LOG_LEVEL", @@ -1349,66 +1864,17 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectGo: "true", - annotationGoExecPath: "/app", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Name: "app", - }, - }, - }, - }, - expected: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationInjectGo: "true", - annotationGoExecPath: "/app", + annotationInjectDotNet: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "app1", }, - }, - }, - }, - }, - { - name: "apache httpd injection, true", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "apache-httpd", - }, - }, - inst: v1alpha1.Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-inst", - Namespace: "apache-httpd", - }, - Spec: v1alpha1.InstrumentationSpec{ - ApacheHttpd: v1alpha1.ApacheHttpd{ - Image: "otel/apache-httpd:1", - }, - Exporter: v1alpha1.Exporter{ - Endpoint: "http://collector:12345", - }, - Env: []corev1.EnvVar{}, - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationInjectApacheHttpd: "true", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ { - Name: "app", + Name: "app2", }, }, }, @@ -1416,21 +1882,14 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectApacheHttpd: "true", + annotationInjectDotNet: "true", + annotationInjectContainerName: "app1,app2", }, }, Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: "otel-apache-conf-dir", - VolumeSource: corev1.VolumeSource{ - EmptyDir: &corev1.EmptyDirVolumeSource{ - SizeLimit: &defaultVolumeLimitSize, - }, - }, - }, - { - Name: "otel-apache-agent", + Name: dotnetVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -1440,68 +1899,74 @@ func TestMutatePod(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: apacheAgentCloneContainerName, - Image: "", - Command: []string{"/bin/sh", "-c"}, - Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: apacheAgentConfigVolume, - MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }}, }, + }, + Containers: []corev1.Container{ { - Name: apacheAgentInitContainerName, - Image: "otel/apache-httpd:1", - Command: []string{"/bin/sh", "-c"}, - Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Name: "app1", Env: []corev1.EnvVar{ { - Name: apacheAttributesEnvVar, - Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://collector:12345\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace apache-httpd\nApacheModuleTraceAsError ON\n", + Name: "OTEL_LOG_LEVEL", + Value: "debug", }, { - Name: apacheServiceInstanceIdEnvVar, - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", }, - }, - VolumeMounts: []corev1.VolumeMount{ { - Name: apacheAgentVolume, - MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, }, { - Name: apacheAgentConfigVolume, - MountPath: apacheAgentConfDirFull, + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "app", - VolumeMounts: []corev1.VolumeMount{ { - Name: apacheAgentVolume, - MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, }, { - Name: apacheAgentConfigVolume, - MountPath: apacheDefaultConfigDirectory, + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, }, - }, - Env: []corev1.EnvVar{ { - Name: "OTEL_SERVICE_NAME", - Value: "app", + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, }, { - Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://collector:12345", + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app1", }, { Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", @@ -1521,76 +1986,2227 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=app,k8s.namespace.name=apache-httpd,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + Value: "k8s.container.name=app1,k8s.namespace.name=dotnet-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", }, }, - }, - }, - }, - }, - setFeatureGates: func(t *testing.T) { - originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true)) - t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) - }) - }, - }, - { - name: "apache httpd injection feature gate disabled", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "apache-httpd-disabled", - }, - }, - inst: v1alpha1.Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-inst", - Namespace: "apache-httpd-disabled", - }, - Spec: v1alpha1.InstrumentationSpec{ - ApacheHttpd: v1alpha1.ApacheHttpd{ - Image: "otel/apache-httpd:1", - Env: []corev1.EnvVar{ - { - Name: "OTEL_LOG_LEVEL", - Value: "debug", - }, - { - Name: "OTEL_EXPORTER_OTLP_ENDPOINT", - Value: "http://localhost:4317", + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, }, }, - }, - Exporter: v1alpha1.Exporter{ - Endpoint: "http://collector:12345", - }, - Env: []corev1.EnvVar{ - { - Name: "OTEL_EXPORTER_OTLP_TIMEOUT", - Value: "20", - }, - { - Name: "OTEL_TRACES_SAMPLER", - Value: "parentbased_traceidratio", - }, { - Name: "OTEL_TRACES_SAMPLER_ARG", - Value: "0.85", + Name: "app2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app2", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app2,k8s.namespace.name=dotnet-multiple-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + }, + }, + }, + }, + { + name: "dotnet injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "dotnet-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "dotnet-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "go injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "go", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "go", + }, + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + ShareProcessNamespace: &true, + Containers: []corev1.Container{ + { + Name: "app", + }, + { + Name: sideCarName, + Image: "otel/go:1", + SecurityContext: &corev1.SecurityContext{ + RunAsUser: &zero, + Privileged: &true, + Capabilities: &corev1.Capabilities{ + Add: []corev1.Capability{"SYS_PTRACE"}, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + MountPath: "/sys/kernel/debug", + Name: kernelDebugVolumeName, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_GO_AUTO_TARGET_EXE", + Value: "/app", + }, + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=go,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + Volumes: []corev1.Volume{ + { + Name: kernelDebugVolumeName, + VolumeSource: corev1.VolumeSource{ + HostPath: &corev1.HostPathVolumeSource{ + Path: kernelDebugVolumePath, + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() + mtVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal)) + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), mtVal)) + + }) + }, + }, + { + name: "go injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "go-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "go-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectGo: "true", + annotationGoExecPath: "/app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "apache httpd injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "apache-httpd", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "apache-httpd", + }, + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "otel/apache-httpd:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{}, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otel-apache-conf-dir", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: "otel-apache-agent", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: apacheAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /usr/local/apache2/conf/* " + apacheAgentDirectory + apacheAgentConfigDirectory}, + VolumeMounts: []corev1.VolumeMount{{ + Name: apacheAgentConfigVolume, + MountPath: apacheAgentDirectory + apacheAgentConfigDirectory, + }}, + }, + { + Name: apacheAgentInitContainerName, + Image: "otel/apache-httpd:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{ + "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + Env: []corev1.EnvVar{ + { + Name: apacheAttributesEnvVar, + Value: "\n#Load the Otel Webserver SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_common.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_resources.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_trace.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_otlp_recordable.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_ostream_span.so\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_exporter_otlp_grpc.so\n#Load the Otel ApacheModule SDK\nLoadFile /opt/opentelemetry-webserver/agent/sdk_lib/lib/libopentelemetry_webserver_sdk.so\n#Load the Apache Module. In this example for Apache 2.4\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Load the Apache Module. In this example for Apache 2.2\n#LoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel22.so\nLoadModule otel_apache_module /opt/opentelemetry-webserver/agent/WebServerModule/Apache/libmod_apache_otel.so\n#Attributes\nApacheModuleEnabled ON\nApacheModuleOtelExporterEndpoint http://collector:12345\nApacheModuleOtelSpanExporter otlp\nApacheModuleResolveBackends ON\nApacheModuleServiceInstanceId <>\nApacheModuleServiceName app\nApacheModuleServiceNamespace apache-httpd\nApacheModuleTraceAsError ON\n", + }, + { + Name: apacheServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: apacheAgentVolume, + MountPath: apacheAgentDirectory + apacheAgentSubDirectory, + }, + { + Name: apacheAgentConfigVolume, + MountPath: apacheDefaultConfigDirectory, + }, + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=apache-httpd,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "apache httpd injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "apache-httpd-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "apache-httpd-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "otel/apache-httpd:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectApacheHttpd: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "missing annotation", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "missing-annotation", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "missing-annotation", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.Java{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "annotation set to false", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "annotation-false", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "annotation-false", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.Java{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "false", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + }, + { + name: "annotation set to non existing instance", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "non-existing-instance", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "non-existing-instance", + }, + Spec: v1alpha1.InstrumentationSpec{ + Java: v1alpha1.Java{ + Image: "otel/java:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectJava: "doesnotexists", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + err: `instrumentations.opentelemetry.io "doesnotexists" not found`, + }, + { + name: "multi instrumentation for multiple containers feature gate enabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "multi-instrumentation-multi-containers", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "multi-instrumentation-multi-containers", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Java: v1alpha1.Java{ + Image: "otel/java:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: javaVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: nodejsVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: pythonVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: dotnetVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: javaInitContainerName, + Image: "otel/java:1", + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }}, + }, + { + Name: nodejsInitContainerName, + Image: "otel/nodejs:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }}, + }, + { + Name: pythonInitContainerName, + Image: "otel/python:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }}, + }, + { + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "dotnet1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "dotnet1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=dotnet1,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + { + Name: "dotnet2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "dotnet2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=dotnet2,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + { + Name: "java1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "java1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=java1,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + { + Name: "java2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "java2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=java2,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + { + Name: "nodejs1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "nodejs1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=nodejs1,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + { + Name: "nodejs2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "nodejs2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=nodejs2,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + { + Name: "python1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "python1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=python1,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }, + }, + }, + { + Name: "python2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "python2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=python2,k8s.namespace.name=multi-instrumentation-multi-containers,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "multi instrumentation for multiple containers feature gate enabled, container-names not used", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "multi-instrumentation-multi-containers-cn", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "multi-instrumentation-multi-containers-cn", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Java: v1alpha1.Java{ + Image: "otel/java:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + annotationInjectContainerName: "should-not-be-instrumented1,should-not-be-instrumented2", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + { + Name: "should-not-be-instrumented1", + }, + { + Name: "should-not-be-instrumented2", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + annotationInjectContainerName: "should-not-be-instrumented1,should-not-be-instrumented2", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: javaVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: nodejsVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: pythonVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + { + Name: dotnetVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: javaInitContainerName, + Image: "otel/java:1", + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }}, + }, + { + Name: nodejsInitContainerName, + Image: "otel/nodejs:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }}, + }, + { + Name: pythonInitContainerName, + Image: "otel/python:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }}, + }, + { + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "dotnet1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "dotnet1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=dotnet1,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + { + Name: "dotnet2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "dotnet2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=dotnet2,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + { + Name: "java1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "java1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=java1,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + { + Name: "java2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "JAVA_TOOL_OPTIONS", + Value: javaJVMArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "java2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=java2,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: javaVolumeName, + MountPath: javaInstrMountPath, + }, + }, + }, + { + Name: "nodejs1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "nodejs1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=nodejs1,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + { + Name: "nodejs2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "NODE_OPTIONS", + Value: nodeRequireArgument, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "nodejs2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=nodejs2,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, + }, + }, + }, + { + Name: "python1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "python1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=python1,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }, + }, + }, + { + Name: "python2", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "PYTHONPATH", + Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + }, + { + Name: "OTEL_TRACES_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_METRICS_EXPORTER", + Value: "otlp", + }, + { + Name: "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL", + Value: "http/protobuf", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "python2", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=python2,k8s.namespace.name=multi-instrumentation-multi-containers-cn,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, + }, + }, + }, + { + Name: "should-not-be-instrumented1", }, + { + Name: "should-not-be-instrumented2", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "multi instrumentation for multiple containers feature gate disabled, multiple instrumentation annotations set", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "multi-instrumentation-multi-containers-dis-cn", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "multi-instrumentation-multi-containers-dis-cn", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Java: v1alpha1.Java{ + Image: "otel/java:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", }, }, }, pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectApacheHttpd: "true", + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + annotationInjectContainerName: "should-not-be-instrumented1,should-not-be-instrumented2", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + { + Name: "should-not-be-instrumented1", + }, + { + Name: "should-not-be-instrumented2", }, }, }, @@ -1598,40 +4214,258 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectApacheHttpd: "true", + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + annotationInjectDotnetContainersName: "dotnet1,dotnet2", + annotationInjectJavaContainersName: "java1,java2", + annotationInjectNodeJSContainersName: "nodejs1,nodejs2", + annotationInjectPythonContainersName: "python1,python2", + annotationInjectContainerName: "should-not-be-instrumented1,should-not-be-instrumented2", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + { + Name: "should-not-be-instrumented1", + }, + { + Name: "should-not-be-instrumented2", }, }, }, }, setFeatureGates: func(t *testing.T) { - originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), false)) + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), false)) t.Cleanup(func() { - require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) }) }, }, { - name: "missing annotation", + name: "multi instrumentation feature gate enabled, multiple instrumentation annotations set, no containers", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "missing-annotation", + Name: "multi-instrumentation-multi-containers-no-cont", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "missing-annotation", + Namespace: "multi-instrumentation-multi-containers-no-cont", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Java: v1alpha1.Java{ + Image: "otel/java:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + { + Name: "should-not-be-instrumented1", + }, + { + Name: "should-not-be-instrumented2", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + annotationInjectJava: "true", + annotationInjectNodeJS: "true", + annotationInjectPython: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "dotnet1", + }, + { + Name: "dotnet2", + }, + { + Name: "java1", + }, + { + Name: "java2", + }, + { + Name: "nodejs1", + }, + { + Name: "nodejs2", + }, + { + Name: "python1", + }, + { + Name: "python2", + }, + { + Name: "should-not-be-instrumented1", + }, + { + Name: "should-not-be-instrumented2", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "multi instrumentation feature gate enabled, single instrumentation annotation set, no containers", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "multi-instrumentation-single-container-no-cont", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "multi-instrumentation-single-container-no-cont", }, Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, Java: v1alpha1.Java{ Image: "otel/java:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + Python: v1alpha1.Python{ + Image: "otel/python:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", @@ -1639,39 +4473,166 @@ func TestMutatePod(t *testing.T) { }, }, pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + }, + { + Name: "should-not-be-instrumented1", }, }, }, }, expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + annotationInjectDotNet: "true", + }, + }, Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: dotnetVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }}, + }, + }, Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerGlibcPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "dotnet1", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://collector:12345", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=dotnet1,k8s.namespace.name=multi-instrumentation-single-container-no-cont,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + { + Name: "should-not-be-instrumented1", }, }, }, }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalVal)) + }) + }, }, { - name: "annotation set to false", + name: "multi instrumentation feature gate disabled, instrumentation feature gate disabled and annotation set, multiple specific containers set", ns: corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ - Name: "annotation-false", + Name: "multi-instrumentation-single-container-spec-cont", }, }, inst: v1alpha1.Instrumentation{ ObjectMeta: metav1.ObjectMeta{ Name: "example-inst", - Namespace: "annotation-false", + Namespace: "multi-instrumentation-single-container-spec-cont", }, Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.Java{ - Image: "otel/java:1", + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, + }, + NodeJS: v1alpha1.NodeJS{ + Image: "otel/nodejs:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + }, }, Exporter: v1alpha1.Exporter{ Endpoint: "http://collector:12345", @@ -1681,13 +4642,30 @@ func TestMutatePod(t *testing.T) { pod: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectJava: "false", + annotationInjectDotNet: "true", + annotationInjectDotnetContainersName: "dotnet1", + annotationInjectNodeJSContainersName: "should-not-be-instrumented1", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + Env: []corev1.EnvVar{ + { + Name: "TEST", + Value: "debug", + }, + }, + }, + { + Name: "should-not-be-instrumented1", + Env: []corev1.EnvVar{ + { + Name: "TEST", + Value: "debug", + }, + }, }, }, }, @@ -1695,54 +4673,44 @@ func TestMutatePod(t *testing.T) { expected: corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - annotationInjectJava: "false", + annotationInjectDotNet: "true", + annotationInjectDotnetContainersName: "dotnet1", + annotationInjectNodeJSContainersName: "should-not-be-instrumented1", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: "app", + Name: "dotnet1", + Env: []corev1.EnvVar{ + { + Name: "TEST", + Value: "debug", + }, + }, }, - }, - }, - }, - }, - { - name: "annotation set to non existing instance", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "non-existing-instance", - }, - }, - inst: v1alpha1.Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Name: "example-inst", - Namespace: "non-existing-instance", - }, - Spec: v1alpha1.InstrumentationSpec{ - Java: v1alpha1.Java{ - Image: "otel/java:1", - }, - Exporter: v1alpha1.Exporter{ - Endpoint: "http://collector:12345", - }, - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationInjectJava: "doesnotexists", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ { - Name: "app", + Name: "should-not-be-instrumented1", + Env: []corev1.EnvVar{ + { + Name: "TEST", + Value: "debug", + }, + }, }, }, }, }, - err: `instrumentations.opentelemetry.io "doesnotexists" not found`, + setFeatureGates: func(t *testing.T) { + originalValMultiInstr := featuregate.EnableMultiInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), true)) + originalValDotNetInstr := featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableMultiInstrumentationSupport.ID(), originalValMultiInstr)) + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableDotnetAutoInstrumentationSupport.ID(), originalValDotNetInstr)) + }) + }, }, } @@ -1770,3 +4738,162 @@ func TestMutatePod(t *testing.T) { }) } } + +func TestSingleInstrumentationEnabled(t *testing.T) { + tests := []struct { + name string + instrumentations languageInstrumentations + expectedStatus bool + expectedMsg string + }{ + { + name: "Single instrumentation enabled", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + }, + expectedStatus: true, + expectedMsg: "Java", + }, + { + name: "Multiple instrumentations enabled", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + }, + expectedStatus: false, + expectedMsg: "", + }, + { + name: "Instrumentations disabled", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: nil}, + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + }, + expectedStatus: false, + expectedMsg: "", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ok := test.instrumentations.isSingleInstrumentationEnabled() + assert.Equal(t, test.expectedStatus, ok) + }) + } +} + +func TestContainerNamesConfiguredForMultipleInstrumentations(t *testing.T) { + tests := []struct { + name string + instrumentations languageInstrumentations + expectedStatus bool + expectedMsg error + }{ + { + name: "Single instrumentation enabled without containers", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + }, + expectedStatus: true, + expectedMsg: nil, + }, + { + name: "Multiple instrumentations enabled with containers", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "java"}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "nodejs"}, + }, + expectedStatus: true, + expectedMsg: nil, + }, + { + name: "Multiple instrumentations enabled without containers", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + }, + expectedStatus: false, + expectedMsg: fmt.Errorf("incorrect instrumentation configuration - please provide container names for all instrumentations"), + }, + { + name: "Multiple instrumentations enabled with containers for single instrumentation", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "test"}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + }, + expectedStatus: false, + expectedMsg: fmt.Errorf("incorrect instrumentation configuration - please provide container names for all instrumentations"), + }, + { + name: "Disabled instrumentations", + instrumentations: languageInstrumentations{ + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + }, + expectedStatus: false, + expectedMsg: fmt.Errorf("instrumentation configuration not provided"), + }, + { + name: "Multiple instrumentations enabled with duplicated containers", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "app,app1,java"}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "app1,app,nodejs"}, + }, + expectedStatus: false, + expectedMsg: fmt.Errorf("duplicated container names detected: [app app1]"), + }, + { + name: "Multiple instrumentations enabled with duplicated containers for single instrumentation", + instrumentations: languageInstrumentations{ + Java: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "app,app,java"}, + NodeJS: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "nodejs"}, + }, + expectedStatus: false, + expectedMsg: fmt.Errorf("duplicated container names detected: [app]"), + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ok, msg := test.instrumentations.areContainerNamesConfiguredForMultipleInstrumentations() + assert.Equal(t, test.expectedStatus, ok) + assert.Equal(t, test.expectedMsg, msg) + }) + } +} + +func TestInstrumentationLanguageContainersSet(t *testing.T) { + tests := []struct { + name string + instrumentations languageInstrumentations + containers string + expectedInstrumentations languageInstrumentations + }{ + { + name: "Set containers for enabled instrumentation", + instrumentations: languageInstrumentations{ + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + Python: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}}, + }, + containers: "python,python1", + expectedInstrumentations: languageInstrumentations{ + NodeJS: instrumentationWithContainers{Instrumentation: nil}, + Python: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{}, Containers: "python,python1"}, + }, + }, + { + name: "Set containers when all instrumentations disabled", + instrumentations: languageInstrumentations{}, + containers: "python,python1", + expectedInstrumentations: languageInstrumentations{}, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + test.instrumentations.setInstrumentationLanguageContainers(test.containers) + assert.Equal(t, test.expectedInstrumentations, test.instrumentations) + }) + } +} diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 8964d5f8f..0be23ee41 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -28,8 +28,11 @@ const ( envOtelMetricsExporter = "OTEL_METRICS_EXPORTER" envOtelExporterOTLPTracesProtocol = "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL" envOtelExporterOTLPMetricsProtocol = "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL" - pythonPathPrefix = "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation" - pythonPathSuffix = "/otel-auto-instrumentation" + pythonPathPrefix = "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation" + pythonPathSuffix = "/otel-auto-instrumentation-python" + pythonInstrMountPath = "/otel-auto-instrumentation-python" + pythonVolumeName = volumeName + "-python" + pythonInitContainerName = initContainerName + "-python" ) func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (corev1.Pod, error) { @@ -96,14 +99,14 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor } container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }) // We just inject Volumes and init containers for the first processed container. - if isInitContainerMissing(pod) { + if isInitContainerMissing(pod, pythonInitContainerName) { pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ - Name: volumeName, + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: volumeSize(pythonSpec.VolumeSizeLimit), @@ -111,13 +114,13 @@ func injectPythonSDK(pythonSpec v1alpha1.Python, pod corev1.Pod, index int) (cor }}) pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ - Name: initContainerName, + Name: pythonInitContainerName, Image: pythonSpec.Image, - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, Resources: pythonSpec.Resources, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }}, }) } diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 3f383ef7a..7f7510c71 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -46,7 +46,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -56,12 +56,12 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-python", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }}, }, }, @@ -69,14 +69,14 @@ func TestInjectPythonSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }, }, Env: []corev1.EnvVar{ { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), }, { Name: "OTEL_TRACES_EXPORTER", @@ -122,7 +122,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-python", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -132,12 +132,12 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-python", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }}, Resources: testResourceRequirements, }, @@ -146,14 +146,14 @@ func TestInjectPythonSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }, }, Env: []corev1.EnvVar{ { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s:%s", pythonPathPrefix, "/foo:/bar", pythonPathSuffix), + Value: fmt.Sprintf("%s:%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/foo:/bar", "/otel-auto-instrumentation-python"), }, { Name: "OTEL_TRACES_EXPORTER", @@ -199,7 +199,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -209,12 +209,12 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-python", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }}, }, }, @@ -222,8 +222,8 @@ func TestInjectPythonSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }, }, Env: []corev1.EnvVar{ @@ -233,7 +233,7 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), }, { Name: "OTEL_EXPORTER_OTLP_TRACES_PROTOCOL", @@ -275,7 +275,7 @@ func TestInjectPythonSDK(t *testing.T) { Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: "opentelemetry-auto-instrumentation-python", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -285,12 +285,12 @@ func TestInjectPythonSDK(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: "opentelemetry-auto-instrumentation-python", Image: "foo/bar:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation-python"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }}, }, }, @@ -298,8 +298,8 @@ func TestInjectPythonSDK(t *testing.T) { { VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: "opentelemetry-auto-instrumentation-python", + MountPath: "/otel-auto-instrumentation-python", }, }, Env: []corev1.EnvVar{ @@ -309,7 +309,7 @@ func TestInjectPythonSDK(t *testing.T) { }, { Name: "PYTHONPATH", - Value: fmt.Sprintf("%s:%s", pythonPathPrefix, pythonPathSuffix), + Value: fmt.Sprintf("%s:%s", "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation", "/otel-auto-instrumentation-python"), }, { Name: "OTEL_TRACES_EXPORTER", diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 3b02720da..330f6456b 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -51,73 +51,97 @@ type sdkInjector struct { logger logr.Logger } -func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod, containerName string) corev1.Pod { +func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations, ns corev1.Namespace, pod corev1.Pod) corev1.Pod { if len(pod.Spec.Containers) < 1 { return pod } - // We search for specific container to inject variables and if no one is found - // We fallback to first container - var index = 0 - for idx, ctnair := range pod.Spec.Containers { - if ctnair.Name == containerName { - index = idx - } - } - - if insts.Java != nil { - otelinst := *insts.Java + if insts.Java.Instrumentation != nil { + otelinst := *insts.Java.Instrumentation var err error i.logger.V(1).Info("injecting Java instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod, err = injectJavaagent(otelinst.Spec.Java, pod, index) - if err != nil { - i.logger.Info("Skipping javaagent injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) - } else { - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + + javaContainers := insts.Java.Containers + + for _, container := range strings.Split(javaContainers, ",") { + index := getContainerIndex(container, pod) + pod, err = injectJavaagent(otelinst.Spec.Java, pod, index) + if err != nil { + i.logger.Info("Skipping javaagent injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, javaInitContainerName) + } } } - if insts.NodeJS != nil { - otelinst := *insts.NodeJS + if insts.NodeJS.Instrumentation != nil { + otelinst := *insts.NodeJS.Instrumentation var err error i.logger.V(1).Info("injecting NodeJS instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod, err = injectNodeJSSDK(otelinst.Spec.NodeJS, pod, index) - if err != nil { - i.logger.Info("Skipping NodeJS SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) - } else { - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + + nodejsContainers := insts.NodeJS.Containers + + for _, container := range strings.Split(nodejsContainers, ",") { + index := getContainerIndex(container, pod) + pod, err = injectNodeJSSDK(otelinst.Spec.NodeJS, pod, index) + if err != nil { + i.logger.Info("Skipping NodeJS SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, nodejsInitContainerName) + } } } - if insts.Python != nil { - otelinst := *insts.Python + if insts.Python.Instrumentation != nil { + otelinst := *insts.Python.Instrumentation var err error i.logger.V(1).Info("injecting Python instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod, err = injectPythonSDK(otelinst.Spec.Python, pod, index) - if err != nil { - i.logger.Info("Skipping Python SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) - } else { - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + + pythonContainers := insts.Python.Containers + + for _, container := range strings.Split(pythonContainers, ",") { + index := getContainerIndex(container, pod) + pod, err = injectPythonSDK(otelinst.Spec.Python, pod, index) + if err != nil { + i.logger.Info("Skipping Python SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, pythonInitContainerName) + } } } - if insts.DotNet != nil { - otelinst := *insts.DotNet + if insts.DotNet.Instrumentation != nil { + otelinst := *insts.DotNet.Instrumentation var err error i.logger.V(1).Info("injecting DotNet instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod, err = injectDotNetSDK(otelinst.Spec.DotNet, pod, index) - if err != nil { - i.logger.Info("Skipping DotNet SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) - } else { - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + + dotnetContainers := insts.DotNet.Containers + + for _, container := range strings.Split(dotnetContainers, ",") { + index := getContainerIndex(container, pod) + pod, err = injectDotNetSDK(otelinst.Spec.DotNet, pod, index) + if err != nil { + i.logger.Info("Skipping DotNet SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) + } else { + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, dotnetInitContainerName) + } } } - if insts.Go != nil { + if insts.Go.Instrumentation != nil { origPod := pod - otelinst := *insts.Go + otelinst := *insts.Go.Instrumentation var err error i.logger.V(1).Info("injecting Go instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + + goContainers := insts.Go.Containers + + // Go instrumentation supports only single container instrumentation. + index := getContainerIndex(goContainers, pod) pod, err = injectGoSDK(otelinst.Spec.Go, pod) if err != nil { i.logger.Info("Skipping Go SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) @@ -134,30 +158,40 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations } } } - if insts.ApacheHttpd != nil { - otelinst := *insts.ApacheHttpd + if insts.ApacheHttpd.Instrumentation != nil { + otelinst := *insts.ApacheHttpd.Instrumentation i.logger.V(1).Info("injecting Apache Httpd instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - // Apache agent is configured via config files rather than env vars. - // Therefore, service name, otlp endpoint and other attributes are passed to the agent injection method - pod = injectApacheHttpdagent(i.logger, otelinst.Spec.ApacheHttpd, pod, index, otelinst.Spec.Endpoint, i.createResourceMap(ctx, otelinst, ns, pod, index)) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) - } - if insts.Sdk != nil { - otelinst := *insts.Sdk - i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = i.injectCommonEnvVar(otelinst, pod, index) - pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + + apacheHttpdContainers := insts.ApacheHttpd.Containers + + for _, container := range strings.Split(apacheHttpdContainers, ",") { + index := getContainerIndex(container, pod) + // Apache agent is configured via config files rather than env vars. + // Therefore, service name, otlp endpoint and other attributes are passed to the agent injection method + pod = injectApacheHttpdagent(i.logger, otelinst.Spec.ApacheHttpd, pod, index, otelinst.Spec.Endpoint, i.createResourceMap(ctx, otelinst, ns, pod, index)) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + } } + if insts.Sdk.Instrumentation != nil { + otelinst := *insts.Sdk.Instrumentation + i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) - pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext) + sdkContainers := insts.Sdk.Containers + + for _, container := range strings.Split(sdkContainers, ",") { + index := getContainerIndex(container, pod) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + } + } return pod } -func (i *sdkInjector) setInitContainerSecurityContext(pod corev1.Pod, securityContext *corev1.SecurityContext) corev1.Pod { +func (i *sdkInjector) setInitContainerSecurityContext(pod corev1.Pod, securityContext *corev1.SecurityContext, instrInitContainerName string) corev1.Pod { for i, initContainer := range pod.Spec.InitContainers { - if initContainer.Name == initContainerName { + if initContainer.Name == instrInitContainerName { pod.Spec.InitContainers[i].SecurityContext = securityContext } } @@ -165,6 +199,19 @@ func (i *sdkInjector) setInitContainerSecurityContext(pod corev1.Pod, securityCo return pod } +func getContainerIndex(containerName string, pod corev1.Pod) int { + // We search for specific container to inject variables and if no one is found + // We fallback to first container + var index = 0 + for idx, ctnair := range pod.Spec.Containers { + if ctnair.Name == containerName { + index = idx + } + } + + return index +} + func (i *sdkInjector) injectCommonEnvVar(otelinst v1alpha1.Instrumentation, pod corev1.Pod, index int) corev1.Pod { container := &pod.Spec.Containers[index] for _, env := range otelinst.Spec.Env { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 0a1fbcb2c..e16decacd 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -501,7 +501,7 @@ func TestInjectJava(t *testing.T) { }, } insts := languageInstrumentations{ - Java: &inst, + Java: instrumentationWithContainers{Instrumentation: &inst, Containers: ""}, } inj := sdkInjector{ logger: logr.Discard(), @@ -517,12 +517,12 @@ func TestInjectJava(t *testing.T) { }, }, }, - }, "") + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: javaVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -532,12 +532,12 @@ func TestInjectJava(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: javaInitContainerName, Image: "img:1", - Command: []string{"cp", "/javaagent.jar", "/otel-auto-instrumentation/javaagent.jar"}, + Command: []string{"cp", "/javaagent.jar", javaInstrMountPath + "/javaagent.jar"}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, }}, Resources: testResourceRequirements, }, @@ -548,8 +548,8 @@ func TestInjectJava(t *testing.T) { Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: javaVolumeName, + MountPath: javaInstrMountPath, }, }, Env: []corev1.EnvVar{ @@ -605,7 +605,7 @@ func TestInjectNodeJS(t *testing.T) { }, } insts := languageInstrumentations{ - NodeJS: &inst, + NodeJS: instrumentationWithContainers{Instrumentation: &inst, Containers: ""}, } inj := sdkInjector{ logger: logr.Discard(), @@ -621,12 +621,12 @@ func TestInjectNodeJS(t *testing.T) { }, }, }, - }, "") + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: nodejsVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -636,12 +636,12 @@ func TestInjectNodeJS(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: nodejsInitContainerName, Image: "img:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", nodejsInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }}, Resources: testResourceRequirements, }, @@ -652,8 +652,8 @@ func TestInjectNodeJS(t *testing.T) { Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: nodejsVolumeName, + MountPath: nodejsInstrMountPath, }, }, Env: []corev1.EnvVar{ @@ -708,7 +708,7 @@ func TestInjectPython(t *testing.T) { }, } insts := languageInstrumentations{ - Python: &inst, + Python: instrumentationWithContainers{Instrumentation: &inst, Containers: ""}, } inj := sdkInjector{ @@ -725,12 +725,12 @@ func TestInjectPython(t *testing.T) { }, }, }, - }, "") + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: pythonVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -740,12 +740,12 @@ func TestInjectPython(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: pythonInitContainerName, Image: "img:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", pythonInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }}, }, }, @@ -755,8 +755,8 @@ func TestInjectPython(t *testing.T) { Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: pythonVolumeName, + MountPath: pythonInstrMountPath, }, }, Env: []corev1.EnvVar{ @@ -827,7 +827,7 @@ func TestInjectDotNet(t *testing.T) { }, } insts := languageInstrumentations{ - DotNet: &inst, + DotNet: instrumentationWithContainers{Instrumentation: &inst, Containers: ""}, } inj := sdkInjector{ logger: logr.Discard(), @@ -843,12 +843,12 @@ func TestInjectDotNet(t *testing.T) { }, }, }, - }, "") + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { - Name: volumeName, + Name: dotnetVolumeName, VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{ SizeLimit: &defaultVolumeLimitSize, @@ -858,12 +858,12 @@ func TestInjectDotNet(t *testing.T) { }, InitContainers: []corev1.Container{ { - Name: initContainerName, + Name: dotnetInitContainerName, Image: "img:1", - Command: []string{"cp", "-a", "/autoinstrumentation/.", "/otel-auto-instrumentation/"}, + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, VolumeMounts: []corev1.VolumeMount{{ - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }}, }, }, @@ -873,8 +873,8 @@ func TestInjectDotNet(t *testing.T) { Image: "app:latest", VolumeMounts: []corev1.VolumeMount{ { - Name: volumeName, - MountPath: "/otel-auto-instrumentation", + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, }, }, Env: []corev1.EnvVar{ @@ -955,13 +955,14 @@ func TestInjectGo(t *testing.T) { { name: "shared process namespace disabled", insts: languageInstrumentations{ - Go: &v1alpha1.Instrumentation{ + Go: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Go: v1alpha1.Go{ Image: "otel/go:1", }, }, }, + }, }, pod: corev1.Pod{ Spec: corev1.PodSpec{ @@ -987,13 +988,14 @@ func TestInjectGo(t *testing.T) { { name: "OTEL_GO_AUTO_TARGET_EXE not set", insts: languageInstrumentations{ - Go: &v1alpha1.Instrumentation{ + Go: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Go: v1alpha1.Go{ Image: "otel/go:1", }, }, }, + }, }, pod: corev1.Pod{ Spec: corev1.PodSpec{ @@ -1017,7 +1019,7 @@ func TestInjectGo(t *testing.T) { { name: "OTEL_GO_AUTO_TARGET_EXE set by inst", insts: languageInstrumentations{ - Go: &v1alpha1.Instrumentation{ + Go: instrumentationWithContainers{Instrumentation: &v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ Go: v1alpha1.Go{ Image: "otel/go:1", @@ -1030,6 +1032,7 @@ func TestInjectGo(t *testing.T) { }, }, }, + }, }, pod: corev1.Pod{ Spec: corev1.PodSpec{ @@ -1114,10 +1117,13 @@ func TestInjectGo(t *testing.T) { { name: "OTEL_GO_AUTO_TARGET_EXE set by annotation", insts: languageInstrumentations{ - Go: &v1alpha1.Instrumentation{ - Spec: v1alpha1.InstrumentationSpec{ - Go: v1alpha1.Go{ - Image: "otel/go:1", + Go: instrumentationWithContainers{ + Containers: "", + Instrumentation: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Go: v1alpha1.Go{ + Image: "otel/go:1", + }, }, }, }, @@ -1219,7 +1225,7 @@ func TestInjectGo(t *testing.T) { inj := sdkInjector{ logger: logr.Discard(), } - pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod, "") + pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod) assert.Equal(t, test.expected, pod) }) } @@ -1236,15 +1242,18 @@ func TestInjectApacheHttpd(t *testing.T) { { name: "injection enabled, exporter set", insts: languageInstrumentations{ - ApacheHttpd: &v1alpha1.Instrumentation{ - Spec: v1alpha1.InstrumentationSpec{ - ApacheHttpd: v1alpha1.ApacheHttpd{ - Image: "img:1", - }, - Exporter: v1alpha1.Exporter{ - Endpoint: "https://collector:4318", + ApacheHttpd: instrumentationWithContainers{ + Instrumentation: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + ApacheHttpd: v1alpha1.ApacheHttpd{ + Image: "img:1", + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "https://collector:4318", + }, }, }, + Containers: "", }, }, pod: corev1.Pod{ @@ -1372,7 +1381,8 @@ func TestInjectApacheHttpd(t *testing.T) { inj := sdkInjector{ logger: logr.Discard(), } - pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod, "") + + pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod) assert.Equal(t, test.expected, pod) }) } @@ -1387,7 +1397,7 @@ func TestInjectSdkOnly(t *testing.T) { }, } insts := languageInstrumentations{ - Sdk: &inst, + Sdk: instrumentationWithContainers{Instrumentation: &inst, Containers: ""}, } inj := sdkInjector{ @@ -1404,7 +1414,7 @@ func TestInjectSdkOnly(t *testing.T) { }, }, }, - }, "") + }) assert.Equal(t, corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml index 8966767e9..c3083f377 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -18,15 +18,15 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation-dotnet/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation + value: /otel-auto-instrumentation-dotnet - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation/store + value: /otel-auto-instrumentation-dotnet/store - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -48,8 +48,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet - name: myrabbit env: - name: OTEL_LOG_LEVEL @@ -59,15 +59,15 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation-dotnet/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation + value: /otel-auto-instrumentation-dotnet - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation/store + value: /otel-auto-instrumentation-dotnet/store - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -89,8 +89,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml index b162061c6..4cd732090 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -21,15 +21,15 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation-dotnet/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation + value: /otel-auto-instrumentation-dotnet - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation/store + value: /otel-auto-instrumentation-dotnet/store - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -51,8 +51,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml index e3b160a27..40fedff84 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml @@ -16,15 +16,15 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation-dotnet/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation-dotnet/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation + value: /otel-auto-instrumentation-dotnet - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation/store + value: /otel-auto-instrumentation-dotnet/store - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -46,11 +46,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-dotnet securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml index ef15d8693..68178cc2d 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml @@ -15,15 +15,15 @@ spec: - name: CORECLR_PROFILER value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so + value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation/AdditionalDeps + value: /otel-auto-instrumentation-dotnet/AdditionalDeps - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation + value: /otel-auto-instrumentation-dotnet - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation/store + value: /otel-auto-instrumentation-dotnet/store - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -45,11 +45,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-dotnet securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml index 5e4f02fcc..bb15aa269 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml @@ -18,7 +18,7 @@ spec: - name: SPLUNK_PROFILER_ENABLED value: "false" - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -40,8 +40,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java - name: myrabbit env: - name: OTEL_JAVAAGENT_DEBUG @@ -51,7 +51,7 @@ spec: - name: SPLUNK_PROFILER_ENABLED value: "false" - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -73,8 +73,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml index 0df16471a..f93b4e752 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml @@ -21,7 +21,7 @@ spec: - name: SPLUNK_PROFILER_ENABLED value: "false" - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -43,8 +43,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml index d7fd949a3..99252fdf9 100644 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml @@ -17,7 +17,7 @@ spec: - name: SPLUNK_PROFILER_ENABLED value: "false" - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -39,11 +39,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-java securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml index 2094e9fff..5dec65bab 100644 --- a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml @@ -17,7 +17,7 @@ spec: - name: SPLUNK_PROFILER_ENABLED value: "false" - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation/javaagent.jar" + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -39,11 +39,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-java securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml index 17f8bd73a..ff68ac36c 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml @@ -12,7 +12,7 @@ spec: - name: myapp env: - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -34,12 +34,12 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs - name: myrabbit env: - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -61,8 +61,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml index d9688c06e..5b60ac8f1 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml @@ -15,7 +15,7 @@ spec: - name: myrabbit env: - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation/autoinstrumentation.js' + value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -37,8 +37,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml index ef7e7c349..fa71d4a6e 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml @@ -13,7 +13,7 @@ spec: - name: OTEL_NODEJS_DEBUG value: "true" - name: NODE_OPTIONS - value: " --require /otel-auto-instrumentation/autoinstrumentation.js" + value: " --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js" - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT @@ -37,11 +37,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-nodejs securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml index 280312a89..99ccda9a6 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml @@ -12,7 +12,7 @@ spec: - name: myapp env: - name: PYTHONPATH - value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL @@ -40,12 +40,12 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-python + name: opentelemetry-auto-instrumentation-python - name: myrabbit env: - name: PYTHONPATH - value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL @@ -73,8 +73,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-python + name: opentelemetry-auto-instrumentation-python - name: otc-container status: phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml index 24e3f7d1e..f5c319107 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml @@ -15,7 +15,7 @@ spec: - name: myrabbit env: - name: PYTHONPATH - value: /otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation + value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - name: OTEL_TRACES_EXPORTER value: otlp - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL @@ -43,8 +43,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-python + name: opentelemetry-auto-instrumentation-python - name: otc-container status: phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml index 1483b3c18..b2d8d02aa 100644 --- a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml @@ -17,7 +17,7 @@ spec: - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://localhost:4318 - name: PYTHONPATH - value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation" + value: "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python" - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL value: http/protobuf - name: OTEL_METRICS_EXPORTER @@ -41,11 +41,11 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES volumeMounts: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation - name: opentelemetry-auto-instrumentation + - mountPath: /otel-auto-instrumentation-python + name: opentelemetry-auto-instrumentation-python - name: otc-container initContainers: - - name: opentelemetry-auto-instrumentation + - name: opentelemetry-auto-instrumentation-python securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..3bf65bfff --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,40 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: multi +spec: + env: + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_SERVICE_NAME + value: "javaapp" + python: + env: + - name: OTEL_SERVICE_NAME + value: "pythonapp" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318 + nodejs: + env: + - name: OTEL_SERVICE_NAME + value: "nodejsapp" + dotnet: + env: + - name: OTEL_SERVICE_NAME + value: "dotnetapp" + go: + env: + - name: OTEL_SERVICE_NAME + value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml new file mode 100644 index 000000000..136b7abaf --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml @@ -0,0 +1,129 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/container-names: "shouldnt-be-instrumented" + instrumentation.opentelemetry.io/dotnet-container-names: "dotnetapp" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/java-container-names: "javaapp" + instrumentation.opentelemetry.io/nodejs-container-names: "nodejsapp" + instrumentation.opentelemetry.io/python-container-names: "pythonapp" + sidecar.opentelemetry.io/inject: "true" + labels: + app: pod-with-multi-instrumentation +spec: + containers: + - name: dotnetapp + env: + - name: OTEL_SERVICE_NAME + value: dotnetapp + - name: CORECLR_ENABLE_PROFILING + value: "1" + - name: CORECLR_PROFILER + value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" + - name: CORECLR_PROFILER_PATH + value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so + - name: DOTNET_STARTUP_HOOKS + value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll + - name: DOTNET_ADDITIONAL_DEPS + value: /otel-auto-instrumentation-dotnet/AdditionalDeps + - name: OTEL_DOTNET_AUTO_HOME + value: /otel-auto-instrumentation-dotnet + - name: DOTNET_SHARED_STORE + value: /otel-auto-instrumentation-dotnet/store + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation-dotnet + name: opentelemetry-auto-instrumentation-dotnet + - name: javaapp + env: + - name: OTEL_SERVICE_NAME + value: javaapp + - name: JAVA_TOOL_OPTIONS + value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation-java + name: opentelemetry-auto-instrumentation-java + - name: nodejsapp + env: + - name: OTEL_SERVICE_NAME + value: nodejsapp + - name: NODE_OPTIONS + value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs + - name: pythonapp + env: + - name: OTEL_SERVICE_NAME + value: pythonapp + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318 + - name: PYTHONPATH + value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python + - name: OTEL_TRACES_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL + value: http/protobuf + - name: OTEL_METRICS_EXPORTER + value: otlp + - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL + value: http/protobuf + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation-python + name: opentelemetry-auto-instrumentation-python + - name: shouldnt-be-instrumented + env: + - name: TEST + value: test + - name: otc-container +status: + phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..eb86ee6e1 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: deployment-with-multi-instrumentation +spec: + selector: + matchLabels: + app: pod-with-multi-instrumentation + replicas: 1 + template: + metadata: + labels: + app: pod-with-multi-instrumentation + annotations: + instrumentation.opentelemetry.io/container-names: "shouldnt-be-instrumented" + instrumentation.opentelemetry.io/dotnet-container-names: "dotnetapp" + instrumentation.opentelemetry.io/inject-dotnet: "true" + instrumentation.opentelemetry.io/inject-java: "true" + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/inject-python: "true" + instrumentation.opentelemetry.io/java-container-names: "javaapp" + instrumentation.opentelemetry.io/nodejs-container-names: "nodejsapp" + instrumentation.opentelemetry.io/python-container-names: "pythonapp" + sidecar.opentelemetry.io/inject: "true" + spec: + containers: + - name: dotnetapp + # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da + - name: javaapp + image: ghcr.io/pavolloffay/spring-petclinic:latest + - name: nodejsapp + image: ghcr.io/anuraaga/express-hello-world:latest + - name: pythonapp + image: ghcr.io/anuraaga/flask-hello-world:latest + - name: shouldnt-be-instrumented + image: rabbitmq:3 + env: + - name: TEST + value: test diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml new file mode 100644 index 000000000..3bf65bfff --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml @@ -0,0 +1,40 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: multi +spec: + env: + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_SERVICE_NAME + value: "javaapp" + python: + env: + - name: OTEL_SERVICE_NAME + value: "pythonapp" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318 + nodejs: + env: + - name: OTEL_SERVICE_NAME + value: "nodejsapp" + dotnet: + env: + - name: OTEL_SERVICE_NAME + value: "dotnetapp" + go: + env: + - name: OTEL_SERVICE_NAME + value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml new file mode 100644 index 000000000..f1af37c66 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/inject-python: "true" + sidecar.opentelemetry.io/inject: "true" + labels: + app: pod-multi-instr-no-containers +spec: + containers: + - name: nodejsapp + env: + - name: TEST + value: test + - name: pythonapp + env: + - name: TEST + value: test + - name: otc-container +status: + phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml new file mode 100644 index 000000000..9839cbea8 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dep-multi-instr-no-containers +spec: + selector: + matchLabels: + app: pod-multi-instr-no-containers + replicas: 1 + template: + metadata: + labels: + app: pod-multi-instr-no-containers + annotations: + instrumentation.opentelemetry.io/inject-nodejs: "true" + instrumentation.opentelemetry.io/inject-python: "true" + sidecar.opentelemetry.io/inject: "true" + spec: + containers: + - name: nodejsapp + image: ghcr.io/anuraaga/express-hello-world:latest + env: + - name: TEST + value: test + - name: pythonapp + image: ghcr.io/anuraaga/flask-hello-world:latest + env: + - name: TEST + value: test diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml new file mode 100644 index 000000000..f8e1e98e0 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml @@ -0,0 +1,23 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml new file mode 100644 index 000000000..3bf65bfff --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml @@ -0,0 +1,40 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: multi +spec: + env: + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + java: + env: + - name: OTEL_SERVICE_NAME + value: "javaapp" + python: + env: + - name: OTEL_SERVICE_NAME + value: "pythonapp" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4318 + nodejs: + env: + - name: OTEL_SERVICE_NAME + value: "nodejsapp" + dotnet: + env: + - name: OTEL_SERVICE_NAME + value: "dotnetapp" + go: + env: + - name: OTEL_SERVICE_NAME + value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml new file mode 100644 index 000000000..bec991925 --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-nodejs: "true" + sidecar.opentelemetry.io/inject: "true" + labels: + app: pod-single-instr-first-container +spec: + containers: + - name: nodejsapp + env: + - name: OTEL_SERVICE_NAME + value: nodejsapp + - name: NODE_OPTIONS + value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.85" + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_RESOURCE_ATTRIBUTES + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /otel-auto-instrumentation-nodejs + name: opentelemetry-auto-instrumentation-nodejs + - name: pythonapp + env: + - name: TEST + value: test + - name: otc-container +status: + phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml new file mode 100644 index 000000000..a6698fdab --- /dev/null +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dep-single-instr-first-container +spec: + selector: + matchLabels: + app: pod-single-instr-first-container + replicas: 1 + template: + metadata: + labels: + app: pod-single-instr-first-container + annotations: + instrumentation.opentelemetry.io/inject-nodejs: "true" + sidecar.opentelemetry.io/inject: "true" + spec: + containers: + - name: nodejsapp + image: ghcr.io/anuraaga/express-hello-world:latest + - name: pythonapp + image: ghcr.io/anuraaga/flask-hello-world:latest + env: + - name: TEST + value: test diff --git a/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml b/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml new file mode 100644 index 000000000..c0f277d00 --- /dev/null +++ b/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml @@ -0,0 +1,63 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-system +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +spec: + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + replicas: 1 + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + spec: + containers: + - name: kube-rbac-proxy + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 + args: + - "--secure-listen-address=0.0.0.0:8443" + - "--upstream=http://127.0.0.1:8080/" + - "--logtostderr=true" + - "--v=0" + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + - name: manager + image: "local/opentelemetry-operator:e2e" + args: + - "--metrics-addr=127.0.0.1:8080" + - "--zap-log-level=debug" + - "--enable-leader-election" + - "--feature-gates=+operator.autoinstrumentation.multi-instrumentation" + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: opentelemetry-operator-controller-manager-service-cert From b4a1eb54b73c79db8869c51192513e61355a9ca4 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 29 Sep 2023 20:33:00 +0200 Subject: [PATCH 1052/1234] [chore] Fix tag for E2E Golang application (#2157) * Fix tag for E2E Golang application Signed-off-by: Israel Blancas * Fix tag Signed-off-by: Israel Blancas * Fix tag Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../workflows/publish-autoinstrumentation-e2e-images.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 1d2a16efd..9d761e09a 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -28,7 +28,10 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang + images: | + ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang + tags: | + type=ref,event=branch - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -54,6 +57,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: + tags: ${{ steps.meta.outputs.tags }} context: tests/instrumentation-e2e-apps/golang platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le push: ${{ github.event_name == 'push' }} From b9a701e9310bba3fc4ed65bfb7a81277c1e7fc56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:25:22 +0200 Subject: [PATCH 1053/1234] Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#2175) Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.41.0 to 0.42.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/sdk/metric/v0.41.0...example/view/v0.42.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 16 ++++++++-------- cmd/operator-opamp-bridge/go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index d64ee78f0..2d82e9d6b 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,11 +10,11 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.18.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 - go.opentelemetry.io/otel/metric v1.18.0 - go.opentelemetry.io/otel/sdk v1.18.0 - go.opentelemetry.io/otel/sdk/metric v0.41.0 + go.opentelemetry.io/otel v1.19.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 + go.opentelemetry.io/otel/metric v1.19.0 + go.opentelemetry.io/otel/sdk v1.19.0 + go.opentelemetry.io/otel/sdk/metric v1.19.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -67,8 +67,8 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.77.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 // indirect - go.opentelemetry.io/otel/trace v1.18.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect @@ -82,7 +82,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.58.0 // indirect + google.golang.org/grpc v1.58.2 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.2 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index edddf3292..d40a9a0eb 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -141,20 +141,20 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.18.0 h1:TgVozPGZ01nHyDZxK5WGPFB9QexeTMXEH7+tIClWfzs= -go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0 h1:k0k7hFNDd8K4iOMJXj7s8sHaC4mhTlAeppRmZXLgZ6k= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.41.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0 h1:iV3BOgW4fry1Riw9dwypigqlIYWXvSRVT2RJmblzo40= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.41.0/go.mod h1:7PGzqlKrxIRmbj5tlNW0nTkYZ5fHXDgk6Fy8/KjR0CI= -go.opentelemetry.io/otel/metric v1.18.0 h1:JwVzw94UYmbx3ej++CwLUQZxEODDj/pOuTCvzhtRrSQ= -go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= -go.opentelemetry.io/otel/sdk v1.18.0 h1:e3bAB0wB3MljH38sHzpV/qWrOTCFrdZF2ct9F8rBkcY= -go.opentelemetry.io/otel/sdk v1.18.0/go.mod h1:1RCygWV7plY2KmdskZEDDBs4tJeHG92MdHZIluiYs/M= -go.opentelemetry.io/otel/sdk/metric v0.41.0 h1:c3sAt9/pQ5fSIUfl0gPtClV3HhE18DCVzByD33R/zsk= -go.opentelemetry.io/otel/sdk/metric v0.41.0/go.mod h1:PmOmSt+iOklKtIg5O4Vz9H/ttcRFSNTgii+E1KGyn1w= -go.opentelemetry.io/otel/trace v1.18.0 h1:NY+czwbHbmndxojTEKiSMHkG2ClNH2PwmcHrdo0JY10= -go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 h1:wNMDy/LVGLj2h3p6zg4d0gypKfWKSWI14E1C4smOgl8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0/go.mod h1:YfbDdXAAkemWJK3H/DshvlrxqFB2rtW4rY6ky/3x/H0= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= +go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -232,8 +232,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1: google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= -google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 4e3e79c897b30ba63cc178ba114310eec55a3374 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 2 Oct 2023 16:04:13 +0200 Subject: [PATCH 1054/1234] [chore] Build and publish application hosted in the repository for the DotNet instrumentation E2E test (#2082) * Build and publish the DotNet E2E image Signed-off-by: Israel Blancas * Build the image for linux/arm64,linux/amd64,linux/s390x and linux/ppc64le Signed-off-by: Israel Blancas * Remove the application and generate it from the CLI Signed-off-by: Israel Blancas * Fix architectures Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Fix tag for E2E Golang application Signed-off-by: Israel Blancas * Fix tag Signed-off-by: Israel Blancas * Fix tag Signed-off-by: Israel Blancas * Make the workflow reusable Signed-off-by: Israel Blancas * Fix name Signed-off-by: Israel Blancas * Remove deps Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...ublish-autoinstrumentation-e2e-images.yaml | 53 +++-------------- ...ublish-autoinstrumentation-e2e-images.yaml | 58 +++++++++++++++++++ .../dotnet/Dockerfile | 18 ++++++ 3 files changed, 85 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml create mode 100644 tests/instrumentation-e2e-apps/dotnet/Dockerfile diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 9d761e09a..5ceb0b9da 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -19,47 +19,12 @@ concurrency: jobs: golang: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang - tags: | - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - tags: ${{ steps.meta.outputs.tags }} - context: tests/instrumentation-e2e-apps/golang - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le - push: ${{ github.event_name == 'push' }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: golang + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + dotnet: + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: dotnet + platforms: linux/arm64,linux/amd64 diff --git a/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml new file mode 100644 index 000000000..cfe626886 --- /dev/null +++ b/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml @@ -0,0 +1,58 @@ +name: Reusable - Publish autoinstrumentation E2E images + +on: + workflow_call: + inputs: + language: + type: string + required: true + platforms: + type: string + required: true + +jobs: + publish-e2e-image: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v4 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-${{ inputs.language }} + tags: | + type=ref,event=branch + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Login to GitHub Package Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + tags: ${{ steps.meta.outputs.tags }} + context: tests/instrumentation-e2e-apps/${{ inputs.language }} + platforms: ${{ inputs.platforms }} + push: ${{ github.event_name == 'push' }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/tests/instrumentation-e2e-apps/dotnet/Dockerfile b/tests/instrumentation-e2e-apps/dotnet/Dockerfile new file mode 100644 index 000000000..c7f2eb833 --- /dev/null +++ b/tests/instrumentation-e2e-apps/dotnet/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0.400-bookworm-slim-amd64 AS build +ARG TARGETARCH +WORKDIR /source + +RUN dotnet new webapp -o MyWebApp --no-https -f net7.0 + +WORKDIR /source/MyWebApp +RUN dotnet publish -a $TARGETARCH -o /app + +FROM mcr.microsoft.com/dotnet/aspnet:7.0.10-bullseye-slim + +ENV DOTNET_ROLL_FORWARD=Major +ENV DOTNET_ROLL_FORWARD_PRE_RELEASE=1 + +WORKDIR /app +COPY --from=build /app/ . + +ENTRYPOINT ["./MyWebApp"] \ No newline at end of file From 95450d767067a948d8aaea336fa7474c610da87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 2 Oct 2023 15:58:39 +0000 Subject: [PATCH 1055/1234] Rebuild targets on scrape config regex-only changes (#2171) --- .chloggen/fix_ta-regex-hashing.yaml | 16 ++++++ cmd/otel-allocator/target/discovery.go | 29 ++++++++-- cmd/otel-allocator/target/discovery_test.go | 60 ++++++++++----------- 3 files changed, 71 insertions(+), 34 deletions(-) create mode 100755 .chloggen/fix_ta-regex-hashing.yaml diff --git a/.chloggen/fix_ta-regex-hashing.yaml b/.chloggen/fix_ta-regex-hashing.yaml new file mode 100755 index 000000000..1e9d3ced1 --- /dev/null +++ b/.chloggen/fix_ta-regex-hashing.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Rebuild targets on scrape config regex-only changes + +# One or more tracking issues related to the change +issues: [1358,1926] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go index 70cf82a37..9b16f9b69 100644 --- a/cmd/otel-allocator/target/discovery.go +++ b/cmd/otel-allocator/target/discovery.go @@ -15,14 +15,17 @@ package target import ( + "hash" + "hash/fnv" + "github.com/go-logr/logr" - "github.com/mitchellh/hashstructure" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/model/relabel" + "gopkg.in/yaml.v3" allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" ) @@ -40,7 +43,7 @@ type Discoverer struct { close chan struct{} configsMap map[allocatorWatcher.EventSource]*config.Config hook discoveryHook - scrapeConfigsHash uint64 + scrapeConfigsHash hash.Hash scrapeConfigsUpdater scrapeConfigsUpdater } @@ -82,7 +85,7 @@ func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *confi } } - hash, err := hashstructure.Hash(jobToScrapeConfig, nil) + hash, err := getScrapeConfigHash(jobToScrapeConfig) if err != nil { return err } @@ -131,3 +134,23 @@ func (m *Discoverer) Watch(fn func(targets map[string]*Item)) error { func (m *Discoverer) Close() { close(m.close) } + +// Calculate a hash for a scrape config map. +// This is done by marshaling to YAML because it's the most straightforward and doesn't run into problems with unexported fields. +func getScrapeConfigHash(jobToScrapeConfig map[string]*config.ScrapeConfig) (hash.Hash64, error) { + var err error + hash := fnv.New64() + yamlEncoder := yaml.NewEncoder(hash) + for jobName, scrapeConfig := range jobToScrapeConfig { + _, err = hash.Write([]byte(jobName)) + if err != nil { + return nil, err + } + err = yamlEncoder.Encode(scrapeConfig) + if err != nil { + return nil, err + } + } + yamlEncoder.Close() + return hash, err +} diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index 25a44b641..39e9ab459 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -17,6 +17,7 @@ package target import ( "context" "errors" + "hash" "sort" "testing" "time" @@ -252,6 +253,33 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { }, }, }, + { + description: "different regex", + cfg: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ + { + JobName: "serviceMonitor/testapp/testapp/1", + HonorTimestamps: false, + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: commonconfig.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.+)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + }, + }, { description: "mock error on update - no hash update", cfg: &promconfig.Config{ @@ -263,39 +291,9 @@ func TestDiscovery_ScrapeConfigHashing(t *testing.T) { }, expectErr: true, }, - // { - // TODO: fix handler logic so this test passes. - // This test currently fails due to the regexp struct not having any - // exported fields for the hashing algorithm to hash on, causing the - // hashes to be the same even though the data is different. - // description: "different regex", - // cfg: &promconfig.Config{ - // ScrapeConfigs: []*promconfig.ScrapeConfig{ - // { - // JobName: "serviceMonitor/testapp/testapp/1", - // HonorTimestamps: false, - // ScrapeTimeout: model.Duration(30 * time.Second), - // MetricsPath: "/metrics", - // HTTPClientConfig: commonconfig.HTTPClientConfig{ - // FollowRedirects: true, - // }, - // RelabelConfigs: []*relabel.Config{ - // { - // SourceLabels: model.LabelNames{model.LabelName("job")}, - // Separator: ";", - // Regex: relabel.MustNewRegexp("something else"), - // TargetLabel: "__tmp_prometheus_job_name", - // Replacement: "$$1", - // Action: relabel.Replace, - // }, - // }, - // }, - // }, - // }, - // }, } var ( - lastValidHash uint64 + lastValidHash hash.Hash expectedConfig map[string]*promconfig.ScrapeConfig lastValidConfig map[string]*promconfig.ScrapeConfig ) From f21e75e2f52dc7165b694b265c027173e2031f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Tue, 3 Oct 2023 11:56:03 +0000 Subject: [PATCH 1056/1234] Fix depguard linter configuration (#2190) --- .golangci.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 6a5007561..b644373c0 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -44,12 +44,13 @@ linters-settings: min-confidence: 0.8 depguard: - list-type: denylist - include-go-root: true - packages-with-error-message: - # See https://github.com/open-telemetry/opentelemetry-collector/issues/5200 for rationale - - sync/atomic: "Use go.uber.org/atomic instead of sync/atomic" - - github.com/pkg/errors: "Use 'errors' or 'fmt' instead of github.com/pkg/errors" + rules: + main: + deny: + - pkg: sync/atomic + desc: "Use go.uber.org/atomic instead of sync/atomic" + - pkg: github.com/pkg/errors + desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors" linters: enable: From cc88d1a82d00e7cb2055faff360f71f2e2716cb3 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 3 Oct 2023 10:40:58 -0400 Subject: [PATCH 1057/1234] refactor to be even more generic (#2185) --- controllers/builder_test.go | 15 +- controllers/common.go | 100 ++++++++++++ .../opentelemetrycollector_controller.go | 87 +---------- controllers/reconcile_test.go | 46 +++--- controllers/suite_test.go | 6 +- internal/manifests/builder.go | 16 +- internal/manifests/collector/collector.go | 8 +- .../collector/config_replace_test.go | 20 +-- internal/manifests/collector/configmap.go | 18 +-- .../manifests/collector/configmap_test.go | 14 +- internal/manifests/collector/daemonset.go | 42 +++-- .../manifests/collector/daemonset_test.go | 142 +++++++++++++---- internal/manifests/collector/deployment.go | 46 +++--- .../manifests/collector/deployment_test.go | 145 +++++++++++++++--- .../collector/horizontalpodautoscaler.go | 51 +++--- .../collector/horizontalpodautoscaler_test.go | 8 +- internal/manifests/collector/ingress.go | 34 ++-- internal/manifests/collector/ingress_test.go | 40 ++--- internal/manifests/collector/route.go | 37 +++-- internal/manifests/collector/route_test.go | 43 +++--- internal/manifests/collector/service.go | 64 ++++---- internal/manifests/collector/service_test.go | 34 ++-- .../manifests/collector/serviceaccount.go | 13 +- .../manifests/collector/servicemonitor.go | 26 ++-- .../collector/servicemonitor_test.go | 18 +-- internal/manifests/collector/statefulset.go | 48 +++--- .../manifests/collector/statefulset_test.go | 145 +++++++++++++++--- internal/manifests/collector/suite_test.go | 4 +- internal/manifests/params.go | 2 +- .../targetallocator/annotations_test.go | 8 +- .../manifests/targetallocator/configmap.go | 39 +++-- .../targetallocator/configmap_test.go | 22 ++- .../manifests/targetallocator/deployment.go | 30 ++-- .../targetallocator/deployment_test.go | 49 +++++- internal/manifests/targetallocator/service.go | 16 +- .../targetallocator/serviceaccount.go | 13 +- .../targetallocator/targetallocator.go | 4 +- internal/status/handle.go | 6 +- pkg/collector/reconcile/route.go | 12 +- pkg/collector/reconcile/route_test.go | 18 +-- pkg/collector/reconcile/suite_test.go | 4 +- 41 files changed, 936 insertions(+), 557 deletions(-) create mode 100644 controllers/common.go diff --git a/controllers/builder_test.go b/controllers/builder_test.go index 99e1f3400..f93b31bd8 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -27,6 +27,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) var ( @@ -40,7 +41,7 @@ var ( pathTypePrefix = networkingv1.PathTypePrefix ) -func TestBuildAll(t *testing.T) { +func TestBuildCollector(t *testing.T) { var goodConfig = `receivers: examplereceiver: endpoint: "0.0.0.0:12345" @@ -585,12 +586,12 @@ service: config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator"), ) - reconciler := NewReconciler(Params{ - Log: logr.Discard(), - Config: cfg, - }) - params := reconciler.getParams(tt.args.instance) - got, err := reconciler.BuildAll(params) + params := manifests.Params{ + Log: logr.Discard(), + Config: cfg, + OtelCol: tt.args.instance, + } + got, err := BuildCollector(params) if (err != nil) != tt.wantErr { t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/controllers/common.go b/controllers/common.go new file mode 100644 index 000000000..aa5adf1bc --- /dev/null +++ b/controllers/common.go @@ -0,0 +1,100 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers + +import ( + "context" + "errors" + "fmt" + + "github.com/go-logr/logr" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" +) + +func isNamespaceScoped(obj client.Object) bool { + switch obj.(type) { + case *rbacv1.ClusterRole, *rbacv1.ClusterRoleBinding: + return false + default: + return true + } +} + +// BuildCollector returns the generation and collected errors of all manifests for a given instance. +func BuildCollector(params manifests.Params) ([]client.Object, error) { + builders := []manifests.Builder{ + collector.Build, + targetallocator.Build, + } + var resources []client.Object + for _, builder := range builders { + objs, err := builder(params) + if err != nil { + return nil, err + } + resources = append(resources, objs...) + } + return resources, nil +} + +// reconcileDesiredObjects runs the reconcile process using the mutateFn over the given list of objects. +func reconcileDesiredObjects(ctx context.Context, kubeClient client.Client, logger logr.Logger, owner metav1.Object, scheme *runtime.Scheme, desiredObjects ...client.Object) error { + var errs []error + for _, desired := range desiredObjects { + l := logger.WithValues( + "object_name", desired.GetName(), + "object_kind", desired.GetObjectKind(), + ) + if isNamespaceScoped(desired) { + if setErr := ctrl.SetControllerReference(owner, desired, scheme); setErr != nil { + l.Error(setErr, "failed to set controller owner reference to desired") + errs = append(errs, setErr) + continue + } + } + + // existing is an object the controller runtime will hydrate for us + // we obtain the existing object by deep copying the desired object because it's the most convenient way + existing := desired.DeepCopyObject().(client.Object) + mutateFn := manifests.MutateFuncFor(existing, desired) + op, crudErr := ctrl.CreateOrUpdate(ctx, kubeClient, existing, mutateFn) + if crudErr != nil && errors.Is(crudErr, manifests.ImmutableChangeErr) { + l.Error(crudErr, "detected immutable field change, trying to delete, new object will be created on next reconcile", "existing", existing.GetName()) + delErr := kubeClient.Delete(ctx, existing) + if delErr != nil { + return delErr + } + continue + } else if crudErr != nil { + l.Error(crudErr, "failed to configure desired") + errs = append(errs, crudErr) + continue + } + + l.V(1).Info(fmt.Sprintf("desired has been %s", op)) + } + if len(errs) > 0 { + return fmt.Errorf("failed to create objects for %s: %w", owner.GetName(), errors.Join(errs...)) + } + return nil +} diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 4cde37c46..ddd3d51bd 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -17,7 +17,6 @@ package controllers import ( "context" - "errors" "fmt" "sync" @@ -26,7 +25,6 @@ import ( appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" @@ -36,8 +34,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" "github.com/open-telemetry/opentelemetry-operator/internal/status" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" @@ -118,67 +114,11 @@ func (r *OpenTelemetryCollectorReconciler) removeRouteTask(ora autodetect.OpenSh return nil } -func (r *OpenTelemetryCollectorReconciler) doCRUD(ctx context.Context, params manifests.Params) error { - // Collect all objects owned by the operator, to be able to prune objects - // which exist in the cluster but are not managed by the operator anymore. - desiredObjects, err := r.BuildAll(params) - if err != nil { - return err - } - var errs []error - for _, desired := range desiredObjects { - l := r.log.WithValues( - "object_name", desired.GetName(), - "object_kind", desired.GetObjectKind(), - ) - if isNamespaceScoped(desired) { - if setErr := ctrl.SetControllerReference(¶ms.Instance, desired, params.Scheme); setErr != nil { - l.Error(setErr, "failed to set controller owner reference to desired") - errs = append(errs, setErr) - continue - } - } - - // existing is an object the controller runtime will hydrate for us - // we obtain the existing object by deep copying the desired object because it's the most convenient way - existing := desired.DeepCopyObject().(client.Object) - mutateFn := manifests.MutateFuncFor(existing, desired) - op, crudErr := ctrl.CreateOrUpdate(ctx, r.Client, existing, mutateFn) - if crudErr != nil && errors.Is(crudErr, manifests.ImmutableChangeErr) { - l.Error(crudErr, "detected immutable field change, trying to delete, new object will be created on next reconcile", "existing", existing.GetName()) - delErr := r.Client.Delete(ctx, existing) - if delErr != nil { - return delErr - } - continue - } else if crudErr != nil { - l.Error(crudErr, "failed to configure desired") - errs = append(errs, crudErr) - continue - } - - l.V(1).Info(fmt.Sprintf("desired has been %s", op)) - } - if len(errs) > 0 { - return fmt.Errorf("failed to create objects for Collector %s: %w", params.Instance.GetName(), errors.Join(errs...)) - } - return nil -} - -func isNamespaceScoped(obj client.Object) bool { - switch obj.(type) { - case *rbacv1.ClusterRole, *rbacv1.ClusterRoleBinding: - return false - default: - return true - } -} - func (r *OpenTelemetryCollectorReconciler) getParams(instance v1alpha1.OpenTelemetryCollector) manifests.Params { return manifests.Params{ Config: r.config, Client: r.Client, - Instance: instance, + OtelCol: instance, Log: r.log, Scheme: r.scheme, Recorder: r.recorder, @@ -243,7 +183,11 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, err } - err := r.doCRUD(ctx, params) + desiredObjects, buildErr := BuildCollector(params) + if buildErr != nil { + return ctrl.Result{}, buildErr + } + err := reconcileDesiredObjects(ctx, r.Client, log, ¶ms.OtelCol, params.Scheme, desiredObjects...) return status.HandleReconcileStatus(ctx, log, params, err) } @@ -255,7 +199,7 @@ func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params if err := task.Do(ctx, params); err != nil { // If we get an error that occurs because a pod is being terminated, then exit this loop if apierrors.IsForbidden(err) && apierrors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { - r.log.V(2).Info("Exiting reconcile loop because namespace is being terminated", "namespace", params.Instance.Namespace) + r.log.V(2).Info("Exiting reconcile loop because namespace is being terminated", "namespace", params.OtelCol.Namespace) return nil } r.log.Error(err, fmt.Sprintf("failed to reconcile %s", task.Name)) @@ -267,23 +211,6 @@ func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params return nil } -// BuildAll returns the generation and collected errors of all manifests for a given instance. -func (r *OpenTelemetryCollectorReconciler) BuildAll(params manifests.Params) ([]client.Object, error) { - builders := []manifests.Builder{ - collector.Build, - targetallocator.Build, - } - var resources []client.Object - for _, builder := range builders { - objs, err := builder(params) - if err != nil { - return nil, err - } - resources = append(resources, objs...) - } - return resources, nil -} - // SetupWithManager tells the manager what our controller is interested in. func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { err := r.config.AutoDetect() // We need to call this, so we can get the correct autodetect version diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 03ca153b1..5bd758e2d 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -65,34 +65,34 @@ func newParamsAssertNoErr(t *testing.T, taContainerImage string, file string) ma p, err := newParams(taContainerImage, file) assert.NoError(t, err) if len(taContainerImage) == 0 { - p.Instance.Spec.TargetAllocator.Enabled = false + p.OtelCol.Spec.TargetAllocator.Enabled = false } return p } func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { addedMetadataDeployment := paramsWithMode(v1alpha1.ModeDeployment) - addedMetadataDeployment.Instance.Labels = map[string]string{ + addedMetadataDeployment.OtelCol.Labels = map[string]string{ labelName: labelVal, } - addedMetadataDeployment.Instance.Annotations = map[string]string{ + addedMetadataDeployment.OtelCol.Annotations = map[string]string{ annotationName: annotationVal, } deploymentExtraPorts := paramsWithModeAndReplicas(v1alpha1.ModeDeployment, 3) - deploymentExtraPorts.Instance.Spec.Ports = append(deploymentExtraPorts.Instance.Spec.Ports, extraPorts) + deploymentExtraPorts.OtelCol.Spec.Ports = append(deploymentExtraPorts.OtelCol.Spec.Ports, extraPorts) ingressParams := newParamsAssertNoErr(t, "", testFileIngress) - ingressParams.Instance.Spec.Ingress.Type = "ingress" + ingressParams.OtelCol.Spec.Ingress.Type = "ingress" updatedIngressParams := newParamsAssertNoErr(t, "", testFileIngress) - updatedIngressParams.Instance.Spec.Ingress.Type = "ingress" - updatedIngressParams.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} - updatedIngressParams.Instance.Spec.Ingress.Hostname = expectHostname + updatedIngressParams.OtelCol.Spec.Ingress.Type = "ingress" + updatedIngressParams.OtelCol.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} + updatedIngressParams.OtelCol.Spec.Ingress.Hostname = expectHostname routeParams := newParamsAssertNoErr(t, "", testFileIngress) - routeParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - routeParams.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + routeParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + routeParams.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure updatedRouteParams := newParamsAssertNoErr(t, "", testFileIngress) - updatedRouteParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - updatedRouteParams.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - updatedRouteParams.Instance.Spec.Ingress.Hostname = expectHostname + updatedRouteParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + updatedRouteParams.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + updatedRouteParams.OtelCol.Spec.Ingress.Hostname = expectHostname type args struct { params manifests.Params @@ -389,7 +389,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { assert.NoError(t, err) assert.True(t, exists) - promConfig, err := ta.ConfigToPromConfig(newParamsAssertNoErr(t, baseTaImage, promFile).Instance.Spec.Config) + promConfig, err := ta.ConfigToPromConfig(newParamsAssertNoErr(t, baseTaImage, promFile).OtelCol.Spec.Config) assert.NoError(t, err) taConfig := make(map[interface{}]interface{}) @@ -452,7 +452,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { testContext := context.Background() - nsn := types.NamespacedName{Name: tt.args.params.Instance.Name, Namespace: tt.args.params.Instance.Namespace} + nsn := types.NamespacedName{Name: tt.args.params.OtelCol.Name, Namespace: tt.args.params.OtelCol.Namespace} reconciler := controllers.NewReconciler(controllers.Params{ Client: k8sClient, Log: logger, @@ -465,7 +465,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }) assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") firstCheck := tt.want[0] - createErr := k8sClient.Create(testContext, &tt.args.params.Instance) + createErr := k8sClient.Create(testContext, &tt.args.params.OtelCol) if !firstCheck.validateErr(t, createErr) { return } @@ -474,12 +474,12 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } got, reconcileErr := reconciler.Reconcile(testContext, req) if !firstCheck.wantErr(t, reconcileErr) { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.Instance)) + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OtelCol)) return } assert.Equal(t, firstCheck.result, got) for _, check := range firstCheck.checks { - check(t, tt.args.params.Instance) + check(t, tt.args.params.OtelCol) } // run the next set of checks for pid, updateParam := range tt.args.updates { @@ -488,9 +488,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { assert.True(t, found) assert.NoError(t, err) - updateParam.Instance.SetResourceVersion(existing.ResourceVersion) - updateParam.Instance.SetUID(existing.UID) - err = k8sClient.Update(testContext, &updateParam.Instance) + updateParam.OtelCol.SetResourceVersion(existing.ResourceVersion) + updateParam.OtelCol.SetUID(existing.UID) + err = k8sClient.Update(testContext, &updateParam.OtelCol) assert.NoError(t, err) if err != nil { continue @@ -506,12 +506,12 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } assert.Equal(t, checkGroup.result, got) for _, check := range checkGroup.checks { - check(t, updateParam.Instance) + check(t, updateParam.OtelCol) } } // Only delete upon a successful creation if createErr == nil { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.Instance)) + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OtelCol)) } }) } diff --git a/controllers/suite_test.go b/controllers/suite_test.go index d44eb5f2b..98e256205 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -193,7 +193,7 @@ func paramsWithModeAndReplicas(mode v1alpha1.Mode, replicas int32) manifests.Par return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", @@ -243,7 +243,7 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", @@ -289,7 +289,7 @@ func paramsWithHPA(minReps, maxReps int32) manifests.Params { return manifests.Params{ Config: configuration, Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", diff --git a/internal/manifests/builder.go b/internal/manifests/builder.go index d7f298ed5..88a47ed27 100644 --- a/internal/manifests/builder.go +++ b/internal/manifests/builder.go @@ -17,28 +17,24 @@ package manifests import ( "reflect" - "github.com/go-logr/logr" "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" ) type Builder func(params Params) ([]client.Object, error) -type ManifestFactory[T client.Object] func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (T, error) -type SimpleManifestFactory[T client.Object] func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) T +type ManifestFactory[T client.Object] func(params Params) (T, error) +type SimpleManifestFactory[T client.Object] func(params Params) T type K8sManifestFactory ManifestFactory[client.Object] func FactoryWithoutError[T client.Object](f SimpleManifestFactory[T]) K8sManifestFactory { - return func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (client.Object, error) { - return f(cfg, logger, otelcol), nil + return func(params Params) (client.Object, error) { + return f(params), nil } } func Factory[T client.Object](f ManifestFactory[T]) K8sManifestFactory { - return func(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (client.Object, error) { - return f(cfg, logger, otelcol) + return func(params Params) (client.Object, error) { + return f(params) } } diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 7920a9535..1e64eb892 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -26,7 +26,7 @@ import ( func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object var manifestFactories []manifests.K8sManifestFactory - switch params.Instance.Spec.Mode { + switch params.OtelCol.Spec.Mode { case v1alpha1.ModeDeployment: manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(Deployment)) case v1alpha1.ModeStatefulSet: @@ -45,18 +45,18 @@ func Build(params manifests.Params) ([]client.Object, error) { manifests.FactoryWithoutError(MonitoringService), manifests.FactoryWithoutError(Ingress), }...) - if params.Instance.Spec.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + if params.OtelCol.Spec.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { manifestFactories = append(manifestFactories, manifests.Factory(ServiceMonitor)) } for _, factory := range manifestFactories { - res, err := factory(params.Config, params.Log, params.Instance) + res, err := factory(params) if err != nil { return nil, err } else if manifests.ObjectIsNotNil(res) { resourceManifests = append(resourceManifests, res) } } - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) // NOTE: we cannot just unpack the slice, the type checker doesn't coerce the type correctly. for _, route := range routes { resourceManifests = append(resourceManifests, route) diff --git a/internal/manifests/collector/config_replace_test.go b/internal/manifests/collector/config_replace_test.go index 1384da681..075a2a560 100644 --- a/internal/manifests/collector/config_replace_test.go +++ b/internal/manifests/collector/config_replace_test.go @@ -32,7 +32,7 @@ func TestPrometheusParser(t *testing.T) { assert.NoError(t, err) t.Run("should update config with http_sd_config", func(t *testing.T) { - actualConfig, err := ReplaceConfig(param.Instance) + actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) // prepare @@ -65,12 +65,12 @@ func TestPrometheusParser(t *testing.T) { t.Run("should update config with targetAllocator block", func(t *testing.T) { err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - param.Instance.Spec.TargetAllocator.Enabled = true + param.OtelCol.Spec.TargetAllocator.Enabled = true assert.NoError(t, err) // Set up the test scenario - param.Instance.Spec.TargetAllocator.Enabled = true - actualConfig, err := ReplaceConfig(param.Instance) + param.OtelCol.Spec.TargetAllocator.Enabled = true + actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) // Verify the expected changes in the config @@ -94,8 +94,8 @@ func TestPrometheusParser(t *testing.T) { }) t.Run("should not update config with http_sd_config", func(t *testing.T) { - param.Instance.Spec.TargetAllocator.Enabled = false - actualConfig, err := ReplaceConfig(param.Instance) + param.OtelCol.Spec.TargetAllocator.Enabled = false + actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) // prepare @@ -133,25 +133,25 @@ func TestReplaceConfig(t *testing.T) { assert.NoError(t, err) t.Run("should not modify config when TargetAllocator is disabled", func(t *testing.T) { - param.Instance.Spec.TargetAllocator.Enabled = false + param.OtelCol.Spec.TargetAllocator.Enabled = false expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_original.yaml") assert.NoError(t, err) expectedConfig := string(expectedConfigBytes) - actualConfig, err := ReplaceConfig(param.Instance) + actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) assert.Equal(t, expectedConfig, actualConfig) }) t.Run("should rewrite scrape configs with SD config when TargetAllocator is enabled and feature flag is not set", func(t *testing.T) { - param.Instance.Spec.TargetAllocator.Enabled = true + param.OtelCol.Spec.TargetAllocator.Enabled = true expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_expected_with_sd_config.yaml") assert.NoError(t, err) expectedConfig := string(expectedConfigBytes) - actualConfig, err := ReplaceConfig(param.Instance) + actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) assert.Equal(t, expectedConfig, actualConfig) diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 2109b25ba..cdf2bdb7c 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -15,30 +15,28 @@ package collector import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func ConfigMap(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ConfigMap { - name := naming.ConfigMap(otelcol.Name) - labels := Labels(otelcol, name, []string{}) +func ConfigMap(params manifests.Params) *corev1.ConfigMap { + name := naming.ConfigMap(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, []string{}) - replacedConf, err := ReplaceConfig(otelcol) + replacedConf, err := ReplaceConfig(params.OtelCol) if err != nil { - logger.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) + params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) } return &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: otelcol.Annotations, + Annotations: params.OtelCol.Annotations, }, Data: map[string]string{ "collector.yaml": replacedConf, diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 6a48737cd..afe748213 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -63,7 +63,7 @@ service: } param := deploymentParams() - actual := ConfigMap(param.Config, param.Log, param.Instance) + actual := ConfigMap(param) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) @@ -103,8 +103,8 @@ service: } param := deploymentParams() - param.Instance.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param.Config, param.Log, param.Instance) + param.OtelCol.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param) assert.Equal(t, "test-collector", actual.GetName()) assert.Equal(t, expectedLables, actual.GetLabels()) @@ -147,8 +147,8 @@ service: param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test_ta_set.yaml") assert.NoError(t, err) - param.Instance.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param.Config, param.Log, param.Instance) + param.OtelCol.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) @@ -190,8 +190,8 @@ service: param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test.yaml") assert.NoError(t, err) - param.Instance.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param.Config, param.Log, param.Instance) + param.OtelCol.Spec.TargetAllocator.Enabled = true + actual := ConfigMap(param) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index f947179c0..ab663d8ac 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -15,33 +15,31 @@ package collector import ( - "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // DaemonSet builds the deployment for the given instance. -func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.DaemonSet { - name := naming.Collector(otelcol.Name) - labels := Labels(otelcol, name, cfg.LabelsFilter()) +func DaemonSet(params manifests.Params) *appsv1.DaemonSet { + name := naming.Collector(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) - annotations := Annotations(otelcol) - podAnnotations := PodAnnotations(otelcol) + annotations := Annotations(params.OtelCol) + podAnnotations := PodAnnotations(params.OtelCol) return &appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Collector(otelcol.Name), - Namespace: otelcol.Namespace, + Name: naming.Collector(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, Labels: labels, Annotations: annotations, }, Spec: appsv1.DaemonSetSpec{ Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(otelcol), + MatchLabels: SelectorLabels(params.OtelCol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ @@ -49,17 +47,17 @@ func DaemonSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem Annotations: podAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - InitContainers: otelcol.Spec.InitContainers, - Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), - Volumes: Volumes(cfg, otelcol), - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - HostNetwork: otelcol.Spec.HostNetwork, - DNSPolicy: getDNSPolicy(otelcol), - SecurityContext: otelcol.Spec.PodSecurityContext, - PriorityClassName: otelcol.Spec.PriorityClassName, - Affinity: otelcol.Spec.Affinity, + ServiceAccountName: ServiceAccountName(params.OtelCol), + InitContainers: params.OtelCol.Spec.InitContainers, + Containers: append(params.OtelCol.Spec.AdditionalContainers, Container(params.Config, params.Log, params.OtelCol, true)), + Volumes: Volumes(params.Config, params.OtelCol), + Tolerations: params.OtelCol.Spec.Tolerations, + NodeSelector: params.OtelCol.Spec.NodeSelector, + HostNetwork: params.OtelCol.Spec.HostNetwork, + DNSPolicy: getDNSPolicy(params.OtelCol), + SecurityContext: params.OtelCol.Spec.PodSecurityContext, + PriorityClassName: params.OtelCol.Spec.PriorityClassName, + Affinity: params.OtelCol.Spec.Affinity, }, }, }, diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index 92f50326e..0a6dde9ec 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -23,24 +23,28 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) func TestDaemonSetNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace", - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Tolerations: testTolerationValues, + params := manifests.Params{ + Config: config.New(), + OtelCol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Tolerations: testTolerationValues, + }, }, + Log: logger, } - cfg := config.New() // test - d := DaemonSet(cfg, logger, otelcol) + d := DaemonSet(params) // verify assert.Equal(t, "my-instance-collector", d.Name) @@ -86,19 +90,37 @@ func TestDaemonSetNewDefault(t *testing.T) { } func TestDaemonsetHostNetwork(t *testing.T) { + params1 := manifests.Params{ + Config: config.New(), + OtelCol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + }, + Log: logger, + } // test - d1 := DaemonSet(config.New(), logger, v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, - }) + d1 := DaemonSet(params1) assert.False(t, d1.Spec.Template.Spec.HostNetwork) assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // verify custom - d2 := DaemonSet(config.New(), logger, v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - HostNetwork: true, + params2 := manifests.Params{ + Config: config.New(), + OtelCol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + HostNetwork: true, + }, }, - }) + Log: logger, + } + d2 := DaemonSet(params2) assert.True(t, d2.Spec.Template.Spec.HostNetwork) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } @@ -116,8 +138,14 @@ func TestDaemonsetPodAnnotations(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - ds := DaemonSet(cfg, logger, otelcol) + ds := DaemonSet(params) // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" @@ -156,7 +184,13 @@ func TestDaemonstPodSecurityContext(t *testing.T) { cfg := config.New() - d := DaemonSet(cfg, logger, otelcol) + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + d := DaemonSet(params) assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) @@ -179,7 +213,13 @@ func TestDaemonsetFilterLabels(t *testing.T) { cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) - d := DaemonSet(cfg, logger, otelcol) + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + d := DaemonSet(params) assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { @@ -197,7 +237,13 @@ func TestDaemonSetNodeSelector(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := DaemonSet(params1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) @@ -216,7 +262,13 @@ func TestDaemonSetNodeSelector(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := DaemonSet(params2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } @@ -229,7 +281,13 @@ func TestDaemonSetPriorityClassName(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := DaemonSet(params1) assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" @@ -245,7 +303,13 @@ func TestDaemonSetPriorityClassName(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := DaemonSet(params2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } @@ -258,7 +322,13 @@ func TestDaemonSetAffinity(t *testing.T) { cfg := config.New() - d1 := DaemonSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := DaemonSet(params1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) otelcol2 := v1alpha1.OpenTelemetryCollector{ @@ -272,7 +342,13 @@ func TestDaemonSetAffinity(t *testing.T) { cfg = config.New() - d2 := DaemonSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := DaemonSet(params2) assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } @@ -294,8 +370,14 @@ func TestDaemonSetInitContainer(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := DaemonSet(cfg, logger, otelcol) + d := DaemonSet(params) assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) @@ -321,8 +403,14 @@ func TestDaemonSetAdditionalContainer(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := DaemonSet(cfg, logger, otelcol) + d := DaemonSet(params) assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index 6919e0196..d18681936 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -15,35 +15,33 @@ package collector import ( - "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Deployment builds the deployment for the given instance. -func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.Deployment { - name := naming.Collector(otelcol.Name) - labels := Labels(otelcol, name, cfg.LabelsFilter()) +func Deployment(params manifests.Params) *appsv1.Deployment { + name := naming.Collector(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) - annotations := Annotations(otelcol) - podAnnotations := PodAnnotations(otelcol) + annotations := Annotations(params.OtelCol) + podAnnotations := PodAnnotations(params.OtelCol) return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, Annotations: annotations, }, Spec: appsv1.DeploymentSpec{ - Replicas: otelcol.Spec.Replicas, + Replicas: params.OtelCol.Spec.Replicas, Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(otelcol), + MatchLabels: SelectorLabels(params.OtelCol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ @@ -51,19 +49,19 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Annotations: podAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - InitContainers: otelcol.Spec.InitContainers, - Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), - Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDNSPolicy(otelcol), - HostNetwork: otelcol.Spec.HostNetwork, - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - SecurityContext: otelcol.Spec.PodSecurityContext, - PriorityClassName: otelcol.Spec.PriorityClassName, - Affinity: otelcol.Spec.Affinity, - TerminationGracePeriodSeconds: otelcol.Spec.TerminationGracePeriodSeconds, - TopologySpreadConstraints: otelcol.Spec.TopologySpreadConstraints, + ServiceAccountName: ServiceAccountName(params.OtelCol), + InitContainers: params.OtelCol.Spec.InitContainers, + Containers: append(params.OtelCol.Spec.AdditionalContainers, Container(params.Config, params.Log, params.OtelCol, true)), + Volumes: Volumes(params.Config, params.OtelCol), + DNSPolicy: getDNSPolicy(params.OtelCol), + HostNetwork: params.OtelCol.Spec.HostNetwork, + Tolerations: params.OtelCol.Spec.Tolerations, + NodeSelector: params.OtelCol.Spec.NodeSelector, + SecurityContext: params.OtelCol.Spec.PodSecurityContext, + PriorityClassName: params.OtelCol.Spec.PriorityClassName, + Affinity: params.OtelCol.Spec.Affinity, + TerminationGracePeriodSeconds: params.OtelCol.Spec.TerminationGracePeriodSeconds, + TopologySpreadConstraints: params.OtelCol.Spec.TopologySpreadConstraints, }, }, }, diff --git a/internal/manifests/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go index 40c7acacc..baa66f42a 100644 --- a/internal/manifests/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -23,6 +23,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) @@ -78,8 +79,14 @@ func TestDeploymentNewDefault(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := Deployment(cfg, logger, otelcol) + d := Deployment(params) // verify assert.Equal(t, "my-instance-collector", d.Name) @@ -137,8 +144,14 @@ func TestDeploymentPodAnnotations(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := Deployment(cfg, logger, otelcol) + d := Deployment(params) // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" @@ -177,7 +190,13 @@ func TestDeploymenttPodSecurityContext(t *testing.T) { cfg := config.New() - d := Deployment(cfg, logger, otelcol) + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + d := Deployment(params) assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) @@ -194,7 +213,13 @@ func TestDeploymentHostNetwork(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := Deployment(params1) assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) @@ -211,7 +236,13 @@ func TestDeploymentHostNetwork(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := Deployment(params2) assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } @@ -232,7 +263,13 @@ func TestDeploymentFilterLabels(t *testing.T) { cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) - d := Deployment(cfg, logger, otelcol) + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + d := Deployment(params) assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { @@ -250,7 +287,13 @@ func TestDeploymentNodeSelector(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := Deployment(params1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) @@ -269,7 +312,13 @@ func TestDeploymentNodeSelector(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := Deployment(params2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } @@ -282,7 +331,13 @@ func TestDeploymentPriorityClassName(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := Deployment(params1) assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" @@ -298,7 +353,13 @@ func TestDeploymentPriorityClassName(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := Deployment(params2) assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) } @@ -311,7 +372,13 @@ func TestDeploymentAffinity(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := Deployment(params1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) otelcol2 := v1alpha1.OpenTelemetryCollector{ @@ -325,7 +392,13 @@ func TestDeploymentAffinity(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := Deployment(params2) assert.NotNil(t, d2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } @@ -339,7 +412,13 @@ func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + + d1 := Deployment(params1) assert.Nil(t, d1.Spec.Template.Spec.TerminationGracePeriodSeconds) gracePeriodSec := int64(60) @@ -355,7 +434,13 @@ func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + + d2 := Deployment(params2) assert.NotNil(t, d2.Spec.Template.Spec.TerminationGracePeriodSeconds) assert.Equal(t, gracePeriodSec, *d2.Spec.Template.Spec.TerminationGracePeriodSeconds) } @@ -377,8 +462,14 @@ func TestDeploymentSetInitContainer(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := Deployment(cfg, logger, otelcol) + d := Deployment(params) assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) @@ -396,7 +487,13 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { } cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + + params1 := manifests.Params{ + Config: cfg, + OtelCol: otelcol1, + Log: logger, + } + d1 := Deployment(params1) assert.Equal(t, "my-instance-collector", d1.Name) assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) @@ -411,7 +508,13 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { } cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + + params2 := manifests.Params{ + Config: cfg, + OtelCol: otelcol2, + Log: logger, + } + d2 := Deployment(params2) assert.Equal(t, "my-instance-topologyspreadconstraint-collector", d2.Name) assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) @@ -435,8 +538,14 @@ func TestDeploymentAdditionalContainers(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + // test - d := Deployment(cfg, logger, otelcol) + d := Deployment(params) assert.Equal(t, "my-instance-collector", d.Name) assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", d.Annotations["prometheus.io/scrape"]) diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index 719e2bf9d..d4915b8f4 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -15,72 +15,71 @@ package collector import ( - "github.com/go-logr/logr" autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) client.Object { - name := naming.Collector(otelcol.Name) - labels := Labels(otelcol, name, cfg.LabelsFilter()) - annotations := Annotations(otelcol) +func HorizontalPodAutoscaler(params manifests.Params) client.Object { + name := naming.Collector(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + annotations := Annotations(params.OtelCol) var result client.Object objectMeta := metav1.ObjectMeta{ - Name: naming.HorizontalPodAutoscaler(otelcol.Name), - Namespace: otelcol.Namespace, + Name: naming.HorizontalPodAutoscaler(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, Labels: labels, Annotations: annotations, } // defaulting webhook should always set this, but if unset then return nil. - if otelcol.Spec.Autoscaler == nil { - logger.Info("hpa field is unset in Spec, skipping autoscaler creation") + if params.OtelCol.Spec.Autoscaler == nil { + params.Log.Info("hpa field is unset in Spec, skipping autoscaler creation") return nil } - if otelcol.Spec.Autoscaler.MaxReplicas == nil { - otelcol.Spec.Autoscaler.MaxReplicas = otelcol.Spec.MaxReplicas + if params.OtelCol.Spec.Autoscaler.MaxReplicas == nil { + params.OtelCol.Spec.Autoscaler.MaxReplicas = params.OtelCol.Spec.MaxReplicas } - if otelcol.Spec.Autoscaler.MinReplicas == nil { - if otelcol.Spec.MinReplicas != nil { - otelcol.Spec.Autoscaler.MinReplicas = otelcol.Spec.MinReplicas + if params.OtelCol.Spec.Autoscaler.MinReplicas == nil { + if params.OtelCol.Spec.MinReplicas != nil { + params.OtelCol.Spec.Autoscaler.MinReplicas = params.OtelCol.Spec.MinReplicas } else { - otelcol.Spec.Autoscaler.MinReplicas = otelcol.Spec.Replicas + params.OtelCol.Spec.Autoscaler.MinReplicas = params.OtelCol.Spec.Replicas } } metrics := []autoscalingv2.MetricSpec{} - if otelcol.Spec.Autoscaler.TargetMemoryUtilization != nil { + if params.OtelCol.Spec.Autoscaler.TargetMemoryUtilization != nil { memoryTarget := autoscalingv2.MetricSpec{ Type: autoscalingv2.ResourceMetricSourceType, Resource: &autoscalingv2.ResourceMetricSource{ Name: corev1.ResourceMemory, Target: autoscalingv2.MetricTarget{ Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetMemoryUtilization, + AverageUtilization: params.OtelCol.Spec.Autoscaler.TargetMemoryUtilization, }, }, } metrics = append(metrics, memoryTarget) } - if otelcol.Spec.Autoscaler.TargetCPUUtilization != nil { + if params.OtelCol.Spec.Autoscaler.TargetCPUUtilization != nil { cpuTarget := autoscalingv2.MetricSpec{ Type: autoscalingv2.ResourceMetricSourceType, Resource: &autoscalingv2.ResourceMetricSource{ Name: corev1.ResourceCPU, Target: autoscalingv2.MetricTarget{ Type: autoscalingv2.UtilizationMetricType, - AverageUtilization: otelcol.Spec.Autoscaler.TargetCPUUtilization, + AverageUtilization: params.OtelCol.Spec.Autoscaler.TargetCPUUtilization, }, }, } @@ -93,19 +92,19 @@ func HorizontalPodAutoscaler(cfg config.Config, logger logr.Logger, otelcol v1al ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ APIVersion: v1alpha1.GroupVersion.String(), Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(otelcol.Name), + Name: naming.OpenTelemetryCollector(params.OtelCol.Name), }, - MinReplicas: otelcol.Spec.Autoscaler.MinReplicas, - MaxReplicas: *otelcol.Spec.Autoscaler.MaxReplicas, + MinReplicas: params.OtelCol.Spec.Autoscaler.MinReplicas, + MaxReplicas: *params.OtelCol.Spec.Autoscaler.MaxReplicas, Metrics: metrics, }, } - if otelcol.Spec.Autoscaler.Behavior != nil { - autoscaler.Spec.Behavior = otelcol.Spec.Autoscaler.Behavior + if params.OtelCol.Spec.Autoscaler.Behavior != nil { + autoscaler.Spec.Behavior = params.OtelCol.Spec.Autoscaler.Behavior } // convert from v1alpha1.MetricSpec into a autoscalingv2.MetricSpec. - for _, metric := range otelcol.Spec.Autoscaler.Metrics { + for _, metric := range params.OtelCol.Spec.Autoscaler.Metrics { if metric.Type == autoscalingv2.PodsMetricSourceType { v2metric := autoscalingv2.MetricSpec{ Type: metric.Type, diff --git a/internal/manifests/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go index 282271c62..8e9236068 100644 --- a/internal/manifests/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -24,6 +24,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) @@ -72,7 +73,12 @@ func TestHPA(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { configuration := config.New() - raw := HorizontalPodAutoscaler(configuration, logger, otelcol) + params := manifests.Params{ + Config: configuration, + OtelCol: otelcol, + Log: logger, + } + raw := HorizontalPodAutoscaler(params) hpa := raw.(*autoscalingv2.HorizontalPodAutoscaler) diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index b458d952a..36e7e15ae 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -23,51 +23,51 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func Ingress(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *networkingv1.Ingress { - if otelcol.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { +func Ingress(params manifests.Params) *networkingv1.Ingress { + if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { return nil } - ports := servicePortsFromCfg(logger, otelcol) + ports := servicePortsFromCfg(params.Log, params.OtelCol) // if we have no ports, we don't need a ingress entry if len(ports) == 0 { - logger.V(1).Info( + params.Log.V(1).Info( "the instance's configuration didn't yield any ports to open, skipping ingress", - "instance.name", otelcol.Name, - "instance.namespace", otelcol.Namespace, + "instance.name", params.OtelCol.Name, + "instance.namespace", params.OtelCol.Namespace, ) return nil } var rules []networkingv1.IngressRule - switch otelcol.Spec.Ingress.RuleType { + switch params.OtelCol.Spec.Ingress.RuleType { case v1alpha1.IngressRuleTypePath, "": - rules = []networkingv1.IngressRule{createPathIngressRules(otelcol.Name, otelcol.Spec.Ingress.Hostname, ports)} + rules = []networkingv1.IngressRule{createPathIngressRules(params.OtelCol.Name, params.OtelCol.Spec.Ingress.Hostname, ports)} case v1alpha1.IngressRuleTypeSubdomain: - rules = createSubdomainIngressRules(otelcol.Name, otelcol.Spec.Ingress.Hostname, ports) + rules = createSubdomainIngressRules(params.OtelCol.Name, params.OtelCol.Spec.Ingress.Hostname, ports) } return &networkingv1.Ingress{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(otelcol.Name), - Namespace: otelcol.Namespace, - Annotations: otelcol.Spec.Ingress.Annotations, + Name: naming.Ingress(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, + Annotations: params.OtelCol.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(otelcol.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, }, Spec: networkingv1.IngressSpec{ - TLS: otelcol.Spec.Ingress.TLS, + TLS: params.OtelCol.Spec.Ingress.TLS, Rules: rules, - IngressClassName: otelcol.Spec.Ingress.IngressClassName, + IngressClassName: params.OtelCol.Spec.Ingress.IngressClassName, }, } } diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index aa6b9998e..b4d862b18 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -37,7 +37,7 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressType("unknown"), @@ -46,7 +46,7 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params.Config, params.Log, params.Instance) + actual := Ingress(params) assert.Nil(t, actual) }) @@ -54,7 +54,7 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: "!!!", Ingress: v1alpha1.Ingress{ @@ -64,7 +64,7 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params.Config, params.Log, params.Instance) + actual := Ingress(params) assert.Nil(t, actual) }) @@ -72,7 +72,7 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: "---", Ingress: v1alpha1.Ingress{ @@ -82,7 +82,7 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params.Config, params.Log, params.Instance) + actual := Ingress(params) assert.Nil(t, actual) }) @@ -98,25 +98,25 @@ func TestDesiredIngresses(t *testing.T) { t.Fatal(err) } - params.Instance.Namespace = ns - params.Instance.Spec.Ingress = v1alpha1.Ingress{ + params.OtelCol.Namespace = ns + params.OtelCol.Spec.Ingress = v1alpha1.Ingress{ Type: v1alpha1.IngressTypeNginx, Hostname: hostname, Annotations: map[string]string{"some.key": "some.value"}, IngressClassName: &ingressClassName, } - got := Ingress(params.Config, params.Log, params.Instance) + got := Ingress(params) pathType := networkingv1.PathTypePrefix assert.NotEqual(t, &networkingv1.Ingress{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance.Name), + Name: naming.Ingress(params.OtelCol.Name), Namespace: ns, - Annotations: params.Instance.Spec.Ingress.Annotations, + Annotations: params.OtelCol.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, }, @@ -184,8 +184,8 @@ func TestDesiredIngresses(t *testing.T) { t.Fatal(err) } - params.Instance.Namespace = ns - params.Instance.Spec.Ingress = v1alpha1.Ingress{ + params.OtelCol.Namespace = ns + params.OtelCol.Spec.Ingress = v1alpha1.Ingress{ Type: v1alpha1.IngressTypeNginx, RuleType: v1alpha1.IngressRuleTypeSubdomain, Hostname: hostname, @@ -193,17 +193,17 @@ func TestDesiredIngresses(t *testing.T) { IngressClassName: &ingressClassName, } - got := Ingress(params.Config, params.Log, params.Instance) + got := Ingress(params) pathType := networkingv1.PathTypePrefix assert.NotEqual(t, &networkingv1.Ingress{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance.Name), + Name: naming.Ingress(params.OtelCol.Name), Namespace: ns, - Annotations: params.Instance.Spec.Ingress.Annotations, + Annotations: params.OtelCol.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, }, diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index d8e8899a9..c6fd4475e 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -17,28 +17,27 @@ package collector import ( "fmt" - "github.com/go-logr/logr" routev1 "github.com/openshift/api/route/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []*routev1.Route { - if otelcol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { +func Routes(params manifests.Params) []*routev1.Route { + if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { return nil } - if otelcol.Spec.Mode == v1alpha1.ModeSidecar { - logger.V(3).Info("ingress settings are not supported in sidecar mode") + if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { + params.Log.V(3).Info("ingress settings are not supported in sidecar mode") return nil } var tlsCfg *routev1.TLSConfig - switch otelcol.Spec.Ingress.Route.Termination { + switch params.OtelCol.Spec.Ingress.Route.Termination { case v1alpha1.TLSRouteTerminationTypeInsecure: // NOTE: insecure, no tls cfg. case v1alpha1.TLSRouteTerminationTypeEdge: @@ -51,14 +50,14 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr return nil } - ports := servicePortsFromCfg(logger, otelcol) + ports := servicePortsFromCfg(params.Log, params.OtelCol) // if we have no ports, we don't need a ingress entry if len(ports) == 0 { - logger.V(1).Info( + params.Log.V(1).Info( "the instance's configuration didn't yield any ports to open, skipping ingress", - "instance.name", otelcol.Name, - "instance.namespace", otelcol.Namespace, + "instance.name", params.OtelCol.Name, + "instance.namespace", params.OtelCol.Namespace, ) return nil } @@ -67,18 +66,18 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr for i, p := range ports { portName := naming.PortName(p.Name, p.Port) host := "" - if otelcol.Spec.Ingress.Hostname != "" { - host = fmt.Sprintf("%s.%s", portName, otelcol.Spec.Ingress.Hostname) + if params.OtelCol.Spec.Ingress.Hostname != "" { + host = fmt.Sprintf("%s.%s", portName, params.OtelCol.Spec.Ingress.Hostname) } routes[i] = &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(otelcol.Name, p.Name), - Namespace: otelcol.Namespace, - Annotations: otelcol.Spec.Ingress.Annotations, + Name: naming.Route(params.OtelCol.Name, p.Name), + Namespace: params.OtelCol.Namespace, + Annotations: params.OtelCol.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(otelcol.Name, p.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/name": naming.Route(params.OtelCol.Name, p.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, }, @@ -86,7 +85,7 @@ func Routes(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetr Host: host, To: routev1.RouteTargetReference{ Kind: "Service", - Name: naming.Service(otelcol.Name), + Name: naming.Service(params.OtelCol.Name), }, Port: &routev1.RoutePort{ TargetPort: intstr.FromString(portName), diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 395f54c67..19aefdbbc 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -36,7 +36,7 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressType("unknown"), @@ -45,7 +45,7 @@ func TestDesiredRoutes(t *testing.T) { }, } - actual := Routes(params.Config, params.Log, params.Instance) + actual := Routes(params) assert.Nil(t, actual) }) @@ -53,7 +53,7 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: "!!!", Ingress: v1alpha1.Ingress{ @@ -63,7 +63,7 @@ func TestDesiredRoutes(t *testing.T) { }, } - actual := Routes(params.Config, params.Log, params.Instance) + actual := Routes(params) assert.Nil(t, actual) }) @@ -71,7 +71,7 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{ Config: "---", Ingress: v1alpha1.Ingress{ @@ -81,7 +81,7 @@ func TestDesiredRoutes(t *testing.T) { }, } - actual := Routes(params.Config, params.Log, params.Instance) + actual := Routes(params) assert.Nil(t, actual) }) @@ -96,8 +96,8 @@ func TestDesiredRoutes(t *testing.T) { t.Fatal(err) } - params.Instance.Namespace = ns - params.Instance.Spec.Ingress = v1alpha1.Ingress{ + params.OtelCol.Namespace = ns + params.OtelCol.Spec.Ingress = v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, Hostname: hostname, Annotations: map[string]string{"some.key": "some.value"}, @@ -106,18 +106,19 @@ func TestDesiredRoutes(t *testing.T) { }, } - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) got := routes[0] assert.NotEqual(t, &routev1.Route{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance.Name, ""), + Name: naming.Route(params.OtelCol.Name, ""), Namespace: ns, - Annotations: params.Instance.Spec.Ingress.Annotations, + Annotations: params.OtelCol.Spec.Ingress.Annotations, Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance.Name, ""), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/name": naming.Route(params.OtelCol.Name, ""), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", }, }, Spec: routev1.RouteSpec{ @@ -144,8 +145,8 @@ func TestDesiredRoutes(t *testing.T) { t.Fatal(err) } - params.Instance.Namespace = "test" - params.Instance.Spec.Ingress = v1alpha1.Ingress{ + params.OtelCol.Namespace = "test" + params.OtelCol.Spec.Ingress = v1alpha1.Ingress{ Hostname: "example.com", Type: v1alpha1.IngressTypeRoute, Route: v1alpha1.OpenShiftRoute{ @@ -153,7 +154,7 @@ func TestDesiredRoutes(t *testing.T) { }, } - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) require.Equal(t, 3, len(routes)) assert.Equal(t, "web.example.com", routes[0].Spec.Host) assert.Equal(t, "otlp-grpc.example.com", routes[1].Spec.Host) @@ -165,15 +166,15 @@ func TestDesiredRoutes(t *testing.T) { t.Fatal(err) } - params.Instance.Namespace = "test" - params.Instance.Spec.Ingress = v1alpha1.Ingress{ + params.OtelCol.Namespace = "test" + params.OtelCol.Spec.Ingress = v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, Route: v1alpha1.OpenShiftRoute{ Termination: v1alpha1.TLSRouteTerminationTypeInsecure, }, } - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) require.Equal(t, 3, len(routes)) assert.Equal(t, "", routes[0].Spec.Host) assert.Equal(t, "", routes[1].Spec.Host) @@ -184,13 +185,13 @@ func TestDesiredRoutes(t *testing.T) { func TestRoutes(t *testing.T) { t.Run("wrong mode", func(t *testing.T) { params := deploymentParams() - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) assert.Nil(t, routes) }) t.Run("supported mode and service exists", func(t *testing.T) { params := deploymentParams() - routes := Routes(params.Config, params.Log, params.Instance) + routes := Routes(params) assert.Nil(t, routes) }) diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index c9430f621..e26f45ef0 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -34,16 +34,16 @@ const ( headlessExists = "Exists" ) -func HeadlessService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { - h := Service(cfg, logger, otelcol) +func HeadlessService(params manifests.Params) *corev1.Service { + h := Service(params) if h == nil { return h } - h.Name = naming.HeadlessService(otelcol.Name) + h.Name = naming.HeadlessService(params.OtelCol.Name) h.Labels[headlessLabel] = headlessExists - // copy to avoid modifying otelcol.Annotations + // copy to avoid modifying params.OtelCol.Annotations annotations := map[string]string{ "service.beta.openshift.io/serving-cert-secret-name": fmt.Sprintf("%s-tls", h.Name), } @@ -56,32 +56,32 @@ func HeadlessService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.Ope return h } -func MonitoringService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { - name := naming.MonitoringService(otelcol.Name) - labels := Labels(otelcol, name, []string{}) +func MonitoringService(params manifests.Params) *corev1.Service { + name := naming.MonitoringService(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, []string{}) - c, err := adapters.ConfigFromString(otelcol.Spec.Config) + c, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) // TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 if err != nil { - logger.Error(err, "couldn't extract the configuration") + params.Log.Error(err, "couldn't extract the configuration") return nil } - metricsPort, err := adapters.ConfigToMetricsPort(logger, c) + metricsPort, err := adapters.ConfigToMetricsPort(params.Log, c) if err != nil { - logger.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) + params.Log.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) metricsPort = 8888 } return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: otelcol.Annotations, + Annotations: params.OtelCol.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: SelectorLabels(otelcol), + Selector: SelectorLabels(params.OtelCol), ClusterIP: "", Ports: []corev1.ServicePort{{ Name: "monitoring", @@ -91,28 +91,28 @@ func MonitoringService(cfg config.Config, logger logr.Logger, otelcol v1alpha1.O } } -func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { - name := naming.Service(otelcol.Name) - labels := Labels(otelcol, name, []string{}) +func Service(params manifests.Params) *corev1.Service { + name := naming.Service(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, []string{}) - configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) + configFromString, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) if err != nil { - logger.Error(err, "couldn't extract the configuration from the context") + params.Log.Error(err, "couldn't extract the configuration from the context") return nil } - ports := adapters.ConfigToPorts(logger, configFromString) + ports := adapters.ConfigToPorts(params.Log, configFromString) // set appProtocol to h2c for grpc ports on OpenShift. // OpenShift uses HA proxy that uses appProtocol for its configuration. for i := range ports { h2c := "h2c" - if otelcol.Spec.Ingress.Type == v1alpha1.IngressTypeRoute && ports[i].AppProtocol != nil && strings.EqualFold(*ports[i].AppProtocol, "grpc") { + if params.OtelCol.Spec.Ingress.Type == v1alpha1.IngressTypeRoute && ports[i].AppProtocol != nil && strings.EqualFold(*ports[i].AppProtocol, "grpc") { ports[i].AppProtocol = &h2c } } - if len(otelcol.Spec.Ports) > 0 { + if len(params.OtelCol.Spec.Ports) > 0 { // we should add all the ports from the CR // there are two cases where problems might occur: // 1) when the port number is already being used by a receiver @@ -120,38 +120,38 @@ func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemet // // in the first case, we remove the port we inferred from the list // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(otelcol.Spec.Ports) + portNumbers, portNames := extractPortNumbersAndNames(params.OtelCol.Spec.Ports) var resultingInferredPorts []corev1.ServicePort for _, inferred := range ports { - if filtered := filterPort(logger, inferred, portNumbers, portNames); filtered != nil { + if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { resultingInferredPorts = append(resultingInferredPorts, *filtered) } } - ports = append(otelcol.Spec.Ports, resultingInferredPorts...) + ports = append(params.OtelCol.Spec.Ports, resultingInferredPorts...) } // if we have no ports, we don't need a service if len(ports) == 0 { - logger.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", otelcol.Name, "instance.namespace", otelcol.Namespace) + params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.OtelCol.Name, "instance.namespace", params.OtelCol.Namespace) return nil } trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster - if otelcol.Spec.Mode == v1alpha1.ModeDaemonSet { + if params.OtelCol.Spec.Mode == v1alpha1.ModeDaemonSet { trafficPolicy = corev1.ServiceInternalTrafficPolicyLocal } return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.Service(otelcol.Name), - Namespace: otelcol.Namespace, + Name: naming.Service(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: otelcol.Annotations, + Annotations: params.OtelCol.Annotations, }, Spec: corev1.ServiceSpec{ InternalTrafficPolicy: &trafficPolicy, - Selector: SelectorLabels(otelcol), + Selector: SelectorLabels(params.OtelCol), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index 51b10139a..fc2bcbfbf 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -98,7 +98,7 @@ func TestDesiredService(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `receivers: test: protocols: @@ -106,11 +106,11 @@ func TestDesiredService(t *testing.T) { }, } - actual := Service(params.Config, params.Log, params.Instance) + actual := Service(params) assert.Nil(t, actual) }) - t.Run("should return service with port mentioned in Instance.Spec.Ports and inferred ports", func(t *testing.T) { + t.Run("should return service with port mentioned in OtelCol.Spec.Ports and inferred ports", func(t *testing.T) { grpc := "grpc" jaegerPorts := v1.ServicePort{ @@ -120,9 +120,9 @@ func TestDesiredService(t *testing.T) { AppProtocol: &grpc, } params := deploymentParams() - ports := append(params.Instance.Spec.Ports, jaegerPorts) + ports := append(params.OtelCol.Spec.Ports, jaegerPorts) expected := service("test-collector", ports) - actual := Service(params.Config, params.Log, params.Instance) + actual := Service(params) assert.Equal(t, expected, *actual) @@ -138,10 +138,10 @@ func TestDesiredService(t *testing.T) { } params := deploymentParams() - params.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - actual := Service(params.Config, params.Log, params.Instance) + params.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + actual := Service(params) - ports := append(params.Instance.Spec.Ports, jaegerPort) + ports := append(params.OtelCol.Spec.Ports, jaegerPort) expected := service("test-collector", ports) assert.Equal(t, expected, *actual) }) @@ -156,9 +156,9 @@ func TestDesiredService(t *testing.T) { AppProtocol: &grpc, } p := paramsWithMode(v1alpha1.ModeDaemonSet) - ports := append(p.Instance.Spec.Ports, jaegerPorts) + ports := append(p.OtelCol.Spec.Ports, jaegerPorts) expected := serviceWithInternalTrafficPolicy("test-collector", ports, v1.ServiceInternalTrafficPolicyLocal) - actual := Service(p.Config, p.Log, p.Instance) + actual := Service(p) assert.Equal(t, expected, *actual) }) @@ -167,7 +167,7 @@ func TestDesiredService(t *testing.T) { func TestHeadlessService(t *testing.T) { t.Run("should return headless service", func(t *testing.T) { param := deploymentParams() - actual := HeadlessService(param.Config, param.Log, param.Instance) + actual := HeadlessService(param) assert.Equal(t, actual.GetAnnotations()["service.beta.openshift.io/serving-cert-secret-name"], "test-collector-headless-tls") assert.Equal(t, actual.Spec.ClusterIP, "None") }) @@ -180,7 +180,7 @@ func TestMonitoringService(t *testing.T) { Port: 8888, }} param := deploymentParams() - actual := MonitoringService(param.Config, param.Log, param.Instance) + actual := MonitoringService(param) assert.Equal(t, expected, actual.Spec.Ports) }) @@ -190,12 +190,12 @@ func TestMonitoringService(t *testing.T) { Port: 9090, }} params := deploymentParams() - params.Instance.Spec.Config = `service: + params.OtelCol.Spec.Config = `service: telemetry: metrics: level: detailed address: 0.0.0.0:9090` - actual := MonitoringService(params.Config, params.Log, params.Instance) + actual := MonitoringService(params) assert.NotNil(t, actual) assert.Equal(t, expected, actual.Spec.Ports) }) @@ -207,18 +207,18 @@ func service(name string, ports []v1.ServicePort) v1.Service { func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { params := deploymentParams() - labels := Labels(params.Instance, name, []string{}) + labels := Labels(params.OtelCol, name, []string{}) return v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: "default", Labels: labels, - Annotations: params.Instance.Annotations, + Annotations: params.OtelCol.Annotations, }, Spec: v1.ServiceSpec{ InternalTrafficPolicy: &internalTrafficPolicy, - Selector: SelectorLabels(params.Instance), + Selector: SelectorLabels(params.OtelCol), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index d802dfa6d..243885d7f 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -15,12 +15,11 @@ package collector import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -34,16 +33,16 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { } // ServiceAccount returns the service account for the given instance. -func ServiceAccount(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ServiceAccount { - name := naming.ServiceAccount(otelcol.Name) - labels := Labels(otelcol, name, []string{}) +func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { + name := naming.ServiceAccount(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, []string{}) return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: otelcol.Annotations, + Annotations: params.OtelCol.Annotations, }, } } diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 4c5ed9b78..abe78c8ce 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -23,40 +23,40 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // ServiceMonitor returns the service monitor for the given instance. -func ServiceMonitor(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) (*monitoringv1.ServiceMonitor, error) { - if !otelcol.Spec.Observability.Metrics.EnableMetrics { - logger.V(2).Info("Metrics disabled for this OTEL Collector", - "otelcol.name", otelcol.Name, - "otelcol.namespace", otelcol.Namespace, +func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, error) { + if !params.OtelCol.Spec.Observability.Metrics.EnableMetrics { + params.Log.V(2).Info("Metrics disabled for this OTEL Collector", + "params.OtelCol.name", params.OtelCol.Name, + "params.OtelCol.namespace", params.OtelCol.Namespace, ) return nil, nil } sm := monitoringv1.ServiceMonitor{ ObjectMeta: metav1.ObjectMeta{ - Namespace: otelcol.Namespace, - Name: naming.ServiceMonitor(otelcol.Name), + Namespace: params.OtelCol.Namespace, + Name: naming.ServiceMonitor(params.OtelCol.Name), Labels: map[string]string{ - "app.kubernetes.io/name": naming.ServiceMonitor(otelcol.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/name": naming.ServiceMonitor(params.OtelCol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }, }, Spec: monitoringv1.ServiceMonitorSpec{ Endpoints: []monitoringv1.Endpoint{}, NamespaceSelector: monitoringv1.NamespaceSelector{ - MatchNames: []string{otelcol.Namespace}, + MatchNames: []string{params.OtelCol.Namespace}, }, Selector: metav1.LabelSelector{ MatchLabels: map[string]string{ "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), }, }, }, @@ -68,7 +68,7 @@ func ServiceMonitor(cfg config.Config, logger logr.Logger, otelcol v1alpha1.Open }, } - sm.Spec.Endpoints = append(endpoints, endpointsFromConfig(logger, otelcol)...) + sm.Spec.Endpoints = append(endpoints, endpointsFromConfig(params.Log, params.OtelCol)...) return &sm, nil } diff --git a/internal/manifests/collector/servicemonitor_test.go b/internal/manifests/collector/servicemonitor_test.go index 9c1605c95..c3fdf0c96 100644 --- a/internal/manifests/collector/servicemonitor_test.go +++ b/internal/manifests/collector/servicemonitor_test.go @@ -24,26 +24,26 @@ import ( func TestDesiredServiceMonitors(t *testing.T) { params := deploymentParams() - actual, err := ServiceMonitor(params.Config, params.Log, params.Instance) + actual, err := ServiceMonitor(params) assert.NoError(t, err) assert.Nil(t, actual) - params.Instance.Spec.Observability.Metrics.EnableMetrics = true - actual, err = ServiceMonitor(params.Config, params.Log, params.Instance) + params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true + actual, err = ServiceMonitor(params) assert.NoError(t, err) assert.NotNil(t, actual) - assert.Equal(t, fmt.Sprintf("%s-collector", params.Instance.Name), actual.Name) - assert.Equal(t, params.Instance.Namespace, actual.Namespace) + assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) + assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) params, err = newParams("", "testdata/prometheus-exporter.yaml") assert.NoError(t, err) - params.Instance.Spec.Observability.Metrics.EnableMetrics = true - actual, err = ServiceMonitor(params.Config, params.Log, params.Instance) + params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true + actual, err = ServiceMonitor(params) assert.NoError(t, err) assert.NotNil(t, actual) - assert.Equal(t, fmt.Sprintf("%s-collector", params.Instance.Name), actual.Name) - assert.Equal(t, params.Instance.Namespace, actual.Namespace) + assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) + assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) assert.Equal(t, "prometheus-dev", actual.Spec.Endpoints[1].Port) assert.Equal(t, "prometheus-prod", actual.Spec.Endpoints[2].Port) diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index 08da8dc00..85afb33cc 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -15,35 +15,33 @@ package collector import ( - "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // StatefulSet builds the statefulset for the given instance. -func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.StatefulSet { - name := naming.Collector(otelcol.Name) - labels := Labels(otelcol, name, cfg.LabelsFilter()) +func StatefulSet(params manifests.Params) *appsv1.StatefulSet { + name := naming.Collector(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) - annotations := Annotations(otelcol) - podAnnotations := PodAnnotations(otelcol) + annotations := Annotations(params.OtelCol) + podAnnotations := PodAnnotations(params.OtelCol) return &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, Annotations: annotations, }, Spec: appsv1.StatefulSetSpec{ - ServiceName: naming.Service(otelcol.Name), + ServiceName: naming.Service(params.OtelCol.Name), Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(otelcol), + MatchLabels: SelectorLabels(params.OtelCol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ @@ -51,23 +49,23 @@ func StatefulSet(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTel Annotations: podAnnotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - InitContainers: otelcol.Spec.InitContainers, - Containers: append(otelcol.Spec.AdditionalContainers, Container(cfg, logger, otelcol, true)), - Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDNSPolicy(otelcol), - HostNetwork: otelcol.Spec.HostNetwork, - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - SecurityContext: otelcol.Spec.PodSecurityContext, - PriorityClassName: otelcol.Spec.PriorityClassName, - Affinity: otelcol.Spec.Affinity, - TopologySpreadConstraints: otelcol.Spec.TopologySpreadConstraints, + ServiceAccountName: ServiceAccountName(params.OtelCol), + InitContainers: params.OtelCol.Spec.InitContainers, + Containers: append(params.OtelCol.Spec.AdditionalContainers, Container(params.Config, params.Log, params.OtelCol, true)), + Volumes: Volumes(params.Config, params.OtelCol), + DNSPolicy: getDNSPolicy(params.OtelCol), + HostNetwork: params.OtelCol.Spec.HostNetwork, + Tolerations: params.OtelCol.Spec.Tolerations, + NodeSelector: params.OtelCol.Spec.NodeSelector, + SecurityContext: params.OtelCol.Spec.PodSecurityContext, + PriorityClassName: params.OtelCol.Spec.PriorityClassName, + Affinity: params.OtelCol.Spec.Affinity, + TopologySpreadConstraints: params.OtelCol.Spec.TopologySpreadConstraints, }, }, - Replicas: otelcol.Spec.Replicas, + Replicas: params.OtelCol.Spec.Replicas, PodManagementPolicy: "Parallel", - VolumeClaimTemplates: VolumeClaimTemplates(otelcol), + VolumeClaimTemplates: VolumeClaimTemplates(params.OtelCol), }, } } diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index e2e016da5..332399ed7 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -26,6 +26,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) @@ -43,8 +44,14 @@ func TestStatefulSetNewDefault(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - ss := StatefulSet(cfg, logger, otelcol) + ss := StatefulSet(params) // verify assert.Equal(t, "my-instance-collector", ss.Name) @@ -109,8 +116,14 @@ func TestStatefulSetReplicas(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - ss := StatefulSet(cfg, logger, otelcol) + ss := StatefulSet(params) // assert correct number of replicas assert.Equal(t, int32(3), *ss.Spec.Replicas) @@ -139,8 +152,14 @@ func TestStatefulSetVolumeClaimTemplates(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - ss := StatefulSet(cfg, logger, otelcol) + ss := StatefulSet(params) // assert correct pvc name assert.Equal(t, "added-volume", ss.Spec.VolumeClaimTemplates[0].Name) @@ -165,8 +184,14 @@ func TestStatefulSetPodAnnotations(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - ss := StatefulSet(cfg, logger, otelcol) + ss := StatefulSet(params) // Add sha256 podAnnotation testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" @@ -203,7 +228,13 @@ func TestStatefulSetPodSecurityContext(t *testing.T) { cfg := config.New() - d := StatefulSet(cfg, logger, otelcol) + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + + d := StatefulSet(params) assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) @@ -220,7 +251,13 @@ func TestStatefulSetHostNetwork(t *testing.T) { cfg := config.New() - d1 := StatefulSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + + d1 := StatefulSet(params1) assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) @@ -237,7 +274,13 @@ func TestStatefulSetHostNetwork(t *testing.T) { cfg = config.New() - d2 := StatefulSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2 := StatefulSet(params2) assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) } @@ -258,7 +301,13 @@ func TestStatefulSetFilterLabels(t *testing.T) { cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) - d := StatefulSet(cfg, logger, otelcol) + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + + d := StatefulSet(params) assert.Len(t, d.ObjectMeta.Labels, 6) for k := range excludedLabels { @@ -276,7 +325,13 @@ func TestStatefulSetNodeSelector(t *testing.T) { cfg := config.New() - d1 := StatefulSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + + d1 := StatefulSet(params1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) @@ -295,7 +350,13 @@ func TestStatefulSetNodeSelector(t *testing.T) { cfg = config.New() - d2 := StatefulSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2 := StatefulSet(params2) assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) } @@ -308,7 +369,13 @@ func TestStatefulSetPriorityClassName(t *testing.T) { cfg := config.New() - sts1 := StatefulSet(cfg, logger, otelcol1) + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + + sts1 := StatefulSet(params1) assert.Empty(t, sts1.Spec.Template.Spec.PriorityClassName) priorityClassName := "test-class" @@ -324,7 +391,13 @@ func TestStatefulSetPriorityClassName(t *testing.T) { cfg = config.New() - sts2 := StatefulSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + sts2 := StatefulSet(params2) assert.Equal(t, priorityClassName, sts2.Spec.Template.Spec.PriorityClassName) } @@ -337,7 +410,13 @@ func TestStatefulSetAffinity(t *testing.T) { cfg := config.New() - sts1 := Deployment(cfg, logger, otelcol1) + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + + sts1 := Deployment(params1) assert.Nil(t, sts1.Spec.Template.Spec.Affinity) otelcol2 := v1alpha1.OpenTelemetryCollector{ @@ -351,7 +430,13 @@ func TestStatefulSetAffinity(t *testing.T) { cfg = config.New() - sts2 := StatefulSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + sts2 := StatefulSet(params2) assert.NotNil(t, sts2.Spec.Template.Spec.Affinity) assert.Equal(t, *testAffinityValue, *sts2.Spec.Template.Spec.Affinity) } @@ -373,8 +458,14 @@ func TestStatefulSetInitContainer(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - s := StatefulSet(cfg, logger, otelcol) + s := StatefulSet(params) assert.Equal(t, "my-instance-collector", s.Name) assert.Equal(t, "my-instance-collector", s.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", s.Annotations["prometheus.io/scrape"]) @@ -392,7 +483,13 @@ func TestStatefulSetTopologySpreadConstraints(t *testing.T) { } cfg := config.New() - s1 := StatefulSet(cfg, logger, otelcol1) + + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + s1 := StatefulSet(params1) assert.Equal(t, "my-instance-collector", s1.Name) assert.Empty(t, s1.Spec.Template.Spec.TopologySpreadConstraints) @@ -408,7 +505,13 @@ func TestStatefulSetTopologySpreadConstraints(t *testing.T) { cfg = config.New() - s2 := StatefulSet(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + s2 := StatefulSet(params2) assert.Equal(t, "my-instance-topologyspreadconstraint-collector", s2.Name) assert.NotNil(t, s2.Spec.Template.Spec.TopologySpreadConstraints) assert.NotEmpty(t, s2.Spec.Template.Spec.TopologySpreadConstraints) @@ -432,8 +535,14 @@ func TestStatefulSetAdditionalContainers(t *testing.T) { } cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - s := StatefulSet(cfg, logger, otelcol) + s := StatefulSet(params) assert.Equal(t, "my-instance-collector", s.Name) assert.Equal(t, "my-instance-collector", s.Labels["app.kubernetes.io/name"]) assert.Equal(t, "true", s.Annotations["prometheus.io/scrape"]) diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index 4fb783119..7b6665aa4 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -52,7 +52,7 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { } return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", @@ -101,7 +101,7 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", diff --git a/internal/manifests/params.go b/internal/manifests/params.go index c3c943402..ac0156903 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -30,6 +30,6 @@ type Params struct { Recorder record.EventRecorder Scheme *runtime.Scheme Log logr.Logger - Instance v1alpha1.OpenTelemetryCollector + OtelCol v1alpha1.OpenTelemetryCollector Config config.Config } diff --git a/internal/manifests/targetallocator/annotations_test.go b/internal/manifests/targetallocator/annotations_test.go index e9cea2b14..f50a9d77f 100644 --- a/internal/manifests/targetallocator/annotations_test.go +++ b/internal/manifests/targetallocator/annotations_test.go @@ -24,6 +24,7 @@ import ( "github.com/stretchr/testify/require" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) func TestPodAnnotations(t *testing.T) { @@ -38,7 +39,12 @@ func TestPodAnnotations(t *testing.T) { func TestConfigMapHash(t *testing.T) { cfg := config.New() instance := collectorInstance() - expectedConfigMap, err := ConfigMap(cfg, logr.Discard(), instance) + params := manifests.Params{ + OtelCol: instance, + Config: cfg, + Log: logr.Discard(), + } + expectedConfigMap, err := ConfigMap(params) require.NoError(t, err) expectedConfig := expectedConfigMap.Data[targetAllocatorFilename] require.NotEmpty(t, expectedConfig) diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index 0ddf44fa1..8cf40802a 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -17,13 +17,12 @@ package targetallocator import ( "strings" - "github.com/go-logr/logr" "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" @@ -33,10 +32,10 @@ const ( targetAllocatorFilename = "targetallocator.yaml" ) -func ConfigMap(cfg config.Config, logger logr.Logger, instance v1alpha1.OpenTelemetryCollector) (*corev1.ConfigMap, error) { - name := naming.TAConfigMap(instance.Name) - version := strings.Split(instance.Spec.Image, ":") - labels := Labels(instance, name) +func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { + name := naming.TAConfigMap(params.OtelCol.Name) + version := strings.Split(params.OtelCol.Spec.Image, ":") + labels := Labels(params.OtelCol, name) if len(version) > 1 { labels["app.kubernetes.io/version"] = version[len(version)-1] } else { @@ -45,39 +44,39 @@ func ConfigMap(cfg config.Config, logger logr.Logger, instance v1alpha1.OpenTele // Collector supports environment variable substitution, but the TA does not. // TA ConfigMap should have a single "$", as it does not support env var substitution - prometheusReceiverConfig, err := adapters.UnescapeDollarSignsInPromConfig(instance.Spec.Config) + prometheusReceiverConfig, err := adapters.UnescapeDollarSignsInPromConfig(params.OtelCol.Spec.Config) if err != nil { return &corev1.ConfigMap{}, err } taConfig := make(map[interface{}]interface{}) prometheusCRConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = collector.SelectorLabels(instance) + taConfig["label_selector"] = collector.SelectorLabels(params.OtelCol) // We only take the "config" from the returned object, if it's present if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { taConfig["config"] = prometheusConfig } - if len(instance.Spec.TargetAllocator.AllocationStrategy) > 0 { - taConfig["allocation_strategy"] = instance.Spec.TargetAllocator.AllocationStrategy + if len(params.OtelCol.Spec.TargetAllocator.AllocationStrategy) > 0 { + taConfig["allocation_strategy"] = params.OtelCol.Spec.TargetAllocator.AllocationStrategy } else { taConfig["allocation_strategy"] = v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted } - if len(instance.Spec.TargetAllocator.FilterStrategy) > 0 { - taConfig["filter_strategy"] = instance.Spec.TargetAllocator.FilterStrategy + if len(params.OtelCol.Spec.TargetAllocator.FilterStrategy) > 0 { + taConfig["filter_strategy"] = params.OtelCol.Spec.TargetAllocator.FilterStrategy } - if instance.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Size() > 0 { - prometheusCRConfig["scrape_interval"] = instance.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Duration + if params.OtelCol.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Size() > 0 { + prometheusCRConfig["scrape_interval"] = params.OtelCol.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Duration } - if instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { - taConfig["service_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector + if params.OtelCol.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { + taConfig["service_monitor_selector"] = ¶ms.OtelCol.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector } - if instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { - taConfig["pod_monitor_selector"] = &instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector + if params.OtelCol.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { + taConfig["pod_monitor_selector"] = ¶ms.OtelCol.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector } if len(prometheusCRConfig) > 0 { @@ -92,9 +91,9 @@ func ConfigMap(cfg config.Config, logger logr.Logger, instance v1alpha1.OpenTele return &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: instance.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: instance.Annotations, + Annotations: params.OtelCol.Annotations, }, Data: map[string]string{ targetAllocatorFilename: string(taConfigYAML), diff --git a/internal/manifests/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go index 538d1d0af..8baa20240 100644 --- a/internal/manifests/targetallocator/configmap_test.go +++ b/internal/manifests/targetallocator/configmap_test.go @@ -23,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) func TestDesiredConfigMap(t *testing.T) { @@ -56,7 +57,12 @@ label_selector: } instance := collectorInstance() cfg := config.New() - actual, err := ConfigMap(cfg, logr.Discard(), instance) + params := manifests.Params{ + OtelCol: instance, + Config: cfg, + Log: logr.Discard(), + } + actual, err := ConfigMap(params) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) @@ -97,7 +103,12 @@ service_monitor_selector: "release": "my-instance", } cfg := config.New() - actual, err := ConfigMap(cfg, logr.Discard(), instance) + params := manifests.Params{ + OtelCol: instance, + Config: cfg, + Log: logr.Discard(), + } + actual, err := ConfigMap(params) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) @@ -132,7 +143,12 @@ prometheus_cr: collector := collectorInstance() collector.Spec.TargetAllocator.PrometheusCR.ScrapeInterval = &metav1.Duration{Duration: time.Second * 30} cfg := config.New() - actual, err := ConfigMap(cfg, logr.Discard(), collector) + params := manifests.Params{ + OtelCol: collector, + Config: cfg, + Log: logr.Discard(), + } + actual, err := ConfigMap(params) assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", actual.Name) diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index 426e4d119..6a961291d 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -15,36 +15,34 @@ package targetallocator import ( - "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Deployment builds the deployment for the given instance. -func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *appsv1.Deployment { - name := naming.TargetAllocator(otelcol.Name) - labels := Labels(otelcol, name) +func Deployment(params manifests.Params) *appsv1.Deployment { + name := naming.TargetAllocator(params.OtelCol.Name) + labels := Labels(params.OtelCol, name) - configMap, err := ConfigMap(cfg, logger, otelcol) + configMap, err := ConfigMap(params) if err != nil { - logger.Info("failed to construct target allocator config map for annotations") + params.Log.Info("failed to construct target allocator config map for annotations") configMap = nil } - annotations := Annotations(otelcol, configMap) + annotations := Annotations(params.OtelCol, configMap) return &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, }, Spec: appsv1.DeploymentSpec{ - Replicas: otelcol.Spec.TargetAllocator.Replicas, + Replicas: params.OtelCol.Spec.TargetAllocator.Replicas, Selector: &metav1.LabelSelector{ MatchLabels: labels, }, @@ -54,11 +52,11 @@ func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTele Annotations: annotations, }, Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol)}, - Volumes: Volumes(cfg, otelcol), - NodeSelector: otelcol.Spec.TargetAllocator.NodeSelector, - TopologySpreadConstraints: otelcol.Spec.TargetAllocator.TopologySpreadConstraints, + ServiceAccountName: ServiceAccountName(params.OtelCol), + Containers: []corev1.Container{Container(params.Config, params.Log, params.OtelCol)}, + Volumes: Volumes(params.Config, params.OtelCol), + NodeSelector: params.OtelCol.Spec.TargetAllocator.NodeSelector, + TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints, }, }, }, diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index 295fd791b..1e4b12cd8 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -25,6 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ @@ -45,8 +46,14 @@ func TestDeploymentNewDefault(t *testing.T) { otelcol := collectorInstance() cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - d := Deployment(cfg, logger, otelcol) + d := Deployment(params) // verify assert.Equal(t, "my-instance-targetallocator", d.GetName()) @@ -69,8 +76,14 @@ func TestDeploymentPodAnnotations(t *testing.T) { otelcol.Spec.PodAnnotations = testPodAnnotationValues cfg := config.New() + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + // test - ds := Deployment(cfg, logger, otelcol) + ds := Deployment(params) // verify assert.Equal(t, "my-instance-targetallocator", ds.Name) @@ -103,7 +116,13 @@ func TestDeploymentNodeSelector(t *testing.T) { } cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + d1 := Deployment(params1) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector @@ -122,7 +141,13 @@ func TestDeploymentNodeSelector(t *testing.T) { cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2 := Deployment(params2) assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) } @@ -135,7 +160,13 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { } cfg := config.New() - d1 := Deployment(cfg, logger, otelcol1) + + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + d1 := Deployment(params1) assert.Equal(t, "my-instance-targetallocator", d1.Name) assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) @@ -152,7 +183,13 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { } cfg = config.New() - d2 := Deployment(cfg, logger, otelcol2) + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2 := Deployment(params2) assert.Equal(t, "my-instance-topologyspreadconstraint-targetallocator", d2.Name) assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go index 3d8916631..684b3ebcc 100644 --- a/internal/manifests/targetallocator/service.go +++ b/internal/manifests/targetallocator/service.go @@ -15,26 +15,24 @@ package targetallocator import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func Service(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.Service { - name := naming.TAService(otelcol.Name) - labels := Labels(otelcol, name) +func Service(params manifests.Params) *corev1.Service { + name := naming.TAService(params.OtelCol.Name) + labels := Labels(params.OtelCol, name) - selector := Labels(otelcol, name) + selector := Labels(params.OtelCol, name) return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ - Name: naming.TAService(otelcol.Name), - Namespace: otelcol.Namespace, + Name: naming.TAService(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, Labels: labels, }, Spec: corev1.ServiceSpec{ diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go index 56d5b1cd7..c9cf73299 100644 --- a/internal/manifests/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -15,11 +15,10 @@ package targetallocator import ( - "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -35,16 +34,16 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { } // ServiceAccount returns the service account for the given instance. -func ServiceAccount(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) *corev1.ServiceAccount { - name := naming.TargetAllocatorServiceAccount(otelcol.Name) - labels := Labels(otelcol, name) +func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { + name := naming.TargetAllocatorServiceAccount(params.OtelCol.Name) + labels := Labels(params.OtelCol, name) return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: name, - Namespace: otelcol.Namespace, + Namespace: params.OtelCol.Namespace, Labels: labels, - Annotations: otelcol.Annotations, + Annotations: params.OtelCol.Annotations, }, } } diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 2a21ccdfd..2b2e14e1c 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -23,7 +23,7 @@ import ( // Build creates the manifest for the TargetAllocator resource. func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object - if !params.Instance.Spec.TargetAllocator.Enabled { + if !params.OtelCol.Spec.TargetAllocator.Enabled { return resourceManifests, nil } resourceFactories := []manifests.K8sManifestFactory{ @@ -33,7 +33,7 @@ func Build(params manifests.Params) ([]client.Object, error) { manifests.FactoryWithoutError(Service), } for _, factory := range resourceFactories { - res, err := factory(params.Config, params.Log, params.Instance) + res, err := factory(params) if err != nil { return nil, err } else if manifests.ObjectIsNotNil(res) { diff --git a/internal/status/handle.go b/internal/status/handle.go index 0b5614615..cb9e75f23 100644 --- a/internal/status/handle.go +++ b/internal/status/handle.go @@ -41,10 +41,10 @@ const ( func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { log.V(2).Info("updating collector status") if err != nil { - params.Recorder.Event(¶ms.Instance, eventTypeWarning, reasonError, err.Error()) + params.Recorder.Event(¶ms.OtelCol, eventTypeWarning, reasonError, err.Error()) return ctrl.Result{}, err } - changed := params.Instance.DeepCopy() + changed := params.OtelCol.DeepCopy() up := &collectorupgrade.VersionUpgrade{ Log: params.Log, @@ -63,7 +63,7 @@ func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifest params.Recorder.Event(changed, eventTypeWarning, reasonStatusFailure, statusErr.Error()) return ctrl.Result{}, statusErr } - statusPatch := client.MergeFrom(¶ms.Instance) + statusPatch := client.MergeFrom(¶ms.OtelCol) if err := params.Client.Status().Patch(ctx, changed, statusPatch); err != nil { return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) } diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go index 8288edbe9..a7cf081f7 100644 --- a/pkg/collector/reconcile/route.go +++ b/pkg/collector/reconcile/route.go @@ -34,19 +34,19 @@ import ( // TODO: This functionality should be put with the rest of reconciliation logic in the mutate.go // https://github.com/open-telemetry/opentelemetry-operator/issues/2108 func Routes(ctx context.Context, params manifests.Params) error { - if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { + if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { return nil } isSupportedMode := true - if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { + if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { params.Log.V(3).Info("ingress settings are not supported in sidecar mode") isSupportedMode = false } var desired []*routev1.Route if isSupportedMode { - if r := collector.Routes(params.Config, params.Log, params.Instance); r != nil { + if r := collector.Routes(params); r != nil { desired = append(desired, r...) } } @@ -68,7 +68,7 @@ func expectedRoutes(ctx context.Context, params manifests.Params, expected []*ro for _, obj := range expected { desired := obj - if err := controllerutil.SetControllerReference(¶ms.Instance, desired, params.Scheme); err != nil { + if err := controllerutil.SetControllerReference(¶ms.OtelCol, desired, params.Scheme); err != nil { return fmt.Errorf("failed to set controller reference: %w", err) } @@ -119,9 +119,9 @@ func expectedRoutes(ctx context.Context, params manifests.Params, expected []*ro func deleteRoutes(ctx context.Context, params manifests.Params, expected []*routev1.Route) error { opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), + client.InNamespace(params.OtelCol.Namespace), client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", }), } diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go index 8852e96be..3d305ee2b 100644 --- a/pkg/collector/reconcile/route_test.go +++ b/pkg/collector/reconcile/route_test.go @@ -37,24 +37,24 @@ func TestExpectedRoutes(t *testing.T) { if err != nil { t.Fatal(err) } - params.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - params.Instance.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure + params.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + params.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - routes := collector.Routes(params.Config, params.Log, params.Instance) + routes := collector.Routes(params) err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) - nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: "otlp-grpc-test-route"} + nns := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} exists, err := populateObjectIfExists(t, &routev1.Route{}, nns) assert.NoError(t, err) assert.True(t, exists) // update fields const expectHostname = "something-else.com" - params.Instance.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} - params.Instance.Spec.Ingress.Hostname = expectHostname + params.OtelCol.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} + params.OtelCol.Spec.Ingress.Hostname = expectHostname - routes = collector.Routes(params.Config, params.Log, params.Instance) + routes = collector.Routes(params) err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) @@ -82,9 +82,9 @@ func TestDeleteRoutes(t *testing.T) { if err != nil { t.Fatal(err) } - myParams.Instance.Spec.Ingress.Type = v1alpha1.IngressTypeRoute + myParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - routes := collector.Routes(myParams.Config, myParams.Log, myParams.Instance) + routes := collector.Routes(myParams) err = expectedRoutes(ctx, myParams, routes) assert.NoError(t, err) diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index d517a10d0..9feec9945 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -203,7 +203,7 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", @@ -254,7 +254,7 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, Client: k8sClient, - Instance: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "opentelemetry.io", APIVersion: "v1", From 09f9d636ac5f7b7d34057caafc393451afb94909 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 3 Oct 2023 16:45:58 +0200 Subject: [PATCH 1058/1234] [chore] Build and publish the Apache HTTPD image for the E2E tests (#2085) * Build and publish the Apache HTTPD E2E image Signed-off-by: Israel Blancas * Reduce the number of files to commit Signed-off-by: Israel Blancas * Build the image using multiple architectures Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Use reusable workflow Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../workflows/publish-autoinstrumentation-e2e-images.yaml | 5 +++++ tests/instrumentation-e2e-apps/apache-httpd/Dockerfile | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 tests/instrumentation-e2e-apps/apache-httpd/Dockerfile diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 5ceb0b9da..588e65c79 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -23,6 +23,11 @@ jobs: with: language: golang platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + apache-httpd: + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: apache-httpd + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le dotnet: uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml with: diff --git a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile new file mode 100644 index 000000000..7c8c3ef39 --- /dev/null +++ b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile @@ -0,0 +1,5 @@ + +FROM httpd:2.4-alpine + +RUN sed -i "s#Listen 80#Listen 8080#g" /usr/local/apache2/conf/httpd.conf +RUN chmod 777 -R /usr/local/apache2/ From e30034fb8e42aa73ec6c45b01f466a48c307828c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Tue, 3 Oct 2023 16:46:26 +0200 Subject: [PATCH 1059/1234] Fix .NET Automatic Instrumentation configured by namespace annotation (alpine based images) (#2186) * Failing test * Fix * Changelog * remove test line --- ...179-fix-dotnet-auto-by-ns-annotations.yaml | 16 ++ pkg/instrumentation/dotnet.go | 3 +- pkg/instrumentation/dotnet_test.go | 37 +--- pkg/instrumentation/podmutator.go | 6 +- pkg/instrumentation/podmutator_test.go | 179 ++++++++++++++++++ pkg/instrumentation/sdk.go | 2 +- 6 files changed, 207 insertions(+), 36 deletions(-) create mode 100644 .chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml diff --git a/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml b/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml new file mode 100644 index 000000000..8f47a1d0c --- /dev/null +++ b/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Fix .NET Automatic Instrumentation for alpine based images configured by namespace annotations" + +# One or more tracking issues related to the change +issues: [2179] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 77dd814f6..483725790 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -50,7 +50,7 @@ const ( dotNetRuntimeLinuxMusl = "linux-musl-x64" ) -func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (corev1.Pod, error) { +func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int, runtime string) (corev1.Pod, error) { // caller checks if there is at least one container. container := &pod.Spec.Containers[index] @@ -72,7 +72,6 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor return pod, errors.New("OTEL_DOTNET_AUTO_HOME environment variable is already set in the .NET instrumentation spec") } - runtime := pod.Annotations[annotationDotNetRuntime] coreClrProfilerPath := "" switch runtime { case "", dotNetRuntimeLinuxGlibc: diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index f17a04745..9da037d51 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -30,6 +30,7 @@ func TestInjectDotNetSDK(t *testing.T) { name string v1alpha1.DotNet pod corev1.Pod + runtime string expected corev1.Pod err error }{ @@ -375,12 +376,8 @@ func TestInjectDotNetSDK(t *testing.T) { {}, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: dotNetRuntimeLinuxGlibc, - }, - }, }, + runtime: dotNetRuntimeLinuxGlibc, expected: corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ @@ -446,11 +443,6 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: dotNetRuntimeLinuxGlibc, - }, - }, }, err: nil, }, @@ -463,12 +455,8 @@ func TestInjectDotNetSDK(t *testing.T) { {}, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: dotNetRuntimeLinuxMusl, - }, - }, }, + runtime: dotNetRuntimeLinuxMusl, expected: corev1.Pod{ Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ @@ -534,11 +522,6 @@ func TestInjectDotNetSDK(t *testing.T) { }, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: dotNetRuntimeLinuxMusl, - }, - }, }, err: nil, }, @@ -551,23 +534,15 @@ func TestInjectDotNetSDK(t *testing.T) { {}, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: "not-supported", - }, - }, + ObjectMeta: metav1.ObjectMeta{}, }, + runtime: "not-supported", expected: corev1.Pod{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ {}, }, }, - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - annotationDotNetRuntime: "not-supported", - }, - }, }, err: fmt.Errorf("provided instrumentation.opentelemetry.io/dotnet-runtime annotation value 'not-supported' is not supported"), }, @@ -575,7 +550,7 @@ func TestInjectDotNetSDK(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - pod, err := injectDotNetSDK(test.DotNet, test.pod, 0) + pod, err := injectDotNetSDK(test.DotNet, test.pod, 0, test.runtime) assert.Equal(t, test.expected, pod) assert.Equal(t, test.err, err) }) diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 49cc9731c..06ff988d6 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -44,8 +44,9 @@ type instPodMutator struct { } type instrumentationWithContainers struct { - Instrumentation *v1alpha1.Instrumentation - Containers string + Instrumentation *v1alpha1.Instrumentation + Containers string + AdditionalAnnotations map[string]string } type languageInstrumentations struct { @@ -251,6 +252,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c } if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() || inst == nil { insts.DotNet.Instrumentation = inst + insts.DotNet.AdditionalAnnotations = map[string]string{annotationDotNetRuntime: annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationDotNetRuntime)} } else { logger.Error(nil, "support for .NET auto instrumentation is not enabled") pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for .NET auto instrumentation is not enabled") diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 996e44b6a..4eca4610e 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1812,6 +1812,185 @@ func TestMutatePod(t *testing.T) { }, }, }, + { + name: "dotnet injection, by namespace annotations", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "dotnet-by-namespace-annotation", + Annotations: map[string]string{ + annotationInjectDotNet: "example-inst", + annotationDotNetRuntime: dotNetRuntimeLinuxMusl, + }, + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "example-inst", + Namespace: "dotnet-by-namespace-annotation", + }, + Spec: v1alpha1.InstrumentationSpec{ + DotNet: v1alpha1.DotNet{ + Image: "otel/dotnet:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://collector:12345", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{}, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{}, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: dotnetVolumeName, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{ + SizeLimit: &defaultVolumeLimitSize, + }, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: dotnetInitContainerName, + Image: "otel/dotnet:1", + Command: []string{"cp", "-a", "/autoinstrumentation/.", dotnetInstrMountPath}, + VolumeMounts: []corev1.VolumeMount{{ + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }}, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + { + Name: envDotNetCoreClrEnableProfiling, + Value: dotNetCoreClrEnableProfilingEnabled, + }, + { + Name: envDotNetCoreClrProfiler, + Value: dotNetCoreClrProfilerID, + }, + { + Name: envDotNetCoreClrProfilerPath, + Value: dotNetCoreClrProfilerMuslPath, + }, + { + Name: envDotNetStartupHook, + Value: dotNetStartupHookPath, + }, + { + Name: envDotNetAdditionalDeps, + Value: dotNetAdditionalDepsPath, + }, + { + Name: envDotNetOTelAutoHome, + Value: dotNetOTelAutoHomePath, + }, + { + Name: envDotNetSharedStore, + Value: dotNetSharedStorePath, + }, + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + { + Name: "SPLUNK_TRACE_RESPONSE_HEADER_ENABLED", + Value: "true", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "app", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.namespace.name=dotnet-by-namespace-annotation,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME)", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: dotnetVolumeName, + MountPath: dotnetInstrMountPath, + }, + }, + }, + }, + }, + }, + }, { name: "dotnet injection multiple containers, true", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 330f6456b..2a064cb2a 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -122,7 +122,7 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations for _, container := range strings.Split(dotnetContainers, ",") { index := getContainerIndex(container, pod) - pod, err = injectDotNetSDK(otelinst.Spec.DotNet, pod, index) + pod, err = injectDotNetSDK(otelinst.Spec.DotNet, pod, index, insts.DotNet.AdditionalAnnotations[annotationDotNetRuntime]) if err != nil { i.logger.Info("Skipping DotNet SDK injection", "reason", err.Error(), "container", pod.Spec.Containers[index].Name) } else { From ad9887900ffe426948551f636b13a048a00f58c0 Mon Sep 17 00:00:00 2001 From: Aravindhan K Date: Tue, 3 Oct 2023 13:59:24 -0700 Subject: [PATCH 1060/1234] Add support for Tolerations on target allocator (#2187) * Add support for Tolerations on target allocator * bundle * Fixing rebase breakage --------- Co-authored-by: Jacob Aronoff --- .chloggen/add-tolerations.yaml | 16 +++++ apis/v1alpha1/opentelemetrycollector_types.go | 4 ++ apis/v1alpha1/zz_generated.deepcopy.go | 7 ++ ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 37 +++++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 37 +++++++++++ docs/api.md | 64 +++++++++++++++++++ .../manifests/targetallocator/deployment.go | 1 + .../targetallocator/deployment_test.go | 50 +++++++++++++++ 9 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 .chloggen/add-tolerations.yaml diff --git a/.chloggen/add-tolerations.yaml b/.chloggen/add-tolerations.yaml new file mode 100644 index 000000000..67fbb8881 --- /dev/null +++ b/.chloggen/add-tolerations.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for Tolerations on target allocator + +# One or more tracking issues related to the change +issues: [2172] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 0852da766..e1e1064e7 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -313,6 +313,10 @@ type OpenTelemetryTargetAllocator struct { // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ // +optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + // Toleration embedded kubernetes pod configuration option, + // controls how pods can be scheduled with matching taints + // +optional + Tolerations []v1.Toleration `json:"tolerations,omitempty"` // ENV vars to set on the OpenTelemetry TargetAllocator's Pods. These can then in certain cases be // consumed in the config file for the TargetAllocator. // +optional diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index d90a2d74d..91413d334 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -767,6 +767,13 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]v1.EnvVar, len(*in)) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 4486b92ff..d1b3f5812 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-09-20T15:05:15Z" + createdAt: "2023-10-03T20:05:49Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 1f6c6f51a..bdac9a237 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -4305,6 +4305,43 @@ spec: service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator. type: string + tolerations: + description: Toleration embedded kubernetes pod configuration + option, controls how pods can be scheduled with matching taints + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array topologySpreadConstraints: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 560496ee0..08cba8e26 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -4302,6 +4302,43 @@ spec: service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator. type: string + tolerations: + description: Toleration embedded kubernetes pod configuration + option, controls how pods can be scheduled with matching taints + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array topologySpreadConstraints: description: TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your diff --git a/docs/api.md b/docs/api.md index 4f5f5efbd..2263992ae 100644 --- a/docs/api.md +++ b/docs/api.md @@ -12262,6 +12262,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the TargetAllocator.
false + + tolerations + []object + + Toleration embedded kubernetes pod configuration option, controls how pods can be scheduled with matching taints
+ + false topologySpreadConstraints []object @@ -12640,6 +12647,63 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. +### OpenTelemetryCollector.spec.targetAllocator.tolerations[index] +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
effectstring + Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+
false
keystring + Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+
false
operatorstring + Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal.
+
false
tolerationSecondsinteger + TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.
+
+ Format: int64
+
false
valuestring + Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
+
false
+ + ### OpenTelemetryCollector.spec.targetAllocator.topologySpreadConstraints[index] [↩ Parent](#opentelemetrycollectorspectargetallocator) diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index 6a961291d..d8018692d 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -56,6 +56,7 @@ func Deployment(params manifests.Params) *appsv1.Deployment { Containers: []corev1.Container{Container(params.Config, params.Log, params.OtelCol)}, Volumes: Volumes(params.Config, params.OtelCol), NodeSelector: params.OtelCol.Spec.TargetAllocator.NodeSelector, + Tolerations: params.OtelCol.Spec.TargetAllocator.Tolerations, TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints, }, }, diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index 1e4b12cd8..eabe92c72 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -28,6 +28,14 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) +var testTolerationValues = []v1.Toleration{ + { + Key: "hii", + Value: "greeting", + Effect: "NoSchedule", + }, +} + var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ { MaxSkew: 1, @@ -151,6 +159,48 @@ func TestDeploymentNodeSelector(t *testing.T) { assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) } +func TestDeploymentTolerations(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + d1 := Deployment(params1) + assert.Equal(t, "my-instance-targetallocator", d1.Name) + assert.Empty(t, d1.Spec.Template.Spec.Tolerations) + + // Test Tolerations + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-toleration", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Tolerations: testTolerationValues, + }, + }, + } + + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + d2 := Deployment(params2) + assert.Equal(t, "my-instance-toleration-targetallocator", d2.Name) + assert.NotNil(t, d2.Spec.Template.Spec.Tolerations) + assert.NotEmpty(t, d2.Spec.Template.Spec.Tolerations) + assert.Equal(t, testTolerationValues, d2.Spec.Template.Spec.Tolerations) +} + func TestDeploymentTopologySpreadConstraints(t *testing.T) { // Test default otelcol1 := v1alpha1.OpenTelemetryCollector{ From 0a86c75246dd48d99f27802e587310454b2b673a Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 4 Oct 2023 17:05:12 +0200 Subject: [PATCH 1061/1234] [chore] Build and publish application hosted in the repository for the Java instrumentation E2E test (#2094) * Build and publish the Java E2E image Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Use reusable workflow Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- ...ublish-autoinstrumentation-e2e-images.yaml | 5 ++++ .../java/DemoApplication.java | 23 +++++++++++++++++ .../instrumentation-e2e-apps/java/Dockerfile | 23 +++++++++++++++++ .../java/build.gradle | 25 +++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 tests/instrumentation-e2e-apps/java/DemoApplication.java create mode 100644 tests/instrumentation-e2e-apps/java/Dockerfile create mode 100644 tests/instrumentation-e2e-apps/java/build.gradle diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 588e65c79..3acdd22fa 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -23,6 +23,11 @@ jobs: with: language: golang platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + java: + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: java + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le apache-httpd: uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml with: diff --git a/tests/instrumentation-e2e-apps/java/DemoApplication.java b/tests/instrumentation-e2e-apps/java/DemoApplication.java new file mode 100644 index 000000000..ca32ea8cc --- /dev/null +++ b/tests/instrumentation-e2e-apps/java/DemoApplication.java @@ -0,0 +1,23 @@ +package com.example.app; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + + +@RestController +@SpringBootApplication +public class DemoApplication { + + @RequestMapping("/") + String home() { + return "Hello World!"; + } + + public static void main(String[] args) { + SpringApplication.run(DemoApplication.class, args); + } + +} \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/java/Dockerfile b/tests/instrumentation-e2e-apps/java/Dockerfile new file mode 100644 index 000000000..4e06136ea --- /dev/null +++ b/tests/instrumentation-e2e-apps/java/Dockerfile @@ -0,0 +1,23 @@ +FROM --platform=$BUILDPLATFORM eclipse-temurin:17-jdk-focal as builder + +RUN apt update +RUN apt install zip unzip -y + +RUN mkdir /app + +# In some archs, there could be probems setting the executable permissions +RUN mkdir /app/.gradle +RUN chmod -R +x /root/ + +RUN curl -s "https://get.sdkman.io" | bash +RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install springboot && spring init /app" + +WORKDIR /app +COPY DemoApplication.java /app/src/main/java/com/example/app/ +COPY build.gradle . +RUN ./gradlew bootJar --no-daemon + +FROM eclipse-temurin:17.0.8.1_1-jre + +COPY --from=builder /app/build/libs/app-0.0.1-SNAPSHOT.jar . +ENTRYPOINT ["java", "-jar", "app-0.0.1-SNAPSHOT.jar"] diff --git a/tests/instrumentation-e2e-apps/java/build.gradle b/tests/instrumentation-e2e-apps/java/build.gradle new file mode 100644 index 000000000..99bd13693 --- /dev/null +++ b/tests/instrumentation-e2e-apps/java/build.gradle @@ -0,0 +1,25 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.1.3' + id 'io.spring.dependency-management' version '1.1.3' +} + +group = 'com.example' +version = '0.0.1-SNAPSHOT' + +java { + sourceCompatibility = '17' +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + testImplementation 'org.springframework.boot:spring-boot-starter-web-test' +} + +tasks.named('test') { + useJUnitPlatform() +} From 423ff4c52320921e38e3856717383c4673479210 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 4 Oct 2023 23:46:38 +0200 Subject: [PATCH 1062/1234] [chore] Build and publish application hosted in the repository for the Python instrumentation E2E test (#2095) * Build and publish the Python E2E image Signed-off-by: Israel Blancas * Fix archs Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Fix the tags Signed-off-by: Israel Blancas * Use reusable workflow Signed-off-by: Israel Blancas * Fix workflow name Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../publish-autoinstrumentation-e2e-images.yaml | 5 +++++ tests/instrumentation-e2e-apps/python/Dockerfile | 7 +++++++ tests/instrumentation-e2e-apps/python/app.py | 10 ++++++++++ tests/instrumentation-e2e-apps/python/requirements.txt | 1 + 4 files changed, 23 insertions(+) create mode 100644 tests/instrumentation-e2e-apps/python/Dockerfile create mode 100644 tests/instrumentation-e2e-apps/python/app.py create mode 100644 tests/instrumentation-e2e-apps/python/requirements.txt diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index 3acdd22fa..eda942370 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -23,6 +23,11 @@ jobs: with: language: golang platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le + python: + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: python + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le java: uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml with: diff --git a/tests/instrumentation-e2e-apps/python/Dockerfile b/tests/instrumentation-e2e-apps/python/Dockerfile new file mode 100644 index 000000000..e6558779b --- /dev/null +++ b/tests/instrumentation-e2e-apps/python/Dockerfile @@ -0,0 +1,7 @@ +FROM python:alpine3.18 + +COPY requirements.txt . +RUN pip install -r requirements.txt +COPY app.py . + +ENTRYPOINT ["flask", "run", "-p", "8080"] diff --git a/tests/instrumentation-e2e-apps/python/app.py b/tests/instrumentation-e2e-apps/python/app.py new file mode 100644 index 000000000..32a35d693 --- /dev/null +++ b/tests/instrumentation-e2e-apps/python/app.py @@ -0,0 +1,10 @@ +from flask import Flask + +app = Flask(__name__) + +@app.route('/') +def index(): + return "Hi" + +if __name__ == "__main__": + app.run(host='0.0.0.0') diff --git a/tests/instrumentation-e2e-apps/python/requirements.txt b/tests/instrumentation-e2e-apps/python/requirements.txt new file mode 100644 index 000000000..cc35792f2 --- /dev/null +++ b/tests/instrumentation-e2e-apps/python/requirements.txt @@ -0,0 +1 @@ +Flask==2.3.3 \ No newline at end of file From 0d3eb8c832e6d5bb27c2cfbcff020e6ed9c0092c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 12:49:48 -0400 Subject: [PATCH 1063/1234] Bump the prometheus group with 1 update (#2194) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.47.0...v0.47.1) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 58f9fa785..a60c280b5 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 - github.com/prometheus/prometheus v0.47.0 + github.com/prometheus/prometheus v0.47.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 @@ -24,6 +24,7 @@ require ( k8s.io/client-go v0.28.2 k8s.io/component-base v0.28.2 k8s.io/kubectl v0.28.2 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.2 ) @@ -159,7 +160,6 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index bf42bf712..628de4fbd 100644 --- a/go.sum +++ b/go.sum @@ -477,8 +477,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.47.0 h1:tIJJKZGlmrMVsvIt6rMfB8he7CRHEc8ZxS5ubcZtbkM= -github.com/prometheus/prometheus v0.47.0/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/prometheus v0.47.1 h1:bd2LiZyxzHn9Oo2Ei4eK2D86vz/L/OiqR1qYo0XmMBo= +github.com/prometheus/prometheus v0.47.1/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= From 3b10d4cc4a64511c900343b13d5048408c592d40 Mon Sep 17 00:00:00 2001 From: bryan-aguilar <46550959+bryan-aguilar@users.noreply.github.com> Date: Thu, 5 Oct 2023 10:22:55 -0700 Subject: [PATCH 1064/1234] [autoinstrumentation/python] Bump python version to 1.20.0/0.41b0 (#2192) * Bump python version * Add PR num * remove ver bump --- .chloggen/python41b0.yaml | 16 ++++ autoinstrumentation/python/requirements.txt | 96 ++++++++++----------- 2 files changed, 64 insertions(+), 48 deletions(-) create mode 100755 .chloggen/python41b0.yaml diff --git a/.chloggen/python41b0.yaml b/.chloggen/python41b0.yaml new file mode 100755 index 000000000..77d895eb3 --- /dev/null +++ b/.chloggen/python41b0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump python autoinstrumentation version to 1.20.0/0.41b0 + +# One or more tracking issues related to the change +issues: [2192] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index cb25a4c14..9ab2d4392 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,56 +1,56 @@ -opentelemetry-distro==0.40b0 +opentelemetry-distro==0.41b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.19.0 +opentelemetry-exporter-otlp-proto-http==1.20.0 -opentelemetry-propagator-b3==1.19.0 -opentelemetry-propagator-jaeger==1.19.0 +opentelemetry-propagator-b3==1.20.0 +opentelemetry-propagator-jaeger==1.20.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.40b0 -opentelemetry-propagator-ot-trace==0.40b0 +opentelemetry-instrumentation==0.41b0 +opentelemetry-propagator-ot-trace==0.41b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.40b0 -opentelemetry-instrumentation-aiohttp-client==0.40b0 -opentelemetry-instrumentation-aiopg==0.40b0 -opentelemetry-instrumentation-asgi==0.40b0 -opentelemetry-instrumentation-asyncpg==0.40b0 -opentelemetry-instrumentation-boto==0.40b0 -opentelemetry-instrumentation-boto3sqs==0.40b0 -opentelemetry-instrumentation-botocore==0.40b0 -opentelemetry-instrumentation-celery==0.40b0 -opentelemetry-instrumentation-confluent-kafka==0.40b0 -opentelemetry-instrumentation-dbapi==0.40b0 -opentelemetry-instrumentation-django==0.40b0 -opentelemetry-instrumentation-elasticsearch==0.40b0 -opentelemetry-instrumentation-falcon==0.40b0 -opentelemetry-instrumentation-fastapi==0.40b0 -opentelemetry-instrumentation-flask==0.40b0 -opentelemetry-instrumentation-grpc==0.40b0 -opentelemetry-instrumentation-httpx==0.40b0 -opentelemetry-instrumentation-jinja2==0.40b0 -opentelemetry-instrumentation-kafka-python==0.40b0 -opentelemetry-instrumentation-logging==0.40b0 -opentelemetry-instrumentation-mysql==0.40b0 -opentelemetry-instrumentation-mysqlclient==0.40b0 -opentelemetry-instrumentation-pika==0.40b0 -opentelemetry-instrumentation-psycopg2==0.40b0 -opentelemetry-instrumentation-pymemcache==0.40b0 -opentelemetry-instrumentation-pymongo==0.40b0 -opentelemetry-instrumentation-pymysql==0.40b0 -opentelemetry-instrumentation-pyramid==0.40b0 -opentelemetry-instrumentation-redis==0.40b0 -opentelemetry-instrumentation-remoulade==0.40b0 -opentelemetry-instrumentation-requests==0.40b0 -opentelemetry-instrumentation-sklearn==0.40b0 -opentelemetry-instrumentation-sqlalchemy==0.40b0 -opentelemetry-instrumentation-sqlite3==0.40b0 -opentelemetry-instrumentation-starlette==0.40b0 -opentelemetry-instrumentation-system-metrics==0.40b0 -opentelemetry-instrumentation-tornado==0.40b0 -opentelemetry-instrumentation-tortoiseorm==0.40b0 -opentelemetry-instrumentation-urllib==0.40b0 -opentelemetry-instrumentation-urllib3==0.40b0 -opentelemetry-instrumentation-wsgi==0.40b0 +opentelemetry-instrumentation-aio-pika==0.41b0 +opentelemetry-instrumentation-aiohttp-client==0.41b0 +opentelemetry-instrumentation-aiopg==0.41b0 +opentelemetry-instrumentation-asgi==0.41b0 +opentelemetry-instrumentation-asyncpg==0.41b0 +opentelemetry-instrumentation-boto==0.41b0 +opentelemetry-instrumentation-boto3sqs==0.41b0 +opentelemetry-instrumentation-botocore==0.41b0 +opentelemetry-instrumentation-celery==0.41b0 +opentelemetry-instrumentation-confluent-kafka==0.41b0 +opentelemetry-instrumentation-dbapi==0.41b0 +opentelemetry-instrumentation-django==0.41b0 +opentelemetry-instrumentation-elasticsearch==0.41b0 +opentelemetry-instrumentation-falcon==0.41b0 +opentelemetry-instrumentation-fastapi==0.41b0 +opentelemetry-instrumentation-flask==0.41b0 +opentelemetry-instrumentation-grpc==0.41b0 +opentelemetry-instrumentation-httpx==0.41b0 +opentelemetry-instrumentation-jinja2==0.41b0 +opentelemetry-instrumentation-kafka-python==0.41b0 +opentelemetry-instrumentation-logging==0.41b0 +opentelemetry-instrumentation-mysql==0.41b0 +opentelemetry-instrumentation-mysqlclient==0.41b0 +opentelemetry-instrumentation-pika==0.41b0 +opentelemetry-instrumentation-psycopg2==0.41b0 +opentelemetry-instrumentation-pymemcache==0.41b0 +opentelemetry-instrumentation-pymongo==0.41b0 +opentelemetry-instrumentation-pymysql==0.41b0 +opentelemetry-instrumentation-pyramid==0.41b0 +opentelemetry-instrumentation-redis==0.41b0 +opentelemetry-instrumentation-remoulade==0.41b0 +opentelemetry-instrumentation-requests==0.41b0 +opentelemetry-instrumentation-sklearn==0.41b0 +opentelemetry-instrumentation-sqlalchemy==0.41b0 +opentelemetry-instrumentation-sqlite3==0.41b0 +opentelemetry-instrumentation-starlette==0.41b0 +opentelemetry-instrumentation-system-metrics==0.41b0 +opentelemetry-instrumentation-tornado==0.41b0 +opentelemetry-instrumentation-tortoiseorm==0.41b0 +opentelemetry-instrumentation-urllib==0.41b0 +opentelemetry-instrumentation-urllib3==0.41b0 +opentelemetry-instrumentation-wsgi==0.41b0 From 7a48b56b9bfd6758bdc920a4b2edb08ac36e0ace Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Fri, 6 Oct 2023 15:52:59 +0200 Subject: [PATCH 1065/1234] feat: Add support for PDBs on deployment and statefulset (#2141) --- .chloggen/add-pdb-support.yaml | 19 +++ .github/workflows/e2e.yaml | 1 + Makefile | 5 + apis/v1alpha1/opentelemetrycollector_types.go | 23 +++ .../opentelemetrycollector_webhook.go | 23 +++ .../opentelemetrycollector_webhook_test.go | 88 +++++++++++ apis/v1alpha1/zz_generated.deepcopy.go | 31 ++++ ...emetry-operator.clusterserviceversion.yaml | 12 ++ ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++ config/rbac/role.yaml | 12 ++ .../opentelemetrycollector_controller.go | 3 + controllers/reconcile_test.go | 40 +++++ controllers/suite_test.go | 62 ++++++++ docs/api.md | 41 +++++ internal/config/main_test.go | 2 +- internal/manifests/collector/collector.go | 2 + .../collector/poddisruptionbudget.go | 54 +++++++ .../collector/poddisruptionbudget_test.go | 99 ++++++++++++ internal/manifests/mutate.go | 12 ++ internal/naming/main.go | 5 + kuttl-test-pdb.yaml | 6 + tests/e2e-pdb/pdb/00-install.yaml | 4 + tests/e2e-pdb/pdb/01-assert.yaml | 63 ++++++++ tests/e2e-pdb/pdb/01-install.yaml | 141 ++++++++++++++++++ 25 files changed, 789 insertions(+), 1 deletion(-) create mode 100644 .chloggen/add-pdb-support.yaml create mode 100644 internal/manifests/collector/poddisruptionbudget.go create mode 100644 internal/manifests/collector/poddisruptionbudget_test.go create mode 100644 kuttl-test-pdb.yaml create mode 100644 tests/e2e-pdb/pdb/00-install.yaml create mode 100644 tests/e2e-pdb/pdb/01-assert.yaml create mode 100644 tests/e2e-pdb/pdb/01-install.yaml diff --git a/.chloggen/add-pdb-support.yaml b/.chloggen/add-pdb-support.yaml new file mode 100644 index 000000000..780217b38 --- /dev/null +++ b/.chloggen/add-pdb-support.yaml @@ -0,0 +1,19 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Add PDB support for OpenTelemetryCollector" + +# One or more tracking issues related to the change +issues: + - 2136 + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + This PR adds support for PodDisruptionBudgets when OpenTelemetryCollector is deployed + as `deployment` or `statefulset`. diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 01caa85c3..7ee52ce0f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -30,6 +30,7 @@ jobs: - e2e-prometheuscr - e2e-autoscale - e2e-multi-instrumentation + - e2e-pdb steps: - name: Set up Go diff --git a/Makefile b/Makefile index 76d3a703e..149e3624c 100644 --- a/Makefile +++ b/Makefile @@ -197,6 +197,11 @@ e2e-upgrade: undeploy e2e-autoscale: $(KUTTL) test --config kuttl-test-autoscale.yaml +# end-to-end-test for testing pdb support +.PHONY: e2e-pdb +e2e-pdb: + $(KUTTL) test --config kuttl-test-pdb.yaml + # end-to-end-test for testing OpenShift cases .PHONY: e2e-openshift e2e-openshift: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index e1e1064e7..6f9898c01 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -19,6 +19,7 @@ import ( v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" ) // ManagementStateType defines the type for CR management states. @@ -123,6 +124,11 @@ type OpenTelemetryCollectorSpec struct { // // +optional Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"` + // PodDisruptionBudget specifies the pod disruption budget configuration to use + // for the OpenTelemetryCollector workload. + // + // +optional + PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` // SecurityContext configures the container security context for // the opentelemetry-collector container. // @@ -448,6 +454,23 @@ type AutoscalerSpec struct { TargetMemoryUtilization *int32 `json:"targetMemoryUtilization,omitempty"` } +// PodDisruptionBudgetSpec defines the OpenTelemetryCollector's pod disruption budget specification. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at least "minAvailable" pods selected by + // "selector" will still be available after the eviction, i.e. even in the + // absence of the evicted pod. So for example you can prevent all voluntary + // evictions by specifying "100%". + // +optional + MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"` + + // An eviction is allowed if at most "maxUnavailable" pods selected by + // "selector" are unavailable after the eviction, i.e. even in absence of + // the evicted pod. For example, one can prevent all voluntary evictions + // by specifying 0. This is a mutually exclusive setting with "minAvailable". + // +optional + MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"` +} + // MetricsConfigSpec defines a metrics config. type MetricsConfigSpec struct { // EnableMetrics specifies if ServiceMonitor should be created for the OpenTelemetry Collector and Prometheus Exporters. diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 40b4df050..0e60003d7 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -19,6 +19,7 @@ import ( autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -91,6 +92,20 @@ func (r *OpenTelemetryCollector) Default() { r.Spec.Autoscaler.TargetCPUUtilization = &defaultCPUTarget } } + + // if pod isn't provided, we set MaxUnavailable 1, + // which will work even if there is just one replica, + // not blocking node drains but preventing out-of-the-box + // from disruption generated by them with replicas > 1 + if r.Spec.PodDisruptionBudget == nil { + r.Spec.PodDisruptionBudget = &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + } + } + if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge } @@ -231,6 +246,14 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } } + // validate pod disruption budget + + if r.Spec.PodDisruptionBudget != nil { + if r.Spec.PodDisruptionBudget.MaxUnavailable != nil && r.Spec.PodDisruptionBudget.MinAvailable != nil { + return fmt.Errorf("the OpenTelemetry Spec podDisruptionBudget configuration is incorrect, minAvailable and maxUnavailable are mutually exclusive") + } + } + if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { return fmt.Errorf("the OpenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", ModeDeployment, ModeDaemonSet, ModeStatefulSet, diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index ea44351e7..301063bc7 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -23,6 +23,7 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" ) func TestOTELColDefaultingWebhook(t *testing.T) { @@ -48,6 +49,12 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, }, }, }, @@ -70,6 +77,12 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, }, }, }, @@ -98,6 +111,12 @@ func TestOTELColDefaultingWebhook(t *testing.T) { MaxReplicas: &five, MinReplicas: &one, }, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, }, }, }, @@ -126,6 +145,12 @@ func TestOTELColDefaultingWebhook(t *testing.T) { MinReplicas: &one, }, MaxReplicas: &five, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, }, }, }, @@ -155,6 +180,44 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + }, + }, + }, + { + name: "Defined PDB", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, }, }, }, @@ -237,6 +300,12 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, TargetCPUUtilization: &five, }, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, }, }, }, @@ -489,6 +558,25 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, invalid pods target type", }, + { + name: "pdb minAvailable and maxUnavailable have been set together", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + MaxReplicas: &three, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Spec podDisruptionBudget configuration is incorrect, minAvailable and maxUnavailable are mutually exclusive", + }, { name: "invalid deployment mode incompabible with ingress settings", otelcol: OpenTelemetryCollector{ diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 91413d334..bd1c11e44 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -25,6 +25,7 @@ import ( networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -595,6 +596,11 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = new(AutoscalerSpec) (*in).DeepCopyInto(*out) } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(PodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(v1.SecurityContext) @@ -827,6 +833,31 @@ func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopy() *OpenTelemetryTar return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { + *out = *in + if in.MinAvailable != nil { + in, out := &in.MinAvailable, &out.MinAvailable + *out = new(intstr.IntOrString) + **out = **in + } + if in.MaxUnavailable != nil { + in, out := &in.MaxUnavailable, &out.MaxUnavailable + *out = new(intstr.IntOrString) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec. +func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec { + if in == nil { + return nil + } + out := new(PodDisruptionBudgetSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Probe) DeepCopyInto(out *Probe) { *out = *in diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index d1b3f5812..5677655ad 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -237,6 +237,18 @@ spec: - get - patch - update + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - route.openshift.io resources: diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index bdac9a237..c15c3ee4e 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3719,6 +3719,27 @@ spec: description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption budget + configuration to use for the OpenTelemetryCollector workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after the + eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object podSecurityContext: description: PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 08cba8e26..aa275206c 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3716,6 +3716,27 @@ spec: description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption budget + configuration to use for the OpenTelemetryCollector workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after the + eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object podSecurityContext: description: PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 093332c89..3b82f33b2 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -135,6 +135,18 @@ rules: - get - patch - update +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - route.openshift.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index ddd3d51bd..90a6f9613 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -25,6 +25,7 @@ import ( appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" + policyV1 "k8s.io/api/policy/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" @@ -148,6 +149,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch // +kubebuilder:rbac:groups=apps,resources=daemonsets;deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete @@ -231,6 +233,7 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er } builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) + builder = builder.Owns(&policyV1.PodDisruptionBudget{}) return builder.Complete(r) } diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 5bd758e2d..4f0c70155 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -26,6 +26,7 @@ import ( autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" + policyV1 "k8s.io/api/policy/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" @@ -318,6 +319,45 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }, }, }, + { + name: "policy v1 deployment collector", + args: args{ + params: paramsWithPolicy(1, 0), + updates: []manifests.Params{paramsWithPolicy(0, 1)}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := policyV1.PodDisruptionBudget{} + exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, pdbErr) + assert.Equal(t, int32(1), actual.Spec.MinAvailable.IntVal) + assert.Nil(t, actual.Spec.MaxUnavailable) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + actual := policyV1.PodDisruptionBudget{} + exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + assert.NoError(t, pdbErr) + assert.Nil(t, actual.Spec.MinAvailable) + assert.Equal(t, int32(1), actual.Spec.MaxUnavailable.IntVal) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, { name: "daemonset collector", args: args{ diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 98e256205..4d91e6448 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -323,6 +323,68 @@ func paramsWithHPA(minReps, maxReps int32) manifests.Params { } } +func paramsWithPolicy(minAvailable, maxUnavailable int32) manifests.Params { + configYAML, err := os.ReadFile("testdata/test.yaml") + if err != nil { + fmt.Printf("Error getting yaml file: %v", err) + } + + configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + err = configuration.AutoDetect() + if err != nil { + logger.Error(err, "configuration.autodetect failed") + } + + pdb := &v1alpha1.PodDisruptionBudgetSpec{} + + if maxUnavailable > 0 && minAvailable > 0 { + fmt.Printf("worng configuration: %v", fmt.Errorf("minAvailable and maxUnavailable cannot be both set")) + } + if maxUnavailable > 0 { + pdb.MaxUnavailable = &intstr.IntOrString{ + Type: intstr.Int, + IntVal: maxUnavailable, + } + } else { + pdb.MinAvailable = &intstr.IntOrString{ + Type: intstr.Int, + IntVal: minAvailable, + } + } + + return manifests.Params{ + Config: configuration, + Client: k8sClient, + OtelCol: v1alpha1.OpenTelemetryCollector{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "policytest", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []v1.ServicePort{{ + Name: "web", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 80, + }, + NodePort: 0, + }}, + Config: string(configYAML), + PodDisruptionBudget: pdb, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { t.Helper() err := k8sClient.Get(context.Background(), namespacedName, object) diff --git a/docs/api.md b/docs/api.md index 2263992ae..67a166ecf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3816,6 +3816,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods.
false + + podDisruptionBudget + object + + PodDisruptionBudget specifies the pod disruption budget configuration to use for the OpenTelemetryCollector workload.
+ + false podSecurityContext object @@ -11507,6 +11514,40 @@ Metrics defines the metrics configuration for operands. +### OpenTelemetryCollector.spec.podDisruptionBudget +[↩ Parent](#opentelemetrycollectorspec) + + + +PodDisruptionBudget specifies the pod disruption budget configuration to use for the OpenTelemetryCollector workload. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxUnavailableint or string + An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod.
+
false
minAvailableint or string + An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod.
+
false
+ + ### OpenTelemetryCollector.spec.podSecurityContext [↩ Parent](#opentelemetrycollectorspec) diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 7bda3f64c..0157b97f6 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -71,7 +71,7 @@ func TestOnPlatformChangeCallback(t *testing.T) { func TestAutoDetectInBackground(t *testing.T) { // prepare wg := &sync.WaitGroup{} - wg.Add(2) + wg.Add(1) mock := &mockAutoDetect{ OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { wg.Done() diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 1e64eb892..25309db37 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -29,8 +29,10 @@ func Build(params manifests.Params) ([]client.Object, error) { switch params.OtelCol.Spec.Mode { case v1alpha1.ModeDeployment: manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(Deployment)) + manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(PodDisruptionBudget)) case v1alpha1.ModeStatefulSet: manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(StatefulSet)) + manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(PodDisruptionBudget)) case v1alpha1.ModeDaemonSet: manifestFactories = append(manifestFactories, manifests.FactoryWithoutError(DaemonSet)) case v1alpha1.ModeSidecar: diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go new file mode 100644 index 000000000..8e9e64803 --- /dev/null +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + policyV1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func PodDisruptionBudget(params manifests.Params) client.Object { + // defaulting webhook should always set this, but if unset then return nil. + if params.OtelCol.Spec.PodDisruptionBudget == nil { + params.Log.Info("pdb field is unset in Spec, skipping podDisruptionBudget creation") + return nil + } + + name := naming.Collector(params.OtelCol.Name) + labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + annotations := Annotations(params.OtelCol) + + objectMeta := metav1.ObjectMeta{ + Name: naming.PodDisruptionBudget(params.OtelCol.Name), + Namespace: params.OtelCol.Namespace, + Labels: labels, + Annotations: annotations, + } + + return &policyV1.PodDisruptionBudget{ + ObjectMeta: objectMeta, + Spec: policyV1.PodDisruptionBudgetSpec{ + MinAvailable: params.OtelCol.Spec.PodDisruptionBudget.MinAvailable, + MaxUnavailable: params.OtelCol.Spec.PodDisruptionBudget.MaxUnavailable, + Selector: &metav1.LabelSelector{ + MatchLabels: objectMeta.Labels, + }, + }, + } +} diff --git a/internal/manifests/collector/poddisruptionbudget_test.go b/internal/manifests/collector/poddisruptionbudget_test.go new file mode 100644 index 000000000..adedc9eb5 --- /dev/null +++ b/internal/manifests/collector/poddisruptionbudget_test.go @@ -0,0 +1,99 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + policyV1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" +) + +func TestPDB(t *testing.T) { + type test struct { + name string + MinAvailable *intstr.IntOrString + MaxUnavailable *intstr.IntOrString + } + tests := []test{ + { + name: "MinAvailable-int", + MinAvailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + { + name: "MinAvailable-string", + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + { + name: "MaxUnavailable-int", + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + { + name: "MaxUnavailable-string", + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + } + + otelcols := []v1alpha1.OpenTelemetryCollector{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + }, + } + + for _, otelcol := range otelcols { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + otelcol.Spec.PodDisruptionBudget = &v1alpha1.PodDisruptionBudgetSpec{ + MinAvailable: test.MinAvailable, + MaxUnavailable: test.MaxUnavailable, + } + configuration := config.New() + raw := PodDisruptionBudget(manifests.Params{ + Log: logger, + Config: configuration, + OtelCol: otelcol, + }) + + pdb := raw.(*policyV1.PodDisruptionBudget) + // verify + assert.Equal(t, "my-instance-collector", pdb.Name) + assert.Equal(t, "my-instance-collector", pdb.Labels["app.kubernetes.io/name"]) + assert.Equal(t, test.MinAvailable, pdb.Spec.MinAvailable) + assert.Equal(t, test.MaxUnavailable, pdb.Spec.MaxUnavailable) + }) + } + } +} diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go index b11513f31..1f875c3f5 100644 --- a/internal/manifests/mutate.go +++ b/internal/manifests/mutate.go @@ -27,6 +27,7 @@ import ( autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" + policyV1 "k8s.io/api/policy/v1" rbacv1 "k8s.io/api/rbac/v1" apiequality "k8s.io/apimachinery/pkg/api/equality" "sigs.k8s.io/controller-runtime/pkg/client" @@ -151,6 +152,11 @@ func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn { desiredHPA := desired.(*autoscalingv2.HorizontalPodAutoscaler) mutateAutoscalingHPA(existingHPA, desiredHPA) + case *policyV1.PodDisruptionBudget: + existingPDB := existing.(*policyV1.PodDisruptionBudget) + desiredPDB := desired.(*policyV1.PodDisruptionBudget) + mutatePolicyV1PDB(existingPDB, desiredPDB) + case *routev1.Route: rt := existing.(*routev1.Route) wantRt := desired.(*routev1.Route) @@ -225,6 +231,12 @@ func mutateAutoscalingHPA(existing, desired *autoscalingv2.HorizontalPodAutoscal existing.Spec = desired.Spec } +func mutatePolicyV1PDB(existing, desired *policyV1.PodDisruptionBudget) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + func mutateIngress(existing, desired *networkingv1.Ingress) { existing.Labels = desired.Labels existing.Annotations = desired.Annotations diff --git a/internal/naming/main.go b/internal/naming/main.go index b1ed7dd22..1df0bc2f6 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -60,6 +60,11 @@ func HorizontalPodAutoscaler(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } +// HorizontalPodAutoscaler builds the autoscaler name based on the instance. +func PodDisruptionBudget(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) +} + // OpenTelemetryCollector builds the collector (deployment/daemonset) name based on the instance. func OpenTelemetryCollector(otelcol string) string { return DNSName(Truncate("%s", 63, otelcol)) diff --git a/kuttl-test-pdb.yaml b/kuttl-test-pdb.yaml new file mode 100644 index 000000000..62fc2d804 --- /dev/null +++ b/kuttl-test-pdb.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +artifactsDir: ./tests/_build/artifacts/ +testDirs: + - ./tests/e2e-pdb/ +timeout: 30 diff --git a/tests/e2e-pdb/pdb/00-install.yaml b/tests/e2e-pdb/pdb/00-install.yaml new file mode 100644 index 000000000..adc063327 --- /dev/null +++ b/tests/e2e-pdb/pdb/00-install.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: create-pdbs diff --git a/tests/e2e-pdb/pdb/01-assert.yaml b/tests/e2e-pdb/pdb/01-assert.yaml new file mode 100644 index 000000000..997a671a5 --- /dev/null +++ b/tests/e2e-pdb/pdb/01-assert.yaml @@ -0,0 +1,63 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: max-integer-collector + namespace: create-pdbs +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: create-pdbs.max-integer + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: max-integer-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + maxUnavailable: 1 +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: max-string-collector + namespace: create-pdbs +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: create-pdbs.max-string + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: max-string-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + maxUnavailable: "10%" +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: min-integer-collector + namespace: create-pdbs +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: create-pdbs.min-integer + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: min-integer-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + minAvailable: 1 +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: min-string-collector + namespace: create-pdbs +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: create-pdbs.min-string + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: min-string-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + minAvailable: "10%" diff --git a/tests/e2e-pdb/pdb/01-install.yaml b/tests/e2e-pdb/pdb/01-install.yaml new file mode 100644 index 000000000..e73e2d3ef --- /dev/null +++ b/tests/e2e-pdb/pdb/01-install.yaml @@ -0,0 +1,141 @@ +# This creates four different deployments for checking different pdb options: +# * minAvailable integer +# * minAvailable string +# * maxUnavailable integer +# * maxUnavailable string +# +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: min-integer + namespace: create-pdbs +spec: + podDisruptionBudget: + minAvailable: 1 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: min-string + namespace: create-pdbs +spec: + podDisruptionBudget: + minAvailable: 10% + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: max-integer + namespace: create-pdbs +spec: + podDisruptionBudget: + maxUnavailable: 1 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: max-string + namespace: create-pdbs +spec: + podDisruptionBudget: + maxUnavailable: "10%" + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From 72848260fe444a58936a68a0c704012eb1d8f422 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 6 Oct 2023 17:37:31 +0200 Subject: [PATCH 1066/1234] [chore] Build and publish the NodeJS E2E image (#2199) * Build and publish the NodeJS E2E image Signed-off-by: Israel Blancas * Fix workflow Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .../publish-autoinstrumentation-e2e-images.yaml | 5 +++++ tests/instrumentation-e2e-apps/nodejs/Dockerfile | 5 +++++ tests/instrumentation-e2e-apps/nodejs/index.js | 11 +++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/instrumentation-e2e-apps/nodejs/Dockerfile create mode 100644 tests/instrumentation-e2e-apps/nodejs/index.js diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml index eda942370..b911d44ab 100644 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml @@ -43,3 +43,8 @@ jobs: with: language: dotnet platforms: linux/arm64,linux/amd64 + nodejs: + uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml + with: + language: nodejs + platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le diff --git a/tests/instrumentation-e2e-apps/nodejs/Dockerfile b/tests/instrumentation-e2e-apps/nodejs/Dockerfile new file mode 100644 index 000000000..7d624b85e --- /dev/null +++ b/tests/instrumentation-e2e-apps/nodejs/Dockerfile @@ -0,0 +1,5 @@ +FROM node:20-alpine3.17 +RUN npm install express -g --verbose +COPY index.js . + +ENTRYPOINT ["node", "index.js"] \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/nodejs/index.js b/tests/instrumentation-e2e-apps/nodejs/index.js new file mode 100644 index 000000000..17e8f5ee5 --- /dev/null +++ b/tests/instrumentation-e2e-apps/nodejs/index.js @@ -0,0 +1,11 @@ +const express = require('express') +const app = express() +const port = 3000 + +app.get('/', (req, res) => { + res.send('Hello World!') +}) + +app.listen(port, () => { + console.log("Hi") +}) From c9c3ea37cb500de0fcf232aacbc899815cc81d2b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 6 Oct 2023 14:04:46 -0400 Subject: [PATCH 1067/1234] Ensures that we only skip reconciliation for unmanaged resources (#2197) * ensures that we only skip reconciliation for unmanaged resources * update tests --- .chloggen/default-managed.yaml | 16 ++++++++ .../opentelemetrycollector_webhook.go | 5 +++ .../opentelemetrycollector_webhook_test.go | 38 ++++++++++++++++++- .../opentelemetrycollector_controller.go | 2 +- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100755 .chloggen/default-managed.yaml diff --git a/.chloggen/default-managed.yaml b/.chloggen/default-managed.yaml new file mode 100755 index 000000000..9f816920a --- /dev/null +++ b/.chloggen/default-managed.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fixes scenario where an old CRD would cause the operator to default to an unmanaged state + +# One or more tracking issues related to the change +issues: [2039] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/opentelemetrycollector_webhook.go index 0e60003d7..3d1d9828b 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook.go @@ -112,6 +112,11 @@ func (r *OpenTelemetryCollector) Default() { if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Ingress.RuleType == "" { r.Spec.Ingress.RuleType = IngressRuleTypePath } + // If someone upgrades to a later version without upgrading their CRD they will not have a management state set. + // This results in a default state of unmanaged preventing reconciliation from continuing. + if len(r.Spec.ManagementState) == 0 { + r.Spec.ManagementState = ManagementStateManaged + } } // +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/opentelemetrycollector_webhook_test.go index 301063bc7..b4b4b9e2b 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/opentelemetrycollector_webhook_test.go @@ -49,6 +49,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ MaxUnavailable: &intstr.IntOrString{ Type: intstr.Int, @@ -77,6 +78,37 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", + ManagementState: ManagementStateManaged, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + }, + }, + }, + { + name: "doesn't override unmanaged", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + ManagementState: ManagementStateUnmanaged, + Mode: ModeSidecar, + Replicas: &five, + UpgradeStrategy: "adhoc", + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeSidecar, + Replicas: &five, + UpgradeStrategy: "adhoc", + ManagementState: ManagementStateUnmanaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ MaxUnavailable: &intstr.IntOrString{ Type: intstr.Int, @@ -106,6 +138,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, Autoscaler: &AutoscalerSpec{ TargetCPUUtilization: &defaultCPUTarget, MaxReplicas: &five, @@ -137,6 +170,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, Autoscaler: &AutoscalerSpec{ TargetCPUUtilization: &defaultCPUTarget, // webhook Default adds MaxReplicas to Autoscaler because @@ -171,7 +205,8 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, Spec: OpenTelemetryCollectorSpec{ - Mode: ModeDeployment, + Mode: ModeDeployment, + ManagementState: ManagementStateManaged, Ingress: Ingress{ Type: IngressTypeRoute, Route: OpenShiftRoute{ @@ -212,6 +247,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ MinAvailable: &intstr.IntOrString{ Type: intstr.String, diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 90a6f9613..7c22eba02 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -174,7 +174,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, client.IgnoreNotFound(err) } - if instance.Spec.ManagementState != v1alpha1.ManagementStateManaged { + if instance.Spec.ManagementState == v1alpha1.ManagementStateUnmanaged { log.Info("Skipping reconciliation for unmanaged OpenTelemetryCollector resource", "name", req.String()) // Stop requeueing for unmanaged OpenTelemetryCollector custom resources return ctrl.Result{}, nil From 0a36bf9a3d872c0247a2049d271ce17cc3a725bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:28:36 +0200 Subject: [PATCH 1068/1234] Bump the prometheus group in /cmd/otel-allocator with 1 update (#2195) Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.47.0...v0.47.1) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 5 ++--- cmd/otel-allocator/go.sum | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 801bcbed6..d45938251 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -11,17 +11,17 @@ require ( github.com/go-kit/log v0.2.1 github.com/go-logr/logr v1.2.4 github.com/json-iterator/go v1.1.12 - github.com/mitchellh/hashstructure v1.1.0 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.68.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 - github.com/prometheus/prometheus v0.47.0 + github.com/prometheus/prometheus v0.47.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.28.2 k8s.io/apimachinery v0.28.2 k8s.io/client-go v0.28.2 @@ -194,7 +194,6 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.28.1 // indirect k8s.io/component-base v0.28.1 // indirect k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index cc5a1bdf2..264095787 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -519,8 +519,6 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= -github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -613,8 +611,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.47.0 h1:tIJJKZGlmrMVsvIt6rMfB8he7CRHEc8ZxS5ubcZtbkM= -github.com/prometheus/prometheus v0.47.0/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/prometheus v0.47.1 h1:bd2LiZyxzHn9Oo2Ei4eK2D86vz/L/OiqR1qYo0XmMBo= +github.com/prometheus/prometheus v0.47.1/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= From c6531de4b98fc14682ada85c5d75b7ad52f2af8b Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Mon, 9 Oct 2023 14:22:40 +0530 Subject: [PATCH 1069/1234] Add e2e test case for multi-cluster by exposing OTEL collector. (#1956) --- .../multi-cluster/00-assert.yaml | 13 ++ .../multi-cluster/00-create-namespaces.yaml | 10 ++ .../multi-cluster/01-assert.yaml | 126 +++++++++++++++ .../multi-cluster/01-create-jaeger.yaml | 9 ++ .../multi-cluster/02-assert.yaml | 147 ++++++++++++++++++ .../multi-cluster/02-otlp-receiver.yaml | 49 ++++++ .../multi-cluster/03-assert.yaml | 107 +++++++++++++ .../multi-cluster/03-otlp-sender.yaml | 46 ++++++ .../multi-cluster/04-assert.yaml | 20 +++ .../multi-cluster/04-generate-traces.yaml | 41 +++++ .../multi-cluster/05-assert.yaml | 6 + .../multi-cluster/check_traces.sh | 26 ++++ .../multi-cluster/create_otlp_sender.sh | 62 ++++++++ .../multi-cluster/generate_certs.sh | 59 +++++++ 14 files changed, 721 insertions(+) create mode 100644 tests/e2e-openshift/multi-cluster/00-assert.yaml create mode 100644 tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml create mode 100644 tests/e2e-openshift/multi-cluster/01-assert.yaml create mode 100644 tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml create mode 100644 tests/e2e-openshift/multi-cluster/02-assert.yaml create mode 100644 tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml create mode 100644 tests/e2e-openshift/multi-cluster/03-assert.yaml create mode 100644 tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml create mode 100644 tests/e2e-openshift/multi-cluster/04-assert.yaml create mode 100644 tests/e2e-openshift/multi-cluster/04-generate-traces.yaml create mode 100644 tests/e2e-openshift/multi-cluster/05-assert.yaml create mode 100755 tests/e2e-openshift/multi-cluster/check_traces.sh create mode 100755 tests/e2e-openshift/multi-cluster/create_otlp_sender.sh create mode 100755 tests/e2e-openshift/multi-cluster/generate_certs.sh diff --git a/tests/e2e-openshift/multi-cluster/00-assert.yaml b/tests/e2e-openshift/multi-cluster/00-assert.yaml new file mode 100644 index 000000000..cf530e1d4 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/00-assert.yaml @@ -0,0 +1,13 @@ +apiVersion: project.openshift.io/v1 +kind: Project +metadata: + name: kuttl-multi-cluster-send +status: + phase: Active + +apiVersion: project.openshift.io/v1 +kind: Project +metadata: + name: kuttl-multi-cluster-receive +status: + phase: Active diff --git a/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml b/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml new file mode 100644 index 000000000..15931a400 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-multi-cluster-send + +--- +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-multi-cluster-receive diff --git a/tests/e2e-openshift/multi-cluster/01-assert.yaml b/tests/e2e-openshift/multi-cluster/01-assert.yaml new file mode 100644 index 000000000..f2c871480 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/01-assert.yaml @@ -0,0 +1,126 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: jaeger + app.kubernetes.io/component: all-in-one + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone + app.kubernetes.io/part-of: jaeger + name: jaeger-allinone + namespace: kuttl-multi-cluster-receive +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: jaeger + app.kubernetes.io/component: service-collector + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone-collector + app.kubernetes.io/part-of: jaeger + name: jaeger-allinone-collector + namespace: kuttl-multi-cluster-receive +spec: + ports: + - name: http-zipkin + port: 9411 + protocol: TCP + targetPort: 9411 + - name: tls-grpc-jaeger + port: 14250 + protocol: TCP + targetPort: 14250 + - name: http-c-tchan-trft + port: 14267 + protocol: TCP + targetPort: 14267 + - name: http-c-binary-trft + port: 14268 + protocol: TCP + targetPort: 14268 + - name: admin-http + port: 14269 + protocol: TCP + targetPort: 14269 + - name: grpc-otlp + port: 4317 + protocol: TCP + targetPort: 4317 + - name: http-otlp + port: 4318 + protocol: TCP + targetPort: 4318 + selector: + app: jaeger + app.kubernetes.io/component: all-in-one + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone + app.kubernetes.io/part-of: jaeger + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: jaeger + app.kubernetes.io/component: service-query + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone-query + app.kubernetes.io/part-of: jaeger + name: jaeger-allinone-query + namespace: kuttl-multi-cluster-receive +spec: + ports: + - name: http-query + port: 16686 + protocol: TCP + targetPort: 16686 + - name: grpc-query + port: 16685 + protocol: TCP + targetPort: 16685 + - name: admin-http + port: 16687 + protocol: TCP + targetPort: 16687 + selector: + app: jaeger + app.kubernetes.io/component: all-in-one + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone + app.kubernetes.io/part-of: jaeger + type: ClusterIP + +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: jaeger + app.kubernetes.io/component: query-route + app.kubernetes.io/instance: jaeger-allinone + app.kubernetes.io/managed-by: jaeger-operator + app.kubernetes.io/name: jaeger-allinone + app.kubernetes.io/part-of: jaeger + name: jaeger-allinone + namespace: kuttl-multi-cluster-receive +spec: + port: + targetPort: http-query + tls: + termination: edge + to: + kind: Service + name: jaeger-allinone-query diff --git a/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml b/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml new file mode 100644 index 000000000..bac726662 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml @@ -0,0 +1,9 @@ +apiVersion: jaegertracing.io/v1 +kind: Jaeger +metadata: + name: jaeger-allinone + namespace: kuttl-multi-cluster-receive +spec: + strategy: allinone + ingress: + security: none diff --git a/tests/e2e-openshift/multi-cluster/02-assert.yaml b/tests/e2e-openshift/multi-cluster/02-assert.yaml new file mode 100644 index 000000000..9650dd59f --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/02-assert.yaml @@ -0,0 +1,147 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-receiver-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otlp-receiver-collector + namespace: kuttl-multi-cluster-receive +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-receiver-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otlp-receiver-collector + namespace: kuttl-multi-cluster-receive +spec: + ports: + - appProtocol: h2c + 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: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-receiver-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + operator.opentelemetry.io/collector-headless-service: Exists + name: otlp-receiver-collector-headless + namespace: kuttl-multi-cluster-receive +spec: + ports: + - appProtocol: h2c + 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: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-receiver-collector-monitoring + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otlp-receiver-collector-monitoring + namespace: kuttl-multi-cluster-receive +spec: + ports: + - name: monitoring + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-grpc-otlp-receiver-route + name: otlp-grpc-otlp-receiver-route + namespace: kuttl-multi-cluster-receive +spec: + port: + targetPort: otlp-grpc + tls: + termination: passthrough + to: + kind: Service + name: otlp-receiver-collector + weight: 100 + +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otlp-http-otlp-receiver-route + name: otlp-http-otlp-receiver-route + namespace: kuttl-multi-cluster-receive +spec: + port: + targetPort: otlp-http + tls: + termination: passthrough + to: + kind: Service + name: otlp-receiver-collector + weight: 100 diff --git a/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml b/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml new file mode 100644 index 000000000..d30045808 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml @@ -0,0 +1,49 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: ./generate_certs.sh + +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: otlp-receiver + namespace: kuttl-multi-cluster-receive +spec: + mode: "deployment" + ingress: + type: route + route: + termination: "passthrough" + volumes: + - name: kuttl-certs + configMap: + name: kuttl-certs + volumeMounts: + - name: kuttl-certs + mountPath: /certs + config: | + receivers: + otlp: + protocols: + http: + tls: + cert_file: /certs/server.crt + key_file: /certs/server.key + client_ca_file: /certs/ca.crt + grpc: + tls: + cert_file: /certs/server.crt + key_file: /certs/server.key + client_ca_file: /certs/ca.crt + exporters: + otlp: + endpoint: "jaeger-allinone-collector.kuttl-multi-cluster-receive.svc:4317" + tls: + insecure: true + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [otlp] diff --git a/tests/e2e-openshift/multi-cluster/03-assert.yaml b/tests/e2e-openshift/multi-cluster/03-assert.yaml new file mode 100644 index 000000000..8edce42aa --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/03-assert.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otel-sender-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otel-sender-collector + namespace: kuttl-multi-cluster-send +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otel-sender-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otel-sender-collector + namespace: kuttl-multi-cluster-send +spec: + ports: + - 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: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otel-sender-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + operator.opentelemetry.io/collector-headless-service: Exists + name: otel-sender-collector-headless + namespace: kuttl-multi-cluster-send +spec: + ports: + - 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: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: otel-sender-collector-monitoring + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: otel-sender-collector-monitoring + namespace: kuttl-multi-cluster-send +spec: + ports: + - name: monitoring + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP diff --git a/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml b/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml new file mode 100644 index 000000000..2c1d45273 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kuttl-multi-cluster + namespace: kuttl-multi-cluster-send + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kuttl-multi-cluster +rules: +- apiGroups: ["config.openshift.io"] + resources: ["infrastructures", "infrastructures/status"] + verbs: ["get", "watch", "list"] +- apiGroups: ["apps"] + resources: ["replicasets"] + verbs: ["get", "watch", "list"] +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] +- apiGroups: [""] + resources: ["namespaces"] + verbs: ["get", "watch", "list"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kuttl-multi-cluster +subjects: +- kind: ServiceAccount + name: kuttl-multi-cluster + namespace: kuttl-multi-cluster-send +roleRef: + kind: ClusterRole + name: kuttl-multi-cluster + apiGroup: rbac.authorization.k8s.io + +--- +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: ./create_otlp_sender.sh diff --git a/tests/e2e-openshift/multi-cluster/04-assert.yaml b/tests/e2e-openshift/multi-cluster/04-assert.yaml new file mode 100644 index 000000000..2a2a3b622 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/04-assert.yaml @@ -0,0 +1,20 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http + namespace: kuttl-multi-cluster-send +status: + conditions: + - status: "True" + type: Complete + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-grpc + namespace: kuttl-multi-cluster-send +status: + conditions: + - status: "True" + type: Complete diff --git a/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml b/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml new file mode 100644 index 000000000..4c2d6b10f --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml @@ -0,0 +1,41 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-http + namespace: kuttl-multi-cluster-send +spec: + template: + spec: + containers: + - name: telemetrygen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.75.0 + args: + - traces + - --otlp-endpoint=otel-sender-collector:4318 + - --traces=100 + - --otlp-http + - --otlp-insecure=true + - --service=telemetrygen-http + - --otlp-attributes=protocol="http" + restartPolicy: Never + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: generate-traces-grpc + namespace: kuttl-multi-cluster-send +spec: + template: + spec: + containers: + - name: telemetrygen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.75.0 + args: + - traces + - --otlp-endpoint=otel-sender-collector:4317 + - --traces=100 + - --otlp-insecure=true + - --service=telemetrygen-grpc + - --otlp-attributes=protocol="grpc" + restartPolicy: Never diff --git a/tests/e2e-openshift/multi-cluster/05-assert.yaml b/tests/e2e-openshift/multi-cluster/05-assert.yaml new file mode 100644 index 000000000..73befbcd2 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/05-assert.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +commands: +- script: ./tests/e2e-openshift/multi-cluster/check_traces.sh diff --git a/tests/e2e-openshift/multi-cluster/check_traces.sh b/tests/e2e-openshift/multi-cluster/check_traces.sh new file mode 100755 index 000000000..7fe6eea51 --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/check_traces.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Define an array of service names +SERVICE_NAMES=("telemetrygen-http" "telemetrygen-grpc") + +# Get the Jaeger URL +JAEGER_URL=$(oc -n kuttl-multi-cluster-receive get route jaeger-allinone -o json | jq '.spec.host' -r) + +# Initialize a flag to check if any trace exists +trace_exists=false + +# Loop through each service name +for SERVICE_NAME in "${SERVICE_NAMES[@]}"; do + trace_count=$(curl -ksSL "https://$JAEGER_URL/api/traces?service=$SERVICE_NAME&limit=1" | jq -r '.data | length') + if [[ $trace_count -gt 0 ]]; then + echo "Traces for $SERVICE_NAME exist in Jaeger." + trace_exists=true + else + echo "Trace for $SERVICE_NAME does not exist in Jaeger." + fi +done + +# Fail the test step if no traces exist for any service name +if ! $trace_exists; then + exit 1 +fi diff --git a/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh b/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh new file mode 100755 index 000000000..fadb2fc8a --- /dev/null +++ b/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Get the HTTP and GRPC routes from OpenTelemetry receiver collector. +otlp_route_http=$(oc -n kuttl-multi-cluster-receive get route otlp-http-otlp-receiver-route -o json | jq '.spec.host' -r) +otlp_route_grpc=$(oc -n kuttl-multi-cluster-receive get route otlp-grpc-otlp-receiver-route -o json | jq '.spec.host' -r) + +# Define the collector content +collector_content=$(cat < "$openssl_config" +[req] +req_extensions = v3_req + +[v3_req] +basicConstraints = CA:FALSE +keyUsage = nonRepudiation, digitalSignature, keyEncipherment +subjectAltName = @alt_names + +[alt_names] +DNS.1 = $hostname_domain +EOF + +# Generate private key for the server +openssl genpkey -algorithm RSA -out "$CERT_DIR/server.key" + +# Create CSR for the server with SANs +openssl req -new -key "$CERT_DIR/server.key" -out "$CERT_DIR/server.csr" -subj "$CERT_SUBJECT" -config "$openssl_config" + +# Generate self-signed certificate for the server with SANs +openssl x509 -req -days 365 -in "$CERT_DIR/server.csr" -signkey "$CERT_DIR/server.key" -out "$CERT_DIR/server.crt" -extensions v3_req -extfile "$openssl_config" + +# Generate a CA certificate (self-signed) +openssl req -new -x509 -days 365 -key "$CERT_DIR/server.key" -out "$CERT_DIR/ca.crt" -subj "$CERT_SUBJECT" + +echo "Certificates generated successfully in $CERT_DIR directory." + +# Delete any existing ConfigMaps +kubectl delete configmap -n kuttl-multi-cluster-send kuttl-certs +kubectl delete configmap -n kuttl-multi-cluster-receive kuttl-certs + +# Create a Kubernetes ConfigMap for the server certificate, private key, and CA certificate in kuttl-multi-cluster-send namespace +kubectl create configmap kuttl-certs -n kuttl-multi-cluster-send \ + --from-file=server.crt="$CERT_DIR/server.crt" \ + --from-file=server.key="$CERT_DIR/server.key" \ + --from-file=ca.crt="$CERT_DIR/ca.crt" + +# Create a Kubernetes ConfigMap for the server certificate, private key, and CA certificate in kuttl-multi-cluster-receive namespace +kubectl create configmap kuttl-certs -n kuttl-multi-cluster-receive \ + --from-file=server.crt="$CERT_DIR/server.crt" \ + --from-file=server.key="$CERT_DIR/server.key" \ + --from-file=ca.crt="$CERT_DIR/ca.crt" + +echo "ConfigMaps created successfully." From 7e232dde6e27db5bbdf444ac6d691f77e67ce704 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Mon, 9 Oct 2023 11:37:38 +0200 Subject: [PATCH 1070/1234] Nginx Autoinstrumentation Implementation (#2033) * all a17n logic implementation * nginx, podmutator tests * sdk and upgrade tests * refactor nginx + tests * Readme - added Nginx * chloggen for #PR 2033 * tests fixes * code cleanup * starting supported version, secContext * moved nginx e2e tests * unprivileged pods related fixes and tests * unprivileged test fix * unprivileged nginx test assert fix * typo fix * resource alloc for scaling tests * typo in assert * initContainer uses securityCtx of app container * test for container-level securityCtx * yaml formatting * nginx secCtx e2e test * typo * Update README.md Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * Update pkg/featuregate/featuregate.go Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> * README.md - Nginx to stageAlpha * Nginx - to StageAlpha * not needed feature flag * Nginx alphaStage - upgrade test cases * Nginx stageAplha - reverted bundle change * revert of unintential change * unintended change revert * enable f-g operator.autoinstrumentation.nginx * revert * enable nginx featuregate * enable nginx featuregate * merge main branch - tests and typos * multicontainer nginx fixes * formatting * added Nginx version build arg --------- Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> --- .chloggen/2033-nginx-autoinstrumentation.yaml | 16 + .github/workflows/publish-images.yaml | 2 + Dockerfile | 3 +- Makefile | 5 +- README.md | 30 +- apis/v1alpha1/instrumentation_webhook_test.go | 2 + ...emetry-operator.clusterserviceversion.yaml | 2 +- config/default/manager_auth_proxy_patch.yaml | 2 +- internal/config/main.go | 7 + internal/config/options.go | 7 + internal/version/main.go | 13 +- main.go | 7 +- pkg/featuregate/featuregate.go | 6 + pkg/instrumentation/annotation.go | 2 + pkg/instrumentation/nginx.go | 352 ++++++++++ pkg/instrumentation/nginx_test.go | 657 ++++++++++++++++++ pkg/instrumentation/podmutator.go | 27 + pkg/instrumentation/podmutator_test.go | 248 +++++++ pkg/instrumentation/sdk.go | 17 + pkg/instrumentation/sdk_test.go | 162 +++++ pkg/instrumentation/upgrade/upgrade.go | 14 + pkg/instrumentation/upgrade/upgrade_test.go | 11 + .../00-install-collector.yaml | 21 + .../00-install-instrumentation.yaml | 17 + .../01-assert.yaml | 59 ++ .../01-install-app.yaml | 88 +++ .../00-install-collector.yaml | 22 + .../00-install-instrumentation.yaml | 19 + .../01-assert.yaml | 77 ++ .../01-install-app.yaml | 93 +++ .../02-assert.yaml | 74 ++ .../02-install-app.yaml | 92 +++ .../00-install-collector.yaml | 21 + .../00-install-instrumentation.yaml | 17 + .../instrumentation-nginx/01-assert.yaml | 57 ++ .../instrumentation-nginx/01-install-app.yaml | 89 +++ versions.txt | 4 + 37 files changed, 2334 insertions(+), 8 deletions(-) create mode 100755 .chloggen/2033-nginx-autoinstrumentation.yaml create mode 100644 pkg/instrumentation/nginx.go create mode 100644 pkg/instrumentation/nginx_test.go create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml create mode 100644 tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml diff --git a/.chloggen/2033-nginx-autoinstrumentation.yaml b/.chloggen/2033-nginx-autoinstrumentation.yaml new file mode 100755 index 000000000..064b01724 --- /dev/null +++ b/.chloggen/2033-nginx-autoinstrumentation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Implementation of new Nginx autoinstrumentation. + +# One or more tracking issues related to the change +issues: [2033] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 707f98ce3..c98f03866 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -31,6 +31,7 @@ jobs: grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print "AUTO_INSTRUMENTATION_DOTNET_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print "AUTO_INSTRUMENTATION_GO_VERSION="$2}' >> $GITHUB_ENV grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION="$2}' >> $GITHUB_ENV + grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_NGINX_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV @@ -98,5 +99,6 @@ jobs: AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }} AUTO_INSTRUMENTATION_GO_VERSION=${{ env.AUTO_INSTRUMENTATION_GO_VERSION }} AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${{ env.AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION }} + AUTO_INSTRUMENTATION_NGINX_VERSION=${{ env.AUTO_INSTRUMENTATION_NGINX_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index 4dfecd17a..cff812ec5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,10 +31,11 @@ ARG AUTO_INSTRUMENTATION_NODEJS_VERSION ARG AUTO_INSTRUMENTATION_PYTHON_VERSION ARG AUTO_INSTRUMENTATION_DOTNET_VERSION ARG AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION +ARG AUTO_INSTRUMENTATION_NGINX_VERSION ARG AUTO_INSTRUMENTATION_GO_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION}" -a -o manager main.go ######## Start a new stage from scratch ####### FROM scratch diff --git a/Makefile b/Makefile index 149e3624c..d625a0282 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ AUTO_INSTRUMENTATION_PYTHON_VERSION ?= "$(shell grep -v '\#' versions.txt | grep AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_GO_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION}" +AUTO_INSTRUMENTATION_NGINX_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nginx | awk -F= '{print $$2}')" +LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION}" ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets @@ -235,7 +236,7 @@ scorecard-tests: operator-sdk # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container container: - docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} --build-arg AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} . + docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} --build-arg AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} --build-arg AUTO_INSTRUMENTATION_NGINX_VERSION=${AUTO_INSTRUMENTATION_NGINX_VERSION} . # Push the container image, used only for local dev purposes .PHONY: container-push diff --git a/README.md b/README.md index 7cce244cd..949074581 100644 --- a/README.md +++ b/README.md @@ -189,7 +189,7 @@ When using sidecar mode the OpenTelemetry collector container will have the envi ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Apache HTTPD, DotNet, Go, Java, NodeJS and Python are supported. +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. Currently Apache HTTPD, DotNet, Go, Java, Nginx, NodeJS and Python are supported. To use auto-instrumentation, configure an `Instrumentation` resource with the configuration for the SDK and instrumentation. @@ -291,6 +291,11 @@ Apache HTTPD: instrumentation.opentelemetry.io/inject-apache-httpd: "true" ``` +Nginx: +```bash +instrumentation.opentelemetry.io/inject-nginx: "true" +``` + OpenTelemetry SDK environment variables only: ```bash instrumentation.opentelemetry.io/inject-sdk: "true" @@ -449,6 +454,8 @@ spec: image: your-customized-auto-instrumentation-image:go apacheHttpd: image: your-customized-auto-instrumentation-image:apache-httpd + nginx: + image: your-customized-auto-instrumentation-image:nginx ``` The Dockerfiles for auto-instrumentation can be found in [autoinstrumentation directory](./autoinstrumentation). @@ -474,6 +481,26 @@ metadata: ``` List of all available attributes can be found at [otel-webserver-module](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module) +#### Using Nginx autoinstrumentation + +For `Nginx` autoinstrumentation, Nginx versions 1.22.0, 1.23.0, and 1.23.1 are supported at this time. The Nginx configuration file is expected to be `/etc/nginx/nginx.conf` by default, if it's different, see following example on how to change it. Instrumentation at this time also expects, that `conf.d` directory is present in the directory, where configuration file resides and that there is a `include /conf.d/*.conf;` directive in the `http { ... }` section of Nginx configuration file (like it is in the default configuration file of Nginx). You can also adjust OpenTelemetry SDK attributes. Example: + +```yaml +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: my-instrumentation + nginx: + image: your-customized-auto-instrumentation-image:nginx # if custom instrumentation image is needed + configFile: /my/custom-dir/custom-nginx.conf + attrs: + - name: NginxModuleOtelMaxQueueSize + value: "4096" + - name: ... + value: ... +``` +List of all available attributes can be found at [otel-webserver-module](https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module) + #### Inject OpenTelemetry SDK environment variables only You can configure the OpenTelemetry SDK for applications which can't currently be autoinstrumented by using `inject-sdk` in place of `inject-python` or `inject-java`, for example. This will inject environment variables like `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_TRACES_SAMPLER`, and `OTEL_EXPORTER_OTLP_ENDPOINT`, that you can configure in the `Instrumentation`, but will not actually provide the SDK. @@ -499,6 +526,7 @@ If a language is enabled by default its gate only needs to be supplied when disa | DotNet | `operator.autoinstrumentation.dotnet` | enabled | | ApacheHttpD | `operator.autoinstrumentation.apache-httpd` | enabled | | Go | `operator.autoinstrumentation.go` | disabled | +| Nginx | `operator.autoinstrumentation.nginx` | disabled | Language not specified in the table are always supported and cannot be disabled. diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 0ccd12346..9791a9301 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -30,6 +30,7 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { AnnotationDefaultAutoInstrumentationPython: "python-img:1", AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd-img:1", + AnnotationDefaultAutoInstrumentationNginx: "nginx-img:1", }, }, } @@ -39,6 +40,7 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { assert.Equal(t, "python-img:1", inst.Spec.Python.Image) assert.Equal(t, "dotnet-img:1", inst.Spec.DotNet.Image) assert.Equal(t, "apache-httpd-img:1", inst.Spec.ApacheHttpd.Image) + assert.Equal(t, "nginx-img:1", inst.Spec.Nginx.Image) } func TestInstrumentationValidatingWebhook(t *testing.T) { diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 5677655ad..588e52044 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -299,7 +299,7 @@ spec: - --enable-leader-election - --zap-log-level=info - --zap-time-encoding=rfc3339nano - - --feature-gates=+operator.autoinstrumentation.go + - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.85.0 livenessProbe: httpGet: diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index 80999a45a..918d8a41a 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -33,4 +33,4 @@ spec: - "--enable-leader-election" - "--zap-log-level=info" - "--zap-time-encoding=rfc3339nano" - - "--feature-gates=+operator.autoinstrumentation.go" + - "--feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx" diff --git a/internal/config/main.go b/internal/config/main.go index 64d2beec8..951340136 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -44,6 +44,7 @@ type Config struct { autoInstrumentationDotNetImage string autoInstrumentationGoImage string autoInstrumentationApacheHttpdImage string + autoInstrumentationNginxImage string targetAllocatorConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string @@ -85,6 +86,7 @@ func New(opts ...Option) Config { autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, autoInstrumentationApacheHttpdImage: o.autoInstrumentationApacheHttpdImage, + autoInstrumentationNginxImage: o.autoInstrumentationNginxImage, labelsFilter: o.labelsFilter, } } @@ -184,6 +186,11 @@ func (c *Config) AutoInstrumentationApacheHttpdImage() string { return c.autoInstrumentationApacheHttpdImage } +// AutoInstrumentationNginxImage returns OpenTelemetry Nginx auto-instrumentation container image. +func (c *Config) AutoInstrumentationNginxImage() string { + return c.autoInstrumentationNginxImage +} + // LabelsFilter Returns the filters converted to regex strings used to filter out unwanted labels from propagations. func (c *Config) LabelsFilter() []string { return c.labelsFilter diff --git a/internal/config/options.go b/internal/config/options.go index 13d88b508..3d0e207af 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -38,6 +38,7 @@ type options struct { autoInstrumentationNodeJSImage string autoInstrumentationPythonImage string autoInstrumentationApacheHttpdImage string + autoInstrumentationNginxImage string collectorImage string collectorConfigMapEntry string targetAllocatorConfigMapEntry string @@ -145,6 +146,12 @@ func WithAutoInstrumentationApacheHttpdImage(s string) Option { } } +func WithAutoInstrumentationNginxImage(s string) Option { + return func(o *options) { + o.autoInstrumentationNginxImage = s + } +} + func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/version/main.go b/internal/version/main.go index 6b4883518..7e85af2f1 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -31,6 +31,7 @@ var ( autoInstrumentationPython string autoInstrumentationDotNet string autoInstrumentationApacheHttpd string + autoInstrumentationNginx string autoInstrumentationGo string ) @@ -48,6 +49,7 @@ type Version struct { AutoInstrumentationDotNet string `json:"auto-instrumentation-dotnet"` AutoInstrumentationGo string `json:"auto-instrumentation-go"` AutoInstrumentationApacheHttpd string `json:"auto-instrumentation-apache-httpd"` + AutoInstrumentationNginx string `json:"auto-instrumentation-nginx"` } // Get returns the Version object with the relevant information. @@ -65,12 +67,13 @@ func Get() Version { AutoInstrumentationDotNet: AutoInstrumentationDotNet(), AutoInstrumentationGo: AutoInstrumentationGo(), AutoInstrumentationApacheHttpd: AutoInstrumentationApacheHttpd(), + AutoInstrumentationNginx: AutoInstrumentationNginx(), } } func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v', AutoInstrumentationApacheHttpd='%v')", + "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v', AutoInstrumentationApacheHttpd='%v', AutoInstrumentationNginx='%v')", v.Operator, v.BuildDate, v.OpenTelemetryCollector, @@ -83,6 +86,7 @@ func (v Version) String() string { v.AutoInstrumentationDotNet, v.AutoInstrumentationGo, v.AutoInstrumentationApacheHttpd, + v.AutoInstrumentationNginx, ) } @@ -154,6 +158,13 @@ func AutoInstrumentationApacheHttpd() string { return "0.0.0" } +func AutoInstrumentationNginx() string { + if len(autoInstrumentationNginx) > 0 { + return autoInstrumentationNginx + } + return "0.0.0" +} + func AutoInstrumentationGo() string { if len(autoInstrumentationGo) > 0 { return autoInstrumentationGo diff --git a/main.go b/main.go index 61cb218a7..2f04fb083 100644 --- a/main.go +++ b/main.go @@ -101,6 +101,7 @@ func main() { autoInstrumentationPython string autoInstrumentationDotNet string autoInstrumentationApacheHttpd string + autoInstrumentationNginx string autoInstrumentationGo string labelsFilter []string webhookPort int @@ -122,6 +123,7 @@ func main() { pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationNginx, "auto-instrumentation-nginx-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationNginx), "The default OpenTelemetry Nginx instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") @@ -142,6 +144,7 @@ func main() { "auto-instrumentation-dotnet", autoInstrumentationDotNet, "auto-instrumentation-go", autoInstrumentationGo, "auto-instrumentation-apache-httpd", autoInstrumentationApacheHttpd, + "auto-instrumentation-nginx", autoInstrumentationNginx, "feature-gates", flagset.Lookup(featuregate.FeatureGatesFlag).Value.String(), "build-date", v.BuildDate, "go-version", v.Go, @@ -171,6 +174,7 @@ func main() { config.WithAutoInstrumentationDotNetImage(autoInstrumentationDotNet), config.WithAutoInstrumentationGoImage(autoInstrumentationGo), config.WithAutoInstrumentationApacheHttpdImage(autoInstrumentationApacheHttpd), + config.WithAutoInstrumentationNginxImage(autoInstrumentationNginx), config.WithAutoDetect(ad), config.WithLabelFilters(labelsFilter), ) @@ -257,7 +261,7 @@ func main() { otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, otelv1alpha1.AnnotationDefaultAutoInstrumentationGo: autoInstrumentationGo, otelv1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: autoInstrumentationApacheHttpd, - }, + otelv1alpha1.AnnotationDefaultAutoInstrumentationNginx: autoInstrumentationNginx}, }, }).SetupWebhookWithManager(mgr); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "Instrumentation") @@ -324,6 +328,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), DefaultAutoInstGo: cfg.AutoInstrumentationDotNetImage(), DefaultAutoInstApacheHttpd: cfg.AutoInstrumentationApacheHttpdImage(), + DefaultAutoInstNginx: cfg.AutoInstrumentationNginxImage(), Client: mgr.GetClient(), Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), } diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 200c997a0..b9e6231ec 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -61,6 +61,12 @@ var ( featuregate.WithRegisterDescription("controls whether the operator supports Apache HTTPD auto-instrumentation"), featuregate.WithRegisterFromVersion("v0.80.0"), ) + EnableNginxAutoInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( + "operator.autoinstrumentation.nginx", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("controls whether the operator supports Nginx auto-instrumentation"), + featuregate.WithRegisterFromVersion("v0.86.0"), + ) EnableMultiInstrumentationSupport = featuregate.GlobalRegistry().MustRegister( "operator.autoinstrumentation.multi-instrumentation", diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index bcf62fec0..28ef7bf3d 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -40,6 +40,8 @@ const ( annotationInjectSdkContainersName = "instrumentation.opentelemetry.io/sdk-container-names" annotationInjectApacheHttpd = "instrumentation.opentelemetry.io/inject-apache-httpd" annotationInjectApacheHttpdContainersName = "instrumentation.opentelemetry.io/apache-httpd-container-names" + annotationInjectNginx = "instrumentation.opentelemetry.io/inject-nginx" + annotationInjectNginxContainersName = "instrumentation.opentelemetry.io/inject-nginx-container-names" ) // annotationValue returns the effective annotationInjectJava value, based on the annotations from the pod and namespace. diff --git a/pkg/instrumentation/nginx.go b/pkg/instrumentation/nginx.go new file mode 100644 index 000000000..9a16520d6 --- /dev/null +++ b/pkg/instrumentation/nginx.go @@ -0,0 +1,352 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "fmt" + "path/filepath" + "sort" + "strings" + + "github.com/go-logr/logr" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +const ( + nginxDefaultConfigFile = "/etc/nginx/nginx.conf" + nginxAgentCloneContainerName = "otel-agent-source-container-clone" + nginxAgentInitContainerName = "otel-agent-attach-nginx" + nginxAgentVolume = "otel-nginx-agent" + nginxAgentConfigVolume = "otel-nginx-conf-dir" + nginxAgentConfigFile = "opentemetry_agent.conf" + nginxAgentDirectory = "/opt/opentelemetry-webserver" + nginxAgentSubDirectory = "/agent" + nginxAgentDirFull = nginxAgentDirectory + nginxAgentSubDirectory + nginxAgentConfigDirectory = "/source-conf" + nginxAgentConfDirFull = nginxAgentDirectory + nginxAgentConfigDirectory + nginxAttributesEnvVar = "OTEL_NGINX_AGENT_CONF" + nginxServiceInstanceId = "<>" + nginxServiceInstanceIdEnvVar = "OTEL_NGINX_SERVICE_INSTANCE_ID" + nginxVersionEnvVar = "NGINX_VERSION" + nginxLibraryPathEnv = "LD_LIBRARY_PATH" +) + +/* + Nginx injection is different from other languages in: + - OpenTelemetry parameters are not passed as environmental variables, but via a configuration file + - OpenTelemetry module needs to be specified in the Nginx config file, but that is already specified by + an author of the original image configuration and the configuration must be preserved + + Therefore, following approach is taken: + 1) Inject an init container created as a *clone* of the application container and copy config file and referenced + configuration directory to an empty shared volume + 2) Inject a second init container with the OpenTelemetry module itself - i.e. instrumentation image + 3) Take the Nginx configuration file saved on volume and inject reference to OpenTelemetry module into the config + 4) On the same volume, inject a configuration file for OpenTelemetry module + 5) Copy OpenTelemetry module from second init container (instrumentation image) to another shared volume + 6) Inject mounting of volumes / files into appropriate directories in the application container +*/ + +func injectNginxSDK(_ logr.Logger, nginxSpec v1alpha1.Nginx, pod corev1.Pod, index int, otlpEndpoint string, resourceMap map[string]string) corev1.Pod { + + // caller checks if there is at least one container + container := &pod.Spec.Containers[index] + + // inject env vars + for _, env := range nginxSpec.Env { + idx := getIndexOfEnv(container.Env, env.Name) + if idx == -1 { + container.Env = append(container.Env, env) + } + } + + // First make a clone of the instrumented container to take the existing Nginx configuration from + // and create init container from it + if isNginxInitContainerMissing(pod, nginxAgentCloneContainerName) { + // Inject volume for original Nginx configuration + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + nginxConfFile := getNginxConfFile(nginxSpec.ConfigFile) + nginxConfDir := getNginxConfDir(nginxSpec.ConfigFile) + + // from original Nginx container, we need + // 1) original configuration files, which then get modified in the instrumentation process + // 2) version of Nginx to select the proper version of OTel modules. + // - run Nginx with -v to get the version + // - store the version into a file where instrumentation initContainer can pick it up + nginxCloneScriptTemplate := + ` +cp -r %[2]s/* %[3]s && +export %[4]s=$( { nginx -v ; } 2>&1 ) && echo ${%[4]s##*/} > %[3]s/version.txt +` + nginxAgentCommands := prepareCommandFromTemplate(nginxCloneScriptTemplate, + nginxConfFile, + nginxConfDir, + nginxAgentConfDirFull, + nginxVersionEnvVar, + ) + + cloneContainer := container.DeepCopy() + cloneContainer.Name = nginxAgentCloneContainerName + cloneContainer.Command = []string{"/bin/sh", "-c"} + cloneContainer.Args = []string{nginxAgentCommands} + cloneContainer.VolumeMounts = append(cloneContainer.VolumeMounts, corev1.VolumeMount{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }) + // remove resource requirements since those are then reserved for the lifetime of a pod + // and we definitely do not need them for the init container for cp command + cloneContainer.Resources = nginxSpec.Resources + // remove livenessProbe, readinessProbe, and startupProbe, since not supported on init containers + cloneContainer.LivenessProbe = nil + cloneContainer.ReadinessProbe = nil + cloneContainer.StartupProbe = nil + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, *cloneContainer) + + // drop volume mount with volume-provided Nginx config from original container + // since it could over-write configuration provided by the injection + idxFound := -1 + for idx, volume := range container.VolumeMounts { + if strings.Contains(volume.MountPath, nginxConfDir) { // potentially passes config, which we want to pass to init copy only + idxFound = idx + break + } + } + if idxFound >= 0 { + volumeMounts := container.VolumeMounts + volumeMounts = append(volumeMounts[:idxFound], volumeMounts[idxFound+1:]...) + container.VolumeMounts = volumeMounts + } + + // Inject volumes info instrumented container - Nginx config dir + Nginx agent + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }) + container.VolumeMounts = append(container.VolumeMounts, corev1.VolumeMount{ + Name: nginxAgentConfigVolume, + MountPath: nginxConfDir, + }) + } + + // Inject second init container with instrumentation image + // Create / update config files + // Copy OTEL module to a shared volume + if isNginxInitContainerMissing(pod, nginxAgentInitContainerName) { + // Inject volume for agent + pod.Spec.Volumes = append(pod.Spec.Volumes, corev1.Volume{ + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }}) + + // Following is the template for a shell script, which does the actual instrumentation + // It does following: + // 1) Copies Nginx OTel modules from the webserver agent image + // 2) Picks-up the Nginx version stored by the clone of original container (see comment there) + // 3) Finds out which directory to use for logs + // 4) Configures the directory in logging configuration file of OTel modules + // 5) Creates a configuration file for OTel modules + // 6) In that configuration file, set SID parameter to pod name (in env var OTEL_NGINX_SERVICE_INSTANCE_ID) + // 7) In Nginx config file, inject directive to load OTel module + // 8) In Nginx config file, enable use of env var OTEL_RESOURCE_ATTRIBUTES in Nginx process + // (by default, env vars are hidden to Nginx process, they need to be enabled specifically) + // 9) Move OTel module configuration file to Nginx configuration directory. + + // Each line of the script MUST end with \n ! + nginxAgentI13nScript := + ` +NGINX_AGENT_DIR_FULL=$1 \n +NGINX_AGENT_CONF_DIR_FULL=$2 \n +NGINX_CONFIG_FILE=$3 \n +NGINX_SID_PLACEHOLDER=$4 \n +NGINX_SID_VALUE=$5 \n +echo "Input Parameters: $@" \n +set -x \n +\n +cp -ar /opt/opentelemetry/* ${NGINX_AGENT_DIR_FULL} \n +\n +NGINX_VERSION=$(cat ${NGINX_AGENT_CONF_DIR_FULL}/version.txt) \n +NGINX_AGENT_LOG_DIR=$(echo "${NGINX_AGENT_DIR_FULL}/logs" | sed 's,/,\\/,g') \n +\n +cat ${NGINX_AGENT_DIR_FULL}/conf/appdynamics_sdk_log4cxx.xml.template | sed 's,__agent_log_dir__,'${NGINX_AGENT_LOG_DIR}',g' > ${NGINX_AGENT_DIR_FULL}/conf/appdynamics_sdk_log4cxx.xml \n +echo -e $OTEL_NGINX_AGENT_CONF > ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf \n +sed -i "s,${NGINX_SID_PLACEHOLDER},${OTEL_NGINX_SERVICE_INSTANCE_ID},g" ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf \n +sed -i "1s,^,load_module ${NGINX_AGENT_DIR_FULL}/WebServerModule/Nginx/${NGINX_VERSION}/ngx_http_opentelemetry_module.so;\\n,g" ${NGINX_AGENT_CONF_DIR_FULL}/${NGINX_CONFIG_FILE} \n +sed -i "1s,^,env OTEL_RESOURCE_ATTRIBUTES;\\n,g" ${NGINX_AGENT_CONF_DIR_FULL}/${NGINX_CONFIG_FILE} \n +mv ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf ${NGINX_AGENT_CONF_DIR_FULL}/conf.d \n + ` + + nginxAgentI13nCommand := "echo -e $OTEL_NGINX_I13N_SCRIPT > " + nginxAgentDirFull + "/nginx_instrumentation.sh && " + + "chmod +x " + nginxAgentDirFull + "/nginx_instrumentation.sh && " + + "cat " + nginxAgentDirFull + "/nginx_instrumentation.sh && " + + fmt.Sprintf(nginxAgentDirFull+"/nginx_instrumentation.sh \"%s\" \"%s\" \"%s\" \"%s\"", + nginxAgentDirFull, + nginxAgentConfDirFull, + getNginxConfFile(nginxSpec.ConfigFile), + nginxServiceInstanceId, + ) + + pod.Spec.InitContainers = append(pod.Spec.InitContainers, corev1.Container{ + Name: nginxAgentInitContainerName, + Image: nginxSpec.Image, + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxAgentI13nCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: getNginxOtelConfig(pod, nginxSpec, index, otlpEndpoint, resourceMap), + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxAgentI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + Resources: nginxSpec.Resources, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + SecurityContext: pod.Spec.Containers[index].SecurityContext, + }) + + found := false + for i, e := range container.Env { + if e.Name == nginxLibraryPathEnv { + container.Env[i].Value = e.Value + ":" + nginxAgentDirFull + "/sdk_lib/lib" + found = true + break + } + } + if !found { + container.Env = append(container.Env, corev1.EnvVar{ + Name: nginxLibraryPathEnv, + Value: nginxAgentDirFull + "/sdk_lib/lib", + }) + } + } + + return pod +} + +// Calculate if we already inject InitContainers. +func isNginxInitContainerMissing(pod corev1.Pod, containerName string) bool { + for _, initContainer := range pod.Spec.InitContainers { + if initContainer.Name == containerName { + return false + } + } + return true +} + +// Calculate Nginx agent configuration file based on attributes provided by the injection rules +// and by the pod values. +func getNginxOtelConfig(pod corev1.Pod, nginxSpec v1alpha1.Nginx, index int, otelEndpoint string, resourceMap map[string]string) string { + + if otelEndpoint == "" { + otelEndpoint = "http://localhost:4317/" + } + serviceName := chooseServiceName(pod, resourceMap, index) + serviceNamespace := pod.GetNamespace() + if len(serviceNamespace) == 0 { + serviceNamespace = resourceMap[string(semconv.K8SNamespaceNameKey)] + if len(serviceNamespace) == 0 { + serviceNamespace = "nginx" + } + } + + // Namespace name override TBD + + attrMap := map[string]string{ + "NginxModuleEnabled": "ON", + "NginxModuleOtelSpanExporter": "otlp", + "NginxModuleOtelExporterEndpoint": otelEndpoint, + "NginxModuleServiceName": serviceName, + "NginxModuleServiceNamespace": serviceNamespace, + "NginxModuleServiceInstanceId": nginxServiceInstanceId, + "NginxModuleResolveBackends": "ON", + "NginxModuleTraceAsError": "ON", + } + for _, attr := range nginxSpec.Attrs { + attrMap[attr.Name] = attr.Value + } + + configFileContent := "" + + keys := make([]string, 0, len(attrMap)) + for key := range attrMap { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, key := range keys { + configFileContent += fmt.Sprintf("%s %s;\n", key, attrMap[key]) + } + + return configFileContent +} + +func getNginxConfDir(configuredFile string) string { + nginxConfFile := nginxDefaultConfigFile + if configuredFile != "" { + nginxConfFile = configuredFile + } + configDir := filepath.Dir(nginxConfFile) + return configDir +} + +func getNginxConfFile(configuredFile string) string { + nginxConfFile := nginxDefaultConfigFile + if configuredFile != "" { + nginxConfFile = configuredFile + } + configFilenameOnly := filepath.Base(nginxConfFile) + return configFilenameOnly +} + +func prepareCommandFromTemplate(template string, params ...any) string { + command := fmt.Sprintf(template, + params..., + ) + + command = strings.Replace(command, "\n", " ", -1) + command = strings.Replace(command, "\t", " ", -1) + command = strings.TrimLeft(command, " ") + command = strings.TrimRight(command, " ") + + return command +} diff --git a/pkg/instrumentation/nginx_test.go b/pkg/instrumentation/nginx_test.go new file mode 100644 index 000000000..8a78b41ae --- /dev/null +++ b/pkg/instrumentation/nginx_test.go @@ -0,0 +1,657 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package instrumentation + +import ( + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +var nginxSdkInitContainerTestCommand = "echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh \"/opt/opentelemetry-webserver/agent\" \"/opt/opentelemetry-webserver/source-conf\" \"nginx.conf\" \"<>\"" +var nginxSdkInitContainerTestCommandCustomFile = "echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh \"/opt/opentelemetry-webserver/agent\" \"/opt/opentelemetry-webserver/source-conf\" \"custom-nginx.conf\" \"<>\"" +var nginxSdkInitContainerI13nScript = "\nNGINX_AGENT_DIR_FULL=$1\t\\n\nNGINX_AGENT_CONF_DIR_FULL=$2 \\n\nNGINX_CONFIG_FILE=$3 \\n\nNGINX_SID_PLACEHOLDER=$4 \\n\nNGINX_SID_VALUE=$5 \\n\necho \"Input Parameters: $@\" \\n\nset -x \\n\n\\n\ncp -ar /opt/opentelemetry/* ${NGINX_AGENT_DIR_FULL} \\n\n\\n\nNGINX_VERSION=$(cat ${NGINX_AGENT_CONF_DIR_FULL}/version.txt) \\n\nNGINX_AGENT_LOG_DIR=$(echo \"${NGINX_AGENT_DIR_FULL}/logs\" | sed 's,/,\\\\/,g') \\n\n\\n\ncat ${NGINX_AGENT_DIR_FULL}/conf/appdynamics_sdk_log4cxx.xml.template | sed 's,__agent_log_dir__,'${NGINX_AGENT_LOG_DIR}',g' > ${NGINX_AGENT_DIR_FULL}/conf/appdynamics_sdk_log4cxx.xml \\n\necho -e $OTEL_NGINX_AGENT_CONF > ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf \\n\nsed -i \"s,${NGINX_SID_PLACEHOLDER},${OTEL_NGINX_SERVICE_INSTANCE_ID},g\" ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf \\n\nsed -i \"1s,^,load_module ${NGINX_AGENT_DIR_FULL}/WebServerModule/Nginx/${NGINX_VERSION}/ngx_http_opentelemetry_module.so;\\\\n,g\" ${NGINX_AGENT_CONF_DIR_FULL}/${NGINX_CONFIG_FILE} \\n\nsed -i \"1s,^,env OTEL_RESOURCE_ATTRIBUTES;\\\\n,g\" ${NGINX_AGENT_CONF_DIR_FULL}/${NGINX_CONFIG_FILE} \\n\nmv ${NGINX_AGENT_CONF_DIR_FULL}/opentelemetry_agent.conf ${NGINX_AGENT_CONF_DIR_FULL}/conf.d \\n\n\t\t" + +func TestInjectNginxSDK(t *testing.T) { + + tests := []struct { + name string + v1alpha1.Nginx + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "Clone Container not present", + Nginx: v1alpha1.Nginx{ + Image: "foo/bar:1", + Attrs: []corev1.EnvVar{ + { + Name: "NginxModuleOtelMaxQueueSize", + Value: "4096", + }, + }, + }, + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelMaxQueueSize 4096;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName nginx-service-name;\nNginxModuleServiceNamespace req-namespace;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + }, + }, + }, + }, + }, + }, + // === Test ConfigFile configuration ============================= + { + name: "ConfigFile honored", + Nginx: v1alpha1.Nginx{ + Image: "foo/bar:1", + ConfigFile: "/opt/nginx/custom-nginx.conf", + }, + pod: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /opt/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommandCustomFile}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName nginx-service-name;\nNginxModuleServiceNamespace req-namespace;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/opt/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + }, + }, + }, + }, + }}, + // === Test Removal of probes ============================= + { + name: "Probes removed on clone init container", + Nginx: v1alpha1.Nginx{ + Image: "foo/bar:1", + }, + pod: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + ReadinessProbe: &corev1.Probe{}, + StartupProbe: &corev1.Probe{}, + LivenessProbe: &corev1.Probe{}, + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName nginx-service-name;\nNginxModuleServiceNamespace req-namespace;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + ReadinessProbe: &corev1.Probe{}, + StartupProbe: &corev1.Probe{}, + LivenessProbe: &corev1.Probe{}, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + }, + }, + }, + }, + }, + }, + // Pod Namespace specified + { + name: "Pod Namespace specified", + Nginx: v1alpha1.Nginx{Image: "foo/bar:1"}, + pod: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Namespace: "my-namespace", + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Namespace: "my-namespace", + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName nginx-service-name;\nNginxModuleServiceNamespace my-namespace;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + }, + }, + }, + }, + }, + }, + } + + resourceMap := map[string]string{ + string(semconv.K8SDeploymentNameKey): "nginx-service-name", + string(semconv.K8SNamespaceNameKey): "req-namespace", + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectNginxSDK(logr.Discard(), test.Nginx, test.pod, 0, "http://otlp-endpoint:4317", resourceMap) + assert.Equal(t, test.expected, pod) + }) + } +} + +func TestInjectNginxUnknownNamespace(t *testing.T) { + + tests := []struct { + name string + v1alpha1.Nginx + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "Clone Container not present, unknown namespace", + Nginx: v1alpha1.Nginx{Image: "foo/bar:1"}, + pod: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + {}, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: nginxAgentConfigVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: nginxAgentVolume, + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "foo/bar:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName nginx-service-name;\nNginxModuleServiceNamespace nginx;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + }, + }, + }, + }, + }, + }, + } + + resourceMap := map[string]string{ + string(semconv.K8SDeploymentNameKey): "nginx-service-name", + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + pod := injectNginxSDK(logr.Discard(), test.Nginx, test.pod, 0, "http://otlp-endpoint:4317", resourceMap) + assert.Equal(t, test.expected, pod) + }) + } +} + +func TestNginxInitContainerMissing(t *testing.T) { + tests := []struct { + name string + pod corev1.Pod + expected bool + }{ + { + name: "InitContainer_Already_Inject", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + { + Name: nginxAgentInitContainerName, + }, + }, + }, + }, + expected: false, + }, + { + name: "InitContainer_Absent_1", + pod: corev1.Pod{ + Spec: corev1.PodSpec{ + InitContainers: []corev1.Container{ + { + Name: "istio-init", + }, + }, + }, + }, + expected: true, + }, + { + name: "InitContainer_Absent_2", + pod: corev1.Pod{ + Spec: corev1.PodSpec{}, + }, + expected: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + result := isNginxInitContainerMissing(test.pod, nginxAgentInitContainerName) + assert.Equal(t, test.expected, result) + }) + } +} diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 06ff988d6..49f93d706 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -55,6 +55,7 @@ type languageInstrumentations struct { Python instrumentationWithContainers DotNet instrumentationWithContainers ApacheHttpd instrumentationWithContainers + Nginx instrumentationWithContainers Go instrumentationWithContainers Sdk instrumentationWithContainers } @@ -78,6 +79,9 @@ func (langInsts languageInstrumentations) isSingleInstrumentationEnabled() bool if langInsts.ApacheHttpd.Instrumentation != nil { count++ } + if langInsts.Nginx.Instrumentation != nil { + count++ + } if langInsts.Go.Instrumentation != nil { count++ } @@ -120,6 +124,11 @@ func (langInsts languageInstrumentations) areContainerNamesConfiguredForMultiple instrWithoutContainers += isInstrWithoutContainers(langInsts.ApacheHttpd) allContainers = append(allContainers, langInsts.ApacheHttpd.Containers) } + if langInsts.Nginx.Instrumentation != nil { + instrWithContainers += isInstrWithContainers(langInsts.Nginx) + instrWithoutContainers += isInstrWithoutContainers(langInsts.Nginx) + allContainers = append(allContainers, langInsts.Nginx.Containers) + } if langInsts.Go.Instrumentation != nil { instrWithContainers += isInstrWithContainers(langInsts.Go) instrWithoutContainers += isInstrWithoutContainers(langInsts.Go) @@ -171,6 +180,9 @@ func (langInsts *languageInstrumentations) setInstrumentationLanguageContainers( if langInsts.ApacheHttpd.Instrumentation != nil { langInsts.ApacheHttpd.Containers = containers } + if langInsts.Nginx.Instrumentation != nil { + langInsts.Nginx.Containers = containers + } if langInsts.Go.Instrumentation != nil { langInsts.Go.Containers = containers } @@ -282,6 +294,18 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Apache HTTPD auto instrumentation is not enabled") } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectNginx); err != nil { + // we still allow the pod to be created, but we log a message to the operator's logs + logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") + return pod, err + } + if featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() || inst == nil { + insts.Nginx.Instrumentation = inst + } else { + logger.Error(nil, "support for Nginx auto instrumentation is not enabled") + pm.Recorder.Event(pod.DeepCopy(), "Warning", "InstrumentationRequestRejected", "support for Nginx auto instrumentation is not enabled") + } + if inst, err = pm.getInstrumentationInstance(ctx, ns, pod, annotationInjectSdk); err != nil { // we still allow the pod to be created, but we log a message to the operator's logs logger.Error(err, "failed to select an OpenTelemetry Instrumentation instance for this pod") @@ -291,7 +315,9 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c if insts.Java.Instrumentation == nil && insts.NodeJS.Instrumentation == nil && insts.Python.Instrumentation == nil && insts.DotNet.Instrumentation == nil && insts.Go.Instrumentation == nil && insts.ApacheHttpd.Instrumentation == nil && + insts.Nginx.Instrumentation == nil && insts.Sdk.Instrumentation == nil { + logger.V(1).Info("annotation not present in deployment, skipping instrumentation injection") return pod, nil } @@ -305,6 +331,7 @@ func (pm *instPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod c insts.DotNet.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectDotnetContainersName) insts.Go.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectGoContainersName) insts.ApacheHttpd.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectApacheHttpdContainersName) + insts.Nginx.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectNginxContainersName) insts.Sdk.Containers = annotationValue(ns.ObjectMeta, pod.ObjectMeta, annotationInjectSdkContainersName) // We check if provided annotations and instrumentations are valid diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 4eca4610e..eedbb3b05 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -2846,6 +2846,254 @@ func TestMutatePod(t *testing.T) { }) }, }, + + { + name: "nginx injection, true", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "req-namespace", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Namespace: "req-namespace", + }, + Spec: v1alpha1.InstrumentationSpec{ + Nginx: v1alpha1.Nginx{ + Image: "otel/nginx-inj:1", + Attrs: []corev1.EnvVar{{ + Name: "NginxModuleOtelMaxQueueSize", + Value: "4096", + }}, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://otlp-endpoint:4317", + }, + Env: []corev1.EnvVar{}, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Annotations: map[string]string{ + annotationInjectNginx: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "nginx", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Annotations: map[string]string{ + annotationInjectNginx: "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otel-nginx-conf-dir", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: "otel-nginx-agent", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "otel/nginx-inj:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelMaxQueueSize 4096;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName my-nginx-6c44bcbdd;\nNginxModuleServiceNamespace req-namespace;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "nginx", + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "my-nginx-6c44bcbdd", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://otlp-endpoint:4317", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=nginx,k8s.namespace.name=req-namespace,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd", + }, + }, + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { + name: "nginx injection feature gate disabled", + ns: corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "nginx-disabled", + }, + }, + inst: v1alpha1.Instrumentation{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Namespace: "nginx-disabled", + }, + Spec: v1alpha1.InstrumentationSpec{ + Nginx: v1alpha1.Nginx{ + Image: "otel/nginx-inj:1", + Env: []corev1.EnvVar{ + { + Name: "OTEL_LOG_LEVEL", + Value: "debug", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://localhost:4317", + }, + }, + Attrs: []corev1.EnvVar{{ + Name: "NginxModuleOtelMaxQueueSize", + Value: "4096", + }}, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://otlp-endpoint:4317", + }, + Env: []corev1.EnvVar{ + { + Name: "OTEL_EXPORTER_OTLP_TIMEOUT", + Value: "20", + }, + { + Name: "OTEL_TRACES_SAMPLER", + Value: "parentbased_traceidratio", + }, + { + Name: "OTEL_TRACES_SAMPLER_ARG", + Value: "0.85", + }, + }, + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Annotations: map[string]string{ + annotationInjectNginx: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "nginx", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + Annotations: map[string]string{ + annotationInjectNginx: "true", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "nginx", + }, + }, + }, + }, + setFeatureGates: func(t *testing.T) { + originalVal := featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), false)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), originalVal)) + }) + }, + }, + { name: "missing annotation", ns: corev1.Namespace{ diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 2a064cb2a..dd53ca071 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -173,6 +173,23 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) } } + + if insts.Nginx.Instrumentation != nil { + otelinst := *insts.Nginx.Instrumentation + i.logger.V(1).Info("injecting Nginx instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) + + nginxContainers := insts.Nginx.Containers + + for _, container := range strings.Split(nginxContainers, ",") { + index := getContainerIndex(container, pod) + // Nginx agent is configured via config files rather than env vars. + // Therefore, service name, otlp endpoint and other attributes are passed to the agent injection method + pod = injectNginxSDK(i.logger, otelinst.Spec.Nginx, pod, index, otelinst.Spec.Endpoint, i.createResourceMap(ctx, otelinst, ns, pod, index)) + pod = i.injectCommonEnvVar(otelinst, pod, index) + pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + } + } + if insts.Sdk.Instrumentation != nil { otelinst := *insts.Sdk.Instrumentation i.logger.V(1).Info("injecting sdk-only instrumentation into pod", "otelinst-namespace", otelinst.Namespace, "otelinst-name", otelinst.Name) diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index e16decacd..c19e9cd04 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1388,6 +1388,168 @@ func TestInjectApacheHttpd(t *testing.T) { } } +func TestInjectNginx(t *testing.T) { + + tests := []struct { + name string + insts languageInstrumentations + pod corev1.Pod + expected corev1.Pod + }{ + { + name: "injection enabled, exporter set", + insts: languageInstrumentations{ + Nginx: instrumentationWithContainers{ + Instrumentation: &v1alpha1.Instrumentation{ + Spec: v1alpha1.InstrumentationSpec{ + Nginx: v1alpha1.Nginx{ + Image: "img:1", + Attrs: []corev1.EnvVar{{ + Name: "NginxModuleOtelMaxQueueSize", + Value: "4096", + }}, + }, + Exporter: v1alpha1.Exporter{ + Endpoint: "http://otlp-endpoint:4317", + }, + }, + }, + Containers: "", + }, + }, + pod: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "app", + }, + }, + }, + }, + expected: corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-nginx-6c44bcbdd", + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otel-nginx-conf-dir", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + { + Name: "otel-nginx-agent", + VolumeSource: corev1.VolumeSource{ + EmptyDir: &corev1.EmptyDirVolumeSource{}, + }, + }, + }, + InitContainers: []corev1.Container{ + { + Name: nginxAgentCloneContainerName, + Image: "", + Command: []string{"/bin/sh", "-c"}, + Args: []string{"cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt"}, + VolumeMounts: []corev1.VolumeMount{{ + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }}, + }, + { + Name: nginxAgentInitContainerName, + Image: "img:1", + Command: []string{"/bin/sh", "-c"}, + Args: []string{nginxSdkInitContainerTestCommand}, + Env: []corev1.EnvVar{ + { + Name: nginxAttributesEnvVar, + Value: "NginxModuleEnabled ON;\nNginxModuleOtelExporterEndpoint http://otlp-endpoint:4317;\nNginxModuleOtelMaxQueueSize 4096;\nNginxModuleOtelSpanExporter otlp;\nNginxModuleResolveBackends ON;\nNginxModuleServiceInstanceId <>;\nNginxModuleServiceName my-nginx-6c44bcbdd;\nNginxModuleServiceNamespace nginx;\nNginxModuleTraceAsError ON;\n", + }, + { + Name: "OTEL_NGINX_I13N_SCRIPT", + Value: nginxSdkInitContainerI13nScript, + }, + { + Name: nginxServiceInstanceIdEnvVar, + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: nginxAgentConfDirFull, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "app", + VolumeMounts: []corev1.VolumeMount{ + { + Name: nginxAgentVolume, + MountPath: nginxAgentDirFull, + }, + { + Name: nginxAgentConfigVolume, + MountPath: "/etc/nginx", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "LD_LIBRARY_PATH", + Value: "/opt/opentelemetry-webserver/agent/sdk_lib/lib", + }, + { + Name: "OTEL_SERVICE_NAME", + Value: "my-nginx-6c44bcbdd", + }, + { + Name: "OTEL_EXPORTER_OTLP_ENDPOINT", + Value: "http://otlp-endpoint:4317", + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "spec.nodeName", + }, + }, + }, + { + Name: "OTEL_RESOURCE_ATTRIBUTES", + Value: "k8s.container.name=app,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd", + }, + }, + }, + }, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + inj := sdkInjector{ + logger: logr.Discard(), + } + pod := inj.inject(context.Background(), test.insts, corev1.Namespace{}, test.pod) + assert.Equal(t, test.expected, pod) + }) + } +} + func TestInjectSdkOnly(t *testing.T) { inst := v1alpha1.Instrumentation{ Spec: v1alpha1.InstrumentationSpec{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index a3fed661e..0b45be4fb 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -36,6 +36,7 @@ type InstrumentationUpgrade struct { DefaultAutoInstPython string DefaultAutoInstDotNet string DefaultAutoInstApacheHttpd string + DefaultAutoInstNginx string DefaultAutoInstGo string } @@ -152,5 +153,18 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Apache HTTPD auto instrumentation is not enabled") } } + autoInstNginx := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx] + if autoInstNginx != "" { + if featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() { + // upgrade the image only if the image matches the annotation + if inst.Spec.Nginx.Image == autoInstNginx { + inst.Spec.Nginx.Image = u.DefaultAutoInstNginx + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx] = u.DefaultAutoInstNginx + } + } else { + u.Logger.Error(nil, "support for Nginx auto instrumentation is not enabled") + u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Nginx auto instrumentation is not enabled") + } + } return inst } diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 88857742d..f8d989810 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -44,6 +44,12 @@ func TestUpgrade(t *testing.T) { require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal)) }) + originalVal = featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), true)) + t.Cleanup(func() { + require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), originalVal)) + }) + nsName := strings.ToLower(t.Name()) err := k8sClient.Create(context.Background(), &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -63,6 +69,7 @@ func TestUpgrade(t *testing.T) { v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", v1alpha1.AnnotationDefaultAutoInstrumentationGo: "go:1", v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd:1", + v1alpha1.AnnotationDefaultAutoInstrumentationNginx: "nginx:1", }, }, Spec: v1alpha1.InstrumentationSpec{ @@ -78,6 +85,7 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "dotnet:1", inst.Spec.DotNet.Image) assert.Equal(t, "go:1", inst.Spec.Go.Image) assert.Equal(t, "apache-httpd:1", inst.Spec.ApacheHttpd.Image) + assert.Equal(t, "nginx:1", inst.Spec.Nginx.Image) err = k8sClient.Create(context.Background(), inst) require.NoError(t, err) @@ -89,6 +97,7 @@ func TestUpgrade(t *testing.T) { DefaultAutoInstDotNet: "dotnet:2", DefaultAutoInstGo: "go:2", DefaultAutoInstApacheHttpd: "apache-httpd:2", + DefaultAutoInstNginx: "nginx:2", Client: k8sClient, } err = up.ManagedInstances(context.Background()) @@ -112,4 +121,6 @@ func TestUpgrade(t *testing.T) { assert.Equal(t, "go:2", updated.Spec.Go.Image) assert.Equal(t, "apache-httpd:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd]) assert.Equal(t, "apache-httpd:2", updated.Spec.ApacheHttpd.Image) + assert.Equal(t, "nginx:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx]) + assert.Equal(t, "nginx:2", updated.Spec.Nginx.Image) } diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml new file mode 100644 index 000000000..f25801708 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml new file mode 100644 index 000000000..9c8297f89 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml @@ -0,0 +1,17 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: nginx +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + nginx: + attrs: + - name: NginxModuleOtelMaxQueueSize + value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml new file mode 100644 index 000000000..ff21ccd67 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml @@ -0,0 +1,59 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-nginx: 'true' + sidecar.opentelemetry.io/inject: 'true' + labels: + app: my-nginx +spec: + containers: + - env: + - name: LD_LIBRARY_PATH + value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: '0.25' + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: otel-nginx-agent + mountPath: /opt/opentelemetry-webserver/agent + - name: otel-nginx-conf-dir + mountPath: /etc/nginx + - args: + - --config=env:OTEL_CONFIG + name: otc-container + initContainers: + - args: + - cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt + name: otel-agent-source-container-clone + - name: otel-agent-attach-nginx + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + args: + - echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh "/opt/opentelemetry-webserver/agent" "/opt/opentelemetry-webserver/source-conf" "nginx.conf" "<>" +status: + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml new file mode 100644 index 000000000..6ea7c9765 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml @@ -0,0 +1,88 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-nginx +spec: + selector: + matchLabels: + app: my-nginx + replicas: 1 + template: + metadata: + labels: + app: my-nginx + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nginx: "true" + spec: + containers: + - name: myapp + image: nginxinc/nginx-unprivileged:1.23.1 + imagePullPolicy: Always + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + ports: + - containerPort: 8765 + env: + - name: LD_LIBRARY_PATH + value: /opt + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + imagePullPolicy: Always + resources: + limits: + cpu: "1" + memory: 500Mi + requests: + cpu: 250m + memory: 100Mi + volumes: + - name: nginx-conf + configMap: + name: nginx-conf + items: + - key: nginx.conf + path: nginx.conf + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: | + # user nginx; + worker_processes 1; + events { + worker_connections 10240; + } + http { + include /etc/nginx/conf.d/*.conf; + server { + listen 8765; + server_name localhost; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /api/customer/ { + proxy_pass http://localhost:8282/api/customer/; + } + location /api/vendor/ { + proxy_pass http://localhost:8383/api/vendor/; + } + + location /seznam { + proxy_pass http://www.seznam.cz/; + } + } + + } + +--- diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml new file mode 100644 index 000000000..6606f291d --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml @@ -0,0 +1,22 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml new file mode 100644 index 000000000..1f5296bc0 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml @@ -0,0 +1,19 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: nginx +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + nginx: + attrs: + - name: NginxModuleOtelMaxQueueSize + value: "4096" + diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml new file mode 100644 index 000000000..f66a3ebb3 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml @@ -0,0 +1,77 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nginx: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + labels: + app: my-nginx +spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - env: + - name: LD_LIBRARY_PATH + value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /opt/opentelemetry-webserver/agent + name: otel-nginx-agent + - mountPath: /etc/nginx + name: otel-nginx-conf-dir + - env: + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myrabbit + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - args: + - --config=env:OTEL_CONFIG + name: otc-container +status: + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml new file mode 100644 index 000000000..03ccf5c33 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml @@ -0,0 +1,93 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-nginx +spec: + selector: + matchLabels: + app: my-nginx + replicas: 1 + template: + metadata: + labels: + app: my-nginx + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nginx: "true" + instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: nginxinc/nginx-unprivileged:1.23.1 + imagePullPolicy: Always + ports: + - containerPort: 8765 + env: + - name: LD_LIBRARY_PATH + value: /opt + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + imagePullPolicy: Always + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi + - name: myrabbit + image: rabbitmq + volumes: + - name: nginx-conf + configMap: + name: nginx-conf + items: + - key: nginx.conf + path: nginx.conf + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: | + # user nginx; + worker_processes 1; + events { + worker_connections 10240; + } + http { + include /etc/nginx/conf.d/*.conf; + server { + listen 8765; + server_name localhost; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /api/customer/ { + proxy_pass http://localhost:8282/api/customer/; + } + location /api/vendor/ { + proxy_pass http://localhost:8383/api/vendor/; + } + + location /seznam { + proxy_pass http://www.seznam.cz/; + } + } + + } + +--- \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml new file mode 100644 index 000000000..ea590a88d --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml @@ -0,0 +1,74 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-nginx: "true" + sidecar.opentelemetry.io/inject: "true" + labels: + app: my-nginx +spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - env: + - name: LD_LIBRARY_PATH + value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - mountPath: /opt/opentelemetry-webserver/agent + name: otel-nginx-agent + - mountPath: /etc/nginx + name: otel-nginx-conf-dir + - env: + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: "0.25" + - name: OTEL_RESOURCE_ATTRIBUTES + name: myrabbit + - args: + - --config=env:OTEL_CONFIG + name: otc-container +status: + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml new file mode 100644 index 000000000..98766fdb6 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml @@ -0,0 +1,92 @@ +# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-nginx +spec: + selector: + matchLabels: + app: my-nginx + replicas: 1 + template: + metadata: + labels: + app: my-nginx + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nginx: "true" + instrumentation.opentelemetry.io/container-names: "myrabbit" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: nginxinc/nginx-unprivileged:1.23.1 + imagePullPolicy: Always + ports: + - containerPort: 8765 + env: + - name: LD_LIBRARY_PATH + value: /opt + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + imagePullPolicy: Always + resources: + limits: + cpu: 500m + memory: 500Mi + requests: + cpu: 100m + memory: 100Mi + - name: myrabbit + image: rabbitmq + volumes: + - name: nginx-conf + configMap: + name: nginx-conf + items: + - key: nginx.conf + path: nginx.conf +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: | + # user nginx; + worker_processes 1; + events { + worker_connections 10240; + } + http { + include /etc/nginx/conf.d/*.conf; + server { + listen 8765; + server_name localhost; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /api/customer/ { + proxy_pass http://localhost:8282/api/customer/; + } + location /api/vendor/ { + proxy_pass http://localhost:8383/api/vendor/; + } + + location /seznam { + proxy_pass http://www.seznam.cz/; + } + } + + } + +--- \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml new file mode 100644 index 000000000..f25801708 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml @@ -0,0 +1,21 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: sidecar +spec: + mode: sidecar + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + logging: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] diff --git a/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml new file mode 100644 index 000000000..9c8297f89 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml @@ -0,0 +1,17 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: Instrumentation +metadata: + name: nginx +spec: + exporter: + endpoint: http://localhost:4317 + propagators: + - jaeger + - b3 + sampler: + type: parentbased_traceidratio + argument: "0.25" + nginx: + attrs: + - name: NginxModuleOtelMaxQueueSize + value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml new file mode 100644 index 000000000..38474a2a0 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + instrumentation.opentelemetry.io/inject-nginx: 'true' + sidecar.opentelemetry.io/inject: 'true' + labels: + app: my-nginx +spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - env: + - name: LD_LIBRARY_PATH + value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib + - name: OTEL_SERVICE_NAME + value: my-nginx + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://localhost:4317 + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: OTEL_PROPAGATORS + value: jaeger,b3 + - name: OTEL_TRACES_SAMPLER + value: parentbased_traceidratio + - name: OTEL_TRACES_SAMPLER_ARG + value: '0.25' + - name: OTEL_RESOURCE_ATTRIBUTES + name: myapp + volumeMounts: + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + - name: otel-nginx-agent + mountPath: /opt/opentelemetry-webserver/agent + - name: otel-nginx-conf-dir + mountPath: /etc/nginx + - args: + - --config=env:OTEL_CONFIG + name: otc-container + initContainers: + - args: + - cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt + name: otel-agent-source-container-clone + - name: otel-agent-attach-nginx + args: + - echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh "/opt/opentelemetry-webserver/agent" "/opt/opentelemetry-webserver/source-conf" "nginx.conf" "<>" +status: + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml new file mode 100644 index 000000000..bd0530e56 --- /dev/null +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml @@ -0,0 +1,89 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-nginx +spec: + selector: + matchLabels: + app: my-nginx + replicas: 1 + template: + metadata: + labels: + app: my-nginx + annotations: + sidecar.opentelemetry.io/inject: "true" + instrumentation.opentelemetry.io/inject-nginx: "true" + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 2000 + containers: + - name: myapp + image: nginxinc/nginx-unprivileged:1.23.1 + imagePullPolicy: Always + ports: + - containerPort: 8765 + env: + - name: LD_LIBRARY_PATH + value: /opt + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + readOnly: true + imagePullPolicy: Always + resources: + limits: + cpu: "1" + memory: 500Mi + requests: + cpu: 250m + memory: 100Mi + volumes: + - name: nginx-conf + configMap: + name: nginx-conf + items: + - key: nginx.conf + path: nginx.conf + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-conf +data: + nginx.conf: | + # user nginx; + worker_processes 1; + events { + worker_connections 10240; + } + http { + include /etc/nginx/conf.d/*.conf; + server { + listen 8765; + server_name localhost; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + location /api/customer/ { + proxy_pass http://localhost:8282/api/customer/; + } + location /api/vendor/ { + proxy_pass http://localhost:8383/api/vendor/; + } + + location /seznam { + proxy_pass http://www.seznam.cz/; + } + } + + } + +--- diff --git a/versions.txt b/versions.txt index 086276688..877032de7 100644 --- a/versions.txt +++ b/versions.txt @@ -35,3 +35,7 @@ autoinstrumentation-go=v0.3.0-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt autoinstrumentation-apache-httpd=1.0.3 + +# Represents the current release of Apache HTTPD instrumentation. +# Should match autoinstrumentation/apache-httpd/version.txt +autoinstrumentation-nginx=1.0.3 From c6dc1d1cda311c0f327d57940f63e9301249ab06 Mon Sep 17 00:00:00 2001 From: Vineeth Pothulapati Date: Tue, 10 Oct 2023 06:25:12 -0500 Subject: [PATCH 1071/1234] Release 0.86.0 (#2202) * Release 0.86.0 * update for review comments --- .chloggen/1901-support-multi-cont-instr.yaml | 16 ------- .chloggen/2033-nginx-autoinstrumentation.yaml | 16 ------- ...179-fix-dotnet-auto-by-ns-annotations.yaml | 16 ------- .chloggen/add-pdb-support.yaml | 19 --------- .chloggen/add-tolerations.yaml | 16 ------- .chloggen/bump-dotnet-1.0.2.yaml | 16 ------- .chloggen/default-managed.yaml | 16 ------- .chloggen/discoverymanager_metrics.yaml | 16 ------- .chloggen/feat_ta-cliconfig.yaml | 16 ------- .chloggen/fix_ta-regex-hashing.yaml | 16 ------- .chloggen/get-rid-of-autoscaling-v2beta2.yaml | 20 --------- .chloggen/proxy.yaml | 16 ------- .chloggen/python41b0.yaml | 16 ------- CHANGELOG.md | 42 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++-- versions.txt | 14 +++---- 18 files changed, 55 insertions(+), 228 deletions(-) delete mode 100755 .chloggen/1901-support-multi-cont-instr.yaml delete mode 100755 .chloggen/2033-nginx-autoinstrumentation.yaml delete mode 100644 .chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml delete mode 100644 .chloggen/add-pdb-support.yaml delete mode 100644 .chloggen/add-tolerations.yaml delete mode 100644 .chloggen/bump-dotnet-1.0.2.yaml delete mode 100755 .chloggen/default-managed.yaml delete mode 100755 .chloggen/discoverymanager_metrics.yaml delete mode 100755 .chloggen/feat_ta-cliconfig.yaml delete mode 100755 .chloggen/fix_ta-regex-hashing.yaml delete mode 100644 .chloggen/get-rid-of-autoscaling-v2beta2.yaml delete mode 100755 .chloggen/proxy.yaml delete mode 100755 .chloggen/python41b0.yaml diff --git a/.chloggen/1901-support-multi-cont-instr.yaml b/.chloggen/1901-support-multi-cont-instr.yaml deleted file mode 100755 index e7a33cc4a..000000000 --- a/.chloggen/1901-support-multi-cont-instr.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Add support for multi instrumentation" - -# One or more tracking issues related to the change -issues: [1717] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/2033-nginx-autoinstrumentation.yaml b/.chloggen/2033-nginx-autoinstrumentation.yaml deleted file mode 100755 index 064b01724..000000000 --- a/.chloggen/2033-nginx-autoinstrumentation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Implementation of new Nginx autoinstrumentation. - -# One or more tracking issues related to the change -issues: [2033] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml b/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml deleted file mode 100644 index 8f47a1d0c..000000000 --- a/.chloggen/2179-fix-dotnet-auto-by-ns-annotations.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Fix .NET Automatic Instrumentation for alpine based images configured by namespace annotations" - -# One or more tracking issues related to the change -issues: [2179] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-pdb-support.yaml b/.chloggen/add-pdb-support.yaml deleted file mode 100644 index 780217b38..000000000 --- a/.chloggen/add-pdb-support.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Add PDB support for OpenTelemetryCollector" - -# One or more tracking issues related to the change -issues: - - 2136 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - This PR adds support for PodDisruptionBudgets when OpenTelemetryCollector is deployed - as `deployment` or `statefulset`. diff --git a/.chloggen/add-tolerations.yaml b/.chloggen/add-tolerations.yaml deleted file mode 100644 index 67fbb8881..000000000 --- a/.chloggen/add-tolerations.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add support for Tolerations on target allocator - -# One or more tracking issues related to the change -issues: [2172] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-dotnet-1.0.2.yaml b/.chloggen/bump-dotnet-1.0.2.yaml deleted file mode 100644 index b2e14cc9e..000000000 --- a/.chloggen/bump-dotnet-1.0.2.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.2 - -# One or more tracking issues related to the change -issues: [2168] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/default-managed.yaml b/.chloggen/default-managed.yaml deleted file mode 100755 index 9f816920a..000000000 --- a/.chloggen/default-managed.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fixes scenario where an old CRD would cause the operator to default to an unmanaged state - -# One or more tracking issues related to the change -issues: [2039] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/discoverymanager_metrics.yaml b/.chloggen/discoverymanager_metrics.yaml deleted file mode 100755 index 7bfe64534..000000000 --- a/.chloggen/discoverymanager_metrics.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Enable discovery manager metrics in target allocator - -# One or more tracking issues related to the change -issues: [2170] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/feat_ta-cliconfig.yaml b/.chloggen/feat_ta-cliconfig.yaml deleted file mode 100755 index 6d42bb7f1..000000000 --- a/.chloggen/feat_ta-cliconfig.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Allow target allocator to be completely configured via the config file - -# One or more tracking issues related to the change -issues: [2129] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_ta-regex-hashing.yaml b/.chloggen/fix_ta-regex-hashing.yaml deleted file mode 100755 index 1e9d3ced1..000000000 --- a/.chloggen/fix_ta-regex-hashing.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Rebuild targets on scrape config regex-only changes - -# One or more tracking issues related to the change -issues: [1358,1926] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/get-rid-of-autoscaling-v2beta2.yaml b/.chloggen/get-rid-of-autoscaling-v2beta2.yaml deleted file mode 100644 index 554ccd15e..000000000 --- a/.chloggen/get-rid-of-autoscaling-v2beta2.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Get rid of autoscaling/v2beta2 - -# One or more tracking issues related to the change -issues: - - 2145 - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - Kubernetes 1.23 is the minimum available version everywhere after 1.22 deprecation, - due to it, the minimum required version has been updated to it, dropping support for - autoscaling/v2beta2 diff --git a/.chloggen/proxy.yaml b/.chloggen/proxy.yaml deleted file mode 100755 index 5b2bf7715..000000000 --- a/.chloggen/proxy.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Propagate proxy environment variables to operands. - -# One or more tracking issues related to the change -issues: [2146] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/python41b0.yaml b/.chloggen/python41b0.yaml deleted file mode 100755 index 77d895eb3..000000000 --- a/.chloggen/python41b0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump python autoinstrumentation version to 1.20.0/0.41b0 - -# One or more tracking issues related to the change -issues: [2192] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index c69bb290c..dd8f8dc94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,48 @@ Changes by Version ================== +## 0.86.0 + +### 🛑 Breaking changes 🛑 + +- `operator`: Get rid of autoscaling/v2beta2 (#2145) + Kubernetes 1.23 is the minimum available version everywhere after 1.22 deprecation, + due to it, the minimum required version has been updated to it, dropping support for + autoscaling/v2beta2 + + +### 💡 Enhancements 💡 + +- `operator`: Add support for multi instrumentation (#1717) +- `operator`: Implementation of new Nginx autoinstrumentation. (#2033) +- `operator`: Add PDB support for OpenTelemetryCollector (#2136) + This PR adds support for PodDisruptionBudgets when OpenTelemetryCollector is deployed + as `deployment` or `statefulset`. +- `operator`: Add support for Tolerations on target allocator (#2172) +- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.2 (#2168) +- `target allocator`: Enable discovery manager metrics in target allocator (#2170) +- `target allocator`: Allow target allocator to be completely configured via the config file (#2129) +- `operator`: Propagate proxy environment variables to operands. (#2146) +- `autoinstrumentation`: Bump python autoinstrumentation version to 1.20.0/0.41b0 (#2192) + +### 🧰 Bug fixes 🧰 + +- `autoinstrumentation`: Fix .NET Automatic Instrumentation for alpine based images configured by namespace annotations (#2179) +- `operator`: fixes scenario where an old CRD would cause the operator to default to an unmanaged state (#2039) +- `target allocator`: Rebuild targets on scrape config regex-only changes (#1358, #1926) + +### Components + +* [OpenTelemetry Collector - v0.86.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.86.0) +* [OpenTelemetry Contrib - v0.86.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.86.0) +* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) +* [.NET auto-instrumentation - 1.0.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.2) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) +* [Go - v0.3.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.3.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) +* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] + ## 0.85.0 ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 949074581..d18c623f7 100644 --- a/README.md +++ b/README.md @@ -710,6 +710,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.86.0 | v1.23 to v1.28 | v1 | | v0.85.0 | v1.19 to v1.28 | v1 | | v0.84.0 | v1.19 to v1.28 | v1 | | v0.83.0 | v1.19 to v1.27 | v1 | @@ -732,7 +733,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.66.0 | v1.19 to v1.25 | v1 | | v0.64.1 | v1.19 to v1.25 | v1 | | v0.63.1 | v1.19 to v1.25 | v1 | -| v0.62.1 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 9a67efaa2..a752aeda2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.86.0 | @VineethReddy02 | | v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | | v0.92.0 | @pavolloffay | +| v0.93.0 | @VineethReddy02 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 588e52044..8557a573f 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-10-03T20:05:49Z" + createdAt: "2023-10-09T11:59:54Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.85.0 + name: opentelemetry-operator.v0.86.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -300,7 +300,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.85.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.86.0 livenessProbe: httpGet: path: /healthz @@ -407,7 +407,7 @@ spec: maturity: alpha provider: name: OpenTelemetry Community - version: 0.85.0 + version: 0.86.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 877032de7..329ab6e1e 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.85.0 +opentelemetry-collector=0.86.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.85.0 +operator=0.86.0 # Represents the current release of the Target Allocator. -targetallocator=0.85.0 +targetallocator=0.86.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.85.0 +operator-opamp-bridge=0.86.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -23,11 +23,11 @@ autoinstrumentation-nodejs=0.41.1 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt -autoinstrumentation-python=0.40b0 +autoinstrumentation-python=0.41b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=1.0.0 +autoinstrumentation-dotnet=1.0.2 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.3.0-alpha @@ -38,4 +38,4 @@ autoinstrumentation-apache-httpd=1.0.3 # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt -autoinstrumentation-nginx=1.0.3 +autoinstrumentation-nginx=1.0.3 \ No newline at end of file From bf5cf3f1e267591bf67b58289ddd85dbba9b92ff Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 10 Oct 2023 16:41:38 +0200 Subject: [PATCH 1072/1234] Change GHCR bundle image to fix publish issues (#2203) Signed-off-by: Pavol Loffay --- .github/workflows/publish-operator-bundle.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index 75b02f8e1..a28e1081b 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -29,7 +29,7 @@ jobs: with: images: | otel/opentelemetry-operator-bundle - ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator-bundle + ghcr.io/open-telemetry/opentelemetry-operator/operator-bundle tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} From 86f5fa10bdcc3ba53cfabd754f7be9ae09be099a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 10 Oct 2023 19:38:07 +0200 Subject: [PATCH 1073/1234] Remove autoscaling v2beta2 (#2204) Signed-off-by: Pavol Loffay --- controllers/reconcile_test.go | 6 +++--- internal/manifests/mutate.go | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 4f0c70155..a47bfd67d 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" appsv1 "k8s.io/api/apps/v1" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" policyV1 "k8s.io/api/policy/v1" @@ -287,7 +287,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { result: controllerruntime.Result{}, checks: []check{ func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + actual := autoscalingv2.HorizontalPodAutoscaler{} exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) assert.NoError(t, hpaErr) require.Len(t, actual.Spec.Metrics, 1) @@ -304,7 +304,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { result: controllerruntime.Result{}, checks: []check{ func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - actual := autoscalingv2beta2.HorizontalPodAutoscaler{} + actual := autoscalingv2.HorizontalPodAutoscaler{} exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) assert.NoError(t, hpaErr) require.Len(t, actual.Spec.Metrics, 1) diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go index 1f875c3f5..3c2dbee31 100644 --- a/internal/manifests/mutate.go +++ b/internal/manifests/mutate.go @@ -24,7 +24,6 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" policyV1 "k8s.io/api/policy/v1" @@ -142,11 +141,6 @@ func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn { wantIng := desired.(*networkingv1.Ingress) mutateIngress(ing, wantIng) - case *autoscalingv2beta2.HorizontalPodAutoscaler: - existingHPA := existing.(*autoscalingv2beta2.HorizontalPodAutoscaler) - desiredHPA := desired.(*autoscalingv2beta2.HorizontalPodAutoscaler) - mutateV2BetaHPA(existingHPA, desiredHPA) - case *autoscalingv2.HorizontalPodAutoscaler: existingHPA := existing.(*autoscalingv2.HorizontalPodAutoscaler) desiredHPA := desired.(*autoscalingv2.HorizontalPodAutoscaler) @@ -219,12 +213,6 @@ func mutateRoleBinding(existing, desired *rbacv1.RoleBinding) { existing.Subjects = desired.Subjects } -func mutateV2BetaHPA(existing, desired *autoscalingv2beta2.HorizontalPodAutoscaler) { - existing.Annotations = desired.Annotations - existing.Labels = desired.Labels - existing.Spec = desired.Spec -} - func mutateAutoscalingHPA(existing, desired *autoscalingv2.HorizontalPodAutoscaler) { existing.Annotations = desired.Annotations existing.Labels = desired.Labels From 4be529c90fcd56a434596a00d6c9bbf5bc792373 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 10 Oct 2023 20:38:15 +0200 Subject: [PATCH 1074/1234] Specify Kube version in CSV (#2205) Signed-off-by: Pavol Loffay --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 1 + .../bases/opentelemetry-operator.clusterserviceversion.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 8557a573f..7e2718448 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -405,6 +405,7 @@ spec: - email: jpkroehling@redhat.com name: Juraci Paixão Kröhling maturity: alpha + minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community version: 0.86.0 diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 1e463adcb..b97952217 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -109,6 +109,7 @@ spec: - email: jpkroehling@redhat.com name: Juraci Paixão Kröhling maturity: alpha + minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community version: 0.0.0 From c4ba855cdfee0dd5b81d3afc6909e6f97f79e44b Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 10 Oct 2023 16:29:18 -0400 Subject: [PATCH 1075/1234] [chore] Add issue templates (#2206) * add issue templates * add pr template --- .github/ISSUE_TEMPLATE/bug_report.yaml | 73 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.yaml | 36 ++++++++++ .github/ISSUE_TEMPLATE/other.yaml | 22 +++++++ .github/pull_request_template.md | 9 +++ 4 files changed, 140 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml create mode 100644 .github/ISSUE_TEMPLATE/other.yaml create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 000000000..50eae6554 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,73 @@ +name: Bug report +description: Create a report to help us improve +labels: ["bug", "needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Please make sure to fill out the entire form below, providing as much context as you can in order to help us triage and track down your bug as quickly as possible. + + Before filing a bug, please be sure you have searched through [existing bugs](https://github.com/open-telemetry/opentelemetry-operator/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) to see if an existing issue covers your bug. + - type: dropdown + id: component + attributes: + label: Component(s) + description: Which component(s) does your bug report concern? + multiple: true + options: + - operator + - collector + - instrumentation + - target allocator + - opamp bridge + - type: textarea + attributes: + label: What happened? + description: Please provide as much detail as you reasonably can. + value: | + ## Description + + ## Steps to Reproduce + + ## Expected Result + + ## Actual Result + + validations: + required: true + - type: input + attributes: + label: Kubernetes Version + description: What version did you use? (e.g., `1.23.0`) + validations: + required: true + - type: input + attributes: + label: Operator version + description: What version did you use? (e.g., `v0.4.0`, `1eb551b`, etc) + validations: + required: true + - type: input + attributes: + label: Collector version + description: What version did you use? (e.g., `v0.4.0`, `1eb551b`, etc) + validations: + required: true + - type: textarea + attributes: + label: Environment information + description: Please provide any additional information about your installation. + value: | + ## Environment + OS: (e.g., "Ubuntu 20.04") + Compiler(if manually compiled): (e.g., "go 14.2") + - type: textarea + attributes: + label: Log output + description: | + Please copy and paste any relevant log output. + render: shell + - type: textarea + attributes: + label: Additional context + description: Any additional information you think may be relevant to this issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 000000000..30de7c742 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,36 @@ +name: Feature request +description: Suggest an idea for this project +labels: ["enhancement", "needs triage"] +body: + - type: dropdown + id: component + attributes: + label: Component(s) + description: Which component(s) does your feature request concern? + multiple: true + options: + - operator + - collector + - instrumentation + - target allocator + - opamp bridge + - type: textarea + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + - type: textarea + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml new file mode 100644 index 000000000..d7be8e0b0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -0,0 +1,22 @@ +name: Other issue +description: Create a new issue to help us improve the operator +labels: ["needs triage"] +body: + - type: dropdown + id: component + attributes: + label: Component(s) + description: Which component(s) does your issue concern? + multiple: true + options: + - operator + - collector + - instrumentation + - target allocator + - opamp bridge + - type: textarea + attributes: + label: Describe the issue you're reporting + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..23b91eeee --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +**Description:** + + +**Link to tracking Issue:** + +**Testing:** + +**Documentation:** From 282c169f0499694dd0b780cf225bc8680c05071d Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Tue, 10 Oct 2023 14:33:59 -0700 Subject: [PATCH 1076/1234] update usage of logging exporter (#2130) * update usage of logging exporter The logging exporter is being deprecated in favour of the debug exporter. This changes references to the logging exporter to use the new debug exporter instead. Note: this will remain in draft until v0.86.0 is released which will be the first release to include the debug exporter. Signed-off-by: Alex Boten * add changelog Signed-off-by: Alex Boten * update collector version Signed-off-by: Alex Boten * update expected data Signed-off-by: Alex Boten * fix test expectations Signed-off-by: Alex Boten --------- Signed-off-by: Alex Boten --- .chloggen/codeboten_logging-debug.yaml | 16 ++++++++++++ README.md | 26 +++++++++---------- ...emetry-operator.clusterserviceversion.yaml | 2 +- cmd/operator-opamp-bridge/agent/agent_test.go | 24 ++++++++--------- .../testdata/agentbasiccomponentsallowed.yaml | 2 +- .../agent/testdata/agentbatchnotallowed.yaml | 2 +- .../testdata/agentnoprocessorsallowed.yaml | 2 +- .../agent/testdata/basic.yaml | 4 +-- .../agent/testdata/invalid.yaml | 4 +-- .../agent/testdata/updated.yaml | 4 +-- .../operator/testdata/collector.yaml | 4 +-- .../operator/testdata/invalid-collector.yaml | 4 +-- .../operator/testdata/updated-collector.yaml | 4 +-- cmd/otel-allocator/README.md | 4 +-- .../core_v1alpha1_opentelemetrycollector.yaml | 4 +-- config/samples/sidecar.yaml | 4 +-- .../adapters/config_to_ports_test.go | 6 ++--- .../adapters/config_validate_test.go | 8 +++--- .../manifests/collector/configmap_test.go | 16 ++++++------ .../manifests/collector/container_test.go | 2 +- .../http_sd_config_servicemonitor_test.yaml | 4 +-- ..._sd_config_servicemonitor_test_ta_set.yaml | 4 +-- .../testdata/http_sd_config_test.yaml | 4 +-- ...elabel_config_expected_with_sd_config.yaml | 4 +-- .../testdata/relabel_config_original.yaml | 4 +-- .../manifests/collector/testdata/test.yaml | 4 +-- .../targetallocator/testdata/test.yaml | 4 +-- pkg/collector/reconcile/testdata/test.yaml | 4 +-- tests/e2e-autoscale/autoscale/00-install.yaml | 8 +++--- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../02-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- .../00-install-collector.yaml | 4 +-- tests/e2e-openshift/route/00-install.yaml | 4 +-- .../e2e-upgrade/upgrade-test/00-install.yaml | 4 +-- .../upgrade-test/02-upgrade-collector.yaml | 4 +-- tests/e2e/daemonset-features/01-install.yaml | 4 +-- tests/e2e/ingress-subdomains/00-install.yaml | 4 +-- tests/e2e/ingress/00-install.yaml | 4 +-- tests/e2e/managed-reconcile/00-install.yaml | 4 +-- tests/e2e/managed-reconcile/01-assert.yaml | 4 +-- .../01-disable-reconciliation.yaml | 8 +++--- tests/e2e/managed-reconcile/02-assert.yaml | 4 +-- .../02-enable-reconciliation.yaml | 4 +-- .../00-promreceiver-allocatorconfig.yaml | 4 +-- .../01-promreceiver-labeldrop.yaml | 4 +-- ...02-promreceiver-allocatorconfig-extra.yaml | 4 +-- .../03-promreceiver-nopromconfig.yaml | 4 +-- .../e2e/smoke-init-containers/00-install.yaml | 4 +-- .../e2e/smoke-pod-annotations/00-install.yaml | 4 +-- .../00-install.yaml | 4 +-- .../01-install-second-config.yaml | 4 +-- .../00-install.yaml | 4 +-- tests/e2e/smoke-sidecar/00-install.yaml | 4 +-- tests/e2e/smoke-simplest/00-install.yaml | 4 +-- tests/e2e/smoke-statefulset/00-install.yaml | 4 +-- .../e2e/smoke-targetallocator/00-install.yaml | 4 +-- .../01-change-ta-config.yaml | 4 +-- .../e2e/statefulset-features/00-install.yaml | 4 +-- .../01-update-volume-claim-templates.yaml | 4 +-- .../targetallocator-features/00-install.yaml | 4 +-- 70 files changed, 183 insertions(+), 167 deletions(-) create mode 100755 .chloggen/codeboten_logging-debug.yaml diff --git a/.chloggen/codeboten_logging-debug.yaml b/.chloggen/codeboten_logging-debug.yaml new file mode 100755 index 000000000..e37123dbc --- /dev/null +++ b/.chloggen/codeboten_logging-debug.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: updating the operator to use the Collector's debug exporter in replacement of the deprecated logging exporter + +# One or more tracking issues related to the change +issues: [2130] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index d18c623f7..e930cf372 100644 --- a/README.md +++ b/README.md @@ -48,21 +48,21 @@ spec: timeout: 10s exporters: - logging: + debug: service: pipelines: traces: receivers: [otlp] processors: [] - exporters: [logging] + exporters: [debug] EOF ``` **_WARNING:_** Until the OpenTelemetry Collector format is stable, changes may be required in the above example to remain compatible with the latest version of the OpenTelemetry Collector image being referenced. -This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `logging`, which writes the spans to the console (`stdout`) of the OpenTelemetry Collector instance that receives the span. +This will create an OpenTelemetry Collector instance named `simplest`, exposing a `jaeger-grpc` port to consume spans from your instrumented applications and exporting those spans via `debug`, which writes the spans to the console (`stdout`) of the OpenTelemetry Collector instance that receives the span. The `config` node holds the `YAML` that should be passed down as-is to the underlying OpenTelemetry Collector instances. Refer to the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector) documentation for a reference of the possible entries. @@ -111,14 +111,14 @@ spec: processors: exporters: - logging: + debug: service: pipelines: traces: receivers: [jaeger] processors: [] - exporters: [logging] + exporters: [debug] EOF kubectl apply -f - < Date: Wed, 11 Oct 2023 10:48:56 -0400 Subject: [PATCH 1077/1234] Refactor OpAMP bridge logging and configuration (#2196) --- .chloggen/refactor-bridge-config.yaml | 19 +++ cmd/operator-opamp-bridge/agent/agent.go | 48 +++--- cmd/operator-opamp-bridge/agent/agent_test.go | 60 +++++-- .../agent/testdata/agent.yaml | 25 ++- .../testdata/agentbasiccomponentsallowed.yaml | 27 ++- .../agent/testdata/agentbatchnotallowed.yaml | 27 ++- .../agent/testdata/agenthttpbasic.yaml | 14 ++ .../testdata/agentnoprocessorsallowed.yaml | 27 ++- cmd/operator-opamp-bridge/config/cli.go | 101 ----------- cmd/operator-opamp-bridge/config/config.go | 159 +++++++++++++++--- .../config/config_test.go | 150 +++++++++++++++++ cmd/operator-opamp-bridge/config/flags.go | 59 +++++++ .../config/flags_test.go | 84 +++++++++ .../config/testdata/agent.yaml | 14 ++ .../config/testdata/agentbadconf.yaml | 14 ++ .../testdata/agentbasiccomponentsallowed.yaml | 22 +++ .../config/testdata/agenthttpbasic.yaml | 14 ++ cmd/operator-opamp-bridge/logger/logger.go | 4 +- cmd/operator-opamp-bridge/main.go | 21 +-- cmd/operator-opamp-bridge/metrics/reporter.go | 16 +- cmd/operator-opamp-bridge/operator/client.go | 4 +- 21 files changed, 674 insertions(+), 235 deletions(-) create mode 100755 .chloggen/refactor-bridge-config.yaml create mode 100644 cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml delete mode 100644 cmd/operator-opamp-bridge/config/cli.go create mode 100644 cmd/operator-opamp-bridge/config/config_test.go create mode 100644 cmd/operator-opamp-bridge/config/flags.go create mode 100644 cmd/operator-opamp-bridge/config/flags_test.go create mode 100644 cmd/operator-opamp-bridge/config/testdata/agent.yaml create mode 100644 cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml create mode 100644 cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml create mode 100644 cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml diff --git a/.chloggen/refactor-bridge-config.yaml b/.chloggen/refactor-bridge-config.yaml new file mode 100755 index 000000000..53538980e --- /dev/null +++ b/.chloggen/refactor-bridge-config.yaml @@ -0,0 +1,19 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: OpAMP Bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: This PR simplifies the bridge's configuration and logging by renaming and removing fields. + +# One or more tracking issues related to the change +issues: [1368] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + `components_allowed` => `componentsAllowed` + :x: `protocol` which is now inferred from endpoint + capabilities `[]string` => `map[Capability]bool` for enhanced configuration validation diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go index fb8067d22..1923810a3 100644 --- a/cmd/operator-opamp-bridge/agent/agent.go +++ b/cmd/operator-opamp-bridge/agent/agent.go @@ -17,8 +17,10 @@ package agent import ( "bytes" "context" + "fmt" "time" + "github.com/go-logr/logr" "gopkg.in/yaml.v3" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/metrics" @@ -35,7 +37,7 @@ import ( ) type Agent struct { - logger types.Logger + logger logr.Logger appliedKeys map[collectorKey]bool startTime uint64 @@ -47,12 +49,12 @@ type Agent struct { opampClient client.OpAMPClient metricReporter *metrics.MetricReporter - config config.Config + config *config.Config applier operator.ConfigApplier remoteConfigEnabled bool } -func NewAgent(logger types.Logger, applier operator.ConfigApplier, config config.Config, opampClient client.OpAMPClient) *Agent { +func NewAgent(logger logr.Logger, applier operator.ConfigApplier, config *config.Config, opampClient client.OpAMPClient) *Agent { agent := &Agent{ config: config, applier: applier, @@ -64,8 +66,10 @@ func NewAgent(logger types.Logger, applier operator.ConfigApplier, config config opampClient: opampClient, } - agent.logger.Debugf("Agent created, id=%v, type=%s, version=%s.", - agent.instanceId.String(), config.GetAgentType(), config.GetAgentVersion()) + agent.logger.V(3).Info("Agent created", + "instanceId", agent.instanceId.String(), + "agentType", config.GetAgentType(), + "agentVersion", config.GetAgentVersion()) return agent } @@ -81,17 +85,17 @@ func (agent *Agent) getHealth() *protobufs.AgentHealth { // onConnect is called when an agent is successfully connected to a server. func (agent *Agent) onConnect() { - agent.logger.Debugf("Connected to the server.") + agent.logger.V(3).Info("Connected to the server.") } // onConnectFailed is called when an agent was unable to connect to a server. func (agent *Agent) onConnectFailed(err error) { - agent.logger.Errorf("Failed to connect to the server: %v", err) + agent.logger.Error(err, "failed to connect to the server") } // onError is called when an agent receives an error response from the server. func (agent *Agent) onError(err *protobufs.ServerErrorResponse) { - agent.logger.Errorf("Server returned an error response: %v", err.ErrorMessage) + agent.logger.Error(fmt.Errorf(err.GetErrorMessage()), "server returned an error response") } // saveRemoteConfigStatus receives a status from the server when the server sets a remote configuration. @@ -126,14 +130,14 @@ func (agent *Agent) Start() error { return err } - agent.logger.Debugf("Starting OpAMP client...") + agent.logger.V(3).Info("Starting OpAMP client...") err = agent.opampClient.Start(context.Background(), settings) if err != nil { return err } - agent.logger.Debugf("OpAMP Client started.") + agent.logger.V(3).Info("OpAMP Client started.") return nil } @@ -141,9 +145,9 @@ func (agent *Agent) Start() error { // updateAgentIdentity receives a new instanced Id from the remote server and updates the agent's instanceID field. // The meter will be reinitialized by the onMessage function. func (agent *Agent) updateAgentIdentity(instanceId ulid.ULID) { - agent.logger.Debugf("Agent identity is being changed from id=%v to id=%v", - agent.instanceId.String(), - instanceId.String()) + agent.logger.V(3).Info("Agent identity is being changed", + "old instanceId", agent.instanceId.String(), + "new instanceid", instanceId.String()) agent.instanceId = instanceId } @@ -152,14 +156,14 @@ func (agent *Agent) updateAgentIdentity(instanceId ulid.ULID) { func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.EffectiveConfig, error) { instances, err := agent.applier.ListInstances() if err != nil { - agent.logger.Errorf("couldn't list instances", err) + agent.logger.Error(err, "failed to list instances") return nil, err } instanceMap := map[string]*protobufs.AgentConfigFile{} for _, instance := range instances { marshaled, err := yaml.Marshal(instance) if err != nil { - agent.logger.Errorf("couldn't marshal collector configuration", err) + agent.logger.Error(err, "failed to marhsal config") return nil, err } mapKey := newCollectorKey(instance.GetName(), instance.GetNamespace()) @@ -181,7 +185,7 @@ func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.Effectiv func (agent *Agent) initMeter(settings *protobufs.TelemetryConnectionSettings) { reporter, err := metrics.NewMetricReporter(agent.logger, settings, agent.config.GetAgentType(), agent.config.GetAgentVersion(), agent.instanceId) if err != nil { - agent.logger.Errorf("Cannot collect metrics: %v", err) + agent.logger.Error(err, "failed to create metric reporter") return } @@ -244,11 +248,11 @@ func (agent *Agent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (*pro // Shutdown will stop the OpAMP client gracefully. func (agent *Agent) Shutdown() { - agent.logger.Debugf("Agent shutting down...") + agent.logger.V(3).Info("Agent shutting down...") if agent.opampClient != nil { err := agent.opampClient.Stop(context.Background()) if err != nil { - agent.logger.Errorf(err.Error()) + agent.logger.Error(err, "failed to stop client") } } if agent.metricReporter != nil { @@ -265,16 +269,16 @@ func (agent *Agent) onMessage(ctx context.Context, msg *types.MessageData) { var err error status, err := agent.applyRemoteConfig(msg.RemoteConfig) if err != nil { - agent.logger.Errorf(err.Error()) + agent.logger.Error(err, "failed to apply remote config") } err = agent.opampClient.SetRemoteConfigStatus(status) if err != nil { - agent.logger.Errorf(err.Error()) + agent.logger.Error(err, "failed to set remote config status") return } err = agent.opampClient.UpdateEffectiveConfig(ctx) if err != nil { - agent.logger.Errorf(err.Error()) + agent.logger.Error(err, "failed to update effective config") } } @@ -283,7 +287,7 @@ func (agent *Agent) onMessage(ctx context.Context, msg *types.MessageData) { if msg.AgentIdentification != nil { newInstanceId, err := ulid.Parse(msg.AgentIdentification.NewInstanceUid) if err != nil { - agent.logger.Errorf(err.Error()) + agent.logger.Error(err, "couldn't parse instance UID") return } agent.updateAgentIdentity(newInstanceId) diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go index 6093ebc31..6c561f3bd 100644 --- a/cmd/operator-opamp-bridge/agent/agent_test.go +++ b/cmd/operator-opamp-bridge/agent/agent_test.go @@ -22,6 +22,8 @@ import ( "sort" "testing" + "github.com/go-logr/logr" + "github.com/spf13/pflag" "github.com/stretchr/testify/require" "github.com/oklog/ulid/v2" @@ -32,18 +34,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client/fake" - logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" ) var ( - l = logf.Log.WithName("agent-tests") - clientLogger = logger.NewLogger(&l) - _ client.OpAMPClient = &mockOpampClient{} + l = logr.Discard() + _ client.OpAMPClient = &mockOpampClient{} ) type mockOpampClient struct { @@ -91,7 +90,7 @@ func (m *mockOpampClient) SetPackageStatuses(statuses *protobufs.PackageStatuses return nil } -func getFakeApplier(t *testing.T, conf config.Config) *operator.Client { +func getFakeApplier(t *testing.T, conf *config.Config) *operator.Client { schemeBuilder := runtime.NewSchemeBuilder(func(s *runtime.Scheme) error { s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) @@ -173,6 +172,34 @@ func TestAgent_onMessage(t *testing.T) { }, }, }, + { + name: "base case http", + fields: fields{ + configFile: "testdata/agenthttpbasic.yaml", + }, + args: args{ + ctx: context.Background(), + configFile: map[string]string{ + "good/testnamespace": "basic.yaml", + }, + }, + want: want{ + contents: map[string][]string{ + "good/testnamespace": { + "kind: OpenTelemetryCollector", + "name: good", + "namespace: testnamespace", + "send_batch_size: 10000", + "receivers: [otlp]", + "status:", + }, + }, + status: &protobufs.RemoteConfigStatus{ + LastRemoteConfigHash: []byte("good/testnamespace405"), + Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, + }, + }, + }, { name: "failure", fields: fields{ @@ -448,11 +475,12 @@ func TestAgent_onMessage(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { mockClient := &mockOpampClient{} - conf, err := config.Load(tt.fields.configFile) - require.NoError(t, err, "should be able to load config") + conf := config.NewConfig(logr.Discard()) + loadErr := config.LoadFromFile(conf, tt.fields.configFile) + require.NoError(t, loadErr, "should be able to load config") applier := getFakeApplier(t, conf) - agent := NewAgent(clientLogger, applier, conf, mockClient) - err = agent.Start() + agent := NewAgent(l, applier, conf, mockClient) + err := agent.Start() defer agent.Shutdown() require.NoError(t, err, "should be able to start agent") data, err := getMessageDataFromConfigFile(tt.args.configFile) @@ -498,10 +526,16 @@ func TestAgent_onMessage(t *testing.T) { func Test_CanUpdateIdentity(t *testing.T) { mockClient := &mockOpampClient{} - conf, err := config.Load("testdata/agent.yaml") - require.NoError(t, err, "should be able to load config") + + fs := config.GetFlagSet(pflag.ContinueOnError) + configFlag := []string{"--config-file", "testdata/agent.yaml"} + err := fs.Parse(configFlag) + assert.NoError(t, err) + conf := config.NewConfig(logr.Discard()) + loadErr := config.LoadFromFile(conf, "testdata/agent.yaml") + require.NoError(t, loadErr, "should be able to load config") applier := getFakeApplier(t, conf) - agent := NewAgent(clientLogger, applier, conf, mockClient) + agent := NewAgent(l, applier, conf, mockClient) err = agent.Start() defer agent.Shutdown() require.NoError(t, err, "should be able to start agent") diff --git a/cmd/operator-opamp-bridge/agent/testdata/agent.yaml b/cmd/operator-opamp-bridge/agent/testdata/agent.yaml index b03015cef..5a70b06a8 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/agent.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/agent.yaml @@ -1,15 +1,14 @@ endpoint: ws://127.0.0.1:4320/v1/opamp -protocol: wss capabilities: - - AcceptsRemoteConfig - - ReportsEffectiveConfig - # - AcceptsPackages - # - ReportsPackageStatuses - - ReportsOwnTraces - - ReportsOwnMetrics - - ReportsOwnLogs - - AcceptsOpAMPConnectionSettings - - AcceptsOtherConnectionSettings - - AcceptsRestartCommand - - ReportsHealth - - ReportsRemoteConfig + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml index 3f6376bf7..c994ad122 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml @@ -1,19 +1,18 @@ endpoint: ws://127.0.0.1:4320/v1/opamp -protocol: wss capabilities: - - AcceptsRemoteConfig - - ReportsEffectiveConfig - # - AcceptsPackages - # - ReportsPackageStatuses - - ReportsOwnTraces - - ReportsOwnMetrics - - ReportsOwnLogs - - AcceptsOpAMPConnectionSettings - - AcceptsOtherConnectionSettings - - AcceptsRestartCommand - - ReportsHealth - - ReportsRemoteConfig -components_allowed: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true +componentsAllowed: receivers: - otlp processors: diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml index 5c21e7757..1009f079a 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml @@ -1,19 +1,18 @@ endpoint: ws://127.0.0.1:4320/v1/opamp -protocol: wss capabilities: - - AcceptsRemoteConfig - - ReportsEffectiveConfig - # - AcceptsPackages - # - ReportsPackageStatuses - - ReportsOwnTraces - - ReportsOwnMetrics - - ReportsOwnLogs - - AcceptsOpAMPConnectionSettings - - AcceptsOtherConnectionSettings - - AcceptsRestartCommand - - ReportsHealth - - ReportsRemoteConfig -components_allowed: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true +componentsAllowed: receivers: - otlp processors: diff --git a/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml b/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml new file mode 100644 index 000000000..2dc1532d4 --- /dev/null +++ b/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml @@ -0,0 +1,14 @@ +endpoint: http://127.0.0.1:4320/v1/opamp +capabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml index a46e18341..fe53d0a00 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml @@ -1,19 +1,18 @@ endpoint: ws://127.0.0.1:4320/v1/opamp -protocol: wss capabilities: - - AcceptsRemoteConfig - - ReportsEffectiveConfig - # - AcceptsPackages - # - ReportsPackageStatuses - - ReportsOwnTraces - - ReportsOwnMetrics - - ReportsOwnLogs - - AcceptsOpAMPConnectionSettings - - AcceptsOtherConnectionSettings - - AcceptsRestartCommand - - ReportsHealth - - ReportsRemoteConfig -components_allowed: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true +componentsAllowed: receivers: - otlp exporters: diff --git a/cmd/operator-opamp-bridge/config/cli.go b/cmd/operator-opamp-bridge/config/cli.go deleted file mode 100644 index 06a782a0c..000000000 --- a/cmd/operator-opamp-bridge/config/cli.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "errors" - "flag" - "io/fs" - "path/filepath" - - "github.com/go-logr/logr" - "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(registerKnownTypes) -) - -func registerKnownTypes(s *runtime.Scheme) error { - s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) - metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) - return nil -} - -type CLIConfig struct { - ListenAddr *string - ConfigFilePath *string - - ClusterConfig *rest.Config - // KubeConfigFilePath empty if in cluster configuration is in use - KubeConfigFilePath string - RootLogger logr.Logger -} - -func GetLogger() logr.Logger { - opts := zap.Options{} - opts.BindFlags(flag.CommandLine) - - return zap.New(zap.UseFlagOptions(&opts)) -} - -func ParseCLI(logger logr.Logger) (CLIConfig, error) { - cLIConf := CLIConfig{ - RootLogger: logger, - ListenAddr: pflag.String("listen-addr", ":8080", "The address where this service serves."), - ConfigFilePath: pflag.String("config-file", defaultConfigFilePath, "The path to the config file."), - } - kubeconfigPath := pflag.String("kubeconfig-path", filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") - pflag.Parse() - - klog.SetLogger(logger) - - clusterConfig, err := clientcmd.BuildConfigFromFlags("", *kubeconfigPath) - cLIConf.KubeConfigFilePath = *kubeconfigPath - if err != nil { - pathError := &fs.PathError{} - if ok := errors.As(err, &pathError); !ok { - return CLIConfig{}, err - } - clusterConfig, err = rest.InClusterConfig() - if err != nil { - return CLIConfig{}, err - } - cLIConf.KubeConfigFilePath = "" // reset as we use in cluster configuration - } - cLIConf.ClusterConfig = clusterConfig - return cLIConf, nil -} - -func (cli CLIConfig) GetKubernetesClient() (client.Client, error) { - err := schemeBuilder.AddToScheme(scheme.Scheme) - if err != nil { - return nil, err - } - return client.New(cli.ClusterConfig, client.Options{ - Scheme: scheme.Scheme, - }) -} diff --git a/cmd/operator-opamp-bridge/config/config.go b/cmd/operator-opamp-bridge/config/config.go index 706ff09e0..d5253b8f5 100644 --- a/cmd/operator-opamp-bridge/config/config.go +++ b/cmd/operator-opamp-bridge/config/config.go @@ -16,43 +16,100 @@ package config import ( "crypto/rand" + "errors" "fmt" + "io/fs" + "net/url" "os" "runtime" "time" + "github.com/go-logr/logr" "github.com/oklog/ulid/v2" - "github.com/open-telemetry/opamp-go/client" + opampclient "github.com/open-telemetry/opamp-go/client" "github.com/open-telemetry/opamp-go/protobufs" + "github.com/spf13/pflag" "gopkg.in/yaml.v2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/klog/v2" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log/zap" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" ) const ( - agentType = "io.opentelemetry.operator-opamp-bridge" - defaultConfigFilePath = "/conf/remoteconfiguration.yaml" + agentType = "io.opentelemetry.operator-opamp-bridge" ) var ( - agentVersion = os.Getenv("OPAMP_VERSION") - hostname, _ = os.Hostname() + agentVersion = os.Getenv("OPAMP_VERSION") + hostname, _ = os.Hostname() + schemeBuilder = k8sruntime.NewSchemeBuilder(registerKnownTypes) +) + +func registerKnownTypes(s *k8sruntime.Scheme) error { + s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) + metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) + return nil +} + +func GetLogger() logr.Logger { + return zap.New(zap.UseFlagOptions(&zapCmdLineOpts)) +} + +type Capability string + +const ( + Unspecified Capability = "Unspecified" + ReportsStatus Capability = "ReportsStatus" + AcceptsRemoteConfig Capability = "AcceptsRemoteConfig" + ReportsEffectiveConfig Capability = "ReportsEffectiveConfig" + AcceptsPackages Capability = "AcceptsPackages" + ReportsPackageStatuses Capability = "ReportsPackageStatuses" + ReportsOwnTraces Capability = "ReportsOwnTraces" + ReportsOwnMetrics Capability = "ReportsOwnMetrics" + ReportsOwnLogs Capability = "ReportsOwnLogs" + AcceptsOpAMPConnectionSettings Capability = "AcceptsOpAMPConnectionSettings" + AcceptsOtherConnectionSettings Capability = "AcceptsOtherConnectionSettings" + AcceptsRestartCommand Capability = "AcceptsRestartCommand" + ReportsHealth Capability = "ReportsHealth" + ReportsRemoteConfig Capability = "ReportsRemoteConfig" ) type Config struct { - Endpoint string `yaml:"endpoint"` - Protocol string `yaml:"protocol"` - Capabilities []string `yaml:"capabilities"` + // KubeConfigFilePath is empty if InClusterConfig() should be used, otherwise it's a path to where a valid + // kubernetes configuration file. + KubeConfigFilePath string `yaml:"kubeConfigFilePath,omitempty"` + ListenAddr string `yaml:"listenAddr,omitempty"` + ClusterConfig *rest.Config `yaml:"-"` + RootLogger logr.Logger `yaml:"-"` // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) - ComponentsAllowed map[string][]string `yaml:"components_allowed,omitempty"` + ComponentsAllowed map[string][]string `yaml:"componentsAllowed,omitempty"` + Endpoint string `yaml:"endpoint"` + Capabilities map[Capability]bool `yaml:"capabilities"` +} + +func NewConfig(logger logr.Logger) *Config { + return &Config{ + RootLogger: logger, + } } -func (c *Config) CreateClient(logger *logger.Logger) client.OpAMPClient { - if c.Protocol == "http" { - return client.NewHTTP(logger) +func (c *Config) CreateClient() opampclient.OpAMPClient { + opampLogger := logger.NewLogger(c.RootLogger.WithName("client")) + agentScheme := c.GetAgentScheme() + if agentScheme == "http" || agentScheme == "https" { + return opampclient.NewHTTP(opampLogger) } - return client.NewWebSocket(logger) + return opampclient.NewWebSocket(opampLogger) } func (c *Config) GetComponentsAllowed() map[string]map[string]bool { @@ -70,7 +127,10 @@ func (c *Config) GetComponentsAllowed() map[string]map[string]bool { func (c *Config) GetCapabilities() protobufs.AgentCapabilities { var capabilities int32 - for _, capability := range c.Capabilities { + for capability, enabled := range c.Capabilities { + if !enabled { + continue + } // This is a helper so that we don't force consumers to prefix every agent capability formatted := fmt.Sprintf("AgentCapabilities_%s", capability) if v, ok := protobufs.AgentCapabilities_value[formatted]; ok { @@ -80,6 +140,14 @@ func (c *Config) GetCapabilities() protobufs.AgentCapabilities { return protobufs.AgentCapabilities(capabilities) } +func (c *Config) GetAgentScheme() string { + uri, err := url.ParseRequestURI(c.Endpoint) + if err != nil { + return "" + } + return uri.Scheme +} + func (c *Config) GetAgentType() string { return agentType } @@ -122,15 +190,68 @@ func (c *Config) RemoteConfigEnabled() bool { return capabilities&protobufs.AgentCapabilities_AgentCapabilities_AcceptsRemoteConfig != 0 } -func Load(file string) (Config, error) { - var cfg Config - if err := unmarshal(&cfg, file); err != nil { - return Config{}, err +func (c *Config) GetKubernetesClient() (client.Client, error) { + err := schemeBuilder.AddToScheme(scheme.Scheme) + if err != nil { + return nil, err + } + return client.New(c.ClusterConfig, client.Options{ + Scheme: scheme.Scheme, + }) +} + +func Load(logger logr.Logger, flagSet *pflag.FlagSet) (*Config, error) { + cfg := NewConfig(logger) + + // load the config from the config file + configFilePath, err := getConfigFilePath(flagSet) + if err != nil { + return nil, err } + err = LoadFromFile(cfg, configFilePath) + if err != nil { + return nil, err + } + + err = LoadFromCLI(cfg, flagSet) + if err != nil { + return nil, err + } + return cfg, nil } -func unmarshal(cfg *Config, configFile string) error { +func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { + var err error + klog.SetLogger(target.RootLogger) + ctrl.SetLogger(target.RootLogger) + + target.KubeConfigFilePath, err = getKubeConfigFilePath(flagSet) + if err != nil { + return err + } + clusterConfig, err := clientcmd.BuildConfigFromFlags("", target.KubeConfigFilePath) + if err != nil { + pathError := &fs.PathError{} + if ok := errors.As(err, &pathError); !ok { + return err + } + clusterConfig, err = rest.InClusterConfig() + if err != nil { + return err + } + } + target.ClusterConfig = clusterConfig + + target.ListenAddr, err = getListenAddr(flagSet) + if err != nil { + return err + } + + return nil +} + +func LoadFromFile(cfg *Config, configFile string) error { yamlFile, err := os.ReadFile(configFile) if err != nil { return err diff --git a/cmd/operator-opamp-bridge/config/config_test.go b/cmd/operator-opamp-bridge/config/config_test.go new file mode 100644 index 000000000..b8cce48a2 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/config_test.go @@ -0,0 +1,150 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "fmt" + "testing" + + "github.com/go-logr/logr" + "github.com/stretchr/testify/assert" +) + +func TestLoad(t *testing.T) { + type args struct { + file string + } + tests := []struct { + name string + args args + want *Config + wantErr assert.ErrorAssertionFunc + }{ + { + name: "base case", + args: args{ + file: "./testdata/agent.yaml", + }, + want: &Config{ + RootLogger: logr.Discard(), + Endpoint: "ws://127.0.0.1:4320/v1/opamp", + Capabilities: map[Capability]bool{ + AcceptsRemoteConfig: true, + ReportsEffectiveConfig: true, + ReportsOwnTraces: true, + ReportsOwnMetrics: true, + ReportsOwnLogs: true, + AcceptsOpAMPConnectionSettings: true, + AcceptsOtherConnectionSettings: true, + AcceptsRestartCommand: true, + ReportsHealth: true, + ReportsRemoteConfig: true, + AcceptsPackages: false, + ReportsPackageStatuses: false, + }, + }, + wantErr: assert.NoError, + }, + { + name: "http base case", + args: args{ + file: "./testdata/agenthttpbasic.yaml", + }, + want: &Config{ + RootLogger: logr.Discard(), + Endpoint: "http://127.0.0.1:4320/v1/opamp", + Capabilities: map[Capability]bool{ + AcceptsRemoteConfig: true, + ReportsEffectiveConfig: true, + ReportsOwnTraces: true, + ReportsOwnMetrics: true, + ReportsOwnLogs: true, + AcceptsOpAMPConnectionSettings: true, + AcceptsOtherConnectionSettings: true, + AcceptsRestartCommand: true, + ReportsHealth: true, + ReportsRemoteConfig: true, + AcceptsPackages: false, + ReportsPackageStatuses: false, + }, + }, + wantErr: assert.NoError, + }, + { + name: "basic components allowed", + args: args{ + file: "./testdata/agentbasiccomponentsallowed.yaml", + }, + want: &Config{ + RootLogger: logr.Discard(), + Endpoint: "ws://127.0.0.1:4320/v1/opamp", + Capabilities: map[Capability]bool{ + AcceptsRemoteConfig: true, + ReportsEffectiveConfig: true, + ReportsOwnTraces: true, + ReportsOwnMetrics: true, + ReportsOwnLogs: true, + AcceptsOpAMPConnectionSettings: true, + AcceptsOtherConnectionSettings: true, + AcceptsRestartCommand: true, + ReportsHealth: true, + ReportsRemoteConfig: true, + AcceptsPackages: false, + ReportsPackageStatuses: false, + }, + ComponentsAllowed: map[string][]string{ + "receivers": { + "otlp", + }, + "processors": { + "memory_limiter", + "batch", + }, + "exporters": { + "logging", + }, + }, + }, + wantErr: assert.NoError, + }, + { + name: "bad configuration", + args: args{ + file: "./testdata/agentbadconf.yaml", + }, + want: &Config{ + // We do unmarshal partially + Endpoint: "http://127.0.0.1:4320/v1/opamp", + }, + wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { + return assert.ErrorContains(t, err, "error unmarshaling YAML", i...) + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := NewConfig(logr.Discard()) + err := LoadFromFile(got, tt.args.file) + if !tt.wantErr(t, err, fmt.Sprintf("Load(%v)", tt.args.file)) { + return + } + // there are some fields we don't care about, so we ignore them. + got.ClusterConfig = tt.want.ClusterConfig + got.RootLogger = tt.want.RootLogger + assert.Equalf(t, tt.want, got, "Load(%v)", tt.args.file) + + }) + } +} diff --git a/cmd/operator-opamp-bridge/config/flags.go b/cmd/operator-opamp-bridge/config/flags.go new file mode 100644 index 000000000..5bd42aaa9 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/flags.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "flag" + "path/filepath" + + "github.com/spf13/pflag" + "k8s.io/client-go/util/homedir" + "sigs.k8s.io/controller-runtime/pkg/log/zap" +) + +// Flag names. +const ( + opampBridgeName = "opamp-bridge" + defaultConfigFilePath = "/conf/remoteconfiguration.yaml" + configFilePathFlagName = "config-file" + listenAddrFlagName = "listen-addr" + kubeConfigPathFlagName = "kubeconfig-path" +) + +// We can't bind this flag to our FlagSet, so we need to handle it separately. +var zapCmdLineOpts zap.Options + +func GetFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { + flagSet := pflag.NewFlagSet(opampBridgeName, errorHandling) + flagSet.String(configFilePathFlagName, defaultConfigFilePath, "The path to the config file.") + flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") + flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) + zapCmdLineOpts.BindFlags(zapFlagSet) + flagSet.AddGoFlagSet(zapFlagSet) + return flagSet +} + +func getConfigFilePath(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(configFilePathFlagName) +} + +func getKubeConfigFilePath(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(kubeConfigPathFlagName) +} + +func getListenAddr(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(listenAddrFlagName) +} diff --git a/cmd/operator-opamp-bridge/config/flags_test.go b/cmd/operator-opamp-bridge/config/flags_test.go new file mode 100644 index 000000000..e297a3c69 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/flags_test.go @@ -0,0 +1,84 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "path/filepath" + "testing" + + "github.com/spf13/pflag" + "github.com/stretchr/testify/assert" +) + +func TestGetFlagSet(t *testing.T) { + fs := GetFlagSet(pflag.ExitOnError) + + // Check if each flag exists + assert.NotNil(t, fs.Lookup(configFilePathFlagName), "Flag %s not found", configFilePathFlagName) + assert.NotNil(t, fs.Lookup(listenAddrFlagName), "Flag %s not found", listenAddrFlagName) + assert.NotNil(t, fs.Lookup(kubeConfigPathFlagName), "Flag %s not found", kubeConfigPathFlagName) +} + +func TestFlagGetters(t *testing.T) { + tests := []struct { + name string + flagArgs []string + expectedValue interface{} + expectedErr bool + getterFunc func(*pflag.FlagSet) (interface{}, error) + }{ + { + name: "GetConfigFilePath", + flagArgs: []string{"--" + configFilePathFlagName, "/path/to/config"}, + expectedValue: "/path/to/config", + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, + }, + { + name: "GetKubeConfigFilePath", + flagArgs: []string{"--" + kubeConfigPathFlagName, filepath.Join("~", ".kube", "config")}, + expectedValue: filepath.Join("~", ".kube", "config"), + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getKubeConfigFilePath(fs) }, + }, + { + name: "GetListenAddr", + flagArgs: []string{"--" + listenAddrFlagName, ":8081"}, + expectedValue: ":8081", + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getListenAddr(fs) }, + }, + { + name: "InvalidFlag", + flagArgs: []string{"--invalid-flag", "value"}, + expectedErr: true, + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + fs := GetFlagSet(pflag.ContinueOnError) + err := fs.Parse(tt.flagArgs) + + // If an error is expected during parsing, we check it here. + if tt.expectedErr { + assert.Error(t, err) + return + } + + got, err := tt.getterFunc(fs) + assert.NoError(t, err) + assert.Equal(t, tt.expectedValue, got) + }) + } +} diff --git a/cmd/operator-opamp-bridge/config/testdata/agent.yaml b/cmd/operator-opamp-bridge/config/testdata/agent.yaml new file mode 100644 index 000000000..5a70b06a8 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/testdata/agent.yaml @@ -0,0 +1,14 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +capabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml b/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml new file mode 100644 index 000000000..ba4903daf --- /dev/null +++ b/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml @@ -0,0 +1,14 @@ +endpoint: http://127.0.0.1:4320/v1/opamp +cawdawapabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml b/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml new file mode 100644 index 000000000..73d5683a3 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml @@ -0,0 +1,22 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +capabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true +componentsAllowed: + receivers: + - otlp + processors: + - memory_limiter + - batch + exporters: + - logging diff --git a/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml b/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml new file mode 100644 index 000000000..2dc1532d4 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml @@ -0,0 +1,14 @@ +endpoint: http://127.0.0.1:4320/v1/opamp +capabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/logger/logger.go b/cmd/operator-opamp-bridge/logger/logger.go index e973c7f5b..0beb8cbea 100644 --- a/cmd/operator-opamp-bridge/logger/logger.go +++ b/cmd/operator-opamp-bridge/logger/logger.go @@ -24,10 +24,10 @@ import ( var _ types.Logger = &Logger{} type Logger struct { - Logger *logr.Logger + Logger logr.Logger } -func NewLogger(logger *logr.Logger) *Logger { +func NewLogger(logger logr.Logger) *Logger { return &Logger{Logger: logger} } diff --git a/cmd/operator-opamp-bridge/main.go b/cmd/operator-opamp-bridge/main.go index abbd4d824..404bd50d0 100644 --- a/cmd/operator-opamp-bridge/main.go +++ b/cmd/operator-opamp-bridge/main.go @@ -18,37 +18,38 @@ import ( "os" "os/signal" + "github.com/spf13/pflag" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/agent" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" ) func main() { l := config.GetLogger() - cliConf, err := config.ParseCLI(l.WithName("cli-config")) + + flagSet := config.GetFlagSet(pflag.ExitOnError) + err := flagSet.Parse(os.Args) if err != nil { - l.Error(err, "unable to load ") + l.Error(err, "Unable to load flags") os.Exit(1) } - cfg, configLoadErr := config.Load(*cliConf.ConfigFilePath) + cfg, configLoadErr := config.Load(l, flagSet) if configLoadErr != nil { l.Error(configLoadErr, "Unable to load configuration") - return + os.Exit(1) } l.Info("Starting the Remote Configuration service") - agentLogf := l.WithName("agent") - agentLogger := logger.NewLogger(&agentLogf) - kubeClient, kubeErr := cliConf.GetKubernetesClient() + kubeClient, kubeErr := cfg.GetKubernetesClient() if kubeErr != nil { l.Error(kubeErr, "Couldn't create kubernetes client") os.Exit(1) } operatorClient := operator.NewClient(l.WithName("operator-client"), kubeClient, cfg.GetComponentsAllowed()) - opampClient := cfg.CreateClient(agentLogger) - opampAgent := agent.NewAgent(agentLogger, operatorClient, cfg, opampClient) + opampClient := cfg.CreateClient() + opampAgent := agent.NewAgent(l.WithName("agent"), operatorClient, cfg, opampClient) if err := opampAgent.Start(); err != nil { l.Error(err, "Cannot start OpAMP client") diff --git a/cmd/operator-opamp-bridge/metrics/reporter.go b/cmd/operator-opamp-bridge/metrics/reporter.go index e418ec294..27dc3f646 100644 --- a/cmd/operator-opamp-bridge/metrics/reporter.go +++ b/cmd/operator-opamp-bridge/metrics/reporter.go @@ -21,6 +21,7 @@ import ( "os" "time" + "github.com/go-logr/logr" "github.com/oklog/ulid/v2" "github.com/shirou/gopsutil/process" "go.opentelemetry.io/otel/attribute" @@ -30,14 +31,13 @@ import ( otelresource "go.opentelemetry.io/otel/sdk/resource" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" - "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" ) // MetricReporter is a metric reporter that collects Agent metrics and sends them to an // OTLP/HTTP destination. type MetricReporter struct { - logger types.Logger + logger logr.Logger meter metric.Meter meterShutdowner func() @@ -54,13 +54,7 @@ type MetricReporter struct { // NewMetricReporter creates an OTLP/HTTP client to the destination address supplied by the server. // TODO: do more validation on the endpoint, allow for gRPC. // TODO: set global provider and add more metrics to be reported. -func NewMetricReporter( - logger types.Logger, - dest *protobufs.TelemetryConnectionSettings, - agentType string, - agentVersion string, - instanceId ulid.ULID, -) (*MetricReporter, error) { +func NewMetricReporter(logger logr.Logger, dest *protobufs.TelemetryConnectionSettings, agentType string, agentVersion string, instanceId ulid.ULID) (*MetricReporter, error) { if dest.DestinationEndpoint == "" { return nil, fmt.Errorf("metric destination must specify DestinationEndpoint") @@ -145,7 +139,7 @@ func NewMetricReporter( func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer metric.Float64Observer) error { times, err := reporter.process.Times() if err != nil { - reporter.logger.Errorf("Cannot get process CPU times: %w", err) + reporter.logger.Error(err, "cannot get process CPU times") } observer.Observe(times.User, metric.WithAttributes(attribute.String("state", "user"))) observer.Observe(times.System, metric.WithAttributes(attribute.String("state", "system"))) @@ -156,7 +150,7 @@ func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer m func (reporter *MetricReporter) processMemoryPhysicalFunc(_ context.Context, observer metric.Float64Observer) error { memory, err := reporter.process.MemoryInfo() if err != nil { - reporter.logger.Errorf("Cannot get process memory information: %w", err) + reporter.logger.Error(err, "cannot get process memory information") return nil } observer.Observe(float64(memory.RSS)) diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go index 685eb59bd..dd5bec74b 100644 --- a/cmd/operator-opamp-bridge/operator/client.go +++ b/cmd/operator-opamp-bridge/operator/client.go @@ -82,7 +82,7 @@ func (c Client) create(ctx context.Context, name string, namespace string, colle return err } if warnings != nil { - c.log.Info("Some warnings present on collector: %v", warnings) + c.log.Info("Some warnings present on collector", "warnings", warnings) } c.log.Info("Creating collector") return c.k8sClient.Create(ctx, collector) @@ -96,7 +96,7 @@ func (c Client) update(ctx context.Context, old *v1alpha1.OpenTelemetryCollector return err } if warnings != nil { - c.log.Info("Some warnings present on collector: %v", warnings) + c.log.Info("Some warnings present on collector", "warnings", warnings) } c.log.Info("Updating collector") return c.k8sClient.Update(ctx, new) From 039e17617b06c183c0e037fc40731dccbef471b0 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 12 Oct 2023 13:27:02 -0400 Subject: [PATCH 1078/1234] [chore] Fix CI Tests (#2217) * Fix the tests * remove old one * fix applier --- cmd/operator-opamp-bridge/agent/agent_test.go | 2 +- config/manager/kustomization.yaml | 6 + kuttl-test-upgrade.yaml | 2 +- tests/e2e-upgrade/upgrade-test/00-assert.yaml | 9 +- .../e2e-upgrade/upgrade-test/00-install.yaml | 2 +- .../opentelemetry-operator-v0.49.0.yaml | 2732 ------ .../opentelemetry-operator-v0.86.0.yaml | 8558 +++++++++++++++++ 7 files changed, 8572 insertions(+), 2739 deletions(-) delete mode 100644 tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml create mode 100644 tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go index 6c561f3bd..9c8ca4a70 100644 --- a/cmd/operator-opamp-bridge/agent/agent_test.go +++ b/cmd/operator-opamp-bridge/agent/agent_test.go @@ -195,7 +195,7 @@ func TestAgent_onMessage(t *testing.T) { }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace405"), + LastRemoteConfigHash: []byte("good/testnamespace401"), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..dc4d5229f 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: ghcr.io/jacob.aronoff/opentelemetry-operator/opentelemetry-operator + newTag: e2e diff --git a/kuttl-test-upgrade.yaml b/kuttl-test-upgrade.yaml index 8066df516..0c4f7e7d8 100644 --- a/kuttl-test-upgrade.yaml +++ b/kuttl-test-upgrade.yaml @@ -12,7 +12,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite commands: - - command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml + - command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml - command: go run hack/check-operator-ready.go testDirs: - ./tests/e2e-upgrade/ diff --git a/tests/e2e-upgrade/upgrade-test/00-assert.yaml b/tests/e2e-upgrade/upgrade-test/00-assert.yaml index 50736de4a..d5c2c3825 100644 --- a/tests/e2e-upgrade/upgrade-test/00-assert.yaml +++ b/tests/e2e-upgrade/upgrade-test/00-assert.yaml @@ -3,10 +3,11 @@ kind: Deployment metadata: name: simplest-collector annotations: - operatorVersion: "v0.49.0" + operatorVersion: "v0.86.0" spec: - selector: - matchLabels: - app.kubernetes.io/version: latest + template: + metadata: + labels: + app.kubernetes.io/version: latest status: readyReplicas: 1 diff --git a/tests/e2e-upgrade/upgrade-test/00-install.yaml b/tests/e2e-upgrade/upgrade-test/00-install.yaml index 4dab8bdc6..9ae9054a4 100644 --- a/tests/e2e-upgrade/upgrade-test/00-install.yaml +++ b/tests/e2e-upgrade/upgrade-test/00-install.yaml @@ -3,7 +3,7 @@ kind: OpenTelemetryCollector metadata: name: simplest annotations: - operatorVersion: "v0.49.0" + operatorVersion: "v0.86.0" spec: replicas: 1 config: | diff --git a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml deleted file mode 100644 index 750fe9ca5..000000000 --- a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml +++ /dev/null @@ -1,2732 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-system ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: instrumentations.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: Instrumentation - listKind: InstrumentationList - plural: instrumentations - shortNames: - - otelinst - - otelinsts - singular: instrumentation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .spec.exporter.endpoint - name: Endpoint - type: string - - jsonPath: .spec.sampler.type - name: Sampler - type: string - - jsonPath: .spec.sampler.argument - name: Sampler Arg - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Instrumentation is the spec for OpenTelemetry instrumentation. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. - properties: - env: - description: 'Env defines common env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string - type: object - java: - description: Java defines configuration for java auto-instrumentation. - properties: - env: - description: 'Env defines java specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with javaagent auto-instrumentation JAR. - type: string - type: object - nodejs: - description: NodeJS defines configuration for nodejs auto-instrumentation. - properties: - env: - description: 'Env defines nodejs specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with NodeJS SDK and auto-instrumentation. - type: string - type: object - propagators: - description: Propagators defines inter-process context propagation configuration. - items: - description: Propagator represents the propagation type. - enum: - - tracecontext - - baggage - - b3 - - b3multi - - jaeger - - xray - - ottrace - - none - type: string - type: array - python: - description: Python defines configuration for python auto-instrumentation. - properties: - env: - description: 'Env defines python specific env vars. There are four layers for env vars'' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Python SDK and auto-instrumentation. - type: string - type: object - resource: - description: Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. - properties: - addK8sUIDAttributes: - description: AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid). - type: boolean - resourceAttributes: - additionalProperties: - type: string - description: 'Attributes defines attributes that are added to the resource. For example environment: dev' - type: object - type: object - sampler: - description: Sampler defines sampling configuration. - properties: - argument: - description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. - type: string - type: - description: Type defines sampler type. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... - enum: - - always_on - - always_off - - traceidratio - - parentbased_always_on - - parentbased_always_off - - parentbased_traceidratio - - jaeger_remote - - xray - type: string - type: object - type: object - status: - description: InstrumentationStatus defines status of the instrumentation. - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.8.0 - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Deployment Mode - jsonPath: .spec.mode - name: Mode - type: string - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry Collector binary - type: object - config: - description: Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. - type: string - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. - items: - description: EnvVar represents an environment variable present in a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key must be defined - type: boolean - required: - - key - type: object - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on the OpenTelemetry Collector's Pods. These can then in certain cases be consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - prefix: - description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry Collector. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) - type: string - maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. - format: int32 - type: integer - mode: - description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods. - type: object - podSecurityContext: - description: PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. - properties: - fsGroup: - description: "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: \n 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows." - format: int64 - type: integer - fsGroupChangePolicy: - description: 'fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. Note that this field cannot be set when spec.os.name is windows.' - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container. Note that this field cannot be set when spec.os.name is windows. - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open aditional ports that can't be inferred by the operator, like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. - type: string - name: - description: The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod''s container ports. If this is not specified, the value of the ''port'' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - replicas: - description: Replicas is the number of pod instances for the underlying OpenTelemetry Collector - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetry Collector pods. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - securityContext: - description: SecurityContext will be set as the container security context. - properties: - allowPrivilegeEscalation: - description: 'AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies to the container. - type: string - role: - description: Role is a SELinux role label that applies to the container. - type: string - type: - description: Type is a SELinux type label that applies to the container. - type: string - user: - description: User is a SELinux user label that applies to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". - type: string - type: - description: "type indicates which kind of seccomp profile will be applied. Valid options are: \n Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service account to use with this instance. - type: string - targetAllocator: - description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. - properties: - enabled: - description: Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. - type: string - type: object - tolerations: - description: Toleration to schedule OpenTelemetry Collector pods. This is only relevant to daemonset, statefulset, and deployment mode - items: - description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeClaimTemplates: - description: VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. - items: - description: PersistentVolumeClaim is a user's request for and claim to a persistent volume - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - status: - description: 'Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: The storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying volume. - type: object - conditions: - description: Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contails details about state of pvc - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last transition. - type: string - reason: - description: Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: Phase represents the current phase of PersistentVolumeClaim. - type: string - resizeStatus: - description: ResizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. - type: string - type: object - type: object - type: array - x-kubernetes-list-type: atomic - volumeMounts: - description: VolumeMounts represents the mount points to use in the underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within a container. - properties: - mountPath: - description: Path within the container at which the volume should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying collector deployment(s). - items: - description: Volume represents a named volume in a pod that may be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).' - format: int32 - type: integer - readOnly: - description: 'Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - properties: - cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' - type: string - diskName: - description: The Name of the data disk in the blob storage - type: string - diskURI: - description: The URI the data disk in the blob storage - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - kind: - description: 'Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared' - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - properties: - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: the name of secret that contains Azure Storage Account Name and Key - type: string - shareName: - description: Share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - properties: - monitors: - description: 'Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'Optional: Used as the mounted root, rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'Cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'Optional: points to a secret object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeID: - description: 'volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: ConfigMap represents a configMap that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must be defined - type: boolean - type: object - csi: - description: CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - properties: - driver: - description: Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. - type: string - fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. - type: string - nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - readOnly: - description: Specifies a read-only configuration for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: DownwardAPI represents downward API about the pod that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'EmptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: 'What type of storage medium should back this directory. The default is "" which means to use the node''s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: "Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time." - properties: - volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil." - properties: - metadata: - description: May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. - properties: - accessModes: - description: 'AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - properties: - fsType: - description: 'Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - lun: - description: 'Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' - items: - type: string - type: array - wwids: - description: 'Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - properties: - driver: - description: Driver is the name of the driver to use for this volume. - type: string - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'Optional: Extra command options if any.' - type: object - readOnly: - description: 'Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - required: - - driver - type: object - flocker: - description: Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - properties: - datasetName: - description: Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - type: string - datasetUUID: - description: UUID of the dataset. This is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - partition: - description: 'The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - format: int32 - type: integer - pdName: - description: 'Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' - properties: - directory: - description: Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. - type: string - repository: - description: Repository URL - type: string - revision: - description: Commit hash for the specified revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: 'HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.' - properties: - path: - description: 'Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: whether support iSCSI Session CHAP authentication - type: boolean - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - type: string - iqn: - description: Target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: CHAP Secret for iSCSI target and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - targetPortal: - description: iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'Volume''s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'NFS represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: Will force the ReadOnly setting in VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - pdID: - description: ID that identifies Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - properties: - fsType: - description: FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: VolumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: Items for all in one resources secrets, configmaps, and downward API - properties: - defaultMode: - description: Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. - format: int32 - type: integer - sources: - description: list of volume projections - items: - description: Projection that may be projected along with other supported volume types - properties: - configMap: - description: information about the configMap data to project - properties: - items: - description: If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its keys must be defined - type: boolean - type: object - downwardAPI: - description: information about the downwardAPI data to project - properties: - items: - description: Items is a list of DownwardAPIVolume file - items: - description: DownwardAPIVolumeFile represents information to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified API version. - type: string - required: - - fieldPath - type: object - mode: - description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path name of the file to be created. Must not be absolute or contain the ''..'' path. Must be utf-8 encoded. The first item of the relative path must not start with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - required: - - path - type: object - type: array - type: object - secret: - description: information about the secret data to project - properties: - items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - type: object - serviceAccountToken: - description: information about the serviceAccountToken data to project - properties: - audience: - description: Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. - type: string - expirationSeconds: - description: ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. - format: int64 - type: integer - path: - description: Path is the path relative to the mount point of the file to project the token into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - properties: - group: - description: Group to map volume access to Default is no group - type: string - readOnly: - description: ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - type: boolean - registry: - description: Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes - type: string - tenant: - description: Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: User to map volume access to Defaults to serivceaccount user - type: string - volume: - description: Volume is a string that references an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'RBD represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' - type: string - image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - user: - description: 'The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: The host address of the ScaleIO API Gateway. - type: string - protectionDomain: - description: The name of the ScaleIO Protection Domain for the configured storage. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - sslEnabled: - description: Flag to enable/disable SSL communication with Gateway, default false - type: boolean - storageMode: - description: Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - type: string - storagePool: - description: The ScaleIO Storage Pool associated with the protection domain. - type: string - system: - description: The name of the storage system as configured in ScaleIO. - type: string - volumeName: - description: The name of a volume already created in the ScaleIO system that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - items: - description: If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: The key to project. - type: string - mode: - description: 'Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.' - format: int32 - type: integer - path: - description: The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: Specify whether the Secret or its keys must be defined - type: boolean - secretName: - description: 'Name of the secret in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - readOnly: - description: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - volumeName: - description: VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - type: string - volumeNamespace: - description: VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. - type: string - type: object - vsphereVolume: - description: VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - properties: - fsType: - description: Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - type: string - storagePolicyID: - description: Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: Storage Policy Based Management (SPBM) profile name. - type: string - volumePath: - description: Path that identifies vSphere volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. - properties: - messages: - description: 'Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.' - items: - type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: 'Replicas is currently not being set and might be removed in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.' - format: int32 - type: integer - scale: - description: Scale is the OpenTelemetryCollector's scale subresource status. - properties: - replicas: - description: The total number non-terminated pods targeted by this OpenTelemetryCollector's deployment or statefulSet. - format: int32 - type: integer - selector: - description: The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods. - type: string - type: object - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.scale.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.scale.replicas - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-leader-election-role - namespace: opentelemetry-operator-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-manager-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch -- apiGroups: - - "" - resources: - - namespaces - verbs: - - list - - watch -- apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - daemonsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - list - - watch -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - autoscaling - resources: - - horizontalpodautoscalers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - list - - update -- apiGroups: - - opentelemetry.io - resources: - - instrumentations - verbs: - - get - - list - - patch - - update - - watch -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/finalizers - verbs: - - get - - patch - - update -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/status - verbs: - - get - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-metrics-reader -rules: -- nonResourceURLs: - - /metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-proxy-role -rules: -- apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-leader-election-rolebinding - namespace: opentelemetry-operator-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: opentelemetry-operator-leader-election-role -subjects: -- kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: opentelemetry-operator-manager-role -subjects: -- kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: opentelemetry-operator-proxy-role -subjects: -- kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager-metrics-service - namespace: opentelemetry-operator-system -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - template: - metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - spec: - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.49.0 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 200m - memory: 256Mi - requests: - cpu: 100m - memory: 64Mi - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - serviceAccountName: opentelemetry-operator-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: opentelemetry-operator-controller-manager-service-cert ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-serving-cert - namespace: opentelemetry-operator-system -spec: - dnsNames: - - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc - - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc.cluster.local - issuerRef: - kind: Issuer - name: opentelemetry-operator-selfsigned-issuer - secretName: opentelemetry-operator-controller-manager-service-cert - subject: - organizationalUnits: - - opentelemetry-operator ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-selfsigned-issuer - namespace: opentelemetry-operator-system -spec: - selfSigned: {} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-mutating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Fail - name: minstrumentation.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Fail - name: mopentelemetrycollector.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-v1-pod - failurePolicy: Ignore - name: mpod.kb.io - rules: - - apiGroups: - - "" - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - pods - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-validating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Fail - name: vinstrumentationcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Ignore - name: vinstrumentationdelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Fail - name: vopentelemetrycollectorcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Ignore - name: vopentelemetrycollectordelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - opentelemetrycollectors - sideEffects: None diff --git a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml new file mode 100644 index 000000000..82463fa4b --- /dev/null +++ b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml @@ -0,0 +1,8558 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/name: opentelemetry-operator + name: instrumentations.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: Instrumentation + listKind: InstrumentationList + plural: instrumentations + shortNames: + - otelinst + - otelinsts + singular: instrumentation + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Instrumentation is the spec for OpenTelemetry instrumentation. + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. + type: string + kind: + description: Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. + type: string + metadata: + type: object + spec: + description: InstrumentationSpec defines the desired state of OpenTelemetry + SDK and instrumentation. + properties: + apacheHttpd: + description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Apache HTTPD agent specific attributes. + The precedence is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configPath: + description: Location of Apache HTTPD server configuration. Needed + only if different from default "/usr/local/apache2/conf" + type: string + env: + description: Env defines Apache HTTPD specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Apache SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + version: + description: Apache HTTPD server version. One of 2.4 or 2.2. Default + is 2.4 + type: string + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + dotnet: + description: DotNet defines configuration for DotNet auto-instrumentation. + properties: + env: + description: Env defines DotNet specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with DotNet SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + env: + description: Env defines common env vars. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + go: + description: Go defines configuration for Go auto-instrumentation. + properties: + env: + description: Env defines Go specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Go SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + env: + description: Env defines java specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with javaagent auto-instrumentation + JAR. + type: string + resources: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + nginx: + description: Nginx defines configuration for Nginx auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Nginx agent specific attributes. The + precedence order is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configFile: + description: Location of Nginx configuration file. Needed only + if different from default "/etx/nginx/nginx.conf" + type: string + env: + description: Env defines Nginx specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Nginx SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. + properties: + env: + description: Env defines nodejs specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with NodeJS SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + propagators: + description: Propagators defines inter-process context propagation + configuration. Values in this list will be set in the OTEL_PROPAGATORS + env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none + items: + description: Propagator represents the propagation type. + enum: + - tracecontext + - baggage + - b3 + - b3multi + - jaeger + - xray + - ottrace + - none + type: string + type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + env: + description: Env defines python specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Python SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 150Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + resource: + description: Resource defines the configuration for the resource attributes, + as defined by the OpenTelemetry specification. + properties: + addK8sUIDAttributes: + description: AddK8sUIDAttributes defines whether K8s UID attributes + should be collected (e.g. k8s.deployment.uid). + type: boolean + resourceAttributes: + additionalProperties: + type: string + description: 'Attributes defines attributes that are added to + the resource. For example environment: dev' + type: object + type: object + sampler: + description: Sampler defines sampling configuration. + properties: + argument: + description: Argument defines sampler argument. The value depends + on the sampler type. For instance for parentbased_traceidratio + sampler type it is a number in range [0..1] e.g. 0.25. + type: string + type: + description: Type defines sampler type. The value will be set + in the OTEL_TRACES_SAMPLER env var. The value can be for instance + parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + enum: + - always_on + - always_off + - traceidratio + - parentbased_always_on + - parentbased_always_off + - parentbased_traceidratio + - jaeger_remote + - xray + type: string + type: object + type: object + status: + description: InstrumentationStatus defines status of the instrumentation. + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetrycollectors.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors + shortNames: + - otelcol + - otelcols + singular: opentelemetrycollector + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Deployment Mode + jsonPath: .spec.mode + name: Mode + type: string + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .status.scale.statusReplicas + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.image + name: Image + type: string + - description: Management State + jsonPath: .spec.managementState + name: Management + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + API. + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. + type: string + kind: + description: Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. + type: string + metadata: + type: object + spec: + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + properties: + additionalContainers: + description: AdditionalContainers allows injecting additional containers + into the Collector's pod definition. + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: Arguments to the entrypoint. The container image's + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container's environment. + items: + type: string + type: array + command: + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string + securityContext: + description: SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. + type: string + type: object + type: object + startupProbe: + description: StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + autoscaler: + description: Autoscaler specifies the pod autoscaling configuration + to use for the OpenTelemetryCollector workload. + properties: + behavior: + description: HorizontalPodAutoscalerBehavior configures the scaling + behavior of the target in both Up and Down directions (scaleUp + and scaleDown fields respectively). + properties: + scaleDown: + description: scaleDown is scaling policy for scaling Down. + If not set, the default value is to allow to scale down + to minReplicas pods, with a 300 second stabilization window + (i.e. + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. + format: int32 + type: integer + type: object + scaleUp: + description: scaleUp is scaling policy for scaling Up. + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. + format: int32 + type: integer + type: object + type: object + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling + feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + metrics: + description: Metrics is meant to provide a customizable way to + configure HPA metrics. currently the only supported custom metrics + is type=Pod. + items: + description: MetricSpec defines a subset of metrics to be defined + for the HPA's metric array more metric type can be supported + as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec + for reference. + properties: + pods: + description: PodsMetricSource indicates how to scale on + a metric describing each pod in the current scale target + (for example, transactions-processed-per-second). + properties: + metric: + description: metric identifies the target metric by + name and selector + properties: + name: + description: name is the name of the given metric + type: string + selector: + description: selector is the string-encoded form + of a standard kubernetes label selector for the + given metric When set, it is passed as an additional + parameter to the metrics server for more specific + metrics scopi + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + description: target specifies the target value for the + given metric + properties: + averageUtilization: + description: averageUtilization is the target value + of the average of the resource metric across all + relevant pods, represented as a percentage of + the requested value of the resource for the pods. + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + description: averageValue is the target value of + the average of the metric across all relevant + pods (as a quantity) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + description: type represents whether the metric + type is Utilization, Value, or AverageValue + type: string + value: + anyOf: + - type: integer + - type: string + description: value is the target value of the metric + (as a quantity). + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + type: + description: MetricSourceType indicates the type of metric. + type: string + required: + - type + type: object + type: array + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling + feature. Set this if your are using autoscaling. It must be + at least 1 + format: int32 + type: integer + targetCPUUtilization: + description: TargetCPUUtilization sets the target average CPU + used across all replicas. If average CPU exceeds this value, + the HPA will scale up. Defaults to 90 percent. + format: int32 + type: integer + targetMemoryUtilization: + description: TargetMemoryUtilization sets the target average memory + utilization across all replicas + format: int32 + type: integer + type: object + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + configmaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the OpenTelemetryCollector object, which shall be mounted into + the Collector Pods. + items: + properties: + mountpath: + type: string + name: + description: Configmap defines name and path where the configMaps + should be mounted. + type: string + required: + - mountpath + - name + type: object + type: array + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the OpenTelemetry Collector's Pods. These can then in certain cases + be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + ingress: + description: 'Ingress is used to specify how OpenTelemetry Collector + is exposed. This functionality is only available if one of the valid + modes is set. Valid modes are: deployment, daemonset and statefulset.' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' + type: object + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. + properties: + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object + ruleType: + description: RuleType defines how Ingress exposes collector receivers. + IngressRuleTypePath ("path") exposes each receiver port on a + unique path on single domain defined in Hostname. + enum: + - path + - subdomain + type: string + tls: + description: TLS configuration. + items: + description: IngressTLS describes the transport layer security + associated with an ingress. + properties: + hosts: + description: hosts is a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + description: secretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. + type: string + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress, + route' + enum: + - ingress + - route + type: string + type: object + initContainers: + description: InitContainers allows injecting initContainers to the + Collector's pod definition. + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: Arguments to the entrypoint. The container image's + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container's environment. + items: + type: string + type: array + command: + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string + securityContext: + description: SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. + type: string + type: object + type: object + startupProbe: + description: StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: Liveness config for the OpenTelemetry Collector except + the probe handler which is auto generated from the health extension + of the collector. + properties: + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. Defaults to 0 seconds. + Minimum value is 0. More info: https://kubernetes.' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Must + be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + managementState: + default: managed + description: ManagementState defines if the CR should be managed by + the operator or not. Default is managed. + enum: + - managed + - unmanaged + type: string + maxReplicas: + description: 'MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" + instead.' + format: int32 + type: integer + minReplicas: + description: 'MinReplicas sets a lower bound to the autoscaling feature. Set + this if you are using autoscaling. It must be at least 1 Deprecated: + use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' + format: int32 + type: integer + mode: + description: Mode represents how the collector should be deployed + (deployment, daemonset, statefulset or sidecar) + enum: + - daemonset + - deployment + - sidecar + - statefulset + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object + observability: + description: ObservabilitySpec defines how telemetry data gets handled. + properties: + metrics: + description: Metrics defines the metrics configuration for operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor should + be created for the OpenTelemetry Collector and Prometheus + Exporters. The operator.observability. + type: boolean + type: object + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption budget + configuration to use for the OpenTelemetryCollector workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after the + eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object + podSecurityContext: + description: PodSecurityContext configures the pod security context + for the opentelemetry-collector pod, when running as a deployment, + daemonset, or statefulset. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. Note that this field cannot be set when + spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. + type: string + nodePort: + description: The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector. Set this if your are not using autoscaling + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + securityContext: + description: SecurityContext configures the container security context + for the opentelemetry-collector container. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. + type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether + to spawn a target allocation resource or not. + properties: + allocationStrategy: + description: AllocationStrategy determines which strategy the + target allocator should use for allocation. The current options + are least-weighted and consistent-hashing. The default option + is least-weighted + enum: + - least-weighted + - consistent-hashing + type: string + enabled: + description: Enabled indicates whether to use a target allocation + mechanism for Prometheus targets or not. + type: boolean + env: + description: ENV vars to set on the OpenTelemetry TargetAllocator's + Pods. These can then in certain cases be consumed in the config + file for the TargetAllocator. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + filterStrategy: + description: FilterStrategy determines how to filter targets before + allocating them among the collectors. The only current option + is relabel-config (drops targets based on prom relabel_config). + type: string + image: + description: Image indicates the container image to use for the + OpenTelemetry TargetAllocator. + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry TargetAllocator + pods. + type: object + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + podMonitorSelector: + additionalProperties: + type: string + description: PodMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a PodMonitor's + meta labels. + type: object + scrapeInterval: + default: 30s + description: "Interval between consecutive scrapes. Equivalent + to the same setting on the Prometheus CRD. \n Default: \"30s\"" + format: duration + type: string + serviceMonitorSelector: + additionalProperties: + type: string + description: ServiceMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a ServiceMonitor's + meta labels. + type: object + type: object + replicas: + description: Replicas is the number of pod instances for the underlying + TargetAllocator. This should only be set to a value other than + 1 if a strategy that allows for high availability is chosen. + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetryTargetAllocator + containers. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. When set, the operator + will not automatically create a ServiceAccount for the TargetAllocator. + type: string + tolerations: + description: Toleration embedded kubernetes pod configuration + option, controls how pods can be scheduled with matching taints + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod + configuration option, controls how pods are spread across your + cluster among failure-domains such as regions, zones, nodes, + and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to + select the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods + may be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with + a pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + type: object + terminationGracePeriodSeconds: + description: Duration in seconds the pod needs to terminate gracefully + upon probe failure. + format: int64 + type: integer + tolerations: + description: Toleration to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods may + be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle + upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string + volumeClaimTemplates: + description: VolumeClaimTemplates will provide stable storage using + PersistentVolumes. Only available when the mode=statefulset. + items: + description: PersistentVolumeClaim is a user's request for and claim + to a persistent volume + properties: + apiVersion: + description: APIVersion defines the versioned schema of this + representation of an object. Servers should convert recognized + schemas to the latest internal value, and may reject unrecognized + values. + type: string + kind: + description: Kind is a string value representing the REST resource + this object represents. Servers may infer this from the endpoint + the client submits requests to. Cannot be updated. In CamelCase. + type: string + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: 'spec defines the desired characteristics of a + volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'accessModes contains the desired access modes + the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: dataSourceRef specifies the object from which + to populate the volume with data, if a non-empty volume + is desired. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, the + specified Kind must be in the core API group. For + any other third-party types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace is specified, + a gateway.networking.k8s. + type: string + required: + - kind + - name + type: object + resources: + description: resources represents the minimum resources + the volume should have. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of + compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of + compute resources required. + type: object + type: object + selector: + description: selector is a label query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume is required + by the claim. Value of Filesystem is implied when not + included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference to the + PersistentVolume backing this claim. + type: string + type: object + status: + description: 'status represents the current information/status + of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + properties: + accessModes: + description: 'accessModes contains the actual access modes + the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: capacity represents the actual resources of + the underlying volume. + type: object + conditions: + description: conditions is the current Condition of persistent + volume claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. + items: + description: PersistentVolumeClaimCondition contains details + about state of pvc + properties: + lastProbeTime: + description: lastProbeTime is the time we probed the + condition. + format: date-time + type: string + lastTransitionTime: + description: lastTransitionTime is the time the condition + transitioned from one status to another. + format: date-time + type: string + message: + description: message is the human-readable message + indicating details about last transition. + type: string + reason: + description: reason is a unique, this should be a + short, machine understandable string that gives + the reason for condition's last transition. + type: string + status: + type: string + type: + description: PersistentVolumeClaimConditionType is + a valid value of PersistentVolumeClaimCondition.Type + type: string + required: + - status + - type + type: object + type: array + phase: + description: phase represents the current phase of PersistentVolumeClaim. + type: string + type: object + type: object + type: array + x-kubernetes-list-type: atomic + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying collector deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + collector deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob + storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set).' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified.' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set + permissions on created files by default.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node's default medium. Must be an empty string + (default) or Memory. + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: ephemeral represents a volume that is handled by + a cluster storage driver. + properties: + volumeClaimTemplate: + description: Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. + properties: + metadata: + description: May contain labels and annotations that + will be copied into the PVC when creating it. No other + fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s. + type: string + required: + - kind + - name + type: object + resources: + description: resources represents the minimum resources + the volume should have. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum + amount of compute resources required. + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for + this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + properties: + path: + description: 'path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator + Name. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. + format: int64 + type: integer + path: + description: path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no + group + type: string + readOnly: + description: readOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + image: + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as + configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + type: object + status: + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector. + properties: + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + messages: + description: 'Messages about actions performed by the operator on + this resource. Deprecated: use Kubernetes events instead.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + replicas: + description: 'Replicas is currently not being set and might be removed + in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" + instead.' + format: int32 + type: integer + scale: + description: Scale is the OpenTelemetryCollector's scale subresource + status. + properties: + replicas: + description: The total number non-terminated pods targeted by + this OpenTelemetryCollector's deployment or statefulSet. + format: int32 + type: integer + selector: + description: The selector used to match the OpenTelemetryCollector's + deployment or statefulSet pods. + type: string + statusReplicas: + description: StatusReplicas is the number of pods targeted by + this OpenTelemetryCollector's with a Ready Condition / Total + number of non-terminated pods targeted by this OpenTelemetryCollector's + (their labels matc + type: string + type: object + version: + description: Version of the managed OpenTelemetry Collector (operand) + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.scale.selector + specReplicasPath: .spec.replicas + statusReplicasPath: .status.scale.replicas + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-leader-election-role + namespace: opentelemetry-operator-system +rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-manager-role +rules: + - apiGroups: + - "" + resources: + - configmaps + - serviceaccounts + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - "" + resources: + - namespaces + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - daemonsets + - deployments + - statefulsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - replicasets + verbs: + - get + - list + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - list + - update + - apiGroups: + - monitoring.coreos.com + resources: + - servicemonitors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - instrumentations + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/finalizers + verbs: + - get + - patch + - update + - apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/status + verbs: + - get + - patch + - update + - apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - route.openshift.io + resources: + - routes + - routes/custom-host + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-metrics-reader +rules: + - nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-proxy-role +rules: + - apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create + - apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-leader-election-rolebinding + namespace: opentelemetry-operator-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: opentelemetry-operator-leader-election-role +subjects: + - kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-operator-manager-role +subjects: + - kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-proxy-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: opentelemetry-operator-proxy-role +subjects: + - kind: ServiceAccount + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager-metrics-service + namespace: opentelemetry-operator-system +spec: + ports: + - name: https + port: 8443 + protocol: TCP + targetPort: https + selector: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system +spec: + ports: + - port: 443 + protocol: TCP + targetPort: 9443 + selector: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager + namespace: opentelemetry-operator-system +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + template: + metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + spec: + containers: + - args: + - --metrics-addr=127.0.0.1:8080 + - --enable-leader-election + - --zap-log-level=info + - --zap-time-encoding=rfc3339nano + - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.86.0 + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + requests: + cpu: 100m + memory: 64Mi + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + serviceAccountName: opentelemetry-operator-controller-manager + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: opentelemetry-operator-controller-manager-service-cert +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-serving-cert + namespace: opentelemetry-operator-system +spec: + dnsNames: + - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc + - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc.cluster.local + issuerRef: + kind: Issuer + name: opentelemetry-operator-selfsigned-issuer + secretName: opentelemetry-operator-controller-manager-service-cert + subject: + organizationalUnits: + - opentelemetry-operator +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-selfsigned-issuer + namespace: opentelemetry-operator-system +spec: + selfSigned: {} +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: MutatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-mutating-webhook-configuration +webhooks: + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: minstrumentation.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: mopentelemetrycollector.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /mutate-v1-pod + failurePolicy: Ignore + name: mpod.kb.io + rules: + - apiGroups: + - "" + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - pods + sideEffects: None +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opentelemetry-operator-validating-webhook-configuration +webhooks: + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Fail + name: vinstrumentationcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - instrumentations + sideEffects: None + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-instrumentation + failurePolicy: Ignore + name: vinstrumentationdelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - instrumentations + sideEffects: None + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: vopentelemetrycollectorcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: opentelemetry-operator-webhook-service + namespace: opentelemetry-operator-system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Ignore + name: vopentelemetrycollectordelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - opentelemetrycollectors + sideEffects: None From 63010f53a35b617dc3edded58b47e66b06bce8fb Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 12 Oct 2023 13:50:55 -0400 Subject: [PATCH 1079/1234] oops (#2218) --- config/manager/kustomization.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index dc4d5229f..5c5f0b84c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,8 +1,2 @@ resources: - manager.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -images: -- name: controller - newName: ghcr.io/jacob.aronoff/opentelemetry-operator/opentelemetry-operator - newTag: e2e From f23f2f74b3ac993a489673a5d868f40c44725080 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:20:50 -0400 Subject: [PATCH 1080/1234] Bump golang.org/x/net in /cmd/operator-opamp-bridge (#2212) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 2d82e9d6b..9a3c9b9cb 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -72,10 +72,10 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index d40a9a0eb..097f095bd 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -182,8 +182,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -200,11 +200,11 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= From 7d7f4b2cc2a19a4db5f48b4f10592aa27e6659ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:21:05 -0400 Subject: [PATCH 1081/1234] Bump golang.org/x/net from 0.15.0 to 0.17.0 in /cmd/otel-allocator (#2213) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 8 ++++---- cmd/otel-allocator/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index d45938251..002139c7d 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -173,14 +173,14 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 264095787..c78bffab4 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -727,8 +727,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -806,8 +806,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -893,14 +893,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 789a6a1fa3da9c7094c44419b04c0558c7be1650 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 16:27:39 -0400 Subject: [PATCH 1082/1234] Bump golang.org/x/net from 0.15.0 to 0.17.0 (#2211) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 8 ++++---- go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index a60c280b5..b2d12ea5f 100644 --- a/go.mod +++ b/go.mod @@ -137,13 +137,13 @@ require ( go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.11.0 // indirect diff --git a/go.sum b/go.sum index 628de4fbd..c92803886 100644 --- a/go.sum +++ b/go.sum @@ -557,8 +557,8 @@ golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -635,8 +635,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -716,14 +716,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 8942b2e354ed5351278c12bef16d66938e607005 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 13 Oct 2023 10:24:50 +0200 Subject: [PATCH 1083/1234] Publish operator images for IBM P/Z (#2215) * Publish operator images for IBM P/Z Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay Co-authored-by: Jacob Aronoff --- .chloggen/ibmz-operator.yaml | 16 ++++++++++++++++ .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-bundle.yaml | 2 +- .../workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100755 .chloggen/ibmz-operator.yaml diff --git a/.chloggen/ibmz-operator.yaml b/.chloggen/ibmz-operator.yaml new file mode 100755 index 000000000..84107398b --- /dev/null +++ b/.chloggen/ibmz-operator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Publish operator images for I IBM P/Z (linux/s390x,linux/ppc64le) architectures. + +# One or more tracking issues related to the change +issues: [2215] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index c98f03866..1866ad884 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -82,7 +82,7 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml index a28e1081b..27896351a 100644 --- a/.github/workflows/publish-operator-bundle.yaml +++ b/.github/workflows/publish-operator-bundle.yaml @@ -71,7 +71,7 @@ jobs: with: context: . file: ./bundle.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 3fa3e86e2..8493d3747 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -69,7 +69,7 @@ jobs: uses: docker/build-push-action@v5 with: context: cmd/operator-opamp-bridge - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: true build-args: | VERSION=${{ env.VERSION }} diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 2f8bce1b7..395670e8b 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -69,7 +69,7 @@ jobs: uses: docker/build-push-action@v5 with: context: cmd/otel-allocator - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: true build-args: | VERSION=${{ env.VERSION }} From 5e611c497affe0e847c1dd90ab9c9a5030f95f6c Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 13 Oct 2023 14:28:36 +0200 Subject: [PATCH 1084/1234] Publish IBM P/Z images for those autoinstrumentation images where it is supported (#2224) Signed-off-by: Israel Blancas --- .github/workflows/publish-autoinstrumentation-java.yaml | 2 +- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- .github/workflows/publish-autoinstrumentation-python.yaml | 2 +- autoinstrumentation/nodejs/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml index 6b3e74f33..10a129d02 100644 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ b/.github/workflows/publish-autoinstrumentation-java.yaml @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@v5 with: context: autoinstrumentation/java - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 1fea43e54..55f7b239d 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@v5 with: context: autoinstrumentation/nodejs - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml index 7f1018764..0239e37fb 100644 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ b/.github/workflows/publish-autoinstrumentation-python.yaml @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@v5 with: context: autoinstrumentation/python - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 080eed54c..48f1f9ae7 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -9,7 +9,7 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. -FROM node:16 AS build +FROM node:20 AS build WORKDIR /operator-build COPY . . From 218ea64e25e13c5097687c1bd7fa602bd3ab6256 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 13 Oct 2023 17:59:21 +0530 Subject: [PATCH 1085/1234] Fix Nginx instrumentation tests to work with OpenShift (#2216) Co-authored-by: Jacob Aronoff --- .../00-install-collector.yaml | 10 +++++++ .../01-install-app.yaml | 6 ++++ .../00-install-collector.yaml | 10 +++++++ .../01-assert.yaml | 2 +- .../01-install-app.yaml | 30 +++++++++++++++++-- .../02-assert.yaml | 2 +- .../02-install-app.yaml | 30 +++++++++++++++++-- .../00-install-collector.yaml | 10 +++++++ .../instrumentation-nginx/01-assert.yaml | 2 +- .../instrumentation-nginx/01-install-app.yaml | 12 +++++++- 10 files changed, 106 insertions(+), 8 deletions(-) diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml index f25801708..c18f418bf 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml @@ -19,3 +19,13 @@ spec: receivers: [otlp] processors: [] exporters: [logging] + +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml index 6ea7c9765..70fcc626a 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml @@ -57,12 +57,18 @@ metadata: data: nginx.conf: | # user nginx; + pid /tmp/nginx.pid; worker_processes 1; events { worker_connections 10240; } http { include /etc/nginx/conf.d/*.conf; + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; server { listen 8765; server_name localhost; diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml index 6606f291d..cb02aa005 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml @@ -20,3 +20,13 @@ spec: receivers: [otlp] processors: [] exporters: [logging] + +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml index f66a3ebb3..6d8a744ae 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml @@ -12,7 +12,7 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - env: - name: LD_LIBRARY_PATH diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml index 03ccf5c33..198cf20e1 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml @@ -20,11 +20,21 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - name: myapp image: nginxinc/nginx-unprivileged:1.23.1 imagePullPolicy: Always + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 3000 + runAsNonRoot: true + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + capabilities: + drop: ["ALL"] ports: - containerPort: 8765 env: @@ -45,6 +55,16 @@ spec: memory: 100Mi - name: myrabbit image: rabbitmq + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 3000 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] volumes: - name: nginx-conf configMap: @@ -62,12 +82,18 @@ metadata: data: nginx.conf: | # user nginx; + pid /tmp/nginx.pid; worker_processes 1; events { worker_connections 10240; } http { include /etc/nginx/conf.d/*.conf; + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; server { listen 8765; server_name localhost; @@ -90,4 +116,4 @@ data: } ---- \ No newline at end of file +--- diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml index ea590a88d..1e13e4de4 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml @@ -11,7 +11,7 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - env: - name: LD_LIBRARY_PATH diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml index 98766fdb6..bc4ff4753 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml @@ -20,11 +20,21 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - name: myapp image: nginxinc/nginx-unprivileged:1.23.1 imagePullPolicy: Always + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 3000 + runAsNonRoot: true + allowPrivilegeEscalation: false + seccompProfile: + type: RuntimeDefault + capabilities: + drop: ["ALL"] ports: - containerPort: 8765 env: @@ -45,6 +55,16 @@ spec: memory: 100Mi - name: myrabbit image: rabbitmq + securityContext: + runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 3000 + runAsNonRoot: true + seccompProfile: + type: RuntimeDefault + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] volumes: - name: nginx-conf configMap: @@ -61,12 +81,18 @@ metadata: data: nginx.conf: | # user nginx; + pid /tmp/nginx.pid; worker_processes 1; events { worker_connections 10240; } http { include /etc/nginx/conf.d/*.conf; + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; server { listen 8765; server_name localhost; @@ -89,4 +115,4 @@ data: } ---- \ No newline at end of file +--- diff --git a/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml index f25801708..c18f418bf 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml @@ -19,3 +19,13 @@ spec: receivers: [otlp] processors: [] exporters: [logging] + +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml index 38474a2a0..ff3846d22 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml @@ -10,7 +10,7 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - env: - name: LD_LIBRARY_PATH diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml index bd0530e56..149563ea3 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml @@ -18,11 +18,15 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - name: myapp image: nginxinc/nginx-unprivileged:1.23.1 imagePullPolicy: Always + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] ports: - containerPort: 8765 env: @@ -59,11 +63,17 @@ data: nginx.conf: | # user nginx; worker_processes 1; + pid /tmp/nginx.pid; events { worker_connections 10240; } http { include /etc/nginx/conf.d/*.conf; + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; server { listen 8765; server_name localhost; From cb51ef3c870a18bdd478afbdb331bdc854e7f5ef Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 13 Oct 2023 15:01:00 +0200 Subject: [PATCH 1086/1234] Fix CVE-2023-44487 for grpc-go (#2226) Signed-off-by: Pavol Loffay --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b2d12ea5f..004773760 100644 --- a/go.mod +++ b/go.mod @@ -153,7 +153,7 @@ require ( google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.56.2 // indirect + google.golang.org/grpc v1.56.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index c92803886..72d4e087b 100644 --- a/go.sum +++ b/go.sum @@ -872,8 +872,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 5f2bc36bb7d7fd96139dbcb9c847c7c51a3957d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 15:55:24 +0200 Subject: [PATCH 1087/1234] Bump the prometheus group with 1 update (#2219) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.47.1...v0.47.2) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 004773760..2bbe434ec 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 - github.com/prometheus/prometheus v0.47.1 + github.com/prometheus/prometheus v0.47.2 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 diff --git a/go.sum b/go.sum index 72d4e087b..3f676124e 100644 --- a/go.sum +++ b/go.sum @@ -477,8 +477,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.47.1 h1:bd2LiZyxzHn9Oo2Ei4eK2D86vz/L/OiqR1qYo0XmMBo= -github.com/prometheus/prometheus v0.47.1/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= From f2cdaea8c7aefe554888d9073c59df0c13308104 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Fri, 13 Oct 2023 16:50:45 +0200 Subject: [PATCH 1088/1234] Bump grpc-go to fix CVE-2023-44487 (#2228) Signed-off-by: Pavol Loffay --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 4 ++-- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 9a3c9b9cb..bbd0f4844 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -82,7 +82,7 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.58.2 // indirect + google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/api v0.28.2 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 097f095bd..e842beb5c 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -232,8 +232,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1: google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 002139c7d..ba2bfe09d 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -190,7 +190,7 @@ require ( google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.56.2 // indirect + google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index c78bffab4..cead788e6 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1054,8 +1054,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 3337b9c40419c460542bda8d5ec6f7697c75a2d8 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 13 Oct 2023 16:59:20 +0200 Subject: [PATCH 1089/1234] [chore] Change the base image to use the glibc version and not the musl version of test image (#2225) * Change the base image to use the glibc version and not the musl version Signed-off-by: Israel Blancas * Rerun E2E tests Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- tests/instrumentation-e2e-apps/apache-httpd/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile index 7c8c3ef39..31043e55a 100644 --- a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile +++ b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile @@ -1,5 +1,5 @@ -FROM httpd:2.4-alpine +FROM httpd:2.4 RUN sed -i "s#Listen 80#Listen 8080#g" /usr/local/apache2/conf/httpd.conf RUN chmod 777 -R /usr/local/apache2/ From 7d4755697a828ae679e8fc05751d78d8b689f6f8 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Fri, 13 Oct 2023 17:20:12 +0200 Subject: [PATCH 1090/1234] [chore] Replace the images for the E2E tests with the ones built in this repository (#2222) * Replace the images by the ones hosted in the repository Signed-off-by: Israel Blancas * Revert change Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas Co-authored-by: Jacob Aronoff --- config/manager/kustomization.yaml | 2 +- .../instrumentation-apache-httpd/01-install-app.yaml | 4 +--- .../01-install-app.yaml | 2 +- .../02-install-app.yaml | 2 +- .../instrumentation-dotnet-musl/01-install-app.yaml | 2 +- .../instrumentation-dotnet/01-install-app.yaml | 2 +- .../instrumentation-go/02-install-app.yaml | 7 +------ .../01-install-app.yaml | 2 +- .../02-install-app.yaml | 2 +- .../instrumentation-java-other-ns/03-install-app.yaml | 2 +- .../instrumentation-java/01-install-app.yaml | 2 +- .../01-install-app.yaml | 2 +- .../02-install-app.yaml | 2 +- .../instrumentation-nodejs/01-install-app.yaml | 2 +- .../01-install-app.yaml | 2 +- .../02-install-app.yaml | 2 +- .../instrumentation-python/01-install-app.yaml | 2 +- .../instrumentation-sdk/01-install-app.yaml | 2 +- .../01-install-app.yaml | 9 ++++----- .../01-install-app.yaml | 4 ++-- .../01-install-app.yaml | 4 ++-- .../smoke-sidecar-other-namespace/01-install-app.yaml | 2 +- tests/e2e/smoke-sidecar/01-install-app.yaml | 2 +- 23 files changed, 28 insertions(+), 36 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 5c5f0b84c..2e6cc7976 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml +- manager.yaml \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml index fcad1439a..b6aea891c 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml @@ -21,9 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e - # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd - # licensed under Apache 2.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main imagePullPolicy: Always ports: - containerPort: 8080 diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml index c4a655e7f..b77a2a744 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml index 7afe58db2..87930b15f 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml index c987a0e56..e8d32f7b4 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml @@ -22,7 +22,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml index e7cce1a5e..15e58506f 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml @@ -21,7 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml index 527ca4491..1a4eb45ce 100644 --- a/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml @@ -23,9 +23,4 @@ spec: fsGroup: 2000 containers: - name: productcatalogservice - image: ghcr.io/open-telemetry/demo:1.3.1-productcatalogservice - env: - - name: "PRODUCT_CATALOG_SERVICE_PORT" - value: "8080" - - name: "FEATURE_FLAG_GRPC_SERVICE_ADDR" - value: "localhost:50053" + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang:main diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml index 8e7a803d2..b3b563780 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/pavolloffay/spring-petclinic:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml index 3e7371879..4c7a1339c 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/pavolloffay/spring-petclinic:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml index 7674e6e61..962207dd8 100644 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml @@ -21,7 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: ghcr.io/pavolloffay/spring-petclinic:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml index a68255bf8..17be6d12e 100644 --- a/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml @@ -21,7 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: ghcr.io/pavolloffay/spring-petclinic:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml index 9f7dd9a67..a850a3cfc 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml index 0d02374fd..7de601d68 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml index 1234d661f..5e5e74944 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml @@ -21,7 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml index 433050dfb..cb6d4f5cc 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml index 0f138fa81..7e4a4595e 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml @@ -18,6 +18,6 @@ spec: spec: containers: - name: myapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - name: myrabbit image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml index 70648d61e..982b43946 100644 --- a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml @@ -21,7 +21,7 @@ spec: fsGroup: 2000 containers: - name: myapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml index a57db32a5..3ce4568bb 100644 --- a/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml @@ -21,4 +21,4 @@ spec: fsGroup: 2000 containers: - name: myapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml index eb86ee6e1..652eb0a34 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml @@ -25,14 +25,13 @@ spec: spec: containers: - name: dotnetapp - # source code of the application: https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp - image: docker.io/avadhutp123/aspnetapp@sha256:d2e8d3415f6f12efae0369aa0a9777a58583841fb133f33e10a73adb9fb392da + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - name: javaapp - image: ghcr.io/pavolloffay/spring-petclinic:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - name: nodejsapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - name: pythonapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - name: shouldnt-be-instrumented image: rabbitmq:3 env: diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml index 9839cbea8..9921c8791 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml @@ -18,12 +18,12 @@ spec: spec: containers: - name: nodejsapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main env: - name: TEST value: test - name: pythonapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main env: - name: TEST value: test diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml index a6698fdab..e33830e2e 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml @@ -17,9 +17,9 @@ spec: spec: containers: - name: nodejsapp - image: ghcr.io/anuraaga/express-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - name: pythonapp - image: ghcr.io/anuraaga/flask-hello-world:latest + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main env: - name: TEST value: test diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml index 6afc425a9..8f5bfd137 100644 --- a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml @@ -17,4 +17,4 @@ spec: spec: containers: - name: myapp - image: registry.k8s.io/echoserver:1.10 + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e/smoke-sidecar/01-install-app.yaml b/tests/e2e/smoke-sidecar/01-install-app.yaml index 1a5ca1ada..2044f5d0d 100644 --- a/tests/e2e/smoke-sidecar/01-install-app.yaml +++ b/tests/e2e/smoke-sidecar/01-install-app.yaml @@ -16,4 +16,4 @@ spec: spec: containers: - name: myapp - image: registry.k8s.io/echoserver:1.10 + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main From 1f98e4ca704558932893dd6aea49159403438283 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:03:08 -0400 Subject: [PATCH 1091/1234] Bump the prometheus group in /cmd/otel-allocator with 1 update (#2221) Bumps the prometheus group in /cmd/otel-allocator with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.47.1...v0.47.2) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index ba2bfe09d..99f1d6290 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -17,7 +17,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 - github.com/prometheus/prometheus v0.47.1 + github.com/prometheus/prometheus v0.47.2 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index cead788e6..44f98951c 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -611,8 +611,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.47.1 h1:bd2LiZyxzHn9Oo2Ei4eK2D86vz/L/OiqR1qYo0XmMBo= -github.com/prometheus/prometheus v0.47.1/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= +github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= +github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= From 83a7b345f0378953b2fd2b549ae254467f821319 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 16 Oct 2023 18:54:58 +0200 Subject: [PATCH 1092/1234] Set the securityContext for the HTTPD Apache instrumentation (#2051) * Set the securityContext for the HTTPD Apache instrumentation Signed-off-by: Israel Blancas * Fix unit tests Signed-off-by: Israel Blancas * Add changelog Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas Co-authored-by: Jacob Aronoff --- ...the-scc-to-apache-instrumentation-images.yaml | 16 ++++++++++++++++ pkg/instrumentation/apachehttpd.go | 2 +- pkg/instrumentation/apachehttpd_test.go | 10 +++++----- pkg/instrumentation/helper.go | 10 ++++++++-- pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk.go | 2 ++ pkg/instrumentation/sdk_test.go | 2 +- .../instrumentation-apache-httpd/01-assert.yaml | 2 +- .../01-install-app.yaml | 1 - .../apache-httpd/Dockerfile | 2 +- 10 files changed, 36 insertions(+), 13 deletions(-) create mode 100755 .chloggen/copy-the-scc-to-apache-instrumentation-images.yaml diff --git a/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml b/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml new file mode 100755 index 000000000..62b4249d2 --- /dev/null +++ b/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Set the security context for the init containers of the Apache HTTPD instrumentation" + +# One or more tracking issues related to the change +issues: [2050] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index 18be9ed34..5c85dbff9 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -149,7 +149,7 @@ func injectApacheHttpdagent(_ logr.Logger, apacheSpec v1alpha1.ApacheHttpd, pod Command: []string{"/bin/sh", "-c"}, Args: []string{ // Copy agent binaries to shared volume - "cp -ar /opt/opentelemetry/* " + apacheAgentDirFull + " && " + + "cp -r /opt/opentelemetry/* " + apacheAgentDirFull + " && " + // setup logging configuration from template "export agentLogDir=$(echo \"" + apacheAgentDirFull + "/logs\" | sed 's,/,\\\\/,g') && " + "cat " + apacheAgentDirFull + "/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > " + apacheAgentDirFull + "/conf/appdynamics_sdk_log4cxx.xml &&" + diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index eeca7a2e9..ded356054 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -79,7 +79,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Image: "foo/bar:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, @@ -172,7 +172,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Image: "foo/bar:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /opt/customPath/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /opt/customPath/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, @@ -266,7 +266,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Image: "foo/bar:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, @@ -365,7 +365,7 @@ func TestInjectApacheHttpdagent(t *testing.T) { Image: "foo/bar:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, @@ -476,7 +476,7 @@ func TestInjectApacheHttpdagentUnknownNamespace(t *testing.T) { Image: "foo/bar:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 7dbc7fb16..03f462e22 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -42,8 +42,14 @@ func isInitContainerMissing(pod corev1.Pod, containerName string) bool { // Checks if Pod is already instrumented by checking Instrumentation InitContainer presence. func isAutoInstrumentationInjected(pod corev1.Pod) bool { for _, cont := range pod.Spec.InitContainers { - if slices.Contains([]string{dotnetInitContainerName, javaInitContainerName, - nodejsInitContainerName, pythonInitContainerName, apacheAgentInitContainerName}, cont.Name) { + if slices.Contains([]string{ + dotnetInitContainerName, + javaInitContainerName, + nodejsInitContainerName, + pythonInitContainerName, + apacheAgentInitContainerName, + apacheAgentCloneContainerName, + }, cont.Name) { return true } } diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index eedbb3b05..bbe8397f1 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -2683,7 +2683,7 @@ func TestMutatePod(t *testing.T) { Image: "otel/apache-httpd:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index dd53ca071..8d945339a 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -171,6 +171,8 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations pod = injectApacheHttpdagent(i.logger, otelinst.Spec.ApacheHttpd, pod, index, otelinst.Spec.Endpoint, i.createResourceMap(ctx, otelinst, ns, pod, index)) pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, apacheAgentInitContainerName) + pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, apacheAgentCloneContainerName) } } diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index c19e9cd04..531cee962 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1301,7 +1301,7 @@ func TestInjectApacheHttpd(t *testing.T) { Image: "img:1", Command: []string{"/bin/sh", "-c"}, Args: []string{ - "cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, + "cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo \"/opt/opentelemetry-webserver/agent/logs\" | sed 's,/,\\\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo \"$OTEL_APACHE_AGENT_CONF\" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf"}, Env: []corev1.EnvVar{ { Name: apacheAttributesEnvVar, diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml index 58d146974..3634f82b5 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml @@ -45,7 +45,7 @@ spec: - cp -r /usr/local/apache2/conf/* /opt/opentelemetry-webserver/source-conf name: otel-agent-source-container-clone - args: - - cp -ar /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo "/opt/opentelemetry-webserver/agent/logs" | sed 's,/,\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo "$OTEL_APACHE_AGENT_CONF" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf + - cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo "/opt/opentelemetry-webserver/agent/logs" | sed 's,/,\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo "$OTEL_APACHE_AGENT_CONF" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf name: otel-agent-attach-apache status: phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml index b6aea891c..b323af871 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml @@ -22,7 +22,6 @@ spec: containers: - name: myapp image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main - imagePullPolicy: Always ports: - containerPort: 8080 resources: diff --git a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile index 31043e55a..ee1314608 100644 --- a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile +++ b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile @@ -2,4 +2,4 @@ FROM httpd:2.4 RUN sed -i "s#Listen 80#Listen 8080#g" /usr/local/apache2/conf/httpd.conf -RUN chmod 777 -R /usr/local/apache2/ +RUN chmod 777 -R /usr/local/apache2/ \ No newline at end of file From 16c3cd747c737a746fe6115eec2ba5bdc4315fcc Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 16 Oct 2023 19:38:03 +0200 Subject: [PATCH 1093/1234] Replace tracegen by telemetrygen (#2233) Signed-off-by: Israel Blancas --- tests/e2e-autoscale/autoscale/02-install.yaml | 9 +++++---- tests/e2e-autoscale/autoscale/03-delete.yaml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/e2e-autoscale/autoscale/02-install.yaml b/tests/e2e-autoscale/autoscale/02-install.yaml index d4401cae3..b3a5b5119 100644 --- a/tests/e2e-autoscale/autoscale/02-install.yaml +++ b/tests/e2e-autoscale/autoscale/02-install.yaml @@ -1,15 +1,15 @@ apiVersion: batch/v1 kind: Job metadata: - name: tracegen-set-utilization + name: telemetrygen-set-utilization spec: template: spec: containers: - - name: tracegen - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/tracegen:latest + - name: telemetrygen + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen command: - - "./tracegen" + - "./telemetrygen" args: - -otlp-endpoint=simplest-set-utilization-collector-headless:4317 - -otlp-insecure @@ -17,5 +17,6 @@ spec: # It'll be stopped in step 4 - -duration=1m - -workers=20 + - traces restartPolicy: Never backoffLimit: 4 diff --git a/tests/e2e-autoscale/autoscale/03-delete.yaml b/tests/e2e-autoscale/autoscale/03-delete.yaml index 2e7041267..5e39ab40d 100644 --- a/tests/e2e-autoscale/autoscale/03-delete.yaml +++ b/tests/e2e-autoscale/autoscale/03-delete.yaml @@ -5,4 +5,4 @@ delete: kind: Job propagationPolicy: Background metadata: - name: tracegen-set-utilization \ No newline at end of file + name: telemetrygen-set-utilization \ No newline at end of file From f2b5e3c6c9bbc626af32101b2a69c22c6e7c732e Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 16 Oct 2023 23:46:56 -0700 Subject: [PATCH 1094/1234] [chore] Refactor Webhooks to their own packages (#2210) * lots of moving things around and simplifcation * moves webhook manifest * rename * generate * Add back annotations * Fix tests, simplify code * naming * fix borked test * FIX TESTS * oops * move things back * update manifests * fix a miss * fix tests * Rename --- ...lector_webhook.go => collector_webhook.go} | 167 ++++++----- ...hook_test.go => collector_webhook_test.go} | 106 ++++--- apis/v1alpha1/instrumentation_webhook.go | 279 ++++++++++-------- apis/v1alpha1/instrumentation_webhook_test.go | 65 ++-- controllers/suite_test.go | 2 +- internal/config/main.go | 1 + .../podmutation}/webhookhandler.go | 12 +- .../podmutation}/webhookhandler_suite_test.go | 9 +- .../podmutation}/webhookhandler_test.go | 4 +- main.go | 23 +- pkg/collector/reconcile/suite_test.go | 2 +- pkg/collector/upgrade/suite_test.go | 4 +- pkg/constants/env.go | 9 + pkg/instrumentation/podmutator.go | 4 +- pkg/instrumentation/upgrade/upgrade.go | 153 ++++------ pkg/instrumentation/upgrade/upgrade_test.go | 40 +-- pkg/sidecar/podmutator.go | 4 +- 17 files changed, 469 insertions(+), 415 deletions(-) rename apis/v1alpha1/{opentelemetrycollector_webhook.go => collector_webhook.go} (63%) rename apis/v1alpha1/{opentelemetrycollector_webhook_test.go => collector_webhook_test.go} (87%) rename internal/{webhookhandler => webhook/podmutation}/webhookhandler.go (92%) rename internal/{webhookhandler => webhook/podmutation}/webhookhandler_suite_test.go (92%) rename internal/{webhookhandler => webhook/podmutation}/webhookhandler_test.go (99%) diff --git a/apis/v1alpha1/opentelemetrycollector_webhook.go b/apis/v1alpha1/collector_webhook.go similarity index 63% rename from apis/v1alpha1/opentelemetrycollector_webhook.go rename to apis/v1alpha1/collector_webhook.go index 3d1d9828b..cc61f72b5 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -15,38 +15,71 @@ package v1alpha1 import ( + "context" "fmt" + "github.com/go-logr/logr" autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + "github.com/open-telemetry/opentelemetry-operator/internal/config" ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) -// log is for logging in this package. -var opentelemetrycollectorlog = logf.Log.WithName("opentelemetrycollector-resource") +var ( + _ admission.CustomValidator = &CollectorWebhook{} + _ admission.CustomDefaulter = &CollectorWebhook{} +) -func (r *OpenTelemetryCollector) SetupWebhookWithManager(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(r). - Complete() +// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:object:generate=false + +type CollectorWebhook struct { + logger logr.Logger + cfg config.Config + scheme *runtime.Scheme } -// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1 +func (c CollectorWebhook) Default(ctx context.Context, obj runtime.Object) error { + otelcol, ok := obj.(*OpenTelemetryCollector) + if !ok { + return fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + } + return c.defaulter(otelcol) +} -var _ webhook.Defaulter = &OpenTelemetryCollector{} +func (c CollectorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + otelcol, ok := obj.(*OpenTelemetryCollector) + if !ok { + return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + } + return c.validate(otelcol) +} -// Default implements webhook.Defaulter so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) Default() { - opentelemetrycollectorlog.Info("default", "name", r.Name) +func (c CollectorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { + otelcol, ok := newObj.(*OpenTelemetryCollector) + if !ok { + return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", newObj) + } + return c.validate(otelcol) +} +func (c CollectorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + otelcol, ok := obj.(*OpenTelemetryCollector) + if !ok || otelcol == nil { + return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + } + return c.validate(otelcol) +} + +func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { if len(r.Spec.Mode) == 0 { r.Spec.Mode = ModeDeployment } @@ -117,74 +150,53 @@ func (r *OpenTelemetryCollector) Default() { if len(r.Spec.ManagementState) == 0 { r.Spec.ManagementState = ManagementStateManaged } + return nil } -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1 - -var _ webhook.Validator = &OpenTelemetryCollector{} - -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateCreate() (admission.Warnings, error) { - opentelemetrycollectorlog.Info("validate create", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { - opentelemetrycollectorlog.Info("validate update", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *OpenTelemetryCollector) ValidateDelete() (admission.Warnings, error) { - opentelemetrycollectorlog.Info("validate delete", "name", r.Name) - return nil, nil -} - -func (r *OpenTelemetryCollector) validateCRDSpec() error { +func (c CollectorWebhook) validate(r *OpenTelemetryCollector) (admission.Warnings, error) { + warnings := admission.Warnings{} // validate volumeClaimTemplates if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'volumeClaimTemplates'", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'volumeClaimTemplates'", r.Spec.Mode) } // validate tolerations if r.Spec.Mode == ModeSidecar && len(r.Spec.Tolerations) > 0 { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) } // validate priorityClassName if r.Spec.Mode == ModeSidecar && r.Spec.PriorityClassName != "" { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'priorityClassName'", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'priorityClassName'", r.Spec.Mode) } // validate affinity if r.Spec.Mode == ModeSidecar && r.Spec.Affinity != nil { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'affinity'", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'affinity'", r.Spec.Mode) } if r.Spec.Mode == ModeSidecar && len(r.Spec.AdditionalContainers) > 0 { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'AdditionalContainers'", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'AdditionalContainers'", r.Spec.Mode) } // validate target allocation if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) } // validate Prometheus config for target allocation if r.Spec.TargetAllocator.Enabled { promCfg, err := ta.ConfigToPromConfig(r.Spec.Config) if err != nil { - return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) + return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } err = ta.ValidatePromConfig(promCfg, r.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled()) if err != nil { - return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) + return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } err = ta.ValidateTargetAllocatorConfig(r.Spec.TargetAllocator.PrometheusCR.Enabled, promCfg) if err != nil { - return fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) + return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) } } @@ -193,29 +205,31 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { nameErrs := validation.IsValidPortName(p.Name) numErrs := validation.IsValidPortNum(int(p.Port)) if len(nameErrs) > 0 || len(numErrs) > 0 { - return fmt.Errorf("the OpenTelemetry Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", + return warnings, fmt.Errorf("the OpenTelemetry Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", p.Name, nameErrs, p.Port, numErrs) } } - maxReplicas := new(int32) + var maxReplicas *int32 if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil { maxReplicas = r.Spec.Autoscaler.MaxReplicas } // check deprecated .Spec.MaxReplicas if maxReplicas is not set - if *maxReplicas == 0 { + if maxReplicas == nil && r.Spec.MaxReplicas != nil { + warnings = append(warnings, "MaxReplicas is deprecated") maxReplicas = r.Spec.MaxReplicas } - minReplicas := new(int32) + var minReplicas *int32 if r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MinReplicas != nil { minReplicas = r.Spec.Autoscaler.MinReplicas } // check deprecated .Spec.MinReplicas if minReplicas is not set - if *minReplicas == 0 { + if minReplicas == nil { if r.Spec.MinReplicas != nil { + warnings = append(warnings, "MinReplicas is deprecated") minReplicas = r.Spec.MinReplicas } else { minReplicas = r.Spec.Replicas @@ -223,7 +237,7 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { } if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { - return fmt.Errorf("the OpenTelemetry Spec Ingress configuration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", + return warnings, fmt.Errorf("the OpenTelemetry Spec Ingress configuration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", ModeDeployment, ModeDaemonSet, ModeStatefulSet, ) } @@ -231,65 +245,57 @@ func (r *OpenTelemetryCollector) validateCRDSpec() error { // validate autoscale with horizontal pod autoscaler if maxReplicas != nil { if *maxReplicas < int32(1) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and one or more") + return warnings, fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, maxReplicas should be defined and one or more") } if r.Spec.Replicas != nil && *r.Spec.Replicas > *maxReplicas { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, replicas must not be greater than maxReplicas") + return warnings, fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, replicas must not be greater than maxReplicas") } if minReplicas != nil && *minReplicas > *maxReplicas { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas") + return warnings, fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas must not be greater than maxReplicas") } if minReplicas != nil && *minReplicas < int32(1) { - return fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") + return warnings, fmt.Errorf("the OpenTelemetry Spec autoscale configuration is incorrect, minReplicas should be one or more") } if r.Spec.Autoscaler != nil { - return checkAutoscalerSpec(r.Spec.Autoscaler) - } - } - - // validate pod disruption budget - - if r.Spec.PodDisruptionBudget != nil { - if r.Spec.PodDisruptionBudget.MaxUnavailable != nil && r.Spec.PodDisruptionBudget.MinAvailable != nil { - return fmt.Errorf("the OpenTelemetry Spec podDisruptionBudget configuration is incorrect, minAvailable and maxUnavailable are mutually exclusive") + return warnings, checkAutoscalerSpec(r.Spec.Autoscaler) } } if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { - return fmt.Errorf("the OpenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", + return warnings, fmt.Errorf("the OpenTelemetry Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", ModeDeployment, ModeDaemonSet, ModeStatefulSet, ) } if r.Spec.Ingress.RuleType == IngressRuleTypeSubdomain && (r.Spec.Ingress.Hostname == "" || r.Spec.Ingress.Hostname == "*") { - return fmt.Errorf("a valid Ingress hostname has to be defined for subdomain ruleType") + return warnings, fmt.Errorf("a valid Ingress hostname has to be defined for subdomain ruleType") } if r.Spec.LivenessProbe != nil { if r.Spec.LivenessProbe.InitialDelaySeconds != nil && *r.Spec.LivenessProbe.InitialDelaySeconds < 0 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe InitialDelaySeconds configuration is incorrect. InitialDelaySeconds should be greater than or equal to 0") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe InitialDelaySeconds configuration is incorrect. InitialDelaySeconds should be greater than or equal to 0") } if r.Spec.LivenessProbe.PeriodSeconds != nil && *r.Spec.LivenessProbe.PeriodSeconds < 1 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe PeriodSeconds configuration is incorrect. PeriodSeconds should be greater than or equal to 1") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe PeriodSeconds configuration is incorrect. PeriodSeconds should be greater than or equal to 1") } if r.Spec.LivenessProbe.TimeoutSeconds != nil && *r.Spec.LivenessProbe.TimeoutSeconds < 1 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe TimeoutSeconds configuration is incorrect. TimeoutSeconds should be greater than or equal to 1") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe TimeoutSeconds configuration is incorrect. TimeoutSeconds should be greater than or equal to 1") } if r.Spec.LivenessProbe.SuccessThreshold != nil && *r.Spec.LivenessProbe.SuccessThreshold < 1 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe SuccessThreshold configuration is incorrect. SuccessThreshold should be greater than or equal to 1") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe SuccessThreshold configuration is incorrect. SuccessThreshold should be greater than or equal to 1") } if r.Spec.LivenessProbe.FailureThreshold != nil && *r.Spec.LivenessProbe.FailureThreshold < 1 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe FailureThreshold configuration is incorrect. FailureThreshold should be greater than or equal to 1") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe FailureThreshold configuration is incorrect. FailureThreshold should be greater than or equal to 1") } if r.Spec.LivenessProbe.TerminationGracePeriodSeconds != nil && *r.Spec.LivenessProbe.TerminationGracePeriodSeconds < 1 { - return fmt.Errorf("the OpenTelemetry Spec LivenessProbe TerminationGracePeriodSeconds configuration is incorrect. TerminationGracePeriodSeconds should be greater than or equal to 1") + return warnings, fmt.Errorf("the OpenTelemetry Spec LivenessProbe TerminationGracePeriodSeconds configuration is incorrect. TerminationGracePeriodSeconds should be greater than or equal to 1") } } - return nil + return warnings, nil } func checkAutoscalerSpec(autoscaler *AutoscalerSpec) error { @@ -332,3 +338,16 @@ func checkAutoscalerSpec(autoscaler *AutoscalerSpec) error { return nil } + +func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config) error { + cvw := &CollectorWebhook{ + logger: mgr.GetLogger().WithValues("handler", "CollectorWebhook"), + scheme: mgr.GetScheme(), + cfg: cfg, + } + return ctrl.NewWebhookManagedBy(mgr). + For(&OpenTelemetryCollector{}). + WithValidator(cvw). + WithDefaulter(cvw). + Complete() +} diff --git a/apis/v1alpha1/opentelemetrycollector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go similarity index 87% rename from apis/v1alpha1/opentelemetrycollector_webhook_test.go rename to apis/v1alpha1/collector_webhook_test.go index b4b4b9e2b..0f2313471 100644 --- a/apis/v1alpha1/opentelemetrycollector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -15,15 +15,26 @@ package v1alpha1 import ( + "context" "fmt" + "os" "testing" + "github.com/go-logr/logr" "github.com/stretchr/testify/assert" autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/kubernetes/scheme" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" +) + +var ( + testScheme *runtime.Scheme = scheme.Scheme ) func TestOTELColDefaultingWebhook(t *testing.T) { @@ -31,6 +42,11 @@ func TestOTELColDefaultingWebhook(t *testing.T) { five := int32(5) defaultCPUTarget := int32(90) + if err := AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + tests := []struct { name string otelcol OpenTelemetryCollector @@ -261,7 +277,17 @@ func TestOTELColDefaultingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - test.otelcol.Default() + cvw := &CollectorWebhook{ + logger: logr.Discard(), + scheme: testScheme, + cfg: config.New( + config.WithCollectorImage("collector:v0.0.0"), + config.WithTargetAllocatorImage("ta:v0.0.0"), + ), + } + ctx := context.Background() + err := cvw.Default(ctx, &test.otelcol) + assert.NoError(t, err) assert.Equal(t, test.expected, test.otelcol) }) } @@ -279,9 +305,10 @@ func TestOTELColValidatingWebhook(t *testing.T) { five := int32(5) tests := []struct { //nolint:govet - name string - otelcol OpenTelemetryCollector - expectedErr string + name string + otelcol OpenTelemetryCollector + expectedErr string + expectedWarnings []string }{ { name: "valid empty spec", @@ -336,12 +363,6 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, TargetCPUUtilization: &five, }, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MinAvailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, }, }, }, @@ -440,7 +461,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { MaxReplicas: &zero, }, }, - expectedErr: "maxReplicas should be defined and one or more", + expectedErr: "maxReplicas should be defined and one or more", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid replicas, greater than max", @@ -450,7 +472,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { Replicas: &five, }, }, - expectedErr: "replicas must not be greater than maxReplicas", + expectedErr: "replicas must not be greater than maxReplicas", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid min replicas, greater than max", @@ -460,7 +483,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { MinReplicas: &five, }, }, - expectedErr: "minReplicas must not be greater than maxReplicas", + expectedErr: "minReplicas must not be greater than maxReplicas", + expectedWarnings: []string{"MaxReplicas is deprecated", "MinReplicas is deprecated"}, }, { name: "invalid min replicas, lesser than 1", @@ -470,7 +494,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { MinReplicas: &zero, }, }, - expectedErr: "minReplicas should be one or more", + expectedErr: "minReplicas should be one or more", + expectedWarnings: []string{"MaxReplicas is deprecated", "MinReplicas is deprecated"}, }, { name: "invalid autoscaler scale down", @@ -486,7 +511,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "scaleDown should be one or more", + expectedErr: "scaleDown should be one or more", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid autoscaler scale up", @@ -502,7 +528,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "scaleUp should be one or more", + expectedErr: "scaleUp should be one or more", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid autoscaler target cpu utilization", @@ -514,7 +541,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "targetCPUUtilization should be greater than 0 and less than 100", + expectedErr: "targetCPUUtilization should be greater than 0 and less than 100", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "autoscaler minReplicas is less than maxReplicas", @@ -542,7 +570,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, metric type unsupported. Expected metric of source type Pod", + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, metric type unsupported. Expected metric of source type Pod", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid pod metric average value", @@ -567,7 +596,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, average value should be greater than 0", + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, average value should be greater than 0", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "utilization target is not valid with pod metrics", @@ -592,26 +622,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, }, }, - expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, invalid pods target type", - }, - { - name: "pdb minAvailable and maxUnavailable have been set together", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ - MaxReplicas: &three, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MinAvailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - }, - }, - expectedErr: "the OpenTelemetry Spec podDisruptionBudget configuration is incorrect, minAvailable and maxUnavailable are mutually exclusive", + expectedErr: "the OpenTelemetry Spec autoscale configuration is incorrect, invalid pods target type", + expectedWarnings: []string{"MaxReplicas is deprecated"}, }, { name: "invalid deployment mode incompabible with ingress settings", @@ -758,11 +770,25 @@ func TestOTELColValidatingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - err := test.otelcol.validateCRDSpec() + cvw := &CollectorWebhook{ + logger: logr.Discard(), + scheme: testScheme, + cfg: config.New( + config.WithCollectorImage("collector:v0.0.0"), + config.WithTargetAllocatorImage("ta:v0.0.0"), + ), + } + ctx := context.Background() + warnings, err := cvw.ValidateCreate(ctx, &test.otelcol) if test.expectedErr == "" { assert.NoError(t, err) return } + if len(test.expectedWarnings) == 0 { + assert.Empty(t, warnings, test.expectedWarnings) + } else { + assert.ElementsMatch(t, warnings, test.expectedWarnings) + } assert.ErrorContains(t, err, test.expectedErr) }) } diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 234784dd1..beeaedf36 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -15,56 +15,84 @@ package v1alpha1 import ( + "context" "fmt" "strconv" "strings" + "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) const ( - AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image" - AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image" - AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image" - AnnotationDefaultAutoInstrumentationDotNet = "instrumentation.opentelemetry.io/default-auto-instrumentation-dotnet-image" - AnnotationDefaultAutoInstrumentationGo = "instrumentation.opentelemetry.io/default-auto-instrumentation-go-image" - AnnotationDefaultAutoInstrumentationApacheHttpd = "instrumentation.opentelemetry.io/default-auto-instrumentation-apache-httpd-image" - AnnotationDefaultAutoInstrumentationNginx = "instrumentation.opentelemetry.io/default-auto-instrumentation-nginx-image" - envPrefix = "OTEL_" - envSplunkPrefix = "SPLUNK_" + envPrefix = "OTEL_" + envSplunkPrefix = "SPLUNK_" ) -// log is for logging in this package. -var instrumentationlog = logf.Log.WithName("instrumentation-resource") +var ( + _ admission.CustomValidator = &InstrumentationWebhook{} + _ admission.CustomDefaulter = &InstrumentationWebhook{} + initContainerDefaultLimitResources = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("500m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } + initContainerDefaultRequestedResources = corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("1m"), + corev1.ResourceMemory: resource.MustParse("128Mi"), + } +) + +// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:object:generate=false -var initContainerDefaultLimitResources = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("128Mi"), +type InstrumentationWebhook struct { + logger logr.Logger + cfg config.Config + scheme *runtime.Scheme } -var initContainerDefaultRequestedResources = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("1m"), - corev1.ResourceMemory: resource.MustParse("128Mi"), + +func (w InstrumentationWebhook) Default(ctx context.Context, obj runtime.Object) error { + instrumentation, ok := obj.(*Instrumentation) + if !ok { + return fmt.Errorf("expected an Instrumentation, received %T", obj) + } + return w.defaulter(instrumentation) } -func (r *Instrumentation) SetupWebhookWithManager(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(r). - Complete() +func (w InstrumentationWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + inst, ok := obj.(*Instrumentation) + if !ok { + return nil, fmt.Errorf("expected an Instrumentation, received %T", obj) + } + return w.validate(inst) } -//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 +func (w InstrumentationWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { + inst, ok := newObj.(*Instrumentation) + if !ok { + return nil, fmt.Errorf("expected an Instrumentation, received %T", newObj) + } + return w.validate(inst) +} -var _ webhook.Defaulter = &Instrumentation{} +func (w InstrumentationWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + inst, ok := obj.(*Instrumentation) + if !ok || inst == nil { + return nil, fmt.Errorf("expected an Instrumentation, received %T", obj) + } + return w.validate(inst) +} -// Default implements webhook.Defaulter so a webhook will be registered for the type. -func (r *Instrumentation) Default() { - instrumentationlog.Info("default", "name", r.Name) +func (w InstrumentationWebhook) defaulter(r *Instrumentation) error { if r.Labels == nil { r.Labels = map[string]string{} } @@ -73,9 +101,7 @@ func (r *Instrumentation) Default() { } if r.Spec.Java.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationJava]; ok { - r.Spec.Java.Image = val - } + r.Spec.Java.Image = w.cfg.AutoInstrumentationJavaImage() } if r.Spec.Java.Resources.Limits == nil { r.Spec.Java.Resources.Limits = corev1.ResourceList{ @@ -90,9 +116,7 @@ func (r *Instrumentation) Default() { } } if r.Spec.NodeJS.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationNodeJS]; ok { - r.Spec.NodeJS.Image = val - } + r.Spec.NodeJS.Image = w.cfg.AutoInstrumentationNodeJSImage() } if r.Spec.NodeJS.Resources.Limits == nil { r.Spec.NodeJS.Resources.Limits = corev1.ResourceList{ @@ -107,9 +131,7 @@ func (r *Instrumentation) Default() { } } if r.Spec.Python.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationPython]; ok { - r.Spec.Python.Image = val - } + r.Spec.Python.Image = w.cfg.AutoInstrumentationPythonImage() } if r.Spec.Python.Resources.Limits == nil { r.Spec.Python.Resources.Limits = corev1.ResourceList{ @@ -124,9 +146,7 @@ func (r *Instrumentation) Default() { } } if r.Spec.DotNet.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationDotNet]; ok { - r.Spec.DotNet.Image = val - } + r.Spec.DotNet.Image = w.cfg.AutoInstrumentationDotNetImage() } if r.Spec.DotNet.Resources.Limits == nil { r.Spec.DotNet.Resources.Limits = corev1.ResourceList{ @@ -141,9 +161,7 @@ func (r *Instrumentation) Default() { } } if r.Spec.Go.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationGo]; ok { - r.Spec.Go.Image = val - } + r.Spec.Go.Image = w.cfg.AutoInstrumentationGoImage() } if r.Spec.Go.Resources.Limits == nil { r.Spec.Go.Resources.Limits = corev1.ResourceList{ @@ -158,9 +176,7 @@ func (r *Instrumentation) Default() { } } if r.Spec.ApacheHttpd.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationApacheHttpd]; ok { - r.Spec.ApacheHttpd.Image = val - } + r.Spec.ApacheHttpd.Image = w.cfg.AutoInstrumentationApacheHttpdImage() } if r.Spec.ApacheHttpd.Resources.Limits == nil { r.Spec.ApacheHttpd.Resources.Limits = initContainerDefaultLimitResources @@ -175,9 +191,7 @@ func (r *Instrumentation) Default() { r.Spec.ApacheHttpd.ConfigPath = "/usr/local/apache2/conf" } if r.Spec.Nginx.Image == "" { - if val, ok := r.Annotations[AnnotationDefaultAutoInstrumentationNginx]; ok { - r.Spec.Nginx.Image = val - } + r.Spec.Nginx.Image = w.cfg.AutoInstrumentationNginxImage() } if r.Spec.Nginx.Resources.Limits == nil { r.Spec.Nginx.Resources.Limits = initContainerDefaultLimitResources @@ -188,73 +202,33 @@ func (r *Instrumentation) Default() { if r.Spec.Nginx.ConfigFile == "" { r.Spec.Nginx.ConfigFile = "/etc/nginx/nginx.conf" } -} - -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 - -var _ webhook.Validator = &Instrumentation{} - -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateCreate() (admission.Warnings, error) { - instrumentationlog.Info("validate create", "name", r.Name) - return nil, r.validate() -} - -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { - instrumentationlog.Info("validate update", "name", r.Name) - return nil, r.validate() -} - -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *Instrumentation) ValidateDelete() (admission.Warnings, error) { - instrumentationlog.Info("validate delete", "name", r.Name) - return nil, nil -} - -func validateJaegerRemoteSamplerArgument(argument string) error { - parts := strings.Split(argument, ",") - - for _, part := range parts { - kv := strings.Split(part, "=") - if len(kv) != 2 { - return fmt.Errorf("invalid argument: %s, the argument should be in the form of key=value", part) - } - - switch kv[0] { - case "endpoint": - if kv[1] == "" { - return fmt.Errorf("endpoint cannot be empty") - } - case "pollingIntervalMs": - if _, err := strconv.Atoi(kv[1]); err != nil { - return fmt.Errorf("invalid pollingIntervalMs: %s", kv[1]) - } - case "initialSamplingRate": - rate, err := strconv.ParseFloat(kv[1], 64) - if err != nil { - return fmt.Errorf("invalid initialSamplingRate: %s", kv[1]) - } - if rate < 0 || rate > 1 { - return fmt.Errorf("initialSamplingRate should be in rage [0..1]: %s", kv[1]) - } - } - } + // Set the defaulting annotations + if r.Annotations == nil { + r.Annotations = map[string]string{} + } + r.Annotations[constants.AnnotationDefaultAutoInstrumentationJava] = w.cfg.AutoInstrumentationJavaImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationNodeJS] = w.cfg.AutoInstrumentationNodeJSImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationPython] = w.cfg.AutoInstrumentationPythonImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationDotNet] = w.cfg.AutoInstrumentationDotNetImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationGo] = w.cfg.AutoInstrumentationGoImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationApacheHttpd] = w.cfg.AutoInstrumentationApacheHttpdImage() + r.Annotations[constants.AnnotationDefaultAutoInstrumentationNginx] = w.cfg.AutoInstrumentationNginxImage() return nil } -func (r *Instrumentation) validate() error { +func (w InstrumentationWebhook) validate(r *Instrumentation) (admission.Warnings, error) { + var warnings []string switch r.Spec.Sampler.Type { - case "": // not set, do nothing + case "": + warnings = append(warnings, "sampler type not set") case TraceIDRatio, ParentBasedTraceIDRatio: if r.Spec.Sampler.Argument != "" { rate, err := strconv.ParseFloat(r.Spec.Sampler.Argument, 64) if err != nil { - return fmt.Errorf("spec.sampler.argument is not a number: %s", r.Spec.Sampler.Argument) + return warnings, fmt.Errorf("spec.sampler.argument is not a number: %s", r.Spec.Sampler.Argument) } if rate < 0 || rate > 1 { - return fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", r.Spec.Sampler.Argument) + return warnings, fmt.Errorf("spec.sampler.argument should be in rage [0..1]: %s", r.Spec.Sampler.Argument) } } case JaegerRemote, ParentBasedJaegerRemote: @@ -264,44 +238,43 @@ func (r *Instrumentation) validate() error { err := validateJaegerRemoteSamplerArgument(r.Spec.Sampler.Argument) if err != nil { - return fmt.Errorf("spec.sampler.argument is not a valid argument for sampler %s: %w", r.Spec.Sampler.Type, err) + return warnings, fmt.Errorf("spec.sampler.argument is not a valid argument for sampler %s: %w", r.Spec.Sampler.Type, err) } } case AlwaysOn, AlwaysOff, ParentBasedAlwaysOn, ParentBasedAlwaysOff, XRaySampler: default: - return fmt.Errorf("spec.sampler.type is not valid: %s", r.Spec.Sampler.Type) + return warnings, fmt.Errorf("spec.sampler.type is not valid: %s", r.Spec.Sampler.Type) } // validate env vars - if err := r.validateEnv(r.Spec.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.Java.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.Java.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.NodeJS.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.NodeJS.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.Python.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.Python.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.DotNet.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.DotNet.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.Go.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.Go.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.ApacheHttpd.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.ApacheHttpd.Env); err != nil { + return warnings, err } - if err := r.validateEnv(r.Spec.Nginx.Env); err != nil { - return err + if err := w.validateEnv(r.Spec.Nginx.Env); err != nil { + return warnings, err } - - return nil + return warnings, nil } -func (r *Instrumentation) validateEnv(envs []corev1.EnvVar) error { +func (w InstrumentationWebhook) validateEnv(envs []corev1.EnvVar) error { for _, env := range envs { if !strings.HasPrefix(env.Name, envPrefix) && !strings.HasPrefix(env.Name, envSplunkPrefix) { return fmt.Errorf("env name should start with \"OTEL_\" or \"SPLUNK_\": %s", env.Name) @@ -309,3 +282,55 @@ func (r *Instrumentation) validateEnv(envs []corev1.EnvVar) error { } return nil } + +func validateJaegerRemoteSamplerArgument(argument string) error { + parts := strings.Split(argument, ",") + + for _, part := range parts { + kv := strings.Split(part, "=") + if len(kv) != 2 { + return fmt.Errorf("invalid argument: %s, the argument should be in the form of key=value", part) + } + + switch kv[0] { + case "endpoint": + if kv[1] == "" { + return fmt.Errorf("endpoint cannot be empty") + } + case "pollingIntervalMs": + if _, err := strconv.Atoi(kv[1]); err != nil { + return fmt.Errorf("invalid pollingIntervalMs: %s", kv[1]) + } + case "initialSamplingRate": + rate, err := strconv.ParseFloat(kv[1], 64) + if err != nil { + return fmt.Errorf("invalid initialSamplingRate: %s", kv[1]) + } + if rate < 0 || rate > 1 { + return fmt.Errorf("initialSamplingRate should be in rage [0..1]: %s", kv[1]) + } + } + } + return nil +} + +func NewInstrumentationWebhook(logger logr.Logger, scheme *runtime.Scheme, cfg config.Config) *InstrumentationWebhook { + return &InstrumentationWebhook{ + logger: logger, + scheme: scheme, + cfg: cfg, + } +} + +func SetupInstrumentationWebhook(mgr ctrl.Manager, cfg config.Config) error { + ivw := NewInstrumentationWebhook( + mgr.GetLogger().WithValues("handler", "InstrumentationWebhook"), + mgr.GetScheme(), + cfg, + ) + return ctrl.NewWebhookManagedBy(mgr). + For(&Instrumentation{}). + WithValidator(ivw). + WithDefaulter(ivw). + Complete() +} diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 9791a9301..46f7327ad 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -15,26 +15,28 @@ package v1alpha1 import ( + "context" "testing" "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" ) func TestInstrumentationDefaultingWebhook(t *testing.T) { - inst := &Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - AnnotationDefaultAutoInstrumentationJava: "java-img:1", - AnnotationDefaultAutoInstrumentationNodeJS: "nodejs-img:1", - AnnotationDefaultAutoInstrumentationPython: "python-img:1", - AnnotationDefaultAutoInstrumentationDotNet: "dotnet-img:1", - AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd-img:1", - AnnotationDefaultAutoInstrumentationNginx: "nginx-img:1", - }, - }, - } - inst.Default() + inst := &Instrumentation{} + err := InstrumentationWebhook{ + cfg: config.New( + config.WithAutoInstrumentationJavaImage("java-img:1"), + config.WithAutoInstrumentationNodeJSImage("nodejs-img:1"), + config.WithAutoInstrumentationPythonImage("python-img:1"), + config.WithAutoInstrumentationDotNetImage("dotnet-img:1"), + config.WithAutoInstrumentationApacheHttpdImage("apache-httpd-img:1"), + config.WithAutoInstrumentationNginxImage("nginx-img:1"), + ), + }.Default(context.Background(), inst) + assert.NoError(t, err) assert.Equal(t, "java-img:1", inst.Spec.Java.Image) assert.Equal(t, "nodejs-img:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python-img:1", inst.Spec.Python.Image) @@ -45,15 +47,17 @@ func TestInstrumentationDefaultingWebhook(t *testing.T) { func TestInstrumentationValidatingWebhook(t *testing.T) { tests := []struct { - name string - err string - inst Instrumentation + name string + err string + warnings admission.Warnings + inst Instrumentation }{ { name: "all defaults", inst: Instrumentation{ Spec: InstrumentationSpec{}, }, + warnings: []string{"sampler type not set"}, }, { name: "sampler configuration not present", @@ -62,6 +66,7 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { Sampler: Sampler{}, }, }, + warnings: []string{"sampler type not set"}, }, { name: "argument is not a number", @@ -112,19 +117,20 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { + ctx := context.Background() if test.err == "" { - warnings, err := test.inst.ValidateCreate() - assert.Nil(t, warnings) + warnings, err := InstrumentationWebhook{}.ValidateCreate(ctx, &test.inst) + assert.Equal(t, test.warnings, warnings) assert.Nil(t, err) - warnings, err = test.inst.ValidateUpdate(nil) - assert.Nil(t, warnings) + warnings, err = InstrumentationWebhook{}.ValidateUpdate(ctx, nil, &test.inst) + assert.Equal(t, test.warnings, warnings) assert.Nil(t, err) } else { - warnings, err := test.inst.ValidateCreate() - assert.Nil(t, warnings) + warnings, err := InstrumentationWebhook{}.ValidateCreate(ctx, &test.inst) + assert.Equal(t, test.warnings, warnings) assert.Contains(t, err.Error(), test.err) - warnings, err = test.inst.ValidateUpdate(nil) - assert.Nil(t, warnings) + warnings, err = InstrumentationWebhook{}.ValidateUpdate(ctx, nil, &test.inst) + assert.Equal(t, test.warnings, warnings) assert.Contains(t, err.Error(), test.err) } }) @@ -171,18 +177,19 @@ func TestInstrumentationJaegerRemote(t *testing.T) { }, }, } + ctx := context.Background() if test.err == "" { - warnings, err := inst.ValidateCreate() + warnings, err := InstrumentationWebhook{}.ValidateCreate(ctx, &inst) assert.Nil(t, warnings) assert.Nil(t, err) - warnings, err = inst.ValidateUpdate(nil) + warnings, err = InstrumentationWebhook{}.ValidateUpdate(ctx, nil, &inst) assert.Nil(t, warnings) assert.Nil(t, err) } else { - warnings, err := inst.ValidateCreate() + warnings, err := InstrumentationWebhook{}.ValidateCreate(ctx, &inst) assert.Nil(t, warnings) assert.Contains(t, err.Error(), test.err) - warnings, err = inst.ValidateUpdate(nil) + warnings, err = InstrumentationWebhook{}.ValidateUpdate(ctx, nil, &inst) assert.Nil(t, warnings) assert.Contains(t, err.Error(), test.err) } diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 4d91e6448..acf46e64e 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -125,7 +125,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = v1alpha1.SetupCollectorWebhook(mgr, config.New()); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } diff --git a/internal/config/main.go b/internal/config/main.go index 951340136..3c2c59414 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -85,6 +85,7 @@ func New(opts ...Option) Config { autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, autoInstrumentationDotNetImage: o.autoInstrumentationDotNetImage, + autoInstrumentationGoImage: o.autoInstrumentationGoImage, autoInstrumentationApacheHttpdImage: o.autoInstrumentationApacheHttpdImage, autoInstrumentationNginxImage: o.autoInstrumentationNginxImage, labelsFilter: o.labelsFilter, diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhook/podmutation/webhookhandler.go similarity index 92% rename from internal/webhookhandler/webhookhandler.go rename to internal/webhook/podmutation/webhookhandler.go index 11f166b79..9d9fa6e74 100644 --- a/internal/webhookhandler/webhookhandler.go +++ b/internal/webhook/podmutation/webhookhandler.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package webhookhandler contains the webhook that injects sidecars into pods. -package webhookhandler +// Package podmutation contains the webhook that injects sidecars into pods. +package podmutation import ( "context" @@ -35,7 +35,7 @@ import ( // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch // +kubebuilder:rbac:groups="apps",resources=replicasets,verbs=get;list;watch -var _ WebhookHandler = (*podSidecarInjector)(nil) +var _ WebhookHandler = (*podMutationWebhook)(nil) // WebhookHandler is a webhook handler that analyzes new pods and injects appropriate sidecars into it. type WebhookHandler interface { @@ -43,7 +43,7 @@ type WebhookHandler interface { } // the implementation. -type podSidecarInjector struct { +type podMutationWebhook struct { client client.Client decoder *admission.Decoder logger logr.Logger @@ -58,7 +58,7 @@ type PodMutator interface { // NewWebhookHandler creates a new WebhookHandler. func NewWebhookHandler(cfg config.Config, logger logr.Logger, decoder *admission.Decoder, cl client.Client, podMutators []PodMutator) WebhookHandler { - return &podSidecarInjector{ + return &podMutationWebhook{ config: cfg, decoder: decoder, logger: logger, @@ -67,7 +67,7 @@ func NewWebhookHandler(cfg config.Config, logger logr.Logger, decoder *admission } } -func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) admission.Response { +func (p *podMutationWebhook) Handle(ctx context.Context, req admission.Request) admission.Response { pod := corev1.Pod{} err := p.decoder.Decode(req, &pod) if err != nil { diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhook/podmutation/webhookhandler_suite_test.go similarity index 92% rename from internal/webhookhandler/webhookhandler_suite_test.go rename to internal/webhook/podmutation/webhookhandler_suite_test.go index 5c188e7dd..05f6c062b 100644 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ b/internal/webhook/podmutation/webhookhandler_suite_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package webhookhandler_test +package podmutation_test import ( "context" @@ -37,6 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" // +kubebuilder:scaffold:imports ) @@ -55,9 +56,9 @@ func TestMain(m *testing.M) { defer cancel() testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "config", "webhook")}, + Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, }, } cfg, err = testEnv.Start() @@ -97,7 +98,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = v1alpha1.SetupCollectorWebhook(mgr, config.New()); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhook/podmutation/webhookhandler_test.go similarity index 99% rename from internal/webhookhandler/webhookhandler_test.go rename to internal/webhook/podmutation/webhookhandler_test.go index 91aa2c3cc..d5bb69b79 100644 --- a/internal/webhookhandler/webhookhandler_test.go +++ b/internal/webhook/podmutation/webhookhandler_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package webhookhandler_test +package podmutation_test import ( "context" @@ -33,7 +33,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/naming" - . "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" + . "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" ) diff --git a/main.go b/main.go index 2f04fb083..80872048b 100644 --- a/main.go +++ b/main.go @@ -28,7 +28,6 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/spf13/pflag" colfeaturegate "go.opentelemetry.io/collector/featuregate" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" k8sruntime "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" @@ -48,7 +47,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" + "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" @@ -70,7 +69,6 @@ type tlsConfig struct { func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) - utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) utilruntime.Must(routev1.AddToScheme(scheme)) utilruntime.Must(monitoringv1.AddToScheme(scheme)) @@ -248,29 +246,18 @@ func main() { } if os.Getenv("ENABLE_WEBHOOKS") != "false" { - if err = (&otelv1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = otelv1alpha1.SetupCollectorWebhook(mgr, cfg); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") os.Exit(1) } - if err = (&otelv1alpha1.Instrumentation{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{ - otelv1alpha1.AnnotationDefaultAutoInstrumentationJava: autoInstrumentationJava, - otelv1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: autoInstrumentationNodeJS, - otelv1alpha1.AnnotationDefaultAutoInstrumentationPython: autoInstrumentationPython, - otelv1alpha1.AnnotationDefaultAutoInstrumentationDotNet: autoInstrumentationDotNet, - otelv1alpha1.AnnotationDefaultAutoInstrumentationGo: autoInstrumentationGo, - otelv1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: autoInstrumentationApacheHttpd, - otelv1alpha1.AnnotationDefaultAutoInstrumentationNginx: autoInstrumentationNginx}, - }, - }).SetupWebhookWithManager(mgr); err != nil { + if err = otelv1alpha1.SetupInstrumentationWebhook(mgr, cfg); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "Instrumentation") os.Exit(1) } decoder := admission.NewDecoder(mgr.GetScheme()) mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{ - Handler: webhookhandler.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), decoder, mgr.GetClient(), - []webhookhandler.PodMutator{ + Handler: podmutation.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), decoder, mgr.GetClient(), + []podmutation.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("opentelemetry-operator")), }), diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suite_test.go index 9feec9945..cfe28fc28 100644 --- a/pkg/collector/reconcile/suite_test.go +++ b/pkg/collector/reconcile/suite_test.go @@ -135,7 +135,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = v1alpha1.SetupCollectorWebhook(mgr, config.New()); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index 63c5cf493..9496b9f47 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -37,6 +37,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" // +kubebuilder:scaffold:imports ) @@ -48,6 +49,7 @@ var ( cancel context.CancelFunc err error cfg *rest.Config + conf = config.New() ) func TestMain(m *testing.M) { @@ -98,7 +100,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - if err = (&v1alpha1.OpenTelemetryCollector{}).SetupWebhookWithManager(mgr); err != nil { + if err = v1alpha1.SetupCollectorWebhook(mgr, conf); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } diff --git a/pkg/constants/env.go b/pkg/constants/env.go index 0c4070905..93f0e98bf 100644 --- a/pkg/constants/env.go +++ b/pkg/constants/env.go @@ -22,6 +22,15 @@ const ( EnvOTELTracesSampler = "OTEL_TRACES_SAMPLER" EnvOTELTracesSamplerArg = "OTEL_TRACES_SAMPLER_ARG" + InstrumentationPrefix = "instrumentation.opentelemetry.io/" + AnnotationDefaultAutoInstrumentationJava = InstrumentationPrefix + "default-auto-instrumentation-java-image" + AnnotationDefaultAutoInstrumentationNodeJS = InstrumentationPrefix + "default-auto-instrumentation-nodejs-image" + AnnotationDefaultAutoInstrumentationPython = InstrumentationPrefix + "default-auto-instrumentation-python-image" + AnnotationDefaultAutoInstrumentationDotNet = InstrumentationPrefix + "default-auto-instrumentation-dotnet-image" + AnnotationDefaultAutoInstrumentationGo = InstrumentationPrefix + "default-auto-instrumentation-go-image" + AnnotationDefaultAutoInstrumentationApacheHttpd = InstrumentationPrefix + "default-auto-instrumentation-apache-httpd-image" + AnnotationDefaultAutoInstrumentationNginx = InstrumentationPrefix + "default-auto-instrumentation-nginx-image" + EnvPodName = "OTEL_RESOURCE_ATTRIBUTES_POD_NAME" EnvPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID" EnvNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME" diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 49f93d706..0a7878ae1 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" + "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) @@ -191,7 +191,7 @@ func (langInsts *languageInstrumentations) setInstrumentationLanguageContainers( } } -var _ webhookhandler.PodMutator = (*instPodMutator)(nil) +var _ podmutation.PodMutator = (*instPodMutator)(nil) func NewMutator(logger logr.Logger, client client.Client, recorder record.EventRecorder) *instPodMutator { return &instPodMutator{ diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 0b45be4fb..d9dbec6c6 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -20,13 +20,27 @@ import ( "reflect" "github.com/go-logr/logr" + featuregate2 "go.opentelemetry.io/collector/featuregate" "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) +var ( + defaultAnnotationToGate = map[string]*featuregate2.Gate{ + constants.AnnotationDefaultAutoInstrumentationJava: featuregate.EnableJavaAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationNodeJS: featuregate.EnableNodeJSAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationPython: featuregate.EnablePythonAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationDotNet: featuregate.EnableDotnetAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationGo: featuregate.EnableGoAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationApacheHttpd: featuregate.EnableApacheHTTPAutoInstrumentationSupport, + constants.AnnotationDefaultAutoInstrumentationNginx: featuregate.EnableNginxAutoInstrumentationSupport, + } +) + type InstrumentationUpgrade struct { Client client.Client Logger logr.Logger @@ -61,7 +75,7 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { upgraded := u.upgrade(ctx, toUpgrade) if !reflect.DeepEqual(upgraded, toUpgrade) { // use update instead of patch because the patch does not upgrade annotations - if err := u.Client.Update(ctx, &upgraded); err != nil { + if err := u.Client.Update(ctx, upgraded); err != nil { u.Logger.Error(err, "failed to apply changes to instance", "name", upgraded.Name, "namespace", upgraded.Namespace) continue } @@ -74,97 +88,54 @@ func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { return nil } -func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) v1alpha1.Instrumentation { - autoInstJava := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] - if autoInstJava != "" { - if featuregate.EnableJavaAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.Java.Image == autoInstJava { - inst.Spec.Java.Image = u.DefaultAutoInstJava - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava] = u.DefaultAutoInstJava - } - } else { - u.Logger.Error(nil, "support for Java auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Java auto instrumentation is not enabled") - } - } - autoInstNodeJS := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] - if autoInstNodeJS != "" { - if featuregate.EnableNodeJSAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.NodeJS.Image == autoInstNodeJS { - inst.Spec.NodeJS.Image = u.DefaultAutoInstNodeJS - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS] = u.DefaultAutoInstNodeJS - } - } else { - u.Logger.Error(nil, "support for NodeJS auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for NodeJS auto instrumentation is not enabled") - } - } - autoInstPython := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] - if autoInstPython != "" { - if featuregate.EnablePythonAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.Python.Image == autoInstPython { - inst.Spec.Python.Image = u.DefaultAutoInstPython - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython] = u.DefaultAutoInstPython - } - } else { - u.Logger.Error(nil, "support for Python auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Python auto instrumentation is not enabled") - } - } - autoInstDotnet := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] - if autoInstDotnet != "" { - if featuregate.EnableDotnetAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.DotNet.Image == autoInstDotnet { - inst.Spec.DotNet.Image = u.DefaultAutoInstDotNet - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] = u.DefaultAutoInstDotNet - } - } else { - u.Logger.Error(nil, "support for .NET auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for .NET auto instrumentation is not enabled") - } - } - autoInstGo := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo] - if autoInstGo != "" { - if featuregate.EnableGoAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.Go.Image == autoInstGo { - inst.Spec.Go.Image = u.DefaultAutoInstGo - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo] = u.DefaultAutoInstGo - } - } else { - u.Logger.Error(nil, "support for Go auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Go auto instrumentation is not enabled") - } - } - autoInstApacheHttpd := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd] - if autoInstApacheHttpd != "" { - if featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.ApacheHttpd.Image == autoInstApacheHttpd { - inst.Spec.ApacheHttpd.Image = u.DefaultAutoInstApacheHttpd - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd] = u.DefaultAutoInstApacheHttpd - } - } else { - u.Logger.Error(nil, "support for Apache HTTPD auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Apache HTTPD auto instrumentation is not enabled") - } - } - autoInstNginx := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx] - if autoInstNginx != "" { - if featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled() { - // upgrade the image only if the image matches the annotation - if inst.Spec.Nginx.Image == autoInstNginx { - inst.Spec.Nginx.Image = u.DefaultAutoInstNginx - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx] = u.DefaultAutoInstNginx +func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instrumentation) *v1alpha1.Instrumentation { + upgraded := inst.DeepCopy() + for annotation, gate := range defaultAnnotationToGate { + autoInst := upgraded.Annotations[annotation] + if autoInst != "" { + if gate.IsEnabled() { + switch annotation { + case constants.AnnotationDefaultAutoInstrumentationJava: + if inst.Spec.Java.Image == autoInst { + upgraded.Spec.Java.Image = u.DefaultAutoInstJava + upgraded.Annotations[annotation] = u.DefaultAutoInstJava + } + case constants.AnnotationDefaultAutoInstrumentationNodeJS: + if inst.Spec.NodeJS.Image == autoInst { + upgraded.Spec.NodeJS.Image = u.DefaultAutoInstNodeJS + upgraded.Annotations[annotation] = u.DefaultAutoInstNodeJS + } + case constants.AnnotationDefaultAutoInstrumentationPython: + if inst.Spec.Python.Image == autoInst { + upgraded.Spec.Python.Image = u.DefaultAutoInstPython + upgraded.Annotations[annotation] = u.DefaultAutoInstPython + } + case constants.AnnotationDefaultAutoInstrumentationDotNet: + if inst.Spec.DotNet.Image == autoInst { + upgraded.Spec.DotNet.Image = u.DefaultAutoInstDotNet + upgraded.Annotations[annotation] = u.DefaultAutoInstDotNet + } + case constants.AnnotationDefaultAutoInstrumentationGo: + if inst.Spec.Go.Image == autoInst { + upgraded.Spec.Go.Image = u.DefaultAutoInstGo + upgraded.Annotations[annotation] = u.DefaultAutoInstGo + } + case constants.AnnotationDefaultAutoInstrumentationApacheHttpd: + if inst.Spec.ApacheHttpd.Image == autoInst { + upgraded.Spec.ApacheHttpd.Image = u.DefaultAutoInstApacheHttpd + upgraded.Annotations[annotation] = u.DefaultAutoInstApacheHttpd + } + case constants.AnnotationDefaultAutoInstrumentationNginx: + if inst.Spec.Nginx.Image == autoInst { + upgraded.Spec.Nginx.Image = u.DefaultAutoInstNginx + upgraded.Annotations[annotation] = u.DefaultAutoInstNginx + } + } + } else { + u.Logger.Error(nil, "autoinstrumentation not enabled for this language", "flag", gate.ID()) + u.Recorder.Event(upgraded, "Warning", "InstrumentationUpgradeRejected", fmt.Sprintf("support for is not enabled for %s", gate.ID())) } - } else { - u.Logger.Error(nil, "support for Nginx auto instrumentation is not enabled") - u.Recorder.Event(inst.DeepCopy(), "Warning", "InstrumentationUpgradeRejected", "support for Nginx auto instrumentation is not enabled") } } - return inst + return upgraded } diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index f8d989810..e4f6448e4 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -28,6 +28,8 @@ import ( "k8s.io/apimachinery/pkg/types" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) @@ -62,15 +64,6 @@ func TestUpgrade(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "my-inst", Namespace: nsName, - Annotations: map[string]string{ - v1alpha1.AnnotationDefaultAutoInstrumentationJava: "java:1", - v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS: "nodejs:1", - v1alpha1.AnnotationDefaultAutoInstrumentationPython: "python:1", - v1alpha1.AnnotationDefaultAutoInstrumentationDotNet: "dotnet:1", - v1alpha1.AnnotationDefaultAutoInstrumentationGo: "go:1", - v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd: "apache-httpd:1", - v1alpha1.AnnotationDefaultAutoInstrumentationNginx: "nginx:1", - }, }, Spec: v1alpha1.InstrumentationSpec{ Sampler: v1alpha1.Sampler{ @@ -78,7 +71,20 @@ func TestUpgrade(t *testing.T) { }, }, } - inst.Default() + err = v1alpha1.NewInstrumentationWebhook( + logr.Discard(), + testScheme, + config.New( + config.WithAutoInstrumentationJavaImage("java:1"), + config.WithAutoInstrumentationNodeJSImage("nodejs:1"), + config.WithAutoInstrumentationPythonImage("python:1"), + config.WithAutoInstrumentationDotNetImage("dotnet:1"), + config.WithAutoInstrumentationGoImage("go:1"), + config.WithAutoInstrumentationApacheHttpdImage("apache-httpd:1"), + config.WithAutoInstrumentationNginxImage("nginx:1"), + ), + ).Default(context.Background(), inst) + assert.Nil(t, err) assert.Equal(t, "java:1", inst.Spec.Java.Image) assert.Equal(t, "nodejs:1", inst.Spec.NodeJS.Image) assert.Equal(t, "python:1", inst.Spec.Python.Image) @@ -109,18 +115,18 @@ func TestUpgrade(t *testing.T) { Name: "my-inst", }, &updated) require.NoError(t, err) - assert.Equal(t, "java:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationJava]) + assert.Equal(t, "java:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationJava]) assert.Equal(t, "java:2", updated.Spec.Java.Image) - assert.Equal(t, "nodejs:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNodeJS]) + assert.Equal(t, "nodejs:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationNodeJS]) assert.Equal(t, "nodejs:2", updated.Spec.NodeJS.Image) - assert.Equal(t, "python:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPython]) + assert.Equal(t, "python:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationPython]) assert.Equal(t, "python:2", updated.Spec.Python.Image) - assert.Equal(t, "dotnet:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet]) + assert.Equal(t, "dotnet:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationDotNet]) assert.Equal(t, "dotnet:2", updated.Spec.DotNet.Image) - assert.Equal(t, "go:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo]) + assert.Equal(t, "go:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationGo]) assert.Equal(t, "go:2", updated.Spec.Go.Image) - assert.Equal(t, "apache-httpd:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationApacheHttpd]) + assert.Equal(t, "apache-httpd:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationApacheHttpd]) assert.Equal(t, "apache-httpd:2", updated.Spec.ApacheHttpd.Image) - assert.Equal(t, "nginx:2", updated.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationNginx]) + assert.Equal(t, "nginx:2", updated.Annotations[constants.AnnotationDefaultAutoInstrumentationNginx]) assert.Equal(t, "nginx:2", updated.Spec.Nginx.Image) } diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 7f1956e4d..a7a0737b5 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -28,7 +28,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/webhookhandler" + "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" ) var ( @@ -43,7 +43,7 @@ type sidecarPodMutator struct { config config.Config } -var _ webhookhandler.PodMutator = (*sidecarPodMutator)(nil) +var _ podmutation.PodMutator = (*sidecarPodMutator)(nil) func NewMutator(logger logr.Logger, config config.Config, client client.Client) *sidecarPodMutator { return &sidecarPodMutator{ From b546584b6be820cc797cdf604672ef7d5a4c7a9c Mon Sep 17 00:00:00 2001 From: Adriana Villela <50256412+avillela@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:47:51 -0400 Subject: [PATCH 1095/1234] Add diagrams to further enhance Target Allocator documentation - #2229 (#2230) * Add diagrams to further enhance Target Allocator documentation - #2229 * Update cmd/otel-allocator/README.md Co-authored-by: Sebastian Poxhofer * Update cmd/otel-allocator/README.md Co-authored-by: Sebastian Poxhofer * Update TA diagram * Update TA diagram and description * Add mermaid diagrams * Add mermaid diagrams * Remove diagram images (using mermaid instead) --------- Co-authored-by: Sebastian Poxhofer --- .chloggen/avillela-add-ta-diagrams.yaml | 16 ++++++++++ README.md | 7 ++++- cmd/otel-allocator/README.md | 41 ++++++++++++++++++++++--- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .chloggen/avillela-add-ta-diagrams.yaml diff --git a/.chloggen/avillela-add-ta-diagrams.yaml b/.chloggen/avillela-add-ta-diagrams.yaml new file mode 100644 index 000000000..ced661dd4 --- /dev/null +++ b/.chloggen/avillela-add-ta-diagrams.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Documentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add diagrams to Target Allocator Readme. + +# One or more tracking issues related to the change +issues: [2229] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/README.md b/README.md index e930cf372..b463451ec 100644 --- a/README.md +++ b/README.md @@ -531,7 +531,12 @@ If a language is enabled by default its gate only needs to be supplied when disa Language not specified in the table are always supported and cannot be disabled. OpenTelemetry Operator allows to instrument multiple containers using multiple language specific instrumentations. -These feature can be enabled using `operator.autoinstrumentation.multi-instrumentation` flag. By default flag is `disabled`. +These features can be enabled using `operator.autoinstrumentation.multi-instrumentation` flag when installing the Operator via Helm. By default flag is `disabled`. For example: + +```sh +helm install opentelemetry-operator open-telemetry/opentelemetry-operator --set manager.featureGates=operator.autoinstrumentation.multi-instrumentation=enabled +``` + For more information about multi-instrumentation feature capabilities please see [Multi-container pods with multiple instrumentations](#Multi-container-pods-with-multiple-instrumentations). ### Target Allocator diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md index 4eb22a3ec..0f4419e8e 100644 --- a/cmd/otel-allocator/README.md +++ b/cmd/otel-allocator/README.md @@ -11,11 +11,44 @@ The TA serves two functions: ## Even Distribution of Prometheus Targets -The Target Allocator's first job is to discover targets to scrape and collectors to allocate targets to. Then it can distribute the targets it discovers among the collectors. This means that the OTel Collectors collect the metrics instead of a Prometheus [scraper](https://uzxmx.github.io/prometheus-scrape-internals.html). Metrics are ingested by the OTel Collectors by way of the [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). +The Target Allocator’s first job is to discover targets to scrape and OTel Collectors to allocate targets to. Then it can distribute the targets it discovers among the Collectors. The Collectors in turn query the Target Allocator for Metrics endpoints to scrape, and then the Collectors’ [Prometheus Receivers](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) scrape the Metrics targets. + +This means that the OTel Collectors collect the metrics instead of a Prometheus [scraper](https://uzxmx.github.io/prometheus-scrape-internals.html). + + +```mermaid +sequenceDiagram + participant Target Allocator + participant Metrics Targets + participant OTel Collectors + Target Allocator ->>Metrics Targets: 1. Discover Metrics targets + Target Allocator ->>OTel Collectors: 2. Discover available Collectors + Target Allocator ->>Target Allocator: 3. Assign Metrics targets + OTel Collectors ->>Target Allocator: 4. Query TA for Metrics endpoints scrape + OTel Collectors ->>Metrics Targets: 5. Scrape Metrics target +``` ## Discovery of Prometheus Custom Resources -The Target Allocator also provides for the discovery of [Prometheus Operator CRs](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md), namely the [ServiceMonitor and PodMonitor](https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator#target-allocator). The ServiceMonitor and the PodMonitor don’t do any scraping themselves; their purpose is to inform the Target Allocator (or Prometheus) to add a new job to their scrape configuration. These metrics are then ingested by way of the Prometheus Receiver on the OpenTelemetry Collector. +The Target Allocator also provides for the discovery of [Prometheus Operator CRs](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md), namely the [ServiceMonitor and PodMonitor](https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator#target-allocator). The ServiceMonitors and the PodMonitors purpose is to inform the Target Allocator (or PrometheusOperator) to add a new job to their scrape configuration. The Target Allocator then provides the jobs to the OTel Collector [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). + +```mermaid +flowchart RL + pm(PodMonitor) + sm(ServiceMonitor) + ta(Target Allocator) + oc1(OTel Collector) + oc2(OTel Collector) + oc3(OTel Collector) + ta --> pm + ta --> sm + oc1 --> ta + oc2 --> ta + oc3 --> ta + sm ~~~|"1. Discover Prometheus Operator CRs"| sm + ta ~~~|"2. Add job to TA scrape configuration"| ta + oc3 ~~~|"3. Add job to OTel Collector scrape configuration"| oc3 +``` Even though Prometheus is not required to be installed in your Kubernetes cluster to use the Target Allocator for Prometheus CR discovery, the TA does require that the ServiceMonitor and PodMonitor be installed. These CRs are bundled with Prometheus Operator; however, they can be installed standalone as well. @@ -45,14 +78,14 @@ spec: - targets: [ '0.0.0.0:8888' ] exporters: - debug: + logging: service: pipelines: metrics: receivers: [prometheus] processors: [] - exporters: [debug] + exporters: [logging] ``` In essence, Prometheus Receiver configs are overridden with a `http_sd_config` directive that points to the From 573ce2e8a1b972182144348b5bb33070b6459906 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 17 Oct 2023 20:49:54 +0200 Subject: [PATCH 1096/1234] [chore] Revert change in NodeJS autoinstrumentation base image for 0.41.1 (#2239) * Revert change in NodeJS autoinstrumentation base image for 0.41.1 Signed-off-by: Israel Blancas * Fix platforms Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .github/workflows/publish-autoinstrumentation-nodejs.yaml | 2 +- autoinstrumentation/nodejs/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml index 55f7b239d..1fea43e54 100644 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ b/.github/workflows/publish-autoinstrumentation-nodejs.yaml @@ -71,7 +71,7 @@ jobs: uses: docker/build-push-action@v5 with: context: autoinstrumentation/nodejs - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'push' }} build-args: version=${{ env.VERSION }} tags: ${{ steps.meta.outputs.tags }} diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 48f1f9ae7..080eed54c 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -9,7 +9,7 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. -FROM node:20 AS build +FROM node:16 AS build WORKDIR /operator-build COPY . . From bc97bd91a3794a30244954e14362a52165896a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 18 Oct 2023 08:16:21 +0200 Subject: [PATCH 1097/1234] Enable Target Allocator Rewrite by default (#2231) * Enable Target Allocator Rewrite by default * Add test for target allocator rewrite override behaviour --- .chloggen/ta-reload-beta.yaml | 18 ++++++ README.md | 55 ++++-------------- .../collector/config_replace_test.go | 58 ++++++++++++++++--- .../manifests/collector/configmap_test.go | 18 ++++-- .../config_expected_targetallocator.yaml | 22 +++++++ .../testdata/http_sd_config_ta_test.yaml | 25 ++++++++ pkg/featuregate/featuregate.go | 2 +- .../e2e/smoke-targetallocator/00-assert.yaml | 28 +++++++++ 8 files changed, 169 insertions(+), 57 deletions(-) create mode 100755 .chloggen/ta-reload-beta.yaml create mode 100644 internal/manifests/collector/testdata/config_expected_targetallocator.yaml create mode 100644 internal/manifests/collector/testdata/http_sd_config_ta_test.yaml diff --git a/.chloggen/ta-reload-beta.yaml b/.chloggen/ta-reload-beta.yaml new file mode 100755 index 000000000..9d7d342b8 --- /dev/null +++ b/.chloggen/ta-reload-beta.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Enable Target Allocator Rewrite by default + +# One or more tracking issues related to the change +issues: [2208] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + See [the documentation](/README.md#target-allocator) for details. + Use the `--feature-gates=-operator.collector.rewritetargetallocator` command line option to switch back to the old behaviour. diff --git a/README.md b/README.md index b463451ec..56a0bef71 100644 --- a/README.md +++ b/README.md @@ -541,7 +541,7 @@ For more information about multi-instrumentation feature capabilities please see ### Target Allocator -The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator: +The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also rewrite the Prometheus receiver configuration in the CR, so that it uses the deployed target allocator. The following example shows how to get started with the Target Allocator: ```yaml apiVersion: opentelemetry.io/v1alpha1 @@ -579,6 +579,7 @@ spec: processors: [] exporters: [debug] ``` + The usage of `$$` in the replacement keys in the example above is based on the information provided in the Prometheus receiver [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) documentation, which states: `Note: Since the collector configuration supports env variable substitution $ characters in your prometheus configuration are interpreted as environment variables. If you want to use $ characters in your prometheus configuration, you must escape them using $$.` @@ -587,19 +588,10 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con ```yaml receivers: prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - http_sd_configs: - - url: http://collector-with-ta-targetallocator:80/jobs/otel-collector/targets?collector_id=$POD_NAME - metric_relabel_configs: - - action: labeldrop - regex: (id|name) - replacement: $$1 - - action: labelmap - regex: label_(.+) - replacement: $$1 + target_allocator: + endpoint: http://collector-with-ta-targetallocator:80 + interval: 30s + collector_id: $POD_NAME exporters: debug: @@ -612,8 +604,6 @@ Behind the scenes, the OpenTelemetry Operator will convert the Collector’s con exporters: [debug] ``` -Note how the Operator removes any existing service discovery configurations (e.g., `static_configs`, `file_sd_configs`, etc.) from the `scrape_configs` section and adds an `http_sd_configs` configuration pointing to a Target Allocator instance it provisioned. - The OpenTelemetry Operator will also convert the Target Allocator's Prometheus configuration after the reconciliation into the following: ```yaml @@ -631,40 +621,17 @@ The OpenTelemetry Operator will also convert the Target Allocator's Prometheus c regex: label_(.+) replacement: $1 ``` + Note that in this case, the Operator replaces "$$" with a single "$" in the replacement keys. This is because the collector supports environment variable substitution, whereas the TA (Target Allocator) does not. Therefore, to ensure compatibility, the TA configuration should only contain a single "$" symbol. More info on the TargetAllocator can be found [here](cmd/otel-allocator/README.md). -#### Target Allocator config rewriting +#### Using Prometheus Custom Resources for service discovery -Prometheus receiver now has explicit support for acquiring scrape targets from the target allocator. As such, it is now possible to have the -Operator add the necessary target allocator configuration automatically. This feature currently requires the `operator.collector.rewritetargetallocator` feature flag to be enabled. With the flag enabled, the configuration from the previous section would be rendered as: - -```yaml - receivers: - prometheus: - config: - global: - scrape_interval: 1m - scrape_timeout: 10s - evaluation_interval: 1m - target_allocator: - endpoint: http://collector-with-ta-targetallocator:80 - interval: 30s - collector_id: $POD_NAME - - exporters: - debug: - - service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [debug] -``` +The target allocator can use Custom Resources from the prometheus-operator ecosystem, like ServiceMonitors and PodMonitors, for service discovery, performing +a function analogous to that of prometheus-operator itself. This is enabled via the `prometheusCR` section in the Collector CR. -This also allows for a more straightforward collector configuration for target discovery using prometheus-operator CRDs. See below for a minimal example: +See below for a minimal example: ```yaml apiVersion: opentelemetry.io/v1alpha1 diff --git a/internal/manifests/collector/config_replace_test.go b/internal/manifests/collector/config_replace_test.go index 075a2a560..c7ab76750 100644 --- a/internal/manifests/collector/config_replace_test.go +++ b/internal/manifests/collector/config_replace_test.go @@ -20,6 +20,7 @@ import ( "github.com/prometheus/prometheus/discovery/http" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" colfeaturegate "go.opentelemetry.io/collector/featuregate" "gopkg.in/yaml.v2" @@ -32,6 +33,11 @@ func TestPrometheusParser(t *testing.T) { assert.NoError(t, err) t.Run("should update config with http_sd_config", func(t *testing.T) { + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + require.NoError(t, err) + t.Cleanup(func() { + _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + }) actualConfig, err := ReplaceConfig(param.OtelCol) assert.NoError(t, err) @@ -63,11 +69,7 @@ func TestPrometheusParser(t *testing.T) { assert.True(t, cfg.TargetAllocConfig == nil) }) - t.Run("should update config with targetAllocator block", func(t *testing.T) { - err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - param.OtelCol.Spec.TargetAllocator.Enabled = true - assert.NoError(t, err) - + t.Run("should update config with targetAllocator block if block not present", func(t *testing.T) { // Set up the test scenario param.OtelCol.Spec.TargetAllocator.Enabled = true actualConfig, err := ReplaceConfig(param.OtelCol) @@ -87,9 +89,32 @@ func TestPrometheusParser(t *testing.T) { "collector_id": "${POD_NAME}", } assert.Equal(t, expectedTAConfig, promCfgMap["target_allocator"]) + assert.NoError(t, err) + }) + + t.Run("should update config with targetAllocator block if block already present", func(t *testing.T) { + // Set up the test scenario + paramTa, err := newParams("test/test-img", "testdata/http_sd_config_ta_test.yaml") + require.NoError(t, err) + paramTa.OtelCol.Spec.TargetAllocator.Enabled = true + + actualConfig, err := ReplaceConfig(paramTa.OtelCol) + assert.NoError(t, err) - // Disable the feature flag - err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + // Verify the expected changes in the config + promCfgMap, err := ta.ConfigToPromConfig(actualConfig) + assert.NoError(t, err) + + prometheusConfig := promCfgMap["config"].(map[interface{}]interface{}) + + assert.NotContains(t, prometheusConfig, "scrape_configs") + + expectedTAConfig := map[interface{}]interface{}{ + "endpoint": "http://test-targetallocator:80", + "interval": "30s", + "collector_id": "${POD_NAME}", + } + assert.Equal(t, expectedTAConfig, promCfgMap["target_allocator"]) assert.NoError(t, err) }) @@ -145,6 +170,12 @@ func TestReplaceConfig(t *testing.T) { }) t.Run("should rewrite scrape configs with SD config when TargetAllocator is enabled and feature flag is not set", func(t *testing.T) { + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + require.NoError(t, err) + t.Cleanup(func() { + _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + }) + param.OtelCol.Spec.TargetAllocator.Enabled = true expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_expected_with_sd_config.yaml") @@ -156,4 +187,17 @@ func TestReplaceConfig(t *testing.T) { assert.Equal(t, expectedConfig, actualConfig) }) + + t.Run("should remove scrape configs if TargetAllocator is enabled and feature flag is set", func(t *testing.T) { + param.OtelCol.Spec.TargetAllocator.Enabled = true + + expectedConfigBytes, err := os.ReadFile("testdata/config_expected_targetallocator.yaml") + assert.NoError(t, err) + expectedConfig := string(expectedConfigBytes) + + actualConfig, err := ReplaceConfig(param.OtelCol) + assert.NoError(t, err) + + assert.Equal(t, expectedConfig, actualConfig) + }) } diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 37ec3e30e..c256b7c38 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -71,7 +71,12 @@ service: }) - t.Run("should return expected collector config map with http_sd_config", func(t *testing.T) { + t.Run("should return expected collector config map with http_sd_config if rewrite flag disabled", func(t *testing.T) { + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + assert.NoError(t, err) + t.Cleanup(func() { + _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + }) expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" expectedLables["app.kubernetes.io/name"] = "test-collector" @@ -112,7 +117,13 @@ service: }) - t.Run("should return expected escaped collector config map with http_sd_config", func(t *testing.T) { + t.Run("should return expected escaped collector config map with http_sd_config if rewrite flag disabled", func(t *testing.T) { + err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) + assert.NoError(t, err) + t.Cleanup(func() { + _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) + }) + expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" expectedLables["app.kubernetes.io/name"] = "test-collector" expectedLables["app.kubernetes.io/version"] = "latest" @@ -163,8 +174,6 @@ service: expectedLables["app.kubernetes.io/component"] = "opentelemetry-collector" expectedLables["app.kubernetes.io/name"] = "test-collector" expectedLables["app.kubernetes.io/version"] = "latest" - err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - assert.NoError(t, err) expectedData := map[string]string{ "collector.yaml": `exporters: @@ -199,7 +208,6 @@ service: // Reset the value expectedLables["app.kubernetes.io/version"] = "0.47.0" - err = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) assert.NoError(t, err) }) diff --git a/internal/manifests/collector/testdata/config_expected_targetallocator.yaml b/internal/manifests/collector/testdata/config_expected_targetallocator.yaml new file mode 100644 index 000000000..8708b6315 --- /dev/null +++ b/internal/manifests/collector/testdata/config_expected_targetallocator.yaml @@ -0,0 +1,22 @@ +debug: null +exporters: null +processors: null +receivers: + prometheus: + config: + global: + evaluation_interval: 1m + scrape_interval: 1m + scrape_timeout: 10s + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://test-targetallocator:80 + interval: 30s +service: + pipelines: + metrics: + exporters: + - debug + processors: [] + receivers: + - prometheus diff --git a/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml b/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml new file mode 100644 index 000000000..fb4c8e92b --- /dev/null +++ b/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml @@ -0,0 +1,25 @@ +processors: +receivers: + prometheus: + config: + scrape_configs: + - job_name: prometheus + + static_configs: + - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] + labels: + my: label + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://test-sd-targetallocator:80 + interval: 60s + +exporters: + debug: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [debug] diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index b9e6231ec..27eb61f3c 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -78,7 +78,7 @@ var ( // automatically be rewritten when the target allocator is enabled. EnableTargetAllocatorRewrite = featuregate.GlobalRegistry().MustRegister( "operator.collector.rewritetargetallocator", - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether the operator should configure the collector's targetAllocator configuration"), featuregate.WithRegisterFromVersion("v0.76.1"), ) diff --git a/tests/e2e/smoke-targetallocator/00-assert.yaml b/tests/e2e/smoke-targetallocator/00-assert.yaml index f7c6adfef..f46af1dd1 100644 --- a/tests/e2e/smoke-targetallocator/00-assert.yaml +++ b/tests/e2e/smoke-targetallocator/00-assert.yaml @@ -20,6 +20,34 @@ kind: ConfigMap metadata: name: stateful-targetallocator --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: stateful-collector +data: + collector.yaml: | + exporters: + debug: null + processors: null + receivers: + jaeger: + protocols: + grpc: null + prometheus: + config: {} + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://stateful-targetallocator:80 + interval: 30s + service: + pipelines: + traces: + exporters: + - debug + processors: [] + receivers: + - jaeger +--- # Print TA pod logs if test fails apiVersion: kuttl.dev/v1beta1 kind: TestAssert From 19f05f2fb114cfd9ada1de53e045d1c73c2d1893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 18 Oct 2023 08:16:43 +0200 Subject: [PATCH 1098/1234] Add rate limiting for scrape config updates (#2189) * Add rate limiting for scrape config updates * Rename constant to lowercase Co-authored-by: Ben B. --------- Co-authored-by: Ben B. --- .chloggen/ta_update-rate-limit.yaml | 16 ++++ cmd/otel-allocator/watcher/promOperator.go | 66 ++++++++++++-- .../watcher/promOperator_test.go | 86 ++++++++++++++++++- 3 files changed, 159 insertions(+), 9 deletions(-) create mode 100755 .chloggen/ta_update-rate-limit.yaml diff --git a/.chloggen/ta_update-rate-limit.yaml b/.chloggen/ta_update-rate-limit.yaml new file mode 100755 index 000000000..3e2624357 --- /dev/null +++ b/.chloggen/ta_update-rate-limit.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add rate limiting for scrape config updates + +# One or more tracking issues related to the change +issues: [1544] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 9bb219b7b..b687b9604 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -17,6 +17,7 @@ package watcher import ( "context" "fmt" + "time" "github.com/go-kit/log" "github.com/go-logr/logr" @@ -37,6 +38,8 @@ import ( allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" ) +const minEventInterval = time.Second * 5 + func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*PrometheusCRWatcher, error) { mClient, err := monitoringclient.NewForConfig(cfg.ClusterConfig) if err != nil { @@ -79,6 +82,7 @@ func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*Pr k8sClient: clientset, informers: monitoringInformers, stopChannel: make(chan struct{}), + eventInterval: minEventInterval, configGenerator: generator, kubeConfigPath: cfg.KubeConfigFilePath, serviceMonitorSelector: servMonSelector, @@ -91,6 +95,7 @@ type PrometheusCRWatcher struct { kubeMonitoringClient monitoringclient.Interface k8sClient kubernetes.Interface informers map[string]*informers.ForResource + eventInterval time.Duration stopChannel chan struct{} configGenerator *prometheus.ConfigGenerator kubeConfigPath string @@ -126,11 +131,9 @@ func getInformers(factory informers.FactoriesForNamespaces) (map[string]*informe // Watch wrapped informers and wait for an initial sync. func (w *PrometheusCRWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { - event := Event{ - Source: EventSourcePrometheusCR, - Watcher: Watcher(w), - } success := true + // this channel needs to be buffered because notifications are asynchronous and neither producers nor consumers wait + notifyEvents := make(chan struct{}, 1) for name, resource := range w.informers { resource.Start(w.stopChannel) @@ -138,25 +141,74 @@ func (w *PrometheusCRWatcher) Watch(upstreamEvents chan Event, upstreamErrors ch if ok := cache.WaitForNamedCacheSync(name, w.stopChannel, resource.HasSynced); !ok { success = false } + + // only send an event notification if there isn't one already resource.AddEventHandler(cache.ResourceEventHandlerFuncs{ + // these functions only write to the notification channel if it's empty to avoid blocking + // if scrape config updates are being rate-limited AddFunc: func(obj interface{}) { - upstreamEvents <- event + select { + case notifyEvents <- struct{}{}: + default: + } }, UpdateFunc: func(oldObj, newObj interface{}) { - upstreamEvents <- event + select { + case notifyEvents <- struct{}{}: + default: + } }, DeleteFunc: func(obj interface{}) { - upstreamEvents <- event + select { + case notifyEvents <- struct{}{}: + default: + } }, }) } if !success { return fmt.Errorf("failed to sync cache") } + + // limit the rate of outgoing events + w.rateLimitedEventSender(upstreamEvents, notifyEvents) + <-w.stopChannel return nil } +// rateLimitedEventSender sends events to the upstreamEvents channel whenever it gets a notification on the notifyEvents channel, +// but not more frequently than once per w.eventPeriod. +func (w *PrometheusCRWatcher) rateLimitedEventSender(upstreamEvents chan Event, notifyEvents chan struct{}) { + ticker := time.NewTicker(w.eventInterval) + defer ticker.Stop() + + event := Event{ + Source: EventSourcePrometheusCR, + Watcher: Watcher(w), + } + + for { + select { + case <-w.stopChannel: + return + case <-ticker.C: // throttle events to avoid excessive updates + select { + case <-notifyEvents: + select { + case upstreamEvents <- event: + default: // put the notification back in the queue if we can't send it upstream + select { + case notifyEvents <- struct{}{}: + default: + } + } + default: + } + } + } +} + func (w *PrometheusCRWatcher) Close() error { close(w.stopChannel) return nil diff --git a/cmd/otel-allocator/watcher/promOperator_test.go b/cmd/otel-allocator/watcher/promOperator_test.go index aafdfe35c..5aa05c23f 100644 --- a/cmd/otel-allocator/watcher/promOperator_test.go +++ b/cmd/otel-allocator/watcher/promOperator_test.go @@ -30,9 +30,11 @@ import ( "github.com/prometheus/prometheus/discovery" kubeDiscovery "github.com/prometheus/prometheus/discovery/kubernetes" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" ) func TestLoadConfig(t *testing.T) { @@ -244,7 +246,7 @@ func TestLoadConfig(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - w := getTestPrometheuCRWatcher(t, tt.serviceMonitor, tt.podMonitor) + w := getTestPrometheusCRWatcher(t, tt.serviceMonitor, tt.podMonitor) for _, informer := range w.informers { // Start informers in order to populate cache. informer.Start(w.stopChannel) @@ -266,9 +268,89 @@ func TestLoadConfig(t *testing.T) { } } +func TestRateLimit(t *testing.T) { + var err error + serviceMonitor := &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "simple", + Namespace: "test", + }, + Spec: monitoringv1.ServiceMonitorSpec{ + JobLabel: "test", + Endpoints: []monitoringv1.Endpoint{ + { + Port: "web", + }, + }, + }, + } + events := make(chan Event, 1) + eventInterval := 5 * time.Millisecond + + w := getTestPrometheusCRWatcher(t, nil, nil) + defer w.Close() + w.eventInterval = eventInterval + + go func() { + watchErr := w.Watch(events, make(chan error)) + require.NoError(t, watchErr) + }() + // we don't have a simple way to wait for the watch to actually add event handlers to the informer, + // instead, we just update a ServiceMonitor periodically and wait until we get a notification + _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Create(context.Background(), serviceMonitor, metav1.CreateOptions{}) + require.NoError(t, err) + + // wait for cache sync first + for _, informer := range w.informers { + success := cache.WaitForCacheSync(w.stopChannel, informer.HasSynced) + require.True(t, success) + } + + require.Eventually(t, func() bool { + _, createErr := w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) + if createErr != nil { + return false + } + select { + case <-events: + return true + default: + return false + } + }, eventInterval*2, time.Millisecond) + + // it's difficult to measure the rate precisely + // what we do, is send two updates, and then assert that the elapsed time is between eventInterval and 3*eventInterval + startTime := time.Now() + _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) + require.NoError(t, err) + require.Eventually(t, func() bool { + select { + case <-events: + return true + default: + return false + } + }, eventInterval*2, time.Millisecond) + _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) + require.NoError(t, err) + require.Eventually(t, func() bool { + select { + case <-events: + return true + default: + return false + } + }, eventInterval*2, time.Millisecond) + elapsedTime := time.Since(startTime) + assert.Less(t, eventInterval, elapsedTime) + assert.GreaterOrEqual(t, eventInterval*3, elapsedTime) + +} + // getTestPrometheuCRWatcher creates a test instance of PrometheusCRWatcher with fake clients // and test secrets. -func getTestPrometheuCRWatcher(t *testing.T, sm *monitoringv1.ServiceMonitor, pm *monitoringv1.PodMonitor) *PrometheusCRWatcher { +func getTestPrometheusCRWatcher(t *testing.T, sm *monitoringv1.ServiceMonitor, pm *monitoringv1.PodMonitor) *PrometheusCRWatcher { mClient := fakemonitoringclient.NewSimpleClientset() if sm != nil { _, err := mClient.MonitoringV1().ServiceMonitors("test").Create(context.Background(), sm, metav1.CreateOptions{}) From eb765b82f2f8ba1b3e489b20a83faa2ca6f31475 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 18 Oct 2023 11:19:38 -0400 Subject: [PATCH 1099/1234] Prepare 0.87.0 release (#2242) * Prep 0.87.0 release * Fix test * regenerate changelog * Delete that annoying kustomization file * Revert "Delete that annoying kustomization file" This reverts commit cda45abd52d8d3d69b7e777d2bbb1556c60ab297. * Remove only unwanted changes * Update changelog --- .chloggen/avillela-add-ta-diagrams.yaml | 16 --------- .chloggen/codeboten_logging-debug.yaml | 16 --------- ...-scc-to-apache-instrumentation-images.yaml | 16 --------- .chloggen/ibmz-operator.yaml | 16 --------- .chloggen/refactor-bridge-config.yaml | 19 ---------- .chloggen/ta-reload-beta.yaml | 18 ---------- .chloggen/ta_update-rate-limit.yaml | 16 --------- CHANGELOG.md | 36 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- config/manager/kustomization.yaml | 2 +- .../instrumentation-go/02-assert.yaml | 2 +- versions.txt | 12 +++---- 14 files changed, 50 insertions(+), 131 deletions(-) delete mode 100644 .chloggen/avillela-add-ta-diagrams.yaml delete mode 100755 .chloggen/codeboten_logging-debug.yaml delete mode 100755 .chloggen/copy-the-scc-to-apache-instrumentation-images.yaml delete mode 100755 .chloggen/ibmz-operator.yaml delete mode 100755 .chloggen/refactor-bridge-config.yaml delete mode 100755 .chloggen/ta-reload-beta.yaml delete mode 100755 .chloggen/ta_update-rate-limit.yaml diff --git a/.chloggen/avillela-add-ta-diagrams.yaml b/.chloggen/avillela-add-ta-diagrams.yaml deleted file mode 100644 index ced661dd4..000000000 --- a/.chloggen/avillela-add-ta-diagrams.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Documentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add diagrams to Target Allocator Readme. - -# One or more tracking issues related to the change -issues: [2229] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/codeboten_logging-debug.yaml b/.chloggen/codeboten_logging-debug.yaml deleted file mode 100755 index e37123dbc..000000000 --- a/.chloggen/codeboten_logging-debug.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: updating the operator to use the Collector's debug exporter in replacement of the deprecated logging exporter - -# One or more tracking issues related to the change -issues: [2130] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml b/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml deleted file mode 100755 index 62b4249d2..000000000 --- a/.chloggen/copy-the-scc-to-apache-instrumentation-images.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Set the security context for the init containers of the Apache HTTPD instrumentation" - -# One or more tracking issues related to the change -issues: [2050] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ibmz-operator.yaml b/.chloggen/ibmz-operator.yaml deleted file mode 100755 index 84107398b..000000000 --- a/.chloggen/ibmz-operator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Publish operator images for I IBM P/Z (linux/s390x,linux/ppc64le) architectures. - -# One or more tracking issues related to the change -issues: [2215] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/refactor-bridge-config.yaml b/.chloggen/refactor-bridge-config.yaml deleted file mode 100755 index 53538980e..000000000 --- a/.chloggen/refactor-bridge-config.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: OpAMP Bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: This PR simplifies the bridge's configuration and logging by renaming and removing fields. - -# One or more tracking issues related to the change -issues: [1368] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - `components_allowed` => `componentsAllowed` - :x: `protocol` which is now inferred from endpoint - capabilities `[]string` => `map[Capability]bool` for enhanced configuration validation diff --git a/.chloggen/ta-reload-beta.yaml b/.chloggen/ta-reload-beta.yaml deleted file mode 100755 index 9d7d342b8..000000000 --- a/.chloggen/ta-reload-beta.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Enable Target Allocator Rewrite by default - -# One or more tracking issues related to the change -issues: [2208] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - See [the documentation](/README.md#target-allocator) for details. - Use the `--feature-gates=-operator.collector.rewritetargetallocator` command line option to switch back to the old behaviour. diff --git a/.chloggen/ta_update-rate-limit.yaml b/.chloggen/ta_update-rate-limit.yaml deleted file mode 100755 index 3e2624357..000000000 --- a/.chloggen/ta_update-rate-limit.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add rate limiting for scrape config updates - -# One or more tracking issues related to the change -issues: [1544] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8f8dc94..efab8fd45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,42 @@ Changes by Version ================== +## 0.87.0 + +### 🛑 Breaking changes 🛑 + +- `OpAMP Bridge`: This PR simplifies the bridge's configuration and logging by renaming and removing fields. (#1368) + `components_allowed` => `componentsAllowed` + :x: `protocol` which is now inferred from endpoint + capabilities `[]string` => `map[Capability]bool` for enhanced configuration validation +- `operator`: Enable Target Allocator Rewrite by default (#2208) + See [the documentation](/README.md#target-allocator) for details. + Use the `--feature-gates=-operator.collector.rewritetargetallocator` command line option to switch back to the old behaviour. + + +### 💡 Enhancements 💡 + +- `operator`: updating the operator to use the Collector's debug exporter in replacement of the deprecated logging exporter (#2130) +- `operator`: Publish operator images for I IBM P/Z (linux/s390x,linux/ppc64le) architectures. (#2215) +- `Documentation`: Add diagrams to Target Allocator Readme. (#2229) +- `target allocator`: Add rate limiting for scrape config updates (#1544) + +### 🧰 Bug fixes 🧰 + +- `operator`: Set the security context for the init containers of the Apache HTTPD instrumentation (#2050) + +### Components + +* [OpenTelemetry Collector - v0.87.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.87.0) +* [OpenTelemetry Contrib - v0.87.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.87.0) +* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) +* [.NET auto-instrumentation - 1.0.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.2) +* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) +* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) +* [Go - v0.7.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.7.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) +* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] + ## 0.86.0 ### 🛑 Breaking changes 🛑 diff --git a/README.md b/README.md index 56a0bef71..678ee68ca 100644 --- a/README.md +++ b/README.md @@ -682,6 +682,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.87.0 | v1.23 to v1.28 | v1 | | v0.86.0 | v1.23 to v1.28 | v1 | | v0.85.0 | v1.19 to v1.28 | v1 | | v0.84.0 | v1.19 to v1.28 | v1 | @@ -704,7 +705,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.67.0 | v1.19 to v1.25 | v1 | | v0.66.0 | v1.19 to v1.25 | v1 | | v0.64.1 | v1.19 to v1.25 | v1 | -| v0.63.1 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index a752aeda2..40d1ebf83 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.87.0 | @TylerHelmuth | | v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | | v0.92.0 | @pavolloffay | | v0.93.0 | @VineethReddy02 | +| v0.94.0 | @TylerHelmuth | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 51cc346d1..cf7b9febf 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-10-09T11:59:54Z" + createdAt: "2023-10-17T18:16:13Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.86.0 + name: opentelemetry-operator.v0.87.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -300,7 +300,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.86.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.87.0 livenessProbe: httpGet: path: /healthz @@ -408,7 +408,7 @@ spec: minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community - version: 0.86.0 + version: 0.87.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2e6cc7976..5c5f0b84c 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml \ No newline at end of file +- manager.yaml diff --git a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml index a4ea68f7a..c7b1fdeb9 100644 --- a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml @@ -19,7 +19,7 @@ spec: requests: cpu: "50m" memory: "32Mi" - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.3.0-alpha + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.7.0-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE value: /usr/src/app/productcatalogservice diff --git a/versions.txt b/versions.txt index 329ab6e1e..a78e3553f 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.86.0 +opentelemetry-collector=0.87.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.86.0 +operator=0.87.0 # Represents the current release of the Target Allocator. -targetallocator=0.86.0 +targetallocator=0.87.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.86.0 +operator-opamp-bridge=0.87.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -30,12 +30,12 @@ autoinstrumentation-python=0.41b0 autoinstrumentation-dotnet=1.0.2 # Represents the current release of Go instrumentation. -autoinstrumentation-go=v0.3.0-alpha +autoinstrumentation-go=v0.7.0-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt autoinstrumentation-apache-httpd=1.0.3 -# Represents the current release of Apache HTTPD instrumentation. +# Represents the current release of Apache Nginx instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt autoinstrumentation-nginx=1.0.3 \ No newline at end of file From 9ce97a94371120b8ba308a852cbf2882f889aa83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:25:43 +0200 Subject: [PATCH 1100/1234] Bump the kubernetes group with 5 updates (#2249) Bumps the kubernetes group with 5 updates: | Package | From | To | | --- | --- | --- | | [k8s.io/api](https://github.com/kubernetes/api) | `0.28.2` | `0.28.3` | | [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.28.2` | `0.28.3` | | [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.28.2` | `0.28.3` | | [k8s.io/kubectl](https://github.com/kubernetes/kubectl) | `0.28.2` | `0.28.3` | | [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) | `0.16.2` | `0.16.3` | Updates `k8s.io/api` from 0.28.2 to 0.28.3 - [Commits](https://github.com/kubernetes/api/compare/v0.28.2...v0.28.3) Updates `k8s.io/client-go` from 0.28.2 to 0.28.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.2...v0.28.3) Updates `k8s.io/component-base` from 0.28.2 to 0.28.3 - [Commits](https://github.com/kubernetes/component-base/compare/v0.28.2...v0.28.3) Updates `k8s.io/kubectl` from 0.28.2 to 0.28.3 - [Commits](https://github.com/kubernetes/kubectl/compare/v0.28.2...v0.28.3) Updates `sigs.k8s.io/controller-runtime` from 0.16.2 to 0.16.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.2...v0.16.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/component-base dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 2bbe434ec..2fc436fcb 100644 --- a/go.mod +++ b/go.mod @@ -18,14 +18,14 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.19.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.2 - k8s.io/apiextensions-apiserver v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 - k8s.io/component-base v0.28.2 - k8s.io/kubectl v0.28.2 + k8s.io/api v0.28.3 + k8s.io/apiextensions-apiserver v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 + k8s.io/component-base v0.28.3 + k8s.io/kubectl v0.28.3 k8s.io/utils v0.0.0-20230726121419-3b25d923346b - sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/controller-runtime v0.16.3 ) require ( @@ -57,7 +57,7 @@ require ( github.com/docker/docker v24.0.4+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/go-control-plane v0.11.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect diff --git a/go.sum b/go.sum index 3f676124e..1c7c5d550 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -920,29 +920,29 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM= -k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64= +k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= +k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= -sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 78c1d2aa12ba50fc725493fc50a534f851cfeda8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:27:00 +0200 Subject: [PATCH 1101/1234] Bump github.com/prometheus/common in /cmd/otel-allocator (#2248) Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.44.0 to 0.45.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](https://github.com/prometheus/common/compare/v0.44.0...v0.45.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 99f1d6290..3ad2273e9 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 github.com/prometheus/client_golang v1.17.0 - github.com/prometheus/common v0.44.0 + github.com/prometheus/common v0.45.0 github.com/prometheus/prometheus v0.47.2 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -135,7 +135,7 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect github.com/miekg/dns v1.1.55 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 44f98951c..8040efb28 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -506,8 +506,8 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= @@ -600,8 +600,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= From fc990f40d38a9a2cce3c1251328f71a7a57a1a8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:24:44 +0200 Subject: [PATCH 1102/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 3 updates (#2245) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 3 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/client-go](https://github.com/kubernetes/client-go) and [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Updates `k8s.io/apimachinery` from 0.28.2 to 0.28.3 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.2...v0.28.3) Updates `k8s.io/client-go` from 0.28.2 to 0.28.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.2...v0.28.3) Updates `sigs.k8s.io/controller-runtime` from 0.16.2 to 0.16.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.2...v0.16.3) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 14 +++++++------- cmd/operator-opamp-bridge/go.sum | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index bbd0f4844..01aeea28d 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -18,10 +18,10 @@ require ( go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/controller-runtime v0.16.3 ) require ( @@ -29,7 +29,7 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -85,9 +85,9 @@ require ( google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/api v0.28.2 // indirect - k8s.io/apiextensions-apiserver v0.28.2 // indirect - k8s.io/component-base v0.28.2 // indirect + k8s.io/api v0.28.3 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index e842beb5c..21425156b 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -11,8 +11,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -250,24 +250,24 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= -sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From 41295b4413a3e960fb8eb2ead00094440fc34ae6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:25:04 +0200 Subject: [PATCH 1103/1234] Bump the kubernetes group in /cmd/otel-allocator with 3 updates (#2247) Bumps the kubernetes group in /cmd/otel-allocator with 3 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/client-go](https://github.com/kubernetes/client-go) and [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Updates `k8s.io/api` from 0.28.2 to 0.28.3 - [Commits](https://github.com/kubernetes/api/compare/v0.28.2...v0.28.3) Updates `k8s.io/client-go` from 0.28.2 to 0.28.3 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.2...v0.28.3) Updates `sigs.k8s.io/controller-runtime` from 0.16.2 to 0.16.3 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.16.2...v0.16.3) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 12 ++++++------ cmd/otel-allocator/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 3ad2273e9..e732a6742 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -22,11 +22,11 @@ require ( github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 + k8s.io/api v0.28.3 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 k8s.io/klog/v2 v2.100.1 - sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/controller-runtime v0.16.3 ) require ( @@ -194,8 +194,8 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/apiextensions-apiserver v0.28.1 // indirect - k8s.io/component-base v0.28.1 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 8040efb28..2874881e8 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1105,16 +1105,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.1 h1:l2ThkBRjrWpw4f24uq0Da2HaEgqJZ7pcgiEUTKSmQZw= -k8s.io/apiextensions-apiserver v0.28.1/go.mod h1:sVvrI+P4vxh2YBBcm8n2ThjNyzU4BQGilCQ/JAY5kGs= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= -k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= @@ -1125,8 +1125,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= -sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= From fbd620c7302460ccd9f9a0b93fcab7ab85f1bfe9 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:24:25 +0200 Subject: [PATCH 1104/1234] Fixed Labels with sha256 image ref (#2238) * Fixed Labels with sha256 image ref Signed-off-by: Yuri Sa * Fixed Labels with sha256 image ref Signed-off-by: Yuri Sa * Added required unit tests Signed-off-by: Yuri Sa * Added required unit tests Signed-off-by: Yuri Sa * Changed unit tests Signed-off-by: Yuri Sa * Changed unit tests Signed-off-by: Yuri Sa * Changed unit tests Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/bug-fix-labeling-process.yaml | 16 +++++++++ internal/manifests/collector/labels.go | 15 ++++++-- internal/manifests/collector/labels_test.go | 38 +++++++++++++++++++++ tests/e2e/smoke-pod-labels/00-assert.yaml | 12 +++++++ tests/e2e/smoke-pod-labels/00-install.yaml | 30 ++++++++++++++++ 5 files changed, 108 insertions(+), 3 deletions(-) create mode 100755 .chloggen/bug-fix-labeling-process.yaml create mode 100644 tests/e2e/smoke-pod-labels/00-assert.yaml create mode 100644 tests/e2e/smoke-pod-labels/00-install.yaml diff --git a/.chloggen/bug-fix-labeling-process.yaml b/.chloggen/bug-fix-labeling-process.yaml new file mode 100755 index 000000000..da7f9219c --- /dev/null +++ b/.chloggen/bug-fix-labeling-process.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fixed the labeling process which was broken at the moment to capture the current image tag when the users set the sha256 reference. + +# One or more tracking issues related to the change +issues: [1982] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: "" diff --git a/internal/manifests/collector/labels.go b/internal/manifests/collector/labels.go index d6aaa8ed4..ca586d8b0 100644 --- a/internal/manifests/collector/labels.go +++ b/internal/manifests/collector/labels.go @@ -33,6 +33,7 @@ func isFilteredLabel(label string, filterLabels []string) bool { // Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels []string) map[string]string { + var versionLabel string // new map every time, so that we don't touch the instance's label base := map[string]string{} if nil != instance.Labels { @@ -48,9 +49,17 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels } version := strings.Split(instance.Spec.Image, ":") - if len(version) > 1 { - base["app.kubernetes.io/version"] = version[len(version)-1] - } else { + for _, v := range version { + if strings.HasSuffix(v, "@sha256") { + versionLabel = strings.TrimSuffix(v, "@sha256") + } + } + switch lenVersion := len(version); lenVersion { + case 3: + base["app.kubernetes.io/version"] = versionLabel + case 2: + base["app.kubernetes.io/version"] = naming.Truncate("%s", 63, version[len(version)-1]) + default: base["app.kubernetes.io/version"] = "latest" } diff --git a/internal/manifests/collector/labels_test.go b/internal/manifests/collector/labels_test.go index 222dec7cf..a2bb7629c 100644 --- a/internal/manifests/collector/labels_test.go +++ b/internal/manifests/collector/labels_test.go @@ -49,7 +49,45 @@ func TestLabelsCommonSet(t *testing.T) { assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) } +func TestLabelsSha256Set(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: collectorName, + Namespace: collectorNamespace, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + }, + } + // test + labels := Labels(otelcol, collectorName, []string{}) + assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b53", labels["app.kubernetes.io/version"]) + assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) + + // prepare + otelcolTag := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: collectorName, + Namespace: collectorNamespace, + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.81.0@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + }, + } + + // test + labelsTag := Labels(otelcolTag, collectorName, []string{}) + assert.Equal(t, "opentelemetry-operator", labelsTag["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labelsTag["app.kubernetes.io/instance"]) + assert.Equal(t, "0.81.0", labelsTag["app.kubernetes.io/version"]) + assert.Equal(t, "opentelemetry", labelsTag["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-collector", labelsTag["app.kubernetes.io/component"]) +} func TestLabelsTagUnset(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ diff --git a/tests/e2e/smoke-pod-labels/00-assert.yaml b/tests/e2e/smoke-pod-labels/00-assert.yaml new file mode 100644 index 000000000..8bb507544 --- /dev/null +++ b/tests/e2e/smoke-pod-labels/00-assert.yaml @@ -0,0 +1,12 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: testlabel-collector + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: testlabel-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: a0c6dea261b3d794971c23c5665173a39f0ce2aa09b9d88b753bd46776d7b05 +status: + readyReplicas: 1 diff --git a/tests/e2e/smoke-pod-labels/00-install.yaml b/tests/e2e/smoke-pod-labels/00-install.yaml new file mode 100644 index 000000000..00843cf43 --- /dev/null +++ b/tests/e2e/smoke-pod-labels/00-install.yaml @@ -0,0 +1,30 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: testlabel +spec: + image: otel/opentelemetry-collector-contrib@sha256:a0c6dea261b3d794971c23c5665173a39f0ce2aa09b9d88b753bd46776d7b05b + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] From 55f19a06d1f4613a9265eb762675e585d7024c53 Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:25:53 +0200 Subject: [PATCH 1105/1234] Update the OpenTelemetry Java agent version to 1.31.0 (#2220) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 034552a83..34aae156b 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.30.0 +1.31.0 From 6cc60bde2a3093100c8deadbfea93eaf545cec08 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Fri, 20 Oct 2023 21:04:33 +0530 Subject: [PATCH 1106/1234] make label functions generic (#2254) --- internal/manifests/collector/collector.go | 4 ++++ internal/manifests/collector/configmap.go | 3 ++- internal/manifests/collector/daemonset.go | 5 ++-- internal/manifests/collector/deployment.go | 5 ++-- .../collector/horizontalpodautoscaler.go | 3 ++- .../collector/poddisruptionbudget.go | 3 ++- internal/manifests/collector/service.go | 9 ++++---- internal/manifests/collector/service_test.go | 5 ++-- .../manifests/collector/serviceaccount.go | 3 ++- internal/manifests/collector/statefulset.go | 5 ++-- .../{collector => manifestutils}/labels.go | 21 ++++++++--------- .../labels_test.go | 23 +++++++++++-------- .../manifests/targetallocator/configmap.go | 3 ++- internal/status/collector.go | 3 ++- 14 files changed, 57 insertions(+), 38 deletions(-) rename internal/manifests/{collector => manifestutils}/labels.go (80%) rename internal/manifests/{collector => manifestutils}/labels_test.go (83%) diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 25309db37..f33f47926 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -22,6 +22,10 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) +const ( + ComponentOpenTelemetryCollector = "opentelemetry-collector" +) + // Build creates the manifest for the collector resource. func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index cdf2bdb7c..47a5967c4 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -19,12 +19,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func ConfigMap(params manifests.Params) *corev1.ConfigMap { name := naming.ConfigMap(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) replacedConf, err := ReplaceConfig(params.OtelCol) if err != nil { diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index ab663d8ac..04da2faef 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -20,13 +20,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // DaemonSet builds the deployment for the given instance. func DaemonSet(params manifests.Params) *appsv1.DaemonSet { name := naming.Collector(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -39,7 +40,7 @@ func DaemonSet(params manifests.Params) *appsv1.DaemonSet { }, Spec: appsv1.DaemonSetSpec{ Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index d18681936..3a1b0abf2 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -20,13 +20,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Deployment builds the deployment for the given instance. func Deployment(params manifests.Params) *appsv1.Deployment { name := naming.Collector(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -41,7 +42,7 @@ func Deployment(params manifests.Params) *appsv1.Deployment { Spec: appsv1.DeploymentSpec{ Replicas: params.OtelCol.Spec.Replicas, Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index d4915b8f4..0a4bdefcc 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -22,12 +22,13 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func HorizontalPodAutoscaler(params manifests.Params) client.Object { name := naming.Collector(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) var result client.Object diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go index 8e9e64803..bbd3ce50a 100644 --- a/internal/manifests/collector/poddisruptionbudget.go +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -20,6 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -31,7 +32,7 @@ func PodDisruptionBudget(params manifests.Params) client.Object { } name := naming.Collector(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) objectMeta := metav1.ObjectMeta{ diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index e26f45ef0..1ddd1ce13 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -25,6 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -58,7 +59,7 @@ func HeadlessService(params manifests.Params) *corev1.Service { func MonitoringService(params manifests.Params) *corev1.Service { name := naming.MonitoringService(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) c, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) // TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 @@ -81,7 +82,7 @@ func MonitoringService(params manifests.Params) *corev1.Service { Annotations: params.OtelCol.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: SelectorLabels(params.OtelCol), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), ClusterIP: "", Ports: []corev1.ServicePort{{ Name: "monitoring", @@ -93,7 +94,7 @@ func MonitoringService(params manifests.Params) *corev1.Service { func Service(params manifests.Params) *corev1.Service { name := naming.Service(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) configFromString, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) if err != nil { @@ -151,7 +152,7 @@ func Service(params manifests.Params) *corev1.Service { }, Spec: corev1.ServiceSpec{ InternalTrafficPolicy: &trafficPolicy, - Selector: SelectorLabels(params.OtelCol), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index fc2bcbfbf..a3a298b6f 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -22,6 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -207,7 +208,7 @@ func service(name string, ports []v1.ServicePort) v1.Service { func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { params := deploymentParams() - labels := Labels(params.OtelCol, name, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) return v1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -218,7 +219,7 @@ func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, inter }, Spec: v1.ServiceSpec{ InternalTrafficPolicy: &internalTrafficPolicy, - Selector: SelectorLabels(params.OtelCol), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index 243885d7f..19af01244 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -20,6 +20,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -35,7 +36,7 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { name := naming.ServiceAccount(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index 85afb33cc..a08304807 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -20,13 +20,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // StatefulSet builds the statefulset for the given instance. func StatefulSet(params manifests.Params) *appsv1.StatefulSet { name := naming.Collector(params.OtelCol.Name) - labels := Labels(params.OtelCol, name, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -41,7 +42,7 @@ func StatefulSet(params manifests.Params) *appsv1.StatefulSet { Spec: appsv1.StatefulSetSpec{ ServiceName: naming.Service(params.OtelCol.Name), Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/labels.go b/internal/manifests/manifestutils/labels.go similarity index 80% rename from internal/manifests/collector/labels.go rename to internal/manifests/manifestutils/labels.go index ca586d8b0..cfcf3d243 100644 --- a/internal/manifests/collector/labels.go +++ b/internal/manifests/manifestutils/labels.go @@ -12,13 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -package collector +package manifestutils import ( "regexp" "strings" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -27,12 +28,11 @@ func isFilteredLabel(label string, filterLabels []string) bool { match, _ := regexp.MatchString(pattern, label) return match } - return false } -// Labels return the common labels to all objects that are part of a managed OpenTelemetryCollector. -func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels []string) map[string]string { +// Labels return the common labels to all objects that are part of a managed CR. +func Labels(instance metav1.ObjectMeta, name string, image string, component string, filterLabels []string) map[string]string { var versionLabel string // new map every time, so that we don't touch the instance's label base := map[string]string{} @@ -44,11 +44,11 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels } } - for k, v := range SelectorLabels(instance) { + for k, v := range SelectorLabels(instance, component) { base[k] = v } - version := strings.Split(instance.Spec.Image, ":") + version := strings.Split(image, ":") for _, v := range version { if strings.HasSuffix(v, "@sha256") { versionLabel = strings.TrimSuffix(v, "@sha256") @@ -67,18 +67,17 @@ func Labels(instance v1alpha1.OpenTelemetryCollector, name string, filterLabels if _, ok := base["app.kubernetes.io/name"]; !ok { base["app.kubernetes.io/name"] = name } - return base } -// SelectorLabels return the common labels to all objects that are part of a managed OpenTelemetryCollector to use as selector. +// SelectorLabels return the common labels to all objects that are part of a managed CR to use as selector. // Selector labels are immutable for Deployment, StatefulSet and DaemonSet, therefore, no labels in selector should be // expected to be modified for the lifetime of the object. -func SelectorLabels(instance v1alpha1.OpenTelemetryCollector) map[string]string { +func SelectorLabels(instance metav1.ObjectMeta, component string) map[string]string { return map[string]string{ "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/instance": naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name), "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/component": component, } } diff --git a/internal/manifests/collector/labels_test.go b/internal/manifests/manifestutils/labels_test.go similarity index 83% rename from internal/manifests/collector/labels_test.go rename to internal/manifests/manifestutils/labels_test.go index a2bb7629c..4a0bd794d 100644 --- a/internal/manifests/collector/labels_test.go +++ b/internal/manifests/manifestutils/labels_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package collector_test +package manifestutils import ( "testing" @@ -21,7 +21,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" ) const ( @@ -42,7 +41,7 @@ func TestLabelsCommonSet(t *testing.T) { } // test - labels := Labels(otelcol, collectorName, []string{}) + labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "0.47.0", labels["app.kubernetes.io/version"]) @@ -62,7 +61,7 @@ func TestLabelsSha256Set(t *testing.T) { } // test - labels := Labels(otelcol, collectorName, []string{}) + labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b53", labels["app.kubernetes.io/version"]) @@ -81,7 +80,7 @@ func TestLabelsSha256Set(t *testing.T) { } // test - labelsTag := Labels(otelcolTag, collectorName, []string{}) + labelsTag := Labels(otelcolTag.ObjectMeta, collectorName, otelcolTag.Spec.Image, "opentelemetry-collector", []string{}) assert.Equal(t, "opentelemetry-operator", labelsTag["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labelsTag["app.kubernetes.io/instance"]) assert.Equal(t, "0.81.0", labelsTag["app.kubernetes.io/version"]) @@ -101,7 +100,7 @@ func TestLabelsTagUnset(t *testing.T) { } // test - labels := Labels(otelcol, collectorName, []string{}) + labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) @@ -118,10 +117,13 @@ func TestLabelsPropagateDown(t *testing.T) { "app.kubernetes.io/name": "test", }, }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + }, } // test - labels := Labels(otelcol, collectorName, []string{}) + labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) // verify assert.Len(t, labels, 7) @@ -134,10 +136,13 @@ func TestLabelsFilter(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"test.bar.io": "foo", "test.foo.io": "bar"}, }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + }, } // This requires the filter to be in regex match form and not the other simpler wildcard one. - labels := Labels(otelcol, collectorName, []string{".*.bar.io"}) + labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{".*.bar.io"}) // verify assert.Len(t, labels, 7) @@ -158,7 +163,7 @@ func TestSelectorLabels(t *testing.T) { } // test - result := SelectorLabels(otelcol) + result := SelectorLabels(otelcol.ObjectMeta, "opentelemetry-collector") // verify assert.Equal(t, expected, result) diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index 8cf40802a..5e46209d4 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -24,6 +24,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -51,7 +52,7 @@ func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { taConfig := make(map[interface{}]interface{}) prometheusCRConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = collector.SelectorLabels(params.OtelCol) + taConfig["label_selector"] = manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, collector.ComponentOpenTelemetryCollector) // We only take the "config" from the returned object, if it's present if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { taConfig["config"] = prometheusConfig diff --git a/internal/status/collector.go b/internal/status/collector.go index 20699bda3..8e18b08b1 100644 --- a/internal/status/collector.go +++ b/internal/status/collector.go @@ -25,6 +25,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" "github.com/open-telemetry/opentelemetry-operator/internal/version" ) @@ -44,7 +45,7 @@ func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1al name := naming.Collector(changed.Name) // Set the scale selector - labels := collector.Labels(*changed, name, []string{}) + labels := manifestutils.Labels(changed.ObjectMeta, name, changed.Spec.Image, collector.ComponentOpenTelemetryCollector, []string{}) selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) if err != nil { return fmt.Errorf("failed to get selector for labelSelector: %w", err) From c7a96ac6b177b7e267147fb51d5ba6376e5a317c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:38:38 -0400 Subject: [PATCH 1107/1234] Bump github.com/fsnotify/fsnotify in /cmd/otel-allocator (#2256) Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/fsnotify/fsnotify/releases) - [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md) - [Commits](https://github.com/fsnotify/fsnotify/compare/v1.6.0...v1.7.0) --- updated-dependencies: - dependency-name: github.com/fsnotify/fsnotify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index e732a6742..82671806f 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.2.0 - github.com/fsnotify/fsnotify v1.6.0 + github.com/fsnotify/fsnotify v1.7.0 github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.9.1 github.com/go-kit/log v0.2.1 diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 2874881e8..1746c0de9 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -174,8 +174,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -889,7 +889,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 565ef40302d778d01f399e224b8c79cba91c8893 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Wed, 25 Oct 2023 09:36:14 +0200 Subject: [PATCH 1108/1234] Bump NodeJS autoinstrumentation dependencies (#2241) * Revert change in NodeJS autoinstrumentation base image for 0.41.1 Signed-off-by: Israel Blancas * Bump NodeJS autoinstrumentation dependencies Signed-off-by: Israel Blancas * Increase the default volume size Signed-off-by: Israel Blancas * Add docs Signed-off-by: Israel Blancas * Fix test Signed-off-by: Israel Blancas * Add changelog Signed-off-by: Israel Blancas * Remove new architectures Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- .chloggen/bump-nodejs-dependencies.yaml | 16 +++++++++++++ apis/v1alpha1/instrumentation_types.go | 14 +++++------ autoinstrumentation/nodejs/Dockerfile | 2 +- autoinstrumentation/nodejs/package.json | 24 +++++++++---------- .../opentelemetry.io_instrumentations.yaml | 14 +++++------ .../opentelemetry.io_instrumentations.yaml | 14 +++++------ docs/api.md | 14 +++++------ pkg/instrumentation/helper.go | 2 +- pkg/instrumentation/sdk_test.go | 2 +- 9 files changed, 59 insertions(+), 43 deletions(-) create mode 100755 .chloggen/bump-nodejs-dependencies.yaml diff --git a/.chloggen/bump-nodejs-dependencies.yaml b/.chloggen/bump-nodejs-dependencies.yaml new file mode 100755 index 000000000..ef803b5bf --- /dev/null +++ b/.chloggen/bump-nodejs-dependencies.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Bump NodeJS dependencies. Also, increase the size of the default size for the volume used to copy the autoinstrumentation libraries from 150M to 200M" + +# One or more tracking issues related to the change +issues: [2240, 2237] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 63ccea7f1..0f3abf420 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -121,7 +121,7 @@ type Java struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines java specific env vars. There are four layers for env vars' definitions and @@ -142,7 +142,7 @@ type NodeJS struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines nodejs specific env vars. There are four layers for env vars' definitions and @@ -163,7 +163,7 @@ type Python struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines python specific env vars. There are four layers for env vars' definitions and @@ -184,7 +184,7 @@ type DotNet struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines DotNet specific env vars. There are four layers for env vars' definitions and @@ -203,7 +203,7 @@ type Go struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines Go specific env vars. There are four layers for env vars' definitions and @@ -224,7 +224,7 @@ type ApacheHttpd struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and @@ -260,7 +260,7 @@ type Nginx struct { Image string `json:"image,omitempty"` // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. - // The default size is 150Mi. + // The default size is 200Mi. VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` // Env defines Nginx specific env vars. There are four layers for env vars' definitions and diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile index 080eed54c..48f1f9ae7 100644 --- a/autoinstrumentation/nodejs/Dockerfile +++ b/autoinstrumentation/nodejs/Dockerfile @@ -9,7 +9,7 @@ # - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` # - For auto-instrumentation by container injection, the Linux command cp is # used and must be availabe in the image. -FROM node:16 AS build +FROM node:20 AS build WORKDIR /operator-build COPY . . diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index ed01e7828..733e4bf02 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,17 +14,17 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.4.1", - "@opentelemetry/auto-instrumentations-node": "0.38.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.41.1", - "@opentelemetry/exporter-prometheus": "0.41.1", - "@opentelemetry/exporter-trace-otlp-grpc": "0.41.1", - "@opentelemetry/resource-detector-alibaba-cloud": "0.28.0", - "@opentelemetry/resource-detector-aws": "1.3.0", - "@opentelemetry/resource-detector-container": "0.3.0", - "@opentelemetry/resource-detector-gcp": "0.29.0", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-metrics": "1.15.1", - "@opentelemetry/sdk-node": "0.41.1" + "@opentelemetry/api": "1.6.0", + "@opentelemetry/auto-instrumentations-node": "0.39.4", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.44.0", + "@opentelemetry/exporter-prometheus": "0.44.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.44.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.28.2", + "@opentelemetry/resource-detector-aws": "1.3.2", + "@opentelemetry/resource-detector-container": "0.3.2", + "@opentelemetry/resource-detector-gcp": "0.29.2", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-node": "0.44.0" } } diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml index 8df533951..be914a75c 100644 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ b/bundle/manifests/opentelemetry.io_instrumentations.yaml @@ -333,7 +333,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -500,7 +500,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -777,7 +777,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -945,7 +945,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1225,7 +1225,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1392,7 +1392,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1576,7 +1576,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml index 8708a1830..d54c45347 100644 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ b/config/crd/bases/opentelemetry.io_instrumentations.yaml @@ -331,7 +331,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -498,7 +498,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -775,7 +775,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -943,7 +943,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1223,7 +1223,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1390,7 +1390,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -1574,7 +1574,7 @@ spec: - type: integer - type: string description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. + for auto-instrumentation. The default size is 200Mi. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object diff --git a/docs/api.md b/docs/api.md index 67a166ecf..19fe5acfd 100644 --- a/docs/api.md +++ b/docs/api.md @@ -235,7 +235,7 @@ ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -844,7 +844,7 @@ DotNet defines configuration for DotNet auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -1480,7 +1480,7 @@ Go defines configuration for Go auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -1843,7 +1843,7 @@ Java defines configuration for java auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -2220,7 +2220,7 @@ Nginx defines configuration for Nginx auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -2829,7 +2829,7 @@ NodeJS defines configuration for nodejs auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false @@ -3192,7 +3192,7 @@ Python defines configuration for python auto-instrumentation. volumeLimitSize int or string - VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 150Mi.
+ VolumeSizeLimit defines size limit for volume used for auto-instrumentation. The default size is 200Mi.
false diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 03f462e22..8306f773a 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -27,7 +27,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) -var defaultSize = resource.MustParse("150Mi") +var defaultSize = resource.MustParse("200Mi") // Calculate if we already inject InitContainers. func isInitContainerMissing(pod corev1.Pod, containerName string) bool { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 531cee962..af34d0df3 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -31,7 +31,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) -var defaultVolumeLimitSize = resource.MustParse("150Mi") +var defaultVolumeLimitSize = resource.MustParse("200Mi") var testResourceRequirements = corev1.ResourceRequirements{ Limits: corev1.ResourceList{ From af3e9cec2ae9cf998547981123ccc1688a0edd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81ach?= Date: Wed, 25 Oct 2023 09:36:52 +0200 Subject: [PATCH 1109/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 (#2252) * bump otel dotnet auto to 1.1.0 * set issue --- .chloggen/bump-dotnet-1.1.0.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/bump-dotnet-1.1.0.yaml diff --git a/.chloggen/bump-dotnet-1.1.0.yaml b/.chloggen/bump-dotnet-1.1.0.yaml new file mode 100644 index 000000000..c6f6206b6 --- /dev/null +++ b/.chloggen/bump-dotnet-1.1.0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 + +# One or more tracking issues related to the change +issues: [2252] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 6d7de6e6a..9084fa2f7 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.0.2 +1.1.0 From 1ae2fe64f5da2a03ec7f6cf970d85b961cccbf36 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:24:18 +0800 Subject: [PATCH 1110/1234] reset kubeconfig to empty string when using in-cluster config (#2273) --- .chloggen/fix-TA-kubeconfig.yaml | 16 ++++++++++++++++ cmd/otel-allocator/config/config.go | 1 + 2 files changed, 17 insertions(+) create mode 100755 .chloggen/fix-TA-kubeconfig.yaml diff --git a/.chloggen/fix-TA-kubeconfig.yaml b/.chloggen/fix-TA-kubeconfig.yaml new file mode 100755 index 000000000..9f5efa1ea --- /dev/null +++ b/.chloggen/fix-TA-kubeconfig.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: reset kubeconfig to empty string when using in-cluster config + +# One or more tracking issues related to the change +issues: [2262] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: "" diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 2db285d4a..96748c1e4 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -96,6 +96,7 @@ func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { if err != nil { return err } + target.KubeConfigFilePath = "" } target.ClusterConfig = clusterConfig From e8df483f9edbc8528ddffa25395c9fa51aa96878 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Wed, 25 Oct 2023 21:58:07 +0530 Subject: [PATCH 1111/1234] creates CRD for OpAMPBridge resource (#1559) * creates CRD for OpAMPBridge resource * minor changes * fixes kustomization.yaml issues * adds age field to status * fixes lint issues * fixes lint issues * fixes lint issues Signed-off-by: Avadhut Pisal * fixes lint issues * fix ci issues * updates bundle * fixes webhook test issue * updates bundle * updates bundle * adds enum for opamp-bridge capabilities * fix opamp server endpoint in e2e test case * fix e2e test case * fix e2e test case * validate maximum replica count * add delete verb to webhook * code refactoring to move reconciliation implementation in separate package * resolves merge conflicts * using common reconciliation implementation for opampbridge * add test cases * resolves goimports lint issues * add validations for capabilities * removes validation on specific set of capabilities * change capabilities data type to map * defaulting required capabilities * add local e2e image entry for opampbridge in hack * add OPERATOROPAMPBRIDGE_IMG to prepare-e2e * fix review comments * fix e2e hack * add e2e test-suit to github action --------- Signed-off-by: Avadhut Pisal --- ...reate-operator-bridge-crd-in-operator.yaml | 16 + .github/workflows/e2e.yaml | 1 + Makefile | 7 +- PROJECT | 12 + apis/v1alpha1/opampbridge_capabilities.go | 35 + apis/v1alpha1/opampbridge_types.go | 141 + apis/v1alpha1/opampbridge_webhook.go | 120 + apis/v1alpha1/opampbridge_webhook_test.go | 281 + apis/v1alpha1/zz_generated.deepcopy.go | 195 + ...emetry-operator.clusterserviceversion.yaml | 85 + .../opentelemetry.io_opampbridges.yaml | 2832 ++++++++ .../bases/opentelemetry.io_opampbridges.yaml | 2823 ++++++++ config/crd/kustomization.yaml | 7 +- .../patches/cainjection_in_opampbridges.yaml | 7 + .../crd/patches/webhook_in_opampbridges.yaml | 16 + ...emetry-operator.clusterserviceversion.yaml | 18 + config/rbac/_opampbridge_editor_role.yaml | 24 + config/rbac/_opampbridge_viewer_role.yaml | 20 + config/rbac/role.yaml | 26 + config/samples/_v1alpha1_opampbridge.yaml | 25 + config/webhook/manifests.yaml | 41 + controllers/builder_test.go | 231 + controllers/common.go | 17 + controllers/opampbridge_controller.go | 115 + controllers/opampbridge_controller_test.go | 173 + .../opentelemetrycollector_controller.go | 6 +- .../opentelemetrycollector_controller_test.go | 2 + controllers/reconcile_test.go | 247 +- controllers/suite_test.go | 55 + docs/api.md | 5773 +++++++++++++++++ hack/modify-test-images.sh | 2 + internal/config/main.go | 34 +- internal/config/options.go | 6 + internal/manifests/collector/route.go | 1 + internal/manifests/opampbridge/configmap.go | 71 + .../manifests/opampbridge/configmap_test.go | 104 + internal/manifests/opampbridge/container.go | 77 + .../manifests/opampbridge/container_test.go | 74 + internal/manifests/opampbridge/deployment.go | 65 + .../manifests/opampbridge/deployment_test.go | 425 ++ internal/manifests/opampbridge/opampbridge.go | 45 + internal/manifests/opampbridge/service.go | 51 + .../manifests/opampbridge/serviceaccount.go | 48 + .../opampbridge/serviceaccount_test.go | 57 + internal/manifests/opampbridge/utils.go | 29 + internal/manifests/opampbridge/volume.go | 43 + internal/manifests/opampbridge/volume_test.go | 43 + internal/manifests/params.go | 13 +- internal/naming/main.go | 30 + internal/status/{ => collector}/collector.go | 2 +- internal/status/{ => collector}/handle.go | 2 +- internal/status/opampbridge/handle.go | 58 + internal/status/opampbridge/opampbridge.go | 31 + kuttl-test-opampbridge.yaml | 6 + main.go | 16 + .../reconcile/{suite_test.go => suit_test.go} | 0 .../opampbridge/00-assert.yaml | 70 + .../opampbridge/00-install.yaml | 49 + 58 files changed, 14733 insertions(+), 70 deletions(-) create mode 100755 .chloggen/1368-create-operator-bridge-crd-in-operator.yaml create mode 100644 apis/v1alpha1/opampbridge_capabilities.go create mode 100644 apis/v1alpha1/opampbridge_types.go create mode 100644 apis/v1alpha1/opampbridge_webhook.go create mode 100644 apis/v1alpha1/opampbridge_webhook_test.go create mode 100644 bundle/manifests/opentelemetry.io_opampbridges.yaml create mode 100644 config/crd/bases/opentelemetry.io_opampbridges.yaml create mode 100644 config/crd/patches/cainjection_in_opampbridges.yaml create mode 100644 config/crd/patches/webhook_in_opampbridges.yaml create mode 100644 config/rbac/_opampbridge_editor_role.yaml create mode 100644 config/rbac/_opampbridge_viewer_role.yaml create mode 100644 config/samples/_v1alpha1_opampbridge.yaml create mode 100644 controllers/opampbridge_controller.go create mode 100644 controllers/opampbridge_controller_test.go create mode 100644 internal/manifests/opampbridge/configmap.go create mode 100644 internal/manifests/opampbridge/configmap_test.go create mode 100644 internal/manifests/opampbridge/container.go create mode 100644 internal/manifests/opampbridge/container_test.go create mode 100644 internal/manifests/opampbridge/deployment.go create mode 100644 internal/manifests/opampbridge/deployment_test.go create mode 100644 internal/manifests/opampbridge/opampbridge.go create mode 100644 internal/manifests/opampbridge/service.go create mode 100644 internal/manifests/opampbridge/serviceaccount.go create mode 100644 internal/manifests/opampbridge/serviceaccount_test.go create mode 100644 internal/manifests/opampbridge/utils.go create mode 100644 internal/manifests/opampbridge/volume.go create mode 100644 internal/manifests/opampbridge/volume_test.go rename internal/status/{ => collector}/collector.go (99%) rename internal/status/{ => collector}/handle.go (99%) create mode 100644 internal/status/opampbridge/handle.go create mode 100644 internal/status/opampbridge/opampbridge.go create mode 100644 kuttl-test-opampbridge.yaml rename pkg/collector/reconcile/{suite_test.go => suit_test.go} (100%) create mode 100644 tests/e2e-opampbridge/opampbridge/00-assert.yaml create mode 100644 tests/e2e-opampbridge/opampbridge/00-install.yaml diff --git a/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml b/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml new file mode 100755 index 000000000..cc22966b5 --- /dev/null +++ b/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator-opamp-bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Creates the CRD for the OpAMPBridge resource" + +# One or more tracking issues related to the change +issues: [1368] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7ee52ce0f..fccb0bd61 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,6 +31,7 @@ jobs: - e2e-autoscale - e2e-multi-instrumentation - e2e-pdb + - e2e-opampbridge steps: - name: Set up Go diff --git a/Makefile b/Makefile index d625a0282..b48e81d41 100644 --- a/Makefile +++ b/Makefile @@ -218,9 +218,14 @@ e2e-log-operator: e2e-multi-instrumentation: $(KUTTL) test --config kuttl-test-multi-instr.yaml +# OpAMPBridge CR end-to-tests +.PHONY: e2e-opampbridge +e2e-opampbridge: + $(KUTTL) test --config kuttl-test-opampbridge.yaml + .PHONY: prepare-e2e prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy - TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh + TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOROPAMPBRIDGE_IMG=$(OPERATOROPAMPBRIDGE_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh .PHONY: enable-prometheus-feature-flag enable-prometheus-feature-flag: diff --git a/PROJECT b/PROJECT index bd15742a0..610235b46 100644 --- a/PROJECT +++ b/PROJECT @@ -30,4 +30,16 @@ resources: webhooks: defaulting: true webhookVersion: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: opentelemetry.io + kind: OpAMPBridge + path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 + version: v1alpha1 + webhooks: + defaulting: true + validation: true + webhookVersion: v1 version: "3" diff --git a/apis/v1alpha1/opampbridge_capabilities.go b/apis/v1alpha1/opampbridge_capabilities.go new file mode 100644 index 000000000..607656a44 --- /dev/null +++ b/apis/v1alpha1/opampbridge_capabilities.go @@ -0,0 +1,35 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +type ( + // OpAMPBridgeCapability represents capability supported by OpAMP Bridge. + // +kubebuilder:validation:Enum=AcceptsRemoteConfig;ReportsEffectiveConfig;ReportsOwnTraces;ReportsOwnMetrics;ReportsOwnLogs;AcceptsOpAMPConnectionSettings;AcceptsOtherConnectionSettings;AcceptsRestartCommand;ReportsHealth;ReportsRemoteConfig + OpAMPBridgeCapability string +) + +const ( + OpAMPBridgeCapabilityReportsStatus OpAMPBridgeCapability = "ReportsStatus" + OpAMPBridgeCapabilityAcceptsRemoteConfig OpAMPBridgeCapability = "AcceptsRemoteConfig" + OpAMPBridgeCapabilityReportsEffectiveConfig OpAMPBridgeCapability = "ReportsEffectiveConfig" + OpAMPBridgeCapabilityReportsOwnTraces OpAMPBridgeCapability = "ReportsOwnTraces" + OpAMPBridgeCapabilityReportsOwnMetrics OpAMPBridgeCapability = "ReportsOwnMetrics" + OpAMPBridgeCapabilityReportsOwnLogs OpAMPBridgeCapability = "ReportsOwnLogs" + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings OpAMPBridgeCapability = "AcceptsOpAMPConnectionSettings" + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings OpAMPBridgeCapability = "AcceptsOtherConnectionSettings" + OpAMPBridgeCapabilityAcceptsRestartCommand OpAMPBridgeCapability = "AcceptsRestartCommand" + OpAMPBridgeCapabilityReportsHealth OpAMPBridgeCapability = "ReportsHealth" + OpAMPBridgeCapabilityReportsRemoteConfig OpAMPBridgeCapability = "ReportsRemoteConfig" +) diff --git a/apis/v1alpha1/opampbridge_types.go b/apis/v1alpha1/opampbridge_types.go new file mode 100644 index 000000000..344ee5392 --- /dev/null +++ b/apis/v1alpha1/opampbridge_types.go @@ -0,0 +1,141 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// OpAMPBridgeSpec defines the desired state of OpAMPBridge. +type OpAMPBridgeSpec struct { + // OpAMP backend Server endpoint + // +required + Endpoint string `json:"endpoint"` + // Capabilities supported by the OpAMP Bridge + // +required + Capabilities map[OpAMPBridgeCapability]bool `json:"capabilities"` + // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) + // +optional + ComponentsAllowed map[string][]string `json:"componentsAllowed,omitempty"` + // Resources to set on the OpAMPBridge pods. + // +optional + Resources v1.ResourceRequirements `json:"resources,omitempty"` + // NodeSelector to schedule OpAMPBridge pods. + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // Replicas is the number of pod instances for the OpAMPBridge. + // +optional + // +kubebuilder:validation:Maximum=1 + Replicas *int32 `json:"replicas,omitempty"` + // SecurityContext will be set as the container security context. + // +optional + SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + // PodSecurityContext will be set as the pod security context. + // +optional + PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` + // PodAnnotations is the set of annotations that will be attached to + // OpAMPBridge pods. + // +optional + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + // ServiceAccount indicates the name of an existing service account to use with this instance. When set, + // the operator will not automatically create a ServiceAccount for the OpAMPBridge. + // +optional + ServiceAccount string `json:"serviceAccount,omitempty"` + // Image indicates the container image to use for the OpAMPBridge. + // +optional + Image string `json:"image,omitempty"` + // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + // +optional + UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` + // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) + // +optional + ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` + // VolumeMounts represents the mount points to use in the underlying OpAMPBridge deployment(s) + // +optional + // +listType=atomic + VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` + // Ports allows a set of ports to be exposed by the underlying v1.Service. + // +optional + // +listType=atomic + Ports []v1.ServicePort `json:"ports,omitempty"` + // ENV vars to set on the OpAMPBridge Pods. + // +optional + Env []v1.EnvVar `json:"env,omitempty"` + // List of sources to populate environment variables on the OpAMPBridge Pods. + // +optional + EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` + // Toleration to schedule OpAMPBridge pods. + // +optional + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + // Volumes represents which volumes to use in the underlying OpAMPBridge deployment(s). + // +optional + // +listType=atomic + Volumes []v1.Volume `json:"volumes,omitempty"` + // HostNetwork indicates if the pod should run in the host networking namespace. + // +optional + HostNetwork bool `json:"hostNetwork,omitempty"` + // If specified, indicates the pod's priority. + // If not specified, the pod priority will be default or zero if there is no + // default. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` + // If specified, indicates the pod's scheduling constraints + // +optional + Affinity *v1.Affinity `json:"affinity,omitempty"` + // TopologySpreadConstraints embedded kubernetes pod configuration option, + // controls how pods are spread across your cluster among failure-domains + // such as regions, zones, nodes, and other user-defined topology domains + // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + // +optional + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` +} + +// OpAMPBridgeStatus defines the observed state of OpAMPBridge. +type OpAMPBridgeStatus struct { + // Version of the managed OpAMP Bridge (operand) + // +optional + Version string `json:"version,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" +// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.endpoint" +// +operator-sdk:csv:customresourcedefinitions:displayName="OpAMP Bridge" +// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{ConfigMaps,v1},{Service,v1}} + +// OpAMPBridge is the Schema for the opampbridges API. +type OpAMPBridge struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpAMPBridgeSpec `json:"spec,omitempty"` + Status OpAMPBridgeStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// OpAMPBridgeList contains a list of OpAMPBridge. +type OpAMPBridgeList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpAMPBridge `json:"items"` +} + +func init() { + SchemeBuilder.Register(&OpAMPBridge{}, &OpAMPBridgeList{}) +} diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go new file mode 100644 index 000000000..413f17261 --- /dev/null +++ b/apis/v1alpha1/opampbridge_webhook.go @@ -0,0 +1,120 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation" + ctrl "sigs.k8s.io/controller-runtime" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/webhook" + "sigs.k8s.io/controller-runtime/pkg/webhook/admission" +) + +// log is for logging in this package. +var opampbridgelog = logf.Log.WithName("opampbridge-resource") + +func (r *OpAMPBridge) SetupWebhookWithManager(mgr ctrl.Manager) error { + return ctrl.NewWebhookManagedBy(mgr). + For(r). + Complete() +} + +//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 + +var _ webhook.Defaulter = &OpAMPBridge{} + +// Default implements webhook.Defaulter so a webhook will be registered for the type. +func (r *OpAMPBridge) Default() { + opampbridgelog.Info("default", "name", r.Name) + if len(r.Spec.UpgradeStrategy) == 0 { + r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic + } + + if r.Labels == nil { + r.Labels = map[string]string{} + } + if r.Labels["app.kubernetes.io/managed-by"] == "" { + r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + } + + one := int32(1) + if r.Spec.Replicas == nil { + r.Spec.Replicas = &one + } + + // ReportsStatus Capability must be set + if r.Spec.Capabilities == nil { + r.Spec.Capabilities = make(map[OpAMPBridgeCapability]bool) + } + enabled, found := r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] + if !enabled || !found { + r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] = true + } +} + +//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update;delete,versions=v1alpha1,name=vopampbridge.kb.io,admissionReviewVersions=v1 + +var _ webhook.Validator = &OpAMPBridge{} + +// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. +func (r *OpAMPBridge) ValidateCreate() (admission.Warnings, error) { + opampbridgelog.Info("validate create", "name", r.Name) + return nil, r.validateCRDSpec() +} + +// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. +func (r *OpAMPBridge) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { + opampbridgelog.Info("validate update", "name", r.Name) + return nil, r.validateCRDSpec() +} + +// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. +func (r *OpAMPBridge) ValidateDelete() (admission.Warnings, error) { + opampbridgelog.Info("validate delete", "name", r.Name) + return nil, nil +} + +func (r *OpAMPBridge) validateCRDSpec() error { + + // check required fields + + if len(strings.TrimSpace(r.Spec.Endpoint)) == 0 { + return fmt.Errorf("the OpAMP server endpoint is not specified") + } + + if len(r.Spec.Capabilities) == 0 { + return fmt.Errorf("the capabilities supported by OpAMP Bridge are not specified") + } + + // validate port config + for _, p := range r.Spec.Ports { + nameErrs := validation.IsValidPortName(p.Name) + numErrs := validation.IsValidPortNum(int(p.Port)) + if len(nameErrs) > 0 || len(numErrs) > 0 { + return fmt.Errorf("the OpAMPBridge Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", + p.Name, nameErrs, p.Port, numErrs) + } + } + + // check for maximum replica count + if r.Spec.Replicas != nil && *r.Spec.Replicas > 1 { + return fmt.Errorf("replica count must not be greater than 1") + } + return nil +} diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go new file mode 100644 index 000000000..6fc5049da --- /dev/null +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -0,0 +1,281 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { + one := int32(1) + five := int32(5) + + tests := []struct { + name string + opampBridge OpAMPBridge + expected OpAMPBridge + }{ + { + name: "provide only required values in spec", + opampBridge: OpAMPBridge{}, + expected: OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpAMPBridgeSpec{ + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + Capabilities: map[OpAMPBridgeCapability]bool{OpAMPBridgeCapabilityReportsStatus: true}, + }, + }, + }, + { + name: "provided optional values in spec", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Replicas: &five, + UpgradeStrategy: "adhoc", + }, + }, + expected: OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpAMPBridgeSpec{ + Replicas: &five, + UpgradeStrategy: "adhoc", + Capabilities: map[OpAMPBridgeCapability]bool{OpAMPBridgeCapabilityReportsStatus: true}, + }, + }, + }, + { + name: "enable ReportsStatus capability if not enabled already", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: false, + }, + }, + }, + expected: OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpAMPBridgeSpec{ + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + }, + }, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + test.opampBridge.Default() + assert.Equal(t, test.expected, test.opampBridge) + }) + } +} + +func TestOpAMPBridgeValidatingWebhook(t *testing.T) { + + two := int32(2) + + tests := []struct { //nolint:govet + name string + opampBridge OpAMPBridge + expectedErr string + }{ + { + name: "specify all required fields, should not return error", + opampBridge: OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + }, + Spec: OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + OpAMPBridgeCapabilityReportsEffectiveConfig: true, + OpAMPBridgeCapabilityReportsOwnTraces: true, + OpAMPBridgeCapabilityReportsOwnMetrics: true, + OpAMPBridgeCapabilityReportsOwnLogs: true, + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsRestartCommand: true, + OpAMPBridgeCapabilityReportsHealth: true, + OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + }, + }, + }, + { + name: "empty OpAMP Server endpoint", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Endpoint: "", + }, + }, + expectedErr: "the OpAMP server endpoint is not specified", + }, + { + name: "empty capabilities", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + }, + }, + expectedErr: "the capabilities supported by OpAMP Bridge are not specified", + }, + { + name: "replica count greater than 1 should return error", + opampBridge: OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + }, + Spec: OpAMPBridgeSpec{ + Replicas: &two, + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + OpAMPBridgeCapabilityReportsEffectiveConfig: true, + OpAMPBridgeCapabilityReportsOwnTraces: true, + OpAMPBridgeCapabilityReportsOwnMetrics: true, + OpAMPBridgeCapabilityReportsOwnLogs: true, + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsRestartCommand: true, + OpAMPBridgeCapabilityReportsHealth: true, + OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + }, + }, + expectedErr: "replica count must not be greater than 1", + }, + { + name: "invalid port name", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + OpAMPBridgeCapabilityReportsEffectiveConfig: true, + OpAMPBridgeCapabilityReportsOwnTraces: true, + OpAMPBridgeCapabilityReportsOwnMetrics: true, + OpAMPBridgeCapabilityReportsOwnLogs: true, + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsRestartCommand: true, + OpAMPBridgeCapabilityReportsHealth: true, + OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + Ports: []v1.ServicePort{ + { + // this port name contains a non alphanumeric character, which is invalid. + Name: "-test🦄port", + Port: 12345, + Protocol: v1.ProtocolTCP, + }, + }, + }, + }, + expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", + }, + { + name: "invalid port name, too long", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + OpAMPBridgeCapabilityReportsEffectiveConfig: true, + OpAMPBridgeCapabilityReportsOwnTraces: true, + OpAMPBridgeCapabilityReportsOwnMetrics: true, + OpAMPBridgeCapabilityReportsOwnLogs: true, + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsRestartCommand: true, + OpAMPBridgeCapabilityReportsHealth: true, + OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, Ports: []v1.ServicePort{ + { + Name: "aaaabbbbccccdddd", // len: 16, too long + Port: 5555, + }, + }, + }, + }, + expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", + }, + { + name: "invalid port num", + opampBridge: OpAMPBridge{ + Spec: OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[OpAMPBridgeCapability]bool{ + OpAMPBridgeCapabilityReportsStatus: true, + OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + OpAMPBridgeCapabilityReportsEffectiveConfig: true, + OpAMPBridgeCapabilityReportsOwnTraces: true, + OpAMPBridgeCapabilityReportsOwnMetrics: true, + OpAMPBridgeCapabilityReportsOwnLogs: true, + OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + OpAMPBridgeCapabilityAcceptsRestartCommand: true, + OpAMPBridgeCapabilityReportsHealth: true, + OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + Ports: []v1.ServicePort{ + { + Name: "aaaabbbbccccddd", // len: 15 + // no port set means it's 0, which is invalid + }, + }, + }, + }, + expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + err := test.opampBridge.validateCRDSpec() + if test.expectedErr == "" { + assert.NoError(t, err) + return + } + assert.ErrorContains(t, err, test.expectedErr) + }) + } +} diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index bd1c11e44..85726b38e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -484,6 +484,201 @@ func (in *ObservabilitySpec) DeepCopy() *ObservabilitySpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpAMPBridge) DeepCopyInto(out *OpAMPBridge) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridge. +func (in *OpAMPBridge) DeepCopy() *OpAMPBridge { + if in == nil { + return nil + } + out := new(OpAMPBridge) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpAMPBridge) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpAMPBridgeList) DeepCopyInto(out *OpAMPBridgeList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpAMPBridge, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeList. +func (in *OpAMPBridgeList) DeepCopy() *OpAMPBridgeList { + if in == nil { + return nil + } + out := new(OpAMPBridgeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpAMPBridgeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpAMPBridgeSpec) DeepCopyInto(out *OpAMPBridgeSpec) { + *out = *in + if in.Capabilities != nil { + in, out := &in.Capabilities, &out.Capabilities + *out = make(map[OpAMPBridgeCapability]bool, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ComponentsAllowed != nil { + in, out := &in.ComponentsAllowed, &out.ComponentsAllowed + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + in.Resources.DeepCopyInto(&out.Resources) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1.ServicePort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]v1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeSpec. +func (in *OpAMPBridgeSpec) DeepCopy() *OpAMPBridgeSpec { + if in == nil { + return nil + } + out := new(OpAMPBridgeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpAMPBridgeStatus) DeepCopyInto(out *OpAMPBridgeStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeStatus. +func (in *OpAMPBridgeStatus) DeepCopy() *OpAMPBridgeStatus { + if in == nil { + return nil + } + out := new(OpAMPBridgeStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenShiftRoute) DeepCopyInto(out *OpenShiftRoute) { *out = *in diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index cf7b9febf..cac300521 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -52,6 +52,24 @@ spec: name: "" version: v1 version: v1alpha1 + - description: OpAMPBridge is the Schema for the opampbridges API. + displayName: OpAMP Bridge + kind: OpAMPBridge + name: opampbridges.opentelemetry.io + resources: + - kind: ConfigMaps + name: "" + version: v1 + - kind: Deployment + name: "" + version: apps/v1 + - kind: Pod + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + version: v1alpha1 - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. displayName: OpenTelemetry Collector @@ -211,6 +229,32 @@ spec: - patch - update - watch + - apiGroups: + - opentelemetry.io + resources: + - opampbridges + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - opampbridges/finalizers + verbs: + - update + - apiGroups: + - opentelemetry.io + resources: + - opampbridges/status + verbs: + - get + - patch + - update - apiGroups: - opentelemetry.io resources: @@ -430,6 +474,26 @@ spec: targetPort: 9443 type: MutatingAdmissionWebhook webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation + - admissionReviewVersions: + - v1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Fail + generateName: mopampbridge.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opampbridges + sideEffects: None + targetPort: 9443 + type: MutatingAdmissionWebhook + webhookPath: /mutate-opentelemetry-io-v1alpha1-opampbridge - admissionReviewVersions: - v1 containerPort: 443 @@ -509,6 +573,27 @@ spec: targetPort: 9443 type: ValidatingAdmissionWebhook webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation + - admissionReviewVersions: + - v1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Fail + generateName: vopampbridge.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + - DELETE + resources: + - opampbridges + sideEffects: None + targetPort: 9443 + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-opampbridge - admissionReviewVersions: - v1 containerPort: 443 diff --git a/bundle/manifests/opentelemetry.io_opampbridges.yaml b/bundle/manifests/opentelemetry.io_opampbridges.yaml new file mode 100644 index 000000000..6c124b0ff --- /dev/null +++ b/bundle/manifests/opentelemetry.io_opampbridges.yaml @@ -0,0 +1,2832 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + controller-gen.kubebuilder.io/version: v0.12.0 + creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator + name: opampbridges.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpAMPBridge + listKind: OpAMPBridgeList + plural: opampbridges + singular: opampbridge + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .spec.endpoint + name: Endpoint + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpAMPBridge is the Schema for the opampbridges API. + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. + type: string + kind: + description: Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. + type: string + metadata: + type: object + spec: + description: OpAMPBridgeSpec defines the desired state of OpAMPBridge. + properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + capabilities: + additionalProperties: + type: boolean + description: Capabilities supported by the OpAMP Bridge + type: object + componentsAllowed: + additionalProperties: + items: + type: string + type: array + description: ComponentsAllowed is a list of allowed OpenTelemetry + components for each pipeline type (receiver, processor, etc.) + type: object + endpoint: + description: OpAMP backend Server endpoint + type: string + env: + description: ENV vars to set on the OpAMPBridge Pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the OpAMPBridge Pods. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpAMPBridge. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpAMPBridge pods. + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to OpAMPBridge pods. + type: object + podSecurityContext: + description: PodSecurityContext will be set as the pod security context. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. Note that this field cannot be set when + spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. + type: string + nodePort: + description: The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the OpAMPBridge. + format: int32 + maximum: 1 + type: integer + resources: + description: Resources to set on the OpAMPBridge pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + securityContext: + description: SecurityContext will be set as the container security + context. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the OpAMPBridge. + type: string + tolerations: + description: Toleration to schedule OpAMPBridge pods. + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods may + be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle + upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying OpAMPBridge deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + OpAMPBridge deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob + storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set).' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified.' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set + permissions on created files by default.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node's default medium. Must be an empty string + (default) or Memory. + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: ephemeral represents a volume that is handled by + a cluster storage driver. + properties: + volumeClaimTemplate: + description: Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. + properties: + metadata: + description: May contain labels and annotations that + will be copied into the PVC when creating it. No other + fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s. + type: string + required: + - kind + - name + type: object + resources: + description: resources represents the minimum resources + the volume should have. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum + amount of compute resources required. + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for + this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + properties: + path: + description: 'path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator + Name. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. + format: int64 + type: integer + path: + description: path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no + group + type: string + readOnly: + description: readOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + image: + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as + configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + required: + - capabilities + - endpoint + type: object + status: + description: OpAMPBridgeStatus defines the observed state of OpAMPBridge. + properties: + version: + description: Version of the managed OpAMP Bridge (operand) + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: null + storedVersions: null diff --git a/config/crd/bases/opentelemetry.io_opampbridges.yaml b/config/crd/bases/opentelemetry.io_opampbridges.yaml new file mode 100644 index 000000000..913746b37 --- /dev/null +++ b/config/crd/bases/opentelemetry.io_opampbridges.yaml @@ -0,0 +1,2823 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + name: opampbridges.opentelemetry.io +spec: + group: opentelemetry.io + names: + kind: OpAMPBridge + listKind: OpAMPBridgeList + plural: opampbridges + singular: opampbridge + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: OpenTelemetry Version + jsonPath: .status.version + name: Version + type: string + - jsonPath: .spec.endpoint + name: Endpoint + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: OpAMPBridge is the Schema for the opampbridges API. + properties: + apiVersion: + description: APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. + type: string + kind: + description: Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. + type: string + metadata: + type: object + spec: + description: OpAMPBridgeSpec defines the desired state of OpAMPBridge. + properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + capabilities: + additionalProperties: + type: boolean + description: Capabilities supported by the OpAMP Bridge + type: object + componentsAllowed: + additionalProperties: + items: + type: string + type: array + description: ComponentsAllowed is a list of allowed OpenTelemetry + components for each pipeline type (receiver, processor, etc.) + type: object + endpoint: + description: OpAMP backend Server endpoint + type: string + env: + description: ENV vars to set on the OpAMPBridge Pods. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the OpAMPBridge Pods. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpAMPBridge. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpAMPBridge pods. + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to OpAMPBridge pods. + type: object + podSecurityContext: + description: PodSecurityContext will be set as the pod security context. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. Note that this field cannot be set when + spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. + type: string + nodePort: + description: The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the OpAMPBridge. + format: int32 + maximum: 1 + type: integer + resources: + description: Resources to set on the OpAMPBridge pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + securityContext: + description: SecurityContext will be set as the container security + context. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the OpAMPBridge. + type: string + tolerations: + description: Toleration to schedule OpAMPBridge pods. + items: + description: The pod this Toleration is attached to tolerates any + taint that matches the triple using the matching + operator . + properties: + effect: + description: Effect indicates the taint effect to match. Empty + means match all taint effects. When specified, allowed values + are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match all + values and all keys. + type: string + operator: + description: Operator represents a key's relationship to the + value. Valid operators are Exists and Equal. Defaults to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of time + the toleration (which must be of effect NoExecute, otherwise + this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods may + be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + upgradeStrategy: + description: UpgradeStrategy represents how the operator will handle + upgrades to the CR when a newer version of the operator is deployed + enum: + - automatic + - none + type: string + volumeMounts: + description: VolumeMounts represents the mount points to use in the + underlying OpAMPBridge deployment(s) + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-type: atomic + volumes: + description: Volumes represents which volumes to use in the underlying + OpAMPBridge deployment(s). + items: + description: Volume represents a named volume in a pod that may + be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: 'awsElasticBlockStore represents an AWS Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + readOnly: + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: boolean + volumeID: + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + type: string + required: + - volumeID + type: object + azureDisk: + description: azureDisk represents an Azure Data Disk mount on + the host and bind mount to the pod. + properties: + cachingMode: + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data disk in the + blob storage + type: string + diskURI: + description: diskURI is the URI of data disk in the blob + storage + type: string + fsType: + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + kind: + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set).' + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: azureFile represents an Azure File Service mount + on the host and bind mount to the pod. + properties: + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret that contains + Azure Storage Account Name and Key + type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName + type: object + cephfs: + description: cephFS represents a Ceph FS mount on the host that + shares a pod's lifetime + properties: + monitors: + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + items: + type: string + type: array + path: + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' + type: string + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: boolean + secretFile: + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + secretRef: + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + type: string + required: + - monitors + type: object + cinder: + description: 'cinder represents a cinder volume attached and + mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified.' + type: string + readOnly: + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: boolean + secretRef: + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + description: 'volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that should populate + this volume + properties: + defaultMode: + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: optional specify whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents ephemeral + storage that is handled by certain external CSI drivers (Beta + feature). + properties: + driver: + description: driver is the name of the CSI driver that handles + this volume. Consult with your admin for the correct name + as registered in the cluster. + type: string + fsType: + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. + type: string + nodePublishSecretRef: + description: nodePublishSecretRef is a reference to the + secret object containing sensitive information to pass + to the CSI driver to complete the CSI NodePublishVolume + and NodeUnpublishVolume calls. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: volumeAttributes stores driver-specific properties + that are passed to the CSI driver. Consult your driver's + documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API about the pod + that should populate this volume + properties: + defaultMode: + description: 'Optional: mode bits to use on created files + by default. Must be a Optional: mode bits used to set + permissions on created files by default.' + format: int32 + type: integer + items: + description: Items is a list of downward API volume file + items: + description: DownwardAPIVolumeFile represents information + to create the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects a field of the pod: + only annotations, labels, name and namespace are + supported.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to set permissions + on this file, must be an octal value between 0000 + and 0777 or a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative path + name of the file to be created. Must not be absolute + or contain the ''..'' path. Must be utf-8 encoded. + The first item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, requests.cpu and requests.memory) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + emptyDir: + description: 'emptyDir represents a temporary directory that + shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + properties: + medium: + description: medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node's default medium. Must be an empty string + (default) or Memory. + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + description: sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: ephemeral represents a volume that is handled by + a cluster storage driver. + properties: + volumeClaimTemplate: + description: Will be used to create a stand-alone PVC to + provision the volume. The pod in which this EphemeralVolumeSource + is embedded will be the owner of the PVC, i.e. + properties: + metadata: + description: May contain labels and annotations that + will be copied into the PVC when creating it. No other + fields are allowed and will be rejected during validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: The specification for the PersistentVolumeClaim. + The entire content is copied unchanged into the PVC + that gets created from this template. + properties: + accessModes: + description: 'accessModes contains the desired access + modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' + items: + type: string + type: array + dataSource: + description: 'dataSource field can be used to specify + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + description: dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. + properties: + apiGroup: + description: APIGroup is the group for the resource + being referenced. If APIGroup is not specified, + the specified Kind must be in the core API + group. For any other third-party types, APIGroup + is required. + type: string + kind: + description: Kind is the type of resource being + referenced + type: string + name: + description: Name is the name of resource being + referenced + type: string + namespace: + description: Namespace is the namespace of resource + being referenced Note that when a namespace + is specified, a gateway.networking.k8s. + type: string + required: + - kind + - name + type: object + resources: + description: resources represents the minimum resources + the volume should have. + properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum + amount of compute resources required. + type: object + type: object + selector: + description: selector is a label query over volumes + to consider for binding. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + type: string + volumeMode: + description: volumeMode defines what type of volume + is required by the claim. Value of Filesystem + is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding reference + to the PersistentVolume backing this claim. + type: string + type: object + required: + - spec + type: object + type: object + fc: + description: fc represents a Fibre Channel resource that is + attached to a kubelet's host machine and then exposed to the + pod. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + lun: + description: 'lun is Optional: FC target lun number' + format: int32 + type: integer + readOnly: + description: 'readOnly is Optional: Defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + wwids: + description: 'wwids Optional: FC volume world wide identifiers + (wwids) Either wwids or combination of targetWWNs and + lun must be set, but not both simultaneously.' + items: + type: string + type: array + type: object + flexVolume: + description: flexVolume represents a generic volume resource + that is provisioned/attached using an exec based plugin. + properties: + driver: + description: driver is the name of the driver to use for + this volume. + type: string + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field holds extra + command options if any.' + type: object + readOnly: + description: 'readOnly is Optional: defaults to false (read/write). + ReadOnly here will force the ReadOnly setting in VolumeMounts.' + type: boolean + secretRef: + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified.' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: flocker represents a Flocker volume attached to + a kubelet's host machine. This depends on the Flocker control + service being running + properties: + datasetName: + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: 'gcePersistentDisk represents a GCE Disk resource + that is attached to a kubelet''s host machine and then exposed + to the pod. More info: https://kubernetes.' + properties: + fsType: + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs".' + type: string + partition: + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1".' + format: int32 + type: integer + pdName: + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + type: boolean + required: + - pdName + type: object + gitRepo: + description: 'gitRepo represents a git repository at a particular + revision. DEPRECATED: GitRepo is deprecated.' + properties: + directory: + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: 'glusterfs represents a Glusterfs mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' + properties: + endpoints: + description: 'endpoints is the endpoint name that details + Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + path: + description: 'path is the Glusterfs volume path. More info: + https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: string + readOnly: + description: 'readOnly here will force the Glusterfs volume + to be mounted with read-only permissions. Defaults to + false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: hostPath represents a pre-existing file or directory + on the host machine that is directly exposed to the container. + properties: + path: + description: 'path of the directory on the host. If the + path is a symlink, it will follow the link to the real + path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + type: + description: 'type for HostPath Volume Defaults to "" More + info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' + type: string + required: + - path + type: object + iscsi: + description: 'iscsi represents an ISCSI Disk resource that is + attached to a kubelet''s host machine and then exposed to + the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + initiatorName: + description: initiatorName is the custom iSCSI Initiator + Name. + type: string + iqn: + description: iqn is the target iSCSI Qualified Name. + type: string + iscsiInterface: + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun number. + format: int32 + type: integer + portals: + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). + items: + type: string + type: array + readOnly: + description: readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + description: 'name of the volume. Must be a DNS_LABEL and unique + within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + nfs: + description: 'nfs represents an NFS mount on the host that shares + a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + properties: + path: + description: 'path that is exported by the NFS server. More + info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + readOnly: + description: 'readOnly here will force the NFS export to + be mounted with read-only permissions. Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: boolean + server: + description: 'server is the hostname or IP address of the + NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: 'persistentVolumeClaimVolumeSource represents a + reference to a PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.' + properties: + claimName: + description: 'claimName is the name of a PersistentVolumeClaim + in the same namespace as the pod using this volume. More + info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + type: string + readOnly: + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: photonPersistentDisk represents a PhotonController + persistent disk attached and mounted on kubelets host machine + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + pdID: + description: pdID is the ID that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: portworxVolume represents a portworx volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating + system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. + format: int32 + type: integer + sources: + description: sources is the list of volume projections + items: + description: Projection that may be projected along with + other supported volume types + properties: + configMap: + description: configMap information about the configMap + data to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about the downwardAPI + data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name and namespace are supported.' + properties: + apiVersion: + description: Version of the schema the + FieldPath is written in terms of, + defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + description: 'Optional: mode bits used to + set permissions on this file, must be + an octal value between 0000 and 0777 or + a decimal value between 0 and 511.' + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. Must + not be absolute or contain the ''..'' + path. Must be utf-8 encoded. The first + item of the relative path must not start + with ''..''' + type: string + resourceFieldRef: + description: 'Selects a resource of the + container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu + and requests.memory) are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format + of the exposed resources, defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + type: object + secret: + description: secret information about the secret data + to project + properties: + items: + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511.' + format: int32 + type: integer + path: + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. + type: string + required: + - key + - path + type: object + type: array + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: optional field specify whether the + Secret or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information about + the serviceAccountToken data to project + properties: + audience: + description: audience is the intended audience + of the token. A recipient of a token must identify + itself with an identifier specified in the audience + of the token, and otherwise should reject the + token. + type: string + expirationSeconds: + description: expirationSeconds is the requested + duration of validity of the service account + token. As the token approaches expiration, the + kubelet volume plugin will proactively rotate + the service account token. + format: int64 + type: integer + path: + description: path is the path relative to the + mount point of the file to project the token + into. + type: string + required: + - path + type: object + type: object + type: array + type: object + quobyte: + description: quobyte represents a Quobyte mount on the host + that shares a pod's lifetime + properties: + group: + description: group to map volume access to Default is no + group + type: string + readOnly: + description: readOnly here will force the Quobyte volume + to be mounted with read-only permissions. Defaults to + false. + type: boolean + registry: + description: registry represents a single or multiple Quobyte + Registry services specified as a string as host:port pair + (multiple entries are separated with commas) which acts + as the central registry for volumes + type: string + tenant: + description: tenant owning the given Quobyte volume in the + Backend Used with dynamically provisioned Quobyte volumes, + value is set by the plugin + type: string + user: + description: user to map volume access to Defaults to serivceaccount + user + type: string + volume: + description: volume is a string that references an already + created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: 'rbd represents a Rados Block Device mount on the + host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' + properties: + fsType: + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs".' + type: string + image: + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + keyring: + description: 'keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + monitors: + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + items: + type: string + type: array + pool: + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + readOnly: + description: 'readOnly here will force the ReadOnly setting + in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: boolean + secretRef: + description: 'secretRef is name of the authentication secret + for RBDUser. If provided overrides keyring. Default is + nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + user: + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + type: string + required: + - image + - monitors + type: object + scaleIO: + description: scaleIO represents a ScaleIO persistent volume + attached and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". + type: string + gateway: + description: gateway is the host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. + type: string + readOnly: + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef references to the secret for ScaleIO + user and other sensitive information. If this is not provided, + Login operation will fail. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name of the storage system as + configured in ScaleIO. + type: string + volumeName: + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: 'secret represents a secret that should populate + this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + properties: + defaultMode: + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + items: + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected + into the volume as a file whose name is the key and content + is the value. + items: + description: Maps a string key to a path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511.' + format: int32 + type: integer + path: + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. + type: string + required: + - key + - path + type: object + type: array + optional: + description: optional field specify whether the Secret or + its keys must be defined + type: boolean + secretName: + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + type: string + type: object + storageos: + description: storageOS represents a StorageOS volume attached + and mounted on Kubernetes nodes. + properties: + fsType: + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + readOnly: + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: secretRef specifies the secret to use for obtaining + the StorageOS API credentials. If not specified, default + values will be attempted. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + description: volumeName is the human-readable name of the + StorageOS volume. Volume names are only unique within + a namespace. + type: string + volumeNamespace: + description: volumeNamespace specifies the scope of the + volume within StorageOS. If no namespace is specified + then the Pod's namespace will be used. + type: string + type: object + vsphereVolume: + description: vsphereVolume represents a vSphere volume attached + and mounted on kubelets host machine + properties: + fsType: + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. + type: string + storagePolicyID: + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies vSphere + volume vmdk + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + x-kubernetes-list-type: atomic + required: + - capabilities + - endpoint + type: object + status: + description: OpAMPBridgeStatus defines the observed state of OpAMPBridge. + properties: + version: + description: Version of the managed OpAMP Bridge (operand) + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 09cc1462e..c8ddc32df 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -4,16 +4,21 @@ resources: - bases/opentelemetry.io_opentelemetrycollectors.yaml - bases/opentelemetry.io_instrumentations.yaml +- bases/opentelemetry.io_opampbridges.yaml # +kubebuilder:scaffold:crdkustomizeresource -patchesStrategicMerge: # patches here are for enabling the conversion webhook for each CRD # +kubebuilder:scaffold:crdkustomizewebhookpatch # patches here are for enabling the CA injection for each CRD +patchesStrategicMerge: +# - patches/webhook_in_opampbridges.yaml - patches/cainjection_in_opentelemetrycollectors.yaml +- patches/cainjection_in_opampbridges.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: - kustomizeconfig.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/config/crd/patches/cainjection_in_opampbridges.yaml b/config/crd/patches/cainjection_in_opampbridges.yaml new file mode 100644 index 000000000..736bd5f17 --- /dev/null +++ b/config/crd/patches/cainjection_in_opampbridges.yaml @@ -0,0 +1,7 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: opampbridges.opentelemetry.io diff --git a/config/crd/patches/webhook_in_opampbridges.yaml b/config/crd/patches/webhook_in_opampbridges.yaml new file mode 100644 index 000000000..8bf7a8144 --- /dev/null +++ b/config/crd/patches/webhook_in_opampbridges.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: opampbridges.opentelemetry.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1 diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index b97952217..edecd1bc8 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -32,6 +32,24 @@ spec: name: "" version: v1 version: v1alpha1 + - description: OpAMPBridge is the Schema for the opampbridges API. + displayName: OpAMP Bridge + kind: OpAMPBridge + name: opampbridges.opentelemetry.io + resources: + - kind: ConfigMaps + name: "" + version: v1 + - kind: Deployment + name: "" + version: apps/v1 + - kind: Pod + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + version: v1alpha1 - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. displayName: OpenTelemetry Collector diff --git a/config/rbac/_opampbridge_editor_role.yaml b/config/rbac/_opampbridge_editor_role.yaml new file mode 100644 index 000000000..d98049e3b --- /dev/null +++ b/config/rbac/_opampbridge_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit opampbridges. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opampbridge-editor-role +rules: +- apiGroups: + - opentelemetry.io + resources: + - opampbridges + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opampbridges/status + verbs: + - get diff --git a/config/rbac/_opampbridge_viewer_role.yaml b/config/rbac/_opampbridge_viewer_role.yaml new file mode 100644 index 000000000..780c4f7f8 --- /dev/null +++ b/config/rbac/_opampbridge_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view opampbridges. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: opampbridge-viewer-role +rules: +- apiGroups: + - opentelemetry.io + resources: + - opampbridges + verbs: + - get + - list + - watch +- apiGroups: + - opentelemetry.io + resources: + - opampbridges/status + verbs: + - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 3b82f33b2..1f5ab57c0 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -109,6 +109,32 @@ rules: - patch - update - watch +- apiGroups: + - opentelemetry.io + resources: + - opampbridges + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - opentelemetry.io + resources: + - opampbridges/finalizers + verbs: + - update +- apiGroups: + - opentelemetry.io + resources: + - opampbridges/status + verbs: + - get + - patch + - update - apiGroups: - opentelemetry.io resources: diff --git a/config/samples/_v1alpha1_opampbridge.yaml b/config/samples/_v1alpha1_opampbridge.yaml new file mode 100644 index 000000000..7e18e320f --- /dev/null +++ b/config/samples/_v1alpha1_opampbridge.yaml @@ -0,0 +1,25 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpAMPBridge +metadata: + name: opampbridge-sample +spec: + endpoint: ws://opamp-server:4320/v1/opamp + capabilities: + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRemoteConfig: true + AcceptsRestartCommand: true + ReportsEffectiveConfig: true + ReportsHealth: true + ReportsOwnLogs: true + ReportsOwnMetrics: true + ReportsOwnTraces: true + ReportsRemoteConfig: true + ReportsStatus: true + componentsAllowed: + receivers: + - otlp + processors: + - memory_limiter + exporters: + - logging diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index d9adaf855..14014f317 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -24,6 +24,26 @@ webhooks: resources: - instrumentations sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /mutate-opentelemetry-io-v1alpha1-opampbridge + failurePolicy: Fail + name: mopampbridge.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opampbridges + sideEffects: None - admissionReviewVersions: - v1 clientConfig: @@ -109,6 +129,27 @@ webhooks: resources: - instrumentations sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opampbridge + failurePolicy: Fail + name: vopampbridge.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + - DELETE + resources: + - opampbridges + sideEffects: None - admissionReviewVersions: - v1 clientConfig: diff --git a/controllers/builder_test.go b/controllers/builder_test.go index f93b31bd8..7adcc158d 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -23,6 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -41,6 +42,15 @@ var ( pathTypePrefix = networkingv1.PathTypePrefix ) +var ( + opampbridgeSelectorLabels = map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + } +) + func TestBuildCollector(t *testing.T) { var goodConfig = `receivers: examplereceiver: @@ -600,3 +610,224 @@ service: }) } } + +func TestBuildAll_OpAMPBridge(t *testing.T) { + one := int32(1) + type args struct { + instance v1alpha1.OpAMPBridge + } + tests := []struct { + name string + args args + want []client.Object + wantErr bool + }{ + { + name: "base case", + args: args{ + instance: v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Replicas: &one, + Image: "test", + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ + v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, + v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, + v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, + }, + }, + }, + want: []client.Object{ + &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-opamp-bridge", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: opampbridgeSelectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "opamp-bridge-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-opamp-bridge", + }, + Items: []corev1.KeyToPath{ + { + Key: "remoteconfiguration.yaml", + Path: "remoteconfiguration.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "opamp-bridge-container", + Image: "test", + Env: []corev1.EnvVar{ + { + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "opamp-bridge-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "test-opamp-bridge", + }, + }, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-opamp-bridge", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "remoteconfiguration.yaml": `capabilities: + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRemoteConfig: true + AcceptsRestartCommand: true + ReportsEffectiveConfig: true + ReportsHealth: true + ReportsOwnLogs: true + ReportsOwnMetrics: true + ReportsOwnTraces: true + ReportsRemoteConfig: true + ReportsStatus: true +componentsAllowed: + exporters: + - logging + processors: + - memory_limiter + receivers: + - otlp +endpoint: ws://opamp-server:4320/v1/opamp +`}, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-opamp-bridge", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-opamp-bridge", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "opamp-bridge", + Port: 80, + TargetPort: intstr.FromInt(8080), + }, + }, + Selector: opampbridgeSelectorLabels, + }, + }, + }, + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := config.New( + config.WithOperatorOpAMPBridgeImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), + ) + reconciler := NewOpAMPBridgeReconciler(OpAMPBridgeReconcilerParams{ + Log: logr.Discard(), + Config: cfg, + }) + params := reconciler.getParams(tt.args.instance) + got, err := BuildOpAMPBridge(params) + if (err != nil) != tt.wantErr { + t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) + return + } + require.Equal(t, tt.want, got) + }) + } +} diff --git a/controllers/common.go b/controllers/common.go index aa5adf1bc..d1e4bdcde 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -28,6 +28,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/opampbridge" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" ) @@ -57,6 +58,22 @@ func BuildCollector(params manifests.Params) ([]client.Object, error) { return resources, nil } +// BuildOpAMPBridge returns the generation and collected errors of all manifests for a given instance. +func BuildOpAMPBridge(params manifests.Params) ([]client.Object, error) { + builders := []manifests.Builder{ + opampbridge.Build, + } + var resources []client.Object + for _, builder := range builders { + objs, err := builder(params) + if err != nil { + return nil, err + } + resources = append(resources, objs...) + } + return resources, nil +} + // reconcileDesiredObjects runs the reconcile process using the mutateFn over the given list of objects. func reconcileDesiredObjects(ctx context.Context, kubeClient client.Client, logger logr.Logger, owner metav1.Object, scheme *runtime.Scheme, desiredObjects ...client.Object) error { var errs []error diff --git a/controllers/opampbridge_controller.go b/controllers/opampbridge_controller.go new file mode 100644 index 000000000..9a948ca42 --- /dev/null +++ b/controllers/opampbridge_controller.go @@ -0,0 +1,115 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers + +import ( + "context" + + "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/record" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + opampbridgeStatus "github.com/open-telemetry/opentelemetry-operator/internal/status/opampbridge" +) + +// OpAMPBridgeReconciler reconciles a OpAMPBridge object. +type OpAMPBridgeReconciler struct { + client.Client + scheme *runtime.Scheme + log logr.Logger + recorder record.EventRecorder + config config.Config +} + +// OpAMPBridgeReconcilerParams is the set of options to build a new OpAMPBridgeReconciler. +type OpAMPBridgeReconcilerParams struct { + client.Client + Recorder record.EventRecorder + Scheme *runtime.Scheme + Log logr.Logger + Config config.Config +} + +func (r *OpAMPBridgeReconciler) getParams(instance v1alpha1.OpAMPBridge) manifests.Params { + return manifests.Params{ + Config: r.config, + Client: r.Client, + OpAMPBridge: instance, + Log: r.log, + Scheme: r.scheme, + Recorder: r.recorder, + } +} + +func NewOpAMPBridgeReconciler(params OpAMPBridgeReconcilerParams) *OpAMPBridgeReconciler { + reconciler := &OpAMPBridgeReconciler{ + Client: params.Client, + scheme: params.Scheme, + log: params.Log, + recorder: params.Recorder, + config: params.Config, + } + return reconciler +} + +//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges/finalizers,verbs=update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +// For more details, check Reconcile and its Result here: +// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile +func (r *OpAMPBridgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + log := r.log.WithValues("opamp-bridge", req.NamespacedName) + var instance v1alpha1.OpAMPBridge + if err := r.Client.Get(ctx, req.NamespacedName, &instance); err != nil { + if !apierrors.IsNotFound(err) { + log.Error(err, "unable to fetch OpAMPBridge") + } + // we'll ignore not-found errors, since they can't be fixed by an immediate + // requeue (we'll need to wait for a new notification), and we can get them + // on deleted requests. + return ctrl.Result{}, client.IgnoreNotFound(err) + } + + params := r.getParams(instance) + + desiredObjects, buildErr := BuildOpAMPBridge(params) + if buildErr != nil { + return ctrl.Result{}, buildErr + } + err := reconcileDesiredObjects(ctx, r.Client, log, ¶ms.OpAMPBridge, params.Scheme, desiredObjects...) + return opampbridgeStatus.HandleReconcileStatus(ctx, log, params, err) +} + +// SetupWithManager sets up the controller with the Manager. +func (r *OpAMPBridgeReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&v1alpha1.OpAMPBridge{}). + Owns(&corev1.ConfigMap{}). + Owns(&corev1.ServiceAccount{}). + Owns(&corev1.Service{}). + Owns(&appsv1.Deployment{}). + Complete(r) +} diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go new file mode 100644 index 000000000..8ce76a35d --- /dev/null +++ b/controllers/opampbridge_controller_test.go @@ -0,0 +1,173 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package controllers_test + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/tools/record" + "k8s.io/kubectl/pkg/scheme" + "sigs.k8s.io/controller-runtime/pkg/client" + k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" + logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/manager" + k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" +) + +var opampBridgeLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") +var opampBridgeMockAutoDetector = &mockAutoDetect{ + OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { + return autodetect.OpenShiftRoutesAvailable, nil + }, +} + +func TestNewObjectsOnReconciliation_OpAMPBridge(t *testing.T) { + // prepare + cfg := config.New( + config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), + config.WithAutoDetect(opampBridgeMockAutoDetector), + ) + nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} + reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ + Client: k8sClient, + Log: opampBridgeLogger, + Scheme: testScheme, + Recorder: record.NewFakeRecorder(10), + Config: cfg, + }) + require.NoError(t, cfg.AutoDetect()) + created := &v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: nsn.Name, + Namespace: nsn.Namespace, + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ + v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, + v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, + v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + }, + } + err := k8sClient.Create(context.Background(), created) + require.NoError(t, err) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(context.Background(), req) + + // verify + require.NoError(t, err) + + // the base query for the underlying objects + opts := []client.ListOption{ + client.InNamespace(nsn.Namespace), + client.MatchingLabels(map[string]string{ + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + }), + } + + // verify that we have at least one object for each of the types we create + // whether we have the right ones is up to the specific tests for each type + { + list := &corev1.ConfigMapList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceAccountList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &corev1.ServiceList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + { + list := &appsv1.DeploymentList{} + err = k8sClient.List(context.Background(), list, opts...) + assert.NoError(t, err) + assert.NotEmpty(t, list.Items) + } + // cleanup + require.NoError(t, k8sClient.Delete(context.Background(), created)) +} + +func TestSkipWhenInstanceDoesNotExist_OpAMPBridge(t *testing.T) { + // prepare + cfg := config.New() + nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} + reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ + Client: k8sClient, + Log: opampBridgeLogger, + Scheme: scheme.Scheme, + Config: cfg, + }) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err := reconciler.Reconcile(context.Background(), req) + + // verify + assert.NoError(t, err) +} + +func TestRegisterWithManager_OpAMPBridge(t *testing.T) { + t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") + + // prepare + mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) + require.NoError(t, err) + + reconciler := controllers.NewReconciler(controllers.Params{}) + + // test + err = reconciler.SetupWithManager(mgr) + + // verify + assert.NoError(t, err) +} diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 7c22eba02..5b62594be 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -35,7 +35,7 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/status" + collectorStatus "github.com/open-telemetry/opentelemetry-operator/internal/status/collector" "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" @@ -60,7 +60,7 @@ type Task struct { BailOnError bool } -// Params is the set of options to build a new openTelemetryCollectorReconciler. +// Params is the set of options to build a new OpenTelemetryCollectorReconciler. type Params struct { client.Client Recorder record.EventRecorder @@ -190,7 +190,7 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return ctrl.Result{}, buildErr } err := reconcileDesiredObjects(ctx, r.Client, log, ¶ms.OtelCol, params.Scheme, desiredObjects...) - return status.HandleReconcileStatus(ctx, log, params, err) + return collectorStatus.HandleReconcileStatus(ctx, log, params, err) } // RunTasks runs all the tasks associated with this reconciler. diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index 261115c08..ec50a9a64 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -104,6 +104,7 @@ func TestNewObjectsOnReconciliation(t *testing.T) { client.MatchingLabels(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", }), } @@ -203,6 +204,7 @@ func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { client.MatchingLabels(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", }), } diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index a47bfd67d..699cc5770 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -60,7 +60,7 @@ var ( } ) -type check func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) +type check func(t *testing.T, params manifests.Params) func newParamsAssertNoErr(t *testing.T, taContainerImage string, file string) manifests.Params { p, err := newParams(taContainerImage, file) @@ -125,18 +125,18 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Collector)) + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, int32(2), *d.Spec.Replicas) assert.Contains(t, d.Annotations, annotationName) assert.Contains(t, d.Labels, labelName) - exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(appliedInstance, naming.Service)) + exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(naming.Service(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(appliedInstance, naming.ServiceAccount)) + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.ServiceAccount(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) }, @@ -147,9 +147,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Collector)) + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, int32(3), *d.Spec.Replicas) @@ -157,7 +157,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { assert.Contains(t, d.Annotations, annotationName) assert.Contains(t, d.Labels, labelName) actual := v1.Service{} - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.Service)) + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.Service(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Contains(t, actual.Spec.Ports, extraPorts) @@ -212,9 +212,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { d := networkingv1.Ingress{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Ingress)) + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Ingress(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) }, @@ -225,9 +225,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { d := networkingv1.Ingress{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(appliedInstance, naming.Ingress)) + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Ingress(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, "something-else.com", d.Spec.Rules[0].Host) @@ -248,9 +248,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { got := routev1.Route{} - nsn := types.NamespacedName{Namespace: appliedInstance.Namespace, Name: "otlp-grpc-test-route"} + nsn := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} exists, err := populateObjectIfExists(t, &got, nsn) assert.NoError(t, err) assert.True(t, exists) @@ -262,9 +262,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { got := routev1.Route{} - nsn := types.NamespacedName{Namespace: appliedInstance.Namespace, Name: "otlp-grpc-test-route"} + nsn := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} exists, err := populateObjectIfExists(t, &got, nsn) assert.NoError(t, err) assert.True(t, exists) @@ -286,9 +286,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, hpaErr) require.Len(t, actual.Spec.Metrics, 1) assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) @@ -303,9 +303,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, hpaErr) require.Len(t, actual.Spec.Metrics, 1) assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) @@ -329,9 +329,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { actual := policyV1.PodDisruptionBudget{} - exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, pdbErr) assert.Equal(t, int32(1), actual.Spec.MinAvailable.IntVal) assert.Nil(t, actual.Spec.MaxUnavailable) @@ -344,9 +344,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { actual := policyV1.PodDisruptionBudget{} - exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.HorizontalPodAutoscaler)) + exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, pdbErr) assert.Nil(t, actual.Spec.MinAvailable) assert.Equal(t, int32(1), actual.Spec.MaxUnavailable.IntVal) @@ -367,8 +367,8 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - exists, err := populateObjectIfExists(t, &appsv1.DaemonSet{}, namespacedObjectName(appliedInstance, naming.Collector)) + func(t *testing.T, params manifests.Params) { + exists, err := populateObjectIfExists(t, &appsv1.DaemonSet{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) }, @@ -392,18 +392,18 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + func(t *testing.T, params manifests.Params) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) - exists, err = populateObjectIfExists(t, &appsv1.StatefulSet{}, namespacedObjectName(appliedInstance, naming.Collector)) + exists, err = populateObjectIfExists(t, &appsv1.StatefulSet{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) // Check the TA doesn't exist - exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.False(t, exists) - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.False(t, exists) }, @@ -414,18 +414,18 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + func(t *testing.T, params manifests.Params) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) actual := v1.ConfigMap{} - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(appliedInstance, naming.TargetAllocatorServiceAccount)) + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.TargetAllocatorServiceAccount(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) @@ -455,15 +455,15 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(appliedInstance, naming.Collector)) + func(t *testing.T, params manifests.Params) { + exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) actual := v1.ConfigMap{} - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Contains(t, actual.Data["targetallocator.yaml"], "0.0.0.0:10100") @@ -475,9 +475,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { { result: controllerruntime.Result{}, checks: []check{ - func(t *testing.T, appliedInstance v1alpha1.OpenTelemetryCollector) { + func(t *testing.T, params manifests.Params) { actual := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, namespacedObjectName(appliedInstance, naming.TargetAllocator)) + exists, err := populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.True(t, exists) assert.Equal(t, actual.Spec.Template.Spec.Containers[0].Image, updatedTaImage) @@ -519,7 +519,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } assert.Equal(t, firstCheck.result, got) for _, check := range firstCheck.checks { - check(t, tt.args.params.OtelCol) + check(t, tt.args.params) } // run the next set of checks for pid, updateParam := range tt.args.updates { @@ -546,7 +546,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } assert.Equal(t, checkGroup.result, got) for _, check := range checkGroup.checks { - check(t, updateParam.OtelCol) + check(t, updateParam) } } // Only delete upon a successful creation @@ -557,9 +557,162 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } } -func namespacedObjectName(instance v1alpha1.OpenTelemetryCollector, namingFunc func(string) string) types.NamespacedName { +func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) { + addedMetadataDeployment := opampBridgeParams() + addedMetadataDeployment.OpAMPBridge.Labels = map[string]string{ + labelName: labelVal, + } + addedMetadataDeployment.OpAMPBridge.Spec.PodAnnotations = map[string]string{ + annotationName: annotationVal, + } + deploymentExtraPorts := opampBridgeParams() + deploymentExtraPorts.OpAMPBridge.Spec.Ports = append(deploymentExtraPorts.OpAMPBridge.Spec.Ports, extraPorts) + + type args struct { + params manifests.Params + // an optional list of updates to supply after the initial object + updates []manifests.Params + } + type want struct { + // result check + result controllerruntime.Result + // a check to run against the current state applied + checks []check + // if an error from creation validation is expected + validateErr assert.ErrorAssertionFunc + // if an error from reconciliation is expected + wantErr assert.ErrorAssertionFunc + } + tests := []struct { + name string + args args + want []want + }{ + { + name: "deployment opamp-bridge", + args: args{ + params: addedMetadataDeployment, + updates: []manifests.Params{deploymentExtraPorts}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, params manifests.Params) { + d := appsv1.Deployment{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Equal(t, int32(1), *d.Spec.Replicas) + assert.Contains(t, d.Spec.Template.Annotations, annotationName) + assert.Contains(t, d.Labels, labelName) + exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(naming.OpAMPBridgeService(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) + assert.NoError(t, err) + assert.True(t, exists) + exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.ServiceAccount(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) + assert.NoError(t, err) + assert.True(t, exists) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, params manifests.Params) { + d := appsv1.Deployment{} + exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) + assert.NoError(t, err) + assert.True(t, exists) + // confirm that we don't remove annotations and labels even if we don't set them + assert.Contains(t, d.Spec.Template.Annotations, annotationName) + assert.Contains(t, d.Labels, labelName) + actual := v1.Service{} + exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.OpAMPBridgeService(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) + assert.NoError(t, err) + assert.True(t, exists) + assert.Contains(t, actual.Spec.Ports, extraPorts) + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + testContext := context.Background() + nsn := types.NamespacedName{Name: tt.args.params.OpAMPBridge.Name, Namespace: tt.args.params.OpAMPBridge.Namespace} + reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ + Client: k8sClient, + Log: logger, + Scheme: testScheme, + Recorder: record.NewFakeRecorder(20), + Config: config.New( + config.WithCollectorImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), + ), + }) + assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") + firstCheck := tt.want[0] + createErr := k8sClient.Create(testContext, &tt.args.params.OpAMPBridge) + if !firstCheck.validateErr(t, createErr) { + return + } + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + got, reconcileErr := reconciler.Reconcile(testContext, req) + if !firstCheck.wantErr(t, reconcileErr) { + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OpAMPBridge)) + return + } + assert.Equal(t, firstCheck.result, got) + for _, check := range firstCheck.checks { + check(t, tt.args.params) + } + // run the next set of checks + for pid, updateParam := range tt.args.updates { + existing := v1alpha1.OpAMPBridge{} + found, err := populateObjectIfExists(t, &existing, nsn) + assert.True(t, found) + assert.NoError(t, err) + + updateParam.OpAMPBridge.SetResourceVersion(existing.ResourceVersion) + updateParam.OpAMPBridge.SetUID(existing.UID) + err = k8sClient.Update(testContext, &updateParam.OpAMPBridge) + assert.NoError(t, err) + if err != nil { + continue + } + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err = reconciler.Reconcile(testContext, req) + // account for already checking the initial group + checkGroup := tt.want[pid+1] + if !checkGroup.wantErr(t, err) { + return + } + assert.Equal(t, checkGroup.result, got) + for _, check := range checkGroup.checks { + check(t, updateParam) + } + } + // Only delete upon a successful creation + if createErr == nil { + require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OpAMPBridge)) + } + }) + } +} + +func namespacedObjectName(name string, namespace string) types.NamespacedName { return types.NamespacedName{ - Namespace: instance.Namespace, - Name: namingFunc(instance.Name), + Namespace: namespace, + Name: name, } } diff --git a/controllers/suite_test.go b/controllers/suite_test.go index acf46e64e..a3515eb25 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -67,6 +67,7 @@ var ( const ( defaultCollectorImage = "default-collector" defaultTaAllocationImage = "default-ta-allocator" + defaultOpAMPBridgeImage = "default-opamp-bridge" promFile = "testdata/test.yaml" updatedPromFile = "testdata/test_ta_update.yaml" testFileIngress = "testdata/ingress_testdata.yaml" @@ -130,6 +131,11 @@ func TestMain(m *testing.M) { os.Exit(1) } + if err = (&v1alpha1.OpAMPBridge{}).SetupWebhookWithManager(mgr); err != nil { + fmt.Printf("failed to SetupWebhookWithManager: %v", err) + os.Exit(1) + } + ctx, cancel = context.WithCancel(context.TODO()) defer cancel() go func() { @@ -385,6 +391,55 @@ func paramsWithPolicy(minAvailable, maxUnavailable int32) manifests.Params { } } +func opampBridgeParams() manifests.Params { + return manifests.Params{ + Config: config.New(config.WithOperatorOpAMPBridgeImage(defaultOpAMPBridgeImage)), + Client: k8sClient, + OpAMPBridge: v1alpha1.OpAMPBridge{ + TypeMeta: metav1.TypeMeta{ + Kind: "opentelemetry.io", + APIVersion: "v1", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "default", + UID: instanceUID, + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.69.0", + Ports: []v1.ServicePort{ + { + Name: "metrics", + Port: 8081, + TargetPort: intstr.IntOrString{ + Type: intstr.Int, + IntVal: 8081, + }, + }, + }, + Endpoint: "ws://127.0.0.1:4320/v1/opamp", + Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ + v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, + v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, + v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, + }, + }, + Scheme: testScheme, + Log: logger, + Recorder: record.NewFakeRecorder(10), + } +} + func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { t.Helper() err := k8sClient.Get(context.Background(), namespacedName, object) diff --git a/docs/api.md b/docs/api.md index 19fe5acfd..3d437f533 100644 --- a/docs/api.md +++ b/docs/api.md @@ -10,6 +10,8 @@ Resource Types: - [Instrumentation](#instrumentation) +- [OpAMPBridge](#opampbridge) + - [OpenTelemetryCollector](#opentelemetrycollector) @@ -3583,6 +3585,5777 @@ Sampler defines sampling configuration. +## OpAMPBridge +[↩ Parent](#opentelemetryiov1alpha1 ) + + + + + + +OpAMPBridge is the Schema for the opampbridges API. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
apiVersionstringopentelemetry.io/v1alpha1true
kindstringOpAMPBridgetrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject + OpAMPBridgeSpec defines the desired state of OpAMPBridge.
+
false
statusobject + OpAMPBridgeStatus defines the observed state of OpAMPBridge.
+
false
+ + +### OpAMPBridge.spec +[↩ Parent](#opampbridge) + + + +OpAMPBridgeSpec defines the desired state of OpAMPBridge. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
capabilitiesmap[string]boolean + Capabilities supported by the OpAMP Bridge
+
true
endpointstring + OpAMP backend Server endpoint
+
true
affinityobject + If specified, indicates the pod's scheduling constraints
+
false
componentsAllowedmap[string][]string + ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.)
+
false
env[]object + ENV vars to set on the OpAMPBridge Pods.
+
false
envFrom[]object + List of sources to populate environment variables on the OpAMPBridge Pods.
+
false
hostNetworkboolean + HostNetwork indicates if the pod should run in the host networking namespace.
+
false
imagestring + Image indicates the container image to use for the OpAMPBridge.
+
false
imagePullPolicystring + ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
+
false
nodeSelectormap[string]string + NodeSelector to schedule OpAMPBridge pods.
+
false
podAnnotationsmap[string]string + PodAnnotations is the set of annotations that will be attached to OpAMPBridge pods.
+
false
podSecurityContextobject + PodSecurityContext will be set as the pod security context.
+
false
ports[]object + Ports allows a set of ports to be exposed by the underlying v1.Service.
+
false
priorityClassNamestring + If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.
+
false
replicasinteger + Replicas is the number of pod instances for the OpAMPBridge.
+
+ Format: int32
+ Maximum: 1
+
false
resourcesobject + Resources to set on the OpAMPBridge pods.
+
false
securityContextobject + SecurityContext will be set as the container security context.
+
false
serviceAccountstring + ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the OpAMPBridge.
+
false
tolerations[]object + Toleration to schedule OpAMPBridge pods.
+
false
topologySpreadConstraints[]object + TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined top
+
false
upgradeStrategyenum + UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
+
+ Enum: automatic, none
+
false
volumeMounts[]object + VolumeMounts represents the mount points to use in the underlying OpAMPBridge deployment(s)
+
false
volumes[]object + Volumes represents which volumes to use in the underlying OpAMPBridge deployment(s).
+
false
+ + +### OpAMPBridge.spec.affinity +[↩ Parent](#opampbridgespec) + + + +If specified, indicates the pod's scheduling constraints + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeAffinityobject + Describes node affinity scheduling rules for the pod.
+
false
podAffinityobject + Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+
false
podAntiAffinityobject + Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity +[↩ Parent](#opampbridgespecaffinity) + + + +Describes node affinity scheduling rules for the pod. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecutionobject + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinity) + + + +An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferenceobject + A node selector term, associated with the corresponding weight.
+
true
weightinteger + Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference +[↩ Parent](#opampbridgespecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +A node selector term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution +[↩ Parent](#opampbridgespecaffinitynodeaffinity) + + + +If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeSelectorTerms[]object + Required. A list of node selector terms. The terms are ORed.
+
true
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinityrequiredduringschedulingignoredduringexecution) + + + +A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index] +[↩ Parent](#opampbridgespecaffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity +[↩ Parent](#opampbridgespecaffinity) + + + +Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opampbridgespecaffinitypodaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opampbridgespecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opampbridgespecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opampbridgespecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opampbridgespecaffinitypodaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opampbridgespecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opampbridgespecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity +[↩ Parent](#opampbridgespecaffinity) + + + +Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opampbridgespecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opampbridgespecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opampbridgespecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opampbridgespecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opampbridgespecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecaffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.env[index] +[↩ Parent](#opampbridgespec) + + + +EnvVar represents an environment variable present in a Container. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the environment variable. Must be a C_IDENTIFIER.
+
true
valuestring + Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables.
+
false
valueFromobject + Source for the environment variable's value. Cannot be used if value is not empty.
+
false
+ + +### OpAMPBridge.spec.env[index].valueFrom +[↩ Parent](#opampbridgespecenvindex) + + + +Source for the environment variable's value. Cannot be used if value is not empty. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapKeyRefobject + Selects a key of a ConfigMap.
+
false
fieldRefobject + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.
+
false
secretKeyRefobject + Selects a key of a secret in the pod's namespace
+
false
+ + +### OpAMPBridge.spec.env[index].valueFrom.configMapKeyRef +[↩ Parent](#opampbridgespecenvindexvaluefrom) + + + +Selects a key of a ConfigMap. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key to select.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap or its key must be defined
+
false
+ + +### OpAMPBridge.spec.env[index].valueFrom.fieldRef +[↩ Parent](#opampbridgespecenvindexvaluefrom) + + + +Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpAMPBridge.spec.env[index].valueFrom.resourceFieldRef +[↩ Parent](#opampbridgespecenvindexvaluefrom) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpAMPBridge.spec.env[index].valueFrom.secretKeyRef +[↩ Parent](#opampbridgespecenvindexvaluefrom) + + + +Selects a key of a secret in the pod's namespace + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The key of the secret to select from. Must be a valid secret key.
+
true
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret or its key must be defined
+
false
+ + +### OpAMPBridge.spec.envFrom[index] +[↩ Parent](#opampbridgespec) + + + +EnvFromSource represents the source of a set of ConfigMaps + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapRefobject + The ConfigMap to select from
+
false
prefixstring + An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
+
false
secretRefobject + The Secret to select from
+
false
+ + +### OpAMPBridge.spec.envFrom[index].configMapRef +[↩ Parent](#opampbridgespecenvfromindex) + + + +The ConfigMap to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the ConfigMap must be defined
+
false
+ + +### OpAMPBridge.spec.envFrom[index].secretRef +[↩ Parent](#opampbridgespecenvfromindex) + + + +The Secret to select from + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + Specify whether the Secret must be defined
+
false
+ + +### OpAMPBridge.spec.podSecurityContext +[↩ Parent](#opampbridgespec) + + + +PodSecurityContext will be set as the pod security context. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsGroupinteger + A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + 1.
+
+ Format: int64
+
false
fsGroupChangePolicystring + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext.
+
false
seccompProfileobject + The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
+
false
supplementalGroups[]integer + A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for th
+
false
sysctls[]object + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used.
+
false
+ + +### OpAMPBridge.spec.podSecurityContext.seLinuxOptions +[↩ Parent](#opampbridgespecpodsecuritycontext) + + + +The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpAMPBridge.spec.podSecurityContext.seccompProfile +[↩ Parent](#opampbridgespecpodsecuritycontext) + + + +The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
+
false
+ + +### OpAMPBridge.spec.podSecurityContext.sysctls[index] +[↩ Parent](#opampbridgespecpodsecuritycontext) + + + +Sysctl defines a kernel parameter to be set + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of a property to set
+
true
valuestring + Value of a property to set
+
true
+ + +### OpAMPBridge.spec.podSecurityContext.windowsOptions +[↩ Parent](#opampbridgespecpodsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
+
false
+ + +### OpAMPBridge.spec.ports[index] +[↩ Parent](#opampbridgespec) + + + +ServicePort contains information on service's port. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portinteger + The port that will be exposed by this service.
+
+ Format: int32
+
true
appProtocolstring + The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax.
+
false
namestring + The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names.
+
false
nodePortinteger + The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system.
+
+ Format: int32
+
false
protocolstring + The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
+
+ Default: TCP
+
false
targetPortint or string + Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
false
+ + +### OpAMPBridge.spec.resources +[↩ Parent](#opampbridgespec) + + + +Resources to set on the OpAMPBridge pods. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required.
+
false
+ + +### OpAMPBridge.spec.resources.claims[index] +[↩ Parent](#opampbridgespecresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + +### OpAMPBridge.spec.securityContext +[↩ Parent](#opampbridgespec) + + + +SecurityContext will be set as the container security context. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
allowPrivilegeEscalationboolean + AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process.
+
false
capabilitiesobject + The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
+
false
privilegedboolean + Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
+
false
procMountstring + procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths.
+
false
readOnlyRootFilesystemboolean + Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext.
+
false
seccompProfileobject + The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used.
+
false
+ + +### OpAMPBridge.spec.securityContext.capabilities +[↩ Parent](#opampbridgespecsecuritycontext) + + + +The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
add[]string + Added capabilities
+
false
drop[]string + Removed capabilities
+
false
+ + +### OpAMPBridge.spec.securityContext.seLinuxOptions +[↩ Parent](#opampbridgespecsecuritycontext) + + + +The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpAMPBridge.spec.securityContext.seccompProfile +[↩ Parent](#opampbridgespecsecuritycontext) + + + +The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
+
false
+ + +### OpAMPBridge.spec.securityContext.windowsOptions +[↩ Parent](#opampbridgespecsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
+
false
+ + +### OpAMPBridge.spec.tolerations[index] +[↩ Parent](#opampbridgespec) + + + +The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
effectstring + Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
+
false
keystring + Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
+
false
operatorstring + Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal.
+
false
tolerationSecondsinteger + TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint.
+
+ Format: int64
+
false
valuestring + Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
+
false
+ + +### OpAMPBridge.spec.topologySpreadConstraints[index] +[↩ Parent](#opampbridgespec) + + + +TopologySpreadConstraint specifies how to spread matching pods among the given topology. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxSkewinteger + MaxSkew describes the degree to which pods may be unevenly distributed.
+
+ Format: int32
+
true
topologyKeystring + TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology.
+
true
whenUnsatisfiablestring + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it.
+
true
labelSelectorobject + LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated.
+
false
minDomainsinteger + MinDomains indicates a minimum number of eligible domains.
+
+ Format: int32
+
false
nodeAffinityPolicystring + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew.
+
false
nodeTaintsPolicystring + NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew.
+
false
+ + +### OpAMPBridge.spec.topologySpreadConstraints[index].labelSelector +[↩ Parent](#opampbridgespectopologyspreadconstraintsindex) + + + +LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.topologySpreadConstraints[index].labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespectopologyspreadconstraintsindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.volumeMounts[index] +[↩ Parent](#opampbridgespec) + + + +VolumeMount describes a mounting of a Volume within a container. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mountPathstring + Path within the container at which the volume should be mounted. Must not contain ':'.
+
true
namestring + This must match the Name of a Volume.
+
true
mountPropagationstring + mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
+
false
readOnlyboolean + Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
+
false
subPathstring + Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
+
false
subPathExprstring + Expanded path within the volume from which the container's volume should be mounted.
+
false
+ + +### OpAMPBridge.spec.volumes[index] +[↩ Parent](#opampbridgespec) + + + +Volume represents a named volume in a pod that may be accessed by any container in the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
+
true
awsElasticBlockStoreobject + awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
+
false
azureDiskobject + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
+
false
azureFileobject + azureFile represents an Azure File Service mount on the host and bind mount to the pod.
+
false
cephfsobject + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
+
false
cinderobject + cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
false
configMapobject + configMap represents a configMap that should populate this volume
+
false
csiobject + csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
+
false
downwardAPIobject + downwardAPI represents downward API about the pod that should populate this volume
+
false
emptyDirobject + emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+
false
ephemeralobject + ephemeral represents a volume that is handled by a cluster storage driver.
+
false
fcobject + fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
+
false
flexVolumeobject + flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
+
false
flockerobject + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
+
false
gcePersistentDiskobject + gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.
+
false
gitRepoobject + gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated.
+
false
glusterfsobject + glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
+
false
hostPathobject + hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.
+
false
iscsiobject + iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
+
false
nfsobject + nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
false
persistentVolumeClaimobject + persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.
+
false
photonPersistentDiskobject + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
+
false
portworxVolumeobject + portworxVolume represents a portworx volume attached and mounted on kubelets host machine
+
false
projectedobject + projected items for all in one resources secrets, configmaps, and downward API
+
false
quobyteobject + quobyte represents a Quobyte mount on the host that shares a pod's lifetime
+
false
rbdobject + rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
+
false
scaleIOobject + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
+
false
secretobject + secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+
false
storageosobject + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
+
false
vsphereVolumeobject + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
+
false
+ + +### OpAMPBridge.spec.volumes[index].awsElasticBlockStore +[↩ Parent](#opampbridgespecvolumesindex) + + + +awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+
true
fsTypestring + fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
+
false
partitioninteger + partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1".
+
+ Format: int32
+
false
readOnlyboolean + readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
+
false
+ + +### OpAMPBridge.spec.volumes[index].azureDisk +[↩ Parent](#opampbridgespecvolumesindex) + + + +azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
diskNamestring + diskName is the Name of the data disk in the blob storage
+
true
diskURIstring + diskURI is the URI of data disk in the blob storage
+
true
cachingModestring + cachingMode is the Host Caching mode: None, Read Only, Read Write.
+
false
fsTypestring + fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
kindstring + kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set).
+
false
readOnlyboolean + readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpAMPBridge.spec.volumes[index].azureFile +[↩ Parent](#opampbridgespecvolumesindex) + + + +azureFile represents an Azure File Service mount on the host and bind mount to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secretNamestring + secretName is the name of secret that contains Azure Storage Account Name and Key
+
true
shareNamestring + shareName is the azure share Name
+
true
readOnlyboolean + readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpAMPBridge.spec.volumes[index].cephfs +[↩ Parent](#opampbridgespecvolumesindex) + + + +cephFS represents a Ceph FS mount on the host that shares a pod's lifetime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
monitors[]string + monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
true
pathstring + path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
+
false
readOnlyboolean + readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
secretFilestring + secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
secretRefobject + secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
userstring + user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
+
false
+ + +### OpAMPBridge.spec.volumes[index].cephfs.secretRef +[↩ Parent](#opampbridgespecvolumesindexcephfs) + + + +secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].cinder +[↩ Parent](#opampbridgespecvolumesindex) + + + +cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
true
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
readOnlyboolean + readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
+
false
secretRefobject + secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.
+
false
+ + +### OpAMPBridge.spec.volumes[index].cinder.secretRef +[↩ Parent](#opampbridgespecvolumesindexcinder) + + + +secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].configMap +[↩ Parent](#opampbridgespecvolumesindex) + + + +configMap represents a configMap that should populate this volume + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
items[]object + items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + optional specify whether the ConfigMap or its keys must be defined
+
false
+ + +### OpAMPBridge.spec.volumes[index].configMap.items[index] +[↩ Parent](#opampbridgespecvolumesindexconfigmap) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the key to project.
+
true
pathstring + path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
+ + +### OpAMPBridge.spec.volumes[index].csi +[↩ Parent](#opampbridgespecvolumesindex) + + + +csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
driverstring + driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
+
true
fsTypestring + fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
+
false
nodePublishSecretRefobject + nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls.
+
false
readOnlyboolean + readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).
+
false
volumeAttributesmap[string]string + volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
+
false
+ + +### OpAMPBridge.spec.volumes[index].csi.nodePublishSecretRef +[↩ Parent](#opampbridgespecvolumesindexcsi) + + + +nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].downwardAPI +[↩ Parent](#opampbridgespecvolumesindex) + + + +downwardAPI represents downward API about the pod that should populate this volume + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default.
+
+ Format: int32
+
false
items[]object + Items is a list of downward API volume file
+
false
+ + +### OpAMPBridge.spec.volumes[index].downwardAPI.items[index] +[↩ Parent](#opampbridgespecvolumesindexdownwardapi) + + + +DownwardAPIVolumeFile represents information to create the file containing the pod field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+
true
fieldRefobject + Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+
false
modeinteger + Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+
false
+ + +### OpAMPBridge.spec.volumes[index].downwardAPI.items[index].fieldRef +[↩ Parent](#opampbridgespecvolumesindexdownwardapiitemsindex) + + + +Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpAMPBridge.spec.volumes[index].downwardAPI.items[index].resourceFieldRef +[↩ Parent](#opampbridgespecvolumesindexdownwardapiitemsindex) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpAMPBridge.spec.volumes[index].emptyDir +[↩ Parent](#opampbridgespecvolumesindex) + + + +emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
mediumstring + medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory.
+
false
sizeLimitint or string + sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral +[↩ Parent](#opampbridgespecvolumesindex) + + + +ephemeral represents a volume that is handled by a cluster storage driver. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeClaimTemplateobject + Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate +[↩ Parent](#opampbridgespecvolumesindexephemeral) + + + +Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
specobject + The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template.
+
true
metadataobject + May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplate) + + + +The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
accessModes[]string + accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
+
false
dataSourceobject + dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.
+
false
dataSourceRefobject + dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
+
false
resourcesobject + resources represents the minimum resources the volume should have.
+
false
selectorobject + selector is a label query over volumes to consider for binding.
+
false
storageClassNamestring + storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+
false
volumeModestring + volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
+
false
volumeNamestring + volumeName is the binding reference to the PersistentVolume backing this claim.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSource +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespec) + + + +dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSourceRef +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespec) + + + +dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
kindstring + Kind is the type of resource being referenced
+
true
namestring + Name is the name of resource being referenced
+
true
apiGroupstring + APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
+
false
namespacestring + Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespec) + + + +resources represents the minimum resources the volume should have. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claims[]object + Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
+
false
limitsmap[string]int or string + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
+
false
requestsmap[string]int or string + Requests describes the minimum amount of compute resources required.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources.claims[index] +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespecresources) + + + +ResourceClaim references one entry in PodSpec.ResourceClaims. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
+
true
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespec) + + + +selector is a label query over volumes to consider for binding. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector.matchExpressions[index] +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespecselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.metadata +[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplate) + + + +May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
annotationsmap[string]string +
+
false
finalizers[]string +
+
false
labelsmap[string]string +
+
false
namestring +
+
false
namespacestring +
+
false
+ + +### OpAMPBridge.spec.volumes[index].fc +[↩ Parent](#opampbridgespecvolumesindex) + + + +fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
luninteger + lun is Optional: FC target lun number
+
+ Format: int32
+
false
readOnlyboolean + readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
targetWWNs[]string + targetWWNs is Optional: FC target worldwide names (WWNs)
+
false
wwids[]string + wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
+
false
+ + +### OpAMPBridge.spec.volumes[index].flexVolume +[↩ Parent](#opampbridgespecvolumesindex) + + + +flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
driverstring + driver is the name of the driver to use for this volume.
+
true
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
+
false
optionsmap[string]string + options is Optional: this field holds extra command options if any.
+
false
readOnlyboolean + readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
secretRefobject + secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified.
+
false
+ + +### OpAMPBridge.spec.volumes[index].flexVolume.secretRef +[↩ Parent](#opampbridgespecvolumesindexflexvolume) + + + +secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].flocker +[↩ Parent](#opampbridgespecvolumesindex) + + + +flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
datasetNamestring + datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated
+
false
datasetUUIDstring + datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset
+
false
+ + +### OpAMPBridge.spec.volumes[index].gcePersistentDisk +[↩ Parent](#opampbridgespecvolumesindex) + + + +gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pdNamestring + pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
true
fsTypestring + fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
+
false
partitioninteger + partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1".
+
+ Format: int32
+
false
readOnlyboolean + readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
+
false
+ + +### OpAMPBridge.spec.volumes[index].gitRepo +[↩ Parent](#opampbridgespecvolumesindex) + + + +gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
repositorystring + repository is the URL
+
true
directorystring + directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository.
+
false
revisionstring + revision is the commit hash for the specified revision.
+
false
+ + +### OpAMPBridge.spec.volumes[index].glusterfs +[↩ Parent](#opampbridgespecvolumesindex) + + + +glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
endpointsstring + endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
true
pathstring + path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
true
readOnlyboolean + readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
+
false
+ + +### OpAMPBridge.spec.volumes[index].hostPath +[↩ Parent](#opampbridgespecvolumesindex) + + + +hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+
true
typestring + type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
+
false
+ + +### OpAMPBridge.spec.volumes[index].iscsi +[↩ Parent](#opampbridgespecvolumesindex) + + + +iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
iqnstring + iqn is the target iSCSI Qualified Name.
+
true
luninteger + lun represents iSCSI Target Lun number.
+
+ Format: int32
+
true
targetPortalstring + targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+
true
chapAuthDiscoveryboolean + chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
+
false
chapAuthSessionboolean + chapAuthSession defines whether support iSCSI Session CHAP authentication
+
false
fsTypestring + fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
+
false
initiatorNamestring + initiatorName is the custom iSCSI Initiator Name.
+
false
iscsiInterfacestring + iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
+
false
portals[]string + portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
+
false
readOnlyboolean + readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
+
false
secretRefobject + secretRef is the CHAP Secret for iSCSI target and initiator authentication
+
false
+ + +### OpAMPBridge.spec.volumes[index].iscsi.secretRef +[↩ Parent](#opampbridgespecvolumesindexiscsi) + + + +secretRef is the CHAP Secret for iSCSI target and initiator authentication + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].nfs +[↩ Parent](#opampbridgespecvolumesindex) + + + +nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
true
serverstring + server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
true
readOnlyboolean + readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
+
false
+ + +### OpAMPBridge.spec.volumes[index].persistentVolumeClaim +[↩ Parent](#opampbridgespecvolumesindex) + + + +persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
claimNamestring + claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
+
true
readOnlyboolean + readOnly Will force the ReadOnly setting in VolumeMounts. Default false.
+
false
+ + +### OpAMPBridge.spec.volumes[index].photonPersistentDisk +[↩ Parent](#opampbridgespecvolumesindex) + + + +photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pdIDstring + pdID is the ID that identifies Photon Controller persistent disk
+
true
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
+ + +### OpAMPBridge.spec.volumes[index].portworxVolume +[↩ Parent](#opampbridgespecvolumesindex) + + + +portworxVolume represents a portworx volume attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeIDstring + volumeID uniquely identifies a Portworx volume
+
true
fsTypestring + fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
+
false
readOnlyboolean + readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected +[↩ Parent](#opampbridgespecvolumesindex) + + + +projected items for all in one resources secrets, configmaps, and downward API + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
sources[]object + sources is the list of volume projections
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index] +[↩ Parent](#opampbridgespecvolumesindexprojected) + + + +Projection that may be projected along with other supported volume types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
configMapobject + configMap information about the configMap data to project
+
false
downwardAPIobject + downwardAPI information about the downwardAPI data to project
+
false
secretobject + secret information about the secret data to project
+
false
serviceAccountTokenobject + serviceAccountToken is information about the serviceAccountToken data to project
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].configMap +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) + + + +configMap information about the configMap data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + optional specify whether the ConfigMap or its keys must be defined
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].configMap.items[index] +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexconfigmap) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the key to project.
+
true
pathstring + path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].downwardAPI +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) + + + +downwardAPI information about the downwardAPI data to project + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + Items is a list of DownwardAPIVolume file
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].downwardAPI.items[index] +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexdownwardapi) + + + +DownwardAPIVolumeFile represents information to create the file containing the pod field + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
+
true
fieldRefobject + Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
+
false
modeinteger + Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
resourceFieldRefobject + Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].downwardAPI.items[index].fieldRef +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexdownwardapiitemsindex) + + + +Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fieldPathstring + Path of the field to select in the specified API version.
+
true
apiVersionstring + Version of the schema the FieldPath is written in terms of, defaults to "v1".
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].downwardAPI.items[index].resourceFieldRef +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexdownwardapiitemsindex) + + + +Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
resourcestring + Required: resource to select
+
true
containerNamestring + Container name: required for volumes, optional for env vars
+
false
divisorint or string + Specifies the output format of the exposed resources, defaults to "1"
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].secret +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) + + + +secret information about the secret data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
items[]object + items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value.
+
false
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
optionalboolean + optional field specify whether the Secret or its key must be defined
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].secret.items[index] +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexsecret) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the key to project.
+
true
pathstring + path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].serviceAccountToken +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) + + + +serviceAccountToken is information about the serviceAccountToken data to project + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + path is the path relative to the mount point of the file to project the token into.
+
true
audiencestring + audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token.
+
false
expirationSecondsinteger + expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token.
+
+ Format: int64
+
false
+ + +### OpAMPBridge.spec.volumes[index].quobyte +[↩ Parent](#opampbridgespecvolumesindex) + + + +quobyte represents a Quobyte mount on the host that shares a pod's lifetime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
registrystring + registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
+
true
volumestring + volume is a string that references an already created Quobyte volume by name.
+
true
groupstring + group to map volume access to Default is no group
+
false
readOnlyboolean + readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
+
false
tenantstring + tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
+
false
userstring + user to map volume access to Defaults to serivceaccount user
+
false
+ + +### OpAMPBridge.spec.volumes[index].rbd +[↩ Parent](#opampbridgespecvolumesindex) + + + +rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
imagestring + image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
true
monitors[]string + monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
true
fsTypestring + fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs".
+
false
keyringstring + keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
poolstring + pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
readOnlyboolean + readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
secretRefobject + secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
userstring + user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
+
false
+ + +### OpAMPBridge.spec.volumes[index].rbd.secretRef +[↩ Parent](#opampbridgespecvolumesindexrbd) + + + +secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].scaleIO +[↩ Parent](#opampbridgespecvolumesindex) + + + +scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gatewaystring + gateway is the host address of the ScaleIO API Gateway.
+
true
secretRefobject + secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
+
true
systemstring + system is the name of the storage system as configured in ScaleIO.
+
true
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
+
false
protectionDomainstring + protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
+
false
readOnlyboolean + readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
sslEnabledboolean + sslEnabled Flag enable/disable SSL communication with Gateway, default false
+
false
storageModestring + storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
+
false
storagePoolstring + storagePool is the ScaleIO Storage Pool associated with the protection domain.
+
false
volumeNamestring + volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
+
false
+ + +### OpAMPBridge.spec.volumes[index].scaleIO.secretRef +[↩ Parent](#opampbridgespecvolumesindexscaleio) + + + +secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].secret +[↩ Parent](#opampbridgespecvolumesindex) + + + +secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
defaultModeinteger + defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
items[]object + items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value.
+
false
optionalboolean + optional field specify whether the Secret or its keys must be defined
+
false
secretNamestring + secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
+
false
+ + +### OpAMPBridge.spec.volumes[index].secret.items[index] +[↩ Parent](#opampbridgespecvolumesindexsecret) + + + +Maps a string key to a path within a volume. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the key to project.
+
true
pathstring + path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
+
true
modeinteger + mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
+
+ Format: int32
+
false
+ + +### OpAMPBridge.spec.volumes[index].storageos +[↩ Parent](#opampbridgespecvolumesindex) + + + +storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsTypestring + fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
readOnlyboolean + readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
+
false
secretRefobject + secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
+
false
volumeNamestring + volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
+
false
volumeNamespacestring + volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used.
+
false
+ + +### OpAMPBridge.spec.volumes[index].storageos.secretRef +[↩ Parent](#opampbridgespecvolumesindexstorageos) + + + +secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
+
false
+ + +### OpAMPBridge.spec.volumes[index].vsphereVolume +[↩ Parent](#opampbridgespecvolumesindex) + + + +vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumePathstring + volumePath is the path that identifies vSphere volume vmdk
+
true
fsTypestring + fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
+
false
storagePolicyIDstring + storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
+
false
storagePolicyNamestring + storagePolicyName is the storage Policy Based Management (SPBM) profile name.
+
false
+ + +### OpAMPBridge.status +[↩ Parent](#opampbridge) + + + +OpAMPBridgeStatus defines the observed state of OpAMPBridge. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
versionstring + Version of the managed OpAMP Bridge (operand)
+
false
+ ## OpenTelemetryCollector [↩ Parent](#opentelemetryiov1alpha1 ) diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 89f03c7a9..122744090 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -7,3 +7,5 @@ ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCA ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml ${SED_BIN} -i "s#local/opentelemetry-operator:e2e#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml + +${SED_BIN} -i "s#local/opentelemetry-operator-opamp-bridge:e2e#${OPERATOROPAMPBRIDGE_IMG}#g" tests/e2e-opampbridge/opampbridge/*.yaml \ No newline at end of file diff --git a/internal/config/main.go b/internal/config/main.go index 3c2c59414..7abb1296a 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -27,9 +27,10 @@ import ( ) const ( - defaultAutoDetectFrequency = 5 * time.Second - defaultCollectorConfigMapEntry = "collector.yaml" - defaultTargetAllocatorConfigMapEntry = "targetallocator.yaml" + defaultAutoDetectFrequency = 5 * time.Second + defaultCollectorConfigMapEntry = "collector.yaml" + defaultTargetAllocatorConfigMapEntry = "targetallocator.yaml" + defaultOperatorOpAMPBridgeConfigMapEntry = "remoteconfiguration.yaml" ) // Config holds the static configuration for this operator. @@ -46,6 +47,7 @@ type Config struct { autoInstrumentationApacheHttpdImage string autoInstrumentationNginxImage string targetAllocatorConfigMapEntry string + operatorOpAMPBridgeConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string onOpenShiftRoutesChange changeHandler @@ -58,13 +60,14 @@ type Config struct { func New(opts ...Option) Config { // initialize with the default values o := options{ - autoDetectFrequency: defaultAutoDetectFrequency, - collectorConfigMapEntry: defaultCollectorConfigMapEntry, - targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, - logger: logf.Log.WithName("config"), - openshiftRoutes: newOpenShiftRoutesWrapper(), - version: version.Get(), - onOpenShiftRoutesChange: newOnChange(), + autoDetectFrequency: defaultAutoDetectFrequency, + collectorConfigMapEntry: defaultCollectorConfigMapEntry, + targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, + operatorOpAMPBridgeConfigMapEntry: defaultOperatorOpAMPBridgeConfigMapEntry, + logger: logf.Log.WithName("config"), + openshiftRoutes: newOpenShiftRoutesWrapper(), + version: version.Get(), + onOpenShiftRoutesChange: newOnChange(), } for _, opt := range opts { opt(&o) @@ -78,6 +81,7 @@ func New(opts ...Option) Config { targetAllocatorImage: o.targetAllocatorImage, operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, + operatorOpAMPBridgeConfigMapEntry: o.operatorOpAMPBridgeConfigMapEntry, logger: o.logger, openshiftRoutes: o.openshiftRoutes, onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, @@ -147,11 +151,21 @@ func (c *Config) TargetAllocatorImage() string { return c.targetAllocatorImage } +// OperatorOpAMPBridgeImage represents the flag to override the OpAMPBridge container image. +func (c *Config) OperatorOpAMPBridgeImage() string { + return c.operatorOpAMPBridgeImage +} + // TargetAllocatorConfigMapEntry represents the configuration file name for the TargetAllocator. Immutable. func (c *Config) TargetAllocatorConfigMapEntry() string { return c.targetAllocatorConfigMapEntry } +// OperatorOpAMPBridgeImageConfigMapEntry represents the configuration file name for the OpAMPBridge. Immutable. +func (c *Config) OperatorOpAMPBridgeConfigMapEntry() string { + return c.operatorOpAMPBridgeConfigMapEntry +} + // OpenShiftRoutes represents the availability of the OpenShift Routes API. func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability { return c.openshiftRoutes.Get() diff --git a/internal/config/options.go b/internal/config/options.go index 3d0e207af..5d172ccd6 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -42,6 +42,7 @@ type options struct { collectorImage string collectorConfigMapEntry string targetAllocatorConfigMapEntry string + operatorOpAMPBridgeConfigMapEntry string targetAllocatorImage string operatorOpAMPBridgeImage string onOpenShiftRoutesChange changeHandler @@ -85,6 +86,11 @@ func WithTargetAllocatorConfigMapEntry(s string) Option { o.targetAllocatorConfigMapEntry = s } } +func WithOperatorOpAMPBridgeConfigMapEntry(s string) Option { + return func(o *options) { + o.operatorOpAMPBridgeConfigMapEntry = s + } +} func WithLogger(logger logr.Logger) Option { return func(o *options) { o.logger = logger diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index c6fd4475e..a2e032572 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -79,6 +79,7 @@ func Routes(params manifests.Params) []*routev1.Route { "app.kubernetes.io/name": naming.Route(params.OtelCol.Name, p.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/component": "opentelemetry-collector", }, }, Spec: routev1.RouteSpec{ diff --git a/internal/manifests/opampbridge/configmap.go b/internal/manifests/opampbridge/configmap.go new file mode 100644 index 000000000..5f5c678a3 --- /dev/null +++ b/internal/manifests/opampbridge/configmap.go @@ -0,0 +1,71 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "strings" + + "gopkg.in/yaml.v2" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { + name := naming.OpAMPBridgeConfigMap(params.OpAMPBridge.Name) + version := strings.Split(params.OpAMPBridge.Spec.Image, ":") + labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) + + if len(version) > 1 { + labels["app.kubernetes.io/version"] = version[len(version)-1] + } else { + labels["app.kubernetes.io/version"] = "latest" + } + + config := make(map[interface{}]interface{}) + + if len(params.OpAMPBridge.Spec.Endpoint) > 0 { + config["endpoint"] = params.OpAMPBridge.Spec.Endpoint + } + + if params.OpAMPBridge.Spec.Capabilities != nil { + config["capabilities"] = params.OpAMPBridge.Spec.Capabilities + } + + if params.OpAMPBridge.Spec.ComponentsAllowed != nil { + config["componentsAllowed"] = params.OpAMPBridge.Spec.ComponentsAllowed + } + + configYAML, err := yaml.Marshal(config) + if err != nil { + return &corev1.ConfigMap{}, err + } + + return &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.OpAMPBridge.Namespace, + Labels: labels, + Annotations: params.OpAMPBridge.Annotations, + }, + Data: map[string]string{ + "remoteconfiguration.yaml": string(configYAML), + }, + }, nil +} diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go new file mode 100644 index 000000000..8089f3fdb --- /dev/null +++ b/internal/manifests/opampbridge/configmap_test.go @@ -0,0 +1,104 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "testing" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + + "github.com/stretchr/testify/assert" +) + +func TestDesiredConfigMap(t *testing.T) { + expectedLables := map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "0.69.0", + } + + t.Run("should return expected opamp-bridge config map", func(t *testing.T) { + expectedLables["app.kubernetes.io/component"] = "opentelemetry-opamp-bridge" + expectedLables["app.kubernetes.io/name"] = "my-instance-opamp-bridge" + + expectedData := map[string]string{ + "remoteconfiguration.yaml": `capabilities: + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRemoteConfig: true + AcceptsRestartCommand: true + ReportsEffectiveConfig: true + ReportsHealth: true + ReportsOwnLogs: true + ReportsOwnMetrics: true + ReportsOwnTraces: true + ReportsRemoteConfig: true + ReportsStatus: true +componentsAllowed: + exporters: + - logging + processors: + - memory_limiter + receivers: + - otlp +endpoint: ws://opamp-server:4320/v1/opamp +`} + + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.69.0", + Endpoint: "ws://opamp-server:4320/v1/opamp", + Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ + v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, + v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, + v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, + v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, + v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, + }, + ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, + }, + } + + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge, + Log: logger, + } + + actual, err := ConfigMap(params) + assert.NoError(t, err) + + assert.Equal(t, "my-instance-opamp-bridge", actual.Name) + assert.Equal(t, expectedLables, actual.Labels) + assert.Equal(t, expectedData, actual.Data) + }) +} diff --git a/internal/manifests/opampbridge/container.go b/internal/manifests/opampbridge/container.go new file mode 100644 index 000000000..131eb040d --- /dev/null +++ b/internal/manifests/opampbridge/container.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "github.com/go-logr/logr" + "github.com/operator-framework/operator-lib/proxy" + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// Container builds a container for the given OpAMPBridge. +func Container(cfg config.Config, logger logr.Logger, opampBridge v1alpha1.OpAMPBridge) corev1.Container { + image := opampBridge.Spec.Image + if len(image) == 0 { + image = cfg.OperatorOpAMPBridgeImage() + } + + volumeMounts := []corev1.VolumeMount{{ + Name: naming.OpAMPBridgeConfigMapVolume(), + MountPath: "/conf", + }} + + if len(opampBridge.Spec.VolumeMounts) > 0 { + volumeMounts = append(volumeMounts, opampBridge.Spec.VolumeMounts...) + } + + var envVars = opampBridge.Spec.Env + if opampBridge.Spec.Env == nil { + envVars = []corev1.EnvVar{} + } + + idx := -1 + for i := range envVars { + if envVars[i].Name == "OTELCOL_NAMESPACE" { + idx = i + } + } + if idx == -1 { + envVars = append(envVars, corev1.EnvVar{ + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }) + } + + envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) + + return corev1.Container{ + Name: naming.OpAMPBridgeContainer(), + Image: image, + ImagePullPolicy: opampBridge.Spec.ImagePullPolicy, + Env: envVars, + VolumeMounts: volumeMounts, + EnvFrom: opampBridge.Spec.EnvFrom, + Resources: opampBridge.Spec.Resources, + SecurityContext: opampBridge.Spec.SecurityContext, + } +} diff --git a/internal/manifests/opampbridge/container_test.go b/internal/manifests/opampbridge/container_test.go new file mode 100644 index 000000000..03f87d9cf --- /dev/null +++ b/internal/manifests/opampbridge/container_test.go @@ -0,0 +1,74 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "testing" + + "github.com/stretchr/testify/assert" + logf "sigs.k8s.io/controller-runtime/pkg/log" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +var logger = logf.Log.WithName("unit-tests") + +func TestContainerNewDefault(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{} + cfg := config.New(config.WithOperatorOpAMPBridgeImage("default-image")) + + // test + c := Container(cfg, logger, opampBridge) + + // verify + assert.Equal(t, "default-image", c.Image) +} + +func TestContainerWithImageOverridden(t *testing.T) { + // prepare + otelcol := v1alpha1.OpAMPBridge{ + Spec: v1alpha1.OpAMPBridgeSpec{ + Image: "overridden-image", + }, + } + + cfg := config.New(config.WithOperatorOpAMPBridgeImage("default-image")) + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, "overridden-image", c.Image) +} + +func TestContainerVolumes(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{ + Spec: v1alpha1.OpAMPBridgeSpec{ + Image: "default-image", + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, opampBridge) + + // verify + assert.Len(t, c.VolumeMounts, 1) + assert.Equal(t, naming.OpAMPBridgeConfigMapVolume(), c.VolumeMounts[0].Name) +} diff --git a/internal/manifests/opampbridge/deployment.go b/internal/manifests/opampbridge/deployment.go new file mode 100644 index 000000000..81c1e908a --- /dev/null +++ b/internal/manifests/opampbridge/deployment.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// Deployment builds the deployment for the given instance. +func Deployment(params manifests.Params) *appsv1.Deployment { + name := naming.OpAMPBridge(params.OpAMPBridge.Name) + labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, params.Config.LabelsFilter()) + + return &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.OpAMPBridge.Namespace, + Labels: labels, + Annotations: params.OpAMPBridge.Annotations, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: params.OpAMPBridge.Spec.Replicas, + Selector: &metav1.LabelSelector{ + MatchLabels: manifestutils.SelectorLabels(params.OpAMPBridge.ObjectMeta, ComponentOpAMPBridge), + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: labels, + Annotations: params.OpAMPBridge.Spec.PodAnnotations, + }, + Spec: corev1.PodSpec{ + ServiceAccountName: ServiceAccountName(params.OpAMPBridge), + Containers: []corev1.Container{Container(params.Config, params.Log, params.OpAMPBridge)}, + Volumes: Volumes(params.Config, params.OpAMPBridge), + DNSPolicy: getDNSPolicy(params.OpAMPBridge), + HostNetwork: params.OpAMPBridge.Spec.HostNetwork, + Tolerations: params.OpAMPBridge.Spec.Tolerations, + NodeSelector: params.OpAMPBridge.Spec.NodeSelector, + SecurityContext: params.OpAMPBridge.Spec.PodSecurityContext, + PriorityClassName: params.OpAMPBridge.Spec.PriorityClassName, + Affinity: params.OpAMPBridge.Spec.Affinity, + TopologySpreadConstraints: params.OpAMPBridge.Spec.TopologySpreadConstraints, + }, + }, + }, + } +} diff --git a/internal/manifests/opampbridge/deployment_test.go b/internal/manifests/opampbridge/deployment_test.go new file mode 100644 index 000000000..4ec3f07de --- /dev/null +++ b/internal/manifests/opampbridge/deployment_test.go @@ -0,0 +1,425 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +var testTolerationValues = []v1.Toleration{ + { + Key: "hii", + Value: "greeting", + Effect: "NoSchedule", + }, +} + +var testAffinityValue = &v1.Affinity{ + NodeAffinity: &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "node", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-node"}, + }, + }, + }, + }, + }, + }, +} + +var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ + { + MaxSkew: 1, + TopologyKey: "kubernetes.io/hostname", + WhenUnsatisfiable: "DoNotSchedule", + LabelSelector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + "foo": "bar", + }, + }, + }, +} + +func TestDeploymentNewDefault(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Tolerations: testTolerationValues, + }, + } + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge, + Log: logger, + } + + // test + d := Deployment(params) + + // verify + assert.Equal(t, "my-instance-opamp-bridge", d.Name) + assert.Equal(t, "my-instance-opamp-bridge", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, testTolerationValues, d.Spec.Template.Spec.Tolerations) + + assert.Len(t, d.Spec.Template.Spec.Containers, 1) + + expectedLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "my-instance-opamp-bridge", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + } + assert.Equal(t, expectedLabels, d.Spec.Template.Labels) + + expectedSelectorLabels := map[string]string{ + "app.kubernetes.io/component": "opentelemetry-opamp-bridge", + "app.kubernetes.io/instance": "my-namespace.my-instance", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + } + assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) + + // the pod selector must be contained within pod spec's labels + for k, v := range d.Spec.Selector.MatchLabels { + assert.Equal(t, v, d.Spec.Template.Labels[k]) + } +} + +func TestDeploymentPodAnnotations(t *testing.T) { + // prepare + testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + PodAnnotations: testPodAnnotationValues, + }, + } + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge, + Log: logger, + } + + // test + d := Deployment(params) + + // verify + assert.Len(t, d.Spec.Template.Annotations, 1) + assert.Equal(t, "my-instance-opamp-bridge", d.Name) + assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) +} + +func TestDeploymentPodSecurityContext(t *testing.T) { + runAsNonRoot := true + runAsUser := int64(1337) + runasGroup := int64(1338) + + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + PodSecurityContext: &v1.PodSecurityContext{ + RunAsNonRoot: &runAsNonRoot, + RunAsUser: &runAsUser, + RunAsGroup: &runasGroup, + }, + }, + } + + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge, + Log: logger, + } + + d := Deployment(params) + + assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) + assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) + assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) +} + +func TestDeploymentHostNetwork(t *testing.T) { + // Test default + opampBridge1 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge1, + Log: logger, + } + + d1 := Deployment(params1) + + assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) + assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) + + // Test hostNetwork=true + opampBridge2 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-hostnetwork", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + HostNetwork: true, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge2, + Log: logger, + } + + d2 := Deployment(params2) + assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) + assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) +} + +func TestDeploymentFilterLabels(t *testing.T) { + excludedLabels := map[string]string{ + "foo": "1", + "app.foo.bar": "1", + } + + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Labels: excludedLabels, + }, + Spec: v1alpha1.OpAMPBridgeSpec{}, + } + + cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) + + params := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge, + Log: logger, + } + + d := Deployment(params) + + assert.Len(t, d.ObjectMeta.Labels, 6) + for k := range excludedLabels { + assert.NotContains(t, d.ObjectMeta.Labels, k) + } +} + +func TestDeploymentNodeSelector(t *testing.T) { + // Test default + opampBridge1 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge1, + Log: logger, + } + + d1 := Deployment(params1) + + assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) + + // Test nodeSelector + opampBridge2 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-nodeselector", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + HostNetwork: true, + NodeSelector: map[string]string{ + "node-key": "node-value", + }, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge2, + Log: logger, + } + + d2 := Deployment(params2) + assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) +} + +func TestDeploymentPriorityClassName(t *testing.T) { + opampBridge1 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge1, + Log: logger, + } + + d1 := Deployment(params1) + assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) + + priorityClassName := "test-class" + + opampBridge2 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + PriorityClassName: priorityClassName, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge2, + Log: logger, + } + + d2 := Deployment(params2) + assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) +} + +func TestDeploymentAffinity(t *testing.T) { + opampBridge1 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge1, + Log: logger, + } + + d1 := Deployment(params1) + assert.Nil(t, d1.Spec.Template.Spec.Affinity) + + opampBridge2 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-priortyClassName", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + Affinity: testAffinityValue, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge2, + Log: logger, + } + + d2 := Deployment(params2) + assert.NotNil(t, d2.Spec.Template.Spec.Affinity) + assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) +} + +func TestDeploymentTopologySpreadConstraints(t *testing.T) { + // Test default + opampBridge1 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge1, + Log: logger, + } + + d1 := Deployment(params1) + assert.Equal(t, "my-instance-opamp-bridge", d1.Name) + assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) + + // Test TopologySpreadConstraints + opampBridge2 := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-topologyspreadconstraint", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + TopologySpreadConstraints: testTopologySpreadConstraintValue, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + Config: cfg, + OpAMPBridge: opampBridge2, + Log: logger, + } + + d2 := Deployment(params2) + assert.Equal(t, "my-instance-topologyspreadconstraint-opamp-bridge", d2.Name) + assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) + assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) +} diff --git a/internal/manifests/opampbridge/opampbridge.go b/internal/manifests/opampbridge/opampbridge.go new file mode 100644 index 000000000..5e8573b11 --- /dev/null +++ b/internal/manifests/opampbridge/opampbridge.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +const ( + ComponentOpAMPBridge = "opentelemetry-opamp-bridge" +) + +// Build creates the manifest for the OpAMPBridge resource. +func Build(params manifests.Params) ([]client.Object, error) { + var resourceManifests []client.Object + resourceFactories := []manifests.K8sManifestFactory{ + manifests.FactoryWithoutError(Deployment), + manifests.Factory(ConfigMap), + manifests.FactoryWithoutError(ServiceAccount), + manifests.FactoryWithoutError(Service), + } + for _, factory := range resourceFactories { + res, err := factory(params) + if err != nil { + return nil, err + } else if manifests.ObjectIsNotNil(res) { + resourceManifests = append(resourceManifests, res) + } + } + return resourceManifests, nil +} diff --git a/internal/manifests/opampbridge/service.go b/internal/manifests/opampbridge/service.go new file mode 100644 index 000000000..0c2a7dd9a --- /dev/null +++ b/internal/manifests/opampbridge/service.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func Service(params manifests.Params) *corev1.Service { + name := naming.OpAMPBridgeService(params.OpAMPBridge.Name) + labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) + selector := manifestutils.SelectorLabels(params.OpAMPBridge.ObjectMeta, ComponentOpAMPBridge) + + ports := []corev1.ServicePort{{ + Name: "opamp-bridge", + Port: 80, + TargetPort: intstr.FromInt(8080), + }} + + ports = append(params.OpAMPBridge.Spec.Ports, ports...) + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.OpAMPBridge.Namespace, + Labels: labels, + }, + Spec: corev1.ServiceSpec{ + Selector: selector, + Ports: ports, + }, + } +} diff --git a/internal/manifests/opampbridge/serviceaccount.go b/internal/manifests/opampbridge/serviceaccount.go new file mode 100644 index 000000000..f5b023692 --- /dev/null +++ b/internal/manifests/opampbridge/serviceaccount.go @@ -0,0 +1,48 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. +func ServiceAccountName(instance v1alpha1.OpAMPBridge) string { + if len(instance.Spec.ServiceAccount) == 0 { + return naming.OpAMPBridgeServiceAccount(instance.Name) + } + return instance.Spec.ServiceAccount +} + +// ServiceAccount returns the service account for the given instance. +func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { + name := naming.OpAMPBridgeServiceAccount(params.OpAMPBridge.Name) + labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) + + return &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: params.OpAMPBridge.Namespace, + Labels: labels, + Annotations: params.OpAMPBridge.Annotations, + }, + } +} diff --git a/internal/manifests/opampbridge/serviceaccount_test.go b/internal/manifests/opampbridge/serviceaccount_test.go new file mode 100644 index 000000000..e3f6c7e05 --- /dev/null +++ b/internal/manifests/opampbridge/serviceaccount_test.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func TestServiceAccountNewDefault(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + // test + sa := ServiceAccountName(opampBridge) + + // verify + assert.Equal(t, "my-instance-opamp-bridge", sa) +} + +func TestServiceAccountOverride(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpAMPBridgeSpec{ + ServiceAccount: "my-special-sa", + }, + } + + // test + sa := ServiceAccountName(opampBridge) + + // verify + assert.Equal(t, "my-special-sa", sa) +} diff --git a/internal/manifests/opampbridge/utils.go b/internal/manifests/opampbridge/utils.go new file mode 100644 index 000000000..2400e0101 --- /dev/null +++ b/internal/manifests/opampbridge/utils.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +func getDNSPolicy(opampBridge v1alpha1.OpAMPBridge) corev1.DNSPolicy { + dnsPolicy := corev1.DNSClusterFirst + if opampBridge.Spec.HostNetwork { + dnsPolicy = corev1.DNSClusterFirstWithHostNet + } + return dnsPolicy +} diff --git a/internal/manifests/opampbridge/volume.go b/internal/manifests/opampbridge/volume.go new file mode 100644 index 000000000..eac9d5081 --- /dev/null +++ b/internal/manifests/opampbridge/volume.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// Volumes builds the volumes for the given instance, including the config map volume. +func Volumes(cfg config.Config, opampBridge v1alpha1.OpAMPBridge) []corev1.Volume { + volumes := []corev1.Volume{{ + Name: naming.OpAMPBridgeConfigMapVolume(), + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{Name: naming.OpAMPBridgeConfigMap(opampBridge.Name)}, + Items: []corev1.KeyToPath{ + { + Key: cfg.OperatorOpAMPBridgeConfigMapEntry(), + Path: cfg.OperatorOpAMPBridgeConfigMapEntry(), + }, + }, + }, + }, + }} + + return volumes +} diff --git a/internal/manifests/opampbridge/volume_test.go b/internal/manifests/opampbridge/volume_test.go new file mode 100644 index 000000000..17fefb3d5 --- /dev/null +++ b/internal/manifests/opampbridge/volume_test.go @@ -0,0 +1,43 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +func TestVolumeNewDefault(t *testing.T) { + // prepare + opampBridge := v1alpha1.OpAMPBridge{} + cfg := config.New() + + // test + volumes := Volumes(cfg, opampBridge) + + // verify + assert.Len(t, volumes, 1) + + // check if the number of elements in the volume source items list is 1 + assert.Len(t, volumes[0].VolumeSource.ConfigMap.Items, 1) + + // check that it's the opamp-bridge-internal volume, with the config map + assert.Equal(t, naming.OpAMPBridgeConfigMapVolume(), volumes[0].Name) +} diff --git a/internal/manifests/params.go b/internal/manifests/params.go index ac0156903..a7b377e4f 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -26,10 +26,11 @@ import ( // Params holds the reconciliation-specific parameters. type Params struct { - Client client.Client - Recorder record.EventRecorder - Scheme *runtime.Scheme - Log logr.Logger - OtelCol v1alpha1.OpenTelemetryCollector - Config config.Config + Client client.Client + Recorder record.EventRecorder + Scheme *runtime.Scheme + Log logr.Logger + OtelCol v1alpha1.OpenTelemetryCollector + OpAMPBridge v1alpha1.OpAMPBridge + Config config.Config } diff --git a/internal/naming/main.go b/internal/naming/main.go index 1df0bc2f6..a4c9188ae 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -25,6 +25,11 @@ func TAConfigMap(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } +// OpAMPBridgeConfigMap builds the name for the config map used in the OpAMPBridge containers. +func OpAMPBridgeConfigMap(opampBridge string) string { + return DNSName(Truncate("%s-opamp-bridge", 63, opampBridge)) +} + // ConfigMapVolume returns the name to use for the config map's volume in the pod. func ConfigMapVolume() string { return "otc-internal" @@ -40,6 +45,11 @@ func TAConfigMapVolume() string { return "ta-internal" } +// OpAMPBridgeConfigMapVolume returns the name to use for the config map's volume in the OpAMPBridge pod. +func OpAMPBridgeConfigMapVolume() string { + return "opamp-bridge-internal" +} + // Container returns the name to use for the container in the pod. func Container() string { return "otc-container" @@ -50,6 +60,11 @@ func TAContainer() string { return "ta-container" } +// OpAMPBridgeContainer returns the name to use for the container in the OpAMPBridge pod. +func OpAMPBridgeContainer() string { + return "opamp-bridge-container" +} + // Collector builds the collector (deployment/daemonset) name based on the instance. func Collector(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) @@ -80,6 +95,11 @@ func TargetAllocator(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } +// OpAMPBridge returns the OpAMPBridge deployment resource name. +func OpAMPBridge(opampBridge string) string { + return DNSName(Truncate("%s-opamp-bridge", 63, opampBridge)) +} + // HeadlessService builds the name for the headless service based on the instance. func HeadlessService(otelcol string) string { return DNSName(Truncate("%s-headless", 63, Service(otelcol))) @@ -110,6 +130,11 @@ func TAService(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } +// OpAMPBridgeService returns the name to use for the OpAMPBridge service. +func OpAMPBridgeService(opampBridge string) string { + return DNSName(Truncate("%s-opamp-bridge", 63, opampBridge)) +} + // ServiceAccount builds the service account name based on the instance. func ServiceAccount(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) @@ -124,3 +149,8 @@ func ServiceMonitor(otelcol string) string { func TargetAllocatorServiceAccount(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } + +// OpAMPBridgeServiceAccount builds the service account name based on the instance. +func OpAMPBridgeServiceAccount(opampBridge string) string { + return DNSName(Truncate("%s-opamp-bridge", 63, opampBridge)) +} diff --git a/internal/status/collector.go b/internal/status/collector/collector.go similarity index 99% rename from internal/status/collector.go rename to internal/status/collector/collector.go index 8e18b08b1..cdebae02d 100644 --- a/internal/status/collector.go +++ b/internal/status/collector/collector.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package status +package collector import ( "context" diff --git a/internal/status/handle.go b/internal/status/collector/handle.go similarity index 99% rename from internal/status/handle.go rename to internal/status/collector/handle.go index cb9e75f23..b20b03d24 100644 --- a/internal/status/handle.go +++ b/internal/status/collector/handle.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package status +package collector import ( "context" diff --git a/internal/status/opampbridge/handle.go b/internal/status/opampbridge/handle.go new file mode 100644 index 000000000..18e571990 --- /dev/null +++ b/internal/status/opampbridge/handle.go @@ -0,0 +1,58 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "context" + "fmt" + + "github.com/go-logr/logr" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +const ( + eventTypeNormal = "Normal" + eventTypeWarning = "Warning" + + reasonError = "Error" + reasonStatusFailure = "StatusFailure" + reasonInfo = "Info" +) + +// HandleReconcileStatus handles updating the status of the CRDs managed by the operator. +// TODO: make the status more useful https://github.com/open-telemetry/opentelemetry-operator/issues/1972 +func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { + log.V(2).Info("updating opampbridge status") + if err != nil { + params.Recorder.Event(¶ms.OpAMPBridge, eventTypeWarning, reasonError, err.Error()) + return ctrl.Result{}, err + } + changed := params.OpAMPBridge.DeepCopy() + + statusErr := UpdateOpAMPBridgeStatus(ctx, params.Client, changed) + if statusErr != nil { + params.Recorder.Event(changed, eventTypeWarning, reasonStatusFailure, statusErr.Error()) + return ctrl.Result{}, statusErr + } + statusPatch := client.MergeFrom(¶ms.OpAMPBridge) + if err := params.Client.Status().Patch(ctx, changed, statusPatch); err != nil { + return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) + } + params.Recorder.Event(changed, eventTypeNormal, reasonInfo, "applied status changes") + return ctrl.Result{}, nil +} diff --git a/internal/status/opampbridge/opampbridge.go b/internal/status/opampbridge/opampbridge.go new file mode 100644 index 000000000..d09bfbf8a --- /dev/null +++ b/internal/status/opampbridge/opampbridge.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package opampbridge + +import ( + "context" + + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/version" +) + +func UpdateOpAMPBridgeStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpAMPBridge) error { + if changed.Status.Version == "" { + changed.Status.Version = version.OperatorOpAMPBridge() + } + return nil +} diff --git a/kuttl-test-opampbridge.yaml b/kuttl-test-opampbridge.yaml new file mode 100644 index 000000000..f658ce15a --- /dev/null +++ b/kuttl-test-opampbridge.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +artifactsDir: ./tests/_build/artifacts/ +testDirs: + - ./tests/e2e-opampbridge/ +timeout: 300 diff --git a/main.go b/main.go index 80872048b..8268c585a 100644 --- a/main.go +++ b/main.go @@ -245,6 +245,17 @@ func main() { os.Exit(1) } + if err = controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ + Client: mgr.GetClient(), + Log: ctrl.Log.WithName("controllers").WithName("OpAMPBridge"), + Scheme: mgr.GetScheme(), + Config: cfg, + Recorder: mgr.GetEventRecorderFor("opamp-bridge"), + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "OpAMPBridge") + os.Exit(1) + } + if os.Getenv("ENABLE_WEBHOOKS") != "false" { if err = otelv1alpha1.SetupCollectorWebhook(mgr, cfg); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") @@ -262,6 +273,11 @@ func main() { instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("opentelemetry-operator")), }), }) + + if err = (&otelv1alpha1.OpAMPBridge{}).SetupWebhookWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create webhook", "webhook", "OpAMPBridge") + os.Exit(1) + } } else { ctrl.Log.Info("Webhooks are disabled, operator is running an unsupported mode", "ENABLE_WEBHOOKS", "false") } diff --git a/pkg/collector/reconcile/suite_test.go b/pkg/collector/reconcile/suit_test.go similarity index 100% rename from pkg/collector/reconcile/suite_test.go rename to pkg/collector/reconcile/suit_test.go diff --git a/tests/e2e-opampbridge/opampbridge/00-assert.yaml b/tests/e2e-opampbridge/opampbridge/00-assert.yaml new file mode 100644 index 000000000..f4022a72d --- /dev/null +++ b/tests/e2e-opampbridge/opampbridge/00-assert.yaml @@ -0,0 +1,70 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-opamp-bridge +spec: + template: + spec: + containers: + - name: opamp-bridge-container + env: + - name: OTELCOL_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - mountPath: /conf + name: opamp-bridge-internal + volumes: + - configMap: + items: + - key: remoteconfiguration.yaml + path: remoteconfiguration.yaml + name: test-opamp-bridge + name: opamp-bridge-internal +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-opamp-bridge +data: + remoteconfiguration.yaml: | + capabilities: + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRemoteConfig: true + AcceptsRestartCommand: true + ReportsEffectiveConfig: true + ReportsHealth: true + ReportsOwnLogs: true + ReportsOwnMetrics: true + ReportsOwnTraces: true + ReportsRemoteConfig: true + ReportsStatus: true + componentsAllowed: + exporters: + - logging + processors: + - memory_limiter + receivers: + - otlp + endpoint: ws://opamp-server:4320/v1/opamp +--- +apiVersion: v1 +kind: Service +metadata: + name: test-opamp-bridge +spec: + ports: + - name: opamp-bridge + port: 80 + protocol: TCP + targetPort: 8080 +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +opampbridges: + - selector: app.kubernetes.io/component=opentelemetry-opamp-bridge diff --git a/tests/e2e-opampbridge/opampbridge/00-install.yaml b/tests/e2e-opampbridge/opampbridge/00-install.yaml new file mode 100644 index 000000000..3f4f353f1 --- /dev/null +++ b/tests/e2e-opampbridge/opampbridge/00-install.yaml @@ -0,0 +1,49 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: opamp-bridge +automountServiceAccountToken: true +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: opamp-bridge +rules: +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors + verbs: + - '*' +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl -n $NAMESPACE create rolebinding default-opamp-bridge-$NAMESPACE --role=opamp-bridge --serviceaccount=$NAMESPACE:opamp-bridge +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpAMPBridge +metadata: + name: test +spec: + image: "local/opentelemetry-operator-opamp-bridge:e2e" + endpoint: ws://opamp-server:4320/v1/opamp + capabilities: + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRemoteConfig: true + AcceptsRestartCommand: true + ReportsEffectiveConfig: true + ReportsHealth: true + ReportsOwnLogs: true + ReportsOwnMetrics: true + ReportsOwnTraces: true + ReportsRemoteConfig: true + ReportsStatus: true + componentsAllowed: + receivers: + - otlp + processors: + - memory_limiter + exporters: + - logging \ No newline at end of file From 07e8ff34c5ba0e3ea87fdd74c6b2a81681d6bd13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 25 Oct 2023 22:10:02 +0200 Subject: [PATCH 1112/1234] Add E2E test for metrics collection using Prometheus CRs (#2275) * Add E2E test for metrics collection using Prometheus CRs * Check targetallocator jobs and scrape configs in E2E test --- Makefile | 7 +- ...install-targetallocator-prometheus-crds.sh | 8 + hack/modify-test-images.sh | 1 + .../00-assert.yaml | 53 +++++++ .../00-install.yaml | 137 ++++++++++++++++++ .../01-assert.yaml | 20 +++ .../01-install.yaml | 48 ++++++ 7 files changed, 273 insertions(+), 1 deletion(-) create mode 100755 hack/install-targetallocator-prometheus-crds.sh create mode 100644 tests/e2e/targetallocator-prometheuscr/00-assert.yaml create mode 100644 tests/e2e/targetallocator-prometheuscr/00-install.yaml create mode 100644 tests/e2e/targetallocator-prometheuscr/01-assert.yaml create mode 100644 tests/e2e/targetallocator-prometheuscr/01-install.yaml diff --git a/Makefile b/Makefile index b48e81d41..863009f04 100644 --- a/Makefile +++ b/Makefile @@ -224,7 +224,7 @@ e2e-opampbridge: $(KUTTL) test --config kuttl-test-opampbridge.yaml .PHONY: prepare-e2e -prepare-e2e: kuttl set-image-controller container container-target-allocator container-operator-opamp-bridge start-kind cert-manager install-metrics-server load-image-all deploy +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 TARGETALLOCATOR_IMG=$(TARGETALLOCATOR_IMG) OPERATOROPAMPBRIDGE_IMG=$(OPERATOROPAMPBRIDGE_IMG) OPERATOR_IMG=$(IMG) SED_BIN="$(SED)" ./hack/modify-test-images.sh .PHONY: enable-prometheus-feature-flag @@ -274,6 +274,11 @@ install-metrics-server: install-prometheus-operator: ./hack/install-prometheus-operator.sh +# This only installs the CRDs Target Allocator supports +.PHONY: install-targetallocator-prometheus-crds +install-targetallocator-prometheus-crds: + ./hack/install-targetallocator-prometheus-crds.sh + .PHONY: load-image-all load-image-all: load-image-operator load-image-target-allocator load-image-operator-opamp-bridge diff --git a/hack/install-targetallocator-prometheus-crds.sh b/hack/install-targetallocator-prometheus-crds.sh new file mode 100755 index 000000000..a905925eb --- /dev/null +++ b/hack/install-targetallocator-prometheus-crds.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ "$(kubectl api-resources --api-group=monitoring.coreos.com -o name)" ]]; then + echo "Prometheus CRDs are there" +else + kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml + kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +fi diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 122744090..3f4c72b88 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -5,6 +5,7 @@ SED_BIN=${SED_BIN:-sed} ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml ${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml +${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-prometheuscr/*.yaml ${SED_BIN} -i "s#local/opentelemetry-operator:e2e#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml diff --git a/tests/e2e/targetallocator-prometheuscr/00-assert.yaml b/tests/e2e/targetallocator-prometheuscr/00-assert.yaml new file mode 100644 index 000000000..cd4534193 --- /dev/null +++ b/tests/e2e/targetallocator-prometheuscr/00-assert.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: prometheus-cr-collector +status: + replicas: 1 + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-cr-targetallocator +status: + replicas: 1 + readyReplicas: 1 + observedGeneration: 1 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-cr-targetallocator +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-cr-collector +data: + collector.yaml: | + exporters: + prometheus: + endpoint: 0.0.0.0:9090 + processors: null + receivers: + prometheus: + config: {} + target_allocator: + collector_id: ${POD_NAME} + endpoint: http://prometheus-cr-targetallocator:80 + interval: 30s + service: + pipelines: + metrics: + exporters: + - prometheus + processors: [] + receivers: + - prometheus +--- +# Print TA pod logs if test fails +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +collectors: + - selector: app.kubernetes.io/managed-by=opentelemetry-operator diff --git a/tests/e2e/targetallocator-prometheuscr/00-install.yaml b/tests/e2e/targetallocator-prometheuscr/00-install.yaml new file mode 100644 index 000000000..148763a3f --- /dev/null +++ b/tests/e2e/targetallocator-prometheuscr/00-install.yaml @@ -0,0 +1,137 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ta +automountServiceAccountToken: true +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: collector +automountServiceAccountToken: true +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ta +rules: +- apiGroups: [""] + resources: + - pods + - nodes + - services + - endpoints + - configmaps + - secrets + - namespaces + verbs: + - get + - watch + - list +- apiGroups: ["apps"] + resources: + - statefulsets + - services + - endpoints + verbs: + - get + - watch + - list +- apiGroups: ["discovery.k8s.io"] + resources: + - endpointslices + verbs: + - get + - watch + - list +- apiGroups: ["networking.k8s.io"] + resources: + - ingresses + verbs: + - get + - watch + - list +- apiGroups: ["monitoring.coreos.com"] + resources: + - servicemonitors + - podmonitors + verbs: + - get + - watch + - list +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: collector +rules: +- apiGroups: [""] + resources: + - pods + - nodes + - nodes/metrics + - services + - endpoints + verbs: + - get + - watch + - list +- apiGroups: ["networking.k8s.io"] + resources: + - ingresses + verbs: + - get + - watch + - list +- nonResourceURLs: ["/metrics", "/metrics/cadvisor"] + verbs: ["get"] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl create clusterrolebinding ta-$NAMESPACE --clusterrole=ta --serviceaccount=$NAMESPACE:ta + - command: kubectl create clusterrolebinding collector-$NAMESPACE --clusterrole=collector --serviceaccount=$NAMESPACE:collector +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: prometheus-cr +spec: + mode: statefulset + serviceAccount: collector + targetAllocator: + enabled: true + serviceAccount: ta + image: "local/opentelemetry-operator-targetallocator:e2e" + prometheusCR: + enabled: true + config: | + receivers: + prometheus: + config: + scrape_configs: [] + + processors: + + exporters: + prometheus: + endpoint: 0.0.0.0:9090 + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [prometheus] +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: prometheus-cr +spec: + endpoints: + - port: monitoring + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e/targetallocator-prometheuscr/01-assert.yaml b/tests/e2e/targetallocator-prometheuscr/01-assert.yaml new file mode 100644 index 000000000..b3b95bf02 --- /dev/null +++ b/tests/e2e/targetallocator-prometheuscr/01-assert.yaml @@ -0,0 +1,20 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: check-metrics +status: + succeeded: 1 +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-jobs +status: + succeeded: 1 +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-scrape-configs +status: + succeeded: 1 \ No newline at end of file diff --git a/tests/e2e/targetallocator-prometheuscr/01-install.yaml b/tests/e2e/targetallocator-prometheuscr/01-install.yaml new file mode 100644 index 000000000..9c8e8d2ec --- /dev/null +++ b/tests/e2e/targetallocator-prometheuscr/01-install.yaml @@ -0,0 +1,48 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-metrics +spec: + template: + spec: + restartPolicy: OnFailure + containers: + - name: check-metrics + image: curlimages/curl + args: + - /bin/sh + - -c + - curl -s http://prometheus-cr-collector:9090/metrics | grep "otelcol_exporter_sent_metric_points_total{" +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-jobs +spec: + template: + spec: + restartPolicy: OnFailure + containers: + - name: check-metrics + image: curlimages/curl + args: + - /bin/sh + - -c + - curl -s http://prometheus-cr-targetallocator/scrape_configs | grep "prometheus-cr" +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-scrape-configs +spec: + template: + spec: + restartPolicy: OnFailure + containers: + - name: check-metrics + image: curlimages/curl + args: + - /bin/sh + - -c + - curl -s http://prometheus-cr-targetallocator/jobs | grep "prometheus-cr" \ No newline at end of file From 55c5673d342fdc1880505f9153e1626bb9d16389 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Thu, 26 Oct 2023 11:20:39 -0400 Subject: [PATCH 1113/1234] Update OpAMP Bridge to comply with its design (#2277) * Update bridge to be spec compliant * deep copy * Add more tests * Fix bork * update test to be less annoying --- .chloggen/update-opamp-bridge-spec.yaml | 18 ++ cmd/operator-opamp-bridge/agent/agent.go | 2 +- cmd/operator-opamp-bridge/agent/agent_test.go | 206 ++++++++++-------- .../agent/collector_key.go | 4 +- .../agent/collector_key_test.go | 6 +- .../agent/testdata/basic.yaml | 52 +++-- .../agent/testdata/invalid.yaml | 50 +++-- .../agent/testdata/updated.yaml | 54 ++--- cmd/operator-opamp-bridge/operator/client.go | 37 +++- .../operator/client_test.go | 44 +++- .../operator/testdata/collector.yaml | 52 +++-- .../operator/testdata/invalid-collector.yaml | 52 +++-- .../testdata/reporting-collector.yaml | 31 +++ .../operator/testdata/updated-collector.yaml | 52 +++-- 14 files changed, 407 insertions(+), 253 deletions(-) create mode 100755 .chloggen/update-opamp-bridge-spec.yaml create mode 100644 cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml diff --git a/.chloggen/update-opamp-bridge-spec.yaml b/.chloggen/update-opamp-bridge-spec.yaml new file mode 100755 index 000000000..d5420243b --- /dev/null +++ b/.chloggen/update-opamp-bridge-spec.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: OpAMP Bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the / structure as described. + +# One or more tracking issues related to the change +issues: [2131] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + * Updates the bridge to get collectors using the reporting annotation + * Fixes a bug where we were using the incorrect structure for the collectors diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go index 1923810a3..90bbf13f2 100644 --- a/cmd/operator-opamp-bridge/agent/agent.go +++ b/cmd/operator-opamp-bridge/agent/agent.go @@ -166,7 +166,7 @@ func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.Effectiv agent.logger.Error(err, "failed to marhsal config") return nil, err } - mapKey := newCollectorKey(instance.GetName(), instance.GetNamespace()) + mapKey := newCollectorKey(instance.GetNamespace(), instance.GetName()) instanceMap[mapKey.String()] = &protobufs.AgentConfigFile{ Body: marshaled, ContentType: "yaml", diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go index 9c8ca4a70..42d0d1cb6 100644 --- a/cmd/operator-opamp-bridge/agent/agent_test.go +++ b/cmd/operator-opamp-bridge/agent/agent_test.go @@ -40,27 +40,61 @@ import ( "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" ) +const ( + collectorBasicFile = "testdata/basic.yaml" + collectorUpdatedFile = "testdata/updated.yaml" + collectorInvalidFile = "testdata/invalid.yaml" + + testNamespace = "testnamespace" + testCollectorName = "collector" + otherCollectorName = "other" + emptyConfigHash = "" + testCollectorKey = testNamespace + "/" + testCollectorName + otherCollectorKey = testNamespace + "/" + otherCollectorName + + agentTestFileName = "testdata/agent.yaml" + agentTestFileHttpName = "testdata/agenthttpbasic.yaml" + agentTestFileBasicComponentsAllowedName = "testdata/agentbasiccomponentsallowed.yaml" + agentTestFileBatchNotAllowedName = "testdata/agentbatchnotallowed.yaml" + agentTestFileNoProcessorsAllowedName = "testdata/agentnoprocessorsallowed.yaml" +) + var ( l = logr.Discard() _ client.OpAMPClient = &mockOpampClient{} + + basicYamlConfigHash = getConfigHash(testCollectorKey, collectorBasicFile) + invalidYamlConfigHash = getConfigHash(testCollectorKey, collectorInvalidFile) + updatedYamlConfigHash = getConfigHash(testCollectorKey, collectorUpdatedFile) + otherUpdatedYamlConfigHash = getConfigHash(otherCollectorKey, collectorUpdatedFile) ) +func getConfigHash(key, file string) string { + fi, err := os.Stat(file) + if err != nil { + return "" + } + // get the size + size := fi.Size() + return fmt.Sprintf("%s%d", key, size) +} + type mockOpampClient struct { lastStatus *protobufs.RemoteConfigStatus lastEffectiveConfig *protobufs.EffectiveConfig settings types.StartSettings } -func (m *mockOpampClient) Start(ctx context.Context, settings types.StartSettings) error { +func (m *mockOpampClient) Start(_ context.Context, settings types.StartSettings) error { m.settings = settings return nil } -func (m *mockOpampClient) Stop(ctx context.Context) error { +func (m *mockOpampClient) Stop(_ context.Context) error { return nil } -func (m *mockOpampClient) SetAgentDescription(descr *protobufs.AgentDescription) error { +func (m *mockOpampClient) SetAgentDescription(_ *protobufs.AgentDescription) error { return nil } @@ -68,7 +102,7 @@ func (m *mockOpampClient) AgentDescription() *protobufs.AgentDescription { return nil } -func (m *mockOpampClient) SetHealth(health *protobufs.AgentHealth) error { +func (m *mockOpampClient) SetHealth(_ *protobufs.AgentHealth) error { return nil } @@ -86,7 +120,7 @@ func (m *mockOpampClient) SetRemoteConfigStatus(status *protobufs.RemoteConfigSt return nil } -func (m *mockOpampClient) SetPackageStatuses(statuses *protobufs.PackageStatuses) error { +func (m *mockOpampClient) SetPackageStatuses(_ *protobufs.PackageStatuses) error { return nil } @@ -109,15 +143,15 @@ func TestAgent_onMessage(t *testing.T) { } type args struct { ctx context.Context - // Mapping from name/namespace to a config in testdata + // Mapping from namespace/name to a config in testdata configFile map[string]string - // Mapping from name/namespace to a config in testdata (for testing updates) + // Mapping from namespace/name to a config in testdata (for testing updates) nextConfigFile map[string]string } type want struct { - // Mapping from name/namespace to a list of expected contents + // Mapping from namespace/name to a list of expected contents contents map[string][]string - // Mapping from name/namespace to a list of updated expected contents + // Mapping from namespace/name to a list of updated expected contents nextContents map[string][]string // The status after the initial config loading status *protobufs.RemoteConfigStatus @@ -133,7 +167,7 @@ func TestAgent_onMessage(t *testing.T) { { name: "no data", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), @@ -147,27 +181,27 @@ func TestAgent_onMessage(t *testing.T) { { name: "base case", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "receivers: [otlp]", "status:", }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -175,27 +209,27 @@ func TestAgent_onMessage(t *testing.T) { { name: "base case http", fields: fields{ - configFile: "testdata/agenthttpbasic.yaml", + configFile: agentTestFileHttpName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "receivers: [otlp]", "status:", }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -203,47 +237,47 @@ func TestAgent_onMessage(t *testing.T) { { name: "failure", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "bad/testnamespace": "invalid.yaml", + testCollectorKey: collectorInvalidFile, }, }, want: want{ contents: nil, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("bad/testnamespace404"), + LastRemoteConfigHash: []byte(invalidYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "yaml: line 16: could not find expected ':'", + ErrorMessage: "error converting YAML to JSON: yaml: line 21: could not find expected ':'", }, }, }, { name: "all components are allowed", fields: fields{ - configFile: "testdata/agentbasiccomponentsallowed.yaml", + configFile: agentTestFileBasicComponentsAllowedName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "receivers: [otlp]", "status:", }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -251,18 +285,18 @@ func TestAgent_onMessage(t *testing.T) { { name: "batch not allowed", fields: fields{ - configFile: "testdata/agentbatchnotallowed.yaml", + configFile: agentTestFileBatchNotAllowedName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, }, want: want{ contents: nil, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, ErrorMessage: "Items in config are not allowed: [processors.batch]", }, @@ -271,18 +305,18 @@ func TestAgent_onMessage(t *testing.T) { { name: "processors not allowed", fields: fields{ - configFile: "testdata/agentnoprocessorsallowed.yaml", + configFile: agentTestFileNoProcessorsAllowedName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, }, want: want{ contents: nil, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, ErrorMessage: "Items in config are not allowed: [processors]", }, @@ -291,23 +325,23 @@ func TestAgent_onMessage(t *testing.T) { { name: "can update config and replicas", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, nextConfigFile: map[string]string{ - "good/testnamespace": "updated.yaml", + testCollectorKey: collectorUpdatedFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "replicas: 1", @@ -315,14 +349,14 @@ func TestAgent_onMessage(t *testing.T) { }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, nextContents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: [memory_limiter, batch]", "replicas: 3", @@ -330,7 +364,7 @@ func TestAgent_onMessage(t *testing.T) { }, }, nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace435"), + LastRemoteConfigHash: []byte(updatedYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -338,23 +372,23 @@ func TestAgent_onMessage(t *testing.T) { { name: "cannot update with bad config", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, nextConfigFile: map[string]string{ - "good/testnamespace": "invalid.yaml", + testCollectorKey: collectorInvalidFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "replicas: 1", @@ -362,14 +396,14 @@ func TestAgent_onMessage(t *testing.T) { }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, nextContents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "replicas: 1", @@ -377,62 +411,62 @@ func TestAgent_onMessage(t *testing.T) { }, }, nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace404"), // The new hash should be of the bad config + LastRemoteConfigHash: []byte(invalidYamlConfigHash), // The new hash should be of the bad config Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "yaml: line 16: could not find expected ':'", + ErrorMessage: "error converting YAML to JSON: yaml: line 21: could not find expected ':'", }, }, }, { name: "update with new collector", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, nextConfigFile: map[string]string{ - "good/testnamespace": "basic.yaml", - "other/testnamespace": "updated.yaml", + testCollectorKey: collectorBasicFile, + otherCollectorKey: collectorUpdatedFile, }, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "status:", }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, nextContents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "status:", }, - "other/testnamespace": { + otherCollectorKey: { "kind: OpenTelemetryCollector", - "name: other", - "namespace: testnamespace", + "name: " + otherCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: [memory_limiter, batch]", "status:", }, }, nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401other/testnamespace435"), + LastRemoteConfigHash: []byte(basicYamlConfigHash + otherUpdatedYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -440,33 +474,33 @@ func TestAgent_onMessage(t *testing.T) { { name: "can delete existing collector", fields: fields{ - configFile: "testdata/agent.yaml", + configFile: agentTestFileName, }, args: args{ ctx: context.Background(), configFile: map[string]string{ - "good/testnamespace": "basic.yaml", + testCollectorKey: collectorBasicFile, }, nextConfigFile: map[string]string{}, }, want: want{ contents: map[string][]string{ - "good/testnamespace": { + testCollectorKey: { "kind: OpenTelemetryCollector", - "name: good", - "namespace: testnamespace", + "name: " + testCollectorName, + "namespace: " + testNamespace, "send_batch_size: 10000", "processors: []", "status:", }, }, status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte("good/testnamespace401"), + LastRemoteConfigHash: []byte(basicYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, nextContents: map[string][]string{}, nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(""), + LastRemoteConfigHash: []byte(emptyConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, }, }, @@ -528,11 +562,11 @@ func Test_CanUpdateIdentity(t *testing.T) { mockClient := &mockOpampClient{} fs := config.GetFlagSet(pflag.ContinueOnError) - configFlag := []string{"--config-file", "testdata/agent.yaml"} + configFlag := []string{"--config-file", agentTestFileName} err := fs.Parse(configFlag) assert.NoError(t, err) conf := config.NewConfig(logr.Discard()) - loadErr := config.LoadFromFile(conf, "testdata/agent.yaml") + loadErr := config.LoadFromFile(conf, agentTestFileName) require.NoError(t, loadErr, "should be able to load config") applier := getFakeApplier(t, conf) agent := NewAgent(l, applier, conf, mockClient) @@ -568,7 +602,7 @@ func getMessageDataFromConfigFile(filemap map[string]string) (*types.MessageData sort.Strings(fileNames) for _, key := range fileNames { - yamlFile, err := os.ReadFile(fmt.Sprintf("testdata/%s", filemap[key])) + yamlFile, err := os.ReadFile(filemap[key]) if err != nil { return toReturn, err } diff --git a/cmd/operator-opamp-bridge/agent/collector_key.go b/cmd/operator-opamp-bridge/agent/collector_key.go index f1353d347..d2e6c8d4f 100644 --- a/cmd/operator-opamp-bridge/agent/collector_key.go +++ b/cmd/operator-opamp-bridge/agent/collector_key.go @@ -25,7 +25,7 @@ type collectorKey struct { namespace string } -func newCollectorKey(name string, namespace string) collectorKey { +func newCollectorKey(namespace string, name string) collectorKey { return collectorKey{name: name, namespace: namespace} } @@ -39,5 +39,5 @@ func collectorKeyFromKey(key string) (collectorKey, error) { } func (k collectorKey) String() string { - return fmt.Sprintf("%s/%s", k.name, k.namespace) + return fmt.Sprintf("%s/%s", k.namespace, k.name) } diff --git a/cmd/operator-opamp-bridge/agent/collector_key_test.go b/cmd/operator-opamp-bridge/agent/collector_key_test.go index b0b254648..7a27180f6 100644 --- a/cmd/operator-opamp-bridge/agent/collector_key_test.go +++ b/cmd/operator-opamp-bridge/agent/collector_key_test.go @@ -34,7 +34,7 @@ func Test_collectorKeyFromKey(t *testing.T) { { name: "base case", args: args{ - key: "good/namespace", + key: "namespace/good", }, want: collectorKey{ name: "good", @@ -86,12 +86,12 @@ func Test_collectorKey_String(t *testing.T) { name: "good", namespace: "namespace", }, - want: "good/namespace", + want: "namespace/good", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - k := newCollectorKey(tt.fields.name, tt.fields.namespace) + k := newCollectorKey(tt.fields.namespace, tt.fields.name) assert.Equalf(t, tt.want, k.String(), "String()") }) } diff --git a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml index 264bd4af9..acefddb7e 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml @@ -1,24 +1,28 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] \ No newline at end of file +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml index bfd977915..a54813263 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml @@ -1,24 +1,28 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s -GARBAGE - exporters: - debug: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] \ No newline at end of file + GARBAGE + exporters: + debug: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml index 8ac7f16cb..1fdfd6aa6 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml @@ -1,25 +1,29 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [memory_limiter, batch] - exporters: [debug] -replicas: 3 +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [debug] + replicas: 3 diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go index dd5bec74b..bf58a618f 100644 --- a/cmd/operator-opamp-bridge/operator/client.go +++ b/cmd/operator-opamp-bridge/operator/client.go @@ -17,12 +17,13 @@ package operator import ( "context" "fmt" + "strings" "github.com/go-logr/logr" "github.com/open-telemetry/opamp-go/protobufs" - "gopkg.in/yaml.v3" "k8s.io/apimachinery/pkg/api/errors" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/yaml" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -31,6 +32,7 @@ const ( CollectorResource = "OpenTelemetryCollector" ResourceIdentifierKey = "created-by" ResourceIdentifierValue = "operator-opamp-bridge" + ReportingAnnotationKey = "opentelemetry.io/opamp-reporting" ) type ConfigApplier interface { @@ -104,31 +106,34 @@ func (c Client) update(ctx context.Context, old *v1alpha1.OpenTelemetryCollector func (c Client) Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error { c.log.Info("Received new config", "name", name, "namespace", namespace) - var collectorSpec v1alpha1.OpenTelemetryCollectorSpec - err := yaml.Unmarshal(configmap.Body, &collectorSpec) + var collector v1alpha1.OpenTelemetryCollector + err := yaml.Unmarshal(configmap.Body, &collector) if err != nil { return err } - if len(collectorSpec.Config) == 0 { + if len(collector.Spec.Config) == 0 { return errors.NewBadRequest("Must supply valid configuration") } - reasons, validateErr := c.validate(collectorSpec) + reasons, validateErr := c.validate(collector.Spec) if validateErr != nil { return validateErr } if len(reasons) > 0 { return errors.NewBadRequest(fmt.Sprintf("Items in config are not allowed: %v", reasons)) } - collector := &v1alpha1.OpenTelemetryCollector{Spec: collectorSpec} + updatedCollector := collector.DeepCopy() ctx := context.Background() instance, err := c.GetInstance(name, namespace) if err != nil { return err } - if instance != nil { - return c.update(ctx, instance, collector) + if instance == nil { + return c.create(ctx, name, namespace, updatedCollector) } - return c.create(ctx, name, namespace, collector) + if labels := instance.GetLabels(); labels != nil && strings.EqualFold(labels[ReportingAnnotationKey], "true") { + return errors.NewBadRequest("cannot modify a collector with `opentelemetry.io/opamp-reporting: true`") + } + return c.update(ctx, instance, updatedCollector) } func (c Client) Delete(name string, namespace string) error { @@ -156,7 +161,19 @@ func (c Client) ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) { if err != nil { return nil, err } - return result.Items, nil + reportingCollectors := v1alpha1.OpenTelemetryCollectorList{} + err = c.k8sClient.List(ctx, &reportingCollectors, client.MatchingLabels{ + ReportingAnnotationKey: "true", + }) + if err != nil { + return nil, err + } + items := append(result.Items, reportingCollectors.Items...) + for i := range items { + items[i].SetManagedFields(nil) + } + + return items, nil } func (c Client) GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/cmd/operator-opamp-bridge/operator/client_test.go b/cmd/operator-opamp-bridge/operator/client_test.go index 9d4284b90..13cccca76 100644 --- a/cmd/operator-opamp-bridge/operator/client_test.go +++ b/cmd/operator-opamp-bridge/operator/client_test.go @@ -15,18 +15,19 @@ package operator import ( + "context" "os" "testing" - "github.com/stretchr/testify/require" - "github.com/open-telemetry/opamp-go/protobufs" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" logf "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/yaml" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) @@ -87,6 +88,15 @@ func TestClient_Apply(t *testing.T) { }, wantErr: true, }, + { + name: "create reporting-only", + args: args{ + name: "test", + namespace: "opentelemetry", + file: "testdata/reporting-collector.yaml", + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -104,8 +114,9 @@ func TestClient_Apply(t *testing.T) { Body: colConfig, ContentType: "yaml", } - if err := c.Apply(tt.args.name, tt.args.namespace, configmap); (err != nil) != tt.wantErr { - t.Errorf("Apply() error = %v, wantErr %v", err, tt.wantErr) + applyErr := c.Apply(tt.args.name, tt.args.namespace, configmap) + if (applyErr != nil) != tt.wantErr { + t.Errorf("Apply() error = %v, wantErr %v", applyErr, tt.wantErr) } }) } @@ -116,6 +127,24 @@ func Test_collectorUpdate(t *testing.T) { namespace := "testing" fakeClient := getFakeClient(t) c := NewClient(clientLogger, fakeClient, nil) + + // Load reporting-only collector + reportingColConfig, err := loadConfig("testdata/reporting-collector.yaml") + require.NoError(t, err, "Should be no error on loading test configuration") + var reportingCol v1alpha1.OpenTelemetryCollector + err = yaml.Unmarshal(reportingColConfig, &reportingCol) + require.NoError(t, err, "Should be no error on unmarshal") + reportingCol.Default() + reportingCol.TypeMeta.Kind = CollectorResource + reportingCol.TypeMeta.APIVersion = v1alpha1.GroupVersion.String() + reportingCol.ObjectMeta.Name = "simplest" + reportingCol.ObjectMeta.Namespace = namespace + err = fakeClient.Create(context.Background(), &reportingCol) + require.NoError(t, err, "Should be able to make reporting col") + allInstances, err := c.ListInstances() + require.NoError(t, err, "Should be able to list all collectors") + require.Len(t, allInstances, 1) + colConfig, err := loadConfig("testdata/collector.yaml") require.NoError(t, err, "Should be no error on loading test configuration") configmap := &protobufs.AgentConfigFile{ @@ -151,10 +180,11 @@ func Test_collectorUpdate(t *testing.T) { require.NoError(t, err, "Should be able to get the updated instance") assert.Contains(t, updatedInstance.Spec.Config, "processors: [memory_limiter, batch]") - allInstances, err := c.ListInstances() + allInstances, err = c.ListInstances() require.NoError(t, err, "Should be able to list all collectors") - assert.Len(t, allInstances, 1) - assert.Equal(t, allInstances[0], *updatedInstance) + assert.Len(t, allInstances, 2) + assert.Contains(t, allInstances, reportingCol) + assert.Contains(t, allInstances, *updatedInstance) } func Test_collectorDelete(t *testing.T) { diff --git a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml index 264bd4af9..acefddb7e 100644 --- a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml +++ b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml @@ -1,24 +1,28 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] \ No newline at end of file +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml index 54015f814..f64ebcedf 100644 --- a/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml +++ b/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml @@ -1,24 +1,28 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s -GARBAGE - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] \ No newline at end of file +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + GARBAGE + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml new file mode 100644 index 000000000..3b0a92546 --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml @@ -0,0 +1,31 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + labels: + "opentelemetry.io/opamp-reporting": "true" +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml index 993dcbb77..0cf824b5e 100644 --- a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml +++ b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml @@ -1,24 +1,28 @@ -config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [memory_limiter, batch] - exporters: [debug] \ No newline at end of file +kind: OpenTelemetryCollector +metadata: + name: simplest +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [debug] From 65f0ba912f6f89194fd863be8741e9660f848211 Mon Sep 17 00:00:00 2001 From: Avadhut Pisal Date: Tue, 31 Oct 2023 21:03:55 +0530 Subject: [PATCH 1114/1234] chore:refactor opampbridge webhook (#2288) --- apis/v1alpha1/opampbridge_webhook.go | 115 +++++++++++------- apis/v1alpha1/opampbridge_webhook_test.go | 54 ++++++-- ...emetry-operator.clusterserviceversion.yaml | 20 ++- config/webhook/manifests.yaml | 20 ++- controllers/suite_test.go | 2 +- main.go | 2 +- 6 files changed, 159 insertions(+), 54 deletions(-) diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go index 413f17261..77717ca4f 100644 --- a/apis/v1alpha1/opampbridge_webhook.go +++ b/apis/v1alpha1/opampbridge_webhook.go @@ -15,33 +15,69 @@ package v1alpha1 import ( + "context" "fmt" "strings" + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" ctrl "sigs.k8s.io/controller-runtime" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) -// log is for logging in this package. -var opampbridgelog = logf.Log.WithName("opampbridge-resource") +var ( + _ admission.CustomValidator = &OpAMPBridgeWebhook{} + _ admission.CustomDefaulter = &OpAMPBridgeWebhook{} +) -func (r *OpAMPBridge) SetupWebhookWithManager(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(r). - Complete() +//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=vopampbridgecreateupdate.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=ignore,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=delete,versions=v1alpha1,name=vopampbridgedelete.kb.io,admissionReviewVersions=v1 +//+kubebuilder:object:generate=false + +type OpAMPBridgeWebhook struct { + logger logr.Logger + cfg config.Config + scheme *runtime.Scheme } -//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 +func (o *OpAMPBridgeWebhook) Default(ctx context.Context, obj runtime.Object) error { + opampBridge, ok := obj.(*OpAMPBridge) + if !ok { + return fmt.Errorf("expected an OpAMPBridge, received %T", obj) + } + return o.defaulter(opampBridge) +} -var _ webhook.Defaulter = &OpAMPBridge{} +func (c OpAMPBridgeWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + opampBridge, ok := obj.(*OpAMPBridge) + if !ok { + return nil, fmt.Errorf("expected an OpAMPBridge, received %T", obj) + } + return c.validate(opampBridge) +} + +func (c OpAMPBridgeWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { + opampBridge, ok := newObj.(*OpAMPBridge) + if !ok { + return nil, fmt.Errorf("expected an OpAMPBridge, received %T", newObj) + } + return c.validate(opampBridge) +} + +func (o OpAMPBridgeWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { + opampBridge, ok := obj.(*OpAMPBridge) + if !ok || opampBridge == nil { + return nil, fmt.Errorf("expected an OpAMPBridge, received %T", obj) + } + return o.validate(opampBridge) +} -// Default implements webhook.Defaulter so a webhook will be registered for the type. -func (r *OpAMPBridge) Default() { - opampbridgelog.Info("default", "name", r.Name) +func (o OpAMPBridgeWebhook) defaulter(r *OpAMPBridge) error { if len(r.Spec.UpgradeStrategy) == 0 { r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic } @@ -66,40 +102,20 @@ func (r *OpAMPBridge) Default() { if !enabled || !found { r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] = true } + return nil } -//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update;delete,versions=v1alpha1,name=vopampbridge.kb.io,admissionReviewVersions=v1 - -var _ webhook.Validator = &OpAMPBridge{} - -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpAMPBridge) ValidateCreate() (admission.Warnings, error) { - opampbridgelog.Info("validate create", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *OpAMPBridge) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { - opampbridgelog.Info("validate update", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *OpAMPBridge) ValidateDelete() (admission.Warnings, error) { - opampbridgelog.Info("validate delete", "name", r.Name) - return nil, nil -} - -func (r *OpAMPBridge) validateCRDSpec() error { - - // check required fields +func (o OpAMPBridgeWebhook) validate(r *OpAMPBridge) (admission.Warnings, error) { + warnings := admission.Warnings{} + // validate OpAMP server endpoint if len(strings.TrimSpace(r.Spec.Endpoint)) == 0 { - return fmt.Errorf("the OpAMP server endpoint is not specified") + return warnings, fmt.Errorf("the OpAMP server endpoint is not specified") } + // validate OpAMPBridge capabilities if len(r.Spec.Capabilities) == 0 { - return fmt.Errorf("the capabilities supported by OpAMP Bridge are not specified") + return warnings, fmt.Errorf("the capabilities supported by OpAMP Bridge are not specified") } // validate port config @@ -107,14 +123,27 @@ func (r *OpAMPBridge) validateCRDSpec() error { nameErrs := validation.IsValidPortName(p.Name) numErrs := validation.IsValidPortNum(int(p.Port)) if len(nameErrs) > 0 || len(numErrs) > 0 { - return fmt.Errorf("the OpAMPBridge Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", + return warnings, fmt.Errorf("the OpAMPBridge Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", p.Name, nameErrs, p.Port, numErrs) } } // check for maximum replica count if r.Spec.Replicas != nil && *r.Spec.Replicas > 1 { - return fmt.Errorf("replica count must not be greater than 1") + return warnings, fmt.Errorf("replica count must not be greater than 1") } - return nil + return warnings, nil +} + +func SetupOpAMPBridgeWebhook(mgr ctrl.Manager, cfg config.Config) error { + webhook := &OpAMPBridgeWebhook{ + logger: mgr.GetLogger().WithValues("handler", "OpAMPBridgeWebhook"), + scheme: mgr.GetScheme(), + cfg: cfg, + } + return ctrl.NewWebhookManagedBy(mgr). + For(&OpAMPBridge{}). + WithValidator(webhook). + WithDefaulter(webhook). + Complete() } diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go index 6fc5049da..947eaa03e 100644 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -15,9 +15,17 @@ package v1alpha1 import ( + "context" + "fmt" + "os" "testing" + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -26,13 +34,18 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { one := int32(1) five := int32(5) + if err := AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + tests := []struct { name string opampBridge OpAMPBridge expected OpAMPBridge }{ { - name: "provide only required values in spec", + name: "all fields default", opampBridge: OpAMPBridge{}, expected: OpAMPBridge{ ObjectMeta: metav1.ObjectMeta{ @@ -48,7 +61,7 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { }, }, { - name: "provided optional values in spec", + name: "provided values in spec", opampBridge: OpAMPBridge{ Spec: OpAMPBridgeSpec{ Replicas: &five, @@ -96,7 +109,18 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - test.opampBridge.Default() + webhook := &OpAMPBridgeWebhook{ + logger: logr.Discard(), + scheme: testScheme, + cfg: config.New( + config.WithCollectorImage("collector:v0.0.0"), + config.WithTargetAllocatorImage("ta:v0.0.0"), + config.WithOperatorOpAMPBridgeImage("opampbridge:v0.0.0"), + ), + } + ctx := context.Background() + err := webhook.Default(ctx, &test.opampBridge) + assert.NoError(t, err) assert.Equal(t, test.expected, test.opampBridge) }) } @@ -107,9 +131,10 @@ func TestOpAMPBridgeValidatingWebhook(t *testing.T) { two := int32(2) tests := []struct { //nolint:govet - name string - opampBridge OpAMPBridge - expectedErr string + name string + opampBridge OpAMPBridge + expectedErr string + expectedWarnings []string }{ { name: "specify all required fields, should not return error", @@ -270,11 +295,26 @@ func TestOpAMPBridgeValidatingWebhook(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - err := test.opampBridge.validateCRDSpec() + webhook := &OpAMPBridgeWebhook{ + logger: logr.Discard(), + scheme: testScheme, + cfg: config.New( + config.WithCollectorImage("collector:v0.0.0"), + config.WithTargetAllocatorImage("ta:v0.0.0"), + config.WithOperatorOpAMPBridgeImage("opampbridge:v0.0.0"), + ), + } + ctx := context.Background() + warnings, err := webhook.ValidateCreate(ctx, &test.opampBridge) if test.expectedErr == "" { assert.NoError(t, err) return } + if len(test.expectedWarnings) == 0 { + assert.Empty(t, warnings, test.expectedWarnings) + } else { + assert.ElementsMatch(t, warnings, test.expectedWarnings) + } assert.ErrorContains(t, err, test.expectedErr) }) } diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index cac300521..800ea67da 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -578,7 +578,7 @@ spec: containerPort: 443 deploymentName: opentelemetry-operator-controller-manager failurePolicy: Fail - generateName: vopampbridge.kb.io + generateName: vopampbridgecreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -587,6 +587,24 @@ spec: operations: - CREATE - UPDATE + resources: + - opampbridges + sideEffects: None + targetPort: 9443 + type: ValidatingAdmissionWebhook + webhookPath: /validate-opentelemetry-io-v1alpha1-opampbridge + - admissionReviewVersions: + - v1 + containerPort: 443 + deploymentName: opentelemetry-operator-controller-manager + failurePolicy: Ignore + generateName: vopampbridgedelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: - DELETE resources: - opampbridges diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 14014f317..ac743c476 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -137,7 +137,7 @@ webhooks: namespace: system path: /validate-opentelemetry-io-v1alpha1-opampbridge failurePolicy: Fail - name: vopampbridge.kb.io + name: vopampbridgecreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -146,6 +146,24 @@ webhooks: operations: - CREATE - UPDATE + resources: + - opampbridges + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opampbridge + failurePolicy: Ignore + name: vopampbridgedelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: - DELETE resources: - opampbridges diff --git a/controllers/suite_test.go b/controllers/suite_test.go index a3515eb25..db32785fb 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -131,7 +131,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - if err = (&v1alpha1.OpAMPBridge{}).SetupWebhookWithManager(mgr); err != nil { + if err = v1alpha1.SetupOpAMPBridgeWebhook(mgr, config.New()); err != nil { fmt.Printf("failed to SetupWebhookWithManager: %v", err) os.Exit(1) } diff --git a/main.go b/main.go index 8268c585a..ea9afae86 100644 --- a/main.go +++ b/main.go @@ -274,7 +274,7 @@ func main() { }), }) - if err = (&otelv1alpha1.OpAMPBridge{}).SetupWebhookWithManager(mgr); err != nil { + if err = otelv1alpha1.SetupOpAMPBridgeWebhook(mgr, cfg); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "OpAMPBridge") os.Exit(1) } From 227de09ece1fa78c9467f39172cc3febbf9fe9c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:52:00 -0400 Subject: [PATCH 1115/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 1 update (#2299) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [k8s.io/klog/v2](https://github.com/kubernetes/klog). - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 01aeea28d..3cf039653 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridg go 1.20 require ( - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.3.0 github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.9.0 github.com/open-telemetry/opentelemetry-operator v0.85.0 @@ -20,8 +20,9 @@ require ( gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 - k8s.io/klog/v2 v2.100.1 + k8s.io/klog/v2 v2.110.1 sigs.k8s.io/controller-runtime v0.16.3 + sigs.k8s.io/yaml v1.3.0 ) require ( @@ -92,5 +93,4 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 21425156b..b3f9f2dab 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -19,10 +19,10 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= @@ -260,8 +260,8 @@ k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= From 1eb4b7ea4b5fba37001ce25fd5788ceb91d3bbbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:52:35 -0400 Subject: [PATCH 1116/1234] Bump the kubernetes group in /cmd/otel-allocator with 1 update (#2300) Bumps the kubernetes group in /cmd/otel-allocator with 1 update: [k8s.io/klog/v2](https://github.com/kubernetes/klog). - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 4 ++-- cmd/otel-allocator/go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 82671806f..27a878ca9 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -9,7 +9,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.9.1 github.com/go-kit/log v0.2.1 - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.3.0 github.com/json-iterator/go v1.1.12 github.com/oklog/run v1.1.0 github.com/prometheus-operator/prometheus-operator v0.68.0 @@ -25,7 +25,7 @@ require ( k8s.io/api v0.28.3 k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 - k8s.io/klog/v2 v2.100.1 + k8s.io/klog/v2 v2.110.1 sigs.k8s.io/controller-runtime v0.16.3 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 1746c0de9..8cc2c77d6 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -197,10 +197,10 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= @@ -1114,8 +1114,8 @@ k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= From e3305e11399bd71bd0005bfecc0e308c7916fbae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:52:59 -0400 Subject: [PATCH 1117/1234] Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#2286) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.4 to 1.3.0. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.2.4...v1.3.0) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 2fc436fcb..b5c11c111 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ retract v1.51.0 require ( github.com/Masterminds/semver/v3 v3.2.1 - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.3.0 github.com/imdario/mergo v0.3.16 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible diff --git a/go.sum b/go.sum index 1c7c5d550..fb235310a 100644 --- a/go.sum +++ b/go.sum @@ -170,8 +170,9 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= From c6b5124a673cecba144071381f7e4624e233c24d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:54:35 -0400 Subject: [PATCH 1118/1234] Bump github.com/docker/docker (#2291) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.4+incompatible to 24.0.7+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v24.0.4...v24.0.7) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b5c11c111..179ca1796 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/digitalocean/godo v1.99.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.4+incompatible // indirect + github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect diff --git a/go.sum b/go.sum index fb235310a..8c3a8ef5a 100644 --- a/go.sum +++ b/go.sum @@ -126,8 +126,8 @@ github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= -github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From 945d2367e47a7f630f77314904d7fb6ac19dc7ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:54:50 -0400 Subject: [PATCH 1119/1234] Bump github.com/docker/docker in /cmd/otel-allocator (#2292) Bumps [github.com/docker/docker](https://github.com/docker/docker) from 24.0.4+incompatible to 24.0.7+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v24.0.4...v24.0.7) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 27a878ca9..b72d8f36b 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -59,7 +59,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.99.0 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v24.0.4+incompatible // indirect + github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 8cc2c77d6..989ca2cd7 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -142,8 +142,8 @@ github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.4+incompatible h1:s/LVDftw9hjblvqIeTiGYXBCD95nOEEl7qRsRrIOuQI= -github.com/docker/docker v24.0.4+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= From 5075077af944c102fc73346ca9b1a7c02f0fd0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 1 Nov 2023 16:36:04 +0100 Subject: [PATCH 1120/1234] Prepare 0.88.0 release (#2297) Co-authored-by: Jacob Aronoff --- ...reate-operator-bridge-crd-in-operator.yaml | 16 ---------- .chloggen/bug-fix-labeling-process.yaml | 16 ---------- .chloggen/bump-dotnet-1.1.0.yaml | 16 ---------- .chloggen/bump-nodejs-dependencies.yaml | 16 ---------- .chloggen/fix-TA-kubeconfig.yaml | 16 ---------- .chloggen/update-opamp-bridge-spec.yaml | 18 ----------- CHANGELOG.md | 32 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++--- versions.txt | 14 ++++---- 11 files changed, 45 insertions(+), 111 deletions(-) delete mode 100755 .chloggen/1368-create-operator-bridge-crd-in-operator.yaml delete mode 100755 .chloggen/bug-fix-labeling-process.yaml delete mode 100644 .chloggen/bump-dotnet-1.1.0.yaml delete mode 100755 .chloggen/bump-nodejs-dependencies.yaml delete mode 100755 .chloggen/fix-TA-kubeconfig.yaml delete mode 100755 .chloggen/update-opamp-bridge-spec.yaml diff --git a/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml b/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml deleted file mode 100755 index cc22966b5..000000000 --- a/.chloggen/1368-create-operator-bridge-crd-in-operator.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator-opamp-bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Creates the CRD for the OpAMPBridge resource" - -# One or more tracking issues related to the change -issues: [1368] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bug-fix-labeling-process.yaml b/.chloggen/bug-fix-labeling-process.yaml deleted file mode 100755 index da7f9219c..000000000 --- a/.chloggen/bug-fix-labeling-process.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fixed the labeling process which was broken at the moment to capture the current image tag when the users set the sha256 reference. - -# One or more tracking issues related to the change -issues: [1982] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: "" diff --git a/.chloggen/bump-dotnet-1.1.0.yaml b/.chloggen/bump-dotnet-1.1.0.yaml deleted file mode 100644 index c6f6206b6..000000000 --- a/.chloggen/bump-dotnet-1.1.0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 - -# One or more tracking issues related to the change -issues: [2252] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-nodejs-dependencies.yaml b/.chloggen/bump-nodejs-dependencies.yaml deleted file mode 100755 index ef803b5bf..000000000 --- a/.chloggen/bump-nodejs-dependencies.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Bump NodeJS dependencies. Also, increase the size of the default size for the volume used to copy the autoinstrumentation libraries from 150M to 200M" - -# One or more tracking issues related to the change -issues: [2240, 2237] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix-TA-kubeconfig.yaml b/.chloggen/fix-TA-kubeconfig.yaml deleted file mode 100755 index 9f5efa1ea..000000000 --- a/.chloggen/fix-TA-kubeconfig.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: reset kubeconfig to empty string when using in-cluster config - -# One or more tracking issues related to the change -issues: [2262] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: "" diff --git a/.chloggen/update-opamp-bridge-spec.yaml b/.chloggen/update-opamp-bridge-spec.yaml deleted file mode 100755 index d5420243b..000000000 --- a/.chloggen/update-opamp-bridge-spec.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: OpAMP Bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the / structure as described. - -# One or more tracking issues related to the change -issues: [2131] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - * Updates the bridge to get collectors using the reporting annotation - * Fixes a bug where we were using the incorrect structure for the collectors diff --git a/CHANGELOG.md b/CHANGELOG.md index efab8fd45..f9b75ec15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,38 @@ Changes by Version ================== +## 0.88.0 + +### 🛑 Breaking changes 🛑 + +- `OpAMP Bridge`: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the / structure as described. (#2131) + * Updates the bridge to get collectors using the reporting annotation + * Fixes a bug where we were using the incorrect structure for the collectors + + +### 💡 Enhancements 💡 + +- `operator-opamp-bridge`: Creates the CRD for the OpAMPBridge resource (#1368) +- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 (#2252) +- `operator`: Bump NodeJS dependencies. Also, increase the size of the default size for the volume used to copy the autoinstrumentation libraries from 150M to 200M (#2240, #2237) + +### 🧰 Bug fixes 🧰 + +- `Operator`: Fixed the labeling process which was broken at the moment to capture the current image tag when the users set the sha256 reference. (#1982) +- `target allocator`: reset kubeconfig to empty string when using in-cluster config (#2262) + +### Components + +* [OpenTelemetry Collector - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.88.0) +* [OpenTelemetry Contrib - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.88.0) +* [Java auto-instrumentation - 1.31.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.31.0) +* [.NET auto-instrumentation - 1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.1.0) +* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) +* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) +* [Go - v0.7.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.7.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) +* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] + ## 0.87.0 ### 🛑 Breaking changes 🛑 diff --git a/README.md b/README.md index 678ee68ca..cc7bc896b 100644 --- a/README.md +++ b/README.md @@ -682,6 +682,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.88.0 | v1.23 to v1.28 | v1 | | v0.87.0 | v1.23 to v1.28 | v1 | | v0.86.0 | v1.23 to v1.28 | v1 | | v0.85.0 | v1.19 to v1.28 | v1 | @@ -704,7 +705,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.68.0 | v1.19 to v1.25 | v1 | | v0.67.0 | v1.19 to v1.25 | v1 | | v0.66.0 | v1.19 to v1.25 | v1 | -| v0.64.1 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 40d1ebf83..142232660 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.88.0 | @swiatekm-sumo | | v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | | v0.92.0 | @pavolloffay | | v0.93.0 | @VineethReddy02 | | v0.94.0 | @TylerHelmuth | +| v0.95.0 | @swiatekm-sumo | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 800ea67da..3aa454611 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-10-17T18:16:13Z" + createdAt: "2023-10-31T11:59:58Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.87.0 + name: opentelemetry-operator.v0.88.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -344,7 +344,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.87.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.88.0 livenessProbe: httpGet: path: /healthz @@ -452,7 +452,7 @@ spec: minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community - version: 0.87.0 + version: 0.88.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index a78e3553f..65965cec1 100644 --- a/versions.txt +++ b/versions.txt @@ -2,24 +2,24 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.87.0 +opentelemetry-collector=0.88.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.87.0 +operator=0.88.0 # Represents the current release of the Target Allocator. -targetallocator=0.87.0 +targetallocator=0.88.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.87.0 +operator-opamp-bridge=0.88.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.30.0 +autoinstrumentation-java=1.31.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json -autoinstrumentation-nodejs=0.41.1 +autoinstrumentation-nodejs=0.44.0 # Represents the current release of Python instrumentation. # Should match value in autoinstrumentation/python/requirements.txt @@ -27,7 +27,7 @@ autoinstrumentation-python=0.41b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=1.0.2 +autoinstrumentation-dotnet=1.1.0 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.7.0-alpha From 4b310f5cc94d73d5b29e598a5e2217a7ef62f36f Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Fri, 3 Nov 2023 11:18:38 -0400 Subject: [PATCH 1121/1234] Add Heartbeat and managed annotation checker to the bridge (#2294) * add heartbeat, upgrade to latest * chlog * Fix tests * pipe the name through * set name in tests * add health test * Simplify * Fix tests --- .chloggen/add-managed-bridge-annotation.yaml | 16 ++ cmd/operator-opamp-bridge/agent/agent.go | 98 +++++++++-- cmd/operator-opamp-bridge/agent/agent_test.go | 159 +++++++++++++++++- .../agent/testdata/basic.yaml | 2 + .../agent/testdata/invalid.yaml | 2 + .../agent/testdata/updated.yaml | 2 + cmd/operator-opamp-bridge/config/config.go | 12 ++ .../config/config_test.go | 7 +- cmd/operator-opamp-bridge/config/flags.go | 26 ++- .../config/flags_test.go | 13 ++ .../config/testdata/agenthttpbasic.yaml | 2 + cmd/operator-opamp-bridge/go.mod | 4 +- cmd/operator-opamp-bridge/go.sum | 4 +- cmd/operator-opamp-bridge/main.go | 2 +- cmd/operator-opamp-bridge/operator/client.go | 45 ++++- .../operator/client_test.go | 45 +++-- .../operator/testdata/collector.yaml | 3 + .../testdata/unmanaged-collector.yaml | 31 ++++ .../operator/testdata/updated-collector.yaml | 3 + go.mod | 1 + go.sum | 26 +++ 21 files changed, 445 insertions(+), 58 deletions(-) create mode 100755 .chloggen/add-managed-bridge-annotation.yaml create mode 100644 cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml diff --git a/.chloggen/add-managed-bridge-annotation.yaml b/.chloggen/add-managed-bridge-annotation.yaml new file mode 100755 index 000000000..65896db54 --- /dev/null +++ b/.chloggen/add-managed-bridge-annotation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: OpAMP Bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Sends a heartbeat from the bridge and brings the annotation to spec. + +# One or more tracking issues related to the change +issues: [2132] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go index 90bbf13f2..9b20d9073 100644 --- a/cmd/operator-opamp-bridge/agent/agent.go +++ b/cmd/operator-opamp-bridge/agent/agent.go @@ -21,25 +21,24 @@ import ( "time" "github.com/go-logr/logr" - "gopkg.in/yaml.v3" - - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/metrics" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" - - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/oklog/ulid/v2" - "go.uber.org/multierr" - "github.com/open-telemetry/opamp-go/client" "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" + "go.uber.org/multierr" + "k8s.io/utils/clock" + "sigs.k8s.io/yaml" + + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/metrics" + "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" ) type Agent struct { logger logr.Logger appliedKeys map[collectorKey]bool + clock clock.Clock startTime uint64 lastHash []byte @@ -52,9 +51,16 @@ type Agent struct { config *config.Config applier operator.ConfigApplier remoteConfigEnabled bool + + done chan struct{} + ticker *time.Ticker } func NewAgent(logger logr.Logger, applier operator.ConfigApplier, config *config.Config, opampClient client.OpAMPClient) *Agent { + var t *time.Ticker + if config.HeartbeatInterval > 0 { + t = time.NewTicker(config.HeartbeatInterval) + } agent := &Agent{ config: config, applier: applier, @@ -64,6 +70,9 @@ func NewAgent(logger logr.Logger, applier operator.ConfigApplier, config *config agentDescription: config.GetDescription(), remoteConfigEnabled: config.RemoteConfigEnabled(), opampClient: opampClient, + clock: clock.RealClock{}, + done: make(chan struct{}, 1), + ticker: t, } agent.logger.V(3).Info("Agent created", @@ -74,13 +83,42 @@ func NewAgent(logger logr.Logger, applier operator.ConfigApplier, config *config return agent } -// TODO: Something should run on a schedule to set the health of the OpAMP client. -func (agent *Agent) getHealth() *protobufs.AgentHealth { - return &protobufs.AgentHealth{ - Healthy: true, - StartTimeUnixNano: agent.startTime, - LastError: "", +// getHealth is called every heartbeat interval to report health. +func (agent *Agent) getHealth() *protobufs.ComponentHealth { + healthMap, err := agent.generateComponentHealthMap() + if err != nil { + return &protobufs.ComponentHealth{ + Healthy: false, + StartTimeUnixNano: agent.startTime, + LastError: err.Error(), + } + } + return &protobufs.ComponentHealth{ + Healthy: true, + StartTimeUnixNano: agent.startTime, + StatusTimeUnixNano: uint64(agent.clock.Now().UnixNano()), + LastError: "", + ComponentHealthMap: healthMap, + } +} + +// generateComponentHealthMap allows the bridge to report the status of the collector pools it owns. +// TODO: implement enhanced health messaging. +func (agent *Agent) generateComponentHealthMap() (map[string]*protobufs.ComponentHealth, error) { + cols, err := agent.applier.ListInstances() + if err != nil { + return nil, err } + healthMap := map[string]*protobufs.ComponentHealth{} + for _, col := range cols { + key := newCollectorKey(col.GetNamespace(), col.GetName()) + healthMap[key.String()] = &protobufs.ComponentHealth{ + StartTimeUnixNano: uint64(col.ObjectMeta.GetCreationTimestamp().UnixNano()), + StatusTimeUnixNano: uint64(agent.clock.Now().UnixNano()), + Status: col.Status.Scale.StatusReplicas, + } + } + return healthMap, nil } // onConnect is called when an agent is successfully connected to a server. @@ -105,7 +143,7 @@ func (agent *Agent) saveRemoteConfigStatus(_ context.Context, status *protobufs. // Start sets up the callbacks for the OpAMP client and begins the client's connection to the server. func (agent *Agent) Start() error { - agent.startTime = uint64(time.Now().UnixNano()) + agent.startTime = uint64(agent.clock.Now().UnixNano()) settings := types.StartSettings{ OpAMPServerURL: agent.config.Endpoint, InstanceUid: agent.instanceId.String(), @@ -137,11 +175,38 @@ func (agent *Agent) Start() error { return err } + if agent.config.HeartbeatInterval > 0 { + go agent.runHeartbeat() + } + agent.logger.V(3).Info("OpAMP Client started.") return nil } +// runHeartbeat sets health on an interval to keep the connection active. +func (agent *Agent) runHeartbeat() { + if agent.ticker == nil { + agent.logger.Info("cannot run heartbeat without setting an interval for the ticker") + return + } + for { + select { + case <-agent.ticker.C: + agent.logger.V(4).Info("sending heartbeat") + err := agent.opampClient.SetHealth(agent.getHealth()) + if err != nil { + agent.logger.Error(err, "failed to heartbeat") + return + } + case <-agent.done: + agent.ticker.Stop() + agent.logger.Info("stopping heartbeating") + return + } + } +} + // updateAgentIdentity receives a new instanced Id from the remote server and updates the agent's instanceID field. // The meter will be reinitialized by the onMessage function. func (agent *Agent) updateAgentIdentity(instanceId ulid.ULID) { @@ -249,6 +314,7 @@ func (agent *Agent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (*pro // Shutdown will stop the OpAMP client gracefully. func (agent *Agent) Shutdown() { agent.logger.V(3).Info("Agent shutting down...") + close(agent.done) if agent.opampClient != nil { err := agent.opampClient.Stop(context.Background()) if err != nil { diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go index 42d0d1cb6..b6086c79b 100644 --- a/cmd/operator-opamp-bridge/agent/agent_test.go +++ b/cmd/operator-opamp-bridge/agent/agent_test.go @@ -21,18 +21,19 @@ import ( "os" "sort" "testing" + "time" "github.com/go-logr/logr" - "github.com/spf13/pflag" - "github.com/stretchr/testify/require" - "github.com/oklog/ulid/v2" "github.com/open-telemetry/opamp-go/client" "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" + "github.com/spf13/pflag" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + testingclock "k8s.io/utils/clock/testing" "sigs.k8s.io/controller-runtime/pkg/client/fake" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -57,6 +58,11 @@ const ( agentTestFileBasicComponentsAllowedName = "testdata/agentbasiccomponentsallowed.yaml" agentTestFileBatchNotAllowedName = "testdata/agentbatchnotallowed.yaml" agentTestFileNoProcessorsAllowedName = "testdata/agentnoprocessorsallowed.yaml" + + // collectorStartTime is set to the result of a zero'd out creation timestamp + // read more here https://github.com/open-telemetry/opentelemetry-go/issues/4268 + // we could attempt to hack the creation timestamp, but this is a constant and far easier. + collectorStartTime = uint64(11651379494838206464) ) var ( @@ -102,7 +108,7 @@ func (m *mockOpampClient) AgentDescription() *protobufs.AgentDescription { return nil } -func (m *mockOpampClient) SetHealth(_ *protobufs.AgentHealth) error { +func (m *mockOpampClient) SetHealth(_ *protobufs.ComponentHealth) error { return nil } @@ -134,7 +140,146 @@ func getFakeApplier(t *testing.T, conf *config.Config) *operator.Client { err := schemeBuilder.AddToScheme(scheme) require.NoError(t, err, "Should be able to add custom types") c := fake.NewClientBuilder().WithScheme(scheme) - return operator.NewClient(l, c.Build(), conf.GetComponentsAllowed()) + return operator.NewClient("test-bridge", l, c.Build(), conf.GetComponentsAllowed()) +} + +func TestAgent_getHealth(t *testing.T) { + fakeClock := testingclock.NewFakeClock(time.Now()) + type fields struct { + configFile string + } + type args struct { + ctx context.Context + // List of mappings from namespace/name to a config file, tests are run in order of list + configs []map[string]string + } + tests := []struct { + name string + args args + fields fields + // want is evaluated with the corresponding configs' index. + want []*protobufs.ComponentHealth + }{ + { + name: "no data", + fields: fields{ + configFile: agentTestFileName, + }, + args: args{ + ctx: context.Background(), + configs: nil, + }, + want: []*protobufs.ComponentHealth{ + { + Healthy: true, + StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + LastError: "", + Status: "", + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + ComponentHealthMap: map[string]*protobufs.ComponentHealth{}, + }, + }, + }, + { + name: "base case", + fields: fields{ + configFile: agentTestFileName, + }, + args: args{ + ctx: context.Background(), + configs: []map[string]string{ + { + testCollectorKey: collectorBasicFile, + }, + }, + }, + want: []*protobufs.ComponentHealth{ + { + Healthy: true, + StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + ComponentHealthMap: map[string]*protobufs.ComponentHealth{ + "testnamespace/collector": { + Healthy: false, // we're working with mocks so the status will never be reconciled. + StartTimeUnixNano: collectorStartTime, + LastError: "", + Status: "", + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + }, + }, + }, + }, + }, + { + name: "two collectors", + fields: fields{ + configFile: agentTestFileName, + }, + args: args{ + ctx: context.Background(), + configs: []map[string]string{ + { + testCollectorKey: collectorBasicFile, + otherCollectorKey: collectorUpdatedFile, + }, + }, + }, + want: []*protobufs.ComponentHealth{ + { + Healthy: true, + StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + ComponentHealthMap: map[string]*protobufs.ComponentHealth{ + "testnamespace/collector": { + Healthy: false, // we're working with mocks so the status will never be reconciled. + StartTimeUnixNano: collectorStartTime, + LastError: "", + Status: "", + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + }, + "testnamespace/other": { + Healthy: false, // we're working with mocks so the status will never be reconciled. + StartTimeUnixNano: collectorStartTime, + LastError: "", + Status: "", + StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), + }, + }, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + mockClient := &mockOpampClient{} + conf := config.NewConfig(logr.Discard()) + loadErr := config.LoadFromFile(conf, tt.fields.configFile) + require.NoError(t, loadErr, "should be able to load config") + applier := getFakeApplier(t, conf) + agent := NewAgent(l, applier, conf, mockClient) + agent.clock = fakeClock + err := agent.Start() + defer agent.Shutdown() + require.NoError(t, err, "should be able to start agent") + if len(tt.args.configs) > 0 { + require.True(t, len(tt.args.configs) == len(tt.want), "must have an equal amount of configs and checks.") + } else { + require.Len(t, tt.want, 1, "must have exactly one want if no config is supplied.") + require.Equal(t, tt.want[0], agent.getHealth()) + } + for i, configMap := range tt.args.configs { + data, err := getMessageDataFromConfigFile(configMap) + require.NoError(t, err, "should be able to load data") + agent.onMessage(tt.args.ctx, data) + effectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) + require.NoError(t, err, "should be able to get effective config") + // We should only expect this to happen if we supply configuration + assert.Equal(t, effectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") + assert.NotNilf(t, effectiveConfig.ConfigMap.GetConfigMap(), "configmap should have data") + assert.Equal(t, tt.want[i], agent.getHealth()) + } + }) + } } func TestAgent_onMessage(t *testing.T) { @@ -250,7 +395,7 @@ func TestAgent_onMessage(t *testing.T) { status: &protobufs.RemoteConfigStatus{ LastRemoteConfigHash: []byte(invalidYamlConfigHash), Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "error converting YAML to JSON: yaml: line 21: could not find expected ':'", + ErrorMessage: "error converting YAML to JSON: yaml: line 23: could not find expected ':'", }, }, }, @@ -413,7 +558,7 @@ func TestAgent_onMessage(t *testing.T) { nextStatus: &protobufs.RemoteConfigStatus{ LastRemoteConfigHash: []byte(invalidYamlConfigHash), // The new hash should be of the bad config Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "error converting YAML to JSON: yaml: line 21: could not find expected ':'", + ErrorMessage: "error converting YAML to JSON: yaml: line 23: could not find expected ':'", }, }, }, diff --git a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml index acefddb7e..410a328ed 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml @@ -1,6 +1,8 @@ kind: OpenTelemetryCollector metadata: name: simplest + labels: + "opentelemetry.io/opamp-managed": "true" spec: config: | receivers: diff --git a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml index a54813263..2a060581f 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml @@ -1,6 +1,8 @@ kind: OpenTelemetryCollector metadata: name: simplest + labels: + "opentelemetry.io/opamp-managed": "true" spec: config: | receivers: diff --git a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml index 1fdfd6aa6..53ce4af49 100644 --- a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml +++ b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml @@ -1,6 +1,8 @@ kind: OpenTelemetryCollector metadata: name: simplest + labels: + "opentelemetry.io/opamp-managed": "test-bridge" spec: config: | receivers: diff --git a/cmd/operator-opamp-bridge/config/config.go b/cmd/operator-opamp-bridge/config/config.go index d5253b8f5..882e5c6e2 100644 --- a/cmd/operator-opamp-bridge/config/config.go +++ b/cmd/operator-opamp-bridge/config/config.go @@ -95,6 +95,8 @@ type Config struct { ComponentsAllowed map[string][]string `yaml:"componentsAllowed,omitempty"` Endpoint string `yaml:"endpoint"` Capabilities map[Capability]bool `yaml:"capabilities"` + HeartbeatInterval time.Duration `yaml:"heartbeatInterval,omitempty"` + Name string `yaml:"name,omitempty"` } func NewConfig(logger logr.Logger) *Config { @@ -248,6 +250,16 @@ func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { return err } + target.HeartbeatInterval, err = getHeartbeatInterval(flagSet) + if err != nil { + return err + } + + target.Name, err = getName(flagSet) + if err != nil { + return err + } + return nil } diff --git a/cmd/operator-opamp-bridge/config/config_test.go b/cmd/operator-opamp-bridge/config/config_test.go index b8cce48a2..5f68c4fb2 100644 --- a/cmd/operator-opamp-bridge/config/config_test.go +++ b/cmd/operator-opamp-bridge/config/config_test.go @@ -17,6 +17,7 @@ package config import ( "fmt" "testing" + "time" "github.com/go-logr/logr" "github.com/stretchr/testify/assert" @@ -63,8 +64,10 @@ func TestLoad(t *testing.T) { file: "./testdata/agenthttpbasic.yaml", }, want: &Config{ - RootLogger: logr.Discard(), - Endpoint: "http://127.0.0.1:4320/v1/opamp", + RootLogger: logr.Discard(), + Endpoint: "http://127.0.0.1:4320/v1/opamp", + HeartbeatInterval: 45 * time.Second, + Name: "http-test-bridge", Capabilities: map[Capability]bool{ AcceptsRemoteConfig: true, ReportsEffectiveConfig: true, diff --git a/cmd/operator-opamp-bridge/config/flags.go b/cmd/operator-opamp-bridge/config/flags.go index 5bd42aaa9..2fe101e29 100644 --- a/cmd/operator-opamp-bridge/config/flags.go +++ b/cmd/operator-opamp-bridge/config/flags.go @@ -17,6 +17,7 @@ package config import ( "flag" "path/filepath" + "time" "github.com/spf13/pflag" "k8s.io/client-go/util/homedir" @@ -25,11 +26,14 @@ import ( // Flag names. const ( - opampBridgeName = "opamp-bridge" - defaultConfigFilePath = "/conf/remoteconfiguration.yaml" - configFilePathFlagName = "config-file" - listenAddrFlagName = "listen-addr" - kubeConfigPathFlagName = "kubeconfig-path" + opampBridgeName = "opamp-bridge" + defaultConfigFilePath = "/conf/remoteconfiguration.yaml" + configFilePathFlagName = "config-file" + listenAddrFlagName = "listen-addr" + kubeConfigPathFlagName = "kubeconfig-path" + heartbeatIntervalFlagName = "heartbeat-interval" + nameFlagName = "name" + defaultHeartbeatInterval = 30 * time.Second ) // We can't bind this flag to our FlagSet, so we need to handle it separately. @@ -39,17 +43,27 @@ func GetFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { flagSet := pflag.NewFlagSet(opampBridgeName, errorHandling) flagSet.String(configFilePathFlagName, defaultConfigFilePath, "The path to the config file.") flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") - flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file.") + flagSet.Duration(heartbeatIntervalFlagName, defaultHeartbeatInterval, "The interval to use for sending a heartbeat. Setting it to 0 disables the heartbeat.") + flagSet.String(nameFlagName, opampBridgeName, "The name of the bridge to use for querying managed collectors.") zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) zapCmdLineOpts.BindFlags(zapFlagSet) flagSet.AddGoFlagSet(zapFlagSet) return flagSet } +func getHeartbeatInterval(flagset *pflag.FlagSet) (time.Duration, error) { + return flagset.GetDuration(heartbeatIntervalFlagName) +} + func getConfigFilePath(flagSet *pflag.FlagSet) (string, error) { return flagSet.GetString(configFilePathFlagName) } +func getName(flagSet *pflag.FlagSet) (string, error) { + return flagSet.GetString(nameFlagName) +} + func getKubeConfigFilePath(flagSet *pflag.FlagSet) (string, error) { return flagSet.GetString(kubeConfigPathFlagName) } diff --git a/cmd/operator-opamp-bridge/config/flags_test.go b/cmd/operator-opamp-bridge/config/flags_test.go index e297a3c69..b43b99f27 100644 --- a/cmd/operator-opamp-bridge/config/flags_test.go +++ b/cmd/operator-opamp-bridge/config/flags_test.go @@ -17,6 +17,7 @@ package config import ( "path/filepath" "testing" + "time" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" @@ -51,12 +52,24 @@ func TestFlagGetters(t *testing.T) { expectedValue: filepath.Join("~", ".kube", "config"), getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getKubeConfigFilePath(fs) }, }, + { + name: "GetName", + flagArgs: []string{"--" + nameFlagName, "test"}, + expectedValue: "test", + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getName(fs) }, + }, { name: "GetListenAddr", flagArgs: []string{"--" + listenAddrFlagName, ":8081"}, expectedValue: ":8081", getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getListenAddr(fs) }, }, + { + name: "GetHeartbeatInterval", + flagArgs: []string{"--" + heartbeatIntervalFlagName, "45s"}, + expectedValue: 45 * time.Second, + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getHeartbeatInterval(fs) }, + }, { name: "InvalidFlag", flagArgs: []string{"--invalid-flag", "value"}, diff --git a/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml b/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml index 2dc1532d4..a96abad9d 100644 --- a/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml +++ b/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml @@ -1,4 +1,6 @@ endpoint: http://127.0.0.1:4320/v1/opamp +heartbeatInterval: 45s +name: "http-test-bridge" capabilities: AcceptsRemoteConfig: true ReportsEffectiveConfig: true diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 3cf039653..c29a8d0e5 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/go-logr/logr v1.3.0 github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.9.0 + github.com/open-telemetry/opamp-go v0.10.0 github.com/open-telemetry/opentelemetry-operator v0.85.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 @@ -17,7 +17,6 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.19.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 k8s.io/klog/v2 v2.110.1 @@ -86,6 +85,7 @@ require ( google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.28.3 // indirect k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index b3f9f2dab..398255d36 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -96,8 +96,8 @@ github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/open-telemetry/opamp-go v0.9.0 h1:S6Mwn8uxYjcttE6ZJ6AXoiOuryU67zjKysz3xRfYL9k= -github.com/open-telemetry/opamp-go v0.9.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= +github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0= +github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= github.com/open-telemetry/opentelemetry-operator v0.85.0 h1:HwKfaxePbGJCbl3y2rselSnT1QUw1Xd+81DkYTEvws8= github.com/open-telemetry/opentelemetry-operator v0.85.0/go.mod h1:6od0b2oGG/cqr8+nyOB4wsz1fg7QjnIsZDuynZqzBPE= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= diff --git a/cmd/operator-opamp-bridge/main.go b/cmd/operator-opamp-bridge/main.go index 404bd50d0..9c312292e 100644 --- a/cmd/operator-opamp-bridge/main.go +++ b/cmd/operator-opamp-bridge/main.go @@ -46,7 +46,7 @@ func main() { l.Error(kubeErr, "Couldn't create kubernetes client") os.Exit(1) } - operatorClient := operator.NewClient(l.WithName("operator-client"), kubeClient, cfg.GetComponentsAllowed()) + operatorClient := operator.NewClient(cfg.Name, l.WithName("operator-client"), kubeClient, cfg.GetComponentsAllowed()) opampClient := cfg.CreateClient() opampAgent := agent.NewAgent(l.WithName("agent"), operatorClient, cfg, opampClient) diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go index bf58a618f..b892cbe17 100644 --- a/cmd/operator-opamp-bridge/operator/client.go +++ b/cmd/operator-opamp-bridge/operator/client.go @@ -22,6 +22,8 @@ import ( "github.com/go-logr/logr" "github.com/open-telemetry/opamp-go/protobufs" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" @@ -32,7 +34,8 @@ const ( CollectorResource = "OpenTelemetryCollector" ResourceIdentifierKey = "created-by" ResourceIdentifierValue = "operator-opamp-bridge" - ReportingAnnotationKey = "opentelemetry.io/opamp-reporting" + ReportingLabelKey = "opentelemetry.io/opamp-reporting" + ManagedLabelKey = "opentelemetry.io/opamp-managed" ) type ConfigApplier interface { @@ -54,19 +57,31 @@ type Client struct { componentsAllowed map[string]map[string]bool k8sClient client.Client close chan bool + name string } var _ ConfigApplier = &Client{} -func NewClient(log logr.Logger, c client.Client, componentsAllowed map[string]map[string]bool) *Client { +func NewClient(name string, log logr.Logger, c client.Client, componentsAllowed map[string]map[string]bool) *Client { return &Client{ log: log, componentsAllowed: componentsAllowed, k8sClient: c, close: make(chan bool, 1), + name: name, } } +func (c Client) labelSetContainsLabel(instance *v1alpha1.OpenTelemetryCollector, label, value string) bool { + if instance == nil || instance.GetLabels() == nil { + return false + } + if labels := instance.GetLabels(); labels != nil && strings.EqualFold(labels[label], value) { + return true + } + return false +} + func (c Client) create(ctx context.Context, name string, namespace string, collector *v1alpha1.OpenTelemetryCollector) error { // Set the defaults collector.Default() @@ -127,12 +142,21 @@ func (c Client) Apply(name string, namespace string, configmap *protobufs.AgentC if err != nil { return err } + // If either the received collector or the collector being created has reporting set to true, it should be denied + if c.labelSetContainsLabel(instance, ReportingLabelKey, "true") || + c.labelSetContainsLabel(updatedCollector, ReportingLabelKey, "true") { + return errors.NewBadRequest("cannot modify a collector with `opentelemetry.io/opamp-reporting: true`") + } + // If either the received collector or the collector doesn't have the managed label set to true, it should be denied + if !c.labelSetContainsLabel(instance, ManagedLabelKey, "true") && + !c.labelSetContainsLabel(instance, ManagedLabelKey, c.name) && + !c.labelSetContainsLabel(updatedCollector, ManagedLabelKey, "true") && + !c.labelSetContainsLabel(updatedCollector, ManagedLabelKey, c.name) { + return errors.NewBadRequest("cannot modify a collector that doesn't have `opentelemetry.io/opamp-managed: true | ` set") + } if instance == nil { return c.create(ctx, name, namespace, updatedCollector) } - if labels := instance.GetLabels(); labels != nil && strings.EqualFold(labels[ReportingAnnotationKey], "true") { - return errors.NewBadRequest("cannot modify a collector with `opentelemetry.io/opamp-reporting: true`") - } return c.update(ctx, instance, updatedCollector) } @@ -155,15 +179,18 @@ func (c Client) Delete(name string, namespace string) error { func (c Client) ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) { ctx := context.Background() result := v1alpha1.OpenTelemetryCollectorList{} - err := c.k8sClient.List(ctx, &result, client.MatchingLabels{ - ResourceIdentifierKey: ResourceIdentifierValue, - }) + labelSelector := labels.NewSelector() + requirement, err := labels.NewRequirement(ManagedLabelKey, selection.In, []string{c.name, "true"}) + if err != nil { + return nil, err + } + err = c.k8sClient.List(ctx, &result, client.MatchingLabelsSelector{Selector: labelSelector.Add(*requirement)}) if err != nil { return nil, err } reportingCollectors := v1alpha1.OpenTelemetryCollectorList{} err = c.k8sClient.List(ctx, &reportingCollectors, client.MatchingLabels{ - ReportingAnnotationKey: "true", + ReportingLabelKey: "true", }) if err != nil { return nil, err diff --git a/cmd/operator-opamp-bridge/operator/client_test.go b/cmd/operator-opamp-bridge/operator/client_test.go index 13cccca76..8db8fb1a5 100644 --- a/cmd/operator-opamp-bridge/operator/client_test.go +++ b/cmd/operator-opamp-bridge/operator/client_test.go @@ -19,6 +19,7 @@ import ( "os" "testing" + "github.com/go-logr/logr" "github.com/open-telemetry/opamp-go/protobufs" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -26,14 +27,17 @@ import ( "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/yaml" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" ) var ( - clientLogger = logf.Log.WithName("client-tests") + clientLogger = logr.Discard() +) + +const ( + bridgeName = "bridge-test" ) func getFakeClient(t *testing.T) client.WithWatch { @@ -57,9 +61,10 @@ func TestClient_Apply(t *testing.T) { config string } tests := []struct { - name string - args args - wantErr bool + name string + args args + wantErr bool + errContains string }{ { name: "base case", @@ -77,7 +82,8 @@ func TestClient_Apply(t *testing.T) { namespace: "opentelemetry", file: "testdata/invalid-collector.yaml", }, - wantErr: true, + wantErr: true, + errContains: "error converting YAML to JSON", }, { name: "empty config", @@ -86,7 +92,8 @@ func TestClient_Apply(t *testing.T) { namespace: "opentelemetry", config: "", }, - wantErr: true, + wantErr: true, + errContains: "Must supply valid configuration", }, { name: "create reporting-only", @@ -95,13 +102,24 @@ func TestClient_Apply(t *testing.T) { namespace: "opentelemetry", file: "testdata/reporting-collector.yaml", }, - wantErr: false, + wantErr: true, + errContains: "opentelemetry.io/opamp-reporting", + }, + { + name: "create managed false", + args: args{ + name: "test", + namespace: "opentelemetry", + file: "testdata/unmanaged-collector.yaml", + }, + wantErr: true, + errContains: "opentelemetry.io/opamp-managed", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { fakeClient := getFakeClient(t) - c := NewClient(clientLogger, fakeClient, nil) + c := NewClient(bridgeName, clientLogger, fakeClient, nil) var colConfig []byte var err error if len(tt.args.file) > 0 { @@ -115,8 +133,9 @@ func TestClient_Apply(t *testing.T) { ContentType: "yaml", } applyErr := c.Apply(tt.args.name, tt.args.namespace, configmap) - if (applyErr != nil) != tt.wantErr { - t.Errorf("Apply() error = %v, wantErr %v", applyErr, tt.wantErr) + if tt.wantErr { + assert.Error(t, applyErr) + assert.ErrorContains(t, applyErr, tt.errContains) } }) } @@ -126,7 +145,7 @@ func Test_collectorUpdate(t *testing.T) { name := "test" namespace := "testing" fakeClient := getFakeClient(t) - c := NewClient(clientLogger, fakeClient, nil) + c := NewClient(bridgeName, clientLogger, fakeClient, nil) // Load reporting-only collector reportingColConfig, err := loadConfig("testdata/reporting-collector.yaml") @@ -191,7 +210,7 @@ func Test_collectorDelete(t *testing.T) { name := "test" namespace := "testing" fakeClient := getFakeClient(t) - c := NewClient(clientLogger, fakeClient, nil) + c := NewClient(bridgeName, clientLogger, fakeClient, nil) colConfig, err := loadConfig("testdata/collector.yaml") require.NoError(t, err, "Should be no error on loading test configuration") configmap := &protobufs.AgentConfigFile{ diff --git a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml index acefddb7e..c77c64c48 100644 --- a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml +++ b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml @@ -1,6 +1,9 @@ +apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: simplest + labels: + opentelemetry.io/opamp-managed: "true" spec: config: | receivers: diff --git a/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml new file mode 100644 index 000000000..48b793f98 --- /dev/null +++ b/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml @@ -0,0 +1,31 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + labels: + "opentelemetry.io/opamp-managed": "false" +spec: + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + memory_limiter: + check_interval: 1s + limit_percentage: 75 + spike_limit_percentage: 15 + batch: + send_batch_size: 10000 + timeout: 10s + + exporters: + debug: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml index 0cf824b5e..81a919b28 100644 --- a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml +++ b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml @@ -1,6 +1,9 @@ +apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: simplest + labels: + opentelemetry.io/opamp-managed: "true" spec: config: | receivers: diff --git a/go.mod b/go.mod index 179ca1796..5417ed02e 100644 --- a/go.mod +++ b/go.mod @@ -119,6 +119,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/open-telemetry/opamp-go v0.10.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/ovh/go-ovh v1.4.1 // indirect diff --git a/go.sum b/go.sum index 8c3a8ef5a..ea36bf370 100644 --- a/go.sum +++ b/go.sum @@ -44,6 +44,7 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9Orh github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= @@ -73,6 +74,9 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -87,6 +91,7 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= @@ -97,6 +102,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -132,6 +138,7 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -229,6 +236,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -277,6 +285,9 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= @@ -328,6 +339,7 @@ github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -341,6 +353,7 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -405,6 +418,7 @@ github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -419,10 +433,14 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0= +github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -436,6 +454,7 @@ github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -493,10 +512,13 @@ github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -517,6 +539,7 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -584,6 +607,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -901,6 +925,7 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -914,6 +939,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 12683fdba848bbe1696eb5681ddcea4a16d91c90 Mon Sep 17 00:00:00 2001 From: Christian Mergenthaler <377953+cmergenthaler@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:30:24 +0100 Subject: [PATCH 1122/1234] Declare ContainerPort for Target Allocator (#2313) * Declare ContainerPort for Target Allocator * Use ContainerPort in Target Allocator service * Changelog * Fix tests * Goimports * Goimports --- .../target-allocator-container-port.yaml | 16 +++++++ .../manifests/targetallocator/container.go | 8 ++++ .../targetallocator/container_test.go | 35 +++++++++++++++ internal/manifests/targetallocator/service.go | 2 +- .../manifests/targetallocator/service_test.go | 45 +++++++++++++++++++ 5 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 .chloggen/target-allocator-container-port.yaml create mode 100644 internal/manifests/targetallocator/service_test.go diff --git a/.chloggen/target-allocator-container-port.yaml b/.chloggen/target-allocator-container-port.yaml new file mode 100644 index 000000000..000f66233 --- /dev/null +++ b/.chloggen/target-allocator-container-port.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Declare and use ContainerPort for Target Allocator + +# One or more tracking issues related to the change +issues: [2312] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 8c88b41ea..6a6de7e5d 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -31,6 +31,13 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem image = cfg.TargetAllocatorImage() } + ports := make([]corev1.ContainerPort, 0) + ports = append(ports, corev1.ContainerPort{ + Name: "http", + ContainerPort: 8080, + Protocol: corev1.ProtocolTCP, + }) + volumeMounts := []corev1.VolumeMount{{ Name: naming.TAConfigMapVolume(), MountPath: "/conf", @@ -66,6 +73,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem return corev1.Container{ Name: naming.TAContainer(), Image: image, + Ports: ports, Env: envVars, VolumeMounts: volumeMounts, Resources: otelcol.Spec.TargetAllocator.Resources, diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 1661e319a..af0ad8478 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -62,6 +62,27 @@ func TestContainerWithImageOverridden(t *testing.T) { assert.Equal(t, "overridden-image", c.Image) } +func TestContainerPorts(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + Image: "default-image", + }, + }, + } + cfg := config.New() + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Len(t, c.Ports, 1) + assert.Equal(t, "http", c.Ports[0].Name) + assert.Equal(t, int32(8080), c.Ports[0].ContainerPort) +} + func TestContainerVolumes(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ @@ -168,6 +189,13 @@ func TestContainerHasEnvVars(t *testing.T) { SubPathExpr: "", }, }, + Ports: []corev1.ContainerPort{ + { + Name: "http", + ContainerPort: 8080, + Protocol: corev1.ProtocolTCP, + }, + }, } // test @@ -243,6 +271,13 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { SubPathExpr: "", }, }, + Ports: []corev1.ContainerPort{ + { + Name: "http", + ContainerPort: 8080, + Protocol: corev1.ProtocolTCP, + }, + }, } // test diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go index 684b3ebcc..bb3079dda 100644 --- a/internal/manifests/targetallocator/service.go +++ b/internal/manifests/targetallocator/service.go @@ -40,7 +40,7 @@ func Service(params manifests.Params) *corev1.Service { Ports: []corev1.ServicePort{{ Name: "targetallocation", Port: 80, - TargetPort: intstr.FromInt(8080), + TargetPort: intstr.FromString("http"), }}, }, } diff --git a/internal/manifests/targetallocator/service_test.go b/internal/manifests/targetallocator/service_test.go new file mode 100644 index 000000000..ad0676147 --- /dev/null +++ b/internal/manifests/targetallocator/service_test.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +func TestServicePorts(t *testing.T) { + otelcol := collectorInstance() + cfg := config.New() + + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + + ports := []v1.ServicePort{{Name: "targetallocation", Port: 80, TargetPort: intstr.FromString("http")}} + + s := Service(params) + + assert.Equal(t, ports[0].Name, s.Spec.Ports[0].Name) + assert.Equal(t, ports[0].Port, s.Spec.Ports[0].Port) + assert.Equal(t, ports[0].TargetPort, s.Spec.Ports[0].TargetPort) +} From f398a9da191269d378e40f1650cf9956bd2707e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 6 Nov 2023 18:02:07 +0100 Subject: [PATCH 1123/1234] Build manager on the host (#2289) * Build manager on the host Instead of building the manager binary during the docker image build, instead build it on the host and copy it to the image. This massively improves the performance of cross compilation, which is much faster natively vs emulation via QEMU. * Setup Go after checking our code in E2E tests This way we can cache based on the state of go.sum. * Minor improvements --- .github/workflows/e2e.yaml | 12 ++++--- .github/workflows/publish-images.yaml | 33 +++++++++--------- Dockerfile | 48 +++++---------------------- Makefile | 7 ++-- 4 files changed, 38 insertions(+), 62 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index fccb0bd61..608634450 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -34,19 +34,23 @@ jobs: - e2e-opampbridge steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "~1.21.1" + go-version: "~1.21.3" + cache-dependency-path: | + go.sum + cmd/otel-allocator/go.sum + cmd/operator-opamp-bridge/go.sum - name: Setup kind env: KIND_VERSION: "0.20.0" run: go install sigs.k8s.io/kind@v${KIND_VERSION} - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: "install kuttl" run: ./hack/install-kuttl.sh diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 1866ad884..96a281b7a 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -7,6 +7,9 @@ on: workflow_dispatch: +env: + PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + jobs: publish: name: Publish container images @@ -14,6 +17,10 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '~1.21.3' + - name: Unshallow run: git fetch --prune --unshallow @@ -34,7 +41,15 @@ jobs: grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_NGINX_VERSION="$2}' >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV - + + - name: Build the binary for each supported architecture + run: | + for platform in $(echo $PLATFORMS | tr "," "\n"); do + arch=${platform#*/} + echo "Building manager for $arch" + make manager ARCH=$arch + done + - name: Docker meta id: docker_meta uses: docker/metadata-action@v5 @@ -82,23 +97,9 @@ jobs: with: context: . file: ./Dockerfile - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + platforms: ${{ env.PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} - build-args: | - VERSION_PKG=github.com/open-telemetry/opentelemetry-operator/internal/version - VERSION=${{ env.VERSION }} - VERSION_DATE=${{ env.VERSION_DATE }} - OTELCOL_VERSION=${{ env.OTELCOL_VERSION }} - TARGETALLOCATOR_VERSION=${{ env.TARGETALLOCATOR_VERSION }} - OPERATOR_OPAMP_BRIDGE_VERSION=${{ env.OPERATOR_OPAMP_BRIDGE_VERSION }} - AUTO_INSTRUMENTATION_JAVA_VERSION=${{ env.AUTO_INSTRUMENTATION_JAVA_VERSION }} - AUTO_INSTRUMENTATION_NODEJS_VERSION=${{ env.AUTO_INSTRUMENTATION_NODEJS_VERSION }} - AUTO_INSTRUMENTATION_PYTHON_VERSION=${{ env.AUTO_INSTRUMENTATION_PYTHON_VERSION }} - AUTO_INSTRUMENTATION_DOTNET_VERSION=${{ env.AUTO_INSTRUMENTATION_DOTNET_VERSION }} - AUTO_INSTRUMENTATION_GO_VERSION=${{ env.AUTO_INSTRUMENTATION_GO_VERSION }} - AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${{ env.AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION }} - AUTO_INSTRUMENTATION_NGINX_VERSION=${{ env.AUTO_INSTRUMENTATION_NGINX_VERSION }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/Dockerfile b/Dockerfile index cff812ec5..e1efea1af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,51 +1,21 @@ -# Build the manager binary -FROM golang:1.21-alpine as builder - -WORKDIR /workspace +# Get CA certificates from alpine package repo +FROM alpine:3.18 as certificates RUN apk --no-cache add ca-certificates -# Copy the Go Modules manifests -COPY go.mod go.mod -COPY go.sum go.sum -# cache deps before building and copying source so that we don't need to re-download as much -# and so that source changes don't invalidate our downloaded layer -RUN go mod download - -# Copy the go source -COPY main.go main.go -COPY apis/ apis/ -COPY controllers/ controllers/ -COPY internal/ internal/ -COPY pkg/ pkg/ -COPY versions.txt versions.txt - -ARG VERSION_PKG -ARG VERSION -ARG VERSION_DATE -ARG OTELCOL_VERSION -ARG TARGETALLOCATOR_VERSION -ARG OPERATOR_OPAMP_BRIDGE_VERSION -ARG AUTO_INSTRUMENTATION_JAVA_VERSION -ARG AUTO_INSTRUMENTATION_NODEJS_VERSION -ARG AUTO_INSTRUMENTATION_PYTHON_VERSION -ARG AUTO_INSTRUMENTATION_DOTNET_VERSION -ARG AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION -ARG AUTO_INSTRUMENTATION_NGINX_VERSION -ARG AUTO_INSTRUMENTATION_GO_VERSION - -# Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION}" -a -o manager main.go - ######## Start a new stage from scratch ####### FROM scratch +ARG TARGETARCH + WORKDIR / -# Copy the certs from the builder -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +# Copy the certs from Alpine +COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt + +# Copy binary built on the host +COPY bin/manager_${TARGETARCH} manager -COPY --from=builder /workspace/manager . USER 65532:65532 ENTRYPOINT ["/manager"] diff --git a/Makefile b/Makefile index 863009f04..aea1fac4b 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ test: generate fmt vet ensure-generate-is-noop envtest # Build manager binary .PHONY: manager manager: generate fmt vet - go build -o bin/manager main.go + CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -o bin/manager_${ARCH} -ldflags ${LD_FLAGS} main.go # Run against the configured Kubernetes cluster in ~/.kube/config .PHONY: run @@ -240,8 +240,9 @@ scorecard-tests: operator-sdk # Build the container image, used only for local dev purposes # buildx is used to ensure same results for arm based systems (m1/2 chips) .PHONY: container -container: - docker buildx build --load --platform linux/${ARCH} -t ${IMG} --build-arg VERSION_PKG=${VERSION_PKG} --build-arg VERSION=${VERSION} --build-arg VERSION_DATE=${VERSION_DATE} --build-arg OTELCOL_VERSION=${OTELCOL_VERSION} --build-arg TARGETALLOCATOR_VERSION=${TARGETALLOCATOR_VERSION} --build-arg OPERATOR_OPAMP_BRIDGE_VERSION=${OPERATOR_OPAMP_BRIDGE_VERSION} --build-arg AUTO_INSTRUMENTATION_JAVA_VERSION=${AUTO_INSTRUMENTATION_JAVA_VERSION} --build-arg AUTO_INSTRUMENTATION_NODEJS_VERSION=${AUTO_INSTRUMENTATION_NODEJS_VERSION} --build-arg AUTO_INSTRUMENTATION_PYTHON_VERSION=${AUTO_INSTRUMENTATION_PYTHON_VERSION} --build-arg AUTO_INSTRUMENTATION_DOTNET_VERSION=${AUTO_INSTRUMENTATION_DOTNET_VERSION} --build-arg AUTO_INSTRUMENTATION_GO_VERSION=${AUTO_INSTRUMENTATION_GO_VERSION} --build-arg AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} --build-arg AUTO_INSTRUMENTATION_NGINX_VERSION=${AUTO_INSTRUMENTATION_NGINX_VERSION} . +container: GOOS = linux +container: manager + docker build -t ${IMG} . # Push the container image, used only for local dev purposes .PHONY: container-push From d0b093c8088e9226575dbba07f58135caa51ce9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 6 Nov 2023 18:02:35 +0100 Subject: [PATCH 1124/1234] Build ta on the host and copy it into the container image (#2293) --- .../workflows/publish-target-allocator.yaml | 22 ++++++++++++--- Makefile | 9 ++++-- cmd/otel-allocator/Dockerfile | 28 ++++++------------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index 395670e8b..eb02478c3 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -11,6 +11,9 @@ on: - 'v*' workflow_dispatch: +env: + PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + jobs: publish: runs-on: ubuntu-22.04 @@ -18,11 +21,25 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: '~1.21.3' + cache-dependency-path: 'cmd/otel-allocator/go.sum' + + # TODO: We're currently not using this. Should we? - name: Read version run: | echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + - name: Build the binary for each supported architecture + run: | + for platform in $(echo $PLATFORMS | tr "," "\n"); do + arch=${platform#*/} + echo "Building target allocator for $arch" + make targetallocator ARCH=$arch + done + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -69,11 +86,8 @@ jobs: uses: docker/build-push-action@v5 with: context: cmd/otel-allocator - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + platforms: ${{ env.PLATFORMS }} push: true - build-args: | - VERSION=${{ env.VERSION }} - VERSION_DATE=${{ env.VERSION_DATE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache diff --git a/Makefile b/Makefile index aea1fac4b..4f94721c0 100644 --- a/Makefile +++ b/Makefile @@ -108,6 +108,10 @@ test: generate fmt vet ensure-generate-is-noop envtest manager: generate fmt vet CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -o bin/manager_${ARCH} -ldflags ${LD_FLAGS} main.go +# Build target allocator binary +targetallocator: + cd cmd/otel-allocator && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/targetallocator_${ARCH} . + # Run against the configured Kubernetes cluster in ~/.kube/config .PHONY: run run: generate fmt vet manifests @@ -254,8 +258,9 @@ container-target-allocator-push: docker push ${TARGETALLOCATOR_IMG} .PHONY: container-target-allocator -container-target-allocator: - docker buildx build --load --platform linux/${ARCH} -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator +container-target-allocator: GOOS = linux +container-target-allocator: targetallocator + docker build -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator .PHONY: container-operator-opamp-bridge container-operator-opamp-bridge: diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 47bd2baeb..1a2b9b7a2 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,29 +1,19 @@ -# Build the otel-allocator binary -FROM golang:1.21-alpine as builder - -WORKDIR /app +# Get CA certificates from the Alpine package repo +FROM alpine:3.18 as certificates RUN apk --no-cache add ca-certificates -# Copy go mod and sum files -COPY go.mod go.sum ./ - -RUN go mod download - -COPY . . - -# Build the Go app -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . - -######## Start a new stage from scratch ####### +# Start a new stage from scratch FROM scratch +ARG TARGETARCH + WORKDIR /root/ -# Copy the certs from the builder -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +# Copy the certs +COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -# Copy the pre-built binary file from the previous stage -COPY --from=builder /app/main . +# Copy binary built on the host +COPY bin/targetallocator_${TARGETARCH} ./main ENTRYPOINT ["./main"] From 1ebbc2e2e09d551811fd9c6f2fe53be0d1741fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 6 Nov 2023 18:03:02 +0100 Subject: [PATCH 1125/1234] Build opamp-bridge on the host (#2296) --- .../publish-operator-opamp-bridge.yaml | 22 ++++++++++++--- Makefile | 9 ++++-- cmd/operator-opamp-bridge/Dockerfile | 28 ++++++------------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index 8493d3747..c5833b554 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -11,18 +11,35 @@ on: - 'v*' workflow_dispatch: +env: + PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + jobs: publish: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + + - uses: actions/setup-go@v4 + with: + go-version: '~1.21.3' + cache-dependency-path: 'cmd/operator-opamp-bridge/go.sum' + # TODO: We're currently not using this. Should we? - name: Read version run: | echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + - name: Build the binary for each supported architecture + run: | + for platform in $(echo $PLATFORMS | tr "," "\n"); do + arch=${platform#*/} + echo "Building operator-opamp-bridge for $arch" + make operator-opamp-bridge ARCH=$arch + done + - name: Docker meta id: meta uses: docker/metadata-action@v5 @@ -69,11 +86,8 @@ jobs: uses: docker/build-push-action@v5 with: context: cmd/operator-opamp-bridge - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le + platforms: ${{ env.PLATFORMS }} push: true - build-args: | - VERSION=${{ env.VERSION }} - VERSION_DATE=${{ env.VERSION_DATE }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache diff --git a/Makefile b/Makefile index 4f94721c0..f2733d89a 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,10 @@ manager: generate fmt vet targetallocator: cd cmd/otel-allocator && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/targetallocator_${ARCH} . +# Build opamp bridge binary +operator-opamp-bridge: + cd cmd/operator-opamp-bridge && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/opampbridge_${ARCH} . + # Run against the configured Kubernetes cluster in ~/.kube/config .PHONY: run run: generate fmt vet manifests @@ -263,8 +267,9 @@ container-target-allocator: targetallocator docker build -t ${TARGETALLOCATOR_IMG} cmd/otel-allocator .PHONY: container-operator-opamp-bridge -container-operator-opamp-bridge: - docker buildx build --platform linux/${ARCH} -t ${OPERATOROPAMPBRIDGE_IMG} cmd/operator-opamp-bridge +container-operator-opamp-bridge: GOOS = linux +container-operator-opamp-bridge: operator-opamp-bridge + docker build -t ${OPERATOROPAMPBRIDGE_IMG} cmd/operator-opamp-bridge .PHONY: start-kind start-kind: diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index 0ec1b6581..ae8a861b8 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -1,29 +1,19 @@ -# Build the operator-opamp-bridge binary -FROM golang:1.21-alpine as builder - -WORKDIR /app +# Get CA certificates from the Alpine package repo +FROM alpine:3.18 as certificates RUN apk --no-cache add ca-certificates -# Copy go mod and sum files -COPY go.mod go.sum ./ - -RUN go mod download - -COPY . . - -# Build the Go app -RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main . - -######## Start a new stage from scratch ####### +# Start a new stage from scratch FROM scratch +ARG TARGETARCH + WORKDIR /root/ -# Copy the certs from the builder -COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +# Copy the certs +COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -# Copy the pre-built binary file from the previous stage -COPY --from=builder /app/main . +# Copy binary built on the host +COPY bin/opampbridge_${TARGETARCH} ./main ENTRYPOINT ["./main"] From 1dc4f5e5a9388c2391fa805ed325abecb2d76bbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:39:53 -0600 Subject: [PATCH 1126/1234] Bump the prometheus group with 1 update (#2316) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.68.0...v0.69.0) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 3 +-- go.sum | 30 ++---------------------------- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 5417ed02e..27de9cb5f 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0 github.com/prometheus/prometheus v0.47.2 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -119,7 +119,6 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opamp-go v0.10.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/ovh/go-ovh v1.4.1 // indirect diff --git a/go.sum b/go.sum index ea36bf370..ca7ff0471 100644 --- a/go.sum +++ b/go.sum @@ -44,7 +44,6 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9Orh github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= @@ -74,9 +73,6 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -91,7 +87,6 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= @@ -102,7 +97,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -138,7 +132,6 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -236,7 +229,6 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -285,9 +277,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= @@ -339,7 +328,6 @@ github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= @@ -353,7 +341,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= @@ -418,7 +405,6 @@ github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -433,14 +419,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0= -github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -454,7 +436,6 @@ github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -466,8 +447,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 h1:yl9ceUSUBo9woQIO+8eoWpcxZkdZgm89g+rVvu37TUw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0/go.mod h1:9Uuu3pEU2jB8PwuqkHvegQ0HV/BlZRJUyfTYAqfdVF8= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0 h1:cPzbMVI2tvPict9TE0R5BkVRHuG5IWXvpVB2fTXkjL4= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -512,13 +493,10 @@ github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -539,7 +517,6 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -607,7 +584,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -925,7 +901,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -939,7 +914,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From c19cfcc5692a79ac8b04633bf187f940ddcc6944 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:42:31 -0600 Subject: [PATCH 1127/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 1 update (#2303) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 1 update: [sigs.k8s.io/yaml](https://github.com/kubernetes-sigs/yaml). - [Release notes](https://github.com/kubernetes-sigs/yaml/releases) - [Changelog](https://github.com/kubernetes-sigs/yaml/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/yaml/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/yaml dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 4 ++-- cmd/operator-opamp-bridge/go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index c29a8d0e5..f580d8904 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -20,8 +20,9 @@ require ( k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 k8s.io/klog/v2 v2.110.1 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 - sigs.k8s.io/yaml v1.3.0 + sigs.k8s.io/yaml v1.4.0 ) require ( @@ -90,7 +91,6 @@ require ( k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 398255d36..9e762e30b 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -272,5 +272,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From 8a924159335e0c8d3dcd33f7b1265535ae82ad18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 8 Nov 2023 18:06:38 +0100 Subject: [PATCH 1128/1234] Strip debug info from binaries (#2322) Strip the symbol table (-s) and DWARF debug information (-w) from published binaries. This is basically standard practice - it's how collector releases are built, for example. Note that the Go runtime will still retain enough information to annotate stack traces in panic logs. --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f2733d89a..9185fee16 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ AUTO_INSTRUMENTATION_DOTNET_VERSION ?= "$(shell grep -v '\#' versions.txt | grep AUTO_INSTRUMENTATION_GO_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print $$2}')" AUTO_INSTRUMENTATION_NGINX_VERSION ?= "$(shell grep -v '\#' versions.txt | grep autoinstrumentation-nginx | awk -F= '{print $$2}')" -LD_FLAGS ?= "-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION}" +COMMON_LDFLAGS ?= -s -w +OPERATOR_LDFLAGS ?= -X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${OTELCOL_VERSION} -X ${VERSION_PKG}.targetAllocator=${TARGETALLOCATOR_VERSION} -X ${VERSION_PKG}.operatorOpAMPBridge=${OPERATOR_OPAMP_BRIDGE_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION} -X ${VERSION_PKG}.autoInstrumentationNodeJS=${AUTO_INSTRUMENTATION_NODEJS_VERSION} -X ${VERSION_PKG}.autoInstrumentationPython=${AUTO_INSTRUMENTATION_PYTHON_VERSION} -X ${VERSION_PKG}.autoInstrumentationDotNet=${AUTO_INSTRUMENTATION_DOTNET_VERSION} -X ${VERSION_PKG}.autoInstrumentationGo=${AUTO_INSTRUMENTATION_GO_VERSION} -X ${VERSION_PKG}.autoInstrumentationApacheHttpd=${AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION} -X ${VERSION_PKG}.autoInstrumentationNginx=${AUTO_INSTRUMENTATION_NGINX_VERSION} ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets @@ -106,20 +107,20 @@ test: generate fmt vet ensure-generate-is-noop envtest # Build manager binary .PHONY: manager manager: generate fmt vet - CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -o bin/manager_${ARCH} -ldflags ${LD_FLAGS} main.go + CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -o bin/manager_${ARCH} -ldflags "${COMMON_LDFLAGS} ${OPERATOR_LDFLAGS}" main.go # Build target allocator binary targetallocator: - cd cmd/otel-allocator && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/targetallocator_${ARCH} . + cd cmd/otel-allocator && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/targetallocator_${ARCH} -ldflags "${COMMON_LDFLAGS}" . # Build opamp bridge binary operator-opamp-bridge: - cd cmd/operator-opamp-bridge && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/opampbridge_${ARCH} . + cd cmd/operator-opamp-bridge && CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) go build -a -installsuffix cgo -o bin/opampbridge_${ARCH} -ldflags "${COMMON_LDFLAGS}" . # Run against the configured Kubernetes cluster in ~/.kube/config .PHONY: run run: generate fmt vet manifests - ENABLE_WEBHOOKS=$(ENABLE_WEBHOOKS) go run -ldflags ${LD_FLAGS} ./main.go --zap-devel + ENABLE_WEBHOOKS=$(ENABLE_WEBHOOKS) go run -ldflags ${OPERATOR_LDFLAGS} ./main.go --zap-devel # Install CRDs into a cluster .PHONY: install From f60a945ce3332881bb2d4aa2a18299e697355c14 Mon Sep 17 00:00:00 2001 From: Rohan Vernekar Date: Wed, 8 Nov 2023 12:07:26 -0500 Subject: [PATCH 1129/1234] fix(operator): truncate sidecar pod injected label to 63 chars (#2250) Refs: #1032 Co-authored-by: Jacob Aronoff --- .chloggen/truncate-pod-label.yaml | 16 ++++++++++++++++ pkg/sidecar/pod.go | 6 +++--- pkg/sidecar/pod_test.go | 5 +++-- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100755 .chloggen/truncate-pod-label.yaml diff --git a/.chloggen/truncate-pod-label.yaml b/.chloggen/truncate-pod-label.yaml new file mode 100755 index 000000000..70ef70ce9 --- /dev/null +++ b/.chloggen/truncate-pod-label.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Truncate `sidecar.opentelemetry.io/injected` sidecar pod label to 63 characters + +# One or more tracking issues related to the change +issues: [1031] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 3ac35d8cb..6c119fc59 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -28,8 +28,8 @@ import ( ) const ( - label = "sidecar.opentelemetry.io/injected" - confEnvVar = "OTEL_CONFIG" + injectedLabel = "sidecar.opentelemetry.io/injected" + confEnvVar = "OTEL_CONFIG" ) // add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. @@ -53,7 +53,7 @@ func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCo if pod.Labels == nil { pod.Labels = map[string]string{} } - pod.Labels[label] = fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name) + pod.Labels[injectedLabel] = naming.Truncate("%s.%s", 63, otelcol.Namespace, otelcol.Name) return pod, nil } diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index aceb01d6b..265bef8f7 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -48,7 +48,7 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { } otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ - Name: "otelcol-sample", + Name: "otelcol-sample-with-a-name-that-is-longer-than-sixty-three-characters", Namespace: "some-app", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ @@ -74,7 +74,8 @@ processors: require.Len(t, changed.Spec.Containers, 2) require.Len(t, changed.Spec.InitContainers, 2) require.Len(t, changed.Spec.Volumes, 1) - assert.Equal(t, "some-app.otelcol-sample", changed.Labels["sidecar.opentelemetry.io/injected"]) + assert.Equal(t, "otelcol-sample-with-a-name-that-is-longer-than-sixty-three-cha", + changed.Labels["sidecar.opentelemetry.io/injected"]) assert.Equal(t, corev1.Container{ Name: "otc-container", Image: "some-default-image", From d76cf668d95bf70fff8e473cfb163f35d500b911 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Fri, 10 Nov 2023 04:56:02 +0800 Subject: [PATCH 1130/1234] Add target allocator affinity configuration (#2323) * add affinity to api and manifest * crd and api with make * add test to target allocator affinity * add chlog * add test to deployment * update bundle * fix comment for ta deployment test --- .chloggen/allocator-affinity.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 3 + apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...emetry-operator.clusterserviceversion.yaml | 2 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 729 +++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 729 +++++++++ docs/api.md | 1309 +++++++++++++++++ .../manifests/targetallocator/deployment.go | 1 + .../targetallocator/deployment_test.go | 59 + .../targetallocator-features/00-assert.yaml | 9 + .../targetallocator-features/00-install.yaml | 9 + 11 files changed, 2870 insertions(+), 1 deletion(-) create mode 100755 .chloggen/allocator-affinity.yaml diff --git a/.chloggen/allocator-affinity.yaml b/.chloggen/allocator-affinity.yaml new file mode 100755 index 000000000..b202e09e3 --- /dev/null +++ b/.chloggen/allocator-affinity.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add target allocator affinity configuration + +# One or more tracking issues related to the change +issues: [2263] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 6f9898c01..7d0af3e20 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -309,6 +309,9 @@ type OpenTelemetryTargetAllocator struct { // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. // +optional Enabled bool `json:"enabled,omitempty"` + // If specified, indicates the pod's scheduling constraints + // +optional + Affinity *v1.Affinity `json:"affinity,omitempty"` // PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. // +optional diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 85726b38e..a69ec8774 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -960,6 +960,11 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll } } in.Resources.DeepCopyInto(&out.Resources) + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) if in.TopologySpreadConstraints != nil { in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3aa454611..08a7fa26f 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-10-31T11:59:58Z" + createdAt: "2023-11-08T13:20:56Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index c15c3ee4e..94b00968c 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -4100,6 +4100,735 @@ spec: description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for + the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object allocationStrategy: description: AllocationStrategy determines which strategy the target allocator should use for allocation. The current options diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index aa275206c..48a1ace9c 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -4097,6 +4097,735 @@ spec: description: TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for + the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object allocationStrategy: description: AllocationStrategy determines which strategy the target allocator should use for allocation. The current options diff --git a/docs/api.md b/docs/api.md index 3d437f533..c3761bd93 100644 --- a/docs/api.md +++ b/docs/api.md @@ -18003,6 +18003,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all + affinity + object + + If specified, indicates the pod's scheduling constraints
+ + false + allocationStrategy enum @@ -18094,6 +18101,1308 @@ TargetAllocator indicates a value which determines whether to spawn a target all +### OpenTelemetryCollector.spec.targetAllocator.affinity +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +If specified, indicates the pod's scheduling constraints + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeAffinityobject + Describes node affinity scheduling rules for the pod.
+
false
podAffinityobject + Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
+
false
podAntiAffinityobject + Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity) + + + +Describes node affinity scheduling rules for the pod. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecutionobject + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinity) + + + +An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferenceobject + A node selector term, associated with the corresponding weight.
+
true
weightinteger + Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +A node selector term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinitypreferredduringschedulingignoredduringexecutionindexpreference) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinity) + + + +If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
nodeSelectorTerms[]object + Required. A list of node selector terms. The terms are ORed.
+
true
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecution) + + + +A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + A list of node selector requirements by node's labels.
+
false
matchFields[]object + A list of node selector requirements by node's fields.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitynodeaffinityrequiredduringschedulingignoredduringexecutionnodeselectortermsindex) + + + +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + The label key that the selector applies to.
+
true
operatorstring + Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
+
true
values[]string + An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity) + + + +Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinity) + + + +Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
preferredDuringSchedulingIgnoredDuringExecution[]object + The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions.
+
false
requiredDuringSchedulingIgnoredDuringExecution[]object + If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinity) + + + +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
podAffinityTermobject + Required. A pod affinity term, associated with the corresponding weight.
+
true
weightinteger + weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
+
+ Format: int32
+
true
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindex) + + + +Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinityterm) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinitypreferredduringschedulingignoredduringexecutionindexpodaffinitytermnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinity) + + + +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-locate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
topologyKeystring + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose
+
true
labelSelectorobject + A label query over a set of resources, in this case pods.
+
false
namespaceSelectorobject + A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field.
+
false
namespaces[]string + namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over a set of resources, in this case pods. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexlabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindex) + + + +A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].namespaceSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatoraffinitypodantiaffinityrequiredduringschedulingignoredduringexecutionindexnamespaceselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + ### OpenTelemetryCollector.spec.targetAllocator.env[index] [↩ Parent](#opentelemetrycollectorspectargetallocator) diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index d8018692d..90fea4528 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -58,6 +58,7 @@ func Deployment(params manifests.Params) *appsv1.Deployment { NodeSelector: params.OtelCol.Spec.TargetAllocator.NodeSelector, Tolerations: params.OtelCol.Spec.TargetAllocator.Tolerations, TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints, + Affinity: params.OtelCol.Spec.TargetAllocator.Affinity, }, }, }, diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index eabe92c72..9767ca681 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -49,6 +49,24 @@ var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ }, } +var testAffinityValue = &v1.Affinity{ + NodeAffinity: &v1.NodeAffinity{ + RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "node", + Operator: v1.NodeSelectorOpIn, + Values: []string{"test-node"}, + }, + }, + }, + }, + }, + }, +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := collectorInstance() @@ -158,6 +176,47 @@ func TestDeploymentNodeSelector(t *testing.T) { d2 := Deployment(params2) assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) } +func TestDeploymentAffinity(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + d1 := Deployment(params1) + assert.Empty(t, d1.Spec.Template.Spec.Affinity) + + // Test affinity + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-affinity", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Affinity: testAffinityValue, + }, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2 := Deployment(params2) + assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) +} func TestDeploymentTolerations(t *testing.T) { // Test default diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index d7676d9b1..d53e87070 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -47,6 +47,15 @@ metadata: spec: template: spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: ingress-ready + operator: In + values: + - "true" containers: - name: ta-container args: diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index fb9b04c68..9b75be12d 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -41,6 +41,15 @@ spec: enabled: true image: "local/opentelemetry-operator-targetallocator:e2e" serviceAccount: ta + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: ingress-ready + operator: In + values: + - "true" prometheusCR: enabled: true env: From b549933d8ad77bf81eb8388ac760985d345ac327 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Mon, 13 Nov 2023 15:18:22 +0100 Subject: [PATCH 1131/1234] Support configuring images via RELATED_IMAGE_ environment variables (#2325) For disconnected environments, various tools expect the image location to be set in RELATED_IMAGE_ environment variables: https://redhat-connect.gitbook.io/certified-operator-guide/troubleshooting-and-resources/offline-enabled-operators#golang-operators https://docs.openshift.com/container-platform/4.14/operators/operator_sdk/osdk-generating-csvs.html#olm-enabling-operator-for-restricted-network_osdk-generating-csvs Resolves: #2326 Signed-off-by: Andreas Gerstmayr --- .chloggen/related_images_env_vars.yaml | 16 ++++++++++++++ main.go | 30 +++++++++++++++++--------- 2 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 .chloggen/related_images_env_vars.yaml diff --git a/.chloggen/related_images_env_vars.yaml b/.chloggen/related_images_env_vars.yaml new file mode 100644 index 000000000..dd855dc07 --- /dev/null +++ b/.chloggen/related_images_env_vars.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Support configuring images via RELATED_IMAGE_ environment variables + +# One or more tracking issues related to the change +issues: [2326] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/main.go b/main.go index ea9afae86..222a9d525 100644 --- a/main.go +++ b/main.go @@ -75,6 +75,16 @@ func init() { // +kubebuilder:scaffold:scheme } +// stringFlagOrEnv defines a string flag which can be set by an environment variable. +// Precedence: flag > env var > default value. +func stringFlagOrEnv(p *string, name string, envName string, defaultValue string, usage string) { + envValue := os.Getenv(envName) + if envValue != "" { + defaultValue = envValue + } + pflag.StringVar(p, name, defaultValue, usage) +} + func main() { // registers any flags that underlying libraries might use opts := zap.Options{} @@ -112,16 +122,16 @@ func main() { pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") - pflag.StringVar(&collectorImage, "collector-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&targetAllocatorImage, "target-allocator-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationJava, "auto-instrumentation-java-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationNginx, "auto-instrumentation-nginx-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationNginx), "The default OpenTelemetry Nginx instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&targetAllocatorImage, "target-allocator-image", "RELATED_IMAGE_TARGET_ALLOCATOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", "RELATED_IMAGE_OPERATOR_OPAMP_BRIDGE", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_NODEJS", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default OpenTelemetry NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationPython, "auto-instrumentation-python-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_PYTHON", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:%s", v.AutoInstrumentationPython), "The default OpenTelemetry Python instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_DOTNET", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default OpenTelemetry DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationGo, "auto-instrumentation-go-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_GO", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default OpenTelemetry Go instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationApacheHttpd, "auto-instrumentation-apache-httpd-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_APACHE_HTTPD", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationApacheHttpd), "The default OpenTelemetry Apache HTTPD instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationNginx, "auto-instrumentation-nginx-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_NGINX", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd:%s", v.AutoInstrumentationNginx), "The default OpenTelemetry Nginx instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys") pflag.IntVar(&webhookPort, "webhook-port", 9443, "The port the webhook endpoint binds to.") pflag.StringVar(&tlsOpt.minVersion, "tls-min-version", "VersionTLS12", "Minimum TLS version supported. Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") From 1876f506fd4a87bf7a01bbf816c40c5c94a670d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:18:46 +0100 Subject: [PATCH 1132/1234] Bump go.opentelemetry.io/otel from 1.19.0 to 1.20.0 (#2340) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.19.0 to 1.20.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.19.0...v1.20.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 6 +++--- go.sum | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 27de9cb5f..adac66488 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/otel v1.19.0 + go.opentelemetry.io/otel v1.20.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.3 k8s.io/apiextensions-apiserver v0.28.3 @@ -76,7 +76,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.4 // indirect @@ -134,7 +134,7 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.14.0 // indirect diff --git a/go.sum b/go.sum index ca7ff0471..cc26d127c 100644 --- a/go.sum +++ b/go.sum @@ -242,8 +242,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -532,10 +533,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= From d631efd1fa0a4dfff29dc2ac1d436a4d43663297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 13 Nov 2023 15:19:14 +0100 Subject: [PATCH 1133/1234] Add otel sdk group to dependabot config (#2342) --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c00d2ffcf..fa1ed9e3f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -41,6 +41,10 @@ updates: patterns: - "k8s.io/*" - "sigs.k8s.io/*" + otel: + patterns: + - go.opentelemetry.io/otel + - go.opentelemetry.io/otel/* - package-ecosystem: gomod directory: /cmd/otel-allocator schedule: From 6f579ca015d8dc3e06c13ee9bafb6da43111234d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:19:38 +0100 Subject: [PATCH 1134/1234] Bump go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp (#2339) Bumps [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go) from 0.42.0 to 0.43.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/example/view/v0.42.0...example/view/v0.43.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 27 +++++++-------- cmd/operator-opamp-bridge/go.sum | 59 ++++++++++++++++---------------- 2 files changed, 42 insertions(+), 44 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index f580d8904..12671de85 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,11 +10,11 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.19.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 - go.opentelemetry.io/otel/metric v1.19.0 - go.opentelemetry.io/otel/sdk v1.19.0 - go.opentelemetry.io/otel/sdk/metric v1.19.0 + go.opentelemetry.io/otel v1.20.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 + go.opentelemetry.io/otel/metric v1.20.0 + go.opentelemetry.io/otel/sdk v1.20.0 + go.opentelemetry.io/otel/sdk/metric v1.20.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/apimachinery v0.28.3 @@ -44,9 +44,9 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -68,22 +68,21 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.77.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 9e762e30b..0d503f6b3 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -40,7 +40,7 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -51,14 +51,15 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= @@ -115,7 +116,7 @@ github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdO github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -141,20 +142,18 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 h1:wNMDy/LVGLj2h3p6zg4d0gypKfWKSWI14E1C4smOgl8= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0/go.mod h1:YfbDdXAAkemWJK3H/DshvlrxqFB2rtW4rY6ky/3x/H0= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/sdk/metric v1.19.0 h1:EJoTO5qysMsYCa+w4UghwFV/ptQgqSL/8Ni+hx+8i1k= -go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhsJzCzV5210euduKcKY= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= +go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= @@ -184,8 +183,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -200,8 +199,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= @@ -227,13 +226,13 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= From 0eff4e3063fbd4b6ce32b2eabb307e32f3534106 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:20:33 +0100 Subject: [PATCH 1135/1234] Bump the prometheus group with 1 update (#2333) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/v0.69.1/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.69.0...v0.69.1) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index adac66488..3681c8e8b 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 github.com/prometheus/prometheus v0.47.2 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index cc26d127c..d92dbef85 100644 --- a/go.sum +++ b/go.sum @@ -448,8 +448,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0 h1:cPzbMVI2tvPict9TE0R5BkVRHuG5IWXvpVB2fTXkjL4= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.0/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= From 86b57da704b7615c96f3f292e9004bbc9c209611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 13 Nov 2023 19:36:40 +0100 Subject: [PATCH 1136/1234] Bump the prometheus group otel-allocator to 0.69.1 (#2347) prometheus-operator now requires go 1.21, so I needed to bump that version in otel-allocator as well. --- cmd/otel-allocator/go.mod | 30 ++++++++------- cmd/otel-allocator/go.sum | 79 ++++++++++++++++++++++++++------------- 2 files changed, 71 insertions(+), 38 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index b72d8f36b..7fe51cdc7 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -1,6 +1,8 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator -go 1.20 +go 1.21 + +toolchain go1.21.3 require ( github.com/buraksezer/consistent v0.10.0 @@ -12,9 +14,9 @@ require ( github.com/go-logr/logr v1.3.0 github.com/json-iterator/go v1.1.12 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.68.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 + github.com/prometheus-operator/prometheus-operator v0.69.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 github.com/prometheus/prometheus v0.47.2 @@ -33,8 +35,8 @@ require ( cloud.google.com/go/compute v1.22.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect @@ -44,12 +46,12 @@ require ( github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.44.317 // indirect + github.com/aws/aws-sdk-go v1.44.327 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect @@ -58,7 +60,8 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.99.0 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/distribution/reference v0.5.0 // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -68,7 +71,7 @@ require ( github.com/envoyproxy/go-control-plane v0.11.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect @@ -93,11 +96,12 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.4 // indirect @@ -178,7 +182,7 @@ require ( golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect + golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect @@ -200,7 +204,7 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) // A exclude directive is needed for k8s.io/client-go because Cortex (which diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 989ca2cd7..c8ac33da3 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -37,13 +37,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= @@ -64,8 +65,8 @@ github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+Z github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -92,10 +93,11 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.317 h1:+8XWrLmGMwPPXSRSLPzhgcGnzJ2mYkgkrcB9C/GnSOU= -github.com/aws/aws-sdk-go v1.44.317/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= +github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -139,9 +141,12 @@ github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= @@ -166,14 +171,15 @@ github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBF github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= +github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= @@ -245,6 +251,7 @@ github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= @@ -255,6 +262,7 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= @@ -289,6 +297,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -326,6 +336,7 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -339,8 +350,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -356,6 +368,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -379,6 +392,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= +github.com/hashicorp/consul/sdk v0.14.0/go.mod h1:gHYeuDa0+0qRAD6Wwr6yznMBvBwHKoxSBoW5l73+saE= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -395,6 +409,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -406,11 +421,14 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= @@ -434,7 +452,7 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -473,6 +491,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -509,6 +528,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -519,12 +539,14 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -534,6 +556,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -545,7 +568,9 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -573,12 +598,12 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok= github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA= -github.com/prometheus-operator/prometheus-operator v0.68.0 h1:cbsqyRh0rLKiLas5lG8pQQaITLQl/PVvw0K/xC0CZ4w= -github.com/prometheus-operator/prometheus-operator v0.68.0/go.mod h1:BrMWJOfNvXRaO2Y7fUuxOLzuTM8wzzlC96d0opwzWnk= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0 h1:yl9ceUSUBo9woQIO+8eoWpcxZkdZgm89g+rVvu37TUw= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.68.0/go.mod h1:9Uuu3pEU2jB8PwuqkHvegQ0HV/BlZRJUyfTYAqfdVF8= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0 h1:8FS0sXpFkFPxp2gfkxyEMnhZV9yhf7xPbpsIeUZHlzM= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.68.0/go.mod h1:ul4ND0BMCcOX1OSZvbJA1/lh7yQ2ILHNKuZIojGISe4= +github.com/prometheus-operator/prometheus-operator v0.69.1 h1:pqNMssMBBaM6mYg7FKK7kQi9sIyWYCA33z5FSmmbybw= +github.com/prometheus-operator/prometheus-operator v0.69.1/go.mod h1:1GSjL8dKOO9be+b7aSowZo7cuTdsdTqLT3ZETktVqvU= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 h1:hCqId2xt6kOPuoeTxVxV/GiKmZyCJjYeuRRL90qcwH0= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1/go.mod h1:XfInnOa8WYXOlzOb0Iw+9eg0s/bkeOnXyten1pKFjuc= github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -618,6 +643,7 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= @@ -625,6 +651,7 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v0.6.6/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -694,6 +721,7 @@ go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeH go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= +go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -829,8 +857,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1096,7 +1124,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1130,5 +1159,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From 3d16cee5a3f53235b4f2153bf7d8fd33e4d7fda7 Mon Sep 17 00:00:00 2001 From: rashmichandrashekar Date: Mon, 13 Nov 2023 16:38:45 -0800 Subject: [PATCH 1137/1234] Add logging for prometheus operator in TargetAllocator's config generator (#2329) * add logging for prometheus operator * adding yaml for changelog * Adding tracking issue --- ...et-allocator-prometheus-operator-logging.yaml | 16 ++++++++++++++++ cmd/otel-allocator/watcher/promOperator.go | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .chloggen/target-allocator-prometheus-operator-logging.yaml diff --git a/.chloggen/target-allocator-prometheus-operator-logging.yaml b/.chloggen/target-allocator-prometheus-operator-logging.yaml new file mode 100644 index 000000000..e823ee64d --- /dev/null +++ b/.chloggen/target-allocator-prometheus-operator-logging.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add logging for prometheus operator in TargetAllocator's config generator + +# One or more tracking issues related to the change +issues: [2348] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index b687b9604..9f916c881 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -17,9 +17,11 @@ package watcher import ( "context" "fmt" + "os" "time" "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1" @@ -67,7 +69,9 @@ func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*Pr }, } - generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), prom, true) // TODO replace Nop? + promOperatorLogger := level.NewFilter(log.NewLogfmtLogger(os.Stderr), level.AllowWarn()) + generator, err := prometheus.NewConfigGenerator(promOperatorLogger, prom, true) + if err != nil { return nil, err } From c0f8e03694a9fc9f32cb8ef3fcc5c1242d0d7a6f Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Tue, 14 Nov 2023 16:34:25 +0100 Subject: [PATCH 1138/1234] [chore] Add v1alpha2 types (#2283) * Add v1alpha2 types Signed-off-by: Israel Blancas * Fix lint Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- apis/v1alpha1/opentelemetrycollector_types.go | 1 + apis/v1alpha2/groupversion_info.go | 34 + apis/v1alpha2/instrumentation_types.go | 325 +++++++++ apis/v1alpha2/opentelemetrycollector_types.go | 255 +++++++ apis/v1alpha2/zz_generated.deepcopy.go | 639 ++++++++++++++++++ 5 files changed, 1254 insertions(+) create mode 100644 apis/v1alpha2/groupversion_info.go create mode 100644 apis/v1alpha2/instrumentation_types.go create mode 100644 apis/v1alpha2/opentelemetrycollector_types.go create mode 100644 apis/v1alpha2/zz_generated.deepcopy.go diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 7d0af3e20..ab5cc54bd 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -401,6 +401,7 @@ type OpenTelemetryCollectorStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:storageversion // +kubebuilder:resource:shortName=otelcol;otelcols // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector diff --git a/apis/v1alpha2/groupversion_info.go b/apis/v1alpha2/groupversion_info.go new file mode 100644 index 000000000..4a5c2ac8c --- /dev/null +++ b/apis/v1alpha2/groupversion_info.go @@ -0,0 +1,34 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package v1alpha2 contains API Schema definitions for the v1alpha2 API group +// +kubebuilder:object:generate=true +// +groupName=opentelemetry.io +package v1alpha2 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha2"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/v1alpha2/instrumentation_types.go b/apis/v1alpha2/instrumentation_types.go new file mode 100644 index 000000000..e07d350a8 --- /dev/null +++ b/apis/v1alpha2/instrumentation_types.go @@ -0,0 +1,325 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kubebuilder:skip + +package v1alpha2 + +import ( + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +// InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. +type InstrumentationSpec struct { + // Exporter defines exporter configuration. + // +optional + Exporter `json:"exporter,omitempty"` + + // Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. + // +optional + Resource Resource `json:"resource,omitempty"` + + // Propagators defines inter-process context propagation configuration. + // Values in this list will be set in the OTEL_PROPAGATORS env var. + // Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none + // +optional + Propagators []v1alpha1.Propagator `json:"propagators,omitempty"` + + // Sampler defines sampling configuration. + // +optional + Sampler `json:"sampler,omitempty"` + + // Env defines common env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Java defines configuration for java auto-instrumentation. + // +optional + Java Java `json:"java,omitempty"` + + // NodeJS defines configuration for nodejs auto-instrumentation. + // +optional + NodeJS NodeJS `json:"nodejs,omitempty"` + + // Python defines configuration for python auto-instrumentation. + // +optional + Python Python `json:"python,omitempty"` + + // DotNet defines configuration for DotNet auto-instrumentation. + // +optional + DotNet DotNet `json:"dotnet,omitempty"` + + // Go defines configuration for Go auto-instrumentation. + // When using Go auto-instrumentation you must provide a value for the OTEL_GO_AUTO_TARGET_EXE env var via the + // Instrumentation env vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe pod annotation. + // Failure to set this value causes instrumentation injection to abort, leaving the original pod unchanged. + // +optional + Go Go `json:"go,omitempty"` + + // ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. + // +optional + ApacheHttpd ApacheHttpd `json:"apacheHttpd,omitempty"` + + // Nginx defines configuration for Nginx auto-instrumentation. + // +optional + Nginx Nginx `json:"nginx,omitempty"` +} + +// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. +// See also: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/overview.md#resources +type Resource struct { + // Attributes defines attributes that are added to the resource. + // For example environment: dev + // +optional + Attributes map[string]string `json:"resourceAttributes,omitempty"` + + // AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid). + // +optional + AddK8sUIDAttributes bool `json:"addK8sUIDAttributes,omitempty"` +} + +// Exporter defines OTLP exporter configuration. +type Exporter struct { + // Endpoint is address of the collector with OTLP endpoint. + // +optional + Endpoint string `json:"endpoint,omitempty"` +} + +// Sampler defines sampling configuration. +type Sampler struct { + // Type defines sampler type. + // The value will be set in the OTEL_TRACES_SAMPLER env var. + // The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio... + // +optional + Type v1alpha1.SamplerType `json:"type,omitempty"` + + // Argument defines sampler argument. + // The value depends on the sampler type. + // For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. + // The value will be set in the OTEL_TRACES_SAMPLER_ARG env var. + // +optional + Argument string `json:"argument,omitempty"` +} + +// Java defines Java SDK and instrumentation configuration. +type Java struct { + // Image is a container image with javaagent auto-instrumentation JAR. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines java specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resources,omitempty"` +} + +// NodeJS defines NodeJS SDK and instrumentation configuration. +type NodeJS struct { + // Image is a container image with NodeJS SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines nodejs specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// Python defines Python SDK and instrumentation configuration. +type Python struct { + // Image is a container image with Python SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines python specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// DotNet defines DotNet SDK and instrumentation configuration. +type DotNet struct { + // Image is a container image with DotNet SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines DotNet specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +type Go struct { + // Image is a container image with Go SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines Go specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// ApacheHttpd defines Apache SDK and instrumentation configuration. +type ApacheHttpd struct { + // Image is a container image with Apache SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Attrs defines Apache HTTPD agent specific attributes. The precedence is: + // `agent default attributes` > `instrument spec attributes` . + // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module + // +optional + Attrs []corev1.EnvVar `json:"attrs,omitempty"` + + // Apache HTTPD server version. One of 2.4 or 2.2. Default is 2.4 + // +optional + Version string `json:"version,omitempty"` + + // Location of Apache HTTPD server configuration. + // Needed only if different from default "/usr/local/apache2/conf" + // +optional + ConfigPath string `json:"configPath,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// Nginx defines Nginx SDK and instrumentation configuration. +type Nginx struct { + // Image is a container image with Nginx SDK and auto-instrumentation. + // +optional + Image string `json:"image,omitempty"` + + // VolumeSizeLimit defines size limit for volume used for auto-instrumentation. + // The default size is 200Mi. + VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"` + + // Env defines Nginx specific env vars. There are four layers for env vars' definitions and + // the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. + // If the former var had been defined, then the other vars would be ignored. + // +optional + Env []corev1.EnvVar `json:"env,omitempty"` + + // Attrs defines Nginx agent specific attributes. The precedence order is: + // `agent default attributes` > `instrument spec attributes` . + // Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module + // +optional + Attrs []corev1.EnvVar `json:"attrs,omitempty"` + + // Location of Nginx configuration file. + // Needed only if different from default "/etx/nginx/nginx.conf" + // +optional + ConfigFile string `json:"configFile,omitempty"` + + // Resources describes the compute resource requirements. + // +optional + Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"` +} + +// InstrumentationStatus defines status of the instrumentation. +type InstrumentationStatus struct { +} + +// +kubebuilder:object:root=true +// +kubebuilder:resource:shortName=otelinst;otelinsts +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.exporter.endpoint" +// +kubebuilder:printcolumn:name="Sampler",type="string",JSONPath=".spec.sampler.type" +// +kubebuilder:printcolumn:name="Sampler Arg",type="string",JSONPath=".spec.sampler.argument" +// +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Instrumentation" +// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1}} + +// Instrumentation is the spec for OpenTelemetry instrumentation. +type Instrumentation struct { + Status InstrumentationStatus `json:"status,omitempty"` + metav1.TypeMeta `json:",inline"` + Spec InstrumentationSpec `json:"spec,omitempty"` + metav1.ObjectMeta `json:"metadata,omitempty"` +} + +// +kubebuilder:object:root=true + +// InstrumentationList contains a list of Instrumentation. +type InstrumentationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Instrumentation `json:"items"` +} + +func init() { + SchemeBuilder.Register(&Instrumentation{}, &InstrumentationList{}) +} diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/opentelemetrycollector_types.go new file mode 100644 index 000000000..710766ffb --- /dev/null +++ b/apis/v1alpha2/opentelemetrycollector_types.go @@ -0,0 +1,255 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kubebuilder:skip + +package v1alpha2 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" +) + +// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. +type OpenTelemetryCollectorSpec struct { + // ManagementState defines if the CR should be managed by the operator or not. + // Default is managed. + // + // +required + // +kubebuilder:validation:Required + // +kubebuilder:default:=managed + ManagementState v1alpha1.ManagementStateType `json:"managementState,omitempty"` + // Resources to set on the OpenTelemetry Collector pods. + // +optional + Resources v1.ResourceRequirements `json:"resources,omitempty"` + // NodeSelector to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonset, statefulset, and deployment mode + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + // Args is the set of arguments to pass to the OpenTelemetry Collector binary + // +optional + Args map[string]string `json:"args,omitempty"` + // Replicas is the number of pod instances for the underlying OpenTelemetry Collector. Set this if your are not using autoscaling + // +optional + Replicas *int32 `json:"replicas,omitempty"` + // Autoscaler specifies the pod autoscaling configuration to use + // for the OpenTelemetryCollector workload. + // + // +optional + Autoscaler *v1alpha1.AutoscalerSpec `json:"autoscaler,omitempty"` + // PodDisruptionBudget specifies the pod disruption budget configuration to use + // for the OpenTelemetryCollector workload. + // + // +optional + PodDisruptionBudget *v1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` + // SecurityContext configures the container security context for + // the opentelemetry-collector container. + // + // In deployment, daemonset, or statefulset mode, this controls + // the security context settings for the primary application + // container. + // + // In sidecar mode, this controls the security context for the + // injected sidecar container. + // + // +optional + SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + // PodSecurityContext configures the pod security context for the + // opentelemetry-collector pod, when running as a deployment, daemonset, + // or statefulset. + // + // In sidecar mode, the opentelemetry-operator will ignore this setting. + // + // +optional + PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` + // PodAnnotations is the set of annotations that will be attached to + // Collector and Target Allocator pods. + // +optional + PodAnnotations map[string]string `json:"podAnnotations,omitempty"` + // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. + // +optional + TargetAllocator v1alpha1.OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"` + // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) + // +optional + Mode v1alpha1.Mode `json:"mode,omitempty"` + // ServiceAccount indicates the name of an existing service account to use with this instance. When set, + // the operator will not automatically create a ServiceAccount for the collector. + // +optional + ServiceAccount string `json:"serviceAccount,omitempty"` + // Image indicates the container image to use for the OpenTelemetry Collector. + // +optional + Image string `json:"image,omitempty"` + // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed + // +optional + UpgradeStrategy v1alpha1.UpgradeStrategy `json:"upgradeStrategy"` + + // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) + // +optional + ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` + // Config is the raw JSON to be used as the collector's configuration. Refer to the OpenTelemetry Collector documentation for details. + // +required + Config string `json:"config,omitempty"` + // VolumeMounts represents the mount points to use in the underlying collector deployment(s) + // +optional + // +listType=atomic + VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` + // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator + // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be + // used to open additional ports that can't be inferred by the operator, like for custom receivers. + // +optional + // +listType=atomic + Ports []v1.ServicePort `json:"ports,omitempty"` + // ENV vars to set on the OpenTelemetry Collector's Pods. These can then in certain cases be + // consumed in the config file for the Collector. + // +optional + Env []v1.EnvVar `json:"env,omitempty"` + // List of sources to populate environment variables on the OpenTelemetry Collector's Pods. + // These can then in certain cases be consumed in the config file for the Collector. + // +optional + EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` + // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. + // +optional + // +listType=atomic + VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` + // Toleration to schedule OpenTelemetry Collector pods. + // This is only relevant to daemonset, statefulset, and deployment mode + // +optional + Tolerations []v1.Toleration `json:"tolerations,omitempty"` + // Volumes represents which volumes to use in the underlying collector deployment(s). + // +optional + // +listType=atomic + Volumes []v1.Volume `json:"volumes,omitempty"` + // Ingress is used to specify how OpenTelemetry Collector is exposed. This + // functionality is only available if one of the valid modes is set. + // Valid modes are: deployment, daemonset and statefulset. + // +optional + Ingress v1alpha1.Ingress `json:"ingress,omitempty"` + // HostNetwork indicates if the pod should run in the host networking namespace. + // +optional + HostNetwork bool `json:"hostNetwork,omitempty"` + // If specified, indicates the pod's priority. + // If not specified, the pod priority will be default or zero if there is no + // default. + // +optional + PriorityClassName string `json:"priorityClassName,omitempty"` + // If specified, indicates the pod's scheduling constraints + // +optional + Affinity *v1.Affinity `json:"affinity,omitempty"` + // Actions that the management system should take in response to container lifecycle events. Cannot be updated. + // +optional + Lifecycle *v1.Lifecycle `json:"lifecycle,omitempty"` + // Duration in seconds the pod needs to terminate gracefully upon probe failure. + // +optional + TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` + // Liveness config for the OpenTelemetry Collector except the probe handler which is auto generated from the health extension of the collector. + // It is only effective when healthcheckextension is configured in the OpenTelemetry Collector pipeline. + // +optional + LivenessProbe *v1alpha1.Probe `json:"livenessProbe,omitempty"` + // InitContainers allows injecting initContainers to the Collector's pod definition. + // These init containers can be used to fetch secrets for injection into the + // configuration from external sources, run added checks, etc. Any errors during the execution of + // an initContainer will lead to a restart of the Pod. More info: + // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + // +optional + InitContainers []v1.Container `json:"initContainers,omitempty"` + + // AdditionalContainers allows injecting additional containers into the Collector's pod definition. + // These sidecar containers can be used for authentication proxies, log shipping sidecars, agents for shipping + // metrics to their cloud, or in general sidecars that do not support automatic injection. This option only + // applies to Deployment, DaemonSet, and StatefulSet deployment modes of the collector. It does not apply to the sidecar + // deployment mode. More info about sidecars: + // https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + // + // Container names managed by the operator: + // * `otc-container` + // + // Overriding containers managed by the operator is outside the scope of what the maintainers will support and by + // doing so, you wil accept the risk of it breaking things. + // + // +optional + AdditionalContainers []v1.Container `json:"additionalContainers,omitempty"` + + // ObservabilitySpec defines how telemetry data gets handled. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Observability" + Observability v1alpha1.ObservabilitySpec `json:"observability,omitempty"` + + // TopologySpreadConstraints embedded kubernetes pod configuration option, + // controls how pods are spread across your cluster among failure-domains + // such as regions, zones, nodes, and other user-defined topology domains + // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + // This is only relevant to statefulset, and deployment mode + // +optional + TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + + // ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector + // object, which shall be mounted into the Collector Pods. + // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`. + ConfigMaps []v1alpha1.ConfigMapsSpec `json:"configmaps,omitempty"` +} + +// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. +type OpenTelemetryCollectorStatus struct { + // Scale is the OpenTelemetryCollector's scale subresource status. + // +optional + Scale v1alpha1.ScaleSubresourceStatus `json:"scale,omitempty"` + + // Version of the managed OpenTelemetry Collector (operand) + // +optional + Version string `json:"version,omitempty"` + + // Image indicates the container image to use for the OpenTelemetry Collector. + // +optional + Image string `json:"image,omitempty"` + + // Messages about actions performed by the operator on this resource. + // +optional + // +listType=atomic + // Deprecated: use Kubernetes events instead. + Messages []string `json:"messages,omitempty"` + + // Replicas is currently not being set and might be removed in the next version. + // +optional + // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. + Replicas int32 `json:"replicas,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. +type OpenTelemetryCollector struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec OpenTelemetryCollectorSpec `json:"spec,omitempty"` + Status OpenTelemetryCollectorStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector. +type OpenTelemetryCollectorList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OpenTelemetryCollector `json:"items"` +} + +func init() { + SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) +} diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go new file mode 100644 index 000000000..a72a170fb --- /dev/null +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -0,0 +1,639 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha2 + +import ( + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Attrs != nil { + in, out := &in.Attrs, &out.Attrs + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApacheHttpd. +func (in *ApacheHttpd) DeepCopy() *ApacheHttpd { + if in == nil { + return nil + } + out := new(ApacheHttpd) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DotNet) DeepCopyInto(out *DotNet) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DotNet. +func (in *DotNet) DeepCopy() *DotNet { + if in == nil { + return nil + } + out := new(DotNet) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Exporter) DeepCopyInto(out *Exporter) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exporter. +func (in *Exporter) DeepCopy() *Exporter { + if in == nil { + return nil + } + out := new(Exporter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Go) DeepCopyInto(out *Go) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Go. +func (in *Go) DeepCopy() *Go { + if in == nil { + return nil + } + out := new(Go) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Instrumentation) DeepCopyInto(out *Instrumentation) { + *out = *in + out.Status = in.Status + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instrumentation. +func (in *Instrumentation) DeepCopy() *Instrumentation { + if in == nil { + return nil + } + out := new(Instrumentation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Instrumentation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationList) DeepCopyInto(out *InstrumentationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Instrumentation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationList. +func (in *InstrumentationList) DeepCopy() *InstrumentationList { + if in == nil { + return nil + } + out := new(InstrumentationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InstrumentationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { + *out = *in + out.Exporter = in.Exporter + in.Resource.DeepCopyInto(&out.Resource) + if in.Propagators != nil { + in, out := &in.Propagators, &out.Propagators + *out = make([]v1alpha1.Propagator, len(*in)) + copy(*out, *in) + } + out.Sampler = in.Sampler + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Java.DeepCopyInto(&out.Java) + in.NodeJS.DeepCopyInto(&out.NodeJS) + in.Python.DeepCopyInto(&out.Python) + in.DotNet.DeepCopyInto(&out.DotNet) + in.Go.DeepCopyInto(&out.Go) + in.ApacheHttpd.DeepCopyInto(&out.ApacheHttpd) + in.Nginx.DeepCopyInto(&out.Nginx) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationSpec. +func (in *InstrumentationSpec) DeepCopy() *InstrumentationSpec { + if in == nil { + return nil + } + out := new(InstrumentationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InstrumentationStatus) DeepCopyInto(out *InstrumentationStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstrumentationStatus. +func (in *InstrumentationStatus) DeepCopy() *InstrumentationStatus { + if in == nil { + return nil + } + out := new(InstrumentationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Java) DeepCopyInto(out *Java) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Java. +func (in *Java) DeepCopy() *Java { + if in == nil { + return nil + } + out := new(Java) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Nginx) DeepCopyInto(out *Nginx) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Attrs != nil { + in, out := &in.Attrs, &out.Attrs + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Nginx. +func (in *Nginx) DeepCopy() *Nginx { + if in == nil { + return nil + } + out := new(Nginx) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeJS) DeepCopyInto(out *NodeJS) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeJS. +func (in *NodeJS) DeepCopy() *NodeJS { + if in == nil { + return nil + } + out := new(NodeJS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector. +func (in *OpenTelemetryCollector) DeepCopy() *OpenTelemetryCollector { + if in == nil { + return nil + } + out := new(OpenTelemetryCollector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OpenTelemetryCollector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList. +func (in *OpenTelemetryCollectorList) DeepCopy() *OpenTelemetryCollectorList { + if in == nil { + return nil + } + out := new(OpenTelemetryCollectorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSpec) { + *out = *in + in.Resources.DeepCopyInto(&out.Resources) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Autoscaler != nil { + in, out := &in.Autoscaler, &out.Autoscaler + *out = new(v1alpha1.AutoscalerSpec) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(v1alpha1.PodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1.ServicePort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]v1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Ingress.DeepCopyInto(&out.Ingress) + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Lifecycle != nil { + in, out := &in.Lifecycle, &out.Lifecycle + *out = new(v1.Lifecycle) + (*in).DeepCopyInto(*out) + } + if in.TerminationGracePeriodSeconds != nil { + in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.LivenessProbe != nil { + in, out := &in.LivenessProbe, &out.LivenessProbe + *out = new(v1alpha1.Probe) + (*in).DeepCopyInto(*out) + } + if in.InitContainers != nil { + in, out := &in.InitContainers, &out.InitContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdditionalContainers != nil { + in, out := &in.AdditionalContainers, &out.AdditionalContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.Observability = in.Observability + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]v1alpha1.ConfigMapsSpec, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. +func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { + if in == nil { + return nil + } + out := new(OpenTelemetryCollectorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { + *out = *in + out.Scale = in.Scale + if in.Messages != nil { + in, out := &in.Messages, &out.Messages + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus. +func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus { + if in == nil { + return nil + } + out := new(OpenTelemetryCollectorStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Python) DeepCopyInto(out *Python) { + *out = *in + if in.VolumeSizeLimit != nil { + in, out := &in.VolumeSizeLimit, &out.VolumeSizeLimit + x := (*in).DeepCopy() + *out = &x + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Python. +func (in *Python) DeepCopy() *Python { + if in == nil { + return nil + } + out := new(Python) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Resource) DeepCopyInto(out *Resource) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource. +func (in *Resource) DeepCopy() *Resource { + if in == nil { + return nil + } + out := new(Resource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Sampler) DeepCopyInto(out *Sampler) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sampler. +func (in *Sampler) DeepCopy() *Sampler { + if in == nil { + return nil + } + out := new(Sampler) + in.DeepCopyInto(out) + return out +} From 7e6e3e06c81b4592a591fd306c07c187c6d0d196 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:57:32 +0100 Subject: [PATCH 1139/1234] Added service.instance.id into resource env (#2259) * Added service.instance.id into resource env Signed-off-by: Yuri Sa * Changed ServiceInstanceID following the RFC4122 Signed-off-by: Yuri Sa * Changed ServiceInstanceID following the RFC4122 Signed-off-by: Yuri Sa * Added semantic conventions Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/new-service-instance-id.yaml | 16 ++++++++++++++++ pkg/instrumentation/podmutator_test.go | 2 +- pkg/instrumentation/sdk.go | 20 ++++++++++++++++---- pkg/instrumentation/sdk_test.go | 4 ++-- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100755 .chloggen/new-service-instance-id.yaml diff --git a/.chloggen/new-service-instance-id.yaml b/.chloggen/new-service-instance-id.yaml new file mode 100755 index 000000000..8ee2e3540 --- /dev/null +++ b/.chloggen/new-service-instance-id.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: Operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Added the service.instance.id as the pod.UID into the traces resource Env. + +# One or more tracking issues related to the change +issues: [1921] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: "" diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index bbe8397f1..54f8a762b 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -2991,7 +2991,7 @@ func TestMutatePod(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=nginx,k8s.namespace.name=req-namespace,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd", + Value: "k8s.container.name=nginx,k8s.namespace.name=req-namespace,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=my-nginx-6c44bcbdd,service.instance.id=req-namespace.my-nginx-6c44bcbdd.nginx", }, }, }, diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 8d945339a..0f6de945f 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -23,6 +23,10 @@ import ( "unsafe" "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" appsv1 "k8s.io/api/apps/v1" @@ -33,9 +37,6 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/util/retry" "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" ) const ( @@ -401,6 +402,17 @@ func chooseServiceVersion(pod corev1.Pod, index int) string { return tag } +// creates the service.instance.id following the semantic defined by +// https://github.com/open-telemetry/semantic-conventions/pull/312. +func createServiceInstanceId(namespaceName, podName, containerName string) string { + var serviceInstanceId string + if namespaceName != "" && podName != "" && containerName != "" { + resNames := []string{namespaceName, podName, containerName} + serviceInstanceId = strings.Join(resNames, ".") + } + return serviceInstanceId +} + // createResourceMap creates resource attribute map. // User defined attributes (in explicitly set env var) have higher precedence. func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.Instrumentation, ns corev1.Namespace, pod corev1.Pod, index int) map[string]string { @@ -424,7 +436,6 @@ func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.I res[k] = v } } - k8sResources := map[attribute.Key]string{} k8sResources[semconv.K8SNamespaceNameKey] = ns.Name k8sResources[semconv.K8SContainerNameKey] = pod.Spec.Containers[index].Name @@ -433,6 +444,7 @@ func (i *sdkInjector) createResourceMap(ctx context.Context, otelinst v1alpha1.I k8sResources[semconv.K8SPodNameKey] = pod.Name k8sResources[semconv.K8SPodUIDKey] = string(pod.UID) k8sResources[semconv.K8SNodeNameKey] = pod.Spec.NodeName + k8sResources[semconv.ServiceInstanceIDKey] = createServiceInstanceId(ns.Name, pod.Name, pod.Spec.Containers[index].Name) i.addParentResourceLabels(ctx, otelinst.Spec.Resource.AddK8sUIDAttributes, ns, pod.ObjectMeta, k8sResources) for k, v := range k8sResources { if !existingRes[string(k)] && v != "" { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index af34d0df3..b5817e28d 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -201,7 +201,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid,service.version=latest", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.deployment.uid=depuid,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,k8s.replicaset.uid=rsuid,service.instance.id=project1.app.application-name,service.version=latest", }, }, }, @@ -369,7 +369,7 @@ func TestSDKInjection(t *testing.T) { }, { Name: "OTEL_RESOURCE_ATTRIBUTES", - Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,service.version=latest", + Value: "k8s.container.name=application-name,k8s.deployment.name=my-deployment,k8s.namespace.name=project1,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=app,k8s.pod.uid=pod-uid,k8s.replicaset.name=my-replicaset,service.instance.id=project1.app.application-name,service.version=latest", }, }, }, From 9255f75460062b456d8ed7195e7d5ba58a0f9100 Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Thu, 16 Nov 2023 05:21:46 +1100 Subject: [PATCH 1140/1234] Run the target allocator as non-root (#2352) * Run the target allocator as non-root Signed-off-by: David Leadbeater * Add issue to changelog Signed-off-by: David Leadbeater --------- Signed-off-by: David Leadbeater --- .chloggen/target-allocator-nonroot.yaml | 19 +++++++++++++++++++ cmd/operator-opamp-bridge/Dockerfile | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 .chloggen/target-allocator-nonroot.yaml diff --git a/.chloggen/target-allocator-nonroot.yaml b/.chloggen/target-allocator-nonroot.yaml new file mode 100644 index 000000000..1718b4d0a --- /dev/null +++ b/.chloggen/target-allocator-nonroot.yaml @@ -0,0 +1,19 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Run the target allocator as a non-root user + +# One or more tracking issues related to the change +issues: [738] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + Some Kubernetes configurations do not allow running images as root, so + provide a non-zero UID in the Docker image. + diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index ae8a861b8..2031695f2 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -16,4 +16,7 @@ COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-ce # Copy binary built on the host COPY bin/opampbridge_${TARGETARCH} ./main +# "nonroot" +USER 65532:65532 + ENTRYPOINT ["./main"] From 9dc4417324d664da7d8169f04bc5cc83f1946dc0 Mon Sep 17 00:00:00 2001 From: rashmichandrashekar Date: Wed, 15 Nov 2023 10:22:25 -0800 Subject: [PATCH 1141/1234] Update file watcher to detect file write event (#2334) * adding file write event * adding issue link --- .chloggen/target-allocator-file-watch.yaml | 16 ++++++++++++++++ cmd/otel-allocator/watcher/file.go | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .chloggen/target-allocator-file-watch.yaml diff --git a/.chloggen/target-allocator-file-watch.yaml b/.chloggen/target-allocator-file-watch.yaml new file mode 100644 index 000000000..fd1fa3f75 --- /dev/null +++ b/.chloggen/target-allocator-file-watch.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update file watcher to detect file write events + +# One or more tracking issues related to the change +issues: [2349] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go index a6bbd15fd..ef7ea166b 100644 --- a/cmd/otel-allocator/watcher/file.go +++ b/cmd/otel-allocator/watcher/file.go @@ -70,7 +70,9 @@ func (f *FileWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error case <-f.closer: return nil case fileEvent := <-f.watcher.Events: - if fileEvent.Op == fsnotify.Create { + // Using Op.Has as per this doc - https://github.com/fsnotify/fsnotify/blob/9342b6df577910c6eac718dc62845d8c95f8548b/fsnotify.go#L30 + if fileEvent.Op.Has(fsnotify.Create) || fileEvent.Op.Has(fsnotify.Write) { + f.logger.Info("File change detected", "event", fileEvent.Op.String()) upstreamEvents <- Event{ Source: EventSourceConfigMap, Watcher: Watcher(f), From 78e98e78cf533c9bc3c77eb1d79a26ad7a46e0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 16 Nov 2023 17:45:46 +0100 Subject: [PATCH 1142/1234] Disable configuration hot reload (#2354) --- .chloggen/disable-hot-reload.yaml | 18 ++++++++++++ cmd/otel-allocator/config/config.go | 6 ++++ cmd/otel-allocator/config/flags.go | 6 ++++ cmd/otel-allocator/config/flags_test.go | 6 ++++ cmd/otel-allocator/main.go | 38 ++++++++++++++----------- 5 files changed, 57 insertions(+), 17 deletions(-) create mode 100755 .chloggen/disable-hot-reload.yaml diff --git a/.chloggen/disable-hot-reload.yaml b/.chloggen/disable-hot-reload.yaml new file mode 100755 index 000000000..2c5f91f10 --- /dev/null +++ b/.chloggen/disable-hot-reload.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Disable configuration hot reload + +# One or more tracking issues related to the change +issues: [2032] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + This feature can be re-enabled by passing the --reload-config flag to the target allocator. + However, this is deprecated and will be removed in an upcoming release. diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 96748c1e4..386b0edd2 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -43,6 +43,7 @@ type Config struct { KubeConfigFilePath string `yaml:"kube_config_file_path,omitempty"` ClusterConfig *rest.Config `yaml:"-"` RootLogger logr.Logger `yaml:"-"` + ReloadConfig bool `yaml:"-"` LabelSelector map[string]string `yaml:"label_selector,omitempty"` PromConfig *promconfig.Config `yaml:"config"` AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` @@ -110,6 +111,11 @@ func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { return err } + target.ReloadConfig, err = getConfigReloadEnabled(flagSet) + if err != nil { + return err + } + return nil } diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/config/flags.go index bb7dbbb34..152dbc803 100644 --- a/cmd/otel-allocator/config/flags.go +++ b/cmd/otel-allocator/config/flags.go @@ -30,6 +30,7 @@ const ( listenAddrFlagName = "listen-addr" prometheusCREnabledFlagName = "enable-prometheus-cr-watcher" kubeConfigPathFlagName = "kubeconfig-path" + reloadConfigFlagName = "reload-config" ) // We can't bind this flag to our FlagSet, so we need to handle it separately. @@ -41,6 +42,7 @@ func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") flagSet.Bool(prometheusCREnabledFlagName, false, "Enable Prometheus CRs as target sources") flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") + flagSet.Bool(reloadConfigFlagName, false, "Enable automatic configuration reloading. This functionality is deprecated and will be removed in a future release.") zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) zapCmdLineOpts.BindFlags(zapFlagSet) flagSet.AddGoFlagSet(zapFlagSet) @@ -62,3 +64,7 @@ func getListenAddr(flagSet *pflag.FlagSet) (string, error) { func getPrometheusCREnabled(flagSet *pflag.FlagSet) (bool, error) { return flagSet.GetBool(prometheusCREnabledFlagName) } + +func getConfigReloadEnabled(flagSet *pflag.FlagSet) (bool, error) { + return flagSet.GetBool(reloadConfigFlagName) +} diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/config/flags_test.go index b1bf11b6c..9d50212a2 100644 --- a/cmd/otel-allocator/config/flags_test.go +++ b/cmd/otel-allocator/config/flags_test.go @@ -64,6 +64,12 @@ func TestFlagGetters(t *testing.T) { expectedValue: true, getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getPrometheusCREnabled(fs) }, }, + { + name: "GetConfigReloadEnabled", + flagArgs: []string{"--" + reloadConfigFlagName, "true"}, + expectedValue: true, + getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigReloadEnabled(fs) }, + }, { name: "InvalidFlag", flagArgs: []string{"--invalid-flag", "value"}, diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 297b7d58d..5167e0a94 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -98,10 +98,12 @@ func main() { setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") os.Exit(1) } - fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath) - if err != nil { - setupLog.Error(err, "Can't start the file watcher") - os.Exit(1) + if cfg.ReloadConfig { + fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath) + if err != nil { + setupLog.Error(err, "Can't start the file watcher") + os.Exit(1) + } } signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) defer close(interrupts) @@ -126,19 +128,21 @@ func main() { } }) } - runGroup.Add( - func() error { - fileWatcherErr := fileWatcher.Watch(eventChan, errChan) - setupLog.Info("File watcher exited") - return fileWatcherErr - }, - func(_ error) { - setupLog.Info("Closing file watcher") - fileWatcherErr := fileWatcher.Close() - if fileWatcherErr != nil { - setupLog.Error(fileWatcherErr, "file watcher failed to close") - } - }) + if cfg.ReloadConfig { + runGroup.Add( + func() error { + fileWatcherErr := fileWatcher.Watch(eventChan, errChan) + setupLog.Info("File watcher exited") + return fileWatcherErr + }, + func(_ error) { + setupLog.Info("Closing file watcher") + fileWatcherErr := fileWatcher.Close() + if fileWatcherErr != nil { + setupLog.Error(fileWatcherErr, "file watcher failed to close") + } + }) + } runGroup.Add( func() error { discoveryManagerErr := discoveryManager.Run() From 9d6fff70dcc73e9a210ec03d4f81a58230d8dfeb Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Fri, 17 Nov 2023 01:02:43 +0800 Subject: [PATCH 1143/1234] implement livenessProbe endpoint to target allocator (#2355) * add liveness probe endpoint to TA * add chlog * reformat a bit * change liveness probe endpoint to /livez --- .chloggen/TA-healthcheck.yaml | 16 ++++++++++++++++ cmd/otel-allocator/server/server.go | 5 +++++ cmd/otel-allocator/server/server_test.go | 13 +++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 .chloggen/TA-healthcheck.yaml diff --git a/.chloggen/TA-healthcheck.yaml b/.chloggen/TA-healthcheck.yaml new file mode 100755 index 000000000..7c2f8770c --- /dev/null +++ b/.chloggen/TA-healthcheck.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add healthcheck endpoint to TA + +# One or more tracking issues related to the change +issues: [2258] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index c9c93951d..93c820872 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -88,6 +88,7 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr strin router.GET("/jobs", s.JobHandler) router.GET("/jobs/:job_id/targets", s.TargetsHandler) router.GET("/metrics", gin.WrapH(promhttp.Handler())) + router.GET("/livez", s.LivenessProbeHandler) registerPprof(router.Group("/debug/pprof/")) s.server = &http.Server{Addr: listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} @@ -146,6 +147,10 @@ func (s *Server) JobHandler(c *gin.Context) { s.jsonHandler(c.Writer, displayData) } +func (s *Server) LivenessProbeHandler(c *gin.Context) { + c.Status(http.StatusOK) +} + func (s *Server) PrometheusMiddleware(c *gin.Context) { path := c.FullPath() timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 975df83ac..1a1e99150 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -50,6 +50,19 @@ var ( testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") ) +func TestServer_LivenessProbeHandler(t *testing.T) { + leastWeighted, _ := allocation.New("least-weighted", logger) + listenAddr := ":8080" + s := NewServer(logger, leastWeighted, listenAddr) + request := httptest.NewRequest("GET", "/livez", nil) + w := httptest.NewRecorder() + + s.server.Handler.ServeHTTP(w, request) + result := w.Result() + + assert.Equal(t, http.StatusOK, result.StatusCode) +} + func TestServer_TargetsHandler(t *testing.T) { leastWeighted, _ := allocation.New("least-weighted", logger) type args struct { From 3b6cf2cbcd17f212b33e65ec22d865d2cf49119f Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Thu, 16 Nov 2023 18:43:44 +0100 Subject: [PATCH 1144/1234] Added updateStrategy to DaemonSet mode (#2305) * Added updateStrategy to DaemonSet mode Signed-off-by: Yuri Sa * Added updateStrategy to DaemonSet mode Signed-off-by: Yuri Sa * Added updateStrategy to DaemonSet mode Signed-off-by: Yuri Sa Added updateStrategy to DaemonSet mode Signed-off-by: Yuri Sa * Added webhooks test for DaemonSet Mode Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/add-updatestrategy.yaml | 16 ++++ apis/v1alpha1/collector_webhook.go | 5 ++ apis/v1alpha1/collector_webhook_test.go | 17 +++++ apis/v1alpha1/opentelemetrycollector_types.go | 6 ++ apis/v1alpha1/zz_generated.deepcopy.go | 1 + ...ntelemetry.io_opentelemetrycollectors.yaml | 30 ++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 30 ++++++++ docs/api.md | 75 +++++++++++++++++++ internal/manifests/collector/daemonset.go | 1 + .../manifests/collector/daemonset_test.go | 70 +++++++++++++++++ tests/e2e/smoke-daemonset/00-assert.yaml | 14 ++++ tests/e2e/smoke-daemonset/00-install.yaml | 24 ++++++ 12 files changed, 289 insertions(+) create mode 100755 .chloggen/add-updatestrategy.yaml create mode 100644 tests/e2e/smoke-daemonset/00-assert.yaml create mode 100644 tests/e2e/smoke-daemonset/00-install.yaml diff --git a/.chloggen/add-updatestrategy.yaml b/.chloggen/add-updatestrategy.yaml new file mode 100755 index 000000000..1b3b3b317 --- /dev/null +++ b/.chloggen/add-updatestrategy.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Added updateStrategy for DaemonSet mode. + +# One or more tracking issues related to the change +issues: [2107] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index cc61f72b5..7b0cefddf 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -295,6 +295,11 @@ func (c CollectorWebhook) validate(r *OpenTelemetryCollector) (admission.Warning } } + // validate updateStrategy for DaemonSet + if r.Spec.Mode != ModeDaemonSet && len(r.Spec.UpdateStrategy.Type) > 0 { + return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'updateStrategy'", r.Spec.Mode) + } + return warnings, nil } diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index 0f2313471..8ccc26bb1 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -22,6 +22,7 @@ import ( "github.com/go-logr/logr" "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -766,6 +767,22 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, expectedErr: "a valid Ingress hostname has to be defined for subdomain ruleType", }, + { + name: "invalid updateStrategy for Deployment mode", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ + Type: "RollingUpdate", + RollingUpdate: &appsv1.RollingUpdateDaemonSet{ + MaxSurge: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + }, + }, + }, + }, + expectedErr: "the OpenTelemetry Collector mode is set to deployment, which does not support the attribute 'updateStrategy'", + }, } for _, test := range tests { diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index ab5cc54bd..6f08afb9e 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -15,6 +15,7 @@ package v1alpha1 import ( + appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" @@ -275,6 +276,11 @@ type OpenTelemetryCollectorSpec struct { // object, which shall be mounted into the Collector Pods. // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`. ConfigMaps []ConfigMapsSpec `json:"configmaps,omitempty"` + // UpdateStrategy represents the strategy the operator will take replacing existing DaemonSet pods with new pods + // https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec + // This is only applicable to Daemonset mode. + // +optional + UpdateStrategy appsv1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"` } // OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index a69ec8774..05890e08a 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -911,6 +911,7 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp *out = make([]ConfigMapsSpec, len(*in)) copy(*out, *in) } + in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 94b00968c..9ba407458 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -5320,6 +5320,36 @@ spec: - whenUnsatisfiable type: object type: array + updateStrategy: + description: UpdateStrategy represents the strategy the operator will + take replacing existing DaemonSet pods with new pods https://kubernetes. + properties: + rollingUpdate: + description: 'Rolling update config params. Present only if type + = "RollingUpdate". --- TODO: Update this to follow our convention + for oneOf, whatever we decide it to be. Same as Deployment `strategy.' + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: The maximum number of nodes with an existing + available DaemonSet pod that can have an updated DaemonSet + pod during during an update. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: The maximum number of DaemonSet pods that can + be unavailable during the update. + x-kubernetes-int-or-string: true + type: object + type: + description: Type of daemon set update. Can be "RollingUpdate" + or "OnDelete". Default is RollingUpdate. + type: string + type: object upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 48a1ace9c..de4a47805 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -5317,6 +5317,36 @@ spec: - whenUnsatisfiable type: object type: array + updateStrategy: + description: UpdateStrategy represents the strategy the operator will + take replacing existing DaemonSet pods with new pods https://kubernetes. + properties: + rollingUpdate: + description: 'Rolling update config params. Present only if type + = "RollingUpdate". --- TODO: Update this to follow our convention + for oneOf, whatever we decide it to be. Same as Deployment `strategy.' + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: The maximum number of nodes with an existing + available DaemonSet pod that can have an updated DaemonSet + pod during during an update. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: The maximum number of DaemonSet pods that can + be unavailable during the update. + x-kubernetes-int-or-string: true + type: object + type: + description: Type of daemon set update. Can be "RollingUpdate" + or "OnDelete". Default is RollingUpdate. + type: string + type: object upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed diff --git a/docs/api.md b/docs/api.md index c3761bd93..22425e911 100644 --- a/docs/api.md +++ b/docs/api.md @@ -9677,6 +9677,13 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. TopologySpreadConstraints embedded kubernetes pod configuration option, controls how pods are spread across your cluster among failure-domains such as regions, zones, nodes, and other user-defined top
false + + updateStrategy + object + + UpdateStrategy represents the strategy the operator will take replacing existing DaemonSet pods with new pods https://kubernetes.
+ + false upgradeStrategy enum @@ -20194,6 +20201,74 @@ A label selector requirement is a selector that contains values, a key, and an o +### OpenTelemetryCollector.spec.updateStrategy +[↩ Parent](#opentelemetrycollectorspec) + + + +UpdateStrategy represents the strategy the operator will take replacing existing DaemonSet pods with new pods https://kubernetes. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
rollingUpdateobject + Rolling update config params. Present only if type = "RollingUpdate". --- TODO: Update this to follow our convention for oneOf, whatever we decide it to be. Same as Deployment `strategy.
+
false
typestring + Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate.
+
false
+ + +### OpenTelemetryCollector.spec.updateStrategy.rollingUpdate +[↩ Parent](#opentelemetrycollectorspecupdatestrategy) + + + +Rolling update config params. Present only if type = "RollingUpdate". --- TODO: Update this to follow our convention for oneOf, whatever we decide it to be. Same as Deployment `strategy. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxSurgeint or string + The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update.
+
false
maxUnavailableint or string + The maximum number of DaemonSet pods that can be unavailable during the update.
+
false
+ + ### OpenTelemetryCollector.spec.volumeClaimTemplates[index] [↩ Parent](#opentelemetrycollectorspec) diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index 04da2faef..8566ee082 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -61,6 +61,7 @@ func DaemonSet(params manifests.Params) *appsv1.DaemonSet { Affinity: params.OtelCol.Spec.Affinity, }, }, + UpdateStrategy: params.OtelCol.Spec.UpdateStrategy, }, } } diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index 0a6dde9ec..656591e6d 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -18,8 +18,10 @@ import ( "testing" "github.com/stretchr/testify/assert" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -419,3 +421,71 @@ func TestDaemonSetAdditionalContainer(t *testing.T) { assert.Len(t, d.Spec.Template.Spec.Containers, 2) assert.Equal(t, v1.Container{Name: "test"}, d.Spec.Template.Spec.Containers[0]) } + +func TestDaemonSetDefaultUpdateStrategy(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ + Type: "RollingUpdate", + RollingUpdate: &appsv1.RollingUpdateDaemonSet{ + MaxSurge: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + }, + }, + }, + } + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + // test + d := DaemonSet(params) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, appsv1.DaemonSetUpdateStrategyType("RollingUpdate"), d.Spec.UpdateStrategy.Type) + assert.Equal(t, &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, d.Spec.UpdateStrategy.RollingUpdate.MaxSurge) + assert.Equal(t, &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, d.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable) +} + +func TestDaemonSetOnDeleteUpdateStrategy(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ + Type: "OnDelete", + RollingUpdate: &appsv1.RollingUpdateDaemonSet{ + MaxSurge: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + MaxUnavailable: &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, + }, + }, + }, + } + cfg := config.New() + + params := manifests.Params{ + Config: cfg, + OtelCol: otelcol, + Log: logger, + } + + // test + d := DaemonSet(params) + assert.Equal(t, "my-instance-collector", d.Name) + assert.Equal(t, "my-instance-collector", d.Labels["app.kubernetes.io/name"]) + assert.Equal(t, appsv1.DaemonSetUpdateStrategyType("OnDelete"), d.Spec.UpdateStrategy.Type) + assert.Equal(t, &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, d.Spec.UpdateStrategy.RollingUpdate.MaxSurge) + assert.Equal(t, &intstr.IntOrString{Type: intstr.Int, IntVal: int32(1)}, d.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable) +} diff --git a/tests/e2e/smoke-daemonset/00-assert.yaml b/tests/e2e/smoke-daemonset/00-assert.yaml new file mode 100644 index 000000000..80ba943ec --- /dev/null +++ b/tests/e2e/smoke-daemonset/00-assert.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: daemonset-test-collector +spec: + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 +status: + numberAvailable: 1 + numberMisscheduled: 0 + numberReady: 1 diff --git a/tests/e2e/smoke-daemonset/00-install.yaml b/tests/e2e/smoke-daemonset/00-install.yaml new file mode 100644 index 000000000..aa49f7f53 --- /dev/null +++ b/tests/e2e/smoke-daemonset/00-install.yaml @@ -0,0 +1,24 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: daemonset-test +spec: + mode: daemonset + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + config: | + receivers: + jaeger: + protocols: + grpc: + processors: + exporters: + debug: + service: + pipelines: + traces: + receivers: [jaeger] + processors: [] + exporters: [debug] From e765151be22a1df62d93cb7b728fe0d77463dfe6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:52:38 -0500 Subject: [PATCH 1145/1234] Bump the kubernetes group with 4 updates (#2360) Bumps the kubernetes group with 4 updates: [k8s.io/api](https://github.com/kubernetes/api), [k8s.io/client-go](https://github.com/kubernetes/client-go), [k8s.io/component-base](https://github.com/kubernetes/component-base) and [k8s.io/kubectl](https://github.com/kubernetes/kubectl). Updates `k8s.io/api` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/api/compare/v0.28.3...v0.28.4) Updates `k8s.io/client-go` from 0.28.3 to 0.28.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.3...v0.28.4) Updates `k8s.io/component-base` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/component-base/compare/v0.28.3...v0.28.4) Updates `k8s.io/kubectl` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/kubectl/compare/v0.28.3...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/component-base dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 3681c8e8b..04adf18b4 100644 --- a/go.mod +++ b/go.mod @@ -18,12 +18,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.20.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.3 + k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 - k8s.io/component-base v0.28.3 - k8s.io/kubectl v0.28.3 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 + k8s.io/component-base v0.28.4 + k8s.io/kubectl v0.28.4 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 ) diff --git a/go.sum b/go.sum index d92dbef85..ea17e9f03 100644 --- a/go.sum +++ b/go.sum @@ -922,22 +922,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= +k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= -k8s.io/kubectl v0.28.3/go.mod h1:RDAudrth/2wQ3Sg46fbKKl4/g+XImzvbsSRZdP2RiyE= +k8s.io/kubectl v0.28.4 h1:gWpUXW/T7aFne+rchYeHkyB8eVDl5UZce8G4X//kjUQ= +k8s.io/kubectl v0.28.4/go.mod h1:CKOccVx3l+3MmDbkXtIUtibq93nN2hkDR99XDCn7c/c= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 2a2277fc8f51d0a1771cf82792b6cbbc6e518275 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:52:55 -0500 Subject: [PATCH 1146/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 2 updates (#2363) Bumps the kubernetes group in /cmd/operator-opamp-bridge with 2 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/apimachinery` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.3...v0.28.4) Updates `k8s.io/client-go` from 0.28.3 to 0.28.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.3...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 6 +++--- cmd/operator-opamp-bridge/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 12671de85..107e330c6 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -17,8 +17,8 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.20.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 k8s.io/klog/v2 v2.110.1 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 @@ -86,7 +86,7 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect + k8s.io/api v0.28.4 // indirect k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 0d503f6b3..07cde9fb0 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -249,14 +249,14 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= From 49a29cef0ced39d982e6e8c5a673cdfd1c3125db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 12:53:20 -0500 Subject: [PATCH 1147/1234] Bump the kubernetes group in /cmd/otel-allocator with 2 updates (#2362) Bumps the kubernetes group in /cmd/otel-allocator with 2 updates: [k8s.io/api](https://github.com/kubernetes/api) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/api` from 0.28.3 to 0.28.4 - [Commits](https://github.com/kubernetes/api/compare/v0.28.3...v0.28.4) Updates `k8s.io/client-go` from 0.28.3 to 0.28.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.3...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 6 +++--- cmd/otel-allocator/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 7fe51cdc7..fa57b1dca 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -24,9 +24,9 @@ require ( github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.28.3 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + k8s.io/api v0.28.4 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 k8s.io/klog/v2 v2.110.1 sigs.k8s.io/controller-runtime v0.16.3 ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index c8ac33da3..5761d2690 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -1133,14 +1133,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= From ff4ffa6b6a92d3220805b9f0ed3218a139aed30c Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:32:52 -0700 Subject: [PATCH 1148/1234] [autoinstrumentation] Bump go auto instrumentation to 0.8.0-alpha (#2358) * Bump go auto instrumentation to 0.8.0-alpha * Changelog * Update readme --- .chloggen/bump-go-instrumentation-version.yaml | 16 ++++++++++++++++ README.md | 10 +++++++--- pkg/instrumentation/golang.go | 3 --- pkg/instrumentation/golang_test.go | 9 --------- pkg/instrumentation/podmutator_test.go | 3 --- pkg/instrumentation/sdk_test.go | 6 ------ .../instrumentation-go/02-assert.yaml | 2 +- .../instrumentation-go/scc.yaml | 2 -- versions.txt | 2 +- 9 files changed, 25 insertions(+), 28 deletions(-) create mode 100755 .chloggen/bump-go-instrumentation-version.yaml diff --git a/.chloggen/bump-go-instrumentation-version.yaml b/.chloggen/bump-go-instrumentation-version.yaml new file mode 100755 index 000000000..b6c15a572 --- /dev/null +++ b/.chloggen/bump-go-instrumentation-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Go auto instrumentation version to v0.8.0-alpha + +# One or more tracking issues related to the change +issues: [2358] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: The default export protocol was switched from `grpc` to `http/proto` diff --git a/README.md b/README.md index cc7bc896b..75d754662 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,13 @@ spec: # See https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/888e2cd216c77d12e56b54ee91dafbc4e7452a52/docs/config.md#otlp - name: OTEL_EXPORTER_OTLP_ENDPOINT value: http://otel-collector:4318 + go: + env: + # Required if endpoint is set to 4317. + # Go autoinstrumentation uses http/proto by default + # so data must be sent to 4318 instead of 4317. + - name: OTEL_EXPORTER_OTLP_ENDPOINT + value: http://otel-collector:4318 EOF ``` @@ -279,9 +286,6 @@ Go auto-instrumentation also requires elevated permissions. The below permission ```yaml securityContext: - capabilities: - add: - - SYS_PTRACE privileged: true runAsUser: 0 ``` diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go index ef78e1b6a..2ae2e6237 100644 --- a/pkg/instrumentation/golang.go +++ b/pkg/instrumentation/golang.go @@ -61,9 +61,6 @@ func injectGoSDK(goSpec v1alpha1.Go, pod corev1.Pod) (corev1.Pod, error) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go index ba3ed7ca9..9cade61da 100644 --- a/pkg/instrumentation/golang_test.go +++ b/pkg/instrumentation/golang_test.go @@ -136,9 +136,6 @@ func TestInjectGoSDK(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -200,9 +197,6 @@ func TestInjectGoSDK(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -257,9 +251,6 @@ func TestInjectGoSDK(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 54f8a762b..b2b39d45f 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -2434,9 +2434,6 @@ func TestMutatePod(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index b5817e28d..013a5ffc3 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1058,9 +1058,6 @@ func TestInjectGo(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -1162,9 +1159,6 @@ func TestInjectGo(t *testing.T) { SecurityContext: &corev1.SecurityContext{ RunAsUser: &zero, Privileged: &true, - Capabilities: &corev1.Capabilities{ - Add: []corev1.Capability{"SYS_PTRACE"}, - }, }, VolumeMounts: []corev1.VolumeMount{ { diff --git a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml index c7b1fdeb9..1d0787dc3 100644 --- a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml @@ -19,7 +19,7 @@ spec: requests: cpu: "50m" memory: "32Mi" - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.7.0-alpha + image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.8.0-alpha env: - name: OTEL_GO_AUTO_TARGET_EXE value: /usr/src/app/productcatalogservice diff --git a/tests/e2e-instrumentation/instrumentation-go/scc.yaml b/tests/e2e-instrumentation/instrumentation-go/scc.yaml index 45891eb6d..b32985664 100644 --- a/tests/e2e-instrumentation/instrumentation-go/scc.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/scc.yaml @@ -5,8 +5,6 @@ metadata: allowHostDirVolumePlugin: true allowPrivilegeEscalation: true allowPrivilegedContainer: true -allowedCapabilities: -- 'SYS_PTRACE' fsGroup: type: RunAsAny runAsUser: diff --git a/versions.txt b/versions.txt index 65965cec1..8e9172583 100644 --- a/versions.txt +++ b/versions.txt @@ -30,7 +30,7 @@ autoinstrumentation-python=0.41b0 autoinstrumentation-dotnet=1.1.0 # Represents the current release of Go instrumentation. -autoinstrumentation-go=v0.7.0-alpha +autoinstrumentation-go=v0.8.0-alpha # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt From b353f36e99a60a87d16f451ffda78715e7dcd91e Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 17 Nov 2023 03:03:00 +0530 Subject: [PATCH 1149/1234] Fix test instrumentation-apache-httpd to work on OpenShift. (#2310) --- .../00-install-collector.yaml | 10 ++++++++++ .../instrumentation-apache-httpd/01-install-app.yaml | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml index 8d63b5dde..5b0d06576 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml @@ -19,3 +19,13 @@ spec: receivers: [otlp] processors: [] exporters: [debug] + +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml index b323af871..96f132611 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml @@ -18,10 +18,14 @@ spec: securityContext: runAsUser: 1000 runAsGroup: 3000 - fsGroup: 2000 + fsGroup: 3000 containers: - name: myapp image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] ports: - containerPort: 8080 resources: From 8dfabac986206fad9e44bd6a353d3cc71ea5f615 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:03:34 +0100 Subject: [PATCH 1150/1234] Bump go.opentelemetry.io/otel from 1.20.0 to 1.21.0 (#2367) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.20.0 to 1.21.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.20.0...v1.21.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 04adf18b4..97dd8030f 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 - go.opentelemetry.io/otel v1.20.0 + go.opentelemetry.io/otel v1.21.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver v0.28.3 @@ -134,7 +134,7 @@ require ( github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.14.0 // indirect diff --git a/go.sum b/go.sum index ea17e9f03..2148cce6a 100644 --- a/go.sum +++ b/go.sum @@ -533,10 +533,10 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= From c8adb55de3fb64a1894c254d491e10f6bc25ff3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:04:11 +0100 Subject: [PATCH 1151/1234] Bump the otel group in /cmd/operator-opamp-bridge with 2 updates (#2365) Bumps the otel group in /cmd/operator-opamp-bridge with 2 updates: [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) and [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp](https://github.com/open-telemetry/opentelemetry-go). Updates `go.opentelemetry.io/otel` from 1.20.0 to 1.21.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.20.0...v1.21.0) Updates `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` from 0.43.0 to 0.44.0 - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/example/view/v0.43.0...bridge/opencensus/v0.44.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp dependency-type: direct:production update-type: version-update:semver-minor dependency-group: otel ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 12 ++++++------ cmd/operator-opamp-bridge/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 107e330c6..5eebcb923 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -10,11 +10,11 @@ require ( github.com/shirou/gopsutil v3.21.11+incompatible github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.20.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 - go.opentelemetry.io/otel/metric v1.20.0 - go.opentelemetry.io/otel/sdk v1.20.0 - go.opentelemetry.io/otel/sdk/metric v1.20.0 + go.opentelemetry.io/otel v1.21.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 + go.opentelemetry.io/otel/metric v1.21.0 + go.opentelemetry.io/otel/sdk v1.21.0 + go.opentelemetry.io/otel/sdk/metric v1.21.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/apimachinery v0.28.4 @@ -68,7 +68,7 @@ require ( github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/collector/featuregate v0.77.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.21.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index 07cde9fb0..d17e3cc31 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -142,18 +142,18 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0 h1:2oKqGjXdi5iDIUXFbBbLthG2LMeYlxcdxVmLim1e9qg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.43.0/go.mod h1:qmFtGlXhoa9qPt5RrZgMp4f5RfRagucrdriI+hb3yWQ= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/sdk/metric v1.20.0 h1:5eD40l/H2CqdKmbSV7iht2KMK0faAIL2pVYzJOWobGk= -go.opentelemetry.io/otel/sdk/metric v1.20.0/go.mod h1:AGvpC+YF/jblITiafMTYgvRBUiwi9hZf0EYE2E5XlS8= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= +go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= +go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 h1:bflGWrfYyuulcdxf14V6n9+CoQcu5SAAdHmDPAJnlps= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0/go.mod h1:qcTO4xHAxZLaLxPd60TdE88rxtItPHgHWqOhOGRr0as= +go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= +go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= +go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= +go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= +go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From 17bde338b40bfc6fe3cbd53a8aa65924de3adda4 Mon Sep 17 00:00:00 2001 From: Ben B Date: Fri, 17 Nov 2023 15:37:35 +0100 Subject: [PATCH 1152/1234] prepare changelog for release v0.89.0 (#2371) Signed-off-by: Benedikt Bongartz --- .chloggen/TA-healthcheck.yaml | 16 ------ .chloggen/add-managed-bridge-annotation.yaml | 16 ------ .chloggen/add-updatestrategy.yaml | 16 ------ .chloggen/allocator-affinity.yaml | 16 ------ .../bump-go-instrumentation-version.yaml | 16 ------ .chloggen/disable-hot-reload.yaml | 18 ------- .chloggen/new-service-instance-id.yaml | 16 ------ .chloggen/related_images_env_vars.yaml | 16 ------ .../target-allocator-container-port.yaml | 16 ------ .chloggen/target-allocator-file-watch.yaml | 16 ------ .chloggen/target-allocator-nonroot.yaml | 19 ------- ...allocator-prometheus-operator-logging.yaml | 16 ------ .chloggen/truncate-pod-label.yaml | 16 ------ CHANGELOG.md | 53 +++++++++++++++++-- README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 +-- versions.txt | 10 ++-- 18 files changed, 59 insertions(+), 229 deletions(-) delete mode 100755 .chloggen/TA-healthcheck.yaml delete mode 100755 .chloggen/add-managed-bridge-annotation.yaml delete mode 100755 .chloggen/add-updatestrategy.yaml delete mode 100755 .chloggen/allocator-affinity.yaml delete mode 100755 .chloggen/bump-go-instrumentation-version.yaml delete mode 100755 .chloggen/disable-hot-reload.yaml delete mode 100755 .chloggen/new-service-instance-id.yaml delete mode 100644 .chloggen/related_images_env_vars.yaml delete mode 100644 .chloggen/target-allocator-container-port.yaml delete mode 100644 .chloggen/target-allocator-file-watch.yaml delete mode 100644 .chloggen/target-allocator-nonroot.yaml delete mode 100644 .chloggen/target-allocator-prometheus-operator-logging.yaml delete mode 100755 .chloggen/truncate-pod-label.yaml diff --git a/.chloggen/TA-healthcheck.yaml b/.chloggen/TA-healthcheck.yaml deleted file mode 100755 index 7c2f8770c..000000000 --- a/.chloggen/TA-healthcheck.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add healthcheck endpoint to TA - -# One or more tracking issues related to the change -issues: [2258] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-managed-bridge-annotation.yaml b/.chloggen/add-managed-bridge-annotation.yaml deleted file mode 100755 index 65896db54..000000000 --- a/.chloggen/add-managed-bridge-annotation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: OpAMP Bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Sends a heartbeat from the bridge and brings the annotation to spec. - -# One or more tracking issues related to the change -issues: [2132] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-updatestrategy.yaml b/.chloggen/add-updatestrategy.yaml deleted file mode 100755 index 1b3b3b317..000000000 --- a/.chloggen/add-updatestrategy.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Added updateStrategy for DaemonSet mode. - -# One or more tracking issues related to the change -issues: [2107] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/allocator-affinity.yaml b/.chloggen/allocator-affinity.yaml deleted file mode 100755 index b202e09e3..000000000 --- a/.chloggen/allocator-affinity.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add target allocator affinity configuration - -# One or more tracking issues related to the change -issues: [2263] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-go-instrumentation-version.yaml b/.chloggen/bump-go-instrumentation-version.yaml deleted file mode 100755 index b6c15a572..000000000 --- a/.chloggen/bump-go-instrumentation-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Go auto instrumentation version to v0.8.0-alpha - -# One or more tracking issues related to the change -issues: [2358] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: The default export protocol was switched from `grpc` to `http/proto` diff --git a/.chloggen/disable-hot-reload.yaml b/.chloggen/disable-hot-reload.yaml deleted file mode 100755 index 2c5f91f10..000000000 --- a/.chloggen/disable-hot-reload.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Disable configuration hot reload - -# One or more tracking issues related to the change -issues: [2032] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - This feature can be re-enabled by passing the --reload-config flag to the target allocator. - However, this is deprecated and will be removed in an upcoming release. diff --git a/.chloggen/new-service-instance-id.yaml b/.chloggen/new-service-instance-id.yaml deleted file mode 100755 index 8ee2e3540..000000000 --- a/.chloggen/new-service-instance-id.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: Operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Added the service.instance.id as the pod.UID into the traces resource Env. - -# One or more tracking issues related to the change -issues: [1921] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: "" diff --git a/.chloggen/related_images_env_vars.yaml b/.chloggen/related_images_env_vars.yaml deleted file mode 100644 index dd855dc07..000000000 --- a/.chloggen/related_images_env_vars.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Support configuring images via RELATED_IMAGE_ environment variables - -# One or more tracking issues related to the change -issues: [2326] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/target-allocator-container-port.yaml b/.chloggen/target-allocator-container-port.yaml deleted file mode 100644 index 000f66233..000000000 --- a/.chloggen/target-allocator-container-port.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Declare and use ContainerPort for Target Allocator - -# One or more tracking issues related to the change -issues: [2312] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/target-allocator-file-watch.yaml b/.chloggen/target-allocator-file-watch.yaml deleted file mode 100644 index fd1fa3f75..000000000 --- a/.chloggen/target-allocator-file-watch.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Update file watcher to detect file write events - -# One or more tracking issues related to the change -issues: [2349] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/target-allocator-nonroot.yaml b/.chloggen/target-allocator-nonroot.yaml deleted file mode 100644 index 1718b4d0a..000000000 --- a/.chloggen/target-allocator-nonroot.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Run the target allocator as a non-root user - -# One or more tracking issues related to the change -issues: [738] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: | - Some Kubernetes configurations do not allow running images as root, so - provide a non-zero UID in the Docker image. - diff --git a/.chloggen/target-allocator-prometheus-operator-logging.yaml b/.chloggen/target-allocator-prometheus-operator-logging.yaml deleted file mode 100644 index e823ee64d..000000000 --- a/.chloggen/target-allocator-prometheus-operator-logging.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add logging for prometheus operator in TargetAllocator's config generator - -# One or more tracking issues related to the change -issues: [2348] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/truncate-pod-label.yaml b/.chloggen/truncate-pod-label.yaml deleted file mode 100755 index 70ef70ce9..000000000 --- a/.chloggen/truncate-pod-label.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Truncate `sidecar.opentelemetry.io/injected` sidecar pod label to 63 characters - -# One or more tracking issues related to the change -issues: [1031] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b75ec15..032e2c914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,49 @@ Changes by Version ================== +## 0.89.0 + +### 🛑 Breaking changes 🛑 + +- `autoinstrumentation`: Bump Go auto instrumentation version to v0.8.0-alpha (#2358) + The default export protocol was switched from `grpc` to `http/proto` +- `target allocator`: Disable configuration hot reload (#2032) + This feature can be re-enabled by passing the --reload-config flag to the target allocator. + However, this is deprecated and will be removed in an upcoming release. + +### 💡 Enhancements 💡 + +- `target allocator`: add healthcheck endpoint to TA (#2258) +- `OpAMP Bridge`: Sends a heartbeat from the bridge and brings the annotation to spec. (#2132) +- `operator`: Added updateStrategy for DaemonSet mode. (#2107) +- `operator`: add target allocator affinity configuration (#2263) +- `Operator`: Added the service.instance.id as the pod.UID into the traces resource Env. (#1921) +- `operator`: Support configuring images via RELATED_IMAGE_ environment variables (#2326) +- `target allocator`: Declare and use ContainerPort for Target Allocator (#2312) +- `target allocator`: Add logging for prometheus operator in TargetAllocator's config generator (#2348) + +### 🧰 Bug fixes 🧰 + +- `target allocator`: Update file watcher to detect file write events (#2349) +- `target allocator`: Run the target allocator as a non-root user (#738) + Some Kubernetes configurations do not allow running images as root, so + provide a non-zero UID in the Docker image. + +- `operator`: Truncate `sidecar.opentelemetry.io/injected` sidecar pod label to 63 characters (#1031) + +### Components + +* [OpenTelemetry Collector - v0.89.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.89.0) +* [OpenTelemetry Contrib - v0.89.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.89.0) +* [Java auto-instrumentation - 1.31.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.31.0) +* [.NET auto-instrumentation - 1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.1.0) +* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) +* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) +* [Go - v0.8.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.8.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) +* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] + + ## 0.88.0 ### 🛑 Breaking changes 🛑 @@ -9,7 +52,7 @@ Changes by Version - `OpAMP Bridge`: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the / structure as described. (#2131) * Updates the bridge to get collectors using the reporting annotation * Fixes a bug where we were using the incorrect structure for the collectors - + ### 💡 Enhancements 💡 @@ -45,7 +88,7 @@ Changes by Version - `operator`: Enable Target Allocator Rewrite by default (#2208) See [the documentation](/README.md#target-allocator) for details. Use the `--feature-gates=-operator.collector.rewritetargetallocator` command line option to switch back to the old behaviour. - + ### 💡 Enhancements 💡 @@ -78,7 +121,7 @@ Changes by Version Kubernetes 1.23 is the minimum available version everywhere after 1.22 deprecation, due to it, the minimum required version has been updated to it, dropping support for autoscaling/v2beta2 - + ### 💡 Enhancements 💡 @@ -171,12 +214,12 @@ Changes by Version ### 🛑 Breaking changes 🛑 - `operator`: Make sure OTLP export can report data to OTLP ingress/route without additional configuration (#1967) - The ingress can be configured to create a single host with multiple paths or + The ingress can be configured to create a single host with multiple paths or multiple hosts with subdomains (one per receiver port). The path from OpenShift route was removed. The port names are truncate to 15 characters. Users with custom receivers which create ports with longer name might need to update their configuration. - + ### 💡 Enhancements 💡 diff --git a/README.md b/README.md index 75d754662..4a16593ea 100644 --- a/README.md +++ b/README.md @@ -686,6 +686,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.89.0 | v1.23 to v1.28 | v1 | | v0.88.0 | v1.23 to v1.28 | v1 | | v0.87.0 | v1.23 to v1.28 | v1 | | v0.86.0 | v1.23 to v1.28 | v1 | @@ -708,7 +709,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.69.0 | v1.19 to v1.25 | v1 | | v0.68.0 | v1.19 to v1.25 | v1 | | v0.67.0 | v1.19 to v1.25 | v1 | -| v0.66.0 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 142232660..458216881 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.89.0 | @frzifus | | v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | | v0.92.0 | @pavolloffay | | v0.93.0 | @VineethReddy02 | | v0.94.0 | @TylerHelmuth | | v0.95.0 | @swiatekm-sumo | +| v0.96.0 | @frzifus | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 08a7fa26f..675e19508 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -31,13 +31,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-11-08T13:20:56Z" + createdAt: "2023-11-17T13:24:32Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.88.0 + name: opentelemetry-operator.v0.89.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -344,7 +344,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.88.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.89.0 livenessProbe: httpGet: path: /healthz @@ -452,7 +452,7 @@ spec: minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community - version: 0.88.0 + version: 0.89.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 8e9172583..18f6cafa8 100644 --- a/versions.txt +++ b/versions.txt @@ -2,16 +2,16 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.88.0 +opentelemetry-collector=0.89.0 # Represents the current release of the OpenTelemetry Operator. -operator=0.88.0 +operator=0.89.0 # Represents the current release of the Target Allocator. -targetallocator=0.88.0 +targetallocator=0.89.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.88.0 +operator-opamp-bridge=0.89.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt @@ -38,4 +38,4 @@ autoinstrumentation-apache-httpd=1.0.3 # Represents the current release of Apache Nginx instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt -autoinstrumentation-nginx=1.0.3 \ No newline at end of file +autoinstrumentation-nginx=1.0.3 From 181fefaae5c56e1b13d356a59c92d39dd42c9f32 Mon Sep 17 00:00:00 2001 From: rashmichandrashekar Date: Fri, 17 Nov 2023 11:00:15 -0800 Subject: [PATCH 1153/1234] Fix for Target Allocator not saving targets when collector instances take time to come up (#2351) * change to account for targets discoverd before instances * adding change log * adding instance changed to leat weighted as well * adding tests * adding unit tests * updaintg tests * fixing lint error and updating tests and fixing bug in least weighted algo * fix indent --- ...allocator-delayed-collector-instances.yaml | 16 +++++++ .../allocation/allocatortest.go | 13 +++++ .../allocation/consistent_hashing.go | 35 +++++++++++++- .../allocation/consistent_hashing_test.go | 39 +++++++++++++++ .../allocation/least_weighted.go | 46 +++++++++++++++++- .../allocation/least_weighted_test.go | 48 +++++++++++++++++++ 6 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 .chloggen/target-allocator-delayed-collector-instances.yaml diff --git a/.chloggen/target-allocator-delayed-collector-instances.yaml b/.chloggen/target-allocator-delayed-collector-instances.yaml new file mode 100644 index 000000000..2be379226 --- /dev/null +++ b/.chloggen/target-allocator-delayed-collector-instances.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Save targets discovered before collector instances come up + +# One or more tracking issues related to the change +issues: [2350] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/allocation/allocatortest.go b/cmd/otel-allocator/allocation/allocatortest.go index 0cc4ccc41..23196ae5a 100644 --- a/cmd/otel-allocator/allocation/allocatortest.go +++ b/cmd/otel-allocator/allocation/allocatortest.go @@ -56,3 +56,16 @@ func MakeNCollectors(n int, startingIndex int) map[string]*Collector { } return toReturn } + +func MakeNNewTargetsWithEmptyCollectors(n int, startingIndex int) map[string]*target.Item { + toReturn := map[string]*target.Item{} + for i := startingIndex; i < n+startingIndex; i++ { + label := model.LabelSet{ + "i": model.LabelValue(strconv.Itoa(i)), + "total": model.LabelValue(strconv.Itoa(n + startingIndex)), + } + newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, "") + toReturn[newTarget.Hash()] = newTarget + } + return toReturn +} diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index f0ada80e8..c45506373 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -186,7 +186,40 @@ func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) defer c.m.Unlock() if len(c.collectors) == 0 { - c.log.Info("No collector instances present, cannot set targets") + c.log.Info("No collector instances present, saving targets to allocate to collector(s)") + // If there were no targets discovered previously, assign this as the new set of target items + if len(c.targetItems) == 0 { + c.log.Info("Not discovered any targets previously, saving targets found to the targetItems set") + for k, item := range targets { + c.targetItems[k] = item + } + } else { + // If there were previously discovered targets, add or remove accordingly + targetsDiffEmptyCollectorSet := diff.Maps(c.targetItems, targets) + + // Check for additions + if len(targetsDiffEmptyCollectorSet.Additions()) > 0 { + c.log.Info("New targets discovered, adding new targets to the targetItems set") + for k, item := range targetsDiffEmptyCollectorSet.Additions() { + // Do nothing if the item is already there + if _, ok := c.targetItems[k]; ok { + continue + } else { + // Add item to item pool + c.targetItems[k] = item + } + } + } + + // Check for deletions + if len(targetsDiffEmptyCollectorSet.Removals()) > 0 { + c.log.Info("Targets removed, Removing targets from the targetItems set") + for k := range targetsDiffEmptyCollectorSet.Removals() { + // Delete item from target items + delete(c.targetItems, k) + } + } + } return } // Check for target changes diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go index 7fcbf8891..eb8c4894d 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -103,3 +103,42 @@ func TestNumRemapped(t *testing.T) { } assert.InDelta(t, numItems/numFinalCols, countRemapped, expectedDelta) } + +func TestTargetsWithNoCollectorsConsistentHashing(t *testing.T) { + + c := newConsistentHashingAllocator(logger) + + // Adding 10 new targets + numItems := 10 + c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItems, 0)) + actualTargetItems := c.TargetItems() + assert.Len(t, actualTargetItems, numItems) + + // Adding 5 new targets, and removing the old 10 targets + numItemsUpdate := 5 + c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 10)) + actualTargetItemsUpdated := c.TargetItems() + assert.Len(t, actualTargetItemsUpdated, numItemsUpdate) + + // Adding 5 new targets, and one existing target + numItemsUpdate = 6 + c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 14)) + actualTargetItemsUpdated = c.TargetItems() + assert.Len(t, actualTargetItemsUpdated, numItemsUpdate) + + // Adding collectors to test allocation + numCols := 2 + cols := MakeNCollectors(2, 0) + c.SetCollectors(cols) + var expectedPerCollector = float64(numItemsUpdate / numCols) + expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector + // Checking to see that there is no change to number of targets + actualTargetItems = c.TargetItems() + assert.Len(t, actualTargetItems, numItemsUpdate) + // Checking to see collectors are added correctly + actualCollectors := c.Collectors() + assert.Len(t, actualCollectors, numCols) + for _, col := range actualCollectors { + assert.InDelta(t, col.NumTargets, expectedPerCollector, expectedDelta) + } +} diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index 012d9bbfa..c6b27fe1f 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -183,10 +183,21 @@ func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Col delete(allocator.targetItemsPerJobPerCollector, k.Name) TargetsPerCollector.WithLabelValues(k.Name, leastWeightedStrategyName).Set(0) } + + // If previously there were no collector instances present, allocate the previous set of saved targets to the new collectors + allocateTargets := false + if len(allocator.collectors) == 0 && len(allocator.targetItems) > 0 { + allocateTargets = true + } // Insert the new collectors for _, i := range diff.Additions() { allocator.collectors[i.Name] = NewCollector(i.Name) } + if allocateTargets { + for _, item := range allocator.targetItems { + allocator.addTargetToTargetItems(item) + } + } // Re-Allocate targets of the removed collectors for _, item := range allocator.targetItems { @@ -212,7 +223,40 @@ func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.I defer allocator.m.Unlock() if len(allocator.collectors) == 0 { - allocator.log.Info("No collector instances present, cannot set targets") + allocator.log.Info("No collector instances present, saving targets to allocate to collector(s)") + // If there were no targets discovered previously, assign this as the new set of target items + if len(allocator.targetItems) == 0 { + allocator.log.Info("Not discovered any targets previously, saving targets found to the targetItems set") + for k, item := range targets { + allocator.targetItems[k] = item + } + } else { + // If there were previously discovered targets, add or remove accordingly + targetsDiffEmptyCollectorSet := diff.Maps(allocator.targetItems, targets) + + // Check for additions + if len(targetsDiffEmptyCollectorSet.Additions()) > 0 { + allocator.log.Info("New targets discovered, adding new targets to the targetItems set") + for k, item := range targetsDiffEmptyCollectorSet.Additions() { + // Do nothing if the item is already there + if _, ok := allocator.targetItems[k]; ok { + continue + } else { + // Add item to item pool + allocator.targetItems[k] = item + } + } + } + + // Check for deletions + if len(targetsDiffEmptyCollectorSet.Removals()) > 0 { + allocator.log.Info("Targets removed, Removing targets from the targetItems set") + for k := range targetsDiffEmptyCollectorSet.Removals() { + // Delete item from target items + delete(allocator.targetItems, k) + } + } + } return } // Check for target changes diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go index 90df0b39b..417c0e5ed 100644 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ b/cmd/otel-allocator/allocation/least_weighted_test.go @@ -256,3 +256,51 @@ func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { assert.InDelta(t, i.NumTargets, count, math.Round(percent)) } } + +func TestTargetsWithNoCollectorsLeastWeighted(t *testing.T) { + s, _ := New("least-weighted", logger) + + // Adding 10 new targets + numItems := 10 + initTargets := MakeNNewTargetsWithEmptyCollectors(numItems, 0) + s.SetTargets(initTargets) + actualTargetItems := s.TargetItems() + assert.Len(t, actualTargetItems, numItems) + + // Adding 5 new targets, and removing the old 10 targets + numItemsUpdate := 5 + newTargets := MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 10) + s.SetTargets(newTargets) + actualTargetItems = s.TargetItems() + assert.Len(t, actualTargetItems, numItemsUpdate) + + // Adding 5 new targets, and one existing target + numItemsUpdate = 6 + newTargets = MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 14) + s.SetTargets(newTargets) + actualTargetItems = s.TargetItems() + assert.Len(t, actualTargetItems, numItemsUpdate) + + // Adding collectors to test allocation + numCols := 2 + cols := MakeNCollectors(2, 0) + s.SetCollectors(cols) + + // Checking to see that there is no change to number of targets + actualTargetItems = s.TargetItems() + assert.Len(t, actualTargetItems, numItemsUpdate) + // Checking to see collectors are added correctly + actualCollectors := s.Collectors() + assert.Len(t, actualCollectors, numCols) + + // Divisor needed to get 15% + divisor := 6.7 + targetItemLen := len(actualTargetItems) + count := targetItemLen / len(actualCollectors) + percent := float64(targetItemLen) / divisor + + // Check to see targets are allocated with the expected delta + for _, i := range actualCollectors { + assert.InDelta(t, i.NumTargets, count, math.Round(percent)) + } +} From 438198716c8eddf921056842d91f17028bc8324b Mon Sep 17 00:00:00 2001 From: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:50:18 -0300 Subject: [PATCH 1154/1234] Update the OpenTelemetry Java agent version to 1.32.0 (#2373) --- autoinstrumentation/java/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt index 34aae156b..359c41089 100644 --- a/autoinstrumentation/java/version.txt +++ b/autoinstrumentation/java/version.txt @@ -1 +1 @@ -1.31.0 +1.32.0 From 471ebef9b34423708e2c3c3eaf562aacdd118f5b Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:17:26 +0800 Subject: [PATCH 1155/1234] implement readinessProbe endpoint to target allocator (#2368) * add readyz endpoint to TA * add chlog --- .chloggen/ta-readiness.yaml | 16 ++++++ cmd/otel-allocator/server/server.go | 13 +++++ cmd/otel-allocator/server/server_test.go | 63 ++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100755 .chloggen/ta-readiness.yaml diff --git a/.chloggen/ta-readiness.yaml b/.chloggen/ta-readiness.yaml new file mode 100755 index 000000000..06951b6b9 --- /dev/null +++ b/.chloggen/ta-readiness.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add readyz endpoint to TA + +# One or more tracking issues related to the change +issues: [2258] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go index 93c820872..9dda8347a 100644 --- a/cmd/otel-allocator/server/server.go +++ b/cmd/otel-allocator/server/server.go @@ -89,6 +89,7 @@ func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr strin router.GET("/jobs/:job_id/targets", s.TargetsHandler) router.GET("/metrics", gin.WrapH(promhttp.Handler())) router.GET("/livez", s.LivenessProbeHandler) + router.GET("/readyz", s.ReadinessProbeHandler) registerPprof(router.Group("/debug/pprof/")) s.server = &http.Server{Addr: listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} @@ -139,6 +140,18 @@ func (s *Server) ScrapeConfigsHandler(c *gin.Context) { } } +func (s *Server) ReadinessProbeHandler(c *gin.Context) { + s.mtx.RLock() + result := s.scrapeConfigResponse + s.mtx.RUnlock() + + if result != nil { + c.Status(http.StatusOK) + } else { + c.Status(http.StatusServiceUnavailable) + } +} + func (s *Server) JobHandler(c *gin.Context) { displayData := make(map[string]target.LinkJSON) for _, v := range s.allocator.TargetItems() { diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go index 1a1e99150..edda74e07 100644 --- a/cmd/otel-allocator/server/server_test.go +++ b/cmd/otel-allocator/server/server_test.go @@ -548,6 +548,69 @@ func TestServer_JobHandler(t *testing.T) { }) } } +func TestServer_Readiness(t *testing.T) { + tests := []struct { + description string + scrapeConfigs map[string]*promconfig.ScrapeConfig + expectedCode int + expectedBody []byte + }{ + { + description: "nil scrape config", + scrapeConfigs: nil, + expectedCode: http.StatusServiceUnavailable, + }, + { + description: "empty scrape config", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{}, + expectedCode: http.StatusOK, + }, + { + description: "single entry", + scrapeConfigs: map[string]*promconfig.ScrapeConfig{ + "serviceMonitor/testapp/testapp/0": { + JobName: "serviceMonitor/testapp/testapp/0", + HonorTimestamps: true, + ScrapeInterval: model.Duration(30 * time.Second), + ScrapeTimeout: model.Duration(30 * time.Second), + MetricsPath: "/metrics", + Scheme: "http", + HTTPClientConfig: config.HTTPClientConfig{ + FollowRedirects: true, + }, + RelabelConfigs: []*relabel.Config{ + { + SourceLabels: model.LabelNames{model.LabelName("job")}, + Separator: ";", + Regex: relabel.MustNewRegexp("(.*)"), + TargetLabel: "__tmp_prometheus_job_name", + Replacement: "$$1", + Action: relabel.Replace, + }, + }, + }, + }, + expectedCode: http.StatusOK, + }, + } + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + listenAddr := ":8080" + s := NewServer(logger, nil, listenAddr) + if tc.scrapeConfigs != nil { + assert.NoError(t, s.UpdateScrapeConfigResponse(tc.scrapeConfigs)) + } + + request := httptest.NewRequest("GET", "/readyz", nil) + w := httptest.NewRecorder() + + s.server.Handler.ServeHTTP(w, request) + result := w.Result() + + assert.Equal(t, tc.expectedCode, result.StatusCode) + }) + } +} func newLink(jobName string) target.LinkJSON { return target.LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))} From aa7fe7a3a6afdaf2eb136fa0c27a15bfebcbd47e Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Tue, 21 Nov 2023 00:23:20 +0800 Subject: [PATCH 1156/1234] Add livenessProbe to target allocator deployment for operator (#2356) * add liveness probe to ta manifest generation * add livenessProbe to e2e-ta-features * add chlog * clean up oopsies * add liveness e2e test to target allocator * change healthz to livez --- .chloggen/TA-liveness-probe.yaml | 16 +++++++ .../manifests/targetallocator/container.go | 25 +++++++---- .../targetallocator/container_test.go | 42 +++++++++++++++++++ .../targetallocator-features/00-assert.yaml | 7 ++++ .../targetallocator-features/01-assert.yaml | 14 +++++++ .../targetallocator-features/01-liveness.yaml | 5 +++ 6 files changed, 102 insertions(+), 7 deletions(-) create mode 100755 .chloggen/TA-liveness-probe.yaml create mode 100644 tests/e2e/targetallocator-features/01-assert.yaml create mode 100644 tests/e2e/targetallocator-features/01-liveness.yaml diff --git a/.chloggen/TA-liveness-probe.yaml b/.chloggen/TA-liveness-probe.yaml new file mode 100755 index 000000000..51fe8b65e --- /dev/null +++ b/.chloggen/TA-liveness-probe.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add liveness probe to target allocator deployment generation + +# One or more tracking issues related to the change +issues: [2258] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 6a6de7e5d..d2ef33fb8 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -18,6 +18,7 @@ import ( "github.com/go-logr/logr" "github.com/operator-framework/operator-lib/proxy" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" @@ -69,14 +70,24 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { args = append(args, "--enable-prometheus-cr-watcher") } + livenessProbe := &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + } + envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) return corev1.Container{ - Name: naming.TAContainer(), - Image: image, - Ports: ports, - Env: envVars, - VolumeMounts: volumeMounts, - Resources: otelcol.Spec.TargetAllocator.Resources, - Args: args, + Name: naming.TAContainer(), + Image: image, + Ports: ports, + Env: envVars, + VolumeMounts: volumeMounts, + Resources: otelcol.Spec.TargetAllocator.Resources, + Args: args, + LivenessProbe: livenessProbe, } } diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index af0ad8478..0edb12f3b 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/util/intstr" logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -196,6 +197,14 @@ func TestContainerHasEnvVars(t *testing.T) { Protocol: corev1.ProtocolTCP, }, }, + LivenessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + }, } // test @@ -278,6 +287,14 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { Protocol: corev1.ProtocolTCP, }, }, + LivenessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + }, } // test @@ -286,3 +303,28 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { // verify assert.Equal(t, expected, c) } +func TestLivenessProbe(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + }, + }, + } + cfg := config.New() + expected := &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + } + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, expected, c.LivenessProbe) +} diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index d53e87070..2bcda3c3c 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -70,6 +70,13 @@ spec: volumeMounts: - mountPath: /conf name: ta-internal + livenessProbe: + httpGet: + path: /livez + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 1 + periodSeconds: 10 volumes: - configMap: items: diff --git a/tests/e2e/targetallocator-features/01-assert.yaml b/tests/e2e/targetallocator-features/01-assert.yaml new file mode 100644 index 000000000..7e1a837f9 --- /dev/null +++ b/tests/e2e/targetallocator-features/01-assert.yaml @@ -0,0 +1,14 @@ +# waiting for liveness probe to work +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 5 +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app.kubernetes.io/component: opentelemetry-targetallocator +status: + containerStatuses: + - name: ta-container + restartCount: 0 diff --git a/tests/e2e/targetallocator-features/01-liveness.yaml b/tests/e2e/targetallocator-features/01-liveness.yaml new file mode 100644 index 000000000..db15c603f --- /dev/null +++ b/tests/e2e/targetallocator-features/01-liveness.yaml @@ -0,0 +1,5 @@ +# waiting for liveness probe to work +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- command: sleep 35 From fafd7f0062041b8be5a9197ea0935e6b6677884f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:24:00 -0500 Subject: [PATCH 1157/1234] Bump the prometheus group with 1 update (#2359) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.47.2...v0.48.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 75 ++++++++++------------ go.sum | 192 ++++++++++++++++++++++----------------------------------- 2 files changed, 108 insertions(+), 159 deletions(-) diff --git a/go.mod b/go.mod index 97dd8030f..00c3b3910 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 - github.com/prometheus/prometheus v0.47.2 + github.com/prometheus/prometheus v0.48.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 @@ -29,30 +29,23 @@ require ( ) require ( - cloud.google.com/go/compute v1.22.0 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.302 // indirect + github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/digitalocean/godo v1.99.0 // indirect + github.com/digitalocean/godo v1.104.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.7+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect @@ -72,21 +65,21 @@ require ( github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.3.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.5.0 // indirect + github.com/gophercloud/gophercloud v1.7.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.22.0 // indirect + github.com/hashicorp/consul/api v1.25.1 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -97,23 +90,23 @@ require ( github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect + github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/linode/linodego v1.19.0 // indirect + github.com/linode/linodego v1.23.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.55 // indirect + github.com/miekg/dns v1.1.56 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -121,16 +114,16 @@ require ( github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/ovh/go-ovh v1.4.1 // indirect + github.com/ovh/go-ovh v1.4.3 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect + github.com/prometheus/procfs v0.11.1 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.opencensus.io v0.24.0 // indirect @@ -138,22 +131,22 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.12.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.132.0 // indirect + google.golang.org/api v0.147.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/grpc v1.56.3 // indirect + google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect + google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index 2148cce6a..ceedee745 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.22.0 h1:cB8R6FtUtT1TYGl5R3xuxnW6OUIc/DrT2aiR16TTG7Y= -cloud.google.com/go/compute v1.22.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -35,37 +35,22 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -80,7 +65,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -88,8 +72,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk= -github.com/aws/aws-sdk-go v1.44.302/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= +github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -108,11 +92,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -121,8 +100,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= -github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= +github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= +github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -137,8 +116,6 @@ github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -155,7 +132,6 @@ github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBD github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -192,9 +168,8 @@ github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -223,7 +198,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -259,29 +233,28 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= -github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= +github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= -github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= -github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= +github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -323,19 +296,19 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= +github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= -github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= +github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= +github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= -github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= +github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -372,8 +345,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= -github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= +github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= +github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -397,8 +370,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= -github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= +github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -432,8 +405,8 @@ github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDD github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/operator-framework/operator-lib v0.11.0 h1:eYzqpiOfq9WBI4Trddisiq/X9BwCisZd3rIzmHRC9Z8= github.com/operator-framework/operator-lib v0.11.0/go.mod h1:RpyKhFAoG6DmKTDIwMuO6pI3LRc8IE9rxEYWy476o6g= -github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= -github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -455,14 +428,14 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -477,17 +450,16 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= +github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= @@ -506,13 +478,11 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -537,7 +507,6 @@ go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= @@ -555,10 +524,7 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -571,8 +537,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -595,8 +561,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -636,7 +602,6 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -645,8 +610,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -659,7 +624,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -716,14 +681,12 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -733,9 +696,7 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -788,8 +749,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -812,8 +773,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= -google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= +google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= +google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -845,19 +806,18 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= -google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -870,12 +830,9 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -904,7 +861,6 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 6ba4453d775c2374749e1a61d5266498ee82124e Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:44:49 +0800 Subject: [PATCH 1158/1234] Add readinessProbe to target allocator deployment for operator (#2374) * add readiness probe to ta deployment * add readiness probe to ta e2e * add readiness probe to ta e2e * add chlog --------- Co-authored-by: Jacob Aronoff --- .chloggen/ta-readiness-probe.yaml | 16 ++++++++ .../manifests/targetallocator/container.go | 25 ++++++++---- .../targetallocator/container_test.go | 40 +++++++++++++++++++ .../targetallocator-features/00-assert.yaml | 7 ++++ 4 files changed, 80 insertions(+), 8 deletions(-) create mode 100755 .chloggen/ta-readiness-probe.yaml diff --git a/.chloggen/ta-readiness-probe.yaml b/.chloggen/ta-readiness-probe.yaml new file mode 100755 index 000000000..da106345e --- /dev/null +++ b/.chloggen/ta-readiness-probe.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add readiness probe to target allocator deployment generation + +# One or more tracking issues related to the change +issues: [2258] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index d2ef33fb8..979a2d8d5 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -70,6 +70,14 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { args = append(args, "--enable-prometheus-cr-watcher") } + readinessProbe := &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + } livenessProbe := &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ @@ -81,13 +89,14 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) return corev1.Container{ - Name: naming.TAContainer(), - Image: image, - Ports: ports, - Env: envVars, - VolumeMounts: volumeMounts, - Resources: otelcol.Spec.TargetAllocator.Resources, - Args: args, - LivenessProbe: livenessProbe, + Name: naming.TAContainer(), + Image: image, + Ports: ports, + Env: envVars, + VolumeMounts: volumeMounts, + Resources: otelcol.Spec.TargetAllocator.Resources, + Args: args, + LivenessProbe: livenessProbe, + ReadinessProbe: readinessProbe, } } diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 0edb12f3b..91a2b93a1 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -197,6 +197,14 @@ func TestContainerHasEnvVars(t *testing.T) { Protocol: corev1.ProtocolTCP, }, }, + ReadinessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + }, LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ @@ -287,6 +295,14 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { Protocol: corev1.ProtocolTCP, }, }, + ReadinessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + }, LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{ @@ -303,6 +319,30 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { // verify assert.Equal(t, expected, c) } +func TestReadinessProbe(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + }, + }, + } + cfg := config.New() + expected := &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + } + + // test + c := Container(cfg, logger, otelcol) + + // verify + assert.Equal(t, expected, c.ReadinessProbe) +} func TestLivenessProbe(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index 2bcda3c3c..fdeaa2c98 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -70,6 +70,13 @@ spec: volumeMounts: - mountPath: /conf name: ta-internal + readinessProbe: + httpGet: + path: /readyz + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 1 + periodSeconds: 10 livenessProbe: httpGet: path: /livez From 73d3cd1c1bd387bed7eac07be361defe5f2e9473 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 12:43:01 -0500 Subject: [PATCH 1159/1234] Bump the kubernetes group with 1 update (#2379) Bumps the kubernetes group with 1 update: [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver). - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.28.3...v0.28.4) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 00c3b3910..da36f45dc 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( go.opentelemetry.io/otel v1.21.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.28.4 - k8s.io/apiextensions-apiserver v0.28.3 + k8s.io/apiextensions-apiserver v0.28.4 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 k8s.io/component-base v0.28.4 diff --git a/go.sum b/go.sum index ceedee745..94a8c220b 100644 --- a/go.sum +++ b/go.sum @@ -880,8 +880,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU= +k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM= k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= From 7d7ae88767864fe015cafa70797c9f98ef490ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 22 Nov 2023 13:14:21 +0100 Subject: [PATCH 1160/1234] Bump github.com/prometheus/prometheus to v0.48.0 (#2381) --- cmd/otel-allocator/go.mod | 72 ++++---- cmd/otel-allocator/go.sum | 188 ++++++++------------ cmd/otel-allocator/target/discovery_test.go | 7 +- 3 files changed, 112 insertions(+), 155 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index fa57b1dca..61994501a 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -19,7 +19,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.47.2 + github.com/prometheus/prometheus v0.48.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 @@ -32,26 +32,19 @@ require ( ) require ( - cloud.google.com/go/compute v1.22.0 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.44.327 // indirect + github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bytedance/sonic v1.9.1 // indirect @@ -59,7 +52,7 @@ require ( github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.99.0 // indirect + github.com/digitalocean/godo v1.104.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v24.0.7+incompatible // indirect @@ -95,7 +88,6 @@ require ( github.com/go-zookeeper/zk v1.0.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -104,14 +96,14 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.4 // indirect + github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.5.0 // indirect + github.com/gophercloud/gophercloud v1.7.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.22.0 // indirect + github.com/hashicorp/consul/api v1.25.1 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -121,27 +113,27 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e // indirect + github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.0.0 // indirect + github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.8 // indirect + github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/compress v1.17.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.2.4 // indirect - github.com/linode/linodego v1.19.0 // indirect + github.com/linode/linodego v1.23.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect - github.com/miekg/dns v1.1.55 // indirect + github.com/miekg/dns v1.1.56 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -152,48 +144,48 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/ovh/go-ovh v1.4.1 // indirect + github.com/ovh/go-ovh v1.4.3 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect github.com/prometheus/alertmanager v0.26.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 // indirect + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect go.mongodb.org/mongo-driver v1.12.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/goleak v1.2.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.12.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.132.0 // indirect + google.golang.org/api v0.147.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 // indirect + google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect google.golang.org/grpc v1.58.3 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 5761d2690..bd66fd31e 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -19,8 +19,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.22.0 h1:cB8R6FtUtT1TYGl5R3xuxnW6OUIc/DrT2aiR16TTG7Y= -cloud.google.com/go/compute v1.22.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -35,36 +35,24 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= -github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -82,7 +70,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -93,8 +80,8 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= -github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= +github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -124,11 +111,6 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -139,8 +121,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= -github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= +github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= +github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= @@ -162,8 +144,6 @@ github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRr github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -294,9 +274,6 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -367,32 +344,31 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= -github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= -github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= +github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= +github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.22.0 h1:ydEvDooB/A0c/xpsBd8GSt7P2/zYPBui4KrNip0xGjE= -github.com/hashicorp/consul/api v1.22.0/go.mod h1:zHpYgZ7TeYqS6zaszjwSt128OwESRpnhU9aGa6ue3Eg= -github.com/hashicorp/consul/sdk v0.14.0 h1:Hly+BMNMssVzoWddbBnBFi3W+Fzytvm0haSkihhj3GU= -github.com/hashicorp/consul/sdk v0.14.0/go.mod h1:gHYeuDa0+0qRAD6Wwr6yznMBvBwHKoxSBoW5l73+saE= +github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= +github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= +github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -437,20 +413,20 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e h1:sr4lujmn9heD030xx/Pd4B/JSmvRhFzuotNXaaV0WLs= -github.com/hashicorp/nomad/api v0.0.0-20230718173136-3a687930bd3e/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= +github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= +github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.0.0 h1:Sg1DJ+MAKvbYAqaBaq9tPbwXBS2ckPIaMtVdUjKu+4g= -github.com/hetznercloud/hcloud-go/v2 v2.0.0/go.mod h1:4iUG2NG8b61IAwNx6UsMWQ6IfIf/i1RsG0BbsKAyR5Q= +github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= +github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= -github.com/ionos-cloud/sdk-go/v6 v6.1.8/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= +github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= +github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -477,8 +453,8 @@ github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0Lh github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= +github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -500,8 +476,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/linode/linodego v1.19.0 h1:n4WJrcr9+30e9JGZ6DI0nZbm5SdAj1kSwvvt/998YUw= -github.com/linode/linodego v1.19.0/go.mod h1:XZFR+yJ9mm2kwf6itZ6SCpu+6w3KnIevV0Uu5HNWJgQ= +github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= +github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -533,8 +509,8 @@ github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQo github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= -github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= +github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -577,8 +553,8 @@ github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrB github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/ovh/go-ovh v1.4.1 h1:VBGa5wMyQtTP7Zb+w97zRCh9sLtM/2YKRyy+MEJmWaM= -github.com/ovh/go-ovh v1.4.1/go.mod h1:6bL6pPyUT7tBfI0pqOegJgRjgjuO+mOo+MyXd1EEC0M= +github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= +github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -618,8 +594,8 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -636,9 +612,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.47.2 h1:jWcnuQHz1o1Wu3MZ6nMJDuTI0kU5yJp9pkxh8XEkNvI= -github.com/prometheus/prometheus v0.47.2/go.mod h1:J/bmOSjgH7lFxz2gZhrWEZs2i64vMS+HIuZfmYNhJ/M= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= +github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -646,8 +621,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20 h1:a9hSJdJcd16e0HoMsnFvaHvxB3pxSD+SC7+CISp7xY0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.20/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= @@ -716,15 +691,14 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -750,11 +724,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -767,8 +738,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -791,8 +762,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -833,7 +804,6 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -842,8 +812,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -925,7 +895,6 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -995,8 +964,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1019,8 +988,8 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.132.0 h1:8t2/+qZ26kAOGSmOiHwVycqVaDg7q3JDILrNi/Z6rvc= -google.golang.org/api v0.132.0/go.mod h1:AeTBC6GpJnJSRJjktDcPX0QwtS8pGYZOV6MSuSCusw0= +google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= +google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1052,19 +1021,18 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753 h1:+VoAg+OKmWaommL56xmZSE2sUK8A7m6SUO7X89F2tbw= -google.golang.org/genproto v0.0.0-20230717213848-3f92550aa753/go.mod h1:iqkVr8IRpZ53gx1dEnWlCUIEwDWqWARWrbzpasaTNYM= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753 h1:lCbbUxUDD+DiXx9Q6F/ttL0aAu7N2pz8XnmMm8ZW4NE= -google.golang.org/genproto/googleapis/api v0.0.0-20230717213848-3f92550aa753/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753 h1:XUODHrpzJEUeWmVo/jfNTLj0YyVveOo28oE6vkFbkO4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230717213848-3f92550aa753/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= +google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1077,10 +1045,7 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1111,7 +1076,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go index 39e9ab459..506fb01b5 100644 --- a/cmd/otel-allocator/target/discovery_test.go +++ b/cmd/otel-allocator/target/discovery_test.go @@ -64,13 +64,14 @@ func TestDiscovery(t *testing.T) { ctx, cancelFunc := context.WithCancel(context.Background()) d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) - defer close(manager.close) + + defer func() { manager.Close() }() defer cancelFunc() results := make(chan []string) go func() { err := d.Run() - assert.NoError(t, err) + assert.Error(t, err) }() go func() { err := manager.Watch(func(targets map[string]*Item) { @@ -343,7 +344,7 @@ func TestDiscovery_NoConfig(t *testing.T) { go func() { err := d.Run() - assert.NoError(t, err) + assert.Error(t, err) }() // check the updated scrape configs expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} From 9ebc01fc676e6b1776ce531e1e4e3879e49117de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 23 Nov 2023 18:03:20 +0100 Subject: [PATCH 1161/1234] Bump OpenTelemetry .NET Automatic Instrumentation to 1.2.0 (#2382) --- .chloggen/.bump-dotnet-1.2.0.yaml | 16 ++++++++++++++++ autoinstrumentation/dotnet/version.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .chloggen/.bump-dotnet-1.2.0.yaml diff --git a/.chloggen/.bump-dotnet-1.2.0.yaml b/.chloggen/.bump-dotnet-1.2.0.yaml new file mode 100644 index 000000000..3db5de883 --- /dev/null +++ b/.chloggen/.bump-dotnet-1.2.0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: autoinstrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.2.0 + +# One or more tracking issues related to the change +issues: [2382] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: \ No newline at end of file diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt index 9084fa2f7..26aaba0e8 100644 --- a/autoinstrumentation/dotnet/version.txt +++ b/autoinstrumentation/dotnet/version.txt @@ -1 +1 @@ -1.1.0 +1.2.0 From 7b9d00beb6f72af2a3a7005a991ad426364cf1b3 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Sat, 25 Nov 2023 00:14:06 +0800 Subject: [PATCH 1162/1234] Fix service account is created even when one is specified in collector spec (#2378) * add additional check before creating sa for collector * update builder test for collector * change check collector sa specified in sa manifest * add specified account test case to collector building --- .chloggen/sa-fix.yaml | 16 ++ controllers/builder_test.go | 222 ++++++++++++++++++ .../manifests/collector/serviceaccount.go | 3 + 3 files changed, 241 insertions(+) create mode 100755 .chloggen/sa-fix.yaml diff --git a/.chloggen/sa-fix.yaml b/.chloggen/sa-fix.yaml new file mode 100755 index 000000000..8b3a74e52 --- /dev/null +++ b/.chloggen/sa-fix.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: check if service account specified in otelcol before creating service account resource for collectors + +# One or more tracking issues related to the change +issues: [2372] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/controllers/builder_test.go b/controllers/builder_test.go index 7adcc158d..f40b4c0d2 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -589,6 +589,228 @@ service: }, wantErr: false, }, + { + name: "specified service account case", + args: args{ + instance: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + Mode: "deployment", + Image: "test", + Config: goodConfig, + ServiceAccount: "my-special-sa", + }, + }, + }, + want: []client.Object{ + &appsv1.Deployment{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: selectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otc-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-collector", + }, + Items: []corev1.KeyToPath{ + { + Key: "collector.yaml", + Path: "collector.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "otc-container", + Image: "test", + Args: []string{ + "--config=/conf/collector.yaml", + }, + Ports: []corev1.ContainerPort{ + { + Name: "examplereceiver", + HostPort: 0, + ContainerPort: 12345, + }, + { + Name: "metrics", + HostPort: 0, + ContainerPort: 8888, + Protocol: "TCP", + }, + }, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "otc-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "my-special-sa", + }, + }, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-headless", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + "operator.opentelemetry.io/collector-headless-service": "Exists", + }, + Annotations: map[string]string{ + "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", + }, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "examplereceiver", + Port: 12345, + }, + }, + Selector: selectorLabels, + InternalTrafficPolicy: &basePolicy, + ClusterIP: "None", + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-monitoring", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector-monitoring", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "monitoring", + Port: 8888, + }, + }, + Selector: selectorLabels, + }, + }, + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index 19af01244..a3648a593 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -35,6 +35,9 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { + if params.OtelCol.Spec.ServiceAccount != "" { + return nil + } name := naming.ServiceAccount(params.OtelCol.Name) labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) From 4baf9c06639956668a4cd3adbeb65f16cc6cc501 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Fri, 24 Nov 2023 17:14:54 +0100 Subject: [PATCH 1163/1234] Add OpAMP example to CSV (#2386) Resolves the following warning from the scorecard tests: ``` Warning: Value opentelemetry.io/v1alpha1, Kind=OpAMPBridge: provided API should have an example annotation ``` Signed-off-by: Andreas Gerstmayr --- ...emetry-operator.clusterserviceversion.yaml | 34 +++++++++++++++++++ config/samples/kustomization.yaml | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 675e19508..9d686d007 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -16,6 +16,40 @@ metadata: } } }, + { + "apiVersion": "opentelemetry.io/v1alpha1", + "kind": "OpAMPBridge", + "metadata": { + "name": "opampbridge-sample" + }, + "spec": { + "capabilities": { + "AcceptsOpAMPConnectionSettings": true, + "AcceptsOtherConnectionSettings": true, + "AcceptsRemoteConfig": true, + "AcceptsRestartCommand": true, + "ReportsEffectiveConfig": true, + "ReportsHealth": true, + "ReportsOwnLogs": true, + "ReportsOwnMetrics": true, + "ReportsOwnTraces": true, + "ReportsRemoteConfig": true, + "ReportsStatus": true + }, + "componentsAllowed": { + "exporters": [ + "logging" + ], + "processors": [ + "memory_limiter" + ], + "receivers": [ + "otlp" + ] + }, + "endpoint": "ws://opamp-server:4320/v1/opamp" + } + }, { "apiVersion": "opentelemetry.io/v1alpha1", "kind": "OpenTelemetryCollector", diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 6bdf18d21..5bca25105 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,4 +1,6 @@ -## This file is auto-generated, do not modify ## +## Append samples you want in your CSV to this file as resources ## resources: - core_v1alpha1_opentelemetrycollector.yaml - instrumentation_v1alpha1_instrumentation.yaml +- _v1alpha1_opampbridge.yaml +#+kubebuilder:scaffold:manifestskustomizesamples From 363f4dbed432ef7b9cf84d4d6f0e213aa4772a97 Mon Sep 17 00:00:00 2001 From: Husni Alhamdani Date: Mon, 27 Nov 2023 14:25:49 +0100 Subject: [PATCH 1164/1234] add missing pod in the rbac (#2327) * add missing pod in the RBAC Signed-off-by: Husni Alhamdani * add missing pod in the rbac Signed-off-by: Husni Alhamdani * add missing pod in the rbac Signed-off-by: Husni Alhamdani --------- Signed-off-by: Husni Alhamdani --- .chloggen/main.yaml | 16 ++++++++++++++++ ...telemetry-operator.clusterserviceversion.yaml | 1 + config/rbac/role.yaml | 1 + controllers/opentelemetrycollector_controller.go | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 .chloggen/main.yaml diff --git a/.chloggen/main.yaml b/.chloggen/main.yaml new file mode 100755 index 000000000..ea6b27f21 --- /dev/null +++ b/.chloggen/main.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add missing pod in the rbac + +# One or more tracking issues related to the change +issues: [1679] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 9d686d007..6540b656d 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -162,6 +162,7 @@ spec: - "" resources: - configmaps + - pods - serviceaccounts - services verbs: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 1f5ab57c0..f003bf100 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -8,6 +8,7 @@ rules: - "" resources: - configmaps + - pods - serviceaccounts - services verbs: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 5b62594be..a9c57b127 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -145,7 +145,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { return r } -// +kubebuilder:rbac:groups="",resources=configmaps;services;serviceaccounts,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=pods;configmaps;services;serviceaccounts,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=events,verbs=create;patch // +kubebuilder:rbac:groups=apps,resources=daemonsets;deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete From 07605046175cc1cc05db21b421ad191ed913af90 Mon Sep 17 00:00:00 2001 From: Martin Divis Date: Mon, 27 Nov 2023 15:28:14 +0100 Subject: [PATCH 1165/1234] fix for #2366 (#2385) * fix for #2366 * added cloggen * typo * typo * e2e test for lifecycle removal from init container * e2e test for lifecycle removal in init container --- .chloggen/issue-2366-fix.yaml | 16 ++++++++++++++++ pkg/instrumentation/nginx.go | 2 ++ pkg/instrumentation/nginx_test.go | 4 +++- .../instrumentation-nginx/01-install-app.yaml | 5 +++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 .chloggen/issue-2366-fix.yaml diff --git a/.chloggen/issue-2366-fix.yaml b/.chloggen/issue-2366-fix.yaml new file mode 100755 index 000000000..7b809141f --- /dev/null +++ b/.chloggen/issue-2366-fix.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: lifecycle spec removed from cloned initContainer + +# One or more tracking issues related to the change +issues: [2366] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/pkg/instrumentation/nginx.go b/pkg/instrumentation/nginx.go index 9a16520d6..4855e5a54 100644 --- a/pkg/instrumentation/nginx.go +++ b/pkg/instrumentation/nginx.go @@ -120,6 +120,8 @@ export %[4]s=$( { nginx -v ; } 2>&1 ) && echo ${%[4]s##*/} > %[3]s/version.txt cloneContainer.LivenessProbe = nil cloneContainer.ReadinessProbe = nil cloneContainer.StartupProbe = nil + // remove lifecycle, since not supported on init containers + cloneContainer.Lifecycle = nil pod.Spec.InitContainers = append(pod.Spec.InitContainers, *cloneContainer) diff --git a/pkg/instrumentation/nginx_test.go b/pkg/instrumentation/nginx_test.go index 8a78b41ae..6284f430b 100644 --- a/pkg/instrumentation/nginx_test.go +++ b/pkg/instrumentation/nginx_test.go @@ -251,7 +251,7 @@ func TestInjectNginxSDK(t *testing.T) { }, }, }}, - // === Test Removal of probes ============================= + // === Test Removal of probes and lifecycle ============================= { name: "Probes removed on clone init container", Nginx: v1alpha1.Nginx{ @@ -267,6 +267,7 @@ func TestInjectNginxSDK(t *testing.T) { ReadinessProbe: &corev1.Probe{}, StartupProbe: &corev1.Probe{}, LivenessProbe: &corev1.Probe{}, + Lifecycle: &corev1.Lifecycle{}, }, }, }, @@ -351,6 +352,7 @@ func TestInjectNginxSDK(t *testing.T) { ReadinessProbe: &corev1.Probe{}, StartupProbe: &corev1.Probe{}, LivenessProbe: &corev1.Probe{}, + Lifecycle: &corev1.Lifecycle{}, Env: []corev1.EnvVar{ { Name: "LD_LIBRARY_PATH", diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml index 149563ea3..a7d86790e 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml @@ -27,6 +27,11 @@ spec: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] + # following to test lifecycle removal in cloned init container + lifecycle: + postStart: + exec: + command: ["/bin/sh", "-c", "echo Hello from the postStart handler"] ports: - containerPort: 8765 env: From f8fde993d1268b8d8865a33a6ea026c940482db6 Mon Sep 17 00:00:00 2001 From: Lam Tran Date: Mon, 27 Nov 2023 22:49:56 +0700 Subject: [PATCH 1166/1234] Upgrade dario.cat/mergo v1.0.0 (#2388) Signed-off-by: Lam Tran --- go.mod | 3 ++- go.sum | 2 ++ internal/manifests/mutate.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index da36f45dc..1b7842fab 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.20 retract v1.51.0 require ( + dario.cat/mergo v1.0.0 github.com/Masterminds/semver/v3 v3.2.1 github.com/go-logr/logr v1.3.0 - github.com/imdario/mergo v0.3.16 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 @@ -93,6 +93,7 @@ require ( github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect github.com/hashicorp/serf v0.10.1 // indirect github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect diff --git a/go.sum b/go.sum index 94a8c220b..32e0a9e18 100644 --- a/go.sum +++ b/go.sum @@ -34,6 +34,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go index 3c2dbee31..9585bc1d4 100644 --- a/internal/manifests/mutate.go +++ b/internal/manifests/mutate.go @@ -19,7 +19,7 @@ import ( "fmt" "reflect" - "github.com/imdario/mergo" + "dario.cat/mergo" routev1 "github.com/openshift/api/route/v1" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" From ee0790fbf000251a20f8c91073efd56b14d367ed Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Mon, 27 Nov 2023 11:06:50 -0500 Subject: [PATCH 1167/1234] Fix cascading delete, retry on conflict (#2383) * fix cascading delete problem w/ checking for deletion timestamp, also retry on conflict automatically * Add a test * Fix test --- .chloggen/2364-foreground-delete.yaml | 16 +++++++++ controllers/common.go | 9 ++++- controllers/opampbridge_controller.go | 4 +++ .../opentelemetrycollector_controller.go | 4 +++ controllers/reconcile_test.go | 34 +++++++++++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 .chloggen/2364-foreground-delete.yaml diff --git a/.chloggen/2364-foreground-delete.yaml b/.chloggen/2364-foreground-delete.yaml new file mode 100755 index 000000000..cea09ca0f --- /dev/null +++ b/.chloggen/2364-foreground-delete.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fixes ability to do a foreground cascading delete + +# One or more tracking issues related to the change +issues: [2364] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/controllers/common.go b/controllers/common.go index d1e4bdcde..2a7ff1d75 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -23,8 +23,10 @@ import ( rbacv1 "k8s.io/api/rbac/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/util/retry" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" @@ -94,7 +96,12 @@ func reconcileDesiredObjects(ctx context.Context, kubeClient client.Client, logg // we obtain the existing object by deep copying the desired object because it's the most convenient way existing := desired.DeepCopyObject().(client.Object) mutateFn := manifests.MutateFuncFor(existing, desired) - op, crudErr := ctrl.CreateOrUpdate(ctx, kubeClient, existing, mutateFn) + var op controllerutil.OperationResult + crudErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { + result, createOrUpdateErr := ctrl.CreateOrUpdate(ctx, kubeClient, existing, mutateFn) + op = result + return createOrUpdateErr + }) if crudErr != nil && errors.Is(crudErr, manifests.ImmutableChangeErr) { l.Error(crudErr, "detected immutable field change, trying to delete, new object will be created on next reconcile", "existing", existing.GetName()) delErr := kubeClient.Delete(ctx, existing) diff --git a/controllers/opampbridge_controller.go b/controllers/opampbridge_controller.go index 9a948ca42..670418ad5 100644 --- a/controllers/opampbridge_controller.go +++ b/controllers/opampbridge_controller.go @@ -92,6 +92,10 @@ func (r *OpAMPBridgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) // on deleted requests. return ctrl.Result{}, client.IgnoreNotFound(err) } + // We have a deletion, short circuit and let the deletion happen + if deletionTimestamp := instance.GetDeletionTimestamp(); deletionTimestamp != nil { + return ctrl.Result{}, nil + } params := r.getParams(instance) diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index a9c57b127..990482019 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -173,6 +173,10 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct // on deleted requests. return ctrl.Result{}, client.IgnoreNotFound(err) } + // We have a deletion, short circuit and let the deletion happen + if deletionTimestamp := instance.GetDeletionTimestamp(); deletionTimestamp != nil { + return ctrl.Result{}, nil + } if instance.Spec.ManagementState == v1alpha1.ManagementStateUnmanaged { log.Info("Skipping reconciliation for unmanaged OpenTelemetryCollector resource", "name", req.String()) diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 699cc5770..85b1c137d 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -17,6 +17,7 @@ package controllers_test import ( "context" "testing" + "time" routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" @@ -27,10 +28,12 @@ import ( v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" policyV1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" controllerruntime "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" @@ -94,6 +97,9 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { updatedRouteParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute updatedRouteParams.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure updatedRouteParams.OtelCol.Spec.Ingress.Hostname = expectHostname + deletedParams := paramsWithMode(v1alpha1.ModeDeployment) + now := metav1.NewTime(time.Now()) + deletedParams.OtelCol.DeletionTimestamp = &now type args struct { params manifests.Params @@ -488,6 +494,28 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }, }, }, + { + name: "collector is being deleted", + args: args{ + params: deletedParams, + updates: []manifests.Params{}, + }, + want: []want{ + { + result: controllerruntime.Result{}, + checks: []check{ + func(t *testing.T, params manifests.Params) { + o := v1alpha1.OpenTelemetryCollector{} + exists, err := populateObjectIfExists(t, &o, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) + assert.NoError(t, err) + assert.False(t, exists) // There should be no collector anymore + }, + }, + wantErr: assert.NoError, + validateErr: assert.NoError, + }, + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -505,10 +533,16 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }) assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") firstCheck := tt.want[0] + // Check for this before create, otherwise it's blown away. + deletionTimestamp := tt.args.params.OtelCol.GetDeletionTimestamp() createErr := k8sClient.Create(testContext, &tt.args.params.OtelCol) if !firstCheck.validateErr(t, createErr) { return } + if deletionTimestamp != nil { + err := k8sClient.Delete(testContext, &tt.args.params.OtelCol, client.PropagationPolicy(metav1.DeletePropagationForeground)) + assert.NoError(t, err) + } req := k8sreconcile.Request{ NamespacedName: nsn, } From 7c11add40d3f6118042d2fe80cc4ff695bb08cd2 Mon Sep 17 00:00:00 2001 From: Israel Blancas Date: Mon, 27 Nov 2023 17:48:36 +0100 Subject: [PATCH 1168/1234] [chore] Create a single interface for the Receiver and Exporter parsers (#2287) * Create a single interface for the Receiver and Exporter parsers Signed-off-by: Israel Blancas * Fix lint Signed-off-by: Israel Blancas * Use ComponentType Signed-off-by: Israel Blancas * Apply changes requested in code review Signed-off-by: Israel Blancas * Simplify getting the enabled components Signed-off-by: Israel Blancas * Fix lint Signed-off-by: Israel Blancas --------- Signed-off-by: Israel Blancas --- apis/v1alpha1/collector_webhook_test.go | 2 + apis/v1alpha1/instrumentation_webhook_test.go | 1 + apis/v1alpha1/opampbridge_webhook_test.go | 2 + controllers/reconcile_test.go | 4 + .../collector/adapters/config_to_ports.go | 149 ++++++------------ .../adapters/config_to_ports_test.go | 15 +- .../collector/adapters/config_validate.go | 21 +-- .../adapters/config_validate_test.go | 8 +- internal/manifests/collector/ingress.go | 2 +- .../collector/parser/exporter/exporter.go | 23 +-- .../parser/exporter/exporter_prometheus.go | 5 +- internal/manifests/collector/parser/parser.go | 31 ++++ .../collector/parser/receiver/receiver.go | 25 +-- .../parser/receiver/receiver_aws-xray.go | 8 +- .../parser/receiver/receiver_carbon.go | 8 +- .../parser/receiver/receiver_collectd.go | 8 +- .../receiver/receiver_fluent-forward.go | 8 +- .../parser/receiver/receiver_generic.go | 5 +- .../parser/receiver/receiver_generic_test.go | 3 +- .../parser/receiver/receiver_influxdb.go | 8 +- .../parser/receiver/receiver_jaeger.go | 5 +- .../parser/receiver/receiver_jaeger_test.go | 3 +- .../collector/parser/receiver/receiver_oc.go | 8 +- .../parser/receiver/receiver_otlp.go | 5 +- .../parser/receiver/receiver_otlp_test.go | 3 +- .../parser/receiver/receiver_sapm.go | 8 +- .../parser/receiver/receiver_signalfx.go | 8 +- .../parser/receiver/receiver_skywalking.go | 5 +- .../receiver/receiver_skywalking_test.go | 3 +- .../parser/receiver/receiver_splunk-hec.go | 8 +- .../parser/receiver/receiver_statsd.go | 4 +- .../parser/receiver/receiver_test.go | 8 +- .../parser/receiver/receiver_wavefront.go | 8 +- .../parser/receiver/receiver_zipkin-scribe.go | 8 +- .../parser/receiver/receiver_zipkin.go | 4 +- .../manifests/collector/servicemonitor.go | 2 +- .../podmutation/webhookhandler_test.go | 2 + pkg/instrumentation/podmutator_test.go | 1 + 38 files changed, 220 insertions(+), 209 deletions(-) create mode 100644 internal/manifests/collector/parser/parser.go diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index 8ccc26bb1..fd8763ebd 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -277,6 +277,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { cvw := &CollectorWebhook{ logger: logr.Discard(), @@ -786,6 +787,7 @@ func TestOTELColValidatingWebhook(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { cvw := &CollectorWebhook{ logger: logr.Discard(), diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 46f7327ad..81049cbc0 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -116,6 +116,7 @@ func TestInstrumentationValidatingWebhook(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { ctx := context.Background() if test.err == "" { diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go index 947eaa03e..b67551b8e 100644 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -108,6 +108,7 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { webhook := &OpAMPBridgeWebhook{ logger: logr.Discard(), @@ -294,6 +295,7 @@ func TestOpAMPBridgeValidatingWebhook(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { webhook := &OpAMPBridgeWebhook{ logger: logr.Discard(), diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 85b1c137d..b83e16599 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -518,6 +518,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { }, } for _, tt := range tests { + tt := tt t.Run(tt.name, func(t *testing.T) { testContext := context.Background() nsn := types.NamespacedName{Name: tt.args.params.OtelCol.Name, Namespace: tt.args.params.OtelCol.Namespace} @@ -557,6 +558,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { } // run the next set of checks for pid, updateParam := range tt.args.updates { + updateParam := updateParam existing := v1alpha1.OpenTelemetryCollector{} found, err := populateObjectIfExists(t, &existing, nsn) assert.True(t, found) @@ -676,6 +678,7 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) { }, } for _, tt := range tests { + tt := tt t.Run(tt.name, func(t *testing.T) { testContext := context.Background() nsn := types.NamespacedName{Name: tt.args.params.OpAMPBridge.Name, Namespace: tt.args.params.OpAMPBridge.Namespace} @@ -710,6 +713,7 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) { } // run the next set of checks for pid, updateParam := range tt.args.updates { + updateParam := updateParam existing := v1alpha1.OpAMPBridge{} found, err := populateObjectIfExists(t, &existing, nsn) assert.True(t, found) diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index 1741e6a18..b712e1df4 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -15,7 +15,7 @@ package adapters import ( - "errors" + "fmt" "net" "sort" "strconv" @@ -24,26 +24,24 @@ import ( "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" exporterParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/exporter" receiverParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) -var ( - // ErrNoExporters indicates that there are no exporters in the configuration. - ErrNoExporters = errors.New("no exporters available as part of the configuration") +type ComponentType int - // ErrNoReceivers indicates that there are no receivers in the configuration. - ErrNoReceivers = errors.New("no receivers available as part of the configuration") - - // ErrReceiversNotAMap indicates that the receivers property isn't a map of values. - ErrReceiversNotAMap = errors.New("receivers property in the configuration doesn't contain valid receivers") - - // ErrExportersNotAMap indicates that the exporters property isn't a map of values. - ErrExportersNotAMap = errors.New("exporters property in the configuration doesn't contain valid exporters") +const ( + ComponentTypeReceiver ComponentType = iota + ComponentTypeExporter ) -// ConfigToExporterPorts converts the incoming configuration object into a set of service ports required by the exporters. -func ConfigToExporterPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { +func (c ComponentType) String() string { + return [...]string{"receiver", "exporter"}[c] +} + +// ConfigToComponentPorts converts the incoming configuration object into a set of service ports required by the exporters. +func ConfigToComponentPorts(logger logr.Logger, cType ComponentType, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { // now, we gather which ports we might need to open // for that, we get all the exporters and check their `endpoint` properties, // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: @@ -52,119 +50,64 @@ func ConfigToExporterPorts(logger logr.Logger, config map[interface{}]interface{ // the exporter-qualifier is what comes after the slash in the exporter name, but typically nil // examples: // ```yaml - // exporters: - // exampleexporter: + // components: + // componentexample: // endpoint: 0.0.0.0:12345 - // exampleexporter/settings: + // componentexample/settings: // endpoint: 0.0.0.0:12346 - // in this case, we have two ports, named: "exampleexporter" and "exampleexporter-settings" - exportersProperty, ok := config["exporters"] + // in this case, we have 2 ports, named: "componentexample" and "componentexample-settings" + componentsProperty, ok := config[fmt.Sprintf("%ss", cType.String())] if !ok { - return nil, ErrNoExporters - } - expEnabled := GetEnabledExporters(logger, config) - if expEnabled == nil { - return nil, ErrExportersNotAMap + return nil, fmt.Errorf("no %ss available as part of the configuration", cType) } - exporters, ok := exportersProperty.(map[interface{}]interface{}) + + components, ok := componentsProperty.(map[interface{}]interface{}) if !ok { - return nil, ErrExportersNotAMap + return nil, fmt.Errorf("%ss doesn't contain valid components", cType.String()) + } + + compEnabled := getEnabledComponents(config, cType) + + if compEnabled == nil { + return nil, fmt.Errorf("no enabled %ss available as part of the configuration", cType) } ports := []corev1.ServicePort{} - for key, val := range exporters { - // This check will pass only the enabled exporters, + for key, val := range components { + // This check will pass only the enabled components, // then only the related ports will be opened. - if !expEnabled[key] { + if !compEnabled[key] { continue } exporter, ok := val.(map[interface{}]interface{}) if !ok { - logger.V(2).Info("exporter doesn't seem to be a map of properties", "exporter", key) + logger.V(2).Info("component doesn't seem to be a map of properties", cType.String(), key) exporter = map[interface{}]interface{}{} } - exprtName := key.(string) - exprtParser, err := exporterParser.For(logger, exprtName, exporter) - if err != nil { - logger.V(2).Info("no parser found for '%s'", exprtName) - continue + cmptName := key.(string) + var cmptParser parser.ComponentPortParser + var err error + switch cType { + case ComponentTypeExporter: + cmptParser, err = exporterParser.For(logger, cmptName, exporter) + case ComponentTypeReceiver: + cmptParser, err = receiverParser.For(logger, cmptName, exporter) } - exprtPorts, err := exprtParser.Ports() if err != nil { - logger.Error(err, "parser for '%s' has returned an error: %w", exprtName, err) + logger.V(2).Info("no parser found for '%s'", cmptName) continue } - if len(exprtPorts) > 0 { - ports = append(ports, exprtPorts...) - } - } - - sort.Slice(ports, func(i, j int) bool { - return ports[i].Name < ports[j].Name - }) - - return ports, nil -} - -// ConfigToReceiverPorts converts the incoming configuration object into a set of service ports required by the receivers. -func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { - // now, we gather which ports we might need to open - // for that, we get all the receivers and check their `endpoint` properties, - // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: - // ${instance.Name}-${receiver.name}-${receiver.qualifier} - // the receiver-name is typically the node name from the receivers map - // the receiver-qualifier is what comes after the slash in the receiver name, but typically nil - // examples: - // ```yaml - // receivers: - // examplereceiver: - // endpoint: 0.0.0.0:12345 - // examplereceiver/settings: - // endpoint: 0.0.0.0:12346 - // in this case, we have two ports, named: "examplereceiver" and "examplereceiver-settings" - receiversProperty, ok := config["receivers"] - if !ok { - return nil, ErrNoReceivers - } - recEnabled := GetEnabledReceivers(logger, config) - if recEnabled == nil { - return nil, ErrReceiversNotAMap - } - receivers, ok := receiversProperty.(map[interface{}]interface{}) - if !ok { - return nil, ErrReceiversNotAMap - } - - ports := []corev1.ServicePort{} - for key, val := range receivers { - // This check will pass only the enabled receivers, - // then only the related ports will be opened. - if !recEnabled[key] { - continue - } - receiver, ok := val.(map[interface{}]interface{}) - if !ok { - logger.Info("receiver doesn't seem to be a map of properties", "receiver", key) - receiver = map[interface{}]interface{}{} - } - - rcvrName := key.(string) - rcvrParser := receiverParser.For(logger, rcvrName, receiver) - - rcvrPorts, err := rcvrParser.Ports() + exprtPorts, err := cmptParser.Ports() if err != nil { - // should we break the process and return an error, or just ignore this faulty parser - // and let the other parsers add their ports to the service? right now, the best - // option seems to be to log the failures and move on, instead of failing them all - logger.Error(err, "parser for '%s' has returned an error: %w", rcvrName, err) + logger.Error(err, "parser for '%s' has returned an error: %w", cmptName, err) continue } - if len(rcvrPorts) > 0 { - ports = append(ports, rcvrPorts...) + if len(exprtPorts) > 0 { + ports = append(ports, exprtPorts...) } } @@ -176,12 +119,12 @@ func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{ } func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) []corev1.ServicePort { - ports, err := ConfigToReceiverPorts(logger, config) + ports, err := ConfigToComponentPorts(logger, ComponentTypeReceiver, config) if err != nil { logger.Error(err, "there was a problem while getting the ports from the receivers") } - exporterPorts, err := ConfigToExporterPorts(logger, config) + exporterPorts, err := ConfigToComponentPorts(logger, ComponentTypeExporter, config) if err != nil { logger.Error(err, "there was a problem while getting the ports from the exporters") } diff --git a/internal/manifests/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go index 7c7d9f3d8..c2ae638ef 100644 --- a/internal/manifests/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -26,6 +26,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) @@ -83,7 +84,7 @@ func TestExtractPortsFromConfig(t *testing.T) { require.NotEmpty(t, config) // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) + ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, config) assert.NoError(t, err) assert.Len(t, ports, 10) @@ -116,12 +117,12 @@ func TestNoPortsParsed(t *testing.T) { configStr string }{ { - expected: adapters.ErrNoReceivers, + expected: errors.New("no receivers available as part of the configuration"), desc: "empty", configStr: "", }, { - expected: adapters.ErrReceiversNotAMap, + expected: errors.New("receivers doesn't contain valid components"), desc: "not a map", configStr: "receivers: some-string", }, @@ -132,7 +133,7 @@ func TestNoPortsParsed(t *testing.T) { require.NoError(t, err) // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) + ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, config) // verify assert.Nil(t, ports) @@ -161,7 +162,7 @@ func TestInvalidReceivers(t *testing.T) { require.NoError(t, err) // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) + ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, config) // verify assert.NoError(t, err) @@ -179,7 +180,7 @@ func TestParserFailed(t *testing.T) { return nil, errors.New("mocked error") }, } - receiver.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) receiver.ReceiverParser { + receiver.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return mockParser }) @@ -197,7 +198,7 @@ func TestParserFailed(t *testing.T) { } // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) + ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, config) // verify assert.Len(t, ports, 0) diff --git a/internal/manifests/collector/adapters/config_validate.go b/internal/manifests/collector/adapters/config_validate.go index 221a4f21a..8283702cf 100644 --- a/internal/manifests/collector/adapters/config_validate.go +++ b/internal/manifests/collector/adapters/config_validate.go @@ -14,22 +14,13 @@ package adapters -import ( - "github.com/go-logr/logr" -) +import "fmt" // Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. -// GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. -func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { - return getEnabledComponents(config, "receivers") -} - -func GetEnabledExporters(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { - return getEnabledComponents(config, "exporters") -} - -func getEnabledComponents(config map[interface{}]interface{}, componentType string) map[interface{}]bool { - cfgComponents, ok := config[componentType] +// getEnabledComponents returns all enabled components as a true flag set. If it can't find any receiver, it will return a nil interface. +func getEnabledComponents(config map[interface{}]interface{}, componentType ComponentType) map[interface{}]bool { + componentTypePlural := fmt.Sprintf("%ss", componentType) + cfgComponents, ok := config[componentTypePlural] if !ok { return nil } @@ -85,7 +76,7 @@ func getEnabledComponents(config map[interface{}]interface{}, componentType stri return nil } for pipSpecID, pipSpecCfg := range pipelineDesc { - if pipSpecID.(string) == componentType { + if pipSpecID.(string) == componentTypePlural { receiversList, ok := pipSpecCfg.([]interface{}) if !ok { continue diff --git a/internal/manifests/collector/adapters/config_validate_test.go b/internal/manifests/collector/adapters/config_validate_test.go index 34cf84118..7003235fe 100644 --- a/internal/manifests/collector/adapters/config_validate_test.go +++ b/internal/manifests/collector/adapters/config_validate_test.go @@ -17,13 +17,9 @@ package adapters import ( "testing" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/stretchr/testify/require" ) -var logger = logf.Log.WithName("unit-tests") - func TestConfigValidate(t *testing.T) { // prepare @@ -61,7 +57,7 @@ service: require.NotEmpty(t, config) // test - check := GetEnabledReceivers(logger, config) + check := getEnabledComponents(config, ComponentTypeReceiver) require.NotEmpty(t, check) } @@ -102,6 +98,6 @@ service: require.NotEmpty(t, config) // test - check := GetEnabledReceivers(logger, config) + check := getEnabledComponents(config, ComponentTypeReceiver) require.Empty(t, check) } diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index 36e7e15ae..d1b68106e 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -144,7 +144,7 @@ func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryColle return nil } - ports, err := adapters.ConfigToReceiverPorts(logger, configFromString) + ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, configFromString) if err != nil { logger.Error(err, "couldn't build the ingress for this instance") } diff --git a/internal/manifests/collector/parser/exporter/exporter.go b/internal/manifests/collector/parser/exporter/exporter.go index ae0282f73..93c66b859 100644 --- a/internal/manifests/collector/parser/exporter/exporter.go +++ b/internal/manifests/collector/parser/exporter/exporter.go @@ -25,31 +25,20 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -// ExporterParser is an interface that should be implemented by all exporter parsers. -type ExporterParser interface { - // Ports returns the service ports parsed based on the exporter's configuration - Ports() ([]corev1.ServicePort, error) - - // ParserName returns the name of this parser - ParserName() string -} - -// Builder specifies the signature required for parser builders. -type Builder func(logr.Logger, string, map[interface{}]interface{}) ExporterParser - -// registry holds a record of all known parsers. -var registry = make(map[string]Builder) +// registry holds a record of all known exporter parsers. +var registry = make(map[string]parser.Builder) // BuilderFor returns a parser builder for the given exporter name. -func BuilderFor(name string) Builder { +func BuilderFor(name string) parser.Builder { return registry[exporterType(name)] } // For returns a new parser for the given exporter name + config. -func For(logger logr.Logger, name string, config map[interface{}]interface{}) (ExporterParser, error) { +func For(logger logr.Logger, name string, config map[interface{}]interface{}) (parser.ComponentPortParser, error) { builder := BuilderFor(name) if builder == nil { return nil, fmt.Errorf("no builders for %s", name) @@ -58,7 +47,7 @@ func For(logger logr.Logger, name string, config map[interface{}]interface{}) (E } // Register adds a new parser builder to the list of known builders. -func Register(name string, builder Builder) { +func Register(name string, builder parser.Builder) { registry[name] = builder } diff --git a/internal/manifests/collector/parser/exporter/exporter_prometheus.go b/internal/manifests/collector/parser/exporter/exporter_prometheus.go index cc9e17748..61d58588d 100644 --- a/internal/manifests/collector/parser/exporter/exporter_prometheus.go +++ b/internal/manifests/collector/parser/exporter/exporter_prometheus.go @@ -19,10 +19,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -var _ ExporterParser = &PrometheusExporterParser{} +var _ parser.ComponentPortParser = &PrometheusExporterParser{} const ( parserNamePrometheus = "__prometheus" @@ -37,7 +38,7 @@ type PrometheusExporterParser struct { } // NewPrometheusExporterParser builds a new parser for OTLP receivers. -func NewPrometheusExporterParser(logger logr.Logger, name string, config map[interface{}]interface{}) ExporterParser { +func NewPrometheusExporterParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &PrometheusExporterParser{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/parser.go b/internal/manifests/collector/parser/parser.go new file mode 100644 index 000000000..62de283b1 --- /dev/null +++ b/internal/manifests/collector/parser/parser.go @@ -0,0 +1,31 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" +) + +type ComponentPortParser interface { + // Ports returns the service ports parsed based on the exporter's configuration + Ports() ([]corev1.ServicePort, error) + + // ParserName returns the name of this parser + ParserName() string +} + +// Builder specifies the signature required for parser builders. +type Builder func(logr.Logger, string, map[interface{}]interface{}) ComponentPortParser diff --git a/internal/manifests/collector/parser/receiver/receiver.go b/internal/manifests/collector/parser/receiver/receiver.go index 88c6b4bcf..97147658f 100644 --- a/internal/manifests/collector/parser/receiver/receiver.go +++ b/internal/manifests/collector/parser/receiver/receiver.go @@ -26,26 +26,15 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -// ReceiverParser is an interface that should be implemented by all receiver parsers. -type ReceiverParser interface { - // Ports returns the service ports parsed based on the receiver's configuration - Ports() ([]corev1.ServicePort, error) - - // ParserName returns the name of this parser - ParserName() string -} - -// Builder specifies the signature required for parser builders. -type Builder func(logr.Logger, string, map[interface{}]interface{}) ReceiverParser - -// registry holds a record of all known parsers. -var registry = make(map[string]Builder) +// registry holds a record of all known receiver parsers. +var registry = make(map[string]parser.Builder) // BuilderFor returns a parser builder for the given receiver name. -func BuilderFor(name string) Builder { +func BuilderFor(name string) parser.Builder { builder := registry[receiverType(name)] if builder == nil { builder = NewGenericReceiverParser @@ -55,13 +44,13 @@ func BuilderFor(name string) Builder { } // For returns a new parser for the given receiver name + config. -func For(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func For(logger logr.Logger, name string, config map[interface{}]interface{}) (parser.ComponentPortParser, error) { builder := BuilderFor(name) - return builder(logger, name, config) + return builder(logger, name, config), nil } // Register adds a new parser builder to the list of known builders. -func Register(name string, builder Builder) { +func Register(name string, builder parser.Builder) { registry[name] = builder } diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go index f5569f247..44618b3aa 100644 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameAWSXRAY = "__awsxray" // NewAWSXrayReceiverParser builds a new parser for AWS xray receivers, from the contrib repository. -func NewAWSXrayReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewAWSXrayReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon.go b/internal/manifests/collector/parser/receiver/receiver_carbon.go index 45c3c0447..b1b0aaa4c 100644 --- a/internal/manifests/collector/parser/receiver/receiver_carbon.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameCarbon = "__carbon" // NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository. -func NewCarbonReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewCarbonReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd.go b/internal/manifests/collector/parser/receiver/receiver_collectd.go index d18e6b72b..aa42ab039 100644 --- a/internal/manifests/collector/parser/receiver/receiver_collectd.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameCollectd = "__collectd" // NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository. -func NewCollectdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewCollectdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go index c55debd96..88881923f 100644 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameFluentForward = "__fluentforward" // NewFluentForwardReceiverParser builds a new parser for FluentForward receivers, from the contrib repository. -func NewFluentForwardReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewFluentForwardReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_generic.go b/internal/manifests/collector/parser/receiver/receiver_generic.go index 42d5975ec..864b5bb11 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic.go @@ -18,12 +18,13 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) const parserNameGeneric = "__generic" -var _ ReceiverParser = &GenericReceiver{} +var _ parser.ComponentPortParser = &GenericReceiver{} // GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly. type GenericReceiver struct { @@ -40,7 +41,7 @@ type GenericReceiver struct { // so that it can expose the required port based on the receiver's config. Receiver scrapers are ignored. // NewGenericReceiverParser builds a new parser for generic receivers. -func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go index 4b6580d29..1adfcf12d 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" ) @@ -59,7 +60,7 @@ func TestFailedToParseEndpoint(t *testing.T) { func TestDownstreamParsers(t *testing.T) { for _, tt := range []struct { - builder func(logr.Logger, string, map[interface{}]interface{}) receiver.ReceiverParser + builder func(logr.Logger, string, map[interface{}]interface{}) parser.ComponentPortParser desc string receiverName string parserName string diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb.go b/internal/manifests/collector/parser/receiver/receiver_influxdb.go index d2e9cc3e5..0930a29f7 100644 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameInfluxdb = "__influxdb" // NewInfluxdbReceiverParser builds a new parser for Influxdb receivers, from the contrib repository. -func NewInfluxdbReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewInfluxdbReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger.go b/internal/manifests/collector/parser/receiver/receiver_jaeger.go index 26329a6ec..dcc99d8bd 100644 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger.go @@ -20,10 +20,11 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -var _ ReceiverParser = &JaegerReceiverParser{} +var _ parser.ComponentPortParser = &JaegerReceiverParser{} const ( parserNameJaeger = "__jaeger" @@ -42,7 +43,7 @@ type JaegerReceiverParser struct { } // NewJaegerReceiverParser builds a new parser for Jaeger receivers. -func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &JaegerReceiverParser{ logger: logger, diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go index 84f343a2c..dadf3e0cb 100644 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go @@ -28,7 +28,8 @@ func TestJaegerSelfRegisters(t *testing.T) { func TestJaegerIsFoundByName(t *testing.T) { // test - p := For(logger, "jaeger", map[interface{}]interface{}{}) + p, err := For(logger, "jaeger", map[interface{}]interface{}{}) + assert.NoError(t, err) // verify assert.Equal(t, "__jaeger", p.ParserName()) diff --git a/internal/manifests/collector/parser/receiver/receiver_oc.go b/internal/manifests/collector/parser/receiver/receiver_oc.go index c2515a0ad..3463a8d39 100644 --- a/internal/manifests/collector/parser/receiver/receiver_oc.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameOpenCensus = "__opencensus" // NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers. -func NewOpenCensusReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewOpenCensusReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp.go b/internal/manifests/collector/parser/receiver/receiver_otlp.go index 471ca10c8..68972fd95 100644 --- a/internal/manifests/collector/parser/receiver/receiver_otlp.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp.go @@ -21,10 +21,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -var _ ReceiverParser = &OTLPReceiverParser{} +var _ parser.ComponentPortParser = &OTLPReceiverParser{} const ( parserNameOTLP = "__otlp" @@ -46,7 +47,7 @@ type OTLPReceiverParser struct { } // NewOTLPReceiverParser builds a new parser for OTLP receivers. -func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &OTLPReceiverParser{ logger: logger, diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go index 4f5e4bcb1..7165153dd 100644 --- a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go @@ -27,7 +27,8 @@ func TestOTLPSelfRegisters(t *testing.T) { func TestOTLPIsFoundByName(t *testing.T) { // test - p := For(logger, "otlp", map[interface{}]interface{}{}) + p, err := For(logger, "otlp", map[interface{}]interface{}{}) + assert.NoError(t, err) // verify assert.Equal(t, "__otlp", p.ParserName()) diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm.go b/internal/manifests/collector/parser/receiver/receiver_sapm.go index e0a3756ab..924b88bff 100644 --- a/internal/manifests/collector/parser/receiver/receiver_sapm.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameSAPM = "__sapm" // NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository. -func NewSAPMReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewSAPMReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx.go b/internal/manifests/collector/parser/receiver/receiver_signalfx.go index a3ecc6873..549e80245 100644 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameSignalFx = "__signalfx" // NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository. -func NewSignalFxReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewSignalFxReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking.go b/internal/manifests/collector/parser/receiver/receiver_skywalking.go index 5bee2cb03..9b72847ee 100644 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking.go @@ -21,10 +21,11 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -var _ ReceiverParser = &SkywalkingReceiverParser{} +var _ parser.ComponentPortParser = &SkywalkingReceiverParser{} const ( parserNameSkywalking = "__skywalking" @@ -41,7 +42,7 @@ type SkywalkingReceiverParser struct { } // NewSkywalkingReceiverParser builds a new parser for Skywalking receivers. -func NewSkywalkingReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewSkywalkingReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { return &SkywalkingReceiverParser{ logger: logger, diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go index e373e16d8..ab00c852c 100644 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go @@ -27,7 +27,8 @@ func TestSkywalkingSelfRegisters(t *testing.T) { func TestSkywalkingIsFoundByName(t *testing.T) { // test - p := For(logger, "skywalking", map[interface{}]interface{}{}) + p, err := For(logger, "skywalking", map[interface{}]interface{}{}) + assert.NoError(t, err) // verify assert.Equal(t, "__skywalking", p.ParserName()) diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go index aa7b478bf..676415334 100644 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameSplunkHec = "__splunk_hec" // NewSplunkHecReceiverParser builds a new parser for Splunk Hec receivers, from the contrib repository. -func NewSplunkHecReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewSplunkHecReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd.go b/internal/manifests/collector/parser/receiver/receiver_statsd.go index 725fb2727..0f41520e2 100644 --- a/internal/manifests/collector/parser/receiver/receiver_statsd.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd.go @@ -17,12 +17,14 @@ package receiver import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" ) const parserNameStatsd = "__statsd" // NewStatsdReceiverParser builds a new parser for Statsd receivers, from the contrib repository. -func NewStatsdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewStatsdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_test.go b/internal/manifests/collector/parser/receiver/receiver_test.go index c972f7cd2..44cb04519 100644 --- a/internal/manifests/collector/parser/receiver/receiver_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_test.go @@ -22,6 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) @@ -118,7 +119,8 @@ func TestIgnorekubeletstatsEndpoint(t *testing.T) { func TestReceiverFallbackWhenNotRegistered(t *testing.T) { // test - p := For(logger, "myreceiver", map[interface{}]interface{}{}) + p, err := For(logger, "myreceiver", map[interface{}]interface{}{}) + assert.NoError(t, err) // test assert.Equal(t, "__generic", p.ParserName()) @@ -127,13 +129,13 @@ func TestReceiverFallbackWhenNotRegistered(t *testing.T) { func TestReceiverShouldFindRegisteredParser(t *testing.T) { // prepare builderCalled := false - Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { + Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { builderCalled = true return &mockParser{} }) // test - For(logger, "mock", map[interface{}]interface{}{}) + _, _ = For(logger, "mock", map[interface{}]interface{}{}) // verify assert.True(t, builderCalled) diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront.go b/internal/manifests/collector/parser/receiver/receiver_wavefront.go index 658d192c2..f2eafb855 100644 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameWavefront = "__wavefront" // NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository. -func NewWavefrontReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewWavefrontReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go index c45968b1d..8f8d9fe21 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go @@ -14,12 +14,16 @@ package receiver -import "github.com/go-logr/logr" +import ( + "github.com/go-logr/logr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" +) const parserNameZipkinScribe = "__zipkinscribe" // NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers. -func NewZipkinScribeReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewZipkinScribeReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { return &GenericReceiver{ logger: logger, name: name, diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin.go b/internal/manifests/collector/parser/receiver/receiver_zipkin.go index 412a8b6cf..debbf8e9a 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin.go @@ -17,12 +17,14 @@ package receiver import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" ) const parserNameZipkin = "__zipkin" // NewZipkinReceiverParser builds a new parser for Zipkin receivers. -func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) ReceiverParser { +func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { http := "http" return &GenericReceiver{ logger: logger, diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index abe78c8ce..8b0a775f2 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -79,7 +79,7 @@ func endpointsFromConfig(logger logr.Logger, otelcol v1alpha1.OpenTelemetryColle return []monitoringv1.Endpoint{} } - exporterPorts, err := adapters.ConfigToExporterPorts(logger, c) + exporterPorts, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeExporter, c) if err != nil { logger.Error(err, "couldn't build service monitors from configuration") return []monitoringv1.Endpoint{} diff --git a/internal/webhook/podmutation/webhookhandler_test.go b/internal/webhook/podmutation/webhookhandler_test.go index d5bb69b79..0adbc2b92 100644 --- a/internal/webhook/podmutation/webhookhandler_test.go +++ b/internal/webhook/podmutation/webhookhandler_test.go @@ -123,6 +123,7 @@ func TestShouldInjectSidecar(t *testing.T) { }, }, } { + tt := tt t.Run(tt.name, func(t *testing.T) { err := k8sClient.Create(context.Background(), &tt.ns) require.NoError(t, err) @@ -341,6 +342,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { }}, }, } { + tt := tt t.Run(tt.name, func(t *testing.T) { err := k8sClient.Create(context.Background(), &tt.ns) require.NoError(t, err) diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index b2b39d45f..7e764abf0 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -5139,6 +5139,7 @@ func TestMutatePod(t *testing.T) { } for _, test := range tests { + test := test t.Run(test.name, func(t *testing.T) { if test.setFeatureGates != nil { test.setFeatureGates(t) From dddfe566101f5d8867cb19e975a07d392f63c762 Mon Sep 17 00:00:00 2001 From: artem-nefedov Date: Mon, 27 Nov 2023 21:21:17 +0100 Subject: [PATCH 1169/1234] Fix example command for enabling feature gates (#2391) Signed-off-by: Artem Nefedov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a16593ea..07703d728 100644 --- a/README.md +++ b/README.md @@ -538,7 +538,7 @@ OpenTelemetry Operator allows to instrument multiple containers using multiple l These features can be enabled using `operator.autoinstrumentation.multi-instrumentation` flag when installing the Operator via Helm. By default flag is `disabled`. For example: ```sh -helm install opentelemetry-operator open-telemetry/opentelemetry-operator --set manager.featureGates=operator.autoinstrumentation.multi-instrumentation=enabled +helm install opentelemetry-operator open-telemetry/opentelemetry-operator --set manager.featureGates=operator.autoinstrumentation.multi-instrumentation ``` For more information about multi-instrumentation feature capabilities please see [Multi-container pods with multiple instrumentations](#Multi-container-pods-with-multiple-instrumentations). From a6c8d4eb8a87a651ba7ed862ebf861304a546953 Mon Sep 17 00:00:00 2001 From: Tania Pham Date: Tue, 28 Nov 2023 12:17:43 -0800 Subject: [PATCH 1170/1234] Enhanced Reconciliation Errors (#2193) * adding error messages * propagated errors * added changelog * working on updating tests * propagated errors and added test * Merge conflicts * changing to debug exporter and adding additional error checks * changing to debug exporter * clean up code * fixed linting errors * config_to_ports error type * fixing sha --- .chloggen/enhanced-status.yaml | 16 ++ ...allocator-delayed-collector-instances.yaml | 2 +- cmd/operator-opamp-bridge/Dockerfile | 1 - controllers/builder_test.go | 21 +- .../opentelemetrycollector_controller.go | 7 +- .../opentelemetrycollector_controller_test.go | 213 ------------------ controllers/reconcile_test.go | 1 + controllers/testdata/ingress_testdata.yaml | 5 +- internal/config/main.go | 1 - internal/config/main_test.go | 2 +- .../collector/adapters/config_to_ports.go | 16 +- .../adapters/config_to_ports_test.go | 6 +- internal/manifests/collector/collector.go | 15 +- internal/manifests/collector/configmap.go | 5 +- .../manifests/collector/configmap_test.go | 12 +- internal/manifests/collector/container.go | 14 +- .../manifests/collector/container_test.go | 119 ++++++++-- internal/manifests/collector/ingress.go | 21 +- internal/manifests/collector/ingress_test.go | 19 +- internal/manifests/collector/route.go | 16 +- internal/manifests/collector/route_test.go | 30 ++- internal/manifests/collector/service.go | 34 +-- internal/manifests/collector/service_test.go | 43 +++- .../collector/testdata/ingress_testdata.yaml | 3 + .../manifests/targetallocator/deployment.go | 4 +- .../targetallocator/deployment_test.go | 32 ++- .../targetallocator/targetallocator.go | 2 +- pkg/collector/reconcile/route.go | 6 +- pkg/collector/reconcile/route_test.go | 11 +- pkg/sidecar/pod_test.go | 7 + 30 files changed, 339 insertions(+), 345 deletions(-) create mode 100755 .chloggen/enhanced-status.yaml diff --git a/.chloggen/enhanced-status.yaml b/.chloggen/enhanced-status.yaml new file mode 100755 index 000000000..35c1948a8 --- /dev/null +++ b/.chloggen/enhanced-status.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: added reconciliation errors for CRD events + +# One or more tracking issues related to the change +issues: [1972] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.chloggen/target-allocator-delayed-collector-instances.yaml b/.chloggen/target-allocator-delayed-collector-instances.yaml index 2be379226..91a42ed8f 100644 --- a/.chloggen/target-allocator-delayed-collector-instances.yaml +++ b/.chloggen/target-allocator-delayed-collector-instances.yaml @@ -13,4 +13,4 @@ issues: [2350] # (Optional) One or more lines of additional information to render under the primary note. # These lines will be padded with 2 spaces and then inserted directly into the document. # Use pipe (|) for multiline entries. -subtext: +subtext: \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index 2031695f2..f4248cac1 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -18,5 +18,4 @@ COPY bin/opampbridge_${TARGETARCH} ./main # "nonroot" USER 65532:65532 - ENTRYPOINT ["./main"] diff --git a/controllers/builder_test.go b/controllers/builder_test.go index f40b4c0d2..344dc45a0 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -55,6 +55,8 @@ func TestBuildCollector(t *testing.T) { var goodConfig = `receivers: examplereceiver: endpoint: "0.0.0.0:12345" +exporters: + logging: service: pipelines: metrics: @@ -102,7 +104,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -124,7 +126,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -208,7 +210,7 @@ service: Annotations: nil, }, Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", }, }, &corev1.ServiceAccount{ @@ -345,7 +347,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -367,7 +369,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -451,7 +453,7 @@ service: Annotations: nil, }, Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", }, }, &corev1.ServiceAccount{ @@ -621,7 +623,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -643,7 +645,7 @@ service: "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "baf97852b8beb44fb46a120f8c31873ded3129088e50cd6c69f3208ba60bd661", + "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", "prometheus.io/path": "/metrics", "prometheus.io/port": "8888", "prometheus.io/scrape": "true", @@ -727,7 +729,7 @@ service: Annotations: nil, }, Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", + "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", }, }, &corev1.Service{ @@ -829,6 +831,7 @@ service: return } require.Equal(t, tt.want, got) + }) } } diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 990482019..2ceeaac60 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -230,14 +230,13 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er Owns(&corev1.Service{}). Owns(&appsv1.Deployment{}). Owns(&appsv1.DaemonSet{}). - Owns(&appsv1.StatefulSet{}) + Owns(&appsv1.StatefulSet{}). + Owns(&autoscalingv2.HorizontalPodAutoscaler{}). + Owns(&policyV1.PodDisruptionBudget{}) if featuregate.PrometheusOperatorIsAvailable.IsEnabled() { builder.Owns(&monitoringv1.ServiceMonitor{}) } - builder = builder.Owns(&autoscalingv2.HorizontalPodAutoscaler{}) - builder = builder.Owns(&policyV1.PodDisruptionBudget{}) - return builder.Complete(r) } diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go index ec50a9a64..20894d167 100644 --- a/controllers/opentelemetrycollector_controller_test.go +++ b/controllers/opentelemetrycollector_controller_test.go @@ -17,25 +17,17 @@ package controllers_test import ( "context" "errors" - "fmt" "testing" - routev1 "github.com/openshift/api/route/v1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" "k8s.io/kubectl/pkg/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" @@ -49,211 +41,6 @@ var mockAutoDetector = &mockAutoDetect{ }, } -func TestNewObjectsOnReconciliation(t *testing.T) { - // prepare - cfg := config.New( - config.WithCollectorImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - config.WithAutoDetect(mockAutoDetector), - ) - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Recorder: record.NewFakeRecorder(10), - Config: cfg, - }) - require.NoError(t, cfg.AutoDetect()) - created := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeDeployment, - Ports: []corev1.ServicePort{ - { - Name: "telnet", - Port: 49935, - }, - }, - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeRoute, - Route: v1alpha1.OpenShiftRoute{ - Termination: v1alpha1.TLSRouteTerminationTypeInsecure, - }, - }, - }, - } - err := k8sClient.Create(context.Background(), created) - require.NoError(t, err) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(context.Background(), req) - - // verify - require.NoError(t, err) - - // the base query for the underlying objects - opts := []client.ListOption{ - client.InNamespace(nsn.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/component": "opentelemetry-collector", - }), - } - - // verify that we have at least one object for each of the types we create - // whether we have the right ones is up to the specific tests for each type - { - list := &corev1.ConfigMapList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceAccountList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &appsv1.DeploymentList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &appsv1.DaemonSetList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - // attention! we expect daemonsets to be empty in the default configuration - assert.Empty(t, list.Items) - } - { - list := &appsv1.StatefulSetList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - // attention! we expect statefulsets to be empty in the default configuration - assert.Empty(t, list.Items) - } - { - list := &routev1.RouteList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - - // cleanup - require.NoError(t, k8sClient.Delete(context.Background(), created)) - - // cleanup the deployment deliberately, otherwise a local tester will always fail as there is no gc event. - list := &appsv1.DeploymentList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.Len(t, list.Items, 1) - require.NoError(t, k8sClient.Delete(context.Background(), list.Items[0].DeepCopy())) -} - -func TestNewStatefulSetObjectsOnReconciliation(t *testing.T) { - // prepare - cfg := config.New(config.WithAutoDetect(mockAutoDetector)) - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Recorder: record.NewFakeRecorder(10), - Config: cfg, - }) - created := &v1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeStatefulSet, - }, - } - err := k8sClient.Create(context.Background(), created) - require.NoError(t, err) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(context.Background(), req) - - // verify - require.NoError(t, err) - - // the base query for the underlying objects - opts := []client.ListOption{ - client.InNamespace(nsn.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - "app.kubernetes.io/component": "opentelemetry-collector", - }), - } - - // verify that we have at least one object for each of the types we create - // whether we have the right ones is up to the specific tests for each type - { - list := &corev1.ConfigMapList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceAccountList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &appsv1.StatefulSetList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &appsv1.DeploymentList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - // attention! we expect deployments to be empty when starting in the statefulset mode. - assert.Empty(t, list.Items) - } - { - list := &appsv1.DaemonSetList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - // attention! we expect daemonsets to be empty when starting in the statefulset mode. - assert.Empty(t, list.Items) - } - - // cleanup - require.NoError(t, k8sClient.Delete(context.Background(), created)) - -} - func TestContinueOnRecoverableFailure(t *testing.T) { // prepare taskCalled := false diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index b83e16599..92410a681 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -532,6 +532,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { config.WithTargetAllocatorImage("default-ta-allocator"), ), }) + assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") firstCheck := tt.want[0] // Check for this before create, otherwise it's blown away. diff --git a/controllers/testdata/ingress_testdata.yaml b/controllers/testdata/ingress_testdata.yaml index 70011de0a..4d6ba26c1 100644 --- a/controllers/testdata/ingress_testdata.yaml +++ b/controllers/testdata/ingress_testdata.yaml @@ -8,9 +8,10 @@ receivers: protocols: grpc: endpoint: 0.0.0.0:12346 - +exporters: + debug: service: pipelines: traces: receivers: [otlp, otlp/test] - exporters: [nop] + exporters: [debug] diff --git a/internal/config/main.go b/internal/config/main.go index 7abb1296a..708bf11a2 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -132,7 +132,6 @@ func (c *Config) AutoDetect() error { c.logger.Error(err, "configuration change notification failed for callback") } } - return nil } diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 0157b97f6..ddc4aa5c0 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -80,7 +80,7 @@ func TestAutoDetectInBackground(t *testing.T) { } cfg := config.New( config.WithAutoDetect(mock), - config.WithAutoDetectFrequency(500*time.Second), + config.WithAutoDetectFrequency(3*time.Second), ) // sanity check diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index b712e1df4..a4cffde4d 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -19,6 +19,7 @@ import ( "net" "sort" "strconv" + "strings" "github.com/go-logr/logr" "github.com/mitchellh/mapstructure" @@ -118,23 +119,26 @@ func ConfigToComponentPorts(logger logr.Logger, cType ComponentType, config map[ return ports, nil } -func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) []corev1.ServicePort { +func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { ports, err := ConfigToComponentPorts(logger, ComponentTypeReceiver, config) if err != nil { logger.Error(err, "there was a problem while getting the ports from the receivers") + return nil, err } exporterPorts, err := ConfigToComponentPorts(logger, ComponentTypeExporter, config) if err != nil { logger.Error(err, "there was a problem while getting the ports from the exporters") + return nil, err } + ports = append(ports, exporterPorts...) sort.Slice(ports, func(i, j int) bool { return ports[i].Name < ports[j].Name }) - return ports + return ports, nil } // ConfigToMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. @@ -159,9 +163,11 @@ func ConfigToMetricsPort(logger logr.Logger, config map[interface{}]interface{}) return 0, err } - _, port, err := net.SplitHostPort(cOut.Service.Telemetry.Metrics.Address) - if err != nil { - return 0, err + _, port, netErr := net.SplitHostPort(cOut.Service.Telemetry.Metrics.Address) + if netErr != nil && strings.Contains(netErr.Error(), "missing port in address") { + return 8888, nil + } else if netErr != nil { + return 0, netErr } i64, err := strconv.ParseInt(port, 10, 32) if err != nil { diff --git a/internal/manifests/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go index c2ae638ef..7c872606f 100644 --- a/internal/manifests/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -267,8 +267,10 @@ func TestConfigToMetricsPort(t *testing.T) { }, } { t.Run(tt.desc, func(t *testing.T) { - _, err := adapters.ConfigToMetricsPort(logger, tt.config) - assert.Error(t, err) + // these are acceptable failures, we return to the collector's default metric port + port, err := adapters.ConfigToMetricsPort(logger, tt.config) + assert.NoError(t, err) + assert.Equal(t, int32(8888), port) }) } } diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index f33f47926..6114965c2 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -43,13 +43,13 @@ func Build(params manifests.Params) ([]client.Object, error) { params.Log.V(5).Info("not building sidecar...") } manifestFactories = append(manifestFactories, []manifests.K8sManifestFactory{ - manifests.FactoryWithoutError(ConfigMap), + manifests.Factory(ConfigMap), manifests.FactoryWithoutError(HorizontalPodAutoscaler), manifests.FactoryWithoutError(ServiceAccount), - manifests.FactoryWithoutError(Service), - manifests.FactoryWithoutError(HeadlessService), - manifests.FactoryWithoutError(MonitoringService), - manifests.FactoryWithoutError(Ingress), + manifests.Factory(Service), + manifests.Factory(HeadlessService), + manifests.Factory(MonitoringService), + manifests.Factory(Ingress), }...) if params.OtelCol.Spec.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { manifestFactories = append(manifestFactories, manifests.Factory(ServiceMonitor)) @@ -62,7 +62,10 @@ func Build(params manifests.Params) ([]client.Object, error) { resourceManifests = append(resourceManifests, res) } } - routes := Routes(params) + routes, err := Routes(params) + if err != nil { + return nil, err + } // NOTE: we cannot just unpack the slice, the type checker doesn't coerce the type correctly. for _, route := range routes { resourceManifests = append(resourceManifests, route) diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 47a5967c4..58ee4c131 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -23,13 +23,14 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func ConfigMap(params manifests.Params) *corev1.ConfigMap { +func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { name := naming.ConfigMap(params.OtelCol.Name) labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) replacedConf, err := ReplaceConfig(params.OtelCol) if err != nil { params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) + return nil, err } return &corev1.ConfigMap{ @@ -42,5 +43,5 @@ func ConfigMap(params manifests.Params) *corev1.ConfigMap { Data: map[string]string{ "collector.yaml": replacedConf, }, - } + }, nil } diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index c256b7c38..9d60763ee 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -63,8 +63,9 @@ service: } param := deploymentParams() - actual := ConfigMap(param) + actual, err := ConfigMap(param) + assert.NoError(t, err) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) assert.Equal(t, expectedData, actual.Data) @@ -109,8 +110,9 @@ service: param := deploymentParams() param.OtelCol.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param) + actual, err := ConfigMap(param) + assert.NoError(t, err) assert.Equal(t, "test-collector", actual.GetName()) assert.Equal(t, expectedLables, actual.GetLabels()) assert.Equal(t, expectedData, actual.Data) @@ -159,8 +161,9 @@ service: param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test_ta_set.yaml") assert.NoError(t, err) param.OtelCol.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param) + actual, err := ConfigMap(param) + assert.NoError(t, err) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) assert.Equal(t, expectedData, actual.Data) @@ -200,8 +203,9 @@ service: param, err := newParams("test/test-img", "testdata/http_sd_config_servicemonitor_test.yaml") assert.NoError(t, err) param.OtelCol.Spec.TargetAllocator.Enabled = true - actual := ConfigMap(param) + actual, err := ConfigMap(param) + assert.NoError(t, err) assert.Equal(t, "test-collector", actual.Name) assert.Equal(t, expectedLables, actual.Labels) assert.Equal(t, expectedData, actual.Data) diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index be5a50c74..e4d826e68 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -43,7 +43,8 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } // build container ports from service ports - ports := getConfigContainerPorts(logger, otelcol.Spec.Config) + ports, err := getConfigContainerPorts(logger, otelcol.Spec.Config) + logger.Error(err, "container ports config") for _, p := range otelcol.Spec.Ports { ports[p.Name] = corev1.ContainerPort{ Name: p.Name, @@ -158,14 +159,17 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } } -func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.ContainerPort { +func getConfigContainerPorts(logger logr.Logger, cfg string) (map[string]corev1.ContainerPort, error) { ports := map[string]corev1.ContainerPort{} c, err := adapters.ConfigFromString(cfg) if err != nil { logger.Error(err, "couldn't extract the configuration") - return ports + return ports, err + } + ps, err := adapters.ConfigToPorts(logger, c) + if err != nil { + return ports, err } - ps := adapters.ConfigToPorts(logger, c) if len(ps) > 0 { for _, p := range ps { truncName := naming.Truncate(p.Name, maxPortLen) @@ -199,7 +203,7 @@ func getConfigContainerPorts(logger logr.Logger, cfg string) map[string]corev1.C Protocol: corev1.ProtocolTCP, } - return ports + return ports, nil } func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index 5d20c99dc..5857798f2 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -39,7 +39,31 @@ var metricContainerPort = corev1.ContainerPort{ func TestContainerNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} + var defaultConfig = `receivers: + otlp: + protocols: + http: + grpc: + exporters: + debug: + service: + pipelines: + metrics: + receivers: [otlp] + exporters: [debug]` + + otelcol := v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + }, + Config: defaultConfig, + }, + } cfg := config.New(config.WithCollectorImage("default-image")) // test @@ -70,12 +94,13 @@ func TestContainerPorts(t *testing.T) { var goodConfig = `receivers: examplereceiver: endpoint: "0.0.0.0:12345" +exporters: + debug: service: pipelines: metrics: receivers: [examplereceiver] - exporters: [debug] -` + exporters: [debug]` tests := []struct { description string @@ -90,9 +115,15 @@ service: expectedPorts: []corev1.ContainerPort{}, }, { - description: "couldn't build ports from spec config", - specConfig: "", - specPorts: nil, + description: "couldn't build ports from spec config", + specConfig: "", + specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + }, expectedPorts: []corev1.ContainerPort{metricContainerPort}, }, { @@ -110,6 +141,11 @@ service: { description: "ports in spec ContainerPorts", specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, { Name: "testport1", Port: 12345, @@ -184,15 +220,30 @@ service: specConfig: `exporters: prometheus: endpoint: "0.0.0.0:9090" + debug: service: pipelines: metrics: - exporters: [prometheus] + receivers: [otlp] + exporters: [prometheus, debug] `, - - specPorts: []corev1.ServicePort{}, + specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus", + Port: 9090, + }, + }, expectedPorts: []corev1.ContainerPort{ - metricContainerPort, + { + Name: "metrics", + ContainerPort: 8888, + Protocol: corev1.ProtocolTCP, + }, { Name: "prometheus", ContainerPort: 9090, @@ -206,12 +257,27 @@ service: endpoint: "0.0.0.0:9090" prometheus/dev: endpoint: "0.0.0.0:9091" + debug: service: pipelines: metrics: - exporters: [prometheus/prod, prometheus/dev] + exporters: [prometheus/prod, prometheus/dev, debug] `, - specPorts: []corev1.ServicePort{}, + specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-dev", + Port: 9091, + }, + { + Name: "prometheus-prod", + Port: 9090, + }, + }, expectedPorts: []corev1.ContainerPort{ metricContainerPort, { @@ -229,7 +295,13 @@ service: specConfig: `exporters: prometheusremotewrite/prometheus: endpoint: http://prometheus-server.monitoring/api/v1/write`, - specPorts: []corev1.ServicePort{}, + specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + }, expectedPorts: []corev1.ContainerPort{metricContainerPort}, }, { @@ -241,11 +313,26 @@ service: endpoint: "0.0.0.0:9091" prometheusremotewrite/prometheus: endpoint: http://prometheus-server.monitoring/api/v1/write + debug: service: pipelines: metrics: - exporters: [prometheus/prod, prometheus/dev, prometheusremotewrite/prometheus]`, - specPorts: []corev1.ServicePort{}, + exporters: [prometheus/prod, prometheus/dev, prometheusremotewrite/prometheus, debug]`, + specPorts: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + { + Name: "prometheus-dev", + Port: 9091, + }, + { + Name: "prometheus-prod", + Port: 9090, + }, + }, expectedPorts: []corev1.ContainerPort{ metricContainerPort, { @@ -269,11 +356,11 @@ service: Ports: testCase.specPorts, }, } + cfg := config.New(config.WithCollectorImage("default-image")) // test c := Container(cfg, logger, otelcol, true) - // verify assert.ElementsMatch(t, testCase.expectedPorts, c.Ports, testCase.description) }) diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index d1b68106e..4bb692ff9 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -28,21 +28,21 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func Ingress(params manifests.Params) *networkingv1.Ingress { +func Ingress(params manifests.Params) (*networkingv1.Ingress, error) { if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { - return nil + return nil, nil } - ports := servicePortsFromCfg(params.Log, params.OtelCol) + ports, err := servicePortsFromCfg(params.Log, params.OtelCol) // if we have no ports, we don't need a ingress entry - if len(ports) == 0 { + if len(ports) == 0 || err != nil { params.Log.V(1).Info( "the instance's configuration didn't yield any ports to open, skipping ingress", "instance.name", params.OtelCol.Name, "instance.namespace", params.OtelCol.Namespace, ) - return nil + return nil, err } var rules []networkingv1.IngressRule @@ -69,7 +69,7 @@ func Ingress(params manifests.Params) *networkingv1.Ingress { Rules: rules, IngressClassName: params.OtelCol.Spec.Ingress.IngressClassName, }, - } + }, nil } func createPathIngressRules(otelcol string, hostname string, ports []corev1.ServicePort) networkingv1.IngressRule { @@ -136,17 +136,17 @@ func createSubdomainIngressRules(otelcol string, hostname string, ports []corev1 return rules } -// TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 -func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []corev1.ServicePort { +func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) ([]corev1.ServicePort, error) { configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { logger.Error(err, "couldn't extract the configuration from the context") - return nil + return nil, err } ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, configFromString) if err != nil { logger.Error(err, "couldn't build the ingress for this instance") + return nil, err } if len(otelcol.Spec.Ports) > 0 { @@ -164,8 +164,7 @@ func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryColle resultingInferredPorts = append(resultingInferredPorts, *filtered) } } - ports = append(otelcol.Spec.Ports, resultingInferredPorts...) } - return ports + return ports, err } diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index b4d862b18..40a3fa4dd 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -46,8 +46,9 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params) + actual, err := Ingress(params) assert.Nil(t, actual) + assert.NoError(t, err) }) t.Run("should return nil unable to parse config", func(t *testing.T) { @@ -64,8 +65,10 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params) + actual, err := Ingress(params) + fmt.Printf("error1: %+v", err) assert.Nil(t, actual) + assert.ErrorContains(t, err, "couldn't parse the opentelemetry-collector configuration") }) t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { @@ -82,8 +85,10 @@ func TestDesiredIngresses(t *testing.T) { }, } - actual := Ingress(params) + actual, err := Ingress(params) + fmt.Printf("error2: %+v", err) assert.Nil(t, actual) + assert.ErrorContains(t, err, "no receivers available as part of the configuration") }) t.Run("path per port", func(t *testing.T) { @@ -106,7 +111,9 @@ func TestDesiredIngresses(t *testing.T) { IngressClassName: &ingressClassName, } - got := Ingress(params) + got, err := Ingress(params) + assert.NoError(t, err) + pathType := networkingv1.PathTypePrefix assert.NotEqual(t, &networkingv1.Ingress{ @@ -193,7 +200,9 @@ func TestDesiredIngresses(t *testing.T) { IngressClassName: &ingressClassName, } - got := Ingress(params) + got, err := Ingress(params) + assert.NoError(t, err) + pathType := networkingv1.PathTypePrefix assert.NotEqual(t, &networkingv1.Ingress{ diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index a2e032572..c5b2877e9 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -26,14 +26,14 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func Routes(params manifests.Params) []*routev1.Route { +func Routes(params manifests.Params) ([]*routev1.Route, error) { if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { - return nil + return nil, nil } if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { params.Log.V(3).Info("ingress settings are not supported in sidecar mode") - return nil + return nil, nil } var tlsCfg *routev1.TLSConfig @@ -47,19 +47,19 @@ func Routes(params manifests.Params) []*routev1.Route { case v1alpha1.TLSRouteTerminationTypeReencrypt: tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationReencrypt} default: // NOTE: if unsupported, end here. - return nil + return nil, nil } - ports := servicePortsFromCfg(params.Log, params.OtelCol) + ports, err := servicePortsFromCfg(params.Log, params.OtelCol) // if we have no ports, we don't need a ingress entry - if len(ports) == 0 { + if len(ports) == 0 || err != nil { params.Log.V(1).Info( "the instance's configuration didn't yield any ports to open, skipping ingress", "instance.name", params.OtelCol.Name, "instance.namespace", params.OtelCol.Namespace, ) - return nil + return nil, err } routes := make([]*routev1.Route, len(ports)) @@ -96,5 +96,5 @@ func Routes(params manifests.Params) []*routev1.Route { }, } } - return routes + return routes, nil } diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 19aefdbbc..12104a125 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -45,7 +45,8 @@ func TestDesiredRoutes(t *testing.T) { }, } - actual := Routes(params) + actual, err := Routes(params) + assert.NoError(t, err) assert.Nil(t, actual) }) @@ -58,13 +59,17 @@ func TestDesiredRoutes(t *testing.T) { Config: "!!!", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, }, }, }, } - actual := Routes(params) + actual, err := Routes(params) assert.Nil(t, actual) + assert.ErrorContains(t, err, "couldn't parse the opentelemetry-collector configuration") }) t.Run("should return nil unable to parse receiver ports", func(t *testing.T) { @@ -76,13 +81,17 @@ func TestDesiredRoutes(t *testing.T) { Config: "---", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, + Route: v1alpha1.OpenShiftRoute{ + Termination: v1alpha1.TLSRouteTerminationTypeInsecure, + }, }, }, }, } - actual := Routes(params) + actual, err := Routes(params) assert.Nil(t, actual) + assert.ErrorContains(t, err, "no receivers available as part of the configuration") }) t.Run("should return nil unable to do something else", func(t *testing.T) { @@ -106,7 +115,8 @@ func TestDesiredRoutes(t *testing.T) { }, } - routes := Routes(params) + routes, err := Routes(params) + assert.NoError(t, err) got := routes[0] assert.NotEqual(t, &routev1.Route{ @@ -154,7 +164,8 @@ func TestDesiredRoutes(t *testing.T) { }, } - routes := Routes(params) + routes, err := Routes(params) + assert.NoError(t, err) require.Equal(t, 3, len(routes)) assert.Equal(t, "web.example.com", routes[0].Spec.Host) assert.Equal(t, "otlp-grpc.example.com", routes[1].Spec.Host) @@ -174,7 +185,8 @@ func TestDesiredRoutes(t *testing.T) { }, } - routes := Routes(params) + routes, err := Routes(params) + assert.NoError(t, err) require.Equal(t, 3, len(routes)) assert.Equal(t, "", routes[0].Spec.Host) assert.Equal(t, "", routes[1].Spec.Host) @@ -185,13 +197,15 @@ func TestDesiredRoutes(t *testing.T) { func TestRoutes(t *testing.T) { t.Run("wrong mode", func(t *testing.T) { params := deploymentParams() - routes := Routes(params) + routes, err := Routes(params) + assert.NoError(t, err) assert.Nil(t, routes) }) t.Run("supported mode and service exists", func(t *testing.T) { params := deploymentParams() - routes := Routes(params) + routes, err := Routes(params) + assert.NoError(t, err) assert.Nil(t, routes) }) diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 1ddd1ce13..5b23888fb 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -35,10 +35,10 @@ const ( headlessExists = "Exists" ) -func HeadlessService(params manifests.Params) *corev1.Service { - h := Service(params) - if h == nil { - return h +func HeadlessService(params manifests.Params) (*corev1.Service, error) { + h, err := Service(params) + if h == nil || err != nil { + return h, err } h.Name = naming.HeadlessService(params.OtelCol.Name) @@ -54,24 +54,22 @@ func HeadlessService(params manifests.Params) *corev1.Service { h.Annotations = annotations h.Spec.ClusterIP = "None" - return h + return h, nil } -func MonitoringService(params manifests.Params) *corev1.Service { +func MonitoringService(params manifests.Params) (*corev1.Service, error) { name := naming.MonitoringService(params.OtelCol.Name) labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) c, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) - // TODO: Update this to properly return an error https://github.com/open-telemetry/opentelemetry-operator/issues/1972 if err != nil { params.Log.Error(err, "couldn't extract the configuration") - return nil + return nil, err } metricsPort, err := adapters.ConfigToMetricsPort(params.Log, c) if err != nil { - params.Log.V(2).Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) - metricsPort = 8888 + return nil, err } return &corev1.Service{ @@ -89,20 +87,23 @@ func MonitoringService(params manifests.Params) *corev1.Service { Port: metricsPort, }}, }, - } + }, nil } -func Service(params manifests.Params) *corev1.Service { +func Service(params manifests.Params) (*corev1.Service, error) { name := naming.Service(params.OtelCol.Name) labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) configFromString, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) if err != nil { params.Log.Error(err, "couldn't extract the configuration from the context") - return nil + return nil, err } - ports := adapters.ConfigToPorts(params.Log, configFromString) + ports, err := adapters.ConfigToPorts(params.Log, configFromString) + if err != nil { + return nil, err + } // set appProtocol to h2c for grpc ports on OpenShift. // OpenShift uses HA proxy that uses appProtocol for its configuration. @@ -134,8 +135,9 @@ func Service(params manifests.Params) *corev1.Service { // if we have no ports, we don't need a service if len(ports) == 0 { + params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.OtelCol.Name, "instance.namespace", params.OtelCol.Namespace) - return nil + return nil, err } trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster @@ -156,7 +158,7 @@ func Service(params manifests.Params) *corev1.Service { ClusterIP: "", Ports: ports, }, - } + }, nil } func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index a3a298b6f..37bd668e8 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -107,7 +107,8 @@ func TestDesiredService(t *testing.T) { }, } - actual := Service(params) + actual, err := Service(params) + assert.ErrorContains(t, err, "no enabled receivers available as part of the configuration") assert.Nil(t, actual) }) @@ -123,8 +124,9 @@ func TestDesiredService(t *testing.T) { params := deploymentParams() ports := append(params.OtelCol.Spec.Ports, jaegerPorts) expected := service("test-collector", ports) - actual := Service(params) + actual, err := Service(params) + assert.NoError(t, err) assert.Equal(t, expected, *actual) }) @@ -139,12 +141,15 @@ func TestDesiredService(t *testing.T) { } params := deploymentParams() + params.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - actual := Service(params) + actual, err := Service(params) ports := append(params.OtelCol.Spec.Ports, jaegerPort) expected := service("test-collector", ports) + assert.NoError(t, err) assert.Equal(t, expected, *actual) + }) t.Run("should return service with local internal traffic policy", func(t *testing.T) { @@ -159,16 +164,34 @@ func TestDesiredService(t *testing.T) { p := paramsWithMode(v1alpha1.ModeDaemonSet) ports := append(p.OtelCol.Spec.Ports, jaegerPorts) expected := serviceWithInternalTrafficPolicy("test-collector", ports, v1.ServiceInternalTrafficPolicyLocal) - actual := Service(p) + + actual, err := Service(p) + assert.NoError(t, err) assert.Equal(t, expected, *actual) }) + + t.Run("should return nil unable to parse config", func(t *testing.T) { + params := manifests.Params{ + Config: config.Config{}, + Log: logger, + OtelCol: v1alpha1.OpenTelemetryCollector{ + Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `!!!`}, + }, + } + + actual, err := Service(params) + assert.ErrorContains(t, err, "couldn't parse the opentelemetry-collector configuration") + assert.Nil(t, actual) + + }) } func TestHeadlessService(t *testing.T) { t.Run("should return headless service", func(t *testing.T) { param := deploymentParams() - actual := HeadlessService(param) + actual, err := HeadlessService(param) + assert.NoError(t, err) assert.Equal(t, actual.GetAnnotations()["service.beta.openshift.io/serving-cert-secret-name"], "test-collector-headless-tls") assert.Equal(t, actual.Spec.ClusterIP, "None") }) @@ -181,7 +204,10 @@ func TestMonitoringService(t *testing.T) { Port: 8888, }} param := deploymentParams() - actual := MonitoringService(param) + + actual, err := MonitoringService(param) + assert.NoError(t, err) + assert.Equal(t, expected, actual.Spec.Ports) }) @@ -196,7 +222,10 @@ func TestMonitoringService(t *testing.T) { metrics: level: detailed address: 0.0.0.0:9090` - actual := MonitoringService(params) + + actual, err := MonitoringService(params) + assert.NoError(t, err) + assert.NotNil(t, actual) assert.Equal(t, expected, actual.Spec.Ports) }) diff --git a/internal/manifests/collector/testdata/ingress_testdata.yaml b/internal/manifests/collector/testdata/ingress_testdata.yaml index 54f9342a7..715d16520 100644 --- a/internal/manifests/collector/testdata/ingress_testdata.yaml +++ b/internal/manifests/collector/testdata/ingress_testdata.yaml @@ -8,6 +8,9 @@ receivers: protocols: grpc: endpoint: 0.0.0.0:98765 +exporters: + logging: + loglevel: debug service: pipelines: diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index 90fea4528..def82aa88 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -24,7 +24,7 @@ import ( ) // Deployment builds the deployment for the given instance. -func Deployment(params manifests.Params) *appsv1.Deployment { +func Deployment(params manifests.Params) (*appsv1.Deployment, error) { name := naming.TargetAllocator(params.OtelCol.Name) labels := Labels(params.OtelCol, name) @@ -62,5 +62,5 @@ func Deployment(params manifests.Params) *appsv1.Deployment { }, }, }, - } + }, nil } diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index 9767ca681..6ed9eebdf 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -79,7 +79,9 @@ func TestDeploymentNewDefault(t *testing.T) { } // test - d := Deployment(params) + d, err := Deployment(params) + + assert.NoError(t, err) // verify assert.Equal(t, "my-instance-targetallocator", d.GetName()) @@ -109,8 +111,8 @@ func TestDeploymentPodAnnotations(t *testing.T) { } // test - ds := Deployment(params) - + ds, err := Deployment(params) + assert.NoError(t, err) // verify assert.Equal(t, "my-instance-targetallocator", ds.Name) assert.Subset(t, ds.Spec.Template.Annotations, testPodAnnotationValues) @@ -148,7 +150,8 @@ func TestDeploymentNodeSelector(t *testing.T) { Config: cfg, Log: logger, } - d1 := Deployment(params1) + d1, err := Deployment(params1) + assert.NoError(t, err) assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector @@ -173,7 +176,8 @@ func TestDeploymentNodeSelector(t *testing.T) { Log: logger, } - d2 := Deployment(params2) + d2, err := Deployment(params2) + assert.NoError(t, err) assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) } func TestDeploymentAffinity(t *testing.T) { @@ -191,7 +195,8 @@ func TestDeploymentAffinity(t *testing.T) { Config: cfg, Log: logger, } - d1 := Deployment(params1) + d1, err := Deployment(params1) + assert.NoError(t, err) assert.Empty(t, d1.Spec.Template.Spec.Affinity) // Test affinity @@ -214,7 +219,8 @@ func TestDeploymentAffinity(t *testing.T) { Log: logger, } - d2 := Deployment(params2) + d2, err := Deployment(params2) + assert.NoError(t, err) assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) } @@ -232,7 +238,8 @@ func TestDeploymentTolerations(t *testing.T) { Config: cfg, Log: logger, } - d1 := Deployment(params1) + d1, err := Deployment(params1) + assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", d1.Name) assert.Empty(t, d1.Spec.Template.Spec.Tolerations) @@ -253,7 +260,8 @@ func TestDeploymentTolerations(t *testing.T) { Config: cfg, Log: logger, } - d2 := Deployment(params2) + d2, err := Deployment(params2) + assert.NoError(t, err) assert.Equal(t, "my-instance-toleration-targetallocator", d2.Name) assert.NotNil(t, d2.Spec.Template.Spec.Tolerations) assert.NotEmpty(t, d2.Spec.Template.Spec.Tolerations) @@ -275,7 +283,8 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { Config: cfg, Log: logger, } - d1 := Deployment(params1) + d1, err := Deployment(params1) + assert.NoError(t, err) assert.Equal(t, "my-instance-targetallocator", d1.Name) assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) @@ -298,7 +307,8 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { Log: logger, } - d2 := Deployment(params2) + d2, err := Deployment(params2) + assert.NoError(t, err) assert.Equal(t, "my-instance-topologyspreadconstraint-targetallocator", d2.Name) assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 2b2e14e1c..aa2535b65 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -28,7 +28,7 @@ func Build(params manifests.Params) ([]client.Object, error) { } resourceFactories := []manifests.K8sManifestFactory{ manifests.Factory(ConfigMap), - manifests.FactoryWithoutError(Deployment), + manifests.Factory(Deployment), manifests.FactoryWithoutError(ServiceAccount), manifests.FactoryWithoutError(Service), } diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go index a7cf081f7..de998a6e8 100644 --- a/pkg/collector/reconcile/route.go +++ b/pkg/collector/reconcile/route.go @@ -46,9 +46,13 @@ func Routes(ctx context.Context, params manifests.Params) error { var desired []*routev1.Route if isSupportedMode { - if r := collector.Routes(params); r != nil { + r, err := collector.Routes(params) + if r != nil { desired = append(desired, r...) } + if err != nil { + return err + } } // first, handle the create/update parts diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go index 3d305ee2b..9d1b8787d 100644 --- a/pkg/collector/reconcile/route_test.go +++ b/pkg/collector/reconcile/route_test.go @@ -40,7 +40,9 @@ func TestExpectedRoutes(t *testing.T) { params.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute params.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - routes := collector.Routes(params) + var routes []*routev1.Route + routes, err = collector.Routes(params) + assert.NoError(t, err) err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) @@ -54,7 +56,8 @@ func TestExpectedRoutes(t *testing.T) { params.OtelCol.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} params.OtelCol.Spec.Ingress.Hostname = expectHostname - routes = collector.Routes(params) + routes, err = collector.Routes(params) + assert.NoError(t, err) err = expectedRoutes(ctx, params, routes) assert.NoError(t, err) @@ -84,7 +87,9 @@ func TestDeleteRoutes(t *testing.T) { } myParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - routes := collector.Routes(myParams) + var routes []*routev1.Route + routes, err = collector.Routes(myParams) + assert.NoError(t, err) err = expectedRoutes(ctx, myParams, routes) assert.NoError(t, err) diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index 265bef8f7..a6d6070f7 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -52,6 +52,13 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { Namespace: "some-app", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Ports: []corev1.ServicePort{ + { + Name: "metrics", + Port: 8888, + Protocol: corev1.ProtocolTCP, + }, + }, InitContainers: []corev1.Container{ { Name: "test", From abaec7a7d99df19a3a034c5f2d4bb0af56eb8383 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Tue, 28 Nov 2023 17:56:36 -0500 Subject: [PATCH 1171/1234] [Target Allocator] Minor docs fix (#2400) * minor docs fix * remove chlog --- cmd/otel-allocator/allocation/least_weighted.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go index c6b27fe1f..6ae9c5eb2 100644 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ b/cmd/otel-allocator/allocation/least_weighted.go @@ -29,9 +29,9 @@ var _ Allocator = &leastWeightedAllocator{} const leastWeightedStrategyName = "least-weighted" /* - Load balancer will serve on an HTTP server exposing /jobs//targets + Target Allocator will serve on an HTTP server exposing /jobs//targets The targets are allocated using the least connection method - Load balancer will need information about the collectors in order to set the URLs + Target Allocator will need information about the collectors in order to set the URLs Keep a Map of what each collector currently holds and update it based on new scrape target updates */ From 3e1a91f6191d98bfe3492f04442ab4a9e84275d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 29 Nov 2023 11:32:27 +0100 Subject: [PATCH 1172/1234] Use only target address for allocation in consistent-hashing strategy (#2290) Co-authored-by: Jacob Aronoff --- .chloggen/ta_really-consistent-hashing.yaml | 16 ++++++++++++++++ cmd/otel-allocator/allocation/allocatortest.go | 4 ++-- .../allocation/consistent_hashing.go | 3 ++- .../allocation/consistent_hashing_test.go | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 .chloggen/ta_really-consistent-hashing.yaml diff --git a/.chloggen/ta_really-consistent-hashing.yaml b/.chloggen/ta_really-consistent-hashing.yaml new file mode 100755 index 000000000..c95cb800a --- /dev/null +++ b/.chloggen/ta_really-consistent-hashing.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Use only target address for allocation in consistent-hashing strategy + +# One or more tracking issues related to the change +issues: [2280] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/otel-allocator/allocation/allocatortest.go b/cmd/otel-allocator/allocation/allocatortest.go index 23196ae5a..88312a80a 100644 --- a/cmd/otel-allocator/allocation/allocatortest.go +++ b/cmd/otel-allocator/allocation/allocatortest.go @@ -39,7 +39,7 @@ func MakeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*ta "i": model.LabelValue(strconv.Itoa(i)), "total": model.LabelValue(strconv.Itoa(n + startingIndex)), } - newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, collector) + newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, collector) toReturn[newTarget.Hash()] = newTarget } return toReturn @@ -64,7 +64,7 @@ func MakeNNewTargetsWithEmptyCollectors(n int, startingIndex int) map[string]*ta "i": model.LabelValue(strconv.Itoa(i)), "total": model.LabelValue(strconv.Itoa(n + startingIndex)), } - newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), "test-url", label, "") + newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, "") toReturn[newTarget.Hash()] = newTarget } return toReturn diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go index c45506373..d98aca72f 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ b/cmd/otel-allocator/allocation/consistent_hashing.go @@ -15,6 +15,7 @@ package allocation import ( + "strings" "sync" "github.com/buraksezer/consistent" @@ -111,7 +112,7 @@ func (c *consistentHashingAllocator) addTargetToTargetItems(tg *target.Item) { delete(c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName], tg.Hash()) TargetsPerCollector.WithLabelValues(previousColName.String(), consistentHashingStrategyName).Set(float64(c.collectors[previousColName.String()].NumTargets)) } - colOwner := c.consistentHasher.LocateKey([]byte(tg.Hash())) + colOwner := c.consistentHasher.LocateKey([]byte(strings.Join(tg.TargetURL, ""))) tg.CollectorName = colOwner.String() c.targetItems[tg.Hash()] = tg c.addCollectorTargetItemMapping(tg) diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go index eb8c4894d..bbd429520 100644 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ b/cmd/otel-allocator/allocation/consistent_hashing_test.go @@ -28,7 +28,7 @@ func TestCanSetSingleTarget(t *testing.T) { actualTargetItems := c.TargetItems() assert.Len(t, actualTargetItems, 1) for _, item := range actualTargetItems { - assert.Equal(t, "collector-2", item.CollectorName) + assert.Equal(t, "collector-0", item.CollectorName) } } From 7ae142059711288ae8ff358bef1f51609c754a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Wed, 29 Nov 2023 13:32:09 +0100 Subject: [PATCH 1173/1234] [target-allocator] Exit on invalid config (#1767) --- cmd/otel-allocator/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index 5167e0a94..b89824503 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -74,6 +74,7 @@ func main() { if validationErr := config.ValidateConfig(cfg); validationErr != nil { setupLog.Error(validationErr, "Invalid configuration") + os.Exit(1) } cfg.RootLogger.Info("Starting the Target Allocator") From 4fa742a27142ac9f822c8ced7e10a43d2cc2a376 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Wed, 29 Nov 2023 20:32:50 +0800 Subject: [PATCH 1174/1234] add docker prerequisites (#2402) --- CONTRIBUTING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed869bb3f..1832352fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,7 @@ gh pr create * Install [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/). * Install [Operator SDK](https://sdk.operatorframework.io/docs/installation/). * Have a Kubernetes cluster ready for development. We recommend `minikube` or `kind`. +* Docker version 23.0.0 or greater. ### Adding new components - webhook, API From 46495fdc6cf32412176f6ca92f72dd259da5cb32 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 29 Nov 2023 13:09:19 -0500 Subject: [PATCH 1175/1234] Remove old autodetection for openshift routes, cleanup (#2398) * remove old autodetection, cleanup * remove unused --- .chloggen/migrate-route-reconcilation.yaml | 16 + controllers/opampbridge_controller_test.go | 6 +- .../opentelemetrycollector_controller.go | 94 ------ .../opentelemetrycollector_controller_test.go | 132 -------- controllers/reconcile_test.go | 42 +++ controllers/suite_test.go | 24 +- {pkg => internal}/autodetect/main.go | 12 +- {pkg => internal}/autodetect/main_test.go | 9 +- .../openshift/routes.go} | 33 +- internal/config/change_handler.go | 63 ---- internal/config/main.go | 86 +---- internal/config/main_test.go | 57 +--- internal/config/options.go | 33 +- internal/manifests/collector/route.go | 3 +- internal/manifests/collector/suite_test.go | 7 +- main.go | 15 +- pkg/autodetect/openshiftroutes.go | 31 -- pkg/collector/reconcile/route.go | 156 --------- pkg/collector/reconcile/route_test.go | 111 ------- pkg/collector/reconcile/suit_test.go | 301 ------------------ .../reconcile/testdata/ingress_testdata.yaml | 16 - pkg/collector/reconcile/testdata/test.yaml | 22 -- 22 files changed, 151 insertions(+), 1118 deletions(-) create mode 100755 .chloggen/migrate-route-reconcilation.yaml delete mode 100644 controllers/opentelemetrycollector_controller_test.go rename {pkg => internal}/autodetect/main.go (82%) rename {pkg => internal}/autodetect/main_test.go (86%) rename internal/{config/change_handler_test.go => autodetect/openshift/routes.go} (56%) delete mode 100644 internal/config/change_handler.go delete mode 100644 pkg/autodetect/openshiftroutes.go delete mode 100644 pkg/collector/reconcile/route.go delete mode 100644 pkg/collector/reconcile/route_test.go delete mode 100644 pkg/collector/reconcile/suit_test.go delete mode 100644 pkg/collector/reconcile/testdata/ingress_testdata.yaml delete mode 100644 pkg/collector/reconcile/testdata/test.yaml diff --git a/.chloggen/migrate-route-reconcilation.yaml b/.chloggen/migrate-route-reconcilation.yaml new file mode 100755 index 000000000..a710be5be --- /dev/null +++ b/.chloggen/migrate-route-reconcilation.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: removes the old way of running autodetection for openshift routes being available + +# One or more tracking issues related to the change +issues: [2108] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go index 8ce76a35d..127fddc14 100644 --- a/controllers/opampbridge_controller_test.go +++ b/controllers/opampbridge_controller_test.go @@ -35,14 +35,14 @@ import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) var opampBridgeLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") var opampBridgeMockAutoDetector = &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { - return autodetect.OpenShiftRoutesAvailable, nil + OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { + return openshift.RoutesAvailable, nil }, } diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 2ceeaac60..6c7b6c742 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -17,8 +17,6 @@ package controllers import ( "context" - "fmt" - "sync" "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -36,8 +34,6 @@ import ( "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" collectorStatus "github.com/open-telemetry/opentelemetry-operator/internal/status/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/reconcile" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) @@ -48,16 +44,6 @@ type OpenTelemetryCollectorReconciler struct { scheme *runtime.Scheme log logr.Logger config config.Config - - tasks []Task - muTasks sync.RWMutex -} - -// Task represents a reconciliation task to be executed by the reconciler. -type Task struct { - Do func(context.Context, manifests.Params) error - Name string - BailOnError bool } // Params is the set of options to build a new OpenTelemetryCollectorReconciler. @@ -66,55 +52,9 @@ type Params struct { Recorder record.EventRecorder Scheme *runtime.Scheme Log logr.Logger - Tasks []Task Config config.Config } -func (r *OpenTelemetryCollectorReconciler) onOpenShiftRoutesChange() error { - plt := r.config.OpenShiftRoutes() - var ( - routesIdx = -1 - ) - r.muTasks.Lock() - for i, t := range r.tasks { - // search for route reconciler - switch t.Name { - case "routes": - routesIdx = i - } - } - r.muTasks.Unlock() - - if err := r.addRouteTask(plt, routesIdx); err != nil { - return err - } - - return r.removeRouteTask(plt, routesIdx) -} - -func (r *OpenTelemetryCollectorReconciler) addRouteTask(ora autodetect.OpenShiftRoutesAvailability, routesIdx int) error { - r.muTasks.Lock() - defer r.muTasks.Unlock() - // if exists and openshift routes are available - if routesIdx == -1 && ora == autodetect.OpenShiftRoutesAvailable { - r.tasks = append([]Task{{reconcile.Routes, "routes", true}}, r.tasks...) - } - return nil -} - -func (r *OpenTelemetryCollectorReconciler) removeRouteTask(ora autodetect.OpenShiftRoutesAvailability, routesIdx int) error { - r.muTasks.Lock() - defer r.muTasks.Unlock() - if len(r.tasks) < routesIdx { - return fmt.Errorf("can not remove route task from reconciler") - } - // if exists and openshift routes are not available - if routesIdx != -1 && ora == autodetect.OpenShiftRoutesNotAvailable { - r.tasks = append(r.tasks[:routesIdx], r.tasks[routesIdx+1:]...) - } - return nil -} - func (r *OpenTelemetryCollectorReconciler) getParams(instance v1alpha1.OpenTelemetryCollector) manifests.Params { return manifests.Params{ Config: r.config, @@ -133,15 +73,8 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { log: p.Log, scheme: p.Scheme, config: p.Config, - tasks: p.Tasks, recorder: p.Recorder, } - - if len(r.tasks) == 0 { - // TODO: put this in line with the rest of how we generate manifests - // https://github.com/open-telemetry/opentelemetry-operator/issues/2108 - r.config.RegisterOpenShiftRoutesChangeCallback(r.onOpenShiftRoutesChange) - } return r } @@ -185,9 +118,6 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct } params := r.getParams(instance) - if err := r.RunTasks(ctx, params); err != nil { - return ctrl.Result{}, err - } desiredObjects, buildErr := BuildCollector(params) if buildErr != nil { @@ -197,32 +127,8 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct return collectorStatus.HandleReconcileStatus(ctx, log, params, err) } -// RunTasks runs all the tasks associated with this reconciler. -func (r *OpenTelemetryCollectorReconciler) RunTasks(ctx context.Context, params manifests.Params) error { - r.muTasks.RLock() - defer r.muTasks.RUnlock() - for _, task := range r.tasks { - if err := task.Do(ctx, params); err != nil { - // If we get an error that occurs because a pod is being terminated, then exit this loop - if apierrors.IsForbidden(err) && apierrors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { - r.log.V(2).Info("Exiting reconcile loop because namespace is being terminated", "namespace", params.OtelCol.Namespace) - return nil - } - r.log.Error(err, fmt.Sprintf("failed to reconcile %s", task.Name)) - if task.BailOnError { - return err - } - } - } - return nil -} - // SetupWithManager tells the manager what our controller is interested in. func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { - err := r.config.AutoDetect() // We need to call this, so we can get the correct autodetect version - if err != nil { - return err - } builder := ctrl.NewControllerManagedBy(mgr). For(&v1alpha1.OpenTelemetryCollector{}). Owns(&corev1.ConfigMap{}). diff --git a/controllers/opentelemetrycollector_controller_test.go b/controllers/opentelemetrycollector_controller_test.go deleted file mode 100644 index 20894d167..000000000 --- a/controllers/opentelemetrycollector_controller_test.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package controllers_test - -import ( - "context" - "errors" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/types" - "k8s.io/kubectl/pkg/scheme" - k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/manager" - k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/open-telemetry/opentelemetry-operator/controllers" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" -) - -var logger = logf.Log.WithName("unit-tests") -var mockAutoDetector = &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { - return autodetect.OpenShiftRoutesAvailable, nil - }, -} - -func TestContinueOnRecoverableFailure(t *testing.T) { - // prepare - taskCalled := false - reconciler := controllers.NewReconciler(controllers.Params{ - Log: logger, - Tasks: []controllers.Task{ - { - Name: "should-fail", - Do: func(context.Context, manifests.Params) error { - return errors.New("should fail") - }, - BailOnError: false, - }, - { - Name: "should-be-called", - Do: func(context.Context, manifests.Params) error { - taskCalled = true - return nil - }, - }, - }, - }) - - // test - err := reconciler.RunTasks(context.Background(), manifests.Params{}) - - // verify - assert.NoError(t, err) - assert.True(t, taskCalled) -} - -func TestSkipWhenInstanceDoesNotExist(t *testing.T) { - // prepare - cfg := config.New() - nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: scheme.Scheme, - Config: cfg, - Tasks: []controllers.Task{ - { - Name: "should-not-be-called", - Do: func(context.Context, manifests.Params) error { - assert.Fail(t, "should not have been called") - return nil - }, - }, - }, - }) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err := reconciler.Reconcile(context.Background(), req) - - // verify - assert.NoError(t, err) -} - -func TestRegisterWithManager(t *testing.T) { - t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") - - // prepare - mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) - require.NoError(t, err) - - reconciler := controllers.NewReconciler(controllers.Params{}) - - // test - err = reconciler.SetupWithManager(mgr) - - // verify - assert.NoError(t, err) -} - -var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) - -type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) -} - -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { - if m.OpenShiftRoutesAvailabilityFunc != nil { - return m.OpenShiftRoutesAvailabilityFunc() - } - return autodetect.OpenShiftRoutesNotAvailable, nil -} diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 92410a681..13fe81689 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -31,13 +31,17 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/tools/record" controllerruntime "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" + "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" @@ -530,6 +534,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { Config: config.New( config.WithCollectorImage("default-collector"), config.WithTargetAllocatorImage("default-ta-allocator"), + config.WithOpenShiftRoutesAvailability(openshift.RoutesAvailable), ), }) @@ -749,6 +754,43 @@ func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) { } } +func TestSkipWhenInstanceDoesNotExist(t *testing.T) { + // prepare + cfg := config.New() + nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} + reconciler := controllers.NewReconciler(controllers.Params{ + Client: k8sClient, + Log: logger, + Scheme: scheme.Scheme, + Config: cfg, + }) + + // test + req := k8sreconcile.Request{ + NamespacedName: nsn, + } + _, err := reconciler.Reconcile(context.Background(), req) + + // verify + assert.NoError(t, err) +} + +func TestRegisterWithManager(t *testing.T) { + t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") + + // prepare + mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) + require.NoError(t, err) + + reconciler := controllers.NewReconciler(controllers.Params{}) + + // test + err = reconciler.SetupWithManager(mgr) + + // verify + assert.NoError(t, err) +} + func namespacedObjectName(name string, namespace string) types.NamespacedName { return types.NamespacedName{ Namespace: namespace, diff --git a/controllers/suite_test.go b/controllers/suite_test.go index db32785fb..51fe86d5a 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -42,10 +42,13 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" + logf "sigs.k8s.io/controller-runtime/pkg/log" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" @@ -60,8 +63,14 @@ var ( cancel context.CancelFunc err error cfg *rest.Config + logger = logf.Log.WithName("unit-tests") - instanceUID = uuid.NewUUID() + instanceUID = uuid.NewUUID() + mockAutoDetector = &mockAutoDetect{ + OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { + return openshift.RoutesAvailable, nil + }, + } ) const ( @@ -73,6 +82,19 @@ const ( testFileIngress = "testdata/ingress_testdata.yaml" ) +var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) + +type mockAutoDetect struct { + OpenShiftRoutesAvailabilityFunc func() (openshift.RoutesAvailability, error) +} + +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { + if m.OpenShiftRoutesAvailabilityFunc != nil { + return m.OpenShiftRoutesAvailabilityFunc() + } + return openshift.RoutesNotAvailable, nil +} + func TestMain(m *testing.M) { ctx, cancel = context.WithCancel(context.TODO()) defer cancel() diff --git a/pkg/autodetect/main.go b/internal/autodetect/main.go similarity index 82% rename from pkg/autodetect/main.go rename to internal/autodetect/main.go index d12d19b29..fb71adaa3 100644 --- a/pkg/autodetect/main.go +++ b/internal/autodetect/main.go @@ -18,13 +18,15 @@ package autodetect import ( "k8s.io/client-go/discovery" "k8s.io/client-go/rest" + + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" ) var _ AutoDetect = (*autoDetect)(nil) // AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. type AutoDetect interface { - OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, error) + OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) } type autoDetect struct { @@ -47,18 +49,18 @@ func New(restConfig *rest.Config) (AutoDetect, error) { } // OpenShiftRoutesAvailability checks if OpenShift Route are available. -func (a *autoDetect) OpenShiftRoutesAvailability() (OpenShiftRoutesAvailability, error) { +func (a *autoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { apiList, err := a.dcl.ServerGroups() if err != nil { - return OpenShiftRoutesNotAvailable, err + return openshift.RoutesNotAvailable, err } apiGroups := apiList.Groups for i := 0; i < len(apiGroups); i++ { if apiGroups[i].Name == "route.openshift.io" { - return OpenShiftRoutesAvailable, nil + return openshift.RoutesAvailable, nil } } - return OpenShiftRoutesNotAvailable, nil + return openshift.RoutesNotAvailable, nil } diff --git a/pkg/autodetect/main_test.go b/internal/autodetect/main_test.go similarity index 86% rename from pkg/autodetect/main_test.go rename to internal/autodetect/main_test.go index 18a9640f0..6c18eee59 100644 --- a/pkg/autodetect/main_test.go +++ b/internal/autodetect/main_test.go @@ -25,17 +25,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" ) func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { for _, tt := range []struct { apiGroupList *metav1.APIGroupList - expected autodetect.OpenShiftRoutesAvailability + expected openshift.RoutesAvailability }{ { &metav1.APIGroupList{}, - autodetect.OpenShiftRoutesNotAvailable, + openshift.RoutesNotAvailable, }, { &metav1.APIGroupList{ @@ -45,7 +46,7 @@ func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { }, }, }, - autodetect.OpenShiftRoutesAvailable, + openshift.RoutesAvailable, }, } { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { diff --git a/internal/config/change_handler_test.go b/internal/autodetect/openshift/routes.go similarity index 56% rename from internal/config/change_handler_test.go rename to internal/autodetect/openshift/routes.go index 069ffa3f8..1872b9ba1 100644 --- a/internal/config/change_handler_test.go +++ b/internal/autodetect/openshift/routes.go @@ -12,30 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package config contains the operator's runtime configuration. -package config +package openshift -import ( - "testing" +// RoutesAvailability holds the auto-detected OpenShift Routes availability API. +type RoutesAvailability int - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestChangeHandler(t *testing.T) { - // prepare - internal := 0 - callback := func() error { - internal += 1 - return nil - } - h := newOnChange() +const ( + // RoutesAvailable represents the route.openshift.io API is available. + RoutesAvailable RoutesAvailability = iota - h.Register(callback) + // RoutesNotAvailable represents the route.openshift.io API is not available. + RoutesNotAvailable +) - for i := 0; i < 5; i++ { - assert.Equal(t, i, internal) - require.NoError(t, h.Do()) - assert.Equal(t, i+1, internal) - } +func (p RoutesAvailability) String() string { + return [...]string{"Available", "NotAvailable"}[p] } diff --git a/internal/config/change_handler.go b/internal/config/change_handler.go deleted file mode 100644 index 46646c712..000000000 --- a/internal/config/change_handler.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package config contains the operator's runtime configuration. -package config - -import ( - "sync" - - "github.com/go-logr/logr" - logf "sigs.k8s.io/controller-runtime/pkg/log" -) - -// changeHandler is implemented by any structure that is able to register callbacks -// and call them using one single method. -type changeHandler interface { - // Do will call every registered callback. - Do() error - // Register this function as a callback that will be executed when Do() is called. - Register(f func() error) -} - -// newOnChange returns a thread-safe ChangeHandler. -func newOnChange() changeHandler { - return &onChange{ - logger: logf.Log.WithName("change-handler"), - } -} - -type onChange struct { - logger logr.Logger - - callbacks []func() error - muCallbacks sync.Mutex -} - -func (o *onChange) Do() error { - o.muCallbacks.Lock() - defer o.muCallbacks.Unlock() - for _, fn := range o.callbacks { - if err := fn(); err != nil { - o.logger.Error(err, "change callback failed") - } - } - return nil -} - -func (o *onChange) Register(f func() error) { - o.muCallbacks.Lock() - defer o.muCallbacks.Unlock() - o.callbacks = append(o.callbacks, f) -} diff --git a/internal/config/main.go b/internal/config/main.go index 708bf11a2..8c16226d6 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -16,14 +16,14 @@ package config import ( - "sync" "time" "github.com/go-logr/logr" logf "sigs.k8s.io/controller-runtime/pkg/log" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) const ( @@ -50,24 +50,20 @@ type Config struct { operatorOpAMPBridgeConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string - onOpenShiftRoutesChange changeHandler + openshiftRoutesAvailability openshift.RoutesAvailability labelsFilter []string - openshiftRoutes openshiftRoutesStore - autoDetectFrequency time.Duration } // New constructs a new configuration based on the given options. func New(opts ...Option) Config { // initialize with the default values o := options{ - autoDetectFrequency: defaultAutoDetectFrequency, + openshiftRoutesAvailability: openshift.RoutesNotAvailable, collectorConfigMapEntry: defaultCollectorConfigMapEntry, targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, operatorOpAMPBridgeConfigMapEntry: defaultOperatorOpAMPBridgeConfigMapEntry, logger: logf.Log.WithName("config"), - openshiftRoutes: newOpenShiftRoutesWrapper(), version: version.Get(), - onOpenShiftRoutesChange: newOnChange(), } for _, opt := range opts { opt(&o) @@ -75,7 +71,6 @@ func New(opts ...Option) Config { return Config{ autoDetect: o.autoDetect, - autoDetectFrequency: o.autoDetectFrequency, collectorImage: o.collectorImage, collectorConfigMapEntry: o.collectorConfigMapEntry, targetAllocatorImage: o.targetAllocatorImage, @@ -83,8 +78,7 @@ func New(opts ...Option) Config { targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, operatorOpAMPBridgeConfigMapEntry: o.operatorOpAMPBridgeConfigMapEntry, logger: o.logger, - openshiftRoutes: o.openshiftRoutes, - onOpenShiftRoutesChange: o.onOpenShiftRoutesChange, + openshiftRoutesAvailability: o.openshiftRoutesAvailability, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, @@ -96,25 +90,6 @@ func New(opts ...Option) Config { } } -// StartAutoDetect attempts to automatically detect relevant information for this operator. This will block until the first -// run is executed and will schedule periodic updates. -func (c *Config) StartAutoDetect() error { - err := c.AutoDetect() - go c.periodicAutoDetect() - - return err -} - -func (c *Config) periodicAutoDetect() { - ticker := time.NewTicker(c.autoDetectFrequency) - - for range ticker.C { - if err := c.AutoDetect(); err != nil { - c.logger.Info("auto-detection failed", "error", err) - } - } -} - // AutoDetect attempts to automatically detect relevant information for this operator. func (c *Config) AutoDetect() error { c.logger.V(2).Info("auto-detecting the configuration based on the environment") @@ -123,15 +98,7 @@ func (c *Config) AutoDetect() error { if err != nil { return err } - - if c.openshiftRoutes.Get() != ora { - c.logger.V(1).Info("openshift routes detected", "available", ora) - c.openshiftRoutes.Set(ora) - if err = c.onOpenShiftRoutesChange.Do(); err != nil { - // Don't fail if the callback failed, as auto-detection itself worked. - c.logger.Error(err, "configuration change notification failed for callback") - } - } + c.openshiftRoutesAvailability = ora return nil } @@ -165,9 +132,9 @@ func (c *Config) OperatorOpAMPBridgeConfigMapEntry() string { return c.operatorOpAMPBridgeConfigMapEntry } -// OpenShiftRoutes represents the availability of the OpenShift Routes API. -func (c *Config) OpenShiftRoutes() autodetect.OpenShiftRoutesAvailability { - return c.openshiftRoutes.Get() +// OpenShiftRoutesAvailability represents the availability of the OpenShift Routes API. +func (c *Config) OpenShiftRoutesAvailability() openshift.RoutesAvailability { + return c.openshiftRoutesAvailability } // AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. @@ -209,38 +176,3 @@ func (c *Config) AutoInstrumentationNginxImage() string { func (c *Config) LabelsFilter() []string { return c.labelsFilter } - -// RegisterOpenShiftRoutesChangeCallback registers the given function as a callback that -// is called when the OpenShift Routes detection detects a change. -func (c *Config) RegisterOpenShiftRoutesChangeCallback(f func() error) { - c.onOpenShiftRoutesChange.Register(f) -} - -type openshiftRoutesStore interface { - Set(ora autodetect.OpenShiftRoutesAvailability) - Get() autodetect.OpenShiftRoutesAvailability -} - -func newOpenShiftRoutesWrapper() openshiftRoutesStore { - return &openshiftRoutesWrapper{ - current: autodetect.OpenShiftRoutesNotAvailable, - } -} - -type openshiftRoutesWrapper struct { - mu sync.Mutex - current autodetect.OpenShiftRoutesAvailability -} - -func (p *openshiftRoutesWrapper) Set(ora autodetect.OpenShiftRoutesAvailability) { - p.mu.Lock() - p.current = ora - p.mu.Unlock() -} - -func (p *openshiftRoutesWrapper) Get() autodetect.OpenShiftRoutesAvailability { - p.mu.Lock() - ora := p.current - p.mu.Unlock() - return ora -} diff --git a/internal/config/main_test.go b/internal/config/main_test.go index ddc4aa5c0..44345bdf5 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -15,15 +15,14 @@ package config_test import ( - "sync" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) func TestNewConfig(t *testing.T) { @@ -31,78 +30,46 @@ func TestNewConfig(t *testing.T) { cfg := config.New( config.WithCollectorImage("some-image"), config.WithCollectorConfigMapEntry("some-config.yaml"), - config.WithPlatform(autodetect.OpenShiftRoutesNotAvailable), + config.WithOpenShiftRoutesAvailability(openshift.RoutesAvailable), ) // test assert.Equal(t, "some-image", cfg.CollectorImage()) assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) - assert.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) + assert.Equal(t, openshift.RoutesAvailable, cfg.OpenShiftRoutesAvailability()) } -func TestOnPlatformChangeCallback(t *testing.T) { +func TestConfigChangesOnAutoDetect(t *testing.T) { // prepare - calledBack := false mock := &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { - return autodetect.OpenShiftRoutesAvailable, nil + OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { + return openshift.RoutesAvailable, nil }, } cfg := config.New( config.WithAutoDetect(mock), - config.WithOnOpenShiftRoutesChangeCallback(func() error { - calledBack = true - return nil - }), ) // sanity check - require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) + require.Equal(t, openshift.RoutesNotAvailable, cfg.OpenShiftRoutesAvailability()) // test err := cfg.AutoDetect() require.NoError(t, err) // verify - assert.Equal(t, autodetect.OpenShiftRoutesAvailable, cfg.OpenShiftRoutes()) - assert.True(t, calledBack) -} - -func TestAutoDetectInBackground(t *testing.T) { - // prepare - wg := &sync.WaitGroup{} - wg.Add(1) - mock := &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (autodetect.OpenShiftRoutesAvailability, error) { - wg.Done() - return autodetect.OpenShiftRoutesNotAvailable, nil - }, - } - cfg := config.New( - config.WithAutoDetect(mock), - config.WithAutoDetectFrequency(3*time.Second), - ) - - // sanity check - require.Equal(t, autodetect.OpenShiftRoutesNotAvailable, cfg.OpenShiftRoutes()) - - // test - err := cfg.StartAutoDetect() - require.NoError(t, err) - - // verify - wg.Wait() + assert.Equal(t, openshift.RoutesAvailable, cfg.OpenShiftRoutesAvailability()) } var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (autodetect.OpenShiftRoutesAvailability, error) + OpenShiftRoutesAvailabilityFunc func() (openshift.RoutesAvailability, error) } -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (autodetect.OpenShiftRoutesAvailability, error) { +func (m *mockAutoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { if m.OpenShiftRoutesAvailabilityFunc != nil { return m.OpenShiftRoutesAvailabilityFunc() } - return autodetect.OpenShiftRoutesNotAvailable, nil + return openshift.RoutesNotAvailable, nil } diff --git a/internal/config/options.go b/internal/config/options.go index 5d172ccd6..225692cec 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -17,12 +17,12 @@ package config import ( "regexp" "strings" - "time" "github.com/go-logr/logr" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" ) // Option represents one specific configuration option. @@ -45,10 +45,8 @@ type options struct { operatorOpAMPBridgeConfigMapEntry string targetAllocatorImage string operatorOpAMPBridgeImage string - onOpenShiftRoutesChange changeHandler + openshiftRoutesAvailability openshift.RoutesAvailability labelsFilter []string - openshiftRoutes openshiftRoutesStore - autoDetectFrequency time.Duration } func WithAutoDetect(a autodetect.AutoDetect) Option { @@ -56,11 +54,6 @@ func WithAutoDetect(a autodetect.AutoDetect) Option { o.autoDetect = a } } -func WithAutoDetectFrequency(t time.Duration) Option { - return func(o *options) { - o.autoDetectFrequency = t - } -} func WithTargetAllocatorImage(s string) Option { return func(o *options) { o.targetAllocatorImage = s @@ -96,20 +89,6 @@ func WithLogger(logger logr.Logger) Option { o.logger = logger } } - -func WithOnOpenShiftRoutesChangeCallback(f func() error) Option { - return func(o *options) { - if o.onOpenShiftRoutesChange == nil { - o.onOpenShiftRoutesChange = newOnChange() - } - o.onOpenShiftRoutesChange.Register(f) - } -} -func WithPlatform(ora autodetect.OpenShiftRoutesAvailability) Option { - return func(o *options) { - o.openshiftRoutes.Set(ora) - } -} func WithVersion(v version.Version) Option { return func(o *options) { o.version = v @@ -158,6 +137,12 @@ func WithAutoInstrumentationNginxImage(s string) Option { } } +func WithOpenShiftRoutesAvailability(os openshift.RoutesAvailability) Option { + return func(o *options) { + o.openshiftRoutesAvailability = os + } +} + func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index c5b2877e9..43901e59b 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -22,12 +22,13 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) func Routes(params manifests.Params) ([]*routev1.Route, error) { - if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { + if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute || params.Config.OpenShiftRoutesAvailability() != openshift.RoutesAvailable { return nil, nil } diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index 7b6665aa4..fd5e27585 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -26,6 +26,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) @@ -97,7 +98,11 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) } - cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) + cfg := config.New( + config.WithCollectorImage(defaultCollectorImage), + config.WithTargetAllocatorImage(defaultTaAllocationImage), + config.WithOpenShiftRoutesAvailability(openshift.RoutesAvailable), + ) return manifests.Params{ Config: cfg, diff --git a/main.go b/main.go index 222a9d525..11dd91cb1 100644 --- a/main.go +++ b/main.go @@ -45,10 +45,10 @@ import ( otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/controllers" + "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/version" "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" - "github.com/open-telemetry/opentelemetry-operator/pkg/autodetect" collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation" @@ -186,6 +186,10 @@ func main() { config.WithAutoDetect(ad), config.WithLabelFilters(labelsFilter), ) + err = cfg.AutoDetect() + if err != nil { + setupLog.Error(err, "failed to autodetect config variables") + } watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") if found { @@ -310,15 +314,8 @@ func main() { } func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v version.Version) error { - // run the auto-detect mechanism for the configuration - err := mgr.Add(manager.RunnableFunc(func(_ context.Context) error { - return cfg.StartAutoDetect() - })) - if err != nil { - return fmt.Errorf("failed to start the auto-detect mechanism: %w", err) - } // adds the upgrade mechanism to be executed once the manager is ready - err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { + err := mgr.Add(manager.RunnableFunc(func(c context.Context) error { up := &collectorupgrade.VersionUpgrade{ Log: ctrl.Log.WithName("collector-upgrade"), Version: v, diff --git a/pkg/autodetect/openshiftroutes.go b/pkg/autodetect/openshiftroutes.go deleted file mode 100644 index 19116a003..000000000 --- a/pkg/autodetect/openshiftroutes.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package autodetect is for auto-detecting traits from the environment (APIs, ...). -package autodetect - -// OpenShiftRoutesAvailability holds the auto-detected OpenShift Routes availability API. -type OpenShiftRoutesAvailability int - -const ( - // OpenShiftRoutesAvailable represents the route.openshift.io API is available. - OpenShiftRoutesAvailable OpenShiftRoutesAvailability = iota - - // OpenShiftRoutesNotAvailable represents the route.openshift.io API is not available. - OpenShiftRoutesNotAvailable -) - -func (p OpenShiftRoutesAvailability) String() string { - return [...]string{"Available", "NotAvailable"}[p] -} diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go deleted file mode 100644 index de998a6e8..000000000 --- a/pkg/collector/reconcile/route.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - "fmt" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - routev1 "github.com/openshift/api/route/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -// Routes reconciles the route(s) required for the instance in the current context. -// TODO: This functionality should be put with the rest of reconciliation logic in the mutate.go -// https://github.com/open-telemetry/opentelemetry-operator/issues/2108 -func Routes(ctx context.Context, params manifests.Params) error { - if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { - return nil - } - - isSupportedMode := true - if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { - params.Log.V(3).Info("ingress settings are not supported in sidecar mode") - isSupportedMode = false - } - - var desired []*routev1.Route - if isSupportedMode { - r, err := collector.Routes(params) - if r != nil { - desired = append(desired, r...) - } - if err != nil { - return err - } - } - - // first, handle the create/update parts - if err := expectedRoutes(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected routes: %w", err) - } - - // then, delete the extra objects - if err := deleteRoutes(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the routes to be deleted: %w", err) - } - - return nil -} - -func expectedRoutes(ctx context.Context, params manifests.Params, expected []*routev1.Route) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.OtelCol, desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &routev1.Route{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if err = params.Client.Create(ctx, desired); err != nil { - return fmt.Errorf("failed to create: %w", err) - } - params.Log.V(2).Info("created", "route.name", desired.Name, "route.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - updated.Spec.To = desired.Spec.To - updated.Spec.TLS = desired.Spec.TLS - updated.Spec.Port = desired.Spec.Port - updated.Spec.WildcardPolicy = desired.Spec.WildcardPolicy - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "route.name", desired.Name, "route.namespace", desired.Namespace) - } - return nil -} - -func deleteRoutes(ctx context.Context, params manifests.Params, expected []*routev1.Route) error { - opts := []client.ListOption{ - client.InNamespace(params.OtelCol.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &routev1.RouteList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "route.name", existing.Name, "route.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/route_test.go b/pkg/collector/reconcile/route_test.go deleted file mode 100644 index 9d1b8787d..000000000 --- a/pkg/collector/reconcile/route_test.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package reconcile - -import ( - "context" - _ "embed" - "strings" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - - routev1 "github.com/openshift/api/route/v1" - "github.com/stretchr/testify/assert" - "k8s.io/apimachinery/pkg/types" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -func TestExpectedRoutes(t *testing.T) { - t.Run("should create and update route entry", func(t *testing.T) { - ctx := context.Background() - - params, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - params.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - params.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - - var routes []*routev1.Route - routes, err = collector.Routes(params) - assert.NoError(t, err) - err = expectedRoutes(ctx, params, routes) - assert.NoError(t, err) - - nns := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} - exists, err := populateObjectIfExists(t, &routev1.Route{}, nns) - assert.NoError(t, err) - assert.True(t, exists) - - // update fields - const expectHostname = "something-else.com" - params.OtelCol.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} - params.OtelCol.Spec.Ingress.Hostname = expectHostname - - routes, err = collector.Routes(params) - assert.NoError(t, err) - err = expectedRoutes(ctx, params, routes) - assert.NoError(t, err) - - got := &routev1.Route{} - err = params.Client.Get(ctx, nns, got) - assert.NoError(t, err) - - gotHostname := got.Spec.Host - if !strings.Contains(gotHostname, got.Spec.Host) { - t.Errorf("host name is not up-to-date. expect: %s, got: %s", expectHostname, gotHostname) - } - - if v, ok := got.Annotations["blub"]; !ok || v != "blob" { - t.Error("annotations are not up-to-date. Missing entry or value is invalid.") - } - }) -} - -func TestDeleteRoutes(t *testing.T) { - t.Run("should delete excess routes", func(t *testing.T) { - // create - ctx := context.Background() - - myParams, err := newParams("something:tag", testFileIngress) - if err != nil { - t.Fatal(err) - } - myParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - - var routes []*routev1.Route - routes, err = collector.Routes(myParams) - assert.NoError(t, err) - err = expectedRoutes(ctx, myParams, routes) - assert.NoError(t, err) - - nns := types.NamespacedName{Namespace: "default", Name: "otlp-grpc-test-route"} - exists, err := populateObjectIfExists(t, &routev1.Route{}, nns) - assert.NoError(t, err) - assert.True(t, exists) - - // delete - if err = deleteRoutes(ctx, params(), []*routev1.Route{}); err != nil { - t.Error(err) - } - - // check - exists, err = populateObjectIfExists(t, &routev1.Route{}, nns) - assert.NoError(t, err) - assert.False(t, exists) - }) -} diff --git a/pkg/collector/reconcile/suit_test.go b/pkg/collector/reconcile/suit_test.go deleted file mode 100644 index cfe28fc28..000000000 --- a/pkg/collector/reconcile/suit_test.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO: This file can be deleted when Routes is removed from this package. -// https://github.com/open-telemetry/opentelemetry-operator/issues/2108 -package reconcile - -import ( - "context" - "crypto/tls" - "fmt" - "net" - "os" - "path/filepath" - "sync" - "testing" - "time" - - routev1 "github.com/openshift/api/route/v1" - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/retry" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - "sigs.k8s.io/controller-runtime/pkg/webhook" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" -) - -var ( - k8sClient client.Client - testEnv *envtest.Environment - testScheme *runtime.Scheme = scheme.Scheme - ctx context.Context - cancel context.CancelFunc - - logger = logf.Log.WithName("unit-tests") - - instanceUID = uuid.NewUUID() -) - -const ( - defaultCollectorImage = "default-collector" - defaultTaAllocationImage = "default-ta-allocator" - testFileIngress = "testdata/ingress_testdata.yaml" -) - -func TestMain(m *testing.M) { - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, - CRDInstallOptions: envtest.CRDInstallOptions{ - CRDs: []*apiextensionsv1.CustomResourceDefinition{ - testdata.OpenShiftRouteCRD, - testdata.ServiceMonitorCRD, - }, - }, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, - }, - } - cfg, err := testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err = routev1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - if err = v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - if err = monitoringv1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - LeaderElection: false, - WebhookServer: webhook.NewServer(webhook.Options{ - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - }), - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - }) - if mgrErr != nil { - fmt.Printf("failed to start webhook server: %v", mgrErr) - os.Exit(1) - } - - if err = v1alpha1.SetupCollectorWebhook(mgr, config.New()); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - go func() { - if err = mgr.Start(ctx); err != nil { - fmt.Printf("failed to start manager: %v", err) - os.Exit(1) - } - }() - - // wait for the webhook server to get ready - wg := &sync.WaitGroup{} - wg.Add(1) - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - go func(wg *sync.WaitGroup) { - defer wg.Done() - if err = retry.OnError(wait.Backoff{ - Steps: 20, - Duration: 10 * time.Millisecond, - Factor: 1.5, - Jitter: 0.1, - Cap: time.Second * 30, - }, func(error) bool { - return true - }, func() error { - // #nosec G402 - conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if tlsErr != nil { - return tlsErr - } - _ = conn.Close() - return nil - }); err != nil { - fmt.Printf("failed to wait for webhook server to be ready: %v", err) - os.Exit(1) - } - }(wg) - wg.Wait() - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} - -func params() manifests.Params { - return paramsWithMode(v1alpha1.ModeDeployment) -} - -func paramsWithMode(mode v1alpha1.Mode) manifests.Params { - replicas := int32(2) - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - return manifests.Params{ - Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), - Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - Replicas: &replicas, - Config: string(configYAML), - Mode: mode, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -func newParams(taContainerImage string, file string) (manifests.Params, error) { - replicas := int32(1) - var configYAML []byte - var err error - - if file == "" { - configYAML, err = os.ReadFile("testdata/test.yaml") - } else { - configYAML, err = os.ReadFile(file) - } - if err != nil { - return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) - } - - cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - - return manifests.Params{ - Config: cfg, - Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ - TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Mode: v1alpha1.ModeStatefulSet, - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Image: taContainerImage, - }, - Replicas: &replicas, - Config: string(configYAML), - }, - }, - Scheme: testScheme, - Log: logger, - }, nil -} - -func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { - t.Helper() - err := k8sClient.Get(context.Background(), namespacedName, object) - if errors.IsNotFound(err) { - return false, nil - } - if err != nil { - return false, err - } - return true, nil -} diff --git a/pkg/collector/reconcile/testdata/ingress_testdata.yaml b/pkg/collector/reconcile/testdata/ingress_testdata.yaml deleted file mode 100644 index 54f9342a7..000000000 --- a/pkg/collector/reconcile/testdata/ingress_testdata.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -receivers: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:12345 - otlp/test: - protocols: - grpc: - endpoint: 0.0.0.0:98765 - -service: - pipelines: - traces: - receivers: [otlp, otlp/test] - exporters: [nop] diff --git a/pkg/collector/reconcile/testdata/test.yaml b/pkg/collector/reconcile/testdata/test.yaml deleted file mode 100644 index c79ab5288..000000000 --- a/pkg/collector/reconcile/testdata/test.yaml +++ /dev/null @@ -1,22 +0,0 @@ -processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [debug] \ No newline at end of file From e5f6ebdfb763e30da460ed0c12412d428b9edafe Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Thu, 30 Nov 2023 00:08:34 +0530 Subject: [PATCH 1176/1234] Add e2e test case for OpenTelemetry monitoring. (#2246) --- tests/e2e-openshift/monitoring/00-assert.yaml | 4 + .../monitoring/00-workload-monitoring.yaml | 13 ++ tests/e2e-openshift/monitoring/01-assert.yaml | 111 ++++++++++++++++++ .../monitoring/01-otel-collector.yaml | 24 ++++ tests/e2e-openshift/monitoring/02-assert.yaml | 6 + .../monitoring/02-generate-traces.yaml | 25 ++++ tests/e2e-openshift/monitoring/03-assert.yaml | 5 + .../e2e-openshift/monitoring/check_metrics.sh | 23 ++++ .../check_user_workload_monitoring.sh | 22 ++++ 9 files changed, 233 insertions(+) create mode 100644 tests/e2e-openshift/monitoring/00-assert.yaml create mode 100644 tests/e2e-openshift/monitoring/00-workload-monitoring.yaml create mode 100644 tests/e2e-openshift/monitoring/01-assert.yaml create mode 100644 tests/e2e-openshift/monitoring/01-otel-collector.yaml create mode 100644 tests/e2e-openshift/monitoring/02-assert.yaml create mode 100644 tests/e2e-openshift/monitoring/02-generate-traces.yaml create mode 100644 tests/e2e-openshift/monitoring/03-assert.yaml create mode 100755 tests/e2e-openshift/monitoring/check_metrics.sh create mode 100755 tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/monitoring/00-assert.yaml b/tests/e2e-openshift/monitoring/00-assert.yaml new file mode 100644 index 000000000..f9cbcf22c --- /dev/null +++ b/tests/e2e-openshift/monitoring/00-assert.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +commands: +- script: ./tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml b/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml new file mode 100644 index 000000000..af526ecbe --- /dev/null +++ b/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml @@ -0,0 +1,13 @@ +# oc -n openshift-user-workload-monitoring get pod +# https://docs.openshift.com/container-platform/4.13/monitoring/enabling-monitoring-for-user-defined-projects.html#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects + +apiVersion: v1 +kind: ConfigMap +metadata: + name: cluster-monitoring-config + namespace: openshift-monitoring +data: + config.yaml: | + enableUserWorkload: true + alertmanagerMain: + enableUserAlertmanagerConfig: true diff --git a/tests/e2e-openshift/monitoring/01-assert.yaml b/tests/e2e-openshift/monitoring/01-assert.yaml new file mode 100644 index 000000000..170c0f414 --- /dev/null +++ b/tests/e2e-openshift/monitoring/01-assert.yaml @@ -0,0 +1,111 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + prometheus.io/path: /metrics + prometheus.io/port: "8888" + prometheus.io/scrape: "true" + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector + app.kubernetes.io/part-of: opentelemetry + name: cluster-collector-collector +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector + name: cluster-collector-collector +spec: + endpoints: + - port: monitoring + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector + app.kubernetes.io/part-of: opentelemetry + name: cluster-collector-collector +spec: + ports: + - 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/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector + app.kubernetes.io/part-of: opentelemetry + operator.opentelemetry.io/collector-headless-service: Exists + name: cluster-collector-collector-headless +spec: + ports: + - 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/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: cluster-collector-collector-monitoring + app.kubernetes.io/part-of: opentelemetry + name: cluster-collector-collector-monitoring +spec: + ports: + - name: monitoring + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/part-of: opentelemetry + type: ClusterIP diff --git a/tests/e2e-openshift/monitoring/01-otel-collector.yaml b/tests/e2e-openshift/monitoring/01-otel-collector.yaml new file mode 100644 index 000000000..842087908 --- /dev/null +++ b/tests/e2e-openshift/monitoring/01-otel-collector.yaml @@ -0,0 +1,24 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: cluster-collector +spec: + mode: deployment + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + debug: + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [debug] diff --git a/tests/e2e-openshift/monitoring/02-assert.yaml b/tests/e2e-openshift/monitoring/02-assert.yaml new file mode 100644 index 000000000..701adbdf7 --- /dev/null +++ b/tests/e2e-openshift/monitoring/02-assert.yaml @@ -0,0 +1,6 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +status: + active: 1 diff --git a/tests/e2e-openshift/monitoring/02-generate-traces.yaml b/tests/e2e-openshift/monitoring/02-generate-traces.yaml new file mode 100644 index 000000000..ac16943d4 --- /dev/null +++ b/tests/e2e-openshift/monitoring/02-generate-traces.yaml @@ -0,0 +1,25 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +spec: + completions: 1 + parallelism: 1 + template: + metadata: + labels: + app: telemetrygen-traces + spec: + containers: + - name: telemetrygen-traces + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + command: ["./telemetrygen"] + args: + - "--otlp-endpoint=cluster-collector-collector-headless:4317" + - "--otlp-insecure=true" + - "--rate=1" + - "--duration=5s" + - "--otlp-attributes=telemetrygen=\"traces\"" + - "--otlp-header=telemetrygen=\"traces\"" + - "traces" + restartPolicy: Never diff --git a/tests/e2e-openshift/monitoring/03-assert.yaml b/tests/e2e-openshift/monitoring/03-assert.yaml new file mode 100644 index 000000000..46f97913d --- /dev/null +++ b/tests/e2e-openshift/monitoring/03-assert.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +commands: +- script: ./tests/e2e-openshift/monitoring/check_metrics.sh diff --git a/tests/e2e-openshift/monitoring/check_metrics.sh b/tests/e2e-openshift/monitoring/check_metrics.sh new file mode 100755 index 000000000..fac40fdda --- /dev/null +++ b/tests/e2e-openshift/monitoring/check_metrics.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}') +TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d) +THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host') + +#Check metrics used in the prometheus rules created for TempoStack. Refer issue https://issues.redhat.com/browse/TRACING-3399 for skipped metrics. +metrics="otelcol_exporter_enqueue_failed_spans otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans" + +for metric in $metrics; do + query="$metric" + + response=$(curl -k -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" "https://$THANOS_QUERIER_HOST/api/v1/query?query=$query") + + count=$(echo "$response" | jq -r '.data.result | length') + + if [[ $count -eq 0 ]]; then + echo "No metric '$metric' with value present. Exiting with status 1." + exit 1 + else + echo "Metric '$metric' with value is present." + fi +done diff --git a/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh b/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh new file mode 100755 index 000000000..5ecaebe3d --- /dev/null +++ b/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e + +check_replicas() { + replicas=$(oc get $1 $2 -n openshift-user-workload-monitoring -o 'jsonpath={.status.availableReplicas} {.status.readyReplicas} {.status.replicas}') + for count in $replicas; do + if [[ $count =~ ^[0-9]+$ ]]; then + if ((count < 1)); then + echo "The number of replicas is 0 for $1 $2" + exit 1 + fi + else + echo "Error: Replica count is not a valid number for $1 $2" + exit 1 + fi + done +} + +check_replicas deployment prometheus-operator +check_replicas statefulset prometheus-user-workload +check_replicas statefulset thanos-ruler-user-workload From 7c8a107d173f55de40cf4cd399021e8c3bc560d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:47:06 +0100 Subject: [PATCH 1177/1234] Bump the prometheus group with 1 update (#2406) Bumps the prometheus group with 1 update: [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator). - [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases) - [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.69.1...v0.70.0) --- updated-dependencies: - dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring dependency-type: direct:production update-type: version-update:semver-minor dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 18 +++++++++--------- go.sum | 37 ++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index 1b7842fab..96eaaa871 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 github.com/prometheus/prometheus v0.48.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 @@ -24,7 +24,7 @@ require ( k8s.io/client-go v0.28.4 k8s.io/component-base v0.28.4 k8s.io/kubectl v0.28.4 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/utils v0.0.0-20231127182322-b307cd553661 sigs.k8s.io/controller-runtime v0.16.3 ) @@ -131,14 +131,14 @@ require ( go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect @@ -152,9 +152,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 32e0a9e18..9daf42945 100644 --- a/go.sum +++ b/go.sum @@ -147,7 +147,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -423,8 +422,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 h1:CFTvpkpVP4EXXZuaZuxpikAoma8xVha/IZKMDc9lw+Y= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0/go.mod h1:npfc20mPOAu7ViOVnATVMbI7PoXvW99EzgJVqkAomIQ= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -527,8 +526,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -604,8 +603,8 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -684,13 +683,13 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -699,8 +698,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -890,14 +889,14 @@ k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.28.4 h1:gWpUXW/T7aFne+rchYeHkyB8eVDl5UZce8G4X//kjUQ= k8s.io/kubectl v0.28.4/go.mod h1:CKOccVx3l+3MmDbkXtIUtibq93nN2hkDR99XDCn7c/c= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= +k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -905,7 +904,7 @@ sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigw sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 36a49339742e9bc9e3e6e19e653d73328e8d1110 Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Mon, 4 Dec 2023 18:31:27 +0530 Subject: [PATCH 1178/1234] Fix smoke-daemonset to work on multi-node cluster. (#2412) --- .../monitoring/02-generate-traces.yaml | 4 +++- tests/e2e-openshift/monitoring/check_metrics.sh | 4 ++-- tests/e2e/smoke-daemonset/00-assert.yaml | 10 ++++++++-- tests/e2e/smoke-daemonset/check-daemonset.sh | 15 +++++++++++++++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100755 tests/e2e/smoke-daemonset/check-daemonset.sh diff --git a/tests/e2e-openshift/monitoring/02-generate-traces.yaml b/tests/e2e-openshift/monitoring/02-generate-traces.yaml index ac16943d4..1f3b23778 100644 --- a/tests/e2e-openshift/monitoring/02-generate-traces.yaml +++ b/tests/e2e-openshift/monitoring/02-generate-traces.yaml @@ -18,8 +18,10 @@ spec: - "--otlp-endpoint=cluster-collector-collector-headless:4317" - "--otlp-insecure=true" - "--rate=1" - - "--duration=5s" + - "--duration=3m" - "--otlp-attributes=telemetrygen=\"traces\"" - "--otlp-header=telemetrygen=\"traces\"" + - "--span-duration=1s" + - "--workers=1" - "traces" restartPolicy: Never diff --git a/tests/e2e-openshift/monitoring/check_metrics.sh b/tests/e2e-openshift/monitoring/check_metrics.sh index fac40fdda..1d88c5841 100755 --- a/tests/e2e-openshift/monitoring/check_metrics.sh +++ b/tests/e2e-openshift/monitoring/check_metrics.sh @@ -4,8 +4,8 @@ SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-u TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d) THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host') -#Check metrics used in the prometheus rules created for TempoStack. Refer issue https://issues.redhat.com/browse/TRACING-3399 for skipped metrics. -metrics="otelcol_exporter_enqueue_failed_spans otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans" +#Check metrics for OpenTelemetry collector instance. +metrics="otelcol_process_uptime otelcol_process_runtime_total_sys_memory_bytes otelcol_process_memory_rss otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans" for metric in $metrics; do query="$metric" diff --git a/tests/e2e/smoke-daemonset/00-assert.yaml b/tests/e2e/smoke-daemonset/00-assert.yaml index 80ba943ec..7dff61957 100644 --- a/tests/e2e/smoke-daemonset/00-assert.yaml +++ b/tests/e2e/smoke-daemonset/00-assert.yaml @@ -9,6 +9,12 @@ spec: maxSurge: 0 maxUnavailable: 1 status: - numberAvailable: 1 numberMisscheduled: 0 - numberReady: 1 + +--- +# This KUTTL assert uses the check-daemonset.sh script to ensure the number of ready pods in a daemonset matches the desired count, retrying until successful or a timeout occurs. The script is needed as the number of Kubernetes cluster nodes can vary and we cannot statically set desiredNumberScheduled and numberReady in the assert for daemonset status. + +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +commands: +- script: ./tests/e2e/smoke-daemonset/check-daemonset.sh diff --git a/tests/e2e/smoke-daemonset/check-daemonset.sh b/tests/e2e/smoke-daemonset/check-daemonset.sh new file mode 100755 index 000000000..4e6c2d806 --- /dev/null +++ b/tests/e2e/smoke-daemonset/check-daemonset.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Name of the daemonset to check +DAEMONSET_NAME="daemonset-test-collector" + +# Get the desired and ready pod counts for the daemonset +read DESIRED READY <<< $(kubectl get daemonset -n $NAMESPACE $DAEMONSET_NAME -o custom-columns=:status.desiredNumberScheduled,:status.numberReady --no-headers) + +# Check if the desired count matches the ready count +if [ "$DESIRED" -eq "$READY" ]; then + echo "Desired count ($DESIRED) matches the ready count ($READY) for $DAEMONSET_NAME." +else + echo "Desired count ($DESIRED) does not match the ready count ($READY) for $DAEMONSET_NAME." + exit 1 +fi From 0ad467de17f845675d489b401553cfe3d5d254e7 Mon Sep 17 00:00:00 2001 From: Jason Crouse Date: Mon, 4 Dec 2023 13:45:10 -0500 Subject: [PATCH 1179/1234] Add the ability to set headers in the opamp bridge config (#2413) * add headers to bridge config and include test for parsing config from yaml * headers to own type and make translation method a method on the headers type * rename file to headers.go, s/ToHttpHeader/ToHTTPHeader * add changelog * add copyright header --- .chloggen/opamp-bridge-headers-config.yaml | 16 ++++++++++ cmd/operator-opamp-bridge/agent/agent.go | 1 + cmd/operator-opamp-bridge/config/config.go | 1 + .../config/config_test.go | 29 +++++++++++++++++++ cmd/operator-opamp-bridge/config/headers.go | 27 +++++++++++++++++ .../config/testdata/agentwithheaders.yaml | 17 +++++++++++ 6 files changed, 91 insertions(+) create mode 100755 .chloggen/opamp-bridge-headers-config.yaml create mode 100644 cmd/operator-opamp-bridge/config/headers.go create mode 100644 cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml diff --git a/.chloggen/opamp-bridge-headers-config.yaml b/.chloggen/opamp-bridge-headers-config.yaml new file mode 100755 index 000000000..55aab44ca --- /dev/null +++ b/.chloggen/opamp-bridge-headers-config.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: adds request headers to the opamp bridge config + +# One or more tracking issues related to the change +issues: [2410] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go index 9b20d9073..e9dc849b1 100644 --- a/cmd/operator-opamp-bridge/agent/agent.go +++ b/cmd/operator-opamp-bridge/agent/agent.go @@ -146,6 +146,7 @@ func (agent *Agent) Start() error { agent.startTime = uint64(agent.clock.Now().UnixNano()) settings := types.StartSettings{ OpAMPServerURL: agent.config.Endpoint, + Header: agent.config.Headers.ToHTTPHeader(), InstanceUid: agent.instanceId.String(), Callbacks: types.CallbacksStruct{ OnConnectFunc: agent.onConnect, diff --git a/cmd/operator-opamp-bridge/config/config.go b/cmd/operator-opamp-bridge/config/config.go index 882e5c6e2..38f06d6ff 100644 --- a/cmd/operator-opamp-bridge/config/config.go +++ b/cmd/operator-opamp-bridge/config/config.go @@ -94,6 +94,7 @@ type Config struct { // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) ComponentsAllowed map[string][]string `yaml:"componentsAllowed,omitempty"` Endpoint string `yaml:"endpoint"` + Headers Headers `yaml:"headers,omitempty"` Capabilities map[Capability]bool `yaml:"capabilities"` HeartbeatInterval time.Duration `yaml:"heartbeatInterval,omitempty"` Name string `yaml:"name,omitempty"` diff --git a/cmd/operator-opamp-bridge/config/config_test.go b/cmd/operator-opamp-bridge/config/config_test.go index 5f68c4fb2..e9caeb2b0 100644 --- a/cmd/operator-opamp-bridge/config/config_test.go +++ b/cmd/operator-opamp-bridge/config/config_test.go @@ -135,6 +135,35 @@ func TestLoad(t *testing.T) { return assert.ErrorContains(t, err, "error unmarshaling YAML", i...) }, }, + { + name: "base case with headers", + args: args{ + file: "./testdata/agentwithheaders.yaml", + }, + want: &Config{ + RootLogger: logr.Discard(), + Endpoint: "ws://127.0.0.1:4320/v1/opamp", + Headers: map[string]string{ + "authentication": "access-12345-token", + "my-header-key": "my-header-value", + }, + Capabilities: map[Capability]bool{ + AcceptsRemoteConfig: true, + ReportsEffectiveConfig: true, + ReportsOwnTraces: true, + ReportsOwnMetrics: true, + ReportsOwnLogs: true, + AcceptsOpAMPConnectionSettings: true, + AcceptsOtherConnectionSettings: true, + AcceptsRestartCommand: true, + ReportsHealth: true, + ReportsRemoteConfig: true, + AcceptsPackages: false, + ReportsPackageStatuses: false, + }, + }, + wantErr: assert.NoError, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/cmd/operator-opamp-bridge/config/headers.go b/cmd/operator-opamp-bridge/config/headers.go new file mode 100644 index 000000000..4ef242e3c --- /dev/null +++ b/cmd/operator-opamp-bridge/config/headers.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import "net/http" + +type Headers map[string]string + +func (h Headers) ToHTTPHeader() http.Header { + newMap := make(map[string][]string) + for key, value := range h { + newMap[key] = []string{value} + } + return newMap +} diff --git a/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml b/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml new file mode 100644 index 000000000..17983e142 --- /dev/null +++ b/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml @@ -0,0 +1,17 @@ +endpoint: ws://127.0.0.1:4320/v1/opamp +headers: + authentication: "access-12345-token" + my-header-key: "my-header-value" +capabilities: + AcceptsRemoteConfig: true + ReportsEffectiveConfig: true + AcceptsPackages: false + ReportsPackageStatuses: false + ReportsOwnTraces: true + ReportsOwnMetrics: true + ReportsOwnLogs: true + AcceptsOpAMPConnectionSettings: true + AcceptsOtherConnectionSettings: true + AcceptsRestartCommand: true + ReportsHealth: true + ReportsRemoteConfig: true From e6996e39d56e9e7494f24d8bb0ce444610950f2f Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:59:47 +0100 Subject: [PATCH 1180/1234] Added PodMonitor when using sidecar mode (#2404) * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa * Added PodMonitor when using sidecar mode Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/podmonitor-otel-sidecar-mode.yaml | 16 +++ apis/v1alpha1/opentelemetrycollector_types.go | 2 +- ...emetry-operator.clusterserviceversion.yaml | 10 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 6 +- ...emetry-operator.clusterserviceversion.yaml | 7 +- config/rbac/role.yaml | 1 + .../opentelemetrycollector_controller.go | 3 +- docs/api.md | 2 +- internal/manifests/collector/collector.go | 6 +- internal/manifests/collector/podmonitor.go | 101 ++++++++++++++++++ .../manifests/collector/podmonitor_test.go | 59 ++++++++++ .../manifests/collector/servicemonitor.go | 19 ++-- internal/manifests/mutate.go | 11 ++ internal/naming/main.go | 7 +- .../00-install.yaml | 35 ++++++ .../01-assert.yaml | 44 ++++++++ .../01-install-app.yaml | 20 ++++ 18 files changed, 328 insertions(+), 27 deletions(-) create mode 100755 .chloggen/podmonitor-otel-sidecar-mode.yaml create mode 100644 internal/manifests/collector/podmonitor.go create mode 100644 internal/manifests/collector/podmonitor_test.go create mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml create mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml diff --git a/.chloggen/podmonitor-otel-sidecar-mode.yaml b/.chloggen/podmonitor-otel-sidecar-mode.yaml new file mode 100755 index 000000000..ae7bf0c8e --- /dev/null +++ b/.chloggen/podmonitor-otel-sidecar-mode.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Create PodMonitor when deploying collector in sidecar mode and Prometheus exporters are used. + +# One or more tracking issues related to the change +issues: [2306] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 6f08afb9e..3bf22d809 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -483,7 +483,7 @@ type PodDisruptionBudgetSpec struct { // MetricsConfigSpec defines a metrics config. type MetricsConfigSpec struct { - // EnableMetrics specifies if ServiceMonitor should be created for the OpenTelemetry Collector and Prometheus Exporters. + // EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. // The operator.observability.prometheus feature gate must be enabled to use this feature. // // +optional diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 6540b656d..7bfcb781c 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -65,7 +65,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-11-17T13:24:32Z" + createdAt: "2023-12-05T15:43:53Z" 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 @@ -135,9 +135,10 @@ spec: - description: Metrics defines the metrics configuration for operands. displayName: Metrics Config path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitor should be created for - the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.prometheus - feature gate must be enabled to use this feature. + - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar + mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. + The operator.observability.prometheus feature gate must be enabled to use + this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics version: v1alpha1 @@ -233,6 +234,7 @@ spec: - apiGroups: - monitoring.coreos.com resources: + - podmonitors - servicemonitors verbs: - create diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 9ba407458..ef1a82485 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3707,9 +3707,9 @@ spec: description: Metrics defines the metrics configuration for operands. properties: enableMetrics: - description: EnableMetrics specifies if ServiceMonitor should - be created for the OpenTelemetry Collector and Prometheus - Exporters. The operator.observability. + description: EnableMetrics specifies if ServiceMonitor or + PodMonitor(for sidecar mode) should be created for the OpenTelemetry + Collector and Prometheus Exporters. The operator.observability. type: boolean type: object type: object diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index de4a47805..0f8d0e289 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3704,9 +3704,9 @@ spec: description: Metrics defines the metrics configuration for operands. properties: enableMetrics: - description: EnableMetrics specifies if ServiceMonitor should - be created for the OpenTelemetry Collector and Prometheus - Exporters. The operator.observability. + description: EnableMetrics specifies if ServiceMonitor or + PodMonitor(for sidecar mode) should be created for the OpenTelemetry + Collector and Prometheus Exporters. The operator.observability. type: boolean type: object type: object diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index edecd1bc8..006062ba8 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -81,9 +81,10 @@ spec: - description: Metrics defines the metrics configuration for operands. displayName: Metrics Config path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitor should be created for - the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.prometheus - feature gate must be enabled to use this feature. + - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar + mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. + The operator.observability.prometheus feature gate must be enabled to use + this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics version: v1alpha1 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f003bf100..09d018a85 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -79,6 +79,7 @@ rules: - apiGroups: - monitoring.coreos.com resources: + - podmonitors - servicemonitors verbs: - create diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 6c7b6c742..0cca79c1d 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -84,7 +84,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=policy,resources=poddisruptionbudgets,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update -// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors;podmonitors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;update;patch @@ -142,6 +142,7 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er if featuregate.PrometheusOperatorIsAvailable.IsEnabled() { builder.Owns(&monitoringv1.ServiceMonitor{}) + builder.Owns(&monitoringv1.PodMonitor{}) } return builder.Complete(r) diff --git a/docs/api.md b/docs/api.md index 22425e911..84f8ac6e0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -17287,7 +17287,7 @@ Metrics defines the metrics configuration for operands. enableMetrics boolean - EnableMetrics specifies if ServiceMonitor should be created for the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.
+ EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.
false diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 6114965c2..31a0c3a8e 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -52,7 +52,11 @@ func Build(params manifests.Params) ([]client.Object, error) { manifests.Factory(Ingress), }...) if params.OtelCol.Spec.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { - manifestFactories = append(manifestFactories, manifests.Factory(ServiceMonitor)) + if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { + manifestFactories = append(manifestFactories, manifests.Factory(PodMonitor)) + } else { + manifestFactories = append(manifestFactories, manifests.Factory(ServiceMonitor)) + } } for _, factory := range manifestFactories { res, err := factory(params) diff --git a/internal/manifests/collector/podmonitor.go b/internal/manifests/collector/podmonitor.go new file mode 100644 index 000000000..428d2673a --- /dev/null +++ b/internal/manifests/collector/podmonitor.go @@ -0,0 +1,101 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + "strings" + + "github.com/go-logr/logr" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// ServiceMonitor returns the service monitor for the given instance. +func PodMonitor(params manifests.Params) (*monitoringv1.PodMonitor, error) { + if !params.OtelCol.Spec.Observability.Metrics.EnableMetrics { + params.Log.V(2).Info("Metrics disabled for this OTEL Collector", + "params.OtelCol.name", params.OtelCol.Name, + "params.OtelCol.namespace", params.OtelCol.Namespace, + ) + return nil, nil + } + var pm monitoringv1.PodMonitor + + if params.OtelCol.Spec.Mode != v1alpha1.ModeSidecar { + return nil, nil + } + + pm = monitoringv1.PodMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: params.OtelCol.Namespace, + Name: naming.PodMonitor(params.OtelCol.Name), + Labels: map[string]string{ + "app.kubernetes.io/name": naming.PodMonitor(params.OtelCol.Name), + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: monitoringv1.PodMonitorSpec{ + JobLabel: "app.kubernetes.io/instance", + PodTargetLabels: []string{"app.kubernetes.io/name", "app.kubernetes.io/instance", "app.kubernetes.io/managed-by"}, + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{params.OtelCol.Namespace}, + }, + Selector: metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), + }, + }, + PodMetricsEndpoints: append( + []monitoringv1.PodMetricsEndpoint{ + { + Port: "monitoring", + }, + }, metricsEndpointsFromConfig(params.Log, params.OtelCol)...), + }, + } + + return &pm, nil +} + +func metricsEndpointsFromConfig(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []monitoringv1.PodMetricsEndpoint { + config, err := adapters.ConfigFromString(otelcol.Spec.Config) + if err != nil { + logger.V(2).Error(err, "Error while parsing the configuration") + return []monitoringv1.PodMetricsEndpoint{} + } + exporterPorts, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeExporter, config) + if err != nil { + logger.Error(err, "couldn't build endpoints to podMonitors from configuration") + return []monitoringv1.PodMetricsEndpoint{} + } + metricsEndpoints := []monitoringv1.PodMetricsEndpoint{} + for _, port := range exporterPorts { + if strings.Contains(port.Name, "prometheus") { + e := monitoringv1.PodMetricsEndpoint{ + Port: port.Name, + } + metricsEndpoints = append(metricsEndpoints, e) + } + } + return metricsEndpoints +} diff --git a/internal/manifests/collector/podmonitor_test.go b/internal/manifests/collector/podmonitor_test.go new file mode 100644 index 000000000..9066b50cb --- /dev/null +++ b/internal/manifests/collector/podmonitor_test.go @@ -0,0 +1,59 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +import ( + "fmt" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + + "github.com/stretchr/testify/assert" + + "testing" +) + +func sidecarParams() manifests.Params { + return paramsWithMode(v1alpha1.ModeSidecar) +} + +func TestDesiredPodMonitors(t *testing.T) { + params := sidecarParams() + + actual, err := PodMonitor(params) + assert.NoError(t, err) + assert.Nil(t, actual) + + params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true + actual, err = PodMonitor(params) + assert.NoError(t, err) + assert.NotNil(t, actual) + assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) + assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) + assert.Equal(t, "monitoring", actual.Spec.PodMetricsEndpoints[0].Port) + + params, err = newParams("", "testdata/prometheus-exporter.yaml") + assert.NoError(t, err) + params.OtelCol.Spec.Mode = v1alpha1.ModeSidecar + params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true + actual, err = PodMonitor(params) + assert.NoError(t, err) + assert.NotNil(t, actual) + assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) + assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) + assert.Equal(t, "monitoring", actual.Spec.PodMetricsEndpoints[0].Port) + assert.Equal(t, "prometheus-dev", actual.Spec.PodMetricsEndpoints[1].Port) + assert.Equal(t, "prometheus-prod", actual.Spec.PodMetricsEndpoints[2].Port) +} diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 8b0a775f2..db5dcd34d 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -37,8 +37,12 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro ) return nil, nil } + var sm monitoringv1.ServiceMonitor - sm := monitoringv1.ServiceMonitor{ + if params.OtelCol.Spec.Mode == v1alpha1.ModeSidecar { + return nil, nil + } + sm = monitoringv1.ServiceMonitor{ ObjectMeta: metav1.ObjectMeta{ Namespace: params.OtelCol.Namespace, Name: naming.ServiceMonitor(params.OtelCol.Name), @@ -49,7 +53,11 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro }, }, Spec: monitoringv1.ServiceMonitorSpec{ - Endpoints: []monitoringv1.Endpoint{}, + Endpoints: append([]monitoringv1.Endpoint{ + { + Port: "monitoring", + }, + }, endpointsFromConfig(params.Log, params.OtelCol)...), NamespaceSelector: monitoringv1.NamespaceSelector{ MatchNames: []string{params.OtelCol.Namespace}, }, @@ -62,13 +70,6 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro }, } - endpoints := []monitoringv1.Endpoint{ - { - Port: "monitoring", - }, - } - - sm.Spec.Endpoints = append(endpoints, endpointsFromConfig(params.Log, params.OtelCol)...) return &sm, nil } diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go index 9585bc1d4..09f48daf5 100644 --- a/internal/manifests/mutate.go +++ b/internal/manifests/mutate.go @@ -136,6 +136,11 @@ func MutateFuncFor(existing, desired client.Object) controllerutil.MutateFn { wantSvcMonitor := desired.(*monitoringv1.ServiceMonitor) mutateServiceMonitor(svcMonitor, wantSvcMonitor) + case *monitoringv1.PodMonitor: + podMonitor := existing.(*monitoringv1.PodMonitor) + wantPodMonitor := desired.(*monitoringv1.PodMonitor) + mutatePodMonitor(podMonitor, wantPodMonitor) + case *networkingv1.Ingress: ing := existing.(*networkingv1.Ingress) wantIng := desired.(*networkingv1.Ingress) @@ -245,6 +250,12 @@ func mutateServiceMonitor(existing, desired *monitoringv1.ServiceMonitor) { existing.Spec = desired.Spec } +func mutatePodMonitor(existing, desired *monitoringv1.PodMonitor) { + existing.Annotations = desired.Annotations + existing.Labels = desired.Labels + existing.Spec = desired.Spec +} + func mutateService(existing, desired *corev1.Service) error { existing.Spec.Ports = desired.Spec.Ports if err := mergeWithOverride(&existing.Spec.Selector, desired.Spec.Selector); err != nil { diff --git a/internal/naming/main.go b/internal/naming/main.go index a4c9188ae..a19301a01 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -140,11 +140,16 @@ func ServiceAccount(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } -// ServiceMonitor builds the service account name based on the instance. +// ServiceMonitor builds the service Monitor name based on the instance. func ServiceMonitor(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } +// PodMonitor builds the pod Monitor name based on the instance. +func PodMonitor(otelcol string) string { + return DNSName(Truncate("%s-collector", 63, otelcol)) +} + // TargetAllocatorServiceAccount returns the TargetAllocator service account resource name. func TargetAllocatorServiceAccount(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml new file mode 100644 index 000000000..5440bee17 --- /dev/null +++ b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: create-pm-prometheus +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-pm-prometheus +spec: + mode: sidecar + observability: + metrics: + enableMetrics: true + config: | + receivers: + otlp: + protocols: + grpc: + http: + + exporters: + prometheus/prod: + endpoint: 0.0.0.0:8884 + + prometheus/dev: + endpoint: 0.0.0.0:8885 + + service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [prometheus/dev, prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml new file mode 100644 index 000000000..d89c68dd5 --- /dev/null +++ b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml @@ -0,0 +1,44 @@ +apiVersion: v1 +kind: Pod +metadata: + annotations: + sidecar.opentelemetry.io/inject: "true" + labels: + app: pod-with-sidecar + namespace: create-pm-prometheus +spec: + containers: + - name: myapp + - name: otc-container + env: + - name: POD_NAME + - name: OTEL_CONFIG + - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME + - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID + - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME + - name: OTEL_RESOURCE_ATTRIBUTES +status: + phase: Running +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + labels: + app.kubernetes.io/instance: create-pm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-collector + name: simplest-collector + namespace: create-pm-prometheus +spec: + jobLabel: "app.kubernetes.io/instance" + podMetricsEndpoints: + - port: monitoring + - port: prometheus-dev + - port: prometheus-prod + namespaceSelector: + matchNames: + - create-pm-prometheus + selector: + matchLabels: + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/instance: create-pm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml new file mode 100644 index 000000000..884f05d22 --- /dev/null +++ b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app-with-sidecar + namespace: create-pm-prometheus +spec: + selector: + matchLabels: + app: pod-with-sidecar + replicas: 1 + template: + metadata: + labels: + app: pod-with-sidecar + annotations: + sidecar.opentelemetry.io/inject: "true" + spec: + containers: + - name: myapp + image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main From e58ce39093d7d35a0e9ba1dc30acfe19770e9fa8 Mon Sep 17 00:00:00 2001 From: Jason Crouse Date: Tue, 5 Dec 2023 13:33:35 -0500 Subject: [PATCH 1181/1234] Include opamp bridge headers in configmap generation (#2414) * add headers to opamp bridge spec and pass through to configmap generation * run make generate * add changelog * run make bundle and make api-docs * run 'VERSION="0.89.0" IMG="ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator" make bundle' from jacobs advice * put these versions back * rm another autogenned change * rm this too * rerun make bundle after pulling in main --- .chloggen/opamp-bridge-headers-in-crd.yaml | 16 ++++++++++++++++ apis/v1alpha1/opampbridge_types.go | 4 ++++ apis/v1alpha1/zz_generated.deepcopy.go | 7 +++++++ ...telemetry-operator.clusterserviceversion.yaml | 2 +- .../manifests/opentelemetry.io_opampbridges.yaml | 7 +++++++ .../crd/bases/opentelemetry.io_opampbridges.yaml | 7 +++++++ docs/api.md | 7 +++++++ internal/manifests/opampbridge/configmap.go | 4 ++++ internal/manifests/opampbridge/configmap_test.go | 3 +++ 9 files changed, 56 insertions(+), 1 deletion(-) create mode 100755 .chloggen/opamp-bridge-headers-in-crd.yaml diff --git a/.chloggen/opamp-bridge-headers-in-crd.yaml b/.chloggen/opamp-bridge-headers-in-crd.yaml new file mode 100755 index 000000000..cb1394b26 --- /dev/null +++ b/.chloggen/opamp-bridge-headers-in-crd.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: bridge + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: adds Headers to opamp bridge spec and configmap generation + +# One or more tracking issues related to the change +issues: [2410] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opampbridge_types.go b/apis/v1alpha1/opampbridge_types.go index 344ee5392..0479b1019 100644 --- a/apis/v1alpha1/opampbridge_types.go +++ b/apis/v1alpha1/opampbridge_types.go @@ -24,6 +24,10 @@ type OpAMPBridgeSpec struct { // OpAMP backend Server endpoint // +required Endpoint string `json:"endpoint"` + // Headers is an optional map of headers to use when connecting to the OpAMP Server, + // typically used to set access tokens or other authorization headers. + // +optional + Headers map[string]string `json:"headers,omitempty"` // Capabilities supported by the OpAMP Bridge // +required Capabilities map[OpAMPBridgeCapability]bool `json:"capabilities"` diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 05890e08a..f5f6778f7 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -546,6 +546,13 @@ func (in *OpAMPBridgeList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpAMPBridgeSpec) DeepCopyInto(out *OpAMPBridgeSpec) { *out = *in + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } if in.Capabilities != nil { in, out := &in.Capabilities, &out.Capabilities *out = make(map[OpAMPBridgeCapability]bool, len(*in)) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7bfcb781c..7704ee3e2 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -65,7 +65,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-12-05T15:43:53Z" + createdAt: "2023-12-05T18:09:19Z" 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 diff --git a/bundle/manifests/opentelemetry.io_opampbridges.yaml b/bundle/manifests/opentelemetry.io_opampbridges.yaml index 6c124b0ff..83d809ba6 100644 --- a/bundle/manifests/opentelemetry.io_opampbridges.yaml +++ b/bundle/manifests/opentelemetry.io_opampbridges.yaml @@ -903,6 +903,13 @@ spec: x-kubernetes-map-type: atomic type: object type: array + headers: + additionalProperties: + type: string + description: Headers is an optional map of headers to use when connecting + to the OpAMP Server, typically used to set access tokens or other + authorization headers. + type: object hostNetwork: description: HostNetwork indicates if the pod should run in the host networking namespace. diff --git a/config/crd/bases/opentelemetry.io_opampbridges.yaml b/config/crd/bases/opentelemetry.io_opampbridges.yaml index 913746b37..439d923de 100644 --- a/config/crd/bases/opentelemetry.io_opampbridges.yaml +++ b/config/crd/bases/opentelemetry.io_opampbridges.yaml @@ -900,6 +900,13 @@ spec: x-kubernetes-map-type: atomic type: object type: array + headers: + additionalProperties: + type: string + description: Headers is an optional map of headers to use when connecting + to the OpAMP Server, typically used to set access tokens or other + authorization headers. + type: object hostNetwork: description: HostNetwork indicates if the pod should run in the host networking namespace. diff --git a/docs/api.md b/docs/api.md index 84f8ac6e0..18f183284 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3697,6 +3697,13 @@ OpAMPBridgeSpec defines the desired state of OpAMPBridge. List of sources to populate environment variables on the OpAMPBridge Pods.
false + + headers + map[string]string + + Headers is an optional map of headers to use when connecting to the OpAMP Server, typically used to set access tokens or other authorization headers.
+ + false hostNetwork boolean diff --git a/internal/manifests/opampbridge/configmap.go b/internal/manifests/opampbridge/configmap.go index 5f5c678a3..9f16ef5a6 100644 --- a/internal/manifests/opampbridge/configmap.go +++ b/internal/manifests/opampbridge/configmap.go @@ -44,6 +44,10 @@ func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { config["endpoint"] = params.OpAMPBridge.Spec.Endpoint } + if len(params.OpAMPBridge.Spec.Headers) > 0 { + config["headers"] = params.OpAMPBridge.Spec.Headers + } + if params.OpAMPBridge.Spec.Capabilities != nil { config["capabilities"] = params.OpAMPBridge.Spec.Capabilities } diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go index 8089f3fdb..221bd275d 100644 --- a/internal/manifests/opampbridge/configmap_test.go +++ b/internal/manifests/opampbridge/configmap_test.go @@ -59,6 +59,8 @@ componentsAllowed: receivers: - otlp endpoint: ws://opamp-server:4320/v1/opamp +headers: + authorization: access-12345-token `} opampBridge := v1alpha1.OpAMPBridge{ @@ -69,6 +71,7 @@ endpoint: ws://opamp-server:4320/v1/opamp Spec: v1alpha1.OpAMPBridgeSpec{ Image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.69.0", Endpoint: "ws://opamp-server:4320/v1/opamp", + Headers: map[string]string{"authorization": "access-12345-token"}, Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, From 498f8fbd411a02eeb2c626b0bb14015eb2452f21 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:58:27 +0800 Subject: [PATCH 1182/1234] fix error logging in collector container creation (#2420) * fix logging err in collector container manifest * add chlog --- .chloggen/fix-collector-container-log.yaml | 16 ++++++++++++++++ internal/manifests/collector/container.go | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 .chloggen/fix-collector-container-log.yaml diff --git a/.chloggen/fix-collector-container-log.yaml b/.chloggen/fix-collector-container-log.yaml new file mode 100755 index 000000000..6bb25ee4d --- /dev/null +++ b/.chloggen/fix-collector-container-log.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fix error logging in collector container creation + +# One or more tracking issues related to the change +issues: [2420] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index e4d826e68..e347d0ce5 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -44,7 +44,10 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem // build container ports from service ports ports, err := getConfigContainerPorts(logger, otelcol.Spec.Config) - logger.Error(err, "container ports config") + if err != nil { + logger.Error(err, "container ports config") + } + for _, p := range otelcol.Spec.Ports { ports[p.Name] = corev1.ContainerPort{ Name: p.Name, From 98fe7f605f8bdcbf7f2c6fd8e7b58e0a4fb03dc7 Mon Sep 17 00:00:00 2001 From: frances-barcelos Date: Wed, 6 Dec 2023 14:02:56 +0000 Subject: [PATCH 1183/1234] Add targetallocator securityContext configuration (#2419) * Add targetallocator securitycontext Signed-off-by: Frances Barcelos * Add targetallocator securitycontext Signed-off-by: Frances Barcelos * Adding perms for servicemonitors * Update 00-assert.yaml --------- Signed-off-by: Frances Barcelos Co-authored-by: Jacob Aronoff --- .chloggen/ta-securitycontext.yaml | 16 ++ apis/v1alpha1/opentelemetrycollector_types.go | 4 + apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 128 +++++++++ ...ntelemetry.io_opentelemetrycollectors.yaml | 128 +++++++++ docs/api.md | 269 ++++++++++++++++++ .../manifests/targetallocator/deployment.go | 1 + .../targetallocator/deployment_test.go | 56 ++++ .../targetallocator-features/00-assert.yaml | 2 + .../targetallocator-features/00-install.yaml | 5 + 10 files changed, 614 insertions(+) create mode 100644 .chloggen/ta-securitycontext.yaml diff --git a/.chloggen/ta-securitycontext.yaml b/.chloggen/ta-securitycontext.yaml new file mode 100644 index 000000000..1dd25ace1 --- /dev/null +++ b/.chloggen/ta-securitycontext.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add target allocator securityContext configuration + +# One or more tracking issues related to the change +issues: [2397] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 3bf22d809..07ae504dd 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -322,6 +322,10 @@ type OpenTelemetryTargetAllocator struct { // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. // +optional PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` + // SecurityContext configures the container security context for + // the targetallocator. + // +optional + SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // TopologySpreadConstraints embedded kubernetes pod configuration option, // controls how pods are spread across your cluster among failure-domains // such as regions, zones, nodes, and other user-defined topology domains diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index f5f6778f7..749a96a1f 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -974,6 +974,11 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll (*in).DeepCopyInto(*out) } in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } if in.TopologySpreadConstraints != nil { in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints *out = make([]v1.TopologySpreadConstraint, len(*in)) diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index ef1a82485..c89d429c4 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -5050,6 +5050,134 @@ spec: resources required. type: object type: object + securityContext: + description: SecurityContext configures the container security + context for the targetallocator. + properties: + fsGroup: + description: "A special supplemental group that applies to + all containers in a pod. Some volume types allow the Kubelet + to change the ownership of that volume to be owned by the + pod: \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + SecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID, the fsGroup (if specified), and group memberships defined + in the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. Note that this field cannot + be set when spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options within a container's + SecurityContext will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. + type: string + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 0f8d0e289..6bc2e810e 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -5047,6 +5047,134 @@ spec: resources required. type: object type: object + securityContext: + description: SecurityContext configures the container security + context for the targetallocator. + properties: + fsGroup: + description: "A special supplemental group that applies to + all containers in a pod. Some volume types allow the Kubelet + to change the ownership of that volume to be owned by the + pod: \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + SecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID, the fsGroup (if specified), and group memberships defined + in the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. Note that this field cannot + be set when spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options within a container's + SecurityContext will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. + type: string + type: object + type: object serviceAccount: description: ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator diff --git a/docs/api.md b/docs/api.md index 18f183284..12a06d1a6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -18090,6 +18090,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all Resources to set on the OpenTelemetryTargetAllocator containers.
false + + securityContext + object + + SecurityContext configures the container security context for the targetallocator.
+ + false serviceAccount string @@ -19784,6 +19791,268 @@ ResourceClaim references one entry in PodSpec.ResourceClaims. +### OpenTelemetryCollector.spec.targetAllocator.securityContext +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +SecurityContext configures the container security context for the targetallocator. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
fsGroupinteger + A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + 1.
+
+ Format: int64
+
false
fsGroupChangePolicystring + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
+
false
runAsGroupinteger + The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.
+
+ Format: int64
+
false
runAsNonRootboolean + Indicates that the container must run as a non-root user.
+
false
runAsUserinteger + The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext.
+
+ Format: int64
+
false
seLinuxOptionsobject + The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext.
+
false
seccompProfileobject + The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.
+
false
supplementalGroups[]integer + A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for th
+
false
sysctls[]object + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.
+
false
windowsOptionsobject + The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.securityContext.seLinuxOptions +[↩ Parent](#opentelemetrycollectorspectargetallocatorsecuritycontext) + + + +The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
levelstring + Level is SELinux level label that applies to the container.
+
false
rolestring + Role is a SELinux role label that applies to the container.
+
false
typestring + Type is a SELinux type label that applies to the container.
+
false
userstring + User is a SELinux user label that applies to the container.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.securityContext.seccompProfile +[↩ Parent](#opentelemetrycollectorspectargetallocatorsecuritycontext) + + + +The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
typestring + type indicates which kind of seccomp profile will be applied. Valid options are: + Localhost - a profile defined in a file on the node should be used.
+
true
localhostProfilestring + localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.securityContext.sysctls[index] +[↩ Parent](#opentelemetrycollectorspectargetallocatorsecuritycontext) + + + +Sysctl defines a kernel parameter to be set + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
namestring + Name of a property to set
+
true
valuestring + Value of a property to set
+
true
+ + +### OpenTelemetryCollector.spec.targetAllocator.securityContext.windowsOptions +[↩ Parent](#opentelemetrycollectorspectargetallocatorsecuritycontext) + + + +The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
gmsaCredentialSpecstring + GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
+
false
gmsaCredentialSpecNamestring + GMSACredentialSpecName is the name of the GMSA credential spec to use.
+
false
hostProcessboolean + HostProcess determines if a container should be run as a 'Host Process' container.
+
false
runAsUserNamestring + The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext.
+
false
+ + ### OpenTelemetryCollector.spec.targetAllocator.tolerations[index] [↩ Parent](#opentelemetrycollectorspectargetallocator) diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index def82aa88..e4e99b70e 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -59,6 +59,7 @@ func Deployment(params manifests.Params) (*appsv1.Deployment, error) { Tolerations: params.OtelCol.Spec.TargetAllocator.Tolerations, TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints, Affinity: params.OtelCol.Spec.TargetAllocator.Affinity, + SecurityContext: params.OtelCol.Spec.TargetAllocator.SecurityContext, }, }, }, diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index 6ed9eebdf..0d7d921f0 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -67,6 +67,62 @@ var testAffinityValue = &v1.Affinity{ }, } +var runAsUser int64 = 1000 +var runAsGroup int64 = 1000 + +var testSecurityContextValue = &v1.PodSecurityContext{ + RunAsUser: &runAsUser, + RunAsGroup: &runAsGroup, +} + +func TestDeploymentSecurityContext(t *testing.T) { + // Test default + otelcol1 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + } + + cfg := config.New() + + params1 := manifests.Params{ + OtelCol: otelcol1, + Config: cfg, + Log: logger, + } + d1, err := Deployment(params1) + if err != nil { + t.Fatal(err) + } + assert.Empty(t, d1.Spec.Template.Spec.SecurityContext) + + // Test SecurityContext + otelcol2 := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-securitycontext", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + SecurityContext: testSecurityContextValue, + }, + }, + } + + cfg = config.New() + + params2 := manifests.Params{ + OtelCol: otelcol2, + Config: cfg, + Log: logger, + } + + d2, err := Deployment(params2) + if err != nil { + t.Fatal(err) + } + assert.Equal(t, *testSecurityContextValue, *d2.Spec.Template.Spec.SecurityContext) +} + func TestDeploymentNewDefault(t *testing.T) { // prepare otelcol := collectorInstance() diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml index fdeaa2c98..dc002c767 100644 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ b/tests/e2e/targetallocator-features/00-assert.yaml @@ -56,6 +56,8 @@ spec: operator: In values: - "true" + securityContext: + runAsUser: 1000 containers: - name: ta-container args: diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index 9b75be12d..b62935db6 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -12,6 +12,9 @@ rules: - apiGroups: [""] resources: [ "pods" ] verbs: [ "get", "list", "watch"] +- apiGroups: ["monitoring.coreos.com"] + resources: ["servicemonitors"] + verbs: ["get", "list", "watch"] --- apiVersion: kuttl.dev/v1beta1 kind: TestStep @@ -41,6 +44,8 @@ spec: enabled: true image: "local/opentelemetry-operator-targetallocator:e2e" serviceAccount: ta + securityContext: + runAsUser: 1000 affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: From 979acc28199ee466d2a14d18f57c5667fab3e9e2 Mon Sep 17 00:00:00 2001 From: Jacob Aronoff Date: Wed, 6 Dec 2023 14:54:49 -0500 Subject: [PATCH 1184/1234] Prep release 0.90 (#2423) * bundlings * Chlog * forgot some stuff --- .chloggen/.bump-dotnet-1.2.0.yaml | 16 -------- .chloggen/2364-foreground-delete.yaml | 16 -------- .chloggen/TA-liveness-probe.yaml | 16 -------- .chloggen/enhanced-status.yaml | 16 -------- .chloggen/fix-collector-container-log.yaml | 16 -------- .chloggen/issue-2366-fix.yaml | 16 -------- .chloggen/main.yaml | 16 -------- .chloggen/migrate-route-reconcilation.yaml | 16 -------- .chloggen/opamp-bridge-headers-config.yaml | 16 -------- .chloggen/opamp-bridge-headers-in-crd.yaml | 16 -------- .chloggen/podmonitor-otel-sidecar-mode.yaml | 16 -------- .chloggen/sa-fix.yaml | 16 -------- .chloggen/ta-readiness-probe.yaml | 16 -------- .chloggen/ta-readiness.yaml | 16 -------- .chloggen/ta-securitycontext.yaml | 16 -------- .chloggen/ta_really-consistent-hashing.yaml | 16 -------- ...allocator-delayed-collector-instances.yaml | 16 -------- CHANGELOG.md | 37 +++++++++++++++++++ README.md | 2 +- RELEASE.md | 2 +- ...emetry-operator.clusterserviceversion.yaml | 8 ++-- versions.txt | 12 +++--- 22 files changed, 49 insertions(+), 284 deletions(-) delete mode 100644 .chloggen/.bump-dotnet-1.2.0.yaml delete mode 100755 .chloggen/2364-foreground-delete.yaml delete mode 100755 .chloggen/TA-liveness-probe.yaml delete mode 100755 .chloggen/enhanced-status.yaml delete mode 100755 .chloggen/fix-collector-container-log.yaml delete mode 100755 .chloggen/issue-2366-fix.yaml delete mode 100755 .chloggen/main.yaml delete mode 100755 .chloggen/migrate-route-reconcilation.yaml delete mode 100755 .chloggen/opamp-bridge-headers-config.yaml delete mode 100755 .chloggen/opamp-bridge-headers-in-crd.yaml delete mode 100755 .chloggen/podmonitor-otel-sidecar-mode.yaml delete mode 100755 .chloggen/sa-fix.yaml delete mode 100755 .chloggen/ta-readiness-probe.yaml delete mode 100755 .chloggen/ta-readiness.yaml delete mode 100644 .chloggen/ta-securitycontext.yaml delete mode 100755 .chloggen/ta_really-consistent-hashing.yaml delete mode 100644 .chloggen/target-allocator-delayed-collector-instances.yaml diff --git a/.chloggen/.bump-dotnet-1.2.0.yaml b/.chloggen/.bump-dotnet-1.2.0.yaml deleted file mode 100644 index 3db5de883..000000000 --- a/.chloggen/.bump-dotnet-1.2.0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: autoinstrumentation - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump OpenTelemetry .NET Automatic Instrumentation to 1.2.0 - -# One or more tracking issues related to the change -issues: [2382] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/.chloggen/2364-foreground-delete.yaml b/.chloggen/2364-foreground-delete.yaml deleted file mode 100755 index cea09ca0f..000000000 --- a/.chloggen/2364-foreground-delete.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fixes ability to do a foreground cascading delete - -# One or more tracking issues related to the change -issues: [2364] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/TA-liveness-probe.yaml b/.chloggen/TA-liveness-probe.yaml deleted file mode 100755 index 51fe8b65e..000000000 --- a/.chloggen/TA-liveness-probe.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add liveness probe to target allocator deployment generation - -# One or more tracking issues related to the change -issues: [2258] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/enhanced-status.yaml b/.chloggen/enhanced-status.yaml deleted file mode 100755 index 35c1948a8..000000000 --- a/.chloggen/enhanced-status.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: added reconciliation errors for CRD events - -# One or more tracking issues related to the change -issues: [1972] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix-collector-container-log.yaml b/.chloggen/fix-collector-container-log.yaml deleted file mode 100755 index 6bb25ee4d..000000000 --- a/.chloggen/fix-collector-container-log.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: fix error logging in collector container creation - -# One or more tracking issues related to the change -issues: [2420] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/issue-2366-fix.yaml b/.chloggen/issue-2366-fix.yaml deleted file mode 100755 index 7b809141f..000000000 --- a/.chloggen/issue-2366-fix.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: lifecycle spec removed from cloned initContainer - -# One or more tracking issues related to the change -issues: [2366] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/main.yaml b/.chloggen/main.yaml deleted file mode 100755 index ea6b27f21..000000000 --- a/.chloggen/main.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add missing pod in the rbac - -# One or more tracking issues related to the change -issues: [1679] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/migrate-route-reconcilation.yaml b/.chloggen/migrate-route-reconcilation.yaml deleted file mode 100755 index a710be5be..000000000 --- a/.chloggen/migrate-route-reconcilation.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: removes the old way of running autodetection for openshift routes being available - -# One or more tracking issues related to the change -issues: [2108] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/opamp-bridge-headers-config.yaml b/.chloggen/opamp-bridge-headers-config.yaml deleted file mode 100755 index 55aab44ca..000000000 --- a/.chloggen/opamp-bridge-headers-config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: adds request headers to the opamp bridge config - -# One or more tracking issues related to the change -issues: [2410] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/opamp-bridge-headers-in-crd.yaml b/.chloggen/opamp-bridge-headers-in-crd.yaml deleted file mode 100755 index cb1394b26..000000000 --- a/.chloggen/opamp-bridge-headers-in-crd.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: bridge - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: adds Headers to opamp bridge spec and configmap generation - -# One or more tracking issues related to the change -issues: [2410] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/podmonitor-otel-sidecar-mode.yaml b/.chloggen/podmonitor-otel-sidecar-mode.yaml deleted file mode 100755 index ae7bf0c8e..000000000 --- a/.chloggen/podmonitor-otel-sidecar-mode.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Create PodMonitor when deploying collector in sidecar mode and Prometheus exporters are used. - -# One or more tracking issues related to the change -issues: [2306] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/sa-fix.yaml b/.chloggen/sa-fix.yaml deleted file mode 100755 index 8b3a74e52..000000000 --- a/.chloggen/sa-fix.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: check if service account specified in otelcol before creating service account resource for collectors - -# One or more tracking issues related to the change -issues: [2372] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ta-readiness-probe.yaml b/.chloggen/ta-readiness-probe.yaml deleted file mode 100755 index da106345e..000000000 --- a/.chloggen/ta-readiness-probe.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add readiness probe to target allocator deployment generation - -# One or more tracking issues related to the change -issues: [2258] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ta-readiness.yaml b/.chloggen/ta-readiness.yaml deleted file mode 100755 index 06951b6b9..000000000 --- a/.chloggen/ta-readiness.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add readyz endpoint to TA - -# One or more tracking issues related to the change -issues: [2258] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ta-securitycontext.yaml b/.chloggen/ta-securitycontext.yaml deleted file mode 100644 index 1dd25ace1..000000000 --- a/.chloggen/ta-securitycontext.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: add target allocator securityContext configuration - -# One or more tracking issues related to the change -issues: [2397] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ta_really-consistent-hashing.yaml b/.chloggen/ta_really-consistent-hashing.yaml deleted file mode 100755 index c95cb800a..000000000 --- a/.chloggen/ta_really-consistent-hashing.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Use only target address for allocation in consistent-hashing strategy - -# One or more tracking issues related to the change -issues: [2280] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/target-allocator-delayed-collector-instances.yaml b/.chloggen/target-allocator-delayed-collector-instances.yaml deleted file mode 100644 index 91a42ed8f..000000000 --- a/.chloggen/target-allocator-delayed-collector-instances.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Save targets discovered before collector instances come up - -# One or more tracking issues related to the change -issues: [2350] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 032e2c914..d8eeda0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,43 @@ Changes by Version ================== +## 0.90.0 + +### 💡 Enhancements 💡 + +- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.2.0 (#2382) +- `operator`: add liveness probe to target allocator deployment generation (#2258) +- `operator`: added reconciliation errors for CRD events (#1972) +- `operator`: removes the old way of running autodetection for openshift routes being available (#2108) +- `bridge`: adds request headers to the opamp bridge config (#2410) +- `bridge`: adds Headers to opamp bridge spec and configmap generation (#2410) +- `operator`: Create PodMonitor when deploying collector in sidecar mode and Prometheus exporters are used. (#2306) +- `operator`: add readiness probe to target allocator deployment generation (#2258) +- `target allocator`: add readyz endpoint to TA (#2258) +- `target allocator`: add target allocator securityContext configuration (#2397) +- `target allocator`: Use only target address for allocation in consistent-hashing strategy (#2280) + +### 🧰 Bug fixes 🧰 + +- `operator`: fixes ability to do a foreground cascading delete (#2364) +- `operator`: fix error logging in collector container creation (#2420) +- `operator`: lifecycle spec removed from cloned initContainer (#2366) +- `operator`: add missing pod in the rbac (#1679) +- `operator`: check if service account specified in otelcol before creating service account resource for collectors (#2372) +- `target allocator`: Save targets discovered before collector instances come up (#2350) + +### Components + +* [OpenTelemetry Collector - v0.90.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.90.1) +* [OpenTelemetry Contrib - v0.90.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.90.1) +* [Java auto-instrumentation - 1.32.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0) +* [.NET auto-instrumentation - 1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.2.0) +* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) +* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) +* [Go - v0.8.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.8.0-alpha) +* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) +* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] + ## 0.89.0 ### 🛑 Breaking changes 🛑 diff --git a/README.md b/README.md index 07703d728..fc240c38b 100644 --- a/README.md +++ b/README.md @@ -686,6 +686,7 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | OpenTelemetry Operator | Kubernetes | Cert-Manager | |------------------------|----------------------|---------------------| +| v0.90.0 | v1.23 to v1.28 | v1 | | v0.89.0 | v1.23 to v1.28 | v1 | | v0.88.0 | v1.23 to v1.28 | v1 | | v0.87.0 | v1.23 to v1.28 | v1 | @@ -708,7 +709,6 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | v0.70.0 | v1.19 to v1.25 | v1 | | v0.69.0 | v1.19 to v1.25 | v1 | | v0.68.0 | v1.19 to v1.25 | v1 | -| v0.67.0 | v1.19 to v1.25 | v1 | ## Contributing and Developing diff --git a/RELEASE.md b/RELEASE.md index 458216881..d5066ac67 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -38,10 +38,10 @@ The operator should be released within a week after the [OpenTelemetry collector | Version | Release manager | |---------|-----------------| -| v0.90.0 | @jaronoff97 | | v0.91.0 | @yuriolisa | | v0.92.0 | @pavolloffay | | v0.93.0 | @VineethReddy02 | | v0.94.0 | @TylerHelmuth | | v0.95.0 | @swiatekm-sumo | | v0.96.0 | @frzifus | +| v0.97.0 | @jaronoff97 | diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index 7704ee3e2..aae3b1848 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -65,13 +65,13 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-12-05T18:09:19Z" + createdAt: "2023-12-06T14:31:16Z" 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 repository: github.com/open-telemetry/opentelemetry-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.89.0 + name: opentelemetry-operator.v0.90.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -381,7 +381,7 @@ spec: - --zap-log-level=info - --zap-time-encoding=rfc3339nano - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.89.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.90.0 livenessProbe: httpGet: path: /healthz @@ -489,7 +489,7 @@ spec: minKubeVersion: 1.23.0 provider: name: OpenTelemetry Community - version: 0.89.0 + version: 0.90.0 webhookdefinitions: - admissionReviewVersions: - v1 diff --git a/versions.txt b/versions.txt index 18f6cafa8..17d7d500c 100644 --- a/versions.txt +++ b/versions.txt @@ -2,20 +2,20 @@ # by default with the OpenTelemetry Operator. This would usually be the latest # stable OpenTelemetry version. When you update this file, make sure to update the # the docs as well. -opentelemetry-collector=0.89.0 +opentelemetry-collector=0.90.1 # Represents the current release of the OpenTelemetry Operator. -operator=0.89.0 +operator=0.90.0 # Represents the current release of the Target Allocator. -targetallocator=0.89.0 +targetallocator=0.90.0 # Represents the current release of the Operator OpAMP Bridge. -operator-opamp-bridge=0.89.0 +operator-opamp-bridge=0.90.0 # Represents the current release of Java instrumentation. # Should match autoinstrumentation/java/version.txt -autoinstrumentation-java=1.31.0 +autoinstrumentation-java=1.32.0 # Represents the current release of NodeJS instrumentation. # Should match value in autoinstrumentation/nodejs/package.json @@ -27,7 +27,7 @@ autoinstrumentation-python=0.41b0 # Represents the current release of DotNet instrumentation. # Should match autoinstrumentation/dotnet/version.txt -autoinstrumentation-dotnet=1.1.0 +autoinstrumentation-dotnet=1.2.0 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.8.0-alpha From c3b3cc242affb798d437336f7b2bf69d0c120c1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 15:03:56 +0100 Subject: [PATCH 1185/1234] Bump actions/setup-go from 3 to 5 (#2424) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/changelog.yaml | 2 +- .github/workflows/continuous-integration.yaml | 4 ++-- .github/workflows/e2e.yaml | 2 +- .github/workflows/publish-images.yaml | 2 +- .github/workflows/publish-operator-opamp-bridge.yaml | 2 +- .github/workflows/publish-target-allocator.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index 396886c52..844fb1f17 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -31,7 +31,7 @@ jobs: with: fetch-depth: 0 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "1.20" diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 788d14eed..c5259c0c0 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: "~1.21.1" @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "~1.21.1" - name: Check out code into the Go module directory diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 608634450..0ab9811ad 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "~1.21.3" cache-dependency-path: | diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml index 96a281b7a..9c82f1c7b 100644 --- a/.github/workflows/publish-images.yaml +++ b/.github/workflows/publish-images.yaml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '~1.21.3' diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml index c5833b554..f8ff72f01 100644 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ b/.github/workflows/publish-operator-opamp-bridge.yaml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '~1.21.3' cache-dependency-path: 'cmd/operator-opamp-bridge/go.sum' diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml index eb02478c3..99a7aa0da 100644 --- a/.github/workflows/publish-target-allocator.yaml +++ b/.github/workflows/publish-target-allocator.yaml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '~1.21.3' cache-dependency-path: 'cmd/otel-allocator/go.sum' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1048a76ad..735c6bf4b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: "~1.21.1" diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 10e6a2d0e..95339d67e 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -23,7 +23,7 @@ jobs: steps: - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: "~1.21.1" From 5566a016dd9fc29fdede256f2e87b69e44fdd65b Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Thu, 7 Dec 2023 17:25:23 +0100 Subject: [PATCH 1186/1234] Improve developer experience by minimizing local changes (#2421) * Improve developer experience Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay * handle e2e tests Signed-off-by: Pavol Loffay * Fix Signed-off-by: Pavol Loffay --------- Signed-off-by: Pavol Loffay --- CONTRIBUTING.md | 28 +++++++++++++++++++++++----- Makefile | 17 ++++++++++++++--- RELEASE.md | 2 +- hack/ignore-createdAt-bundle.sh | 10 ++++++---- hack/modify-test-images.sh | 16 ++++++++++------ 5 files changed, 54 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1832352fa..495c20fa6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,6 +20,22 @@ git commit -sam "Add feature X" gh pr create ``` +#### Make changes to the project manifests + +The following command should be run to make sure the project manifests are up-to-date: + +```bash +make generate manifests bundle api-docs reset +``` + +The local changes after running the command should be added to the pull request: + +The following `make` target is run on CI to verify the project structure: + +```bash +make ensure-generate-is-noop +``` + ### Pre-requisites * Install [Go](https://golang.org/doc/install). * Install [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/). @@ -37,7 +53,7 @@ Refer to the [Operator SDK documentation](https://sdk.operatorframework.io/docs/ Build the manifests, install the CRD and run the operator as a local process: ```bash -make bundle install run +make install run ``` ### Deployment with webhooks @@ -58,16 +74,16 @@ The environment variable `CERTMANAGER_VERSION` can be used to override the cert- CERTMANAGER_VERSION=1.60 make cert-manager ``` -When deploying the operator into the cluster using `make deploy`, an image in the format `ghcr.io/${USER}/opentelemetry-operator` is generated. If this format isn't suitable, it can be overridden by: +When deploying the operator into the cluster using `make deploy`, an image in the format `ghcr.io/${DOCKER_USER}/opentelemetry-operator` is generated. If this format isn't suitable, it can be overridden by: * `IMG_PREFIX`, to override the registry, namespace and image name -* `USER`, to override the namespace +* `DOCKER_USER`, to override the namespace * `IMG_REPO`, to override the repository (`opentelemetry-operator`) * `VERSION`, to override only the version part * `IMG`, to override the entire image specification ```bash -IMG=docker.io/${USER}/opentelemetry-operator:dev-$(git rev-parse --short HEAD)-$(date +%s) make generate bundle container container-push deploy +IMG=docker.io/${DOCKER_USER}/opentelemetry-operator:dev-$(git rev-parse --short HEAD)-$(date +%s) make generate container container-push deploy ``` Your operator will be available in the `opentelemetry-operator-system` namespace. @@ -108,6 +124,8 @@ Once they are installed, the tests can be executed with `make prepare-e2e`, whic The tests are located under `tests/e2e` and are written to be used with `kuttl`. Refer to their documentation to understand how tests are written. +To evert the changes made by the `make prepare-e2e` run `make reset`. + ### OpenShift End to End tests To run the end-to-end tests written for OpenShift, you'll need a OpenShift cluster. @@ -188,7 +206,7 @@ BUNDLE_IMG=docker.io/${USER}/opentelemetry-operator-bundle:latest IMG=docker.io/ ### Install the operator ```bash -operator-sdk run bundle docker.io/${USER}/opentelemetry-operator-bundle:latest +operator-sdk run bundle docker.io/${DOCKER_USER}/opentelemetry-operator-bundle:latest ``` ### Uninstall the operator diff --git a/Makefile b/Makefile index 9185fee16..d14311a89 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,8 @@ OPERATOR_LDFLAGS ?= -X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.build ARCH ?= $(shell go env GOARCH) # Image URL to use all building/pushing image targets -IMG_PREFIX ?= ghcr.io/${USER}/opentelemetry-operator +DOCKER_USER ?= open-telemetry +IMG_PREFIX ?= ghcr.io/${DOCKER_USER}/opentelemetry-operator IMG_REPO ?= opentelemetry-operator IMG ?= ${IMG_PREFIX}/${IMG_REPO}:${VERSION} BUNDLE_IMG ?= ${IMG_PREFIX}/${IMG_REPO}-bundle:${VERSION} @@ -82,7 +83,7 @@ SED ?= $(shell which gsed 2>/dev/null || which sed) .PHONY: ensure-generate-is-noop ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION) -ensure-generate-is-noop: USER=open-telemetry +ensure-generate-is-noop: DOCKER_USER=open-telemetry ensure-generate-is-noop: set-image-controller generate bundle @# on make bundle config/manager/kustomization.yaml includes changes, which should be ignored for the below check @git restore config/manager/kustomization.yaml @@ -178,7 +179,7 @@ lint: golangci-lint # Generate code .PHONY: generate -generate: controller-gen api-docs +generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." # end-to-tests @@ -442,6 +443,16 @@ bundle: kustomize operator-sdk manifests set-image-controller $(OPERATOR_SDK) bundle validate ./bundle ./hack/ignore-createdAt-bundle.sh +.PHONY: reset +reset: kustomize operator-sdk manifests + $(MAKE) VERSION=${OPERATOR_VERSION} set-image-controller + $(OPERATOR_SDK) generate kustomize manifests -q + $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version ${OPERATOR_VERSION} $(BUNDLE_METADATA_OPTS) + $(OPERATOR_SDK) bundle validate ./bundle + ./hack/ignore-createdAt-bundle.sh + git checkout config/manager/kustomization.yaml + 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 + # Build the bundle image, used only for local dev purposes .PHONY: bundle-build bundle-build: diff --git a/RELEASE.md b/RELEASE.md index d5066ac67..7d67c2703 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,7 +4,7 @@ Steps to release a new version of the OpenTelemetry Operator: 1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. 2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. -3. Run `make bundle USER=open-telemetry VERSION=0.38.0`, using the version that will be released. +3. Run `make bundle DOCKER_USER=open-telemetry VERSION=0.38.0`, using the version that will be released. 4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. 5. Add the changes to the changelog. Manually add versions of all operator components. 6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` diff --git a/hack/ignore-createdAt-bundle.sh b/hack/ignore-createdAt-bundle.sh index ddc3df191..d94a30a47 100755 --- a/hack/ignore-createdAt-bundle.sh +++ b/hack/ignore-createdAt-bundle.sh @@ -5,7 +5,9 @@ # This code checks if only the createdAt field. If is the only change, it is ignored. # Else, it will do nothing. # https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1415350333 -git diff --quiet -I'^ createdAt: ' bundle -if ((! $?)) ; then - git checkout bundle -fi \ No newline at end of file +git diff --quiet -I'^ createdAt: ' bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +ret=$? +changes=$(git diff --numstat bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml) +if [ $ret = 0 ] && [ "$changes" = '1 1 bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml' ] ; then + git checkout bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +fi diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 3f4c72b88..5c98e5398 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -2,11 +2,15 @@ SED_BIN=${SED_BIN:-sed} -${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml -${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml -${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml -${SED_BIN} -i "s#local/opentelemetry-operator-targetallocator:e2e#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-prometheuscr/*.yaml +DEFAULT_TARGETALLOCATOR_IMG=${DEFAULT_TARGETALLOCATOR_IMG:-local/opentelemetry-operator-targetallocator:e2e} +DEFAULT_OPERATOROPAMPBRIDGE_IMG=${DEFAULT_OPERATOROPAMPBRIDGE_IMG:-local/opentelemetry-operator-opamp-bridge:e2e} +DEFAULT_OPERATOR_IMG=${DEFAULT_OPERATOR_IMG:-local/opentelemetry-operator:e2e} -${SED_BIN} -i "s#local/opentelemetry-operator:e2e#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml +${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml +${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml +${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml +${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-prometheuscr/*.yaml -${SED_BIN} -i "s#local/opentelemetry-operator-opamp-bridge:e2e#${OPERATOROPAMPBRIDGE_IMG}#g" tests/e2e-opampbridge/opampbridge/*.yaml \ No newline at end of file +${SED_BIN} -i "s#${DEFAULT_OPERATOR_IMG}#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml + +${SED_BIN} -i "s#${DEFAULT_OPERATOROPAMPBRIDGE_IMG}#${OPERATOROPAMPBRIDGE_IMG}#g" tests/e2e-opampbridge/opampbridge/*.yaml From d595f403afcac351f422fa13c4cede47fe3855d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 7 Dec 2023 18:49:46 +0100 Subject: [PATCH 1187/1234] Remove configuration hot reloading from target allocator (#2425) --- .chloggen/ta_removehotreload.yaml | 16 +++++ cmd/otel-allocator/config/config.go | 18 ++--- cmd/otel-allocator/config/flags.go | 6 -- cmd/otel-allocator/config/flags_test.go | 6 -- cmd/otel-allocator/main.go | 25 +------ cmd/otel-allocator/watcher/file.go | 90 ------------------------- 6 files changed, 23 insertions(+), 138 deletions(-) create mode 100755 .chloggen/ta_removehotreload.yaml delete mode 100644 cmd/otel-allocator/watcher/file.go diff --git a/.chloggen/ta_removehotreload.yaml b/.chloggen/ta_removehotreload.yaml new file mode 100755 index 000000000..442d27dc3 --- /dev/null +++ b/.chloggen/ta_removehotreload.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove configuration hot reloading from target allocator + +# One or more tracking issues related to the change +issues: [2032] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: This only affects use of target allocator without the operator. diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index 386b0edd2..d91b057e1 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -43,7 +43,6 @@ type Config struct { KubeConfigFilePath string `yaml:"kube_config_file_path,omitempty"` ClusterConfig *rest.Config `yaml:"-"` RootLogger logr.Logger `yaml:"-"` - ReloadConfig bool `yaml:"-"` LabelSelector map[string]string `yaml:"label_selector,omitempty"` PromConfig *promconfig.Config `yaml:"config"` AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` @@ -111,11 +110,6 @@ func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { return err } - target.ReloadConfig, err = getConfigReloadEnabled(flagSet) - if err != nil { - return err - } - return nil } @@ -139,13 +133,13 @@ func CreateDefaultConfig() Config { } } -func Load() (*Config, string, error) { +func Load() (*Config, error) { var err error flagSet := getFlagSet(pflag.ExitOnError) err = flagSet.Parse(os.Args) if err != nil { - return nil, "", err + return nil, err } config := CreateDefaultConfig() @@ -153,19 +147,19 @@ func Load() (*Config, string, error) { // load the config from the config file configFilePath, err := getConfigFilePath(flagSet) if err != nil { - return nil, "", err + return nil, err } err = LoadFromFile(configFilePath, &config) if err != nil { - return nil, "", err + return nil, err } err = LoadFromCLI(&config, flagSet) if err != nil { - return nil, "", err + return nil, err } - return &config, configFilePath, nil + return &config, nil } // ValidateConfig validates the cli and file configs together. diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/config/flags.go index 152dbc803..bb7dbbb34 100644 --- a/cmd/otel-allocator/config/flags.go +++ b/cmd/otel-allocator/config/flags.go @@ -30,7 +30,6 @@ const ( listenAddrFlagName = "listen-addr" prometheusCREnabledFlagName = "enable-prometheus-cr-watcher" kubeConfigPathFlagName = "kubeconfig-path" - reloadConfigFlagName = "reload-config" ) // We can't bind this flag to our FlagSet, so we need to handle it separately. @@ -42,7 +41,6 @@ func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") flagSet.Bool(prometheusCREnabledFlagName, false, "Enable Prometheus CRs as target sources") flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") - flagSet.Bool(reloadConfigFlagName, false, "Enable automatic configuration reloading. This functionality is deprecated and will be removed in a future release.") zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) zapCmdLineOpts.BindFlags(zapFlagSet) flagSet.AddGoFlagSet(zapFlagSet) @@ -64,7 +62,3 @@ func getListenAddr(flagSet *pflag.FlagSet) (string, error) { func getPrometheusCREnabled(flagSet *pflag.FlagSet) (bool, error) { return flagSet.GetBool(prometheusCREnabledFlagName) } - -func getConfigReloadEnabled(flagSet *pflag.FlagSet) (bool, error) { - return flagSet.GetBool(reloadConfigFlagName) -} diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/config/flags_test.go index 9d50212a2..b1bf11b6c 100644 --- a/cmd/otel-allocator/config/flags_test.go +++ b/cmd/otel-allocator/config/flags_test.go @@ -64,12 +64,6 @@ func TestFlagGetters(t *testing.T) { expectedValue: true, getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getPrometheusCREnabled(fs) }, }, - { - name: "GetConfigReloadEnabled", - flagArgs: []string{"--" + reloadConfigFlagName, "true"}, - expectedValue: true, - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigReloadEnabled(fs) }, - }, { name: "InvalidFlag", flagArgs: []string{"--invalid-flag", "value"}, diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go index b89824503..4f805519b 100644 --- a/cmd/otel-allocator/main.go +++ b/cmd/otel-allocator/main.go @@ -54,7 +54,6 @@ func main() { allocator allocation.Allocator discoveryManager *discovery.Manager collectorWatcher *collector.Client - fileWatcher allocatorWatcher.Watcher promWatcher allocatorWatcher.Watcher targetDiscoverer *target.Discoverer @@ -65,7 +64,7 @@ func main() { interrupts = make(chan os.Signal, 1) errChan = make(chan error) ) - cfg, configFilePath, err := config.Load() + cfg, err := config.Load() if err != nil { fmt.Printf("Failed to load config: %v", err) os.Exit(1) @@ -99,13 +98,6 @@ func main() { setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") os.Exit(1) } - if cfg.ReloadConfig { - fileWatcher, err = allocatorWatcher.NewFileWatcher(setupLog.WithName("file-watcher"), configFilePath) - if err != nil { - setupLog.Error(err, "Can't start the file watcher") - os.Exit(1) - } - } signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) defer close(interrupts) @@ -129,21 +121,6 @@ func main() { } }) } - if cfg.ReloadConfig { - runGroup.Add( - func() error { - fileWatcherErr := fileWatcher.Watch(eventChan, errChan) - setupLog.Info("File watcher exited") - return fileWatcherErr - }, - func(_ error) { - setupLog.Info("Closing file watcher") - fileWatcherErr := fileWatcher.Close() - if fileWatcherErr != nil { - setupLog.Error(fileWatcherErr, "file watcher failed to close") - } - }) - } runGroup.Add( func() error { discoveryManagerErr := discoveryManager.Run() diff --git a/cmd/otel-allocator/watcher/file.go b/cmd/otel-allocator/watcher/file.go deleted file mode 100644 index ef7ea166b..000000000 --- a/cmd/otel-allocator/watcher/file.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package watcher - -import ( - "context" - "path/filepath" - - "github.com/fsnotify/fsnotify" - "github.com/go-logr/logr" - promconfig "github.com/prometheus/prometheus/config" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" -) - -var _ Watcher = &FileWatcher{} - -type FileWatcher struct { - logger logr.Logger - configFilePath string - watcher *fsnotify.Watcher - closer chan bool -} - -func NewFileWatcher(logger logr.Logger, configFilePath string) (*FileWatcher, error) { - fileWatcher, err := fsnotify.NewWatcher() - if err != nil { - logger.Error(err, "Can't start the watcher") - return &FileWatcher{}, err - } - - return &FileWatcher{ - logger: logger, - configFilePath: configFilePath, - watcher: fileWatcher, - closer: make(chan bool), - }, nil -} - -func (f *FileWatcher) LoadConfig(_ context.Context) (*promconfig.Config, error) { - cfg := config.CreateDefaultConfig() - err := config.LoadFromFile(f.configFilePath, &cfg) - if err != nil { - f.logger.Error(err, "Unable to load configuration") - return nil, err - } - return cfg.PromConfig, nil -} - -func (f *FileWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { - err := f.watcher.Add(filepath.Dir(f.configFilePath)) - if err != nil { - return err - } - - for { - select { - case <-f.closer: - return nil - case fileEvent := <-f.watcher.Events: - // Using Op.Has as per this doc - https://github.com/fsnotify/fsnotify/blob/9342b6df577910c6eac718dc62845d8c95f8548b/fsnotify.go#L30 - if fileEvent.Op.Has(fsnotify.Create) || fileEvent.Op.Has(fsnotify.Write) { - f.logger.Info("File change detected", "event", fileEvent.Op.String()) - upstreamEvents <- Event{ - Source: EventSourceConfigMap, - Watcher: Watcher(f), - } - } - case err := <-f.watcher.Errors: - upstreamErrors <- err - } - } -} - -func (f *FileWatcher) Close() error { - f.closer <- true - return f.watcher.Close() -} From 4dfdba0d2231d084ceb41fabdd5ccefd88013ab3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:28:07 +0100 Subject: [PATCH 1188/1234] Bump alpine from 3.18 to 3.19 in /cmd/otel-allocator (#2429) Bumps alpine from 3.18 to 3.19. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile index 1a2b9b7a2..0d50a4f54 100644 --- a/cmd/otel-allocator/Dockerfile +++ b/cmd/otel-allocator/Dockerfile @@ -1,5 +1,5 @@ # Get CA certificates from the Alpine package repo -FROM alpine:3.18 as certificates +FROM alpine:3.19 as certificates RUN apk --no-cache add ca-certificates From abcc30b40d2219d1707d2d160acd746ac9806fad Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 8 Dec 2023 14:22:01 +0530 Subject: [PATCH 1189/1234] Add e2e test case for OTEL Kafka receiver and exporter. (#2274) --- tests/e2e-openshift/kafka/00-assert.yaml | 180 ++++++++++++++++++ .../kafka/00-create-kafka-instance.yaml | 60 ++++++ tests/e2e-openshift/kafka/01-assert.yaml | 13 ++ .../kafka/01-create-kafka-topics.yaml | 13 ++ tests/e2e-openshift/kafka/02-assert.yaml | 39 ++++ .../kafka/02-otel-kakfa-receiver.yaml | 22 +++ tests/e2e-openshift/kafka/03-assert.yaml | 75 ++++++++ .../kafka/03-otel-kakfa-exporter.yaml | 25 +++ tests/e2e-openshift/kafka/04-assert.yaml | 9 + .../kafka/04-generate-traces.yaml | 26 +++ tests/e2e-openshift/kafka/05-assert.yaml | 6 + tests/e2e-openshift/kafka/check_traces.sh | 39 ++++ 12 files changed, 507 insertions(+) create mode 100644 tests/e2e-openshift/kafka/00-assert.yaml create mode 100644 tests/e2e-openshift/kafka/00-create-kafka-instance.yaml create mode 100644 tests/e2e-openshift/kafka/01-assert.yaml create mode 100644 tests/e2e-openshift/kafka/01-create-kafka-topics.yaml create mode 100644 tests/e2e-openshift/kafka/02-assert.yaml create mode 100644 tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml create mode 100644 tests/e2e-openshift/kafka/03-assert.yaml create mode 100644 tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml create mode 100644 tests/e2e-openshift/kafka/04-assert.yaml create mode 100644 tests/e2e-openshift/kafka/04-generate-traces.yaml create mode 100644 tests/e2e-openshift/kafka/05-assert.yaml create mode 100755 tests/e2e-openshift/kafka/check_traces.sh diff --git a/tests/e2e-openshift/kafka/00-assert.yaml b/tests/e2e-openshift/kafka/00-assert.yaml new file mode 100644 index 000000000..7474e7da9 --- /dev/null +++ b/tests/e2e-openshift/kafka/00-assert.yaml @@ -0,0 +1,180 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-kafka + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/instance: my-cluster + app.kubernetes.io/managed-by: strimzi-cluster-operator + app.kubernetes.io/name: entity-operator + app.kubernetes.io/part-of: strimzi-my-cluster + strimzi.io/cluster: my-cluster + strimzi.io/component-type: entity-operator + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-entity-operator + name: my-cluster-entity-operator + namespace: kuttl-kafka +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Pod +metadata: + name: my-cluster-kafka-0 + namespace: kuttl-kafka +status: + phase: Running + +--- +apiVersion: v1 +kind: Pod +metadata: + name: my-cluster-zookeeper-0 + namespace: kuttl-kafka +status: + phase: Running + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: my-cluster + app.kubernetes.io/managed-by: strimzi-cluster-operator + app.kubernetes.io/name: kafka + app.kubernetes.io/part-of: strimzi-my-cluster + strimzi.io/cluster: my-cluster + strimzi.io/component-type: kafka + strimzi.io/discovery: "true" + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-kafka + name: my-cluster-kafka-bootstrap + namespace: kuttl-kafka +spec: + ports: + - name: tcp-replication + port: 9091 + protocol: TCP + targetPort: 9091 + - name: tcp-clients + port: 9092 + protocol: TCP + targetPort: 9092 + - name: tcp-clientstls + port: 9093 + protocol: TCP + targetPort: 9093 + selector: + strimzi.io/cluster: my-cluster + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-kafka + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: my-cluster + app.kubernetes.io/managed-by: strimzi-cluster-operator + app.kubernetes.io/name: kafka + app.kubernetes.io/part-of: strimzi-my-cluster + strimzi.io/cluster: my-cluster + strimzi.io/component-type: kafka + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-kafka + name: my-cluster-kafka-brokers + namespace: kuttl-kafka +spec: + ports: + - name: tcp-ctrlplane + port: 9090 + protocol: TCP + targetPort: 9090 + - name: tcp-replication + port: 9091 + protocol: TCP + targetPort: 9091 + - name: tcp-kafkaagent + port: 8443 + protocol: TCP + targetPort: 8443 + - name: tcp-clients + port: 9092 + protocol: TCP + targetPort: 9092 + - name: tcp-clientstls + port: 9093 + protocol: TCP + targetPort: 9093 + publishNotReadyAddresses: true + selector: + strimzi.io/cluster: my-cluster + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-kafka + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: my-cluster + app.kubernetes.io/managed-by: strimzi-cluster-operator + app.kubernetes.io/name: zookeeper + app.kubernetes.io/part-of: strimzi-my-cluster + strimzi.io/cluster: my-cluster + strimzi.io/component-type: zookeeper + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-zookeeper + name: my-cluster-zookeeper-client + namespace: kuttl-kafka +spec: + ports: + - name: tcp-clients + port: 2181 + protocol: TCP + targetPort: 2181 + selector: + strimzi.io/cluster: my-cluster + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-zookeeper + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/instance: my-cluster + app.kubernetes.io/managed-by: strimzi-cluster-operator + app.kubernetes.io/name: zookeeper + app.kubernetes.io/part-of: strimzi-my-cluster + strimzi.io/cluster: my-cluster + strimzi.io/component-type: zookeeper + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-zookeeper + name: my-cluster-zookeeper-nodes + namespace: kuttl-kafka +spec: + ports: + - name: tcp-clients + port: 2181 + protocol: TCP + targetPort: 2181 + - name: tcp-clustering + port: 2888 + protocol: TCP + targetPort: 2888 + - name: tcp-election + port: 3888 + protocol: TCP + targetPort: 3888 + selector: + strimzi.io/cluster: my-cluster + strimzi.io/kind: Kafka + strimzi.io/name: my-cluster-zookeeper diff --git a/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml b/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml new file mode 100644 index 000000000..22b30c075 --- /dev/null +++ b/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml @@ -0,0 +1,60 @@ +#For creating the Kafka instance, install the AMQ streams operator https://access.redhat.com/documentation/en-us/red_hat_amq_streams/2.5/html/getting_started_with_amq_streams_on_openshift/proc-deploying-cluster-operator-hub-str + +apiVersion: v1 +kind: Namespace +metadata: + name: kuttl-kafka + +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: Kafka +metadata: + name: my-cluster + namespace: kuttl-kafka +spec: + entityOperator: + topicOperator: + reconciliationIntervalSeconds: 90 + userOperator: + reconciliationIntervalSeconds: 120 + kafka: + config: + log.message.format.version: 3.5.0 + message.max.bytes: 10485760 + offsets.topic.replication.factor: 1 + ssl.cipher.suites: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + ssl.enabled.protocols: TLSv1.2 + ssl.protocol: TLSv1.2 + transaction.state.log.min.isr: 1 + transaction.state.log.replication.factor: 1 + jvmOptions: + -Xms: 1024m + -Xmx: 1024m + listeners: + - configuration: + useServiceDnsDomain: true + name: plain + port: 9092 + tls: false + type: internal + - authentication: + type: tls + name: tls + port: 9093 + tls: true + type: internal + replicas: 1 + resources: + limits: + cpu: "1" + memory: 4Gi + requests: + cpu: "1" + memory: 4Gi + storage: + type: ephemeral + version: 3.5.0 + zookeeper: + replicas: 1 + storage: + type: ephemeral diff --git a/tests/e2e-openshift/kafka/01-assert.yaml b/tests/e2e-openshift/kafka/01-assert.yaml new file mode 100644 index 000000000..eceae60c4 --- /dev/null +++ b/tests/e2e-openshift/kafka/01-assert.yaml @@ -0,0 +1,13 @@ +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: otlp-spans + namespace: kuttl-kafka +spec: + config: + retention.ms: 300000 + segment.bytes: 1073741824 + partitions: 1 + replicas: 1 +status: + topicName: otlp-spans diff --git a/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml b/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml new file mode 100644 index 000000000..e7cfcc23d --- /dev/null +++ b/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml @@ -0,0 +1,13 @@ +apiVersion: kafka.strimzi.io/v1beta1 +kind: KafkaTopic +metadata: + labels: + strimzi.io/cluster: my-cluster + name: otlp-spans + namespace: kuttl-kafka +spec: + config: + retention.ms: 300000 + segment.bytes: 1073741824 + partitions: 1 + replicas: 1 diff --git a/tests/e2e-openshift/kafka/02-assert.yaml b/tests/e2e-openshift/kafka/02-assert.yaml new file mode 100644 index 000000000..5fa0ca140 --- /dev/null +++ b/tests/e2e-openshift/kafka/02-assert.yaml @@ -0,0 +1,39 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: kafka-receiver-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: kafka-receiver-collector + namespace: kuttl-kafka +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: kafka-receiver-collector-monitoring + name: kafka-receiver-collector-monitoring + namespace: kuttl-kafka +spec: + ports: + - name: monitoring + port: 8888 + protocol: TCP + targetPort: 8888 + selector: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-receiver + app.kubernetes.io/managed-by: opentelemetry-operator + type: ClusterIP diff --git a/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml b/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml new file mode 100644 index 000000000..800732cef --- /dev/null +++ b/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml @@ -0,0 +1,22 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: kafka-receiver + namespace: kuttl-kafka +spec: + mode: "deployment" + config: | + receivers: + kafka/traces: + brokers: ["my-cluster-kafka-brokers.kuttl-kafka.svc:9092"] + protocol_version: 3.5.0 + topic: otlp-spans + exporters: + debug: + verbosity: detailed + service: + pipelines: + traces: + receivers: [kafka/traces] + processors: [] + exporters: [debug] diff --git a/tests/e2e-openshift/kafka/03-assert.yaml b/tests/e2e-openshift/kafka/03-assert.yaml new file mode 100644 index 000000000..6881d1730 --- /dev/null +++ b/tests/e2e-openshift/kafka/03-assert.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-exporter + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: kafka-exporter-collector + app.kubernetes.io/part-of: opentelemetry + app.kubernetes.io/version: latest + name: kafka-exporter-collector + namespace: kuttl-kafka +status: + availableReplicas: 1 + readyReplicas: 1 + replicas: 1 + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-exporter + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: kafka-exporter-collector + name: kafka-exporter-collector + namespace: kuttl-kafka +spec: + ports: + - 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: kuttl-kafka.kafka-exporter + app.kubernetes.io/managed-by: opentelemetry-operator + sessionAffinity: None + +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/component: opentelemetry-collector + app.kubernetes.io/instance: kuttl-kafka.kafka-exporter + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: kafka-exporter-collector + operator.opentelemetry.io/collector-headless-service: Exists + name: kafka-exporter-collector-headless + namespace: kuttl-kafka +spec: + ports: + - 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: kuttl-kafka.kafka-exporter + app.kubernetes.io/managed-by: opentelemetry-operator + type: ClusterIP diff --git a/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml b/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml new file mode 100644 index 000000000..65f1f114f --- /dev/null +++ b/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml @@ -0,0 +1,25 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: kafka-exporter + namespace: kuttl-kafka +spec: + mode: deployment + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + exporters: + kafka/traces: + brokers: ["my-cluster-kafka-brokers.kuttl-kafka.svc:9092"] + protocol_version: 3.5.0 + topic: otlp-spans + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [kafka/traces] diff --git a/tests/e2e-openshift/kafka/04-assert.yaml b/tests/e2e-openshift/kafka/04-assert.yaml new file mode 100644 index 000000000..942ada3c5 --- /dev/null +++ b/tests/e2e-openshift/kafka/04-assert.yaml @@ -0,0 +1,9 @@ +apiVersion: batch/v1 +kind: Job +metadata: + labels: + app: telemetrygen-traces + job-name: telemetrygen-traces + name: telemetrygen-traces +status: + succeeded: 1 diff --git a/tests/e2e-openshift/kafka/04-generate-traces.yaml b/tests/e2e-openshift/kafka/04-generate-traces.yaml new file mode 100644 index 000000000..11f2d1fd7 --- /dev/null +++ b/tests/e2e-openshift/kafka/04-generate-traces.yaml @@ -0,0 +1,26 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: telemetrygen-traces +spec: + completions: 1 + parallelism: 1 + template: + metadata: + labels: + app: telemetrygen-traces + spec: + containers: + - name: telemetrygen-traces + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + command: ["./telemetrygen"] + args: + - "--otlp-endpoint=kafka-exporter-collector-headless.kuttl-kafka.svc:4317" + - "--otlp-insecure=true" + - "--rate=1" + - "--duration=30s" + - "--otlp-attributes=test=\"kuttl-kafka\"" + - "--otlp-header=kafka-topic=\"otlp-spans\"" + - "--service=\"kafka\"" + - "traces" + restartPolicy: Never diff --git a/tests/e2e-openshift/kafka/05-assert.yaml b/tests/e2e-openshift/kafka/05-assert.yaml new file mode 100644 index 000000000..0dfd963f9 --- /dev/null +++ b/tests/e2e-openshift/kafka/05-assert.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 30 +commands: +- script: ./tests/e2e-openshift/kafka/check_traces.sh diff --git a/tests/e2e-openshift/kafka/check_traces.sh b/tests/e2e-openshift/kafka/check_traces.sh new file mode 100755 index 000000000..05b4755d0 --- /dev/null +++ b/tests/e2e-openshift/kafka/check_traces.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# This script checks the kafka-receiver OTEL collector pod for the presence of Traces. + +# Define the label selector +LABEL_SELECTOR="app.kubernetes.io/instance=kuttl-kafka.kafka-receiver" + +# Define the search strings +SEARCH_STRING1='-> service.name: Str("kafka")' +SEARCH_STRING2='-> test: Str(kuttl-kafka)' + +# Get the list of pods with the specified label +PODS=$(kubectl -n kuttl-kafka get pods -l $LABEL_SELECTOR -o jsonpath='{.items[*].metadata.name}') + +# Initialize flags to track if strings are found +FOUND1=false +FOUND2=false + +# Loop through each pod and search for the strings in the logs +for POD in $PODS; do + # Search for the first string + if ! $FOUND1 && kubectl -n kuttl-kafka logs $POD | grep -q -- "$SEARCH_STRING1"; then + echo "\"$SEARCH_STRING1\" found in $POD" + FOUND1=true + fi + # Search for the second string + if ! $FOUND2 && kubectl -n kuttl-kafka logs $POD | grep -q -- "$SEARCH_STRING2"; then + echo "\"$SEARCH_STRING2\" found in $POD" + FOUND2=true + fi +done + +# Check if either of the strings was not found +if ! $FOUND1 || ! $FOUND2; then + echo "No Traces with service name Kafka and attribute test=kuttl-kafka found." + exit 1 +else + echo "Traces with service name Kafka and attribute test=kuttl-kafka found." +fi + From 61ead76722d2def879eee2fdf943d520c1610bbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:47:18 +0100 Subject: [PATCH 1190/1234] Bump alpine from 3.18 to 3.19 in /cmd/operator-opamp-bridge (#2428) Bumps alpine from 3.18 to 3.19. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile index f4248cac1..ebf707b24 100644 --- a/cmd/operator-opamp-bridge/Dockerfile +++ b/cmd/operator-opamp-bridge/Dockerfile @@ -1,5 +1,5 @@ # Get CA certificates from the Alpine package repo -FROM alpine:3.18 as certificates +FROM alpine:3.19 as certificates RUN apk --no-cache add ca-certificates From 0ce68dcfeaab7db172cbcef4c2935cf0d2de547a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:24:50 -0500 Subject: [PATCH 1191/1234] Bump the prometheus group with 1 update (#2432) Bumps the prometheus group with 1 update: [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus). - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.48.0...v0.48.1) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: prometheus ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 96eaaa871..fe35dd5bc 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 - github.com/prometheus/prometheus v0.48.0 + github.com/prometheus/prometheus v0.48.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v0.77.0 diff --git a/go.sum b/go.sum index 9daf42945..cccf5d8da 100644 --- a/go.sum +++ b/go.sum @@ -453,8 +453,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= -github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= +github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbELKS+NFk= +github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= From 3278097240f229c351859e030f65cfa3aa7aa175 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:12:18 -0500 Subject: [PATCH 1192/1234] Bump github/codeql-action from 2 to 3 (#2440) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/continuous-integration.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index c5259c0c0..848b98d27 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -58,12 +58,12 @@ jobs: uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From a9236f23faa4f27b2dbf9f4733c9761e5eb182fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:48:01 +0100 Subject: [PATCH 1193/1234] Bump the kubernetes group in /cmd/otel-allocator with 2 updates (#2441) Bumps the kubernetes group in /cmd/otel-allocator with 2 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) and [k8s.io/client-go](https://github.com/kubernetes/client-go). Updates `k8s.io/apimachinery` from 0.28.4 to 0.29.0 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.28.4...v0.29.0) Updates `k8s.io/client-go` from 0.28.4 to 0.29.0 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.28.4...v0.29.0) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: kubernetes ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 12 ++++++------ cmd/otel-allocator/go.sum | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 61994501a..159a484de 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -7,7 +7,6 @@ toolchain go1.21.3 require ( github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.2.0 - github.com/fsnotify/fsnotify v1.7.0 github.com/ghodss/yaml v1.0.0 github.com/gin-gonic/gin v1.9.1 github.com/go-kit/log v0.2.1 @@ -24,9 +23,9 @@ require ( github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.28.4 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.4 + k8s.io/api v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 k8s.io/klog/v2 v2.110.1 sigs.k8s.io/controller-runtime v0.16.3 ) @@ -66,6 +65,7 @@ require ( github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fatih/color v1.15.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -192,10 +192,10 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect - k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index bd66fd31e..f30b8a5d5 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -543,10 +543,10 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -1097,20 +1097,20 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f h1:eeEUOoGYWhOz7EyXqhlR2zHKNw2mNJ9vzJmub6YN6kk= -k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -1121,7 +1121,7 @@ sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigw sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= From 956fb8966592efe4761f362b147a7a3b0176ba3e Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Fri, 15 Dec 2023 21:18:36 +0530 Subject: [PATCH 1194/1234] Add cluster role and binding required for OpenShift monitoring dependent cases (#2434) --- tests/e2e-openshift/monitoring/03-assert.yaml | 28 ++++++++++++++++++ .../03-create-monitoring-roles.yaml | 23 +++++++++++++++ .../otlp-metrics-traces/03-assert.yaml | 29 +++++++++++++++++++ .../03-metrics-traces-gen.yaml | 25 ++++++++++++++++ 4 files changed, 105 insertions(+) create mode 100644 tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml diff --git a/tests/e2e-openshift/monitoring/03-assert.yaml b/tests/e2e-openshift/monitoring/03-assert.yaml index 46f97913d..2f1f82d41 100644 --- a/tests/e2e-openshift/monitoring/03-assert.yaml +++ b/tests/e2e-openshift/monitoring/03-assert.yaml @@ -1,3 +1,31 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kuttl-cluster-monitoring-metrics-api +rules: +- apiGroups: + - monitoring.coreos.com + resources: + - prometheuses/api + verbs: + - get + - list + - watch + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kuttl-cluster-monitoring-metrics-api +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kuttl-cluster-monitoring-metrics-api +subjects: +- kind: ServiceAccount + name: prometheus-user-workload + namespace: openshift-user-workload-monitoring + --- apiVersion: kuttl.dev/v1beta1 kind: TestAssert diff --git a/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml b/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml new file mode 100644 index 000000000..6ee5291eb --- /dev/null +++ b/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml @@ -0,0 +1,23 @@ +# Add the clusterrole and rolebinding required for fetching metrics from Thanos querier. Refer https://issues.redhat.com/browse/MON-3379 +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kuttl-cluster-monitoring-metrics-api +rules: +- apiGroups: ["monitoring.coreos.com"] + resources: ["prometheuses/api"] + verbs: ["get", "list", "watch"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kuttl-cluster-monitoring-metrics-api +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kuttl-cluster-monitoring-metrics-api +subjects: +- kind: ServiceAccount + name: prometheus-user-workload + namespace: openshift-user-workload-monitoring diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml index 73bbb738a..cac0e077d 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml @@ -1,3 +1,32 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kuttl-cluster-monitoring-metrics-api +rules: +- apiGroups: + - monitoring.coreos.com + resources: + - prometheuses/api + verbs: + - get + - list + - watch + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kuttl-cluster-monitoring-metrics-api +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kuttl-cluster-monitoring-metrics-api +subjects: +- kind: ServiceAccount + name: prometheus-user-workload + namespace: openshift-user-workload-monitoring + +--- apiVersion: batch/v1 kind: Job metadata: diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml index 441b8877a..0b2bd5929 100644 --- a/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml +++ b/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml @@ -1,3 +1,28 @@ +# Add the clusterrole and rolebinding required for fetching metrics from Thanos querier. Refer https://issues.redhat.com/browse/MON-3379 +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kuttl-cluster-monitoring-metrics-api +rules: +- apiGroups: ["monitoring.coreos.com"] + resources: ["prometheuses/api"] + verbs: ["get", "list", "watch"] + +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kuttl-cluster-monitoring-metrics-api +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kuttl-cluster-monitoring-metrics-api +subjects: +- kind: ServiceAccount + name: prometheus-user-workload + namespace: openshift-user-workload-monitoring + +--- apiVersion: batch/v1 kind: Job metadata: From 94fdf75981c7a1c9a582371f3e93609712b56ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 18 Dec 2023 09:34:08 +0000 Subject: [PATCH 1195/1234] Bump the kubernetes group in /cmd/operator-opamp-bridge with 2 updates (#2447) * Bump the kubernetes group in /cmd/operator-opamp-bridge with 2 updates * Fix autoscaling E2E test --- cmd/operator-opamp-bridge/go.mod | 12 +++--- cmd/operator-opamp-bridge/go.sum | 37 ++++++++++++------- tests/e2e-autoscale/autoscale/02-install.yaml | 8 ++-- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 5eebcb923..4a6065260 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge -go 1.20 +go 1.21 require ( github.com/go-logr/logr v1.3.0 @@ -17,8 +17,8 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.21.0 go.uber.org/multierr v1.11.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.4 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 k8s.io/klog/v2 v2.110.1 k8s.io/utils v0.0.0-20230726121419-3b25d923346b sigs.k8s.io/controller-runtime v0.16.3 @@ -86,10 +86,10 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.4 // indirect + k8s.io/api v0.29.0 // indirect k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index d17e3cc31..e7eddeb59 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -1,5 +1,6 @@ github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -38,9 +39,11 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -58,6 +61,7 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -76,6 +80,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -95,8 +100,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0= github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= github.com/open-telemetry/opentelemetry-operator v0.85.0 h1:HwKfaxePbGJCbl3y2rselSnT1QUw1Xd+81DkYTEvws8= @@ -117,6 +124,7 @@ github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -159,6 +167,7 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -217,7 +226,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -227,6 +237,7 @@ gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuB google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= @@ -249,27 +260,27 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/tests/e2e-autoscale/autoscale/02-install.yaml b/tests/e2e-autoscale/autoscale/02-install.yaml index b3a5b5119..29d8853c1 100644 --- a/tests/e2e-autoscale/autoscale/02-install.yaml +++ b/tests/e2e-autoscale/autoscale/02-install.yaml @@ -11,12 +11,12 @@ spec: command: - "./telemetrygen" args: - - -otlp-endpoint=simplest-set-utilization-collector-headless:4317 - - -otlp-insecure + - --otlp-endpoint=simplest-set-utilization-collector-headless:4317 + - --otlp-insecure # High duration to ensure the trace creation doesn't stop. # It'll be stopped in step 4 - - -duration=1m - - -workers=20 + - --duration=1m + - --workers=20 - traces restartPolicy: Never backoffLimit: 4 From 3196cee1ad612bf3daab7b8ed8c45c834aeb7757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 18 Dec 2023 09:34:35 +0000 Subject: [PATCH 1196/1234] Bump the kubernetes group with 2 updates (#2446) --- .../opentelemetry.io_opampbridges.yaml | 175 +++++++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 364 +++++++++++++++--- .../bases/opentelemetry.io_opampbridges.yaml | 175 +++++++-- ...ntelemetry.io_opentelemetrycollectors.yaml | 364 +++++++++++++++--- go.mod | 18 +- go.sum | 68 +++- .../manifests/collector/statefulset_test.go | 2 +- .../manifests/collector/volumeclaim_test.go | 4 +- 8 files changed, 975 insertions(+), 195 deletions(-) diff --git a/bundle/manifests/opentelemetry.io_opampbridges.yaml b/bundle/manifests/opentelemetry.io_opampbridges.yaml index 83d809ba6..38439dbc4 100644 --- a/bundle/manifests/opentelemetry.io_opampbridges.yaml +++ b/bundle/manifests/opentelemetry.io_opampbridges.yaml @@ -251,7 +251,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -295,6 +296,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -384,7 +399,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -425,6 +441,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -509,7 +539,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -553,6 +584,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -642,7 +687,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -683,6 +729,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1909,30 +1969,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2005,6 +2041,11 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -2351,6 +2392,84 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index c89d429c4..fd77336e7 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -311,6 +311,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -395,6 +407,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -1360,7 +1384,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1404,6 +1429,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -1493,7 +1532,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1534,6 +1574,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1618,7 +1672,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1662,6 +1717,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -1751,7 +1820,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1792,6 +1862,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -2609,6 +2693,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -2693,6 +2789,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -3521,6 +3629,17 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -3604,6 +3723,17 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -4309,7 +4439,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list @@ -4354,6 +4485,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4445,7 +4592,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -4489,6 +4637,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4579,7 +4741,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list @@ -4624,6 +4787,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4715,7 +4894,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -4759,6 +4939,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -5584,28 +5778,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate." - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where - this field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5672,6 +5844,10 @@ spec: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used to set + the VolumeAttributesClass used by this claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not @@ -5763,6 +5939,27 @@ spec: - type type: object type: array + currentVolumeAttributesClassName: + description: currentVolumeAttributesClassName is the current + name of the VolumeAttributesClass the PVC is using. + type: string + modifyVolumeStatus: + description: ModifyVolumeStatus represents the status object + of ControllerModifyVolume operation. When this is unset, + there is no ModifyVolume operation being attempted. + properties: + status: + description: status is the status of the ControllerModifyVolume + operation. + type: string + targetVolumeAttributesClassName: + description: targetVolumeAttributesClassName is the + name of the VolumeAttributesClass the PVC currently + being reconciled + type: string + required: + - status + type: object phase: description: phase represents the current phase of PersistentVolumeClaim. type: string @@ -6260,30 +6457,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6356,6 +6529,11 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -6702,6 +6880,84 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project diff --git a/config/crd/bases/opentelemetry.io_opampbridges.yaml b/config/crd/bases/opentelemetry.io_opampbridges.yaml index 439d923de..cc5c8f9e8 100644 --- a/config/crd/bases/opentelemetry.io_opampbridges.yaml +++ b/config/crd/bases/opentelemetry.io_opampbridges.yaml @@ -248,7 +248,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -292,6 +293,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -381,7 +396,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -422,6 +438,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -506,7 +536,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -550,6 +581,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -639,7 +684,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -680,6 +726,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1906,30 +1966,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -2002,6 +2038,11 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -2348,6 +2389,84 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 6bc2e810e..8b1f703fe 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -308,6 +308,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -392,6 +404,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -1357,7 +1381,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1401,6 +1426,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -1490,7 +1529,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1531,6 +1571,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -1615,7 +1669,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1659,6 +1714,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -1748,7 +1817,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -1789,6 +1859,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied to the @@ -2606,6 +2690,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -2690,6 +2786,18 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -3518,6 +3626,17 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -3601,6 +3720,17 @@ spec: required: - port type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. @@ -4306,7 +4436,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list @@ -4351,6 +4482,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4442,7 +4589,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -4486,6 +4634,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4576,7 +4738,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list @@ -4621,6 +4784,22 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -4712,7 +4891,8 @@ spec: properties: labelSelector: description: A label query over a set of resources, - in this case pods. + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. properties: matchExpressions: description: matchExpressions is a list of label @@ -4756,6 +4936,20 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies to. The term is applied @@ -5581,28 +5775,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate." - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where - this field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5669,6 +5841,10 @@ spec: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used to set + the VolumeAttributesClass used by this claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not @@ -5760,6 +5936,27 @@ spec: - type type: object type: array + currentVolumeAttributesClassName: + description: currentVolumeAttributesClassName is the current + name of the VolumeAttributesClass the PVC is using. + type: string + modifyVolumeStatus: + description: ModifyVolumeStatus represents the status object + of ControllerModifyVolume operation. When this is unset, + there is no ModifyVolume operation being attempted. + properties: + status: + description: status is the status of the ControllerModifyVolume + operation. + type: string + targetVolumeAttributesClassName: + description: targetVolumeAttributesClassName is the + name of the VolumeAttributesClass the PVC currently + being reconciled + type: string + required: + - status + type: object phase: description: phase represents the current phase of PersistentVolumeClaim. type: string @@ -6257,30 +6454,6 @@ spec: description: resources represents the minimum resources the volume should have. properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6353,6 +6526,11 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -6699,6 +6877,84 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project diff --git a/go.mod b/go.mod index fe35dd5bc..6b58f03dd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/open-telemetry/opentelemetry-operator -go 1.20 +go 1.21 retract v1.51.0 @@ -18,12 +18,12 @@ require ( go.opentelemetry.io/collector/featuregate v0.77.0 go.opentelemetry.io/otel v1.21.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.4 - k8s.io/apiextensions-apiserver v0.28.4 - k8s.io/apimachinery v0.28.4 - k8s.io/client-go v0.28.4 - k8s.io/component-base v0.28.4 - k8s.io/kubectl v0.28.4 + k8s.io/api v0.29.0 + k8s.io/apiextensions-apiserver v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 + k8s.io/component-base v0.29.0 + k8s.io/kubectl v0.29.0 k8s.io/utils v0.0.0-20231127182322-b307cd553661 sigs.k8s.io/controller-runtime v0.16.3 ) @@ -55,7 +55,7 @@ require ( github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/zapr v1.2.4 // indirect @@ -153,7 +153,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index cccf5d8da..a1b52cd5f 100644 --- a/go.sum +++ b/go.sum @@ -46,11 +46,15 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aov github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -78,6 +82,7 @@ github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -105,6 +110,7 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= @@ -124,6 +130,7 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -132,8 +139,9 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -164,6 +172,7 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -204,6 +213,7 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -235,6 +245,7 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -256,6 +267,7 @@ github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWf github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= +github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -272,6 +284,7 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -283,10 +296,12 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -311,6 +326,7 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= +github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -340,6 +356,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -369,6 +386,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= +github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= @@ -377,10 +395,12 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -389,15 +409,20 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -457,6 +482,7 @@ github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbE github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= @@ -464,6 +490,7 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= +github.com/shoenig/test v0.6.6/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -511,6 +538,7 @@ go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -626,6 +654,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -680,7 +709,6 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= @@ -860,6 +888,7 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -872,6 +901,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -879,22 +909,22 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= -k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= -k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU= -k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM= -k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= -k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= -k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= -k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= -k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= -k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= +k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= +k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.28.4 h1:gWpUXW/T7aFne+rchYeHkyB8eVDl5UZce8G4X//kjUQ= -k8s.io/kubectl v0.28.4/go.mod h1:CKOccVx3l+3MmDbkXtIUtibq93nN2hkDR99XDCn7c/c= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kubectl v0.29.0 h1:Oqi48gXjikDhrBF67AYuZRTcJV4lg2l42GmvsP7FmYI= +k8s.io/kubectl v0.29.0/go.mod h1:0jMjGWIcMIQzmUaMgAzhSELv5WtHo2a8pq67DtviAJs= k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index 332399ed7..142f87004 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -143,7 +143,7 @@ func TestStatefulSetVolumeClaimTemplates(t *testing.T) { }, Spec: corev1.PersistentVolumeClaimSpec{ AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, }, }, diff --git a/internal/manifests/collector/volumeclaim_test.go b/internal/manifests/collector/volumeclaim_test.go index e7989ca24..70db04abb 100644 --- a/internal/manifests/collector/volumeclaim_test.go +++ b/internal/manifests/collector/volumeclaim_test.go @@ -37,7 +37,7 @@ func TestVolumeClaimAllowsUserToAdd(t *testing.T) { }, Spec: corev1.PersistentVolumeClaimSpec{ AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, }, }, @@ -72,7 +72,7 @@ func TestVolumeClaimChecksForStatefulset(t *testing.T) { }, Spec: corev1.PersistentVolumeClaimSpec{ AccessModes: []corev1.PersistentVolumeAccessMode{"ReadWriteOnce"}, - Resources: corev1.ResourceRequirements{ + Resources: corev1.VolumeResourceRequirements{ Requests: corev1.ResourceList{"storage": resource.MustParse("1Gi")}, }, }, From 7e8e034696cd8781bb739e8b53cbc7c56f3c121a Mon Sep 17 00:00:00 2001 From: Ishwar Kanse Date: Mon, 18 Dec 2023 15:05:00 +0530 Subject: [PATCH 1197/1234] Fix targetallocator-features test case to work on OpenShift. (#2438) --- tests/e2e/targetallocator-features/00-install.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml index b62935db6..d134dac26 100644 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ b/tests/e2e/targetallocator-features/00-install.yaml @@ -20,6 +20,11 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep commands: - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta + # Annotate the namespace to allow the application to run using an specific group and user in OpenShift + # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html + # This annotation has no effect in Kubernetes + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite + - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite --- apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector @@ -46,6 +51,11 @@ spec: serviceAccount: ta securityContext: runAsUser: 1000 + runAsGroup: 3000 + fsGroup: 3000 + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: From 0b43d4e9b92fe3f651841e2a77f5b011d22e26f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 18 Dec 2023 09:35:36 +0000 Subject: [PATCH 1198/1234] Fix ServiceAccount naming for target allocator (#2445) --- .chloggen/fix_ta-serviceaccount.yaml | 16 ++++++ .../targetallocator/serviceaccount.go | 6 ++- .../targetallocator/serviceaccount_test.go | 52 +++++++++++++++++-- 3 files changed, 69 insertions(+), 5 deletions(-) create mode 100755 .chloggen/fix_ta-serviceaccount.yaml diff --git a/.chloggen/fix_ta-serviceaccount.yaml b/.chloggen/fix_ta-serviceaccount.yaml new file mode 100755 index 000000000..fa7e6406a --- /dev/null +++ b/.chloggen/fix_ta-serviceaccount.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix ServiceAccount naming for target allocator + +# One or more tracking issues related to the change +issues: [2443] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go index c9cf73299..96477b7e7 100644 --- a/internal/manifests/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -27,7 +27,7 @@ import ( // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 { - return naming.ServiceAccount(instance.Name) + return naming.TargetAllocatorServiceAccount(instance.Name) } return instance.Spec.TargetAllocator.ServiceAccount @@ -35,6 +35,10 @@ func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { // ServiceAccount returns the service account for the given instance. func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { + if len(params.OtelCol.Spec.TargetAllocator.ServiceAccount) > 0 { + return nil + } + name := naming.TargetAllocatorServiceAccount(params.OtelCol.Name) labels := Labels(params.OtelCol, name) diff --git a/internal/manifests/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go index a5f7e9fc4..99e5b4276 100644 --- a/internal/manifests/targetallocator/serviceaccount_test.go +++ b/internal/manifests/targetallocator/serviceaccount_test.go @@ -18,12 +18,14 @@ import ( "testing" "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" ) -func TestServiceAccountNewDefault(t *testing.T) { +func TestServiceAccountDefaultName(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -32,13 +34,13 @@ func TestServiceAccountNewDefault(t *testing.T) { } // test - sa := ServiceAccountName(otelcol) + saName := ServiceAccountName(otelcol) // verify - assert.Equal(t, "my-instance-collector", sa) + assert.Equal(t, "my-instance-targetallocator", saName) } -func TestServiceAccountOverride(t *testing.T) { +func TestServiceAccountOverrideName(t *testing.T) { // prepare otelcol := v1alpha1.OpenTelemetryCollector{ ObjectMeta: metav1.ObjectMeta{ @@ -57,3 +59,45 @@ func TestServiceAccountOverride(t *testing.T) { // verify assert.Equal(t, "my-special-sa", sa) } + +func TestServiceAccountDefault(t *testing.T) { + params := manifests.Params{ + OtelCol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + }, + } + expected := &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance-targetallocator", + Namespace: params.OtelCol.Namespace, + Labels: Labels(params.OtelCol, "my-instance-targetallocator"), + Annotations: params.OtelCol.Annotations, + }, + } + + saName := ServiceAccountName(params.OtelCol) + sa := ServiceAccount(params) + + assert.Equal(t, sa.Name, saName) + assert.Equal(t, expected, sa) +} + +func TestServiceAccountOverride(t *testing.T) { + params := manifests.Params{ + OtelCol: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + ServiceAccount: "my-special-sa", + }, + }, + }, + } + sa := ServiceAccount(params) + + assert.Nil(t, sa) +} From c8b29701cd9aedc801316078b731f1502d1cfb36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 10:37:18 +0100 Subject: [PATCH 1199/1234] Bump alpine from 3.18 to 3.19 (#2427) Bumps alpine from 3.18 to 3.19. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e1efea1af..75820d9f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Get CA certificates from alpine package repo -FROM alpine:3.18 as certificates +FROM alpine:3.19 as certificates RUN apk --no-cache add ca-certificates From d7d01665d8dd241fe6b6f682cc9597650e2e67de Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Mon, 18 Dec 2023 14:59:57 +0100 Subject: [PATCH 1200/1234] feat: Add pdb support for target allocator (#2411) * feat: Add pdb support for target allocator Signed-off-by: Jorge Turrado * fix e2e tests Signed-off-by: Jorge Turrado * fix e2e tests Signed-off-by: Jorge Turrado * update bundle Signed-off-by: Jorge Turrado * Address feedback Signed-off-by: Jorge Turrado * Change log level Signed-off-by: Jorge Turrado --------- Signed-off-by: Jorge Turrado --- .chloggen/target-allocator-pdb.yaml | 16 ++ apis/v1alpha1/collector_webhook.go | 18 ++- apis/v1alpha1/collector_webhook_test.go | 129 ++++++++++++++- apis/v1alpha1/opentelemetrycollector_types.go | 5 + apis/v1alpha1/zz_generated.deepcopy.go | 5 + ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++ ...ntelemetry.io_opentelemetrycollectors.yaml | 21 +++ docs/api.md | 41 +++++ .../collector/poddisruptionbudget.go | 3 +- .../collector/poddisruptionbudget_test.go | 4 +- .../targetallocator/poddisruptionbudget.go | 72 +++++++++ .../poddisruptionbudget_test.go | 152 ++++++++++++++++++ .../targetallocator/targetallocator.go | 2 + internal/naming/main.go | 7 +- tests/e2e-pdb/pdb/00-assert.yaml | 9 ++ tests/e2e-pdb/pdb/00-install.yaml | 34 +++- tests/e2e-pdb/pdb/01-assert.yaml | 63 -------- tests/e2e-pdb/pdb/01-install.yaml | 141 ---------------- tests/e2e-pdb/target-allocator/00-assert.yaml | 10 ++ .../e2e-pdb/target-allocator/00-install.yaml | 34 ++++ 20 files changed, 572 insertions(+), 215 deletions(-) create mode 100644 .chloggen/target-allocator-pdb.yaml create mode 100644 internal/manifests/targetallocator/poddisruptionbudget.go create mode 100644 internal/manifests/targetallocator/poddisruptionbudget_test.go create mode 100644 tests/e2e-pdb/pdb/00-assert.yaml delete mode 100644 tests/e2e-pdb/pdb/01-assert.yaml delete mode 100644 tests/e2e-pdb/pdb/01-install.yaml create mode 100644 tests/e2e-pdb/target-allocator/00-assert.yaml create mode 100644 tests/e2e-pdb/target-allocator/00-install.yaml diff --git a/.chloggen/target-allocator-pdb.yaml b/.chloggen/target-allocator-pdb.yaml new file mode 100644 index 000000000..562687266 --- /dev/null +++ b/.chloggen/target-allocator-pdb.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: PDB support for target allocator + +# One or more tracking issues related to the change +issues: [2261] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 7b0cefddf..0f83047a0 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -126,7 +126,7 @@ func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { } } - // if pod isn't provided, we set MaxUnavailable 1, + // if pdb isn't provided, we set MaxUnavailable 1, // which will work even if there is just one replica, // not blocking node drains but preventing out-of-the-box // from disruption generated by them with replicas > 1 @@ -139,6 +139,22 @@ func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { } } + // if pdb isn't provided for target allocator and it's enabled + // using a valid strategy (consistent-hashing), + // we set MaxUnavailable 1, which will work even if there is + // just one replica, not blocking node drains but preventing + // out-of-the-box from disruption generated by them with replicas > 1 + if r.Spec.TargetAllocator.Enabled && + r.Spec.TargetAllocator.AllocationStrategy == OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing && + r.Spec.TargetAllocator.PodDisruptionBudget == nil { + r.Spec.TargetAllocator.PodDisruptionBudget = &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + } + } + if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge } diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index fd8763ebd..e947a8c6e 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -242,7 +242,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, { - name: "Defined PDB", + name: "Defined PDB for collector", otelcol: OpenTelemetryCollector{ Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, @@ -274,6 +274,133 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, + { + name: "Defined PDB for target allocator", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + Replicas: &one, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + }, + }, + }, + }, + { + name: "Undefined PDB for target allocator and consistent-hashing strategy", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + Replicas: &one, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + Replicas: &one, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + }, + }, + }, + }, + { + name: "Undefined PDB for target allocator and not consistent-hashing strategy", + otelcol: OpenTelemetryCollector{ + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, + }, + }, + }, + expected: OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + }, + }, + Spec: OpenTelemetryCollectorSpec{ + Mode: ModeDeployment, + Replicas: &one, + UpgradeStrategy: UpgradeStrategyAutomatic, + ManagementState: ManagementStateManaged, + PodDisruptionBudget: &PodDisruptionBudgetSpec{ + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + TargetAllocator: OpenTelemetryTargetAllocator{ + Enabled: true, + Replicas: &one, + AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, + }, + }, + }, + }, } for _, test := range tests { diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 07ae504dd..9ab170119 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -340,6 +340,11 @@ type OpenTelemetryTargetAllocator struct { // consumed in the config file for the TargetAllocator. // +optional Env []v1.EnvVar `json:"env,omitempty"` + // PodDisruptionBudget specifies the pod disruption budget configuration to use + // for the target allocator workload. + // + // +optional + PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` } type OpenTelemetryTargetAllocatorPrometheusCR struct { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 749a96a1f..da6b4c48d 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1000,6 +1000,11 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(PodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index fd77336e7..649269a67 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -5160,6 +5160,27 @@ spec: description: NodeSelector to schedule OpenTelemetry TargetAllocator pods. type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption + budget configuration to use for the target allocator workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after + the eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 8b1f703fe..4d3b11498 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -5157,6 +5157,27 @@ spec: description: NodeSelector to schedule OpenTelemetry TargetAllocator pods. type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption + budget configuration to use for the target allocator workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after + the eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object prometheusCR: description: PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 diff --git a/docs/api.md b/docs/api.md index 12a06d1a6..ff1f9dde6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -18067,6 +18067,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all NodeSelector to schedule OpenTelemetry TargetAllocator pods.
false + + podDisruptionBudget + object + + PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload.
+ + false prometheusCR object @@ -19670,6 +19677,40 @@ Selects a key of a secret in the pod's namespace +### OpenTelemetryCollector.spec.targetAllocator.podDisruptionBudget +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
maxUnavailableint or string + An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod.
+
false
minAvailableint or string + An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod.
+
false
+ + ### OpenTelemetryCollector.spec.targetAllocator.prometheusCR [↩ Parent](#opentelemetrycollectorspectargetallocator) diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go index bbd3ce50a..096cd1f6c 100644 --- a/internal/manifests/collector/poddisruptionbudget.go +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -17,14 +17,13 @@ package collector import ( policyV1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) -func PodDisruptionBudget(params manifests.Params) client.Object { +func PodDisruptionBudget(params manifests.Params) *policyV1.PodDisruptionBudget { // defaulting webhook should always set this, but if unset then return nil. if params.OtelCol.Spec.PodDisruptionBudget == nil { params.Log.Info("pdb field is unset in Spec, skipping podDisruptionBudget creation") diff --git a/internal/manifests/collector/poddisruptionbudget_test.go b/internal/manifests/collector/poddisruptionbudget_test.go index adedc9eb5..de296aa67 100644 --- a/internal/manifests/collector/poddisruptionbudget_test.go +++ b/internal/manifests/collector/poddisruptionbudget_test.go @@ -18,7 +18,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - policyV1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" @@ -81,13 +80,12 @@ func TestPDB(t *testing.T) { MaxUnavailable: test.MaxUnavailable, } configuration := config.New() - raw := PodDisruptionBudget(manifests.Params{ + pdb := PodDisruptionBudget(manifests.Params{ Log: logger, Config: configuration, OtelCol: otelcol, }) - pdb := raw.(*policyV1.PodDisruptionBudget) // verify assert.Equal(t, "my-instance-collector", pdb.Name) assert.Equal(t, "my-instance-collector", pdb.Labels["app.kubernetes.io/name"]) diff --git a/internal/manifests/targetallocator/poddisruptionbudget.go b/internal/manifests/targetallocator/poddisruptionbudget.go new file mode 100644 index 000000000..34b32fb26 --- /dev/null +++ b/internal/manifests/targetallocator/poddisruptionbudget.go @@ -0,0 +1,72 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "fmt" + "strings" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" + + policyV1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func PodDisruptionBudget(params manifests.Params) (*policyV1.PodDisruptionBudget, error) { + // defaulting webhook should set this if the strategy is compatible, but if unset then return nil. + if params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget == nil { + params.Log.Info("pdb field is unset in Spec, skipping podDisruptionBudget creation") + return nil, nil + } + + // defaulter doesn't set PodDisruptionBudget if the strategy isn't valid, + // if PodDisruptionBudget != nil and stategy isn't correct, users have set + // it wrongly + if params.OtelCol.Spec.TargetAllocator.AllocationStrategy != v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing { + params.Log.V(4).Info("current allocation strategy not compatible, skipping podDisruptionBudget creation") + return nil, fmt.Errorf("target allocator pdb has been configured but the allocation strategy isn't not compatible") + } + + name := naming.TAPodDisruptionBudget(params.OtelCol.Name) + version := strings.Split(params.OtelCol.Spec.Image, ":") + labels := Labels(params.OtelCol, name) + if len(version) > 1 { + labels["app.kubernetes.io/version"] = version[len(version)-1] + } else { + labels["app.kubernetes.io/version"] = "latest" + } + + annotations := Annotations(params.OtelCol, nil) + + objectMeta := metav1.ObjectMeta{ + Name: name, + Namespace: params.OtelCol.Namespace, + Labels: labels, + Annotations: annotations, + } + + return &policyV1.PodDisruptionBudget{ + ObjectMeta: objectMeta, + Spec: policyV1.PodDisruptionBudgetSpec{ + MinAvailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MinAvailable, + MaxUnavailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MaxUnavailable, + Selector: &metav1.LabelSelector{ + MatchLabels: objectMeta.Labels, + }, + }, + }, nil +} diff --git a/internal/manifests/targetallocator/poddisruptionbudget_test.go b/internal/manifests/targetallocator/poddisruptionbudget_test.go new file mode 100644 index 000000000..7547058ea --- /dev/null +++ b/internal/manifests/targetallocator/poddisruptionbudget_test.go @@ -0,0 +1,152 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" +) + +type test struct { + name string + MinAvailable *intstr.IntOrString + MaxUnavailable *intstr.IntOrString +} + +var tests = []test{ + { + name: "MinAvailable-int", + MinAvailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + { + name: "MinAvailable-string", + MinAvailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, + { + name: "MaxUnavailable-int", + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.Int, + IntVal: 1, + }, + }, + { + name: "MaxUnavailable-string", + MaxUnavailable: &intstr.IntOrString{ + Type: intstr.String, + StrVal: "10%", + }, + }, +} + +func TestPDBWithValidStrategy(t *testing.T) { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ + MinAvailable: test.MinAvailable, + MaxUnavailable: test.MaxUnavailable, + }, + AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, + }, + }, + } + configuration := config.New() + pdb, err := PodDisruptionBudget(manifests.Params{ + Log: logger, + Config: configuration, + OtelCol: otelcol, + }) + + // verify + assert.NoError(t, err) + assert.Equal(t, "my-instance-targetallocator", pdb.Name) + assert.Equal(t, "my-instance-targetallocator", pdb.Labels["app.kubernetes.io/name"]) + assert.Equal(t, test.MinAvailable, pdb.Spec.MinAvailable) + assert.Equal(t, test.MaxUnavailable, pdb.Spec.MaxUnavailable) + }) + } +} + +func TestPDBWithNotValidStrategy(t *testing.T) { + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ + MinAvailable: test.MinAvailable, + MaxUnavailable: test.MaxUnavailable, + }, + AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, + }, + }, + } + configuration := config.New() + pdb, err := PodDisruptionBudget(manifests.Params{ + Log: logger, + Config: configuration, + OtelCol: otelcol, + }) + + // verify + assert.Error(t, err) + assert.Nil(t, pdb) + }) + } +} + +func TestNoPDB(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, + }, + }, + } + configuration := config.New() + pdb, err := PodDisruptionBudget(manifests.Params{ + Log: logger, + Config: configuration, + OtelCol: otelcol, + }) + + // verify + assert.NoError(t, err) + assert.Nil(t, pdb) +} diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index aa2535b65..e28329442 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -31,7 +31,9 @@ func Build(params manifests.Params) ([]client.Object, error) { manifests.Factory(Deployment), manifests.FactoryWithoutError(ServiceAccount), manifests.FactoryWithoutError(Service), + manifests.Factory(PodDisruptionBudget), } + for _, factory := range resourceFactories { res, err := factory(params) if err != nil { diff --git a/internal/naming/main.go b/internal/naming/main.go index a19301a01..ca2571285 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -75,11 +75,16 @@ func HorizontalPodAutoscaler(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } -// HorizontalPodAutoscaler builds the autoscaler name based on the instance. +// PodDisruptionBudget builds the pdb name based on the instance. func PodDisruptionBudget(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } +// TAPodDisruptionBudget builds the pdb name based on the instance. +func TAPodDisruptionBudget(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) +} + // OpenTelemetryCollector builds the collector (deployment/daemonset) name based on the instance. func OpenTelemetryCollector(otelcol string) string { return DNSName(Truncate("%s", 63, otelcol)) diff --git a/tests/e2e-pdb/pdb/00-assert.yaml b/tests/e2e-pdb/pdb/00-assert.yaml new file mode 100644 index 000000000..b882b74ef --- /dev/null +++ b/tests/e2e-pdb/pdb/00-assert.yaml @@ -0,0 +1,9 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: pdb-collector +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-collector + minAvailable: 1 diff --git a/tests/e2e-pdb/pdb/00-install.yaml b/tests/e2e-pdb/pdb/00-install.yaml index adc063327..05e3cd4db 100644 --- a/tests/e2e-pdb/pdb/00-install.yaml +++ b/tests/e2e-pdb/pdb/00-install.yaml @@ -1,4 +1,32 @@ -apiVersion: v1 -kind: Namespace +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector metadata: - name: create-pdbs + name: pdb +spec: + podDisruptionBudget: + minAvailable: 1 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + otlp: + protocols: + grpc: + http: + processors: + + exporters: + logging: + + service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [logging] \ No newline at end of file diff --git a/tests/e2e-pdb/pdb/01-assert.yaml b/tests/e2e-pdb/pdb/01-assert.yaml deleted file mode 100644 index 997a671a5..000000000 --- a/tests/e2e-pdb/pdb/01-assert.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: max-integer-collector - namespace: create-pdbs -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: create-pdbs.max-integer - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: max-integer-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - maxUnavailable: 1 ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: max-string-collector - namespace: create-pdbs -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: create-pdbs.max-string - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: max-string-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - maxUnavailable: "10%" ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: min-integer-collector - namespace: create-pdbs -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: create-pdbs.min-integer - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: min-integer-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - minAvailable: 1 ---- -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: min-string-collector - namespace: create-pdbs -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: create-pdbs.min-string - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: min-string-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - minAvailable: "10%" diff --git a/tests/e2e-pdb/pdb/01-install.yaml b/tests/e2e-pdb/pdb/01-install.yaml deleted file mode 100644 index e73e2d3ef..000000000 --- a/tests/e2e-pdb/pdb/01-install.yaml +++ /dev/null @@ -1,141 +0,0 @@ -# This creates four different deployments for checking different pdb options: -# * minAvailable integer -# * minAvailable string -# * maxUnavailable integer -# * maxUnavailable string -# -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: min-integer - namespace: create-pdbs -spec: - podDisruptionBudget: - minAvailable: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: min-string - namespace: create-pdbs -spec: - podDisruptionBudget: - minAvailable: 10% - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: max-integer - namespace: create-pdbs -spec: - podDisruptionBudget: - maxUnavailable: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: max-string - namespace: create-pdbs -spec: - podDisruptionBudget: - maxUnavailable: "10%" - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e-pdb/target-allocator/00-assert.yaml b/tests/e2e-pdb/target-allocator/00-assert.yaml new file mode 100644 index 000000000..d2b615d10 --- /dev/null +++ b/tests/e2e-pdb/target-allocator/00-assert.yaml @@ -0,0 +1,10 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: pdb-targetallocator +spec: + selector: + matchLabels: + app.kubernetes.io/component: opentelemetry-targetallocator + minAvailable: 1 + diff --git a/tests/e2e-pdb/target-allocator/00-install.yaml b/tests/e2e-pdb/target-allocator/00-install.yaml new file mode 100644 index 000000000..edf944e0a --- /dev/null +++ b/tests/e2e-pdb/target-allocator/00-install.yaml @@ -0,0 +1,34 @@ +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: pdb +spec: + mode: statefulset + targetAllocator: + enabled: true + allocationStrategy: consistent-hashing + prometheusCR: + enabled: true + podDisruptionBudget: + minAvailable: 1 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi + + config: | + receivers: + prometheus: + config: + scrape_configs: [] + exporters: + logging: + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [logging] From 2910ea97fa7191c868f36e38f2640b7e921f84c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Mon, 18 Dec 2023 15:52:49 +0000 Subject: [PATCH 1201/1234] Bump the prometheus group in /cmd/otel-allocator with 2 updates (#2452) --- cmd/otel-allocator/go.mod | 46 +++++----- cmd/otel-allocator/go.sum | 90 +++++++++---------- cmd/otel-allocator/watcher/promOperator.go | 4 +- .../watcher/promOperator_test.go | 11 ++- 4 files changed, 72 insertions(+), 79 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 159a484de..8cec16987 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -2,8 +2,6 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator go 1.21 -toolchain go1.21.3 - require ( github.com/buraksezer/consistent v0.10.0 github.com/cespare/xxhash/v2 v2.2.0 @@ -13,12 +11,12 @@ require ( github.com/go-logr/logr v1.3.0 github.com/json-iterator/go v1.1.12 github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.69.1 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 + github.com/prometheus-operator/prometheus-operator v0.70.0 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 + github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.48.0 + github.com/prometheus/prometheus v0.48.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 gopkg.in/yaml.v2 v2.4.0 @@ -62,7 +60,7 @@ require ( github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/envoyproxy/go-control-plane v0.11.1 // indirect github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -97,7 +95,7 @@ require ( github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gophercloud/gophercloud v1.7.0 // indirect @@ -117,7 +115,6 @@ require ( github.com/hashicorp/serf v0.10.1 // indirect github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect github.com/imdario/mergo v0.3.16 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -155,7 +152,6 @@ require ( github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect - github.com/spf13/cobra v1.7.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.11 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect @@ -169,17 +165,17 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/crypto v0.16.0 // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.16.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.147.0 // indirect google.golang.org/appengine v1.6.8 // indirect @@ -190,10 +186,10 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/apiextensions-apiserver v0.28.3 // indirect - k8s.io/component-base v0.28.3 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/apiextensions-apiserver v0.28.4 // indirect + k8s.io/component-base v0.28.4 // indirect + k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a // indirect + k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index f30b8a5d5..5c7c37db4 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -113,7 +113,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -149,8 +148,8 @@ github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -351,8 +350,8 @@ github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -423,8 +422,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= @@ -574,12 +571,12 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok= github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA= -github.com/prometheus-operator/prometheus-operator v0.69.1 h1:pqNMssMBBaM6mYg7FKK7kQi9sIyWYCA33z5FSmmbybw= -github.com/prometheus-operator/prometheus-operator v0.69.1/go.mod h1:1GSjL8dKOO9be+b7aSowZo7cuTdsdTqLT3ZETktVqvU= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1 h1:hOnp+1FLBm+ifsyiRbunmfSs99jKAq+Tr5elCmo5l5U= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.69.1/go.mod h1:JtflYMUMay9HGil4aRg+dSj6X6mngtuBJf/ULOCxbxI= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1 h1:hCqId2xt6kOPuoeTxVxV/GiKmZyCJjYeuRRL90qcwH0= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.69.1/go.mod h1:XfInnOa8WYXOlzOb0Iw+9eg0s/bkeOnXyten1pKFjuc= +github.com/prometheus-operator/prometheus-operator v0.70.0 h1:kMufKWvqJl08Kh0oue3VLmTsowYKKqCQJa7tqXo+DJI= +github.com/prometheus-operator/prometheus-operator v0.70.0/go.mod h1:a/P8ufM+z7gkt4QpWEHWPARs/8bhRBkyZN5pjUl5RMk= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 h1:CFTvpkpVP4EXXZuaZuxpikAoma8xVha/IZKMDc9lw+Y= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0/go.mod h1:npfc20mPOAu7ViOVnATVMbI7PoXvW99EzgJVqkAomIQ= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0 h1:PpdpJDS1MyMSLILG+Y0hgzVQ3tu6qEkRD0gR/UuvSZk= +github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0/go.mod h1:4I5Rt6iIu95JBYYaDYA+Er+YBfUwIq9Pwh5TEoBmawg= github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -612,14 +609,13 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.48.0 h1:yrBloImGQ7je4h8M10ujGh4R6oxYQJQKlMuETwNskGk= -github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= +github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbELKS+NFk= +github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= @@ -633,8 +629,6 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -726,8 +720,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -738,8 +732,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -762,8 +756,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -804,16 +798,16 @@ golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -827,8 +821,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -890,13 +884,13 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -908,13 +902,13 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -964,8 +958,8 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1099,20 +1093,20 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU= +k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM= k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= +k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= +k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a h1:ZeIPbyHHqahGIbeyLJJjAUhnxCKqXaDY+n89Ms8szyA= +k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= +k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go index 9f916c881..78d8ff1ec 100644 --- a/cmd/otel-allocator/watcher/promOperator.go +++ b/cmd/otel-allocator/watcher/promOperator.go @@ -297,7 +297,7 @@ func (w *PrometheusCRWatcher) addStoreAssetsForServiceMonitor( for i, endp := range endps { objKey := fmt.Sprintf("serviceMonitor/%s/%s/%d", smNamespace, smName, i) - if err = store.AddBearerToken(ctx, smNamespace, endp.BearerTokenSecret, objKey); err != nil { + if err = store.AddSafeAuthorizationCredentials(ctx, smNamespace, endp.Authorization, objKey); err != nil { break } @@ -340,7 +340,7 @@ func (w *PrometheusCRWatcher) addStoreAssetsForPodMonitor( for i, endp := range podMetricsEndps { objKey := fmt.Sprintf("podMonitor/%s/%s/%d", pmNamespace, pmName, i) - if err = store.AddBearerToken(ctx, pmNamespace, &endp.BearerTokenSecret, objKey); err != nil { + if err = store.AddSafeAuthorizationCredentials(ctx, pmNamespace, endp.Authorization, objKey); err != nil { break } diff --git a/cmd/otel-allocator/watcher/promOperator_test.go b/cmd/otel-allocator/watcher/promOperator_test.go index 5aa05c23f..6459acefc 100644 --- a/cmd/otel-allocator/watcher/promOperator_test.go +++ b/cmd/otel-allocator/watcher/promOperator_test.go @@ -200,11 +200,14 @@ func TestLoadConfig(t *testing.T) { PodMetricsEndpoints: []monitoringv1.PodMetricsEndpoint{ { Port: "web", - BearerTokenSecret: v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{ - Name: "bearer", + Authorization: &monitoringv1.SafeAuthorization{ + Type: "Bearer", + Credentials: &v1.SecretKeySelector{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "bearer", + }, + Key: "token", }, - Key: "token", }, }, }, From 661e6b3d6ecb8db173b96549b7273dca55a66326 Mon Sep 17 00:00:00 2001 From: Darren Wang <68258717+changexd@users.noreply.github.com> Date: Tue, 19 Dec 2023 23:27:12 +0800 Subject: [PATCH 1202/1234] Create ServiceMonitor to monitor target allocator (#2416) * add create service monitor to targetallocator * add chlog * add e2e test to ta service monitor * fix linting * make bundle * fix chlog * add a condition to avoid creating sm when running in unsupported modes * update bundle * move ta sm ports into ta definition * remove changes to config/manager * assert ta service monitor creation in e2e * enable prometheus feature in e2e test * change description of observability field * move ta observability check to build * add target allocator to builder test * fix lint * fix ta sm manifest test * remove changes to manager kustomization * make ta sm return directly * move ta service monitor test to dedicated tests * remove commands in e2e * use function to generate label for sm * ta sm labels in builder test * fix api.md * fix bundling * make api-docs again * fix kustomization manager * fix ta service account in test according to fixed issues --- .chloggen/2311-ta-servicemonitor.yaml | 16 + apis/v1alpha1/opentelemetrycollector_types.go | 8 +- apis/v1alpha1/zz_generated.deepcopy.go | 1 + ...emetry-operator.clusterserviceversion.yaml | 16 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 20 +- ...ntelemetry.io_opentelemetrycollectors.yaml | 20 +- ...emetry-operator.clusterserviceversion.yaml | 14 +- controllers/builder_test.go | 828 +++++++++++++++ docs/api.md | 987 +++++++++++++++--- hack/modify-test-images.sh | 1 + .../targetallocator/servicemonitor.go | 51 + .../targetallocator/servicemonitor_test.go | 55 + .../targetallocator/targetallocator.go | 5 + internal/naming/main.go | 5 + .../08-assert.yaml | 26 + .../08-install.yaml | 114 ++ .../01-assert.yaml | 2 +- .../01-install.yaml | 2 +- 18 files changed, 2011 insertions(+), 160 deletions(-) create mode 100755 .chloggen/2311-ta-servicemonitor.yaml create mode 100644 internal/manifests/targetallocator/servicemonitor.go create mode 100644 internal/manifests/targetallocator/servicemonitor_test.go create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml create mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml diff --git a/.chloggen/2311-ta-servicemonitor.yaml b/.chloggen/2311-ta-servicemonitor.yaml new file mode 100755 index 000000000..d84aa5975 --- /dev/null +++ b/.chloggen/2311-ta-servicemonitor.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: target allocator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Create ServiceMonitor to monitor target allocator + +# One or more tracking issues related to the change +issues: [2311] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 9ab170119..cb346ca80 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -340,6 +340,12 @@ type OpenTelemetryTargetAllocator struct { // consumed in the config file for the TargetAllocator. // +optional Env []v1.EnvVar `json:"env,omitempty"` + // ObservabilitySpec defines how telemetry data gets handled. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Observability" + Observability ObservabilitySpec `json:"observability,omitempty"` // PodDisruptionBudget specifies the pod disruption budget configuration to use // for the target allocator workload. // @@ -492,7 +498,7 @@ type PodDisruptionBudgetSpec struct { // MetricsConfigSpec defines a metrics config. type MetricsConfigSpec struct { - // EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. + // EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the service managed by the OpenTelemetry Operator. // The operator.observability.prometheus feature gate must be enabled to use this feature. // // +optional diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index da6b4c48d..d9c990faf 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1000,6 +1000,7 @@ func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAll (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Observability = in.Observability if in.PodDisruptionBudget != nil { in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget *out = new(PodDisruptionBudgetSpec) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index aae3b1848..076d2f8b9 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -65,7 +65,7 @@ metadata: categories: Logging & Tracing,Monitoring certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-12-06T14:31:16Z" + createdAt: "2023-12-19T02:48:46Z" 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 @@ -136,11 +136,23 @@ spec: displayName: Metrics Config path: observability.metrics - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. + mode) should be created for the service managed by the OpenTelemetry Operator. The operator.observability.prometheus feature gate must be enabled to use this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics + - description: ObservabilitySpec defines how telemetry data gets handled. + displayName: Observability + path: targetAllocator.observability + - description: Metrics defines the metrics configuration for operands. + displayName: Metrics Config + path: targetAllocator.observability.metrics + - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar + mode) should be created for the service managed by the OpenTelemetry Operator. + The operator.observability.prometheus feature gate must be enabled to use + this feature. + displayName: Create ServiceMonitors for OpenTelemetry Collector + path: targetAllocator.observability.metrics.enableMetrics version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml index 649269a67..0ca1952e5 100644 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml @@ -3838,8 +3838,8 @@ spec: properties: enableMetrics: description: EnableMetrics specifies if ServiceMonitor or - PodMonitor(for sidecar mode) should be created for the OpenTelemetry - Collector and Prometheus Exporters. The operator.observability. + PodMonitor(for sidecar mode) should be created for the service + managed by the OpenTelemetry Operator. The operator.observability. type: boolean type: object type: object @@ -5160,6 +5160,22 @@ spec: description: NodeSelector to schedule OpenTelemetry TargetAllocator pods. type: object + observability: + description: ObservabilitySpec defines how telemetry data gets + handled. + properties: + metrics: + description: Metrics defines the metrics configuration for + operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor + or PodMonitor(for sidecar mode) should be created for + the service managed by the OpenTelemetry Operator. The + operator.observability. + type: boolean + type: object + type: object podDisruptionBudget: description: PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload. diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml index 4d3b11498..56f84cbb6 100644 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml @@ -3835,8 +3835,8 @@ spec: properties: enableMetrics: description: EnableMetrics specifies if ServiceMonitor or - PodMonitor(for sidecar mode) should be created for the OpenTelemetry - Collector and Prometheus Exporters. The operator.observability. + PodMonitor(for sidecar mode) should be created for the service + managed by the OpenTelemetry Operator. The operator.observability. type: boolean type: object type: object @@ -5157,6 +5157,22 @@ spec: description: NodeSelector to schedule OpenTelemetry TargetAllocator pods. type: object + observability: + description: ObservabilitySpec defines how telemetry data gets + handled. + properties: + metrics: + description: Metrics defines the metrics configuration for + operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor + or PodMonitor(for sidecar mode) should be created for + the service managed by the OpenTelemetry Operator. The + operator.observability. + type: boolean + type: object + type: object podDisruptionBudget: description: PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload. diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 006062ba8..5d08f6174 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -82,11 +82,23 @@ spec: displayName: Metrics Config path: observability.metrics - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. + mode) should be created for the service managed by the OpenTelemetry Operator. The operator.observability.prometheus feature gate must be enabled to use this feature. displayName: Create ServiceMonitors for OpenTelemetry Collector path: observability.metrics.enableMetrics + - description: ObservabilitySpec defines how telemetry data gets handled. + displayName: Observability + path: targetAllocator.observability + - description: Metrics defines the metrics configuration for operands. + displayName: Metrics Config + path: targetAllocator.observability.metrics + - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar + mode) should be created for the service managed by the OpenTelemetry Operator. + The operator.observability.prometheus feature gate must be enabled to use + this feature. + displayName: Create ServiceMonitors for OpenTelemetry Collector + path: targetAllocator.observability.metrics.enableMetrics version: v1alpha1 description: |- OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. diff --git a/controllers/builder_test.go b/controllers/builder_test.go index 344dc45a0..c953bf8c7 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -15,20 +15,26 @@ package controllers import ( + "strings" "testing" "github.com/go-logr/logr" + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" + colfeaturegate "go.opentelemetry.io/collector/featuregate" + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/config" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) var ( @@ -42,6 +48,10 @@ var ( pathTypePrefix = networkingv1.PathTypePrefix ) +var ( + prometheusFeatureGate = featuregate.PrometheusOperatorIsAvailable.ID() +) + var ( opampbridgeSelectorLabels = map[string]string{ "app.kubernetes.io/managed-by": "opentelemetry-operator", @@ -51,6 +61,16 @@ var ( } ) +var ( + taSelectorLabels = map[string]string{ + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/name": "test-targetallocator", + } +) + func TestBuildCollector(t *testing.T) { var goodConfig = `receivers: examplereceiver: @@ -848,6 +868,7 @@ func TestBuildAll_OpAMPBridge(t *testing.T) { wantErr bool }{ { + name: "base case", args: args{ instance: v1alpha1.OpAMPBridge{ @@ -1056,3 +1077,810 @@ endpoint: ws://opamp-server:4320/v1/opamp }) } } + +func TestBuildTargetAllocator(t *testing.T) { + var goodConfig = ` +receivers: + prometheus: + config: + scrape_configs: + - job_name: 'example' + relabel_configs: + - source_labels: ['__meta_service_id'] + target_label: 'job' + replacement: 'my_service_$$1' + - source_labels: ['__meta_service_name'] + target_label: 'instance' + replacement: '$1' + metric_relabel_configs: + - source_labels: ['job'] + target_label: 'job' + replacement: '$$1_$2' +exporters: + logging: +service: + pipelines: + metrics: + receivers: [prometheus] + exporters: [logging] +` + one := int32(1) + type args struct { + instance v1alpha1.OpenTelemetryCollector + } + tests := []struct { + name string + args args + want []client.Object + featuregates []string + wantErr bool + }{ + { + name: "base case", + args: args{ + instance: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + Mode: "statefulset", + Image: "test", + Config: goodConfig, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + PrometheusCR: v1alpha1.OpenTelemetryTargetAllocatorPrometheusCR{ + Enabled: true, + }, + }, + }, + }, + }, + want: []client.Object{ + &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: appsv1.StatefulSetSpec{ + ServiceName: "test-collector", + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: selectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otc-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-collector", + }, + Items: []corev1.KeyToPath{ + { + Key: "collector.yaml", + Path: "collector.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "otc-container", + Image: "test", + Args: []string{ + "--config=/conf/collector.yaml", + }, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "SHARD", + Value: "0", + }, + }, + Ports: []corev1.ContainerPort{ + { + Name: "metrics", + HostPort: 0, + ContainerPort: 8888, + Protocol: "TCP", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "otc-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "test-collector", + }, + }, + PodManagementPolicy: "Parallel", + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "collector.yaml": "exporters:\n logging: null\nreceivers:\n prometheus:\n config: {}\n target_allocator:\n collector_id: ${POD_NAME}\n endpoint: http://test-targetallocator:80\n interval: 30s\nservice:\n pipelines:\n metrics:\n exporters:\n - logging\n receivers:\n - prometheus\n", + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-monitoring", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector-monitoring", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "monitoring", + Port: 8888, + }, + }, + Selector: selectorLabels, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: opentelemetry-operator\n app.kubernetes.io/part-of: opentelemetry\n", + }, + }, + &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: nil, + }, + Spec: appsv1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: taSelectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: map[string]string{ + "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "ta-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-targetallocator", + }, + Items: []corev1.KeyToPath{ + { + Key: "targetallocator.yaml", + Path: "targetallocator.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "ta-container", + Image: "default-ta-allocator", + Env: []corev1.EnvVar{ + { + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }, + }, + Args: []string{ + "--enable-prometheus-cr-watcher", + }, + Ports: []corev1.ContainerPort{ + { + Name: "http", + HostPort: 0, + ContainerPort: 8080, + Protocol: "TCP", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "ta-internal", + MountPath: "/conf", + }, + }, + LivenessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + }, + ReadinessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + }, + }, + }, + DNSPolicy: "", + ServiceAccountName: "test-targetallocator", + }, + }, + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "targetallocation", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: 1, + StrVal: "http", + }, + }, + }, + Selector: taSelectorLabels, + }, + }, + }, + wantErr: false, + }, + { + name: "enable metrics case", + args: args{ + instance: v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Replicas: &one, + Mode: "statefulset", + Image: "test", + Config: goodConfig, + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Enabled: true, + PrometheusCR: v1alpha1.OpenTelemetryTargetAllocatorPrometheusCR{ + Enabled: true, + }, + Observability: v1alpha1.ObservabilitySpec{ + Metrics: v1alpha1.MetricsConfigSpec{ + EnableMetrics: true, + }, + }, + }, + }, + }, + }, + want: []client.Object{ + &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: appsv1.StatefulSetSpec{ + ServiceName: "test-collector", + Replicas: &one, + Selector: &metav1.LabelSelector{ + MatchLabels: selectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: map[string]string{ + "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "otc-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-collector", + }, + Items: []corev1.KeyToPath{ + { + Key: "collector.yaml", + Path: "collector.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "otc-container", + Image: "test", + Args: []string{ + "--config=/conf/collector.yaml", + }, + Env: []corev1.EnvVar{ + { + Name: "POD_NAME", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.name", + }, + }, + }, + { + Name: "SHARD", + Value: "0", + }, + }, + Ports: []corev1.ContainerPort{ + { + Name: "metrics", + HostPort: 0, + ContainerPort: 8888, + Protocol: "TCP", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "otc-internal", + MountPath: "/conf", + }, + }, + }, + }, + DNSPolicy: "ClusterFirst", + ServiceAccountName: "test-collector", + }, + }, + PodManagementPolicy: "Parallel", + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "collector.yaml": "exporters:\n logging: null\nreceivers:\n prometheus:\n config: {}\n target_allocator:\n collector_id: ${POD_NAME}\n endpoint: http://test-targetallocator:80\n interval: 30s\nservice:\n pipelines:\n metrics:\n exporters:\n - logging\n receivers:\n - prometheus\n", + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-collector-monitoring", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-collector", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-collector-monitoring", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "monitoring", + Port: 8888, + }, + }, + Selector: selectorLabels, + }, + }, + &corev1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", + }, + Annotations: nil, + }, + Data: map[string]string{ + "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: opentelemetry-operator\n app.kubernetes.io/part-of: opentelemetry\n", + }, + }, + &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: nil, + }, + Spec: appsv1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: taSelectorLabels, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: map[string]string{ + "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", + }, + }, + Spec: corev1.PodSpec{ + Volumes: []corev1.Volume{ + { + Name: "ta-internal", + VolumeSource: corev1.VolumeSource{ + ConfigMap: &corev1.ConfigMapVolumeSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: "test-targetallocator", + }, + Items: []corev1.KeyToPath{ + { + Key: "targetallocator.yaml", + Path: "targetallocator.yaml", + }, + }, + }, + }, + }, + }, + Containers: []corev1.Container{ + { + Name: "ta-container", + Image: "default-ta-allocator", + Env: []corev1.EnvVar{ + { + Name: "OTELCOL_NAMESPACE", + ValueFrom: &corev1.EnvVarSource{ + FieldRef: &corev1.ObjectFieldSelector{ + FieldPath: "metadata.namespace", + }, + }, + }, + }, + Args: []string{ + "--enable-prometheus-cr-watcher", + }, + Ports: []corev1.ContainerPort{ + { + Name: "http", + HostPort: 0, + ContainerPort: 8080, + Protocol: "TCP", + }, + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "ta-internal", + MountPath: "/conf", + }, + }, + LivenessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/livez", + Port: intstr.FromInt(8080), + }, + }, + }, + ReadinessProbe: &corev1.Probe{ + ProbeHandler: corev1.ProbeHandler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/readyz", + Port: intstr.FromInt(8080), + }, + }, + }, + }, + }, + DNSPolicy: "", + ServiceAccountName: "test-targetallocator", + }, + }, + }, + }, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + }, + }, + &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: nil, + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "targetallocation", + Port: 80, + TargetPort: intstr.IntOrString{ + Type: 1, + StrVal: "http", + }, + }, + }, + Selector: taSelectorLabels, + }, + }, + &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test-targetallocator", + Namespace: "test", + Labels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + Annotations: nil, + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Endpoints: []monitoringv1.Endpoint{ + monitoringv1.Endpoint{Port: "targetallocation"}, + }, + Selector: v1.LabelSelector{ + MatchLabels: map[string]string{ + "app.kubernetes.io/component": "opentelemetry-targetallocator", + "app.kubernetes.io/instance": "test.test", + "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/name": "test-targetallocator", + "app.kubernetes.io/part-of": "opentelemetry", + }, + }, + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{"test"}, + }, + }, + }, + }, + wantErr: false, + featuregates: []string{prometheusFeatureGate}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cfg := config.New( + config.WithCollectorImage("default-collector"), + config.WithTargetAllocatorImage("default-ta-allocator"), + ) + params := manifests.Params{ + Log: logr.Discard(), + Config: cfg, + OtelCol: tt.args.instance, + } + if len(tt.featuregates) > 0 { + fg := strings.Join(tt.featuregates, ",") + flagset := featuregate.Flags(colfeaturegate.GlobalRegistry()) + if err := flagset.Set(featuregate.FeatureGatesFlag, fg); err != nil { + t.Errorf("featuregate setting error = %v", err) + return + } + } + got, err := BuildCollector(params) + if (err != nil) != tt.wantErr { + t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) + return + } + require.Equal(t, tt.want, got) + + }) + } +} diff --git a/docs/api.md b/docs/api.md index ff1f9dde6..427c27833 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4299,7 +4299,21 @@ Required. A pod affinity term, associated with the corresponding weight. labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+ + false + + matchLabelKeys + []string + + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+ + false + + mismatchLabelKeys + []string + + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false @@ -4325,7 +4339,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. @@ -4497,7 +4511,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -4523,7 +4551,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -4765,7 +4793,21 @@ Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + @@ -4791,7 +4833,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -4963,7 +5005,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -4989,7 +5045,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -7464,6 +7520,13 @@ The specification for the PersistentVolumeClaim. The entire content is copied un storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ + + + + @@ -7588,14 +7651,6 @@ resources represents the minimum resources the volume should have. - - - - -
false
volumeAttributesClassNamestring + volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
+
false
volumeMode string
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
-
false
limits map[string]int or string @@ -7613,33 +7668,6 @@ resources represents the minimum resources the volume should have.
-### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources.claims[index] -[↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - ### OpAMPBridge.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector [↩ Parent](#opampbridgespecvolumesindexephemeralvolumeclaimtemplatespec) @@ -8438,6 +8466,14 @@ Projection that may be projected along with other supported volume types + clusterTrustBundle + object + + ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. + Alpha, gated by the ClusterTrustBundleProjection feature gate.
+ + false + configMap object @@ -8469,6 +8505,137 @@ Projection that may be projected along with other supported volume types +### OpAMPBridge.spec.volumes[index].projected.sources[index].clusterTrustBundle +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) + + + +ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. + Alpha, gated by the ClusterTrustBundleProjection feature gate. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Relative path from the volume root to write the bundle.
+
true
labelSelectorobject + Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing".
+
false
namestring + Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector.
+
false
optionalboolean + If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist.
+
false
signerNamestring + Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated.
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].clusterTrustBundle.labelSelector +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexclustertrustbundle) + + + +Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing". + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpAMPBridge.spec.volumes[index].projected.sources[index].clusterTrustBundle.labelSelector.matchExpressions[index] +[↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindexclustertrustbundlelabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + ### OpAMPBridge.spec.volumes[index].projected.sources[index].configMap [↩ Parent](#opampbridgespecvolumesindexprojectedsourcesindex) @@ -10332,6 +10499,13 @@ PostStart is called immediately after a container is created. If the handler fai HTTPGet specifies the http request to perform.
false + + sleep + object + + Sleep represents the duration that the container should sleep before being terminated.
+ + false tcpSocket object @@ -10459,6 +10633,35 @@ HTTPHeader describes a custom header to be used in HTTP probes +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.sleep +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststart) + + + +Sleep represents the duration that the container should sleep before being terminated. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secondsinteger + Seconds is the number of seconds to sleep.
+
+ Format: int64
+
true
+ + ### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.postStart.tcpSocket [↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecyclepoststart) @@ -10523,6 +10726,13 @@ PreStop is called immediately before a container is terminated due to an API req HTTPGet specifies the http request to perform.
false + + sleep + object + + Sleep represents the duration that the container should sleep before being terminated.
+ + false tcpSocket object @@ -10650,12 +10860,12 @@ HTTPHeader describes a custom header to be used in HTTP probes -### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.tcpSocket +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.sleep [↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestop) -Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. +Sleep represents the duration that the container should sleep before being terminated. @@ -10667,29 +10877,58 @@ Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the ba - - + + - - - - -
portint or stringsecondsinteger - Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+ Seconds is the number of seconds to sleep.
+
+ Format: int64
true
hoststring - Optional: Host name to connect to, defaults to the pod IP.
-
false
-### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe -[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) +### OpenTelemetryCollector.spec.additionalContainers[index].lifecycle.preStop.tcpSocket +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindexlifecycleprestop) -Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
portint or string + Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
+
true
hoststring + Optional: Host name to connect to, defaults to the pod IP.
+
false
+ + +### OpenTelemetryCollector.spec.additionalContainers[index].livenessProbe +[↩ Parent](#opentelemetrycollectorspecadditionalcontainersindex) + + + +Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes @@ -12541,7 +12780,21 @@ Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + @@ -12567,7 +12820,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -12739,7 +12992,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -12765,7 +13032,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -13007,7 +13274,21 @@ Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + @@ -13033,7 +13314,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -13205,7 +13486,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -13231,7 +13526,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -15015,6 +15310,13 @@ PostStart is called immediately after a container is created. If the handler fai HTTPGet specifies the http request to perform.
+ + + + + @@ -15142,6 +15444,35 @@ HTTPHeader describes a custom header to be used in HTTP probes
false
sleepobject + Sleep represents the duration that the container should sleep before being terminated.
+
false
tcpSocket object
+### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.sleep +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststart) + + + +Sleep represents the duration that the container should sleep before being terminated. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secondsinteger + Seconds is the number of seconds to sleep.
+
+ Format: int64
+
true
+ + ### OpenTelemetryCollector.spec.initContainers[index].lifecycle.postStart.tcpSocket [↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecyclepoststart) @@ -15206,6 +15537,13 @@ PreStop is called immediately before a container is terminated due to an API req HTTPGet specifies the http request to perform.
false + + sleep + object + + Sleep represents the duration that the container should sleep before being terminated.
+ + false tcpSocket object @@ -15333,6 +15671,35 @@ HTTPHeader describes a custom header to be used in HTTP probes +### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.sleep +[↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestop) + + + +Sleep represents the duration that the container should sleep before being terminated. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secondsinteger + Seconds is the number of seconds to sleep.
+
+ Format: int64
+
true
+ + ### OpenTelemetryCollector.spec.initContainers[index].lifecycle.preStop.tcpSocket [↩ Parent](#opentelemetrycollectorspecinitcontainersindexlifecycleprestop) @@ -16821,6 +17188,13 @@ PostStart is called immediately after a container is created. If the handler fai HTTPGet specifies the http request to perform.
false + + sleep + object + + Sleep represents the duration that the container should sleep before being terminated.
+ + false tcpSocket object @@ -16948,6 +17322,35 @@ HTTPHeader describes a custom header to be used in HTTP probes +### OpenTelemetryCollector.spec.lifecycle.postStart.sleep +[↩ Parent](#opentelemetrycollectorspeclifecyclepoststart) + + + +Sleep represents the duration that the container should sleep before being terminated. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secondsinteger + Seconds is the number of seconds to sleep.
+
+ Format: int64
+
true
+ + ### OpenTelemetryCollector.spec.lifecycle.postStart.tcpSocket [↩ Parent](#opentelemetrycollectorspeclifecyclepoststart) @@ -17012,6 +17415,13 @@ PreStop is called immediately before a container is terminated due to an API req HTTPGet specifies the http request to perform.
false + + sleep + object + + Sleep represents the duration that the container should sleep before being terminated.
+ + false tcpSocket object @@ -17139,6 +17549,35 @@ HTTPHeader describes a custom header to be used in HTTP probes +### OpenTelemetryCollector.spec.lifecycle.preStop.sleep +[↩ Parent](#opentelemetrycollectorspeclifecycleprestop) + + + +Sleep represents the duration that the container should sleep before being terminated. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
secondsinteger + Seconds is the number of seconds to sleep.
+
+ Format: int64
+
true
+ + ### OpenTelemetryCollector.spec.lifecycle.preStop.tcpSocket [↩ Parent](#opentelemetrycollectorspeclifecycleprestop) @@ -17294,7 +17733,7 @@ Metrics defines the metrics configuration for operands. enableMetrics boolean - EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the OpenTelemetry Collector and Prometheus Exporters. The operator.observability.
+ EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the service managed by the OpenTelemetry Operator. The operator.observability.
false @@ -18067,6 +18506,13 @@ TargetAllocator indicates a value which determines whether to spawn a target all NodeSelector to schedule OpenTelemetry TargetAllocator pods.
false + + observability + object + + ObservabilitySpec defines how telemetry data gets handled.
+ + false podDisruptionBudget object @@ -18596,7 +19042,21 @@ Required. A pod affinity term, associated with the corresponding weight. labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+ + false + + matchLabelKeys + []string + + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+ + false + + mismatchLabelKeys + []string + + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false @@ -18622,7 +19082,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. @@ -18794,7 +19254,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -18820,7 +19294,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -19062,7 +19536,21 @@ Required. A pod affinity term, associated with the corresponding weight. + + + + + + + + + + @@ -19088,7 +19576,7 @@ Required. A pod affinity term, associated with the corresponding weight. -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -19260,7 +19748,21 @@ Defines a set of pods (namely those matching the labelSelector relative to the g + + + + + + + + + + @@ -19286,7 +19788,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -A label query over a set of resources, in this case pods. +A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
labelSelector object - A label query over a set of resources, in this case pods.
+ A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.
+
false
matchLabelKeys[]string + MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
+
false
mismatchLabelKeys[]string + MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.
false
@@ -19677,12 +20179,12 @@ Selects a key of a secret in the pod's namespace
-### OpenTelemetryCollector.spec.targetAllocator.podDisruptionBudget +### OpenTelemetryCollector.spec.targetAllocator.observability [↩ Parent](#opentelemetrycollectorspectargetallocator) -PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload. +ObservabilitySpec defines how telemetry data gets handled. @@ -19694,10 +20196,64 @@ PodDisruptionBudget specifies the pod disruption budget configuration to use for - - + + + + +
maxUnavailableint or stringmetricsobject - An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod.
+ Metrics defines the metrics configuration for operands.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.observability.metrics +[↩ Parent](#opentelemetrycollectorspectargetallocatorobservability) + + + +Metrics defines the metrics configuration for operands. + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
enableMetricsboolean + EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar mode) should be created for the service managed by the OpenTelemetry Operator. The operator.observability.
+
false
+ + +### OpenTelemetryCollector.spec.targetAllocator.podDisruptionBudget +[↩ Parent](#opentelemetrycollectorspectargetallocator) + + + +PodDisruptionBudget specifies the pod disruption budget configuration to use for the target allocator workload. + + + + + + + + + + + + + + @@ -20754,6 +21310,13 @@ spec defines the desired characteristics of a volume requested by a pod author. storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
+ + + + + @@ -20878,14 +21441,6 @@ resources represents the minimum resources the volume should have. - - - - -
NameTypeDescriptionRequired
maxUnavailableint or string + An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod.
false
false
volumeAttributesClassNamestring + volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
+
false
volumeMode string
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
-
false
limits map[string]int or string @@ -20903,33 +21458,6 @@ resources represents the minimum resources the volume should have.
-### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.resources.claims[index] -[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - ### OpenTelemetryCollector.spec.volumeClaimTemplates[index].spec.selector [↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexspec) @@ -21056,6 +21584,20 @@ status represents the current information/status of a persistent volume claim. R conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.
false + + currentVolumeAttributesClassName + string + + currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using.
+ + false + + modifyVolumeStatus + object + + ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted.
+ + false phase string @@ -21133,6 +21675,40 @@ PersistentVolumeClaimCondition contains details about state of pvc +### OpenTelemetryCollector.spec.volumeClaimTemplates[index].status.modifyVolumeStatus +[↩ Parent](#opentelemetrycollectorspecvolumeclaimtemplatesindexstatus) + + + +ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
statusstring + status is the status of the ControllerModifyVolume operation.
+
true
targetVolumeAttributesClassNamestring + targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled
+
false
+ + ### OpenTelemetryCollector.spec.volumeMounts[index] [↩ Parent](#opentelemetrycollectorspec) @@ -22231,6 +22807,13 @@ The specification for the PersistentVolumeClaim. The entire content is copied un storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
false + + volumeAttributesClassName + string + + volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
+ + false volumeMode string @@ -22355,14 +22938,6 @@ resources represents the minimum resources the volume should have. - claims - []object - - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
- - false - limits map[string]int or string @@ -22380,33 +22955,6 @@ resources represents the minimum resources the volume should have. -### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources.claims[index] -[↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - ### OpenTelemetryCollector.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector [↩ Parent](#opentelemetrycollectorspecvolumesindexephemeralvolumeclaimtemplatespec) @@ -23205,6 +23753,14 @@ Projection that may be projected along with other supported volume types + clusterTrustBundle + object + + ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. + Alpha, gated by the ClusterTrustBundleProjection feature gate.
+ + false + configMap object @@ -23236,6 +23792,137 @@ Projection that may be projected along with other supported volume types +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].clusterTrustBundle +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) + + + +ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. + Alpha, gated by the ClusterTrustBundleProjection feature gate. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
pathstring + Relative path from the volume root to write the bundle.
+
true
labelSelectorobject + Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing".
+
false
namestring + Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector.
+
false
optionalboolean + If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist.
+
false
signerNamestring + Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].clusterTrustBundle.labelSelector +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexclustertrustbundle) + + + +Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing". + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
matchExpressions[]object + matchExpressions is a list of label selector requirements. The requirements are ANDed.
+
false
matchLabelsmap[string]string + matchLabels is a map of {key,value} pairs.
+
false
+ + +### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].clusterTrustBundle.labelSelector.matchExpressions[index] +[↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindexclustertrustbundlelabelselector) + + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescriptionRequired
keystring + key is the label key that the selector applies to.
+
true
operatorstring + operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
+
true
values[]string + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.
+
false
+ + ### OpenTelemetryCollector.spec.volumes[index].projected.sources[index].configMap [↩ Parent](#opentelemetrycollectorspecvolumesindexprojectedsourcesindex) diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh index 5c98e5398..4f069470a 100755 --- a/hack/modify-test-images.sh +++ b/hack/modify-test-images.sh @@ -10,6 +10,7 @@ ${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/ ${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml ${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml ${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-prometheuscr/*.yaml +${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e-prometheuscr/create-sm-prometheus-exporters/*.yaml ${SED_BIN} -i "s#${DEFAULT_OPERATOR_IMG}#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml diff --git a/internal/manifests/targetallocator/servicemonitor.go b/internal/manifests/targetallocator/servicemonitor.go new file mode 100644 index 000000000..a700ebbd9 --- /dev/null +++ b/internal/manifests/targetallocator/servicemonitor.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +// ServiceMonitor returns the service monitor for the given instance. +func ServiceMonitor(params manifests.Params) *monitoringv1.ServiceMonitor { + name := naming.TargetAllocator(params.OtelCol.Name) + labels := Labels(params.OtelCol, name) + + return &monitoringv1.ServiceMonitor{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: params.OtelCol.Namespace, + Name: name, + Labels: labels, + }, + Spec: monitoringv1.ServiceMonitorSpec{ + Endpoints: []monitoringv1.Endpoint{ + { + Port: "targetallocation", + }, + }, + + NamespaceSelector: monitoringv1.NamespaceSelector{ + MatchNames: []string{params.OtelCol.Namespace}, + }, + Selector: metav1.LabelSelector{ + MatchLabels: labels, + }, + }, + } +} diff --git a/internal/manifests/targetallocator/servicemonitor_test.go b/internal/manifests/targetallocator/servicemonitor_test.go new file mode 100644 index 000000000..1544eac03 --- /dev/null +++ b/internal/manifests/targetallocator/servicemonitor_test.go @@ -0,0 +1,55 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package targetallocator + +import ( + "fmt" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + + "github.com/stretchr/testify/assert" +) + +func TestDesiredServiceMonitors(t *testing.T) { + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: "my-instance", + Namespace: "my-namespace", + }, + Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Mode: v1alpha1.ModeStatefulSet, + Tolerations: testTolerationValues, + }, + } + cfg := config.New() + + params := manifests.Params{ + OtelCol: otelcol, + Config: cfg, + Log: logger, + } + + actual := ServiceMonitor(params) + assert.NotNil(t, actual) + assert.Equal(t, fmt.Sprintf("%s-targetallocator", params.OtelCol.Name), actual.Name) + assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) + assert.Equal(t, "targetallocation", actual.Spec.Endpoints[0].Port) + +} diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index e28329442..3022939b2 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -18,6 +18,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) // Build creates the manifest for the TargetAllocator resource. @@ -34,6 +35,10 @@ func Build(params manifests.Params) ([]client.Object, error) { manifests.Factory(PodDisruptionBudget), } + if params.OtelCol.Spec.TargetAllocator.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { + resourceFactories = append(resourceFactories, manifests.FactoryWithoutError(ServiceMonitor)) + } + for _, factory := range resourceFactories { res, err := factory(params) if err != nil { diff --git a/internal/naming/main.go b/internal/naming/main.go index ca2571285..58b43787c 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -160,6 +160,11 @@ func TargetAllocatorServiceAccount(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } +// TargetAllocatorServiceMonitor returns the TargetAllocator service account resource name. +func TargetAllocatorServiceMonitor(otelcol string) string { + return DNSName(Truncate("%s-targetallocator", 63, otelcol)) +} + // OpAMPBridgeServiceAccount builds the service account name based on the instance. func OpAMPBridgeServiceAccount(opampBridge string) string { return DNSName(Truncate("%s-opamp-bridge", 63, opampBridge)) diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml new file mode 100644 index 000000000..78de67b0f --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml @@ -0,0 +1,26 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: simplest-targetallocator + labels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/name: simplest-targetallocator + name: simplest-targetallocator + namespace: create-sm-prometheus +spec: + endpoints: + - port: targetallocation + selector: + matchLabels: + app.kubernetes.io/instance: create-sm-prometheus.simplest + app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/component: opentelemetry-targetallocator +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-metrics + namespace: create-sm-prometheus +status: + succeeded: 1 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml new file mode 100644 index 000000000..cb0e15df4 --- /dev/null +++ b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml @@ -0,0 +1,114 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: ta + namespace: create-sm-prometheus +automountServiceAccountToken: true +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ta +rules: +- apiGroups: [""] + resources: + - pods + - nodes + - services + - endpoints + - configmaps + - secrets + - namespaces + verbs: + - get + - watch + - list +- apiGroups: ["apps"] + resources: + - statefulsets + - services + - endpoints + verbs: + - get + - watch + - list +- apiGroups: ["discovery.k8s.io"] + resources: + - endpointslices + verbs: + - get + - watch + - list +- apiGroups: ["networking.k8s.io"] + resources: + - ingresses + verbs: + - get + - watch + - list +- apiGroups: ["monitoring.coreos.com"] + resources: + - servicemonitors + - podmonitors + verbs: + - get + - watch + - list +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - command: kubectl create clusterrolebinding simplest-targetallocator-create-sm-prometheus --clusterrole=ta --serviceaccount=create-sm-prometheus:ta +--- +apiVersion: opentelemetry.io/v1alpha1 +kind: OpenTelemetryCollector +metadata: + name: simplest + namespace: create-sm-prometheus +spec: + mode: statefulset + targetAllocator: + serviceAccount: ta + enabled: true + image: "local/opentelemetry-operator-targetallocator:e2e" + prometheusCR: + enabled: true + observability: + metrics: + enableMetrics: true + config: | + receivers: + prometheus: + config: + scrape_configs: [] + + processors: + + exporters: + prometheus: + endpoint: 0.0.0.0:9090 + service: + pipelines: + metrics: + receivers: [prometheus] + processors: [] + exporters: [prometheus] +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: check-ta-metrics + namespace: create-sm-prometheus +spec: + template: + spec: + restartPolicy: OnFailure + containers: + - name: check-metrics + image: curlimages/curl + args: + - /bin/sh + - -c + - curl -s http://simplest-targetallocator/jobs | grep "targetallocator" diff --git a/tests/e2e/targetallocator-prometheuscr/01-assert.yaml b/tests/e2e/targetallocator-prometheuscr/01-assert.yaml index b3b95bf02..2705a7ed8 100644 --- a/tests/e2e/targetallocator-prometheuscr/01-assert.yaml +++ b/tests/e2e/targetallocator-prometheuscr/01-assert.yaml @@ -17,4 +17,4 @@ kind: Job metadata: name: check-ta-scrape-configs status: - succeeded: 1 \ No newline at end of file + succeeded: 1 diff --git a/tests/e2e/targetallocator-prometheuscr/01-install.yaml b/tests/e2e/targetallocator-prometheuscr/01-install.yaml index 9c8e8d2ec..e28a148c0 100644 --- a/tests/e2e/targetallocator-prometheuscr/01-install.yaml +++ b/tests/e2e/targetallocator-prometheuscr/01-install.yaml @@ -45,4 +45,4 @@ spec: args: - /bin/sh - -c - - curl -s http://prometheus-cr-targetallocator/jobs | grep "prometheus-cr" \ No newline at end of file + - curl -s http://prometheus-cr-targetallocator/jobs | grep "prometheus-cr" From 496248558ebbee03e56b1cc0160685310d6cda09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:45:15 -0500 Subject: [PATCH 1203/1234] Bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /cmd/otel-allocator (#2457) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/otel-allocator/go.mod | 2 +- cmd/otel-allocator/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod index 8cec16987..678000c70 100644 --- a/cmd/otel-allocator/go.mod +++ b/cmd/otel-allocator/go.mod @@ -165,7 +165,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum index 5c7c37db4..c12e2cb9f 100644 --- a/cmd/otel-allocator/go.sum +++ b/cmd/otel-allocator/go.sum @@ -720,8 +720,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= From 879c8469b09bc83b94c1ecc8b6bf724a47fecc3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:45:25 -0500 Subject: [PATCH 1204/1234] Bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#2456) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 6b58f03dd..668979ac3 100644 --- a/go.mod +++ b/go.mod @@ -131,7 +131,7 @@ require ( go.opentelemetry.io/otel/trace v1.21.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.19.0 // indirect diff --git a/go.sum b/go.sum index a1b52cd5f..d9c84339d 100644 --- a/go.sum +++ b/go.sum @@ -554,8 +554,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= From 200b9b2ee99085503c5f7f61c6e090a548a3bbea Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:50:08 +0100 Subject: [PATCH 1205/1234] Bump Apache httpd dependencies (#2464) * Bump Apache httpd dependencies Signed-off-by: Yuri Sa * Bump Apache httpd dependencies Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/bump-apache-httpd-dependencies.yaml | 16 ++++++++++++++++ autoinstrumentation/apache-httpd/Dockerfile | 4 ++-- autoinstrumentation/apache-httpd/version.txt | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 .chloggen/bump-apache-httpd-dependencies.yaml diff --git a/.chloggen/bump-apache-httpd-dependencies.yaml b/.chloggen/bump-apache-httpd-dependencies.yaml new file mode 100755 index 000000000..d3d17ee4f --- /dev/null +++ b/.chloggen/bump-apache-httpd-dependencies.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump Apache httpd version + +# One or more tracking issues related to the change +issues: [2463] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/apache-httpd/Dockerfile b/autoinstrumentation/apache-httpd/Dockerfile index af9c12e6c..14d70d048 100644 --- a/autoinstrumentation/apache-httpd/Dockerfile +++ b/autoinstrumentation/apache-httpd/Dockerfile @@ -9,9 +9,9 @@ ARG version RUN mkdir /opt/opentelemetry WORKDIR /opt/opentelemetry -RUN wget https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz RUN mkdir agent -RUN tar -xvf opentelemetry-webserver-sdk-x64-linux.tgz -C agent +RUN wget -c https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz +RUN unzip -p opentelemetry-webserver-sdk-x64-linux.tgz | tar -zx -C agent ############################ # STEP 2 download the webserver agent diff --git a/autoinstrumentation/apache-httpd/version.txt b/autoinstrumentation/apache-httpd/version.txt index e4c0d46e5..a6a3a43c3 100644 --- a/autoinstrumentation/apache-httpd/version.txt +++ b/autoinstrumentation/apache-httpd/version.txt @@ -1 +1 @@ -1.0.3 \ No newline at end of file +1.0.4 \ No newline at end of file From 9bfa5fef1810971876e875a8f710017a30252e90 Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 20 Dec 2023 16:50:30 +0100 Subject: [PATCH 1206/1234] Bump NodeJS dependencies (#2460) Signed-off-by: Yuri Sa --- .../bump-autoinstrumentation-version.yaml | 16 +++++++++++++ autoinstrumentation/nodejs/package.json | 24 +++++++++---------- 2 files changed, 28 insertions(+), 12 deletions(-) create mode 100755 .chloggen/bump-autoinstrumentation-version.yaml diff --git a/.chloggen/bump-autoinstrumentation-version.yaml b/.chloggen/bump-autoinstrumentation-version.yaml new file mode 100755 index 000000000..dfce3b45d --- /dev/null +++ b/.chloggen/bump-autoinstrumentation-version.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Bump NodeJS dependencies." + +# One or more tracking issues related to the change +issues: [2459] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json index 733e4bf02..f62865fc3 100644 --- a/autoinstrumentation/nodejs/package.json +++ b/autoinstrumentation/nodejs/package.json @@ -14,17 +14,17 @@ "typescript": "^4.4.4" }, "dependencies": { - "@opentelemetry/api": "1.6.0", - "@opentelemetry/auto-instrumentations-node": "0.39.4", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.44.0", - "@opentelemetry/exporter-prometheus": "0.44.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.44.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.28.2", - "@opentelemetry/resource-detector-aws": "1.3.2", - "@opentelemetry/resource-detector-container": "0.3.2", - "@opentelemetry/resource-detector-gcp": "0.29.2", - "@opentelemetry/resources": "1.17.1", - "@opentelemetry/sdk-metrics": "1.17.1", - "@opentelemetry/sdk-node": "0.44.0" + "@opentelemetry/api": "1.7.0", + "@opentelemetry/auto-instrumentations-node": "0.40.2", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.46.0", + "@opentelemetry/exporter-prometheus": "0.46.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.46.0", + "@opentelemetry/resource-detector-alibaba-cloud": "0.28.4", + "@opentelemetry/resource-detector-aws": "1.3.4", + "@opentelemetry/resource-detector-container": "0.3.4", + "@opentelemetry/resource-detector-gcp": "0.29.4", + "@opentelemetry/resources": "1.19.0", + "@opentelemetry/sdk-metrics": "1.19.0", + "@opentelemetry/sdk-node": "0.46.0" } } From 053e915978a96d047d9862e2ec2f263c4da4634c Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:30:46 +0100 Subject: [PATCH 1207/1234] Support for Kubernetes 1.29 version (#2465) * Support for Kubernetes 1.29 version Signed-off-by: Yuri Sa * Support for Kubernetes 1.29 version Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/support-version-1.29.0.yaml | 16 ++++++++++++++++ .github/workflows/e2e.yaml | 2 +- .github/workflows/scorecard.yaml | 2 +- kind-1.29.yaml | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100755 .chloggen/support-version-1.29.0.yaml create mode 100644 kind-1.29.yaml diff --git a/.chloggen/support-version-1.29.0.yaml b/.chloggen/support-version-1.29.0.yaml new file mode 100755 index 000000000..44645349d --- /dev/null +++ b/.chloggen/support-version-1.29.0.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'enhancement' + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Support for Kubernetes 1.29 version. + +# One or more tracking issues related to the change +issues: [2458] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0ab9811ad..831d47e43 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -22,7 +22,7 @@ jobs: # should be compatible with them. kube-version: - "1.23" - - "1.28" + - "1.29" group: - e2e - e2e-instrumentation diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index 95339d67e..af6835bc2 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -18,7 +18,7 @@ jobs: matrix: kube-version: - "1.23" - - "1.28" + - "1.29" steps: diff --git a/kind-1.29.yaml b/kind-1.29.yaml new file mode 100644 index 000000000..66c8d46ec --- /dev/null +++ b/kind-1.29.yaml @@ -0,0 +1,18 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.29.0@sha256:54a50c9354f11ce0aa56a85d2cacb1b950f85eab3fe1caf988826d1f89bf37eb + kubeadmConfigPatches: + - | + kind: InitConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true" + extraPortMappings: + - containerPort: 80 + hostPort: 80 + protocol: TCP + - containerPort: 443 + hostPort: 443 + protocol: TCP From 9d99573d17bcee9ebeeaebbd14eee15f77b1ad6c Mon Sep 17 00:00:00 2001 From: Yuri Sa <48062171+yuriolisa@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:53:48 +0100 Subject: [PATCH 1208/1234] Bump Python dependencies (#2462) * Bump Python dependencies Signed-off-by: Yuri Sa * Bump Python dependencies Signed-off-by: Yuri Sa * Bump python dependencies Signed-off-by: Yuri Sa --------- Signed-off-by: Yuri Sa --- .chloggen/bump-python-dependencies.yaml | 16 ++++ autoinstrumentation/python/requirements.txt | 96 ++++++++++----------- 2 files changed, 64 insertions(+), 48 deletions(-) create mode 100755 .chloggen/bump-python-dependencies.yaml diff --git a/.chloggen/bump-python-dependencies.yaml b/.chloggen/bump-python-dependencies.yaml new file mode 100755 index 000000000..589b30b28 --- /dev/null +++ b/.chloggen/bump-python-dependencies.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Bump python autoinstrumentation version to 1.22.0/0.43b0 + +# One or more tracking issues related to the change +issues: [2460] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt index 9ab2d4392..8257b291c 100644 --- a/autoinstrumentation/python/requirements.txt +++ b/autoinstrumentation/python/requirements.txt @@ -1,56 +1,56 @@ -opentelemetry-distro==0.41b0 +opentelemetry-distro==0.43b0 # We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for # injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.20.0 +opentelemetry-exporter-otlp-proto-http==1.22.0 -opentelemetry-propagator-b3==1.20.0 -opentelemetry-propagator-jaeger==1.20.0 +opentelemetry-propagator-b3==1.22.0 +opentelemetry-propagator-jaeger==1.22.0 opentelemetry-propagator-aws-xray==1.0.1 -opentelemetry-instrumentation==0.41b0 -opentelemetry-propagator-ot-trace==0.41b0 +opentelemetry-instrumentation==0.43b0 +opentelemetry-propagator-ot-trace==0.43b0 # Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation # except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.41b0 -opentelemetry-instrumentation-aiohttp-client==0.41b0 -opentelemetry-instrumentation-aiopg==0.41b0 -opentelemetry-instrumentation-asgi==0.41b0 -opentelemetry-instrumentation-asyncpg==0.41b0 -opentelemetry-instrumentation-boto==0.41b0 -opentelemetry-instrumentation-boto3sqs==0.41b0 -opentelemetry-instrumentation-botocore==0.41b0 -opentelemetry-instrumentation-celery==0.41b0 -opentelemetry-instrumentation-confluent-kafka==0.41b0 -opentelemetry-instrumentation-dbapi==0.41b0 -opentelemetry-instrumentation-django==0.41b0 -opentelemetry-instrumentation-elasticsearch==0.41b0 -opentelemetry-instrumentation-falcon==0.41b0 -opentelemetry-instrumentation-fastapi==0.41b0 -opentelemetry-instrumentation-flask==0.41b0 -opentelemetry-instrumentation-grpc==0.41b0 -opentelemetry-instrumentation-httpx==0.41b0 -opentelemetry-instrumentation-jinja2==0.41b0 -opentelemetry-instrumentation-kafka-python==0.41b0 -opentelemetry-instrumentation-logging==0.41b0 -opentelemetry-instrumentation-mysql==0.41b0 -opentelemetry-instrumentation-mysqlclient==0.41b0 -opentelemetry-instrumentation-pika==0.41b0 -opentelemetry-instrumentation-psycopg2==0.41b0 -opentelemetry-instrumentation-pymemcache==0.41b0 -opentelemetry-instrumentation-pymongo==0.41b0 -opentelemetry-instrumentation-pymysql==0.41b0 -opentelemetry-instrumentation-pyramid==0.41b0 -opentelemetry-instrumentation-redis==0.41b0 -opentelemetry-instrumentation-remoulade==0.41b0 -opentelemetry-instrumentation-requests==0.41b0 -opentelemetry-instrumentation-sklearn==0.41b0 -opentelemetry-instrumentation-sqlalchemy==0.41b0 -opentelemetry-instrumentation-sqlite3==0.41b0 -opentelemetry-instrumentation-starlette==0.41b0 -opentelemetry-instrumentation-system-metrics==0.41b0 -opentelemetry-instrumentation-tornado==0.41b0 -opentelemetry-instrumentation-tortoiseorm==0.41b0 -opentelemetry-instrumentation-urllib==0.41b0 -opentelemetry-instrumentation-urllib3==0.41b0 -opentelemetry-instrumentation-wsgi==0.41b0 +opentelemetry-instrumentation-aio-pika==0.43b0 +opentelemetry-instrumentation-aiohttp-client==0.43b0 +opentelemetry-instrumentation-aiopg==0.43b0 +opentelemetry-instrumentation-asgi==0.43b0 +opentelemetry-instrumentation-asyncpg==0.43b0 +opentelemetry-instrumentation-boto==0.43b0 +opentelemetry-instrumentation-boto3sqs==0.43b0 +opentelemetry-instrumentation-botocore==0.43b0 +opentelemetry-instrumentation-celery==0.43b0 +opentelemetry-instrumentation-confluent-kafka==0.43b0 +opentelemetry-instrumentation-dbapi==0.43b0 +opentelemetry-instrumentation-django==0.43b0 +opentelemetry-instrumentation-elasticsearch==0.43b0 +opentelemetry-instrumentation-falcon==0.43b0 +opentelemetry-instrumentation-fastapi==0.43b0 +opentelemetry-instrumentation-flask==0.43b0 +opentelemetry-instrumentation-grpc==0.43b0 +opentelemetry-instrumentation-httpx==0.43b0 +opentelemetry-instrumentation-jinja2==0.43b0 +opentelemetry-instrumentation-kafka-python==0.43b0 +opentelemetry-instrumentation-logging==0.43b0 +opentelemetry-instrumentation-mysql==0.43b0 +opentelemetry-instrumentation-mysqlclient==0.43b0 +opentelemetry-instrumentation-pika==0.43b0 +opentelemetry-instrumentation-psycopg2==0.43b0 +opentelemetry-instrumentation-pymemcache==0.43b0 +opentelemetry-instrumentation-pymongo==0.43b0 +opentelemetry-instrumentation-pymysql==0.43b0 +opentelemetry-instrumentation-pyramid==0.43b0 +opentelemetry-instrumentation-redis==0.43b0 +opentelemetry-instrumentation-remoulade==0.43b0 +opentelemetry-instrumentation-requests==0.43b0 +opentelemetry-instrumentation-sklearn==0.43b0 +opentelemetry-instrumentation-sqlalchemy==0.43b0 +opentelemetry-instrumentation-sqlite3==0.43b0 +opentelemetry-instrumentation-starlette==0.43b0 +opentelemetry-instrumentation-system-metrics==0.43b0 +opentelemetry-instrumentation-tornado==0.43b0 +opentelemetry-instrumentation-tortoiseorm==0.43b0 +opentelemetry-instrumentation-urllib==0.43b0 +opentelemetry-instrumentation-urllib3==0.43b0 +opentelemetry-instrumentation-wsgi==0.43b0 From c2b3eceb50cdb5b44dfdc1ed5c14ae80cb00261e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20=C5=9Awi=C4=85tek?= Date: Thu, 21 Dec 2023 20:18:41 +0000 Subject: [PATCH 1209/1234] Add version label to target allocator resources (#2455) * Add version label to target allocator resources * Use manifestutils.SelectorLabels for target allocator resources --- .chloggen/chore_targetallocator-labels.yaml | 16 +++++++++++ controllers/builder_test.go | 9 +++++++ .../manifests/targetallocator/configmap.go | 8 ------ .../manifests/targetallocator/deployment.go | 2 +- .../targetallocator/deployment_test.go | 5 +++- internal/manifests/targetallocator/labels.go | 27 +++++++------------ .../manifests/targetallocator/labels_test.go | 22 ++++++++++++++- .../targetallocator/poddisruptionbudget.go | 9 +------ internal/manifests/targetallocator/service.go | 2 +- .../targetallocator/servicemonitor.go | 2 +- .../targetallocator/targetallocator.go | 4 +++ 11 files changed, 68 insertions(+), 38 deletions(-) create mode 100755 .chloggen/chore_targetallocator-labels.yaml diff --git a/.chloggen/chore_targetallocator-labels.yaml b/.chloggen/chore_targetallocator-labels.yaml new file mode 100755 index 000000000..c05fbe09e --- /dev/null +++ b/.chloggen/chore_targetallocator-labels.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: operator + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add version label to target allocator resources + +# One or more tracking issues related to the change +issues: [2454] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/controllers/builder_test.go b/controllers/builder_test.go index c953bf8c7..be8e635d7 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -1329,6 +1329,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: nil, }, @@ -1344,6 +1345,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", @@ -1433,6 +1435,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, }, }, @@ -1446,6 +1449,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: nil, }, @@ -1685,6 +1689,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: nil, }, @@ -1700,6 +1705,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", @@ -1789,6 +1795,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, }, }, @@ -1802,6 +1809,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: nil, }, @@ -1829,6 +1837,7 @@ service: "app.kubernetes.io/managed-by": "opentelemetry-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", + "app.kubernetes.io/version": "latest", }, Annotations: nil, }, diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index 5e46209d4..ca267c708 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -15,8 +15,6 @@ package targetallocator import ( - "strings" - "gopkg.in/yaml.v2" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -35,13 +33,7 @@ const ( func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { name := naming.TAConfigMap(params.OtelCol.Name) - version := strings.Split(params.OtelCol.Spec.Image, ":") labels := Labels(params.OtelCol, name) - if len(version) > 1 { - labels["app.kubernetes.io/version"] = version[len(version)-1] - } else { - labels["app.kubernetes.io/version"] = "latest" - } // Collector supports environment variable substitution, but the TA does not. // TA ConfigMap should have a single "$", as it does not support env var substitution diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index e4e99b70e..820aa8de9 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -44,7 +44,7 @@ func Deployment(params manifests.Params) (*appsv1.Deployment, error) { Spec: appsv1.DeploymentSpec{ Replicas: params.OtelCol.Spec.TargetAllocator.Replicas, Selector: &metav1.LabelSelector{ - MatchLabels: labels, + MatchLabels: SelectorLabels(params.OtelCol), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index 0d7d921f0..c91e442e1 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -150,7 +150,7 @@ func TestDeploymentNewDefault(t *testing.T) { assert.Len(t, d.Spec.Template.Annotations, 1) // the pod selector should match the pod spec's labels - assert.Equal(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) + assert.Subset(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) } func TestDeploymentPodAnnotations(t *testing.T) { @@ -187,6 +187,9 @@ func collectorInstance() v1alpha1.OpenTelemetryCollector { Spec: v1alpha1.OpenTelemetryCollectorSpec{ Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", Config: string(configYAML), + TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ + Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-targetallocator:0.47.0", + }, }, } } diff --git a/internal/manifests/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go index 3c9ae4dae..6271ebb6e 100644 --- a/internal/manifests/targetallocator/labels.go +++ b/internal/manifests/targetallocator/labels.go @@ -16,27 +16,20 @@ package targetallocator import ( "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. func Labels(instance v1alpha1.OpenTelemetryCollector, name string) map[string]string { - // new map every time, so that we don't touch the instance's label - base := map[string]string{} - if nil != instance.Labels { - for k, v := range instance.Labels { - base[k] = v - } - } - - base["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - base["app.kubernetes.io/instance"] = naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name) - base["app.kubernetes.io/part-of"] = "opentelemetry" - base["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - - if _, ok := base["app.kubernetes.io/name"]; !ok { - base["app.kubernetes.io/name"] = name - } + return manifestutils.Labels(instance.ObjectMeta, name, instance.Spec.TargetAllocator.Image, ComponentOpenTelemetryTargetAllocator, nil) +} - return base +// SelectorLabels return the selector labels for Target Allocator Pods. +func SelectorLabels(instance v1alpha1.OpenTelemetryCollector) map[string]string { + selectorLabels := manifestutils.SelectorLabels(instance.ObjectMeta, ComponentOpenTelemetryTargetAllocator) + // TargetAllocator uses the name label as well for selection + // This is inconsistent with the Collector, but changing is a somewhat painful breaking change + selectorLabels["app.kubernetes.io/name"] = naming.TargetAllocator(instance.Name) + return selectorLabels } diff --git a/internal/manifests/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go index 996128bea..d6f1891d1 100644 --- a/internal/manifests/targetallocator/labels_test.go +++ b/internal/manifests/targetallocator/labels_test.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" ) const ( @@ -43,6 +44,7 @@ func TestLabelsCommonSet(t *testing.T) { assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) + assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) assert.Equal(t, name, labels["app.kubernetes.io/name"]) } @@ -61,7 +63,25 @@ func TestLabelsPropagateDown(t *testing.T) { labels := Labels(otelcol, name) // verify - assert.Len(t, labels, 6) + assert.Len(t, labels, 7) assert.Equal(t, "mycomponent", labels["myapp"]) assert.Equal(t, "test", labels["app.kubernetes.io/name"]) } + +func TestSelectorLabels(t *testing.T) { + // prepare + otelcol := v1alpha1.OpenTelemetryCollector{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + }, + } + + // test + labels := SelectorLabels(otelcol) + assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) + assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) + assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) + assert.Equal(t, naming.TargetAllocator(otelcol.Name), labels["app.kubernetes.io/name"]) +} diff --git a/internal/manifests/targetallocator/poddisruptionbudget.go b/internal/manifests/targetallocator/poddisruptionbudget.go index 34b32fb26..f7d5d21a5 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget.go +++ b/internal/manifests/targetallocator/poddisruptionbudget.go @@ -16,7 +16,6 @@ package targetallocator import ( "fmt" - "strings" "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" "github.com/open-telemetry/opentelemetry-operator/internal/manifests" @@ -42,13 +41,7 @@ func PodDisruptionBudget(params manifests.Params) (*policyV1.PodDisruptionBudget } name := naming.TAPodDisruptionBudget(params.OtelCol.Name) - version := strings.Split(params.OtelCol.Spec.Image, ":") labels := Labels(params.OtelCol, name) - if len(version) > 1 { - labels["app.kubernetes.io/version"] = version[len(version)-1] - } else { - labels["app.kubernetes.io/version"] = "latest" - } annotations := Annotations(params.OtelCol, nil) @@ -65,7 +58,7 @@ func PodDisruptionBudget(params manifests.Params) (*policyV1.PodDisruptionBudget MinAvailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MinAvailable, MaxUnavailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MaxUnavailable, Selector: &metav1.LabelSelector{ - MatchLabels: objectMeta.Labels, + MatchLabels: SelectorLabels(params.OtelCol), }, }, }, nil diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go index bb3079dda..8238c0032 100644 --- a/internal/manifests/targetallocator/service.go +++ b/internal/manifests/targetallocator/service.go @@ -27,7 +27,7 @@ func Service(params manifests.Params) *corev1.Service { name := naming.TAService(params.OtelCol.Name) labels := Labels(params.OtelCol, name) - selector := Labels(params.OtelCol, name) + selector := SelectorLabels(params.OtelCol) return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/targetallocator/servicemonitor.go b/internal/manifests/targetallocator/servicemonitor.go index a700ebbd9..6f5c94c41 100644 --- a/internal/manifests/targetallocator/servicemonitor.go +++ b/internal/manifests/targetallocator/servicemonitor.go @@ -44,7 +44,7 @@ func ServiceMonitor(params manifests.Params) *monitoringv1.ServiceMonitor { MatchNames: []string{params.OtelCol.Namespace}, }, Selector: metav1.LabelSelector{ - MatchLabels: labels, + MatchLabels: SelectorLabels(params.OtelCol), }, }, } diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 3022939b2..3df413556 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -21,6 +21,10 @@ import ( "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" ) +const ( + ComponentOpenTelemetryTargetAllocator = "opentelemetry-targetallocator" +) + // Build creates the manifest for the TargetAllocator resource. func Build(params manifests.Params) ([]client.Object, error) { var resourceManifests []client.Object From 2592b2a59add3eb3693721332ae1a027fb3350fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 06:44:11 -0500 Subject: [PATCH 1210/1234] Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 (#2474) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.3.0 to 1.4.1. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 668979ac3..aee779ec8 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ retract v1.51.0 require ( dario.cat/mergo v1.0.0 github.com/Masterminds/semver/v3 v3.2.1 - github.com/go-logr/logr v1.3.0 + github.com/go-logr/logr v1.4.1 github.com/mitchellh/mapstructure v1.5.0 github.com/openshift/api v3.9.0+incompatible github.com/operator-framework/operator-lib v0.11.0 diff --git a/go.sum b/go.sum index d9c84339d..2e99b917b 100644 --- a/go.sum +++ b/go.sum @@ -156,8 +156,9 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= From 4cebad349a94f13da8fc59c4a0a56ed14154ef30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Dec 2023 06:44:23 -0500 Subject: [PATCH 1211/1234] Bump github.com/go-logr/logr in /cmd/operator-opamp-bridge (#2473) Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.3.0 to 1.4.1. - [Release notes](https://github.com/go-logr/logr/releases) - [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-logr/logr/compare/v1.3.0...v1.4.1) --- updated-dependencies: - dependency-name: github.com/go-logr/logr dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- cmd/operator-opamp-bridge/go.mod | 2 +- cmd/operator-opamp-bridge/go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod index 4a6065260..769418551 100644 --- a/cmd/operator-opamp-bridge/go.mod +++ b/cmd/operator-opamp-bridge/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridg go 1.21 require ( - github.com/go-logr/logr v1.3.0 + github.com/go-logr/logr v1.4.1 github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.10.0 github.com/open-telemetry/opentelemetry-operator v0.85.0 diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum index e7eddeb59..0e8108c04 100644 --- a/cmd/operator-opamp-bridge/go.sum +++ b/cmd/operator-opamp-bridge/go.sum @@ -22,8 +22,9 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= From f15118dc014f71ce45b63f2145571cd834a4ad13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20B=C3=BCtler?= <48495685+fbuetler@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:40:16 +0100 Subject: [PATCH 1212/1234] add loki parser to parse servicePort from config (#2437) Co-authored-by: Jacob Aronoff --- .chloggen/add-loki-parser.yaml | 16 +++ .../parser/receiver/receiver_loki.go | 131 ++++++++++++++++++ .../parser/receiver/receiver_loki_test.go | 109 +++++++++++++++ 3 files changed, 256 insertions(+) create mode 100644 .chloggen/add-loki-parser.yaml create mode 100644 internal/manifests/collector/parser/receiver/receiver_loki.go create mode 100644 internal/manifests/collector/parser/receiver/receiver_loki_test.go diff --git a/.chloggen/add-loki-parser.yaml b/.chloggen/add-loki-parser.yaml new file mode 100644 index 000000000..4c1871292 --- /dev/null +++ b/.chloggen/add-loki-parser.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) +component: collector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add Loki parser to extract loki service port from config + +# One or more tracking issues related to the change +issues: [1825] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/internal/manifests/collector/parser/receiver/receiver_loki.go b/internal/manifests/collector/parser/receiver/receiver_loki.go new file mode 100644 index 000000000..6cdac8135 --- /dev/null +++ b/internal/manifests/collector/parser/receiver/receiver_loki.go @@ -0,0 +1,131 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package receiver + +import ( + "fmt" + + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/intstr" + + "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/open-telemetry/opentelemetry-operator/internal/naming" +) + +var _ parser.ComponentPortParser = &LokiReceiverParser{} + +const ( + parserNameLoki = "__loki" + + defaultLokiGRPCPort int32 = 9095 + defaultLokiHTTPPort int32 = 3100 +) + +// LokiReceiverParser parses the configuration for Loki receivers. +type LokiReceiverParser struct { + config map[interface{}]interface{} + logger logr.Logger + name string +} + +// NewLokiReceiverParser builds a new parser for Loki receivers. +func NewLokiReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { + if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { + return &LokiReceiverParser{ + logger: logger, + name: name, + config: protocols, + } + } + + return &LokiReceiverParser{ + name: name, + config: map[interface{}]interface{}{}, + } +} + +// Ports returns all the service ports for all protocols in this parser. +func (o *LokiReceiverParser) Ports() ([]corev1.ServicePort, error) { + ports := []corev1.ServicePort{} + + for _, protocol := range []struct { + name string + defaultPorts []corev1.ServicePort + }{ + { + name: grpc, + defaultPorts: []corev1.ServicePort{ + { + Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultLokiGRPCPort), + Port: defaultLokiGRPCPort, + TargetPort: intstr.FromInt(int(defaultLokiGRPCPort)), + AppProtocol: &grpc, + }, + }, + }, + { + name: http, + defaultPorts: []corev1.ServicePort{ + { + Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultLokiHTTPPort), + Port: defaultLokiHTTPPort, + TargetPort: intstr.FromInt(int(defaultLokiHTTPPort)), + AppProtocol: &http, + }, + }, + }, + } { + // do we have the protocol specified at all? + if receiverProtocol, ok := o.config[protocol.name]; ok { + // we have the specified protocol, we definitely need a service port + nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) + var protocolPort *corev1.ServicePort + + // do we have a configuration block for the protocol? + settings, ok := receiverProtocol.(map[interface{}]interface{}) + if ok { + protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) + } + + // have we parsed a port based on the configuration block? + // if not, we use the default port + if protocolPort == nil { + ports = append(ports, protocol.defaultPorts...) + } else { + // infer protocol and appProtocol from protocol.name + if protocol.name == grpc { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &grpc + } else if protocol.name == http { + protocolPort.Protocol = corev1.ProtocolTCP + protocolPort.AppProtocol = &http + } + ports = append(ports, *protocolPort) + } + } + } + + return ports, nil +} + +// ParserName returns the name of this parser. +func (o *LokiReceiverParser) ParserName() string { + return parserNameLoki +} + +func init() { + Register("loki", NewLokiReceiverParser) +} diff --git a/internal/manifests/collector/parser/receiver/receiver_loki_test.go b/internal/manifests/collector/parser/receiver/receiver_loki_test.go new file mode 100644 index 000000000..cc10edc9f --- /dev/null +++ b/internal/manifests/collector/parser/receiver/receiver_loki_test.go @@ -0,0 +1,109 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package receiver + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestLokiSelfRegisters(t *testing.T) { + // verify + assert.True(t, IsRegistered("loki")) +} + +func TestLokiIsFoundByName(t *testing.T) { + // test + p, err := For(logger, "loki", map[interface{}]interface{}{}) + assert.NoError(t, err) + + // verify + assert.Equal(t, "__loki", p.ParserName()) +} + +func TestLokiPortsOverridden(t *testing.T) { + // prepare + builder := NewLokiReceiverParser(logger, "loki", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1234", + }, + "http": map[interface{}]interface{}{ + "endpoint": "0.0.0.0:1235", + }, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "loki-grpc": {portNumber: 1234}, + "loki-http": {portNumber: 1235}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, len(expectedResults)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} + +func TestLokiExposeDefaultPorts(t *testing.T) { + // prepare + builder := NewLokiReceiverParser(logger, "loki", map[interface{}]interface{}{ + "protocols": map[interface{}]interface{}{ + "grpc": map[interface{}]interface{}{}, + "http": map[interface{}]interface{}{}, + }, + }) + + expectedResults := map[string]struct { + portNumber int32 + seen bool + }{ + "loki-grpc": {portNumber: 9095}, + "loki-http": {portNumber: 3100}, + } + + // test + ports, err := builder.Ports() + + // verify + assert.NoError(t, err) + assert.Len(t, ports, len(expectedResults)) + + for _, port := range ports { + r := expectedResults[port.Name] + r.seen = true + expectedResults[port.Name] = r + assert.EqualValues(t, r.portNumber, port.Port) + } + for k, v := range expectedResults { + assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) + } +} From 55038d369c9db6850d101a1023580b09efdc6c7f Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 2 Jan 2024 14:34:43 -0500 Subject: [PATCH 1213/1234] Remove unused files --- .chloggen/2311-ta-servicemonitor.yaml | 16 - .chloggen/TEMPLATE.yaml | 16 - .chloggen/add-loki-parser.yaml | 16 - .chloggen/bump-apache-httpd-dependencies.yaml | 16 - .../bump-autoinstrumentation-version.yaml | 16 - .chloggen/bump-python-dependencies.yaml | 16 - .chloggen/chore_targetallocator-labels.yaml | 16 - .chloggen/fix_ta-serviceaccount.yaml | 16 - .chloggen/support-version-1.29.0.yaml | 16 - .chloggen/ta_removehotreload.yaml | 16 - .chloggen/target-allocator-pdb.yaml | 16 - .ci/create-release-github.sh | 9 - .github/CODEOWNERS | 22 - .github/ISSUE_TEMPLATE/bug_report.yaml | 73 - .github/ISSUE_TEMPLATE/feature_request.yaml | 36 - .github/ISSUE_TEMPLATE/other.yaml | 22 - ...lish-autoinstrumentation-apache-httpd.yaml | 69 - .../publish-autoinstrumentation-dotnet.yaml | 79 - .../publish-autoinstrumentation-java.yaml | 80 - .../publish-autoinstrumentation-nodejs.yaml | 80 - .../publish-autoinstrumentation-python.yaml | 80 - .github/workflows/publish-images.yaml | 105 - .../workflows/publish-operator-bundle.yaml | 79 - .../publish-operator-opamp-bridge.yaml | 94 - .../workflows/publish-target-allocator.yaml | 94 - .github/workflows/release.yaml | 46 - .../reusable-operator-hub-release.yaml | 88 - ...ublish-autoinstrumentation-e2e-images.yaml | 58 - .golangci.yaml | 73 - CHANGELOG.md | 1212 --- PROJECT | 45 - RELEASE.md | 47 - apis/v1alpha1/amazoncloudwatchagent_types.go | 222 - .../v1alpha1/amazoncloudwatchagent_webhook.go | 122 - apis/v1alpha1/collector_webhook.go | 6 +- apis/v1alpha1/collector_webhook_test.go | 2 +- apis/v1alpha1/instrumentation_webhook.go | 4 +- apis/v1alpha1/instrumentation_webhook_test.go | 2 +- apis/v1alpha1/opampbridge_webhook.go | 2 +- apis/v1alpha1/opampbridge_webhook_test.go | 2 +- apis/v1alpha1/opentelemetrycollector_types.go | 2 +- apis/v1alpha1/zz_generated.deepcopy.go | 14 +- apis/v1alpha2/instrumentation_types.go | 2 +- apis/v1alpha2/opentelemetrycollector_types.go | 2 +- apis/v1alpha2/zz_generated.deepcopy.go | 17 +- bundle.Dockerfile | 20 - ...er-manager-metrics-service_v1_service.yaml | 19 - ...c.authorization.k8s.io_v1_clusterrole.yaml | 12 - ...y-operator-webhook-service_v1_service.yaml | 17 - ...emetry-operator.clusterserviceversion.yaml | 702 -- .../opentelemetry.io_instrumentations.yaml | 1635 ---- .../opentelemetry.io_opampbridges.yaml | 2958 ------ ...ntelemetry.io_opentelemetrycollectors.yaml | 7522 --------------- bundle/metadata/annotations.yaml | 14 - bundle/tests/scorecard/config.yaml | 50 - cmd/operator-opamp-bridge/Dockerfile | 21 - cmd/operator-opamp-bridge/agent/agent.go | 366 - cmd/operator-opamp-bridge/agent/agent_test.go | 768 -- .../agent/collector_key.go | 43 - .../agent/collector_key_test.go | 98 - .../agent/testdata/agent.yaml | 14 - .../testdata/agentbasiccomponentsallowed.yaml | 22 - .../agent/testdata/agentbatchnotallowed.yaml | 21 - .../agent/testdata/agenthttpbasic.yaml | 14 - .../testdata/agentnoprocessorsallowed.yaml | 19 - .../agent/testdata/basic.yaml | 30 - .../agent/testdata/invalid.yaml | 30 - .../agent/testdata/updated.yaml | 31 - cmd/operator-opamp-bridge/config/config.go | 276 - .../config/config_test.go | 182 - cmd/operator-opamp-bridge/config/flags.go | 73 - .../config/flags_test.go | 97 - cmd/operator-opamp-bridge/config/headers.go | 27 - .../config/testdata/agent.yaml | 14 - .../config/testdata/agentbadconf.yaml | 14 - .../testdata/agentbasiccomponentsallowed.yaml | 22 - .../config/testdata/agenthttpbasic.yaml | 16 - .../config/testdata/agentwithheaders.yaml | 17 - cmd/operator-opamp-bridge/go.mod | 95 - cmd/operator-opamp-bridge/go.sum | 287 - cmd/operator-opamp-bridge/header.txt | 13 - cmd/operator-opamp-bridge/logger/logger.go | 40 - cmd/operator-opamp-bridge/main.go | 63 - cmd/operator-opamp-bridge/metrics/reporter.go | 168 - cmd/operator-opamp-bridge/operator/client.go | 250 - .../operator/client_test.go | 245 - .../operator/testdata/collector.yaml | 31 - .../operator/testdata/invalid-collector.yaml | 28 - .../testdata/reporting-collector.yaml | 31 - .../testdata/unmanaged-collector.yaml | 31 - .../operator/testdata/updated-collector.yaml | 31 - cmd/otel-allocator/Dockerfile | 19 - cmd/otel-allocator/README.md | 311 - .../allocation/allocatortest.go | 71 - .../allocation/consistent_hashing.go | 294 - .../allocation/consistent_hashing_test.go | 144 - .../allocation/least_weighted.go | 305 - .../allocation/least_weighted_test.go | 306 - cmd/otel-allocator/allocation/strategy.go | 133 - .../allocation/strategy_test.go | 136 - cmd/otel-allocator/collector/collector.go | 144 - .../collector/collector_test.go | 221 - cmd/otel-allocator/config/config.go | 172 - cmd/otel-allocator/config/config_test.go | 220 - cmd/otel-allocator/config/flags.go | 64 - cmd/otel-allocator/config/flags_test.go | 91 - .../config/testdata/config_test.yaml | 17 - .../config/testdata/file_sd_test.json | 18 - .../config/testdata/no_config.yaml | 0 .../testdata/pod_service_selector_test.yaml | 14 - cmd/otel-allocator/diff/diff.go | 63 - cmd/otel-allocator/diff/diff_test.go | 108 - cmd/otel-allocator/go.mod | 200 - cmd/otel-allocator/go.sum | 1121 --- cmd/otel-allocator/header.txt | 13 - cmd/otel-allocator/main.go | 218 - cmd/otel-allocator/prehook/prehook.go | 64 - cmd/otel-allocator/prehook/relabel.go | 110 - cmd/otel-allocator/prehook/relabel_test.go | 270 - cmd/otel-allocator/server/bench_test.go | 270 - cmd/otel-allocator/server/mocks_test.go | 38 - cmd/otel-allocator/server/server.go | 240 - cmd/otel-allocator/server/server_test.go | 617 -- cmd/otel-allocator/target/discovery.go | 156 - cmd/otel-allocator/target/discovery_test.go | 413 - cmd/otel-allocator/target/target.go | 55 - cmd/otel-allocator/target/testdata/test.yaml | 17 - .../target/testdata/test_update.yaml | 14 - cmd/otel-allocator/watcher/promOperator.go | 370 - .../watcher/promOperator_test.go | 430 - cmd/otel-allocator/watcher/watcher.go | 51 - ...emetry-operator.clusterserviceversion.yaml | 6 +- .../amazoncloudwatchagent_controller.go | 175 - controllers/builder_test.go | 8 +- controllers/common.go | 8 +- controllers/opampbridge_controller.go | 8 +- controllers/opampbridge_controller_test.go | 8 +- .../opentelemetrycollector_controller.go | 10 +- controllers/reconcile_test.go | 14 +- controllers/suite_test.go | 16 +- go.mod | 4 +- go.sum | 35 +- hack/boilerplate.go.txt | 13 - hack/check-operator-ready.go | 135 - hack/ignore-createdAt-bundle.sh | 13 - hack/install-kuttl.sh | 5 - hack/install-metrics-server.sh | 16 - hack/install-prometheus-operator.sh | 7 - ...install-targetallocator-prometheus-crds.sh | 8 - hack/modify-test-images.sh | 17 - header.txt | 13 - internal/autodetect/main.go | 2 +- internal/autodetect/main_test.go | 4 +- internal/config/main.go | 6 +- internal/config/main_test.go | 6 +- internal/config/options.go | 6 +- .../collector/adapters/config_from_test.go | 2 +- .../collector/adapters/config_to_ports.go | 6 +- .../adapters/config_to_ports_test.go | 6 +- internal/manifests/collector/annotations.go | 2 +- .../manifests/collector/annotations_test.go | 2 +- internal/manifests/collector/collector.go | 6 +- .../manifests/collector/config_replace.go | 10 +- .../collector/config_replace_test.go | 4 +- internal/manifests/collector/configmap.go | 6 +- .../manifests/collector/configmap_test.go | 2 +- internal/manifests/collector/container.go | 8 +- .../manifests/collector/container_test.go | 6 +- internal/manifests/collector/daemonset.go | 6 +- .../manifests/collector/daemonset_test.go | 8 +- internal/manifests/collector/deployment.go | 6 +- .../manifests/collector/deployment_test.go | 8 +- .../collector/horizontalpodautoscaler.go | 8 +- .../collector/horizontalpodautoscaler_test.go | 8 +- internal/manifests/collector/ingress.go | 8 +- internal/manifests/collector/ingress_test.go | 8 +- .../collector/parser/exporter/exporter.go | 4 +- .../parser/exporter/exporter_prometheus.go | 4 +- .../collector/parser/receiver/receiver.go | 4 +- .../parser/receiver/receiver_aws-xray.go | 2 +- .../parser/receiver/receiver_carbon.go | 2 +- .../parser/receiver/receiver_collectd.go | 2 +- .../receiver/receiver_fluent-forward.go | 2 +- .../parser/receiver/receiver_generic.go | 4 +- .../parser/receiver/receiver_generic_test.go | 4 +- .../parser/receiver/receiver_influxdb.go | 2 +- .../parser/receiver/receiver_jaeger.go | 4 +- .../parser/receiver/receiver_loki.go | 4 +- .../collector/parser/receiver/receiver_oc.go | 2 +- .../parser/receiver/receiver_otlp.go | 4 +- .../parser/receiver/receiver_sapm.go | 2 +- .../parser/receiver/receiver_signalfx.go | 2 +- .../parser/receiver/receiver_skywalking.go | 4 +- .../parser/receiver/receiver_splunk-hec.go | 2 +- .../parser/receiver/receiver_statsd.go | 2 +- .../parser/receiver/receiver_test.go | 4 +- .../parser/receiver/receiver_wavefront.go | 2 +- .../parser/receiver/receiver_zipkin-scribe.go | 2 +- .../parser/receiver/receiver_zipkin.go | 2 +- .../collector/poddisruptionbudget.go | 6 +- .../collector/poddisruptionbudget_test.go | 8 +- internal/manifests/collector/podmonitor.go | 8 +- .../manifests/collector/podmonitor_test.go | 4 +- internal/manifests/collector/route.go | 8 +- internal/manifests/collector/route_test.go | 8 +- internal/manifests/collector/service.go | 10 +- internal/manifests/collector/service_test.go | 8 +- .../manifests/collector/serviceaccount.go | 8 +- .../collector/serviceaccount_test.go | 4 +- .../manifests/collector/servicemonitor.go | 8 +- internal/manifests/collector/statefulset.go | 6 +- .../manifests/collector/statefulset_test.go | 8 +- internal/manifests/collector/suite_test.go | 10 +- internal/manifests/collector/utils.go | 2 +- internal/manifests/collector/volume.go | 6 +- internal/manifests/collector/volume_test.go | 8 +- internal/manifests/collector/volumeclaim.go | 2 +- .../manifests/collector/volumeclaim_test.go | 4 +- internal/manifests/manifestutils/labels.go | 2 +- .../manifests/manifestutils/labels_test.go | 14 +- internal/manifests/opampbridge/configmap.go | 6 +- .../manifests/opampbridge/configmap_test.go | 8 +- internal/manifests/opampbridge/container.go | 6 +- .../manifests/opampbridge/container_test.go | 6 +- internal/manifests/opampbridge/deployment.go | 6 +- .../manifests/opampbridge/deployment_test.go | 6 +- internal/manifests/opampbridge/opampbridge.go | 2 +- internal/manifests/opampbridge/service.go | 6 +- .../manifests/opampbridge/serviceaccount.go | 8 +- .../opampbridge/serviceaccount_test.go | 2 +- internal/manifests/opampbridge/utils.go | 2 +- internal/manifests/opampbridge/volume.go | 6 +- internal/manifests/opampbridge/volume_test.go | 6 +- internal/manifests/params.go | 4 +- .../adapters/config_to_prom_config.go | 2 +- .../adapters/config_to_prom_config_test.go | 2 +- .../manifests/targetallocator/annotations.go | 2 +- .../targetallocator/annotations_test.go | 4 +- .../manifests/targetallocator/configmap.go | 12 +- .../targetallocator/configmap_test.go | 4 +- .../manifests/targetallocator/container.go | 6 +- .../targetallocator/container_test.go | 6 +- .../manifests/targetallocator/deployment.go | 4 +- .../targetallocator/deployment_test.go | 10 +- internal/manifests/targetallocator/labels.go | 6 +- .../manifests/targetallocator/labels_test.go | 4 +- .../targetallocator/poddisruptionbudget.go | 6 +- .../poddisruptionbudget_test.go | 6 +- internal/manifests/targetallocator/service.go | 4 +- .../manifests/targetallocator/service_test.go | 4 +- .../targetallocator/serviceaccount.go | 6 +- .../targetallocator/serviceaccount_test.go | 4 +- .../targetallocator/servicemonitor.go | 4 +- .../targetallocator/servicemonitor_test.go | 6 +- .../targetallocator/targetallocator.go | 4 +- internal/manifests/targetallocator/volume.go | 6 +- .../manifests/targetallocator/volume_test.go | 6 +- internal/status/collector/collector.go | 10 +- internal/status/collector/handle.go | 8 +- internal/status/opampbridge/handle.go | 4 +- internal/status/opampbridge/opampbridge.go | 4 +- .../webhook/podmutation/webhookhandler.go | 2 +- .../podmutation/webhookhandler_suite_test.go | 4 +- .../podmutation/webhookhandler_test.go | 10 +- internal/webhookhandler/webhookhandler.go | 96 - .../webhookhandler_suite_test.go | 136 - .../webhookhandler/webhookhandler_test.go | 430 - kind-1.23.yaml | 18 - kind-1.24.yaml | 18 - kind-1.25.yaml | 18 - kind-1.26.yaml | 18 - kind-1.27.yaml | 18 - kind-1.28.yaml | 18 - kind-1.29.yaml | 18 - kuttl-test-autoscale.yaml | 6 - kuttl-test-instrumentation.yaml | 5 - kuttl-test-multi-instr.yaml | 9 - kuttl-test-opampbridge.yaml | 6 - kuttl-test-openshift.yaml | 6 - kuttl-test-pdb.yaml | 6 - kuttl-test-prometheuscr.yaml | 20 - kuttl-test-upgrade.yaml | 19 - kuttl-test.yaml | 7 - main.go | 24 +- pkg/collector/adapters/config_from.go | 38 - pkg/collector/adapters/config_from_test.go | 27 - pkg/collector/adapters/config_to_ports.go | 87 - .../adapters/config_to_ports_test.go | 212 - pkg/collector/adapters/config_to_probe.go | 101 - .../adapters/config_to_probe_test.go | 176 - pkg/collector/adapters/config_validate.go | 100 - .../adapters/config_validate_test.go | 96 - pkg/collector/annotations.go | 49 - pkg/collector/common.go | 23 - pkg/collector/container.go | 141 - pkg/collector/daemonset.go | 53 - pkg/collector/deployment.go | 55 - pkg/collector/labels.go | 64 - pkg/collector/reconcile/cloudwatchagent.go | 111 - pkg/collector/reconcile/config_replace.go | 25 - pkg/collector/reconcile/configmap.go | 168 - pkg/collector/reconcile/daemonset.go | 135 - pkg/collector/reconcile/deployment.go | 136 - pkg/collector/reconcile/ingress.go | 236 - pkg/collector/reconcile/params.go | 24 - pkg/collector/reconcile/route.go | 198 - pkg/collector/reconcile/service.go | 276 - pkg/collector/reconcile/serviceaccount.go | 129 - pkg/collector/serviceaccount.go | 36 - pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/suite_test.go | 4 +- pkg/collector/upgrade/upgrade.go | 4 +- pkg/collector/upgrade/upgrade_test.go | 6 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 6 +- pkg/collector/upgrade/v0_19_0.go | 4 +- pkg/collector/upgrade/v0_19_0_test.go | 8 +- pkg/collector/upgrade/v0_24_0.go | 4 +- pkg/collector/upgrade/v0_24_0_test.go | 6 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 4 +- pkg/collector/upgrade/v0_31_0_test.go | 6 +- pkg/collector/upgrade/v0_36_0.go | 4 +- pkg/collector/upgrade/v0_36_0_test.go | 6 +- pkg/collector/upgrade/v0_38_0.go | 4 +- pkg/collector/upgrade/v0_38_0_test.go | 6 +- pkg/collector/upgrade/v0_39_0.go | 4 +- pkg/collector/upgrade/v0_39_0_test.go | 6 +- pkg/collector/upgrade/v0_41_0.go | 4 +- pkg/collector/upgrade/v0_41_0_test.go | 6 +- pkg/collector/upgrade/v0_43_0.go | 4 +- pkg/collector/upgrade/v0_43_0_test.go | 6 +- pkg/collector/upgrade/v0_56_0.go | 4 +- pkg/collector/upgrade/v0_56_0_test.go | 6 +- pkg/collector/upgrade/v0_57_2.go | 4 +- pkg/collector/upgrade/v0_57_2_test.go | 6 +- pkg/collector/upgrade/v0_61_0.go | 4 +- pkg/collector/upgrade/v0_61_0_test.go | 6 +- pkg/collector/upgrade/v0_9_0.go | 4 +- pkg/collector/upgrade/v0_9_0_test.go | 6 +- pkg/collector/upgrade/versions.go | 2 +- pkg/collector/utils.go | 18 - pkg/collector/volume.go | 35 - pkg/instrumentation/apachehttpd.go | 2 +- pkg/instrumentation/apachehttpd_test.go | 2 +- pkg/instrumentation/dotnet.go | 2 +- pkg/instrumentation/dotnet_test.go | 2 +- pkg/instrumentation/golang.go | 4 +- pkg/instrumentation/golang_test.go | 4 +- pkg/instrumentation/helper.go | 4 +- pkg/instrumentation/helper_test.go | 2 +- .../instrumentation_suite_test.go | 2 +- pkg/instrumentation/javaagent.go | 2 +- pkg/instrumentation/javaagent_test.go | 2 +- pkg/instrumentation/nginx.go | 2 +- pkg/instrumentation/nginx_test.go | 2 +- pkg/instrumentation/nodejs.go | 2 +- pkg/instrumentation/nodejs_test.go | 2 +- pkg/instrumentation/podmutator.go | 6 +- pkg/instrumentation/podmutator_test.go | 4 +- pkg/instrumentation/python.go | 2 +- pkg/instrumentation/python_test.go | 2 +- pkg/instrumentation/sdk.go | 4 +- pkg/instrumentation/sdk_test.go | 2 +- pkg/instrumentation/upgrade/upgrade.go | 6 +- .../upgrade/upgrade_suite_test.go | 2 +- pkg/instrumentation/upgrade/upgrade_test.go | 8 +- pkg/naming/dns.go | 35 - pkg/naming/main.go | 69 - pkg/naming/triming.go | 60 - pkg/sidecar/attributes.go | 2 +- pkg/sidecar/attributes_test.go | 2 +- pkg/sidecar/pod.go | 8 +- pkg/sidecar/pod_test.go | 6 +- pkg/sidecar/podmutator.go | 6 +- tests/e2e-autoscale/autoscale/00-assert.yaml | 86 - tests/e2e-autoscale/autoscale/00-install.yaml | 85 - tests/e2e-autoscale/autoscale/01-assert.yaml | 36 - tests/e2e-autoscale/autoscale/01-install.yaml | 44 - tests/e2e-autoscale/autoscale/02-assert.yaml | 7 - tests/e2e-autoscale/autoscale/02-install.yaml | 22 - tests/e2e-autoscale/autoscale/03-assert.yaml | 7 - tests/e2e-autoscale/autoscale/03-delete.yaml | 8 - .../00-install-collector.yaml | 31 - .../00-install-instrumentation.yaml | 17 - .../01-assert.yaml | 51 - .../01-install-app.yaml | 37 - .../00-install-collector.yaml | 22 - .../00-install-instrumentation.yaml | 18 - .../01-assert.yaml | 71 - .../01-install-app.yaml | 36 - .../02-assert.yaml | 68 - .../02-install-app.yaml | 36 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 30 - .../01-assert.yaml | 96 - .../01-install-app.yaml | 23 - .../02-assert.yaml | 58 - .../02-install-app.yaml | 23 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 26 - .../01-assert.yaml | 66 - .../01-install-app.yaml | 29 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 26 - .../instrumentation-dotnet/01-assert.yaml | 65 - .../01-install-app.yaml | 28 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 26 - .../instrumentation-go/01-add-scc.yaml | 16 - .../instrumentation-go/02-assert.yaml | 51 - .../instrumentation-go/02-install-app.yaml | 26 - .../instrumentation-go/add-scc.sh | 6 - .../instrumentation-go/scc.yaml | 17 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 34 - .../01-assert.yaml | 80 - .../01-install-app.yaml | 23 - .../02-assert.yaml | 50 - .../02-install-app.yaml | 23 - .../01-cleanup-other-ns.yaml | 6 - .../02-install-collector.yaml | 32 - .../02-install-instrumentation.yaml | 41 - .../03-assert.yaml | 52 - .../03-install-app.yaml | 28 - .../04-cleanup-other-ns.yaml | 6 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 34 - .../instrumentation-java/01-assert.yaml | 59 - .../instrumentation-java/01-install-app.yaml | 28 - .../00-install-collector.yaml | 31 - .../00-install-instrumentation.yaml | 17 - .../01-assert.yaml | 59 - .../01-install-app.yaml | 94 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 19 - .../01-assert.yaml | 77 - .../01-install-app.yaml | 119 - .../02-assert.yaml | 74 - .../02-install-app.yaml | 118 - .../00-install-collector.yaml | 31 - .../00-install-instrumentation.yaml | 17 - .../instrumentation-nginx/01-assert.yaml | 57 - .../instrumentation-nginx/01-install-app.yaml | 104 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 34 - .../01-assert.yaml | 68 - .../01-install-app.yaml | 23 - .../02-assert.yaml | 44 - .../02-install-app.yaml | 23 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 33 - .../instrumentation-nodejs/01-assert.yaml | 58 - .../01-install-app.yaml | 28 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 34 - .../01-assert.yaml | 80 - .../01-install-app.yaml | 23 - .../02-assert.yaml | 50 - .../02-install-app.yaml | 23 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 30 - .../instrumentation-python/01-assert.yaml | 61 - .../01-install-app.yaml | 28 - .../00-install-collector.yaml | 32 - .../00-install-instrumentation.yaml | 24 - .../instrumentation-sdk/01-assert.yaml | 27 - .../instrumentation-sdk/01-install-app.yaml | 24 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 40 - .../01-assert.yaml | 129 - .../01-install-app.yaml | 39 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 40 - .../01-assert.yaml | 22 - .../01-install-app.yaml | 29 - .../00-install-collector.yaml | 23 - .../00-install-instrumentation.yaml | 40 - .../01-assert.yaml | 38 - .../01-install-app.yaml | 25 - .../manager_deployment_feature_gate.yaml | 63 - .../opampbridge/00-assert.yaml | 70 - .../opampbridge/00-install.yaml | 49 - tests/e2e-openshift/Dockerfile | 35 - tests/e2e-openshift/kafka/00-assert.yaml | 180 - .../kafka/00-create-kafka-instance.yaml | 60 - tests/e2e-openshift/kafka/01-assert.yaml | 13 - .../kafka/01-create-kafka-topics.yaml | 13 - tests/e2e-openshift/kafka/02-assert.yaml | 39 - .../kafka/02-otel-kakfa-receiver.yaml | 22 - tests/e2e-openshift/kafka/03-assert.yaml | 75 - .../kafka/03-otel-kakfa-exporter.yaml | 25 - tests/e2e-openshift/kafka/04-assert.yaml | 9 - .../kafka/04-generate-traces.yaml | 26 - tests/e2e-openshift/kafka/05-assert.yaml | 6 - tests/e2e-openshift/kafka/check_traces.sh | 39 - tests/e2e-openshift/monitoring/00-assert.yaml | 4 - .../monitoring/00-workload-monitoring.yaml | 13 - tests/e2e-openshift/monitoring/01-assert.yaml | 111 - .../monitoring/01-otel-collector.yaml | 24 - tests/e2e-openshift/monitoring/02-assert.yaml | 6 - .../monitoring/02-generate-traces.yaml | 27 - tests/e2e-openshift/monitoring/03-assert.yaml | 33 - .../03-create-monitoring-roles.yaml | 23 - .../e2e-openshift/monitoring/check_metrics.sh | 23 - .../check_user_workload_monitoring.sh | 22 - .../multi-cluster/00-assert.yaml | 13 - .../multi-cluster/00-create-namespaces.yaml | 10 - .../multi-cluster/01-assert.yaml | 126 - .../multi-cluster/01-create-jaeger.yaml | 9 - .../multi-cluster/02-assert.yaml | 147 - .../multi-cluster/02-otlp-receiver.yaml | 49 - .../multi-cluster/03-assert.yaml | 107 - .../multi-cluster/03-otlp-sender.yaml | 46 - .../multi-cluster/04-assert.yaml | 20 - .../multi-cluster/04-generate-traces.yaml | 41 - .../multi-cluster/05-assert.yaml | 6 - .../multi-cluster/check_traces.sh | 26 - .../multi-cluster/create_otlp_sender.sh | 62 - .../multi-cluster/generate_certs.sh | 59 - .../otlp-metrics-traces/00-assert.yaml | 10 - .../00-install-jaeger.yaml | 18 - .../otlp-metrics-traces/01-assert.yaml | 4 - .../01-workload-monitoring.yaml | 11 - .../otlp-metrics-traces/02-assert.yaml | 31 - .../02-otel-metrics-collector.yaml | 38 - .../otlp-metrics-traces/03-assert.yaml | 51 - .../03-metrics-traces-gen.yaml | 77 - .../otlp-metrics-traces/04-assert.yaml | 6 - .../otlp-metrics-traces/05-assert.yaml | 5 - .../otlp-metrics-traces/check_metrics.sh | 15 - .../otlp-metrics-traces/check_traces.sh | 12 - .../check_user_workload_monitoring.sh | 22 - tests/e2e-openshift/route/00-assert.yaml | 53 - tests/e2e-openshift/route/00-install.yaml | 30 - .../route/01-report-empty-otlphttp-spans.yaml | 9 - tests/e2e-pdb/pdb/00-assert.yaml | 9 - tests/e2e-pdb/pdb/00-install.yaml | 32 - tests/e2e-pdb/target-allocator/00-assert.yaml | 10 - .../e2e-pdb/target-allocator/00-install.yaml | 34 - .../00-install.yaml | 35 - .../01-assert.yaml | 44 - .../01-install-app.yaml | 20 - .../00-install.yaml | 4 - .../01-assert.yaml | 65 - .../01-install.yaml | 29 - .../02-assert.yaml | 42 - .../02-install.yaml | 26 - .../03-assert.yaml | 21 - .../03-install.yaml | 26 - .../04-error.yaml | 19 - .../04-install.yaml | 26 - .../05-assert.yaml | 21 - .../05-error.yaml | 22 - .../05-install.yaml | 32 - .../06-assert.yaml | 20 - .../06-install.yaml | 29 - .../07-delete.yaml | 8 - .../07-error.yaml | 5 - .../08-assert.yaml | 26 - .../08-install.yaml | 114 - tests/e2e-upgrade/upgrade-test/00-assert.yaml | 13 - .../e2e-upgrade/upgrade-test/00-install.yaml | 28 - .../upgrade-test/01-upgrade-operator.yaml | 4 - tests/e2e-upgrade/upgrade-test/02-assert.yaml | 8 - .../upgrade-test/02-upgrade-collector.yaml | 28 - .../opentelemetry-operator-v0.86.0.yaml | 8558 ----------------- tests/e2e/daemonset-features/00-add-scc.yaml | 4 - tests/e2e/daemonset-features/01-install.yaml | 21 - tests/e2e/daemonset-features/02-assert.yaml | 12 - .../03-add-sa-collector.yaml | 4 - tests/e2e/daemonset-features/03-assert.yaml | 8 - .../daemonset-features/add-sa-collector.sh | 5 - .../daemonset-features/add-scc-openshift.sh | 10 - tests/e2e/daemonset-features/scc.yaml | 22 - tests/e2e/ingress-subdomains/00-assert.yaml | 45 - tests/e2e/ingress-subdomains/00-install.yaml | 29 - .../01-report-empty-otlphttp-spans.yaml | 8 - tests/e2e/ingress/00-assert.yaml | 42 - tests/e2e/ingress/00-install.yaml | 28 - tests/e2e/managed-reconcile/00-assert.yaml | 48 - tests/e2e/managed-reconcile/00-install.yaml | 22 - tests/e2e/managed-reconcile/01-assert.yaml | 72 - .../01-disable-reconciliation.yaml | 51 - tests/e2e/managed-reconcile/02-assert.yaml | 73 - .../02-enable-reconciliation.yaml | 23 - tests/e2e/multiple-configmaps/00-assert.yaml | 51 - tests/e2e/multiple-configmaps/00-install.yaml | 43 - .../00-assert.yaml | 25 - .../00-promreceiver-allocatorconfig.yaml | 69 - .../01-assert.yaml | 28 - .../01-promreceiver-labeldrop.yaml | 49 - .../02-assert.yaml | 25 - ...02-promreceiver-allocatorconfig-extra.yaml | 53 - .../03-assert.yaml | 25 - .../03-promreceiver-nopromconfig.yaml | 48 - tests/e2e/smoke-daemonset/00-assert.yaml | 20 - tests/e2e/smoke-daemonset/00-install.yaml | 24 - tests/e2e/smoke-daemonset/check-daemonset.sh | 15 - .../e2e/smoke-init-containers/00-assert.yaml | 59 - .../e2e/smoke-init-containers/00-install.yaml | 29 - .../e2e/smoke-pod-annotations/00-assert.yaml | 14 - .../e2e/smoke-pod-annotations/00-install.yaml | 26 - tests/e2e/smoke-pod-labels/00-assert.yaml | 12 - tests/e2e/smoke-pod-labels/00-install.yaml | 30 - .../00-assert.yaml | 26 - .../00-errors.yaml | 7 - .../00-install.yaml | 19 - .../01-assert-second-config.yaml | 27 - .../01-install-second-config.yaml | 23 - .../00-install.yaml | 29 - .../01-assert.yaml | 21 - .../01-install-app.yaml | 20 - tests/e2e/smoke-sidecar/00-install.yaml | 22 - tests/e2e/smoke-sidecar/01-assert.yaml | 20 - tests/e2e/smoke-sidecar/01-install-app.yaml | 19 - tests/e2e/smoke-simplest/00-assert.yaml | 54 - tests/e2e/smoke-simplest/00-install.yaml | 25 - tests/e2e/smoke-statefulset/00-assert.yaml | 7 - tests/e2e/smoke-statefulset/00-install.yaml | 20 - .../e2e/smoke-targetallocator/00-assert.yaml | 55 - .../e2e/smoke-targetallocator/00-install.yaml | 57 - .../e2e/smoke-targetallocator/01-assert.yaml | 8 - .../01-change-ta-config.yaml | 39 - tests/e2e/statefulset-features/00-assert.yaml | 41 - .../e2e/statefulset-features/00-install.yaml | 34 - tests/e2e/statefulset-features/01-assert.yaml | 41 - .../01-update-volume-claim-templates.yaml | 34 - .../targetallocator-features/00-assert.yaml | 109 - .../targetallocator-features/00-install.yaml | 106 - .../targetallocator-features/01-assert.yaml | 14 - .../targetallocator-features/01-liveness.yaml | 5 - .../00-assert.yaml | 53 - .../00-install.yaml | 137 - .../01-assert.yaml | 20 - .../01-install.yaml | 48 - .../apache-httpd/Dockerfile | 5 - .../dotnet/Dockerfile | 18 - .../golang/Dockerfile | 8 - tests/instrumentation-e2e-apps/golang/main.go | 37 - .../java/DemoApplication.java | 23 - .../instrumentation-e2e-apps/java/Dockerfile | 23 - .../java/build.gradle | 25 - .../nodejs/Dockerfile | 5 - .../instrumentation-e2e-apps/nodejs/index.js | 11 - .../python/Dockerfile | 7 - tests/instrumentation-e2e-apps/python/app.py | 10 - .../python/requirements.txt | 1 - 648 files changed, 487 insertions(+), 49832 deletions(-) delete mode 100755 .chloggen/2311-ta-servicemonitor.yaml delete mode 100644 .chloggen/TEMPLATE.yaml delete mode 100644 .chloggen/add-loki-parser.yaml delete mode 100755 .chloggen/bump-apache-httpd-dependencies.yaml delete mode 100755 .chloggen/bump-autoinstrumentation-version.yaml delete mode 100755 .chloggen/bump-python-dependencies.yaml delete mode 100755 .chloggen/chore_targetallocator-labels.yaml delete mode 100755 .chloggen/fix_ta-serviceaccount.yaml delete mode 100755 .chloggen/support-version-1.29.0.yaml delete mode 100755 .chloggen/ta_removehotreload.yaml delete mode 100644 .chloggen/target-allocator-pdb.yaml delete mode 100755 .ci/create-release-github.sh delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.yaml delete mode 100644 .github/ISSUE_TEMPLATE/other.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-apache-httpd.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-dotnet.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-java.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-nodejs.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-python.yaml delete mode 100644 .github/workflows/publish-images.yaml delete mode 100644 .github/workflows/publish-operator-bundle.yaml delete mode 100644 .github/workflows/publish-operator-opamp-bridge.yaml delete mode 100644 .github/workflows/publish-target-allocator.yaml delete mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/reusable-operator-hub-release.yaml delete mode 100644 .github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml delete mode 100644 .golangci.yaml delete mode 100644 CHANGELOG.md delete mode 100644 PROJECT delete mode 100644 RELEASE.md delete mode 100644 apis/v1alpha1/amazoncloudwatchagent_types.go delete mode 100644 apis/v1alpha1/amazoncloudwatchagent_webhook.go delete mode 100644 bundle.Dockerfile delete mode 100644 bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml delete mode 100644 bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml delete mode 100644 bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml delete mode 100644 bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml delete mode 100644 bundle/manifests/opentelemetry.io_instrumentations.yaml delete mode 100644 bundle/manifests/opentelemetry.io_opampbridges.yaml delete mode 100644 bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml delete mode 100644 bundle/metadata/annotations.yaml delete mode 100644 bundle/tests/scorecard/config.yaml delete mode 100644 cmd/operator-opamp-bridge/Dockerfile delete mode 100644 cmd/operator-opamp-bridge/agent/agent.go delete mode 100644 cmd/operator-opamp-bridge/agent/agent_test.go delete mode 100644 cmd/operator-opamp-bridge/agent/collector_key.go delete mode 100644 cmd/operator-opamp-bridge/agent/collector_key_test.go delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/agent.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/basic.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/invalid.yaml delete mode 100644 cmd/operator-opamp-bridge/agent/testdata/updated.yaml delete mode 100644 cmd/operator-opamp-bridge/config/config.go delete mode 100644 cmd/operator-opamp-bridge/config/config_test.go delete mode 100644 cmd/operator-opamp-bridge/config/flags.go delete mode 100644 cmd/operator-opamp-bridge/config/flags_test.go delete mode 100644 cmd/operator-opamp-bridge/config/headers.go delete mode 100644 cmd/operator-opamp-bridge/config/testdata/agent.yaml delete mode 100644 cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml delete mode 100644 cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml delete mode 100644 cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml delete mode 100644 cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml delete mode 100644 cmd/operator-opamp-bridge/go.mod delete mode 100644 cmd/operator-opamp-bridge/go.sum delete mode 100644 cmd/operator-opamp-bridge/header.txt delete mode 100644 cmd/operator-opamp-bridge/logger/logger.go delete mode 100644 cmd/operator-opamp-bridge/main.go delete mode 100644 cmd/operator-opamp-bridge/metrics/reporter.go delete mode 100644 cmd/operator-opamp-bridge/operator/client.go delete mode 100644 cmd/operator-opamp-bridge/operator/client_test.go delete mode 100644 cmd/operator-opamp-bridge/operator/testdata/collector.yaml delete mode 100644 cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml delete mode 100644 cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml delete mode 100644 cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml delete mode 100644 cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml delete mode 100644 cmd/otel-allocator/Dockerfile delete mode 100644 cmd/otel-allocator/README.md delete mode 100644 cmd/otel-allocator/allocation/allocatortest.go delete mode 100644 cmd/otel-allocator/allocation/consistent_hashing.go delete mode 100644 cmd/otel-allocator/allocation/consistent_hashing_test.go delete mode 100644 cmd/otel-allocator/allocation/least_weighted.go delete mode 100644 cmd/otel-allocator/allocation/least_weighted_test.go delete mode 100644 cmd/otel-allocator/allocation/strategy.go delete mode 100644 cmd/otel-allocator/allocation/strategy_test.go delete mode 100644 cmd/otel-allocator/collector/collector.go delete mode 100644 cmd/otel-allocator/collector/collector_test.go delete mode 100644 cmd/otel-allocator/config/config.go delete mode 100644 cmd/otel-allocator/config/config_test.go delete mode 100644 cmd/otel-allocator/config/flags.go delete mode 100644 cmd/otel-allocator/config/flags_test.go delete mode 100644 cmd/otel-allocator/config/testdata/config_test.yaml delete mode 100644 cmd/otel-allocator/config/testdata/file_sd_test.json delete mode 100644 cmd/otel-allocator/config/testdata/no_config.yaml delete mode 100644 cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml delete mode 100644 cmd/otel-allocator/diff/diff.go delete mode 100644 cmd/otel-allocator/diff/diff_test.go delete mode 100644 cmd/otel-allocator/go.mod delete mode 100644 cmd/otel-allocator/go.sum delete mode 100644 cmd/otel-allocator/header.txt delete mode 100644 cmd/otel-allocator/main.go delete mode 100644 cmd/otel-allocator/prehook/prehook.go delete mode 100644 cmd/otel-allocator/prehook/relabel.go delete mode 100644 cmd/otel-allocator/prehook/relabel_test.go delete mode 100644 cmd/otel-allocator/server/bench_test.go delete mode 100644 cmd/otel-allocator/server/mocks_test.go delete mode 100644 cmd/otel-allocator/server/server.go delete mode 100644 cmd/otel-allocator/server/server_test.go delete mode 100644 cmd/otel-allocator/target/discovery.go delete mode 100644 cmd/otel-allocator/target/discovery_test.go delete mode 100644 cmd/otel-allocator/target/target.go delete mode 100644 cmd/otel-allocator/target/testdata/test.yaml delete mode 100644 cmd/otel-allocator/target/testdata/test_update.yaml delete mode 100644 cmd/otel-allocator/watcher/promOperator.go delete mode 100644 cmd/otel-allocator/watcher/promOperator_test.go delete mode 100644 cmd/otel-allocator/watcher/watcher.go delete mode 100644 controllers/amazoncloudwatchagent_controller.go delete mode 100644 hack/boilerplate.go.txt delete mode 100644 hack/check-operator-ready.go delete mode 100755 hack/ignore-createdAt-bundle.sh delete mode 100755 hack/install-kuttl.sh delete mode 100755 hack/install-metrics-server.sh delete mode 100755 hack/install-prometheus-operator.sh delete mode 100755 hack/install-targetallocator-prometheus-crds.sh delete mode 100755 hack/modify-test-images.sh delete mode 100644 header.txt delete mode 100644 internal/webhookhandler/webhookhandler.go delete mode 100644 internal/webhookhandler/webhookhandler_suite_test.go delete mode 100644 internal/webhookhandler/webhookhandler_test.go delete mode 100644 kind-1.23.yaml delete mode 100644 kind-1.24.yaml delete mode 100644 kind-1.25.yaml delete mode 100644 kind-1.26.yaml delete mode 100644 kind-1.27.yaml delete mode 100644 kind-1.28.yaml delete mode 100644 kind-1.29.yaml delete mode 100644 kuttl-test-autoscale.yaml delete mode 100644 kuttl-test-instrumentation.yaml delete mode 100644 kuttl-test-multi-instr.yaml delete mode 100644 kuttl-test-opampbridge.yaml delete mode 100644 kuttl-test-openshift.yaml delete mode 100644 kuttl-test-pdb.yaml delete mode 100644 kuttl-test-prometheuscr.yaml delete mode 100644 kuttl-test-upgrade.yaml delete mode 100644 kuttl-test.yaml delete mode 100644 pkg/collector/adapters/config_from.go delete mode 100644 pkg/collector/adapters/config_from_test.go delete mode 100644 pkg/collector/adapters/config_to_ports.go delete mode 100644 pkg/collector/adapters/config_to_ports_test.go delete mode 100644 pkg/collector/adapters/config_to_probe.go delete mode 100644 pkg/collector/adapters/config_to_probe_test.go delete mode 100644 pkg/collector/adapters/config_validate.go delete mode 100644 pkg/collector/adapters/config_validate_test.go delete mode 100644 pkg/collector/annotations.go delete mode 100644 pkg/collector/common.go delete mode 100644 pkg/collector/container.go delete mode 100644 pkg/collector/daemonset.go delete mode 100644 pkg/collector/deployment.go delete mode 100644 pkg/collector/labels.go delete mode 100644 pkg/collector/reconcile/cloudwatchagent.go delete mode 100644 pkg/collector/reconcile/config_replace.go delete mode 100644 pkg/collector/reconcile/configmap.go delete mode 100644 pkg/collector/reconcile/daemonset.go delete mode 100644 pkg/collector/reconcile/deployment.go delete mode 100644 pkg/collector/reconcile/ingress.go delete mode 100644 pkg/collector/reconcile/params.go delete mode 100644 pkg/collector/reconcile/route.go delete mode 100644 pkg/collector/reconcile/service.go delete mode 100644 pkg/collector/reconcile/serviceaccount.go delete mode 100644 pkg/collector/serviceaccount.go delete mode 100644 pkg/collector/utils.go delete mode 100644 pkg/collector/volume.go delete mode 100644 pkg/naming/dns.go delete mode 100644 pkg/naming/main.go delete mode 100644 pkg/naming/triming.go delete mode 100644 tests/e2e-autoscale/autoscale/00-assert.yaml delete mode 100644 tests/e2e-autoscale/autoscale/00-install.yaml delete mode 100644 tests/e2e-autoscale/autoscale/01-assert.yaml delete mode 100644 tests/e2e-autoscale/autoscale/01-install.yaml delete mode 100644 tests/e2e-autoscale/autoscale/02-assert.yaml delete mode 100644 tests/e2e-autoscale/autoscale/02-install.yaml delete mode 100644 tests/e2e-autoscale/autoscale/03-assert.yaml delete mode 100644 tests/e2e-autoscale/autoscale/03-delete.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-go/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml delete mode 100755 tests/e2e-instrumentation/instrumentation-go/add-scc.sh delete mode 100644 tests/e2e-instrumentation/instrumentation-go/scc.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml delete mode 100644 tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml delete mode 100644 tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml delete mode 100644 tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml delete mode 100644 tests/e2e-opampbridge/opampbridge/00-assert.yaml delete mode 100644 tests/e2e-opampbridge/opampbridge/00-install.yaml delete mode 100644 tests/e2e-openshift/Dockerfile delete mode 100644 tests/e2e-openshift/kafka/00-assert.yaml delete mode 100644 tests/e2e-openshift/kafka/00-create-kafka-instance.yaml delete mode 100644 tests/e2e-openshift/kafka/01-assert.yaml delete mode 100644 tests/e2e-openshift/kafka/01-create-kafka-topics.yaml delete mode 100644 tests/e2e-openshift/kafka/02-assert.yaml delete mode 100644 tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml delete mode 100644 tests/e2e-openshift/kafka/03-assert.yaml delete mode 100644 tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml delete mode 100644 tests/e2e-openshift/kafka/04-assert.yaml delete mode 100644 tests/e2e-openshift/kafka/04-generate-traces.yaml delete mode 100644 tests/e2e-openshift/kafka/05-assert.yaml delete mode 100755 tests/e2e-openshift/kafka/check_traces.sh delete mode 100644 tests/e2e-openshift/monitoring/00-assert.yaml delete mode 100644 tests/e2e-openshift/monitoring/00-workload-monitoring.yaml delete mode 100644 tests/e2e-openshift/monitoring/01-assert.yaml delete mode 100644 tests/e2e-openshift/monitoring/01-otel-collector.yaml delete mode 100644 tests/e2e-openshift/monitoring/02-assert.yaml delete mode 100644 tests/e2e-openshift/monitoring/02-generate-traces.yaml delete mode 100644 tests/e2e-openshift/monitoring/03-assert.yaml delete mode 100644 tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml delete mode 100755 tests/e2e-openshift/monitoring/check_metrics.sh delete mode 100755 tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh delete mode 100644 tests/e2e-openshift/multi-cluster/00-assert.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/01-assert.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/02-assert.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/03-assert.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/04-assert.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/04-generate-traces.yaml delete mode 100644 tests/e2e-openshift/multi-cluster/05-assert.yaml delete mode 100755 tests/e2e-openshift/multi-cluster/check_traces.sh delete mode 100755 tests/e2e-openshift/multi-cluster/create_otlp_sender.sh delete mode 100755 tests/e2e-openshift/multi-cluster/generate_certs.sh delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml delete mode 100644 tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml delete mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh delete mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_traces.sh delete mode 100755 tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh delete mode 100644 tests/e2e-openshift/route/00-assert.yaml delete mode 100644 tests/e2e-openshift/route/00-install.yaml delete mode 100644 tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml delete mode 100644 tests/e2e-pdb/pdb/00-assert.yaml delete mode 100644 tests/e2e-pdb/pdb/00-install.yaml delete mode 100644 tests/e2e-pdb/target-allocator/00-assert.yaml delete mode 100644 tests/e2e-pdb/target-allocator/00-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml delete mode 100644 tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/00-assert.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/00-install.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/02-assert.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml delete mode 100644 tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml delete mode 100644 tests/e2e/daemonset-features/00-add-scc.yaml delete mode 100644 tests/e2e/daemonset-features/01-install.yaml delete mode 100644 tests/e2e/daemonset-features/02-assert.yaml delete mode 100644 tests/e2e/daemonset-features/03-add-sa-collector.yaml delete mode 100644 tests/e2e/daemonset-features/03-assert.yaml delete mode 100755 tests/e2e/daemonset-features/add-sa-collector.sh delete mode 100755 tests/e2e/daemonset-features/add-scc-openshift.sh delete mode 100644 tests/e2e/daemonset-features/scc.yaml delete mode 100644 tests/e2e/ingress-subdomains/00-assert.yaml delete mode 100644 tests/e2e/ingress-subdomains/00-install.yaml delete mode 100644 tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml delete mode 100644 tests/e2e/ingress/00-assert.yaml delete mode 100644 tests/e2e/ingress/00-install.yaml delete mode 100644 tests/e2e/managed-reconcile/00-assert.yaml delete mode 100644 tests/e2e/managed-reconcile/00-install.yaml delete mode 100644 tests/e2e/managed-reconcile/01-assert.yaml delete mode 100644 tests/e2e/managed-reconcile/01-disable-reconciliation.yaml delete mode 100644 tests/e2e/managed-reconcile/02-assert.yaml delete mode 100644 tests/e2e/managed-reconcile/02-enable-reconciliation.yaml delete mode 100644 tests/e2e/multiple-configmaps/00-assert.yaml delete mode 100644 tests/e2e/multiple-configmaps/00-install.yaml delete mode 100644 tests/e2e/prometheus-config-validation/00-assert.yaml delete mode 100644 tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml delete mode 100644 tests/e2e/prometheus-config-validation/01-assert.yaml delete mode 100644 tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml delete mode 100644 tests/e2e/prometheus-config-validation/02-assert.yaml delete mode 100644 tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml delete mode 100644 tests/e2e/prometheus-config-validation/03-assert.yaml delete mode 100644 tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml delete mode 100644 tests/e2e/smoke-daemonset/00-assert.yaml delete mode 100644 tests/e2e/smoke-daemonset/00-install.yaml delete mode 100755 tests/e2e/smoke-daemonset/check-daemonset.sh delete mode 100644 tests/e2e/smoke-init-containers/00-assert.yaml delete mode 100644 tests/e2e/smoke-init-containers/00-install.yaml delete mode 100644 tests/e2e/smoke-pod-annotations/00-assert.yaml delete mode 100644 tests/e2e/smoke-pod-annotations/00-install.yaml delete mode 100644 tests/e2e/smoke-pod-labels/00-assert.yaml delete mode 100644 tests/e2e/smoke-pod-labels/00-install.yaml delete mode 100644 tests/e2e/smoke-restarting-deployment/00-assert.yaml delete mode 100644 tests/e2e/smoke-restarting-deployment/00-errors.yaml delete mode 100644 tests/e2e/smoke-restarting-deployment/00-install.yaml delete mode 100644 tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml delete mode 100644 tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml delete mode 100644 tests/e2e/smoke-sidecar-other-namespace/00-install.yaml delete mode 100644 tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml delete mode 100644 tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml delete mode 100644 tests/e2e/smoke-sidecar/00-install.yaml delete mode 100644 tests/e2e/smoke-sidecar/01-assert.yaml delete mode 100644 tests/e2e/smoke-sidecar/01-install-app.yaml delete mode 100644 tests/e2e/smoke-simplest/00-assert.yaml delete mode 100644 tests/e2e/smoke-simplest/00-install.yaml delete mode 100644 tests/e2e/smoke-statefulset/00-assert.yaml delete mode 100644 tests/e2e/smoke-statefulset/00-install.yaml delete mode 100644 tests/e2e/smoke-targetallocator/00-assert.yaml delete mode 100644 tests/e2e/smoke-targetallocator/00-install.yaml delete mode 100644 tests/e2e/smoke-targetallocator/01-assert.yaml delete mode 100644 tests/e2e/smoke-targetallocator/01-change-ta-config.yaml delete mode 100644 tests/e2e/statefulset-features/00-assert.yaml delete mode 100644 tests/e2e/statefulset-features/00-install.yaml delete mode 100644 tests/e2e/statefulset-features/01-assert.yaml delete mode 100644 tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml delete mode 100644 tests/e2e/targetallocator-features/00-assert.yaml delete mode 100644 tests/e2e/targetallocator-features/00-install.yaml delete mode 100644 tests/e2e/targetallocator-features/01-assert.yaml delete mode 100644 tests/e2e/targetallocator-features/01-liveness.yaml delete mode 100644 tests/e2e/targetallocator-prometheuscr/00-assert.yaml delete mode 100644 tests/e2e/targetallocator-prometheuscr/00-install.yaml delete mode 100644 tests/e2e/targetallocator-prometheuscr/01-assert.yaml delete mode 100644 tests/e2e/targetallocator-prometheuscr/01-install.yaml delete mode 100644 tests/instrumentation-e2e-apps/apache-httpd/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/dotnet/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/golang/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/golang/main.go delete mode 100644 tests/instrumentation-e2e-apps/java/DemoApplication.java delete mode 100644 tests/instrumentation-e2e-apps/java/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/java/build.gradle delete mode 100644 tests/instrumentation-e2e-apps/nodejs/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/nodejs/index.js delete mode 100644 tests/instrumentation-e2e-apps/python/Dockerfile delete mode 100644 tests/instrumentation-e2e-apps/python/app.py delete mode 100644 tests/instrumentation-e2e-apps/python/requirements.txt diff --git a/.chloggen/2311-ta-servicemonitor.yaml b/.chloggen/2311-ta-servicemonitor.yaml deleted file mode 100755 index d84aa5975..000000000 --- a/.chloggen/2311-ta-servicemonitor.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Create ServiceMonitor to monitor target allocator - -# One or more tracking issues related to the change -issues: [2311] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/TEMPLATE.yaml b/.chloggen/TEMPLATE.yaml deleted file mode 100644 index ca13515f1..000000000 --- a/.chloggen/TEMPLATE.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: - -# One or more tracking issues related to the change -issues: [] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/add-loki-parser.yaml b/.chloggen/add-loki-parser.yaml deleted file mode 100644 index 4c1871292..000000000 --- a/.chloggen/add-loki-parser.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: collector - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add Loki parser to extract loki service port from config - -# One or more tracking issues related to the change -issues: [1825] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-apache-httpd-dependencies.yaml b/.chloggen/bump-apache-httpd-dependencies.yaml deleted file mode 100755 index d3d17ee4f..000000000 --- a/.chloggen/bump-apache-httpd-dependencies.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump Apache httpd version - -# One or more tracking issues related to the change -issues: [2463] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-autoinstrumentation-version.yaml b/.chloggen/bump-autoinstrumentation-version.yaml deleted file mode 100755 index dfce3b45d..000000000 --- a/.chloggen/bump-autoinstrumentation-version.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: "Bump NodeJS dependencies." - -# One or more tracking issues related to the change -issues: [2459] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/bump-python-dependencies.yaml b/.chloggen/bump-python-dependencies.yaml deleted file mode 100755 index 589b30b28..000000000 --- a/.chloggen/bump-python-dependencies.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Bump python autoinstrumentation version to 1.22.0/0.43b0 - -# One or more tracking issues related to the change -issues: [2460] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/chore_targetallocator-labels.yaml b/.chloggen/chore_targetallocator-labels.yaml deleted file mode 100755 index c05fbe09e..000000000 --- a/.chloggen/chore_targetallocator-labels.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Add version label to target allocator resources - -# One or more tracking issues related to the change -issues: [2454] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/fix_ta-serviceaccount.yaml b/.chloggen/fix_ta-serviceaccount.yaml deleted file mode 100755 index fa7e6406a..000000000 --- a/.chloggen/fix_ta-serviceaccount.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: bug_fix - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Fix ServiceAccount naming for target allocator - -# One or more tracking issues related to the change -issues: [2443] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/support-version-1.29.0.yaml b/.chloggen/support-version-1.29.0.yaml deleted file mode 100755 index 44645349d..000000000 --- a/.chloggen/support-version-1.29.0.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: 'enhancement' - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: operator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Support for Kubernetes 1.29 version. - -# One or more tracking issues related to the change -issues: [2458] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.chloggen/ta_removehotreload.yaml b/.chloggen/ta_removehotreload.yaml deleted file mode 100755 index 442d27dc3..000000000 --- a/.chloggen/ta_removehotreload.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: breaking - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: Remove configuration hot reloading from target allocator - -# One or more tracking issues related to the change -issues: [2032] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: This only affects use of target allocator without the operator. diff --git a/.chloggen/target-allocator-pdb.yaml b/.chloggen/target-allocator-pdb.yaml deleted file mode 100644 index 562687266..000000000 --- a/.chloggen/target-allocator-pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement - -# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action) -component: target allocator - -# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). -note: PDB support for target allocator - -# One or more tracking issues related to the change -issues: [2261] - -# (Optional) One or more lines of additional information to render under the primary note. -# These lines will be padded with 2 spaces and then inserted directly into the document. -# Use pipe (|) for multiline entries. -subtext: diff --git a/.ci/create-release-github.sh b/.ci/create-release-github.sh deleted file mode 100755 index 8557ed7e7..000000000 --- a/.ci/create-release-github.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -OPERATOR_VERSION=$(git describe --tags) - -gh config set prompt disabled -gh release create \ - -t "Release ${OPERATOR_VERSION}" \ - "${OPERATOR_VERSION}" \ - 'dist/opentelemetry-operator.yaml#Installation manifest for Kubernetes' diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 209e0fe34..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,22 +0,0 @@ -##################################################### -# -# List of approvers for OpenTelemetry Collector Kubernetes Operator -# -##################################################### -# -# Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/main/community-membership.md -# -# -# Learn about CODEOWNERS file format: -# https://help.github.com/en/articles/about-code-owners -# - -# Global owners, will be the owners for everything in the repo. -* @open-telemetry/operator-approvers - -# AutoInstrumentation owners -# TBD - -# Target Allocator owners -cmd/otel-allocator @open-telemetry/operator-ta-maintainers diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml deleted file mode 100644 index 50eae6554..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: Bug report -description: Create a report to help us improve -labels: ["bug", "needs triage"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! Please make sure to fill out the entire form below, providing as much context as you can in order to help us triage and track down your bug as quickly as possible. - - Before filing a bug, please be sure you have searched through [existing bugs](https://github.com/open-telemetry/opentelemetry-operator/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug) to see if an existing issue covers your bug. - - type: dropdown - id: component - attributes: - label: Component(s) - description: Which component(s) does your bug report concern? - multiple: true - options: - - operator - - collector - - instrumentation - - target allocator - - opamp bridge - - type: textarea - attributes: - label: What happened? - description: Please provide as much detail as you reasonably can. - value: | - ## Description - - ## Steps to Reproduce - - ## Expected Result - - ## Actual Result - - validations: - required: true - - type: input - attributes: - label: Kubernetes Version - description: What version did you use? (e.g., `1.23.0`) - validations: - required: true - - type: input - attributes: - label: Operator version - description: What version did you use? (e.g., `v0.4.0`, `1eb551b`, etc) - validations: - required: true - - type: input - attributes: - label: Collector version - description: What version did you use? (e.g., `v0.4.0`, `1eb551b`, etc) - validations: - required: true - - type: textarea - attributes: - label: Environment information - description: Please provide any additional information about your installation. - value: | - ## Environment - OS: (e.g., "Ubuntu 20.04") - Compiler(if manually compiled): (e.g., "go 14.2") - - type: textarea - attributes: - label: Log output - description: | - Please copy and paste any relevant log output. - render: shell - - type: textarea - attributes: - label: Additional context - description: Any additional information you think may be relevant to this issue. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml deleted file mode 100644 index 30de7c742..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ /dev/null @@ -1,36 +0,0 @@ -name: Feature request -description: Suggest an idea for this project -labels: ["enhancement", "needs triage"] -body: - - type: dropdown - id: component - attributes: - label: Component(s) - description: Which component(s) does your feature request concern? - multiple: true - options: - - operator - - collector - - instrumentation - - target allocator - - opamp bridge - - type: textarea - attributes: - label: Is your feature request related to a problem? Please describe. - description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - validations: - required: true - - type: textarea - attributes: - label: Describe the solution you'd like - description: A clear and concise description of what you want to happen. - validations: - required: true - - type: textarea - attributes: - label: Describe alternatives you've considered - description: A clear and concise description of any alternative solutions or features you've considered. - - type: textarea - attributes: - label: Additional context - description: Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml deleted file mode 100644 index d7be8e0b0..000000000 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Other issue -description: Create a new issue to help us improve the operator -labels: ["needs triage"] -body: - - type: dropdown - id: component - attributes: - label: Component(s) - description: Which component(s) does your issue concern? - multiple: true - options: - - operator - - collector - - instrumentation - - target allocator - - opamp bridge - - type: textarea - attributes: - label: Describe the issue you're reporting - description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - validations: - required: true diff --git a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml b/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml deleted file mode 100644 index 53de1e159..000000000 --- a/.github/workflows/publish-autoinstrumentation-apache-httpd.yaml +++ /dev/null @@ -1,69 +0,0 @@ -name: "Publish Apache HTTPD Auto-Instrumentation" - -on: - push: - paths: - - 'autoinstrumentation/apache-httpd/**' - - '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' - branches: - - main - pull_request: - paths: - - 'autoinstrumentation/apache-httpd/**' - - '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Read version - run: echo "VERSION=$(cat autoinstrumentation/apache-httpd/version.txt)" >> $GITHUB_ENV - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd - tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: autoinstrumentation/apache-httpd - platforms: linux/amd64 - push: ${{ github.event_name == 'push' }} - build-args: version=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-dotnet.yaml b/.github/workflows/publish-autoinstrumentation-dotnet.yaml deleted file mode 100644 index 27c194937..000000000 --- a/.github/workflows/publish-autoinstrumentation-dotnet.yaml +++ /dev/null @@ -1,79 +0,0 @@ -name: "Publish DotNet Auto-Instrumentation" - -on: - push: - paths: - - 'autoinstrumentation/dotnet/**' - - '.github/workflows/publish-autoinstrumentation-dotnet.yaml' - branches: - - main - pull_request: - paths: - - 'autoinstrumentation/dotnet/**' - - '.github/workflows/publish-autoinstrumentation-dotnet.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Read version - run: echo "VERSION=$(cat autoinstrumentation/dotnet/version.txt)" >> $GITHUB_ENV - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/autoinstrumentation-dotnet - ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet - tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: autoinstrumentation/dotnet - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name == 'push' }} - build-args: version=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-java.yaml b/.github/workflows/publish-autoinstrumentation-java.yaml deleted file mode 100644 index 10a129d02..000000000 --- a/.github/workflows/publish-autoinstrumentation-java.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: "Publish Java Auto-Instrumentation" - -on: - push: - paths: - - 'autoinstrumentation/java/**' - - '.github/workflows/publish-autoinstrumentation-java.yaml' - branches: - - main - pull_request: - paths: - - 'autoinstrumentation/java/**' - - '.github/workflows/publish-autoinstrumentation-java.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Read version - run: echo "VERSION=$(cat autoinstrumentation/java/version.txt)" >> $GITHUB_ENV - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/autoinstrumentation-java - ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java - tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: autoinstrumentation/java - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - push: ${{ github.event_name == 'push' }} - build-args: version=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-nodejs.yaml b/.github/workflows/publish-autoinstrumentation-nodejs.yaml deleted file mode 100644 index 1fea43e54..000000000 --- a/.github/workflows/publish-autoinstrumentation-nodejs.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: "Publish NodeJS Auto-Instrumentation" - -on: - push: - paths: - - 'autoinstrumentation/nodejs/**' - - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' - branches: - - main - pull_request: - paths: - - 'autoinstrumentation/nodejs/**' - - '.github/workflows/publish-autoinstrumentation-nodejs.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Read version - run: echo VERSION=$(cat autoinstrumentation/nodejs/package.json | jq -r '.dependencies."@opentelemetry/sdk-node"') >> $GITHUB_ENV - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/autoinstrumentation-nodejs - ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs - tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: autoinstrumentation/nodejs - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name == 'push' }} - build-args: version=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-autoinstrumentation-python.yaml b/.github/workflows/publish-autoinstrumentation-python.yaml deleted file mode 100644 index 0239e37fb..000000000 --- a/.github/workflows/publish-autoinstrumentation-python.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: "Publish Python Auto-Instrumentation" - -on: - push: - paths: - - 'autoinstrumentation/python/**' - - '.github/workflows/publish-autoinstrumentation-python.yaml' - branches: - - main - pull_request: - paths: - - 'autoinstrumentation/python/**' - - '.github/workflows/publish-autoinstrumentation-python.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Read version - run: echo VERSION=$(head -n 1 autoinstrumentation/python/requirements.txt | cut -d '=' -f3) >> $GITHUB_ENV - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/autoinstrumentation-python - ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python - tags: | - type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: autoinstrumentation/python - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - push: ${{ github.event_name == 'push' }} - build-args: version=${{ env.VERSION }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-images.yaml b/.github/workflows/publish-images.yaml deleted file mode 100644 index 9c82f1c7b..000000000 --- a/.github/workflows/publish-images.yaml +++ /dev/null @@ -1,105 +0,0 @@ -name: "Publish operator" - -on: - push: - branches: [ main ] - tags: [ 'v*' ] - - workflow_dispatch: - -env: - PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - -jobs: - publish: - name: Publish container images - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.3' - - - name: Unshallow - run: git fetch --prune --unshallow - - - name: Describe the current state - run: git describe --tags - - - name: Set env vars for the job - run: | - grep -v '\#' versions.txt | grep opentelemetry-collector | awk -F= '{print "OTELCOL_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep targetallocator | awk -F= '{print "TARGETALLOCATOR_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep operator-opamp-bridge | awk -F= '{print "OPERATOR_OPAMP_BRIDGE_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-java | awk -F= '{print "AUTO_INSTRUMENTATION_JAVA_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-nodejs | awk -F= '{print "AUTO_INSTRUMENTATION_NODEJS_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-python | awk -F= '{print "AUTO_INSTRUMENTATION_PYTHON_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-dotnet | awk -F= '{print "AUTO_INSTRUMENTATION_DOTNET_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-go | awk -F= '{print "AUTO_INSTRUMENTATION_GO_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_APACHE_HTTPD_VERSION="$2}' >> $GITHUB_ENV - grep -v '\#' versions.txt | grep autoinstrumentation-apache-httpd | awk -F= '{print "AUTO_INSTRUMENTATION_NGINX_VERSION="$2}' >> $GITHUB_ENV - echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV - - - name: Build the binary for each supported architecture - run: | - for platform in $(echo $PLATFORMS | tr "," "\n"); do - arch=${platform#*/} - echo "Building manager for $arch" - make manager ARCH=$arch - done - - - name: Docker meta - id: docker_meta - uses: docker/metadata-action@v5 - with: - images: | - otel/opentelemetry-operator - ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{raw}} - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Operator image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile - platforms: ${{ env.PLATFORMS }} - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-operator-bundle.yaml b/.github/workflows/publish-operator-bundle.yaml deleted file mode 100644 index 27896351a..000000000 --- a/.github/workflows/publish-operator-bundle.yaml +++ /dev/null @@ -1,79 +0,0 @@ -name: "Publish operator bundle" - -on: - push: - paths: - - '.github/workflows/publish-operator-bundle.yaml' - - 'bundle.Dockerfile' - - 'bundle/**' - branches: - - main - tags: - - 'v*' - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - name: Docker meta - id: docker_meta - uses: docker/metadata-action@v5 - with: - images: | - otel/opentelemetry-operator-bundle - ghcr.io/open-telemetry/opentelemetry-operator/operator-bundle - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{raw}} - type=ref,event=branch - - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Operator image - uses: docker/build-push-action@v5 - with: - context: . - file: ./bundle.Dockerfile - platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-operator-opamp-bridge.yaml b/.github/workflows/publish-operator-opamp-bridge.yaml deleted file mode 100644 index f8ff72f01..000000000 --- a/.github/workflows/publish-operator-opamp-bridge.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: "Publish Operator OpAMP Bridge" - -on: - push: - paths: - - 'cmd/operator-opamp-bridge/**' - - '.github/workflows/publish-operator-opamp-bridge.yaml' - branches: - - main - tags: - - 'v*' - workflow_dispatch: - -env: - PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.3' - cache-dependency-path: 'cmd/operator-opamp-bridge/go.sum' - - # TODO: We're currently not using this. Should we? - - name: Read version - run: | - echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV - echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - - - name: Build the binary for each supported architecture - run: | - for platform in $(echo $PLATFORMS | tr "," "\n"); do - arch=${platform#*/} - echo "Building operator-opamp-bridge for $arch" - make operator-opamp-bridge ARCH=$arch - done - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/operator-opamp-bridge - ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{raw}} - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: cmd/operator-opamp-bridge - platforms: ${{ env.PLATFORMS }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/publish-target-allocator.yaml b/.github/workflows/publish-target-allocator.yaml deleted file mode 100644 index 99a7aa0da..000000000 --- a/.github/workflows/publish-target-allocator.yaml +++ /dev/null @@ -1,94 +0,0 @@ -name: "Publish target allocator" - -on: - push: - paths: - - 'cmd/otel-allocator/**' - - '.github/workflows/publish-target-allocator.yaml' - branches: - - main - tags: - - 'v*' - workflow_dispatch: - -env: - PLATFORMS: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le - -jobs: - publish: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version: '~1.21.3' - cache-dependency-path: 'cmd/otel-allocator/go.sum' - - # TODO: We're currently not using this. Should we? - - name: Read version - run: | - echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV - echo "VERSION_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - - - name: Build the binary for each supported architecture - run: | - for platform in $(echo $PLATFORMS | tr "," "\n"); do - arch=${platform#*/} - echo "Building target allocator for $arch" - make targetallocator ARCH=$arch - done - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - otel/target-allocator - ghcr.io/open-telemetry/opentelemetry-operator/target-allocator - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{raw}} - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Log into Docker.io - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - if: ${{ github.event_name == 'push' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: cmd/otel-allocator - platforms: ${{ env.PLATFORMS }} - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 735c6bf4b..000000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: "Prepare the release" -on: - push: - tags: [ 'v*' ] - -jobs: - release: - runs-on: ubuntu-22.04 - steps: - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "~1.21.1" - - - uses: actions/checkout@v4 - - - name: "generate release resources" - run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" - - - name: "create the release in GitHub" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./.ci/create-release-github.sh - - - name: "refresh go proxy module info on release" - run: | - OPERATOR_VERSION=$(git describe --tags) - curl https://proxy.golang.org/github.com/open-telemetry/opentelemetry-operator/@v/${OPERATOR_VERSION}.info - - operator-hub-prod-release: - needs: release - uses: ./.github/workflows/reusable-operator-hub-release.yaml - with: - org: redhat-openshift-ecosystem - repo: community-operators-prod - secrets: - OPENTELEMETRYBOT_GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - - operator-hub-community-release: - needs: release - uses: ./.github/workflows/reusable-operator-hub-release.yaml - with: - org: k8s-operatorhub - repo: community-operators - secrets: - OPENTELEMETRYBOT_GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/reusable-operator-hub-release.yaml b/.github/workflows/reusable-operator-hub-release.yaml deleted file mode 100644 index e6e90f744..000000000 --- a/.github/workflows/reusable-operator-hub-release.yaml +++ /dev/null @@ -1,88 +0,0 @@ -name: Reusable - Create operator hub pull request - -on: - workflow_call: - inputs: - org: - type: string - required: true - repo: - type: string - required: true - secrets: - OPENTELEMETRYBOT_GITHUB_TOKEN: - required: true - -jobs: - create-operator-pull-request: - runs-on: ubuntu-latest - steps: - - name: Set version as env variable - env: - TAG: ${{ github.ref_name }} - run: | - echo $TAG - TAG=${TAG:1} # remove v (prefix) - echo version=${TAG} >> $GITHUB_ENV # update GitHub ENV vars - - - name: Sync fork - env: - GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - run: | - # synchronizing the fork is fast, and avoids the need to fetch the full upstream repo - # (fetching the upstream repo with "--depth 1" would lead to "shallow update not allowed" - # error when pushing back to the origin repo) - gh repo sync opentelemetrybot/${{ inputs.repo }} \ - --source ${{ inputs.org }}/${{ inputs.repo }} \ - --force - - - name: Checkout operatorhub repo - uses: actions/checkout@v4 - with: - repository: opentelemetrybot/${{ inputs.repo }} - token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - - - name: Checkout opentelemetry-operator to tmp/ directory - uses: actions/checkout@v4 - with: - repository: open-telemetry/opentelemetry-operator - token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - path: tmp/ - - - name: Update version - env: - VERSION: ${{ env.version }} - run: | - mkdir operators/opentelemetry-operator/${VERSION} - cp -R ./tmp/bundle/* operators/opentelemetry-operator/${VERSION} - rm -rf ./tmp - - - name: Use CLA approved github bot - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com - - - name: Create pull request against ${{ inputs.org }}/${{ inputs.repo }} - env: - VERSION: ${{ env.version }} - GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - run: | - message="Update the opentelemetry to $VERSION" - body="Release opentelemetry-operator \`$VERSION\`. - - cc @pavolloffay @frzifus @yuriolisa @jaronoff97 @VineethReddy02 @TylerHelmuth @swiatekm-sumo - " - branch="update-opentelemetry-operator-to-${VERSION}" - - # gh pr create doesn't have a way to explicitly specify different head and base - # repositories currently, but it will implicitly pick up the head from a different - # repository if you set up a tracking branch - - git checkout -b $branch - git add -A - git commit -s -m "$message" - git push -f --set-upstream origin $branch - gh pr create --title "$message" \ - --body "$body" \ - --repo ${{ inputs.org }}/${{ inputs.repo }} \ - --base main diff --git a/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml deleted file mode 100644 index cfe626886..000000000 --- a/.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml +++ /dev/null @@ -1,58 +0,0 @@ -name: Reusable - Publish autoinstrumentation E2E images - -on: - workflow_call: - inputs: - language: - type: string - required: true - platforms: - type: string - required: true - -jobs: - publish-e2e-image: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v4 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-${{ inputs.language }} - tags: | - type=ref,event=branch - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to GitHub Package Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - tags: ${{ steps.meta.outputs.tags }} - context: tests/instrumentation-e2e-apps/${{ inputs.language }} - platforms: ${{ inputs.platforms }} - push: ${{ github.event_name == 'push' }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.golangci.yaml b/.golangci.yaml deleted file mode 100644 index b644373c0..000000000 --- a/.golangci.yaml +++ /dev/null @@ -1,73 +0,0 @@ -run: - concurrency: 4 - timeout: 5m - issues-exit-code: 1 - tests: true - -# all available settings of specific linters -linters-settings: - goheader: - template-path: header.txt - goimports: - local-prefixes: github.com/open-telemetry/opentelemetry-operator - maligned: - suggest-new: true - misspell: - locale: US - ignore-words: - - cancelled - - metre - - meter - - metres - - kilometre - - kilometres - govet: - # report about shadowed variables - check-shadowing: true - - # settings per analyzer - settings: - printf: # analyzer name, run `go tool vet help` to see all analyzers - funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf - - enable-all: true - # TODO: Enable this and fix the alignment issues. - disable: - - fieldalignment - gofmt: - simplify: true - revive: - min-confidence: 0.8 - - depguard: - rules: - main: - deny: - - pkg: sync/atomic - desc: "Use go.uber.org/atomic instead of sync/atomic" - - pkg: github.com/pkg/errors - desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors" - -linters: - enable: - - goheader - - goimports - - misspell - - gosec - - govet - - exhaustive - - godot - - unparam - - gosimple - - unused - - staticcheck - - ineffassign - - typecheck - - unparam - - depguard - - errcheck - - errorlint diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index d8eeda0bb..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,1212 +0,0 @@ -Changes by Version -================== - - -## 0.90.0 - -### 💡 Enhancements 💡 - -- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.2.0 (#2382) -- `operator`: add liveness probe to target allocator deployment generation (#2258) -- `operator`: added reconciliation errors for CRD events (#1972) -- `operator`: removes the old way of running autodetection for openshift routes being available (#2108) -- `bridge`: adds request headers to the opamp bridge config (#2410) -- `bridge`: adds Headers to opamp bridge spec and configmap generation (#2410) -- `operator`: Create PodMonitor when deploying collector in sidecar mode and Prometheus exporters are used. (#2306) -- `operator`: add readiness probe to target allocator deployment generation (#2258) -- `target allocator`: add readyz endpoint to TA (#2258) -- `target allocator`: add target allocator securityContext configuration (#2397) -- `target allocator`: Use only target address for allocation in consistent-hashing strategy (#2280) - -### 🧰 Bug fixes 🧰 - -- `operator`: fixes ability to do a foreground cascading delete (#2364) -- `operator`: fix error logging in collector container creation (#2420) -- `operator`: lifecycle spec removed from cloned initContainer (#2366) -- `operator`: add missing pod in the rbac (#1679) -- `operator`: check if service account specified in otelcol before creating service account resource for collectors (#2372) -- `target allocator`: Save targets discovered before collector instances come up (#2350) - -### Components - -* [OpenTelemetry Collector - v0.90.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.90.1) -* [OpenTelemetry Contrib - v0.90.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.90.1) -* [Java auto-instrumentation - 1.32.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.32.0) -* [.NET auto-instrumentation - 1.2.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.2.0) -* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) -* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) -* [Go - v0.8.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.8.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] - -## 0.89.0 - -### 🛑 Breaking changes 🛑 - -- `autoinstrumentation`: Bump Go auto instrumentation version to v0.8.0-alpha (#2358) - The default export protocol was switched from `grpc` to `http/proto` -- `target allocator`: Disable configuration hot reload (#2032) - This feature can be re-enabled by passing the --reload-config flag to the target allocator. - However, this is deprecated and will be removed in an upcoming release. - -### 💡 Enhancements 💡 - -- `target allocator`: add healthcheck endpoint to TA (#2258) -- `OpAMP Bridge`: Sends a heartbeat from the bridge and brings the annotation to spec. (#2132) -- `operator`: Added updateStrategy for DaemonSet mode. (#2107) -- `operator`: add target allocator affinity configuration (#2263) -- `Operator`: Added the service.instance.id as the pod.UID into the traces resource Env. (#1921) -- `operator`: Support configuring images via RELATED_IMAGE_ environment variables (#2326) -- `target allocator`: Declare and use ContainerPort for Target Allocator (#2312) -- `target allocator`: Add logging for prometheus operator in TargetAllocator's config generator (#2348) - -### 🧰 Bug fixes 🧰 - -- `target allocator`: Update file watcher to detect file write events (#2349) -- `target allocator`: Run the target allocator as a non-root user (#738) - Some Kubernetes configurations do not allow running images as root, so - provide a non-zero UID in the Docker image. - -- `operator`: Truncate `sidecar.opentelemetry.io/injected` sidecar pod label to 63 characters (#1031) - -### Components - -* [OpenTelemetry Collector - v0.89.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.89.0) -* [OpenTelemetry Contrib - v0.89.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.89.0) -* [Java auto-instrumentation - 1.31.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.31.0) -* [.NET auto-instrumentation - 1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.1.0) -* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) -* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) -* [Go - v0.8.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.8.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] - - -## 0.88.0 - -### 🛑 Breaking changes 🛑 - -- `OpAMP Bridge`: Currently, the bridge doesn't adhere to the spec for the naming structure. This changes the bridge to use the / structure as described. (#2131) - * Updates the bridge to get collectors using the reporting annotation - * Fixes a bug where we were using the incorrect structure for the collectors - - -### 💡 Enhancements 💡 - -- `operator-opamp-bridge`: Creates the CRD for the OpAMPBridge resource (#1368) -- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.1.0 (#2252) -- `operator`: Bump NodeJS dependencies. Also, increase the size of the default size for the volume used to copy the autoinstrumentation libraries from 150M to 200M (#2240, #2237) - -### 🧰 Bug fixes 🧰 - -- `Operator`: Fixed the labeling process which was broken at the moment to capture the current image tag when the users set the sha256 reference. (#1982) -- `target allocator`: reset kubeconfig to empty string when using in-cluster config (#2262) - -### Components - -* [OpenTelemetry Collector - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.88.0) -* [OpenTelemetry Contrib - v0.88.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.88.0) -* [Java auto-instrumentation - 1.31.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.31.0) -* [.NET auto-instrumentation - 1.1.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.1.0) -* [Node.JS - 0.44.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.44.0) -* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) -* [Go - v0.7.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.7.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] - -## 0.87.0 - -### 🛑 Breaking changes 🛑 - -- `OpAMP Bridge`: This PR simplifies the bridge's configuration and logging by renaming and removing fields. (#1368) - `components_allowed` => `componentsAllowed` - :x: `protocol` which is now inferred from endpoint - capabilities `[]string` => `map[Capability]bool` for enhanced configuration validation -- `operator`: Enable Target Allocator Rewrite by default (#2208) - See [the documentation](/README.md#target-allocator) for details. - Use the `--feature-gates=-operator.collector.rewritetargetallocator` command line option to switch back to the old behaviour. - - -### 💡 Enhancements 💡 - -- `operator`: updating the operator to use the Collector's debug exporter in replacement of the deprecated logging exporter (#2130) -- `operator`: Publish operator images for I IBM P/Z (linux/s390x,linux/ppc64le) architectures. (#2215) -- `Documentation`: Add diagrams to Target Allocator Readme. (#2229) -- `target allocator`: Add rate limiting for scrape config updates (#1544) - -### 🧰 Bug fixes 🧰 - -- `operator`: Set the security context for the init containers of the Apache HTTPD instrumentation (#2050) - -### Components - -* [OpenTelemetry Collector - v0.87.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.87.0) -* [OpenTelemetry Contrib - v0.87.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.87.0) -* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) -* [.NET auto-instrumentation - 1.0.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.2) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) -* [Go - v0.7.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.7.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] - -## 0.86.0 - -### 🛑 Breaking changes 🛑 - -- `operator`: Get rid of autoscaling/v2beta2 (#2145) - Kubernetes 1.23 is the minimum available version everywhere after 1.22 deprecation, - due to it, the minimum required version has been updated to it, dropping support for - autoscaling/v2beta2 - - -### 💡 Enhancements 💡 - -- `operator`: Add support for multi instrumentation (#1717) -- `operator`: Implementation of new Nginx autoinstrumentation. (#2033) -- `operator`: Add PDB support for OpenTelemetryCollector (#2136) - This PR adds support for PodDisruptionBudgets when OpenTelemetryCollector is deployed - as `deployment` or `statefulset`. -- `operator`: Add support for Tolerations on target allocator (#2172) -- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.2 (#2168) -- `target allocator`: Enable discovery manager metrics in target allocator (#2170) -- `target allocator`: Allow target allocator to be completely configured via the config file (#2129) -- `operator`: Propagate proxy environment variables to operands. (#2146) -- `autoinstrumentation`: Bump python autoinstrumentation version to 1.20.0/0.41b0 (#2192) - -### 🧰 Bug fixes 🧰 - -- `autoinstrumentation`: Fix .NET Automatic Instrumentation for alpine based images configured by namespace annotations (#2179) -- `operator`: fixes scenario where an old CRD would cause the operator to default to an unmanaged state (#2039) -- `target allocator`: Rebuild targets on scrape config regex-only changes (#1358, #1926) - -### Components - -* [OpenTelemetry Collector - v0.86.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.86.0) -* [OpenTelemetry Contrib - v0.86.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.86.0) -* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) -* [.NET auto-instrumentation - 1.0.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.2) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.41b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.41b0) -* [Go - v0.3.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.3.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -* [Nginx - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3)] - -## 0.85.0 - -### 💡 Enhancements 💡 - -- `autoinstrumentation`: .NET Automatic Instrumentation support for Alpine-based images (#1849) -- `operator`: Allow the collector CRD to specify a list of configmaps to mount (#1819) -- `autoinstrumentation`: Bump Go auto-instrumentation support to v0.3.0-alpha. (#2123) -- `operator`: Introduces a new method of reconciliation to reduce duplication and complexity (#1959) - -### 🧰 Bug fixes 🧰 - -- `operator`: Run the upgrade mechanism when there is a change in an instance to ensure it is upgraded. This is useful for cases where the instance uses the unmanaged state, the operator is upgraded and the instance changes to use a managed state. (#1890) - -### Components - -* [OpenTelemetry Collector - v0.85.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.85.0) -* [OpenTelemetry Contrib - v0.85.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.85.0) -* [Java auto-instrumentation - 1.30.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.30.0) -* [.NET auto-instrumentation - 1.0.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) -* [Go - v0.3.0-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.3.0-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) - -## 0.84.0 - -### 💡 Enhancements 💡 - -- `autoinstrumentation`: Bump dotnet instrumentation version to 1.0.0 (#2096) -- `operator`: Remove default cpu and mem requests and limits from target allocator to match otel-collector behaviour (#1914) - To preserve the old behaviour for the case when the requests/limits were not explicitely set during the deployment, make sure to set the requests/limits of 100m/200m for CPU and 250Mi/500Mi for memory. -- `operator`: Create ServiceMonitors when the Prometheus exporters are used. (#1963) -- `operator`: Run end-to-end tests on Kubernetes 1.28 (#2047) -- `operator`: Limit auto-instrumentation emptydir volume size (#2044) -- `operator`: Make OpenShift routes work with missing hostname (#2074) - If the Ingress hostname is not specified OpenShift route hostname is set to `--route--basedomain`. - -### 🧰 Bug fixes 🧰 - -- `operator`: Avoid running the auto-instrumentation pod mutator for pods already auto-instrumented (#1366) -- `autoinstrumentation`: Allow the usage of the Apache HTTPD autoinstrumentation to be run as non-root user. Change the files permission to allow their copy from a non-root user. (#2068) -- `operator`: Fixes reconciling otel-collector service's internal traffic policy changes. (#2061) -- `operator`: Make OpenShift Route work with gRPC receivers by using h2c appProtocol (#1969) - -### Components - -* [OpenTelemetry Collector - v0.84.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.84.0) -* [OpenTelemetry Contrib - v0.84.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.84.0) -* [Java auto-instrumentation - 1.29.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.29.0) -* [.NET auto-instrumentation - 1.0.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) -* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) -## 0.83.0 - -### 🛑 Breaking changes 🛑 - -- `operator`: Make sure OTLP export can report data to OTLP ingress/route without additional configuration (#1967) - The ingress can be configured to create a single host with multiple paths or - multiple hosts with subdomains (one per receiver port). - The path from OpenShift route was removed. - The port names are truncate to 15 characters. Users with custom receivers - which create ports with longer name might need to update their configuration. - - -### 💡 Enhancements 💡 - -- `operator`: Add `AdditionalContainers` to the collector spec allowing to configure sidecar containers. This only applies to Deployment/StatefulSet/DeamonSet deployment modes of the collector. (#1987) -- `operator`: Add flag to enable support for the pprof server in the operator. (#1997) -- `operator`: Set the level 4 of capabilities in the CSV for the OpenTelemetry Operator. (#2002) -- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 1.0.0-rc.2 (#2030) -- `operator`: Use scratch as the base image for operator (#2011) -- `operator`: Bump Golang to 1.21 (#2009) -- `operator`: Daemonsets can be instrumented so the generated servicename should use their name for better discoverability (#2015) - -### 🧰 Bug fixes 🧰 - -- `operator`: fixes bug introduced in v0.82.0 where Prometheus exporters weren't being generated correctly (#2016) - -### Components - -* [OpenTelemetry Collector - v0.83.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.83.0) -* [OpenTelemetry Contrib - v0.83.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.83.0) -* [Java auto-instrumentation - 1.29.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.29.0) -* [.NET auto-instrumentation - 1.0.0-rc.2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0-rc.2) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) -* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) - -## 0.82.0 - -### 🛑 Breaking changes 🛑 - -- `operator`: Remove legacy OTLP HTTP port (#1954) - -### 💡 Enhancements 💡 - -- `operator`: Expose the Prometheus exporter port in the OpenTelemetry Collector container when it is used in the configuration. (#1689) -- `operator`: Add the ability to the operator to create Service Monitors for the OpenTelemetry Collectors in order to gather the metrics they are generating (#1768) -- `target allocator`: Add support for environment variables in target allocator config. - (#1773) -- `operator`: Add a GitHub Actions Workflow to build and publish the operator bundle images (#1879) -- `operator`: Add a new field called `managementState` in the OpenTelemetry Collector CRD. (#1881) -- `operator`: When an user specifies the monitoring port for their collector in the configuration, the monitoring service uses that port. (#1931) -- `operator`: Add support for TopologySpreadConstraints & nodeSelector on collector and target allocator (#1899) -- `autoinstrumentation`: Bump dotnet dependency to 1.0.0-rc.1 (#1978) -- `autoinstrumentation`: Bump opentelemetry-go-instrumentation image to v0.2.2-alpha (#1915) -- `autoinstrumentation`: Bumps java autoinstrumentation version to 1.28.0 (#1918) -- `autoinstrumentaion`: Bump NodeJS dependencies to 1.15.1/0.41.1 (#1977) -- `autoinstrumentation`: Bump python packages to 1.19.0/0.40b0 (#1930) -- `target allocator`: Restart target allocator when its configuration changes (#1882) -- `target allocator`: Make the Target Allocator default scrape interval for Prometheus CRs configurable (#1925) - Note that this only works for Prometheus CRs, raw Prometheus configuration from the receiver uses its own settings. -- `operator`: Set securityContext on injected initContainer based on existing containers. (#1084, #1058) -- `Documentation`: Update OTel Operator and Target Allocator readmes. (#1952) - -### 🧰 Bug fixes 🧰 - -- `operator`: Fix port name matching between ingress/route and service. All ports are truncated to 15 characters. If the port name is longer it is changed to port-%d pattern. (#1954) -- `operator`: Fix for issue #1893 (#1905) - -### Components - -* [OpenTelemetry Collector - v0.82.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.82.0) -* [OpenTelemetry Contrib - v0.82.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.82.0) -* [Java auto-instrumentation - 1.28.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.28.0) -* [.NET auto-instrumentation - 1.0.0-rc.1](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/1.0.0-rc.1) -* [Node.JS - 0.41.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-0.41.1) -* [Python - 0.40b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/0.40b0) -* [Go - v0.2.2-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.2-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) - -## 0.81.0 - -### 💡 Enhancements 💡 - -- `operator`: Create index image to be used as a Catalog. (#1823) - -### 🧰 Bug fixes 🧰 - -- `operator`: Fix `.sampler.type` being incorrectly required for Instrumentation (#1886) -- `receivers`: Skip service port for scraper receivers (#1866) - -### Components - -* [OpenTelemetry Collector - v0.81.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.81.0) -* [OpenTelemetry Contrib - v0.81.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.81.0) -* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.40.0) -* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) -* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) - -## 0.80.0 - -### 💡 Enhancements 💡 - -- `collector`: Add Skywalking parser to extract skywalking service port from config (#1634) -- `target allocator`: Only admit configurations where Target Allocator actually has targets (#1859) -- `target allocator`: Populate credentials for Prometheus CR (service and pod monitor) scrape configs. (#1669) -- `collector`: Adds ability to set init containers for collector (#1684) -- `operator`: Adding more tests to validate existence of init containers. (#1826) -- `operator`: For Apache HTTPD instrumentation, use latest instrumentation library v1.0.3. (#1827) -- `autoinstrumentation/nodejs`: Bump python packages to 1.14.0/0.40.0 (#1790) -- `samplers`: Add ParentBasedJaegerRemote sampler & validate argument (#1801) -- `operator`: Operator-sdk upgrade to v1.29.0 (#1755) - -### 🧰 Bug fixes 🧰 - -- `operator`: Fix for #1820 and #1821 plus added covering unit tests. (#1847) -- `operator`: Fix the upgrade mechanism to not crash when one OTEL Collector instance uses the old approach to set the autoscaler. (#1799) -- `target allocator`: Fix the empty global scrape interval in Prometheus CR watcher, which causes configuration unmarshalling to fail. (#1811) - -### 🚀 New components 🚀 - -- `operator`: Instrumentation crd for Nginx auto-instrumentation. (#1853) - -### Components - -* [OpenTelemetry Collector - v0.80.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.80.0) -* [OpenTelemetry Contrib - v0.80.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.80.0) -* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.40.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.40.0) -* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) -* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) -* [ApacheHTTPD - 1.0.3](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.3) - -## 0.79.0 - -### 💡 Enhancements 💡 - -- `nodejs autoinstrumentation`: Prometheus metric exporter support for nodejs autoinstrumentation (#1798) -- `operator`: Add service version injection (#1670) - Adds the ability to inject the service version into the environment of the instrumented application. -- `operator`: Added readyReplicas field to the status section and added Current,Desired and Image to the get operation. (#1355) - -### 🧰 Bug fixes 🧰 - -- `operator`: The OpenTelemetry Collector version is not shown properly in the status field if no upgrade routines are performed. (#1802) - -### Components - -* [OpenTelemetry Collector - v0.79.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.79.0) -* [OpenTelemetry Contrib - v0.79.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.79.0) -* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.39.1) -* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) -* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) -* [ApacheHTTPD - 1.0.2](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.2) - -## 0.78.0 - -### 💡 Enhancements 💡 - -- `autoinstrumentaiton/nodejs`: Bump js packages to latest versions (#1791) -- `autoinstrumentation/python`: Bump python packages to 1.18.0/0.39b0 (#1790) -- `operator`: Added all webhook instrumentation logic, e2e tests, readme (#1444) -- `Autoscaler`: Support scaling on Pod custom metrics. (#1560) -- `targetallocator`: Set resource requests/limits for TargetAllocator (#1103) -- `operator`: provide default resource limits for go sidecar container (#1732) -- `operator`: Propagate Metadata.Annotations to PodSpec.Annotations (#900) -- `operator`: Improve config validation for prometheus receiver and target allocator (#1581) - -### 🧰 Bug fixes 🧰 - -- `operator`: fixes a previously undocumented behavior that a collector could not override the collector's app name (#1777) -- `operator`: Fix issue where the operator's released image did not correctly set the default go auto-instrumentation version (#1757) -- `pkg/collector, pkg/targetallocator`: fix issues related to prometheus relabel configs when target allocator is enabled (#958, #1622, #1623) - -### Components - -* [OpenTelemetry Collector - v0.78.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.78.0) -* [OpenTelemetry Contrib - v0.78.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.78.0) -* [Java auto-instrumentation - 1.26.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.26.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.39.1](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.39.1) -* [Python - 0.39b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.39b0) -* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) -* [ApacheHTTPD - 1.0.2](https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/tag/webserver%2Fv1.0.2) - -## 0.77.0 - -### 💡 Enhancements 💡 - -- `operator`: Add support for Go auto instrumentation (#1555) -- `operator`: Add liveness probe configs (#760) -- `operator`: set default resource limits for instrumentation init containers (#1407) -- `github actions`: Publish image to dockerhub too (#1708) -- `instrumentation`: Bump Go Instrumentation image from `v0.2.0-alpha` to `v0.2.1-alpha` (#1740) - -### 🧰 Bug fixes 🧰 - -- `operator`: fixes a bug where setting the http_sd_config would crash the configmap replacement. (#1742) -### Components - -* [OpenTelemetry Collector - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.77.0) -* [OpenTelemetry Contrib - v0.77.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.77.0) -* [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) -* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) -* [Go - 0.2.1-alpha](https://github.com/open-telemetry/opentelemetry-go-instrumentation/releases/tag/v0.2.1-alpha) - -## 0.76.1 - -### 💡 Enhancements 💡 - -- `operator`: add support for `lifecycle` hooks and `terminationGracePeriodSeconds` in collector spec. (#1618) -- `autoinstrumentation`: Bump OpenTelemetry .NET Automatic Instrumentation to 0.7.0 (#1672) -- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1682) -- `pkg/instrumentation`: Add dotnet instrumentation capability behind a feature gate which is enabled by default. (#1629) -- `operator`: Add ability to use feature gates in the operator (#1619) -- `autoinstrumentation`: Add metrics exporter to Node.JS autoinstrumentation (#1627) -- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1626) -- `pkg/instrumentation`: Add java instrumentation capability behind a feature gate which is enabled by default. (#1695) -- `pkg/instrumentation`: Add nodejs instrumentation capability behind a feature gate which is enabled by default. (#1697) -- `operator`: Introduces a new feature flag "`operator.collector.rewritetargetallocator`" that allows an operator to add the target_allocator configuration to the collector configuration (#1581) - Note that the ConfigToPromConfig function in pkg/targetallocator/adapters now correctly returns the prometheus receiver config - in accordance with its docstring. It used to erroneously return the actual Prometheus config from a level lower. - -- `pkg/instrumentation`: Add python instrumentation capability behind a feature gate which is enabled by default. (#1696) - -### 🧰 Bug fixes 🧰 - -- `target allocator`: fix updating scrape configs (#1415) - -### Components - -* [OpenTelemetry Collector - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.76.1) -* [OpenTelemetry Contrib - v0.76.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.76.1) -* [Java auto-instrumentation - 1.25.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.25.0) -* [.NET auto-instrumentation - 0.7.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.7.0) -* [Node.JS - 0.38.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.38.0) -* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) - -## 0.75.0 - -### 💡 Enhancements 💡 - -- `operator`: Add ability to use feature gates in the operator (#1619) -- `autoinstrumentation`: Add metrics exporter to Node.JS autoinstrumentation (#1627) -- `autoinstrumentation`: Bump nodejs dependencies to latest versions (#1626) -- `autoinstrumentation`: Bump python dependencies to latest versions (#1640) - -### Components - -* [OpenTelemetry Collector - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.75.0) -* [OpenTelemetry Contrib - v0.75.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.75.0) -* [Java auto-instrumentation - 1.24.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.24.0) -* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) -* [Node.JS - 0.37.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.37.0) -* [Python - 0.38b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.38b0) - -## 0.74.0 - -### Components - -* [OpenTelemetry Collector - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.74.0) -* [OpenTelemetry Contrib - v0.74.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.74.0) -* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) -* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) -* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) - -## 0.73.0 - -### 💡 Enhancements 💡 - -- `target allocator`: Use jsoniter to marshal json (#1336) - -### Components - -* [OpenTelemetry Collector - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.73.0) -* [OpenTelemetry Contrib - v0.73.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.73.0) -* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) -* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) -* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) - - -## 0.72.0 - -### 🛑 Breaking changes 🛑 - -- `operator`: Fixes inability of the operator to reconcile in stateful set mode when the immutable field `volumeClaimTemplates` is changed. If such change is detected, the operator will recreate the stateful set. (#1491) - -### 💡 Enhancements 💡 - -- `operator`: Bump OpenTelemetry .NET Automatic Instrumentation to 0.6.0 (#1538) -- `operator`: Bump Kubernetes golang dependencies to 1.26.x (#1385) -- `operator`: Build operator, target-allocator and opAMP bridge with golang 1.20. (#1566) - -### 🧰 Bug fixes 🧰 - -- `Autoscaler`: Fix the issue where HPA fails to update when an additional metric is added to the spec. (#1439) -- `operator`: The args created for corev1.container object is not ordered and creates a situation where there is a diff detected during reconcile. Forces an ordered args. (#1460) -- `Autoscaler`: Fix the issue where HPA fails to update autoscaler behavior. (#1516) -- `operator`: Set `ServiceInternalTrafficPolicy`` to `Local` when using daemonset mode. (#1401) - -### Components - -* [OpenTelemetry Collector - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.72.0) -* [OpenTelemetry Contrib - v0.72.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.72.0) -* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [.NET auto-instrumentation - 0.6.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.6.0) -* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) -* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) - -0.71.0 ------------------- - -### 🛑 Breaking changes 🛑 - -- `target allocator`: Updates versions of many dependencies, sets defaults for prometheus operator to work. The breaking change introduced is the new RBAC requirement for "endpointslices" in the "discovery.k8s.io" api group. (#1464) - -### 🧰 Bug fixes 🧰 - -- `target allocator`: Properly handle all types of profiles in the pprof endpoint. Previously, some profiles where unavailable, leading to 404 response. (#1478) - -0.70.0 ------------------- -### 💡 Enhancements 💡 - -- `target allocator`: Save the scrape config response in the HTTP server upon relevant config change, instead of building it on every handler call. At the same time, this avoids data race when accessing the scrape configs map. (#1359) -- `target allocator`: Configure `gin` router to be used in release mode and do not use the default logging middleware which is noisy and not formatted properly. (#1352) -- `github action`: This PR adds github action for publishing the `Operator OpAMP Bridge` container image to Github Container Registry. (#1369) -- `operator`: Add `Operator-OpAMP-Bridge` version info to Operator (#1455) - -### 🧰 Bug fixes 🧰 - -- `statsd-receiver`: Switched the protocol of statsd-receiver to UDP from TCP (#1476) - -### Components - -* [OpenTelemetry Collector - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.70.0) -* [OpenTelemetry Contrib - v0.70.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.70.0) -* [Java auto-instrumentation - 1.23.0](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.23.0) -* [.NET auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) -* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) -* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) - -0.69.0 ------------------- -### 🚩 Deprecations 🚩 -* `target allocator`: Replace deprecated `gorilla/mux` dependency with `gin` ([#1383](https://github.com/open-telemetry/opentelemetry-operator/pull/1383), [@matej-g](https://github.com/matej-g)) -### 💡 Enhancements 💡 -* `operator`: CRD defs for Apache HTTPD Autoinstrumentation ([#1305](https://github.com/open-telemetry/opentelemetry-operator/pull/1305), [@chrlic](https://github.com/chrlic)) -* `operator`: Inject otelcol sidecar into any namespace ([#1395](https://github.com/open-telemetry/opentelemetry-operator/pull/1395), [@pavolloffay](https://github.com/pavolloffay)) -* `operator`: Update bridge and allocator dependencies ([#1450](https://github.com/open-telemetry/opentelemetry-operator/pull/1450), [@jaronoff97](https://github.com/jaronoff97)) -* `target allocator`: register pprof endpoints for allocator ([#1408](https://github.com/open-telemetry/opentelemetry-operator/pull/1408), [@seankhliao](https://github.com/seankhliao)) -* `target allocator`: Addtl server unit tests ([#1357](https://github.com/open-telemetry/opentelemetry-operator/pull/1357), [@kristinapathak](https://github.com/kristinapathak)) -* `target-allocator`: Use `gin` in release mode and without default logger middleware ([#1414](https://github.com/open-telemetry/opentelemetry-operator/pull/1414), [@matej-g](https://github.com/matej-g)) -* `operator`: Update README.md document Kubernetes Operator Introduction ([#1440](https://github.com/open-telemetry/opentelemetry-operator/pull/1440), [@fengshunli](https://github.com/fengshunli)) -* `operator`: Update package dependencies ([#1441](https://github.com/open-telemetry/opentelemetry-operator/pull/1441), [@fengshunli](https://github.com/fengshunli)) -### 🧰 Bug fixes 🧰 -* `operator`: Fix daemonset-features E2E test for OpenShift ([#1354](https://github.com/open-telemetry/opentelemetry-operator/pull/1354), [@iblancasa](https://github.com/iblancasa)) -* `operator`: Fix E2E autoscale test for OpenShift ([#1365](https://github.com/open-telemetry/opentelemetry-operator/pull/1365), [@iblancasa](https://github.com/iblancasa)) -* `target allocator`: Fix Target Allocator tests ([#1403](https://github.com/open-telemetry/opentelemetry-operator/pull/1403), [@jaronoff97](https://github.com/jaronoff97)) -### Components -* [OpenTelemetry Collector - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.69.0) -* [OpenTelemetry Contrib - v0.69.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.69.0) -* [Java auto-instrumentation - 1.22.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v1.22.1) -* [.NET auto-instrumentation - 0.5.0](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/tag/v0.5.0) -* [Node.JS - 0.34.0](https://github.com/open-telemetry/opentelemetry-js-contrib/releases/tag/auto-instrumentations-node-v0.34.0) -* [Python - 0.36b0](https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v0.36b0) - -0.68.0 ------------------- -### 🚩 Deprecations 🚩 -* `HPA`: Move maxReplicas and minReplicas to AutoscalerSpec.([#1302](https://github.com/open-telemetry/opentelemetry-operator/pull/1302), [@moh-osman3](https://github.com/moh-osman3)) -### 🚀 New components 🚀 -* `Operator OpAMP Bridge`: Operator OpAMP Bridge Service. ([#1339](https://github.com/open-telemetry/opentelemetry-operator/pull/1339), [@jaronoff97](https://github.com/jaronoff97)) -### 💡 Enhancements 💡 -* `instrumentation/python`: Update default python exporters to use OTLP. ([#1328](https://github.com/open-telemetry/opentelemetry-operator/pull/1328), [@TylerHelmuth](https://github.com/TylerHelmuth)) -* `target-allocator`: Change the github action to match the operator. ([#1347](https://github.com/open-telemetry/opentelemetry-operator/pull/1347), [@jaronoff97](https://github.com/jaronoff97)) -### 🧰 Bug fixes 🧰 -* `operator`: Missing resource from OpenShift Routes prevents them to be deployed in OpenShift clusters.([#1337](https://github.com/open-telemetry/opentelemetry-operator/pull/1337), [@iblancasa](https://github.com/iblancasa)) -* `target allocator`: Refactor the target allocator build to not run it as root. ([#1345](https://github.com/open-telemetry/opentelemetry-operator/pull/1345), [@iblancasa](https://github.com/iblancasa)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.68.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.68.0) -* [OpenTelemetry Contrib - v0.68.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.68.0) - -0.67.0 ------------------- -### 🚀 New components 🚀 -* Support openshift routes ([#1206](https://github.com/open-telemetry/opentelemetry-operator/pull/1206), [@frzifus](https://github.com/frzifus)) -* Add TargetMemoryUtilization metric for AutoScaling ([#1223](https://github.com/open-telemetry/opentelemetry-operator/pull/1223), [@kevinearls](https://github.com/kevinearls)) -### 💡 Enhancements 💡 -* Update the javaagent version to 1.21.0 ([#1324](https://github.com/open-telemetry/opentelemetry-operator/pull/1324)) -* Update default python exporters to use OTLP ([#1328](https://github.com/open-telemetry/opentelemetry-operator/pull/1328), [@TylerHelmuth](https://github.com/TylerHelmuth)) -* Update default Node.JS instrumentation to 0.34.0 ([#1334](https://github.com/open-telemetry/opentelemetry-operator/pull/1334), [@mat-rumian](https://github.com/mat-rumian)) -* Update default Python instrumentation to 0.36b0 ([#1333](https://github.com/open-telemetry/opentelemetry-operator/pull/1333), [@mat-rumian](https://github.com/mat-rumian)) -* [HPA] Move maxReplicas and minReplicas to AutoscalerSpec ([#1333](https://github.com/open-telemetry/opentelemetry-operator/pull/1302), [@moh-osman3](https://github.com/moh-osman3)) -* Memory improvements first pass ([#1293](https://github.com/open-telemetry/opentelemetry-operator/pull/1293), [@jaronoff97](https://github.com/jaronoff97)) -* Add change handler to register callbacks ([#1292](https://github.com/open-telemetry/opentelemetry-operator/pull/1292), [@frzifus](https://github.com/frzifus)) -* Ignore reconcile errors that occur because a pod is being terminated ([#1233](https://github.com/open-telemetry/opentelemetry-operator/pull/1233), [@kevinearls](https://github.com/kevinearls)) -* remove unused onChange function from config ([#1290](https://github.com/open-telemetry/opentelemetry-operator/pull/1290), [@frzifus](https://github.com/frzifus)) -* Remove default claims - fixes #1281 ([#1282](https://github.com/open-telemetry/opentelemetry-operator/pull/1282), [@ekarlso](https://github.com/ekarlso)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.67.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.67.0) -* [OpenTelemetry Contrib - v0.67.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.67.0) - -0.66.0 ------------------- -### 🚀 New components 🚀 -* Add ingressClassName field to collector spec ([#1269](https://github.com/open-telemetry/opentelemetry-operator/pull/1269), [@avadhut123pisal](https://github.com/avadhut123pisal)) -* Add secure ciphersuites for TLS config ([#1244](https://github.com/open-telemetry/opentelemetry-operator/pull/1244), [@kangsheng89](https://github.com/kangsheng89)) -* Add Apache-httpd instrumentation v1.0 (part-1) ([#1236](https://github.com/open-telemetry/opentelemetry-operator/pull/1236), [@chrlic](https://github.com/chrlic)) -### 💡 Enhancements 💡 -* Update the javaagent version to 1.20.2 ([#1212](https://github.com/open-telemetry/opentelemetry-operator/pull/1270)) -* Bump OTel .NET AutoInstrumentation to 0.5.0 ([#1276](https://github.com/open-telemetry/opentelemetry-operator/pull/1276), [@pellared](https://github.com/pellared)) - -### 🧰 Bug fixes 🧰 -* Fix bug found when using relabel-config filterStrategy with serviceMonitors ([#1232](https://github.com/open-telemetry/opentelemetry-operator/pull/1232), [@moh-osman3](https://github.com/moh-osman3)) - -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.66.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.66.0) -* [OpenTelemetry Contrib - v0.66.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.66.0) - -0.64.1 ------------------- -### 🚀 New components 🚀 -* add headless label ([#1088](https://github.com/open-telemetry/opentelemetry-operator/pull/1088), [@kristinapathak](https://github.com/kristinapathak)) -* Add new selector for pod and service monitor ([#1256](https://github.com/open-telemetry/opentelemetry-operator/pull/1256), [@jaronoff97](https://github.com/jaronoff97)) -* [target-allocator] Add a pre-hook to the allocator to filter out dropped targets ([#1127](https://github.com/open-telemetry/opentelemetry-operator/pull/1127), [@moh-osman3](https://github.com/moh-osman3)) -* [target-allocator] create new target package ([#1214](https://github.com/open-telemetry/opentelemetry-operator/pull/1214), [@moh-osman3](https://github.com/moh-osman3)) -### 💡 Enhancements 💡 -* Only create ServiceAccounts if existing ServiceAccount is not specified ([#1246](https://github.com/open-telemetry/opentelemetry-operator/pull/1246), [@csquire](https://github.com/csquire)) -* feat(otel-allocator): use type for AllocationStrategy ([#1220](https://github.com/open-telemetry/opentelemetry-operator/pull/1220), [@secustor](https://github.com/secustor)) -* fix min tls setting for webhook server (#1225) ([#1230](https://github.com/open-telemetry/opentelemetry-operator/pull/1230), [@kangsheng89](https://github.com/kangsheng89)) -* Bump OTel python versions to 1.14.0 and 0.35b0 ([#1227](https://github.com/open-telemetry/opentelemetry-operator/pull/1227), [@vainikkaj](https://github.com/vainikkaj)) -* Trim unnecessary otelcol operator verbs ([#1222](https://github.com/open-telemetry/opentelemetry-operator/pull/1222), [@Allex1](https://github.com/Allex1)) -* decrease autoscaling version detection log verbosity ([#1212](https://github.com/open-telemetry/opentelemetry-operator/pull/1212), [@frzifus](https://github.com/frzifus)) - -### 🧰 Bug fixes 🧰 -* None - -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.64.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.64.1) -* [OpenTelemetry Contrib - v0.64.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.64.0) -* [OpenTelemetry Collector - v0.64.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.64.0) - -0.63.1 ------------------- -### 🚀 New components 🚀 -* None - -### 💡 Enhancements 💡 -* None - -### 🧰 Bug fixes 🧰 -* None - -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.1) -* [OpenTelemetry Contrib - v0.63.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.1) -* [OpenTelemetry Collector - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.63.0) -* [OpenTelemetry Contrib - v0.63.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.63.0) - -0.62.1 ------------------- -### 🚀 New components 🚀 -* Adds support of affinity in collector spec ([#1204](https://github.com/open-telemetry/opentelemetry-operator/pull/1204), [@avadhut123pisal](https://github.com/avadhut123pisal)) - -### 💡 Enhancements 💡 - -* Make logging easier to configure ([#1193](https://github.com/open-telemetry/opentelemetry-operator/pull/1193), [@pavolloffay](https://github.com/pavolloffay)) -* Using immutable labels as service selectors ([#1152](https://github.com/open-telemetry/opentelemetry-operator/pull/1152), [@angelokurtis](https://github.com/angelokurtis)) -* Avoid OOM of the operator ([#1194](https://github.com/open-telemetry/opentelemetry-operator/pull/1194), [@pavolloffay](https://github.com/pavolloffay)) -* Update the javaagent version to 1.19.1 ([#1188](https://github.com/open-telemetry/opentelemetry-operator/pull/1188), [@opentelemetrybot](https://github.com/opentelemetrybot)) -* Bump OTel .NET AutoInstrumentation to 0.4.0-beta.1 ([#1209](https://github.com/open-telemetry/opentelemetry-operator/pull/1209), [@pellared](https://github.com/pellared)) -* Skip .NET auto-instrumentation if OTEL_DOTNET_AUTO_HOME env var is already set ([#1177](https://github.com/open-telemetry/opentelemetry-operator/pull/1177), [@avadhut123pisal](https://github.com/avadhut123pisal)) - -### 🧰 Bug fixes 🧰 -* Fix panic if maxreplicas is set but autoscale is not defined in the CR ([#1201](https://github.com/open-telemetry/opentelemetry-operator/pull/1201), [@kevinearls](https://github.com/kevinearls)) - -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.1) -* [OpenTelemetry Contrib - v0.62.1](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.62.1) -* [OpenTelemetry Collector - v0.62.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.62.0) -* [OpenTelemetry Contrib - v0.62.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.62.0) - - -0.61.0 -------------------- -#### :x: Breaking Changes :x: -* Jaeger receiver no longer supports remote sampling. To be able to perform an update, it must be deactivated or replaced by a configuration of the [jaegerremotesampling](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.61.0/extension/jaegerremotesampling) extension. It is **important** that the `jaegerremotesampling` extension and the `jaegerreceiver` do not use the same port. To increase the collector version afterwards, the update must be triggered again by restarting the operator. Alternatively, the `OpenTelemetryCollector` CRD can be re-created. ([otel-contrib#14707](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707)) -### 🚀 New components 🚀 -* [HPA] Add targetCPUUtilization field to collector config ([#1066](https://github.com/open-telemetry/opentelemetry-operator/pull/1066), [@moh-osman3](https://github.com/moh-osman3)) -* Extend otelcol crd with minimalistic ingress options ([#1128](https://github.com/open-telemetry/opentelemetry-operator/pull/1128), [@frzifus](https://github.com/frzifus)) -* Reconcile otel collector on given context ([#1144](https://github.com/open-telemetry/opentelemetry-operator/pull/1144), [@frzifus](https://github.com/frzifus)) -* Expose container ports on the collector pod ([#1070](https://github.com/open-telemetry/opentelemetry-operator/pull/1070), [@kristinapathak](https://github.com/kristinapathak)) -* Add scrape configs endpoint ([#1124](https://github.com/open-telemetry/opentelemetry-operator/pull/1124), [@jaronoff97](https://github.com/jaronoff97)) -* Add local arm build ([#1157](https://github.com/open-telemetry/opentelemetry-operator/pull/1157), [@Efrat19](https://github.com/Efrat19)) -* [HPA] Add targetCPUUtilization field to collector config ([#1066](https://github.com/open-telemetry/opentelemetry-operator/pull/1066), [@moh-osman3](https://github.com/moh-osman3)) -### 💡 Enhancements 💡 -* Validate all env. vars. before starting injecting env. vars ([#1141](https://github.com/open-telemetry/opentelemetry-operator/pull/1141), [@avadhut123pisal](https://github.com/avadhut123pisal)) -* Update routine for migration of jaeger remote sampling in version 0.61.0 ([#1116](https://github.com/open-telemetry/opentelemetry-operator/pull/1116), [@frzifus](https://github.com/frzifus)) -* Allow version before 0.52 to upgrade ([#1126](https://github.com/open-telemetry/opentelemetry-operator/pull/1126), [@pureklkl](https://github.com/pureklkl)) -* Set OTEL_METRICS_EXPORTER to none to prevent using the default value ([#1149](https://github.com/open-telemetry/opentelemetry-operator/pull/1149), [@aabmass](https://github.com/aabmass)) -* Change app image and context propagator b3 to b3multi in .Net e2e test case ([#1151](https://github.com/open-telemetry/opentelemetry-operator/pull/1151), [@avadhut123pisal](https://github.com/avadhut123pisal)) -* Adds deepcopy missing implementation for TargetCPUUtilization field of AutoscalerSpec ([#1138](https://github.com/open-telemetry/opentelemetry-operator/pull/1138), [@avadhut123pisal](https://github.com/avadhut123pisal)) -* Bump default python image version ([#1150](https://github.com/open-telemetry/opentelemetry-operator/pull/1150), [@aabmass](https://github.com/aabmass)) -* Bump OTel python versions to 1.13.0 and 0.34b0 ([#1147](https://github.com/open-telemetry/opentelemetry-operator/pull/1147), [@aabmass](https://github.com/aabmass) -* Change error logs to info for building container ([#1146](https://github.com/open-telemetry/opentelemetry-operator/pull/1146), [@kristinapathak](https://github.com/kristinapathak)) -* Add missing nil checks in collector validating webhook ([#1136](https://github.com/open-telemetry/opentelemetry-operator/pull/1136), [@kristinapathak](https://github.com/kristinapathak)) -* Fix lint issues in target allocator ([#1090](https://github.com/open-telemetry/opentelemetry-operator/pull/1090), [@kristinapathak](https://github.com/kristinapathak)) -### 🧰 Bug fixes 🧰 -* Fix generated deepcopy file changes check ([#1154](https://github.com/open-telemetry/opentelemetry-operator/pull/1154), [@pavolloffay](https://github.com/pavolloffay)) -* Fix Target Allocator builds by using versions.txt ([#1140](https://github.com/open-telemetry/opentelemetry-operator/pull/1140), [@jaronoff97](https://github.com/jaronoff97)) -* Add missing entry to 0.60.0 changelog ([#1102](https://github.com/open-telemetry/opentelemetry-operator/pull/1102), [@pavolloffay](https://github.com/pavolloffay)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.61.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.61.0) -* [OpenTelemetry Contrib - v0.61.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.61.0) - -0.60.0 -------------------- -### 🚀 New components 🚀 -* .NET - enable bytecode instrumentation ([#1081](https://github.com/open-telemetry/opentelemetry-operator/pull/1081), [@Kielek](https://github.com/Kielek)) -* Added consistent hashing strategy for target allocation ([#1087](https://github.com/open-telemetry/opentelemetry-operator/pull/1087), [@jaronoff97](https://github.com/jaronoff97)) -* Introduce ability to specify strategies for target allocation ([#1079](https://github.com/open-telemetry/opentelemetry-operator/pull/1079), [@jaronoff97](https://github.com/jaronoff97)) -### 💡 Enhancements 💡 -* Expose Horizontal Pod Autoscaler Behavior and add hpa scaledown test ([#1077](https://github.com/open-telemetry/opentelemetry-operator/pull/1077), [@kevinearls](https://github.com/kevinearls)) -* Utilize .NET AutoInstrumentation docker image v.0.3.1-beta.1 ([#1091](https://github.com/open-telemetry/opentelemetry-operator/pull/1091), [@Kielek](https://github.com/Kielek)) -* Update the javaagent version to 1.18.0 ([#1096](https://github.com/open-telemetry/opentelemetry-operator/pull/1096), [@opentelemetrybot](https://github.com/opentelemetrybot)) -* Update GetAllTargetsByCollectorAndJob to use TargetItem hash ([#1086](https://github.com/open-telemetry/opentelemetry-operator/pull/1086), [@kelseyma](https://github.com/kelseyma)) -* Upgrade kind images and add testing for Kubernetes 1.25 ([#1078](https://github.com/open-telemetry/opentelemetry-operator/pull/1078), [@iblancasa](https://github.com/iblancasa)) -* Bump .NET OTel AutoInstrumentation to 0.3.1-beta.1 ([#1085](https://github.com/open-telemetry/opentelemetry-operator/pull/1085), [@Kielek](https://github.com/Kielek)) -* Make sure we return the right version when autoscaling v2 is found ([#1075](https://github.com/open-telemetry/opentelemetry-operator/pull/1075), [@kevinearls](https://github.com/kevinearls)) -* Add retry loop for client.get of replicaset as that sometimes fails ([#1072](https://github.com/open-telemetry/opentelemetry-operator/pull/1072), [@kevinearls](https://github.com/kevinearls)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.60.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.60.0) -* [OpenTelemetry Contrib - v0.60.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.60.0) - - -0.59.0 -------------------- -### 💡 Enhancements 💡 -* Change log message to V(2), be sure to pass strings so it doesn't panic ([#1069](https://github.com/open-telemetry/opentelemetry-operator/pull/1069), [@kevinearls](https://github.com/kevinearls)) -* Use golang 1.19 ([#1021](https://github.com/open-telemetry/opentelemetry-operator/pull/1021), [@pavolloffay](https://github.com/pavolloffay)) -* Bump k8s API to 0.25.0 ([#1067](https://github.com/open-telemetry/opentelemetry-operator/pull/1067), [@pavolloffay](https://github.com/pavolloffay)) -* Bump python auto instrumentation version to 1.12&0.33b0 ([#1063](https://github.com/open-telemetry/opentelemetry-operator/pull/1063), [@srikanthccv](https://github.com/srikanthccv)) -* Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 - adjustment ([#1056](https://github.com/open-telemetry/opentelemetry-operator/pull/1056), [@Kielek](https://github.com/Kielek)) -* Bump .NET OTel AutoInstrumentation to 0.3.0-beta.1 ([#1057](https://github.com/open-telemetry/opentelemetry-operator/pull/1057), [@Kielek](https://github.com/Kielek)) -* Upgrade operator-sdk to 1.23.0 ([#1055](https://github.com/open-telemetry/opentelemetry-operator/pull/1055), [@iblancasa](https://github.com/iblancasa)) -### 🧰 Bug fixes 🧰 -* adds dotnet-auto-instrumentation image version env variable to the operator publish workflow ([#1060](https://github.com/open-telemetry/opentelemetry-operator/pull/1060), [@avadhut123pisal](https://github.com/avadhut123pisal)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.59.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.59.0) -* [OpenTelemetry Contrib - v0.59.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.59.0) - -0.58.0 -------------------- -### 🧰 Bug fixes 🧰 -* Fix unnecessary and incorrect reallocation ([#1041](https://github.com/open-telemetry/opentelemetry-operator/pull/1041), [@jaronoff97](https://github.com/jaronoff97)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.58.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.58.0) -* [OpenTelemetry Contrib - v0.58.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.58.0) - -0.57.2 -------------------- -### 🚀 New components 🚀 -* Support .NET auto-instrumentation ([#976](https://github.com/open-telemetry/opentelemetry-operator/pull/976), [@avadhut123pisal](https://github.com/avadhut123pisal)) -* Enable instrumentation injecting only core SDK config ([#1000](https://github.com/open-telemetry/opentelemetry-operator/pull/1000), [@bilbof](https://github.com/bilbof)) -* Instrument TA with prometheus ([#1030](https://github.com/open-telemetry/opentelemetry-operator/pull/1030), [@jaronoff97](https://github.com/jaronoff97)) -### 💡 Enhancements 💡 -* Protect allocator maps behind mutex, create getter funcs for them ([#1040](https://github.com/open-telemetry/opentelemetry-operator/pull/1040), [@kristinapathak](https://github.com/kristinapathak)) -* Simultaneously support versions v2 and v2beta2 of Autoscaling ([#1014](https://github.com/open-telemetry/opentelemetry-operator/pull/1014), [@kevinearls](https://github.com/kevinearls)) -* Update the target allocator on any manifest change ([#1027](https://github.com/open-telemetry/opentelemetry-operator/pull/1027), [@jaronoff97](https://github.com/jaronoff97)) -* chore(nodejs): update versions.txt to 0.31.0 ([#1015](https://github.com/open-telemetry/opentelemetry-operator/pull/1015), [@mat-rumian](https://github.com/mat-rumian)) -* chore(nodejs): update to 0.31.0 ([#955](https://github.com/open-telemetry/opentelemetry-operator/pull/955), [@mat-rumian](https://github.com/mat-rumian)) -* chore(operator): update python inst to 0.32b0 ([#1012](https://github.com/open-telemetry/opentelemetry-operator/pull/1012), [@ianmcnally](https://github.com/ianmcnally)) -* Sort order of ports returned to fix flaky tests ([#1003](https://github.com/open-telemetry/opentelemetry-operator/pull/1003), [@kevinearls](https://github.com/kevinearls)) -### 🧰 Bug fixes 🧰 -* Resolve bug where TA doesn't allocate all targets ([#1039](https://github.com/open-telemetry/opentelemetry-operator/pull/1039), [@jaronoff97](https://github.com/jaronoff97)) -* Fix the issue that target-level metadata labels were missing (#948) ([#949](https://github.com/open-telemetry/opentelemetry-operator/pull/949), [@CoderPoet](https://github.com/CoderPoet)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.57.2](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.57.2) -* [OpenTelemetry Contrib - v0.57.2](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.57.2) - -0.56.0 -------------------- -### 💡 Enhancements 💡 -* Upgrade operator-sdk ([#982](https://github.com/open-telemetry/opentelemetry-operator/pull/982), [@yuriolisa](https://github.com/yuriolisa)) -* build and push dotnet-auto-instrumentation image ([#989](https://github.com/open-telemetry/opentelemetry-operator/pull/989), [@avadhut123pisal](https://github.com/avadhut123pisal) -* Change Horizontal Pod Autoscaler to scale on OpenTelemetry Collector … ([#984](https://github.com/open-telemetry/opentelemetry-operator/pull/984), [@kevinearls](https://github.com/kevinearls)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.56.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.56.0) -* [OpenTelemetry Contrib - v0.56.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.56.0) - -0.55.0 -------------------- -### 🧰 Bug fixes 🧰 -* Fixing monitor configuration ([#966](https://github.com/open-telemetry/opentelemetry-operator/pull/966), [@yuriolisa](https://github.com/yuriolisa)) -* Fix Pod Mutation loop ([#953](https://github.com/open-telemetry/opentelemetry-operator/pull/953), [@mat-rumian](https://github.com/mat-rumian)) -* Fix the issue that the number of target-allocator replicas ([#951](https://github.com/open-telemetry/opentelemetry-operator/pull/951), [@CoderPoet](https://github.com/CoderPoet)) -### 💡 Enhancements 💡 -* Update Python auto-instrumentation 0.32b0 ([#961](https://github.com/open-telemetry/opentelemetry-operator/pull/961), [@mat-rumian](https://github.com/mat-rumian)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.55.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.55.0) -* [OpenTelemetry Contrib - v0.55.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.55.0) - -0.54.0 -------------------- -### 🧰 Bug fixes 🧰 -* Fix parameter encoding issue ([#930](https://github.com/open-telemetry/opentelemetry-operator/pull/930), [@jaronoff97](https://github.com/jaronoff97)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.54.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.54.0) -* [OpenTelemetry Contrib - v0.54.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.54.0) - -0.53.0 -------------------- -### 💡 Enhancements 💡 -* Print TA pod logs in e2e smoke test ([#920](https://github.com/open-telemetry/opentelemetry-operator/pull/920), [@pavolloffay](https://github.com/pavolloffay)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.53.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.53.0) -* [OpenTelemetry Contrib - v0.53.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.53.0) - -0.52.0 -------------------- -### 🚀 New components 🚀 -* Add creation of ServiceAccount to the Target Allocator ([#836](https://github.com/open-telemetry/opentelemetry-operator/pull/836), [@jaronoff97](https://github.com/jaronoff97)) -* Cross namespace instrumentation ([#889](https://github.com/open-telemetry/opentelemetry-operator/pull/889), [@tKe](https://github.com/tKe)) -* Added extra cli flag webhook-port ([#899](https://github.com/open-telemetry/opentelemetry-operator/pull/899), [@abelperezok](https://github.com/abelperezok)) -### 💡 Enhancements 💡 -* Add cert manager 1.8.0 ([#905](https://github.com/open-telemetry/opentelemetry-operator/pull/905), [@yuriolisa](https://github.com/yuriolisa)) -* updated module name and imports ([#910](https://github.com/open-telemetry/opentelemetry-operator/pull/910), [@evanli02](https://github.com/evanli02)) -### 🧰 Bug fixes 🧰 -* Fix docker multiarch build for operator ([#882](https://github.com/open-telemetry/opentelemetry-operator/pull/882), [@pavolloffay](https://github.com/pavolloffay)) -* avoid non static labels in workload objects selector ([#849](https://github.com/open-telemetry/opentelemetry-operator/pull/849), [@DWonMtl](https://github.com/DWonMtl)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.52.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.52.0) -* [OpenTelemetry Contrib - v0.52.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.52.0) - -0.51.0 -------------------- -### 🚀 New components 🚀 -* Choose target container injection with annotation ([#689](https://github.com/open-telemetry/opentelemetry-operator/pull/689), [@fscellos](https://github.com/fscellos)) -* Fix K8s attributes values in OTEL_RESOURCE_ATTRIBUTES env var ([#864](https://github.com/open-telemetry/opentelemetry-operator/pull/864), [@mat-rumian](https://github.com/mat-rumian)) -### 💡 Enhancements 💡 -* Update Python auto-instrumentation versions.txt ([#867](https://github.com/open-telemetry/opentelemetry-operator/pull/867), [@mat-rumian](https://github.com/mat-rumian)) -* Update Python instrumentation to 0.30b1 ([#860](https://github.com/open-telemetry/opentelemetry-operator/pull/860), [@mat-rumian](https://github.com/mat-rumian)) -* Fix changelog formatting ([#863](https://github.com/open-telemetry/opentelemetry-operator/pull/863), [@pavolloffay](https://github.com/pavolloffay)) -### 🧰 Bug fixes 🧰 -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.51.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.51.0) -* [OpenTelemetry Contrib - v0.51.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.51.0) - -0.50.0 -------------------- -### 🚀 New components 🚀 -* Add resource attributes to collector sidecar ([#832](https://github.com/open-telemetry/opentelemetry-operator/pull/832), [@rubenvp8510](https://github.com/rubenvp8510)) -* Create serving certs for headless services on OpenShift (#818) ([#824](https://github.com/open-telemetry/opentelemetry-operator/pull/824), [@rkukura](https://github.com/rkukura)) -* [targetallocator] PrometheusOperator CRD MVC ([#653](https://github.com/open-telemetry/opentelemetry-operator/pull/653), [@secustor](https://github.com/secustor)) -### 💡 Enhancements 💡 -* Set replicas to MaxReplicas if HPA is enabled ([#833](https://github.com/open-telemetry/opentelemetry-operator/pull/833), [@binjip978](https://github.com/binjip978)) -* Update sidecar example in README ([#837](https://github.com/open-telemetry/opentelemetry-operator/pull/837), [@erichsueh3](https://github.com/erichsueh3)) -### 🧰 Bug fixes 🧰 -* Fix Default Image Annotations ([#842](https://github.com/open-telemetry/opentelemetry-operator/pull/842), [@goatsthatcode](https://github.com/goatsthatcode)) -* Do not block pod creating on internal error in webhook ([#811](https://github.com/open-telemetry/opentelemetry-operator/pull/811), [@pavolloffay](https://github.com/pavolloffay)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.50.0) -* [OpenTelemetry Contrib - v0.50.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.50.0) - -0.49.0 -------------------- -### 🚀 New components 🚀 -* Including new label ([#797](https://github.com/open-telemetry/opentelemetry-operator/pull/797), [@yuriolisa](https://github.com/yuriolisa)) -* Add scale subresource status to the OpenTelemetryCollector CRD status ([#785](https://github.com/open-telemetry/opentelemetry-operator/pull/785), [@secat](https://github.com/secat)) -### 💡 Enhancements 💡 -* Set replicas to default value ([#814](https://github.com/open-telemetry/opentelemetry-operator/pull/814), [@pavolloffay](https://github.com/pavolloffay)) -* Use golang 1.18 ([#786](https://github.com/open-telemetry/opentelemetry-operator/pull/786), [@pavolloffay](https://github.com/pavolloffay)) -* Support nodeSelector field for non-sidecar collectors ([#789](https://github.com/open-telemetry/opentelemetry-operator/pull/789), [@jutley](https://github.com/jutley)) -* Fix Missing parameter on labels function ([#809](https://github.com/open-telemetry/opentelemetry-operator/pull/809), [@yuriolisa](https://github.com/yuriolisa)) -### 🧰 Bug fixes 🧰 -* Check exposed svc ports ([#778](https://github.com/open-telemetry/opentelemetry-operator/pull/778), [@yuriolisa](https://github.com/yuriolisa)) -* Fix panic when spec.replicas is nil ([#798](https://github.com/open-telemetry/opentelemetry-operator/pull/798), [@wei840222](https://github.com/wei840222)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.49.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.49.0) -* [OpenTelemetry Contrib - v0.49.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.49.0) - -0.48.0 -------------------- -* Bumped OpenTelemetry Collector to v0.48.0 -* Filter out unneeded labels ([#606](https://github.com/open-telemetry/opentelemetry-operator/pull/606), [@ekarlso](https://github.com/ekarlso)) -* add labels in order to make selectors unique ([#796](https://github.com/open-telemetry/opentelemetry-operator/pull/796), [@davidkarlsen](https://github.com/davidkarlsen)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.48.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.48.0) -* [OpenTelemetry Contrib - v0.48.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.48.0) - -0.47.0 -------------------- -* Bumped OpenTelemetry Collector to v0.47.0 -* doc: customized auto-instrumentation ([#762](https://github.com/open-telemetry/opentelemetry-operator/pull/762), [@cuichenli](https://github.com/cuichenli)) -* Remove v prefix from the container image version/tag ([#771](https://github.com/open-telemetry/opentelemetry-operator/pull/771), [@pavolloffay](https://github.com/pavolloffay)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.47.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.47.0) -* [OpenTelemetry Contrib - v0.47.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.47.0) - -0.46.0 -------------------- -* Bumped OpenTelemetry Collector to v0.46.0 -* add autoscale option to enable support for Horizontal Pod Autoscaling ([#746](https://github.com/open-telemetry/opentelemetry-operator/pull/746), [@binjip978](https://github.com/binjip978)) -* chore(nodejs): bump auto-instrumentations ([#763](https://github.com/open-telemetry/opentelemetry-operator/pull/763), [@mat-rumian](https://github.com/mat-rumian)) -* Make operator more resiliant to etcd defrag activity ([#742](https://github.com/open-telemetry/opentelemetry-operator/pull/742), [@pavolloffay](https://github.com/pavolloffay)) -#### OpenTelemetry Collector and Contrib -* [OpenTelemetry Collector - v0.46.0](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.46.0) -* [OpenTelemetry Contrib - v0.46.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.46.0) - -0.45.0 -------------------- -* Bumped OpenTelemetry Collector to v0.45.0 -* Match pod `dnsPolicy` to `hostNetwork` config ([#691](https://github.com/open-telemetry/opentelemetry-operator/pull/691), [@gai6948](https://github.com/gai6948)) -* Change container image USER to UID ([#738](https://github.com/open-telemetry/opentelemetry-operator/pull/738), [@kraman](https://github.com/kraman)) -* Use OTEL collector image from GHCR ([#732](https://github.com/open-telemetry/opentelemetry-operator/pull/732), [@pavolloffay](https://github.com/pavolloffay)) - -0.44.0 -------------------- -* Bumped OpenTelemetry Collector to v0.44.0 -* Deprecate otelcol status messages ([#733](https://github.com/open-telemetry/opentelemetry-operator/pull/733), [@pavolloffay](https://github.com/pavolloffay)) -* Make sure correct version of operator-sdk is always used ([#728](https://github.com/open-telemetry/opentelemetry-operator/pull/728), [@pavolloffay](https://github.com/pavolloffay)) -* Storing upgrade status into events ([#707](https://github.com/open-telemetry/opentelemetry-operator/pull/707), [@yuriolisa](https://github.com/yuriolisa)) -* Bump default java auto-instrumentation version to `1.11.1` ([#731](https://github.com/open-telemetry/opentelemetry-operator/pull/731), [@pavolloffay](https://github.com/pavolloffay)) -* Add status fields for instrumentation kind ([#717](https://github.com/open-telemetry/opentelemetry-operator/pull/717), [@frzifus](https://github.com/frzifus)) -* Add appProtocol for otlp and jaeger receiver parsers ([#704](https://github.com/open-telemetry/opentelemetry-operator/pull/704), [@binjip978](https://github.com/binjip978)) -* Add SPLUNK_ env prefix support to Instrumentation kind ([#709](https://github.com/open-telemetry/opentelemetry-operator/pull/709), [@elvis-cai](https://github.com/elvis-cai)) -* Fix logger in instrumentation webhook ([#698](https://github.com/open-telemetry/opentelemetry-operator/pull/698), [@pavolloffay](https://github.com/pavolloffay)) - -0.43.0 -------------------- -* Bumped OpenTelemetry Collector to v0.43.0 -* Upgrade to 0.43.0 will move the metrics CLI arguments into the config, in response to ([#680](https://github.com/open-telemetry/opentelemetry-operator/pull/680), [@yuriolisa](https://github.com/yuriolisa)) -* Add unique label and selector for operator objects ([#697](https://github.com/open-telemetry/opentelemetry-operator/pull/697), [@pavolloffay](https://github.com/pavolloffay)) -* Bump operator-sdk to 1.17 ([#692](https://github.com/open-telemetry/opentelemetry-operator/pull/692), [@pavolloffay](https://github.com/pavolloffay)) -* Update java instrumentation to 1.10.1 ([#688](https://github.com/open-telemetry/opentelemetry-operator/pull/688), [@anuraaga](https://github.com/anuraaga)) -* Update nodejs instrumentation to 0.27.0 ([#687](https://github.com/open-telemetry/opentelemetry-operator/pull/687), [@anuraaga](https://github.com/anuraaga)) -* Update python instrumentation to 0.28b1 ([#686](https://github.com/open-telemetry/opentelemetry-operator/pull/686), [@anuraaga](https://github.com/anuraaga)) -* Add b3, jaeger, ottrace propagators to python instrumentation ([#684](https://github.com/open-telemetry/opentelemetry-operator/pull/684), [@anuraaga](https://github.com/anuraaga)) -* Add env support to instrumentation kind ([#674](https://github.com/open-telemetry/opentelemetry-operator/pull/674), [@Duncan-tree-zhou](https://github.com/Duncan-tree-zhou)) -* Fix collector config update ([#670](https://github.com/open-telemetry/opentelemetry-operator/pull/670), [@mcariapas](https://github.com/mcariapas)) - -0.42.0 -------------------- -* Bumped OpenTelemetry Collector to v0.42.0 -* Parse flags before using them in config ([#662](https://github.com/open-telemetry/opentelemetry-operator/pull/662), [@rubenvp8510](https://github.com/rubenvp8510)) -* Fix port derivation ([#651](https://github.com/open-telemetry/opentelemetry-operator/pull/651), [@yuriolisa](https://github.com/yuriolisa)) -* Remove publishing operator image to quay.io ([#661](https://github.com/open-telemetry/opentelemetry-operator/pull/661), [@pavolloffay](https://github.com/pavolloffay)) -* Use target allocator from GHCR ([#660](https://github.com/open-telemetry/opentelemetry-operator/pull/660), [@pavolloffay](https://github.com/pavolloffay)) - -0.41.1 -------------------- -* Add support for nodejs and python image defaulting and upgrade ([#607](https://github.com/open-telemetry/opentelemetry-operator/pull/607), [@pavolloffay](https://github.com/pavolloffay)) -* Bugfix for `kubeletstats` receiver operator is exposing the service port, ignore port exposition as it is a scraper ([#558](https://github.com/open-telemetry/opentelemetry-operator/pull/558), [@mritunjaysharma394](https://github.com/mritunjaysharma394)) - -0.41.0 -------------------- -* Bumped OpenTelemetry Collector to v0.41.0 -* Support `OpenTelemetryCollector.Spec.UpgradeStrategy` with allowable values: automatic, none ([#620](https://github.com/open-telemetry/opentelemetry-operator/pull/620), [@adriankostrubiak-tomtom](https://github.com/adriankostrubiak-tomtom)) -* Limit names and labels to 63 characters ([#609](https://github.com/open-telemetry/opentelemetry-operator/pull/609), [@mmatache](https://github.com/mmatache)) -* Support `healthz` and `readyz` probes to controller manager ([#603](https://github.com/open-telemetry/opentelemetry-operator/pull/603), [@adriankostrubiak-tomtom](https://github.com/adriankostrubiak-tomtom)) - - -0.40.0 -------------------- -* Bumped OpenTelemetry Collector to v0.40.0 -* Support K8s liveness probe to otel collector, if health_check extension is defined in otel collector config ([#574](https://github.com/open-telemetry/opentelemetry-operator/pull/574)) - -0.39.0 -------------------- -* Bumped OpenTelemetry Collector to v0.39.0 -* Upgrade path for Instrumentation kind ([#548](https://github.com/open-telemetry/opentelemetry-operator/pull/548)) -* Auto-instrumentation support for python ([#532](https://github.com/open-telemetry/opentelemetry-operator/pull/532)) -* Support for `PodSecurityContext` in OpenTelemetry collector ([#469](https://github.com/open-telemetry/opentelemetry-operator/pull/469)) -* Java auto-instrumentation support is bumped to `1.7.2` ([#549](https://github.com/open-telemetry/opentelemetry-operator/pull/549)) -* Auto-instrumentation support for nodejs ([#507](https://github.com/open-telemetry/opentelemetry-operator/pull/507)) -* Sampler configuration support in instrumentation kind ([#514](https://github.com/open-telemetry/opentelemetry-operator/pull/514)) - -0.38.0 -------------------- -* Bumped OpenTelemetry Collector to v0.38.0 -* Initial support for auto-instrumentation at the moment supported only for Java ([#464](https://github.com/open-telemetry/opentelemetry-operator/pull/464), [@pavolloffay](https://github.com/pavolloffay)) - -0.37.1 -------------------- -* Bumped OpenTelemetry Collector to v0.37.1 - -0.37.0 -------------------- -* Bumped OpenTelemetry Collector to v0.37.0 - -0.36.0 -------------------- -* Bumped OpenTelemetry Collector to v0.36.0 -* Add `envFrom` to collector spec ([#419](https://github.com/open-telemetry/opentelemetry-operator/pull/419), [@ctison](https://github.com/ctison)) -* Allow changing Pod annotations using `podAnnotations` ([#451](https://github.com/open-telemetry/opentelemetry-operator/pull/451), [@indrekj](https://github.com/indrekj)) - -0.35.0 -------------------- -* Bumped OpenTelemetry Collector to v0.35.0 -* Target Allocator implementation (Part 3 - OTEL Operator Enhancements) ([#389](https://github.com/open-telemetry/opentelemetry-operator/pull/389), [@Raul9595](https://github.com/Raul9595)) -* Target Allocator implementation (Part 2 - OTEL Operator Enhancements) ([#354](https://github.com/open-telemetry/opentelemetry-operator/pull/354), [@alexperez52](https://github.com/alexperez52)) - -0.34.0 -------------------- -* Bumped OpenTelemetry Collector to v0.34.0 -* Add AWS xray receiver ([#421](https://github.com/open-telemetry/opentelemetry-operator/pull/421), [@VineethReddy02](https://github.com/VineethReddy02)) -* Add syslog, tcplog and udplog receivers ([#425](https://github.com/open-telemetry/opentelemetry-operator/pull/425), [@VineethReddy02](https://github.com/VineethReddy02)) -* Add splunk hec receiver ([#422](https://github.com/open-telemetry/opentelemetry-operator/pull/422), [@VineethReddy02](https://github.com/VineethReddy02)) -* Add influxdb receiver ([#423](https://github.com/open-telemetry/opentelemetry-operator/pull/423), [@VineethReddy02](https://github.com/VineethReddy02)) -* Added imagePullPolicy option to CRD ([#413](https://github.com/open-telemetry/opentelemetry-operator/pull/413), [@mmatache](https://github.com/mmatache)) - -0.33.0 (2021-08-20) -------------------- -* Bumped OpenTelemetry Collector to v0.33.0 -* Add statsd receiver ([#364](https://github.com/open-telemetry/opentelemetry-operator/pull/364), [@VineethReddy02](https://github.com/VineethReddy02)) -* Allow running daemonset in hostNetwork mode ([#393](https://github.com/open-telemetry/opentelemetry-operator/pull/393), [@owais](https://github.com/owais)) -* Target Allocator implementation (Part 1 - OTEL Operator Enhancements) ([#351](https://github.com/open-telemetry/opentelemetry-operator/pull/351), [@]()) -* Change the default port for OTLP HTTP ([#373](https://github.com/open-telemetry/opentelemetry-operator/pull/373), [@joaopgrassi](https://github.com/joaopgrassi)) -* Add Kubernetes 1.22 to the test matrix ([#382](https://github.com/open-telemetry/opentelemetry-operator/pull/382), [@jpkrohling](https://github.com/jpkrohling)) -* Add `protocol: TCP` value under `ports` key to avoid the known limitation for Kubernetes 1.19 ([#372](https://github.com/open-telemetry/opentelemetry-operator/pull/372), [@Saber-W](https://github.com/Saber-W)) -* Add fluentforward receiver ([#367](https://github.com/open-telemetry/opentelemetry-operator/pull/367), [@VineethReddy02](https://github.com/VineethReddy02)) - -0.32.0 -------------------- -* We skipped this release. - -0.31.0 (2021-07-29) -------------------- -* Bumped OpenTelemetry Collector to v0.31.0 - -0.30.0 (2021-07-15) -------------------- -* Bumped OpenTelemetry Collector to v0.30.0 -* Container Security Context ([#332](https://github.com/open-telemetry/opentelemetry-operator/pull/332), [@owais](https://github.com/owais)) - -0.29.0 (2021-06-25) -------------------- -* Bumped OpenTelemetry Collector to v0.29.0 -* Add delete webhook ([#313](https://github.com/open-telemetry/opentelemetry-operator/pull/313), [@VineethReddy02](https://github.com/VineethReddy02)) - -0.28.0 (2021-06-12) -------------------- -* Bumped OpenTelemetry Collector to v0.28.0 -* Tolerations support in OpenTelemetryCollector CRD ([#302](https://github.com/open-telemetry/opentelemetry-operator/pull/302), [@VineethReddy02](https://github.com/VineethReddy02)) -* Copy desired service ports when reconciling ([#299](https://github.com/open-telemetry/opentelemetry-operator/pull/299), [@thib92](https://github.com/thib92)) -* Remove the OTLP receiver legacy gRPC port(55680) references ([#293](https://github.com/open-telemetry/opentelemetry-operator/pull/293), [@mxiamxia](https://github.com/mxiamxia)) - -0.27.0 (2021-05-20) -------------------- -* Bumped OpenTelemetry Collector to v0.27.0 - -0.26.0 (2021-05-12) -------------------- -* Bumped OpenTelemetry Collector to v0.26.0 - -0.25.0 (2021-05-06) -------------------- -* Bumped OpenTelemetry Collector to v0.25.0 - -0.24.0 (2021-04-20) -------------------- -* Bumped OpenTelemetry Collector to v0.24.0 ([#251](https://github.com/open-telemetry/opentelemetry-operator/pull/251), [@jnodorp-jaconi](https://github.com/jnodorp-jaconi)) -* Allow resource configuration on collector spec ([#248](https://github.com/open-telemetry/opentelemetry-operator/pull/248), [@jnodorp-jaconi](https://github.com/jnodorp-jaconi)) - -0.23.0 (2021-04-04) -------------------- -* Bumped OpenTelemetry Collector to v0.23.0 - -0.22.0 (2021-03-11) -------------------- -* Bumped OpenTelemetry Collector to v0.22.0 - -0.21.0 (2021-03-09) -------------------- -* Bumped OpenTelemetry Collector to v0.21.0 -* Restart collector pod when config is updated ([#215](https://github.com/open-telemetry/opentelemetry-operator/pull/215), [@bhiravabhatla](https://github.com/bhiravabhatla)) -* Add permissions for opentelemetry finalizer resource ([#212](https://github.com/open-telemetry/opentelemetry-operator/pull/212), [@rubenvp8510](https://github.com/rubenvp8510)) -* fix: collector selection should not fail if there is a single sidecar ([#210](https://github.com/open-telemetry/opentelemetry-operator/pull/210), [@vbehar](https://github.com/vbehar)) - -0.20.0 (2021-02-11) -------------------- -* Bumped OpenTelemetry Collector to v0.20.0 -* Add correct boundary to integer parsing ([#187](https://github.com/open-telemetry/opentelemetry-operator/pull/187), [@jpkrohling](https://github.com/jpkrohling)) - -0.19.0 (2021-01-27) -------------------- -* Bumped OpenTelemetry Collector to v0.19.0 - - -0.18.1 (2021-01-25) -------------------- -* Fixed testing image from being used in non-test artifacts (fixes #170) ([#171](https://github.com/open-telemetry/opentelemetry-operator/pull/171), [@gramidt](https://github.com/gramidt)) - - -0.18.0 (2021-01-22) -------------------- -* Bumped OpenTelemetry Collector to v0.18.0 ([#169](https://github.com/open-telemetry/opentelemetry-operator/pull/169), [@jpkrohling](https://github.com/jpkrohling)) - - -0.17.1 (2020-12-17) -------------------- -* Set env vars correctly in workflow steps ([#152](https://github.com/open-telemetry/opentelemetry-operator/pull/152), [@jpkrohling](https://github.com/jpkrohling)) -* Add permissions for leases.coordination.k8s.io ([#151](https://github.com/open-telemetry/opentelemetry-operator/pull/151), [@jpkrohling](https://github.com/jpkrohling)) -* Adjust container image tags ([#148](https://github.com/open-telemetry/opentelemetry-operator/pull/148), [@jpkrohling](https://github.com/jpkrohling)) - -0.17.0 (2020-12-16) -------------------- -* Bumped OpenTelemetry Collector to v0.17.0 ([#144](https://github.com/open-telemetry/opentelemetry-operator/pull/144), [@jpkrohling](https://github.com/jpkrohling)) -* Refactor how images are pushed ([#138](https://github.com/open-telemetry/opentelemetry-operator/pull/138), [@jpkrohling](https://github.com/jpkrohling)) - -0.16.0 (2020-12-03) -------------------- -* Bumped OpenTelemetry Collector to v0.16.0 ([#135](https://github.com/open-telemetry/opentelemetry-operator/pull/135), [@jpkrohling](https://github.com/jpkrohling)) -* Fix image prefix for release image ([#133](https://github.com/open-telemetry/opentelemetry-operator/pull/133), [@jpkrohling](https://github.com/jpkrohling)) -* Explicitly set Service Port Protocol for Jaeger Receivers ([#117](https://github.com/open-telemetry/opentelemetry-operator/pull/117), [@KingJ](https://github.com/KingJ)) - -_Note: The default port for the OTLP receiver has been changed from 55680 to 4317. To keep compatibility with your existing workload, the operator is now generating a service with the two port numbers by default. Both have 4317 as the target port._ - -0.15.0 (2020-11-27) -------------------- -* Bumped OpenTelemetry Collector to v0.15.0 ([#131](https://github.com/open-telemetry/opentelemetry-operator/pull/131), [@jpkrohling](https://github.com/jpkrohling)) - -0.14.0 (2020-11-09) -------------------- -* Bumped OpenTelemetry Collector to v0.14.0 ([#112](https://github.com/open-telemetry/opentelemetry-operator/pull/112), [@jpkrohling](https://github.com/jpkrohling)) - -_Note: The `tailsampling` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.14.0, which includes this processor), or remove the processor._ - -0.13.0 (2020-10-22) -------------------- - -* Bumped OpenTelemetry Collector to v0.13.0 ([#101](https://github.com/open-telemetry/opentelemetry-operator/pull/101), [@dengliming](https://github.com/dengliming)) -* Allow for spec.Env to be set on the OTEL Collector Spec ([#94](https://github.com/open-telemetry/opentelemetry-operator/pull/94), [@ekarlso](https://github.com/ekarlso)) - -_Note: The `groupbytrace` processor was moved to the contrib repository, requiring a manual intervention in case this processor is being used: either replace the image with the contrib one (v0.13.1, which includes this processor), or remove the processor._ - -0.12.0 (2020-10-12) -------------------- - -* Bumped OpenTelemetry Collector to v0.12.0 ([#81](https://github.com/open-telemetry/opentelemetry-operator/pull/81), [@jpkrohling](https://github.com/jpkrohling)) -* Remove use of deprecated controller runtime log API ([#78](https://github.com/open-telemetry/opentelemetry-operator/pull/78), [@bvwells](https://github.com/bvwells)) - -0.11.0 (2020-09-30) -------------------- - -- Initial release after the migration to `kubebuilder` -- Support for OpenTelemetry Collector v0.11.0 -- Features: - - Provisioning of an OpenTelemetry Collector based on the CR definition - - Sidecar injected via webhook - - Deployment modes: `daemonset`, `deployment`, `sidecar` - - Automatic upgrade between collector versions -- CRs from the older version should still work with this operator diff --git a/PROJECT b/PROJECT deleted file mode 100644 index 610235b46..000000000 --- a/PROJECT +++ /dev/null @@ -1,45 +0,0 @@ -domain: opentelemetry.io -layout: -- go.kubebuilder.io/v3 -multigroup: true -plugins: - manifests.sdk.operatorframework.io/v2: {} - scorecard.sdk.operatorframework.io/v2: {} -projectName: opentelemetry-operator -repo: github.com/open-telemetry/opentelemetry-operator -resources: -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: opentelemetry.io - kind: OpenTelemetryCollector - path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 - version: v1alpha1 - webhooks: - defaulting: true - validation: true - webhookVersion: v1 -- api: - crdVersion: v1 - namespaced: true - domain: opentelemetry.io - kind: Instrumentation - path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 - version: v1alpha1 - webhooks: - defaulting: true - webhookVersion: v1 -- api: - crdVersion: v1 - namespaced: true - controller: true - domain: opentelemetry.io - kind: OpAMPBridge - path: github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1 - version: v1alpha1 - webhooks: - defaulting: true - validation: true - webhookVersion: v1 -version: "3" diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index 7d67c2703..000000000 --- a/RELEASE.md +++ /dev/null @@ -1,47 +0,0 @@ -# Release instructions - -Steps to release a new version of the OpenTelemetry Operator: - -1. Change the `versions.txt`, so that it lists the target version of the OpenTelemetry Collector (operand), and the desired version for the target allocator and the operator. The `major.minor` should typically match, with the patch portion being possibly different. -2. Change the `autoinstrumentation-*` versions in `versions.txt` as per the latest supported versions in `autoinstrumentation/`. -3. Run `make bundle DOCKER_USER=open-telemetry VERSION=0.38.0`, using the version that will be released. -4. Change the compatibility matrix in the [readme](./README.md) file, using the OpenTelemetry Operator version to be released and the current latest Kubernetes version as the latest supported version. Remove the oldest entry. -5. Add the changes to the changelog. Manually add versions of all operator components. -6. Check the OpenTelemetry Collector's changelog and ensure migration steps are present in `pkg/collector/upgrade` -7. Once the changes above are merged and available in `main`, tag it with the desired version, prefixed with `v`: `v0.38.0` -8. The GitHub Workflow will take it from here, creating a GitHub release with the generated artifacts (manifests) and publishing the images -9. The GitHub Workflow, submits two pull requests to the Operator hub repositories. Make sure the pull requests are approved and merged. - 1. `community-operators-prod` is used by OLM on OpenShift. Example: [`operator-framework/community-operators-prod`](https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/494) - 1. `community-operators` is used by Operatorhub.io. Example: [`operator-framework/community-operators`](https://github.com/k8s-operatorhub/community-operators/pull/461) -10. Update release schedule table, by moving the current release manager to the end of the table with updated release version. - -## Generating the changelog - -We now use the chloggen to generate the changelog, simply run the following to generate the Changelog: - -```bash -make chlog-update -``` - -This will delete all entries (other than the template) in the `.chloggen` directory and create a populated Changelog.md entry. Make sure that the PR you are generating for the release has the `[chore]` prefix, otherwise CI will not pass. - - -## Release managers - -A release manager is the person responsible for a specific release. While the manager might request help from other folks, they are ultimately responsible for the success of a release. - -In order to have more people comfortable with the release process, and in order to decrease the burden on a small number of volunteers, all approvers and maintainers are release managers from time to time, listed under the Release Schedule section. That table is updated at every release, with the current manager adding themselves to the bottom of the table, removing themselves from the top of the table. - -## Release schedule - -The operator should be released within a week after the [OpenTelemetry collector release](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/release.md#release-schedule). - -| Version | Release manager | -|---------|-----------------| -| v0.91.0 | @yuriolisa | -| v0.92.0 | @pavolloffay | -| v0.93.0 | @VineethReddy02 | -| v0.94.0 | @TylerHelmuth | -| v0.95.0 | @swiatekm-sumo | -| v0.96.0 | @frzifus | -| v0.97.0 | @jaronoff97 | diff --git a/apis/v1alpha1/amazoncloudwatchagent_types.go b/apis/v1alpha1/amazoncloudwatchagent_types.go deleted file mode 100644 index a95b27875..000000000 --- a/apis/v1alpha1/amazoncloudwatchagent_types.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// Ingress is used to specify how CloudWatch Agent is exposed. This -// functionality is only available if one of the valid modes is set. -// Valid modes are: deployment, daemonset and statefulset. -// NOTE: If this feature is activated, all specified receivers are exposed. -// Currently this has a few limitations. Depending on the ingress controller -// there are problems with TLS and gRPC. -// SEE: https://github.com/open-telemetry/opentelemetry-operator/issues/1306. -// NOTE: As a workaround, port name and appProtocol could be specified directly -// in the CR. -// SEE: AmazonCloudWatchAgent.spec.ports[index]. -type Ingress struct { - // Type default value is: "" - // Supported types are: ingress - Type IngressType `json:"type,omitempty"` - - // Hostname by which the ingress proxy can be reached. - // +optional - Hostname string `json:"hostname,omitempty"` - - // Annotations to add to ingress. - // e.g. 'cert-manager.io/cluster-issuer: "letsencrypt"' - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // TLS configuration. - // +optional - TLS []networkingv1.IngressTLS `json:"tls,omitempty"` - - // IngressClassName is the name of an IngressClass cluster resource. Ingress - // controller implementations use this field to know whether they should be - // serving this Ingress resource. - // +optional - IngressClassName *string `json:"ingressClassName,omitempty"` - - // Route is an OpenShift specific section that is only considered when - // type "route" is used. - // +optional - Route OpenShiftRoute `json:"route,omitempty"` -} - -// OpenShiftRoute defines openshift route specific settings. -type OpenShiftRoute struct { - // Termination indicates termination type. By default "edge" is used. - Termination TLSRouteTerminationType `json:"termination,omitempty"` -} - -// AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. -type AmazonCloudWatchAgentSpec struct { - // Resources to set on the CloudWatch Agent pods. - // +optional - Resources v1.ResourceRequirements `json:"resources,omitempty"` - // NodeSelector to schedule CloudWatch Agent pods. - // This is only relevant to daemonset, statefulset, and deployment mode - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // Args is the set of arguments to pass to the CloudWatch Agent binary - // +optional - Args map[string]string `json:"args,omitempty"` - // Replicas is the number of pod instances for the underlying CloudWatch Agent. Set this if your are not using autoscaling - // +optional - Replicas *int32 `json:"replicas,omitempty"` - // PodAnnotations is the set of annotations that will be attached to - // Collector and Target Allocator pods. - // +optional - PodAnnotations map[string]string `json:"podAnnotations,omitempty"` - // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) - // +optional - Mode Mode `json:"mode,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. When set, - // the operator will not automatically create a ServiceAccount for the collector. - // +optional - ServiceAccount string `json:"serviceAccount,omitempty"` - // Image indicates the container image to use for the CloudWatch Agent. - // +optional - Image string `json:"image,omitempty"` - // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed - // +optional - UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` - - // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) - // +optional - ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` - // Config is the raw JSON to be used as the collector's configuration. Refer to the CloudWatch Agent documentation for details. - // +required - Config string `json:"config,omitempty"` - // VolumeMounts represents the mount points to use in the underlying collector deployment(s) - // +optional - // +listType=atomic - VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` - // Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator - // will attempt to infer the required ports by parsing the .Spec.Config property but this property can be - // used to open additional ports that can't be inferred by the operator, like for custom receivers. - // +optional - // +listType=atomic - Ports []v1.ServicePort `json:"ports,omitempty"` - // ENV vars to set on the CloudWatch Agent's Pods. These can then in certain cases be - // consumed in the config file for the Collector. - // +optional - Env []v1.EnvVar `json:"env,omitempty"` - // List of sources to populate environment variables on the CloudWatch Agent's Pods. - // These can then in certain cases be consumed in the config file for the Collector. - // +optional - EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` - // VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset. - // +optional - // +listType=atomic - VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` - // Toleration to schedule CloudWatch Agent pods. - // This is only relevant to daemonset, statefulset, and deployment mode - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // Volumes represents which volumes to use in the underlying collector deployment(s). - // +optional - // +listType=atomic - Volumes []v1.Volume `json:"volumes,omitempty"` - // Ingress is used to specify how CloudWatch Agent is exposed. This - // functionality is only available if one of the valid modes is set. - // Valid modes are: deployment, daemonset and statefulset. - // +optional - Ingress Ingress `json:"ingress,omitempty"` - // HostNetwork indicates if the pod should run in the host networking namespace. - // +optional - HostNetwork bool `json:"hostNetwork,omitempty"` - // If specified, indicates the pod's priority. - // If not specified, the pod priority will be default or zero if there is no - // default. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty"` -} - -// ScaleSubresourceStatus defines the observed state of the AmazonCloudWatchAgent's -// scale subresource. -type ScaleSubresourceStatus struct { - // The selector used to match the AmazonCloudWatchAgent's - // deployment or statefulSet pods. - // +optional - Selector string `json:"selector,omitempty"` - - // The total number non-terminated pods targeted by this - // AmazonCloudWatchAgent's deployment or statefulSet. - // +optional - Replicas int32 `json:"replicas,omitempty"` - - // StatusReplicas is the number of pods targeted by this AmazonCloudWatchAgent's with a Ready Condition / - // Total number of non-terminated pods targeted by this AmazonCloudWatchAgent's (their labels match the selector). - // Deployment, Daemonset, StatefulSet. - // +optional - StatusReplicas string `json:"statusReplicas,omitempty"` -} - -// AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent. -type AmazonCloudWatchAgentStatus struct { - // Scale is the AmazonCloudWatchAgent's scale subresource status. - // +optional - Scale ScaleSubresourceStatus `json:"scale,omitempty"` - - // Version of the managed CloudWatch Agent (operand) - // +optional - Version string `json:"version,omitempty"` - - // Image indicates the container image to use for the CloudWatch Agent. - // +optional - Image string `json:"image,omitempty"` - - // Messages about actions performed by the operator on this resource. - // +optional - // +listType=atomic - // Deprecated: use Kubernetes events instead. - Messages []string `json:"messages,omitempty"` - - // Replicas is currently not being set and might be removed in the next version. - // +optional - // Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" instead. - Replicas int32 `json:"replicas,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:resource:shortName=otelcol;otelcols -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector -// +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.mode",description="Deployment Mode" -// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="CloudWatch Agent Version" -// +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.scale.statusReplicas" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".status.image" -// +operator-sdk:csv:customresourcedefinitions:displayName="CloudWatch Agent" -// This annotation provides a hint for OLM which resources are managed by AmazonCloudWatchAgent kind. -// It's not mandatory to list all resources. -// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{DaemonSets,apps/v1},{StatefulSets,apps/v1},{ConfigMaps,v1},{Service,v1}} - -// AmazonCloudWatchAgent is the Schema for the AmazonCloudWatchAgents API. -type AmazonCloudWatchAgent struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec AmazonCloudWatchAgentSpec `json:"spec,omitempty"` - Status AmazonCloudWatchAgentStatus `json:"status,omitempty"` -} - -// +kubebuilder:object:root=true - -// AmazonCloudWatchAgentList contains a list of AmazonCloudWatchAgent. -type AmazonCloudWatchAgentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []AmazonCloudWatchAgent `json:"items"` -} - -func init() { - SchemeBuilder.Register(&AmazonCloudWatchAgent{}, &AmazonCloudWatchAgentList{}) -} diff --git a/apis/v1alpha1/amazoncloudwatchagent_webhook.go b/apis/v1alpha1/amazoncloudwatchagent_webhook.go deleted file mode 100644 index c545e75a2..000000000 --- a/apis/v1alpha1/amazoncloudwatchagent_webhook.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation" - ctrl "sigs.k8s.io/controller-runtime" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -// log is for logging in this package. -var amazoncloudwatchagentlog = logf.Log.WithName("amazoncloudwatchagent-resource") - -func (r *AmazonCloudWatchAgent) SetupWebhookWithManager(mgr ctrl.Manager) error { - return ctrl.NewWebhookManagedBy(mgr). - For(r). - Complete() -} - -// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=true,failurePolicy=fail,groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,verbs=create;update,versions=v1alpha1,name=mamazoncloudwatchagent.kb.io,sideEffects=none,admissionReviewVersions=v1 - -var _ webhook.Defaulter = &AmazonCloudWatchAgent{} - -// Default implements webhook.Defaulter so a webhook will be registered for the type. -func (r *AmazonCloudWatchAgent) Default() { - amazoncloudwatchagentlog.Info("default", "name", r.Name) - - if len(r.Spec.Mode) == 0 { - r.Spec.Mode = ModeDeployment - } - if len(r.Spec.UpgradeStrategy) == 0 { - r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic - } - - if r.Labels == nil { - r.Labels = map[string]string{} - } - if r.Labels["app.kubernetes.io/managed-by"] == "" { - r.Labels["app.kubernetes.io/managed-by"] = "amazon-cloudwatch-agent-operator" - } - - // We can default to one because dependent objects Deployment and HorizontalPodAutoScaler - // default to 1 as well. - one := int32(1) - if r.Spec.Replicas == nil { - r.Spec.Replicas = &one - } - - if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { - r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge - } -} - -// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=fail,groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=ignore,groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 - -var _ webhook.Validator = &AmazonCloudWatchAgent{} - -// ValidateCreate implements webhook.Validator so a webhook will be registered for the type. -func (r *AmazonCloudWatchAgent) ValidateCreate() (admission.Warnings, error) { - amazoncloudwatchagentlog.Info("validate create", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type. -func (r *AmazonCloudWatchAgent) ValidateUpdate(old runtime.Object) (admission.Warnings, error) { - amazoncloudwatchagentlog.Info("validate update", "name", r.Name) - return nil, r.validateCRDSpec() -} - -// ValidateDelete implements webhook.Validator so a webhook will be registered for the type. -func (r *AmazonCloudWatchAgent) ValidateDelete() (admission.Warnings, error) { - amazoncloudwatchagentlog.Info("validate delete", "name", r.Name) - return nil, nil -} - -func (r *AmazonCloudWatchAgent) validateCRDSpec() error { - // validate volumeClaimTemplates - if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'volumeClaimTemplates'", r.Spec.Mode) - } - - // validate tolerations - if r.Spec.Mode == ModeSidecar && len(r.Spec.Tolerations) > 0 { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'tolerations'", r.Spec.Mode) - } - - // validate priorityClassName - if r.Spec.Mode == ModeSidecar && r.Spec.PriorityClassName != "" { - return fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'priorityClassName'", r.Spec.Mode) - } - - // validator port config - for _, p := range r.Spec.Ports { - nameErrs := validation.IsValidPortName(p.Name) - numErrs := validation.IsValidPortNum(int(p.Port)) - if len(nameErrs) > 0 || len(numErrs) > 0 { - return fmt.Errorf("the AmazonCloudWatchAgent Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", - p.Name, nameErrs, p.Port, numErrs) - } - } - - if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { - return fmt.Errorf("the AmazonCloudWatchAgent Spec Ingress configuration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", - ModeDeployment, ModeDaemonSet, ModeStatefulSet, - ) - } - - if r.Spec.Ingress.Type == IngressTypeNginx && r.Spec.Mode == ModeSidecar { - return fmt.Errorf("the AmazonCloudWatchAgent Spec Ingress configuiration is incorrect. Ingress can only be used in combination with the modes: %s, %s, %s", - ModeDeployment, ModeDaemonSet, ModeStatefulSet, - ) - } - - return nil -} diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 0f83047a0..5ec36b73a 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -26,9 +26,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) var ( diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index e947a8c6e..3815973a7 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/kubernetes/scheme" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) var ( diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index beeaedf36..61a80688c 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -27,8 +27,8 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) const ( diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index 81049cbc0..a236c24bd 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) func TestInstrumentationDefaultingWebhook(t *testing.T) { diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go index 77717ca4f..31bf5866f 100644 --- a/apis/v1alpha1/opampbridge_webhook.go +++ b/apis/v1alpha1/opampbridge_webhook.go @@ -21,7 +21,7 @@ import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation" diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go index b67551b8e..dceab4157 100644 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -22,7 +22,7 @@ import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "github.com/stretchr/testify/assert" diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index cb346ca80..84ae2b543 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -44,7 +44,7 @@ const ( // NOTE: If this feature is activated, all specified receivers are exposed. // Currently this has a few limitations. Depending on the ingress controller // there are problems with TLS and gRPC. -// SEE: https://github.com/open-telemetry/opentelemetry-operator/issues/1306. +// SEE: https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1306. // NOTE: As a workaround, port name and appProtocol could be specified directly // in the CR. // SEE: OpenTelemetryCollector.spec.ports[index]. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 3ca26726b..68a313318 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,19 +1,7 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // Code generated by controller-gen. DO NOT EDIT. diff --git a/apis/v1alpha2/instrumentation_types.go b/apis/v1alpha2/instrumentation_types.go index e07d350a8..10ce8b94a 100644 --- a/apis/v1alpha2/instrumentation_types.go +++ b/apis/v1alpha2/instrumentation_types.go @@ -21,7 +21,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/opentelemetrycollector_types.go index 710766ffb..ae247d03a 100644 --- a/apis/v1alpha2/opentelemetrycollector_types.go +++ b/apis/v1alpha2/opentelemetrycollector_types.go @@ -20,7 +20,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index 4106e00c3..e75a6491c 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -1,28 +1,17 @@ //go:build !ignore_autogenerated // +build !ignore_autogenerated -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // Code generated by controller-gen. DO NOT EDIT. package v1alpha2 import ( - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" + + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/bundle.Dockerfile b/bundle.Dockerfile deleted file mode 100644 index af479f2fa..000000000 --- a/bundle.Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.29.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY bundle/manifests /manifests/ -COPY bundle/metadata /metadata/ -COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml deleted file mode 100644 index 66b0879b4..000000000 --- a/bundle/manifests/opentelemetry-operator-controller-manager-metrics-service_v1_service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager-metrics-service -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager -status: - loadBalancer: {} diff --git a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml deleted file mode 100644 index 18a824a57..000000000 --- a/bundle/manifests/opentelemetry-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-metrics-reader -rules: -- nonResourceURLs: - - /metrics - verbs: - - get diff --git a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml b/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml deleted file mode 100644 index d40a33694..000000000 --- a/bundle/manifests/opentelemetry-operator-webhook-service_v1_service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-webhook-service -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager -status: - loadBalancer: {} diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml deleted file mode 100644 index 076d2f8b9..000000000 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,702 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "opentelemetry.io/v1alpha1", - "kind": "Instrumentation", - "metadata": { - "name": "instrumentation" - }, - "spec": { - "exporter": { - "endpoint": "http://otel-collector-headless:4317" - } - } - }, - { - "apiVersion": "opentelemetry.io/v1alpha1", - "kind": "OpAMPBridge", - "metadata": { - "name": "opampbridge-sample" - }, - "spec": { - "capabilities": { - "AcceptsOpAMPConnectionSettings": true, - "AcceptsOtherConnectionSettings": true, - "AcceptsRemoteConfig": true, - "AcceptsRestartCommand": true, - "ReportsEffectiveConfig": true, - "ReportsHealth": true, - "ReportsOwnLogs": true, - "ReportsOwnMetrics": true, - "ReportsOwnTraces": true, - "ReportsRemoteConfig": true, - "ReportsStatus": true - }, - "componentsAllowed": { - "exporters": [ - "logging" - ], - "processors": [ - "memory_limiter" - ], - "receivers": [ - "otlp" - ] - }, - "endpoint": "ws://opamp-server:4320/v1/opamp" - } - }, - { - "apiVersion": "opentelemetry.io/v1alpha1", - "kind": "OpenTelemetryCollector", - "metadata": { - "name": "otel" - }, - "spec": { - "config": "receivers:\n otlp:\n protocols: \n grpc:\n http:\n\nexporters:\n debug:\n\nservice:\n pipelines:\n traces:\n receivers: [otlp]\n exporters: [debug]\n" - } - } - ] - capabilities: Deep Insights - categories: Logging & Tracing,Monitoring - certified: "false" - containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2023-12-19T02:48:46Z" - 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 - repository: github.com/open-telemetry/opentelemetry-operator - support: OpenTelemetry Community - name: opentelemetry-operator.v0.90.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: Instrumentation is the spec for OpenTelemetry instrumentation. - displayName: OpenTelemetry Instrumentation - kind: Instrumentation - name: instrumentations.opentelemetry.io - resources: - - kind: Pod - name: "" - version: v1 - version: v1alpha1 - - description: OpAMPBridge is the Schema for the opampbridges API. - displayName: OpAMP Bridge - kind: OpAMPBridge - name: opampbridges.opentelemetry.io - resources: - - kind: ConfigMaps - name: "" - version: v1 - - kind: Deployment - name: "" - version: apps/v1 - - kind: Pod - name: "" - version: v1 - - kind: Service - name: "" - version: v1 - version: v1alpha1 - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API. - displayName: OpenTelemetry Collector - kind: OpenTelemetryCollector - name: opentelemetrycollectors.opentelemetry.io - resources: - - kind: ConfigMaps - name: "" - version: v1 - - kind: DaemonSets - name: "" - version: apps/v1 - - kind: Deployment - name: "" - version: apps/v1 - - kind: Pod - name: "" - version: v1 - - kind: Service - name: "" - version: v1 - - kind: StatefulSets - name: "" - version: apps/v1 - specDescriptors: - - description: ObservabilitySpec defines how telemetry data gets handled. - displayName: Observability - path: observability - - description: Metrics defines the metrics configuration for operands. - displayName: Metrics Config - path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the service managed by the OpenTelemetry Operator. - The operator.observability.prometheus feature gate must be enabled to use - this feature. - displayName: Create ServiceMonitors for OpenTelemetry Collector - path: observability.metrics.enableMetrics - - description: ObservabilitySpec defines how telemetry data gets handled. - displayName: Observability - path: targetAllocator.observability - - description: Metrics defines the metrics configuration for operands. - displayName: Metrics Config - path: targetAllocator.observability.metrics - - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the service managed by the OpenTelemetry Operator. - The operator.observability.prometheus feature gate must be enabled to use - this feature. - displayName: Create ServiceMonitors for OpenTelemetry Collector - path: targetAllocator.observability.metrics.enableMetrics - version: v1alpha1 - description: |- - OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. - - ### Operator features - - * **Sidecar injection** - annotate your pods and let the operator inject a sidecar. - * **Managed upgrades** - updating the operator will automatically update your OpenTelemetry collectors. - * **Deployment modes** - your collector can be deployed as sidecar, daemon set, or regular deployment. - * **Service port management** - the operator detects which ports need to be exposed based on the provided configuration. - displayName: Community OpenTelemetry Operator - icon: - - base64data: PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHJvbGU9ImltZyIgdmlld0JveD0iLTEyLjcwIC0xMi43MCAxMDI0LjQwIDEwMjQuNDAiPjxzdHlsZT5zdmcge2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAwMCAxMDAwfTwvc3R5bGU+PHBhdGggZmlsbD0iI2Y1YTgwMCIgZD0iTTUyOC43IDU0NS45Yy00MiA0Mi00MiAxMTAuMSAwIDE1Mi4xczExMC4xIDQyIDE1Mi4xIDAgNDItMTEwLjEgMC0xNTIuMS0xMTAuMS00Mi0xNTIuMSAwem0xMTMuNyAxMTMuOGMtMjAuOCAyMC44LTU0LjUgMjAuOC03NS4zIDAtMjAuOC0yMC44LTIwLjgtNTQuNSAwLTc1LjMgMjAuOC0yMC44IDU0LjUtMjAuOCA3NS4zIDAgMjAuOCAyMC43IDIwLjggNTQuNSAwIDc1LjN6bTM2LjYtNjQzbC02NS45IDY1LjljLTEyLjkgMTIuOS0xMi45IDM0LjEgMCA0N2wyNTcuMyAyNTcuM2MxMi45IDEyLjkgMzQuMSAxMi45IDQ3IDBsNjUuOS02NS45YzEyLjktMTIuOSAxMi45LTM0LjEgMC00N0w3MjUuOSAxNi43Yy0xMi45LTEyLjktMzQtMTIuOS00Ni45IDB6TTIxNy4zIDg1OC44YzExLjctMTEuNyAxMS43LTMwLjggMC00Mi41bC0zMy41LTMzLjVjLTExLjctMTEuNy0zMC44LTExLjctNDIuNSAwTDcyLjEgODUybC0uMS4xLTE5LTE5Yy0xMC41LTEwLjUtMjcuNi0xMC41LTM4IDAtMTAuNSAxMC41LTEwLjUgMjcuNiAwIDM4bDExNCAxMTRjMTAuNSAxMC41IDI3LjYgMTAuNSAzOCAwczEwLjUtMjcuNiAwLTM4bC0xOS0xOSAuMS0uMSA2OS4yLTY5LjJ6Ii8+PHBhdGggZmlsbD0iIzQyNWNjNyIgZD0iTTU2NS45IDIwNS45TDQxOS41IDM1Mi4zYy0xMyAxMy0xMyAzNC40IDAgNDcuNGw5MC40IDkwLjRjNjMuOS00NiAxNTMuNS00MC4zIDIxMSAxNy4ybDczLjItNzMuMmMxMy0xMyAxMy0zNC40IDAtNDcuNEw2MTMuMyAyMDUuOWMtMTMtMTMuMS0zNC40LTEzLjEtNDcuNCAwem0tOTQgMzIyLjNsLTUzLjQtNTMuNGMtMTIuNS0xMi41LTMzLTEyLjUtNDUuNSAwTDE4NC43IDY2My4yYy0xMi41IDEyLjUtMTIuNSAzMyAwIDQ1LjVsMTA2LjcgMTA2LjdjMTIuNSAxMi41IDMzIDEyLjUgNDUuNSAwTDQ1OCA2OTQuMWMtMjUuNi01Mi45LTIxLTExNi44IDEzLjktMTY1Ljl6Ii8+PC9zdmc+ - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - - pods - - serviceaccounts - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - list - - watch - - apiGroups: - - apps - resources: - - daemonsets - - deployments - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - list - - watch - - apiGroups: - - autoscaling - resources: - - horizontalpodautoscalers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - list - - update - - apiGroups: - - monitoring.coreos.com - resources: - - podmonitors - - servicemonitors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - instrumentations - verbs: - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - opampbridges - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - opampbridges/finalizers - verbs: - - update - - apiGroups: - - opentelemetry.io - resources: - - opampbridges/status - verbs: - - get - - patch - - update - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/finalizers - verbs: - - get - - patch - - update - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/status - verbs: - - get - - patch - - update - - apiGroups: - - policy - resources: - - poddisruptionbudgets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - route.openshift.io - resources: - - routes - - routes/custom-host - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create - - apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create - serviceAccountName: opentelemetry-operator-controller-manager - deployments: - - label: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - spec: - containers: - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - - --zap-log-level=info - - --zap-time-encoding=rfc3339nano - - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.90.0 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - requests: - cpu: 100m - memory: 64Mi - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - serviceAccountName: opentelemetry-operator-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: opentelemetry-operator-controller-manager-service-cert - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - serviceAccountName: opentelemetry-operator-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - opentelemetry - - tracing - - logging - - metrics - - monitoring - - troubleshooting - links: - - name: OpenTelemetry Operator - url: https://github.com/open-telemetry/opentelemetry-operator - maintainers: - - email: jpkroehling@redhat.com - name: Juraci Paixão Kröhling - maturity: alpha - minKubeVersion: 1.23.0 - provider: - name: OpenTelemetry Community - version: 0.90.0 - webhookdefinitions: - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: minstrumentation.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None - targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: mopampbridge.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opampbridges - sideEffects: None - targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-opampbridge - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: mopentelemetrycollector.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None - targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: mpod.kb.io - rules: - - apiGroups: - - "" - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - pods - sideEffects: None - targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /mutate-v1-pod - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: vinstrumentationcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: vinstrumentationdelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - instrumentations - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: vopampbridgecreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opampbridges - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opampbridge - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: vopampbridgedelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - opampbridges - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opampbridge - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Fail - generateName: vopentelemetrycollectorcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - - admissionReviewVersions: - - v1 - containerPort: 443 - deploymentName: opentelemetry-operator-controller-manager - failurePolicy: Ignore - generateName: vopentelemetrycollectordelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - opentelemetrycollectors - sideEffects: None - targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector diff --git a/bundle/manifests/opentelemetry.io_instrumentations.yaml b/bundle/manifests/opentelemetry.io_instrumentations.yaml deleted file mode 100644 index be914a75c..000000000 --- a/bundle/manifests/opentelemetry.io_instrumentations.yaml +++ /dev/null @@ -1,1635 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: instrumentations.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: Instrumentation - listKind: InstrumentationList - plural: instrumentations - shortNames: - - otelinst - - otelinsts - singular: instrumentation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .spec.exporter.endpoint - name: Endpoint - type: string - - jsonPath: .spec.sampler.type - name: Sampler - type: string - - jsonPath: .spec.sampler.argument - name: Sampler Arg - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Instrumentation is the spec for OpenTelemetry instrumentation. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: InstrumentationSpec defines the desired state of OpenTelemetry - SDK and instrumentation. - properties: - apacheHttpd: - description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Apache HTTPD agent specific attributes. - The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configPath: - description: Location of Apache HTTPD server configuration. Needed - only if different from default "/usr/local/apache2/conf" - type: string - env: - description: Env defines Apache HTTPD specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Apache SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - version: - description: Apache HTTPD server version. One of 2.4 or 2.2. Default - is 2.4 - type: string - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - dotnet: - description: DotNet defines configuration for DotNet auto-instrumentation. - properties: - env: - description: Env defines DotNet specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with DotNet SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - env: - description: Env defines common env vars. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string - type: object - go: - description: Go defines configuration for Go auto-instrumentation. - properties: - env: - description: Env defines Go specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Go SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - java: - description: Java defines configuration for java auto-instrumentation. - properties: - env: - description: Env defines java specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with javaagent auto-instrumentation - JAR. - type: string - resources: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nginx: - description: Nginx defines configuration for Nginx auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Nginx agent specific attributes. The - precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configFile: - description: Location of Nginx configuration file. Needed only - if different from default "/etx/nginx/nginx.conf" - type: string - env: - description: Env defines Nginx specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Nginx SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nodejs: - description: NodeJS defines configuration for nodejs auto-instrumentation. - properties: - env: - description: Env defines nodejs specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with NodeJS SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - propagators: - description: Propagators defines inter-process context propagation - configuration. Values in this list will be set in the OTEL_PROPAGATORS - env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none - items: - description: Propagator represents the propagation type. - enum: - - tracecontext - - baggage - - b3 - - b3multi - - jaeger - - xray - - ottrace - - none - type: string - type: array - python: - description: Python defines configuration for python auto-instrumentation. - properties: - env: - description: Env defines python specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Python SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - resource: - description: Resource defines the configuration for the resource attributes, - as defined by the OpenTelemetry specification. - properties: - addK8sUIDAttributes: - description: AddK8sUIDAttributes defines whether K8s UID attributes - should be collected (e.g. k8s.deployment.uid). - type: boolean - resourceAttributes: - additionalProperties: - type: string - description: 'Attributes defines attributes that are added to - the resource. For example environment: dev' - type: object - type: object - sampler: - description: Sampler defines sampling configuration. - properties: - argument: - description: Argument defines sampler argument. The value depends - on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. - type: string - type: - description: Type defines sampler type. The value will be set - in the OTEL_TRACES_SAMPLER env var. The value can be for instance - parentbased_always_on, parentbased_always_off, parentbased_traceidratio... - enum: - - always_on - - always_off - - traceidratio - - parentbased_always_on - - parentbased_always_off - - parentbased_traceidratio - - jaeger_remote - - xray - type: string - type: object - type: object - status: - description: InstrumentationStatus defines status of the instrumentation. - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/bundle/manifests/opentelemetry.io_opampbridges.yaml b/bundle/manifests/opentelemetry.io_opampbridges.yaml deleted file mode 100644 index 38439dbc4..000000000 --- a/bundle/manifests/opentelemetry.io_opampbridges.yaml +++ /dev/null @@ -1,2958 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.12.0 - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opampbridges.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpAMPBridge - listKind: OpAMPBridgeList - plural: opampbridges - singular: opampbridge - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .spec.endpoint - name: Endpoint - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpAMPBridge is the Schema for the opampbridges API. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: OpAMPBridgeSpec defines the desired state of OpAMPBridge. - properties: - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - capabilities: - additionalProperties: - type: boolean - description: Capabilities supported by the OpAMP Bridge - type: object - componentsAllowed: - additionalProperties: - items: - type: string - type: array - description: ComponentsAllowed is a list of allowed OpenTelemetry - components for each pipeline type (receiver, processor, etc.) - type: object - endpoint: - description: OpAMP backend Server endpoint - type: string - env: - description: ENV vars to set on the OpAMPBridge Pods. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpAMPBridge Pods. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - headers: - additionalProperties: - type: string - description: Headers is an optional map of headers to use when connecting - to the OpAMP Server, typically used to set access tokens or other - authorization headers. - type: object - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpAMPBridge. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpAMPBridge pods. - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to OpAMPBridge pods. - type: object - podSecurityContext: - description: PodSecurityContext will be set as the pod security context. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the OpAMPBridge. - format: int32 - maximum: 1 - type: integer - resources: - description: Resources to set on the OpAMPBridge pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext will be set as the container security - context. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the OpAMPBridge. - type: string - tolerations: - description: Toleration to schedule OpAMPBridge pods. - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle - upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying OpAMPBridge deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - OpAMPBridge deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk - resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, - Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the - blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob - storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed data - disk (only in managed availability set).' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains - Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is the - path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair in - the Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated - CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set - permissions on created files by default.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: medium represents what type of storage medium - should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: sizeLimit is the total amount of local storage - required for this EmptyDir volume. The size limit is also - applicable for memory medium. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. - properties: - volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. - properties: - metadata: - description: May contain labels and annotations that - will be copied into the PVC when creating it. No other - fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. - properties: - accessModes: - description: 'accessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object - from which to populate the volume with data, if - a non-empty volume is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace - is specified, a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the - StorageClass required by the claim. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used - to set the VolumeAttributesClass used by this - claim. - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem - is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use for - this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds extra - command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if no - secret object is specified.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored as - metadata -> name on the dataset for Flocker should be - considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This - is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem type - is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' - properties: - directory: - description: directory is the target directory name. Must - not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: hostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - properties: - path: - description: 'path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI - Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI - Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses - an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. The - portal is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target - and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The Portal - is either an IP or ip_addr:port if the port is other than - default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - clusterTrustBundle: - description: "ClusterTrustBundle allows a pod to access - the `.spec.trustBundle` field of ClusterTrustBundle - objects in an auto-updating file. \n Alpha, gated - by the ClusterTrustBundleProjection feature gate." - properties: - labelSelector: - description: Select all ClusterTrustBundles that - match this label selector. Only has effect - if signerName is set. Mutually-exclusive with - name. If unset, interpreted as "match nothing". - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: Select a single ClusterTrustBundle - by object name. Mutually-exclusive with signerName - and labelSelector. - type: string - optional: - description: If true, don't block pod startup - if the referenced ClusterTrustBundle(s) aren't - available. If using name, then the named ClusterTrustBundle - is allowed not to exist. - type: boolean - path: - description: Relative path from the volume root - to write the bundle. - type: string - signerName: - description: Select all ClusterTrustBundles that - match this signer name. Mutually-exclusive with - name. The contents of all selected ClusterTrustBundles - will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret data - to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional field specify whether the - Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information about - the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. - format: int64 - type: integer - path: - description: path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is no - group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for - a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: system is the name of the storage system as - configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair in - the Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret or - its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the - pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based - Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere - volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - required: - - capabilities - - endpoint - type: object - status: - description: OpAMPBridgeStatus defines the observed state of OpAMPBridge. - properties: - version: - description: Version of the managed OpAMP Bridge (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml deleted file mode 100644 index 0ca1952e5..000000000 --- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml +++ /dev/null @@ -1,7522 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.12.0 - creationTimestamp: null - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Deployment Mode - jsonPath: .spec.mode - name: Mode - type: string - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .status.scale.statusReplicas - name: Ready - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.image - name: Image - type: string - - description: Management State - jsonPath: .spec.managementState - name: Management - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - additionalContainers: - description: AdditionalContainers allows injecting additional containers - into the Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - autoscaler: - description: Autoscaler specifies the pod autoscaling configuration - to use for the OpenTelemetryCollector workload. - properties: - behavior: - description: HorizontalPodAutoscalerBehavior configures the scaling - behavior of the target in both Up and Down directions (scaleUp - and scaleDown fields respectively). - properties: - scaleDown: - description: scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down - to minReplicas pods, with a 300 second stabilization window - (i.e. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - scaleUp: - description: scaleUp is scaling policy for scaling Up. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - type: object - maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling - feature. If MaxReplicas is set autoscaling is enabled. - format: int32 - type: integer - metrics: - description: Metrics is meant to provide a customizable way to - configure HPA metrics. currently the only supported custom metrics - is type=Pod. - items: - description: MetricSpec defines a subset of metrics to be defined - for the HPA's metric array more metric type can be supported - as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec - for reference. - properties: - pods: - description: PodsMetricSource indicates how to scale on - a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: selector is the string-encoded form - of a standard kubernetes label selector for the - given metric When set, it is passed as an additional - parameter to the metrics server for more specific - metrics scopi - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: averageUtilization is the target value - of the average of the resource metric across all - relevant pods, represented as a percentage of - the requested value of the resource for the pods. - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: averageValue is the target value of - the average of the metric across all relevant - pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - type: - description: MetricSourceType indicates the type of metric. - type: string - required: - - type - type: object - type: array - minReplicas: - description: MinReplicas sets a lower bound to the autoscaling - feature. Set this if your are using autoscaling. It must be - at least 1 - format: int32 - type: integer - targetCPUUtilization: - description: TargetCPUUtilization sets the target average CPU - used across all replicas. If average CPU exceeds this value, - the HPA will scale up. Defaults to 90 percent. - format: int32 - type: integer - targetMemoryUtilization: - description: TargetMemoryUtilization sets the target average memory - utilization across all replicas - format: int32 - type: integer - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - configmaps: - description: ConfigMaps is a list of ConfigMaps in the same namespace - as the OpenTelemetryCollector object, which shall be mounted into - the Collector Pods. - items: - properties: - mountpath: - type: string - name: - description: Configmap defines name and path where the configMaps - should be mounted. - type: string - required: - - mountpath - - name - type: object - type: array - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. - These can then in certain cases be consumed in the config file for - the Collector. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpenTelemetry Collector's Pods. These can then in certain cases - be consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how OpenTelemetry Collector - is exposed. This functionality is only available if one of the valid - modes is set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' - type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. - properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt - type: string - type: object - ruleType: - description: RuleType defines how Ingress exposes collector receivers. - IngressRuleTypePath ("path") exposes each receiver port on a - unique path on single domain defined in Hostname. - enum: - - path - - subdomain - type: string - tls: - description: TLS configuration. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. - properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. - items: - type: string - type: array - x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. - type: string - type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress, - route' - enum: - - ingress - - route - type: string - type: object - initContainers: - description: InitContainers allows injecting initContainers to the - Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - lifecycle: - description: Actions that the management system should take in response - to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event such - as liveness/startup probe failure, preemption, resource contention, - etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: Liveness config for the OpenTelemetry Collector except - the probe handler which is auto generated from the health extension - of the collector. - properties: - failureThreshold: - description: Minimum consecutive failures for the probe to be - considered failed after having succeeded. Defaults to 3. Minimum - value is 1. - format: int32 - type: integer - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default - to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be - considered successful after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - managementState: - default: managed - description: ManagementState defines if the CR should be managed by - the operator or not. Default is managed. - enum: - - managed - - unmanaged - type: string - maxReplicas: - description: 'MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" - instead.' - format: int32 - type: integer - minReplicas: - description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if you are using autoscaling. It must be at least 1 Deprecated: - use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' - format: int32 - type: integer - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets handled. - properties: - metrics: - description: Metrics defines the metrics configuration for operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor or - PodMonitor(for sidecar mode) should be created for the service - managed by the OpenTelemetry Operator. The operator.observability. - type: boolean - type: object - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption budget - configuration to use for the OpenTelemetryCollector workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after the - eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - description: PodSecurityContext configures the pod security context - for the opentelemetry-collector pod, when running as a deployment, - daemonset, or statefulset. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetry Collector pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security context - for the opentelemetry-collector container. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string - targetAllocator: - description: TargetAllocator indicates a value which determines whether - to spawn a target allocation resource or not. - properties: - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects - (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term - matches no objects. The requirements of them are - ANDed. The TopologySelectorTerm type implements - a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the anti-affinity expressions - specified by this field, but it may choose a node that - violates one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified - by this field are not met at scheduling time, the pod - will not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - allocationStrategy: - description: AllocationStrategy determines which strategy the - target allocator should use for allocation. The current options - are least-weighted and consistent-hashing. The default option - is least-weighted - enum: - - least-weighted - - consistent-hashing - type: string - enabled: - description: Enabled indicates whether to use a target allocation - mechanism for Prometheus targets or not. - type: boolean - env: - description: ENV vars to set on the OpenTelemetry TargetAllocator's - Pods. These can then in certain cases be consumed in the config - file for the TargetAllocator. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - filterStrategy: - description: FilterStrategy determines how to filter targets before - allocating them among the collectors. The only current option - is relabel-config (drops targets based on prom relabel_config). - type: string - image: - description: Image indicates the container image to use for the - OpenTelemetry TargetAllocator. - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry TargetAllocator - pods. - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets - handled. - properties: - metrics: - description: Metrics defines the metrics configuration for - operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor - or PodMonitor(for sidecar mode) should be created for - the service managed by the OpenTelemetry Operator. The - operator.observability. - type: boolean - type: object - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption - budget configuration to use for the target allocator workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after - the eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - prometheusCR: - description: PrometheusCR defines the configuration for the retrieval - of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. - properties: - enabled: - description: Enabled indicates whether to use a PrometheusOperator - custom resources as targets or not. - type: boolean - podMonitorSelector: - additionalProperties: - type: string - description: PodMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a PodMonitor's - meta labels. - type: object - scrapeInterval: - default: 30s - description: "Interval between consecutive scrapes. Equivalent - to the same setting on the Prometheus CRD. \n Default: \"30s\"" - format: duration - type: string - serviceMonitorSelector: - additionalProperties: - type: string - description: ServiceMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a ServiceMonitor's - meta labels. - type: object - type: object - replicas: - description: Replicas is the number of pod instances for the underlying - TargetAllocator. This should only be set to a value other than - 1 if a strategy that allows for high availability is chosen. - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetryTargetAllocator - containers. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security - context for the targetallocator. - properties: - fsGroup: - description: "A special supplemental group that applies to - all containers in a pod. Some volume types allow the Kubelet - to change the ownership of that volume to be owned by the - pod: \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - SecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers - in this pod. Note that this field cannot be set when spec.os.name - is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process - run in each container, in addition to the container's primary - GID, the fsGroup (if specified), and group memberships defined - in the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used - for the pod. Pods with unsupported sysctls (by the container - runtime) might fail to launch. Note that this field cannot - be set when spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options within a container's - SecurityContext will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing - service account to use with this instance. When set, the operator - will not automatically create a ServiceAccount for the TargetAllocator. - type: string - tolerations: - description: Toleration embedded kubernetes pod configuration - option, controls how pods can be scheduled with matching taints - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using - the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. - Empty means match all taint effects. When specified, allowed - values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to - the value. Valid operators are Exists and Equal. Defaults - to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of - time the toleration (which must be of effect NoExecute, - otherwise this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod - configuration option, controls how pods are spread across your - cluster among failure-domains such as regions, zones, nodes, - and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine - the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to - select the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods - may be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat - node taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes - that have a label with this key and identical values are - considered to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with - a pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - terminationGracePeriodSeconds: - description: Duration in seconds the pod needs to terminate gracefully - upon probe failure. - format: int64 - type: integer - tolerations: - description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - updateStrategy: - description: UpdateStrategy represents the strategy the operator will - take replacing existing DaemonSet pods with new pods https://kubernetes. - properties: - rollingUpdate: - description: 'Rolling update config params. Present only if type - = "RollingUpdate". --- TODO: Update this to follow our convention - for oneOf, whatever we decide it to be. Same as Deployment `strategy.' - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: The maximum number of nodes with an existing - available DaemonSet pod that can have an updated DaemonSet - pod during during an update. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: The maximum number of DaemonSet pods that can - be unavailable during the update. - x-kubernetes-int-or-string: true - type: object - type: - description: Type of daemon set update. Can be "RollingUpdate" - or "OnDelete". Default is RollingUpdate. - type: string - type: object - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle - upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeClaimTemplates: - description: VolumeClaimTemplates will provide stable storage using - PersistentVolumes. Only available when the mode=statefulset. - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. - type: string - kind: - description: Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'spec defines the desired characteristics of a - volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace is specified, - a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of - compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of - compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used to set - the VolumeAttributesClass used by this claim. - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not - included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: 'status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the actual access modes - the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResourceStatuses: - additionalProperties: - description: When a controller receives persistentvolume - claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that - update and let other controllers handle it. - type: string - description: allocatedResourceStatuses stores status of - resource being resized for the given PVC. Key names follow - standard Kubernetes label syntax. - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: allocatedResources tracks the resources allocated - to a PVC including its capacity. Key names follow standard - Kubernetes label syntax. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: conditions is the current Condition of persistent - volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: reason is a unique, this should be a - short, machine understandable string that gives - the reason for condition's last transition. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is - a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - currentVolumeAttributesClassName: - description: currentVolumeAttributesClassName is the current - name of the VolumeAttributesClass the PVC is using. - type: string - modifyVolumeStatus: - description: ModifyVolumeStatus represents the status object - of ControllerModifyVolume operation. When this is unset, - there is no ModifyVolume operation being attempted. - properties: - status: - description: status is the status of the ControllerModifyVolume - operation. - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - x-kubernetes-list-type: atomic - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk - resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, - Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the - blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob - storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed data - disk (only in managed availability set).' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains - Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is the - path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair in - the Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated - CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set - permissions on created files by default.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: medium represents what type of storage medium - should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: sizeLimit is the total amount of local storage - required for this EmptyDir volume. The size limit is also - applicable for memory medium. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. - properties: - volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. - properties: - metadata: - description: May contain labels and annotations that - will be copied into the PVC when creating it. No other - fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. - properties: - accessModes: - description: 'accessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object - from which to populate the volume with data, if - a non-empty volume is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace - is specified, a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the - StorageClass required by the claim. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used - to set the VolumeAttributesClass used by this - claim. - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem - is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use for - this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds extra - command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if no - secret object is specified.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored as - metadata -> name on the dataset for Flocker should be - considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This - is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem type - is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' - properties: - directory: - description: directory is the target directory name. Must - not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: hostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - properties: - path: - description: 'path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI - Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI - Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses - an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. The - portal is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target - and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The Portal - is either an IP or ip_addr:port if the port is other than - default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - clusterTrustBundle: - description: "ClusterTrustBundle allows a pod to access - the `.spec.trustBundle` field of ClusterTrustBundle - objects in an auto-updating file. \n Alpha, gated - by the ClusterTrustBundleProjection feature gate." - properties: - labelSelector: - description: Select all ClusterTrustBundles that - match this label selector. Only has effect - if signerName is set. Mutually-exclusive with - name. If unset, interpreted as "match nothing". - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: Select a single ClusterTrustBundle - by object name. Mutually-exclusive with signerName - and labelSelector. - type: string - optional: - description: If true, don't block pod startup - if the referenced ClusterTrustBundle(s) aren't - available. If using name, then the named ClusterTrustBundle - is allowed not to exist. - type: boolean - path: - description: Relative path from the volume root - to write the bundle. - type: string - signerName: - description: Select all ClusterTrustBundles that - match this signer name. Mutually-exclusive with - name. The contents of all selected ClusterTrustBundles - will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret data - to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional field specify whether the - Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information about - the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. - format: int64 - type: integer - path: - description: path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is no - group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for - a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: system is the name of the storage system as - configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair in - the Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret or - its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the - pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based - Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere - volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector. - properties: - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - messages: - description: 'Messages about actions performed by the operator on - this resource. Deprecated: use Kubernetes events instead.' - items: - type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: 'Replicas is currently not being set and might be removed - in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" - instead.' - format: int32 - type: integer - scale: - description: Scale is the OpenTelemetryCollector's scale subresource - status. - properties: - replicas: - description: The total number non-terminated pods targeted by - this OpenTelemetryCollector's deployment or statefulSet. - format: int32 - type: integer - selector: - description: The selector used to match the OpenTelemetryCollector's - deployment or statefulSet pods. - type: string - statusReplicas: - description: StatusReplicas is the number of pods targeted by - this OpenTelemetryCollector's with a Ready Condition / Total - number of non-terminated pods targeted by this OpenTelemetryCollector's - (their labels matc - type: string - type: object - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.scale.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.scale.replicas - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml deleted file mode 100644 index b0f3b4604..000000000 --- a/bundle/metadata/annotations.yaml +++ /dev/null @@ -1,14 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: opentelemetry-operator - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.29.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/bundle/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml deleted file mode 100644 index efe0cbadc..000000000 --- a/bundle/tests/scorecard/config.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-crds-have-resources-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/cmd/operator-opamp-bridge/Dockerfile b/cmd/operator-opamp-bridge/Dockerfile deleted file mode 100644 index ebf707b24..000000000 --- a/cmd/operator-opamp-bridge/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -# Get CA certificates from the Alpine package repo -FROM alpine:3.19 as certificates - -RUN apk --no-cache add ca-certificates - -# Start a new stage from scratch -FROM scratch - -ARG TARGETARCH - -WORKDIR /root/ - -# Copy the certs -COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt - -# Copy binary built on the host -COPY bin/opampbridge_${TARGETARCH} ./main - -# "nonroot" -USER 65532:65532 -ENTRYPOINT ["./main"] diff --git a/cmd/operator-opamp-bridge/agent/agent.go b/cmd/operator-opamp-bridge/agent/agent.go deleted file mode 100644 index e9dc849b1..000000000 --- a/cmd/operator-opamp-bridge/agent/agent.go +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package agent - -import ( - "bytes" - "context" - "fmt" - "time" - - "github.com/go-logr/logr" - "github.com/oklog/ulid/v2" - "github.com/open-telemetry/opamp-go/client" - "github.com/open-telemetry/opamp-go/client/types" - "github.com/open-telemetry/opamp-go/protobufs" - "go.uber.org/multierr" - "k8s.io/utils/clock" - "sigs.k8s.io/yaml" - - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/metrics" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" -) - -type Agent struct { - logger logr.Logger - - appliedKeys map[collectorKey]bool - clock clock.Clock - startTime uint64 - lastHash []byte - - instanceId ulid.ULID - agentDescription *protobufs.AgentDescription - remoteConfigStatus *protobufs.RemoteConfigStatus - - opampClient client.OpAMPClient - metricReporter *metrics.MetricReporter - config *config.Config - applier operator.ConfigApplier - remoteConfigEnabled bool - - done chan struct{} - ticker *time.Ticker -} - -func NewAgent(logger logr.Logger, applier operator.ConfigApplier, config *config.Config, opampClient client.OpAMPClient) *Agent { - var t *time.Ticker - if config.HeartbeatInterval > 0 { - t = time.NewTicker(config.HeartbeatInterval) - } - agent := &Agent{ - config: config, - applier: applier, - logger: logger, - appliedKeys: map[collectorKey]bool{}, - instanceId: config.GetNewInstanceId(), - agentDescription: config.GetDescription(), - remoteConfigEnabled: config.RemoteConfigEnabled(), - opampClient: opampClient, - clock: clock.RealClock{}, - done: make(chan struct{}, 1), - ticker: t, - } - - agent.logger.V(3).Info("Agent created", - "instanceId", agent.instanceId.String(), - "agentType", config.GetAgentType(), - "agentVersion", config.GetAgentVersion()) - - return agent -} - -// getHealth is called every heartbeat interval to report health. -func (agent *Agent) getHealth() *protobufs.ComponentHealth { - healthMap, err := agent.generateComponentHealthMap() - if err != nil { - return &protobufs.ComponentHealth{ - Healthy: false, - StartTimeUnixNano: agent.startTime, - LastError: err.Error(), - } - } - return &protobufs.ComponentHealth{ - Healthy: true, - StartTimeUnixNano: agent.startTime, - StatusTimeUnixNano: uint64(agent.clock.Now().UnixNano()), - LastError: "", - ComponentHealthMap: healthMap, - } -} - -// generateComponentHealthMap allows the bridge to report the status of the collector pools it owns. -// TODO: implement enhanced health messaging. -func (agent *Agent) generateComponentHealthMap() (map[string]*protobufs.ComponentHealth, error) { - cols, err := agent.applier.ListInstances() - if err != nil { - return nil, err - } - healthMap := map[string]*protobufs.ComponentHealth{} - for _, col := range cols { - key := newCollectorKey(col.GetNamespace(), col.GetName()) - healthMap[key.String()] = &protobufs.ComponentHealth{ - StartTimeUnixNano: uint64(col.ObjectMeta.GetCreationTimestamp().UnixNano()), - StatusTimeUnixNano: uint64(agent.clock.Now().UnixNano()), - Status: col.Status.Scale.StatusReplicas, - } - } - return healthMap, nil -} - -// onConnect is called when an agent is successfully connected to a server. -func (agent *Agent) onConnect() { - agent.logger.V(3).Info("Connected to the server.") -} - -// onConnectFailed is called when an agent was unable to connect to a server. -func (agent *Agent) onConnectFailed(err error) { - agent.logger.Error(err, "failed to connect to the server") -} - -// onError is called when an agent receives an error response from the server. -func (agent *Agent) onError(err *protobufs.ServerErrorResponse) { - agent.logger.Error(fmt.Errorf(err.GetErrorMessage()), "server returned an error response") -} - -// saveRemoteConfigStatus receives a status from the server when the server sets a remote configuration. -func (agent *Agent) saveRemoteConfigStatus(_ context.Context, status *protobufs.RemoteConfigStatus) { - agent.remoteConfigStatus = status -} - -// Start sets up the callbacks for the OpAMP client and begins the client's connection to the server. -func (agent *Agent) Start() error { - agent.startTime = uint64(agent.clock.Now().UnixNano()) - settings := types.StartSettings{ - OpAMPServerURL: agent.config.Endpoint, - Header: agent.config.Headers.ToHTTPHeader(), - InstanceUid: agent.instanceId.String(), - Callbacks: types.CallbacksStruct{ - OnConnectFunc: agent.onConnect, - OnConnectFailedFunc: agent.onConnectFailed, - OnErrorFunc: agent.onError, - SaveRemoteConfigStatusFunc: agent.saveRemoteConfigStatus, - GetEffectiveConfigFunc: agent.getEffectiveConfig, - OnMessageFunc: agent.onMessage, - }, - RemoteConfigStatus: agent.remoteConfigStatus, - PackagesStateProvider: nil, - Capabilities: agent.config.GetCapabilities(), - } - err := agent.opampClient.SetAgentDescription(agent.agentDescription) - if err != nil { - return err - } - err = agent.opampClient.SetHealth(agent.getHealth()) - if err != nil { - return err - } - - agent.logger.V(3).Info("Starting OpAMP client...") - - err = agent.opampClient.Start(context.Background(), settings) - if err != nil { - return err - } - - if agent.config.HeartbeatInterval > 0 { - go agent.runHeartbeat() - } - - agent.logger.V(3).Info("OpAMP Client started.") - - return nil -} - -// runHeartbeat sets health on an interval to keep the connection active. -func (agent *Agent) runHeartbeat() { - if agent.ticker == nil { - agent.logger.Info("cannot run heartbeat without setting an interval for the ticker") - return - } - for { - select { - case <-agent.ticker.C: - agent.logger.V(4).Info("sending heartbeat") - err := agent.opampClient.SetHealth(agent.getHealth()) - if err != nil { - agent.logger.Error(err, "failed to heartbeat") - return - } - case <-agent.done: - agent.ticker.Stop() - agent.logger.Info("stopping heartbeating") - return - } - } -} - -// updateAgentIdentity receives a new instanced Id from the remote server and updates the agent's instanceID field. -// The meter will be reinitialized by the onMessage function. -func (agent *Agent) updateAgentIdentity(instanceId ulid.ULID) { - agent.logger.V(3).Info("Agent identity is being changed", - "old instanceId", agent.instanceId.String(), - "new instanceid", instanceId.String()) - agent.instanceId = instanceId -} - -// getEffectiveConfig is called when a remote server needs to learn of the current effective configuration of each -// collector the agent is managing. -func (agent *Agent) getEffectiveConfig(ctx context.Context) (*protobufs.EffectiveConfig, error) { - instances, err := agent.applier.ListInstances() - if err != nil { - agent.logger.Error(err, "failed to list instances") - return nil, err - } - instanceMap := map[string]*protobufs.AgentConfigFile{} - for _, instance := range instances { - marshaled, err := yaml.Marshal(instance) - if err != nil { - agent.logger.Error(err, "failed to marhsal config") - return nil, err - } - mapKey := newCollectorKey(instance.GetNamespace(), instance.GetName()) - instanceMap[mapKey.String()] = &protobufs.AgentConfigFile{ - Body: marshaled, - ContentType: "yaml", - } - } - return &protobufs.EffectiveConfig{ - ConfigMap: &protobufs.AgentConfigMap{ - ConfigMap: instanceMap, - }, - }, nil -} - -// initMeter initializes a metric reporter instance for the agent to report runtime metrics to the -// configured destination. The settings received will be used to initialize a reporter, shutting down any previously -// running metrics reporting instances. -func (agent *Agent) initMeter(settings *protobufs.TelemetryConnectionSettings) { - reporter, err := metrics.NewMetricReporter(agent.logger, settings, agent.config.GetAgentType(), agent.config.GetAgentVersion(), agent.instanceId) - if err != nil { - agent.logger.Error(err, "failed to create metric reporter") - return - } - - if agent.metricReporter != nil { - agent.metricReporter.Shutdown() - } - agent.metricReporter = reporter -} - -// applyRemoteConfig receives a remote configuration from a remote server of the following form: -// -// map[name/namespace] -> collector CRD spec -// -// For every key in the received remote configuration, the agent attempts to apply it to the connected -// Kubernetes cluster. If an agent fails to apply a collector CRD, it will continue to the next entry. The agent will -// store the received configuration hash regardless of application status as per the OpAMP spec. -// -// INVARIANT: The caller must verify that config isn't nil _and_ the configuration has changed between calls. -func (agent *Agent) applyRemoteConfig(config *protobufs.AgentRemoteConfig) (*protobufs.RemoteConfigStatus, error) { - var multiErr error - // Apply changes from the received config map - for key, file := range config.Config.GetConfigMap() { - if len(key) == 0 || len(file.Body) == 0 { - continue - } - colKey, err := collectorKeyFromKey(key) - if err != nil { - multiErr = multierr.Append(multiErr, err) - continue - } - err = agent.applier.Apply(colKey.name, colKey.namespace, file) - if err != nil { - multiErr = multierr.Append(multiErr, err) - continue - } - agent.appliedKeys[colKey] = true - } - // Check if anything was deleted - for collectorKey := range agent.appliedKeys { - if _, ok := config.Config.GetConfigMap()[collectorKey.String()]; !ok { - err := agent.applier.Delete(collectorKey.name, collectorKey.namespace) - if err != nil { - multiErr = multierr.Append(multiErr, err) - } - } - } - agent.lastHash = config.GetConfigHash() - if multiErr != nil { - return &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: agent.lastHash, - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: multiErr.Error(), - }, multiErr - } - return &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: agent.lastHash, - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, nil -} - -// Shutdown will stop the OpAMP client gracefully. -func (agent *Agent) Shutdown() { - agent.logger.V(3).Info("Agent shutting down...") - close(agent.done) - if agent.opampClient != nil { - err := agent.opampClient.Stop(context.Background()) - if err != nil { - agent.logger.Error(err, "failed to stop client") - } - } - if agent.metricReporter != nil { - agent.metricReporter.Shutdown() - } -} - -// onMessage is called when the client receives a new message from the connected OpAMP server. The agent is responsible -// for checking if it should apply a new remote configuration. The agent will also initialize metrics based on the -// settings received from the server. The agent is also able to update its identifier if it needs to. -func (agent *Agent) onMessage(ctx context.Context, msg *types.MessageData) { - // If we received remote configuration, and it's not the same as the previously applied one - if agent.remoteConfigEnabled && msg.RemoteConfig != nil && !bytes.Equal(agent.lastHash, msg.RemoteConfig.GetConfigHash()) { - var err error - status, err := agent.applyRemoteConfig(msg.RemoteConfig) - if err != nil { - agent.logger.Error(err, "failed to apply remote config") - } - err = agent.opampClient.SetRemoteConfigStatus(status) - if err != nil { - agent.logger.Error(err, "failed to set remote config status") - return - } - err = agent.opampClient.UpdateEffectiveConfig(ctx) - if err != nil { - agent.logger.Error(err, "failed to update effective config") - } - } - - // The instance id is updated prior to the meter initialization so that the new meter will report using the updated - // instanceId. - if msg.AgentIdentification != nil { - newInstanceId, err := ulid.Parse(msg.AgentIdentification.NewInstanceUid) - if err != nil { - agent.logger.Error(err, "couldn't parse instance UID") - return - } - agent.updateAgentIdentity(newInstanceId) - } - - if msg.OwnMetricsConnSettings != nil { - agent.initMeter(msg.OwnMetricsConnSettings) - } -} diff --git a/cmd/operator-opamp-bridge/agent/agent_test.go b/cmd/operator-opamp-bridge/agent/agent_test.go deleted file mode 100644 index b6086c79b..000000000 --- a/cmd/operator-opamp-bridge/agent/agent_test.go +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package agent - -import ( - "context" - "crypto/rand" - "fmt" - "os" - "sort" - "testing" - "time" - - "github.com/go-logr/logr" - "github.com/oklog/ulid/v2" - "github.com/open-telemetry/opamp-go/client" - "github.com/open-telemetry/opamp-go/client/types" - "github.com/open-telemetry/opamp-go/protobufs" - "github.com/spf13/pflag" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - testingclock "k8s.io/utils/clock/testing" - "sigs.k8s.io/controller-runtime/pkg/client/fake" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" -) - -const ( - collectorBasicFile = "testdata/basic.yaml" - collectorUpdatedFile = "testdata/updated.yaml" - collectorInvalidFile = "testdata/invalid.yaml" - - testNamespace = "testnamespace" - testCollectorName = "collector" - otherCollectorName = "other" - emptyConfigHash = "" - testCollectorKey = testNamespace + "/" + testCollectorName - otherCollectorKey = testNamespace + "/" + otherCollectorName - - agentTestFileName = "testdata/agent.yaml" - agentTestFileHttpName = "testdata/agenthttpbasic.yaml" - agentTestFileBasicComponentsAllowedName = "testdata/agentbasiccomponentsallowed.yaml" - agentTestFileBatchNotAllowedName = "testdata/agentbatchnotallowed.yaml" - agentTestFileNoProcessorsAllowedName = "testdata/agentnoprocessorsallowed.yaml" - - // collectorStartTime is set to the result of a zero'd out creation timestamp - // read more here https://github.com/open-telemetry/opentelemetry-go/issues/4268 - // we could attempt to hack the creation timestamp, but this is a constant and far easier. - collectorStartTime = uint64(11651379494838206464) -) - -var ( - l = logr.Discard() - _ client.OpAMPClient = &mockOpampClient{} - - basicYamlConfigHash = getConfigHash(testCollectorKey, collectorBasicFile) - invalidYamlConfigHash = getConfigHash(testCollectorKey, collectorInvalidFile) - updatedYamlConfigHash = getConfigHash(testCollectorKey, collectorUpdatedFile) - otherUpdatedYamlConfigHash = getConfigHash(otherCollectorKey, collectorUpdatedFile) -) - -func getConfigHash(key, file string) string { - fi, err := os.Stat(file) - if err != nil { - return "" - } - // get the size - size := fi.Size() - return fmt.Sprintf("%s%d", key, size) -} - -type mockOpampClient struct { - lastStatus *protobufs.RemoteConfigStatus - lastEffectiveConfig *protobufs.EffectiveConfig - settings types.StartSettings -} - -func (m *mockOpampClient) Start(_ context.Context, settings types.StartSettings) error { - m.settings = settings - return nil -} - -func (m *mockOpampClient) Stop(_ context.Context) error { - return nil -} - -func (m *mockOpampClient) SetAgentDescription(_ *protobufs.AgentDescription) error { - return nil -} - -func (m *mockOpampClient) AgentDescription() *protobufs.AgentDescription { - return nil -} - -func (m *mockOpampClient) SetHealth(_ *protobufs.ComponentHealth) error { - return nil -} - -func (m *mockOpampClient) UpdateEffectiveConfig(ctx context.Context) error { - effectiveConfig, err := m.settings.Callbacks.GetEffectiveConfig(ctx) - if err != nil { - return err - } - m.lastEffectiveConfig = effectiveConfig - return nil -} - -func (m *mockOpampClient) SetRemoteConfigStatus(status *protobufs.RemoteConfigStatus) error { - m.lastStatus = status - return nil -} - -func (m *mockOpampClient) SetPackageStatuses(_ *protobufs.PackageStatuses) error { - return nil -} - -func getFakeApplier(t *testing.T, conf *config.Config) *operator.Client { - schemeBuilder := runtime.NewSchemeBuilder(func(s *runtime.Scheme) error { - s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) - metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) - return nil - }) - scheme := runtime.NewScheme() - err := schemeBuilder.AddToScheme(scheme) - require.NoError(t, err, "Should be able to add custom types") - c := fake.NewClientBuilder().WithScheme(scheme) - return operator.NewClient("test-bridge", l, c.Build(), conf.GetComponentsAllowed()) -} - -func TestAgent_getHealth(t *testing.T) { - fakeClock := testingclock.NewFakeClock(time.Now()) - type fields struct { - configFile string - } - type args struct { - ctx context.Context - // List of mappings from namespace/name to a config file, tests are run in order of list - configs []map[string]string - } - tests := []struct { - name string - args args - fields fields - // want is evaluated with the corresponding configs' index. - want []*protobufs.ComponentHealth - }{ - { - name: "no data", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configs: nil, - }, - want: []*protobufs.ComponentHealth{ - { - Healthy: true, - StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - LastError: "", - Status: "", - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - ComponentHealthMap: map[string]*protobufs.ComponentHealth{}, - }, - }, - }, - { - name: "base case", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configs: []map[string]string{ - { - testCollectorKey: collectorBasicFile, - }, - }, - }, - want: []*protobufs.ComponentHealth{ - { - Healthy: true, - StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - ComponentHealthMap: map[string]*protobufs.ComponentHealth{ - "testnamespace/collector": { - Healthy: false, // we're working with mocks so the status will never be reconciled. - StartTimeUnixNano: collectorStartTime, - LastError: "", - Status: "", - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - }, - }, - }, - }, - }, - { - name: "two collectors", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configs: []map[string]string{ - { - testCollectorKey: collectorBasicFile, - otherCollectorKey: collectorUpdatedFile, - }, - }, - }, - want: []*protobufs.ComponentHealth{ - { - Healthy: true, - StartTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - ComponentHealthMap: map[string]*protobufs.ComponentHealth{ - "testnamespace/collector": { - Healthy: false, // we're working with mocks so the status will never be reconciled. - StartTimeUnixNano: collectorStartTime, - LastError: "", - Status: "", - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - }, - "testnamespace/other": { - Healthy: false, // we're working with mocks so the status will never be reconciled. - StartTimeUnixNano: collectorStartTime, - LastError: "", - Status: "", - StatusTimeUnixNano: uint64(fakeClock.Now().UnixNano()), - }, - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - mockClient := &mockOpampClient{} - conf := config.NewConfig(logr.Discard()) - loadErr := config.LoadFromFile(conf, tt.fields.configFile) - require.NoError(t, loadErr, "should be able to load config") - applier := getFakeApplier(t, conf) - agent := NewAgent(l, applier, conf, mockClient) - agent.clock = fakeClock - err := agent.Start() - defer agent.Shutdown() - require.NoError(t, err, "should be able to start agent") - if len(tt.args.configs) > 0 { - require.True(t, len(tt.args.configs) == len(tt.want), "must have an equal amount of configs and checks.") - } else { - require.Len(t, tt.want, 1, "must have exactly one want if no config is supplied.") - require.Equal(t, tt.want[0], agent.getHealth()) - } - for i, configMap := range tt.args.configs { - data, err := getMessageDataFromConfigFile(configMap) - require.NoError(t, err, "should be able to load data") - agent.onMessage(tt.args.ctx, data) - effectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) - require.NoError(t, err, "should be able to get effective config") - // We should only expect this to happen if we supply configuration - assert.Equal(t, effectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") - assert.NotNilf(t, effectiveConfig.ConfigMap.GetConfigMap(), "configmap should have data") - assert.Equal(t, tt.want[i], agent.getHealth()) - } - }) - } -} - -func TestAgent_onMessage(t *testing.T) { - type fields struct { - configFile string - } - type args struct { - ctx context.Context - // Mapping from namespace/name to a config in testdata - configFile map[string]string - // Mapping from namespace/name to a config in testdata (for testing updates) - nextConfigFile map[string]string - } - type want struct { - // Mapping from namespace/name to a list of expected contents - contents map[string][]string - // Mapping from namespace/name to a list of updated expected contents - nextContents map[string][]string - // The status after the initial config loading - status *protobufs.RemoteConfigStatus - // The status after the updated config loading - nextStatus *protobufs.RemoteConfigStatus - } - tests := []struct { - name string - fields fields - args args - want want - }{ - { - name: "no data", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: nil, - }, - want: want{ - contents: map[string][]string{}, - status: nil, - }, - }, - { - name: "base case", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "receivers: [otlp]", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - { - name: "base case http", - fields: fields{ - configFile: agentTestFileHttpName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "receivers: [otlp]", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - { - name: "failure", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorInvalidFile, - }, - }, - want: want{ - contents: nil, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(invalidYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "error converting YAML to JSON: yaml: line 23: could not find expected ':'", - }, - }, - }, - { - name: "all components are allowed", - fields: fields{ - configFile: agentTestFileBasicComponentsAllowedName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "receivers: [otlp]", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - { - name: "batch not allowed", - fields: fields{ - configFile: agentTestFileBatchNotAllowedName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - }, - want: want{ - contents: nil, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "Items in config are not allowed: [processors.batch]", - }, - }, - }, - { - name: "processors not allowed", - fields: fields{ - configFile: agentTestFileNoProcessorsAllowedName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - }, - want: want{ - contents: nil, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "Items in config are not allowed: [processors]", - }, - }, - }, - { - name: "can update config and replicas", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - nextConfigFile: map[string]string{ - testCollectorKey: collectorUpdatedFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "replicas: 1", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - nextContents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: [memory_limiter, batch]", - "replicas: 3", - "status:", - }, - }, - nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(updatedYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - { - name: "cannot update with bad config", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - nextConfigFile: map[string]string{ - testCollectorKey: collectorInvalidFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "replicas: 1", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - nextContents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "replicas: 1", - "status:", - }, - }, - nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(invalidYamlConfigHash), // The new hash should be of the bad config - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_FAILED, - ErrorMessage: "error converting YAML to JSON: yaml: line 23: could not find expected ':'", - }, - }, - }, - { - name: "update with new collector", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - nextConfigFile: map[string]string{ - testCollectorKey: collectorBasicFile, - otherCollectorKey: collectorUpdatedFile, - }, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - nextContents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "status:", - }, - otherCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + otherCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: [memory_limiter, batch]", - "status:", - }, - }, - nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash + otherUpdatedYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - { - name: "can delete existing collector", - fields: fields{ - configFile: agentTestFileName, - }, - args: args{ - ctx: context.Background(), - configFile: map[string]string{ - testCollectorKey: collectorBasicFile, - }, - nextConfigFile: map[string]string{}, - }, - want: want{ - contents: map[string][]string{ - testCollectorKey: { - "kind: OpenTelemetryCollector", - "name: " + testCollectorName, - "namespace: " + testNamespace, - "send_batch_size: 10000", - "processors: []", - "status:", - }, - }, - status: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(basicYamlConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - nextContents: map[string][]string{}, - nextStatus: &protobufs.RemoteConfigStatus{ - LastRemoteConfigHash: []byte(emptyConfigHash), - Status: protobufs.RemoteConfigStatuses_RemoteConfigStatuses_APPLIED, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - mockClient := &mockOpampClient{} - conf := config.NewConfig(logr.Discard()) - loadErr := config.LoadFromFile(conf, tt.fields.configFile) - require.NoError(t, loadErr, "should be able to load config") - applier := getFakeApplier(t, conf) - agent := NewAgent(l, applier, conf, mockClient) - err := agent.Start() - defer agent.Shutdown() - require.NoError(t, err, "should be able to start agent") - data, err := getMessageDataFromConfigFile(tt.args.configFile) - require.NoError(t, err, "should be able to load data") - agent.onMessage(tt.args.ctx, data) - effectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) - require.NoError(t, err, "should be able to get effective config") - if tt.args.configFile != nil { - // We should only expect this to happen if we supply configuration - assert.Equal(t, effectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") - } - assert.NotNilf(t, effectiveConfig.ConfigMap.GetConfigMap(), "configmap should have data") - for colNameNamespace, expectedContents := range tt.want.contents { - assert.Contains(t, effectiveConfig.ConfigMap.GetConfigMap(), colNameNamespace) - for _, content := range expectedContents { - asString := string(effectiveConfig.ConfigMap.GetConfigMap()[colNameNamespace].GetBody()) - assert.Contains(t, asString, content) - } - } - assert.Equal(t, tt.want.status, mockClient.lastStatus) - if tt.args.nextConfigFile == nil { - // Nothing left to do! - return - } - nextData, err := getMessageDataFromConfigFile(tt.args.nextConfigFile) - require.NoError(t, err, "should be able to load updated data") - agent.onMessage(tt.args.ctx, nextData) - nextEffectiveConfig, err := agent.getEffectiveConfig(tt.args.ctx) - require.NoError(t, err, "should be able to get updated effective config") - assert.Equal(t, nextEffectiveConfig, mockClient.lastEffectiveConfig, "client's config should be updated") - assert.NotNilf(t, nextEffectiveConfig.ConfigMap.GetConfigMap(), "configmap should have updated data") - for colNameNamespace, expectedContents := range tt.want.nextContents { - assert.Contains(t, nextEffectiveConfig.ConfigMap.GetConfigMap(), colNameNamespace) - for _, content := range expectedContents { - asString := string(nextEffectiveConfig.ConfigMap.GetConfigMap()[colNameNamespace].GetBody()) - assert.Contains(t, asString, content) - } - } - assert.Equal(t, tt.want.nextStatus, mockClient.lastStatus) - }) - } -} - -func Test_CanUpdateIdentity(t *testing.T) { - mockClient := &mockOpampClient{} - - fs := config.GetFlagSet(pflag.ContinueOnError) - configFlag := []string{"--config-file", agentTestFileName} - err := fs.Parse(configFlag) - assert.NoError(t, err) - conf := config.NewConfig(logr.Discard()) - loadErr := config.LoadFromFile(conf, agentTestFileName) - require.NoError(t, loadErr, "should be able to load config") - applier := getFakeApplier(t, conf) - agent := NewAgent(l, applier, conf, mockClient) - err = agent.Start() - defer agent.Shutdown() - require.NoError(t, err, "should be able to start agent") - previousInstanceId := agent.instanceId.String() - entropy := ulid.Monotonic(rand.Reader, 0) - newId := ulid.MustNew(ulid.MaxTime(), entropy) - agent.onMessage(context.Background(), &types.MessageData{ - AgentIdentification: &protobufs.AgentIdentification{ - NewInstanceUid: newId.String(), - }, - }) - assert.NotEqual(t, previousInstanceId, newId.String()) - assert.Equal(t, agent.instanceId, newId) -} - -func getMessageDataFromConfigFile(filemap map[string]string) (*types.MessageData, error) { - toReturn := &types.MessageData{} - if filemap == nil { - return toReturn, nil - } - configs := map[string]*protobufs.AgentConfigFile{} - hash := "" - fileNames := make([]string, len(filemap)) - i := 0 - for k := range filemap { - fileNames[i] = k - i++ - } - // We sort the filenames so we get consistent results for multiple file loads - sort.Strings(fileNames) - - for _, key := range fileNames { - yamlFile, err := os.ReadFile(filemap[key]) - if err != nil { - return toReturn, err - } - configs[key] = &protobufs.AgentConfigFile{ - Body: yamlFile, - ContentType: "yaml", - } - hash = hash + key + fmt.Sprint(len(yamlFile)) - } - toReturn.RemoteConfig = &protobufs.AgentRemoteConfig{ - Config: &protobufs.AgentConfigMap{ - ConfigMap: configs, - }, - // just use the file name for the hash - ConfigHash: []byte(hash), - } - return toReturn, nil -} diff --git a/cmd/operator-opamp-bridge/agent/collector_key.go b/cmd/operator-opamp-bridge/agent/collector_key.go deleted file mode 100644 index d2e6c8d4f..000000000 --- a/cmd/operator-opamp-bridge/agent/collector_key.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package agent - -import ( - "errors" - "fmt" - "strings" -) - -type collectorKey struct { - name string - namespace string -} - -func newCollectorKey(namespace string, name string) collectorKey { - return collectorKey{name: name, namespace: namespace} -} - -func collectorKeyFromKey(key string) (collectorKey, error) { - s := strings.Split(key, "/") - // We expect map keys to be of the form name/namespace - if len(s) != 2 { - return collectorKey{}, errors.New("invalid key") - } - return newCollectorKey(s[0], s[1]), nil -} - -func (k collectorKey) String() string { - return fmt.Sprintf("%s/%s", k.namespace, k.name) -} diff --git a/cmd/operator-opamp-bridge/agent/collector_key_test.go b/cmd/operator-opamp-bridge/agent/collector_key_test.go deleted file mode 100644 index 7a27180f6..000000000 --- a/cmd/operator-opamp-bridge/agent/collector_key_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package agent - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_collectorKeyFromKey(t *testing.T) { - type args struct { - key string - } - tests := []struct { - name string - args args - want collectorKey - wantErr assert.ErrorAssertionFunc - }{ - { - name: "base case", - args: args{ - key: "namespace/good", - }, - want: collectorKey{ - name: "good", - namespace: "namespace", - }, - wantErr: assert.NoError, - }, - { - name: "unable to get key", - args: args{ - key: "badnamespace", - }, - want: collectorKey{}, - wantErr: assert.Error, - }, - { - name: "too many slashes", - args: args{ - key: "too/many/slashes", - }, - want: collectorKey{}, - wantErr: assert.Error, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got, err := collectorKeyFromKey(tt.args.key) - if !tt.wantErr(t, err, fmt.Sprintf("collectorKeyFromKey(%v)", tt.args.key)) { - return - } - assert.Equalf(t, tt.want, got, "collectorKeyFromKey(%v)", tt.args.key) - }) - } -} - -func Test_collectorKey_String(t *testing.T) { - type fields struct { - name string - namespace string - } - tests := []struct { - name string - fields fields - want string - }{ - { - name: "can make a key", - fields: fields{ - name: "good", - namespace: "namespace", - }, - want: "namespace/good", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - k := newCollectorKey(tt.fields.namespace, tt.fields.name) - assert.Equalf(t, tt.want, k.String(), "String()") - }) - } -} diff --git a/cmd/operator-opamp-bridge/agent/testdata/agent.yaml b/cmd/operator-opamp-bridge/agent/testdata/agent.yaml deleted file mode 100644 index 5a70b06a8..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/agent.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml deleted file mode 100644 index c994ad122..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/agentbasiccomponentsallowed.yaml +++ /dev/null @@ -1,22 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true -componentsAllowed: - receivers: - - otlp - processors: - - memory_limiter - - batch - exporters: - - debug diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml deleted file mode 100644 index 1009f079a..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/agentbatchnotallowed.yaml +++ /dev/null @@ -1,21 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true -componentsAllowed: - receivers: - - otlp - processors: - - memory_limiter - exporters: - - debug diff --git a/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml b/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml deleted file mode 100644 index 2dc1532d4..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/agenthttpbasic.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: http://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml b/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml deleted file mode 100644 index fe53d0a00..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/agentnoprocessorsallowed.yaml +++ /dev/null @@ -1,19 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true -componentsAllowed: - receivers: - - otlp - exporters: - - debug diff --git a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml b/cmd/operator-opamp-bridge/agent/testdata/basic.yaml deleted file mode 100644 index 410a328ed..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/basic.yaml +++ /dev/null @@ -1,30 +0,0 @@ -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - "opentelemetry.io/opamp-managed": "true" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml b/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml deleted file mode 100644 index 2a060581f..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/invalid.yaml +++ /dev/null @@ -1,30 +0,0 @@ -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - "opentelemetry.io/opamp-managed": "true" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - GARBAGE - exporters: - debug: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml b/cmd/operator-opamp-bridge/agent/testdata/updated.yaml deleted file mode 100644 index 53ce4af49..000000000 --- a/cmd/operator-opamp-bridge/agent/testdata/updated.yaml +++ /dev/null @@ -1,31 +0,0 @@ -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - "opentelemetry.io/opamp-managed": "test-bridge" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [memory_limiter, batch] - exporters: [debug] - replicas: 3 diff --git a/cmd/operator-opamp-bridge/config/config.go b/cmd/operator-opamp-bridge/config/config.go deleted file mode 100644 index 38f06d6ff..000000000 --- a/cmd/operator-opamp-bridge/config/config.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "crypto/rand" - "errors" - "fmt" - "io/fs" - "net/url" - "os" - "runtime" - "time" - - "github.com/go-logr/logr" - "github.com/oklog/ulid/v2" - opampclient "github.com/open-telemetry/opamp-go/client" - "github.com/open-telemetry/opamp-go/protobufs" - "github.com/spf13/pflag" - "gopkg.in/yaml.v2" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - k8sruntime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/klog/v2" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/log/zap" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/logger" -) - -const ( - agentType = "io.opentelemetry.operator-opamp-bridge" -) - -var ( - agentVersion = os.Getenv("OPAMP_VERSION") - hostname, _ = os.Hostname() - schemeBuilder = k8sruntime.NewSchemeBuilder(registerKnownTypes) -) - -func registerKnownTypes(s *k8sruntime.Scheme) error { - s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) - metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) - return nil -} - -func GetLogger() logr.Logger { - return zap.New(zap.UseFlagOptions(&zapCmdLineOpts)) -} - -type Capability string - -const ( - Unspecified Capability = "Unspecified" - ReportsStatus Capability = "ReportsStatus" - AcceptsRemoteConfig Capability = "AcceptsRemoteConfig" - ReportsEffectiveConfig Capability = "ReportsEffectiveConfig" - AcceptsPackages Capability = "AcceptsPackages" - ReportsPackageStatuses Capability = "ReportsPackageStatuses" - ReportsOwnTraces Capability = "ReportsOwnTraces" - ReportsOwnMetrics Capability = "ReportsOwnMetrics" - ReportsOwnLogs Capability = "ReportsOwnLogs" - AcceptsOpAMPConnectionSettings Capability = "AcceptsOpAMPConnectionSettings" - AcceptsOtherConnectionSettings Capability = "AcceptsOtherConnectionSettings" - AcceptsRestartCommand Capability = "AcceptsRestartCommand" - ReportsHealth Capability = "ReportsHealth" - ReportsRemoteConfig Capability = "ReportsRemoteConfig" -) - -type Config struct { - // KubeConfigFilePath is empty if InClusterConfig() should be used, otherwise it's a path to where a valid - // kubernetes configuration file. - KubeConfigFilePath string `yaml:"kubeConfigFilePath,omitempty"` - ListenAddr string `yaml:"listenAddr,omitempty"` - ClusterConfig *rest.Config `yaml:"-"` - RootLogger logr.Logger `yaml:"-"` - - // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) - ComponentsAllowed map[string][]string `yaml:"componentsAllowed,omitempty"` - Endpoint string `yaml:"endpoint"` - Headers Headers `yaml:"headers,omitempty"` - Capabilities map[Capability]bool `yaml:"capabilities"` - HeartbeatInterval time.Duration `yaml:"heartbeatInterval,omitempty"` - Name string `yaml:"name,omitempty"` -} - -func NewConfig(logger logr.Logger) *Config { - return &Config{ - RootLogger: logger, - } -} - -func (c *Config) CreateClient() opampclient.OpAMPClient { - opampLogger := logger.NewLogger(c.RootLogger.WithName("client")) - agentScheme := c.GetAgentScheme() - if agentScheme == "http" || agentScheme == "https" { - return opampclient.NewHTTP(opampLogger) - } - return opampclient.NewWebSocket(opampLogger) -} - -func (c *Config) GetComponentsAllowed() map[string]map[string]bool { - m := make(map[string]map[string]bool) - for component, componentSet := range c.ComponentsAllowed { - if _, ok := m[component]; !ok { - m[component] = make(map[string]bool) - } - for _, s := range componentSet { - m[component][s] = true - } - } - return m -} - -func (c *Config) GetCapabilities() protobufs.AgentCapabilities { - var capabilities int32 - for capability, enabled := range c.Capabilities { - if !enabled { - continue - } - // This is a helper so that we don't force consumers to prefix every agent capability - formatted := fmt.Sprintf("AgentCapabilities_%s", capability) - if v, ok := protobufs.AgentCapabilities_value[formatted]; ok { - capabilities = v | capabilities - } - } - return protobufs.AgentCapabilities(capabilities) -} - -func (c *Config) GetAgentScheme() string { - uri, err := url.ParseRequestURI(c.Endpoint) - if err != nil { - return "" - } - return uri.Scheme -} - -func (c *Config) GetAgentType() string { - return agentType -} - -func (c *Config) GetAgentVersion() string { - return agentVersion -} - -func (c *Config) GetDescription() *protobufs.AgentDescription { - return &protobufs.AgentDescription{ - IdentifyingAttributes: []*protobufs.KeyValue{ - keyValuePair("service.name", c.GetAgentType()), - keyValuePair("service.version", c.GetAgentVersion()), - }, - NonIdentifyingAttributes: []*protobufs.KeyValue{ - keyValuePair("os.family", runtime.GOOS), - keyValuePair("host.name", hostname), - }, - } -} - -func keyValuePair(key string, value string) *protobufs.KeyValue { - return &protobufs.KeyValue{ - Key: key, - Value: &protobufs.AnyValue{ - Value: &protobufs.AnyValue_StringValue{ - StringValue: value, - }, - }, - } -} - -func (c *Config) GetNewInstanceId() ulid.ULID { - entropy := ulid.Monotonic(rand.Reader, 0) - return ulid.MustNew(ulid.Timestamp(time.Now()), entropy) -} - -func (c *Config) RemoteConfigEnabled() bool { - capabilities := c.GetCapabilities() - return capabilities&protobufs.AgentCapabilities_AgentCapabilities_AcceptsRemoteConfig != 0 -} - -func (c *Config) GetKubernetesClient() (client.Client, error) { - err := schemeBuilder.AddToScheme(scheme.Scheme) - if err != nil { - return nil, err - } - return client.New(c.ClusterConfig, client.Options{ - Scheme: scheme.Scheme, - }) -} - -func Load(logger logr.Logger, flagSet *pflag.FlagSet) (*Config, error) { - cfg := NewConfig(logger) - - // load the config from the config file - configFilePath, err := getConfigFilePath(flagSet) - if err != nil { - return nil, err - } - err = LoadFromFile(cfg, configFilePath) - if err != nil { - return nil, err - } - - err = LoadFromCLI(cfg, flagSet) - if err != nil { - return nil, err - } - - return cfg, nil -} - -func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { - var err error - klog.SetLogger(target.RootLogger) - ctrl.SetLogger(target.RootLogger) - - target.KubeConfigFilePath, err = getKubeConfigFilePath(flagSet) - if err != nil { - return err - } - clusterConfig, err := clientcmd.BuildConfigFromFlags("", target.KubeConfigFilePath) - if err != nil { - pathError := &fs.PathError{} - if ok := errors.As(err, &pathError); !ok { - return err - } - clusterConfig, err = rest.InClusterConfig() - if err != nil { - return err - } - } - target.ClusterConfig = clusterConfig - - target.ListenAddr, err = getListenAddr(flagSet) - if err != nil { - return err - } - - target.HeartbeatInterval, err = getHeartbeatInterval(flagSet) - if err != nil { - return err - } - - target.Name, err = getName(flagSet) - if err != nil { - return err - } - - return nil -} - -func LoadFromFile(cfg *Config, configFile string) error { - yamlFile, err := os.ReadFile(configFile) - if err != nil { - return err - } - if err = yaml.UnmarshalStrict(yamlFile, cfg); err != nil { - return fmt.Errorf("error unmarshaling YAML: %w", err) - } - return nil -} diff --git a/cmd/operator-opamp-bridge/config/config_test.go b/cmd/operator-opamp-bridge/config/config_test.go deleted file mode 100644 index e9caeb2b0..000000000 --- a/cmd/operator-opamp-bridge/config/config_test.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "fmt" - "testing" - "time" - - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" -) - -func TestLoad(t *testing.T) { - type args struct { - file string - } - tests := []struct { - name string - args args - want *Config - wantErr assert.ErrorAssertionFunc - }{ - { - name: "base case", - args: args{ - file: "./testdata/agent.yaml", - }, - want: &Config{ - RootLogger: logr.Discard(), - Endpoint: "ws://127.0.0.1:4320/v1/opamp", - Capabilities: map[Capability]bool{ - AcceptsRemoteConfig: true, - ReportsEffectiveConfig: true, - ReportsOwnTraces: true, - ReportsOwnMetrics: true, - ReportsOwnLogs: true, - AcceptsOpAMPConnectionSettings: true, - AcceptsOtherConnectionSettings: true, - AcceptsRestartCommand: true, - ReportsHealth: true, - ReportsRemoteConfig: true, - AcceptsPackages: false, - ReportsPackageStatuses: false, - }, - }, - wantErr: assert.NoError, - }, - { - name: "http base case", - args: args{ - file: "./testdata/agenthttpbasic.yaml", - }, - want: &Config{ - RootLogger: logr.Discard(), - Endpoint: "http://127.0.0.1:4320/v1/opamp", - HeartbeatInterval: 45 * time.Second, - Name: "http-test-bridge", - Capabilities: map[Capability]bool{ - AcceptsRemoteConfig: true, - ReportsEffectiveConfig: true, - ReportsOwnTraces: true, - ReportsOwnMetrics: true, - ReportsOwnLogs: true, - AcceptsOpAMPConnectionSettings: true, - AcceptsOtherConnectionSettings: true, - AcceptsRestartCommand: true, - ReportsHealth: true, - ReportsRemoteConfig: true, - AcceptsPackages: false, - ReportsPackageStatuses: false, - }, - }, - wantErr: assert.NoError, - }, - { - name: "basic components allowed", - args: args{ - file: "./testdata/agentbasiccomponentsallowed.yaml", - }, - want: &Config{ - RootLogger: logr.Discard(), - Endpoint: "ws://127.0.0.1:4320/v1/opamp", - Capabilities: map[Capability]bool{ - AcceptsRemoteConfig: true, - ReportsEffectiveConfig: true, - ReportsOwnTraces: true, - ReportsOwnMetrics: true, - ReportsOwnLogs: true, - AcceptsOpAMPConnectionSettings: true, - AcceptsOtherConnectionSettings: true, - AcceptsRestartCommand: true, - ReportsHealth: true, - ReportsRemoteConfig: true, - AcceptsPackages: false, - ReportsPackageStatuses: false, - }, - ComponentsAllowed: map[string][]string{ - "receivers": { - "otlp", - }, - "processors": { - "memory_limiter", - "batch", - }, - "exporters": { - "logging", - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "bad configuration", - args: args{ - file: "./testdata/agentbadconf.yaml", - }, - want: &Config{ - // We do unmarshal partially - Endpoint: "http://127.0.0.1:4320/v1/opamp", - }, - wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { - return assert.ErrorContains(t, err, "error unmarshaling YAML", i...) - }, - }, - { - name: "base case with headers", - args: args{ - file: "./testdata/agentwithheaders.yaml", - }, - want: &Config{ - RootLogger: logr.Discard(), - Endpoint: "ws://127.0.0.1:4320/v1/opamp", - Headers: map[string]string{ - "authentication": "access-12345-token", - "my-header-key": "my-header-value", - }, - Capabilities: map[Capability]bool{ - AcceptsRemoteConfig: true, - ReportsEffectiveConfig: true, - ReportsOwnTraces: true, - ReportsOwnMetrics: true, - ReportsOwnLogs: true, - AcceptsOpAMPConnectionSettings: true, - AcceptsOtherConnectionSettings: true, - AcceptsRestartCommand: true, - ReportsHealth: true, - ReportsRemoteConfig: true, - AcceptsPackages: false, - ReportsPackageStatuses: false, - }, - }, - wantErr: assert.NoError, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := NewConfig(logr.Discard()) - err := LoadFromFile(got, tt.args.file) - if !tt.wantErr(t, err, fmt.Sprintf("Load(%v)", tt.args.file)) { - return - } - // there are some fields we don't care about, so we ignore them. - got.ClusterConfig = tt.want.ClusterConfig - got.RootLogger = tt.want.RootLogger - assert.Equalf(t, tt.want, got, "Load(%v)", tt.args.file) - - }) - } -} diff --git a/cmd/operator-opamp-bridge/config/flags.go b/cmd/operator-opamp-bridge/config/flags.go deleted file mode 100644 index 2fe101e29..000000000 --- a/cmd/operator-opamp-bridge/config/flags.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "flag" - "path/filepath" - "time" - - "github.com/spf13/pflag" - "k8s.io/client-go/util/homedir" - "sigs.k8s.io/controller-runtime/pkg/log/zap" -) - -// Flag names. -const ( - opampBridgeName = "opamp-bridge" - defaultConfigFilePath = "/conf/remoteconfiguration.yaml" - configFilePathFlagName = "config-file" - listenAddrFlagName = "listen-addr" - kubeConfigPathFlagName = "kubeconfig-path" - heartbeatIntervalFlagName = "heartbeat-interval" - nameFlagName = "name" - defaultHeartbeatInterval = 30 * time.Second -) - -// We can't bind this flag to our FlagSet, so we need to handle it separately. -var zapCmdLineOpts zap.Options - -func GetFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { - flagSet := pflag.NewFlagSet(opampBridgeName, errorHandling) - flagSet.String(configFilePathFlagName, defaultConfigFilePath, "The path to the config file.") - flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") - flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file.") - flagSet.Duration(heartbeatIntervalFlagName, defaultHeartbeatInterval, "The interval to use for sending a heartbeat. Setting it to 0 disables the heartbeat.") - flagSet.String(nameFlagName, opampBridgeName, "The name of the bridge to use for querying managed collectors.") - zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) - zapCmdLineOpts.BindFlags(zapFlagSet) - flagSet.AddGoFlagSet(zapFlagSet) - return flagSet -} - -func getHeartbeatInterval(flagset *pflag.FlagSet) (time.Duration, error) { - return flagset.GetDuration(heartbeatIntervalFlagName) -} - -func getConfigFilePath(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(configFilePathFlagName) -} - -func getName(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(nameFlagName) -} - -func getKubeConfigFilePath(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(kubeConfigPathFlagName) -} - -func getListenAddr(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(listenAddrFlagName) -} diff --git a/cmd/operator-opamp-bridge/config/flags_test.go b/cmd/operator-opamp-bridge/config/flags_test.go deleted file mode 100644 index b43b99f27..000000000 --- a/cmd/operator-opamp-bridge/config/flags_test.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "path/filepath" - "testing" - "time" - - "github.com/spf13/pflag" - "github.com/stretchr/testify/assert" -) - -func TestGetFlagSet(t *testing.T) { - fs := GetFlagSet(pflag.ExitOnError) - - // Check if each flag exists - assert.NotNil(t, fs.Lookup(configFilePathFlagName), "Flag %s not found", configFilePathFlagName) - assert.NotNil(t, fs.Lookup(listenAddrFlagName), "Flag %s not found", listenAddrFlagName) - assert.NotNil(t, fs.Lookup(kubeConfigPathFlagName), "Flag %s not found", kubeConfigPathFlagName) -} - -func TestFlagGetters(t *testing.T) { - tests := []struct { - name string - flagArgs []string - expectedValue interface{} - expectedErr bool - getterFunc func(*pflag.FlagSet) (interface{}, error) - }{ - { - name: "GetConfigFilePath", - flagArgs: []string{"--" + configFilePathFlagName, "/path/to/config"}, - expectedValue: "/path/to/config", - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, - }, - { - name: "GetKubeConfigFilePath", - flagArgs: []string{"--" + kubeConfigPathFlagName, filepath.Join("~", ".kube", "config")}, - expectedValue: filepath.Join("~", ".kube", "config"), - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getKubeConfigFilePath(fs) }, - }, - { - name: "GetName", - flagArgs: []string{"--" + nameFlagName, "test"}, - expectedValue: "test", - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getName(fs) }, - }, - { - name: "GetListenAddr", - flagArgs: []string{"--" + listenAddrFlagName, ":8081"}, - expectedValue: ":8081", - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getListenAddr(fs) }, - }, - { - name: "GetHeartbeatInterval", - flagArgs: []string{"--" + heartbeatIntervalFlagName, "45s"}, - expectedValue: 45 * time.Second, - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getHeartbeatInterval(fs) }, - }, - { - name: "InvalidFlag", - flagArgs: []string{"--invalid-flag", "value"}, - expectedErr: true, - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - fs := GetFlagSet(pflag.ContinueOnError) - err := fs.Parse(tt.flagArgs) - - // If an error is expected during parsing, we check it here. - if tt.expectedErr { - assert.Error(t, err) - return - } - - got, err := tt.getterFunc(fs) - assert.NoError(t, err) - assert.Equal(t, tt.expectedValue, got) - }) - } -} diff --git a/cmd/operator-opamp-bridge/config/headers.go b/cmd/operator-opamp-bridge/config/headers.go deleted file mode 100644 index 4ef242e3c..000000000 --- a/cmd/operator-opamp-bridge/config/headers.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import "net/http" - -type Headers map[string]string - -func (h Headers) ToHTTPHeader() http.Header { - newMap := make(map[string][]string) - for key, value := range h { - newMap[key] = []string{value} - } - return newMap -} diff --git a/cmd/operator-opamp-bridge/config/testdata/agent.yaml b/cmd/operator-opamp-bridge/config/testdata/agent.yaml deleted file mode 100644 index 5a70b06a8..000000000 --- a/cmd/operator-opamp-bridge/config/testdata/agent.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml b/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml deleted file mode 100644 index ba4903daf..000000000 --- a/cmd/operator-opamp-bridge/config/testdata/agentbadconf.yaml +++ /dev/null @@ -1,14 +0,0 @@ -endpoint: http://127.0.0.1:4320/v1/opamp -cawdawapabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml b/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml deleted file mode 100644 index 73d5683a3..000000000 --- a/cmd/operator-opamp-bridge/config/testdata/agentbasiccomponentsallowed.yaml +++ /dev/null @@ -1,22 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true -componentsAllowed: - receivers: - - otlp - processors: - - memory_limiter - - batch - exporters: - - logging diff --git a/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml b/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml deleted file mode 100644 index a96abad9d..000000000 --- a/cmd/operator-opamp-bridge/config/testdata/agenthttpbasic.yaml +++ /dev/null @@ -1,16 +0,0 @@ -endpoint: http://127.0.0.1:4320/v1/opamp -heartbeatInterval: 45s -name: "http-test-bridge" -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml b/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml deleted file mode 100644 index 17983e142..000000000 --- a/cmd/operator-opamp-bridge/config/testdata/agentwithheaders.yaml +++ /dev/null @@ -1,17 +0,0 @@ -endpoint: ws://127.0.0.1:4320/v1/opamp -headers: - authentication: "access-12345-token" - my-header-key: "my-header-value" -capabilities: - AcceptsRemoteConfig: true - ReportsEffectiveConfig: true - AcceptsPackages: false - ReportsPackageStatuses: false - ReportsOwnTraces: true - ReportsOwnMetrics: true - ReportsOwnLogs: true - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRestartCommand: true - ReportsHealth: true - ReportsRemoteConfig: true diff --git a/cmd/operator-opamp-bridge/go.mod b/cmd/operator-opamp-bridge/go.mod deleted file mode 100644 index 769418551..000000000 --- a/cmd/operator-opamp-bridge/go.mod +++ /dev/null @@ -1,95 +0,0 @@ -module github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge - -go 1.21 - -require ( - github.com/go-logr/logr v1.4.1 - github.com/oklog/ulid/v2 v2.1.0 - github.com/open-telemetry/opamp-go v0.10.0 - github.com/open-telemetry/opentelemetry-operator v0.85.0 - github.com/shirou/gopsutil v3.21.11+incompatible - github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/otel v1.21.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 - go.opentelemetry.io/otel/metric v1.21.0 - go.opentelemetry.io/otel/sdk v1.21.0 - go.opentelemetry.io/otel/sdk/metric v1.21.0 - go.uber.org/multierr v1.11.0 - gopkg.in/yaml.v2 v2.4.0 - k8s.io/apimachinery v0.29.0 - k8s.io/client-go v0.29.0 - k8s.io/klog/v2 v2.110.1 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b - sigs.k8s.io/controller-runtime v0.16.3 - sigs.k8s.io/yaml v1.4.0 -) - -require ( - github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.0 // indirect - github.com/tklauser/go-sysconf v0.3.11 // indirect - github.com/tklauser/numcpus v0.6.0 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/featuregate v0.77.0 // indirect - go.opentelemetry.io/otel/trace v1.21.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/zap v1.25.0 // indirect - golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/time v0.3.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.29.0 // indirect - k8s.io/apiextensions-apiserver v0.28.3 // indirect - k8s.io/component-base v0.28.3 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect -) diff --git a/cmd/operator-opamp-bridge/go.sum b/cmd/operator-opamp-bridge/go.sum deleted file mode 100644 index 0e8108c04..000000000 --- a/cmd/operator-opamp-bridge/go.sum +++ /dev/null @@ -1,287 +0,0 @@ -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU= -github.com/oklog/ulid/v2 v2.1.0/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/open-telemetry/opamp-go v0.10.0 h1:3PdhoKcKY1lPrfdXnsxeLlXluE+Xe1Uc/CpJ4I8uUJ0= -github.com/open-telemetry/opamp-go v0.10.0/go.mod h1:Pfmm5EdWqZCG0dZAJjAinlra3yEpqK5StCblxpbEp6Q= -github.com/open-telemetry/opentelemetry-operator v0.85.0 h1:HwKfaxePbGJCbl3y2rselSnT1QUw1Xd+81DkYTEvws8= -github.com/open-telemetry/opentelemetry-operator v0.85.0/go.mod h1:6od0b2oGG/cqr8+nyOB4wsz1fg7QjnIsZDuynZqzBPE= -github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk= -github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= -github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector/featuregate v0.77.0 h1:m1/IzaXoQh6SgF6CM80vrBOCf5zSJ2GVISfA27fYzGU= -go.opentelemetry.io/collector/featuregate v0.77.0/go.mod h1:/kVAsGUCyJXIDSgHftCN63QiwAEVHRLX2Kh/S+dqgHY= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 h1:bflGWrfYyuulcdxf14V6n9+CoQcu5SAAdHmDPAJnlps= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0/go.mod h1:qcTO4xHAxZLaLxPd60TdE88rxtItPHgHWqOhOGRr0as= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= -go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= -go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= -go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw= -golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= -golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= -gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= -k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= -k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/cmd/operator-opamp-bridge/header.txt b/cmd/operator-opamp-bridge/header.txt deleted file mode 100644 index 3881885f3..000000000 --- a/cmd/operator-opamp-bridge/header.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright The OpenTelemetry Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/cmd/operator-opamp-bridge/logger/logger.go b/cmd/operator-opamp-bridge/logger/logger.go deleted file mode 100644 index 0beb8cbea..000000000 --- a/cmd/operator-opamp-bridge/logger/logger.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package logger - -import ( - "fmt" - - "github.com/go-logr/logr" - "github.com/open-telemetry/opamp-go/client/types" -) - -var _ types.Logger = &Logger{} - -type Logger struct { - Logger logr.Logger -} - -func NewLogger(logger logr.Logger) *Logger { - return &Logger{Logger: logger} -} - -func (l *Logger) Debugf(format string, v ...interface{}) { - l.Logger.V(4).Info(fmt.Sprintf(format, v...)) -} - -func (l *Logger) Errorf(format string, v ...interface{}) { - l.Logger.V(0).Error(nil, fmt.Sprintf(format, v...)) -} diff --git a/cmd/operator-opamp-bridge/main.go b/cmd/operator-opamp-bridge/main.go deleted file mode 100644 index 9c312292e..000000000 --- a/cmd/operator-opamp-bridge/main.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "os" - "os/signal" - - "github.com/spf13/pflag" - - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/agent" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/operator-opamp-bridge/operator" -) - -func main() { - l := config.GetLogger() - - flagSet := config.GetFlagSet(pflag.ExitOnError) - err := flagSet.Parse(os.Args) - if err != nil { - l.Error(err, "Unable to load flags") - os.Exit(1) - } - cfg, configLoadErr := config.Load(l, flagSet) - if configLoadErr != nil { - l.Error(configLoadErr, "Unable to load configuration") - os.Exit(1) - } - l.Info("Starting the Remote Configuration service") - - kubeClient, kubeErr := cfg.GetKubernetesClient() - if kubeErr != nil { - l.Error(kubeErr, "Couldn't create kubernetes client") - os.Exit(1) - } - operatorClient := operator.NewClient(cfg.Name, l.WithName("operator-client"), kubeClient, cfg.GetComponentsAllowed()) - - opampClient := cfg.CreateClient() - opampAgent := agent.NewAgent(l.WithName("agent"), operatorClient, cfg, opampClient) - - if err := opampAgent.Start(); err != nil { - l.Error(err, "Cannot start OpAMP client") - os.Exit(1) - } - - interrupt := make(chan os.Signal, 1) - signal.Notify(interrupt, os.Interrupt) - <-interrupt - opampAgent.Shutdown() -} diff --git a/cmd/operator-opamp-bridge/metrics/reporter.go b/cmd/operator-opamp-bridge/metrics/reporter.go deleted file mode 100644 index 27dc3f646..000000000 --- a/cmd/operator-opamp-bridge/metrics/reporter.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package metrics - -import ( - "context" - "fmt" - "net/url" - "os" - "time" - - "github.com/go-logr/logr" - "github.com/oklog/ulid/v2" - "github.com/shirou/gopsutil/process" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp" - "go.opentelemetry.io/otel/metric" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - otelresource "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.4.0" - - "github.com/open-telemetry/opamp-go/protobufs" -) - -// MetricReporter is a metric reporter that collects Agent metrics and sends them to an -// OTLP/HTTP destination. -type MetricReporter struct { - logger logr.Logger - - meter metric.Meter - meterShutdowner func() - done chan struct{} - - // The Agent's process. - process *process.Process - - // Some example metrics to report. - processMemoryPhysical metric.Float64ObservableGauge - processCpuTime metric.Float64ObservableCounter -} - -// NewMetricReporter creates an OTLP/HTTP client to the destination address supplied by the server. -// TODO: do more validation on the endpoint, allow for gRPC. -// TODO: set global provider and add more metrics to be reported. -func NewMetricReporter(logger logr.Logger, dest *protobufs.TelemetryConnectionSettings, agentType string, agentVersion string, instanceId ulid.ULID) (*MetricReporter, error) { - - if dest.DestinationEndpoint == "" { - return nil, fmt.Errorf("metric destination must specify DestinationEndpoint") - } - - u, err := url.Parse(dest.DestinationEndpoint) - if err != nil { - return nil, fmt.Errorf("invalid DestinationEndpoint: %w", err) - } - - // Create OTLP/HTTP metric exporter. - opts := []otlpmetrichttp.Option{ - otlpmetrichttp.WithEndpoint(u.Host), - otlpmetrichttp.WithURLPath(u.Path), - } - - headers := map[string]string{} - for _, header := range dest.Headers.GetHeaders() { - headers[header.GetKey()] = header.GetValue() - } - opts = append(opts, otlpmetrichttp.WithHeaders(headers)) - - client, err := otlpmetrichttp.New(context.Background(), opts...) - if err != nil { - return nil, fmt.Errorf("failed to initialize otlp metric http client: %w", err) - } - - // Define the Resource to be exported with all metrics. Use OpenTelemetry semantic - // conventions as the OpAMP spec requires: - // https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#own-telemetry-reporting - resource, resourceErr := otelresource.New(context.Background(), - otelresource.WithAttributes( - semconv.ServiceNameKey.String(agentType), - semconv.ServiceVersionKey.String(agentVersion), - semconv.ServiceInstanceIDKey.String(instanceId.String()), - ), - ) - if resourceErr != nil { - return nil, resourceErr - } - - provider := sdkmetric.NewMeterProvider( - sdkmetric.WithResource(resource), - sdkmetric.WithReader(sdkmetric.NewPeriodicReader(client, sdkmetric.WithInterval(5*time.Second)))) - - reporter := &MetricReporter{ - logger: logger, - } - - reporter.done = make(chan struct{}) - - reporter.meter = provider.Meter("opamp") - - reporter.process, err = process.NewProcess(int32(os.Getpid())) - if err != nil { - return nil, fmt.Errorf("cannot query own process: %w", err) - } - - // Create some metrics that will be reported according to OpenTelemetry semantic - // conventions for process metrics (conventions are TBD for now). - reporter.processCpuTime, err = reporter.meter.Float64ObservableCounter( - "process.cpu.time", - metric.WithFloat64Callback(reporter.processCpuTimeFunc), - ) - if err != nil { - return nil, fmt.Errorf("can't create process time metric: %w", err) - } - - reporter.processMemoryPhysical, err = reporter.meter.Float64ObservableGauge( - "process.memory.physical_usage", - metric.WithFloat64Callback(reporter.processMemoryPhysicalFunc), - ) - if err != nil { - return nil, fmt.Errorf("can't create memory metric: %w", err) - } - - reporter.meterShutdowner = func() { _ = provider.Shutdown(context.Background()) } - - return reporter, nil -} - -func (reporter *MetricReporter) processCpuTimeFunc(_ context.Context, observer metric.Float64Observer) error { - times, err := reporter.process.Times() - if err != nil { - reporter.logger.Error(err, "cannot get process CPU times") - } - observer.Observe(times.User, metric.WithAttributes(attribute.String("state", "user"))) - observer.Observe(times.System, metric.WithAttributes(attribute.String("state", "system"))) - observer.Observe(times.Iowait, metric.WithAttributes(attribute.String("state", "wait"))) - return nil -} - -func (reporter *MetricReporter) processMemoryPhysicalFunc(_ context.Context, observer metric.Float64Observer) error { - memory, err := reporter.process.MemoryInfo() - if err != nil { - reporter.logger.Error(err, "cannot get process memory information") - return nil - } - observer.Observe(float64(memory.RSS)) - return nil -} - -func (reporter *MetricReporter) Shutdown() { - if reporter.done != nil { - close(reporter.done) - } - - if reporter.meterShutdowner != nil { - reporter.meterShutdowner() - } -} diff --git a/cmd/operator-opamp-bridge/operator/client.go b/cmd/operator-opamp-bridge/operator/client.go deleted file mode 100644 index b892cbe17..000000000 --- a/cmd/operator-opamp-bridge/operator/client.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package operator - -import ( - "context" - "fmt" - "strings" - - "github.com/go-logr/logr" - "github.com/open-telemetry/opamp-go/protobufs" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/selection" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/yaml" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -const ( - CollectorResource = "OpenTelemetryCollector" - ResourceIdentifierKey = "created-by" - ResourceIdentifierValue = "operator-opamp-bridge" - ReportingLabelKey = "opentelemetry.io/opamp-reporting" - ManagedLabelKey = "opentelemetry.io/opamp-managed" -) - -type ConfigApplier interface { - // Apply receives a name and namespace to apply an OpenTelemetryCollector CRD that is contained in the configmap. - Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error - - // GetInstance retrieves an OpenTelemetryCollector CRD given a name and namespace. - GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error) - - // ListInstances retrieves all OpenTelemetryCollector CRDs created by the operator-opamp-bridge agent. - ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) - - // Delete attempts to delete an OpenTelemetryCollector object given a name and namespace. - Delete(name string, namespace string) error -} - -type Client struct { - log logr.Logger - componentsAllowed map[string]map[string]bool - k8sClient client.Client - close chan bool - name string -} - -var _ ConfigApplier = &Client{} - -func NewClient(name string, log logr.Logger, c client.Client, componentsAllowed map[string]map[string]bool) *Client { - return &Client{ - log: log, - componentsAllowed: componentsAllowed, - k8sClient: c, - close: make(chan bool, 1), - name: name, - } -} - -func (c Client) labelSetContainsLabel(instance *v1alpha1.OpenTelemetryCollector, label, value string) bool { - if instance == nil || instance.GetLabels() == nil { - return false - } - if labels := instance.GetLabels(); labels != nil && strings.EqualFold(labels[label], value) { - return true - } - return false -} - -func (c Client) create(ctx context.Context, name string, namespace string, collector *v1alpha1.OpenTelemetryCollector) error { - // Set the defaults - collector.Default() - collector.TypeMeta.Kind = CollectorResource - collector.TypeMeta.APIVersion = v1alpha1.GroupVersion.String() - collector.ObjectMeta.Name = name - collector.ObjectMeta.Namespace = namespace - - if collector.ObjectMeta.Labels == nil { - collector.ObjectMeta.Labels = map[string]string{} - } - collector.ObjectMeta.Labels[ResourceIdentifierKey] = ResourceIdentifierValue - warnings, err := collector.ValidateCreate() - if err != nil { - return err - } - if warnings != nil { - c.log.Info("Some warnings present on collector", "warnings", warnings) - } - c.log.Info("Creating collector") - return c.k8sClient.Create(ctx, collector) -} - -func (c Client) update(ctx context.Context, old *v1alpha1.OpenTelemetryCollector, new *v1alpha1.OpenTelemetryCollector) error { - new.ObjectMeta = old.ObjectMeta - new.TypeMeta = old.TypeMeta - warnings, err := new.ValidateUpdate(old) - if err != nil { - return err - } - if warnings != nil { - c.log.Info("Some warnings present on collector", "warnings", warnings) - } - c.log.Info("Updating collector") - return c.k8sClient.Update(ctx, new) -} - -func (c Client) Apply(name string, namespace string, configmap *protobufs.AgentConfigFile) error { - c.log.Info("Received new config", "name", name, "namespace", namespace) - var collector v1alpha1.OpenTelemetryCollector - err := yaml.Unmarshal(configmap.Body, &collector) - if err != nil { - return err - } - if len(collector.Spec.Config) == 0 { - return errors.NewBadRequest("Must supply valid configuration") - } - reasons, validateErr := c.validate(collector.Spec) - if validateErr != nil { - return validateErr - } - if len(reasons) > 0 { - return errors.NewBadRequest(fmt.Sprintf("Items in config are not allowed: %v", reasons)) - } - updatedCollector := collector.DeepCopy() - ctx := context.Background() - instance, err := c.GetInstance(name, namespace) - if err != nil { - return err - } - // If either the received collector or the collector being created has reporting set to true, it should be denied - if c.labelSetContainsLabel(instance, ReportingLabelKey, "true") || - c.labelSetContainsLabel(updatedCollector, ReportingLabelKey, "true") { - return errors.NewBadRequest("cannot modify a collector with `opentelemetry.io/opamp-reporting: true`") - } - // If either the received collector or the collector doesn't have the managed label set to true, it should be denied - if !c.labelSetContainsLabel(instance, ManagedLabelKey, "true") && - !c.labelSetContainsLabel(instance, ManagedLabelKey, c.name) && - !c.labelSetContainsLabel(updatedCollector, ManagedLabelKey, "true") && - !c.labelSetContainsLabel(updatedCollector, ManagedLabelKey, c.name) { - return errors.NewBadRequest("cannot modify a collector that doesn't have `opentelemetry.io/opamp-managed: true | ` set") - } - if instance == nil { - return c.create(ctx, name, namespace, updatedCollector) - } - return c.update(ctx, instance, updatedCollector) -} - -func (c Client) Delete(name string, namespace string) error { - ctx := context.Background() - result := v1alpha1.OpenTelemetryCollector{} - err := c.k8sClient.Get(ctx, client.ObjectKey{ - Namespace: namespace, - Name: name, - }, &result) - if err != nil { - if errors.IsNotFound(err) { - return nil - } - return err - } - return c.k8sClient.Delete(ctx, &result) -} - -func (c Client) ListInstances() ([]v1alpha1.OpenTelemetryCollector, error) { - ctx := context.Background() - result := v1alpha1.OpenTelemetryCollectorList{} - labelSelector := labels.NewSelector() - requirement, err := labels.NewRequirement(ManagedLabelKey, selection.In, []string{c.name, "true"}) - if err != nil { - return nil, err - } - err = c.k8sClient.List(ctx, &result, client.MatchingLabelsSelector{Selector: labelSelector.Add(*requirement)}) - if err != nil { - return nil, err - } - reportingCollectors := v1alpha1.OpenTelemetryCollectorList{} - err = c.k8sClient.List(ctx, &reportingCollectors, client.MatchingLabels{ - ReportingLabelKey: "true", - }) - if err != nil { - return nil, err - } - items := append(result.Items, reportingCollectors.Items...) - for i := range items { - items[i].SetManagedFields(nil) - } - - return items, nil -} - -func (c Client) GetInstance(name string, namespace string) (*v1alpha1.OpenTelemetryCollector, error) { - ctx := context.Background() - result := v1alpha1.OpenTelemetryCollector{} - err := c.k8sClient.Get(ctx, client.ObjectKey{ - Namespace: namespace, - Name: name, - }, &result) - if err != nil { - if errors.IsNotFound(err) { - return nil, nil - } - return nil, err - } - return &result, nil -} - -func (c Client) validate(spec v1alpha1.OpenTelemetryCollectorSpec) ([]string, error) { - // Do not use this feature if it's not specified - if c.componentsAllowed == nil || len(c.componentsAllowed) == 0 { - return nil, nil - } - collectorConfig := make(map[string]map[string]interface{}) - err := yaml.Unmarshal([]byte(spec.Config), &collectorConfig) - if err != nil { - return nil, err - } - var invalidComponents []string - for component, componentMap := range collectorConfig { - if component == "service" { - // We don't care about what's in the service pipelines. - // Only components declared in the configuration can be used in the service pipeline. - continue - } - if _, ok := c.componentsAllowed[component]; !ok { - invalidComponents = append(invalidComponents, component) - continue - } - for componentName := range componentMap { - if _, ok := c.componentsAllowed[component][componentName]; !ok { - invalidComponents = append(invalidComponents, fmt.Sprintf("%s.%s", component, componentName)) - } - } - } - return invalidComponents, nil -} diff --git a/cmd/operator-opamp-bridge/operator/client_test.go b/cmd/operator-opamp-bridge/operator/client_test.go deleted file mode 100644 index 8db8fb1a5..000000000 --- a/cmd/operator-opamp-bridge/operator/client_test.go +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package operator - -import ( - "context" - "os" - "testing" - - "github.com/go-logr/logr" - "github.com/open-telemetry/opamp-go/protobufs" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/client/fake" - "sigs.k8s.io/yaml" - - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -var ( - clientLogger = logr.Discard() -) - -const ( - bridgeName = "bridge-test" -) - -func getFakeClient(t *testing.T) client.WithWatch { - schemeBuilder := runtime.NewSchemeBuilder(func(s *runtime.Scheme) error { - s.AddKnownTypes(v1alpha1.GroupVersion, &v1alpha1.OpenTelemetryCollector{}, &v1alpha1.OpenTelemetryCollectorList{}) - metav1.AddToGroupVersion(s, v1alpha1.GroupVersion) - return nil - }) - scheme := runtime.NewScheme() - err := schemeBuilder.AddToScheme(scheme) - require.NoError(t, err, "Should be able to add custom types") - c := fake.NewClientBuilder().WithScheme(scheme) - return c.Build() -} - -func TestClient_Apply(t *testing.T) { - type args struct { - name string - namespace string - file string - config string - } - tests := []struct { - name string - args args - wantErr bool - errContains string - }{ - { - name: "base case", - args: args{ - name: "test", - namespace: "opentelemetry", - file: "testdata/collector.yaml", - }, - wantErr: false, - }, - { - name: "invalid config", - args: args{ - name: "test", - namespace: "opentelemetry", - file: "testdata/invalid-collector.yaml", - }, - wantErr: true, - errContains: "error converting YAML to JSON", - }, - { - name: "empty config", - args: args{ - name: "test", - namespace: "opentelemetry", - config: "", - }, - wantErr: true, - errContains: "Must supply valid configuration", - }, - { - name: "create reporting-only", - args: args{ - name: "test", - namespace: "opentelemetry", - file: "testdata/reporting-collector.yaml", - }, - wantErr: true, - errContains: "opentelemetry.io/opamp-reporting", - }, - { - name: "create managed false", - args: args{ - name: "test", - namespace: "opentelemetry", - file: "testdata/unmanaged-collector.yaml", - }, - wantErr: true, - errContains: "opentelemetry.io/opamp-managed", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - fakeClient := getFakeClient(t) - c := NewClient(bridgeName, clientLogger, fakeClient, nil) - var colConfig []byte - var err error - if len(tt.args.file) > 0 { - colConfig, err = loadConfig(tt.args.file) - require.NoError(t, err, "Should be no error on loading test configuration") - } else { - colConfig = []byte(tt.args.config) - } - configmap := &protobufs.AgentConfigFile{ - Body: colConfig, - ContentType: "yaml", - } - applyErr := c.Apply(tt.args.name, tt.args.namespace, configmap) - if tt.wantErr { - assert.Error(t, applyErr) - assert.ErrorContains(t, applyErr, tt.errContains) - } - }) - } -} - -func Test_collectorUpdate(t *testing.T) { - name := "test" - namespace := "testing" - fakeClient := getFakeClient(t) - c := NewClient(bridgeName, clientLogger, fakeClient, nil) - - // Load reporting-only collector - reportingColConfig, err := loadConfig("testdata/reporting-collector.yaml") - require.NoError(t, err, "Should be no error on loading test configuration") - var reportingCol v1alpha1.OpenTelemetryCollector - err = yaml.Unmarshal(reportingColConfig, &reportingCol) - require.NoError(t, err, "Should be no error on unmarshal") - reportingCol.Default() - reportingCol.TypeMeta.Kind = CollectorResource - reportingCol.TypeMeta.APIVersion = v1alpha1.GroupVersion.String() - reportingCol.ObjectMeta.Name = "simplest" - reportingCol.ObjectMeta.Namespace = namespace - err = fakeClient.Create(context.Background(), &reportingCol) - require.NoError(t, err, "Should be able to make reporting col") - allInstances, err := c.ListInstances() - require.NoError(t, err, "Should be able to list all collectors") - require.Len(t, allInstances, 1) - - colConfig, err := loadConfig("testdata/collector.yaml") - require.NoError(t, err, "Should be no error on loading test configuration") - configmap := &protobufs.AgentConfigFile{ - Body: colConfig, - ContentType: "yaml", - } - // Apply a valid initial configuration - err = c.Apply(name, namespace, configmap) - require.NoError(t, err, "Should apply base config") - - // Get the newly created collector - instance, err := c.GetInstance(name, namespace) - require.NoError(t, err, "Should be able to get the newly created instance") - assert.Contains(t, instance.Spec.Config, "processors: []") - - // Try updating with an invalid one - configmap.Body = []byte("empty, invalid!") - err = c.Apply(name, namespace, configmap) - assert.Error(t, err, "Should be unable to update") - - // Update successfully with a valid configuration - newColConfig, err := loadConfig("testdata/updated-collector.yaml") - require.NoError(t, err, "Should be no error on loading test configuration") - newConfigMap := &protobufs.AgentConfigFile{ - Body: newColConfig, - ContentType: "yaml", - } - err = c.Apply(name, namespace, newConfigMap) - require.NoError(t, err, "Should be able to update collector") - - // Get the updated collector - updatedInstance, err := c.GetInstance(name, namespace) - require.NoError(t, err, "Should be able to get the updated instance") - assert.Contains(t, updatedInstance.Spec.Config, "processors: [memory_limiter, batch]") - - allInstances, err = c.ListInstances() - require.NoError(t, err, "Should be able to list all collectors") - assert.Len(t, allInstances, 2) - assert.Contains(t, allInstances, reportingCol) - assert.Contains(t, allInstances, *updatedInstance) -} - -func Test_collectorDelete(t *testing.T) { - name := "test" - namespace := "testing" - fakeClient := getFakeClient(t) - c := NewClient(bridgeName, clientLogger, fakeClient, nil) - colConfig, err := loadConfig("testdata/collector.yaml") - require.NoError(t, err, "Should be no error on loading test configuration") - configmap := &protobufs.AgentConfigFile{ - Body: colConfig, - ContentType: "yaml", - } - // Apply a valid initial configuration - err = c.Apply(name, namespace, configmap) - require.NoError(t, err, "Should apply base config") - - // Get the newly created collector - instance, err := c.GetInstance(name, namespace) - require.NoError(t, err, "Should be able to get the newly created instance") - assert.Contains(t, instance.Spec.Config, "processors: []") - - // Delete it - err = c.Delete(name, namespace) - require.NoError(t, err, "Should be able to delete a collector") - - // Check there's nothing left - allInstances, err := c.ListInstances() - require.NoError(t, err, "Should be able to list all collectors") - assert.Len(t, allInstances, 0) -} - -func loadConfig(file string) ([]byte, error) { - yamlFile, err := os.ReadFile(file) - if err != nil { - return []byte{}, err - } - return yamlFile, nil -} diff --git a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/collector.yaml deleted file mode 100644 index c77c64c48..000000000 --- a/cmd/operator-opamp-bridge/operator/testdata/collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - opentelemetry.io/opamp-managed: "true" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml deleted file mode 100644 index f64ebcedf..000000000 --- a/cmd/operator-opamp-bridge/operator/testdata/invalid-collector.yaml +++ /dev/null @@ -1,28 +0,0 @@ -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - GARBAGE - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml deleted file mode 100644 index 3b0a92546..000000000 --- a/cmd/operator-opamp-bridge/operator/testdata/reporting-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - "opentelemetry.io/opamp-reporting": "true" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml deleted file mode 100644 index 48b793f98..000000000 --- a/cmd/operator-opamp-bridge/operator/testdata/unmanaged-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - "opentelemetry.io/opamp-managed": "false" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml b/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml deleted file mode 100644 index 81a919b28..000000000 --- a/cmd/operator-opamp-bridge/operator/testdata/updated-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - labels: - opentelemetry.io/opamp-managed: "true" -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [memory_limiter, batch] - exporters: [debug] diff --git a/cmd/otel-allocator/Dockerfile b/cmd/otel-allocator/Dockerfile deleted file mode 100644 index 0d50a4f54..000000000 --- a/cmd/otel-allocator/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# Get CA certificates from the Alpine package repo -FROM alpine:3.19 as certificates - -RUN apk --no-cache add ca-certificates - -# Start a new stage from scratch -FROM scratch - -ARG TARGETARCH - -WORKDIR /root/ - -# Copy the certs -COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt - -# Copy binary built on the host -COPY bin/targetallocator_${TARGETARCH} ./main - -ENTRYPOINT ["./main"] diff --git a/cmd/otel-allocator/README.md b/cmd/otel-allocator/README.md deleted file mode 100644 index 0f4419e8e..000000000 --- a/cmd/otel-allocator/README.md +++ /dev/null @@ -1,311 +0,0 @@ -# Target Allocator - -Target Allocator is an optional component of the OpenTelemetry Collector [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) (CR). The release version matches the -operator's most recent release as well. - -In a nutshell, the TA is a mechanism for decoupling the service discovery and metric collection functions of Prometheus such that they can be scaled independently. The Collector manages Prometheus metrics without needing to install Prometheus. The TA manages the configuration of the Collector's [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). - -The TA serves two functions: -* Even distribution of Prometheus targets among a pool of Collectors -* Discovery of Prometheus Custom Resources - -## Even Distribution of Prometheus Targets - -The Target Allocator’s first job is to discover targets to scrape and OTel Collectors to allocate targets to. Then it can distribute the targets it discovers among the Collectors. The Collectors in turn query the Target Allocator for Metrics endpoints to scrape, and then the Collectors’ [Prometheus Receivers](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) scrape the Metrics targets. - -This means that the OTel Collectors collect the metrics instead of a Prometheus [scraper](https://uzxmx.github.io/prometheus-scrape-internals.html). - - -```mermaid -sequenceDiagram - participant Target Allocator - participant Metrics Targets - participant OTel Collectors - Target Allocator ->>Metrics Targets: 1. Discover Metrics targets - Target Allocator ->>OTel Collectors: 2. Discover available Collectors - Target Allocator ->>Target Allocator: 3. Assign Metrics targets - OTel Collectors ->>Target Allocator: 4. Query TA for Metrics endpoints scrape - OTel Collectors ->>Metrics Targets: 5. Scrape Metrics target -``` - -## Discovery of Prometheus Custom Resources - -The Target Allocator also provides for the discovery of [Prometheus Operator CRs](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md), namely the [ServiceMonitor and PodMonitor](https://github.com/open-telemetry/opentelemetry-operator/tree/main/cmd/otel-allocator#target-allocator). The ServiceMonitors and the PodMonitors purpose is to inform the Target Allocator (or PrometheusOperator) to add a new job to their scrape configuration. The Target Allocator then provides the jobs to the OTel Collector [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md). - -```mermaid -flowchart RL - pm(PodMonitor) - sm(ServiceMonitor) - ta(Target Allocator) - oc1(OTel Collector) - oc2(OTel Collector) - oc3(OTel Collector) - ta --> pm - ta --> sm - oc1 --> ta - oc2 --> ta - oc3 --> ta - sm ~~~|"1. Discover Prometheus Operator CRs"| sm - ta ~~~|"2. Add job to TA scrape configuration"| ta - oc3 ~~~|"3. Add job to OTel Collector scrape configuration"| oc3 -``` - -Even though Prometheus is not required to be installed in your Kubernetes cluster to use the Target Allocator for Prometheus CR discovery, the TA does require that the ServiceMonitor and PodMonitor be installed. These CRs are bundled with Prometheus Operator; however, they can be installed standalone as well. - -The easiest way to do this is by going to the [Prometheus Operator’s Releases page](https://github.com/prometheus-operator/prometheus-operator/releases), grabbing a copy of the latest `bundle.yaml` file (for example, [this one](https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml)), and stripping out all of the YAML except the ServiceMonitor and PodMonitor YAML definitions. - -# Usage -The `spec.targetAllocator:` controls the TargetAllocator general properties. Full API spec can be found here: [api.md#opentelemetrycollectorspectargetallocator](../../docs/api.md#opentelemetrycollectorspectargetallocator) - -A basic example that deploys. -```yaml -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: collector-with-ta -spec: - mode: statefulset - targetAllocator: - enabled: true - config: | - receivers: - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - - exporters: - logging: - - service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [logging] -``` - -In essence, Prometheus Receiver configs are overridden with a `http_sd_config` directive that points to the -Allocator, these are then loadbalanced/sharded to the Collectors. The [Prometheus Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md) configs that are overridden -are what will be distributed with the same name. - -## PrometheusCR specifics - -TargetAllocator discovery of PrometheusCRs can be turned on by setting -`.spec.targetAllocator.prometheusCR.enabled` to `true`, which it presents as scrape configs -and jobs on the `/scrape_configs` and `/jobs` endpoints respectively. - -The CRs can be filtered by labels as documented here: [api.md#opentelemetrycollectorspectargetallocatorprometheuscr](../../docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr) - -The Prometheus Receiver in the deployed Collector also has to know where the Allocator service exists. This is done by a -OpenTelemetry Collector Operator-specific config. - -```yaml - config: | - receivers: - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - target_allocator: - endpoint: http://my-targetallocator-service - interval: 30s - collector_id: "${POD_NAME}" -``` - -Upstream documentation here: [PrometheusReceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/prometheusreceiver#opentelemetry-operator) - -The TargetAllocator service is named based on the OpenTelemetryCollector CR name. `collector_id` should be unique per -collector instance, such as the pod name. The `POD_NAME` environment variable is convenient since this is supplied -to collector instance pods by default. - - -### RBAC -The ServiceAccount that the TargetAllocator runs as, has to have access to the CRs. A role like this will provide that -access. -```yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opentelemetry-targetallocator-cr-role -rules: -- apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - - podmonitors - verbs: - - '*' -``` -In addition, the TargetAllocator needs the same permissions as a Prometheus instance would to find the matching targets -from the CR instances. -```yaml -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opentelemetry-targetallocator-role -rules: -- apiGroups: [""] - resources: - - nodes - - nodes/metrics - - services - - endpoints - - pods - verbs: ["get", "list", "watch"] -- apiGroups: [""] - resources: - - configmaps - verbs: ["get"] -- apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: ["get", "list", "watch"] -- apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: ["get", "list", "watch"] -- nonResourceURLs: ["/metrics"] - verbs: ["get"] -``` -These roles can be combined. - -A ServiceAccount bound with the above permissions in the namespaces that are to be monitored can then be referenced in -the `targetAllocator:` part of the OpenTelemetryCollector CR. -```yaml - targetAllocator: - enabled: true - serviceAccount: opentelemetry-targetallocator-sa - prometheusCR: - enabled: true -``` -**Note**: The Collector part of this same CR *also* has a serviceAccount key which only affects the collector and *not* -the TargetAllocator. - -### Service / Pod monitor endpoint credentials - -If your service or pod monitor endpoints require credentials or other supported form of authentication (bearer token, basic auth, OAuth2 etc.), you need to ensure that the collector has access to this information. Due to some limitations in how the endpoints configuration is handled, target allocator currently does **not** support credentials provided via secrets. It is only possible to provide credentials in a file (for more details see issue https://github.com/open-telemetry/opentelemetry-operator/issues/1669). - -In order to ensure your endpoints can be scraped, your collector instance needs to have the particular secret mounted as a file at the correct path. - - -# Design - -If the Allocator is activated, all Prometheus configurations will be transferred in a separate ConfigMap which get in -turn mounted to the Allocator. -This configuration will be resolved to target configurations and then split across all OpenTelemetryCollector instances. - -TargetAllocators expose the results as [HTTP_SD endpoints](https://prometheus.io/docs/prometheus/latest/http_sd/) -split by collector. - -Currently, the Target Allocator handles the sharding of targets. The operator sets the `$SHARD` variable to 0 to allow -collectors to keep targets generated by a Prometheus CRD. Using Prometheus sharding and target allocator sharding is not -recommended currently and may lead to unknown results. -[See this thread for more information](https://github.com/open-telemetry/opentelemetry-operator/pull/1124#discussion_r984683577) - -#### Endpoints -`/scrape_configs`: - -```json -{ - "job1": { - "follow_redirects": true, - "honor_timestamps": true, - "job_name": "job1", - "metric_relabel_configs": [], - "metrics_path": "/metrics", - "scheme": "http", - "scrape_interval": "1m", - "scrape_timeout": "10s", - "static_configs": [] - }, - "job2": { - "follow_redirects": true, - "honor_timestamps": true, - "job_name": "job2", - "metric_relabel_configs": [], - "metrics_path": "/metrics", - "relabel_configs": [], - "scheme": "http", - "scrape_interval": "1m", - "scrape_timeout": "10s", - "kubernetes_sd_configs": [] - } -} -``` - -`/jobs`: - -```json -{ - "job1": { - "_link": "/jobs/job1/targets" - }, - "job2": { - "_link": "/jobs/job1/targets" - } -} - -``` - -`/jobs/{jobID}/targets`: - -```json -{ - "collector-1": { - "_link": "/jobs/job1/targets?collector_id=collector-1", - "targets": [ - { - "Targets": [ - "10.100.100.100", - "10.100.100.101", - "10.100.100.102" - ], - "Labels": { - "namespace": "a_namespace", - "pod": "a_pod" - } - } - ] - } -} -``` - -`/jobs/{jobID}/targets?collector_id={collectorID}`: - -```json -[ - { - "targets": [ - "10.100.100.100", - "10.100.100.101", - "10.100.100.102" - ], - "labels": { - "namespace": "a_namespace", - "pod": "a_pod" - } - } -] -``` - - -## Packages -### Watchers -Watchers are responsible for the translation of external sources into Prometheus readable scrape configurations and -triggers updates to the DiscoveryManager - -### DiscoveryManager -Watches the Prometheus service discovery for new targets and sets targets to the Allocator - -### Allocator -Shards the received targets based on the discovered Collector instances - -### Collector -Client to watch for deployed Collector instances which will then provided to the Allocator. - diff --git a/cmd/otel-allocator/allocation/allocatortest.go b/cmd/otel-allocator/allocation/allocatortest.go deleted file mode 100644 index 88312a80a..000000000 --- a/cmd/otel-allocator/allocation/allocatortest.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "fmt" - "strconv" - - "github.com/prometheus/common/model" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -func colIndex(index, numCols int) int { - if numCols == 0 { - return -1 - } - return index % numCols -} - -func MakeNNewTargets(n int, numCollectors int, startingIndex int) map[string]*target.Item { - toReturn := map[string]*target.Item{} - for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) - label := model.LabelSet{ - "collector": model.LabelValue(collector), - "i": model.LabelValue(strconv.Itoa(i)), - "total": model.LabelValue(strconv.Itoa(n + startingIndex)), - } - newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, collector) - toReturn[newTarget.Hash()] = newTarget - } - return toReturn -} - -func MakeNCollectors(n int, startingIndex int) map[string]*Collector { - toReturn := map[string]*Collector{} - for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", i) - toReturn[collector] = &Collector{ - Name: collector, - NumTargets: 0, - } - } - return toReturn -} - -func MakeNNewTargetsWithEmptyCollectors(n int, startingIndex int) map[string]*target.Item { - toReturn := map[string]*target.Item{} - for i := startingIndex; i < n+startingIndex; i++ { - label := model.LabelSet{ - "i": model.LabelValue(strconv.Itoa(i)), - "total": model.LabelValue(strconv.Itoa(n + startingIndex)), - } - newTarget := target.NewItem(fmt.Sprintf("test-job-%d", i), fmt.Sprintf("test-url-%d", i), label, "") - toReturn[newTarget.Hash()] = newTarget - } - return toReturn -} diff --git a/cmd/otel-allocator/allocation/consistent_hashing.go b/cmd/otel-allocator/allocation/consistent_hashing.go deleted file mode 100644 index d98aca72f..000000000 --- a/cmd/otel-allocator/allocation/consistent_hashing.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "strings" - "sync" - - "github.com/buraksezer/consistent" - "github.com/cespare/xxhash/v2" - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var _ Allocator = &consistentHashingAllocator{} - -const consistentHashingStrategyName = "consistent-hashing" - -type hasher struct{} - -func (h hasher) Sum64(data []byte) uint64 { - return xxhash.Sum64(data) -} - -type consistentHashingAllocator struct { - // m protects consistentHasher, collectors and targetItems for concurrent use. - m sync.RWMutex - - consistentHasher *consistent.Consistent - - // collectors is a map from a Collector's name to a Collector instance - // collectorKey -> collector pointer - collectors map[string]*Collector - - // targetItems is a map from a target item's hash to the target items allocated state - // targetItem hash -> target item pointer - targetItems map[string]*target.Item - - // collectorKey -> job -> target item hash -> true - targetItemsPerJobPerCollector map[string]map[string]map[string]bool - - log logr.Logger - - filter Filter -} - -func newConsistentHashingAllocator(log logr.Logger, opts ...AllocationOption) Allocator { - config := consistent.Config{ - PartitionCount: 1061, - ReplicationFactor: 5, - Load: 1.1, - Hasher: hasher{}, - } - consistentHasher := consistent.New(nil, config) - chAllocator := &consistentHashingAllocator{ - consistentHasher: consistentHasher, - collectors: make(map[string]*Collector), - targetItems: make(map[string]*target.Item), - targetItemsPerJobPerCollector: make(map[string]map[string]map[string]bool), - log: log, - } - for _, opt := range opts { - opt(chAllocator) - } - - return chAllocator -} - -// SetFilter sets the filtering hook to use. -func (c *consistentHashingAllocator) SetFilter(filter Filter) { - c.filter = filter -} - -// addCollectorTargetItemMapping keeps track of which collector has which jobs and targets -// this allows the allocator to respond without any extra allocations to http calls. The caller of this method -// has to acquire a lock. -func (c *consistentHashingAllocator) addCollectorTargetItemMapping(tg *target.Item) { - if c.targetItemsPerJobPerCollector[tg.CollectorName] == nil { - c.targetItemsPerJobPerCollector[tg.CollectorName] = make(map[string]map[string]bool) - } - if c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] == nil { - c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] = make(map[string]bool) - } - c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName][tg.Hash()] = true -} - -// addTargetToTargetItems assigns a target to the collector based on its hash and adds it to the allocator's targetItems -// This method is called from within SetTargets and SetCollectors, which acquire the needed lock. -// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. -// INVARIANT: c.collectors must have at least 1 collector set. -// NOTE: by not creating a new target item, there is the potential for a race condition where we modify this target -// item while it's being encoded by the server JSON handler. -func (c *consistentHashingAllocator) addTargetToTargetItems(tg *target.Item) { - // Check if this is a reassignment, if so, decrement the previous collector's NumTargets - if previousColName, ok := c.collectors[tg.CollectorName]; ok { - previousColName.NumTargets-- - delete(c.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName], tg.Hash()) - TargetsPerCollector.WithLabelValues(previousColName.String(), consistentHashingStrategyName).Set(float64(c.collectors[previousColName.String()].NumTargets)) - } - colOwner := c.consistentHasher.LocateKey([]byte(strings.Join(tg.TargetURL, ""))) - tg.CollectorName = colOwner.String() - c.targetItems[tg.Hash()] = tg - c.addCollectorTargetItemMapping(tg) - c.collectors[colOwner.String()].NumTargets++ - TargetsPerCollector.WithLabelValues(colOwner.String(), consistentHashingStrategyName).Set(float64(c.collectors[colOwner.String()].NumTargets)) -} - -// handleTargets receives the new and removed targets and reconciles the current state. -// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. -// Any net-new additions are assigned to the next available collector. -func (c *consistentHashingAllocator) handleTargets(diff diff.Changes[*target.Item]) { - // Check for removals - for k, item := range c.targetItems { - // if the current item is in the removals list - if _, ok := diff.Removals()[k]; ok { - col := c.collectors[item.CollectorName] - col.NumTargets-- - delete(c.targetItems, k) - delete(c.targetItemsPerJobPerCollector[item.CollectorName][item.JobName], item.Hash()) - TargetsPerCollector.WithLabelValues(item.CollectorName, consistentHashingStrategyName).Set(float64(col.NumTargets)) - } - } - - // Check for additions - for k, item := range diff.Additions() { - // Do nothing if the item is already there - if _, ok := c.targetItems[k]; ok { - continue - } else { - // Add item to item pool and assign a collector - c.addTargetToTargetItems(item) - } - } -} - -// handleCollectors receives the new and removed collectors and reconciles the current state. -// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map. -// Finally, update all targets' collectors to match the consistent hashing. -func (c *consistentHashingAllocator) handleCollectors(diff diff.Changes[*Collector]) { - // Clear removed collectors - for _, k := range diff.Removals() { - delete(c.collectors, k.Name) - delete(c.targetItemsPerJobPerCollector, k.Name) - c.consistentHasher.Remove(k.Name) - TargetsPerCollector.WithLabelValues(k.Name, consistentHashingStrategyName).Set(0) - } - // Insert the new collectors - for _, i := range diff.Additions() { - c.collectors[i.Name] = NewCollector(i.Name) - c.consistentHasher.Add(c.collectors[i.Name]) - } - - // Re-Allocate all targets - for _, item := range c.targetItems { - c.addTargetToTargetItems(item) - } -} - -// SetTargets accepts a list of targets that will be used to make -// load balancing decisions. This method should be called when there are -// new targets discovered or existing targets are shutdown. -func (c *consistentHashingAllocator) SetTargets(targets map[string]*target.Item) { - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", consistentHashingStrategyName)) - defer timer.ObserveDuration() - - if c.filter != nil { - targets = c.filter.Apply(targets) - } - RecordTargetsKept(targets) - - c.m.Lock() - defer c.m.Unlock() - - if len(c.collectors) == 0 { - c.log.Info("No collector instances present, saving targets to allocate to collector(s)") - // If there were no targets discovered previously, assign this as the new set of target items - if len(c.targetItems) == 0 { - c.log.Info("Not discovered any targets previously, saving targets found to the targetItems set") - for k, item := range targets { - c.targetItems[k] = item - } - } else { - // If there were previously discovered targets, add or remove accordingly - targetsDiffEmptyCollectorSet := diff.Maps(c.targetItems, targets) - - // Check for additions - if len(targetsDiffEmptyCollectorSet.Additions()) > 0 { - c.log.Info("New targets discovered, adding new targets to the targetItems set") - for k, item := range targetsDiffEmptyCollectorSet.Additions() { - // Do nothing if the item is already there - if _, ok := c.targetItems[k]; ok { - continue - } else { - // Add item to item pool - c.targetItems[k] = item - } - } - } - - // Check for deletions - if len(targetsDiffEmptyCollectorSet.Removals()) > 0 { - c.log.Info("Targets removed, Removing targets from the targetItems set") - for k := range targetsDiffEmptyCollectorSet.Removals() { - // Delete item from target items - delete(c.targetItems, k) - } - } - } - return - } - // Check for target changes - targetsDiff := diff.Maps(c.targetItems, targets) - // If there are any additions or removals - if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { - c.handleTargets(targetsDiff) - } -} - -// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. -// This method is called when Collectors are added or removed. -func (c *consistentHashingAllocator) SetCollectors(collectors map[string]*Collector) { - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", consistentHashingStrategyName)) - defer timer.ObserveDuration() - - CollectorsAllocatable.WithLabelValues(consistentHashingStrategyName).Set(float64(len(collectors))) - if len(collectors) == 0 { - c.log.Info("No collector instances present") - return - } - - c.m.Lock() - defer c.m.Unlock() - - // Check for collector changes - collectorsDiff := diff.Maps(c.collectors, collectors) - if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { - c.handleCollectors(collectorsDiff) - } -} - -func (c *consistentHashingAllocator) GetTargetsForCollectorAndJob(collector string, job string) []*target.Item { - c.m.RLock() - defer c.m.RUnlock() - if _, ok := c.targetItemsPerJobPerCollector[collector]; !ok { - return []*target.Item{} - } - if _, ok := c.targetItemsPerJobPerCollector[collector][job]; !ok { - return []*target.Item{} - } - targetItemsCopy := make([]*target.Item, len(c.targetItemsPerJobPerCollector[collector][job])) - index := 0 - for targetHash := range c.targetItemsPerJobPerCollector[collector][job] { - targetItemsCopy[index] = c.targetItems[targetHash] - index++ - } - return targetItemsCopy -} - -// TargetItems returns a shallow copy of the targetItems map. -func (c *consistentHashingAllocator) TargetItems() map[string]*target.Item { - c.m.RLock() - defer c.m.RUnlock() - targetItemsCopy := make(map[string]*target.Item) - for k, v := range c.targetItems { - targetItemsCopy[k] = v - } - return targetItemsCopy -} - -// Collectors returns a shallow copy of the collectors map. -func (c *consistentHashingAllocator) Collectors() map[string]*Collector { - c.m.RLock() - defer c.m.RUnlock() - collectorsCopy := make(map[string]*Collector) - for k, v := range c.collectors { - collectorsCopy[k] = v - } - return collectorsCopy -} diff --git a/cmd/otel-allocator/allocation/consistent_hashing_test.go b/cmd/otel-allocator/allocation/consistent_hashing_test.go deleted file mode 100644 index bbd429520..000000000 --- a/cmd/otel-allocator/allocation/consistent_hashing_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestCanSetSingleTarget(t *testing.T) { - cols := MakeNCollectors(3, 0) - c := newConsistentHashingAllocator(logger) - c.SetCollectors(cols) - c.SetTargets(MakeNNewTargets(1, 3, 0)) - actualTargetItems := c.TargetItems() - assert.Len(t, actualTargetItems, 1) - for _, item := range actualTargetItems { - assert.Equal(t, "collector-0", item.CollectorName) - } -} - -func TestRelativelyEvenDistribution(t *testing.T) { - numCols := 15 - numItems := 10000 - cols := MakeNCollectors(numCols, 0) - var expectedPerCollector = float64(numItems / numCols) - expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector - c := newConsistentHashingAllocator(logger) - c.SetCollectors(cols) - c.SetTargets(MakeNNewTargets(numItems, 0, 0)) - actualTargetItems := c.TargetItems() - assert.Len(t, actualTargetItems, numItems) - actualCollectors := c.Collectors() - assert.Len(t, actualCollectors, numCols) - for _, col := range actualCollectors { - assert.InDelta(t, col.NumTargets, expectedPerCollector, expectedDelta) - } -} - -func TestFullReallocation(t *testing.T) { - cols := MakeNCollectors(10, 0) - c := newConsistentHashingAllocator(logger) - c.SetCollectors(cols) - c.SetTargets(MakeNNewTargets(10000, 10, 0)) - actualTargetItems := c.TargetItems() - assert.Len(t, actualTargetItems, 10000) - actualCollectors := c.Collectors() - assert.Len(t, actualCollectors, 10) - newCols := MakeNCollectors(10, 10) - c.SetCollectors(newCols) - updatedTargetItems := c.TargetItems() - assert.Len(t, updatedTargetItems, 10000) - updatedCollectors := c.Collectors() - assert.Len(t, updatedCollectors, 10) - for _, item := range updatedTargetItems { - _, ok := updatedCollectors[item.CollectorName] - assert.True(t, ok, "Some items weren't reallocated correctly") - } -} - -func TestNumRemapped(t *testing.T) { - numItems := 10_000 - numInitialCols := 15 - numFinalCols := 16 - expectedDelta := float64((numFinalCols - numInitialCols) * (numItems / numFinalCols)) - cols := MakeNCollectors(numInitialCols, 0) - c := newConsistentHashingAllocator(logger) - c.SetCollectors(cols) - c.SetTargets(MakeNNewTargets(numItems, numInitialCols, 0)) - actualTargetItems := c.TargetItems() - assert.Len(t, actualTargetItems, numItems) - actualCollectors := c.Collectors() - assert.Len(t, actualCollectors, numInitialCols) - newCols := MakeNCollectors(numFinalCols, 0) - c.SetCollectors(newCols) - updatedTargetItems := c.TargetItems() - assert.Len(t, updatedTargetItems, numItems) - updatedCollectors := c.Collectors() - assert.Len(t, updatedCollectors, numFinalCols) - countRemapped := 0 - countNotRemapped := 0 - for _, item := range updatedTargetItems { - previousItem, ok := actualTargetItems[item.Hash()] - assert.True(t, ok) - if previousItem.CollectorName != item.CollectorName { - countRemapped++ - } else { - countNotRemapped++ - } - } - assert.InDelta(t, numItems/numFinalCols, countRemapped, expectedDelta) -} - -func TestTargetsWithNoCollectorsConsistentHashing(t *testing.T) { - - c := newConsistentHashingAllocator(logger) - - // Adding 10 new targets - numItems := 10 - c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItems, 0)) - actualTargetItems := c.TargetItems() - assert.Len(t, actualTargetItems, numItems) - - // Adding 5 new targets, and removing the old 10 targets - numItemsUpdate := 5 - c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 10)) - actualTargetItemsUpdated := c.TargetItems() - assert.Len(t, actualTargetItemsUpdated, numItemsUpdate) - - // Adding 5 new targets, and one existing target - numItemsUpdate = 6 - c.SetTargets(MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 14)) - actualTargetItemsUpdated = c.TargetItems() - assert.Len(t, actualTargetItemsUpdated, numItemsUpdate) - - // Adding collectors to test allocation - numCols := 2 - cols := MakeNCollectors(2, 0) - c.SetCollectors(cols) - var expectedPerCollector = float64(numItemsUpdate / numCols) - expectedDelta := (expectedPerCollector * 1.5) - expectedPerCollector - // Checking to see that there is no change to number of targets - actualTargetItems = c.TargetItems() - assert.Len(t, actualTargetItems, numItemsUpdate) - // Checking to see collectors are added correctly - actualCollectors := c.Collectors() - assert.Len(t, actualCollectors, numCols) - for _, col := range actualCollectors { - assert.InDelta(t, col.NumTargets, expectedPerCollector, expectedDelta) - } -} diff --git a/cmd/otel-allocator/allocation/least_weighted.go b/cmd/otel-allocator/allocation/least_weighted.go deleted file mode 100644 index 6ae9c5eb2..000000000 --- a/cmd/otel-allocator/allocation/least_weighted.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "sync" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" - - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" -) - -var _ Allocator = &leastWeightedAllocator{} - -const leastWeightedStrategyName = "least-weighted" - -/* - Target Allocator will serve on an HTTP server exposing /jobs//targets - The targets are allocated using the least connection method - Target Allocator will need information about the collectors in order to set the URLs - Keep a Map of what each collector currently holds and update it based on new scrape target updates -*/ - -// leastWeightedAllocator makes decisions to distribute work among -// a number of OpenTelemetry collectors based on the number of targets. -// Users need to call SetTargets when they have new targets in their -// clusters and call SetCollectors when the collectors have changed. -type leastWeightedAllocator struct { - // m protects collectors and targetItems for concurrent use. - m sync.RWMutex - // collectors is a map from a Collector's name to a Collector instance - collectors map[string]*Collector - // targetItems is a map from a target item's hash to the target items allocated state - targetItems map[string]*target.Item - - // collectorKey -> job -> target item hash -> true - targetItemsPerJobPerCollector map[string]map[string]map[string]bool - - log logr.Logger - - filter Filter -} - -// SetFilter sets the filtering hook to use. -func (allocator *leastWeightedAllocator) SetFilter(filter Filter) { - allocator.filter = filter -} - -func (allocator *leastWeightedAllocator) GetTargetsForCollectorAndJob(collector string, job string) []*target.Item { - allocator.m.RLock() - defer allocator.m.RUnlock() - if _, ok := allocator.targetItemsPerJobPerCollector[collector]; !ok { - return []*target.Item{} - } - if _, ok := allocator.targetItemsPerJobPerCollector[collector][job]; !ok { - return []*target.Item{} - } - targetItemsCopy := make([]*target.Item, len(allocator.targetItemsPerJobPerCollector[collector][job])) - index := 0 - for targetHash := range allocator.targetItemsPerJobPerCollector[collector][job] { - targetItemsCopy[index] = allocator.targetItems[targetHash] - index++ - } - return targetItemsCopy -} - -// TargetItems returns a shallow copy of the targetItems map. -func (allocator *leastWeightedAllocator) TargetItems() map[string]*target.Item { - allocator.m.RLock() - defer allocator.m.RUnlock() - targetItemsCopy := make(map[string]*target.Item) - for k, v := range allocator.targetItems { - targetItemsCopy[k] = v - } - return targetItemsCopy -} - -// Collectors returns a shallow copy of the collectors map. -func (allocator *leastWeightedAllocator) Collectors() map[string]*Collector { - allocator.m.RLock() - defer allocator.m.RUnlock() - collectorsCopy := make(map[string]*Collector) - for k, v := range allocator.collectors { - collectorsCopy[k] = v - } - return collectorsCopy -} - -// findNextCollector finds the next collector with fewer number of targets. -// This method is called from within SetTargets and SetCollectors, whose caller -// acquires the needed lock. This method assumes there are is at least 1 collector set. -// INVARIANT: allocator.collectors must have at least 1 collector set. -func (allocator *leastWeightedAllocator) findNextCollector() *Collector { - var col *Collector - for _, v := range allocator.collectors { - // If the initial collector is empty, set the initial collector to the first element of map - if col == nil { - col = v - } else if v.NumTargets < col.NumTargets { - col = v - } - } - return col -} - -// addCollectorTargetItemMapping keeps track of which collector has which jobs and targets -// this allows the allocator to respond without any extra allocations to http calls. The caller of this method -// has to acquire a lock. -func (allocator *leastWeightedAllocator) addCollectorTargetItemMapping(tg *target.Item) { - if allocator.targetItemsPerJobPerCollector[tg.CollectorName] == nil { - allocator.targetItemsPerJobPerCollector[tg.CollectorName] = make(map[string]map[string]bool) - } - if allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] == nil { - allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName] = make(map[string]bool) - } - allocator.targetItemsPerJobPerCollector[tg.CollectorName][tg.JobName][tg.Hash()] = true -} - -// addTargetToTargetItems assigns a target to the next available collector and adds it to the allocator's targetItems -// This method is called from within SetTargets and SetCollectors, which acquire the needed lock. -// This is only called after the collectors are cleared or when a new target has been found in the tempTargetMap. -// INVARIANT: allocator.collectors must have at least 1 collector set. -// NOTE: by not creating a new target item, there is the potential for a race condition where we modify this target -// item while it's being encoded by the server JSON handler. -func (allocator *leastWeightedAllocator) addTargetToTargetItems(tg *target.Item) { - chosenCollector := allocator.findNextCollector() - tg.CollectorName = chosenCollector.Name - allocator.targetItems[tg.Hash()] = tg - allocator.addCollectorTargetItemMapping(tg) - chosenCollector.NumTargets++ - TargetsPerCollector.WithLabelValues(chosenCollector.Name, leastWeightedStrategyName).Set(float64(chosenCollector.NumTargets)) -} - -// handleTargets receives the new and removed targets and reconciles the current state. -// Any removals are removed from the allocator's targetItems and unassigned from the corresponding collector. -// Any net-new additions are assigned to the next available collector. -func (allocator *leastWeightedAllocator) handleTargets(diff diff.Changes[*target.Item]) { - // Check for removals - for k, item := range allocator.targetItems { - // if the current item is in the removals list - if _, ok := diff.Removals()[k]; ok { - c := allocator.collectors[item.CollectorName] - c.NumTargets-- - delete(allocator.targetItems, k) - delete(allocator.targetItemsPerJobPerCollector[item.CollectorName][item.JobName], item.Hash()) - TargetsPerCollector.WithLabelValues(item.CollectorName, leastWeightedStrategyName).Set(float64(c.NumTargets)) - } - } - - // Check for additions - for k, item := range diff.Additions() { - // Do nothing if the item is already there - if _, ok := allocator.targetItems[k]; ok { - continue - } else { - // Add item to item pool and assign a collector - allocator.addTargetToTargetItems(item) - } - } -} - -// handleCollectors receives the new and removed collectors and reconciles the current state. -// Any removals are removed from the allocator's collectors. New collectors are added to the allocator's collector map. -// Finally, any targets of removed collectors are reallocated to the next available collector. -func (allocator *leastWeightedAllocator) handleCollectors(diff diff.Changes[*Collector]) { - // Clear removed collectors - for _, k := range diff.Removals() { - delete(allocator.collectors, k.Name) - delete(allocator.targetItemsPerJobPerCollector, k.Name) - TargetsPerCollector.WithLabelValues(k.Name, leastWeightedStrategyName).Set(0) - } - - // If previously there were no collector instances present, allocate the previous set of saved targets to the new collectors - allocateTargets := false - if len(allocator.collectors) == 0 && len(allocator.targetItems) > 0 { - allocateTargets = true - } - // Insert the new collectors - for _, i := range diff.Additions() { - allocator.collectors[i.Name] = NewCollector(i.Name) - } - if allocateTargets { - for _, item := range allocator.targetItems { - allocator.addTargetToTargetItems(item) - } - } - - // Re-Allocate targets of the removed collectors - for _, item := range allocator.targetItems { - if _, ok := diff.Removals()[item.CollectorName]; ok { - allocator.addTargetToTargetItems(item) - } - } -} - -// SetTargets accepts a list of targets that will be used to make -// load balancing decisions. This method should be called when there are -// new targets discovered or existing targets are shutdown. -func (allocator *leastWeightedAllocator) SetTargets(targets map[string]*target.Item) { - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetTargets", leastWeightedStrategyName)) - defer timer.ObserveDuration() - - if allocator.filter != nil { - targets = allocator.filter.Apply(targets) - } - RecordTargetsKept(targets) - - allocator.m.Lock() - defer allocator.m.Unlock() - - if len(allocator.collectors) == 0 { - allocator.log.Info("No collector instances present, saving targets to allocate to collector(s)") - // If there were no targets discovered previously, assign this as the new set of target items - if len(allocator.targetItems) == 0 { - allocator.log.Info("Not discovered any targets previously, saving targets found to the targetItems set") - for k, item := range targets { - allocator.targetItems[k] = item - } - } else { - // If there were previously discovered targets, add or remove accordingly - targetsDiffEmptyCollectorSet := diff.Maps(allocator.targetItems, targets) - - // Check for additions - if len(targetsDiffEmptyCollectorSet.Additions()) > 0 { - allocator.log.Info("New targets discovered, adding new targets to the targetItems set") - for k, item := range targetsDiffEmptyCollectorSet.Additions() { - // Do nothing if the item is already there - if _, ok := allocator.targetItems[k]; ok { - continue - } else { - // Add item to item pool - allocator.targetItems[k] = item - } - } - } - - // Check for deletions - if len(targetsDiffEmptyCollectorSet.Removals()) > 0 { - allocator.log.Info("Targets removed, Removing targets from the targetItems set") - for k := range targetsDiffEmptyCollectorSet.Removals() { - // Delete item from target items - delete(allocator.targetItems, k) - } - } - } - return - } - // Check for target changes - targetsDiff := diff.Maps(allocator.targetItems, targets) - // If there are any additions or removals - if len(targetsDiff.Additions()) != 0 || len(targetsDiff.Removals()) != 0 { - allocator.handleTargets(targetsDiff) - } -} - -// SetCollectors sets the set of collectors with key=collectorName, value=Collector object. -// This method is called when Collectors are added or removed. -func (allocator *leastWeightedAllocator) SetCollectors(collectors map[string]*Collector) { - timer := prometheus.NewTimer(TimeToAssign.WithLabelValues("SetCollectors", leastWeightedStrategyName)) - defer timer.ObserveDuration() - - CollectorsAllocatable.WithLabelValues(leastWeightedStrategyName).Set(float64(len(collectors))) - if len(collectors) == 0 { - allocator.log.Info("No collector instances present") - return - } - - allocator.m.Lock() - defer allocator.m.Unlock() - - // Check for collector changes - collectorsDiff := diff.Maps(allocator.collectors, collectors) - if len(collectorsDiff.Additions()) != 0 || len(collectorsDiff.Removals()) != 0 { - allocator.handleCollectors(collectorsDiff) - } -} - -func newLeastWeightedAllocator(log logr.Logger, opts ...AllocationOption) Allocator { - lwAllocator := &leastWeightedAllocator{ - log: log, - collectors: make(map[string]*Collector), - targetItems: make(map[string]*target.Item), - targetItemsPerJobPerCollector: make(map[string]map[string]map[string]bool), - } - - for _, opt := range opts { - opt(lwAllocator) - } - - return lwAllocator -} diff --git a/cmd/otel-allocator/allocation/least_weighted_test.go b/cmd/otel-allocator/allocation/least_weighted_test.go deleted file mode 100644 index 417c0e5ed..000000000 --- a/cmd/otel-allocator/allocation/least_weighted_test.go +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "math" - "math/rand" - "testing" - - "github.com/prometheus/common/model" - "github.com/stretchr/testify/assert" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestSetCollectors(t *testing.T) { - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(3, 0) - s.SetCollectors(cols) - - expectedColLen := len(cols) - collectors := s.Collectors() - assert.Len(t, collectors, expectedColLen) - - for _, i := range cols { - assert.NotNil(t, collectors[i.Name]) - } -} - -func TestAddingAndRemovingTargets(t *testing.T) { - // prepare allocator with initial targets and collectors - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(3, 0) - s.SetCollectors(cols) - - initTargets := MakeNNewTargets(6, 3, 0) - - // test that targets and collectors are added properly - s.SetTargets(initTargets) - - // verify - expectedTargetLen := len(initTargets) - assert.Len(t, s.TargetItems(), expectedTargetLen) - - // prepare second round of targets - tar := MakeNNewTargets(4, 3, 0) - - // test that fewer targets are found - removed - s.SetTargets(tar) - - // verify - targetItems := s.TargetItems() - expectedNewTargetLen := len(tar) - assert.Len(t, targetItems, expectedNewTargetLen) - - // verify results map - for _, i := range tar { - _, ok := targetItems[i.Hash()] - assert.True(t, ok) - } -} - -// Tests that two targets with the same target url and job name but different label set are both added. -func TestAllocationCollision(t *testing.T) { - // prepare allocator with initial targets and collectors - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(3, 0) - s.SetCollectors(cols) - firstLabels := model.LabelSet{ - "test": "test1", - } - secondLabels := model.LabelSet{ - "test": "test2", - } - firstTarget := target.NewItem("sample-name", "0.0.0.0:8000", firstLabels, "") - secondTarget := target.NewItem("sample-name", "0.0.0.0:8000", secondLabels, "") - - targetList := map[string]*target.Item{ - firstTarget.Hash(): firstTarget, - secondTarget.Hash(): secondTarget, - } - - // test that targets and collectors are added properly - s.SetTargets(targetList) - - // verify - targetItems := s.TargetItems() - expectedTargetLen := len(targetList) - assert.Len(t, targetItems, expectedTargetLen) - - // verify results map - for _, i := range targetList { - _, ok := targetItems[i.Hash()] - assert.True(t, ok) - } -} - -func TestNoCollectorReassignment(t *testing.T) { - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(3, 0) - s.SetCollectors(cols) - - expectedColLen := len(cols) - assert.Len(t, s.Collectors(), expectedColLen) - - for _, i := range cols { - assert.NotNil(t, s.Collectors()[i.Name]) - } - initTargets := MakeNNewTargets(6, 3, 0) - - // test that targets and collectors are added properly - s.SetTargets(initTargets) - - // verify - expectedTargetLen := len(initTargets) - targetItems := s.TargetItems() - assert.Len(t, targetItems, expectedTargetLen) - - // assign new set of collectors with the same names - newCols := MakeNCollectors(3, 0) - s.SetCollectors(newCols) - - newTargetItems := s.TargetItems() - assert.Equal(t, targetItems, newTargetItems) - -} - -func TestSmartCollectorReassignment(t *testing.T) { - t.Skip("This test is flaky and fails frequently, see issue 1291") - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(4, 0) - s.SetCollectors(cols) - - expectedColLen := len(cols) - assert.Len(t, s.Collectors(), expectedColLen) - - for _, i := range cols { - assert.NotNil(t, s.Collectors()[i.Name]) - } - initTargets := MakeNNewTargets(6, 0, 0) - // test that targets and collectors are added properly - s.SetTargets(initTargets) - - // verify - expectedTargetLen := len(initTargets) - targetItems := s.TargetItems() - assert.Len(t, targetItems, expectedTargetLen) - - // assign new set of collectors with the same names - newCols := map[string]*Collector{ - "collector-0": { - Name: "collector-0", - }, "collector-1": { - Name: "collector-1", - }, "collector-2": { - Name: "collector-2", - }, "collector-4": { - Name: "collector-4", - }, - } - s.SetCollectors(newCols) - - newTargetItems := s.TargetItems() - assert.Equal(t, len(targetItems), len(newTargetItems)) - for key, targetItem := range targetItems { - item, ok := newTargetItems[key] - assert.True(t, ok, "all target items should be found in new target item list") - if targetItem.CollectorName != "collector-3" { - assert.Equal(t, targetItem.CollectorName, item.CollectorName) - } else { - assert.Equal(t, "collector-4", item.CollectorName) - } - } -} - -// Tests that the delta in number of targets per collector is less than 15% of an even distribution. -func TestCollectorBalanceWhenAddingAndRemovingAtRandom(t *testing.T) { - - // prepare allocator with 3 collectors and 'random' amount of targets - s, _ := New("least-weighted", logger) - - cols := MakeNCollectors(3, 0) - s.SetCollectors(cols) - - targets := MakeNNewTargets(27, 3, 0) - s.SetTargets(targets) - - // Divisor needed to get 15% - divisor := 6.7 - - targetItemLen := len(s.TargetItems()) - collectors := s.Collectors() - count := targetItemLen / len(collectors) - percent := float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, percent) - } - - // removing targets at 'random' - // Remove half of targets randomly - toDelete := len(targets) / 2 - counter := 0 - for index := range targets { - shouldDelete := rand.Intn(toDelete) //nolint:gosec - if counter < shouldDelete { - delete(targets, index) - } - counter++ - } - s.SetTargets(targets) - - targetItemLen = len(s.TargetItems()) - collectors = s.Collectors() - count = targetItemLen / len(collectors) - percent = float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, math.Round(percent)) - } - // adding targets at 'random' - for _, item := range MakeNNewTargets(13, 3, 100) { - targets[item.Hash()] = item - } - s.SetTargets(targets) - - targetItemLen = len(s.TargetItems()) - collectors = s.Collectors() - count = targetItemLen / len(collectors) - percent = float64(targetItemLen) / divisor - - // test - for _, i := range collectors { - assert.InDelta(t, i.NumTargets, count, math.Round(percent)) - } -} - -func TestTargetsWithNoCollectorsLeastWeighted(t *testing.T) { - s, _ := New("least-weighted", logger) - - // Adding 10 new targets - numItems := 10 - initTargets := MakeNNewTargetsWithEmptyCollectors(numItems, 0) - s.SetTargets(initTargets) - actualTargetItems := s.TargetItems() - assert.Len(t, actualTargetItems, numItems) - - // Adding 5 new targets, and removing the old 10 targets - numItemsUpdate := 5 - newTargets := MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 10) - s.SetTargets(newTargets) - actualTargetItems = s.TargetItems() - assert.Len(t, actualTargetItems, numItemsUpdate) - - // Adding 5 new targets, and one existing target - numItemsUpdate = 6 - newTargets = MakeNNewTargetsWithEmptyCollectors(numItemsUpdate, 14) - s.SetTargets(newTargets) - actualTargetItems = s.TargetItems() - assert.Len(t, actualTargetItems, numItemsUpdate) - - // Adding collectors to test allocation - numCols := 2 - cols := MakeNCollectors(2, 0) - s.SetCollectors(cols) - - // Checking to see that there is no change to number of targets - actualTargetItems = s.TargetItems() - assert.Len(t, actualTargetItems, numItemsUpdate) - // Checking to see collectors are added correctly - actualCollectors := s.Collectors() - assert.Len(t, actualCollectors, numCols) - - // Divisor needed to get 15% - divisor := 6.7 - targetItemLen := len(actualTargetItems) - count := targetItemLen / len(actualCollectors) - percent := float64(targetItemLen) / divisor - - // Check to see targets are allocated with the expected delta - for _, i := range actualCollectors { - assert.InDelta(t, i.NumTargets, count, math.Round(percent)) - } -} diff --git a/cmd/otel-allocator/allocation/strategy.go b/cmd/otel-allocator/allocation/strategy.go deleted file mode 100644 index b99455773..000000000 --- a/cmd/otel-allocator/allocation/strategy.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "errors" - "fmt" - - "github.com/buraksezer/consistent" - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -type AllocatorProvider func(log logr.Logger, opts ...AllocationOption) Allocator - -var ( - registry = map[string]AllocatorProvider{} - - // TargetsPerCollector records how many targets have been assigned to each collector. - // It is currently the responsibility of the strategy to track this information. - TargetsPerCollector = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_targets_per_collector", - Help: "The number of targets for each collector.", - }, []string{"collector_name", "strategy"}) - CollectorsAllocatable = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_collectors_allocatable", - Help: "Number of collectors the allocator is able to allocate to.", - }, []string{"strategy"}) - TimeToAssign = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "opentelemetry_allocator_time_to_allocate", - Help: "The time it takes to allocate", - }, []string{"method", "strategy"}) - targetsRemaining = promauto.NewCounter(prometheus.CounterOpts{ - Name: "opentelemetry_allocator_targets_remaining", - Help: "Number of targets kept after filtering.", - }) -) - -type AllocationOption func(Allocator) - -type Filter interface { - Apply(map[string]*target.Item) map[string]*target.Item -} - -func WithFilter(filter Filter) AllocationOption { - return func(allocator Allocator) { - allocator.SetFilter(filter) - } -} - -func RecordTargetsKept(targets map[string]*target.Item) { - targetsRemaining.Add(float64(len(targets))) -} - -func New(name string, log logr.Logger, opts ...AllocationOption) (Allocator, error) { - if p, ok := registry[name]; ok { - return p(log.WithValues("allocator", name), opts...), nil - } - return nil, fmt.Errorf("unregistered strategy: %s", name) -} - -func Register(name string, provider AllocatorProvider) error { - if _, ok := registry[name]; ok { - return errors.New("already registered") - } - registry[name] = provider - return nil -} - -func GetRegisteredAllocatorNames() []string { - var names []string - for s := range registry { - names = append(names, s) - } - return names -} - -type Allocator interface { - SetCollectors(collectors map[string]*Collector) - SetTargets(targets map[string]*target.Item) - TargetItems() map[string]*target.Item - Collectors() map[string]*Collector - GetTargetsForCollectorAndJob(collector string, job string) []*target.Item - SetFilter(filter Filter) -} - -var _ consistent.Member = Collector{} - -// Collector Creates a struct that holds Collector information. -// This struct will be parsed into endpoint with Collector and jobs info. -// This struct can be extended with information like annotations and labels in the future. -type Collector struct { - Name string - NumTargets int -} - -func (c Collector) Hash() string { - return c.Name -} - -func (c Collector) String() string { - return c.Name -} - -func NewCollector(name string) *Collector { - return &Collector{Name: name} -} - -func init() { - err := Register(leastWeightedStrategyName, newLeastWeightedAllocator) - if err != nil { - panic(err) - } - err = Register(consistentHashingStrategyName, newConsistentHashingAllocator) - if err != nil { - panic(err) - } -} diff --git a/cmd/otel-allocator/allocation/strategy_test.go b/cmd/otel-allocator/allocation/strategy_test.go deleted file mode 100644 index c12529d8d..000000000 --- a/cmd/otel-allocator/allocation/strategy_test.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package allocation - -import ( - "fmt" - "reflect" - "testing" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/diff" -) - -func BenchmarkGetAllTargetsByCollectorAndJob(b *testing.B) { - var table = []struct { - numCollectors int - numJobs int - }{ - {numCollectors: 100, numJobs: 100}, - {numCollectors: 100, numJobs: 1000}, - {numCollectors: 100, numJobs: 10000}, - {numCollectors: 100, numJobs: 100000}, - {numCollectors: 1000, numJobs: 100}, - {numCollectors: 1000, numJobs: 1000}, - {numCollectors: 1000, numJobs: 10000}, - {numCollectors: 1000, numJobs: 100000}, - } - for _, s := range GetRegisteredAllocatorNames() { - for _, v := range table { - a, err := New(s, logger) - if err != nil { - b.Log(err) - b.Fail() - } - cols := MakeNCollectors(v.numCollectors, 0) - jobs := MakeNNewTargets(v.numJobs, v.numCollectors, 0) - a.SetCollectors(cols) - a.SetTargets(jobs) - b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numJobs), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - a.GetTargetsForCollectorAndJob(fmt.Sprintf("collector-%d", v.numCollectors/2), fmt.Sprintf("test-job-%d", v.numJobs/2)) - } - }) - } - } -} - -func Benchmark_Setting(b *testing.B) { - var table = []struct { - numCollectors int - numTargets int - }{ - {numCollectors: 100, numTargets: 100}, - {numCollectors: 100, numTargets: 1000}, - {numCollectors: 100, numTargets: 10000}, - {numCollectors: 100, numTargets: 100000}, - {numCollectors: 1000, numTargets: 100}, - {numCollectors: 1000, numTargets: 1000}, - {numCollectors: 1000, numTargets: 10000}, - {numCollectors: 1000, numTargets: 100000}, - } - - for _, s := range GetRegisteredAllocatorNames() { - for _, v := range table { - a, _ := New(s, logger) - cols := MakeNCollectors(v.numCollectors, 0) - targets := MakeNNewTargets(v.numTargets, v.numCollectors, 0) - b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", s, v.numCollectors, v.numTargets), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - a.SetCollectors(cols) - a.SetTargets(targets) - } - }) - } - } -} - -func TestCollectorDiff(t *testing.T) { - collector0 := NewCollector("collector-0") - collector1 := NewCollector("collector-1") - collector2 := NewCollector("collector-2") - collector3 := NewCollector("collector-3") - collector4 := NewCollector("collector-4") - type args struct { - current map[string]*Collector - new map[string]*Collector - } - tests := []struct { - name string - args args - want diff.Changes[*Collector] - }{ - { - name: "diff two collector maps", - args: args{ - current: map[string]*Collector{ - "collector-0": collector0, - "collector-1": collector1, - "collector-2": collector2, - "collector-3": collector3, - }, - new: map[string]*Collector{ - "collector-0": collector0, - "collector-1": collector1, - "collector-2": collector2, - "collector-4": collector4, - }, - }, - want: diff.NewChanges(map[string]*Collector{ - "collector-4": collector4, - }, map[string]*Collector{ - "collector-3": collector3, - }), - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := diff.Maps(tt.args.current, tt.args.new); !reflect.DeepEqual(got, tt.want) { - t.Errorf("DiffMaps() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/cmd/otel-allocator/collector/collector.go b/cmd/otel-allocator/collector/collector.go deleted file mode 100644 index eaeee8e16..000000000 --- a/cmd/otel-allocator/collector/collector.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package collector - -import ( - "context" - "os" - "time" - - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" -) - -const ( - watcherTimeout = 15 * time.Minute -) - -var ( - ns = os.Getenv("OTELCOL_NAMESPACE") - collectorsDiscovered = promauto.NewGauge(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_collectors_discovered", - Help: "Number of collectors discovered.", - }) -) - -type Client struct { - log logr.Logger - k8sClient kubernetes.Interface - close chan struct{} -} - -func NewClient(logger logr.Logger, kubeConfig *rest.Config) (*Client, error) { - clientset, err := kubernetes.NewForConfig(kubeConfig) - if err != nil { - return &Client{}, err - } - - return &Client{ - log: logger.WithValues("component", "opentelemetry-targetallocator"), - k8sClient: clientset, - close: make(chan struct{}), - }, nil -} - -func (k *Client) Watch(ctx context.Context, labelMap map[string]string, fn func(collectors map[string]*allocation.Collector)) error { - collectorMap := map[string]*allocation.Collector{} - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(labelMap).String(), - } - pods, err := k.k8sClient.CoreV1().Pods(ns).List(ctx, opts) - if err != nil { - k.log.Error(err, "Pod failure") - os.Exit(1) - } - for i := range pods.Items { - pod := pods.Items[i] - if pod.GetObjectMeta().GetDeletionTimestamp() == nil { - collectorMap[pod.Name] = allocation.NewCollector(pod.Name) - } - } - - fn(collectorMap) - - for { - if !k.restartWatch(ctx, opts, collectorMap, fn) { - return nil - } - } -} - -func (k *Client) restartWatch(ctx context.Context, opts metav1.ListOptions, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) bool { - // add timeout to the context before calling Watch - ctx, cancel := context.WithTimeout(ctx, watcherTimeout) - defer cancel() - watcher, err := k.k8sClient.CoreV1().Pods(ns).Watch(ctx, opts) - if err != nil { - k.log.Error(err, "unable to create collector pod watcher") - return false - } - k.log.Info("Successfully started a collector pod watcher") - if msg := runWatch(ctx, k, watcher.ResultChan(), collectorMap, fn); msg != "" { - k.log.Info("Collector pod watch event stopped " + msg) - return false - } - - return true -} - -func runWatch(ctx context.Context, k *Client, c <-chan watch.Event, collectorMap map[string]*allocation.Collector, fn func(collectors map[string]*allocation.Collector)) string { - for { - collectorsDiscovered.Set(float64(len(collectorMap))) - select { - case <-k.close: - return "kubernetes client closed" - case <-ctx.Done(): - return "" - case event, ok := <-c: - if !ok { - k.log.Info("No event found. Restarting watch routine") - return "" - } - - pod, ok := event.Object.(*v1.Pod) - if !ok { - k.log.Info("No pod found in event Object. Restarting watch routine") - return "" - } - - switch event.Type { //nolint:exhaustive - case watch.Added: - collectorMap[pod.Name] = allocation.NewCollector(pod.Name) - case watch.Deleted: - delete(collectorMap, pod.Name) - } - fn(collectorMap) - } - } -} - -func (k *Client) Close() { - close(k.close) -} diff --git a/cmd/otel-allocator/collector/collector_test.go b/cmd/otel-allocator/collector/collector_test.go deleted file mode 100644 index 5367828e2..000000000 --- a/cmd/otel-allocator/collector/collector_test.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package collector - -import ( - "context" - "fmt" - "os" - "sync" - "testing" - "time" - - "k8s.io/apimachinery/pkg/watch" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/kubernetes/fake" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" -) - -var logger = logf.Log.WithName("collector-unit-tests") - -func getTestClient() (Client, watch.Interface) { - kubeClient := Client{ - k8sClient: fake.NewSimpleClientset(), - close: make(chan struct{}), - log: logger, - } - - labelMap := map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - } - - opts := metav1.ListOptions{ - LabelSelector: labels.SelectorFromSet(labelMap).String(), - } - watcher, err := kubeClient.k8sClient.CoreV1().Pods("test-ns").Watch(context.Background(), opts) - if err != nil { - fmt.Printf("failed to setup a Collector Pod watcher: %v", err) - os.Exit(1) - } - return kubeClient, watcher -} - -func pod(name string) *v1.Pod { - labelSet := make(map[string]string) - labelSet["app.kubernetes.io/instance"] = "default.test" - labelSet["app.kubernetes.io/managed-by"] = "opentelemetry-operator" - - return &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: "test-ns", - Labels: labelSet, - }, - } -} - -func Test_runWatch(t *testing.T) { - type args struct { - kubeFn func(t *testing.T, client Client, group *sync.WaitGroup) - collectorMap map[string]*allocation.Collector - } - tests := []struct { - name string - args args - want map[string]*allocation.Collector - }{ - { - name: "pod add", - args: args{ - kubeFn: func(t *testing.T, client Client, group *sync.WaitGroup) { - for _, k := range []string{"test-pod1", "test-pod2", "test-pod3"} { - p := pod(k) - group.Add(1) - _, err := client.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), p, metav1.CreateOptions{}) - assert.NoError(t, err) - } - }, - collectorMap: map[string]*allocation.Collector{}, - }, - want: map[string]*allocation.Collector{ - "test-pod1": { - Name: "test-pod1", - }, - "test-pod2": { - Name: "test-pod2", - }, - "test-pod3": { - Name: "test-pod3", - }, - }, - }, - { - name: "pod delete", - args: args{ - kubeFn: func(t *testing.T, client Client, group *sync.WaitGroup) { - for _, k := range []string{"test-pod2", "test-pod3"} { - group.Add(1) - err := client.k8sClient.CoreV1().Pods("test-ns").Delete(context.Background(), k, metav1.DeleteOptions{}) - assert.NoError(t, err) - } - }, - collectorMap: map[string]*allocation.Collector{ - "test-pod1": { - Name: "test-pod1", - }, - "test-pod2": { - Name: "test-pod2", - }, - "test-pod3": { - Name: "test-pod3", - }, - }, - }, - want: map[string]*allocation.Collector{ - "test-pod1": { - Name: "test-pod1", - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - kubeClient, watcher := getTestClient() - defer func() { - close(kubeClient.close) - watcher.Stop() - }() - var wg sync.WaitGroup - actual := make(map[string]*allocation.Collector) - for _, k := range tt.args.collectorMap { - p := pod(k.Name) - _, err := kubeClient.k8sClient.CoreV1().Pods("test-ns").Create(context.Background(), p, metav1.CreateOptions{}) - wg.Add(1) - assert.NoError(t, err) - } - go runWatch(context.Background(), &kubeClient, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) { - actual = colMap - wg.Done() - }) - - tt.args.kubeFn(t, kubeClient, &wg) - wg.Wait() - - assert.Len(t, actual, len(tt.want)) - assert.Equal(t, actual, tt.want) - }) - } -} - -// this tests runWatch in the case of watcher channel closing and watcher timing out. -func Test_closeChannel(t *testing.T) { - tests := []struct { - description string - isCloseChannel bool - timeoutSeconds time.Duration - }{ - { - // event is triggered by channel closing. - description: "close_channel", - isCloseChannel: true, - // channel should be closed before this timeout occurs - timeoutSeconds: 10 * time.Second, - }, - { - // event triggered by timeout. - description: "watcher_timeout", - isCloseChannel: false, - timeoutSeconds: 0 * time.Second, - }, - } - - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - kubeClient, watcher := getTestClient() - - defer func() { - close(kubeClient.close) - watcher.Stop() - }() - var wg sync.WaitGroup - wg.Add(1) - terminated := false - - go func(watcher watch.Interface) { - defer wg.Done() - ctx, cancel := context.WithTimeout(context.Background(), tc.timeoutSeconds) - defer cancel() - if msg := runWatch(ctx, &kubeClient, watcher.ResultChan(), map[string]*allocation.Collector{}, func(colMap map[string]*allocation.Collector) {}); msg != "" { - terminated = true - return - } - }(watcher) - - if tc.isCloseChannel { - // stop pod watcher to trigger event. - watcher.Stop() - } - wg.Wait() - assert.False(t, terminated) - }) - } -} diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go deleted file mode 100644 index d91b057e1..000000000 --- a/cmd/otel-allocator/config/config.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "errors" - "fmt" - "io/fs" - "os" - "time" - - "github.com/go-logr/logr" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - _ "github.com/prometheus/prometheus/discovery/install" - "github.com/spf13/pflag" - "gopkg.in/yaml.v2" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/klog/v2" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/log/zap" -) - -const DefaultResyncTime = 5 * time.Minute -const DefaultConfigFilePath string = "/conf/targetallocator.yaml" -const DefaultCRScrapeInterval model.Duration = model.Duration(time.Second * 30) - -type Config struct { - ListenAddr string `yaml:"listen_addr,omitempty"` - KubeConfigFilePath string `yaml:"kube_config_file_path,omitempty"` - ClusterConfig *rest.Config `yaml:"-"` - RootLogger logr.Logger `yaml:"-"` - LabelSelector map[string]string `yaml:"label_selector,omitempty"` - PromConfig *promconfig.Config `yaml:"config"` - AllocationStrategy *string `yaml:"allocation_strategy,omitempty"` - FilterStrategy *string `yaml:"filter_strategy,omitempty"` - PrometheusCR PrometheusCRConfig `yaml:"prometheus_cr,omitempty"` - PodMonitorSelector map[string]string `yaml:"pod_monitor_selector,omitempty"` - ServiceMonitorSelector map[string]string `yaml:"service_monitor_selector,omitempty"` -} - -type PrometheusCRConfig struct { - Enabled bool `yaml:"enabled,omitempty"` - ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"` -} - -func (c Config) GetAllocationStrategy() string { - if c.AllocationStrategy != nil { - return *c.AllocationStrategy - } - return "least-weighted" -} - -func (c Config) GetTargetsFilterStrategy() string { - if c.FilterStrategy != nil { - return *c.FilterStrategy - } - return "" -} - -func LoadFromFile(file string, target *Config) error { - return unmarshal(target, file) -} - -func LoadFromCLI(target *Config, flagSet *pflag.FlagSet) error { - var err error - // set the rest of the config attributes based on command-line flag values - target.RootLogger = zap.New(zap.UseFlagOptions(&zapCmdLineOpts)) - klog.SetLogger(target.RootLogger) - ctrl.SetLogger(target.RootLogger) - - target.KubeConfigFilePath, err = getKubeConfigFilePath(flagSet) - if err != nil { - return err - } - clusterConfig, err := clientcmd.BuildConfigFromFlags("", target.KubeConfigFilePath) - if err != nil { - pathError := &fs.PathError{} - if ok := errors.As(err, &pathError); !ok { - return err - } - clusterConfig, err = rest.InClusterConfig() - if err != nil { - return err - } - target.KubeConfigFilePath = "" - } - target.ClusterConfig = clusterConfig - - target.ListenAddr, err = getListenAddr(flagSet) - if err != nil { - return err - } - - target.PrometheusCR.Enabled, err = getPrometheusCREnabled(flagSet) - if err != nil { - return err - } - - return nil -} - -func unmarshal(cfg *Config, configFile string) error { - - yamlFile, err := os.ReadFile(configFile) - if err != nil { - return err - } - if err = yaml.UnmarshalStrict(yamlFile, cfg); err != nil { - return fmt.Errorf("error unmarshaling YAML: %w", err) - } - return nil -} - -func CreateDefaultConfig() Config { - return Config{ - PrometheusCR: PrometheusCRConfig{ - ScrapeInterval: DefaultCRScrapeInterval, - }, - } -} - -func Load() (*Config, error) { - var err error - - flagSet := getFlagSet(pflag.ExitOnError) - err = flagSet.Parse(os.Args) - if err != nil { - return nil, err - } - - config := CreateDefaultConfig() - - // load the config from the config file - configFilePath, err := getConfigFilePath(flagSet) - if err != nil { - return nil, err - } - err = LoadFromFile(configFilePath, &config) - if err != nil { - return nil, err - } - - err = LoadFromCLI(&config, flagSet) - if err != nil { - return nil, err - } - - return &config, nil -} - -// ValidateConfig validates the cli and file configs together. -func ValidateConfig(config *Config) error { - scrapeConfigsPresent := (config.PromConfig != nil && len(config.PromConfig.ScrapeConfigs) > 0) - if !(config.PrometheusCR.Enabled || scrapeConfigsPresent) { - return fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled") - } - return nil -} diff --git a/cmd/otel-allocator/config/config_test.go b/cmd/otel-allocator/config/config_test.go deleted file mode 100644 index 89f6307d8..000000000 --- a/cmd/otel-allocator/config/config_test.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "fmt" - "testing" - "time" - - commonconfig "github.com/prometheus/common/config" - promconfig "github.com/prometheus/prometheus/config" - - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/discovery/file" - "github.com/stretchr/testify/assert" -) - -func TestLoad(t *testing.T) { - type args struct { - file string - } - tests := []struct { - name string - args args - want Config - wantErr assert.ErrorAssertionFunc - }{ - { - name: "file sd load", - args: args{ - file: "./testdata/config_test.yaml", - }, - want: Config{ - LabelSelector: map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - PrometheusCR: PrometheusCRConfig{ - ScrapeInterval: model.Duration(time.Second * 60), - }, - PromConfig: &promconfig.Config{ - GlobalConfig: promconfig.GlobalConfig{ - ScrapeInterval: model.Duration(60 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - EvaluationInterval: model.Duration(60 * time.Second), - }, - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "prometheus", - HonorTimestamps: true, - ScrapeInterval: model.Duration(60 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - EnableHTTP2: true, - }, - ServiceDiscoveryConfigs: []discovery.Config{ - &file.SDConfig{ - Files: []string{"./file_sd_test.json"}, - RefreshInterval: model.Duration(5 * time.Minute), - }, - discovery.StaticConfig{ - { - Targets: []model.LabelSet{ - {model.AddressLabel: "prom.domain:9001"}, - {model.AddressLabel: "prom.domain:9002"}, - {model.AddressLabel: "prom.domain:9003"}, - }, - Labels: model.LabelSet{ - "my": "label", - }, - Source: "0", - }, - }, - }, - }, - }, - }, - }, - wantErr: assert.NoError, - }, - { - name: "no config", - args: args{ - file: "./testdata/no_config.yaml", - }, - want: CreateDefaultConfig(), - wantErr: assert.NoError, - }, - { - name: "service monitor pod monitor selector", - args: args{ - file: "./testdata/pod_service_selector_test.yaml", - }, - want: Config{ - LabelSelector: map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - PrometheusCR: PrometheusCRConfig{ - ScrapeInterval: DefaultCRScrapeInterval, - }, - PromConfig: &promconfig.Config{ - GlobalConfig: promconfig.GlobalConfig{ - ScrapeInterval: model.Duration(60 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - EvaluationInterval: model.Duration(60 * time.Second), - }, - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "prometheus", - HonorTimestamps: true, - ScrapeInterval: model.Duration(60 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - EnableHTTP2: true, - }, - ServiceDiscoveryConfigs: []discovery.Config{ - discovery.StaticConfig{ - { - Targets: []model.LabelSet{ - {model.AddressLabel: "prom.domain:9001"}, - {model.AddressLabel: "prom.domain:9002"}, - {model.AddressLabel: "prom.domain:9003"}, - }, - Labels: model.LabelSet{ - "my": "label", - }, - Source: "0", - }, - }, - }, - }, - }, - }, - PodMonitorSelector: map[string]string{ - "release": "test", - }, - ServiceMonitorSelector: map[string]string{ - "release": "test", - }, - }, - wantErr: assert.NoError, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := CreateDefaultConfig() - err := LoadFromFile(tt.args.file, &got) - if !tt.wantErr(t, err, fmt.Sprintf("Load(%v)", tt.args.file)) { - return - } - assert.Equalf(t, tt.want, got, "Load(%v)", tt.args.file) - }) - } -} - -func TestValidateConfig(t *testing.T) { - testCases := []struct { - name string - fileConfig Config - expectedErr error - }{ - { - name: "promCR enabled, no Prometheus config", - fileConfig: Config{PromConfig: nil, PrometheusCR: PrometheusCRConfig{Enabled: true}}, - expectedErr: nil, - }, - { - name: "promCR disabled, no Prometheus config", - fileConfig: Config{PromConfig: nil}, - expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), - }, - { - name: "promCR disabled, Prometheus config present, no scrapeConfigs", - fileConfig: Config{PromConfig: &promconfig.Config{}}, - expectedErr: fmt.Errorf("at least one scrape config must be defined, or Prometheus CR watching must be enabled"), - }, - { - name: "promCR disabled, Prometheus config present, scrapeConfigs present", - fileConfig: Config{ - PromConfig: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, - }, - expectedErr: nil, - }, - { - name: "promCR enabled, Prometheus config present, scrapeConfigs present", - fileConfig: Config{ - PromConfig: &promconfig.Config{ScrapeConfigs: []*promconfig.ScrapeConfig{{}}}, - PrometheusCR: PrometheusCRConfig{Enabled: true}, - }, - expectedErr: nil, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - err := ValidateConfig(&tc.fileConfig) - assert.Equal(t, tc.expectedErr, err) - }) - } -} diff --git a/cmd/otel-allocator/config/flags.go b/cmd/otel-allocator/config/flags.go deleted file mode 100644 index bb7dbbb34..000000000 --- a/cmd/otel-allocator/config/flags.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "flag" - "path/filepath" - - "github.com/spf13/pflag" - "k8s.io/client-go/util/homedir" - "sigs.k8s.io/controller-runtime/pkg/log/zap" -) - -// Flag names. -const ( - targetAllocatorName = "target-allocator" - configFilePathFlagName = "config-file" - listenAddrFlagName = "listen-addr" - prometheusCREnabledFlagName = "enable-prometheus-cr-watcher" - kubeConfigPathFlagName = "kubeconfig-path" -) - -// We can't bind this flag to our FlagSet, so we need to handle it separately. -var zapCmdLineOpts zap.Options - -func getFlagSet(errorHandling pflag.ErrorHandling) *pflag.FlagSet { - flagSet := pflag.NewFlagSet(targetAllocatorName, errorHandling) - flagSet.String(configFilePathFlagName, DefaultConfigFilePath, "The path to the config file.") - flagSet.String(listenAddrFlagName, ":8080", "The address where this service serves.") - flagSet.Bool(prometheusCREnabledFlagName, false, "Enable Prometheus CRs as target sources") - flagSet.String(kubeConfigPathFlagName, filepath.Join(homedir.HomeDir(), ".kube", "config"), "absolute path to the KubeconfigPath file") - zapFlagSet := flag.NewFlagSet("", flag.ErrorHandling(errorHandling)) - zapCmdLineOpts.BindFlags(zapFlagSet) - flagSet.AddGoFlagSet(zapFlagSet) - return flagSet -} - -func getConfigFilePath(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(configFilePathFlagName) -} - -func getKubeConfigFilePath(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(kubeConfigPathFlagName) -} - -func getListenAddr(flagSet *pflag.FlagSet) (string, error) { - return flagSet.GetString(listenAddrFlagName) -} - -func getPrometheusCREnabled(flagSet *pflag.FlagSet) (bool, error) { - return flagSet.GetBool(prometheusCREnabledFlagName) -} diff --git a/cmd/otel-allocator/config/flags_test.go b/cmd/otel-allocator/config/flags_test.go deleted file mode 100644 index b1bf11b6c..000000000 --- a/cmd/otel-allocator/config/flags_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package config - -import ( - "path/filepath" - "testing" - - "github.com/spf13/pflag" - "github.com/stretchr/testify/assert" -) - -func TestGetFlagSet(t *testing.T) { - fs := getFlagSet(pflag.ExitOnError) - - // Check if each flag exists - assert.NotNil(t, fs.Lookup(configFilePathFlagName), "Flag %s not found", configFilePathFlagName) - assert.NotNil(t, fs.Lookup(listenAddrFlagName), "Flag %s not found", listenAddrFlagName) - assert.NotNil(t, fs.Lookup(prometheusCREnabledFlagName), "Flag %s not found", prometheusCREnabledFlagName) - assert.NotNil(t, fs.Lookup(kubeConfigPathFlagName), "Flag %s not found", kubeConfigPathFlagName) -} - -func TestFlagGetters(t *testing.T) { - tests := []struct { - name string - flagArgs []string - expectedValue interface{} - expectedErr bool - getterFunc func(*pflag.FlagSet) (interface{}, error) - }{ - { - name: "GetConfigFilePath", - flagArgs: []string{"--" + configFilePathFlagName, "/path/to/config"}, - expectedValue: "/path/to/config", - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, - }, - { - name: "GetKubeConfigFilePath", - flagArgs: []string{"--" + kubeConfigPathFlagName, filepath.Join("~", ".kube", "config")}, - expectedValue: filepath.Join("~", ".kube", "config"), - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getKubeConfigFilePath(fs) }, - }, - { - name: "GetListenAddr", - flagArgs: []string{"--" + listenAddrFlagName, ":8081"}, - expectedValue: ":8081", - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getListenAddr(fs) }, - }, - { - name: "GetPrometheusCREnabled", - flagArgs: []string{"--" + prometheusCREnabledFlagName, "true"}, - expectedValue: true, - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getPrometheusCREnabled(fs) }, - }, - { - name: "InvalidFlag", - flagArgs: []string{"--invalid-flag", "value"}, - expectedErr: true, - getterFunc: func(fs *pflag.FlagSet) (interface{}, error) { return getConfigFilePath(fs) }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - fs := getFlagSet(pflag.ContinueOnError) - err := fs.Parse(tt.flagArgs) - - // If an error is expected during parsing, we check it here. - if tt.expectedErr { - assert.Error(t, err) - return - } - - got, err := tt.getterFunc(fs) - assert.NoError(t, err) - assert.Equal(t, tt.expectedValue, got) - }) - } -} diff --git a/cmd/otel-allocator/config/testdata/config_test.yaml b/cmd/otel-allocator/config/testdata/config_test.yaml deleted file mode 100644 index efdc27bc3..000000000 --- a/cmd/otel-allocator/config/testdata/config_test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -label_selector: - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -prometheus_cr: - scrape_interval: 60s -config: - scrape_configs: - - job_name: prometheus - - file_sd_configs: - - files: - - ./file_sd_test.json - - static_configs: - - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] - labels: - my: label diff --git a/cmd/otel-allocator/config/testdata/file_sd_test.json b/cmd/otel-allocator/config/testdata/file_sd_test.json deleted file mode 100644 index 7114e6246..000000000 --- a/cmd/otel-allocator/config/testdata/file_sd_test.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "labels": { - "job": "node" - }, - "targets": [ - "promfile.domain:1001" - ] - }, - { - "labels": { - "foo1": "bar1" - }, - "targets": [ - "promfile.domain:3000" - ] - } -] diff --git a/cmd/otel-allocator/config/testdata/no_config.yaml b/cmd/otel-allocator/config/testdata/no_config.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml b/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml deleted file mode 100644 index c0ff54ad3..000000000 --- a/cmd/otel-allocator/config/testdata/pod_service_selector_test.yaml +++ /dev/null @@ -1,14 +0,0 @@ -label_selector: - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -pod_monitor_selector: - release: test -service_monitor_selector: - release: test -config: - scrape_configs: - - job_name: prometheus - static_configs: - - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] - labels: - my: label \ No newline at end of file diff --git a/cmd/otel-allocator/diff/diff.go b/cmd/otel-allocator/diff/diff.go deleted file mode 100644 index 93bed4dae..000000000 --- a/cmd/otel-allocator/diff/diff.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package diff - -// Changes is the result of the difference between two maps – items that are added and items that are removed -// This map is used to reconcile state differences. -type Changes[T Hasher] struct { - additions map[string]T - removals map[string]T -} - -type Hasher interface { - Hash() string -} - -func NewChanges[T Hasher](additions map[string]T, removals map[string]T) Changes[T] { - return Changes[T]{additions: additions, removals: removals} -} - -func (c Changes[T]) Additions() map[string]T { - return c.additions -} - -func (c Changes[T]) Removals() map[string]T { - return c.removals -} - -// Maps generates Changes for two maps with the same type signature by checking for any removals and then checking for -// additions. -// TODO: This doesn't need to create maps, it can return slices only. This function doesn't need to insert the values. -func Maps[T Hasher](current, new map[string]T) Changes[T] { - additions := map[string]T{} - removals := map[string]T{} - for key, newValue := range new { - if currentValue, found := current[key]; !found { - additions[key] = newValue - } else if currentValue.Hash() != newValue.Hash() { - additions[key] = newValue - removals[key] = currentValue - } - } - for key, value := range current { - if _, found := new[key]; !found { - removals[key] = value - } - } - return Changes[T]{ - additions: additions, - removals: removals, - } -} diff --git a/cmd/otel-allocator/diff/diff_test.go b/cmd/otel-allocator/diff/diff_test.go deleted file mode 100644 index 7b8cda5b3..000000000 --- a/cmd/otel-allocator/diff/diff_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package diff - -import ( - "reflect" - "testing" -) - -type HasherString string - -func (s HasherString) Hash() string { - return string(s) -} - -func TestDiffMaps(t *testing.T) { - type args struct { - current map[string]Hasher - new map[string]Hasher - } - tests := []struct { - name string - args args - want Changes[Hasher] - }{ - { - name: "basic replacement", - args: args{ - current: map[string]Hasher{ - "current": HasherString("one"), - }, - new: map[string]Hasher{ - "new": HasherString("another"), - }, - }, - want: Changes[Hasher]{ - additions: map[string]Hasher{ - "new": HasherString("another"), - }, - removals: map[string]Hasher{ - "current": HasherString("one"), - }, - }, - }, - { - name: "single addition", - args: args{ - current: map[string]Hasher{ - "current": HasherString("one"), - }, - new: map[string]Hasher{ - "current": HasherString("one"), - "new": HasherString("another"), - }, - }, - want: Changes[Hasher]{ - additions: map[string]Hasher{ - "new": HasherString("another"), - }, - removals: map[string]Hasher{}, - }, - }, - { - name: "value change", - args: args{ - current: map[string]Hasher{ - "k1": HasherString("v1"), - "k2": HasherString("v2"), - "change": HasherString("before"), - }, - new: map[string]Hasher{ - "k1": HasherString("v1"), - "k3": HasherString("v3"), - "change": HasherString("after"), - }, - }, - want: Changes[Hasher]{ - additions: map[string]Hasher{ - "k3": HasherString("v3"), - "change": HasherString("after"), - }, - removals: map[string]Hasher{ - "k2": HasherString("v2"), - "change": HasherString("before"), - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := Maps(tt.args.current, tt.args.new); !reflect.DeepEqual(got, tt.want) { - t.Errorf("DiffMaps() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/cmd/otel-allocator/go.mod b/cmd/otel-allocator/go.mod deleted file mode 100644 index 678000c70..000000000 --- a/cmd/otel-allocator/go.mod +++ /dev/null @@ -1,200 +0,0 @@ -module github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator - -go 1.21 - -require ( - github.com/buraksezer/consistent v0.10.0 - github.com/cespare/xxhash/v2 v2.2.0 - github.com/ghodss/yaml v1.0.0 - github.com/gin-gonic/gin v1.9.1 - github.com/go-kit/log v0.2.1 - github.com/go-logr/logr v1.3.0 - github.com/json-iterator/go v1.1.12 - github.com/oklog/run v1.1.0 - github.com/prometheus-operator/prometheus-operator v0.70.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 - github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0 - github.com/prometheus/client_golang v1.17.0 - github.com/prometheus/common v0.45.0 - github.com/prometheus/prometheus v0.48.1 - github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 - gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.29.0 - k8s.io/apimachinery v0.29.0 - k8s.io/client-go v0.29.0 - k8s.io/klog/v2 v2.110.1 - sigs.k8s.io/controller-runtime v0.16.3 -) - -require ( - cloud.google.com/go/compute v1.23.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/armon/go-metrics v0.4.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.45.25 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/blang/semver/v4 v4.0.0 // indirect - github.com/bytedance/sonic v1.9.1 // indirect - github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/dennwc/varint v1.0.0 // indirect - github.com/digitalocean/godo v1.104.1 // indirect - github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.5.0 // indirect - github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/efficientgo/core v1.0.0-rc.2 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/envoyproxy/go-control-plane v0.11.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect - github.com/evanphx/json-patch v5.7.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.7.0 // indirect - github.com/fatih/color v1.15.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-openapi/analysis v0.21.4 // indirect - github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/loads v0.21.2 // indirect - github.com/go-openapi/runtime v0.26.0 // indirect - github.com/go-openapi/spec v0.20.9 // indirect - github.com/go-openapi/strfmt v0.21.7 // indirect - github.com/go-openapi/swag v0.22.4 // indirect - github.com/go-openapi/validate v0.22.1 // indirect - github.com/go-playground/locales v0.14.1 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-playground/validator/v10 v10.14.0 // indirect - github.com/go-resty/resty/v2 v2.7.0 // indirect - github.com/go-zookeeper/zk v1.0.3 // indirect - github.com/goccy/go-json v0.10.2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-querystring v1.1.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gophercloud/gophercloud v1.7.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect - github.com/hashicorp/consul/api v1.25.1 // indirect - github.com/hashicorp/cronexpr v1.1.2 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.5.0 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-retryablehttp v0.7.4 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect - github.com/hashicorp/serf v0.10.1 // indirect - github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect - github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/jpillora/backoff v1.0.0 // indirect - github.com/klauspost/compress v1.17.1 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect - github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/leodido/go-urn v1.2.4 // indirect - github.com/linode/linodego v1.23.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect - github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a // indirect - github.com/miekg/dns v1.1.56 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/oklog/ulid v1.3.1 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/ovh/go-ovh v1.4.3 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus-community/prom-label-proxy v0.7.0 // indirect - github.com/prometheus/alertmanager v0.26.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common/sigv4 v0.1.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect - github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.11 // indirect - github.com/vultr/govultr/v2 v2.17.2 // indirect - go.mongodb.org/mongo-driver v1.12.0 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/goleak v1.2.1 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.25.0 // indirect - golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.16.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/api v0.147.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect - google.golang.org/grpc v1.58.3 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - k8s.io/apiextensions-apiserver v0.28.4 // indirect - k8s.io/component-base v0.28.4 // indirect - k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a // indirect - k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect -) - -// A exclude directive is needed for k8s.io/client-go because Cortex (which -// is an indirect dependency through Thanos and PrometheusOperator) has a requirement on v12.0.0. -exclude k8s.io/client-go v12.0.0+incompatible diff --git a/cmd/otel-allocator/go.sum b/cmd/otel-allocator/go.sum deleted file mode 100644 index c12e2cb9f..000000000 --- a/cmd/otel-allocator/go.sum +++ /dev/null @@ -1,1121 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= -github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= -github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= -github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= -github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/buraksezer/consistent v0.10.0 h1:hqBgz1PvNLC5rkWcEBVAL9dFMBWz6I0VgUCW25rrZlU= -github.com/buraksezer/consistent v0.10.0/go.mod h1:6BrVajWq7wbKZlTOUPs/XVfR8c0maujuPowduSpZqmw= -github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= -github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= -github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= -github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= -github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= -github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/efficientgo/core v1.0.0-rc.2 h1:7j62qHLnrZqO3V3UA0AqOGd5d5aXV3AX6m/NZBHp78I= -github.com/efficientgo/core v1.0.0-rc.2/go.mod h1:FfGdkzWarkuzOlY04VY+bGfb1lWrjaL6x/GLcQ4vJps= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= -github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= -github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= -github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= -github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc= -github.com/go-openapi/analysis v0.21.4/go.mod h1:4zQ35W4neeZTqh3ol0rv/O8JBbka9QyAgQRPp9y3pfo= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWLG6M= -github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= -github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= -github.com/go-openapi/runtime v0.26.0 h1:HYOFtG00FM1UvqrcxbEJg/SwvDRvYLQKGhw2zaQjTcc= -github.com/go-openapi/runtime v0.26.0/go.mod h1:QgRGeZwrUcSHdeh4Ka9Glvo0ug1LC5WyE+EV88plZrQ= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/spec v0.20.9 h1:xnlYNQAwKd2VQRRfwTEI0DcK+2cbuvI/0c7jx3gA8/8= -github.com/go-openapi/spec v0.20.9/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= -github.com/go-openapi/strfmt v0.21.7 h1:rspiXgNWgeUzhjo1YU01do6qsahtJNByjLVbPLNHb8k= -github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KAzYjclFs3ew= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= -github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= -github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= -github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= -github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= -github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/gophercloud/gophercloud v1.7.0 h1:fyJGKh0LBvIZKLvBWvQdIgkaV5yTM3Jh9EYUh+UNCAs= -github.com/gophercloud/gophercloud v1.7.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= -github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= -github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= -github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= -github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= -github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= -github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= -github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= -github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= -github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c h1:Nc3Mt2BAnq0/VoLEntF/nipX+K1S7pG+RgwiitSv6v0= -github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c/go.mod h1:O23qLAZuCx4htdY9zBaO4cJPXgleSFEdq6D/sezGgYE= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hetznercloud/hcloud-go/v2 v2.4.0 h1:MqlAE+w125PLvJRCpAJmEwrIxoVdUdOyuFUhE/Ukbok= -github.com/hetznercloud/hcloud-go/v2 v2.4.0/go.mod h1:l7fA5xsncFBzQTyw29/dw5Yr88yEGKKdc6BHf24ONS0= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= -github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= -github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= -github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= -github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= -github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= -github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/linode/linodego v1.23.0 h1:s0ReCZtuN9Z1IoUN9w1RLeYO1dMZUGPwOQ/IBFsBHtU= -github.com/linode/linodego v1.23.0/go.mod h1:0U7wj/UQOqBNbKv1FYTXiBUXueR8DY4HvIotwE0ENgg= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= -github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= -github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= -github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a h1:0usWxe5SGXKQovz3p+BiQ81Jy845xSMu2CWKuXsXuUM= -github.com/metalmatze/signal v0.0.0-20210307161603-1c9aa721a97a/go.mod h1:3OETvrxfELvGsU2RoGGWercfeZ4bCL3+SOwzIWtJH/Q= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= -github.com/miekg/dns v1.1.56/go.mod h1:cRm6Oo2C8TY9ZS/TqsSrseAcncm74lfK5G+ikN2SWWY= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= -github.com/ovh/go-ovh v1.4.3/go.mod h1:AkPXVtgwB6xlKblMjRKJJmjRp+ogrE7fz2lVgcQY8SY= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus-community/prom-label-proxy v0.7.0 h1:1iNHXF7V8z2iOCinEyxKDUHu2jppPAAd6PmBCi3naok= -github.com/prometheus-community/prom-label-proxy v0.7.0/go.mod h1:wR9C/Mwp5aBbiqM6gQ+FZdFRwL8pCzzhsje8lTAx/aA= -github.com/prometheus-operator/prometheus-operator v0.70.0 h1:kMufKWvqJl08Kh0oue3VLmTsowYKKqCQJa7tqXo+DJI= -github.com/prometheus-operator/prometheus-operator v0.70.0/go.mod h1:a/P8ufM+z7gkt4QpWEHWPARs/8bhRBkyZN5pjUl5RMk= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0 h1:CFTvpkpVP4EXXZuaZuxpikAoma8xVha/IZKMDc9lw+Y= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0/go.mod h1:npfc20mPOAu7ViOVnATVMbI7PoXvW99EzgJVqkAomIQ= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0 h1:PpdpJDS1MyMSLILG+Y0hgzVQ3tu6qEkRD0gR/UuvSZk= -github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0/go.mod h1:4I5Rt6iIu95JBYYaDYA+Er+YBfUwIq9Pwh5TEoBmawg= -github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= -github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= -github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= -github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbELKS+NFk= -github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= -github.com/shoenig/test v0.6.6/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= -github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= -github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= -github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= -golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= -golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= -golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= -gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.147.0 h1:Can3FaQo9LlVqxJCodNmeZW/ib3/qKAY3rFeXiHo5gc= -google.golang.org/api v0.147.0/go.mod h1:pQ/9j83DcmPd/5C9e2nFOdjjNkDZ1G+zkbK2uvdkJMs= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 h1:SeZZZx0cP0fqUyA+oRzP9k7cSwJlvDFiROO72uwD6i0= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c h1:jHkCUWkseRf+W+edG5hMzr/Uh1xkDREY4caybAq4dpY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= -gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= -k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= -k8s.io/apiextensions-apiserver v0.28.4 h1:AZpKY/7wQ8n+ZYDtNHbAJBb+N4AXXJvyZx6ww6yAJvU= -k8s.io/apiextensions-apiserver v0.28.4/go.mod h1:pgQIZ1U8eJSMQcENew/0ShUTlePcSGFq6dxSxf2mwPM= -k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= -k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= -k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= -k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= -k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= -k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a h1:ZeIPbyHHqahGIbeyLJJjAUhnxCKqXaDY+n89Ms8szyA= -k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= -k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= -sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/cmd/otel-allocator/header.txt b/cmd/otel-allocator/header.txt deleted file mode 100644 index 3881885f3..000000000 --- a/cmd/otel-allocator/header.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright The OpenTelemetry Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/cmd/otel-allocator/main.go b/cmd/otel-allocator/main.go deleted file mode 100644 index 4f805519b..000000000 --- a/cmd/otel-allocator/main.go +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "os" - "os/signal" - "syscall" - - gokitlog "github.com/go-kit/log" - "github.com/oklog/run" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/prometheus/discovery" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/collector" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/prehook" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/server" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" -) - -var ( - setupLog = ctrl.Log.WithName("setup") - eventsMetric = promauto.NewCounterVec(prometheus.CounterOpts{ - Name: "opentelemetry_allocator_events", - Help: "Number of events in the channel.", - }, []string{"source"}) -) - -func main() { - var ( - // allocatorPrehook will be nil if filterStrategy is not set or - // unrecognized. No filtering will be used in this case. - allocatorPrehook prehook.Hook - allocator allocation.Allocator - discoveryManager *discovery.Manager - collectorWatcher *collector.Client - promWatcher allocatorWatcher.Watcher - targetDiscoverer *target.Discoverer - - discoveryCancel context.CancelFunc - runGroup run.Group - eventChan = make(chan allocatorWatcher.Event) - eventCloser = make(chan bool, 1) - interrupts = make(chan os.Signal, 1) - errChan = make(chan error) - ) - cfg, err := config.Load() - if err != nil { - fmt.Printf("Failed to load config: %v", err) - os.Exit(1) - } - ctrl.SetLogger(cfg.RootLogger) - - if validationErr := config.ValidateConfig(cfg); validationErr != nil { - setupLog.Error(validationErr, "Invalid configuration") - os.Exit(1) - } - - cfg.RootLogger.Info("Starting the Target Allocator") - ctx := context.Background() - log := ctrl.Log.WithName("allocator") - - allocatorPrehook = prehook.New(cfg.GetTargetsFilterStrategy(), log) - allocator, err = allocation.New(cfg.GetAllocationStrategy(), log, allocation.WithFilter(allocatorPrehook)) - if err != nil { - setupLog.Error(err, "Unable to initialize allocation strategy") - os.Exit(1) - } - srv := server.NewServer(log, allocator, cfg.ListenAddr) - - discoveryCtx, discoveryCancel := context.WithCancel(ctx) - discoveryManager = discovery.NewManager(discoveryCtx, gokitlog.NewNopLogger()) - discovery.RegisterMetrics() // discovery manager metrics need to be enabled explicitly - - targetDiscoverer = target.NewDiscoverer(log, discoveryManager, allocatorPrehook, srv) - collectorWatcher, collectorWatcherErr := collector.NewClient(log, cfg.ClusterConfig) - if collectorWatcherErr != nil { - setupLog.Error(collectorWatcherErr, "Unable to initialize collector watcher") - os.Exit(1) - } - signal.Notify(interrupts, os.Interrupt, syscall.SIGINT, syscall.SIGTERM) - defer close(interrupts) - - if cfg.PrometheusCR.Enabled { - promWatcher, err = allocatorWatcher.NewPrometheusCRWatcher(setupLog.WithName("prometheus-cr-watcher"), *cfg) - if err != nil { - setupLog.Error(err, "Can't start the prometheus watcher") - os.Exit(1) - } - runGroup.Add( - func() error { - promWatcherErr := promWatcher.Watch(eventChan, errChan) - setupLog.Info("Prometheus watcher exited") - return promWatcherErr - }, - func(_ error) { - setupLog.Info("Closing prometheus watcher") - promWatcherErr := promWatcher.Close() - if promWatcherErr != nil { - setupLog.Error(promWatcherErr, "prometheus watcher failed to close") - } - }) - } - runGroup.Add( - func() error { - discoveryManagerErr := discoveryManager.Run() - setupLog.Info("Discovery manager exited") - return discoveryManagerErr - }, - func(_ error) { - setupLog.Info("Closing discovery manager") - discoveryCancel() - }) - runGroup.Add( - func() error { - // Initial loading of the config file's scrape config - err = targetDiscoverer.ApplyConfig(allocatorWatcher.EventSourceConfigMap, cfg.PromConfig) - if err != nil { - setupLog.Error(err, "Unable to apply initial configuration") - return err - } - err := targetDiscoverer.Watch(allocator.SetTargets) - setupLog.Info("Target discoverer exited") - return err - }, - func(_ error) { - setupLog.Info("Closing target discoverer") - targetDiscoverer.Close() - }) - runGroup.Add( - func() error { - err := collectorWatcher.Watch(ctx, cfg.LabelSelector, allocator.SetCollectors) - setupLog.Info("Collector watcher exited") - return err - }, - func(_ error) { - setupLog.Info("Closing collector watcher") - collectorWatcher.Close() - }) - runGroup.Add( - func() error { - err := srv.Start() - setupLog.Info("Server failed to start") - return err - }, - func(_ error) { - setupLog.Info("Closing server") - if shutdownErr := srv.Shutdown(ctx); shutdownErr != nil { - setupLog.Error(shutdownErr, "Error on server shutdown") - } - }) - runGroup.Add( - func() error { - for { - select { - case event := <-eventChan: - eventsMetric.WithLabelValues(event.Source.String()).Inc() - loadConfig, err := event.Watcher.LoadConfig(ctx) - if err != nil { - setupLog.Error(err, "Unable to load configuration") - continue - } - err = targetDiscoverer.ApplyConfig(event.Source, loadConfig) - if err != nil { - setupLog.Error(err, "Unable to apply configuration") - continue - } - case err := <-errChan: - setupLog.Error(err, "Watcher error") - case <-eventCloser: - return nil - } - } - }, - func(_ error) { - setupLog.Info("Closing watcher loop") - close(eventCloser) - }) - runGroup.Add( - func() error { - for { - select { - case <-interrupts: - setupLog.Info("Received interrupt") - return nil - case <-eventCloser: - return nil - } - } - }, - func(_ error) { - setupLog.Info("Closing interrupt loop") - }) - if runErr := runGroup.Run(); runErr != nil { - setupLog.Error(runErr, "run group exited") - } - setupLog.Info("Target allocator exited.") -} diff --git a/cmd/otel-allocator/prehook/prehook.go b/cmd/otel-allocator/prehook/prehook.go deleted file mode 100644 index f356f7c2d..000000000 --- a/cmd/otel-allocator/prehook/prehook.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package prehook - -import ( - "errors" - - "github.com/go-logr/logr" - "github.com/prometheus/prometheus/model/relabel" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -const ( - relabelConfigTargetFilterName = "relabel-config" -) - -type Hook interface { - Apply(map[string]*target.Item) map[string]*target.Item - SetConfig(map[string][]*relabel.Config) - GetConfig() map[string][]*relabel.Config -} - -type HookProvider func(log logr.Logger) Hook - -var ( - registry = map[string]HookProvider{} -) - -func New(name string, log logr.Logger) Hook { - if p, ok := registry[name]; ok { - return p(log.WithName("Prehook").WithName(name)) - } - - log.Info("Unrecognized filter strategy; filtering disabled") - return nil -} - -func Register(name string, provider HookProvider) error { - if _, ok := registry[name]; ok { - return errors.New("already registered") - } - registry[name] = provider - return nil -} - -func init() { - err := Register(relabelConfigTargetFilterName, NewRelabelConfigTargetFilter) - if err != nil { - panic(err) - } -} diff --git a/cmd/otel-allocator/prehook/relabel.go b/cmd/otel-allocator/prehook/relabel.go deleted file mode 100644 index 3595cb888..000000000 --- a/cmd/otel-allocator/prehook/relabel.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package prehook - -import ( - "github.com/go-logr/logr" - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/model/labels" - "github.com/prometheus/prometheus/model/relabel" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -type RelabelConfigTargetFilter struct { - log logr.Logger - relabelCfg map[string][]*relabel.Config -} - -func NewRelabelConfigTargetFilter(log logr.Logger) Hook { - return &RelabelConfigTargetFilter{ - log: log, - relabelCfg: make(map[string][]*relabel.Config), - } -} - -// helper function converts from model.LabelSet to []labels.Label. -func convertLabelToPromLabelSet(lbls model.LabelSet) []labels.Label { - newLabels := make([]labels.Label, len(lbls)) - index := 0 - for k, v := range lbls { - newLabels[index].Name = string(k) - newLabels[index].Value = string(v) - index++ - } - return newLabels -} - -func (tf *RelabelConfigTargetFilter) Apply(targets map[string]*target.Item) map[string]*target.Item { - numTargets := len(targets) - - // need to wait until relabelCfg is set - if len(tf.relabelCfg) == 0 { - return targets - } - - // Note: jobNameKey != tItem.JobName (jobNameKey is hashed) - for jobNameKey, tItem := range targets { - keepTarget := true - lset := convertLabelToPromLabelSet(tItem.Labels) - for _, cfg := range tf.relabelCfg[tItem.JobName] { - if newLset, keep := relabel.Process(lset, cfg); !keep { - keepTarget = false - break // inner loop - } else { - lset = newLset - } - } - - if !keepTarget { - delete(targets, jobNameKey) - } - } - - tf.log.V(2).Info("Filtering complete", "seen", numTargets, "kept", len(targets)) - return targets -} - -func (tf *RelabelConfigTargetFilter) SetConfig(cfgs map[string][]*relabel.Config) { - relabelCfgCopy := make(map[string][]*relabel.Config) - for key, val := range cfgs { - relabelCfgCopy[key] = tf.replaceRelabelConfig(val) - } - - tf.relabelCfg = relabelCfgCopy -} - -// See this thread [https://github.com/open-telemetry/opentelemetry-operator/pull/1124/files#r983145795] -// for why SHARD == 0 is a necessary substitution. Otherwise the keep action that uses this env variable, -// would not match the regex and all targets end up dropped. Also note, $(SHARD) will always be 0 and it -// does not make sense to read from the environment because it is never set in the allocator. -func (tf *RelabelConfigTargetFilter) replaceRelabelConfig(cfg []*relabel.Config) []*relabel.Config { - for i := range cfg { - str := cfg[i].Regex.String() - if str == "$(SHARD)" { - cfg[i].Regex = relabel.MustNewRegexp("0") - } - } - - return cfg -} - -func (tf *RelabelConfigTargetFilter) GetConfig() map[string][]*relabel.Config { - relabelCfgCopy := make(map[string][]*relabel.Config) - for k, v := range tf.relabelCfg { - relabelCfgCopy[k] = v - } - return relabelCfgCopy -} diff --git a/cmd/otel-allocator/prehook/relabel_test.go b/cmd/otel-allocator/prehook/relabel_test.go deleted file mode 100644 index d30f645eb..000000000 --- a/cmd/otel-allocator/prehook/relabel_test.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package prehook - -import ( - "crypto/rand" - "fmt" - "math/big" - "strconv" - "testing" - - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/model/relabel" - "github.com/stretchr/testify/assert" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var ( - logger = logf.Log.WithName("unit-tests") - defaultNumTargets = 100 - defaultNumCollectors = 3 - defaultStartIndex = 0 - - relabelConfigs = []relabelConfigObj{ - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Action: "replace", - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - Replacement: "$1", - TargetLabel: "foo", - }, - }, - isDrop: false, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Separator: ";", - Action: "keep", - Replacement: "$1", - }, - }, - isDrop: false, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("bad.*match"), - Action: "drop", - Separator: ";", - Replacement: "$1", - }, - }, - isDrop: false, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"label_not_present"}, - Regex: relabel.MustNewRegexp("(.*)"), - Separator: ";", - Action: "keep", - Replacement: "$1", - }, - }, - isDrop: false, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Separator: ";", - Action: "drop", - Replacement: "$1", - }, - }, - isDrop: true, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"collector"}, - Regex: relabel.MustNewRegexp("(collector.*)"), - Separator: ";", - Action: "drop", - Replacement: "$1", - }, - }, - isDrop: true, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("bad.*match"), - Separator: ";", - Action: "keep", - Replacement: "$1", - }, - }, - isDrop: true, - }, - { - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"collector"}, - Regex: relabel.MustNewRegexp("collectors-n"), - Separator: ";", - Action: "keep", - Replacement: "$1", - }, - }, - isDrop: true, - }, - } - - HashmodConfig = relabelConfigObj{ - cfg: []*relabel.Config{ - { - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Separator: ";", - Modulus: 1, - TargetLabel: "tmp-0", - Action: "hashmod", - Replacement: "$1", - }, - - { - SourceLabels: model.LabelNames{"tmp-$(SHARD)"}, - Regex: relabel.MustNewRegexp("$(SHARD)"), - Separator: ";", - Action: "keep", - Replacement: "$1", - }, - }, - isDrop: false, - } - - DefaultDropRelabelConfig = relabel.Config{ - SourceLabels: model.LabelNames{"i"}, - Regex: relabel.MustNewRegexp("(.*)"), - Action: "drop", - } -) - -type relabelConfigObj struct { - cfg []*relabel.Config - isDrop bool -} - -func colIndex(index, numCols int) int { - if numCols == 0 { - return -1 - } - return index % numCols -} - -func makeNNewTargets(rCfgs []relabelConfigObj, n int, numCollectors int, startingIndex int) (map[string]*target.Item, int, map[string]*target.Item, map[string][]*relabel.Config) { - toReturn := map[string]*target.Item{} - expectedMap := make(map[string]*target.Item) - numItemsRemaining := n - relabelConfig := make(map[string][]*relabel.Config) - for i := startingIndex; i < n+startingIndex; i++ { - collector := fmt.Sprintf("collector-%d", colIndex(i, numCollectors)) - label := model.LabelSet{ - "collector": model.LabelValue(collector), - "i": model.LabelValue(strconv.Itoa(i)), - "total": model.LabelValue(strconv.Itoa(n + startingIndex)), - } - jobName := fmt.Sprintf("test-job-%d", i) - newTarget := target.NewItem(jobName, "test-url", label, collector) - // add a single replace, drop, or keep action as relabel_config for targets - var index int - ind, _ := rand.Int(rand.Reader, big.NewInt(int64(len(relabelConfigs)))) - - index = int(ind.Int64()) - - relabelConfig[jobName] = rCfgs[index].cfg - - targetKey := newTarget.Hash() - if relabelConfigs[index].isDrop { - numItemsRemaining-- - } else { - expectedMap[targetKey] = newTarget - } - toReturn[targetKey] = newTarget - } - return toReturn, numItemsRemaining, expectedMap, relabelConfig -} - -func TestApply(t *testing.T) { - allocatorPrehook := New("relabel-config", logger) - assert.NotNil(t, allocatorPrehook) - - targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) - allocatorPrehook.SetConfig(relabelCfg) - remainingItems := allocatorPrehook.Apply(targets) - assert.Len(t, remainingItems, numRemaining) - assert.Equal(t, remainingItems, expectedTargetMap) - - // clear out relabelCfg to test with empty values - for key := range relabelCfg { - relabelCfg[key] = nil - } - - // cfg = createMockConfig(relabelCfg) - allocatorPrehook.SetConfig(relabelCfg) - remainingItems = allocatorPrehook.Apply(targets) - // relabelCfg is empty so targets should be unfiltered - assert.Len(t, remainingItems, len(targets)) - assert.Equal(t, remainingItems, targets) -} - -func TestApplyHashmodAction(t *testing.T) { - allocatorPrehook := New("relabel-config", logger) - assert.NotNil(t, allocatorPrehook) - - hashRelabelConfigs := append(relabelConfigs, HashmodConfig) - targets, numRemaining, expectedTargetMap, relabelCfg := makeNNewTargets(hashRelabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) - allocatorPrehook.SetConfig(relabelCfg) - remainingItems := allocatorPrehook.Apply(targets) - assert.Len(t, remainingItems, numRemaining) - assert.Equal(t, remainingItems, expectedTargetMap) -} - -func TestApplyEmptyRelabelCfg(t *testing.T) { - - allocatorPrehook := New("relabel-config", logger) - assert.NotNil(t, allocatorPrehook) - - targets, _, _, _ := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) - - relabelCfg := map[string][]*relabel.Config{} - allocatorPrehook.SetConfig(relabelCfg) - remainingItems := allocatorPrehook.Apply(targets) - // relabelCfg is empty so targets should be unfiltered - assert.Len(t, remainingItems, len(targets)) - assert.Equal(t, remainingItems, targets) -} - -func TestSetConfig(t *testing.T) { - allocatorPrehook := New("relabel-config", logger) - assert.NotNil(t, allocatorPrehook) - - _, _, _, relabelCfg := makeNNewTargets(relabelConfigs, defaultNumTargets, defaultNumCollectors, defaultStartIndex) - allocatorPrehook.SetConfig(relabelCfg) - assert.Equal(t, relabelCfg, allocatorPrehook.GetConfig()) -} diff --git a/cmd/otel-allocator/server/bench_test.go b/cmd/otel-allocator/server/bench_test.go deleted file mode 100644 index 8fcea90b0..000000000 --- a/cmd/otel-allocator/server/bench_test.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "fmt" - "math/rand" - "net/http/httptest" - "testing" - "time" - - "github.com/gin-gonic/gin" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - "github.com/stretchr/testify/assert" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -func BenchmarkServerTargetsHandler(b *testing.B) { - random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec - var table = []struct { - numCollectors int - numJobs int - }{ - {numCollectors: 100, numJobs: 100}, - {numCollectors: 100, numJobs: 1000}, - {numCollectors: 100, numJobs: 10000}, - {numCollectors: 100, numJobs: 100000}, - {numCollectors: 1000, numJobs: 100}, - {numCollectors: 1000, numJobs: 1000}, - {numCollectors: 1000, numJobs: 10000}, - {numCollectors: 1000, numJobs: 100000}, - } - - for _, allocatorName := range allocation.GetRegisteredAllocatorNames() { - for _, v := range table { - a, _ := allocation.New(allocatorName, logger) - cols := allocation.MakeNCollectors(v.numCollectors, 0) - targets := allocation.MakeNNewTargets(v.numJobs, v.numCollectors, 0) - listenAddr := ":8080" - a.SetCollectors(cols) - a.SetTargets(targets) - s := NewServer(logger, a, listenAddr) - b.Run(fmt.Sprintf("%s_num_cols_%d_num_jobs_%d", allocatorName, v.numCollectors, v.numJobs), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - randomJob := random.Intn(v.numJobs) //nolint: gosec - randomCol := random.Intn(v.numCollectors) //nolint: gosec - request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/test-job-%d/targets?collector_id=collector-%d", randomJob, randomCol), nil) - w := httptest.NewRecorder() - s.server.Handler.ServeHTTP(w, request) - } - }) - } - } -} - -func BenchmarkScrapeConfigsHandler(b *testing.B) { - random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec - s := &Server{ - logger: logger, - } - - tests := []int{0, 5, 10, 50, 100, 500} - for _, n := range tests { - data := makeNScrapeConfigs(*random, n) - assert.NoError(b, s.UpdateScrapeConfigResponse(data)) - - b.Run(fmt.Sprintf("%d_targets", n), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - c, _ := gin.CreateTestContext(httptest.NewRecorder()) - gin.SetMode(gin.ReleaseMode) - c.Request = httptest.NewRequest("GET", "/scrape_configs", nil) - - s.ScrapeConfigsHandler(c) - } - }) - } -} - -func BenchmarkCollectorMapJSONHandler(b *testing.B) { - random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec - s := &Server{ - logger: logger, - jsonMarshaller: jsonConfig, - } - - tests := []struct { - numCollectors int - numTargets int - }{ - { - numCollectors: 0, - numTargets: 0, - }, - { - numCollectors: 5, - numTargets: 5, - }, - { - numCollectors: 5, - numTargets: 50, - }, - { - numCollectors: 5, - numTargets: 500, - }, - { - numCollectors: 50, - numTargets: 5, - }, - { - numCollectors: 50, - numTargets: 50, - }, - { - numCollectors: 50, - numTargets: 500, - }, - { - numCollectors: 50, - numTargets: 5000, - }, - } - for _, tc := range tests { - data := makeNCollectorJSON(*random, tc.numCollectors, tc.numTargets) - b.Run(fmt.Sprintf("%d_collectors_%d_targets", tc.numCollectors, tc.numTargets), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - resp := httptest.NewRecorder() - s.jsonHandler(resp, data) - } - }) - } -} - -func BenchmarkTargetItemsJSONHandler(b *testing.B) { - random := rand.New(rand.NewSource(time.Now().UnixNano())) // nolint: gosec - s := &Server{ - logger: logger, - jsonMarshaller: jsonConfig, - } - - tests := []struct { - numTargets int - numLabels int - }{ - { - numTargets: 0, - numLabels: 0, - }, - { - numTargets: 5, - numLabels: 5, - }, - { - numTargets: 5, - numLabels: 50, - }, - { - numTargets: 50, - numLabels: 5, - }, - { - numTargets: 50, - numLabels: 50, - }, - { - numTargets: 500, - numLabels: 50, - }, - { - numTargets: 500, - numLabels: 500, - }, - { - numTargets: 5000, - numLabels: 50, - }, - { - numTargets: 5000, - numLabels: 500, - }, - } - for _, tc := range tests { - data := makeNTargetItems(*random, tc.numTargets, tc.numLabels) - b.Run(fmt.Sprintf("%d_targets_%d_labels", tc.numTargets, tc.numLabels), func(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - resp := httptest.NewRecorder() - s.jsonHandler(resp, data) - } - }) - } -} - -var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_/") - -func randSeq(random rand.Rand, n int) string { - b := make([]rune, n) - for i := range b { - b[i] = letters[random.Intn(len(letters))] //nolint:gosec - } - return string(b) -} - -func makeNScrapeConfigs(random rand.Rand, n int) map[string]*promconfig.ScrapeConfig { - items := make(map[string]*promconfig.ScrapeConfig, n) - for i := 0; i < n; i++ { - items[randSeq(random, 20)] = &promconfig.ScrapeConfig{ - JobName: randSeq(random, 20), - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(time.Minute), - MetricsPath: randSeq(random, 50), - SampleLimit: 5, - TargetLimit: 200, - LabelLimit: 20, - LabelNameLengthLimit: 50, - LabelValueLengthLimit: 100, - } - } - return items -} - -func makeNCollectorJSON(random rand.Rand, numCollectors, numItems int) map[string]collectorJSON { - items := make(map[string]collectorJSON, numCollectors) - for i := 0; i < numCollectors; i++ { - items[randSeq(random, 20)] = collectorJSON{ - Link: randSeq(random, 120), - Jobs: makeNTargetItems(random, numItems, 50), - } - } - return items -} - -func makeNTargetItems(random rand.Rand, numItems, numLabels int) []*target.Item { - items := make([]*target.Item, 0, numItems) - for i := 0; i < numItems; i++ { - items = append(items, target.NewItem( - randSeq(random, 80), - randSeq(random, 150), - makeNNewLabels(random, numLabels), - randSeq(random, 30), - )) - } - return items -} - -func makeNNewLabels(random rand.Rand, n int) model.LabelSet { - labels := make(map[model.LabelName]model.LabelValue, n) - for i := 0; i < n; i++ { - labels[model.LabelName(randSeq(random, 20))] = model.LabelValue(randSeq(random, 20)) - } - return labels -} diff --git a/cmd/otel-allocator/server/mocks_test.go b/cmd/otel-allocator/server/mocks_test.go deleted file mode 100644 index e44b178fa..000000000 --- a/cmd/otel-allocator/server/mocks_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var _ allocation.Allocator = &mockAllocator{} - -// mockAllocator implements the Allocator interface, but all funcs other than -// TargetItems() are a no-op. -type mockAllocator struct { - targetItems map[string]*target.Item -} - -func (m *mockAllocator) SetCollectors(_ map[string]*allocation.Collector) {} -func (m *mockAllocator) SetTargets(_ map[string]*target.Item) {} -func (m *mockAllocator) Collectors() map[string]*allocation.Collector { return nil } -func (m *mockAllocator) GetTargetsForCollectorAndJob(_ string, _ string) []*target.Item { return nil } -func (m *mockAllocator) SetFilter(_ allocation.Filter) {} - -func (m *mockAllocator) TargetItems() map[string]*target.Item { - return m.targetItems -} diff --git a/cmd/otel-allocator/server/server.go b/cmd/otel-allocator/server/server.go deleted file mode 100644 index 9dda8347a..000000000 --- a/cmd/otel-allocator/server/server.go +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "context" - "fmt" - "net/http" - "net/http/pprof" - "net/url" - "strings" - "sync" - "time" - - yaml2 "github.com/ghodss/yaml" - "github.com/gin-gonic/gin" - "github.com/go-logr/logr" - jsoniter "github.com/json-iterator/go" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/client_golang/prometheus/promhttp" - promconfig "github.com/prometheus/prometheus/config" - "gopkg.in/yaml.v2" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var ( - httpDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "opentelemetry_allocator_http_duration_seconds", - Help: "Duration of received HTTP requests.", - }, []string{"path"}) -) - -var ( - jsonConfig = jsoniter.Config{ - EscapeHTML: false, - MarshalFloatWith6Digits: true, - ObjectFieldMustBeSimpleString: true, - }.Froze() -) - -type collectorJSON struct { - Link string `json:"_link"` - Jobs []*target.Item `json:"targets"` -} - -type Server struct { - logger logr.Logger - allocator allocation.Allocator - server *http.Server - jsonMarshaller jsoniter.API - - // Use RWMutex to protect scrapeConfigResponse, since it - // will be predominantly read and only written when config - // is applied. - mtx sync.RWMutex - scrapeConfigResponse []byte -} - -func NewServer(log logr.Logger, allocator allocation.Allocator, listenAddr string) *Server { - s := &Server{ - logger: log, - allocator: allocator, - jsonMarshaller: jsonConfig, - } - - gin.SetMode(gin.ReleaseMode) - router := gin.New() - router.Use(gin.Recovery()) - router.UseRawPath = true - router.UnescapePathValues = false - router.Use(s.PrometheusMiddleware) - router.GET("/scrape_configs", s.ScrapeConfigsHandler) - router.GET("/jobs", s.JobHandler) - router.GET("/jobs/:job_id/targets", s.TargetsHandler) - router.GET("/metrics", gin.WrapH(promhttp.Handler())) - router.GET("/livez", s.LivenessProbeHandler) - router.GET("/readyz", s.ReadinessProbeHandler) - registerPprof(router.Group("/debug/pprof/")) - - s.server = &http.Server{Addr: listenAddr, Handler: router, ReadHeaderTimeout: 90 * time.Second} - return s -} - -func (s *Server) Start() error { - s.logger.Info("Starting server...") - return s.server.ListenAndServe() -} - -func (s *Server) Shutdown(ctx context.Context) error { - s.logger.Info("Shutting down server...") - return s.server.Shutdown(ctx) -} - -// UpdateScrapeConfigResponse updates the scrape config response. The target allocator first marshals these -// configurations such that the underlying prometheus marshaling is used. After that, the YAML is converted -// in to a JSON format for consumers to use. -func (s *Server) UpdateScrapeConfigResponse(configs map[string]*promconfig.ScrapeConfig) error { - var configBytes []byte - configBytes, err := yaml.Marshal(configs) - if err != nil { - return err - } - var jsonConfig []byte - jsonConfig, err = yaml2.YAMLToJSON(configBytes) - if err != nil { - return err - } - s.mtx.Lock() - s.scrapeConfigResponse = jsonConfig - s.mtx.Unlock() - return nil -} - -// ScrapeConfigsHandler returns the available scrape configuration discovered by the target allocator. -func (s *Server) ScrapeConfigsHandler(c *gin.Context) { - s.mtx.RLock() - result := s.scrapeConfigResponse - s.mtx.RUnlock() - - // We don't use the jsonHandler method because we don't want our bytes to be re-encoded - c.Writer.Header().Set("Content-Type", "application/json") - _, err := c.Writer.Write(result) - if err != nil { - s.errorHandler(c.Writer, err) - } -} - -func (s *Server) ReadinessProbeHandler(c *gin.Context) { - s.mtx.RLock() - result := s.scrapeConfigResponse - s.mtx.RUnlock() - - if result != nil { - c.Status(http.StatusOK) - } else { - c.Status(http.StatusServiceUnavailable) - } -} - -func (s *Server) JobHandler(c *gin.Context) { - displayData := make(map[string]target.LinkJSON) - for _, v := range s.allocator.TargetItems() { - displayData[v.JobName] = target.LinkJSON{Link: v.Link.Link} - } - s.jsonHandler(c.Writer, displayData) -} - -func (s *Server) LivenessProbeHandler(c *gin.Context) { - c.Status(http.StatusOK) -} - -func (s *Server) PrometheusMiddleware(c *gin.Context) { - path := c.FullPath() - timer := prometheus.NewTimer(httpDuration.WithLabelValues(path)) - c.Next() - timer.ObserveDuration() -} - -func (s *Server) TargetsHandler(c *gin.Context) { - q := c.Request.URL.Query()["collector_id"] - - jobIdParam := c.Params.ByName("job_id") - jobId, err := url.QueryUnescape(jobIdParam) - if err != nil { - s.errorHandler(c.Writer, err) - return - } - - if len(q) == 0 { - displayData := GetAllTargetsByJob(s.allocator, jobId) - s.jsonHandler(c.Writer, displayData) - - } else { - tgs := s.allocator.GetTargetsForCollectorAndJob(q[0], jobId) - // Displays empty list if nothing matches - if len(tgs) == 0 { - s.jsonHandler(c.Writer, []interface{}{}) - return - } - s.jsonHandler(c.Writer, tgs) - } -} - -func (s *Server) errorHandler(w http.ResponseWriter, err error) { - w.WriteHeader(http.StatusInternalServerError) - s.jsonHandler(w, err) -} - -func (s *Server) jsonHandler(w http.ResponseWriter, data interface{}) { - w.Header().Set("Content-Type", "application/json") - err := s.jsonMarshaller.NewEncoder(w).Encode(data) - if err != nil { - s.logger.Error(err, "failed to encode data for http response") - } -} - -// GetAllTargetsByJob is a relatively expensive call that is usually only used for debugging purposes. -func GetAllTargetsByJob(allocator allocation.Allocator, job string) map[string]collectorJSON { - displayData := make(map[string]collectorJSON) - for _, col := range allocator.Collectors() { - items := allocator.GetTargetsForCollectorAndJob(col.Name, job) - displayData[col.Name] = collectorJSON{Link: fmt.Sprintf("/jobs/%s/targets?collector_id=%s", url.QueryEscape(job), col.Name), Jobs: items} - } - return displayData -} - -// registerPprof registers the pprof handlers and either serves the requested -// specific profile or falls back to index handler. -func registerPprof(g *gin.RouterGroup) { - g.GET("/*profile", func(c *gin.Context) { - path := c.Param("profile") - switch strings.TrimPrefix(path, "/") { - case "cmdline": - gin.WrapF(pprof.Cmdline)(c) - case "profile": - gin.WrapF(pprof.Profile)(c) - case "symbol": - gin.WrapF(pprof.Symbol)(c) - case "trace": - gin.WrapF(pprof.Trace)(c) - default: - gin.WrapF(pprof.Index)(c) - } - }) -} diff --git a/cmd/otel-allocator/server/server_test.go b/cmd/otel-allocator/server/server_test.go deleted file mode 100644 index edda74e07..000000000 --- a/cmd/otel-allocator/server/server_test.go +++ /dev/null @@ -1,617 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package server - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "net/http/httptest" - "net/url" - "testing" - "time" - - "github.com/prometheus/common/config" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/model/relabel" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/allocation" - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/target" -) - -var ( - logger = logf.Log.WithName("server-unit-tests") - baseLabelSet = model.LabelSet{ - "test_label": "test-value", - } - testJobLabelSetTwo = model.LabelSet{ - "test_label": "test-value2", - } - baseTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") - secondTargetItem = target.NewItem("test-job", "test-url", baseLabelSet, "test-collector") - testJobTargetItemTwo = target.NewItem("test-job", "test-url2", testJobLabelSetTwo, "test-collector2") -) - -func TestServer_LivenessProbeHandler(t *testing.T) { - leastWeighted, _ := allocation.New("least-weighted", logger) - listenAddr := ":8080" - s := NewServer(logger, leastWeighted, listenAddr) - request := httptest.NewRequest("GET", "/livez", nil) - w := httptest.NewRecorder() - - s.server.Handler.ServeHTTP(w, request) - result := w.Result() - - assert.Equal(t, http.StatusOK, result.StatusCode) -} - -func TestServer_TargetsHandler(t *testing.T) { - leastWeighted, _ := allocation.New("least-weighted", logger) - type args struct { - collector string - job string - cMap map[string]*target.Item - allocator allocation.Allocator - } - type want struct { - items []*target.Item - errString string - } - tests := []struct { - name string - args args - want want - }{ - { - name: "Empty target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string]*target.Item{}, - allocator: leastWeighted, - }, - want: want{ - items: []*target.Item{}, - }, - }, - { - name: "Single entry target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string]*target.Item{ - baseTargetItem.Hash(): baseTargetItem, - }, - allocator: leastWeighted, - }, - want: want{ - items: []*target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test_label": "test-value", - }, - }, - }, - }, - }, - { - name: "Multiple entry target map", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string]*target.Item{ - baseTargetItem.Hash(): baseTargetItem, - secondTargetItem.Hash(): secondTargetItem, - }, - allocator: leastWeighted, - }, - want: want{ - items: []*target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test_label": "test-value", - }, - }, - }, - }, - }, - { - name: "Multiple entry target map of same job with label merge", - args: args{ - collector: "test-collector", - job: "test-job", - cMap: map[string]*target.Item{ - baseTargetItem.Hash(): baseTargetItem, - testJobTargetItemTwo.Hash(): testJobTargetItemTwo, - }, - allocator: leastWeighted, - }, - want: want{ - items: []*target.Item{ - { - TargetURL: []string{"test-url"}, - Labels: map[model.LabelName]model.LabelValue{ - "test_label": "test-value", - }, - }, - { - TargetURL: []string{"test-url2"}, - Labels: map[model.LabelName]model.LabelValue{ - "test_label": "test-value2", - }, - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - listenAddr := ":8080" - s := NewServer(logger, tt.args.allocator, listenAddr) - tt.args.allocator.SetCollectors(map[string]*allocation.Collector{"test-collector": {Name: "test-collector"}}) - tt.args.allocator.SetTargets(tt.args.cMap) - request := httptest.NewRequest("GET", fmt.Sprintf("/jobs/%s/targets?collector_id=%s", tt.args.job, tt.args.collector), nil) - w := httptest.NewRecorder() - - s.server.Handler.ServeHTTP(w, request) - result := w.Result() - - assert.Equal(t, http.StatusOK, result.StatusCode) - body := result.Body - bodyBytes, err := io.ReadAll(body) - assert.NoError(t, err) - if len(tt.want.errString) != 0 { - assert.EqualError(t, err, tt.want.errString) - return - } - var itemResponse []*target.Item - err = json.Unmarshal(bodyBytes, &itemResponse) - assert.NoError(t, err) - assert.ElementsMatch(t, tt.want.items, itemResponse) - }) - } -} - -func TestServer_ScrapeConfigsHandler(t *testing.T) { - tests := []struct { - description string - scrapeConfigs map[string]*promconfig.ScrapeConfig - expectedCode int - expectedBody []byte - }{ - { - description: "nil scrape config", - scrapeConfigs: nil, - expectedCode: http.StatusOK, - expectedBody: []byte("{}"), - }, - { - description: "empty scrape config", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{}, - expectedCode: http.StatusOK, - expectedBody: []byte("{}"), - }, - { - description: "single entry", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - expectedCode: http.StatusOK, - }, - { - description: "multiple entries", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{ - model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), - model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), - }, - Separator: ";", - Regex: relabel.MustNewRegexp("(testapp);true"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("http"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "namespace", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "service", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "pod", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "container", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - "serviceMonitor/testapp/testapp1/0": { - JobName: "serviceMonitor/testapp/testapp1/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(5 * time.Minute), - ScrapeTimeout: model.Duration(10 * time.Second), - MetricsPath: "/v2/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{ - model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), - model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), - }, - Separator: ";", - Regex: relabel.MustNewRegexp("(testapp);true"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("http"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "namespace", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "service", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "pod", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "container", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - "serviceMonitor/testapp/testapp2/0": { - JobName: "serviceMonitor/testapp/testapp2/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Minute), - ScrapeTimeout: model.Duration(2 * time.Minute), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{ - model.LabelName("__meta_kubernetes_service_label_app_kubernetes_io_name"), - model.LabelName("__meta_kubernetes_service_labelpresent_app_kubernetes_io_name"), - }, - Separator: ";", - Regex: relabel.MustNewRegexp("(testapp);true"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_endpoint_port_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("http"), - Replacement: "$$1", - Action: relabel.Keep, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_namespace")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "namespace", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_service_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "service", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "pod", - Replacement: "$$1", - Action: relabel.Replace, - }, - { - SourceLabels: model.LabelNames{model.LabelName("__meta_kubernetes_pod_container_name")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "container", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - expectedCode: http.StatusOK, - }, - } - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - listenAddr := ":8080" - s := NewServer(logger, nil, listenAddr) - assert.NoError(t, s.UpdateScrapeConfigResponse(tc.scrapeConfigs)) - - request := httptest.NewRequest("GET", "/scrape_configs", nil) - w := httptest.NewRecorder() - - s.server.Handler.ServeHTTP(w, request) - result := w.Result() - - assert.Equal(t, tc.expectedCode, result.StatusCode) - bodyBytes, err := io.ReadAll(result.Body) - require.NoError(t, err) - if tc.expectedBody != nil { - assert.Equal(t, tc.expectedBody, bodyBytes) - return - } - scrapeConfigs := map[string]*promconfig.ScrapeConfig{} - err = yaml.Unmarshal(bodyBytes, scrapeConfigs) - require.NoError(t, err) - assert.Equal(t, tc.scrapeConfigs, scrapeConfigs) - }) - } -} - -func TestServer_JobHandler(t *testing.T) { - tests := []struct { - description string - targetItems map[string]*target.Item - expectedCode int - expectedJobs map[string]target.LinkJSON - }{ - { - description: "nil jobs", - targetItems: nil, - expectedCode: http.StatusOK, - expectedJobs: make(map[string]target.LinkJSON), - }, - { - description: "empty jobs", - targetItems: map[string]*target.Item{}, - expectedCode: http.StatusOK, - expectedJobs: make(map[string]target.LinkJSON), - }, - { - description: "one job", - targetItems: map[string]*target.Item{ - "targetitem": target.NewItem("job1", "", model.LabelSet{}, ""), - }, - expectedCode: http.StatusOK, - expectedJobs: map[string]target.LinkJSON{ - "job1": newLink("job1"), - }, - }, - { - description: "multiple jobs", - targetItems: map[string]*target.Item{ - "a": target.NewItem("job1", "", model.LabelSet{}, ""), - "b": target.NewItem("job2", "", model.LabelSet{}, ""), - "c": target.NewItem("job3", "", model.LabelSet{}, ""), - "d": target.NewItem("job3", "", model.LabelSet{}, ""), - "e": target.NewItem("job3", "", model.LabelSet{}, "")}, - expectedCode: http.StatusOK, - expectedJobs: map[string]target.LinkJSON{ - "job1": newLink("job1"), - "job2": newLink("job2"), - "job3": newLink("job3"), - }, - }, - } - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - listenAddr := ":8080" - a := &mockAllocator{targetItems: tc.targetItems} - s := NewServer(logger, a, listenAddr) - request := httptest.NewRequest("GET", "/jobs", nil) - w := httptest.NewRecorder() - - s.server.Handler.ServeHTTP(w, request) - result := w.Result() - - assert.Equal(t, tc.expectedCode, result.StatusCode) - bodyBytes, err := io.ReadAll(result.Body) - require.NoError(t, err) - jobs := map[string]target.LinkJSON{} - err = json.Unmarshal(bodyBytes, &jobs) - require.NoError(t, err) - assert.Equal(t, tc.expectedJobs, jobs) - }) - } -} -func TestServer_Readiness(t *testing.T) { - tests := []struct { - description string - scrapeConfigs map[string]*promconfig.ScrapeConfig - expectedCode int - expectedBody []byte - }{ - { - description: "nil scrape config", - scrapeConfigs: nil, - expectedCode: http.StatusServiceUnavailable, - }, - { - description: "empty scrape config", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{}, - expectedCode: http.StatusOK, - }, - { - description: "single entry", - scrapeConfigs: map[string]*promconfig.ScrapeConfig{ - "serviceMonitor/testapp/testapp/0": { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - expectedCode: http.StatusOK, - }, - } - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - listenAddr := ":8080" - s := NewServer(logger, nil, listenAddr) - if tc.scrapeConfigs != nil { - assert.NoError(t, s.UpdateScrapeConfigResponse(tc.scrapeConfigs)) - } - - request := httptest.NewRequest("GET", "/readyz", nil) - w := httptest.NewRecorder() - - s.server.Handler.ServeHTTP(w, request) - result := w.Result() - - assert.Equal(t, tc.expectedCode, result.StatusCode) - }) - } -} - -func newLink(jobName string) target.LinkJSON { - return target.LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))} -} diff --git a/cmd/otel-allocator/target/discovery.go b/cmd/otel-allocator/target/discovery.go deleted file mode 100644 index 9b16f9b69..000000000 --- a/cmd/otel-allocator/target/discovery.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package target - -import ( - "hash" - "hash/fnv" - - "github.com/go-logr/logr" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/model/relabel" - "gopkg.in/yaml.v3" - - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" -) - -var ( - targetsDiscovered = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Name: "opentelemetry_allocator_targets", - Help: "Number of targets discovered.", - }, []string{"job_name"}) -) - -type Discoverer struct { - log logr.Logger - manager *discovery.Manager - close chan struct{} - configsMap map[allocatorWatcher.EventSource]*config.Config - hook discoveryHook - scrapeConfigsHash hash.Hash - scrapeConfigsUpdater scrapeConfigsUpdater -} - -type discoveryHook interface { - SetConfig(map[string][]*relabel.Config) -} - -type scrapeConfigsUpdater interface { - UpdateScrapeConfigResponse(map[string]*config.ScrapeConfig) error -} - -func NewDiscoverer(log logr.Logger, manager *discovery.Manager, hook discoveryHook, scrapeConfigsUpdater scrapeConfigsUpdater) *Discoverer { - return &Discoverer{ - log: log, - manager: manager, - close: make(chan struct{}), - configsMap: make(map[allocatorWatcher.EventSource]*config.Config), - hook: hook, - scrapeConfigsUpdater: scrapeConfigsUpdater, - } -} - -func (m *Discoverer) ApplyConfig(source allocatorWatcher.EventSource, cfg *config.Config) error { - if cfg == nil { - m.log.Info("Service Discovery got empty Prometheus config", "source", source.String()) - return nil - } - m.configsMap[source] = cfg - jobToScrapeConfig := make(map[string]*config.ScrapeConfig) - - discoveryCfg := make(map[string]discovery.Configs) - relabelCfg := make(map[string][]*relabel.Config) - - for _, value := range m.configsMap { - for _, scrapeConfig := range value.ScrapeConfigs { - jobToScrapeConfig[scrapeConfig.JobName] = scrapeConfig - discoveryCfg[scrapeConfig.JobName] = scrapeConfig.ServiceDiscoveryConfigs - relabelCfg[scrapeConfig.JobName] = scrapeConfig.RelabelConfigs - } - } - - hash, err := getScrapeConfigHash(jobToScrapeConfig) - if err != nil { - return err - } - // If the hash has changed, updated stored hash and send the new config. - // Otherwise skip updating scrape configs. - if m.scrapeConfigsUpdater != nil && m.scrapeConfigsHash != hash { - err := m.scrapeConfigsUpdater.UpdateScrapeConfigResponse(jobToScrapeConfig) - if err != nil { - return err - } - - m.scrapeConfigsHash = hash - } - - if m.hook != nil { - m.hook.SetConfig(relabelCfg) - } - return m.manager.ApplyConfig(discoveryCfg) -} - -func (m *Discoverer) Watch(fn func(targets map[string]*Item)) error { - for { - select { - case <-m.close: - m.log.Info("Service Discovery watch event stopped: discovery manager closed") - return nil - case tsets := <-m.manager.SyncCh(): - targets := map[string]*Item{} - - for jobName, tgs := range tsets { - var count float64 = 0 - for _, tg := range tgs { - for _, t := range tg.Targets { - count++ - item := NewItem(jobName, string(t[model.AddressLabel]), t.Merge(tg.Labels), "") - targets[item.Hash()] = item - } - } - targetsDiscovered.WithLabelValues(jobName).Set(count) - } - fn(targets) - } - } -} - -func (m *Discoverer) Close() { - close(m.close) -} - -// Calculate a hash for a scrape config map. -// This is done by marshaling to YAML because it's the most straightforward and doesn't run into problems with unexported fields. -func getScrapeConfigHash(jobToScrapeConfig map[string]*config.ScrapeConfig) (hash.Hash64, error) { - var err error - hash := fnv.New64() - yamlEncoder := yaml.NewEncoder(hash) - for jobName, scrapeConfig := range jobToScrapeConfig { - _, err = hash.Write([]byte(jobName)) - if err != nil { - return nil, err - } - err = yamlEncoder.Encode(scrapeConfig) - if err != nil { - return nil, err - } - } - yamlEncoder.Close() - return hash, err -} diff --git a/cmd/otel-allocator/target/discovery_test.go b/cmd/otel-allocator/target/discovery_test.go deleted file mode 100644 index 506fb01b5..000000000 --- a/cmd/otel-allocator/target/discovery_test.go +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package target - -import ( - "context" - "errors" - "hash" - "sort" - "testing" - "time" - - gokitlog "github.com/go-kit/log" - commonconfig "github.com/prometheus/common/config" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/model/relabel" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - ctrl "sigs.k8s.io/controller-runtime" - - "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" - allocatorWatcher "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/watcher" -) - -func TestDiscovery(t *testing.T) { - type args struct { - file string - } - tests := []struct { - name string - args args - want []string - }{ - { - name: "base case", - args: args{ - file: "./testdata/test.yaml", - }, - want: []string{"prom.domain:9001", "prom.domain:9002", "prom.domain:9003", "prom.domain:8001", "promfile.domain:1001", "promfile.domain:3000"}, - }, - { - name: "update", - args: args{ - file: "./testdata/test_update.yaml", - }, - want: []string{"prom.domain:9004", "prom.domain:9005", "promfile.domain:1001", "promfile.domain:3000"}, - }, - } - scu := &mockScrapeConfigUpdater{} - ctx, cancelFunc := context.WithCancel(context.Background()) - d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) - - defer func() { manager.Close() }() - defer cancelFunc() - - results := make(chan []string) - go func() { - err := d.Run() - assert.Error(t, err) - }() - go func() { - err := manager.Watch(func(targets map[string]*Item) { - var result []string - for _, t := range targets { - result = append(result, t.TargetURL[0]) - } - results <- result - }) - assert.NoError(t, err) - }() - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := config.CreateDefaultConfig() - err := config.LoadFromFile(tt.args.file, &cfg) - assert.NoError(t, err) - assert.True(t, len(cfg.PromConfig.ScrapeConfigs) > 0) - err = manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg.PromConfig) - assert.NoError(t, err) - - gotTargets := <-results - sort.Strings(gotTargets) - sort.Strings(tt.want) - assert.Equal(t, tt.want, gotTargets) - - // check the updated scrape configs - expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} - for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { - expectedScrapeConfigs[scrapeConfig.JobName] = scrapeConfig - } - assert.Equal(t, expectedScrapeConfigs, scu.mockCfg) - }) - } -} - -func TestDiscovery_ScrapeConfigHashing(t *testing.T) { - // these tests are meant to be run sequentially in this order, to test - // that hashing doesn't cause us to send the wrong information. - tests := []struct { - description string - cfg *promconfig.Config - expectErr bool - }{ - { - description: "base config", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "different bool", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "different job name", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "different key", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "unset scrape interval", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "different regex", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/testapp/testapp/1", - HonorTimestamps: false, - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.+)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - }, - }, - }, - }, - { - description: "mock error on update - no hash update", - cfg: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "error", - }, - }, - }, - expectErr: true, - }, - } - var ( - lastValidHash hash.Hash - expectedConfig map[string]*promconfig.ScrapeConfig - lastValidConfig map[string]*promconfig.ScrapeConfig - ) - - scu := &mockScrapeConfigUpdater{} - ctx := context.Background() - d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) - - for _, tc := range tests { - t.Run(tc.description, func(t *testing.T) { - err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, tc.cfg) - if !tc.expectErr { - expectedConfig = make(map[string]*promconfig.ScrapeConfig) - for _, value := range manager.configsMap { - for _, scrapeConfig := range value.ScrapeConfigs { - expectedConfig[scrapeConfig.JobName] = scrapeConfig - } - } - assert.NoError(t, err) - assert.NotZero(t, manager.scrapeConfigsHash) - // Assert that scrape configs in manager are correctly - // reflected in the scrape job updater. - assert.Equal(t, expectedConfig, scu.mockCfg) - - lastValidHash = manager.scrapeConfigsHash - lastValidConfig = expectedConfig - } else { - // In case of error, assert that we retain the last - // known valid config. - assert.Error(t, err) - assert.Equal(t, lastValidHash, manager.scrapeConfigsHash) - assert.Equal(t, lastValidConfig, scu.mockCfg) - } - - }) - } -} - -func TestDiscovery_NoConfig(t *testing.T) { - scu := &mockScrapeConfigUpdater{mockCfg: map[string]*promconfig.ScrapeConfig{}} - ctx, cancelFunc := context.WithCancel(context.Background()) - d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) - defer close(manager.close) - defer cancelFunc() - - go func() { - err := d.Run() - assert.Error(t, err) - }() - // check the updated scrape configs - expectedScrapeConfigs := map[string]*promconfig.ScrapeConfig{} - assert.Equal(t, expectedScrapeConfigs, scu.mockCfg) -} - -func BenchmarkApplyScrapeConfig(b *testing.B) { - numConfigs := 1000 - scrapeConfig := promconfig.ScrapeConfig{ - JobName: "serviceMonitor/testapp/testapp/0", - HonorTimestamps: true, - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(30 * time.Second), - MetricsPath: "/metrics", - Scheme: "http", - HTTPClientConfig: commonconfig.HTTPClientConfig{ - FollowRedirects: true, - }, - RelabelConfigs: []*relabel.Config{ - { - SourceLabels: model.LabelNames{model.LabelName("job")}, - Separator: ";", - Regex: relabel.MustNewRegexp("(.*)"), - TargetLabel: "__tmp_prometheus_job_name", - Replacement: "$$1", - Action: relabel.Replace, - }, - }, - } - cfg := &promconfig.Config{ - ScrapeConfigs: make([]*promconfig.ScrapeConfig, numConfigs), - } - - for i := 0; i < numConfigs; i++ { - cfg.ScrapeConfigs[i] = &scrapeConfig - } - - scu := &mockScrapeConfigUpdater{} - ctx := context.Background() - d := discovery.NewManager(ctx, gokitlog.NewNopLogger()) - manager := NewDiscoverer(ctrl.Log.WithName("test"), d, nil, scu) - - b.ResetTimer() - for i := 0; i < b.N; i++ { - err := manager.ApplyConfig(allocatorWatcher.EventSourcePrometheusCR, cfg) - require.NoError(b, err) - } -} - -var _ scrapeConfigsUpdater = &mockScrapeConfigUpdater{} - -// mockScrapeConfigUpdater is a mock implementation of the scrapeConfigsUpdater. -// If a job with name "error" is provided to the UpdateScrapeConfigResponse, -// it will return an error for testing purposes. -type mockScrapeConfigUpdater struct { - mockCfg map[string]*promconfig.ScrapeConfig -} - -func (m *mockScrapeConfigUpdater) UpdateScrapeConfigResponse(cfg map[string]*promconfig.ScrapeConfig) error { - if _, ok := cfg["error"]; ok { - return errors.New("error") - } - - m.mockCfg = cfg - return nil -} diff --git a/cmd/otel-allocator/target/target.go b/cmd/otel-allocator/target/target.go deleted file mode 100644 index ee5d58cf9..000000000 --- a/cmd/otel-allocator/target/target.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package target - -import ( - "fmt" - "net/url" - - "github.com/prometheus/common/model" -) - -// LinkJSON This package contains common structs and methods that relate to scrape targets. -type LinkJSON struct { - Link string `json:"_link"` -} - -type Item struct { - JobName string `json:"-"` - Link LinkJSON `json:"-"` - TargetURL []string `json:"targets"` - Labels model.LabelSet `json:"labels"` - CollectorName string `json:"-"` - hash string -} - -func (t *Item) Hash() string { - return t.hash -} - -// NewItem Creates a new target item. -// INVARIANTS: -// * Item fields must not be modified after creation. -// * Item should only be made via its constructor, never directly. -func NewItem(jobName string, targetURL string, label model.LabelSet, collectorName string) *Item { - return &Item{ - JobName: jobName, - Link: LinkJSON{Link: fmt.Sprintf("/jobs/%s/targets", url.QueryEscape(jobName))}, - hash: jobName + targetURL + label.Fingerprint().String(), - TargetURL: []string{targetURL}, - Labels: label, - CollectorName: collectorName, - } -} diff --git a/cmd/otel-allocator/target/testdata/test.yaml b/cmd/otel-allocator/target/testdata/test.yaml deleted file mode 100644 index d38b0183a..000000000 --- a/cmd/otel-allocator/target/testdata/test.yaml +++ /dev/null @@ -1,17 +0,0 @@ -label_selector: - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -config: - scrape_configs: - - job_name: prometheus - - file_sd_configs: - - files: - - ../config/testdata/file_sd_test.json - static_configs: - - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] - labels: - my: label - - job_name: prometheus2 - static_configs: - - targets: ["prom.domain:8001"] diff --git a/cmd/otel-allocator/target/testdata/test_update.yaml b/cmd/otel-allocator/target/testdata/test_update.yaml deleted file mode 100644 index 3a7ec60f3..000000000 --- a/cmd/otel-allocator/target/testdata/test_update.yaml +++ /dev/null @@ -1,14 +0,0 @@ -label_selector: - app.kubernetes.io/instance: default.test - app.kubernetes.io/managed-by: opentelemetry-operator -config: - scrape_configs: - - job_name: prometheus - - file_sd_configs: - - files: - - ../config/testdata/file_sd_test.json - static_configs: - - targets: ["prom.domain:9004", "prom.domain:9005"] - labels: - my: other-label diff --git a/cmd/otel-allocator/watcher/promOperator.go b/cmd/otel-allocator/watcher/promOperator.go deleted file mode 100644 index 78d8ff1ec..000000000 --- a/cmd/otel-allocator/watcher/promOperator.go +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package watcher - -import ( - "context" - "fmt" - "os" - "time" - - "github.com/go-kit/log" - "github.com/go-kit/log/level" - "github.com/go-logr/logr" - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - promv1alpha1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1alpha1" - "github.com/prometheus-operator/prometheus-operator/pkg/assets" - monitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned" - "github.com/prometheus-operator/prometheus-operator/pkg/informers" - "github.com/prometheus-operator/prometheus-operator/pkg/prometheus" - promconfig "github.com/prometheus/prometheus/config" - kubeDiscovery "github.com/prometheus/prometheus/discovery/kubernetes" - "gopkg.in/yaml.v2" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" - - allocatorconfig "github.com/open-telemetry/opentelemetry-operator/cmd/otel-allocator/config" -) - -const minEventInterval = time.Second * 5 - -func NewPrometheusCRWatcher(logger logr.Logger, cfg allocatorconfig.Config) (*PrometheusCRWatcher, error) { - mClient, err := monitoringclient.NewForConfig(cfg.ClusterConfig) - if err != nil { - return nil, err - } - - clientset, err := kubernetes.NewForConfig(cfg.ClusterConfig) - if err != nil { - return nil, err - } - - factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, allocatorconfig.DefaultResyncTime, nil) //TODO decide what strategy to use regarding namespaces - - monitoringInformers, err := getInformers(factory) - if err != nil { - return nil, err - } - - // TODO: We should make these durations configurable - prom := &monitoringv1.Prometheus{ - Spec: monitoringv1.PrometheusSpec{ - CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ - ScrapeInterval: monitoringv1.Duration(cfg.PrometheusCR.ScrapeInterval.String()), - }, - }, - } - - promOperatorLogger := level.NewFilter(log.NewLogfmtLogger(os.Stderr), level.AllowWarn()) - generator, err := prometheus.NewConfigGenerator(promOperatorLogger, prom, true) - - if err != nil { - return nil, err - } - - servMonSelector := getSelector(cfg.ServiceMonitorSelector) - - podMonSelector := getSelector(cfg.PodMonitorSelector) - - return &PrometheusCRWatcher{ - logger: logger, - kubeMonitoringClient: mClient, - k8sClient: clientset, - informers: monitoringInformers, - stopChannel: make(chan struct{}), - eventInterval: minEventInterval, - configGenerator: generator, - kubeConfigPath: cfg.KubeConfigFilePath, - serviceMonitorSelector: servMonSelector, - podMonitorSelector: podMonSelector, - }, nil -} - -type PrometheusCRWatcher struct { - logger logr.Logger - kubeMonitoringClient monitoringclient.Interface - k8sClient kubernetes.Interface - informers map[string]*informers.ForResource - eventInterval time.Duration - stopChannel chan struct{} - configGenerator *prometheus.ConfigGenerator - kubeConfigPath string - - serviceMonitorSelector labels.Selector - podMonitorSelector labels.Selector -} - -func getSelector(s map[string]string) labels.Selector { - if s == nil { - return labels.NewSelector() - } - return labels.SelectorFromSet(s) -} - -// getInformers returns a map of informers for the given resources. -func getInformers(factory informers.FactoriesForNamespaces) (map[string]*informers.ForResource, error) { - serviceMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.ServiceMonitorName)) - if err != nil { - return nil, err - } - - podMonitorInformers, err := informers.NewInformersForResource(factory, monitoringv1.SchemeGroupVersion.WithResource(monitoringv1.PodMonitorName)) - if err != nil { - return nil, err - } - - return map[string]*informers.ForResource{ - monitoringv1.ServiceMonitorName: serviceMonitorInformers, - monitoringv1.PodMonitorName: podMonitorInformers, - }, nil -} - -// Watch wrapped informers and wait for an initial sync. -func (w *PrometheusCRWatcher) Watch(upstreamEvents chan Event, upstreamErrors chan error) error { - success := true - // this channel needs to be buffered because notifications are asynchronous and neither producers nor consumers wait - notifyEvents := make(chan struct{}, 1) - - for name, resource := range w.informers { - resource.Start(w.stopChannel) - - if ok := cache.WaitForNamedCacheSync(name, w.stopChannel, resource.HasSynced); !ok { - success = false - } - - // only send an event notification if there isn't one already - resource.AddEventHandler(cache.ResourceEventHandlerFuncs{ - // these functions only write to the notification channel if it's empty to avoid blocking - // if scrape config updates are being rate-limited - AddFunc: func(obj interface{}) { - select { - case notifyEvents <- struct{}{}: - default: - } - }, - UpdateFunc: func(oldObj, newObj interface{}) { - select { - case notifyEvents <- struct{}{}: - default: - } - }, - DeleteFunc: func(obj interface{}) { - select { - case notifyEvents <- struct{}{}: - default: - } - }, - }) - } - if !success { - return fmt.Errorf("failed to sync cache") - } - - // limit the rate of outgoing events - w.rateLimitedEventSender(upstreamEvents, notifyEvents) - - <-w.stopChannel - return nil -} - -// rateLimitedEventSender sends events to the upstreamEvents channel whenever it gets a notification on the notifyEvents channel, -// but not more frequently than once per w.eventPeriod. -func (w *PrometheusCRWatcher) rateLimitedEventSender(upstreamEvents chan Event, notifyEvents chan struct{}) { - ticker := time.NewTicker(w.eventInterval) - defer ticker.Stop() - - event := Event{ - Source: EventSourcePrometheusCR, - Watcher: Watcher(w), - } - - for { - select { - case <-w.stopChannel: - return - case <-ticker.C: // throttle events to avoid excessive updates - select { - case <-notifyEvents: - select { - case upstreamEvents <- event: - default: // put the notification back in the queue if we can't send it upstream - select { - case notifyEvents <- struct{}{}: - default: - } - } - default: - } - } - } -} - -func (w *PrometheusCRWatcher) Close() error { - close(w.stopChannel) - return nil -} - -func (w *PrometheusCRWatcher) LoadConfig(ctx context.Context) (*promconfig.Config, error) { - store := assets.NewStore(w.k8sClient.CoreV1(), w.k8sClient.CoreV1()) - serviceMonitorInstances := make(map[string]*monitoringv1.ServiceMonitor) - smRetrieveErr := w.informers[monitoringv1.ServiceMonitorName].ListAll(w.serviceMonitorSelector, func(sm interface{}) { - monitor := sm.(*monitoringv1.ServiceMonitor) - key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) - w.addStoreAssetsForServiceMonitor(ctx, monitor.Name, monitor.Namespace, monitor.Spec.Endpoints, store) - serviceMonitorInstances[key] = monitor - }) - if smRetrieveErr != nil { - return nil, smRetrieveErr - } - - podMonitorInstances := make(map[string]*monitoringv1.PodMonitor) - pmRetrieveErr := w.informers[monitoringv1.PodMonitorName].ListAll(w.podMonitorSelector, func(pm interface{}) { - monitor := pm.(*monitoringv1.PodMonitor) - key, _ := cache.DeletionHandlingMetaNamespaceKeyFunc(monitor) - w.addStoreAssetsForPodMonitor(ctx, monitor.Name, monitor.Namespace, monitor.Spec.PodMetricsEndpoints, store) - podMonitorInstances[key] = monitor - }) - if pmRetrieveErr != nil { - return nil, pmRetrieveErr - } - - generatedConfig, err := w.configGenerator.GenerateServerConfiguration( - ctx, - "30s", - "", - nil, - nil, - monitoringv1.TSDBSpec{}, - nil, - nil, - serviceMonitorInstances, - podMonitorInstances, - map[string]*monitoringv1.Probe{}, - map[string]*promv1alpha1.ScrapeConfig{}, - store, - nil, - nil, - nil, - []string{}) - if err != nil { - return nil, err - } - - promCfg := &promconfig.Config{} - unmarshalErr := yaml.Unmarshal(generatedConfig, promCfg) - if unmarshalErr != nil { - return nil, unmarshalErr - } - - // set kubeconfig path to service discovery configs, else kubernetes_sd will always attempt in-cluster - // authentication even if running with a detected kubeconfig - for _, scrapeConfig := range promCfg.ScrapeConfigs { - for _, serviceDiscoveryConfig := range scrapeConfig.ServiceDiscoveryConfigs { - if serviceDiscoveryConfig.Name() == "kubernetes" { - sdConfig := interface{}(serviceDiscoveryConfig).(*kubeDiscovery.SDConfig) - sdConfig.KubeConfig = w.kubeConfigPath - } - } - } - return promCfg, nil -} - -// addStoreAssetsForServiceMonitor adds authentication / authorization related information to the assets store, -// based on the service monitor and endpoints specs. -// This code borrows from -// https://github.com/prometheus-operator/prometheus-operator/blob/06b5c4189f3f72737766d86103d049115c3aff48/pkg/prometheus/resource_selector.go#L73. -func (w *PrometheusCRWatcher) addStoreAssetsForServiceMonitor( - ctx context.Context, - smName, smNamespace string, - endps []monitoringv1.Endpoint, - store *assets.Store, -) { - var err error - for i, endp := range endps { - objKey := fmt.Sprintf("serviceMonitor/%s/%s/%d", smNamespace, smName, i) - - if err = store.AddSafeAuthorizationCredentials(ctx, smNamespace, endp.Authorization, objKey); err != nil { - break - } - - if err = store.AddBasicAuth(ctx, smNamespace, endp.BasicAuth, objKey); err != nil { - break - } - - if endp.TLSConfig != nil { - if err = store.AddTLSConfig(ctx, smNamespace, endp.TLSConfig); err != nil { - break - } - } - - if err = store.AddOAuth2(ctx, smNamespace, endp.OAuth2, objKey); err != nil { - break - } - - smAuthKey := fmt.Sprintf("serviceMonitor/auth/%s/%s/%d", smNamespace, smName, i) - if err = store.AddSafeAuthorizationCredentials(ctx, smNamespace, endp.Authorization, smAuthKey); err != nil { - break - } - } - - if err != nil { - w.logger.Error(err, "Failed to obtain credentials for a ServiceMonitor", "serviceMonitor", smName) - } -} - -// addStoreAssetsForServiceMonitor adds authentication / authorization related information to the assets store, -// based on the service monitor and pod metrics endpoints specs. -// This code borrows from -// https://github.com/prometheus-operator/prometheus-operator/blob/06b5c4189f3f72737766d86103d049115c3aff48/pkg/prometheus/resource_selector.go#L314. -func (w *PrometheusCRWatcher) addStoreAssetsForPodMonitor( - ctx context.Context, - pmName, pmNamespace string, - podMetricsEndps []monitoringv1.PodMetricsEndpoint, - store *assets.Store, -) { - var err error - for i, endp := range podMetricsEndps { - objKey := fmt.Sprintf("podMonitor/%s/%s/%d", pmNamespace, pmName, i) - - if err = store.AddSafeAuthorizationCredentials(ctx, pmNamespace, endp.Authorization, objKey); err != nil { - break - } - - if err = store.AddBasicAuth(ctx, pmNamespace, endp.BasicAuth, objKey); err != nil { - break - } - - if endp.TLSConfig != nil { - if err = store.AddSafeTLSConfig(ctx, pmNamespace, &endp.TLSConfig.SafeTLSConfig); err != nil { - break - } - } - - if err = store.AddOAuth2(ctx, pmNamespace, endp.OAuth2, objKey); err != nil { - break - } - - smAuthKey := fmt.Sprintf("podMonitor/auth/%s/%s/%d", pmNamespace, pmName, i) - if err = store.AddSafeAuthorizationCredentials(ctx, pmNamespace, endp.Authorization, smAuthKey); err != nil { - break - } - } - - if err != nil { - w.logger.Error(err, "Failed to obtain credentials for a PodMonitor", "podMonitor", pmName) - } -} diff --git a/cmd/otel-allocator/watcher/promOperator_test.go b/cmd/otel-allocator/watcher/promOperator_test.go deleted file mode 100644 index 6459acefc..000000000 --- a/cmd/otel-allocator/watcher/promOperator_test.go +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package watcher - -import ( - "context" - "testing" - "time" - - "github.com/go-kit/log" - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - fakemonitoringclient "github.com/prometheus-operator/prometheus-operator/pkg/client/versioned/fake" - "github.com/prometheus-operator/prometheus-operator/pkg/informers" - "github.com/prometheus-operator/prometheus-operator/pkg/prometheus" - "github.com/prometheus/common/config" - "github.com/prometheus/common/model" - promconfig "github.com/prometheus/prometheus/config" - "github.com/prometheus/prometheus/discovery" - kubeDiscovery "github.com/prometheus/prometheus/discovery/kubernetes" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes/fake" - "k8s.io/client-go/tools/cache" -) - -func TestLoadConfig(t *testing.T) { - tests := []struct { - name string - serviceMonitor *monitoringv1.ServiceMonitor - podMonitor *monitoringv1.PodMonitor - want *promconfig.Config - wantErr bool - }{ - { - name: "simple test", - serviceMonitor: &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "simple", - Namespace: "test", - }, - Spec: monitoringv1.ServiceMonitorSpec{ - JobLabel: "test", - Endpoints: []monitoringv1.Endpoint{ - { - Port: "web", - }, - }, - }, - }, - podMonitor: &monitoringv1.PodMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "simple", - Namespace: "test", - }, - Spec: monitoringv1.PodMonitorSpec{ - JobLabel: "test", - PodMetricsEndpoints: []monitoringv1.PodMetricsEndpoint{ - { - Port: "web", - }, - }, - }, - }, - want: &promconfig.Config{ - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/test/simple/0", - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - HonorTimestamps: true, - HonorLabels: false, - Scheme: "http", - MetricsPath: "/metrics", - ServiceDiscoveryConfigs: []discovery.Config{ - &kubeDiscovery.SDConfig{ - Role: "endpointslice", - NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ - Names: []string{"test"}, - IncludeOwnNamespace: false, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - { - JobName: "podMonitor/test/simple/0", - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - HonorTimestamps: true, - HonorLabels: false, - Scheme: "http", - MetricsPath: "/metrics", - ServiceDiscoveryConfigs: []discovery.Config{ - &kubeDiscovery.SDConfig{ - Role: "pod", - NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ - Names: []string{"test"}, - IncludeOwnNamespace: false, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - }, - }, - }, - { - name: "basic auth (serviceMonitor)", - serviceMonitor: &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "auth", - Namespace: "test", - }, - Spec: monitoringv1.ServiceMonitorSpec{ - JobLabel: "auth", - Endpoints: []monitoringv1.Endpoint{ - { - Port: "web", - BasicAuth: &monitoringv1.BasicAuth{ - Username: v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{ - Name: "basic-auth", - }, - Key: "username", - }, - Password: v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{ - Name: "basic-auth", - }, - Key: "password", - }, - }, - }, - }, - Selector: metav1.LabelSelector{ - MatchLabels: map[string]string{ - "app": "auth", - }, - }, - }, - }, - want: &promconfig.Config{ - GlobalConfig: promconfig.GlobalConfig{}, - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "serviceMonitor/test/auth/0", - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - HonorTimestamps: true, - HonorLabels: false, - Scheme: "http", - MetricsPath: "/metrics", - ServiceDiscoveryConfigs: []discovery.Config{ - &kubeDiscovery.SDConfig{ - Role: "endpointslice", - NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ - Names: []string{"test"}, - IncludeOwnNamespace: false, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - }, - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - EnableHTTP2: true, - BasicAuth: &config.BasicAuth{ - Username: "admin", - Password: "password", - }, - }, - }, - }, - }, - }, - { - name: "bearer token (podMonitor)", - podMonitor: &monitoringv1.PodMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "bearer", - Namespace: "test", - }, - Spec: monitoringv1.PodMonitorSpec{ - JobLabel: "bearer", - PodMetricsEndpoints: []monitoringv1.PodMetricsEndpoint{ - { - Port: "web", - Authorization: &monitoringv1.SafeAuthorization{ - Type: "Bearer", - Credentials: &v1.SecretKeySelector{ - LocalObjectReference: v1.LocalObjectReference{ - Name: "bearer", - }, - Key: "token", - }, - }, - }, - }, - }, - }, - want: &promconfig.Config{ - GlobalConfig: promconfig.GlobalConfig{}, - ScrapeConfigs: []*promconfig.ScrapeConfig{ - { - JobName: "podMonitor/test/bearer/0", - ScrapeInterval: model.Duration(30 * time.Second), - ScrapeTimeout: model.Duration(10 * time.Second), - HonorTimestamps: true, - HonorLabels: false, - Scheme: "http", - MetricsPath: "/metrics", - ServiceDiscoveryConfigs: []discovery.Config{ - &kubeDiscovery.SDConfig{ - Role: "pod", - NamespaceDiscovery: kubeDiscovery.NamespaceDiscovery{ - Names: []string{"test"}, - IncludeOwnNamespace: false, - }, - HTTPClientConfig: config.DefaultHTTPClientConfig, - }, - }, - HTTPClientConfig: config.HTTPClientConfig{ - FollowRedirects: true, - EnableHTTP2: true, - Authorization: &config.Authorization{ - Type: "Bearer", - Credentials: "bearer-token", - }, - }, - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - w := getTestPrometheusCRWatcher(t, tt.serviceMonitor, tt.podMonitor) - for _, informer := range w.informers { - // Start informers in order to populate cache. - informer.Start(w.stopChannel) - } - - // Wait for informers to sync. - for _, informer := range w.informers { - for !informer.HasSynced() { - time.Sleep(50 * time.Millisecond) - } - } - - got, err := w.LoadConfig(context.Background()) - assert.NoError(t, err) - - sanitizeScrapeConfigsForTest(got.ScrapeConfigs) - assert.Equal(t, tt.want.ScrapeConfigs, got.ScrapeConfigs) - }) - } -} - -func TestRateLimit(t *testing.T) { - var err error - serviceMonitor := &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "simple", - Namespace: "test", - }, - Spec: monitoringv1.ServiceMonitorSpec{ - JobLabel: "test", - Endpoints: []monitoringv1.Endpoint{ - { - Port: "web", - }, - }, - }, - } - events := make(chan Event, 1) - eventInterval := 5 * time.Millisecond - - w := getTestPrometheusCRWatcher(t, nil, nil) - defer w.Close() - w.eventInterval = eventInterval - - go func() { - watchErr := w.Watch(events, make(chan error)) - require.NoError(t, watchErr) - }() - // we don't have a simple way to wait for the watch to actually add event handlers to the informer, - // instead, we just update a ServiceMonitor periodically and wait until we get a notification - _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Create(context.Background(), serviceMonitor, metav1.CreateOptions{}) - require.NoError(t, err) - - // wait for cache sync first - for _, informer := range w.informers { - success := cache.WaitForCacheSync(w.stopChannel, informer.HasSynced) - require.True(t, success) - } - - require.Eventually(t, func() bool { - _, createErr := w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) - if createErr != nil { - return false - } - select { - case <-events: - return true - default: - return false - } - }, eventInterval*2, time.Millisecond) - - // it's difficult to measure the rate precisely - // what we do, is send two updates, and then assert that the elapsed time is between eventInterval and 3*eventInterval - startTime := time.Now() - _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) - require.NoError(t, err) - require.Eventually(t, func() bool { - select { - case <-events: - return true - default: - return false - } - }, eventInterval*2, time.Millisecond) - _, err = w.kubeMonitoringClient.MonitoringV1().ServiceMonitors("test").Update(context.Background(), serviceMonitor, metav1.UpdateOptions{}) - require.NoError(t, err) - require.Eventually(t, func() bool { - select { - case <-events: - return true - default: - return false - } - }, eventInterval*2, time.Millisecond) - elapsedTime := time.Since(startTime) - assert.Less(t, eventInterval, elapsedTime) - assert.GreaterOrEqual(t, eventInterval*3, elapsedTime) - -} - -// getTestPrometheuCRWatcher creates a test instance of PrometheusCRWatcher with fake clients -// and test secrets. -func getTestPrometheusCRWatcher(t *testing.T, sm *monitoringv1.ServiceMonitor, pm *monitoringv1.PodMonitor) *PrometheusCRWatcher { - mClient := fakemonitoringclient.NewSimpleClientset() - if sm != nil { - _, err := mClient.MonitoringV1().ServiceMonitors("test").Create(context.Background(), sm, metav1.CreateOptions{}) - if err != nil { - t.Fatal(t, err) - } - } - if pm != nil { - _, err := mClient.MonitoringV1().PodMonitors("test").Create(context.Background(), pm, metav1.CreateOptions{}) - if err != nil { - t.Fatal(t, err) - } - } - - k8sClient := fake.NewSimpleClientset() - _, err := k8sClient.CoreV1().Secrets("test").Create(context.Background(), &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "basic-auth", - Namespace: "test", - }, - Data: map[string][]byte{"username": []byte("admin"), "password": []byte("password")}, - }, metav1.CreateOptions{}) - if err != nil { - t.Fatal(t, err) - } - _, err = k8sClient.CoreV1().Secrets("test").Create(context.Background(), &v1.Secret{ - ObjectMeta: metav1.ObjectMeta{ - Name: "bearer", - Namespace: "test", - }, - Data: map[string][]byte{"token": []byte("bearer-token")}, - }, metav1.CreateOptions{}) - if err != nil { - t.Fatal(t, err) - } - - factory := informers.NewMonitoringInformerFactories(map[string]struct{}{v1.NamespaceAll: {}}, map[string]struct{}{}, mClient, 0, nil) - informers, err := getInformers(factory) - if err != nil { - t.Fatal(t, err) - } - - prom := &monitoringv1.Prometheus{ - Spec: monitoringv1.PrometheusSpec{ - CommonPrometheusFields: monitoringv1.CommonPrometheusFields{ - ScrapeInterval: monitoringv1.Duration("30s"), - }, - }, - } - - generator, err := prometheus.NewConfigGenerator(log.NewNopLogger(), prom, true) - if err != nil { - t.Fatal(t, err) - } - - return &PrometheusCRWatcher{ - kubeMonitoringClient: mClient, - k8sClient: k8sClient, - informers: informers, - configGenerator: generator, - serviceMonitorSelector: getSelector(nil), - podMonitorSelector: getSelector(nil), - stopChannel: make(chan struct{}), - } -} - -// Remove relable configs fields from scrape configs for testing, -// since these are mutated and tested down the line with the hook(s). -func sanitizeScrapeConfigsForTest(scs []*promconfig.ScrapeConfig) { - for _, sc := range scs { - sc.RelabelConfigs = nil - sc.MetricRelabelConfigs = nil - } -} diff --git a/cmd/otel-allocator/watcher/watcher.go b/cmd/otel-allocator/watcher/watcher.go deleted file mode 100644 index c970c7e47..000000000 --- a/cmd/otel-allocator/watcher/watcher.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package watcher - -import ( - "context" - - promconfig "github.com/prometheus/prometheus/config" -) - -type Watcher interface { - // Watch watcher and supply channels which will receive change events - Watch(upstreamEvents chan Event, upstreamErrors chan error) error - LoadConfig(ctx context.Context) (*promconfig.Config, error) - Close() error -} - -type Event struct { - Source EventSource - Watcher Watcher -} - -type EventSource int - -const ( - EventSourceConfigMap EventSource = iota - EventSourcePrometheusCR -) - -var ( - eventSourceToString = map[EventSource]string{ - EventSourceConfigMap: "EventSourceConfigMap", - EventSourcePrometheusCR: "EventSourcePrometheusCR", - } -) - -func (e EventSource) String() string { - return eventSourceToString[e] -} diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index 5d08f6174..ffeabae85 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -6,10 +6,10 @@ metadata: capabilities: Deep Insights categories: Logging & Tracing,Monitoring certified: "false" - containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator + containerImage: ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector - repository: github.com/open-telemetry/opentelemetry-operator + repository: github.com/aws/amazon-cloudwatch-agent-operator support: OpenTelemetry Community name: opentelemetry-operator.v0.0.0 namespace: placeholder @@ -135,7 +135,7 @@ spec: - troubleshooting links: - name: OpenTelemetry Operator - url: https://github.com/open-telemetry/opentelemetry-operator + url: https://github.com/aws/amazon-cloudwatch-agent-operator maintainers: - email: jpkroehling@redhat.com name: Juraci Paixão Kröhling diff --git a/controllers/amazoncloudwatchagent_controller.go b/controllers/amazoncloudwatchagent_controller.go deleted file mode 100644 index 5c88f4be7..000000000 --- a/controllers/amazoncloudwatchagent_controller.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers - -import ( - "context" - "fmt" - "sync" - - "github.com/go-logr/logr" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/record" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/reconcile" -) - -// AmazonCloudWatchAgentReconciler reconciles a AmazonCloudWatchAgent object. -type AmazonCloudWatchAgentReconciler struct { - client.Client - recorder record.EventRecorder - scheme *runtime.Scheme - log logr.Logger - config config.Config - - tasks []Task - muTasks sync.RWMutex -} - -// Task represents a reconciliation task to be executed by the reconciler. -type Task struct { - Do func(context.Context, reconcile.Params) error - Name string - BailOnError bool -} - -// Params is the set of options to build a new amazonCloudWatchAgentReconciler. -type Params struct { - client.Client - Recorder record.EventRecorder - Scheme *runtime.Scheme - Log logr.Logger - Tasks []Task - Config config.Config -} - -// NewReconciler creates a new reconciler for AmazonCloudWatchAgent objects. -func NewReconciler(p Params) *AmazonCloudWatchAgentReconciler { - r := &AmazonCloudWatchAgentReconciler{ - Client: p.Client, - log: p.Log, - scheme: p.Scheme, - config: p.Config, - tasks: p.Tasks, - recorder: p.Recorder, - } - - if len(r.tasks) == 0 { - r.tasks = []Task{ - { - reconcile.ConfigMaps, - "config maps", - true, - }, - { - reconcile.ServiceAccounts, - "service accounts", - true, - }, - { - reconcile.Services, - "services", - true, - }, - { - reconcile.Deployments, - "deployments", - true, - }, - { - reconcile.DaemonSets, - "daemon sets", - true, - }, - { - reconcile.Self, - "amazon-cloudwatch-agent", - true, - }, - } - } - return r -} - -// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,verbs=get;list;watch;update;patch -// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents/finalizers,verbs=get;update;patch -// +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update -// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch - -// Reconcile the current state of an Amazon CloudWatch Agent resource with the desired state. -func (r *AmazonCloudWatchAgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - log := r.log.WithValues("amazoncloudwatchagent", req.NamespacedName) - - var instance v1alpha1.AmazonCloudWatchAgent - if err := r.Get(ctx, req.NamespacedName, &instance); err != nil { - if !apierrors.IsNotFound(err) { - log.Error(err, "unable to fetch AmazonCloudWatchAgent") - } - - // we'll ignore not-found errors, since they can't be fixed by an immediate - // requeue (we'll need to wait for a new notification), and we can get them - // on deleted requests. - return ctrl.Result{}, client.IgnoreNotFound(err) - } - - params := reconcile.Params{ - Config: r.config, - Client: r.Client, - Instance: instance, - Log: log, - Scheme: r.scheme, - Recorder: r.recorder, - } - - if err := r.RunTasks(ctx, params); err != nil { - return ctrl.Result{}, err - } - - return ctrl.Result{}, nil -} - -// RunTasks runs all the tasks associated with this reconciler. -func (r *AmazonCloudWatchAgentReconciler) RunTasks(ctx context.Context, params reconcile.Params) error { - r.muTasks.RLock() - defer r.muTasks.RUnlock() - for _, task := range r.tasks { - if err := task.Do(ctx, params); err != nil { - // If we get an error that occurs because a pod is being terminated, then exit this loop - if apierrors.IsForbidden(err) && apierrors.HasStatusCause(err, corev1.NamespaceTerminatingCause) { - r.log.V(2).Info("Exiting reconcile loop because namespace is being terminated", "namespace", params.Instance.Namespace) - return nil - } - r.log.Error(err, fmt.Sprintf("failed to reconcile %s", task.Name)) - if task.BailOnError { - return err - } - } - } - - return nil -} - -// SetupWithManager tells the manager what our controller is interested in. -func (r *AmazonCloudWatchAgentReconciler) SetupWithManager(mgr ctrl.Manager) error { - builder := ctrl.NewControllerManagedBy(mgr). - For(&v1alpha1.AmazonCloudWatchAgent{}). - Owns(&corev1.ConfigMap{}). - Owns(&corev1.ServiceAccount{}). - Owns(&corev1.Service{}). - Owns(&appsv1.Deployment{}). - Owns(&appsv1.DaemonSet{}) - //Owns(&appsv1.StatefulSet{}) - - return builder.Complete(r) -} diff --git a/controllers/builder_test.go b/controllers/builder_test.go index be8e635d7..1fec609f6 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -31,10 +31,10 @@ import ( colfeaturegate "go.opentelemetry.io/collector/featuregate" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) var ( diff --git a/controllers/common.go b/controllers/common.go index 2a7ff1d75..4b3c42bc6 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -28,10 +28,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/opampbridge" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/opampbridge" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator" ) func isNamespaceScoped(obj client.Object) bool { diff --git a/controllers/opampbridge_controller.go b/controllers/opampbridge_controller.go index 670418ad5..854441d34 100644 --- a/controllers/opampbridge_controller.go +++ b/controllers/opampbridge_controller.go @@ -26,10 +26,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - opampbridgeStatus "github.com/open-telemetry/opentelemetry-operator/internal/status/opampbridge" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + opampbridgeStatus "github.com/aws/amazon-cloudwatch-agent-operator/internal/status/opampbridge" ) // OpAMPBridgeReconciler reconciles a OpAMPBridge object. diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go index 127fddc14..76fb7baaa 100644 --- a/controllers/opampbridge_controller_test.go +++ b/controllers/opampbridge_controller_test.go @@ -33,10 +33,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/controllers" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/controllers" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) var opampBridgeLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 0cca79c1d..041166c0a 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -30,11 +30,11 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - collectorStatus "github.com/open-telemetry/opentelemetry-operator/internal/status/collector" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + collectorStatus "github.com/aws/amazon-cloudwatch-agent-operator/internal/status/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) // OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 13fe81689..543e4eb4c 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -39,13 +39,13 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/controllers" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/controllers" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) const ( diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 51fe86d5a..c7dea30d1 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -46,12 +46,12 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/testdata" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/testdata" // +kubebuilder:scaffold:imports ) @@ -231,7 +231,7 @@ func paramsWithModeAndReplicas(mode v1alpha1.Mode, replicas int32) manifests.Par Namespace: "default", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", Ports: []v1.ServicePort{{ Name: "web", Port: 80, @@ -428,7 +428,7 @@ func opampBridgeParams() manifests.Params { UID: instanceUID, }, Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.69.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/operator-opamp-bridge:0.69.0", Ports: []v1.ServicePort{ { Name: "metrics", diff --git a/go.mod b/go.mod index 815b0bb0a..b3aa9314c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module github.com/open-telemetry/opentelemetry-operator +module github.com/aws/amazon-cloudwatch-agent-operator -go 1.21 +go 1.20 retract v1.51.0 diff --git a/go.sum b/go.sum index 2e99b917b..358df7f02 100644 --- a/go.sum +++ b/go.sum @@ -46,15 +46,11 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aov github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 h1:UPeCRD+XY7QlaGQte2EVI2iOcWvUYA2XY8w5T/8v0NQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1/go.mod h1:oGV6NlB0cvi1ZbYRR2UN44QHxWFyGk+iylgD0qaMXjA= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 h1:mLY+pNLjCUeKhgnAJWAKhEUQM+RJQo2H1fuGSw1Ky1E= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2/go.mod h1:FbdwsQ2EzwvXxOPcMFYO8ogEc9uMMIj3YkmCdXdAFmk= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 h1:QM6sE5k2ZT/vI5BEe0r7mqjsUSnhVBFbOsVkEuaEfiA= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0/go.mod h1:243D9iHbcQXoFUtgHJwL7gl2zx1aDuDMjvBZVGr2uW0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 h1:bWh0Z2rOEDfB/ywv/l0iHN1JgyazE6kW/aIA89+CEK0= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1/go.mod h1:Bzf34hhAE9NSxailk8xVeLEZbUjOXcC+GnU1mMKdhLw= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 h1:ECsQtyERDVz3NP3kvDOTLvbQhqWp/x9EsGKtb4ogUr8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk= github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -82,7 +78,6 @@ github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -110,7 +105,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/digitalocean/godo v1.104.1 h1:SZNxjAsskM/su0YW9P8Wx3gU0W1Z13b6tZlYNpl5BnA= github.com/digitalocean/godo v1.104.1/go.mod h1:VAI/L5YDzMuPRU01lEEUSQ/sp5Z//1HnnFv/RBTEdbg= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= @@ -130,7 +124,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -139,7 +132,6 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -173,7 +165,6 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -214,7 +205,6 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -246,7 +236,6 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= -github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -268,7 +257,6 @@ github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWf github.com/hashicorp/consul/api v1.25.1 h1:CqrdhYzc8XZuPnhIYZWH45toM0LB9ZeYr/gvpLVI3PE= github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFRF4ylPs= -github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= github.com/hashicorp/cronexpr v1.1.2/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -285,7 +273,6 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= -github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -297,12 +284,10 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -327,7 +312,6 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/ionos-cloud/sdk-go/v6 v6.1.9 h1:Iq3VIXzeEbc8EbButuACgfLMiY5TPVWUPNrF+Vsddo4= github.com/ionos-cloud/sdk-go/v6 v6.1.9/go.mod h1:EzEgRIDxBELvfoa/uBN0kOQaqovLjUWEB7iW4/Q+t4k= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= -github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -357,7 +341,6 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -387,7 +370,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= -github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= @@ -396,12 +378,10 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -410,26 +390,21 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/openshift/api v3.9.0+incompatible h1:fJ/KsefYuZAjmrr3+5U9yZIZbTOpVkDDLDLFresAeYs= -github.com/openshift/api v3.9.0+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= +github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= +github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/operator-framework/operator-lib v0.11.0 h1:eYzqpiOfq9WBI4Trddisiq/X9BwCisZd3rIzmHRC9Z8= github.com/operator-framework/operator-lib v0.11.0/go.mod h1:RpyKhFAoG6DmKTDIwMuO6pI3LRc8IE9rxEYWy476o6g= github.com/ovh/go-ovh v1.4.3 h1:Gs3V823zwTFpzgGLZNI6ILS4rmxZgJwJCz54Er9LwD0= @@ -483,7 +458,6 @@ github.com/prometheus/prometheus v0.48.1 h1:CTszphSNTXkuCG6O0IfpKdHcJkvvnAAE1GbE github.com/prometheus/prometheus v0.48.1/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 h1:yWfiTPwYxB0l5fGMhl/G+liULugVIHD9AU77iNLrURQ= @@ -491,7 +465,6 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21/go.mod h1:fCa7OJZ/9DRTnOKmxvT github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shoenig/test v0.6.6 h1:Oe8TPH9wAbv++YPNDKJWUnI8Q4PPWCx3UbOfH+FxiMU= -github.com/shoenig/test v0.6.6/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -539,7 +512,6 @@ go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -655,7 +627,6 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -889,7 +860,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -902,7 +872,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/hack/boilerplate.go.txt b/hack/boilerplate.go.txt deleted file mode 100644 index 28a7641a8..000000000 --- a/hack/boilerplate.go.txt +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. diff --git a/hack/check-operator-ready.go b/hack/check-operator-ready.go deleted file mode 100644 index 4bf6390cd..000000000 --- a/hack/check-operator-ready.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "context" - "fmt" - "os" - "path/filepath" - "time" - - appsv1 "k8s.io/api/apps/v1" - k8sruntime "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - - "github.com/spf13/pflag" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" - "sigs.k8s.io/controller-runtime/pkg/client" - - otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" -) - -var scheme *k8sruntime.Scheme - -func init() { - scheme = k8sruntime.NewScheme() - utilruntime.Must(otelv1alpha1.AddToScheme(scheme)) - utilruntime.Must(appsv1.AddToScheme(scheme)) -} - -func main() { - var timeout int - var kubeconfigPath string - - defaultKubeconfigPath := filepath.Join(homedir.HomeDir(), ".kube", "config") - - pflag.IntVar(&timeout, "timeout", 300, "The timeout for the check.") - pflag.StringVar(&kubeconfigPath, "kubeconfig-path", defaultKubeconfigPath, "Absolute path to the KubeconfigPath file") - pflag.Parse() - - pollInterval := 500 * time.Millisecond - timeoutPoll := time.Duration(timeout) * time.Second - - config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) - if err != nil { - fmt.Printf("Error reading the kubeconfig: %s\n", err.Error()) - os.Exit(1) - } - - clusterClient, err := client.New(config, client.Options{Scheme: scheme}) - if err != nil { - fmt.Printf("Creating the Kubernetes client: %s\n", err) - os.Exit(1) - } - - fmt.Println("Waiting until the OpenTelemetry Operator deployment is created") - operatorDeployment := &appsv1.Deployment{} - - ctx := context.Background() - err = wait.PollUntilContextTimeout(ctx, pollInterval, timeoutPoll, false, func(c context.Context) (done bool, err error) { - err = clusterClient.Get( - c, - client.ObjectKey{ - Name: "opentelemetry-operator-controller-manager", - Namespace: "opentelemetry-operator-system", - }, - operatorDeployment, - ) - if err != nil { - fmt.Printf("Failed to get OpenTelemetry operator deployment: %s\n", err) - return false, nil - } - return true, nil - }) - - if err != nil { - fmt.Println(err) - } - fmt.Println("OpenTelemetry Operator deployment is created. Now checking if it if fully operational.") - - // Sometimes, the deployment of the OTEL Operator is ready but, when - // creating new instances of the OTEL Collector, the webhook is not reachable - // and kubectl apply fails. This code deployes an OTEL Collector instance - // until success (or timeout) - collectorInstance := otelv1alpha1.OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Name: "operator-check", - Namespace: "default", - }, - } - - // Ensure the collector is not there before the check - _ = clusterClient.Delete(context.Background(), &collectorInstance) - - fmt.Println("Check if the OpenTelemetry collector CR can be created.") - collectorCtx := context.Background() - err = wait.PollUntilContextTimeout(collectorCtx, pollInterval, timeoutPoll, false, func(c context.Context) (done bool, err error) { - err = clusterClient.Create( - c, - &collectorInstance, - ) - if err != nil { - fmt.Printf("failed: to create OpenTelemetry collector CR %s\n", err) - return false, nil - } - return true, nil - }) - - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - if err := clusterClient.Delete(context.Background(), &collectorInstance); err != nil { - fmt.Printf("Failed to delete OpenTelemetry collector CR: %s\n", err) - os.Exit(1) - } - - fmt.Println("OpenTelemetry operator is ready.") -} diff --git a/hack/ignore-createdAt-bundle.sh b/hack/ignore-createdAt-bundle.sh deleted file mode 100755 index d94a30a47..000000000 --- a/hack/ignore-createdAt-bundle.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Since operator-sdk 1.26.0, `make bundle` changes the `createdAt` field from the bundle -# even if it is patched: -# https://github.com/operator-framework/operator-sdk/pull/6136 -# This code checks if only the createdAt field. If is the only change, it is ignored. -# Else, it will do nothing. -# https://github.com/operator-framework/operator-sdk/issues/6285#issuecomment-1415350333 -git diff --quiet -I'^ createdAt: ' bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml -ret=$? -changes=$(git diff --numstat bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml) -if [ $ret = 0 ] && [ "$changes" = '1 1 bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml' ] ; then - git checkout bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml -fi diff --git a/hack/install-kuttl.sh b/hack/install-kuttl.sh deleted file mode 100755 index 94326b52c..000000000 --- a/hack/install-kuttl.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo curl -Lo /usr/local/bin/kubectl-kuttl https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 -sudo chmod +x /usr/local/bin/kubectl-kuttl -export PATH=$PATH:/usr/local/bin diff --git a/hack/install-metrics-server.sh b/hack/install-metrics-server.sh deleted file mode 100755 index e217a3d34..000000000 --- a/hack/install-metrics-server.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Install metrics-server on kind clusters for autoscale tests. -# Note: This is not needed for minikube, -# you can just add --addons "metrics-server" to the start command. - - -if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then - echo "Connected to an OpenShift cluster. metrics-server installation is not needed" -elif [[ "$(kubectl get deployment metrics-server -n kube-system 2>&1 )" =~ "NotFound" ]]; then - kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml - kubectl patch deployment -n kube-system metrics-server --type "json" -p '[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": --kubelet-insecure-tls}]' - kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=5m -else - echo "metrics-server is installed. Skipping installation" -fi diff --git a/hack/install-prometheus-operator.sh b/hack/install-prometheus-operator.sh deleted file mode 100755 index 3809e9f15..000000000 --- a/hack/install-prometheus-operator.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [[ "$(kubectl api-resources --api-group=monitoring.coreos.com -o name)" ]]; then - echo "Prometheus CRDs are there" -else - kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml -fi diff --git a/hack/install-targetallocator-prometheus-crds.sh b/hack/install-targetallocator-prometheus-crds.sh deleted file mode 100755 index a905925eb..000000000 --- a/hack/install-targetallocator-prometheus-crds.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [[ "$(kubectl api-resources --api-group=monitoring.coreos.com -o name)" ]]; then - echo "Prometheus CRDs are there" -else - kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml - kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml -fi diff --git a/hack/modify-test-images.sh b/hack/modify-test-images.sh deleted file mode 100755 index 4f069470a..000000000 --- a/hack/modify-test-images.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -SED_BIN=${SED_BIN:-sed} - -DEFAULT_TARGETALLOCATOR_IMG=${DEFAULT_TARGETALLOCATOR_IMG:-local/opentelemetry-operator-targetallocator:e2e} -DEFAULT_OPERATOROPAMPBRIDGE_IMG=${DEFAULT_OPERATOROPAMPBRIDGE_IMG:-local/opentelemetry-operator-opamp-bridge:e2e} -DEFAULT_OPERATOR_IMG=${DEFAULT_OPERATOR_IMG:-local/opentelemetry-operator:e2e} - -${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/smoke-targetallocator/*.yaml -${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-features/00-install.yaml -${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/prometheus-config-validation/*.yaml -${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e/targetallocator-prometheuscr/*.yaml -${SED_BIN} -i "s#${DEFAULT_TARGETALLOCATOR_IMG}#${TARGETALLOCATOR_IMG}#g" tests/e2e-prometheuscr/create-sm-prometheus-exporters/*.yaml - -${SED_BIN} -i "s#${DEFAULT_OPERATOR_IMG}#${OPERATOR_IMG}#g" tests/e2e-multi-instrumentation/*.yaml - -${SED_BIN} -i "s#${DEFAULT_OPERATOROPAMPBRIDGE_IMG}#${OPERATOROPAMPBRIDGE_IMG}#g" tests/e2e-opampbridge/opampbridge/*.yaml diff --git a/header.txt b/header.txt deleted file mode 100644 index 3881885f3..000000000 --- a/header.txt +++ /dev/null @@ -1,13 +0,0 @@ -Copyright The OpenTelemetry Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/internal/autodetect/main.go b/internal/autodetect/main.go index fb71adaa3..e0c36bb93 100644 --- a/internal/autodetect/main.go +++ b/internal/autodetect/main.go @@ -19,7 +19,7 @@ import ( "k8s.io/client-go/discovery" "k8s.io/client-go/rest" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" ) var _ AutoDetect = (*autoDetect)(nil) diff --git a/internal/autodetect/main_test.go b/internal/autodetect/main_test.go index 6c18eee59..048f7b29d 100644 --- a/internal/autodetect/main_test.go +++ b/internal/autodetect/main_test.go @@ -25,8 +25,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" ) func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { diff --git a/internal/config/main.go b/internal/config/main.go index 8c16226d6..c0100333c 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -21,9 +21,9 @@ import ( "github.com/go-logr/logr" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) const ( diff --git a/internal/config/main_test.go b/internal/config/main_test.go index 44345bdf5..c387de968 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -20,9 +20,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) func TestNewConfig(t *testing.T) { diff --git a/internal/config/options.go b/internal/config/options.go index 225692cec..9b8f678c2 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -20,9 +20,9 @@ import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) // Option represents one specific configuration option. diff --git a/internal/manifests/collector/adapters/config_from_test.go b/internal/manifests/collector/adapters/config_from_test.go index 809938708..26c23d87c 100644 --- a/internal/manifests/collector/adapters/config_from_test.go +++ b/internal/manifests/collector/adapters/config_from_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) func TestInvalidYAML(t *testing.T) { diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index a4cffde4d..d8540247e 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -25,9 +25,9 @@ import ( "github.com/mitchellh/mapstructure" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - exporterParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/exporter" - receiverParser "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + exporterParser "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/exporter" + receiverParser "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" ) type ComponentType int diff --git a/internal/manifests/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go index 7c872606f..4db9d987d 100644 --- a/internal/manifests/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -25,9 +25,9 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/collector/annotations.go b/internal/manifests/collector/annotations.go index 95d25f71d..9e651de3a 100644 --- a/internal/manifests/collector/annotations.go +++ b/internal/manifests/collector/annotations.go @@ -18,7 +18,7 @@ import ( "crypto/sha256" "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // Annotations return the annotations for OpenTelemetryCollector pod. diff --git a/internal/manifests/collector/annotations_test.go b/internal/manifests/collector/annotations_test.go index ade8f7fba..1cfcf6694 100644 --- a/internal/manifests/collector/annotations_test.go +++ b/internal/manifests/collector/annotations_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestDefaultAnnotations(t *testing.T) { diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 31a0c3a8e..047195a1c 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -17,9 +17,9 @@ package collector import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) const ( diff --git a/internal/manifests/collector/config_replace.go b/internal/manifests/collector/config_replace.go index c6cc58ad4..4ce58c39a 100644 --- a/internal/manifests/collector/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -21,11 +21,11 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) type targetAllocator struct { diff --git a/internal/manifests/collector/config_replace_test.go b/internal/manifests/collector/config_replace_test.go index c7ab76750..e551d4150 100644 --- a/internal/manifests/collector/config_replace_test.go +++ b/internal/manifests/collector/config_replace_test.go @@ -24,8 +24,8 @@ import ( colfeaturegate "go.opentelemetry.io/collector/featuregate" "gopkg.in/yaml.v2" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) func TestPrometheusParser(t *testing.T) { diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 58ee4c131..523f5ebf5 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -18,9 +18,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 9d60763ee..072bf7004 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) func TestDesiredConfigMap(t *testing.T) { diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index e347d0ce5..11c5094d2 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -25,10 +25,10 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/validation" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // maxPortLen allows us to truncate a port name according to what is considered valid port syntax: diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index 5857798f2..f2cb33b25 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -24,9 +24,9 @@ import ( "k8s.io/apimachinery/pkg/api/resource" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index 8566ee082..c6c1ad853 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -19,9 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // DaemonSet builds the deployment for the given instance. diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index 656591e6d..84cd57cd7 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -23,10 +23,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestDaemonSetNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index 3a1b0abf2..d5e5f2593 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -19,9 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Deployment builds the deployment for the given instance. diff --git a/internal/manifests/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go index baa66f42a..9b2150a8a 100644 --- a/internal/manifests/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -21,10 +21,10 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) var testTolerationValues = []v1.Toleration{ diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index 0a4bdefcc..5f51b509a 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -20,10 +20,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func HorizontalPodAutoscaler(params manifests.Params) client.Object { diff --git a/internal/manifests/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go index 8e9236068..7adcd5d03 100644 --- a/internal/manifests/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -22,10 +22,10 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestHPA(t *testing.T) { diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index 4bb692ff9..e22c04aed 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -22,10 +22,10 @@ import ( networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func Ingress(params manifests.Params) (*networkingv1.Ingress, error) { diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index 40a3fa4dd..a8ce01a3b 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -23,11 +23,11 @@ import ( networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) const testFileIngress = "testdata/ingress_testdata.yaml" diff --git a/internal/manifests/collector/parser/exporter/exporter.go b/internal/manifests/collector/parser/exporter/exporter.go index 93c66b859..0b7d26842 100644 --- a/internal/manifests/collector/parser/exporter/exporter.go +++ b/internal/manifests/collector/parser/exporter/exporter.go @@ -25,8 +25,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // registry holds a record of all known exporter parsers. diff --git a/internal/manifests/collector/parser/exporter/exporter_prometheus.go b/internal/manifests/collector/parser/exporter/exporter_prometheus.go index 61d58588d..02a0cdd9d 100644 --- a/internal/manifests/collector/parser/exporter/exporter_prometheus.go +++ b/internal/manifests/collector/parser/exporter/exporter_prometheus.go @@ -19,8 +19,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var _ parser.ComponentPortParser = &PrometheusExporterParser{} diff --git a/internal/manifests/collector/parser/receiver/receiver.go b/internal/manifests/collector/parser/receiver/receiver.go index 97147658f..4990f2ea4 100644 --- a/internal/manifests/collector/parser/receiver/receiver.go +++ b/internal/manifests/collector/parser/receiver/receiver.go @@ -26,8 +26,8 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // registry holds a record of all known receiver parsers. diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go index 44618b3aa..abe0c6798 100644 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameAWSXRAY = "__awsxray" diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon.go b/internal/manifests/collector/parser/receiver/receiver_carbon.go index b1b0aaa4c..8e2d8f8a8 100644 --- a/internal/manifests/collector/parser/receiver/receiver_carbon.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameCarbon = "__carbon" diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd.go b/internal/manifests/collector/parser/receiver/receiver_collectd.go index aa42ab039..d7ac3ab73 100644 --- a/internal/manifests/collector/parser/receiver/receiver_collectd.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameCollectd = "__collectd" diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go index 88881923f..4c17a0c54 100644 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameFluentForward = "__fluentforward" diff --git a/internal/manifests/collector/parser/receiver/receiver_generic.go b/internal/manifests/collector/parser/receiver/receiver_generic.go index 864b5bb11..f446da4ab 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic.go @@ -18,8 +18,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) const parserNameGeneric = "__generic" diff --git a/internal/manifests/collector/parser/receiver/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go index 1adfcf12d..987713cee 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser/receiver" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb.go b/internal/manifests/collector/parser/receiver/receiver_influxdb.go index 0930a29f7..caff265a4 100644 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameInfluxdb = "__influxdb" diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger.go b/internal/manifests/collector/parser/receiver/receiver_jaeger.go index dcc99d8bd..b20315aa8 100644 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger.go @@ -20,8 +20,8 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var _ parser.ComponentPortParser = &JaegerReceiverParser{} diff --git a/internal/manifests/collector/parser/receiver/receiver_loki.go b/internal/manifests/collector/parser/receiver/receiver_loki.go index 6cdac8135..bdecadc07 100644 --- a/internal/manifests/collector/parser/receiver/receiver_loki.go +++ b/internal/manifests/collector/parser/receiver/receiver_loki.go @@ -21,8 +21,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var _ parser.ComponentPortParser = &LokiReceiverParser{} diff --git a/internal/manifests/collector/parser/receiver/receiver_oc.go b/internal/manifests/collector/parser/receiver/receiver_oc.go index 3463a8d39..4fcbf6800 100644 --- a/internal/manifests/collector/parser/receiver/receiver_oc.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameOpenCensus = "__opencensus" diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp.go b/internal/manifests/collector/parser/receiver/receiver_otlp.go index 68972fd95..c616761d8 100644 --- a/internal/manifests/collector/parser/receiver/receiver_otlp.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp.go @@ -21,8 +21,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var _ parser.ComponentPortParser = &OTLPReceiverParser{} diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm.go b/internal/manifests/collector/parser/receiver/receiver_sapm.go index 924b88bff..0b58ba461 100644 --- a/internal/manifests/collector/parser/receiver/receiver_sapm.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameSAPM = "__sapm" diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx.go b/internal/manifests/collector/parser/receiver/receiver_signalfx.go index 549e80245..7285f4694 100644 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameSignalFx = "__signalfx" diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking.go b/internal/manifests/collector/parser/receiver/receiver_skywalking.go index 9b72847ee..6bccb9872 100644 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking.go @@ -21,8 +21,8 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var _ parser.ComponentPortParser = &SkywalkingReceiverParser{} diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go index 676415334..fda9d466d 100644 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameSplunkHec = "__splunk_hec" diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd.go b/internal/manifests/collector/parser/receiver/receiver_statsd.go index 0f41520e2..24d8dfa9c 100644 --- a/internal/manifests/collector/parser/receiver/receiver_statsd.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameStatsd = "__statsd" diff --git a/internal/manifests/collector/parser/receiver/receiver_test.go b/internal/manifests/collector/parser/receiver/receiver_test.go index 44cb04519..a224364e9 100644 --- a/internal/manifests/collector/parser/receiver/receiver_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_test.go @@ -22,8 +22,8 @@ import ( corev1 "k8s.io/api/core/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront.go b/internal/manifests/collector/parser/receiver/receiver_wavefront.go index f2eafb855..bfda3b7c7 100644 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameWavefront = "__wavefront" diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go index 8f8d9fe21..83c111792 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go @@ -17,7 +17,7 @@ package receiver import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameZipkinScribe = "__zipkinscribe" diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin.go b/internal/manifests/collector/parser/receiver/receiver_zipkin.go index debbf8e9a..ec5f46c57 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin.go @@ -18,7 +18,7 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/parser" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" ) const parserNameZipkin = "__zipkin" diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go index 096cd1f6c..5366f1690 100644 --- a/internal/manifests/collector/poddisruptionbudget.go +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -18,9 +18,9 @@ import ( policyV1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func PodDisruptionBudget(params manifests.Params) *policyV1.PodDisruptionBudget { diff --git a/internal/manifests/collector/poddisruptionbudget_test.go b/internal/manifests/collector/poddisruptionbudget_test.go index de296aa67..64fcffb9c 100644 --- a/internal/manifests/collector/poddisruptionbudget_test.go +++ b/internal/manifests/collector/poddisruptionbudget_test.go @@ -21,10 +21,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestPDB(t *testing.T) { diff --git a/internal/manifests/collector/podmonitor.go b/internal/manifests/collector/podmonitor.go index 428d2673a..335cfd039 100644 --- a/internal/manifests/collector/podmonitor.go +++ b/internal/manifests/collector/podmonitor.go @@ -22,10 +22,10 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // ServiceMonitor returns the service monitor for the given instance. diff --git a/internal/manifests/collector/podmonitor_test.go b/internal/manifests/collector/podmonitor_test.go index 9066b50cb..ed4d7240a 100644 --- a/internal/manifests/collector/podmonitor_test.go +++ b/internal/manifests/collector/podmonitor_test.go @@ -17,8 +17,8 @@ package collector import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/stretchr/testify/assert" diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index 43901e59b..90e8a4bf0 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -21,10 +21,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func Routes(params manifests.Params) ([]*routev1.Route, error) { diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 12104a125..2301a5948 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -25,10 +25,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func TestDesiredRoutes(t *testing.T) { diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 5b23888fb..e3710b07f 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -22,11 +22,11 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // headless label is to differentiate the headless service from the clusterIP service. diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index 37bd668e8..e6679cad7 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -21,11 +21,11 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) func TestExtractPortNumbersAndNames(t *testing.T) { diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index a3648a593..7c59b23da 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -18,10 +18,10 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. diff --git a/internal/manifests/collector/serviceaccount_test.go b/internal/manifests/collector/serviceaccount_test.go index 6d9abafe2..51bfc81aa 100644 --- a/internal/manifests/collector/serviceaccount_test.go +++ b/internal/manifests/collector/serviceaccount_test.go @@ -20,8 +20,8 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestServiceAccountNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index db5dcd34d..35bf05b5f 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -22,10 +22,10 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // ServiceMonitor returns the service monitor for the given instance. diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index a08304807..481c87179 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -19,9 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // StatefulSet builds the statefulset for the given instance. diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index 142f87004..a4510b47f 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -24,10 +24,10 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestStatefulSetNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index fd5e27585..306c687b9 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -25,10 +25,10 @@ import ( "k8s.io/client-go/tools/record" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect/openshift" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) var ( @@ -64,7 +64,7 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { UID: instanceUID, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", Ports: []v1.ServicePort{{ Name: "web", Port: 80, diff --git a/internal/manifests/collector/utils.go b/internal/manifests/collector/utils.go index 36d683345..718bc07e3 100644 --- a/internal/manifests/collector/utils.go +++ b/internal/manifests/collector/utils.go @@ -17,7 +17,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func getDNSPolicy(otelcol v1alpha1.OpenTelemetryCollector) corev1.DNSPolicy { diff --git a/internal/manifests/collector/volume.go b/internal/manifests/collector/volume.go index 6b014eba8..ac40a3521 100644 --- a/internal/manifests/collector/volume.go +++ b/internal/manifests/collector/volume.go @@ -18,9 +18,9 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Volumes builds the volumes for the given instance, including the config map volume. diff --git a/internal/manifests/collector/volume_test.go b/internal/manifests/collector/volume_test.go index 6232b39c4..c4c71b355 100644 --- a/internal/manifests/collector/volume_test.go +++ b/internal/manifests/collector/volume_test.go @@ -20,10 +20,10 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func TestVolumeNewDefault(t *testing.T) { diff --git a/internal/manifests/collector/volumeclaim.go b/internal/manifests/collector/volumeclaim.go index c641a3831..dd906a222 100644 --- a/internal/manifests/collector/volumeclaim.go +++ b/internal/manifests/collector/volumeclaim.go @@ -18,7 +18,7 @@ package collector import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // VolumeClaimTemplates builds the volumeClaimTemplates for the given instance, diff --git a/internal/manifests/collector/volumeclaim_test.go b/internal/manifests/collector/volumeclaim_test.go index 70db04abb..2483b2b5d 100644 --- a/internal/manifests/collector/volumeclaim_test.go +++ b/internal/manifests/collector/volumeclaim_test.go @@ -22,8 +22,8 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - . "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" ) func TestVolumeClaimAllowsUserToAdd(t *testing.T) { diff --git a/internal/manifests/manifestutils/labels.go b/internal/manifests/manifestutils/labels.go index cfcf3d243..53012aa37 100644 --- a/internal/manifests/manifestutils/labels.go +++ b/internal/manifests/manifestutils/labels.go @@ -20,7 +20,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func isFilteredLabel(label string, filterLabels []string) bool { diff --git a/internal/manifests/manifestutils/labels_test.go b/internal/manifests/manifestutils/labels_test.go index 4a0bd794d..bc2a6cd43 100644 --- a/internal/manifests/manifestutils/labels_test.go +++ b/internal/manifests/manifestutils/labels_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( @@ -36,7 +36,7 @@ func TestLabelsCommonSet(t *testing.T) { Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", }, } @@ -56,7 +56,7 @@ func TestLabelsSha256Set(t *testing.T) { Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", }, } @@ -75,7 +75,7 @@ func TestLabelsSha256Set(t *testing.T) { Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.81.0@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.81.0@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", }, } @@ -95,7 +95,7 @@ func TestLabelsTagUnset(t *testing.T) { Namespace: collectorNamespace, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", }, } @@ -118,7 +118,7 @@ func TestLabelsPropagateDown(t *testing.T) { }, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", }, } @@ -137,7 +137,7 @@ func TestLabelsFilter(t *testing.T) { Labels: map[string]string{"test.bar.io": "foo", "test.foo.io": "bar"}, }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", }, } diff --git a/internal/manifests/opampbridge/configmap.go b/internal/manifests/opampbridge/configmap.go index 9f16ef5a6..221106e75 100644 --- a/internal/manifests/opampbridge/configmap.go +++ b/internal/manifests/opampbridge/configmap.go @@ -22,9 +22,9 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go index 221bd275d..d1dd8cb69 100644 --- a/internal/manifests/opampbridge/configmap_test.go +++ b/internal/manifests/opampbridge/configmap_test.go @@ -19,9 +19,9 @@ import ( "testing" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/stretchr/testify/assert" ) @@ -69,7 +69,7 @@ headers: Namespace: "my-namespace", }, Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:0.69.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/operator-opamp-bridge:0.69.0", Endpoint: "ws://opamp-server:4320/v1/opamp", Headers: map[string]string{"authorization": "access-12345-token"}, Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ diff --git a/internal/manifests/opampbridge/container.go b/internal/manifests/opampbridge/container.go index 131eb040d..fa94ee55c 100644 --- a/internal/manifests/opampbridge/container.go +++ b/internal/manifests/opampbridge/container.go @@ -19,9 +19,9 @@ import ( "github.com/operator-framework/operator-lib/proxy" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Container builds a container for the given OpAMPBridge. diff --git a/internal/manifests/opampbridge/container_test.go b/internal/manifests/opampbridge/container_test.go index 03f87d9cf..cd0db649e 100644 --- a/internal/manifests/opampbridge/container_test.go +++ b/internal/manifests/opampbridge/container_test.go @@ -20,9 +20,9 @@ import ( "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/opampbridge/deployment.go b/internal/manifests/opampbridge/deployment.go index 81c1e908a..d58914b5c 100644 --- a/internal/manifests/opampbridge/deployment.go +++ b/internal/manifests/opampbridge/deployment.go @@ -19,9 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Deployment builds the deployment for the given instance. diff --git a/internal/manifests/opampbridge/deployment_test.go b/internal/manifests/opampbridge/deployment_test.go index 4ec3f07de..59c7be112 100644 --- a/internal/manifests/opampbridge/deployment_test.go +++ b/internal/manifests/opampbridge/deployment_test.go @@ -21,9 +21,9 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) var testTolerationValues = []v1.Toleration{ diff --git a/internal/manifests/opampbridge/opampbridge.go b/internal/manifests/opampbridge/opampbridge.go index 5e8573b11..2419b1050 100644 --- a/internal/manifests/opampbridge/opampbridge.go +++ b/internal/manifests/opampbridge/opampbridge.go @@ -17,7 +17,7 @@ package opampbridge import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) const ( diff --git a/internal/manifests/opampbridge/service.go b/internal/manifests/opampbridge/service.go index 0c2a7dd9a..17e1d22d4 100644 --- a/internal/manifests/opampbridge/service.go +++ b/internal/manifests/opampbridge/service.go @@ -19,9 +19,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func Service(params manifests.Params) *corev1.Service { diff --git a/internal/manifests/opampbridge/serviceaccount.go b/internal/manifests/opampbridge/serviceaccount.go index f5b023692..c0cef4052 100644 --- a/internal/manifests/opampbridge/serviceaccount.go +++ b/internal/manifests/opampbridge/serviceaccount.go @@ -18,10 +18,10 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. diff --git a/internal/manifests/opampbridge/serviceaccount_test.go b/internal/manifests/opampbridge/serviceaccount_test.go index e3f6c7e05..464f83c4a 100644 --- a/internal/manifests/opampbridge/serviceaccount_test.go +++ b/internal/manifests/opampbridge/serviceaccount_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestServiceAccountNewDefault(t *testing.T) { diff --git a/internal/manifests/opampbridge/utils.go b/internal/manifests/opampbridge/utils.go index 2400e0101..ef8119964 100644 --- a/internal/manifests/opampbridge/utils.go +++ b/internal/manifests/opampbridge/utils.go @@ -17,7 +17,7 @@ package opampbridge import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func getDNSPolicy(opampBridge v1alpha1.OpAMPBridge) corev1.DNSPolicy { diff --git a/internal/manifests/opampbridge/volume.go b/internal/manifests/opampbridge/volume.go index eac9d5081..c5b1814e3 100644 --- a/internal/manifests/opampbridge/volume.go +++ b/internal/manifests/opampbridge/volume.go @@ -17,9 +17,9 @@ package opampbridge import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Volumes builds the volumes for the given instance, including the config map volume. diff --git a/internal/manifests/opampbridge/volume_test.go b/internal/manifests/opampbridge/volume_test.go index 17fefb3d5..bd33a5e64 100644 --- a/internal/manifests/opampbridge/volume_test.go +++ b/internal/manifests/opampbridge/volume_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func TestVolumeNewDefault(t *testing.T) { diff --git a/internal/manifests/params.go b/internal/manifests/params.go index a7b377e4f..3c331abad 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -20,8 +20,8 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) // Params holds the reconciliation-specific parameters. diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config.go b/internal/manifests/targetallocator/adapters/config_to_prom_config.go index 139901daa..84081906b 100644 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config.go @@ -21,7 +21,7 @@ import ( "regexp" "strings" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) func errorNoComponent(component string) error { diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go index cef21dca1..8cc56ab1e 100644 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - ta "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" + ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" "github.com/stretchr/testify/assert" ) diff --git a/internal/manifests/targetallocator/annotations.go b/internal/manifests/targetallocator/annotations.go index 72e648e5b..91be43b27 100644 --- a/internal/manifests/targetallocator/annotations.go +++ b/internal/manifests/targetallocator/annotations.go @@ -20,7 +20,7 @@ import ( v1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const configMapHashAnnotationKey = "opentelemetry-targetallocator-config/hash" diff --git a/internal/manifests/targetallocator/annotations_test.go b/internal/manifests/targetallocator/annotations_test.go index f50a9d77f..d16fdca4e 100644 --- a/internal/manifests/targetallocator/annotations_test.go +++ b/internal/manifests/targetallocator/annotations_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) func TestPodAnnotations(t *testing.T) { diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index ca267c708..01d0002bd 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -19,12 +19,12 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/targetallocator/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) const ( diff --git a/internal/manifests/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go index 8baa20240..0f300a20a 100644 --- a/internal/manifests/targetallocator/configmap_test.go +++ b/internal/manifests/targetallocator/configmap_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) func TestDesiredConfigMap(t *testing.T) { diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 979a2d8d5..3c078b8a9 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -20,9 +20,9 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Container builds a container for the given TargetAllocator. diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 91a2b93a1..405a096b9 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -25,9 +25,9 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index 820aa8de9..10c798e60 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -19,8 +19,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Deployment builds the deployment for the given instance. diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index c91e442e1..ac6970520 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -23,9 +23,9 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) var testTolerationValues = []v1.Toleration{ @@ -185,10 +185,10 @@ func collectorInstance() v1alpha1.OpenTelemetryCollector { Namespace: "default", }, Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.47.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", Config: string(configYAML), TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-targetallocator:0.47.0", + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-targetallocator:0.47.0", }, }, } diff --git a/internal/manifests/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go index 6271ebb6e..e69159b2a 100644 --- a/internal/manifests/targetallocator/labels.go +++ b/internal/manifests/targetallocator/labels.go @@ -15,9 +15,9 @@ package targetallocator import ( - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. diff --git a/internal/manifests/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go index d6f1891d1..a59e3d0a5 100644 --- a/internal/manifests/targetallocator/labels_test.go +++ b/internal/manifests/targetallocator/labels_test.go @@ -20,8 +20,8 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) const ( diff --git a/internal/manifests/targetallocator/poddisruptionbudget.go b/internal/manifests/targetallocator/poddisruptionbudget.go index f7d5d21a5..cc293f5a4 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget.go +++ b/internal/manifests/targetallocator/poddisruptionbudget.go @@ -17,9 +17,9 @@ package targetallocator import ( "fmt" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" policyV1 "k8s.io/api/policy/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/manifests/targetallocator/poddisruptionbudget_test.go b/internal/manifests/targetallocator/poddisruptionbudget_test.go index 7547058ea..39de4d691 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget_test.go +++ b/internal/manifests/targetallocator/poddisruptionbudget_test.go @@ -21,9 +21,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) type test struct { diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go index 8238c0032..b80ca6aa7 100644 --- a/internal/manifests/targetallocator/service.go +++ b/internal/manifests/targetallocator/service.go @@ -19,8 +19,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func Service(params manifests.Params) *corev1.Service { diff --git a/internal/manifests/targetallocator/service_test.go b/internal/manifests/targetallocator/service_test.go index ad0676147..0c1d85d69 100644 --- a/internal/manifests/targetallocator/service_test.go +++ b/internal/manifests/targetallocator/service_test.go @@ -21,8 +21,8 @@ import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) func TestServicePorts(t *testing.T) { diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go index 96477b7e7..af9220d37 100644 --- a/internal/manifests/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -18,10 +18,10 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. diff --git a/internal/manifests/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go index 99e5b4276..742207c20 100644 --- a/internal/manifests/targetallocator/serviceaccount_test.go +++ b/internal/manifests/targetallocator/serviceaccount_test.go @@ -21,8 +21,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) func TestServiceAccountDefaultName(t *testing.T) { diff --git a/internal/manifests/targetallocator/servicemonitor.go b/internal/manifests/targetallocator/servicemonitor.go index 6f5c94c41..367185b43 100644 --- a/internal/manifests/targetallocator/servicemonitor.go +++ b/internal/manifests/targetallocator/servicemonitor.go @@ -18,8 +18,8 @@ import ( monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // ServiceMonitor returns the service monitor for the given instance. diff --git a/internal/manifests/targetallocator/servicemonitor_test.go b/internal/manifests/targetallocator/servicemonitor_test.go index 1544eac03..f5989be30 100644 --- a/internal/manifests/targetallocator/servicemonitor_test.go +++ b/internal/manifests/targetallocator/servicemonitor_test.go @@ -20,9 +20,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/stretchr/testify/assert" ) diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 3df413556..4e9c1dfb1 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -17,8 +17,8 @@ package targetallocator import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) const ( diff --git a/internal/manifests/targetallocator/volume.go b/internal/manifests/targetallocator/volume.go index 8200b00d3..d4af24c2c 100644 --- a/internal/manifests/targetallocator/volume.go +++ b/internal/manifests/targetallocator/volume.go @@ -17,9 +17,9 @@ package targetallocator import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) // Volumes builds the volumes for the given instance, including the config map volume. diff --git a/internal/manifests/targetallocator/volume_test.go b/internal/manifests/targetallocator/volume_test.go index 0b50006e4..3f7678785 100644 --- a/internal/manifests/targetallocator/volume_test.go +++ b/internal/manifests/targetallocator/volume_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func TestVolumeNewDefault(t *testing.T) { diff --git a/internal/status/collector/collector.go b/internal/status/collector/collector.go index cdebae02d..27337e793 100644 --- a/internal/status/collector/collector.go +++ b/internal/status/collector/collector.go @@ -23,11 +23,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/manifestutils" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpenTelemetryCollector) error { diff --git a/internal/status/collector/handle.go b/internal/status/collector/handle.go index b20b03d24..f01049aa0 100644 --- a/internal/status/collector/handle.go +++ b/internal/status/collector/handle.go @@ -22,9 +22,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + collectorupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) const ( @@ -37,7 +37,7 @@ const ( ) // HandleReconcileStatus handles updating the status of the CRDs managed by the operator. -// TODO: make the status more useful https://github.com/open-telemetry/opentelemetry-operator/issues/1972 +// TODO: make the status more useful https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1972 func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { log.V(2).Info("updating collector status") if err != nil { diff --git a/internal/status/opampbridge/handle.go b/internal/status/opampbridge/handle.go index 18e571990..809bc52ce 100644 --- a/internal/status/opampbridge/handle.go +++ b/internal/status/opampbridge/handle.go @@ -22,7 +22,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" ) const ( @@ -35,7 +35,7 @@ const ( ) // HandleReconcileStatus handles updating the status of the CRDs managed by the operator. -// TODO: make the status more useful https://github.com/open-telemetry/opentelemetry-operator/issues/1972 +// TODO: make the status more useful https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1972 func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { log.V(2).Info("updating opampbridge status") if err != nil { diff --git a/internal/status/opampbridge/opampbridge.go b/internal/status/opampbridge/opampbridge.go index d09bfbf8a..35986f132 100644 --- a/internal/status/opampbridge/opampbridge.go +++ b/internal/status/opampbridge/opampbridge.go @@ -19,8 +19,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) func UpdateOpAMPBridgeStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpAMPBridge) error { diff --git a/internal/webhook/podmutation/webhookhandler.go b/internal/webhook/podmutation/webhookhandler.go index 9d9fa6e74..d8d861855 100644 --- a/internal/webhook/podmutation/webhookhandler.go +++ b/internal/webhook/podmutation/webhookhandler.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) // +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1 diff --git a/internal/webhook/podmutation/webhookhandler_suite_test.go b/internal/webhook/podmutation/webhookhandler_suite_test.go index 05f6c062b..7769916eb 100644 --- a/internal/webhook/podmutation/webhookhandler_suite_test.go +++ b/internal/webhook/podmutation/webhookhandler_suite_test.go @@ -36,8 +36,8 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" // +kubebuilder:scaffold:imports ) diff --git a/internal/webhook/podmutation/webhookhandler_test.go b/internal/webhook/podmutation/webhookhandler_test.go index 0adbc2b92..a11f3d763 100644 --- a/internal/webhook/podmutation/webhookhandler_test.go +++ b/internal/webhook/podmutation/webhookhandler_test.go @@ -30,11 +30,11 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" - . "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" - "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + . "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/sidecar" ) var logger = logf.Log.WithName("unit-tests") diff --git a/internal/webhookhandler/webhookhandler.go b/internal/webhookhandler/webhookhandler.go deleted file mode 100644 index b76cc92c0..000000000 --- a/internal/webhookhandler/webhookhandler.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package webhookhandler contains the webhook that injects sidecars into pods. -package webhookhandler - -import ( - "context" - "encoding/json" - "net/http" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" -) - -// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch -// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,verbs=get;list;watch -// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=instrumentations,verbs=get;list;watch -// +kubebuilder:rbac:groups="apps",resources=replicasets,verbs=get;list;watch - -var _ WebhookHandler = (*podSidecarInjector)(nil) - -// WebhookHandler is a webhook handler that analyzes new pods and injects appropriate sidecars into it. -type WebhookHandler interface { - admission.Handler -} - -// the implementation. -type podSidecarInjector struct { - client client.Client - decoder *admission.Decoder - logger logr.Logger - podMutators []PodMutator - config config.Config -} - -// PodMutator mutates a pod. -type PodMutator interface { - Mutate(ctx context.Context, ns corev1.Namespace, pod corev1.Pod) (corev1.Pod, error) -} - -// NewWebhookHandler creates a new WebhookHandler. -func NewWebhookHandler(cfg config.Config, logger logr.Logger, decoder *admission.Decoder, cl client.Client, podMutators []PodMutator) WebhookHandler { - return &podSidecarInjector{ - config: cfg, - decoder: decoder, - logger: logger, - client: cl, - podMutators: podMutators, - } -} - -func (p *podSidecarInjector) Handle(ctx context.Context, req admission.Request) admission.Response { - pod := corev1.Pod{} - err := p.decoder.Decode(req, &pod) - if err != nil { - return admission.Errored(http.StatusBadRequest, err) - } - - // we use the req.Namespace here because the pod might have not been created yet - ns := corev1.Namespace{} - err = p.client.Get(ctx, types.NamespacedName{Name: req.Namespace, Namespace: ""}, &ns) - if err != nil { - res := admission.Errored(http.StatusInternalServerError, err) - // By default, admission.Errored sets Allowed to false which blocks pod creation even though the failurePolicy=ignore. - // Allowed set to true makes sure failure does not block pod creation in case of an error. - // Using the http.StatusInternalServerError creates a k8s event associated with the replica set. - // The admission.Allowed("").WithWarnings(err.Error()) or http.StatusBadRequest does not - // create any event. Additionally, an event/log cannot be created explicitly because the pod name is not known. - res.Allowed = true - return res - } - - for _, m := range p.podMutators { - pod, err = m.Mutate(ctx, ns, pod) - if err != nil { - res := admission.Errored(http.StatusInternalServerError, err) - res.Allowed = true - return res - } - } - - marshaledPod, err := json.Marshal(pod) - if err != nil { - res := admission.Errored(http.StatusInternalServerError, err) - res.Allowed = true - return res - } - return admission.PatchResponseFromRaw(req.Object.Raw, marshaledPod) -} diff --git a/internal/webhookhandler/webhookhandler_suite_test.go b/internal/webhookhandler/webhookhandler_suite_test.go deleted file mode 100644 index 018596108..000000000 --- a/internal/webhookhandler/webhookhandler_suite_test.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package webhookhandler_test - -import ( - "context" - "crypto/tls" - "fmt" - "net" - "os" - "path/filepath" - "sync" - "testing" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "k8s.io/client-go/util/retry" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - // +kubebuilder:scaffold:imports -) - -var ( - k8sClient client.Client - testEnv *envtest.Environment - testScheme *runtime.Scheme = scheme.Scheme - ctx context.Context - cancel context.CancelFunc - err error - cfg *rest.Config -) - -func TestMain(m *testing.M) { - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "config", "webhook")}, - }, - } - cfg, err = testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err = v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - LeaderElection: false, - MetricsBindAddress: "0", - }) - if mgrErr != nil { - fmt.Printf("failed to start webhook server: %v", mgrErr) - os.Exit(1) - } - - if err = (&v1alpha1.AmazonCloudWatchAgent{}).SetupWebhookWithManager(mgr); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - go func() { - if err = mgr.Start(ctx); err != nil { - fmt.Printf("failed to start manager: %v", err) - os.Exit(1) - } - }() - - // wait for the webhook server to get ready - wg := &sync.WaitGroup{} - wg.Add(1) - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - go func(wg *sync.WaitGroup) { - defer wg.Done() - if err = retry.OnError(wait.Backoff{ - Steps: 20, - Duration: 10 * time.Millisecond, - Factor: 1.5, - Jitter: 0.1, - Cap: time.Second * 30, - }, func(error) bool { - return true - }, func() error { - // #nosec G402 - conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if tlsErr != nil { - return tlsErr - } - _ = conn.Close() - return nil - }); err != nil { - fmt.Printf("failed to wait for webhook server to be ready: %v", err) - os.Exit(1) - } - }(wg) - wg.Wait() - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} diff --git a/internal/webhookhandler/webhookhandler_test.go b/internal/webhookhandler/webhookhandler_test.go deleted file mode 100644 index 02ec9a606..000000000 --- a/internal/webhookhandler/webhookhandler_test.go +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package webhookhandler_test - -import ( - "context" - "encoding/json" - "net/http" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - admv1 "k8s.io/api/admission/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/kubectl/pkg/scheme" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - . "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhookhandler" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/sidecar" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestShouldInjectSidecar(t *testing.T) { - for _, tt := range []struct { - name string - ns corev1.Namespace - pod corev1.Pod - otelcols []v1alpha1.AmazonCloudWatchAgent - }{ - { - // this is the simplest positive test: a pod is being created with an annotation - // telling the operator to inject an instance, and the annotation's value contains - // the name of an existing otelcol instance with Mode=Sidecar - name: "simplest positive case", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-simplest-positive-case", - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, - }, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-simplest-positive-case", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, - }, - { - // in this case, the annotation is at the namespace instead of at the pod - name: "namespace is annotated", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-annotated-namespace", - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-annotated-namespace", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, - }, - { - // now, we automatically select an existing sidecar otelcol - name: "auto-select based on the annotation's value", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-with-autoselect", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-with-autoselect", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "a-deployment-instance", - Namespace: "my-namespace-with-autoselect", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeDeployment, - }, - }, - }, - }, - } { - t.Run(tt.name, func(t *testing.T) { - err := k8sClient.Create(context.Background(), &tt.ns) - require.NoError(t, err) - defer func() { - _ = k8sClient.Delete(context.Background(), &tt.ns) - }() - - for i := range tt.otelcols { - clientErr := k8sClient.Create(context.Background(), &tt.otelcols[i]) - require.NoError(t, clientErr) - } - - encoded, err := json.Marshal(tt.pod) - require.NoError(t, err) - - // the actual request we see in the webhook - req := admission.Request{ - AdmissionRequest: admv1.AdmissionRequest{ - Namespace: tt.ns.Name, - Object: runtime.RawExtension{ - Raw: encoded, - }, - }, - } - - // the webhook handler - cfg := config.New() - decoder := admission.NewDecoder(scheme.Scheme) - injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - - // test - res := injector.Handle(context.Background(), req) - - // verify - assert.True(t, res.Allowed) - assert.Nil(t, res.AdmissionResponse.Result) - assert.Len(t, res.Patches, 2) - - expectedMap := map[string]bool{ - "/metadata/labels": false, // add a new label - "/spec/containers": false, // replace the containers, adding one new container - } - for _, patch := range res.Patches { - // quick and dirty solution - if patch.Path == "/spec/containers" { - assert.Equal(t, "replace", patch.Operation) - } else { - assert.Equal(t, "add", patch.Operation) - } - - expectedMap[patch.Path] = true - } - for k := range expectedMap { - assert.True(t, expectedMap[k], "patch with path %s not found", k) - } - - // cleanup - for i := range tt.otelcols { - require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) - } - }) - } -} - -func TestPodShouldNotBeChanged(t *testing.T) { - for _, tt := range []struct { - name string - ns corev1.Namespace - pod corev1.Pod - otelcols []v1alpha1.AmazonCloudWatchAgent - }{ - { - name: "namespace has no annotations", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-annotations", - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-annotations", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, - }, - { - name: "multiple possible otelcols", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-multiple-otelcols", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{ - { - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-1", - Namespace: "my-namespace-multiple-otelcols", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }, - { - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-2", - Namespace: "my-namespace-multiple-otelcols", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }, - }, - }, - { - name: "no otelcols", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-otelcols", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{}, - }, - { - name: "otelcol is not a sidecar", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-sidecar-otelcol", - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-sidecar-otelcol", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeDaemonSet, - }, - }}, - }, - { - name: "automatically injected otelcol is not a sidecar", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-no-automatic-sidecar-otelcol", - Annotations: map[string]string{sidecar.Annotation: "true"}, - }, - }, - pod: corev1.Pod{}, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-no-automatic-sidecar-otelcol", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeDaemonSet, - }, - }}, - }, - { - name: "pod has sidecar already", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-pod-has-sidecar", - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "my-instance"}, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{{ - Name: naming.Container(), - }}, - }, - }, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-pod-has-sidecar", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, - }, - { - name: "sidecar not desired", - ns: corev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-namespace-sidecar-not-desired", - }, - }, - pod: corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Annotations: map[string]string{sidecar.Annotation: "false"}, - }, - }, - otelcols: []v1alpha1.AmazonCloudWatchAgent{{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace-sidecar-not-desired", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeSidecar, - }, - }}, - }, - } { - t.Run(tt.name, func(t *testing.T) { - err := k8sClient.Create(context.Background(), &tt.ns) - require.NoError(t, err) - defer func() { - _ = k8sClient.Delete(context.Background(), &tt.ns) - }() - - for i := range tt.otelcols { - clientErr := k8sClient.Create(context.Background(), &tt.otelcols[i]) - require.NoError(t, clientErr) - } - - encoded, err := json.Marshal(tt.pod) - require.NoError(t, err) - - // the actual request we see in the webhook - req := admission.Request{ - AdmissionRequest: admv1.AdmissionRequest{ - Namespace: tt.ns.Name, - Object: runtime.RawExtension{ - Raw: encoded, - }, - }, - } - - // the webhook handler - cfg := config.New() - decoder := admission.NewDecoder(scheme.Scheme) - injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - require.NoError(t, err) - - // test - res := injector.Handle(context.Background(), req) - - // verify - assert.True(t, res.Allowed) - assert.Nil(t, res.AdmissionResponse.Result) - assert.Len(t, res.Patches, 0) - - // cleanup - for i := range tt.otelcols { - require.NoError(t, k8sClient.Delete(context.Background(), &tt.otelcols[i])) - } - }) - } -} - -func TestFailOnInvalidRequest(t *testing.T) { - // we use a typical Go table-test instad of Ginkgo's DescribeTable because we need to - // do an assertion during the declaration of the table params, which isn't supported (yet?) - for _, tt := range []struct { - req admission.Request - name string - expected int32 - allowed bool - }{ - { - name: "empty payload", - req: admission.Request{}, - expected: http.StatusBadRequest, - allowed: false, - }, - { - name: "namespace doesn't exist", - req: func() admission.Request { - pod := corev1.Pod{} - encoded, err := json.Marshal(pod) - require.NoError(t, err) - - return admission.Request{ - AdmissionRequest: admv1.AdmissionRequest{ - Namespace: "non-existing", - Object: runtime.RawExtension{ - Raw: encoded, - }, - }, - } - }(), - expected: http.StatusInternalServerError, - allowed: true, - }, - } { - t.Run(tt.name, func(t *testing.T) { - // prepare - cfg := config.New() - decoder := admission.NewDecoder(scheme.Scheme) - injector := NewWebhookHandler(cfg, logger, decoder, k8sClient, []PodMutator{sidecar.NewMutator(logger, cfg, k8sClient)}) - - // test - res := injector.Handle(context.Background(), tt.req) - - // verify - assert.Equal(t, tt.allowed, res.Allowed) - assert.NotNil(t, res.AdmissionResponse.Result) - assert.Equal(t, tt.expected, res.AdmissionResponse.Result.Code) - }) - } -} diff --git a/kind-1.23.yaml b/kind-1.23.yaml deleted file mode 100644 index 09a2521d8..000000000 --- a/kind-1.23.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.24.yaml b/kind-1.24.yaml deleted file mode 100644 index 0d76591c1..000000000 --- a/kind-1.24.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.25.yaml b/kind-1.25.yaml deleted file mode 100644 index 340110f54..000000000 --- a/kind-1.25.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.26.yaml b/kind-1.26.yaml deleted file mode 100644 index 5a7ae790d..000000000 --- a/kind-1.26.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.27.yaml b/kind-1.27.yaml deleted file mode 100644 index 53b8f092b..000000000 --- a/kind-1.27.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.28.yaml b/kind-1.28.yaml deleted file mode 100644 index 711640f95..000000000 --- a/kind-1.28.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31 - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kind-1.29.yaml b/kind-1.29.yaml deleted file mode 100644 index 66c8d46ec..000000000 --- a/kind-1.29.yaml +++ /dev/null @@ -1,18 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - image: kindest/node:v1.29.0@sha256:54a50c9354f11ce0aa56a85d2cacb1b950f85eab3fe1caf988826d1f89bf37eb - kubeadmConfigPatches: - - | - kind: InitConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP diff --git a/kuttl-test-autoscale.yaml b/kuttl-test-autoscale.yaml deleted file mode 100644 index 93e94af6e..000000000 --- a/kuttl-test-autoscale.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -artifactsDir: ./tests/_build/artifacts/ -testDirs: - - ./tests/e2e-autoscale/ -timeout: 150 diff --git a/kuttl-test-instrumentation.yaml b/kuttl-test-instrumentation.yaml deleted file mode 100644 index 545357c42..000000000 --- a/kuttl-test-instrumentation.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -testDirs: - - ./tests/e2e-instrumentation/ -timeout: 300 diff --git a/kuttl-test-multi-instr.yaml b/kuttl-test-multi-instr.yaml deleted file mode 100644 index 5381f3bd9..000000000 --- a/kuttl-test-multi-instr.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -artifactsDir: ./tests/_build/artifacts/ -commands: - - command: kubectl apply -f ./tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml - - command: go run hack/check-operator-ready.go -testDirs: - - ./tests/e2e-multi-instrumentation/ -timeout: 150 diff --git a/kuttl-test-opampbridge.yaml b/kuttl-test-opampbridge.yaml deleted file mode 100644 index f658ce15a..000000000 --- a/kuttl-test-opampbridge.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -artifactsDir: ./tests/_build/artifacts/ -testDirs: - - ./tests/e2e-opampbridge/ -timeout: 300 diff --git a/kuttl-test-openshift.yaml b/kuttl-test-openshift.yaml deleted file mode 100644 index 418598083..000000000 --- a/kuttl-test-openshift.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -startKIND: false -testDirs: - - ./tests/e2e-openshift/ -timeout: 150 diff --git a/kuttl-test-pdb.yaml b/kuttl-test-pdb.yaml deleted file mode 100644 index 62fc2d804..000000000 --- a/kuttl-test-pdb.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -artifactsDir: ./tests/_build/artifacts/ -testDirs: - - ./tests/e2e-pdb/ -timeout: 30 diff --git a/kuttl-test-prometheuscr.yaml b/kuttl-test-prometheuscr.yaml deleted file mode 100644 index 266e5ccd8..000000000 --- a/kuttl-test-prometheuscr.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Make sure that the OT operator after upgrading itself, can upgrade the OT collectors without error. -# The test is based on the version v0.49.0, a breaking change was introduced from PR -# https://github.com/open-telemetry/opentelemetry-operator/pull/797, which added a version label "app.kubernetes.io/version", -# The version label would change between OT operator upgrade, and since at the time, the collector pod selector was the same -# as this labels, resulted in selector being modified during reconciliation which caused error due to the selector is immutable. -# Please be aware of that the collector labels are changeable in various ways, so this issue may happen in any operator < v0.52.0 -# which changed the selector to be a static set of labels. -# The fix for this issue including: -# https://github.com/open-telemetry/opentelemetry-operator/issues/840, make the selector be a static set of labels; -# https://github.com/open-telemetry/opentelemetry-operator/issues/1117, delete the old collector to let the operator -# create a new one when the selector changed. -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -commands: - - command: make undeploy - - command: make enable-prometheus-feature-flag deploy install-prometheus-operator - - command: go run hack/check-operator-ready.go -testDirs: - - ./tests/e2e-prometheuscr/ -timeout: 300 diff --git a/kuttl-test-upgrade.yaml b/kuttl-test-upgrade.yaml deleted file mode 100644 index 0c4f7e7d8..000000000 --- a/kuttl-test-upgrade.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Make sure that the OT operator after upgrading itself, can upgrade the OT collectors without error. -# The test is based on the version v0.49.0, a breaking change was introduced from PR -# https://github.com/open-telemetry/opentelemetry-operator/pull/797, which added a version label "app.kubernetes.io/version", -# The version label would change between OT operator upgrade, and since at the time, the collector pod selector was the same -# as this labels, resulted in selector being modified during reconciliation which caused error due to the selector is immutable. -# Please be aware of that the collector labels are changeable in various ways, so this issue may happen in any operator < v0.52.0 -# which changed the selector to be a static set of labels. -# The fix for this issue including: -# https://github.com/open-telemetry/opentelemetry-operator/issues/840, make the selector be a static set of labels; -# https://github.com/open-telemetry/opentelemetry-operator/issues/1117, delete the old collector to let the operator -# create a new one when the selector changed. -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -commands: - - command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml - - command: go run hack/check-operator-ready.go -testDirs: - - ./tests/e2e-upgrade/ -timeout: 300 diff --git a/kuttl-test.yaml b/kuttl-test.yaml deleted file mode 100644 index 401a47821..000000000 --- a/kuttl-test.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -artifactsDir: ./tests/_build/artifacts/ -testDirs: - - ./tests/e2e/ -timeout: 150 -parallel: 4 diff --git a/main.go b/main.go index fe385bc41..e864ee7c7 100644 --- a/main.go +++ b/main.go @@ -31,17 +31,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" - otelv1alpha1 "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/controllers" - "github.com/open-telemetry/opentelemetry-operator/internal/autodetect" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" - collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" - "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation" - instrumentationupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation/upgrade" - "github.com/open-telemetry/opentelemetry-operator/pkg/sidecar" + otelv1alpha1 "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/controllers" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" + collectorupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation" + instrumentationupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/sidecar" // +kubebuilder:scaffold:imports ) @@ -116,7 +116,7 @@ func main() { "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") - stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("ghcr.io/aws/amazon-cloudwatch-agent-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() // set java instrumentation java image in environment variable to be used for default instrumentation diff --git a/pkg/collector/adapters/config_from.go b/pkg/collector/adapters/config_from.go deleted file mode 100644 index 219d0ee13..000000000 --- a/pkg/collector/adapters/config_from.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package adapters is for data conversion. -package adapters - -import ( - "encoding/json" - "errors" - - "gopkg.in/yaml.v2" -) - -var ( - // ErrInvalidYAML represents an error in the format of the configuration file. - ErrInvalidYAML = errors.New("couldn't parse the yaml configuration") - ErrInvalidJSON = errors.New("couldn't parse cloudwatch agent json configuration") -) - -// ConfigFromString extracts a configuration map from the given string. -// If the given string isn't a valid YAML, ErrInvalidYAML is returned. -func ConfigFromString(configStr string) (map[interface{}]interface{}, error) { - config := make(map[interface{}]interface{}) - if err := yaml.Unmarshal([]byte(configStr), &config); err != nil { - return nil, ErrInvalidYAML - } - - return config, nil -} - -func ConfigFromJSONString(configStr string) (map[string]interface{}, error) { - config := make(map[string]interface{}) - if err := json.Unmarshal([]byte(configStr), &config); err != nil { - return nil, ErrInvalidJSON - } - - return config, nil -} diff --git a/pkg/collector/adapters/config_from_test.go b/pkg/collector/adapters/config_from_test.go deleted file mode 100644 index 1acdef8b3..000000000 --- a/pkg/collector/adapters/config_from_test.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters_test - -import ( - "testing" - - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/stretchr/testify/assert" -) - -func TestInvalidYAML(t *testing.T) { - // test - config, err := adapters.ConfigFromString("🦄") - - // verify - assert.Nil(t, config) - assert.Equal(t, adapters.ErrInvalidYAML, err) -} - -func TestEmptyString(t *testing.T) { - // test and verify - res, err := adapters.ConfigFromString("") - assert.NoError(t, err) - assert.Empty(t, res, 0) -} diff --git a/pkg/collector/adapters/config_to_ports.go b/pkg/collector/adapters/config_to_ports.go deleted file mode 100644 index 8cde08ceb..000000000 --- a/pkg/collector/adapters/config_to_ports.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "errors" - "sort" - - "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" - corev1 "k8s.io/api/core/v1" -) - -var ( - // ErrNoReceivers indicates that there are no receivers in the configuration. - ErrNoReceivers = errors.New("no receivers available as part of the configuration") - - // ErrReceiversNotAMap indicates that the receivers property isn't a map of values. - ErrReceiversNotAMap = errors.New("receivers property in the configuration doesn't contain valid receivers") -) - -// ConfigToReceiverPorts converts the incoming configuration object into a set of service ports required by the receivers. -func ConfigToReceiverPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { - // now, we gather which ports we might need to open - // for that, we get all the receivers and check their `endpoint` properties, - // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: - // ${instance.Name}-${receiver.name}-${receiver.qualifier} - // the receiver-name is typically the node name from the receivers map - // the receiver-qualifier is what comes after the slash in the receiver name, but typically nil - // examples: - // ```yaml - // receivers: - // examplereceiver: - // endpoint: 0.0.0.0:12345 - // examplereceiver/settings: - // endpoint: 0.0.0.0:12346 - // in this case, we have two ports, named: "examplereceiver" and "examplereceiver-settings" - receiversProperty, ok := config["receivers"] - if !ok { - return nil, ErrNoReceivers - } - recEnabled := GetEnabledReceivers(logger, config) - if recEnabled == nil { - return nil, ErrReceiversNotAMap - } - receivers, ok := receiversProperty.(map[interface{}]interface{}) - if !ok { - return nil, ErrReceiversNotAMap - } - - ports := []corev1.ServicePort{} - for key, val := range receivers { - // This check will pass only the enabled receivers, - // then only the related ports will be opened. - if !recEnabled[key] { - continue - } - receiver, ok := val.(map[interface{}]interface{}) - if !ok { - logger.Info("receiver doesn't seem to be a map of properties", "receiver", key) - receiver = map[interface{}]interface{}{} - } - - rcvrName := key.(string) - rcvrParser := parser.For(logger, rcvrName, receiver) - - rcvrPorts, err := rcvrParser.Ports() - if err != nil { - // should we break the process and return an error, or just ignore this faulty parser - // and let the other parsers add their ports to the service? right now, the best - // option seems to be to log the failures and move on, instead of failing them all - logger.Error(err, "parser for '%s' has returned an error: %w", rcvrName, err) - continue - } - - if len(rcvrPorts) > 0 { - ports = append(ports, rcvrPorts...) - } - } - - sort.Slice(ports, func(i, j int) bool { - return ports[i].Name < ports[j].Name - }) - - return ports, nil -} diff --git a/pkg/collector/adapters/config_to_ports_test.go b/pkg/collector/adapters/config_to_ports_test.go deleted file mode 100644 index fe3318890..000000000 --- a/pkg/collector/adapters/config_to_ports_test.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters_test - -import ( - "errors" - "testing" - - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/parser" -) - -var logger = logf.Log.WithName("unit-tests") - -var portConfigStr = `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" - examplereceiver/settings: - endpoint: "0.0.0.0:12346" - examplereceiver/invalid-ignored: - endpoint: "0.0.0.0" - examplereceiver/invalid-not-number: - endpoint: "0.0.0.0:not-number" - examplereceiver/without-endpoint: - notendpoint: "0.0.0.0:12347" - jaeger: - protocols: - grpc: - thrift_compact: - thrift_binary: - endpoint: 0.0.0.0:6833 - jaeger/custom: - protocols: - thrift_http: - endpoint: 0.0.0.0:15268 - otlp: - protocols: - grpc: - http: - otlp/2: - protocols: - grpc: - endpoint: 0.0.0.0:55555 - zipkin: - zipkin/2: - endpoint: 0.0.0.0:33333 -service: - pipelines: - metrics: - receivers: [examplereceiver, examplereceiver/settings] - exporters: [logging] - metrics/1: - receivers: [jaeger, jaeger/custom] - exporters: [logging] - metrics/2: - receivers: [otlp, otlp/2, zipkin] - exporters: [logging] -` - -func TestExtractPortsFromConfig(t *testing.T) { - // prepare - config, err := adapters.ConfigFromString(portConfigStr) - require.NoError(t, err) - require.NotEmpty(t, config) - - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) - assert.NoError(t, err) - assert.Len(t, ports, 11) - - // verify - httpAppProtocol := "http" - grpcAppProtocol := "grpc" - targetPortZero := intstr.IntOrString{Type: 0, IntVal: 0, StrVal: ""} - targetPort4317 := intstr.IntOrString{Type: 0, IntVal: 4317, StrVal: ""} - targetPort4318 := intstr.IntOrString{Type: 0, IntVal: 4318, StrVal: ""} - - expectedPorts := []corev1.ServicePort{ - {Name: "examplereceiver", Port: 12345}, - {Name: "examplereceiver-settings", Port: 12346}, - {Name: "jaeger-custom-thrift-http", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 15268, TargetPort: targetPortZero}, - {Name: "jaeger-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 14250}, - {Name: "jaeger-thrift-binary", Protocol: "UDP", Port: 6833}, - {Name: "jaeger-thrift-compact", Protocol: "UDP", Port: 6831}, - {Name: "otlp-2-grpc", AppProtocol: &grpcAppProtocol, Protocol: "TCP", Port: 55555}, - {Name: "otlp-grpc", AppProtocol: &grpcAppProtocol, Port: 4317, TargetPort: targetPort4317}, - {Name: "otlp-http", AppProtocol: &httpAppProtocol, Port: 4318, TargetPort: targetPort4318}, - {Name: "otlp-http-legacy", AppProtocol: &httpAppProtocol, Port: 55681, TargetPort: targetPort4318}, - {Name: "zipkin", AppProtocol: &httpAppProtocol, Protocol: "TCP", Port: 9411}, - } - assert.ElementsMatch(t, expectedPorts, ports) -} - -func TestNoPortsParsed(t *testing.T) { - for _, tt := range []struct { - expected error - desc string - configStr string - }{ - { - expected: adapters.ErrNoReceivers, - desc: "empty", - configStr: "", - }, - { - expected: adapters.ErrReceiversNotAMap, - desc: "not a map", - configStr: "receivers: some-string", - }, - } { - t.Run(tt.desc, func(t *testing.T) { - // prepare - config, err := adapters.ConfigFromString(tt.configStr) - require.NoError(t, err) - - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) - - // verify - assert.Nil(t, ports) - assert.Equal(t, tt.expected, err) - }) - } -} - -func TestInvalidReceivers(t *testing.T) { - for _, tt := range []struct { - desc string - configStr string - }{ - { - "receiver isn't a map", - "receivers:\n some-receiver: string\nservice:\n pipelines:\n metrics:\n receivers: [some-receiver]", - }, - { - "receiver's endpoint isn't string", - "receivers:\n some-receiver:\n endpoint: 123\nservice:\n pipelines:\n metrics:\n receivers: [some-receiver]", - }, - } { - t.Run(tt.desc, func(t *testing.T) { - // prepare - config, err := adapters.ConfigFromString(tt.configStr) - require.NoError(t, err) - - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 0) - }) - } -} - -func TestParserFailed(t *testing.T) { - // prepare - mockParserCalled := false - mockParser := &mockParser{ - portsFunc: func() ([]corev1.ServicePort, error) { - mockParserCalled = true - return nil, errors.New("mocked error") - }, - } - parser.Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ReceiverParser { - return mockParser - }) - - config := map[interface{}]interface{}{ - "receivers": map[interface{}]interface{}{ - "mock": map[string]interface{}{}, - }, - "service": map[interface{}]interface{}{ - "pipelines": map[interface{}]interface{}{ - "metrics": map[interface{}]interface{}{ - "receivers": []interface{}{"mock"}, - }, - }, - }, - } - - // test - ports, err := adapters.ConfigToReceiverPorts(logger, config) - - // verify - assert.Len(t, ports, 0) - assert.NoError(t, err) - assert.True(t, mockParserCalled) -} - -type mockParser struct { - portsFunc func() ([]corev1.ServicePort, error) -} - -func (m *mockParser) Ports() ([]corev1.ServicePort, error) { - if m.portsFunc != nil { - return m.portsFunc() - } - - return nil, nil -} - -func (m *mockParser) ParserName() string { - return "__mock-adapters" -} diff --git a/pkg/collector/adapters/config_to_probe.go b/pkg/collector/adapters/config_to_probe.go deleted file mode 100644 index 849fab6fb..000000000 --- a/pkg/collector/adapters/config_to_probe.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "errors" - "strings" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -var ( - errNoService = errors.New("no service available as part of the configuration") - errNoExtensions = errors.New("no extensions available as part of the configuration") - - errServiceNotAMap = errors.New("service property in the configuration doesn't contain valid services") - errExtensionsNotAMap = errors.New("extensions property in the configuration doesn't contain valid extensions") - - errNoExtensionHealthCheck = errors.New("extensions property in the configuration does not contain the expected health_check extension") - - errNoServiceExtensions = errors.New("service property in the configuration doesn't contain extensions") - - errServiceExtensionsNotSlice = errors.New("service extensions property in the configuration does not contain valid extensions") - errNoServiceExtensionHealthCheck = errors.New("no healthcheck extension available in service extension configuration") -) - -type probeConfiguration struct { - path string - port intstr.IntOrString -} - -const ( - defaultHealthCheckPath = "/" - defaultHealthCheckPort = 13133 -) - -// ConfigToContainerProbe converts the incoming configuration object into a container probe or returns an error. -func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, error) { - return nil, errNoExtensionHealthCheck -} - -func createProbeFromExtension(extension interface{}) (*corev1.Probe, error) { - probeCfg := extractProbeConfigurationFromExtension(extension) - return &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: probeCfg.path, - Port: probeCfg.port, - }, - }, - }, nil -} - -func extractProbeConfigurationFromExtension(ext interface{}) probeConfiguration { - extensionCfg, ok := ext.(map[interface{}]interface{}) - if !ok { - return defaultProbeConfiguration() - } - return probeConfiguration{ - path: extractPathFromExtensionConfig(extensionCfg), - port: extractPortFromExtensionConfig(extensionCfg), - } -} - -func defaultProbeConfiguration() probeConfiguration { - return probeConfiguration{ - path: defaultHealthCheckPath, - port: intstr.FromInt(defaultHealthCheckPort), - } -} - -func extractPathFromExtensionConfig(cfg map[interface{}]interface{}) string { - if path, ok := cfg["path"]; ok { - if parsedPath, ok := path.(string); ok { - return parsedPath - } - } - return defaultHealthCheckPath -} - -func extractPortFromExtensionConfig(cfg map[interface{}]interface{}) intstr.IntOrString { - endpoint, ok := cfg["endpoint"] - if !ok { - return defaultHealthCheckEndpoint() - } - parsedEndpoint, ok := endpoint.(string) - if !ok { - return defaultHealthCheckEndpoint() - } - endpointComponents := strings.Split(parsedEndpoint, ":") - if len(endpointComponents) != 2 { - return defaultHealthCheckEndpoint() - } - return intstr.Parse(endpointComponents[1]) -} - -func defaultHealthCheckEndpoint() intstr.IntOrString { - return intstr.FromInt(defaultHealthCheckPort) -} diff --git a/pkg/collector/adapters/config_to_probe_test.go b/pkg/collector/adapters/config_to_probe_test.go deleted file mode 100644 index 5869266de..000000000 --- a/pkg/collector/adapters/config_to_probe_test.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestConfigToProbeShouldCreateProbeFor(t *testing.T) { - tests := []struct { - desc string - config string - expectedPath string - expectedPort int32 - }{ - { - desc: "SimpleHappyPath", - expectedPort: int32(13133), - expectedPath: "/", - config: `extensions: - health_check: -service: - extensions: [health_check]`, - }, { - desc: "CustomEndpointAndPath", - expectedPort: int32(1234), - expectedPath: "/checkit", - config: `extensions: - health_check: - endpoint: localhost:1234 - path: /checkit -service: - extensions: [health_check]`, - }, { - desc: "CustomEndpointAndDefaultPath", - expectedPort: int32(1234), - expectedPath: "/", - config: `extensions: - health_check: - endpoint: localhost:1234 -service: - extensions: [health_check]`, - }, { - desc: "CustomEndpointWithJustPortAndDefaultPath", - expectedPort: int32(1234), - expectedPath: "/", - config: `extensions: - health_check: - endpoint: :1234 -service: - extensions: [health_check]`, - }, { - desc: "DefaultEndpointAndCustomPath", - expectedPort: int32(13133), - expectedPath: "/checkit", - config: `extensions: - health_check: - path: /checkit -service: - extensions: [health_check]`, - }, { - desc: "DefaultEndpointForUnexpectedEndpoint", - expectedPort: int32(13133), - expectedPath: "/", - config: `extensions: - health_check: - endpoint: 0:0:0" -service: - extensions: [health_check]`, - }, { - desc: "DefaultEndpointForUnparseablendpoint", - expectedPort: int32(13133), - expectedPath: "/", - config: `extensions: - health_check: - endpoint: - this: should-not-be-a-map" -service: - extensions: [health_check]`, - }, { - desc: "WillUseSecondServiceExtension", - config: `extensions: - health_check: -service: - extensions: [health_check/1, health_check]`, - expectedPort: int32(13133), - expectedPath: "/", - }, - } - - for _, test := range tests { - // prepare - config, err := ConfigFromString(test.config) - require.NoError(t, err, test.desc) - require.NotEmpty(t, config, test.desc) - - // test - actualProbe, err := ConfigToContainerProbe(config) - assert.NoError(t, err) - assert.Equal(t, test.expectedPath, actualProbe.HTTPGet.Path, test.desc) - assert.Equal(t, test.expectedPort, actualProbe.HTTPGet.Port.IntVal, test.desc) - assert.Equal(t, "", actualProbe.HTTPGet.Host, test.desc) - } -} - -func TestConfigToProbeShouldErrorIf(t *testing.T) { - tests := []struct { - expectedErr error - desc string - config string - }{ - { - desc: "NoHealthCheckExtension", - config: `extensions: - pprof: -service: - extensions: [health_check]`, - expectedErr: errNoExtensionHealthCheck, - }, { - desc: "BadlyFormattedExtensions", - config: `extensions: [hi] -service: - extensions: [health_check]`, - expectedErr: errExtensionsNotAMap, - }, { - desc: "NoExtensions", - config: `service: - extensions: [health_check]`, - expectedErr: errNoExtensions, - }, { - desc: "NoHealthCheckInServiceExtensions", - config: `service: - extensions: [pprof]`, - expectedErr: errNoServiceExtensionHealthCheck, - }, { - desc: "BadlyFormattedServiceExtensions", - config: `service: - extensions: - this: should-not-be-a-map`, - expectedErr: errServiceExtensionsNotSlice, - }, { - desc: "NoServiceExtensions", - config: `service: - pipelines: - traces: - receivers: [otlp]`, - expectedErr: errNoServiceExtensions, - }, { - desc: "BadlyFormattedService", - config: `extensions: - health_check: -service: [hi]`, - expectedErr: errServiceNotAMap, - }, { - desc: "NoService", - config: `extensions: - health_check:`, - expectedErr: errNoService, - }, - } - - for _, test := range tests { - // prepare - config, err := ConfigFromString(test.config) - require.NoError(t, err, test.desc) - require.NotEmpty(t, config, test.desc) - - // test - _, err = ConfigToContainerProbe(config) - assert.Equal(t, test.expectedErr, err, test.desc) - } -} diff --git a/pkg/collector/adapters/config_validate.go b/pkg/collector/adapters/config_validate.go deleted file mode 100644 index 111ddfc6e..000000000 --- a/pkg/collector/adapters/config_validate.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "github.com/go-logr/logr" -) - -// Following Otel Doc: Configuring a receiver does not enable it. The receivers are enabled via pipelines within the service section. -// GetEnabledReceivers returns all enabled receivers as a true flag set. If it can't find any receiver, it will return a nil interface. -func GetEnabledReceivers(_ logr.Logger, config map[interface{}]interface{}) map[interface{}]bool { - cfgReceivers, ok := config["receivers"] - if !ok { - return nil - } - receivers, ok := cfgReceivers.(map[interface{}]interface{}) - if !ok { - return nil - } - availableReceivers := map[interface{}]bool{} - - for recvID := range receivers { - - //Safe Cast - receiverID, withReceiver := recvID.(string) - if !withReceiver { - return nil - } - //Getting all receivers present in the receivers section and setting them to false. - availableReceivers[receiverID] = false - } - - cfgService, withService := config["service"].(map[interface{}]interface{}) - if !withService { - return nil - } - - pipeline, withPipeline := cfgService["pipelines"].(map[interface{}]interface{}) - if !withPipeline { - return nil - } - availablePipelines := map[string]bool{} - - for pipID := range pipeline { - //Safe Cast - pipelineID, existsPipeline := pipID.(string) - if !existsPipeline { - return nil - } - //Getting all the available pipelines. - availablePipelines[pipelineID] = true - } - - if len(pipeline) > 0 { - for pipelineID, pipelineCfg := range pipeline { - //Safe Cast - pipelineV, withPipelineCfg := pipelineID.(string) - if !withPipelineCfg { - continue - } - //Condition will get information if there are multiple configured pipelines. - if len(pipelineV) > 0 { - pipelineDesc, ok := pipelineCfg.(map[interface{}]interface{}) - if !ok { - return nil - } - for pipSpecID, pipSpecCfg := range pipelineDesc { - if pipSpecID.(string) == "receivers" { - receiversList, ok := pipSpecCfg.([]interface{}) - if !ok { - continue - } - // If receiversList is empty means that we haven't any enabled Receiver. - if len(receiversList) == 0 { - availableReceivers = nil - } else { - // All enabled receivers will be set as true - for _, recKey := range receiversList { - //Safe Cast - receiverKey, ok := recKey.(string) - if !ok { - return nil - } - availableReceivers[receiverKey] = true - } - } - //Removing all non-enabled receivers - for recID, recKey := range availableReceivers { - if !(recKey) { - delete(availableReceivers, recID) - } - } - } - } - } - } - } - return availableReceivers -} diff --git a/pkg/collector/adapters/config_validate_test.go b/pkg/collector/adapters/config_validate_test.go deleted file mode 100644 index 99e567ecf..000000000 --- a/pkg/collector/adapters/config_validate_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "testing" - - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/stretchr/testify/require" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestConfigValidate(t *testing.T) { - // prepare - - // First Test - Exporters - configStr := ` -receivers: - httpd/mtls: - protocols: - http: - endpoint: mysite.local:55690 - jaeger: - protocols: - grpc: - prometheus: - protocols: - grpc: - -processors: - -exporters: - logging: - -service: - pipelines: - metrics: - receivers: [httpd/mtls, jaeger] - exporters: [logging] - metrics/1: - receivers: [httpd/mtls, jaeger] - exporters: [logging] -` - // // prepare - config, err := ConfigFromString(configStr) - require.NoError(t, err) - require.NotEmpty(t, config) - - // test - check := GetEnabledReceivers(logger, config) - require.NotEmpty(t, check) -} - -func TestEmptyEnabledReceivers(t *testing.T) { - // prepare - - // First Test - Exporters - configStr := ` -receivers: - httpd/mtls: - protocols: - http: - endpoint: mysite.local:55690 - jaeger: - protocols: - grpc: - prometheus: - protocols: - grpc: - -processors: - -exporters: - logging: - -service: - pipelines: - metrics: - receivers: [] - exporters: [] - metrics/1: - receivers: [] - exporters: [] -` - // // prepare - config, err := ConfigFromString(configStr) - require.NoError(t, err) - require.NotEmpty(t, config) - - // test - check := GetEnabledReceivers(logger, config) - require.Empty(t, check) -} diff --git a/pkg/collector/annotations.go b/pkg/collector/annotations.go deleted file mode 100644 index e38dad46d..000000000 --- a/pkg/collector/annotations.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "crypto/sha256" - "fmt" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -// Annotations return the annotations for AmazonCloudWatchAgent pod. -func Annotations(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { - annotations := map[string]string{} - - // make sure sha256 for configMap is always calculated - annotations["amazon-cloudwatch-agent-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) - - return annotations -} - -// PodAnnotations return the spec annotations for AmazonCloudWatchAgent pod. -func PodAnnotations(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { - // new map every time, so that we don't touch the instance's annotations - podAnnotations := map[string]string{} - - // allow override of pod annotations - for k, v := range instance.Spec.PodAnnotations { - podAnnotations[k] = v - } - - // propagating annotations from metadata.annotations - for kMeta, vMeta := range Annotations(instance) { - if _, found := podAnnotations[kMeta]; !found { - podAnnotations[kMeta] = vMeta - } - } - - // make sure sha256 for configMap is always calculated - podAnnotations["amazon-cloudwatch-agent-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) - - return podAnnotations -} - -func getConfigMapSHA(config string) string { - h := sha256.Sum256([]byte(config)) - return fmt.Sprintf("%x", h) -} diff --git a/pkg/collector/common.go b/pkg/collector/common.go deleted file mode 100644 index 53d74b4e0..000000000 --- a/pkg/collector/common.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - corev1 "k8s.io/api/core/v1" -) - -var CloudwatchAgentPorts = []corev1.ServicePort{ - { - Name: "otlp-grpc", - Port: 4315, - }, - { - Name: "otlp-http", - Port: 4316, - }, - { - Name: "aws-proxy", - Port: 2000, - }, -} diff --git a/pkg/collector/container.go b/pkg/collector/container.go deleted file mode 100644 index a152ce1d0..000000000 --- a/pkg/collector/container.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "fmt" - "sort" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/validation" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// maxPortLen allows us to truncate a port name according to what is considered valid port syntax: -// https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsValidPortName -const maxPortLen = 15 - -// Container builds a container for the given collector. -func Container(cfg config.Config, logger logr.Logger, agent v1alpha1.AmazonCloudWatchAgent, addConfig bool) corev1.Container { - image := agent.Spec.Image - if len(image) == 0 { - image = cfg.CollectorImage() - } - - ports := getContainerPorts(logger, agent.Spec.Config) - for _, p := range agent.Spec.Ports { - ports[p.Name] = corev1.ContainerPort{ - Name: p.Name, - ContainerPort: p.Port, - Protocol: p.Protocol, - } - } - - var volumeMounts []corev1.VolumeMount - argsMap := agent.Spec.Args - if argsMap == nil { - argsMap = map[string]string{} - } - // defines the output (sorted) array for final output - var args []string - // When adding a config via v1alpha1.AmazonCloudWatchAgentSpec.Config, we ensure that it is always the - // first item in the args. At the time of writing, although multiple configs are allowed in the - // cloudwatch agent, the operator has yet to implement such functionality. When multiple configs - // are present they should be merged in a deterministic manner using the order given, and because - // v1alpha1.AmazonCloudWatchAgentSpec.Config is a required field we assume that it will always be the - // "primary" config and in the future additional configs can be appended to the container args in a simple manner. - - if addConfig { - volumeMounts = append(volumeMounts, - corev1.VolumeMount{ - Name: naming.ConfigMapVolume(), - MountPath: "/etc/cwagentconfig", - }, - ) - } - - // ensure that the v1alpha1.AmazonCloudWatchAgentSpec.Args are ordered when moved to container.Args, - // where iterating over a map does not guarantee, so that reconcile will not be fooled by different - // ordering in args. - var sortedArgs []string - for k, v := range argsMap { - sortedArgs = append(sortedArgs, fmt.Sprintf("--%s=%s", k, v)) - } - sort.Strings(sortedArgs) - args = append(args, sortedArgs...) - - if len(agent.Spec.VolumeMounts) > 0 { - volumeMounts = append(volumeMounts, agent.Spec.VolumeMounts...) - } - - var envVars = agent.Spec.Env - if agent.Spec.Env == nil { - envVars = []corev1.EnvVar{} - } - - envVars = append(envVars, corev1.EnvVar{ - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }) - - if _, err := adapters.ConfigFromJSONString(agent.Spec.Config); err != nil { - logger.Error(err, "error parsing config") - } - - return corev1.Container{ - Name: naming.Container(), - Image: image, - ImagePullPolicy: agent.Spec.ImagePullPolicy, - VolumeMounts: volumeMounts, - Args: args, - Env: envVars, - EnvFrom: agent.Spec.EnvFrom, - Resources: agent.Spec.Resources, - Ports: portMapToList(ports), - } -} - -func getContainerPorts(logger logr.Logger, cfg string) map[string]corev1.ContainerPort { - ports := map[string]corev1.ContainerPort{} - for _, p := range CloudwatchAgentPorts { - truncName := naming.Truncate(p.Name, maxPortLen) - if p.Name != truncName { - logger.Info("truncating container port name", - "port.name.prev", p.Name, "port.name.new", truncName) - } - nameErrs := validation.IsValidPortName(truncName) - numErrs := validation.IsValidPortNum(int(p.Port)) - if len(nameErrs) > 0 || len(numErrs) > 0 { - logger.Info("dropping invalid container port", "port.name", truncName, "port.num", p.Port, - "port.name.errs", nameErrs, "num.errs", numErrs) - continue - } - ports[truncName] = corev1.ContainerPort{ - Name: truncName, - ContainerPort: p.Port, - Protocol: p.Protocol, - } - } - return ports -} - -func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPort { - ports := make([]corev1.ContainerPort, 0, len(portMap)) - for _, p := range portMap { - ports = append(ports, p) - } - sort.Slice(ports, func(i, j int) bool { - return ports[i].Name < ports[j].Name - }) - return ports -} diff --git a/pkg/collector/daemonset.go b/pkg/collector/daemonset.go deleted file mode 100644 index 861f894b7..000000000 --- a/pkg/collector/daemonset.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "github.com/go-logr/logr" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// DaemonSet builds the deployment for the given instance. -func DaemonSet(cfg config.Config, logger logr.Logger, agent v1alpha1.AmazonCloudWatchAgent) appsv1.DaemonSet { - name := naming.Agent(agent) - labels := Labels(agent, name, cfg.LabelsFilter()) - - annotations := Annotations(agent) - podAnnotations := PodAnnotations(agent) - return appsv1.DaemonSet{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Agent(agent), - Namespace: agent.Namespace, - Labels: labels, - Annotations: annotations, - }, - Spec: appsv1.DaemonSetSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(agent), - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: podAnnotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(agent), - Containers: []corev1.Container{Container(cfg, logger, agent, true)}, - Volumes: Volumes(cfg, agent), - Tolerations: agent.Spec.Tolerations, - NodeSelector: agent.Spec.NodeSelector, - HostNetwork: agent.Spec.HostNetwork, - DNSPolicy: getDNSPolicy(agent), - PriorityClassName: agent.Spec.PriorityClassName, - }, - }, - }, - } -} diff --git a/pkg/collector/deployment.go b/pkg/collector/deployment.go deleted file mode 100644 index a9373c87b..000000000 --- a/pkg/collector/deployment.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "github.com/go-logr/logr" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// Deployment builds the deployment for the given instance. -func Deployment(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) appsv1.Deployment { - name := naming.Agent(otelcol) - labels := Labels(otelcol, name, cfg.LabelsFilter()) - - annotations := Annotations(otelcol) - podAnnotations := PodAnnotations(otelcol) - - return appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: otelcol.Namespace, - Labels: labels, - Annotations: annotations, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: otelcol.Spec.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(otelcol), - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: podAnnotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(otelcol), - Containers: []corev1.Container{Container(cfg, logger, otelcol, true)}, - Volumes: Volumes(cfg, otelcol), - DNSPolicy: getDNSPolicy(otelcol), - HostNetwork: otelcol.Spec.HostNetwork, - Tolerations: otelcol.Spec.Tolerations, - NodeSelector: otelcol.Spec.NodeSelector, - PriorityClassName: otelcol.Spec.PriorityClassName, - }, - }, - }, - } -} diff --git a/pkg/collector/labels.go b/pkg/collector/labels.go deleted file mode 100644 index 5eae3d347..000000000 --- a/pkg/collector/labels.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "regexp" - "strings" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -func isFilteredLabel(label string, filterLabels []string) bool { - for _, pattern := range filterLabels { - match, _ := regexp.MatchString(pattern, label) - return match - } - - return false -} - -// Labels return the common labels to all objects that are part of a managed AmazonCloudWatchAgent. -func Labels(instance v1alpha1.AmazonCloudWatchAgent, name string, filterLabels []string) map[string]string { - // new map every time, so that we don't touch the instance's label - base := map[string]string{} - if nil != instance.Labels { - for k, v := range instance.Labels { - if !isFilteredLabel(k, filterLabels) { - base[k] = v - } - } - } - - for k, v := range SelectorLabels(instance) { - base[k] = v - } - - version := strings.Split(instance.Spec.Image, ":") - if len(version) > 1 { - base["app.kubernetes.io/version"] = version[len(version)-1] - } else { - base["app.kubernetes.io/version"] = "latest" - } - - // Don't override the app name if it already exists - if _, ok := base["app.kubernetes.io/name"]; !ok { - base["app.kubernetes.io/name"] = name - } - - return base -} - -// SelectorLabels return the common labels to all objects that are part of a managed AmazonCloudWatchAgent to use as selector. -// Selector labels are immutable for Deployment, StatefulSet and DaemonSet, therefore, no labels in selector should be -// expected to be modified for the lifetime of the object. -func SelectorLabels(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { - return map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/instance": naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name), - "app.kubernetes.io/part-of": "aws", - "app.kubernetes.io/component": "amazon-cloudwatch-agent", - } -} diff --git a/pkg/collector/reconcile/cloudwatchagent.go b/pkg/collector/reconcile/cloudwatchagent.go deleted file mode 100644 index 798ae55c3..000000000 --- a/pkg/collector/reconcile/cloudwatchagent.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package reconcile contains reconciliation logic for CloudWatch Agent components. -package reconcile - -import ( - "context" - "fmt" - "strconv" - - appsv1 "k8s.io/api/apps/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// Self updates this instance's self data. This should be the last item in the reconciliation, as it causes changes -// making params.Instance obsolete. Default values should be set in the Defaulter webhook, this should only be used -// for the Status, which can't be set by the defaulter. -func Self(ctx context.Context, params Params) error { - changed := params.Instance - - // this field is only changed for new instances: on existing instances this - // field is reconciled when the operator is first started, i.e. during - // the upgrade mechanism - if params.Instance.Status.Version == "" { - // a version is not set, otherwise let the upgrade mechanism take care of it! - changed.Status.Version = version.AmazonCloudWatchAgent() - } - - if err := updateScaleSubResourceStatus(ctx, params.Client, &changed); err != nil { - return fmt.Errorf("failed to update the scale subresource status for the CloudWatch CR: %w", err) - } - - statusPatch := client.MergeFrom(¶ms.Instance) - if err := params.Client.Status().Patch(ctx, &changed, statusPatch); err != nil { - return fmt.Errorf("failed to apply status changes to the CloudWatch CR: %w", err) - } - - return nil -} - -func updateScaleSubResourceStatus(ctx context.Context, cli client.Client, changed *v1alpha1.AmazonCloudWatchAgent) error { - mode := changed.Spec.Mode - if mode != v1alpha1.ModeDeployment && mode != v1alpha1.ModeStatefulSet { - changed.Status.Scale.Replicas = 0 - changed.Status.Scale.Selector = "" - - return nil - } - - name := naming.Agent(*changed) - - // Set the scale selector - labels := collector.Labels(*changed, name, []string{}) - selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) - if err != nil { - return fmt.Errorf("failed to get selector for labelSelector: %w", err) - } - changed.Status.Scale.Selector = selector.String() - - // Set the scale replicas - objKey := client.ObjectKey{ - Namespace: changed.GetNamespace(), - Name: naming.Agent(*changed), - } - - var replicas int32 - var readyReplicas int32 - var statusReplicas string - var statusImage string - - switch mode { // nolint:exhaustive - case v1alpha1.ModeDeployment: - obj := &appsv1.Deployment{} - if err := cli.Get(ctx, objKey, obj); err != nil { - return fmt.Errorf("failed to get deployment status.replicas: %w", err) - } - replicas = obj.Status.Replicas - readyReplicas = obj.Status.ReadyReplicas - statusReplicas = strconv.Itoa(int(readyReplicas)) + "/" + strconv.Itoa(int(replicas)) - statusImage = obj.Spec.Template.Spec.Containers[0].Image - - case v1alpha1.ModeStatefulSet: - obj := &appsv1.StatefulSet{} - if err := cli.Get(ctx, objKey, obj); err != nil { - return fmt.Errorf("failed to get statefulSet status.replicas: %w", err) - } - replicas = obj.Status.Replicas - readyReplicas = obj.Status.ReadyReplicas - statusReplicas = strconv.Itoa(int(readyReplicas)) + "/" + strconv.Itoa(int(replicas)) - statusImage = obj.Spec.Template.Spec.Containers[0].Image - - case v1alpha1.ModeDaemonSet: - obj := &appsv1.DaemonSet{} - if err := cli.Get(ctx, objKey, obj); err != nil { - return fmt.Errorf("failed to get daemonSet status.replicas: %w", err) - } - statusImage = obj.Spec.Template.Spec.Containers[0].Image - } - changed.Status.Scale.Replicas = replicas - changed.Status.Image = statusImage - changed.Status.Scale.StatusReplicas = statusReplicas - - return nil -} diff --git a/pkg/collector/reconcile/config_replace.go b/pkg/collector/reconcile/config_replace.go deleted file mode 100644 index 9c14b5b75..000000000 --- a/pkg/collector/reconcile/config_replace.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "encoding/json" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/adapters" -) - -func ReplaceConfig(instance v1alpha1.AmazonCloudWatchAgent) (string, error) { - config, err := adapters.ConfigFromJSONString(instance.Spec.Config) - if err != nil { - return "", err - } - - out, err := json.Marshal(config) - if err != nil { - return "", err - } - - return string(out), nil -} diff --git a/pkg/collector/reconcile/configmap.go b/pkg/collector/reconcile/configmap.go deleted file mode 100644 index 3ffa5d1f5..000000000 --- a/pkg/collector/reconcile/configmap.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - "reflect" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete - -// ConfigMaps reconciles the config map(s) required for the instance in the current context. -func ConfigMaps(ctx context.Context, params Params) error { - desired := []corev1.ConfigMap{ - desiredConfigMap(ctx, params), - } - - // first, handle the create/update parts - if err := expectedConfigMaps(ctx, params, desired, true); err != nil { - return fmt.Errorf("failed to reconcile the expected configmaps: %w", err) - } - - // then, delete the extra objects - if err := deleteConfigMaps(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the configmaps to be deleted: %w", err) - } - - return nil -} - -func desiredConfigMap(_ context.Context, params Params) corev1.ConfigMap { - name := naming.ConfigMap(params.Instance) - labels := collector.Labels(params.Instance, name, []string{}) - - config, err := ReplaceConfig(params.Instance) - if err != nil { - params.Log.V(2).Info("failed to update prometheus config to use sharded targets: ", "err", err) - } - - return corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Data: map[string]string{ - "cwagentconfig.json": config, - }, - } -} - -func expectedConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap, retry bool) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.ConfigMap{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - clientGetErr := params.Client.Get(ctx, nns, existing) - if clientGetErr != nil && errors.IsNotFound(clientGetErr) { - if clientCreateErr := params.Client.Create(ctx, &desired); clientCreateErr != nil { - if errors.IsAlreadyExists(clientCreateErr) && retry { - // let's try again? we probably had multiple updates at one, and now it exists already - if err := expectedConfigMaps(ctx, params, expected, false); err != nil { - // somethin else happened now... - return err - } - - // we succeeded in the retry, exit this attempt - return nil - } - return fmt.Errorf("failed to create: %w", clientCreateErr) - } - params.Log.V(2).Info("created", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) - continue - } else if clientGetErr != nil { - return fmt.Errorf("failed to get: %w", clientGetErr) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Data = desired.Data - updated.BinaryData = desired.BinaryData - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - if configMapChanged(&desired, existing) { - params.Recorder.Event(updated, "Normal", "ConfigUpdate ", fmt.Sprintf("OpenTelemetry Config changed - %s/%s", desired.Namespace, desired.Name)) - } - - params.Log.V(2).Info("applied", "configmap.name", desired.Name, "configmap.namespace", desired.Namespace) - } - - return nil -} - -func deleteConfigMaps(ctx context.Context, params Params, expected []corev1.ConfigMap) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &corev1.ConfigMapList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "configmap.name", existing.Name, "configmap.namespace", existing.Namespace) - } - } - - return nil -} - -func configMapChanged(desired *corev1.ConfigMap, actual *corev1.ConfigMap) bool { - return !reflect.DeepEqual(desired.Data, actual.Data) - -} diff --git a/pkg/collector/reconcile/daemonset.go b/pkg/collector/reconcile/daemonset.go deleted file mode 100644 index 3e5b2ea13..000000000 --- a/pkg/collector/reconcile/daemonset.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" -) - -// +kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;list;watch;create;update;patch;delete - -// DaemonSets reconciles the daemon set(s) required for the instance in the current context. -func DaemonSets(ctx context.Context, params Params) error { - desired := []appsv1.DaemonSet{} - if params.Instance.Spec.Mode == "daemonset" { - desired = append(desired, collector.DaemonSet(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected daemon sets: %w", err) - } - - // then, delete the extra objects - if err := deleteDaemonSets(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the daemon sets to be deleted: %w", err) - } - - return nil -} - -func expectedDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &appsv1.DaemonSet{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector daemonset will be created in the next reconcile cycle", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) - - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to request deleting daemonset: %w", err) - } - continue - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "daemonset.name", desired.Name, "daemonset.namespace", desired.Namespace) - } - - return nil -} - -func deleteDaemonSets(ctx context.Context, params Params, expected []appsv1.DaemonSet) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &appsv1.DaemonSetList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "daemonset.name", existing.Name, "daemonset.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/deployment.go b/pkg/collector/reconcile/deployment.go deleted file mode 100644 index 211216949..000000000 --- a/pkg/collector/reconcile/deployment.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - appsv1 "k8s.io/api/apps/v1" - apiequality "k8s.io/apimachinery/pkg/api/equality" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" -) - -// +kubebuilder:rbac:groups="apps",resources=deployments,verbs=get;list;watch;create;update;patch;delete - -// Deployments reconciles the deployment(s) required for the instance in the current context. -func Deployments(ctx context.Context, params Params) error { - desired := []appsv1.Deployment{} - if params.Instance.Spec.Mode == "deployment" { - desired = append(desired, collector.Deployment(params.Config, params.Log, params.Instance)) - } - - // first, handle the create/update parts - if err := expectedDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected deployments: %w", err) - } - - // then, delete the extra objects - if err := deleteDeployments(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the deployments to be deleted: %w", err) - } - - return nil -} - -func expectedDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &appsv1.Deployment{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // Selector is an immutable field, if set, we cannot modify it otherwise we will face reconciliation error. - if !apiequality.Semantic.DeepEqual(desired.Spec.Selector, existing.Spec.Selector) { - params.Log.V(2).Info("Spec.Selector change detected, trying to delete, the new collector deployment will be created in the next reconcile cycle ", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) - - if err := params.Client.Delete(ctx, existing); err != nil { - return fmt.Errorf("failed to delete deployment: %w", err) - } - continue - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - - updated.Spec = desired.Spec - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "deployment.name", desired.Name, "deployment.namespace", desired.Namespace) - } - - return nil -} - -func deleteDeployments(ctx context.Context, params Params, expected []appsv1.Deployment) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &appsv1.DeploymentList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "deployment.name", existing.Name, "deployment.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/ingress.go b/pkg/collector/reconcile/ingress.go deleted file mode 100644 index f1af368bc..000000000 --- a/pkg/collector/reconcile/ingress.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - corev1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -func desiredIngresses(_ context.Context, params Params) *networkingv1.Ingress { - if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeNginx { - return nil - } - - ports := servicePortsFromCfg(params) - - // if we have no ports, we don't need a ingress entry - if len(ports) == 0 { - params.Log.V(1).Info( - "the instance's configuration didn't yield any ports to open, skipping ingress", - "instance.name", params.Instance.Name, - "instance.namespace", params.Instance.Namespace, - ) - return nil - } - - pathType := networkingv1.PathTypePrefix - paths := make([]networkingv1.HTTPIngressPath, len(ports)) - for i, p := range ports { - paths[i] = networkingv1.HTTPIngressPath{ - Path: "/" + p.Name, - PathType: &pathType, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: naming.Service(params.Instance), - Port: networkingv1.ServiceBackendPort{ - // Valid names must be non-empty and no more than 15 characters long. - Name: naming.Truncate(p.Name, 15), - }, - }, - }, - } - } - - return &networkingv1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Ingress(params.Instance), - Namespace: params.Instance.Namespace, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Ingress(params.Instance), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: networkingv1.IngressSpec{ - TLS: params.Instance.Spec.Ingress.TLS, - Rules: []networkingv1.IngressRule{ - { - Host: params.Instance.Spec.Ingress.Hostname, - IngressRuleValue: networkingv1.IngressRuleValue{ - HTTP: &networkingv1.HTTPIngressRuleValue{ - Paths: paths, - }, - }, - }, - }, - IngressClassName: params.Instance.Spec.Ingress.IngressClassName, - }, - } -} - -// Ingresses reconciles the ingress(s) required for the instance in the current context. -func Ingresses(ctx context.Context, params Params) error { - isSupportedMode := true - if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { - params.Log.V(3).Info("ingress settings are not supported in sidecar mode") - isSupportedMode = false - } - - nns := types.NamespacedName{Namespace: params.Instance.Namespace, Name: params.Instance.Name} - err := params.Client.Get(ctx, nns, &corev1.Service{}) // NOTE: check if service exists. - serviceExists := err != nil - - var desired []networkingv1.Ingress - if isSupportedMode && serviceExists { - if d := desiredIngresses(ctx, params); d != nil { - desired = append(desired, *d) - } - } - - // first, handle the create/update parts - if err := expectedIngresses(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected ingresses: %w", err) - } - - // then, delete the extra objects - if err := deleteIngresses(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the ingresses to be deleted: %w", err) - } - - return nil -} - -func expectedIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &networkingv1.Ingress{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - clientGetErr := params.Client.Get(ctx, nns, existing) - if clientGetErr != nil && k8serrors.IsNotFound(clientGetErr) { - if err := params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) - } - params.Log.V(2).Info("created", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) - return nil - } else if clientGetErr != nil { - return fmt.Errorf("failed to get: %w", clientGetErr) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - updated.Spec.Rules = desired.Spec.Rules - updated.Spec.TLS = desired.Spec.TLS - updated.Spec.DefaultBackend = desired.Spec.DefaultBackend - updated.Spec.IngressClassName = desired.Spec.IngressClassName - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "ingress.name", desired.Name, "ingress.namespace", desired.Namespace) - } - return nil -} - -func deleteIngresses(ctx context.Context, params Params, expected []networkingv1.Ingress) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }), - } - list := &networkingv1.IngressList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "ingress.name", existing.Name, "ingress.namespace", existing.Namespace) - } - } - - return nil -} - -func servicePortsFromCfg(params Params) []corev1.ServicePort { - config, err := adapters.ConfigFromString(params.Instance.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration from the context") - return nil - } - - ports, err := adapters.ConfigToReceiverPorts(params.Log, config) - if err != nil { - params.Log.Error(err, "couldn't build the ingress for this instance") - } - - if len(params.Instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) - } - return ports -} diff --git a/pkg/collector/reconcile/params.go b/pkg/collector/reconcile/params.go deleted file mode 100644 index df30a1795..000000000 --- a/pkg/collector/reconcile/params.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "github.com/go-logr/logr" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" -) - -// Params holds the reconciliation-specific parameters. -type Params struct { - Client client.Client - Recorder record.EventRecorder - Scheme *runtime.Scheme - Log logr.Logger - Instance v1alpha1.AmazonCloudWatchAgent - Config config.Config -} diff --git a/pkg/collector/reconcile/route.go b/pkg/collector/reconcile/route.go deleted file mode 100644 index edb9c10f1..000000000 --- a/pkg/collector/reconcile/route.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - routev1 "github.com/openshift/api/route/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -func desiredRoutes(_ context.Context, params Params) []routev1.Route { - var tlsCfg *routev1.TLSConfig - switch params.Instance.Spec.Ingress.Route.Termination { - case v1alpha1.TLSRouteTerminationTypeInsecure: - // NOTE: insecure, no tls cfg. - case v1alpha1.TLSRouteTerminationTypeEdge: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationEdge} - case v1alpha1.TLSRouteTerminationTypePassthrough: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationPassthrough} - case v1alpha1.TLSRouteTerminationTypeReencrypt: - tlsCfg = &routev1.TLSConfig{Termination: routev1.TLSTerminationReencrypt} - default: // NOTE: if unsupported, end here. - return nil - } - - ports := servicePortsFromCfg(params) - - // if we have no ports, we don't need a route entry - if len(ports) == 0 { - params.Log.V(1).Info( - "the instance's configuration didn't yield any ports to open, skipping route", - "instance.name", params.Instance.Name, - "instance.namespace", params.Instance.Namespace, - ) - return nil - } - - routes := make([]routev1.Route, len(ports)) - for i, p := range ports { - routes[i] = routev1.Route{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Route(params.Instance, p.Name), - Namespace: params.Instance.Namespace, - Annotations: params.Instance.Spec.Ingress.Annotations, - Labels: map[string]string{ - "app.kubernetes.io/name": naming.Route(params.Instance, p.Name), - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: routev1.RouteSpec{ - Host: p.Name + "." + params.Instance.Spec.Ingress.Hostname, - Path: "/" + p.Name, - To: routev1.RouteTargetReference{ - Kind: "Service", - Name: naming.Service(params.Instance), - }, - Port: &routev1.RoutePort{ - // Valid names must be non-empty and no more than 15 characters long. - TargetPort: intstr.FromString(naming.Truncate(p.Name, 15)), - }, - WildcardPolicy: routev1.WildcardPolicyNone, - TLS: tlsCfg, - }, - } - } - return routes -} - -// Routes reconciles the route(s) required for the instance in the current context. -func Routes(ctx context.Context, params Params) error { - if params.Instance.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { - return nil - } - - isSupportedMode := true - if params.Instance.Spec.Mode == v1alpha1.ModeSidecar { - params.Log.V(3).Info("ingress settings are not supported in sidecar mode") - isSupportedMode = false - } - - var desired []routev1.Route - if isSupportedMode { - if r := desiredRoutes(ctx, params); r != nil { - desired = append(desired, r...) - } - } - - // first, handle the create/update parts - if err := expectedRoutes(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected routes: %w", err) - } - - // then, delete the extra objects - if err := deleteRoutes(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the routes to be deleted: %w", err) - } - - return nil -} - -func expectedRoutes(ctx context.Context, params Params, expected []routev1.Route) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &routev1.Route{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if err = params.Client.Create(ctx, &desired); err != nil { - return fmt.Errorf("failed to create: %w", err) - } - params.Log.V(2).Info("created", "route.name", desired.Name, "route.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - updated.Spec.To = desired.Spec.To - updated.Spec.TLS = desired.Spec.TLS - updated.Spec.Port = desired.Spec.Port - updated.Spec.WildcardPolicy = desired.Spec.WildcardPolicy - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "route.name", desired.Name, "route.namespace", desired.Namespace) - } - return nil -} - -func deleteRoutes(ctx context.Context, params Params, expected []routev1.Route) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &routev1.RouteList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "route.name", existing.Name, "route.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/reconcile/service.go b/pkg/collector/reconcile/service.go deleted file mode 100644 index 592963fef..000000000 --- a/pkg/collector/reconcile/service.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// headless label is to differentiate the headless service from the clusterIP service. -const ( - headlessLabel = "operator.cloudwatch.aws.amazon.com/collector-headless-service" - headlessExists = "Exists" -) - -// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete - -// Services reconciles the service(s) required for the instance in the current context. -func Services(ctx context.Context, params Params) error { - desired := []corev1.Service{} - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar { - type builder func(context.Context, Params) *corev1.Service - for _, builder := range []builder{desiredService, headless, monitoringService} { - svc := builder(ctx, params) - // add only the non-nil to the list - if svc != nil { - desired = append(desired, *svc) - } - } - } - - // first, handle the create/update parts - if err := expectedServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected services: %w", err) - } - - // then, delete the extra objects - if err := deleteServices(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the services to be deleted: %w", err) - } - - return nil -} - -func desiredService(ctx context.Context, params Params) *corev1.Service { - name := naming.Service(params.Instance) - labels := collector.Labels(params.Instance, name, []string{}) - - ports := collector.CloudwatchAgentPorts - - if len(params.Instance.Spec.Ports) > 0 { - // we should add all the ports from the CR - // there are two cases where problems might occur: - // 1) when the port number is already being used by a receiver - // 2) same, but for the port name - // - // in the first case, we remove the port we inferred from the list - // in the second case, we rename our inferred port to something like "port-%d" - portNumbers, portNames := extractPortNumbersAndNames(params.Instance.Spec.Ports) - resultingInferredPorts := []corev1.ServicePort{} - for _, inferred := range ports { - if filtered := filterPort(params.Log, inferred, portNumbers, portNames); filtered != nil { - resultingInferredPorts = append(resultingInferredPorts, *filtered) - } - } - - ports = append(params.Instance.Spec.Ports, resultingInferredPorts...) - } - - // if we have no ports, we don't need a service - if len(ports) == 0 { - params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.Instance.Name, "instance.namespace", params.Instance.Namespace) - return nil - } - - trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster - if params.Instance.Spec.Mode == v1alpha1.ModeDaemonSet { - trafficPolicy = corev1.ServiceInternalTrafficPolicyLocal - } - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.Service(params.Instance), - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - InternalTrafficPolicy: &trafficPolicy, - Selector: collector.SelectorLabels(params.Instance), - ClusterIP: "", - Ports: ports, - }, - } -} - -func headless(ctx context.Context, params Params) *corev1.Service { - h := desiredService(ctx, params) - if h == nil { - return nil - } - - h.Name = naming.HeadlessService(params.Instance) - h.Labels[headlessLabel] = headlessExists - - // copy to avoid modifying params.Instance.Annotations - annotations := map[string]string{ - "service.beta.openshift.io/serving-cert-secret-name": fmt.Sprintf("%s-tls", h.Name), - } - for k, v := range h.Annotations { - annotations[k] = v - } - h.Annotations = annotations - - h.Spec.ClusterIP = "None" - return h -} - -func monitoringService(ctx context.Context, params Params) *corev1.Service { - name := naming.MonitoringService(params.Instance) - labels := collector.Labels(params.Instance, name, []string{}) - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.Instance.Namespace, - Labels: labels, - Annotations: params.Instance.Annotations, - }, - Spec: corev1.ServiceSpec{ - Selector: collector.SelectorLabels(params.Instance), - ClusterIP: "", - Ports: []corev1.ServicePort{{ - Name: "monitoring", - Port: 8888, - }}, - }, - } -} - -func expectedServices(ctx context.Context, params Params, expected []corev1.Service) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.Service{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "service.name", desired.Name, "service.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - updated.Spec.Ports = desired.Spec.Ports - updated.Spec.Selector = desired.Spec.Selector - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "service.name", desired.Name, "service.namespace", desired.Namespace) - } - - return nil -} - -func deleteServices(ctx context.Context, params Params, expected []corev1.Service) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &corev1.ServiceList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "service.name", existing.Name, "service.namespace", existing.Namespace) - } - } - - return nil -} - -func filterPort(logger logr.Logger, candidate corev1.ServicePort, portNumbers map[int32]bool, portNames map[string]bool) *corev1.ServicePort { - if portNumbers[candidate.Port] { - return nil - } - - // do we have the port name there already? - if portNames[candidate.Name] { - // there's already a port with the same name! do we have a 'port-%d' already? - fallbackName := fmt.Sprintf("port-%d", candidate.Port) - if portNames[fallbackName] { - // that wasn't expected, better skip this port - logger.V(2).Info("a port name specified in the CR clashes with an inferred port name, and the fallback port name clashes with another port name! Skipping this port.", - "inferred-port-name", candidate.Name, - "fallback-port-name", fallbackName, - ) - return nil - } - - candidate.Name = fallbackName - return &candidate - } - - // this port is unique, return as is - return &candidate -} - -func extractPortNumbersAndNames(ports []corev1.ServicePort) (map[int32]bool, map[string]bool) { - numbers := map[int32]bool{} - names := map[string]bool{} - - for _, port := range ports { - numbers[port.Port] = true - names[port.Name] = true - } - - return numbers, names -} diff --git a/pkg/collector/reconcile/serviceaccount.go b/pkg/collector/reconcile/serviceaccount.go deleted file mode 100644 index e135f8d59..000000000 --- a/pkg/collector/reconcile/serviceaccount.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package reconcile - -import ( - "context" - "fmt" - - corev1 "k8s.io/api/core/v1" - k8serrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector" -) - -// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete - -// ServiceAccounts reconciles the service account(s) required for the instance in the current context. -func ServiceAccounts(ctx context.Context, params Params) error { - desired := desiredServiceAccounts(params) - - // first, handle the create/update parts - if err := expectedServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the expected service accounts: %w", err) - } - - // then, delete the extra objects - if err := deleteServiceAccounts(ctx, params, desired); err != nil { - return fmt.Errorf("failed to reconcile the service accounts to be deleted: %w", err) - } - - return nil -} - -func desiredServiceAccounts(params Params) []corev1.ServiceAccount { - desired := []corev1.ServiceAccount{} - if params.Instance.Spec.Mode != v1alpha1.ModeSidecar && len(params.Instance.Spec.ServiceAccount) == 0 { - desired = append(desired, collector.ServiceAccount(params.Instance)) - } - return desired -} - -func expectedServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { - for _, obj := range expected { - desired := obj - - if err := controllerutil.SetControllerReference(¶ms.Instance, &desired, params.Scheme); err != nil { - return fmt.Errorf("failed to set controller reference: %w", err) - } - - existing := &corev1.ServiceAccount{} - nns := types.NamespacedName{Namespace: desired.Namespace, Name: desired.Name} - err := params.Client.Get(ctx, nns, existing) - if err != nil && k8serrors.IsNotFound(err) { - if clientErr := params.Client.Create(ctx, &desired); clientErr != nil { - return fmt.Errorf("failed to create: %w", clientErr) - } - params.Log.V(2).Info("created", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) - continue - } else if err != nil { - return fmt.Errorf("failed to get: %w", err) - } - - // it exists already, merge the two if the end result isn't identical to the existing one - updated := existing.DeepCopy() - if updated.Annotations == nil { - updated.Annotations = map[string]string{} - } - if updated.Labels == nil { - updated.Labels = map[string]string{} - } - updated.ObjectMeta.OwnerReferences = desired.ObjectMeta.OwnerReferences - - for k, v := range desired.ObjectMeta.Annotations { - updated.ObjectMeta.Annotations[k] = v - } - for k, v := range desired.ObjectMeta.Labels { - updated.ObjectMeta.Labels[k] = v - } - - patch := client.MergeFrom(existing) - - if err := params.Client.Patch(ctx, updated, patch); err != nil { - return fmt.Errorf("failed to apply changes: %w", err) - } - - params.Log.V(2).Info("applied", "serviceaccount.name", desired.Name, "serviceaccount.namespace", desired.Namespace) - } - - return nil -} - -func deleteServiceAccounts(ctx context.Context, params Params, expected []corev1.ServiceAccount) error { - opts := []client.ListOption{ - client.InNamespace(params.Instance.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.Instance.Namespace, params.Instance.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &corev1.ServiceAccountList{} - if err := params.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - existing := list.Items[i] - del := true - for _, keep := range expected { - if keep.Name == existing.Name && keep.Namespace == existing.Namespace { - del = false - break - } - } - - if del { - if err := params.Client.Delete(ctx, &existing); err != nil { - return fmt.Errorf("failed to delete: %w", err) - } - params.Log.V(2).Info("deleted", "serviceaccount.name", existing.Name, "serviceaccount.namespace", existing.Namespace) - } - } - - return nil -} diff --git a/pkg/collector/serviceaccount.go b/pkg/collector/serviceaccount.go deleted file mode 100644 index 27970ad7c..000000000 --- a/pkg/collector/serviceaccount.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. -func ServiceAccountName(instance v1alpha1.AmazonCloudWatchAgent) string { - if len(instance.Spec.ServiceAccount) == 0 { - return naming.ServiceAccount(instance) - } - - return instance.Spec.ServiceAccount -} - -// ServiceAccount returns the service account for the given instance. -func ServiceAccount(otelcol v1alpha1.AmazonCloudWatchAgent) corev1.ServiceAccount { - name := naming.ServiceAccount(otelcol) - labels := Labels(otelcol, name, []string{}) - - return corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: otelcol.Namespace, - Labels: labels, - Annotations: otelcol.Annotations, - }, - } -} diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index 1ec75d3dc..84706e46e 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -17,7 +17,7 @@ package upgrade import ( "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // nolint unused diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index 9496b9f47..b1cd5a808 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -36,8 +36,8 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" // +kubebuilder:scaffold:imports ) diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 1fed413c5..c21bc3971 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -25,8 +25,8 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) type VersionUpgrade struct { diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 500bf3068..ac44a7f47 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -25,9 +25,9 @@ import ( "k8s.io/client-go/tools/record" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index c8532a190..db36684c3 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -15,7 +15,7 @@ package upgrade import ( - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index d087076d9..3f41b15ea 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -24,9 +24,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func TestRemoveMetricsTypeFlags(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index 40969c706..0b8bd509f 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index e599469dc..97515f95c 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -24,10 +24,10 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func TestRemoveQueuedRetryProcessor(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 41c2777ba..76a1f5172 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 2d56c7609..1ec95fdfd 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func TestHealthCheckEndpointMigration(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index f1a86a189..9ca7fa35d 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -15,7 +15,7 @@ package upgrade import ( - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // this is our first version under otel/opentelemetry-collector. diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index fc9b28514..eb5e7a8fb 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index b240abce3..6067c08f9 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func TestInfluxdbReceiverPropertyDrop(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 8cdce1f7e..b57a279b2 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index 7d4e31a64..4ab1dc41c 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_36_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 901cb40c1..21e45558a 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -22,8 +22,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index 0cf1670cf..f86b929c4 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_38_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go index fcbc4996c..b2bfeab9e 100644 --- a/pkg/collector/upgrade/v0_39_0.go +++ b/pkg/collector/upgrade/v0_39_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go index f8dd436f4..67615fd8a 100644 --- a/pkg/collector/upgrade/v0_39_0_test.go +++ b/pkg/collector/upgrade/v0_39_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_39_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go index 634b7818e..9af14ced2 100644 --- a/pkg/collector/upgrade/v0_41_0.go +++ b/pkg/collector/upgrade/v0_41_0.go @@ -18,8 +18,8 @@ import ( "fmt" "strings" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go index 24e49371e..ee6681323 100644 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_41_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go index f9ef7887a..5c1455c0f 100644 --- a/pkg/collector/upgrade/v0_43_0.go +++ b/pkg/collector/upgrade/v0_43_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go index 8bb650c50..c935d5f9e 100644 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -23,9 +23,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_43_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go index 16ac0080d..0a3f4668d 100644 --- a/pkg/collector/upgrade/v0_56_0.go +++ b/pkg/collector/upgrade/v0_56_0.go @@ -21,8 +21,8 @@ import ( autoscalingv1 "k8s.io/api/autoscaling/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_56_0_test.go b/pkg/collector/upgrade/v0_56_0_test.go index 639ceccb7..899669d8c 100644 --- a/pkg/collector/upgrade/v0_56_0_test.go +++ b/pkg/collector/upgrade/v0_56_0_test.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_56_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go index 0656e2a94..9b097a172 100644 --- a/pkg/collector/upgrade/v0_57_2.go +++ b/pkg/collector/upgrade/v0_57_2.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_57_2_test.go b/pkg/collector/upgrade/v0_57_2_test.go index f3f392424..b35f414ae 100644 --- a/pkg/collector/upgrade/v0_57_2_test.go +++ b/pkg/collector/upgrade/v0_57_2_test.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func Test0_57_0Upgrade(t *testing.T) { diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go index 60699ecd1..dd3c87bdc 100644 --- a/pkg/collector/upgrade/v0_61_0.go +++ b/pkg/collector/upgrade/v0_61_0.go @@ -19,8 +19,8 @@ import ( "fmt" "strings" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { diff --git a/pkg/collector/upgrade/v0_61_0_test.go b/pkg/collector/upgrade/v0_61_0_test.go index 5c43aa32b..76425dcad 100644 --- a/pkg/collector/upgrade/v0_61_0_test.go +++ b/pkg/collector/upgrade/v0_61_0_test.go @@ -22,9 +22,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) var ( diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 49a791fa8..5201f8a03 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -20,8 +20,8 @@ import ( "gopkg.in/yaml.v2" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector/adapters" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 98b96b954..2e2282eb8 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -24,9 +24,9 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/version" - "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) func TestRemoveConnectionDelay(t *testing.T) { diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index ae0870f04..40820972c 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -17,7 +17,7 @@ package upgrade import ( "github.com/Masterminds/semver/v3" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) diff --git a/pkg/collector/utils.go b/pkg/collector/utils.go deleted file mode 100644 index 5e8537dbd..000000000 --- a/pkg/collector/utils.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -func getDNSPolicy(otelcol v1alpha1.AmazonCloudWatchAgent) corev1.DNSPolicy { - dnsPolicy := corev1.DNSClusterFirst - if otelcol.Spec.HostNetwork { - dnsPolicy = corev1.DNSClusterFirstWithHostNet - } - return dnsPolicy -} diff --git a/pkg/collector/volume.go b/pkg/collector/volume.go deleted file mode 100644 index dda640c04..000000000 --- a/pkg/collector/volume.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package collector handles the CloudWatch Agent. -package collector - -import ( - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/naming" -) - -// Volumes builds the volumes for the given instance, including the config map volume. -func Volumes(cfg config.Config, otelcol v1alpha1.AmazonCloudWatchAgent) []corev1.Volume { - volumes := []corev1.Volume{{ - Name: naming.ConfigMapVolume(), - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: naming.ConfigMap(otelcol)}, - Items: []corev1.KeyToPath{{ - Key: cfg.CollectorConfigMapEntry(), - Path: cfg.CollectorConfigMapEntry(), - }}, - }, - }, - }} - - if len(otelcol.Spec.Volumes) > 0 { - volumes = append(volumes, otelcol.Spec.Volumes...) - } - - return volumes -} diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index 5c85dbff9..68d63fc9d 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -23,7 +23,7 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.7.0" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index ded356054..b03fe26b2 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestInjectApacheHttpdagent(t *testing.T) { diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 483725790..4f35513bc 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 9da037d51..895b94739 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestInjectDotNetSDK(t *testing.T) { diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go index 2ae2e6237..59125621e 100644 --- a/pkg/instrumentation/golang.go +++ b/pkg/instrumentation/golang.go @@ -20,8 +20,8 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) const ( diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go index 9cade61da..ba4ddc4b3 100644 --- a/pkg/instrumentation/golang_test.go +++ b/pkg/instrumentation/golang_test.go @@ -24,8 +24,8 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) func TestInjectGoSDK(t *testing.T) { diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 8306f773a..910b11737 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -23,8 +23,8 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "k8s.io/utils/strings/slices" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) var defaultSize = resource.MustParse("200Mi") diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go index 72db0b4f2..6282f928b 100644 --- a/pkg/instrumentation/helper_test.go +++ b/pkg/instrumentation/helper_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) func TestInitContainerMissing(t *testing.T) { diff --git a/pkg/instrumentation/instrumentation_suite_test.go b/pkg/instrumentation/instrumentation_suite_test.go index 4877f7355..4b4aa3596 100644 --- a/pkg/instrumentation/instrumentation_suite_test.go +++ b/pkg/instrumentation/instrumentation_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) var ( diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 5422cc08a..2e645eba7 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -17,7 +17,7 @@ package instrumentation import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 3a8c43b84..90999be61 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestInjectJavaagent(t *testing.T) { diff --git a/pkg/instrumentation/nginx.go b/pkg/instrumentation/nginx.go index 4855e5a54..10bdde5af 100644 --- a/pkg/instrumentation/nginx.go +++ b/pkg/instrumentation/nginx.go @@ -24,7 +24,7 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.7.0" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/nginx_test.go b/pkg/instrumentation/nginx_test.go index 6284f430b..ef520dcfb 100644 --- a/pkg/instrumentation/nginx_test.go +++ b/pkg/instrumentation/nginx_test.go @@ -23,7 +23,7 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) var nginxSdkInitContainerTestCommand = "echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh \"/opt/opentelemetry-webserver/agent\" \"/opt/opentelemetry-webserver/source-conf\" \"nginx.conf\" \"<>\"" diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 6d06bea36..9a2e3ce8e 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -17,7 +17,7 @@ package instrumentation import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 4b5d22dd8..832fc2b0d 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestInjectNodeJSSDK(t *testing.T) { diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 0a7878ae1..4653a6e9f 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -26,9 +26,9 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) var ( diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 7e764abf0..8429dd580 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -27,8 +27,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) func TestMutatePod(t *testing.T) { diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 0be23ee41..07def83c9 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -19,7 +19,7 @@ import ( corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) const ( diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index 7f7510c71..dbee8e761 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) func TestInjectPythonSDK(t *testing.T) { diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 0f6de945f..30abc63d7 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -24,8 +24,8 @@ import ( "github.com/go-logr/logr" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 013a5ffc3..9d503d447 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) var defaultVolumeLimitSize = resource.MustParse("200Mi") diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index d9dbec6c6..f39e9944f 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -24,9 +24,9 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) var ( diff --git a/pkg/instrumentation/upgrade/upgrade_suite_test.go b/pkg/instrumentation/upgrade/upgrade_suite_test.go index 11f62ea12..1a2926fc5 100644 --- a/pkg/instrumentation/upgrade/upgrade_suite_test.go +++ b/pkg/instrumentation/upgrade/upgrade_suite_test.go @@ -25,7 +25,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) var k8sClient client.Client diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index e4f6448e4..5614885e8 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -27,10 +27,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" - "github.com/open-telemetry/opentelemetry-operator/pkg/featuregate" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) func TestUpgrade(t *testing.T) { diff --git a/pkg/naming/dns.go b/pkg/naming/dns.go deleted file mode 100644 index d83908799..000000000 --- a/pkg/naming/dns.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package naming - -import ( - "regexp" - "strings" - "unicode/utf8" -) - -var regex = regexp.MustCompile(`[a-z0-9]`) - -// DNSName returns a dns-safe string for the given name. -// Any char that is not [a-z0-9] is replaced by "-" or "a". -// Replacement character "a" is used only at the beginning or at the end of the name. -// The function does not change length of the string. -// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/dns_name.go#L15 -func DNSName(name string) string { - var d []rune - - for i, x := range strings.ToLower(name) { - if regex.Match([]byte(string(x))) { - d = append(d, x) - } else { - if i == 0 || i == utf8.RuneCountInString(name)-1 { - d = append(d, 'a') - } else { - d = append(d, '-') - } - } - } - - return string(d) -} diff --git a/pkg/naming/main.go b/pkg/naming/main.go deleted file mode 100644 index a1dc89254..000000000 --- a/pkg/naming/main.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package naming is for determining the names for components (containers, services, ...). -package naming - -import ( - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -// ConfigMap builds the name for the config map used in the AmazonCloudWatchAgent containers. -func ConfigMap(_ v1alpha1.AmazonCloudWatchAgent) string { - return "cwaagentconfig" -} - -// ConfigMapVolume returns the name to use for the config map's volume in the pod. -func ConfigMapVolume() string { - return "cwaagentconfig" -} - -// Container returns the name to use for the container in the pod. -func Container() string { - return "cloudwatch-agent" -} - -// Agent builds the agent (deployment/daemonset) name based on the instance. -func Agent(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s", 63, agent.Name)) -} - -// AmazonCloudWatchAgent builds the agent (deployment/daemonset) name based on the instance. -func AmazonCloudWatchAgent(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s", 63, agent.Name)) -} - -// AmazonCloudWatchAgentName builds the agent (deployment/daemonset) name based on the instance. -func AmazonCloudWatchAgentName(agentName string) string { - return DNSName(Truncate("%s", 63, agentName)) -} - -// HeadlessService builds the name for the headless service based on the instance. -func HeadlessService(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s-headless", 63, Service(agent))) -} - -// MonitoringService builds the name for the monitoring service based on the instance. -func MonitoringService(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s-monitoring", 63, Service(agent))) -} - -// Service builds the service name based on the instance. -func Service(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s", 63, agent.Name)) -} - -// Ingress builds the ingress name based on the instance. -func Ingress(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s-ingress", 63, agent.Name)) -} - -// Route builds the route name based on the instance. -func Route(agent v1alpha1.AmazonCloudWatchAgent, prefix string) string { - return DNSName(Truncate("%s-%s-route", 63, prefix, agent.Name)) -} - -// ServiceAccount builds the service account name based on the instance. -func ServiceAccount(agent v1alpha1.AmazonCloudWatchAgent) string { - return DNSName(Truncate("%s", 63, "cloudwatch-agent")) -} diff --git a/pkg/naming/triming.go b/pkg/naming/triming.go deleted file mode 100644 index 95264349b..000000000 --- a/pkg/naming/triming.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package naming - -import ( - "fmt" - "regexp" -) - -var regexpEndReplace, regexpBeginReplace *regexp.Regexp - -func init() { - regexpEndReplace, _ = regexp.Compile("[^A-Za-z0-9]+$") - regexpBeginReplace, _ = regexp.Compile("^[^A-Za-z0-9]+") -} - -// Truncate will shorten the length of the instance name so that it contains at most max chars when combined with the fixed part -// If the fixed part is already bigger than the max, this function is noop. -// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/truncate.go#L17 -func Truncate(format string, max int, values ...interface{}) string { - var truncated []interface{} - result := fmt.Sprintf(format, values...) - if excess := len(result) - max; excess > 0 { - // we try to reduce the first string we find - for _, value := range values { - if excess == 0 { - truncated = append(truncated, value) - continue - } - - if s, ok := value.(string); ok { - if len(s) > excess { - value = s[:len(s)-excess] - excess = 0 - } else { - value = "" // skip this value entirely - excess = excess - len(s) - } - } - - truncated = append(truncated, value) - } - result = fmt.Sprintf(format, truncated...) - } - - // if at this point, the result is still bigger than max, apply a hard cap: - if len(result) > max { - return result[:max] - } - - return trimNonAlphaNumeric(result) -} - -// trimNonAlphaNumeric remove all non-alphanumeric values from start and end of the string -// source: https://github.com/jaegertracing/jaeger-operator/blob/91e3b69ee5c8761bbda9d3cf431400a73fc1112a/pkg/util/truncate.go#L53 -func trimNonAlphaNumeric(text string) string { - newText := regexpEndReplace.ReplaceAllString(text, "") - return regexpBeginReplace.ReplaceAllString(newText, "") -} diff --git a/pkg/sidecar/attributes.go b/pkg/sidecar/attributes.go index e40492f78..30e64c630 100644 --- a/pkg/sidecar/attributes.go +++ b/pkg/sidecar/attributes.go @@ -25,7 +25,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) const resourceAttributesEnvName = "OTEL_RESOURCE_ATTRIBUTES" diff --git a/pkg/sidecar/attributes_test.go b/pkg/sidecar/attributes_test.go index b636075f8..7085047b7 100644 --- a/pkg/sidecar/attributes_test.go +++ b/pkg/sidecar/attributes_test.go @@ -24,7 +24,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/open-telemetry/opentelemetry-operator/pkg/constants" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) func TestGetAttributesEnvNoPodReferences(t *testing.T) { diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 6c119fc59..17c246a79 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,10 +21,10 @@ import ( "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/manifests/collector" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) const ( diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index a6d6070f7..e2853f3a9 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -23,9 +23,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) var logger = logf.Log.WithName("unit-tests") diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index a7a0737b5..02fffd33d 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -26,9 +26,9 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/open-telemetry/opentelemetry-operator/apis/v1alpha1" - "github.com/open-telemetry/opentelemetry-operator/internal/config" - "github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation" + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" + "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" ) var ( diff --git a/tests/e2e-autoscale/autoscale/00-assert.yaml b/tests/e2e-autoscale/autoscale/00-assert.yaml deleted file mode 100644 index 2546b5462..000000000 --- a/tests/e2e-autoscale/autoscale/00-assert.yaml +++ /dev/null @@ -1,86 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-set-utilization-collector -status: - readyReplicas: 1 ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: simplest-collector -spec: - scaleTargetRef: - kind: OpenTelemetryCollector - name: simplest - apiVersion: opentelemetry.io/v1alpha1 - minReplicas: 1 - maxReplicas: 2 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 90 - behavior: - scaleUp: - stabilizationWindowSeconds: 10 - selectPolicy: Max - policies: - - type: Pods - value: 4 - periodSeconds: 15 - - type: Percent - value: 100 - periodSeconds: 15 - scaleDown: - stabilizationWindowSeconds: 15 - selectPolicy: Max - policies: - - type: Percent - value: 100 - periodSeconds: 15 ---- -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: simplest-set-utilization-collector -spec: - scaleTargetRef: - kind: OpenTelemetryCollector - name: simplest-set-utilization - apiVersion: opentelemetry.io/v1alpha1 - minReplicas: 1 - maxReplicas: 2 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 99 - behavior: - scaleUp: - stabilizationWindowSeconds: 300 - selectPolicy: Max - policies: - - type: Pods - value: 4 - periodSeconds: 15 - - type: Percent - value: 100 - periodSeconds: 15 - scaleDown: - selectPolicy: Max - policies: - - type: Percent - value: 100 - periodSeconds: 15 diff --git a/tests/e2e-autoscale/autoscale/00-install.yaml b/tests/e2e-autoscale/autoscale/00-install.yaml deleted file mode 100644 index 8f5f5fa92..000000000 --- a/tests/e2e-autoscale/autoscale/00-install.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# This creates two different deployments: -# * The first one is to ensure an autoscaler is created without -# setting any metrics in the Spec. -# * The second is to check that scaling works properly and that -# spec updates are working as expected. -# -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: -# TODO: these tests use .Spec.MaxReplicas and .Spec.MinReplicas. These fields are -# deprecated and moved to .Spec.Autoscaler. Fine to use these fields to test that old CRD is -# still supported but should eventually be updated. - minReplicas: 1 - maxReplicas: 2 - autoscaler: - behavior: - scaleUp: - stabilizationWindowSeconds: 10 - scaleDown: - stabilizationWindowSeconds: 15 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest-set-utilization -spec: - minReplicas: 1 - maxReplicas: 2 - autoscaler: - targetCPUUtilization: 99 - behavior: - scaleUp: - stabilizationWindowSeconds: 300 - resources: - limits: - cpu: 250m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-autoscale/autoscale/01-assert.yaml b/tests/e2e-autoscale/autoscale/01-assert.yaml deleted file mode 100644 index faae4da95..000000000 --- a/tests/e2e-autoscale/autoscale/01-assert.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: simplest-set-utilization-collector -spec: - scaleTargetRef: - kind: OpenTelemetryCollector - name: simplest-set-utilization - apiVersion: opentelemetry.io/v1alpha1 - minReplicas: 1 - maxReplicas: 2 - metrics: - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: 60 - behavior: - scaleUp: - stabilizationWindowSeconds: 1 - selectPolicy: Max - policies: - - type: Pods - value: 4 - periodSeconds: 15 - - type: Percent - value: 100 - periodSeconds: 15 - scaleDown: - stabilizationWindowSeconds: 15 - selectPolicy: Max - policies: - - type: Percent - value: 100 - periodSeconds: 15 diff --git a/tests/e2e-autoscale/autoscale/01-install.yaml b/tests/e2e-autoscale/autoscale/01-install.yaml deleted file mode 100644 index a9a6d549c..000000000 --- a/tests/e2e-autoscale/autoscale/01-install.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# This updates an existing deployment with a new Spec. -# Target memory utilization is now added. -# scaleDown and scaleUp behavior is now added. -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest-set-utilization -spec: - minReplicas: 1 - maxReplicas: 2 - autoscaler: - targetCPUUtilization: 60 - # Without this behavior the HPA will default to a scaledown stabilization - # window of 300 seconds. Tests should fail if this update is not successful. - behavior: - scaleDown: - stabilizationWindowSeconds: 15 - scaleUp: - stabilizationWindowSeconds: 1 - resources: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] \ No newline at end of file diff --git a/tests/e2e-autoscale/autoscale/02-assert.yaml b/tests/e2e-autoscale/autoscale/02-assert.yaml deleted file mode 100644 index 8dc83f76b..000000000 --- a/tests/e2e-autoscale/autoscale/02-assert.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest-set-utilization -status: - scale: - replicas: 2 diff --git a/tests/e2e-autoscale/autoscale/02-install.yaml b/tests/e2e-autoscale/autoscale/02-install.yaml deleted file mode 100644 index 29d8853c1..000000000 --- a/tests/e2e-autoscale/autoscale/02-install.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-set-utilization -spec: - template: - spec: - containers: - - name: telemetrygen - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen - command: - - "./telemetrygen" - args: - - --otlp-endpoint=simplest-set-utilization-collector-headless:4317 - - --otlp-insecure - # High duration to ensure the trace creation doesn't stop. - # It'll be stopped in step 4 - - --duration=1m - - --workers=20 - - traces - restartPolicy: Never - backoffLimit: 4 diff --git a/tests/e2e-autoscale/autoscale/03-assert.yaml b/tests/e2e-autoscale/autoscale/03-assert.yaml deleted file mode 100644 index d67919fa3..000000000 --- a/tests/e2e-autoscale/autoscale/03-assert.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest-set-utilization -status: - scale: - replicas: 1 diff --git a/tests/e2e-autoscale/autoscale/03-delete.yaml b/tests/e2e-autoscale/autoscale/03-delete.yaml deleted file mode 100644 index 5e39ab40d..000000000 --- a/tests/e2e-autoscale/autoscale/03-delete.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: batch/v1 - kind: Job - propagationPolicy: Background - metadata: - name: telemetrygen-set-utilization \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml deleted file mode 100644 index 5b0d06576..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] - ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml deleted file mode 100644 index 26bcbaf9e..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/00-install-instrumentation.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: apache -spec: - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - apacheHttpd: - attrs: - - name: ApacheModuleOtelMaxQueueSize - value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml deleted file mode 100644 index 3634f82b5..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-apache-httpd: 'true' - sidecar.opentelemetry.io/inject: 'true' - labels: - app: my-apache -spec: - containers: - - env: - - name: OTEL_SERVICE_NAME - value: my-apache - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: '0.25' - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: otel-apache-agent - mountPath: /opt/opentelemetry-webserver/agent - - name: otel-apache-conf-dir - mountPath: /usr/local/apache2/conf - - args: - - --config=env:OTEL_CONFIG - name: otc-container - initContainers: - - args: - - cp -r /usr/local/apache2/conf/* /opt/opentelemetry-webserver/source-conf - name: otel-agent-source-container-clone - - args: - - cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo "/opt/opentelemetry-webserver/agent/logs" | sed 's,/,\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo "$OTEL_APACHE_AGENT_CONF" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf - name: otel-agent-attach-apache -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml deleted file mode 100644 index 96f132611..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-install-app.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-apache -spec: - selector: - matchLabels: - app: my-apache - replicas: 1 - template: - metadata: - labels: - app: my-apache - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-apache-httpd: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - ports: - - containerPort: 8080 - resources: - limits: - cpu: "1" - memory: 500Mi - requests: - cpu: 250m - memory: 100Mi diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml deleted file mode 100644 index ee92c1656..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: opentelemetry.io/v1alpha1 -#kind: OpenTelemetryCollector -#metadata: -# name: sidecar -#spec: -# mode: sidecar -# config: | -# receivers: -# otlp: -# protocols: -# grpc: -# http: -# processors: -# exporters: -# debug: -# service: -# pipelines: -# traces: -# receivers: [otlp] -# processors: [] -# exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index 4d7a2b22f..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: opentelemetry.io/v1alpha1 -#kind: Instrumentation -#metadata: -# name: apache -#spec: -# exporter: -# endpoint: http://localhost:4317 -# propagators: -# - jaeger -# - b3 -# sampler: -# type: parentbased_traceidratio -# argument: "0.25" -# apacheHttpd: -# attrs: -# - name: ApacheModuleOtelMaxQueueSize -# value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml deleted file mode 100644 index c2f7496e9..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: v1 -#kind: Pod -#metadata: -# annotations: -# sidecar.opentelemetry.io/inject: "true" -# instrumentation.opentelemetry.io/inject-apache-httpd: "true" -# instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" -# labels: -# app: my-apache -#spec: -# containers: -# - env: -# - name: OTEL_SERVICE_NAME -# value: my-apache -# - name: OTEL_EXPORTER_OTLP_ENDPOINT -# value: http://localhost:4317 -# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: metadata.name -# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: spec.nodeName -# - name: OTEL_PROPAGATORS -# value: jaeger,b3 -# - name: OTEL_TRACES_SAMPLER -# value: parentbased_traceidratio -# - name: OTEL_TRACES_SAMPLER_ARG -# value: "0.25" -# - name: OTEL_RESOURCE_ATTRIBUTES -# name: myapp -# volumeMounts: -# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount -# - mountPath: /opt/opentelemetry-webserver/agent -# name: otel-apache-agent -# - mountPath: /usr/local/apache2/conf -# name: otel-apache-conf-dir -# - env: -# - name: OTEL_SERVICE_NAME -# value: my-apache -# - name: OTEL_EXPORTER_OTLP_ENDPOINT -# value: http://localhost:4317 -# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: metadata.name -# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: spec.nodeName -# - name: OTEL_PROPAGATORS -# value: jaeger,b3 -# - name: OTEL_TRACES_SAMPLER -# value: parentbased_traceidratio -# - name: OTEL_TRACES_SAMPLER_ARG -# value: "0.25" -# - name: OTEL_RESOURCE_ATTRIBUTES -# name: myrabbit -# volumeMounts: -# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount -# - args: -# - --config=env:OTEL_CONFIG -# name: otc-container -#status: -# phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml deleted file mode 100644 index 1d7fbb025..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: apps/v1 -#kind: Deployment -#metadata: -# name: my-apache -#spec: -# selector: -# matchLabels: -# app: my-apache -# replicas: 1 -# template: -# metadata: -# labels: -# app: my-apache -# annotations: -# sidecar.opentelemetry.io/inject: "true" -# instrumentation.opentelemetry.io/inject-apache-httpd: "true" -# instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" -# spec: -# containers: -# - name: myapp -# image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e -# # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd -# # licensed under Apache 2.0 -# imagePullPolicy: Always -# ports: -# - containerPort: 8080 -# resources: -# limits: -# cpu: "1" -# memory: 500Mi -# requests: -# cpu: 250m -# memory: 100Mi -# - name: myrabbit -# image: rabbitmq diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml deleted file mode 100644 index dd2981899..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: v1 -#kind: Pod -#metadata: -# annotations: -# instrumentation.opentelemetry.io/inject-apache-httpd: "true" -# sidecar.opentelemetry.io/inject: "true" -# labels: -# app: my-apache -#spec: -# containers: -# - env: -# - name: OTEL_SERVICE_NAME -# value: my-apache -# - name: OTEL_EXPORTER_OTLP_ENDPOINT -# value: http://localhost:4317 -# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: metadata.name -# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: spec.nodeName -# - name: OTEL_PROPAGATORS -# value: jaeger,b3 -# - name: OTEL_TRACES_SAMPLER -# value: parentbased_traceidratio -# - name: OTEL_TRACES_SAMPLER_ARG -# value: "0.25" -# - name: OTEL_RESOURCE_ATTRIBUTES -# name: myapp -# volumeMounts: -# - mountPath: /var/run/secrets/kubernetes.io/serviceaccount -# - mountPath: /opt/opentelemetry-webserver/agent -# name: otel-apache-agent -# - mountPath: /usr/local/apache2/conf -# name: otel-apache-conf-dir -# - env: -# - name: OTEL_SERVICE_NAME -# value: my-apache -# - name: OTEL_EXPORTER_OTLP_ENDPOINT -# value: http://localhost:4317 -# - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: metadata.name -# - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME -# valueFrom: -# fieldRef: -# apiVersion: v1 -# fieldPath: spec.nodeName -# - name: OTEL_PROPAGATORS -# value: jaeger,b3 -# - name: OTEL_TRACES_SAMPLER -# value: parentbased_traceidratio -# - name: OTEL_TRACES_SAMPLER_ARG -# value: "0.25" -# - name: OTEL_RESOURCE_ATTRIBUTES -# name: myrabbit -# - args: -# - --config=env:OTEL_CONFIG -# name: otc-container -#status: -# phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml deleted file mode 100644 index 8044cda2f..000000000 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -#apiVersion: apps/v1 -#kind: Deployment -#metadata: -# name: my-apache -#spec: -# selector: -# matchLabels: -# app: my-apache -# replicas: 1 -# template: -# metadata: -# labels: -# app: my-apache -# annotations: -# sidecar.opentelemetry.io/inject: "true" -# instrumentation.opentelemetry.io/inject-apache-httpd: "true" -# instrumentation.opentelemetry.io/container-names: "myrabbit" -# spec: -# containers: -# - name: myapp -# image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e -# # image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd -# # licensed under Apache 2.0 -# imagePullPolicy: Always -# ports: -# - containerPort: 8080 -# resources: -# limits: -# cpu: "1" -# memory: 500Mi -# requests: -# cpu: 250m -# memory: 100Mi -# - name: myrabbit -# image: rabbitmq diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml deleted file mode 100644 index b00affd4c..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index 71351ee43..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: dotnet -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3multi - sampler: - type: parentbased_traceidratio - argument: "0.25" - dotnet: - env: - - name: OTEL_LOG_LEVEL - value: "debug" \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml deleted file mode 100644 index c3083f377..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml +++ /dev/null @@ -1,96 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myapp,myrabbit - instrumentation.opentelemetry.io/inject-dotnet: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_LOG_LEVEL - value: "debug" - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3multi - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: myrabbit - env: - - name: OTEL_LOG_LEVEL - value: "debug" - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3multi - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml deleted file mode 100644 index b77a2a744..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml deleted file mode 100644 index 4cd732090..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myrabbit - instrumentation.opentelemetry.io/inject-dotnet: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: myrabbit - env: - - name: OTEL_LOG_LEVEL - value: "debug" - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3multi - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml deleted file mode 100644 index 87930b15f..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml deleted file mode 100644 index b03a72e60..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml deleted file mode 100644 index 80ca25ca5..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/00-install-instrumentation.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: dotnet -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3multi - sampler: - type: parentbased_traceidratio - argument: "0.25" diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml deleted file mode 100644 index 40fedff84..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml +++ /dev/null @@ -1,66 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-musl-x64" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3multi - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-dotnet - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: "500m" - memory: "128Mi" - requests: - cpu: "50m" - memory: "128Mi" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml deleted file mode 100644 index e8d32f7b4..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-install-app.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/otel-dotnet-auto-runtime: "linux-musl-x64" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml deleted file mode 100644 index 80ca25ca5..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet/00-install-instrumentation.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: dotnet -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3multi - sampler: - type: parentbased_traceidratio - argument: "0.25" diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml deleted file mode 100644 index 68178cc2d..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3multi - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-dotnet - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: "500m" - memory: "128Mi" - requests: - cpu: "50m" - memory: "128Mi" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml deleted file mode 100644 index 15e58506f..000000000 --- a/tests/e2e-instrumentation/instrumentation-dotnet/01-install-app.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-dotnet: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml deleted file mode 100644 index b00affd4c..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml deleted file mode 100644 index f5f640dbf..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/00-install-instrumentation.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: go -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" diff --git a/tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml b/tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml deleted file mode 100644 index e8a82d749..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/01-add-scc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Create a SA to apply the SCC policy -apiVersion: v1 -kind: ServiceAccount -metadata: - name: otel-instrumentation-go ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - script: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=0/0 --overwrite - - script: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite - # Add the SCC - - script: ./add-scc.sh diff --git a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml deleted file mode 100644 index 1d0787dc3..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-go: "true" - instrumentation.opentelemetry.io/otel-go-auto-target-exe: /usr/src/app/productcatalogservice - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: productcatalogservice - - name: otc-container - - name: opentelemetry-auto-instrumentation - resources: - limits: - cpu: "500m" - memory: "32Mi" - requests: - cpu: "50m" - memory: "32Mi" - image: ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:v0.8.0-alpha - env: - - name: OTEL_GO_AUTO_TARGET_EXE - value: /usr/src/app/productcatalogservice - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - name: kernel-debug - mountPath: "/sys/kernel/debug" - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml deleted file mode 100644 index 1a4eb45ce..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/02-install-app.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-go: "true" - instrumentation.opentelemetry.io/otel-go-auto-target-exe: /usr/src/app/productcatalogservice - spec: - serviceAccountName: otel-instrumentation-go - securityContext: - runAsUser: 0 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: productcatalogservice - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-golang:main diff --git a/tests/e2e-instrumentation/instrumentation-go/add-scc.sh b/tests/e2e-instrumentation/instrumentation-go/add-scc.sh deleted file mode 100755 index d5bb738b3..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/add-scc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then - kubectl apply -f scc.yaml - oc adm policy add-scc-to-user otel-go-instrumentation -z otel-instrumentation-go -n $NAMESPACE -fi diff --git a/tests/e2e-instrumentation/instrumentation-go/scc.yaml b/tests/e2e-instrumentation/instrumentation-go/scc.yaml deleted file mode 100644 index b32985664..000000000 --- a/tests/e2e-instrumentation/instrumentation-go/scc.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: security.openshift.io/v1 -kind: SecurityContextConstraints -metadata: - name: otel-go-instrumentation -allowHostDirVolumePlugin: true -allowPrivilegeEscalation: true -allowPrivilegedContainer: true -fsGroup: - type: RunAsAny -runAsUser: - type: RunAsAny -seLinuxContext: - type: RunAsAny -seccompProfiles: -- '*' -supplementalGroups: - type: RunAsAny diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml deleted file mode 100644 index b00affd4c..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index f77a3f835..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: java -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml deleted file mode 100644 index bb15aa269..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myapp,myrabbit - instrumentation.opentelemetry.io/inject-java: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: myrabbit - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml deleted file mode 100644 index b3b563780..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml deleted file mode 100644 index f93b4e752..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myrabbit - instrumentation.opentelemetry.io/inject-java: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: myrabbit - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml deleted file mode 100644 index 4c7a1339c..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml deleted file mode 100644 index ee6bc7f70..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/01-cleanup-other-ns.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: v1 - kind: Namespace - name: my-other-ns diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml deleted file mode 100644 index 1cc0dfd27..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/02-install-instrumentation.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: my-other-ns ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: java - namespace: my-other-ns -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml deleted file mode 100644 index 99252fdf9..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "my-other-ns/java" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-java - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml deleted file mode 100644 index 962207dd8..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-install-app.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "my-other-ns/java" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml deleted file mode 100644 index ee6bc7f70..000000000 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/04-cleanup-other-ns.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: v1 - kind: Namespace - name: my-other-ns diff --git a/tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-java/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml deleted file mode 100644 index f77a3f835..000000000 --- a/tests/e2e-instrumentation/instrumentation-java/00-install-instrumentation.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: java -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" diff --git a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml deleted file mode 100644 index 5dec65bab..000000000 --- a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-java - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: "500m" - memory: "64Mi" - requests: - cpu: "50m" - memory: "64Mi" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml deleted file mode 100644 index 17be6d12e..000000000 --- a/tests/e2e-instrumentation/instrumentation-java/01-install-app.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-java: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml deleted file mode 100644 index c18f418bf..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] - ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml deleted file mode 100644 index 9c8297f89..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/00-install-instrumentation.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: nginx -spec: - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - nginx: - attrs: - - name: NginxModuleOtelMaxQueueSize - value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml deleted file mode 100644 index ff21ccd67..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-nginx: 'true' - sidecar.opentelemetry.io/inject: 'true' - labels: - app: my-nginx -spec: - containers: - - env: - - name: LD_LIBRARY_PATH - value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: '0.25' - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: otel-nginx-agent - mountPath: /opt/opentelemetry-webserver/agent - - name: otel-nginx-conf-dir - mountPath: /etc/nginx - - args: - - --config=env:OTEL_CONFIG - name: otc-container - initContainers: - - args: - - cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt - name: otel-agent-source-container-clone - - name: otel-agent-attach-nginx - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - args: - - echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh "/opt/opentelemetry-webserver/agent" "/opt/opentelemetry-webserver/source-conf" "nginx.conf" "<>" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml deleted file mode 100644 index 70fcc626a..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-install-app.yaml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-nginx -spec: - selector: - matchLabels: - app: my-nginx - replicas: 1 - template: - metadata: - labels: - app: my-nginx - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nginx: "true" - spec: - containers: - - name: myapp - image: nginxinc/nginx-unprivileged:1.23.1 - imagePullPolicy: Always - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - ports: - - containerPort: 8765 - env: - - name: LD_LIBRARY_PATH - value: /opt - volumeMounts: - - name: nginx-conf - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - readOnly: true - imagePullPolicy: Always - resources: - limits: - cpu: "1" - memory: 500Mi - requests: - cpu: 250m - memory: 100Mi - volumes: - - name: nginx-conf - configMap: - name: nginx-conf - items: - - key: nginx.conf - path: nginx.conf - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: nginx-conf -data: - nginx.conf: | - # user nginx; - pid /tmp/nginx.pid; - worker_processes 1; - events { - worker_connections 10240; - } - http { - include /etc/nginx/conf.d/*.conf; - client_body_temp_path /tmp/client_temp; - proxy_temp_path /tmp/proxy_temp_path; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - listen 8765; - server_name localhost; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /api/customer/ { - proxy_pass http://localhost:8282/api/customer/; - } - location /api/vendor/ { - proxy_pass http://localhost:8383/api/vendor/; - } - - location /seznam { - proxy_pass http://www.seznam.cz/; - } - } - - } - ---- diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml deleted file mode 100644 index cb02aa005..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] - ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index 1f5296bc0..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: nginx -spec: - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - nginx: - attrs: - - name: NginxModuleOtelMaxQueueSize - value: "4096" - diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml deleted file mode 100644 index 6d8a744ae..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nginx: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - labels: - app: my-nginx -spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - env: - - name: LD_LIBRARY_PATH - value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /opt/opentelemetry-webserver/agent - name: otel-nginx-agent - - mountPath: /etc/nginx - name: otel-nginx-conf-dir - - env: - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myrabbit - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - args: - - --config=env:OTEL_CONFIG - name: otc-container -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml deleted file mode 100644 index 198cf20e1..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,119 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-nginx -spec: - selector: - matchLabels: - app: my-nginx - replicas: 1 - template: - metadata: - labels: - app: my-nginx - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nginx: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - name: myapp - image: nginxinc/nginx-unprivileged:1.23.1 - imagePullPolicy: Always - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - runAsNonRoot: true - allowPrivilegeEscalation: false - seccompProfile: - type: RuntimeDefault - capabilities: - drop: ["ALL"] - ports: - - containerPort: 8765 - env: - - name: LD_LIBRARY_PATH - value: /opt - volumeMounts: - - name: nginx-conf - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - readOnly: true - imagePullPolicy: Always - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 100Mi - - name: myrabbit - image: rabbitmq - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - volumes: - - name: nginx-conf - configMap: - name: nginx-conf - items: - - key: nginx.conf - path: nginx.conf - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: nginx-conf -data: - nginx.conf: | - # user nginx; - pid /tmp/nginx.pid; - worker_processes 1; - events { - worker_connections 10240; - } - http { - include /etc/nginx/conf.d/*.conf; - client_body_temp_path /tmp/client_temp; - proxy_temp_path /tmp/proxy_temp_path; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - listen 8765; - server_name localhost; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /api/customer/ { - proxy_pass http://localhost:8282/api/customer/; - } - location /api/vendor/ { - proxy_pass http://localhost:8383/api/vendor/; - } - - location /seznam { - proxy_pass http://www.seznam.cz/; - } - } - - } - ---- diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml deleted file mode 100644 index 1e13e4de4..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-nginx: "true" - sidecar.opentelemetry.io/inject: "true" - labels: - app: my-nginx -spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - env: - - name: LD_LIBRARY_PATH - value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /opt/opentelemetry-webserver/agent - name: otel-nginx-agent - - mountPath: /etc/nginx - name: otel-nginx-conf-dir - - env: - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.25" - - name: OTEL_RESOURCE_ATTRIBUTES - name: myrabbit - - args: - - --config=env:OTEL_CONFIG - name: otc-container -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml deleted file mode 100644 index bc4ff4753..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,118 +0,0 @@ -# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936 -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-nginx -spec: - selector: - matchLabels: - app: my-nginx - replicas: 1 - template: - metadata: - labels: - app: my-nginx - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nginx: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - name: myapp - image: nginxinc/nginx-unprivileged:1.23.1 - imagePullPolicy: Always - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - runAsNonRoot: true - allowPrivilegeEscalation: false - seccompProfile: - type: RuntimeDefault - capabilities: - drop: ["ALL"] - ports: - - containerPort: 8765 - env: - - name: LD_LIBRARY_PATH - value: /opt - volumeMounts: - - name: nginx-conf - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - readOnly: true - imagePullPolicy: Always - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 100Mi - - name: myrabbit - image: rabbitmq - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - volumes: - - name: nginx-conf - configMap: - name: nginx-conf - items: - - key: nginx.conf - path: nginx.conf ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: nginx-conf -data: - nginx.conf: | - # user nginx; - pid /tmp/nginx.pid; - worker_processes 1; - events { - worker_connections 10240; - } - http { - include /etc/nginx/conf.d/*.conf; - client_body_temp_path /tmp/client_temp; - proxy_temp_path /tmp/proxy_temp_path; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - listen 8765; - server_name localhost; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /api/customer/ { - proxy_pass http://localhost:8282/api/customer/; - } - location /api/vendor/ { - proxy_pass http://localhost:8383/api/vendor/; - } - - location /seznam { - proxy_pass http://www.seznam.cz/; - } - } - - } - ---- diff --git a/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml deleted file mode 100644 index c18f418bf..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx/00-install-collector.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - logging: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] - ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml deleted file mode 100644 index 9c8297f89..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx/00-install-instrumentation.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: nginx -spec: - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - nginx: - attrs: - - name: NginxModuleOtelMaxQueueSize - value: "4096" diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml deleted file mode 100644 index ff3846d22..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-nginx: 'true' - sidecar.opentelemetry.io/inject: 'true' - labels: - app: my-nginx -spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - env: - - name: LD_LIBRARY_PATH - value: /opt:/opt/opentelemetry-webserver/agent/sdk_lib/lib - - name: OTEL_SERVICE_NAME - value: my-nginx - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: spec.nodeName - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: '0.25' - - name: OTEL_RESOURCE_ATTRIBUTES - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: otel-nginx-agent - mountPath: /opt/opentelemetry-webserver/agent - - name: otel-nginx-conf-dir - mountPath: /etc/nginx - - args: - - --config=env:OTEL_CONFIG - name: otc-container - initContainers: - - args: - - cp -r /etc/nginx/* /opt/opentelemetry-webserver/source-conf && export NGINX_VERSION=$( { nginx -v ; } 2>&1 ) && echo ${NGINX_VERSION##*/} > /opt/opentelemetry-webserver/source-conf/version.txt - name: otel-agent-source-container-clone - - name: otel-agent-attach-nginx - args: - - echo -e $OTEL_NGINX_I13N_SCRIPT > /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && chmod +x /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && cat /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh && /opt/opentelemetry-webserver/agent/nginx_instrumentation.sh "/opt/opentelemetry-webserver/agent" "/opt/opentelemetry-webserver/source-conf" "nginx.conf" "<>" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml deleted file mode 100644 index a7d86790e..000000000 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-install-app.yaml +++ /dev/null @@ -1,104 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-nginx -spec: - selector: - matchLabels: - app: my-nginx - replicas: 1 - template: - metadata: - labels: - app: my-nginx - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nginx: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - containers: - - name: myapp - image: nginxinc/nginx-unprivileged:1.23.1 - imagePullPolicy: Always - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - # following to test lifecycle removal in cloned init container - lifecycle: - postStart: - exec: - command: ["/bin/sh", "-c", "echo Hello from the postStart handler"] - ports: - - containerPort: 8765 - env: - - name: LD_LIBRARY_PATH - value: /opt - volumeMounts: - - name: nginx-conf - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - readOnly: true - imagePullPolicy: Always - resources: - limits: - cpu: "1" - memory: 500Mi - requests: - cpu: 250m - memory: 100Mi - volumes: - - name: nginx-conf - configMap: - name: nginx-conf - items: - - key: nginx.conf - path: nginx.conf - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: nginx-conf -data: - nginx.conf: | - # user nginx; - worker_processes 1; - pid /tmp/nginx.pid; - events { - worker_connections 10240; - } - http { - include /etc/nginx/conf.d/*.conf; - client_body_temp_path /tmp/client_temp; - proxy_temp_path /tmp/proxy_temp_path; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - listen 8765; - server_name localhost; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - location /api/customer/ { - proxy_pass http://localhost:8282/api/customer/; - } - location /api/vendor/ { - proxy_pass http://localhost:8383/api/vendor/; - } - - location /seznam { - proxy_pass http://www.seznam.cz/; - } - } - - } - ---- diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml deleted file mode 100644 index b00affd4c..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index f77a3f835..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: java -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml deleted file mode 100644 index ff68ac36c..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myapp,myrabbit - instrumentation.opentelemetry.io/inject-nodejs: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: myrabbit - env: - - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml deleted file mode 100644 index a850a3cfc..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml deleted file mode 100644 index 5b60ac8f1..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml +++ /dev/null @@ -1,44 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myrabbit - instrumentation.opentelemetry.io/inject-nodejs: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: myrabbit - env: - - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml deleted file mode 100644 index 7de601d68..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml deleted file mode 100644 index a87939b6c..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs/00-install-instrumentation.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: nodejs -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_METRICS_EXPORTER - value: prometheus - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - nodejs: - env: - - name: OTEL_NODEJS_DEBUG - value: "true" - diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml deleted file mode 100644 index fa71d4a6e..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_NODEJS_DEBUG - value: "true" - - name: NODE_OPTIONS - value: " --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_METRICS_EXPORTER - value: prometheus - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-nodejs - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: "500m" - memory: "128Mi" - requests: - cpu: "50m" - memory: "128Mi" - -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml deleted file mode 100644 index 5e5e74944..000000000 --- a/tests/e2e-instrumentation/instrumentation-nodejs/01-install-app.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml deleted file mode 100644 index b00affd4c..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index f77a3f835..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: java -spec: - env: - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_JAVAAGENT_DEBUG - value: "true" - - name: OTEL_INSTRUMENTATION_JDBC_ENABLED - value: "false" - - name: SPLUNK_PROFILER_ENABLED - value: "false" diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml deleted file mode 100644 index 99ccda9a6..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myapp,myrabbit - instrumentation.opentelemetry.io/inject-python: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: PYTHONPATH - value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: http/protobuf - - name: OTEL_METRICS_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL - value: http/protobuf - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-python - name: opentelemetry-auto-instrumentation-python - - name: myrabbit - env: - - name: PYTHONPATH - value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: http/protobuf - - name: OTEL_METRICS_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL - value: http/protobuf - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-python - name: opentelemetry-auto-instrumentation-python - - name: otc-container -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml deleted file mode 100644 index cb6d4f5cc..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-python: "true" - instrumentation.opentelemetry.io/container-names: "myapp,myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml deleted file mode 100644 index f5c319107..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/container-names: myrabbit - instrumentation.opentelemetry.io/inject-python: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - name: myrabbit - env: - - name: PYTHONPATH - value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: http/protobuf - - name: OTEL_METRICS_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL - value: http/protobuf - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-python - name: opentelemetry-auto-instrumentation-python - - name: otc-container -status: - phase: Running \ No newline at end of file diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml deleted file mode 100644 index 7e4a4595e..000000000 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-install-app.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-python: "true" - instrumentation.opentelemetry.io/container-names: "myrabbit" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - - name: myrabbit - image: rabbitmq:3 diff --git a/tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-python/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml deleted file mode 100644 index a2b7d65a2..000000000 --- a/tests/e2e-instrumentation/instrumentation-python/00-install-instrumentation.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: python -spec: - env: - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - python: - env: - - name: OTEL_LOG_LEVEL - value: "debug" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 diff --git a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml deleted file mode 100644 index b2d8d02aa..000000000 --- a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml +++ /dev/null @@ -1,61 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-python: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: OTEL_LOG_LEVEL - value: "debug" - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 - - name: PYTHONPATH - value: "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python" - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: http/protobuf - - name: OTEL_METRICS_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL - value: http/protobuf - - name: OTEL_EXPORTER_OTLP_TIMEOUT - value: "20" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - value: my-deployment-with-sidecar - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-python - name: opentelemetry-auto-instrumentation-python - - name: otc-container - initContainers: - - name: opentelemetry-auto-instrumentation-python - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - resources: - limits: - cpu: "500m" - memory: "32Mi" - requests: - cpu: "50m" - memory: "32Mi" -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml deleted file mode 100644 index 982b43946..000000000 --- a/tests/e2e-instrumentation/instrumentation-python/01-install-app.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-python: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] diff --git a/tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml b/tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml deleted file mode 100644 index 2875bde64..000000000 --- a/tests/e2e-instrumentation/instrumentation-sdk/00-install-collector.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=2000/1000 --overwrite diff --git a/tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml b/tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml deleted file mode 100644 index e6fe8125d..000000000 --- a/tests/e2e-instrumentation/instrumentation-sdk/00-install-instrumentation.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: sdk-only -spec: - env: - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - nodejs: - env: - - name: OTEL_NODEJS_DEBUG - value: "true" - python: - env: - - name: OTEL_ENV_VAR - value: "true" diff --git a/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml deleted file mode 100644 index 931beb460..000000000 --- a/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-sdk: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - env: - - name: SPLUNK_TRACE_RESPONSE_HEADER_ENABLED - value: "true" - - name: OTEL_SERVICE_NAME - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_TRACES_SAMPLER - - name: OTEL_TRACES_SAMPLER_ARG - - name: OTEL_RESOURCE_ATTRIBUTES - - name: otc-container -status: - phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml deleted file mode 100644 index 3ce4568bb..000000000 --- a/tests/e2e-instrumentation/instrumentation-sdk/01-install-app.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - instrumentation.opentelemetry.io/inject-sdk: "true" - spec: - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml deleted file mode 100644 index f8e1e98e0..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml deleted file mode 100644 index 3bf65bfff..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/00-install-instrumentation.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: multi -spec: - env: - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_SERVICE_NAME - value: "javaapp" - python: - env: - - name: OTEL_SERVICE_NAME - value: "pythonapp" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 - nodejs: - env: - - name: OTEL_SERVICE_NAME - value: "nodejsapp" - dotnet: - env: - - name: OTEL_SERVICE_NAME - value: "dotnetapp" - go: - env: - - name: OTEL_SERVICE_NAME - value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml deleted file mode 100644 index 136b7abaf..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml +++ /dev/null @@ -1,129 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/container-names: "shouldnt-be-instrumented" - instrumentation.opentelemetry.io/dotnet-container-names: "dotnetapp" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/inject-java: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/inject-python: "true" - instrumentation.opentelemetry.io/java-container-names: "javaapp" - instrumentation.opentelemetry.io/nodejs-container-names: "nodejsapp" - instrumentation.opentelemetry.io/python-container-names: "pythonapp" - sidecar.opentelemetry.io/inject: "true" - labels: - app: pod-with-multi-instrumentation -spec: - containers: - - name: dotnetapp - env: - - name: OTEL_SERVICE_NAME - value: dotnetapp - - name: CORECLR_ENABLE_PROFILING - value: "1" - - name: CORECLR_PROFILER - value: "{918728DD-259F-4A6A-AC2B-B85E1B658318}" - - name: CORECLR_PROFILER_PATH - value: /otel-auto-instrumentation-dotnet/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so - - name: DOTNET_STARTUP_HOOKS - value: /otel-auto-instrumentation-dotnet/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll - - name: DOTNET_ADDITIONAL_DEPS - value: /otel-auto-instrumentation-dotnet/AdditionalDeps - - name: OTEL_DOTNET_AUTO_HOME - value: /otel-auto-instrumentation-dotnet - - name: DOTNET_SHARED_STORE - value: /otel-auto-instrumentation-dotnet/store - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-dotnet - name: opentelemetry-auto-instrumentation-dotnet - - name: javaapp - env: - - name: OTEL_SERVICE_NAME - value: javaapp - - name: JAVA_TOOL_OPTIONS - value: " -javaagent:/otel-auto-instrumentation-java/javaagent.jar" - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-java - name: opentelemetry-auto-instrumentation-java - - name: nodejsapp - env: - - name: OTEL_SERVICE_NAME - value: nodejsapp - - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: pythonapp - env: - - name: OTEL_SERVICE_NAME - value: pythonapp - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 - - name: PYTHONPATH - value: /otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python - - name: OTEL_TRACES_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL - value: http/protobuf - - name: OTEL_METRICS_EXPORTER - value: otlp - - name: OTEL_EXPORTER_OTLP_METRICS_PROTOCOL - value: http/protobuf - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-python - name: opentelemetry-auto-instrumentation-python - - name: shouldnt-be-instrumented - env: - - name: TEST - value: test - - name: otc-container -status: - phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml deleted file mode 100644 index 652eb0a34..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-install-app.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: deployment-with-multi-instrumentation -spec: - selector: - matchLabels: - app: pod-with-multi-instrumentation - replicas: 1 - template: - metadata: - labels: - app: pod-with-multi-instrumentation - annotations: - instrumentation.opentelemetry.io/container-names: "shouldnt-be-instrumented" - instrumentation.opentelemetry.io/dotnet-container-names: "dotnetapp" - instrumentation.opentelemetry.io/inject-dotnet: "true" - instrumentation.opentelemetry.io/inject-java: "true" - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/inject-python: "true" - instrumentation.opentelemetry.io/java-container-names: "javaapp" - instrumentation.opentelemetry.io/nodejs-container-names: "nodejsapp" - instrumentation.opentelemetry.io/python-container-names: "pythonapp" - sidecar.opentelemetry.io/inject: "true" - spec: - containers: - - name: dotnetapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-dotnet:main - - name: javaapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-java:main - - name: nodejsapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - - name: pythonapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - - name: shouldnt-be-instrumented - image: rabbitmq:3 - env: - - name: TEST - value: test diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml deleted file mode 100644 index f8e1e98e0..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml deleted file mode 100644 index 3bf65bfff..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/00-install-instrumentation.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: multi -spec: - env: - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_SERVICE_NAME - value: "javaapp" - python: - env: - - name: OTEL_SERVICE_NAME - value: "pythonapp" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 - nodejs: - env: - - name: OTEL_SERVICE_NAME - value: "nodejsapp" - dotnet: - env: - - name: OTEL_SERVICE_NAME - value: "dotnetapp" - go: - env: - - name: OTEL_SERVICE_NAME - value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml deleted file mode 100644 index f1af37c66..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/inject-python: "true" - sidecar.opentelemetry.io/inject: "true" - labels: - app: pod-multi-instr-no-containers -spec: - containers: - - name: nodejsapp - env: - - name: TEST - value: test - - name: pythonapp - env: - - name: TEST - value: test - - name: otc-container -status: - phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml deleted file mode 100644 index 9921c8791..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-install-app.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: dep-multi-instr-no-containers -spec: - selector: - matchLabels: - app: pod-multi-instr-no-containers - replicas: 1 - template: - metadata: - labels: - app: pod-multi-instr-no-containers - annotations: - instrumentation.opentelemetry.io/inject-nodejs: "true" - instrumentation.opentelemetry.io/inject-python: "true" - sidecar.opentelemetry.io/inject: "true" - spec: - containers: - - name: nodejsapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - env: - - name: TEST - value: test - - name: pythonapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - env: - - name: TEST - value: test diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml deleted file mode 100644 index f8e1e98e0..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-collector.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml deleted file mode 100644 index 3bf65bfff..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/00-install-instrumentation.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: multi -spec: - env: - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - exporter: - endpoint: http://localhost:4317 - propagators: - - jaeger - - b3 - sampler: - type: parentbased_traceidratio - argument: "0.25" - java: - env: - - name: OTEL_SERVICE_NAME - value: "javaapp" - python: - env: - - name: OTEL_SERVICE_NAME - value: "pythonapp" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4318 - nodejs: - env: - - name: OTEL_SERVICE_NAME - value: "nodejsapp" - dotnet: - env: - - name: OTEL_SERVICE_NAME - value: "dotnetapp" - go: - env: - - name: OTEL_SERVICE_NAME - value: "goapp" diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml deleted file mode 100644 index bec991925..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - instrumentation.opentelemetry.io/inject-nodejs: "true" - sidecar.opentelemetry.io/inject: "true" - labels: - app: pod-single-instr-first-container -spec: - containers: - - name: nodejsapp - env: - - name: OTEL_SERVICE_NAME - value: nodejsapp - - name: NODE_OPTIONS - value: ' --require /otel-auto-instrumentation-nodejs/autoinstrumentation.js' - - name: OTEL_TRACES_SAMPLER - value: parentbased_traceidratio - - name: OTEL_TRACES_SAMPLER_ARG - value: "0.85" - - name: OTEL_EXPORTER_OTLP_ENDPOINT - value: http://localhost:4317 - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_PROPAGATORS - value: jaeger,b3 - - name: OTEL_RESOURCE_ATTRIBUTES - volumeMounts: - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount - - mountPath: /otel-auto-instrumentation-nodejs - name: opentelemetry-auto-instrumentation-nodejs - - name: pythonapp - env: - - name: TEST - value: test - - name: otc-container -status: - phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml deleted file mode 100644 index e33830e2e..000000000 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-install-app.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: dep-single-instr-first-container -spec: - selector: - matchLabels: - app: pod-single-instr-first-container - replicas: 1 - template: - metadata: - labels: - app: pod-single-instr-first-container - annotations: - instrumentation.opentelemetry.io/inject-nodejs: "true" - sidecar.opentelemetry.io/inject: "true" - spec: - containers: - - name: nodejsapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-nodejs:main - - name: pythonapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main - env: - - name: TEST - value: test diff --git a/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml b/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml deleted file mode 100644 index c0f277d00..000000000 --- a/tests/e2e-multi-instrumentation/manager_deployment_feature_gate.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-system ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager -spec: - selector: - matchLabels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - replicas: 1 - template: - metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - spec: - containers: - - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 - args: - - "--secure-listen-address=0.0.0.0:8443" - - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - - "--v=0" - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - name: manager - image: "local/opentelemetry-operator:e2e" - args: - - "--metrics-addr=127.0.0.1:8080" - - "--zap-log-level=debug" - - "--enable-leader-election" - - "--feature-gates=+operator.autoinstrumentation.multi-instrumentation" - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: opentelemetry-operator-controller-manager-service-cert diff --git a/tests/e2e-opampbridge/opampbridge/00-assert.yaml b/tests/e2e-opampbridge/opampbridge/00-assert.yaml deleted file mode 100644 index f4022a72d..000000000 --- a/tests/e2e-opampbridge/opampbridge/00-assert.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: test-opamp-bridge -spec: - template: - spec: - containers: - - name: opamp-bridge-container - env: - - name: OTELCOL_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - mountPath: /conf - name: opamp-bridge-internal - volumes: - - configMap: - items: - - key: remoteconfiguration.yaml - path: remoteconfiguration.yaml - name: test-opamp-bridge - name: opamp-bridge-internal -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: test-opamp-bridge -data: - remoteconfiguration.yaml: | - capabilities: - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRemoteConfig: true - AcceptsRestartCommand: true - ReportsEffectiveConfig: true - ReportsHealth: true - ReportsOwnLogs: true - ReportsOwnMetrics: true - ReportsOwnTraces: true - ReportsRemoteConfig: true - ReportsStatus: true - componentsAllowed: - exporters: - - logging - processors: - - memory_limiter - receivers: - - otlp - endpoint: ws://opamp-server:4320/v1/opamp ---- -apiVersion: v1 -kind: Service -metadata: - name: test-opamp-bridge -spec: - ports: - - name: opamp-bridge - port: 80 - protocol: TCP - targetPort: 8080 ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -opampbridges: - - selector: app.kubernetes.io/component=opentelemetry-opamp-bridge diff --git a/tests/e2e-opampbridge/opampbridge/00-install.yaml b/tests/e2e-opampbridge/opampbridge/00-install.yaml deleted file mode 100644 index 3f4f353f1..000000000 --- a/tests/e2e-opampbridge/opampbridge/00-install.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: opamp-bridge -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: opamp-bridge -rules: -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - '*' ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-opamp-bridge-$NAMESPACE --role=opamp-bridge --serviceaccount=$NAMESPACE:opamp-bridge ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpAMPBridge -metadata: - name: test -spec: - image: "local/opentelemetry-operator-opamp-bridge:e2e" - endpoint: ws://opamp-server:4320/v1/opamp - capabilities: - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRemoteConfig: true - AcceptsRestartCommand: true - ReportsEffectiveConfig: true - ReportsHealth: true - ReportsOwnLogs: true - ReportsOwnMetrics: true - ReportsOwnTraces: true - ReportsRemoteConfig: true - ReportsStatus: true - componentsAllowed: - receivers: - - otlp - processors: - - memory_limiter - exporters: - - logging \ No newline at end of file diff --git a/tests/e2e-openshift/Dockerfile b/tests/e2e-openshift/Dockerfile deleted file mode 100644 index 17e9b46e4..000000000 --- a/tests/e2e-openshift/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# The Dockerfile's resulting image is purpose-built for executing OpenTelemetry Operator e2e tests within the OpenShift release (https://github.com/openshift/release) using Prow CI. - -FROM golang:1.20 - -# Copy the repository files -COPY . /tmp/opentelemetry-operator - -WORKDIR /tmp - -# Set the Go path and Go cache environment variables -ENV GOPATH=/tmp/go -ENV GOBIN=/tmp/go/bin -ENV GOCACHE=/tmp/.cache/go-build -ENV PATH=$PATH:$GOBIN - -# Create the /tmp/go/bin and build cache directories, and grant read and write permissions to all users -RUN mkdir -p /tmp/go/bin $GOCACHE \ - && chmod -R 777 /tmp/go/bin $GOPATH $GOCACHE - -# Install dependencies required by test cases and debugging -RUN apt-get update && apt-get install -y jq vim libreadline-dev - -# Install kuttl -RUN curl -LO https://github.com/kudobuilder/kuttl/releases/download/v0.15.0/kubectl-kuttl_0.15.0_linux_x86_64 \ - && chmod +x kubectl-kuttl_0.15.0_linux_x86_64 \ - && mv kubectl-kuttl_0.15.0_linux_x86_64 /usr/local/bin/kuttl - -# Install kubectl and oc -RUN curl -LO https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz \ - && tar -xzf openshift-client-linux.tar.gz \ - && chmod +x oc kubectl \ - && mv oc kubectl /usr/local/bin/ - -# Set the working directory -WORKDIR /tmp/opentelemetry-operator diff --git a/tests/e2e-openshift/kafka/00-assert.yaml b/tests/e2e-openshift/kafka/00-assert.yaml deleted file mode 100644 index 7474e7da9..000000000 --- a/tests/e2e-openshift/kafka/00-assert.yaml +++ /dev/null @@ -1,180 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-kafka - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/instance: my-cluster - app.kubernetes.io/managed-by: strimzi-cluster-operator - app.kubernetes.io/name: entity-operator - app.kubernetes.io/part-of: strimzi-my-cluster - strimzi.io/cluster: my-cluster - strimzi.io/component-type: entity-operator - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-entity-operator - name: my-cluster-entity-operator - namespace: kuttl-kafka -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Pod -metadata: - name: my-cluster-kafka-0 - namespace: kuttl-kafka -status: - phase: Running - ---- -apiVersion: v1 -kind: Pod -metadata: - name: my-cluster-zookeeper-0 - namespace: kuttl-kafka -status: - phase: Running - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/instance: my-cluster - app.kubernetes.io/managed-by: strimzi-cluster-operator - app.kubernetes.io/name: kafka - app.kubernetes.io/part-of: strimzi-my-cluster - strimzi.io/cluster: my-cluster - strimzi.io/component-type: kafka - strimzi.io/discovery: "true" - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-kafka - name: my-cluster-kafka-bootstrap - namespace: kuttl-kafka -spec: - ports: - - name: tcp-replication - port: 9091 - protocol: TCP - targetPort: 9091 - - name: tcp-clients - port: 9092 - protocol: TCP - targetPort: 9092 - - name: tcp-clientstls - port: 9093 - protocol: TCP - targetPort: 9093 - selector: - strimzi.io/cluster: my-cluster - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-kafka - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/instance: my-cluster - app.kubernetes.io/managed-by: strimzi-cluster-operator - app.kubernetes.io/name: kafka - app.kubernetes.io/part-of: strimzi-my-cluster - strimzi.io/cluster: my-cluster - strimzi.io/component-type: kafka - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-kafka - name: my-cluster-kafka-brokers - namespace: kuttl-kafka -spec: - ports: - - name: tcp-ctrlplane - port: 9090 - protocol: TCP - targetPort: 9090 - - name: tcp-replication - port: 9091 - protocol: TCP - targetPort: 9091 - - name: tcp-kafkaagent - port: 8443 - protocol: TCP - targetPort: 8443 - - name: tcp-clients - port: 9092 - protocol: TCP - targetPort: 9092 - - name: tcp-clientstls - port: 9093 - protocol: TCP - targetPort: 9093 - publishNotReadyAddresses: true - selector: - strimzi.io/cluster: my-cluster - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-kafka - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/instance: my-cluster - app.kubernetes.io/managed-by: strimzi-cluster-operator - app.kubernetes.io/name: zookeeper - app.kubernetes.io/part-of: strimzi-my-cluster - strimzi.io/cluster: my-cluster - strimzi.io/component-type: zookeeper - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-zookeeper - name: my-cluster-zookeeper-client - namespace: kuttl-kafka -spec: - ports: - - name: tcp-clients - port: 2181 - protocol: TCP - targetPort: 2181 - selector: - strimzi.io/cluster: my-cluster - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-zookeeper - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/instance: my-cluster - app.kubernetes.io/managed-by: strimzi-cluster-operator - app.kubernetes.io/name: zookeeper - app.kubernetes.io/part-of: strimzi-my-cluster - strimzi.io/cluster: my-cluster - strimzi.io/component-type: zookeeper - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-zookeeper - name: my-cluster-zookeeper-nodes - namespace: kuttl-kafka -spec: - ports: - - name: tcp-clients - port: 2181 - protocol: TCP - targetPort: 2181 - - name: tcp-clustering - port: 2888 - protocol: TCP - targetPort: 2888 - - name: tcp-election - port: 3888 - protocol: TCP - targetPort: 3888 - selector: - strimzi.io/cluster: my-cluster - strimzi.io/kind: Kafka - strimzi.io/name: my-cluster-zookeeper diff --git a/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml b/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml deleted file mode 100644 index 22b30c075..000000000 --- a/tests/e2e-openshift/kafka/00-create-kafka-instance.yaml +++ /dev/null @@ -1,60 +0,0 @@ -#For creating the Kafka instance, install the AMQ streams operator https://access.redhat.com/documentation/en-us/red_hat_amq_streams/2.5/html/getting_started_with_amq_streams_on_openshift/proc-deploying-cluster-operator-hub-str - -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-kafka - ---- -apiVersion: kafka.strimzi.io/v1beta2 -kind: Kafka -metadata: - name: my-cluster - namespace: kuttl-kafka -spec: - entityOperator: - topicOperator: - reconciliationIntervalSeconds: 90 - userOperator: - reconciliationIntervalSeconds: 120 - kafka: - config: - log.message.format.version: 3.5.0 - message.max.bytes: 10485760 - offsets.topic.replication.factor: 1 - ssl.cipher.suites: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - ssl.enabled.protocols: TLSv1.2 - ssl.protocol: TLSv1.2 - transaction.state.log.min.isr: 1 - transaction.state.log.replication.factor: 1 - jvmOptions: - -Xms: 1024m - -Xmx: 1024m - listeners: - - configuration: - useServiceDnsDomain: true - name: plain - port: 9092 - tls: false - type: internal - - authentication: - type: tls - name: tls - port: 9093 - tls: true - type: internal - replicas: 1 - resources: - limits: - cpu: "1" - memory: 4Gi - requests: - cpu: "1" - memory: 4Gi - storage: - type: ephemeral - version: 3.5.0 - zookeeper: - replicas: 1 - storage: - type: ephemeral diff --git a/tests/e2e-openshift/kafka/01-assert.yaml b/tests/e2e-openshift/kafka/01-assert.yaml deleted file mode 100644 index eceae60c4..000000000 --- a/tests/e2e-openshift/kafka/01-assert.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: otlp-spans - namespace: kuttl-kafka -spec: - config: - retention.ms: 300000 - segment.bytes: 1073741824 - partitions: 1 - replicas: 1 -status: - topicName: otlp-spans diff --git a/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml b/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml deleted file mode 100644 index e7cfcc23d..000000000 --- a/tests/e2e-openshift/kafka/01-create-kafka-topics.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kafka.strimzi.io/v1beta1 -kind: KafkaTopic -metadata: - labels: - strimzi.io/cluster: my-cluster - name: otlp-spans - namespace: kuttl-kafka -spec: - config: - retention.ms: 300000 - segment.bytes: 1073741824 - partitions: 1 - replicas: 1 diff --git a/tests/e2e-openshift/kafka/02-assert.yaml b/tests/e2e-openshift/kafka/02-assert.yaml deleted file mode 100644 index 5fa0ca140..000000000 --- a/tests/e2e-openshift/kafka/02-assert.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: kafka-receiver-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: kafka-receiver-collector - namespace: kuttl-kafka -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: kafka-receiver-collector-monitoring - name: kafka-receiver-collector-monitoring - namespace: kuttl-kafka -spec: - ports: - - name: monitoring - port: 8888 - protocol: TCP - targetPort: 8888 - selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - type: ClusterIP diff --git a/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml b/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml deleted file mode 100644 index 800732cef..000000000 --- a/tests/e2e-openshift/kafka/02-otel-kakfa-receiver.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: kafka-receiver - namespace: kuttl-kafka -spec: - mode: "deployment" - config: | - receivers: - kafka/traces: - brokers: ["my-cluster-kafka-brokers.kuttl-kafka.svc:9092"] - protocol_version: 3.5.0 - topic: otlp-spans - exporters: - debug: - verbosity: detailed - service: - pipelines: - traces: - receivers: [kafka/traces] - processors: [] - exporters: [debug] diff --git a/tests/e2e-openshift/kafka/03-assert.yaml b/tests/e2e-openshift/kafka/03-assert.yaml deleted file mode 100644 index 6881d1730..000000000 --- a/tests/e2e-openshift/kafka/03-assert.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-exporter - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: kafka-exporter-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: kafka-exporter-collector - namespace: kuttl-kafka -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-exporter - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: kafka-exporter-collector - name: kafka-exporter-collector - namespace: kuttl-kafka -spec: - ports: - - 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: kuttl-kafka.kafka-exporter - app.kubernetes.io/managed-by: opentelemetry-operator - sessionAffinity: None - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-kafka.kafka-exporter - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: kafka-exporter-collector - operator.opentelemetry.io/collector-headless-service: Exists - name: kafka-exporter-collector-headless - namespace: kuttl-kafka -spec: - ports: - - 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: kuttl-kafka.kafka-exporter - app.kubernetes.io/managed-by: opentelemetry-operator - type: ClusterIP diff --git a/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml b/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml deleted file mode 100644 index 65f1f114f..000000000 --- a/tests/e2e-openshift/kafka/03-otel-kakfa-exporter.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: kafka-exporter - namespace: kuttl-kafka -spec: - mode: deployment - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - kafka/traces: - brokers: ["my-cluster-kafka-brokers.kuttl-kafka.svc:9092"] - protocol_version: 3.5.0 - topic: otlp-spans - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [kafka/traces] diff --git a/tests/e2e-openshift/kafka/04-assert.yaml b/tests/e2e-openshift/kafka/04-assert.yaml deleted file mode 100644 index 942ada3c5..000000000 --- a/tests/e2e-openshift/kafka/04-assert.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - labels: - app: telemetrygen-traces - job-name: telemetrygen-traces - name: telemetrygen-traces -status: - succeeded: 1 diff --git a/tests/e2e-openshift/kafka/04-generate-traces.yaml b/tests/e2e-openshift/kafka/04-generate-traces.yaml deleted file mode 100644 index 11f2d1fd7..000000000 --- a/tests/e2e-openshift/kafka/04-generate-traces.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -spec: - completions: 1 - parallelism: 1 - template: - metadata: - labels: - app: telemetrygen-traces - spec: - containers: - - name: telemetrygen-traces - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest - command: ["./telemetrygen"] - args: - - "--otlp-endpoint=kafka-exporter-collector-headless.kuttl-kafka.svc:4317" - - "--otlp-insecure=true" - - "--rate=1" - - "--duration=30s" - - "--otlp-attributes=test=\"kuttl-kafka\"" - - "--otlp-header=kafka-topic=\"otlp-spans\"" - - "--service=\"kafka\"" - - "traces" - restartPolicy: Never diff --git a/tests/e2e-openshift/kafka/05-assert.yaml b/tests/e2e-openshift/kafka/05-assert.yaml deleted file mode 100644 index 0dfd963f9..000000000 --- a/tests/e2e-openshift/kafka/05-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 -commands: -- script: ./tests/e2e-openshift/kafka/check_traces.sh diff --git a/tests/e2e-openshift/kafka/check_traces.sh b/tests/e2e-openshift/kafka/check_traces.sh deleted file mode 100755 index 05b4755d0..000000000 --- a/tests/e2e-openshift/kafka/check_traces.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# This script checks the kafka-receiver OTEL collector pod for the presence of Traces. - -# Define the label selector -LABEL_SELECTOR="app.kubernetes.io/instance=kuttl-kafka.kafka-receiver" - -# Define the search strings -SEARCH_STRING1='-> service.name: Str("kafka")' -SEARCH_STRING2='-> test: Str(kuttl-kafka)' - -# Get the list of pods with the specified label -PODS=$(kubectl -n kuttl-kafka get pods -l $LABEL_SELECTOR -o jsonpath='{.items[*].metadata.name}') - -# Initialize flags to track if strings are found -FOUND1=false -FOUND2=false - -# Loop through each pod and search for the strings in the logs -for POD in $PODS; do - # Search for the first string - if ! $FOUND1 && kubectl -n kuttl-kafka logs $POD | grep -q -- "$SEARCH_STRING1"; then - echo "\"$SEARCH_STRING1\" found in $POD" - FOUND1=true - fi - # Search for the second string - if ! $FOUND2 && kubectl -n kuttl-kafka logs $POD | grep -q -- "$SEARCH_STRING2"; then - echo "\"$SEARCH_STRING2\" found in $POD" - FOUND2=true - fi -done - -# Check if either of the strings was not found -if ! $FOUND1 || ! $FOUND2; then - echo "No Traces with service name Kafka and attribute test=kuttl-kafka found." - exit 1 -else - echo "Traces with service name Kafka and attribute test=kuttl-kafka found." -fi - diff --git a/tests/e2e-openshift/monitoring/00-assert.yaml b/tests/e2e-openshift/monitoring/00-assert.yaml deleted file mode 100644 index f9cbcf22c..000000000 --- a/tests/e2e-openshift/monitoring/00-assert.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml b/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml deleted file mode 100644 index af526ecbe..000000000 --- a/tests/e2e-openshift/monitoring/00-workload-monitoring.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# oc -n openshift-user-workload-monitoring get pod -# https://docs.openshift.com/container-platform/4.13/monitoring/enabling-monitoring-for-user-defined-projects.html#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects - -apiVersion: v1 -kind: ConfigMap -metadata: - name: cluster-monitoring-config - namespace: openshift-monitoring -data: - config.yaml: | - enableUserWorkload: true - alertmanagerMain: - enableUserAlertmanagerConfig: true diff --git a/tests/e2e-openshift/monitoring/01-assert.yaml b/tests/e2e-openshift/monitoring/01-assert.yaml deleted file mode 100644 index 170c0f414..000000000 --- a/tests/e2e-openshift/monitoring/01-assert.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - prometheus.io/path: /metrics - prometheus.io/port: "8888" - prometheus.io/scrape: "true" - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector - app.kubernetes.io/part-of: opentelemetry - name: cluster-collector-collector -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector - name: cluster-collector-collector -spec: - endpoints: - - port: monitoring - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector - app.kubernetes.io/part-of: opentelemetry - name: cluster-collector-collector -spec: - ports: - - 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/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector - app.kubernetes.io/part-of: opentelemetry - operator.opentelemetry.io/collector-headless-service: Exists - name: cluster-collector-collector-headless -spec: - ports: - - 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/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector-monitoring - app.kubernetes.io/part-of: opentelemetry - name: cluster-collector-collector-monitoring -spec: - ports: - - name: monitoring - port: 8888 - protocol: TCP - targetPort: 8888 - selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP diff --git a/tests/e2e-openshift/monitoring/01-otel-collector.yaml b/tests/e2e-openshift/monitoring/01-otel-collector.yaml deleted file mode 100644 index 842087908..000000000 --- a/tests/e2e-openshift/monitoring/01-otel-collector.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: cluster-collector -spec: - mode: deployment - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-openshift/monitoring/02-assert.yaml b/tests/e2e-openshift/monitoring/02-assert.yaml deleted file mode 100644 index 701adbdf7..000000000 --- a/tests/e2e-openshift/monitoring/02-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -status: - active: 1 diff --git a/tests/e2e-openshift/monitoring/02-generate-traces.yaml b/tests/e2e-openshift/monitoring/02-generate-traces.yaml deleted file mode 100644 index 1f3b23778..000000000 --- a/tests/e2e-openshift/monitoring/02-generate-traces.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -spec: - completions: 1 - parallelism: 1 - template: - metadata: - labels: - app: telemetrygen-traces - spec: - containers: - - name: telemetrygen-traces - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest - command: ["./telemetrygen"] - args: - - "--otlp-endpoint=cluster-collector-collector-headless:4317" - - "--otlp-insecure=true" - - "--rate=1" - - "--duration=3m" - - "--otlp-attributes=telemetrygen=\"traces\"" - - "--otlp-header=telemetrygen=\"traces\"" - - "--span-duration=1s" - - "--workers=1" - - "traces" - restartPolicy: Never diff --git a/tests/e2e-openshift/monitoring/03-assert.yaml b/tests/e2e-openshift/monitoring/03-assert.yaml deleted file mode 100644 index 2f1f82d41..000000000 --- a/tests/e2e-openshift/monitoring/03-assert.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kuttl-cluster-monitoring-metrics-api -rules: -- apiGroups: - - monitoring.coreos.com - resources: - - prometheuses/api - verbs: - - get - - list - - watch - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kuttl-cluster-monitoring-metrics-api -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kuttl-cluster-monitoring-metrics-api -subjects: -- kind: ServiceAccount - name: prometheus-user-workload - namespace: openshift-user-workload-monitoring - ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e-openshift/monitoring/check_metrics.sh diff --git a/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml b/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml deleted file mode 100644 index 6ee5291eb..000000000 --- a/tests/e2e-openshift/monitoring/03-create-monitoring-roles.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Add the clusterrole and rolebinding required for fetching metrics from Thanos querier. Refer https://issues.redhat.com/browse/MON-3379 -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kuttl-cluster-monitoring-metrics-api -rules: -- apiGroups: ["monitoring.coreos.com"] - resources: ["prometheuses/api"] - verbs: ["get", "list", "watch"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kuttl-cluster-monitoring-metrics-api -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kuttl-cluster-monitoring-metrics-api -subjects: -- kind: ServiceAccount - name: prometheus-user-workload - namespace: openshift-user-workload-monitoring diff --git a/tests/e2e-openshift/monitoring/check_metrics.sh b/tests/e2e-openshift/monitoring/check_metrics.sh deleted file mode 100755 index 1d88c5841..000000000 --- a/tests/e2e-openshift/monitoring/check_metrics.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}') -TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d) -THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host') - -#Check metrics for OpenTelemetry collector instance. -metrics="otelcol_process_uptime otelcol_process_runtime_total_sys_memory_bytes otelcol_process_memory_rss otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans" - -for metric in $metrics; do - query="$metric" - - response=$(curl -k -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" "https://$THANOS_QUERIER_HOST/api/v1/query?query=$query") - - count=$(echo "$response" | jq -r '.data.result | length') - - if [[ $count -eq 0 ]]; then - echo "No metric '$metric' with value present. Exiting with status 1." - exit 1 - else - echo "Metric '$metric' with value is present." - fi -done diff --git a/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh b/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh deleted file mode 100755 index 5ecaebe3d..000000000 --- a/tests/e2e-openshift/monitoring/check_user_workload_monitoring.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -check_replicas() { - replicas=$(oc get $1 $2 -n openshift-user-workload-monitoring -o 'jsonpath={.status.availableReplicas} {.status.readyReplicas} {.status.replicas}') - for count in $replicas; do - if [[ $count =~ ^[0-9]+$ ]]; then - if ((count < 1)); then - echo "The number of replicas is 0 for $1 $2" - exit 1 - fi - else - echo "Error: Replica count is not a valid number for $1 $2" - exit 1 - fi - done -} - -check_replicas deployment prometheus-operator -check_replicas statefulset prometheus-user-workload -check_replicas statefulset thanos-ruler-user-workload diff --git a/tests/e2e-openshift/multi-cluster/00-assert.yaml b/tests/e2e-openshift/multi-cluster/00-assert.yaml deleted file mode 100644 index cf530e1d4..000000000 --- a/tests/e2e-openshift/multi-cluster/00-assert.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: project.openshift.io/v1 -kind: Project -metadata: - name: kuttl-multi-cluster-send -status: - phase: Active - -apiVersion: project.openshift.io/v1 -kind: Project -metadata: - name: kuttl-multi-cluster-receive -status: - phase: Active diff --git a/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml b/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml deleted file mode 100644 index 15931a400..000000000 --- a/tests/e2e-openshift/multi-cluster/00-create-namespaces.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-multi-cluster-send - ---- -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-multi-cluster-receive diff --git a/tests/e2e-openshift/multi-cluster/01-assert.yaml b/tests/e2e-openshift/multi-cluster/01-assert.yaml deleted file mode 100644 index f2c871480..000000000 --- a/tests/e2e-openshift/multi-cluster/01-assert.yaml +++ /dev/null @@ -1,126 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: jaeger - app.kubernetes.io/component: all-in-one - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone - app.kubernetes.io/part-of: jaeger - name: jaeger-allinone - namespace: kuttl-multi-cluster-receive -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: jaeger - app.kubernetes.io/component: service-collector - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone-collector - app.kubernetes.io/part-of: jaeger - name: jaeger-allinone-collector - namespace: kuttl-multi-cluster-receive -spec: - ports: - - name: http-zipkin - port: 9411 - protocol: TCP - targetPort: 9411 - - name: tls-grpc-jaeger - port: 14250 - protocol: TCP - targetPort: 14250 - - name: http-c-tchan-trft - port: 14267 - protocol: TCP - targetPort: 14267 - - name: http-c-binary-trft - port: 14268 - protocol: TCP - targetPort: 14268 - - name: admin-http - port: 14269 - protocol: TCP - targetPort: 14269 - - name: grpc-otlp - port: 4317 - protocol: TCP - targetPort: 4317 - - name: http-otlp - port: 4318 - protocol: TCP - targetPort: 4318 - selector: - app: jaeger - app.kubernetes.io/component: all-in-one - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone - app.kubernetes.io/part-of: jaeger - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: jaeger - app.kubernetes.io/component: service-query - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone-query - app.kubernetes.io/part-of: jaeger - name: jaeger-allinone-query - namespace: kuttl-multi-cluster-receive -spec: - ports: - - name: http-query - port: 16686 - protocol: TCP - targetPort: 16686 - - name: grpc-query - port: 16685 - protocol: TCP - targetPort: 16685 - - name: admin-http - port: 16687 - protocol: TCP - targetPort: 16687 - selector: - app: jaeger - app.kubernetes.io/component: all-in-one - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone - app.kubernetes.io/part-of: jaeger - type: ClusterIP - ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app: jaeger - app.kubernetes.io/component: query-route - app.kubernetes.io/instance: jaeger-allinone - app.kubernetes.io/managed-by: jaeger-operator - app.kubernetes.io/name: jaeger-allinone - app.kubernetes.io/part-of: jaeger - name: jaeger-allinone - namespace: kuttl-multi-cluster-receive -spec: - port: - targetPort: http-query - tls: - termination: edge - to: - kind: Service - name: jaeger-allinone-query diff --git a/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml b/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml deleted file mode 100644 index bac726662..000000000 --- a/tests/e2e-openshift/multi-cluster/01-create-jaeger.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: jaegertracing.io/v1 -kind: Jaeger -metadata: - name: jaeger-allinone - namespace: kuttl-multi-cluster-receive -spec: - strategy: allinone - ingress: - security: none diff --git a/tests/e2e-openshift/multi-cluster/02-assert.yaml b/tests/e2e-openshift/multi-cluster/02-assert.yaml deleted file mode 100644 index 9650dd59f..000000000 --- a/tests/e2e-openshift/multi-cluster/02-assert.yaml +++ /dev/null @@ -1,147 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-receiver-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otlp-receiver-collector - namespace: kuttl-multi-cluster-receive -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-receiver-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otlp-receiver-collector - namespace: kuttl-multi-cluster-receive -spec: - ports: - - appProtocol: h2c - 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: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-receiver-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - operator.opentelemetry.io/collector-headless-service: Exists - name: otlp-receiver-collector-headless - namespace: kuttl-multi-cluster-receive -spec: - ports: - - appProtocol: h2c - 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: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-receiver-collector-monitoring - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otlp-receiver-collector-monitoring - namespace: kuttl-multi-cluster-receive -spec: - ports: - - name: monitoring - port: 8888 - protocol: TCP - targetPort: 8888 - selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-grpc-otlp-receiver-route - name: otlp-grpc-otlp-receiver-route - namespace: kuttl-multi-cluster-receive -spec: - port: - targetPort: otlp-grpc - tls: - termination: passthrough - to: - kind: Service - name: otlp-receiver-collector - weight: 100 - ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app.kubernetes.io/instance: kuttl-multi-cluster-receive.otlp-receiver - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-http-otlp-receiver-route - name: otlp-http-otlp-receiver-route - namespace: kuttl-multi-cluster-receive -spec: - port: - targetPort: otlp-http - tls: - termination: passthrough - to: - kind: Service - name: otlp-receiver-collector - weight: 100 diff --git a/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml b/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml deleted file mode 100644 index d30045808..000000000 --- a/tests/e2e-openshift/multi-cluster/02-otlp-receiver.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: -- script: ./generate_certs.sh - ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: otlp-receiver - namespace: kuttl-multi-cluster-receive -spec: - mode: "deployment" - ingress: - type: route - route: - termination: "passthrough" - volumes: - - name: kuttl-certs - configMap: - name: kuttl-certs - volumeMounts: - - name: kuttl-certs - mountPath: /certs - config: | - receivers: - otlp: - protocols: - http: - tls: - cert_file: /certs/server.crt - key_file: /certs/server.key - client_ca_file: /certs/ca.crt - grpc: - tls: - cert_file: /certs/server.crt - key_file: /certs/server.key - client_ca_file: /certs/ca.crt - exporters: - otlp: - endpoint: "jaeger-allinone-collector.kuttl-multi-cluster-receive.svc:4317" - tls: - insecure: true - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [otlp] diff --git a/tests/e2e-openshift/multi-cluster/03-assert.yaml b/tests/e2e-openshift/multi-cluster/03-assert.yaml deleted file mode 100644 index 8edce42aa..000000000 --- a/tests/e2e-openshift/multi-cluster/03-assert.yaml +++ /dev/null @@ -1,107 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otel-sender-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otel-sender-collector - namespace: kuttl-multi-cluster-send -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otel-sender-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otel-sender-collector - namespace: kuttl-multi-cluster-send -spec: - ports: - - 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: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otel-sender-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - operator.opentelemetry.io/collector-headless-service: Exists - name: otel-sender-collector-headless - namespace: kuttl-multi-cluster-send -spec: - ports: - - 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: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP - ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otel-sender-collector-monitoring - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: latest - name: otel-sender-collector-monitoring - namespace: kuttl-multi-cluster-send -spec: - ports: - - name: monitoring - port: 8888 - protocol: TCP - targetPort: 8888 - selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: kuttl-multi-cluster-send.otel-sender - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/part-of: opentelemetry - type: ClusterIP diff --git a/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml b/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml deleted file mode 100644 index 2c1d45273..000000000 --- a/tests/e2e-openshift/multi-cluster/03-otlp-sender.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kuttl-multi-cluster - namespace: kuttl-multi-cluster-send - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kuttl-multi-cluster -rules: -- apiGroups: ["config.openshift.io"] - resources: ["infrastructures", "infrastructures/status"] - verbs: ["get", "watch", "list"] -- apiGroups: ["apps"] - resources: ["replicasets"] - verbs: ["get", "watch", "list"] -- apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list"] -- apiGroups: [""] - resources: ["namespaces"] - verbs: ["get", "watch", "list"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kuttl-multi-cluster -subjects: -- kind: ServiceAccount - name: kuttl-multi-cluster - namespace: kuttl-multi-cluster-send -roleRef: - kind: ClusterRole - name: kuttl-multi-cluster - apiGroup: rbac.authorization.k8s.io - ---- ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: -- script: ./create_otlp_sender.sh diff --git a/tests/e2e-openshift/multi-cluster/04-assert.yaml b/tests/e2e-openshift/multi-cluster/04-assert.yaml deleted file mode 100644 index 2a2a3b622..000000000 --- a/tests/e2e-openshift/multi-cluster/04-assert.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: generate-traces-http - namespace: kuttl-multi-cluster-send -status: - conditions: - - status: "True" - type: Complete - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: generate-traces-grpc - namespace: kuttl-multi-cluster-send -status: - conditions: - - status: "True" - type: Complete diff --git a/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml b/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml deleted file mode 100644 index 4c2d6b10f..000000000 --- a/tests/e2e-openshift/multi-cluster/04-generate-traces.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: generate-traces-http - namespace: kuttl-multi-cluster-send -spec: - template: - spec: - containers: - - name: telemetrygen - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.75.0 - args: - - traces - - --otlp-endpoint=otel-sender-collector:4318 - - --traces=100 - - --otlp-http - - --otlp-insecure=true - - --service=telemetrygen-http - - --otlp-attributes=protocol="http" - restartPolicy: Never - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: generate-traces-grpc - namespace: kuttl-multi-cluster-send -spec: - template: - spec: - containers: - - name: telemetrygen - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:v0.75.0 - args: - - traces - - --otlp-endpoint=otel-sender-collector:4317 - - --traces=100 - - --otlp-insecure=true - - --service=telemetrygen-grpc - - --otlp-attributes=protocol="grpc" - restartPolicy: Never diff --git a/tests/e2e-openshift/multi-cluster/05-assert.yaml b/tests/e2e-openshift/multi-cluster/05-assert.yaml deleted file mode 100644 index 73befbcd2..000000000 --- a/tests/e2e-openshift/multi-cluster/05-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 -commands: -- script: ./tests/e2e-openshift/multi-cluster/check_traces.sh diff --git a/tests/e2e-openshift/multi-cluster/check_traces.sh b/tests/e2e-openshift/multi-cluster/check_traces.sh deleted file mode 100755 index 7fe6eea51..000000000 --- a/tests/e2e-openshift/multi-cluster/check_traces.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Define an array of service names -SERVICE_NAMES=("telemetrygen-http" "telemetrygen-grpc") - -# Get the Jaeger URL -JAEGER_URL=$(oc -n kuttl-multi-cluster-receive get route jaeger-allinone -o json | jq '.spec.host' -r) - -# Initialize a flag to check if any trace exists -trace_exists=false - -# Loop through each service name -for SERVICE_NAME in "${SERVICE_NAMES[@]}"; do - trace_count=$(curl -ksSL "https://$JAEGER_URL/api/traces?service=$SERVICE_NAME&limit=1" | jq -r '.data | length') - if [[ $trace_count -gt 0 ]]; then - echo "Traces for $SERVICE_NAME exist in Jaeger." - trace_exists=true - else - echo "Trace for $SERVICE_NAME does not exist in Jaeger." - fi -done - -# Fail the test step if no traces exist for any service name -if ! $trace_exists; then - exit 1 -fi diff --git a/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh b/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh deleted file mode 100755 index fadb2fc8a..000000000 --- a/tests/e2e-openshift/multi-cluster/create_otlp_sender.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# Get the HTTP and GRPC routes from OpenTelemetry receiver collector. -otlp_route_http=$(oc -n kuttl-multi-cluster-receive get route otlp-http-otlp-receiver-route -o json | jq '.spec.host' -r) -otlp_route_grpc=$(oc -n kuttl-multi-cluster-receive get route otlp-grpc-otlp-receiver-route -o json | jq '.spec.host' -r) - -# Define the collector content -collector_content=$(cat < "$openssl_config" -[req] -req_extensions = v3_req - -[v3_req] -basicConstraints = CA:FALSE -keyUsage = nonRepudiation, digitalSignature, keyEncipherment -subjectAltName = @alt_names - -[alt_names] -DNS.1 = $hostname_domain -EOF - -# Generate private key for the server -openssl genpkey -algorithm RSA -out "$CERT_DIR/server.key" - -# Create CSR for the server with SANs -openssl req -new -key "$CERT_DIR/server.key" -out "$CERT_DIR/server.csr" -subj "$CERT_SUBJECT" -config "$openssl_config" - -# Generate self-signed certificate for the server with SANs -openssl x509 -req -days 365 -in "$CERT_DIR/server.csr" -signkey "$CERT_DIR/server.key" -out "$CERT_DIR/server.crt" -extensions v3_req -extfile "$openssl_config" - -# Generate a CA certificate (self-signed) -openssl req -new -x509 -days 365 -key "$CERT_DIR/server.key" -out "$CERT_DIR/ca.crt" -subj "$CERT_SUBJECT" - -echo "Certificates generated successfully in $CERT_DIR directory." - -# Delete any existing ConfigMaps -kubectl delete configmap -n kuttl-multi-cluster-send kuttl-certs -kubectl delete configmap -n kuttl-multi-cluster-receive kuttl-certs - -# Create a Kubernetes ConfigMap for the server certificate, private key, and CA certificate in kuttl-multi-cluster-send namespace -kubectl create configmap kuttl-certs -n kuttl-multi-cluster-send \ - --from-file=server.crt="$CERT_DIR/server.crt" \ - --from-file=server.key="$CERT_DIR/server.key" \ - --from-file=ca.crt="$CERT_DIR/ca.crt" - -# Create a Kubernetes ConfigMap for the server certificate, private key, and CA certificate in kuttl-multi-cluster-receive namespace -kubectl create configmap kuttl-certs -n kuttl-multi-cluster-receive \ - --from-file=server.crt="$CERT_DIR/server.crt" \ - --from-file=server.key="$CERT_DIR/server.key" \ - --from-file=ca.crt="$CERT_DIR/ca.crt" - -echo "ConfigMaps created successfully." diff --git a/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml deleted file mode 100644 index ef885ad07..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/00-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: kuttl-otlp-metrics - name: jaeger-allinone -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 diff --git a/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml b/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml deleted file mode 100644 index a941089d4..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/00-install-jaeger.yaml +++ /dev/null @@ -1,18 +0,0 @@ -#Create the "kuttl-otlp-metrics" project to fulfill the requirement of specifying the Jaeger and OTEL collector endpoints. This project is essential due to KUTTL's current lack of support for templating. -#For this test case you'll need to install the Jaeger operator (OpenShift Distributed Tracing Platform in OpenShift) - -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-otlp-metrics - ---- -apiVersion: jaegertracing.io/v1 -kind: Jaeger -metadata: - name: jaeger-allinone - namespace: kuttl-otlp-metrics -spec: - strategy: allinone - ingress: - security: none diff --git a/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml deleted file mode 100644 index b7e384989..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/01-assert.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml b/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml deleted file mode 100644 index 1d5c5e4b1..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/01-workload-monitoring.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# oc -n openshift-user-workload-monitoring get pod -# https://docs.openshift.com/container-platform/4.13/monitoring/enabling-monitoring-for-user-defined-projects.html#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects - -apiVersion: v1 -kind: ConfigMap -metadata: - name: cluster-monitoring-config - namespace: openshift-monitoring -data: - config.yaml: | - enableUserWorkload: true diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml deleted file mode 100644 index 8315633e8..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/02-assert.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: kuttl-otlp-metrics -status: - availableReplicas: 1 - readyReplicas: 1 - replicas: 1 - ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: cluster-collector-collector - name: cluster-collector-collector - namespace: kuttl-otlp-metrics -spec: - endpoints: - - port: monitoring - - port: prometheus - namespaceSelector: - matchNames: - - kuttl-otlp-metrics - selector: - matchLabels: - app.kubernetes.io/instance: kuttl-otlp-metrics.cluster-collector - app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml b/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml deleted file mode 100644 index 632b99445..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/02-otel-metrics-collector.yaml +++ /dev/null @@ -1,38 +0,0 @@ -#https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/README.md - -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: cluster-collector - namespace: kuttl-otlp-metrics -spec: - mode: deployment - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - exporters: - otlp: - endpoint: jaeger-allinone-collector-headless.kuttl-otlp-metrics.svc:4317 - tls: - insecure: true - prometheus: - endpoint: 0.0.0.0:8889 - resource_to_telemetry_conversion: - enabled: true # by default resource attributes are dropped - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [otlp] - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus] diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml deleted file mode 100644 index cac0e077d..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/03-assert.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kuttl-cluster-monitoring-metrics-api -rules: -- apiGroups: - - monitoring.coreos.com - resources: - - prometheuses/api - verbs: - - get - - list - - watch - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kuttl-cluster-monitoring-metrics-api -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kuttl-cluster-monitoring-metrics-api -subjects: -- kind: ServiceAccount - name: prometheus-user-workload - namespace: openshift-user-workload-monitoring - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -status: - active: 1 - ready: 1 - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-metrics -status: - active: 1 - ready: 1 - ---- -apiVersion: v1 -kind: Pod -status: - phase: Running diff --git a/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml b/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml deleted file mode 100644 index 0b2bd5929..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/03-metrics-traces-gen.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# Add the clusterrole and rolebinding required for fetching metrics from Thanos querier. Refer https://issues.redhat.com/browse/MON-3379 -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kuttl-cluster-monitoring-metrics-api -rules: -- apiGroups: ["monitoring.coreos.com"] - resources: ["prometheuses/api"] - verbs: ["get", "list", "watch"] - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: kuttl-cluster-monitoring-metrics-api -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kuttl-cluster-monitoring-metrics-api -subjects: -- kind: ServiceAccount - name: prometheus-user-workload - namespace: openshift-user-workload-monitoring - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-traces -spec: - completions: 1 - parallelism: 1 - template: - metadata: - labels: - app: telemetrygen-traces - spec: - containers: - - name: telemetrygen-traces - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest - command: ["./telemetrygen"] - args: - - "--otlp-endpoint=cluster-collector-collector-headless.kuttl-otlp-metrics.svc:4317" - - "--otlp-insecure=true" - - "--rate=1" - - "--duration=30s" - - "--otlp-attributes=telemetrygen=\"traces\"" - - "--otlp-header=telemetrygen=\"traces\"" - - "traces" - restartPolicy: Never - ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: telemetrygen-metrics -spec: - completions: 1 - parallelism: 1 - template: - metadata: - labels: - app: telemetrygen-metrics - spec: - containers: - - name: telemetrygen-metrics - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest - command: ["./telemetrygen"] - args: - - "--otlp-endpoint=cluster-collector-collector-headless.kuttl-otlp-metrics.svc:4317" - - "--otlp-insecure=true" - - "--duration=30s" - - "--rate=1" - - "--otlp-attributes=telemetrygen=\"metrics\"" - - "--otlp-header=telemetrygen=\"traces\"" - - "metrics" - restartPolicy: Never diff --git a/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml deleted file mode 100644 index 9bec95f44..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/04-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 30 -commands: -- script: ./tests/e2e-openshift/otlp-metrics-traces/check_traces.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml b/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml deleted file mode 100644 index 79570e05a..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/05-assert.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh b/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh deleted file mode 100755 index dd44adc87..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/check_metrics.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -SECRET=$(oc get secret -n openshift-user-workload-monitoring | grep prometheus-user-workload-token | head -n 1 | awk '{print $1}') -TOKEN=$(echo $(oc get secret $SECRET -n openshift-user-workload-monitoring -o json | jq -r '.data.token') | base64 -d) -THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host') - -response=$(curl -k -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" "https://$THANOS_QUERIER_HOST/api/v1/query?query=gen") - -count=$(echo "$response" | jq -r '.data.result | length') - -if [[ $count -eq 0 ]]; then - echo "No telemetrygen metrics count with value present. Exiting with status 1." - exit 1 -else - echo "telemetrygen metrics with value is present." -fi diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh b/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh deleted file mode 100755 index 9761284ae..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/check_traces.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -JAEGER_URL=$(oc -n kuttl-otlp-metrics get route jaeger-allinone -o json | jq '.spec.host' -r) -SERVICE_NAME="telemetrygen" - -trace_exists=$(curl -ksSL "https://$JAEGER_URL/api/traces?service=$SERVICE_NAME&limit=1" | jq -r '.data | length') - -if [[ $trace_exists -gt 0 ]]; then - echo "Traces for $SERVICE_NAME exist in Jaeger." -else - echo "Trace for $SERVICE_NAME does not exist in Jaeger." - exit 1 # Fail the test step if the trace doesn't exist -fi diff --git a/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh b/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh deleted file mode 100755 index 5ecaebe3d..000000000 --- a/tests/e2e-openshift/otlp-metrics-traces/check_user_workload_monitoring.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -check_replicas() { - replicas=$(oc get $1 $2 -n openshift-user-workload-monitoring -o 'jsonpath={.status.availableReplicas} {.status.readyReplicas} {.status.replicas}') - for count in $replicas; do - if [[ $count =~ ^[0-9]+$ ]]; then - if ((count < 1)); then - echo "The number of replicas is 0 for $1 $2" - exit 1 - fi - else - echo "Error: Replica count is not a valid number for $1 $2" - exit 1 - fi - done -} - -check_replicas deployment prometheus-operator -check_replicas statefulset prometheus-user-workload -check_replicas statefulset thanos-ruler-user-workload diff --git a/tests/e2e-openshift/route/00-assert.yaml b/tests/e2e-openshift/route/00-assert.yaml deleted file mode 100644 index f0366fa18..000000000 --- a/tests/e2e-openshift/route/00-assert.yaml +++ /dev/null @@ -1,53 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - something.com: "true" - labels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-grpc-simplest-route - name: otlp-grpc-simplest-route - ownerReferences: - - apiVersion: opentelemetry.io/v1alpha1 - blockOwnerDeletion: true - controller: true - kind: OpenTelemetryCollector - name: simplest -spec: - port: - targetPort: otlp-grpc - to: - kind: Service - name: simplest-collector - wildcardPolicy: None ---- -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - annotations: - something.com: "true" - labels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: otlp-http-simplest-route - name: otlp-http-simplest-route - ownerReferences: - - apiVersion: opentelemetry.io/v1alpha1 - blockOwnerDeletion: true - controller: true - kind: OpenTelemetryCollector - name: simplest -spec: - port: - targetPort: otlp-http - to: - kind: Service - name: simplest-collector - wildcardPolicy: None diff --git a/tests/e2e-openshift/route/00-install.yaml b/tests/e2e-openshift/route/00-install.yaml deleted file mode 100644 index 1c060e5a0..000000000 --- a/tests/e2e-openshift/route/00-install.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - mode: "deployment" - ingress: - type: route - annotations: - something.com: "true" - route: - termination: "insecure" - - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml b/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml deleted file mode 100644 index 406d66cef..000000000 --- a/tests/e2e-openshift/route/01-report-empty-otlphttp-spans.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: | - #!/bin/bash - set -ex - # Export empty payload and check of collector accepted it with 2xx status code - otlp_http_host=$(kubectl get route otlp-http-simplest-route -n $NAMESPACE -o jsonpath='{.spec.host}') - for i in {1..40}; do curl --fail -ivX POST http://${otlp_http_host}:80/v1/traces -H "Content-Type: application/json" -d '{}' && break || sleep 1; done diff --git a/tests/e2e-pdb/pdb/00-assert.yaml b/tests/e2e-pdb/pdb/00-assert.yaml deleted file mode 100644 index b882b74ef..000000000 --- a/tests/e2e-pdb/pdb/00-assert.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: pdb-collector -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-collector - minAvailable: 1 diff --git a/tests/e2e-pdb/pdb/00-install.yaml b/tests/e2e-pdb/pdb/00-install.yaml deleted file mode 100644 index 05e3cd4db..000000000 --- a/tests/e2e-pdb/pdb/00-install.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: pdb -spec: - podDisruptionBudget: - minAvailable: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] \ No newline at end of file diff --git a/tests/e2e-pdb/target-allocator/00-assert.yaml b/tests/e2e-pdb/target-allocator/00-assert.yaml deleted file mode 100644 index d2b615d10..000000000 --- a/tests/e2e-pdb/target-allocator/00-assert.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: pdb-targetallocator -spec: - selector: - matchLabels: - app.kubernetes.io/component: opentelemetry-targetallocator - minAvailable: 1 - diff --git a/tests/e2e-pdb/target-allocator/00-install.yaml b/tests/e2e-pdb/target-allocator/00-install.yaml deleted file mode 100644 index edf944e0a..000000000 --- a/tests/e2e-pdb/target-allocator/00-install.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: pdb -spec: - mode: statefulset - targetAllocator: - enabled: true - allocationStrategy: consistent-hashing - prometheusCR: - enabled: true - podDisruptionBudget: - minAvailable: 1 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - config: | - receivers: - prometheus: - config: - scrape_configs: [] - exporters: - logging: - service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [logging] diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml deleted file mode 100644 index 5440bee17..000000000 --- a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/00-install.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: create-pm-prometheus ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-pm-prometheus -spec: - mode: sidecar - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - prometheus/dev: - endpoint: 0.0.0.0:8885 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/dev, prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml deleted file mode 100644 index d89c68dd5..000000000 --- a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-assert.yaml +++ /dev/null @@ -1,44 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - labels: - app: pod-with-sidecar - namespace: create-pm-prometheus -spec: - containers: - - name: myapp - - name: otc-container - env: - - name: POD_NAME - - name: OTEL_CONFIG - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES -status: - phase: Running ---- -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - labels: - app.kubernetes.io/instance: create-pm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-pm-prometheus -spec: - jobLabel: "app.kubernetes.io/instance" - podMetricsEndpoints: - - port: monitoring - - port: prometheus-dev - - port: prometheus-prod - namespaceSelector: - matchNames: - - create-pm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-pm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml b/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml deleted file mode 100644 index 884f05d22..000000000 --- a/tests/e2e-prometheuscr/create-pm-prometheus-exporters/01-install-app.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: app-with-sidecar - namespace: create-pm-prometheus -spec: - selector: - matchLabels: - app: pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml deleted file mode 100644 index 0121963c6..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/00-install.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: create-sm-prometheus diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml deleted file mode 100644 index 0a3c07d13..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-assert.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-dev - - port: prometheus-prod - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-sm-prometheus.simplest ---- -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector - namespace: create-sm-prometheus -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - name: prometheus-dev - port: 8885 - protocol: TCP - targetPort: 8885 - - name: prometheus-prod - port: 8884 - protocol: TCP - targetPort: 8884 ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector-monitoring - app.kubernetes.io/part-of: opentelemetry - name: simplest-collector-monitoring - namespace: create-sm-prometheus -spec: - ports: - - name: monitoring - port: 8888 - protocol: TCP - targetPort: 8888 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml deleted file mode 100644 index b03318eb4..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/01-install.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - prometheus/dev: - endpoint: 0.0.0.0:8885 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/dev, prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml deleted file mode 100644 index b79840724..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-assert.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-prod - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-sm-prometheus.simplest ---- -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector - namespace: create-sm-prometheus -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - name: prometheus-prod - port: 8884 - protocol: TCP - targetPort: 8884 \ No newline at end of file diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml deleted file mode 100644 index e275da42e..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/02-install.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml deleted file mode 100644 index 6590ac393..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-assert.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector - namespace: create-sm-prometheus -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - name: prometheus-prod - port: 9091 - protocol: TCP - targetPort: 9091 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml deleted file mode 100644 index fe782b4d3..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/03-install.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:9091 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml deleted file mode 100644 index 61ad50e38..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-error.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-prod - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml deleted file mode 100644 index 5578a7da8..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/04-install.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: false - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:9091 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/prod] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml deleted file mode 100644 index f56ec033c..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-assert.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-dev - - port: prometheus-prod - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml deleted file mode 100644 index ecb59ba1f..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-error.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-dev - - port: prometheus-prod - - port: prometheusremotewrite/prometheus - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml deleted file mode 100644 index 8e300294e..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/05-install.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - prometheus/dev: - endpoint: 0.0.0.0:8885 - - prometheusremotewrite/prometheus: - endpoint: http://prometheus-server.monitoring/api/v1/write - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/dev, prometheus/prod, prometheusremotewrite/prometheus] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml deleted file mode 100644 index 8df94a598..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-assert.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-collector - name: simplest-collector - namespace: create-sm-prometheus -spec: - endpoints: - - port: monitoring - - port: prometheus-dev - namespaceSelector: - matchNames: - - create-sm-prometheus - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/instance: create-sm-prometheus.simplest diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml deleted file mode 100644 index 028458da1..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/06-install.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - observability: - metrics: - enableMetrics: true - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - prometheus/dev: - endpoint: 0.0.0.0:8885 - - service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/dev] diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml deleted file mode 100644 index 76798588b..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-delete.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: - - apiVersion: opentelemetry.io/v1alpha1 - kind: OpenTelemetryCollector - metadata: - name: simplest - namespace: create-sm-prometheus \ No newline at end of file diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml deleted file mode 100644 index 263dbb3c6..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/07-error.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: simplest-collector - namespace: create-sm-prometheus diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml deleted file mode 100644 index 78de67b0f..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-assert.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: simplest-targetallocator - labels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-targetallocator - name: simplest-targetallocator - namespace: create-sm-prometheus -spec: - endpoints: - - port: targetallocation - selector: - matchLabels: - app.kubernetes.io/instance: create-sm-prometheus.simplest - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/component: opentelemetry-targetallocator ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-metrics - namespace: create-sm-prometheus -status: - succeeded: 1 diff --git a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml b/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml deleted file mode 100644 index cb0e15df4..000000000 --- a/tests/e2e-prometheuscr/create-sm-prometheus-exporters/08-install.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ta - namespace: create-sm-prometheus -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: ta -rules: -- apiGroups: [""] - resources: - - pods - - nodes - - services - - endpoints - - configmaps - - secrets - - namespaces - verbs: - - get - - watch - - list -- apiGroups: ["apps"] - resources: - - statefulsets - - services - - endpoints - verbs: - - get - - watch - - list -- apiGroups: ["discovery.k8s.io"] - resources: - - endpointslices - verbs: - - get - - watch - - list -- apiGroups: ["networking.k8s.io"] - resources: - - ingresses - verbs: - - get - - watch - - list -- apiGroups: ["monitoring.coreos.com"] - resources: - - servicemonitors - - podmonitors - verbs: - - get - - watch - - list -- nonResourceURLs: ["/metrics"] - verbs: ["get"] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl create clusterrolebinding simplest-targetallocator-create-sm-prometheus --clusterrole=ta --serviceaccount=create-sm-prometheus:ta ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - namespace: create-sm-prometheus -spec: - mode: statefulset - targetAllocator: - serviceAccount: ta - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - prometheusCR: - enabled: true - observability: - metrics: - enableMetrics: true - config: | - receivers: - prometheus: - config: - scrape_configs: [] - - processors: - - exporters: - prometheus: - endpoint: 0.0.0.0:9090 - service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [prometheus] ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-metrics - namespace: create-sm-prometheus -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: check-metrics - image: curlimages/curl - args: - - /bin/sh - - -c - - curl -s http://simplest-targetallocator/jobs | grep "targetallocator" diff --git a/tests/e2e-upgrade/upgrade-test/00-assert.yaml b/tests/e2e-upgrade/upgrade-test/00-assert.yaml deleted file mode 100644 index d5c2c3825..000000000 --- a/tests/e2e-upgrade/upgrade-test/00-assert.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector - annotations: - operatorVersion: "v0.86.0" -spec: - template: - metadata: - labels: - app.kubernetes.io/version: latest -status: - readyReplicas: 1 diff --git a/tests/e2e-upgrade/upgrade-test/00-install.yaml b/tests/e2e-upgrade/upgrade-test/00-install.yaml deleted file mode 100644 index 9ae9054a4..000000000 --- a/tests/e2e-upgrade/upgrade-test/00-install.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - annotations: - operatorVersion: "v0.86.0" -spec: - replicas: 1 - config: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger,otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml b/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml deleted file mode 100644 index 248ffb6a9..000000000 --- a/tests/e2e-upgrade/upgrade-test/01-upgrade-operator.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: cd ../../../ && make deploy VERSION=e2e diff --git a/tests/e2e-upgrade/upgrade-test/02-assert.yaml b/tests/e2e-upgrade/upgrade-test/02-assert.yaml deleted file mode 100644 index b40c5a7bb..000000000 --- a/tests/e2e-upgrade/upgrade-test/02-assert.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector - annotations: - operatorVersion: "latest" -status: - readyReplicas: 2 diff --git a/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml b/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml deleted file mode 100644 index a2aefad52..000000000 --- a/tests/e2e-upgrade/upgrade-test/02-upgrade-collector.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest - annotations: - operatorVersion: "latest" -spec: - replicas: 2 - config: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger,otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml b/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml deleted file mode 100644 index 82463fa4b..000000000 --- a/tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml +++ /dev/null @@ -1,8558 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-system ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/name: opentelemetry-operator - name: instrumentations.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: Instrumentation - listKind: InstrumentationList - plural: instrumentations - shortNames: - - otelinst - - otelinsts - singular: instrumentation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .spec.exporter.endpoint - name: Endpoint - type: string - - jsonPath: .spec.sampler.type - name: Sampler - type: string - - jsonPath: .spec.sampler.argument - name: Sampler Arg - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Instrumentation is the spec for OpenTelemetry instrumentation. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: InstrumentationSpec defines the desired state of OpenTelemetry - SDK and instrumentation. - properties: - apacheHttpd: - description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Apache HTTPD agent specific attributes. - The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configPath: - description: Location of Apache HTTPD server configuration. Needed - only if different from default "/usr/local/apache2/conf" - type: string - env: - description: Env defines Apache HTTPD specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Apache SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - version: - description: Apache HTTPD server version. One of 2.4 or 2.2. Default - is 2.4 - type: string - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - dotnet: - description: DotNet defines configuration for DotNet auto-instrumentation. - properties: - env: - description: Env defines DotNet specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with DotNet SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - env: - description: Env defines common env vars. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string - type: object - go: - description: Go defines configuration for Go auto-instrumentation. - properties: - env: - description: Env defines Go specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Go SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - java: - description: Java defines configuration for java auto-instrumentation. - properties: - env: - description: Env defines java specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with javaagent auto-instrumentation - JAR. - type: string - resources: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nginx: - description: Nginx defines configuration for Nginx auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Nginx agent specific attributes. The - precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configFile: - description: Location of Nginx configuration file. Needed only - if different from default "/etx/nginx/nginx.conf" - type: string - env: - description: Env defines Nginx specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Nginx SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nodejs: - description: NodeJS defines configuration for nodejs auto-instrumentation. - properties: - env: - description: Env defines nodejs specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with NodeJS SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - propagators: - description: Propagators defines inter-process context propagation - configuration. Values in this list will be set in the OTEL_PROPAGATORS - env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none - items: - description: Propagator represents the propagation type. - enum: - - tracecontext - - baggage - - b3 - - b3multi - - jaeger - - xray - - ottrace - - none - type: string - type: array - python: - description: Python defines configuration for python auto-instrumentation. - properties: - env: - description: Env defines python specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Python SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 150Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - resource: - description: Resource defines the configuration for the resource attributes, - as defined by the OpenTelemetry specification. - properties: - addK8sUIDAttributes: - description: AddK8sUIDAttributes defines whether K8s UID attributes - should be collected (e.g. k8s.deployment.uid). - type: boolean - resourceAttributes: - additionalProperties: - type: string - description: 'Attributes defines attributes that are added to - the resource. For example environment: dev' - type: object - type: object - sampler: - description: Sampler defines sampling configuration. - properties: - argument: - description: Argument defines sampler argument. The value depends - on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. - type: string - type: - description: Type defines sampler type. The value will be set - in the OTEL_TRACES_SAMPLER env var. The value can be for instance - parentbased_always_on, parentbased_always_off, parentbased_traceidratio... - enum: - - always_on - - always_off - - traceidratio - - parentbased_always_on - - parentbased_always_off - - parentbased_traceidratio - - jaeger_remote - - xray - type: string - type: object - type: object - status: - description: InstrumentationStatus defines status of the instrumentation. - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Deployment Mode - jsonPath: .spec.mode - name: Mode - type: string - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .status.scale.statusReplicas - name: Ready - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.image - name: Image - type: string - - description: Management State - jsonPath: .spec.managementState - name: Management - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - additionalContainers: - description: AdditionalContainers allows injecting additional containers - into the Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - autoscaler: - description: Autoscaler specifies the pod autoscaling configuration - to use for the OpenTelemetryCollector workload. - properties: - behavior: - description: HorizontalPodAutoscalerBehavior configures the scaling - behavior of the target in both Up and Down directions (scaleUp - and scaleDown fields respectively). - properties: - scaleDown: - description: scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down - to minReplicas pods, with a 300 second stabilization window - (i.e. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - scaleUp: - description: scaleUp is scaling policy for scaling Up. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - type: object - maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling - feature. If MaxReplicas is set autoscaling is enabled. - format: int32 - type: integer - metrics: - description: Metrics is meant to provide a customizable way to - configure HPA metrics. currently the only supported custom metrics - is type=Pod. - items: - description: MetricSpec defines a subset of metrics to be defined - for the HPA's metric array more metric type can be supported - as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec - for reference. - properties: - pods: - description: PodsMetricSource indicates how to scale on - a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: selector is the string-encoded form - of a standard kubernetes label selector for the - given metric When set, it is passed as an additional - parameter to the metrics server for more specific - metrics scopi - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: averageUtilization is the target value - of the average of the resource metric across all - relevant pods, represented as a percentage of - the requested value of the resource for the pods. - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: averageValue is the target value of - the average of the metric across all relevant - pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - type: - description: MetricSourceType indicates the type of metric. - type: string - required: - - type - type: object - type: array - minReplicas: - description: MinReplicas sets a lower bound to the autoscaling - feature. Set this if your are using autoscaling. It must be - at least 1 - format: int32 - type: integer - targetCPUUtilization: - description: TargetCPUUtilization sets the target average CPU - used across all replicas. If average CPU exceeds this value, - the HPA will scale up. Defaults to 90 percent. - format: int32 - type: integer - targetMemoryUtilization: - description: TargetMemoryUtilization sets the target average memory - utilization across all replicas - format: int32 - type: integer - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - configmaps: - description: ConfigMaps is a list of ConfigMaps in the same namespace - as the OpenTelemetryCollector object, which shall be mounted into - the Collector Pods. - items: - properties: - mountpath: - type: string - name: - description: Configmap defines name and path where the configMaps - should be mounted. - type: string - required: - - mountpath - - name - type: object - type: array - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. - These can then in certain cases be consumed in the config file for - the Collector. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpenTelemetry Collector's Pods. These can then in certain cases - be consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how OpenTelemetry Collector - is exposed. This functionality is only available if one of the valid - modes is set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' - type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. - properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt - type: string - type: object - ruleType: - description: RuleType defines how Ingress exposes collector receivers. - IngressRuleTypePath ("path") exposes each receiver port on a - unique path on single domain defined in Hostname. - enum: - - path - - subdomain - type: string - tls: - description: TLS configuration. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. - properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. - items: - type: string - type: array - x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. - type: string - type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress, - route' - enum: - - ingress - - route - type: string - type: object - initContainers: - description: InitContainers allows injecting initContainers to the - Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - lifecycle: - description: Actions that the management system should take in response - to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event such - as liveness/startup probe failure, preemption, resource contention, - etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: Liveness config for the OpenTelemetry Collector except - the probe handler which is auto generated from the health extension - of the collector. - properties: - failureThreshold: - description: Minimum consecutive failures for the probe to be - considered failed after having succeeded. Defaults to 3. Minimum - value is 1. - format: int32 - type: integer - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default - to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be - considered successful after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - managementState: - default: managed - description: ManagementState defines if the CR should be managed by - the operator or not. Default is managed. - enum: - - managed - - unmanaged - type: string - maxReplicas: - description: 'MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" - instead.' - format: int32 - type: integer - minReplicas: - description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if you are using autoscaling. It must be at least 1 Deprecated: - use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' - format: int32 - type: integer - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets handled. - properties: - metrics: - description: Metrics defines the metrics configuration for operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor should - be created for the OpenTelemetry Collector and Prometheus - Exporters. The operator.observability. - type: boolean - type: object - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption budget - configuration to use for the OpenTelemetryCollector workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after the - eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - description: PodSecurityContext configures the pod security context - for the opentelemetry-collector pod, when running as a deployment, - daemonset, or statefulset. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetry Collector pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security context - for the opentelemetry-collector container. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string - targetAllocator: - description: TargetAllocator indicates a value which determines whether - to spawn a target allocation resource or not. - properties: - allocationStrategy: - description: AllocationStrategy determines which strategy the - target allocator should use for allocation. The current options - are least-weighted and consistent-hashing. The default option - is least-weighted - enum: - - least-weighted - - consistent-hashing - type: string - enabled: - description: Enabled indicates whether to use a target allocation - mechanism for Prometheus targets or not. - type: boolean - env: - description: ENV vars to set on the OpenTelemetry TargetAllocator's - Pods. These can then in certain cases be consumed in the config - file for the TargetAllocator. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - filterStrategy: - description: FilterStrategy determines how to filter targets before - allocating them among the collectors. The only current option - is relabel-config (drops targets based on prom relabel_config). - type: string - image: - description: Image indicates the container image to use for the - OpenTelemetry TargetAllocator. - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry TargetAllocator - pods. - type: object - prometheusCR: - description: PrometheusCR defines the configuration for the retrieval - of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. - properties: - enabled: - description: Enabled indicates whether to use a PrometheusOperator - custom resources as targets or not. - type: boolean - podMonitorSelector: - additionalProperties: - type: string - description: PodMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a PodMonitor's - meta labels. - type: object - scrapeInterval: - default: 30s - description: "Interval between consecutive scrapes. Equivalent - to the same setting on the Prometheus CRD. \n Default: \"30s\"" - format: duration - type: string - serviceMonitorSelector: - additionalProperties: - type: string - description: ServiceMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a ServiceMonitor's - meta labels. - type: object - type: object - replicas: - description: Replicas is the number of pod instances for the underlying - TargetAllocator. This should only be set to a value other than - 1 if a strategy that allows for high availability is chosen. - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetryTargetAllocator - containers. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing - service account to use with this instance. When set, the operator - will not automatically create a ServiceAccount for the TargetAllocator. - type: string - tolerations: - description: Toleration embedded kubernetes pod configuration - option, controls how pods can be scheduled with matching taints - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using - the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. - Empty means match all taint effects. When specified, allowed - values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to - the value. Valid operators are Exists and Equal. Defaults - to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of - time the toleration (which must be of effect NoExecute, - otherwise this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod - configuration option, controls how pods are spread across your - cluster among failure-domains such as regions, zones, nodes, - and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine - the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to - select the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods - may be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat - node taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes - that have a label with this key and identical values are - considered to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with - a pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - terminationGracePeriodSeconds: - description: Duration in seconds the pod needs to terminate gracefully - upon probe failure. - format: int64 - type: integer - tolerations: - description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle - upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeClaimTemplates: - description: VolumeClaimTemplates will provide stable storage using - PersistentVolumes. Only available when the mode=statefulset. - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. - type: string - kind: - description: Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'spec defines the desired characteristics of a - volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace is specified, - a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate." - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where - this field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of - compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of - compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not - included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: 'status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the actual access modes - the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResourceStatuses: - additionalProperties: - description: When a controller receives persistentvolume - claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that - update and let other controllers handle it. - type: string - description: allocatedResourceStatuses stores status of - resource being resized for the given PVC. Key names follow - standard Kubernetes label syntax. - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: allocatedResources tracks the resources allocated - to a PVC including its capacity. Key names follow standard - Kubernetes label syntax. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: conditions is the current Condition of persistent - volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: reason is a unique, this should be a - short, machine understandable string that gives - the reason for condition's last transition. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is - a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - x-kubernetes-list-type: atomic - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk - resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, - Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the - blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob - storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed data - disk (only in managed availability set).' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains - Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is the - path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair in - the Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated - CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set - permissions on created files by default.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: medium represents what type of storage medium - should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: sizeLimit is the total amount of local storage - required for this EmptyDir volume. The size limit is also - applicable for memory medium. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. - properties: - volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. - properties: - metadata: - description: May contain labels and annotations that - will be copied into the PVC when creating it. No other - fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. - properties: - accessModes: - description: 'accessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object - from which to populate the volume with data, if - a non-empty volume is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace - is specified, a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the - StorageClass required by the claim. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem - is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use for - this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds extra - command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if no - secret object is specified.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored as - metadata -> name on the dataset for Flocker should be - considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This - is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem type - is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' - properties: - directory: - description: directory is the target directory name. Must - not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: hostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - properties: - path: - description: 'path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI - Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI - Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses - an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. The - portal is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target - and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The Portal - is either an IP or ip_addr:port if the port is other than - default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret data - to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional field specify whether the - Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information about - the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. - format: int64 - type: integer - path: - description: path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is no - group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for - a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: system is the name of the storage system as - configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair in - the Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret or - its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the - pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based - Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere - volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector. - properties: - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - messages: - description: 'Messages about actions performed by the operator on - this resource. Deprecated: use Kubernetes events instead.' - items: - type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: 'Replicas is currently not being set and might be removed - in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" - instead.' - format: int32 - type: integer - scale: - description: Scale is the OpenTelemetryCollector's scale subresource - status. - properties: - replicas: - description: The total number non-terminated pods targeted by - this OpenTelemetryCollector's deployment or statefulSet. - format: int32 - type: integer - selector: - description: The selector used to match the OpenTelemetryCollector's - deployment or statefulSet pods. - type: string - statusReplicas: - description: StatusReplicas is the number of pods targeted by - this OpenTelemetryCollector's with a Ready Condition / Total - number of non-terminated pods targeted by this OpenTelemetryCollector's - (their labels matc - type: string - type: object - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.scale.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.scale.replicas - status: {} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-leader-election-role - namespace: opentelemetry-operator-system -rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-manager-role -rules: - - apiGroups: - - "" - resources: - - configmaps - - serviceaccounts - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - list - - watch - - apiGroups: - - apps - resources: - - daemonsets - - deployments - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - list - - watch - - apiGroups: - - autoscaling - resources: - - horizontalpodautoscalers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - list - - update - - apiGroups: - - monitoring.coreos.com - resources: - - servicemonitors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - instrumentations - verbs: - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - get - - list - - patch - - update - - watch - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/finalizers - verbs: - - get - - patch - - update - - apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/status - verbs: - - get - - patch - - update - - apiGroups: - - policy - resources: - - poddisruptionbudgets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - route.openshift.io - resources: - - routes - - routes/custom-host - verbs: - - create - - delete - - get - - list - - patch - - update - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-metrics-reader -rules: - - nonResourceURLs: - - /metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-proxy-role -rules: - - apiGroups: - - authentication.k8s.io - resources: - - tokenreviews - verbs: - - create - - apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-leader-election-rolebinding - namespace: opentelemetry-operator-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: opentelemetry-operator-leader-election-role -subjects: - - kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: opentelemetry-operator-manager-role -subjects: - - kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: opentelemetry-operator-proxy-role -subjects: - - kind: ServiceAccount - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager-metrics-service - namespace: opentelemetry-operator-system -spec: - ports: - - name: https - port: 8443 - protocol: TCP - targetPort: https - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 9443 - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: opentelemetry-operator-controller-manager - namespace: opentelemetry-operator-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - template: - metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - spec: - containers: - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - - --zap-log-level=info - - --zap-time-encoding=rfc3339nano - - --feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.86.0 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - requests: - cpu: 100m - memory: 64Mi - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - serviceAccountName: opentelemetry-operator-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: opentelemetry-operator-controller-manager-service-cert ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-serving-cert - namespace: opentelemetry-operator-system -spec: - dnsNames: - - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc - - opentelemetry-operator-webhook-service.opentelemetry-operator-system.svc.cluster.local - issuerRef: - kind: Issuer - name: opentelemetry-operator-selfsigned-issuer - secretName: opentelemetry-operator-controller-manager-service-cert - subject: - organizationalUnits: - - opentelemetry-operator ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-selfsigned-issuer - namespace: opentelemetry-operator-system -spec: - selfSigned: {} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: MutatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-mutating-webhook-configuration -webhooks: - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Fail - name: minstrumentation.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Fail - name: mopentelemetrycollector.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /mutate-v1-pod - failurePolicy: Ignore - name: mpod.kb.io - rules: - - apiGroups: - - "" - apiVersions: - - v1 - operations: - - CREATE - - UPDATE - resources: - - pods - sideEffects: None ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - labels: - app.kubernetes.io/name: opentelemetry-operator - name: opentelemetry-operator-validating-webhook-configuration -webhooks: - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Fail - name: vinstrumentationcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-instrumentation - failurePolicy: Ignore - name: vinstrumentationdelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - instrumentations - sideEffects: None - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Fail - name: vopentelemetrycollectorcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - opentelemetrycollectors - sideEffects: None - - admissionReviewVersions: - - v1 - clientConfig: - service: - name: opentelemetry-operator-webhook-service - namespace: opentelemetry-operator-system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector - failurePolicy: Ignore - name: vopentelemetrycollectordelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - opentelemetrycollectors - sideEffects: None diff --git a/tests/e2e/daemonset-features/00-add-scc.yaml b/tests/e2e/daemonset-features/00-add-scc.yaml deleted file mode 100644 index 63d417ea9..000000000 --- a/tests/e2e/daemonset-features/00-add-scc.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: ./add-scc-openshift.sh diff --git a/tests/e2e/daemonset-features/01-install.yaml b/tests/e2e/daemonset-features/01-install.yaml deleted file mode 100644 index c452864d7..000000000 --- a/tests/e2e/daemonset-features/01-install.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: daemonset -spec: - mode: daemonset - hostNetwork: true - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/daemonset-features/02-assert.yaml b/tests/e2e/daemonset-features/02-assert.yaml deleted file mode 100644 index 03798dbd6..000000000 --- a/tests/e2e/daemonset-features/02-assert.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: daemonset-collector -spec: - template: - spec: - hostNetwork: true - containers: - - args: - - --config=/conf/collector.yaml - name: otc-container diff --git a/tests/e2e/daemonset-features/03-add-sa-collector.yaml b/tests/e2e/daemonset-features/03-add-sa-collector.yaml deleted file mode 100644 index 1da56ca21..000000000 --- a/tests/e2e/daemonset-features/03-add-sa-collector.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: ./add-sa-collector.sh diff --git a/tests/e2e/daemonset-features/03-assert.yaml b/tests/e2e/daemonset-features/03-assert.yaml deleted file mode 100644 index 102ea5139..000000000 --- a/tests/e2e/daemonset-features/03-assert.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - labels: - app.kubernetes.io/name: daemonset-collector - app.kubernetes.io/part-of: opentelemetry -status: - phase: Running diff --git a/tests/e2e/daemonset-features/add-sa-collector.sh b/tests/e2e/daemonset-features/add-sa-collector.sh deleted file mode 100755 index cdd05f78f..000000000 --- a/tests/e2e/daemonset-features/add-sa-collector.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then - echo "Adding service account to the OpenTelemetry Collector" - kubectl patch otelcol daemonset --type=merge -p '{"spec":{"serviceAccount":"otel-collector-daemonset"}}' -n $NAMESPACE -fi diff --git a/tests/e2e/daemonset-features/add-scc-openshift.sh b/tests/e2e/daemonset-features/add-scc-openshift.sh deleted file mode 100755 index 7412a51d1..000000000 --- a/tests/e2e/daemonset-features/add-scc-openshift.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -if [[ "$(kubectl api-resources --api-group=operator.openshift.io -o name)" ]]; then - echo "Running the test against an OpenShift Cluster" - echo "Creating an Service Account" - echo "Creating a Security Context Constrain" - echo "Setting the Service Account for the Daemonset" - echo "Adding the new policy to the Service Account" - kubectl apply -f scc.yaml -n $NAMESPACE - oc adm policy add-scc-to-user -z otel-collector-daemonset daemonset-with-hostport -n $NAMESPACE -fi diff --git a/tests/e2e/daemonset-features/scc.yaml b/tests/e2e/daemonset-features/scc.yaml deleted file mode 100644 index 20e211716..000000000 --- a/tests/e2e/daemonset-features/scc.yaml +++ /dev/null @@ -1,22 +0,0 @@ -kind: SecurityContextConstraints -apiVersion: security.openshift.io/v1 -metadata: - name: daemonset-with-hostport - annotations: - kubernetes.io/description: 'Allows DaemonSets to bind to a well-known host port' -runAsUser: - type: RunAsAny -seLinuxContext: - type: RunAsAny -allowHostPorts: true -allowHostDirVolumePlugin: false -allowHostIPC: false -allowHostNetwork: true -allowHostPID: false -allowPrivilegedContainer: false -readOnlyRootFilesystem: false ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: otel-collector-daemonset diff --git a/tests/e2e/ingress-subdomains/00-assert.yaml b/tests/e2e/ingress-subdomains/00-assert.yaml deleted file mode 100644 index d92353b3d..000000000 --- a/tests/e2e/ingress-subdomains/00-assert.yaml +++ /dev/null @@ -1,45 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - something.com: "true" - labels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-ingress - name: simplest-ingress - ownerReferences: - - apiVersion: opentelemetry.io/v1alpha1 - blockOwnerDeletion: true - controller: true - kind: OpenTelemetryCollector - name: simplest -spec: - rules: - - host: otlp-grpc.test.otel - http: - paths: - - backend: - service: - name: simplest-collector - port: - name: otlp-grpc - path: / - pathType: Prefix - - host: otlp-http.test.otel - http: - paths: - - backend: - service: - name: simplest-collector - port: - name: otlp-http - path: / - pathType: Prefix diff --git a/tests/e2e/ingress-subdomains/00-install.yaml b/tests/e2e/ingress-subdomains/00-install.yaml deleted file mode 100644 index 3f2cff568..000000000 --- a/tests/e2e/ingress-subdomains/00-install.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - mode: "deployment" - ingress: - type: ingress - ruleType: subdomain - hostname: "test.otel" - annotations: - something.com: "true" - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml b/tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml deleted file mode 100644 index b20290f8a..000000000 --- a/tests/e2e/ingress-subdomains/01-report-empty-otlphttp-spans.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - script: | - #!/bin/bash - set -ex - # Export empty payload and check of collector accepted it with 2xx status code - for i in {1..40}; do curl --fail -ivX POST --resolve 'otlp-http.test.otel:80:127.0.0.1' http://otlp-http.test.otel:80/v1/traces -H "Content-Type: application/json" -d '{}' && break || sleep 1; done diff --git a/tests/e2e/ingress/00-assert.yaml b/tests/e2e/ingress/00-assert.yaml deleted file mode 100644 index 5604513d1..000000000 --- a/tests/e2e/ingress/00-assert.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - something.com: "true" - labels: - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: simplest-ingress - name: simplest-ingress - ownerReferences: - - apiVersion: opentelemetry.io/v1alpha1 - blockOwnerDeletion: true - controller: true - kind: OpenTelemetryCollector - name: simplest -spec: - rules: - - host: example.com - http: - paths: - - backend: - service: - name: simplest-collector - port: - name: otlp-grpc - path: /otlp-grpc - pathType: Prefix - - backend: - service: - name: simplest-collector - port: - name: otlp-http - path: /otlp-http - pathType: Prefix diff --git a/tests/e2e/ingress/00-install.yaml b/tests/e2e/ingress/00-install.yaml deleted file mode 100644 index a94b434a6..000000000 --- a/tests/e2e/ingress/00-install.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - mode: "deployment" - ingress: - type: ingress - hostname: "example.com" - annotations: - something.com: "true" - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/managed-reconcile/00-assert.yaml b/tests/e2e/managed-reconcile/00-assert.yaml deleted file mode 100644 index 2c6158305..000000000 --- a/tests/e2e/managed-reconcile/00-assert.yaml +++ /dev/null @@ -1,48 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 -spec: - template: - spec: - serviceAccountName: simplest-collector - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 diff --git a/tests/e2e/managed-reconcile/00-install.yaml b/tests/e2e/managed-reconcile/00-install.yaml deleted file mode 100644 index c96dfca74..000000000 --- a/tests/e2e/managed-reconcile/00-install.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] \ No newline at end of file diff --git a/tests/e2e/managed-reconcile/01-assert.yaml b/tests/e2e/managed-reconcile/01-assert.yaml deleted file mode 100644 index 3cfdb7f49..000000000 --- a/tests/e2e/managed-reconcile/01-assert.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: simplest-collector -data: - collector.yaml: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger, otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml b/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml deleted file mode 100644 index f837bce41..000000000 --- a/tests/e2e/managed-reconcile/01-disable-reconciliation.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - managementState: unmanaged - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] - ---- -# change config map in Unmanaged mode and it should not get overridden as reconciliation is disabled -apiVersion: v1 -kind: ConfigMap -metadata: - name: simplest-collector -data: - collector.yaml: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger, otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/managed-reconcile/02-assert.yaml b/tests/e2e/managed-reconcile/02-assert.yaml deleted file mode 100644 index f1fe0ee15..000000000 --- a/tests/e2e/managed-reconcile/02-assert.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 -spec: - template: - spec: - serviceAccountName: simplest-collector - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: simplest-collector -data: - collector.yaml: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml b/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml deleted file mode 100644 index 3740997bf..000000000 --- a/tests/e2e/managed-reconcile/02-enable-reconciliation.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - managementState: managed - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/multiple-configmaps/00-assert.yaml b/tests/e2e/multiple-configmaps/00-assert.yaml deleted file mode 100644 index 14c929470..000000000 --- a/tests/e2e/multiple-configmaps/00-assert.yaml +++ /dev/null @@ -1,51 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: mount-test1 -data: - export.ini: | - - EXPORT=true ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: mount-test2 -data: - otel.ini: | - - OTEL_ENDPOINT=localhost ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-with-configmaps-collector -spec: - template: - spec: - volumes: - - name: otc-internal - configMap: - name: simplest-with-configmaps-collector - items: - - key: collector.yaml - path: collector.yaml - defaultMode: 420 - - name: configmap-mount-test1 - configMap: - name: mount-test1 - defaultMode: 420 - - name: configmap-mount-test2 - configMap: - name: mount-test2 - defaultMode: 420 - containers: - - name: otc-container - volumeMounts: - - name: otc-internal - mountPath: /conf - - name: configmap-mount-test1 - mountPath: /var/conf/configmap-mount-test1 - - name: configmap-mount-test2 - mountPath: /var/conf/dir/configmap-mount-test2 -status: - readyReplicas: 1 diff --git a/tests/e2e/multiple-configmaps/00-install.yaml b/tests/e2e/multiple-configmaps/00-install.yaml deleted file mode 100644 index 0dc18245f..000000000 --- a/tests/e2e/multiple-configmaps/00-install.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: mount-test1 -data: - export.ini: | - - EXPORT=true ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: mount-test2 -data: - otel.ini: | - - OTEL_ENDPOINT=localhost ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest-with-configmaps -spec: - mode: "deployment" - configmaps: - - name: mount-test1 - mountpath: / - - name: mount-test2 - mountpath: /dir - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e/prometheus-config-validation/00-assert.yaml b/tests/e2e/prometheus-config-validation/00-assert.yaml deleted file mode 100644 index 3f4f17796..000000000 --- a/tests/e2e/prometheus-config-validation/00-assert.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: promreceiver-allocatorconfig-collector -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: promreceiver-allocatorconfig-targetallocator -status: - replicas: 1 - readyReplicas: 1 ---- -# Print TA and operator logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/component=opentelemetry-targetallocator - - selector: app.kubernetes.io/component=opentelemetry-collector - - selector: app.kubernetes.io/name=opentelemetry-operator - namespace: opentelemetry-operator-system - container: manager diff --git a/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml b/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml deleted file mode 100644 index b248e0f30..000000000 --- a/tests/e2e/prometheus-config-validation/00-promreceiver-allocatorconfig.yaml +++ /dev/null @@ -1,69 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ta -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: pod-view -rules: -- apiGroups: [""] - resources: [ "pods" ] - verbs: [ "get", "list", "watch"] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: promreceiver-allocatorconfig -spec: - mode: statefulset - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - serviceAccount: ta - prometheusCR: - enabled: true - - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - target_allocator: - endpoint: http://promreceiver-allocatorconfig-targetallocator - interval: 30s - collector_id: ${POD_NAME} - - processors: - - exporters: - debug: - extensions: - health_check: - service: - telemetry: - metrics: - address: :8888 - extensions: - - health_check - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/prometheus-config-validation/01-assert.yaml b/tests/e2e/prometheus-config-validation/01-assert.yaml deleted file mode 100644 index 07d50c63c..000000000 --- a/tests/e2e/prometheus-config-validation/01-assert.yaml +++ /dev/null @@ -1,28 +0,0 @@ -## Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved -## Unfortunately kuttl doesn't have a way to skip tests - -# apiVersion: apps/v1 -# kind: StatefulSet -# metadata: -# name: labeldrop-collector -# status: -# replicas: 1 -# readyReplicas: 1 -# --- -# apiVersion: apps/v1 -# kind: Deployment -# metadata: -# name: labeldrop-targetallocator -# status: -# replicas: 1 -# readyReplicas: 1 -# --- -# # Print TA and operator logs if test fails -# apiVersion: kuttl.dev/v1beta1 -# kind: TestAssert -# collectors: -# - selector: app.kubernetes.io/component=opentelemetry-targetallocator -# - selector: app.kubernetes.io/component=opentelemetry-collector -# - selector: app.kubernetes.io/name=opentelemetry-operator -# namespace: opentelemetry-operator-system -# container: manager diff --git a/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml b/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml deleted file mode 100644 index 45c9c3a2a..000000000 --- a/tests/e2e/prometheus-config-validation/01-promreceiver-labeldrop.yaml +++ /dev/null @@ -1,49 +0,0 @@ -# Uncomment this after https://github.com/open-telemetry/opentelemetry-operator/issues/958 is resolved -# Unfortunately kuttl doesn't have a way to skip tests - -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: labeldrop -spec: - mode: statefulset - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - serviceAccount: ta - prometheusCR: - enabled: true - - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - metric_relabel_configs: - - action: labeldrop - regex: (id|name) - - target_allocator: - endpoint: http://labeldrop-targetallocator - interval: 30s - collector_id: ${POD_NAME} - - processors: - - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/prometheus-config-validation/02-assert.yaml b/tests/e2e/prometheus-config-validation/02-assert.yaml deleted file mode 100644 index 33727878d..000000000 --- a/tests/e2e/prometheus-config-validation/02-assert.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: promreceiver-allocatorconfig-extra-collector -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: promreceiver-allocatorconfig-extra-targetallocator -status: - replicas: 1 - readyReplicas: 1 ---- -# Print TA and operator logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/component=opentelemetry-targetallocator - - selector: app.kubernetes.io/component=opentelemetry-collector - - selector: app.kubernetes.io/name=opentelemetry-operator - namespace: opentelemetry-operator-system - container: manager diff --git a/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml b/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml deleted file mode 100644 index 9fe535501..000000000 --- a/tests/e2e/prometheus-config-validation/02-promreceiver-allocatorconfig-extra.yaml +++ /dev/null @@ -1,53 +0,0 @@ ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: promreceiver-allocatorconfig-extra -spec: - mode: statefulset - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - serviceAccount: ta - prometheusCR: - enabled: true - - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - target_allocator: - endpoint: http://promreceiver-allocatorconfig-extra-targetallocator - interval: 30s - collector_id: ${POD_NAME} - http_sd_config: - refresh_interval: 10s - - processors: - - exporters: - debug: - extensions: - health_check: - service: - telemetry: - metrics: - address: :8888 - extensions: - - health_check - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] - diff --git a/tests/e2e/prometheus-config-validation/03-assert.yaml b/tests/e2e/prometheus-config-validation/03-assert.yaml deleted file mode 100644 index b9c6d5d5e..000000000 --- a/tests/e2e/prometheus-config-validation/03-assert.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: promreceiver-nopromconfig-collector -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: promreceiver-nopromconfig-targetallocator -status: - replicas: 1 - readyReplicas: 1 ---- -# Print TA and operator logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/component=opentelemetry-targetallocator - - selector: app.kubernetes.io/component=opentelemetry-collector - - selector: app.kubernetes.io/name=opentelemetry-operator - namespace: opentelemetry-operator-system - container: manager diff --git a/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml b/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml deleted file mode 100644 index 980f3b85d..000000000 --- a/tests/e2e/prometheus-config-validation/03-promreceiver-nopromconfig.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: promreceiver-nopromconfig -spec: - mode: statefulset - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - serviceAccount: ta - prometheusCR: - enabled: true - - config: | - receivers: - jaeger: - protocols: - grpc: - - prometheus: - config: - scrape_configs: [] - target_allocator: - endpoint: http://promreceiver-nopromconfig-targetallocator - interval: 30s - collector_id: ${POD_NAME} - http_sd_config: - refresh_interval: 10s - - processors: - - exporters: - debug: - extensions: - health_check: - service: - telemetry: - metrics: - address: :8888 - extensions: - - health_check - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] - diff --git a/tests/e2e/smoke-daemonset/00-assert.yaml b/tests/e2e/smoke-daemonset/00-assert.yaml deleted file mode 100644 index 7dff61957..000000000 --- a/tests/e2e/smoke-daemonset/00-assert.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: daemonset-test-collector -spec: - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 0 - maxUnavailable: 1 -status: - numberMisscheduled: 0 - ---- -# This KUTTL assert uses the check-daemonset.sh script to ensure the number of ready pods in a daemonset matches the desired count, retrying until successful or a timeout occurs. The script is needed as the number of Kubernetes cluster nodes can vary and we cannot statically set desiredNumberScheduled and numberReady in the assert for daemonset status. - -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -commands: -- script: ./tests/e2e/smoke-daemonset/check-daemonset.sh diff --git a/tests/e2e/smoke-daemonset/00-install.yaml b/tests/e2e/smoke-daemonset/00-install.yaml deleted file mode 100644 index aa49f7f53..000000000 --- a/tests/e2e/smoke-daemonset/00-install.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: daemonset-test -spec: - mode: daemonset - updateStrategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-daemonset/check-daemonset.sh b/tests/e2e/smoke-daemonset/check-daemonset.sh deleted file mode 100755 index 4e6c2d806..000000000 --- a/tests/e2e/smoke-daemonset/check-daemonset.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Name of the daemonset to check -DAEMONSET_NAME="daemonset-test-collector" - -# Get the desired and ready pod counts for the daemonset -read DESIRED READY <<< $(kubectl get daemonset -n $NAMESPACE $DAEMONSET_NAME -o custom-columns=:status.desiredNumberScheduled,:status.numberReady --no-headers) - -# Check if the desired count matches the ready count -if [ "$DESIRED" -eq "$READY" ]; then - echo "Desired count ($DESIRED) matches the ready count ($READY) for $DAEMONSET_NAME." -else - echo "Desired count ($DESIRED) does not match the ready count ($READY) for $DAEMONSET_NAME." - exit 1 -fi diff --git a/tests/e2e/smoke-init-containers/00-assert.yaml b/tests/e2e/smoke-init-containers/00-assert.yaml deleted file mode 100644 index 3f0093781..000000000 --- a/tests/e2e/smoke-init-containers/00-assert.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -spec: - template: - spec: - initContainers: - - name: init-test-echo -status: - readyReplicas: 1 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 diff --git a/tests/e2e/smoke-init-containers/00-install.yaml b/tests/e2e/smoke-init-containers/00-install.yaml deleted file mode 100644 index a0eb85cde..000000000 --- a/tests/e2e/smoke-init-containers/00-install.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - initContainers: - - name: init-test-echo - image: alpine - command: ['sh', '-c', 'sleep 5 && echo "this is a test"'] - config: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger,otlp] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-pod-annotations/00-assert.yaml b/tests/e2e/smoke-pod-annotations/00-assert.yaml deleted file mode 100644 index a8d1af4fc..000000000 --- a/tests/e2e/smoke-pod-annotations/00-assert.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: pa-collector - annotations: - regular-annotation: regular-value -spec: - template: - metadata: - annotations: - pod-annotation1: value1 - pod-annotation2: value2 -status: - readyReplicas: 1 diff --git a/tests/e2e/smoke-pod-annotations/00-install.yaml b/tests/e2e/smoke-pod-annotations/00-install.yaml deleted file mode 100644 index d1e17a83b..000000000 --- a/tests/e2e/smoke-pod-annotations/00-install.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: pa - annotations: - regular-annotation: regular-value -spec: - podAnnotations: - pod-annotation1: value1 - pod-annotation2: value2 - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-pod-labels/00-assert.yaml b/tests/e2e/smoke-pod-labels/00-assert.yaml deleted file mode 100644 index 8bb507544..000000000 --- a/tests/e2e/smoke-pod-labels/00-assert.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: testlabel-collector - labels: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/managed-by: opentelemetry-operator - app.kubernetes.io/name: testlabel-collector - app.kubernetes.io/part-of: opentelemetry - app.kubernetes.io/version: a0c6dea261b3d794971c23c5665173a39f0ce2aa09b9d88b753bd46776d7b05 -status: - readyReplicas: 1 diff --git a/tests/e2e/smoke-pod-labels/00-install.yaml b/tests/e2e/smoke-pod-labels/00-install.yaml deleted file mode 100644 index 00843cf43..000000000 --- a/tests/e2e/smoke-pod-labels/00-install.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: testlabel -spec: - image: otel/opentelemetry-collector-contrib@sha256:a0c6dea261b3d794971c23c5665173a39f0ce2aa09b9d88b753bd46776d7b05b - config: | - receivers: - otlp: - protocols: - grpc: - http: - processors: - memory_limiter: - check_interval: 1s - limit_percentage: 75 - spike_limit_percentage: 15 - batch: - send_batch_size: 10000 - timeout: 10s - - exporters: - logging: - - service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [logging] diff --git a/tests/e2e/smoke-restarting-deployment/00-assert.yaml b/tests/e2e/smoke-restarting-deployment/00-assert.yaml deleted file mode 100644 index 0e8b1adeb..000000000 --- a/tests/e2e/smoke-restarting-deployment/00-assert.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: restarting-collector -status: - readyReplicas: 1 - ---- - -apiVersion: v1 -kind: Pod -spec: - containers: - - name: otc-container -status: - phase: Running - ---- - -apiVersion: v1 -kind: Service -metadata: - name: restarting-collector -spec: - ports: - - targetPort: 14250 diff --git a/tests/e2e/smoke-restarting-deployment/00-errors.yaml b/tests/e2e/smoke-restarting-deployment/00-errors.yaml deleted file mode 100644 index 6f6df7501..000000000 --- a/tests/e2e/smoke-restarting-deployment/00-errors.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: restarting-collector -spec: - ports: - - targetPort: 4317 diff --git a/tests/e2e/smoke-restarting-deployment/00-install.yaml b/tests/e2e/smoke-restarting-deployment/00-install.yaml deleted file mode 100644 index 705047cff..000000000 --- a/tests/e2e/smoke-restarting-deployment/00-install.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: restarting -spec: - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml b/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml deleted file mode 100644 index 765697d02..000000000 --- a/tests/e2e/smoke-restarting-deployment/01-assert-second-config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: restarting-collector -status: - readyReplicas: 1 - ---- - -apiVersion: v1 -kind: Pod -spec: - containers: - - name: otc-container -status: - phase: Running - ---- - -apiVersion: v1 -kind: Service -metadata: - name: restarting-collector -spec: - ports: - - targetPort: 14250 - - targetPort: 4317 diff --git a/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml b/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml deleted file mode 100644 index 13856cf51..000000000 --- a/tests/e2e/smoke-restarting-deployment/01-install-second-config.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: restarting -spec: - config: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger, otlp] - processors: [] - exporters: [debug] - diff --git a/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml b/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml deleted file mode 100644 index 125b485db..000000000 --- a/tests/e2e/smoke-sidecar-other-namespace/00-install.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: kuttl-otel-sidecar-other-namespace ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar-for-my-app - namespace: kuttl-otel-sidecar-other-namespace -spec: - mode: sidecar - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml deleted file mode 100644 index af10887f6..000000000 --- a/tests/e2e/smoke-sidecar-other-namespace/01-assert.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - namespace: kuttl-otel-sidecar-other-namespace - annotations: - sidecar.opentelemetry.io/inject: "kuttl-otel-sidecar-other-namespace/sidecar-for-my-app" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - - name: otc-container - env: - - name: POD_NAME - - name: OTEL_CONFIG - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES -status: - phase: Running diff --git a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml b/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml deleted file mode 100644 index 8f5bfd137..000000000 --- a/tests/e2e/smoke-sidecar-other-namespace/01-install-app.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar - namespace: kuttl-otel-sidecar-other-namespace -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "kuttl-otel-sidecar-other-namespace/sidecar-for-my-app" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e/smoke-sidecar/00-install.yaml b/tests/e2e/smoke-sidecar/00-install.yaml deleted file mode 100644 index ad33d3353..000000000 --- a/tests/e2e/smoke-sidecar/00-install.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: sidecar-for-my-app -spec: - mode: sidecar - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-sidecar/01-assert.yaml b/tests/e2e/smoke-sidecar/01-assert.yaml deleted file mode 100644 index b4bd1b960..000000000 --- a/tests/e2e/smoke-sidecar/01-assert.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - sidecar.opentelemetry.io/inject: "true" - labels: - app: my-pod-with-sidecar -spec: - containers: - - name: myapp - - name: otc-container - env: - - name: POD_NAME - - name: OTEL_CONFIG - - name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME - - name: OTEL_RESOURCE_ATTRIBUTES_POD_UID - - name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME - - name: OTEL_RESOURCE_ATTRIBUTES -status: - phase: Running diff --git a/tests/e2e/smoke-sidecar/01-install-app.yaml b/tests/e2e/smoke-sidecar/01-install-app.yaml deleted file mode 100644 index 2044f5d0d..000000000 --- a/tests/e2e/smoke-sidecar/01-install-app.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: my-deployment-with-sidecar -spec: - selector: - matchLabels: - app: my-pod-with-sidecar - replicas: 1 - template: - metadata: - labels: - app: my-pod-with-sidecar - annotations: - sidecar.opentelemetry.io/inject: "true" - spec: - containers: - - name: myapp - image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-python:main diff --git a/tests/e2e/smoke-simplest/00-assert.yaml b/tests/e2e/smoke-simplest/00-assert.yaml deleted file mode 100644 index 17365cdac..000000000 --- a/tests/e2e/smoke-simplest/00-assert.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: simplest-collector -status: - readyReplicas: 1 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector-headless -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - ---- - -apiVersion: v1 -kind: Service -metadata: - name: simplest-collector -spec: - ports: - - appProtocol: grpc - name: jaeger-grpc - port: 14250 - protocol: TCP - targetPort: 14250 - - appProtocol: grpc - name: otlp-grpc - port: 4317 - protocol: TCP - targetPort: 4317 - - appProtocol: http - name: otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 diff --git a/tests/e2e/smoke-simplest/00-install.yaml b/tests/e2e/smoke-simplest/00-install.yaml deleted file mode 100644 index 0fb69308c..000000000 --- a/tests/e2e/smoke-simplest/00-install.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: simplest -spec: - config: | - receivers: - jaeger: - protocols: - grpc: - otlp: - protocols: - grpc: - http: - processors: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [jaeger,otlp] - processors: [] - exporters: [debug] \ No newline at end of file diff --git a/tests/e2e/smoke-statefulset/00-assert.yaml b/tests/e2e/smoke-statefulset/00-assert.yaml deleted file mode 100644 index 05d4c0b14..000000000 --- a/tests/e2e/smoke-statefulset/00-assert.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: stateful-collector -status: - replicas: 1 - readyReplicas: 1 \ No newline at end of file diff --git a/tests/e2e/smoke-statefulset/00-install.yaml b/tests/e2e/smoke-statefulset/00-install.yaml deleted file mode 100644 index 86b39af57..000000000 --- a/tests/e2e/smoke-statefulset/00-install.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-targetallocator/00-assert.yaml b/tests/e2e/smoke-targetallocator/00-assert.yaml deleted file mode 100644 index f46af1dd1..000000000 --- a/tests/e2e/smoke-targetallocator/00-assert.yaml +++ /dev/null @@ -1,55 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: stateful-collector -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: stateful-targetallocator -status: - replicas: 1 - readyReplicas: 1 - observedGeneration: 1 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: stateful-targetallocator ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: stateful-collector -data: - collector.yaml: | - exporters: - debug: null - processors: null - receivers: - jaeger: - protocols: - grpc: null - prometheus: - config: {} - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://stateful-targetallocator:80 - interval: 30s - service: - pipelines: - traces: - exporters: - - debug - processors: [] - receivers: - - jaeger ---- -# Print TA pod logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/component=opentelemetry-targetallocator diff --git a/tests/e2e/smoke-targetallocator/00-install.yaml b/tests/e2e/smoke-targetallocator/00-install.yaml deleted file mode 100644 index e61d014c5..000000000 --- a/tests/e2e/smoke-targetallocator/00-install.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ta -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: pod-view -rules: -- apiGroups: [""] - resources: [ "pods" ] - verbs: [ "get", "list", "watch"] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - targetAllocator: - enabled: true - serviceAccount: ta - image: "local/opentelemetry-operator-targetallocator:e2e" - prometheusCR: - enabled: true - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - - processors: - - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/smoke-targetallocator/01-assert.yaml b/tests/e2e/smoke-targetallocator/01-assert.yaml deleted file mode 100644 index e420b0348..000000000 --- a/tests/e2e/smoke-targetallocator/01-assert.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: stateful-targetallocator -status: - replicas: 1 - readyReplicas: 1 - observedGeneration: 2 diff --git a/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml b/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml deleted file mode 100644 index 2ded7614a..000000000 --- a/tests/e2e/smoke-targetallocator/01-change-ta-config.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - targetAllocator: - enabled: true - serviceAccount: ta - image: "local/opentelemetry-operator-targetallocator:e2e" - prometheusCR: - enabled: true - serviceMonitorSelector: - key: value # this is just an arbitrary change to the target allocator config - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - - processors: - - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/statefulset-features/00-assert.yaml b/tests/e2e/statefulset-features/00-assert.yaml deleted file mode 100644 index 744ba76e2..000000000 --- a/tests/e2e/statefulset-features/00-assert.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: stateful-collector -spec: - podManagementPolicy: Parallel - template: - spec: - containers: - - args: - - --config=/conf/collector.yaml - name: otc-container - volumeMounts: - - mountPath: /conf - name: otc-internal - - mountPath: /usr/share/testvolume - name: testvolume - volumes: - - configMap: - items: - - key: collector.yaml - path: collector.yaml - name: stateful-collector - name: otc-internal - - emptyDir: {} - name: testvolume - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: testvolume - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - volumeMode: Filesystem -status: - replicas: 3 - readyReplicas: 3 diff --git a/tests/e2e/statefulset-features/00-install.yaml b/tests/e2e/statefulset-features/00-install.yaml deleted file mode 100644 index d144a8ec8..000000000 --- a/tests/e2e/statefulset-features/00-install.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - replicas: 3 - volumes: - - name: testvolume - volumeMounts: - - name: testvolume - mountPath: /usr/share/testvolume - volumeClaimTemplates: - - metadata: - name: testvolume - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 1Gi - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/statefulset-features/01-assert.yaml b/tests/e2e/statefulset-features/01-assert.yaml deleted file mode 100644 index fdccb0fad..000000000 --- a/tests/e2e/statefulset-features/01-assert.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: stateful-collector -spec: - podManagementPolicy: Parallel - template: - spec: - containers: - - args: - - --config=/conf/collector.yaml - name: otc-container - volumeMounts: - - mountPath: /conf - name: otc-internal - - mountPath: /usr/share/testvolume - name: testvolume - volumes: - - configMap: - items: - - key: collector.yaml - path: collector.yaml - name: stateful-collector - name: otc-internal - - emptyDir: {} - name: testvolume - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: testvolume - spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 1Gi - volumeMode: Filesystem -status: - replicas: 3 - readyReplicas: 3 diff --git a/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml b/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml deleted file mode 100644 index bed1ca77c..000000000 --- a/tests/e2e/statefulset-features/01-update-volume-claim-templates.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - replicas: 3 - volumes: - - name: testvolume - volumeMounts: - - name: testvolume - mountPath: /usr/share/testvolume - volumeClaimTemplates: - - metadata: - name: testvolume - spec: - accessModes: [ "ReadWriteMany" ] # change accessMode to trigger statefulset recreation. - resources: - requests: - storage: 1Gi - config: | - receivers: - jaeger: - protocols: - grpc: - processors: - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/targetallocator-features/00-assert.yaml b/tests/e2e/targetallocator-features/00-assert.yaml deleted file mode 100644 index dc002c767..000000000 --- a/tests/e2e/targetallocator-features/00-assert.yaml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: stateful-collector -spec: - podManagementPolicy: Parallel - template: - spec: - containers: - - args: - - --config=/conf/collector.yaml - name: otc-container - volumeMounts: - - mountPath: /conf - name: otc-internal - - mountPath: /usr/share/testvolume - name: testvolume - volumes: - - configMap: - items: - - key: collector.yaml - path: collector.yaml - name: stateful-collector - name: otc-internal - - emptyDir: {} - name: testvolume - volumeClaimTemplates: - - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: testvolume - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - volumeMode: Filesystem -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: stateful-targetallocator -spec: - template: - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: ingress-ready - operator: In - values: - - "true" - securityContext: - runAsUser: 1000 - containers: - - name: ta-container - args: - - --enable-prometheus-cr-watcher - env: - - name: TEST_ENV - value: "test" - - name: OTELCOL_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - mountPath: /conf - name: ta-internal - readinessProbe: - httpGet: - path: /readyz - successThreshold: 1 - failureThreshold: 3 - timeoutSeconds: 1 - periodSeconds: 10 - livenessProbe: - httpGet: - path: /livez - successThreshold: 1 - failureThreshold: 3 - timeoutSeconds: 1 - periodSeconds: 10 - volumes: - - configMap: - items: - - key: targetallocator.yaml - path: targetallocator.yaml - name: stateful-targetallocator - name: ta-internal -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: stateful-targetallocator ---- -# Print TA pod logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/component=opentelemetry-targetallocator diff --git a/tests/e2e/targetallocator-features/00-install.yaml b/tests/e2e/targetallocator-features/00-install.yaml deleted file mode 100644 index d134dac26..000000000 --- a/tests/e2e/targetallocator-features/00-install.yaml +++ /dev/null @@ -1,106 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ta -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: pod-view -rules: -- apiGroups: [""] - resources: [ "pods" ] - verbs: [ "get", "list", "watch"] -- apiGroups: ["monitoring.coreos.com"] - resources: ["servicemonitors"] - verbs: ["get", "list", "watch"] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl -n $NAMESPACE create rolebinding default-view-$NAMESPACE --role=pod-view --serviceaccount=$NAMESPACE:ta - # Annotate the namespace to allow the application to run using an specific group and user in OpenShift - # https://docs.openshift.com/dedicated/authentication/managing-security-context-constraints.html - # This annotation has no effect in Kubernetes - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.uid-range=1000/1000 --overwrite - - command: kubectl annotate namespace ${NAMESPACE} openshift.io/sa.scc.supplemental-groups=3000/1000 --overwrite ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: stateful -spec: - mode: statefulset - volumes: - - name: testvolume - volumeMounts: - - name: testvolume - mountPath: /usr/share/testvolume - volumeClaimTemplates: - - metadata: - name: testvolume - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 1Gi - targetAllocator: - enabled: true - image: "local/opentelemetry-operator-targetallocator:e2e" - serviceAccount: ta - securityContext: - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 3000 - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: ingress-ready - operator: In - values: - - "true" - prometheusCR: - enabled: true - env: - - name: TEST_ENV - value: "test" - config: | - receivers: - jaeger: - protocols: - grpc: - - # Collect own metrics - prometheus: - config: - scrape_configs: - - job_name: 'otel-collector' - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888' ] - relabel_configs: - - regex: __meta_kubernetes_node_label_(.+) - action: labelmap - replacement: $$1 - - regex: test_.* - action: labeldrop - - regex: 'metrica_*|metricb.*' - action: labelkeep - replacement: $$1 - - processors: - - exporters: - debug: - service: - pipelines: - traces: - receivers: [jaeger] - processors: [] - exporters: [debug] diff --git a/tests/e2e/targetallocator-features/01-assert.yaml b/tests/e2e/targetallocator-features/01-assert.yaml deleted file mode 100644 index 7e1a837f9..000000000 --- a/tests/e2e/targetallocator-features/01-assert.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# waiting for liveness probe to work -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -timeout: 5 ---- -apiVersion: v1 -kind: Pod -metadata: - labels: - app.kubernetes.io/component: opentelemetry-targetallocator -status: - containerStatuses: - - name: ta-container - restartCount: 0 diff --git a/tests/e2e/targetallocator-features/01-liveness.yaml b/tests/e2e/targetallocator-features/01-liveness.yaml deleted file mode 100644 index db15c603f..000000000 --- a/tests/e2e/targetallocator-features/01-liveness.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# waiting for liveness probe to work -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: -- command: sleep 35 diff --git a/tests/e2e/targetallocator-prometheuscr/00-assert.yaml b/tests/e2e/targetallocator-prometheuscr/00-assert.yaml deleted file mode 100644 index cd4534193..000000000 --- a/tests/e2e/targetallocator-prometheuscr/00-assert.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: prometheus-cr-collector -status: - replicas: 1 - readyReplicas: 1 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: prometheus-cr-targetallocator -status: - replicas: 1 - readyReplicas: 1 - observedGeneration: 1 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: prometheus-cr-targetallocator ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: prometheus-cr-collector -data: - collector.yaml: | - exporters: - prometheus: - endpoint: 0.0.0.0:9090 - processors: null - receivers: - prometheus: - config: {} - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://prometheus-cr-targetallocator:80 - interval: 30s - service: - pipelines: - metrics: - exporters: - - prometheus - processors: [] - receivers: - - prometheus ---- -# Print TA pod logs if test fails -apiVersion: kuttl.dev/v1beta1 -kind: TestAssert -collectors: - - selector: app.kubernetes.io/managed-by=opentelemetry-operator diff --git a/tests/e2e/targetallocator-prometheuscr/00-install.yaml b/tests/e2e/targetallocator-prometheuscr/00-install.yaml deleted file mode 100644 index 148763a3f..000000000 --- a/tests/e2e/targetallocator-prometheuscr/00-install.yaml +++ /dev/null @@ -1,137 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ta -automountServiceAccountToken: true ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: collector -automountServiceAccountToken: true ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: ta -rules: -- apiGroups: [""] - resources: - - pods - - nodes - - services - - endpoints - - configmaps - - secrets - - namespaces - verbs: - - get - - watch - - list -- apiGroups: ["apps"] - resources: - - statefulsets - - services - - endpoints - verbs: - - get - - watch - - list -- apiGroups: ["discovery.k8s.io"] - resources: - - endpointslices - verbs: - - get - - watch - - list -- apiGroups: ["networking.k8s.io"] - resources: - - ingresses - verbs: - - get - - watch - - list -- apiGroups: ["monitoring.coreos.com"] - resources: - - servicemonitors - - podmonitors - verbs: - - get - - watch - - list -- nonResourceURLs: ["/metrics"] - verbs: ["get"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: collector -rules: -- apiGroups: [""] - resources: - - pods - - nodes - - nodes/metrics - - services - - endpoints - verbs: - - get - - watch - - list -- apiGroups: ["networking.k8s.io"] - resources: - - ingresses - verbs: - - get - - watch - - list -- nonResourceURLs: ["/metrics", "/metrics/cadvisor"] - verbs: ["get"] ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -commands: - - command: kubectl create clusterrolebinding ta-$NAMESPACE --clusterrole=ta --serviceaccount=$NAMESPACE:ta - - command: kubectl create clusterrolebinding collector-$NAMESPACE --clusterrole=collector --serviceaccount=$NAMESPACE:collector ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: prometheus-cr -spec: - mode: statefulset - serviceAccount: collector - targetAllocator: - enabled: true - serviceAccount: ta - image: "local/opentelemetry-operator-targetallocator:e2e" - prometheusCR: - enabled: true - config: | - receivers: - prometheus: - config: - scrape_configs: [] - - processors: - - exporters: - prometheus: - endpoint: 0.0.0.0:9090 - service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [prometheus] ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: prometheus-cr -spec: - endpoints: - - port: monitoring - selector: - matchLabels: - app.kubernetes.io/managed-by: opentelemetry-operator diff --git a/tests/e2e/targetallocator-prometheuscr/01-assert.yaml b/tests/e2e/targetallocator-prometheuscr/01-assert.yaml deleted file mode 100644 index 2705a7ed8..000000000 --- a/tests/e2e/targetallocator-prometheuscr/01-assert.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: check-metrics -status: - succeeded: 1 ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-jobs -status: - succeeded: 1 ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-scrape-configs -status: - succeeded: 1 diff --git a/tests/e2e/targetallocator-prometheuscr/01-install.yaml b/tests/e2e/targetallocator-prometheuscr/01-install.yaml deleted file mode 100644 index e28a148c0..000000000 --- a/tests/e2e/targetallocator-prometheuscr/01-install.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-metrics -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: check-metrics - image: curlimages/curl - args: - - /bin/sh - - -c - - curl -s http://prometheus-cr-collector:9090/metrics | grep "otelcol_exporter_sent_metric_points_total{" ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-jobs -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: check-metrics - image: curlimages/curl - args: - - /bin/sh - - -c - - curl -s http://prometheus-cr-targetallocator/scrape_configs | grep "prometheus-cr" ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: check-ta-scrape-configs -spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: check-metrics - image: curlimages/curl - args: - - /bin/sh - - -c - - curl -s http://prometheus-cr-targetallocator/jobs | grep "prometheus-cr" diff --git a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile b/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile deleted file mode 100644 index ee1314608..000000000 --- a/tests/instrumentation-e2e-apps/apache-httpd/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ - -FROM httpd:2.4 - -RUN sed -i "s#Listen 80#Listen 8080#g" /usr/local/apache2/conf/httpd.conf -RUN chmod 777 -R /usr/local/apache2/ \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/dotnet/Dockerfile b/tests/instrumentation-e2e-apps/dotnet/Dockerfile deleted file mode 100644 index c7f2eb833..000000000 --- a/tests/instrumentation-e2e-apps/dotnet/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0.400-bookworm-slim-amd64 AS build -ARG TARGETARCH -WORKDIR /source - -RUN dotnet new webapp -o MyWebApp --no-https -f net7.0 - -WORKDIR /source/MyWebApp -RUN dotnet publish -a $TARGETARCH -o /app - -FROM mcr.microsoft.com/dotnet/aspnet:7.0.10-bullseye-slim - -ENV DOTNET_ROLL_FORWARD=Major -ENV DOTNET_ROLL_FORWARD_PRE_RELEASE=1 - -WORKDIR /app -COPY --from=build /app/ . - -ENTRYPOINT ["./MyWebApp"] \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/golang/Dockerfile b/tests/instrumentation-e2e-apps/golang/Dockerfile deleted file mode 100644 index fd80c06f1..000000000 --- a/tests/instrumentation-e2e-apps/golang/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM golang:1.21-alpine as builder - -COPY main.go . -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -o app main.go - -FROM scratch -COPY --from=builder /go/app . -ENTRYPOINT ["./app"] diff --git a/tests/instrumentation-e2e-apps/golang/main.go b/tests/instrumentation-e2e-apps/golang/main.go deleted file mode 100644 index ad3641037..000000000 --- a/tests/instrumentation-e2e-apps/golang/main.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "fmt" - "net/http" - "time" -) - -func main() { - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - fmt.Println("Hi") - }) - - server := &http.Server{ - Addr: ":8080", - ReadHeaderTimeout: 3 * time.Second, - } - - err := server.ListenAndServe() - if err != nil { - panic(err) - } -} diff --git a/tests/instrumentation-e2e-apps/java/DemoApplication.java b/tests/instrumentation-e2e-apps/java/DemoApplication.java deleted file mode 100644 index ca32ea8cc..000000000 --- a/tests/instrumentation-e2e-apps/java/DemoApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.example.app; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - - -@RestController -@SpringBootApplication -public class DemoApplication { - - @RequestMapping("/") - String home() { - return "Hello World!"; - } - - public static void main(String[] args) { - SpringApplication.run(DemoApplication.class, args); - } - -} \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/java/Dockerfile b/tests/instrumentation-e2e-apps/java/Dockerfile deleted file mode 100644 index 4e06136ea..000000000 --- a/tests/instrumentation-e2e-apps/java/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM --platform=$BUILDPLATFORM eclipse-temurin:17-jdk-focal as builder - -RUN apt update -RUN apt install zip unzip -y - -RUN mkdir /app - -# In some archs, there could be probems setting the executable permissions -RUN mkdir /app/.gradle -RUN chmod -R +x /root/ - -RUN curl -s "https://get.sdkman.io" | bash -RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install springboot && spring init /app" - -WORKDIR /app -COPY DemoApplication.java /app/src/main/java/com/example/app/ -COPY build.gradle . -RUN ./gradlew bootJar --no-daemon - -FROM eclipse-temurin:17.0.8.1_1-jre - -COPY --from=builder /app/build/libs/app-0.0.1-SNAPSHOT.jar . -ENTRYPOINT ["java", "-jar", "app-0.0.1-SNAPSHOT.jar"] diff --git a/tests/instrumentation-e2e-apps/java/build.gradle b/tests/instrumentation-e2e-apps/java/build.gradle deleted file mode 100644 index 99bd13693..000000000 --- a/tests/instrumentation-e2e-apps/java/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.1.3' - id 'io.spring.dependency-management' version '1.1.3' -} - -group = 'com.example' -version = '0.0.1-SNAPSHOT' - -java { - sourceCompatibility = '17' -} - -repositories { - mavenCentral() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation 'org.springframework.boot:spring-boot-starter-web-test' -} - -tasks.named('test') { - useJUnitPlatform() -} diff --git a/tests/instrumentation-e2e-apps/nodejs/Dockerfile b/tests/instrumentation-e2e-apps/nodejs/Dockerfile deleted file mode 100644 index 7d624b85e..000000000 --- a/tests/instrumentation-e2e-apps/nodejs/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:20-alpine3.17 -RUN npm install express -g --verbose -COPY index.js . - -ENTRYPOINT ["node", "index.js"] \ No newline at end of file diff --git a/tests/instrumentation-e2e-apps/nodejs/index.js b/tests/instrumentation-e2e-apps/nodejs/index.js deleted file mode 100644 index 17e8f5ee5..000000000 --- a/tests/instrumentation-e2e-apps/nodejs/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const express = require('express') -const app = express() -const port = 3000 - -app.get('/', (req, res) => { - res.send('Hello World!') -}) - -app.listen(port, () => { - console.log("Hi") -}) diff --git a/tests/instrumentation-e2e-apps/python/Dockerfile b/tests/instrumentation-e2e-apps/python/Dockerfile deleted file mode 100644 index e6558779b..000000000 --- a/tests/instrumentation-e2e-apps/python/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM python:alpine3.18 - -COPY requirements.txt . -RUN pip install -r requirements.txt -COPY app.py . - -ENTRYPOINT ["flask", "run", "-p", "8080"] diff --git a/tests/instrumentation-e2e-apps/python/app.py b/tests/instrumentation-e2e-apps/python/app.py deleted file mode 100644 index 32a35d693..000000000 --- a/tests/instrumentation-e2e-apps/python/app.py +++ /dev/null @@ -1,10 +0,0 @@ -from flask import Flask - -app = Flask(__name__) - -@app.route('/') -def index(): - return "Hi" - -if __name__ == "__main__": - app.run(host='0.0.0.0') diff --git a/tests/instrumentation-e2e-apps/python/requirements.txt b/tests/instrumentation-e2e-apps/python/requirements.txt deleted file mode 100644 index cc35792f2..000000000 --- a/tests/instrumentation-e2e-apps/python/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -Flask==2.3.3 \ No newline at end of file From ca51d9504d671052fa2928af50cbeb9054bd889c Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 2 Jan 2024 15:01:10 -0500 Subject: [PATCH 1214/1234] Remove unused workflows, configs. Fix make fmt issues. Add default instrumentation logic --- .github/dependabot.yml | 91 - .github/pull_request_template.md | 9 - .github/workflows/auto-update-java-agent.yaml | 81 - .github/workflows/changelog.yaml | 80 - .github/workflows/check_links_config.json | 17 - .github/workflows/continuous-integration.yaml | 69 - .github/workflows/e2e.yaml | 83 - ...ublish-autoinstrumentation-e2e-images.yaml | 50 - .github/workflows/scorecard.yaml | 67 - Makefile | 2 +- ...aws.amazon.com_amazoncloudwatchagents.yaml | 6555 ++++++++++++-- ...watch.aws.amazon.com_instrumentations.yaml | 1466 +++- .../opentelemetry.io_instrumentations.yaml | 1627 ---- .../bases/opentelemetry.io_opampbridges.yaml | 2949 ------- ...ntelemetry.io_opentelemetrycollectors.yaml | 7513 ----------------- config/crd/kustomizeconfig.yaml | 17 - .../patches/cainjection_in_opampbridges.yaml | 7 - ...ainjection_in_opentelemetrycollectors.yaml | 8 - .../crd/patches/webhook_in_opampbridges.yaml | 16 - config/default/manager_auth_proxy_patch.yaml | 36 - config/manager/kustomization.yaml | 4 +- config/rbac/_opampbridge_editor_role.yaml | 24 - config/rbac/_opampbridge_viewer_role.yaml | 20 - .../rbac/auth_proxy_client_clusterrole.yaml | 7 - config/rbac/auth_proxy_role.yaml | 13 - config/rbac/auth_proxy_role_binding.yaml | 12 - config/rbac/auth_proxy_service.yaml | 17 - config/rbac/leader_election_role.yaml | 33 - config/rbac/leader_election_role_binding.yaml | 12 - .../opentelemetrycollector_editor_role.yaml | 24 - .../opentelemetrycollector_viewer_role.yaml | 20 - config/rbac/role.yaml | 84 +- config/samples/_v1alpha1_opampbridge.yaml | 25 - .../core_v1alpha1_opentelemetrycollector.yaml | 20 - config/samples/exporter-with-tls.yaml | 47 - ...trumentation_v1alpha1_instrumentation.yaml | 7 - config/samples/kustomization.yaml | 6 - config/samples/sidecar.yaml | 21 - config/scorecard/bases/config.yaml | 7 - config/scorecard/kustomization.yaml | 16 - config/scorecard/patches/basic.config.yaml | 10 - config/scorecard/patches/olm.config.yaml | 30 - config/webhook/manifests.yaml | 107 +- docs/api.md | 5368 ------------ .../cmd/validate_instrumentation_vars.go | 8 +- main.go | 4 +- pkg/instrumentation/podmutator.go | 3 +- pkg/instrumentation/podmutator_test.go | 23 + 48 files changed, 7296 insertions(+), 19419 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/auto-update-java-agent.yaml delete mode 100644 .github/workflows/changelog.yaml delete mode 100644 .github/workflows/check_links_config.json delete mode 100644 .github/workflows/continuous-integration.yaml delete mode 100644 .github/workflows/e2e.yaml delete mode 100644 .github/workflows/publish-autoinstrumentation-e2e-images.yaml delete mode 100644 .github/workflows/scorecard.yaml delete mode 100644 config/crd/bases/opentelemetry.io_instrumentations.yaml delete mode 100644 config/crd/bases/opentelemetry.io_opampbridges.yaml delete mode 100644 config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml delete mode 100644 config/crd/kustomizeconfig.yaml delete mode 100644 config/crd/patches/cainjection_in_opampbridges.yaml delete mode 100644 config/crd/patches/cainjection_in_opentelemetrycollectors.yaml delete mode 100644 config/crd/patches/webhook_in_opampbridges.yaml delete mode 100644 config/default/manager_auth_proxy_patch.yaml delete mode 100644 config/rbac/_opampbridge_editor_role.yaml delete mode 100644 config/rbac/_opampbridge_viewer_role.yaml delete mode 100644 config/rbac/auth_proxy_client_clusterrole.yaml delete mode 100644 config/rbac/auth_proxy_role.yaml delete mode 100644 config/rbac/auth_proxy_role_binding.yaml delete mode 100644 config/rbac/auth_proxy_service.yaml delete mode 100644 config/rbac/leader_election_role.yaml delete mode 100644 config/rbac/leader_election_role_binding.yaml delete mode 100644 config/rbac/opentelemetrycollector_editor_role.yaml delete mode 100644 config/rbac/opentelemetrycollector_viewer_role.yaml delete mode 100644 config/samples/_v1alpha1_opampbridge.yaml delete mode 100644 config/samples/core_v1alpha1_opentelemetrycollector.yaml delete mode 100644 config/samples/exporter-with-tls.yaml delete mode 100644 config/samples/instrumentation_v1alpha1_instrumentation.yaml delete mode 100644 config/samples/kustomization.yaml delete mode 100644 config/samples/sidecar.yaml delete mode 100644 config/scorecard/bases/config.yaml delete mode 100644 config/scorecard/kustomization.yaml delete mode 100644 config/scorecard/patches/basic.config.yaml delete mode 100644 config/scorecard/patches/olm.config.yaml delete mode 100644 docs/api.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index fa1ed9e3f..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,91 +0,0 @@ -version: 2 -updates: - - package-ecosystem: gomod - directory: / - schedule: - interval: daily - # Create a group of dependencies to be updated together in one pull request - groups: - golang-org-x: - patterns: - - "golang.org/x/*" - prometheus: - patterns: - - "github.com/prometheus-operator/prometheus-operator" - - "github.com/prometheus-operator/prometheus-operator/*" - - "github.com/prometheus/prometheus" - - "github.com/prometheus/prometheus/*" - - "github.com/prometheus/client_go" - - "github.com/prometheus/client_go/*" - kubernetes: - patterns: - - "k8s.io/*" - - "sigs.k8s.io/*" - - package-ecosystem: gomod - directory: /cmd/operator-opamp-bridge - schedule: - interval: daily - groups: - golang-org-x: - patterns: - - "golang.org/x/*" - prometheus: - patterns: - - "github.com/prometheus-operator/prometheus-operator" - - "github.com/prometheus-operator/prometheus-operator/*" - - "github.com/prometheus/prometheus" - - "github.com/prometheus/prometheus/*" - - "github.com/prometheus/client_go" - - "github.com/prometheus/client_go/*" - kubernetes: - patterns: - - "k8s.io/*" - - "sigs.k8s.io/*" - otel: - patterns: - - go.opentelemetry.io/otel - - go.opentelemetry.io/otel/* - - package-ecosystem: gomod - directory: /cmd/otel-allocator - schedule: - interval: daily - groups: - golang-org-x: - patterns: - - "golang.org/x/*" - prometheus: - patterns: - - "github.com/prometheus-operator/prometheus-operator" - - "github.com/prometheus-operator/prometheus-operator/*" - - "github.com/prometheus/prometheus" - - "github.com/prometheus/prometheus/*" - - "github.com/prometheus/client_go" - - "github.com/prometheus/client_go/*" - kubernetes: - patterns: - - "k8s.io/*" - - "sigs.k8s.io/*" - - - package-ecosystem: github-actions - directory: / - schedule: - interval: daily - groups: - gha-docker: - patterns: - - "docker/*" - - - package-ecosystem: docker - directory: / - schedule: - interval: daily - - - package-ecosystem: docker - directory: /cmd/otel-allocator - schedule: - interval: daily - - - package-ecosystem: docker - directory: /cmd/operator-opamp-bridge - schedule: - interval: daily diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 23b91eeee..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,9 +0,0 @@ -**Description:** - - -**Link to tracking Issue:** - -**Testing:** - -**Documentation:** diff --git a/.github/workflows/auto-update-java-agent.yaml b/.github/workflows/auto-update-java-agent.yaml deleted file mode 100644 index c6df7768e..000000000 --- a/.github/workflows/auto-update-java-agent.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: Auto-update Java agent - -on: - schedule: - # Daily at 01:30 (UTC) - - cron: '30 1 * * *' - workflow_dispatch: - -jobs: - check-versions: - runs-on: ubuntu-latest - outputs: - current-version: ${{ steps.check-versions.outputs.current-version }} - latest-version: ${{ steps.check-versions.outputs.latest-version }} - already-opened: ${{ steps.check-versions.outputs.already-opened }} - steps: - - uses: actions/checkout@v4 - - - id: check-versions - name: Check versions - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - current_version=$(grep -Po "[0-9]+.[0-9]+.[0-9]+" autoinstrumentation/java/version.txt) - latest_version=$(gh release view \ - --repo open-telemetry/opentelemetry-java-instrumentation \ - --json tagName \ - --jq .tagName \ - | sed 's/^v//') - - matches=$(gh pr list \ - --author opentelemetrybot \ - --state open \ - --search "in:title \"Update the OpenTelemetry Java agent version to $latest_version\"") - if [ ! -z "$matches" ] - then - already_opened=true - fi - - echo "current-version=$current_version" >> $GITHUB_OUTPUT - echo "latest-version=$latest_version" >> $GITHUB_OUTPUT - echo "already-opened=$already_opened" >> $GITHUB_OUTPUT - - update-java-agent: - runs-on: ubuntu-latest - if: | - needs.check-versions.outputs.current-version != needs.check-versions.outputs.latest-version && - needs.check-versions.outputs.already-opened != 'true' - needs: - - check-versions - steps: - - uses: actions/checkout@v4 - - - name: Update version - env: - VERSION: ${{ needs.check-versions.outputs.latest-version }} - run: | - echo $VERSION > autoinstrumentation/java/version.txt - - - name: Use CLA approved github bot - run: | - git config user.name opentelemetrybot - git config user.email 107717825+opentelemetrybot@users.noreply.github.com - - - name: Create pull request against main - if: success() || failure() - env: - VERSION: ${{ needs.check-versions.outputs.latest-version }} - # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows - GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} - run: | - message="Update the OpenTelemetry Java agent version to $VERSION" - body="Update the OpenTelemetry Java agent version to \`$VERSION\`." - branch="opentelemetrybot/update-opentelemetry-java-agent-to-${VERSION}" - - git checkout -b $branch - git commit -a -m "$message" - git push --set-upstream origin $branch - gh pr create --title "$message" \ - --body "$body" \ - --base main diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml deleted file mode 100644 index 844fb1f17..000000000 --- a/.github/workflows/changelog.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# This action requires that any PR targeting the main branch should add a -# yaml file to the ./.chloggen/ directory. If a CHANGELOG entry is not required, -# or if performing maintance on the Changelog, add either \"[chore]\" to the title of -# the pull request or add the \"Skip Changelog\" label to disable this action. - -name: changelog - -on: - pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] - branches: - - main - -env: - # See: https://github.com/actions/cache/issues/810#issuecomment-1222550359 - # Cache downloads for this workflow consistently run in under 1 minute - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - changelog: - runs-on: ubuntu-latest - if: ${{ !contains(github.event.pull_request.labels.*.name, 'dependencies') && !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') && !contains(github.event.pull_request.title, '[chore]')}} - - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: "1.20" - - - name: Ensure no changes to the CHANGELOG - run: | - if [[ $(git diff --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./CHANGELOG.md) ]] - then - echo "The CHANGELOG should not be directly modified." - echo "Please add a .yaml file to the ./.chloggen/ directory." - echo "See CONTRIBUTING.md for more details." - echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." - false - else - echo "The CHANGELOG was not modified." - fi - - - name: Ensure ./.chloggen/*.yaml addition(s) - run: | - if [[ 1 -gt $(git diff --diff-filter=A --name-only $(git merge-base origin/main ${{ github.event.pull_request.head.sha }}) ${{ github.event.pull_request.head.sha }} ./.chloggen | grep -c \\.yaml) ]] - then - echo "No changelog entry was added to the ./.chloggen/ directory." - echo "Please add a .yaml file to the ./.chloggen/ directory." - echo "See CONTRIBUTING.md for more details." - echo "Alternately, add either \"[chore]\" to the title of the pull request or add the \"Skip Changelog\" label if this job should be skipped." - false - else - echo "A changelog entry was added to the ./.chloggen/ directory." - fi - - - name: Validate ./.chloggen/*.yaml changes - run: | - make chlog-validate \ - || { echo "New ./.chloggen/*.yaml file failed validation."; exit 1; } - - # In order to validate any links in the yaml file, render the config to markdown - - name: Render .chloggen changelog entries - run: make chlog-preview > changelog_preview.md - - name: Install markdown-link-check - run: npm install -g markdown-link-check - - name: Run markdown-link-check - run: | - markdown-link-check \ - --verbose \ - --config .github/workflows/check_links_config.json \ - changelog_preview.md \ - || { echo "Check that anchor links are lowercase"; exit 1; } diff --git a/.github/workflows/check_links_config.json b/.github/workflows/check_links_config.json deleted file mode 100644 index 83b164ead..000000000 --- a/.github/workflows/check_links_config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "ignorePatterns": [ - { - "pattern": "http(s)?://\\d+\\.\\d+\\.\\d+\\.\\d+" - }, - { - "pattern": "http(s)?://localhost" - }, - { - "pattern": "http(s)?://example.com" - }, - { - "pattern": "^#" - } - ], - "aliveStatusCodes": [429, 200] -} \ No newline at end of file diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml deleted file mode 100644 index 848b98d27..000000000 --- a/.github/workflows/continuous-integration.yaml +++ /dev/null @@ -1,69 +0,0 @@ -name: "Continuous Integration" - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - unit-tests: - name: Unit tests - runs-on: ubuntu-22.04 - steps: - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "~1.21.1" - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: "basic checks" - run: make ci - - lint: - name: Code standards (linting) - runs-on: ubuntu-22.04 - steps: - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "~1.21.1" - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - uses: actions/cache@v3 - with: - path: | - /home/runner/.cache/golangci-lint - /home/runner/go/pkg/mod - ./bin - key: golangcilint-${{ hashFiles('**/go.sum') }} - restore-keys: | - golangcilint- - - - name: Lint - run: make lint - - security: - name: Security - runs-on: ubuntu-22.04 - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: go - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml deleted file mode 100644 index 831d47e43..000000000 --- a/.github/workflows/e2e.yaml +++ /dev/null @@ -1,83 +0,0 @@ -name: "End-to-end tests" - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - e2e-tests: - name: End-to-end tests - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # The e2e tests are run on the lowest and highest supported k8s version. - # All Kubernetes version in between expose the same APIs, hence the operator - # should be compatible with them. - kube-version: - - "1.23" - - "1.29" - group: - - e2e - - e2e-instrumentation - - e2e-upgrade - - e2e-prometheuscr - - e2e-autoscale - - e2e-multi-instrumentation - - e2e-pdb - - e2e-opampbridge - - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "~1.21.3" - cache-dependency-path: | - go.sum - cmd/otel-allocator/go.sum - cmd/operator-opamp-bridge/go.sum - - - name: Setup kind - env: - KIND_VERSION: "0.20.0" - run: go install sigs.k8s.io/kind@v${KIND_VERSION} - - - name: "install kuttl" - run: ./hack/install-kuttl.sh - - - name: "run tests" - env: - KUBE_VERSION: ${{ matrix.kube-version }} - run: make prepare-e2e ${{ matrix.group }} KUBE_VERSION=$KUBE_VERSION VERSION=e2e - - - name: "log operator if failed" - if: ${{ failure() }} - env: - KUBE_VERSION: ${{ matrix.kube-version }} - run: make e2e-log-operator KUBE_VERSION=$KUBE_VERSION - - e2e-tests-check: - runs-on: ubuntu-22.04 - if: always() - needs: [e2e-tests] - steps: - - name: Print result - run: echo ${{ needs.e2e-tests.result }} - - name: Interpret result - run: | - if [[ success == ${{ needs.e2e-tests.result }} ]] - then - echo "All matrix jobs passed!" - else - echo "One or more matrix jobs failed." - false - fi diff --git a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml b/.github/workflows/publish-autoinstrumentation-e2e-images.yaml deleted file mode 100644 index b911d44ab..000000000 --- a/.github/workflows/publish-autoinstrumentation-e2e-images.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: "Publish instrumentation E2E images" - -on: - push: - paths: - - 'tests/instrumentation-e2e-apps/**' - - '.github/workflows/publish-autoinstrumentation-e2e-images.yaml' - branches: - - main - pull_request: - paths: - - 'tests/instrumentation-e2e-apps/**' - - '.github/workflows/publish-autoinstrumentation-e2e-images.yaml' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - golang: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: golang - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le - python: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: python - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le - java: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: java - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le - apache-httpd: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: apache-httpd - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le - dotnet: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: dotnet - platforms: linux/arm64,linux/amd64 - nodejs: - uses: ./.github/workflows/reusable-publish-autoinstrumentation-e2e-images.yaml - with: - language: nodejs - platforms: linux/arm64,linux/amd64,linux/s390x,linux/ppc64le diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml deleted file mode 100644 index af6835bc2..000000000 --- a/.github/workflows/scorecard.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: "Scorecard tests" - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - scorecard-tests: - name: test on k8s - runs-on: ubuntu-22.04 - strategy: - matrix: - kube-version: - - "1.23" - - "1.29" - - steps: - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "~1.21.1" - - - name: Setup kind - env: - KIND_VERSION: "0.20.0" - run: go install sigs.k8s.io/kind@v${KIND_VERSION} - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: "install kuttl and kind" - run: ./hack/install-kuttl.sh - - - name: "start kind" - env: - KUBE_VERSION: ${{ matrix.kube-version }} - run: kind create cluster --config kind-$KUBE_VERSION.yaml - - - name: "wait until cluster is ready" - run: kubectl wait --timeout=5m --for=condition=available deployment/coredns -n kube-system - - - name: "run scorecard test" - run: make scorecard-tests - - scorecard-tests-check: - runs-on: ubuntu-22.04 - if: always() - needs: [scorecard-tests] - steps: - - name: Print result - run: echo ${{ needs.scorecard-tests.result }} - - name: Interpret result - run: | - if [[ success == ${{ needs.scorecard-tests.result }} ]] - then - echo "All matrix jobs passed!" - else - echo "One or more matrix jobs failed." - false - fi diff --git a/Makefile b/Makefile index f7957b5f1..d3559de07 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ ci: test # Run tests # setup-envtest uses KUBEBUILDER_ASSETS which points to a directory with binaries (api-server, etcd and kubectl) .PHONY: test -test: generate fmt vet ensure-generate-is-noop envtest +test: generate fmt vet envtest KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... cd cmd/otel-allocator && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... cd cmd/operator-opamp-bridge && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml index 53242ead4..56f84cbb6 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml @@ -4,17 +4,17 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: amazoncloudwatchagents.cloudwatch.aws.amazon.com + name: opentelemetrycollectors.opentelemetry.io spec: - group: cloudwatch.aws.amazon.com + group: opentelemetry.io names: - kind: AmazonCloudWatchAgent - listKind: AmazonCloudWatchAgentList - plural: amazoncloudwatchagents + kind: OpenTelemetryCollector + listKind: OpenTelemetryCollectorList + plural: opentelemetrycollectors shortNames: - otelcol - otelcols - singular: amazoncloudwatchagent + singular: opentelemetrycollector scope: Namespaced versions: - additionalPrinterColumns: @@ -22,7 +22,7 @@ spec: jsonPath: .spec.mode name: Mode type: string - - description: CloudWatch Agent Version + - description: OpenTelemetry Version jsonPath: .status.version name: Version type: string @@ -35,412 +35,5522 @@ spec: - jsonPath: .status.image name: Image type: string + - description: Management State + jsonPath: .spec.managementState + name: Management + type: string name: v1alpha1 schema: openAPIV3Schema: - description: AmazonCloudWatchAgent is the Schema for the AmazonCloudWatchAgents + description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object spec: - description: AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. + description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the CloudWatch - Agent binary - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the CloudWatch Agent documentation for details. - type: string - env: - description: ENV vars to set on the CloudWatch Agent's Pods. These - can then in certain cases be consumed in the config file for the - Collector. + additionalContainers: + description: AdditionalContainers allows injecting additional containers + into the Collector's pod definition. items: - description: EnvVar represents an environment variable present in - a Container. + description: A single application container that you want to run + within a pod. properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + args: + description: Arguments to the entrypoint. The container image's + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container's environment. + items: + type: string + type: array + command: + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.' type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.' type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). type: string required: - - fieldPath + - port type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + httpGet: + description: HTTPGet specifies the http request to perform. properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. type: string - divisor: + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: anyOf: - type: integer - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - - resource + - port type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - - key + - port type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the CloudWatch Agent's Pods. These can then in certain cases be - consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. type: string - secretRef: - description: The Secret to select from + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.' properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the CloudWatch - Agent. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how CloudWatch Agent is exposed. - This functionality is only available if one of the valid modes is - set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' - type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. - properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt - type: string - type: object - tls: - description: TLS configuration. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. Defaults to the wildcard host setting - for the loadbalancer controller fulfilling this Ingress, - if left unspecified. + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." items: - type: string + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object type: array - x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. If the - SNI host in a listener conflicts with the "Host" header - field used by an IngressRule, the SNI host is used for - termination and value of the "Host" header is used for - routing. + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string + securityContext: + description: SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. + type: string + type: object type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress' - enum: - - ingress - - route - type: string - type: object - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule CloudWatch Agent pods. This - is only relevant to daemonset, statefulset, and deployment mode - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open additional ports that can't be inferred by the operator, - like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. + startupProbe: + description: StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem.' type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. type: string - nodePort: - description: 'The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. If a value is specified, in-range, and not - in use it will be used, otherwise the operation will fail. If - not specified, a port will be allocated if this Service requires - one. If this field is specified when creating a Service which - does not need it, creation will fail. This field will be wiped - when updating a Service to no longer need it (e.g. changing - type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true required: - - port + - name type: object type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - CloudWatch Agent. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the CloudWatch Agent pods. + affinity: + description: If specified, indicates the pod's scheduling constraints properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + autoscaler: + description: Autoscaler specifies the pod autoscaling configuration + to use for the OpenTelemetryCollector workload. + properties: + behavior: + description: HorizontalPodAutoscalerBehavior configures the scaling + behavior of the target in both Up and Down directions (scaleUp + and scaleDown fields respectively). + properties: + scaleDown: + description: scaleDown is scaling policy for scaling Down. + If not set, the default value is to allow to scale down + to minReplicas pods, with a 300 second stabilization window + (i.e. + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. + format: int32 + type: integer + type: object + scaleUp: + description: scaleUp is scaling policy for scaling Up. + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. + format: int32 + type: integer + type: object + type: object + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling + feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + metrics: + description: Metrics is meant to provide a customizable way to + configure HPA metrics. currently the only supported custom metrics + is type=Pod. + items: + description: MetricSpec defines a subset of metrics to be defined + for the HPA's metric array more metric type can be supported + as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec + for reference. + properties: + pods: + description: PodsMetricSource indicates how to scale on + a metric describing each pod in the current scale target + (for example, transactions-processed-per-second). + properties: + metric: + description: metric identifies the target metric by + name and selector + properties: + name: + description: name is the name of the given metric + type: string + selector: + description: selector is the string-encoded form + of a standard kubernetes label selector for the + given metric When set, it is passed as an additional + parameter to the metrics server for more specific + metrics scopi + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + description: target specifies the target value for the + given metric + properties: + averageUtilization: + description: averageUtilization is the target value + of the average of the resource metric across all + relevant pods, represented as a percentage of + the requested value of the resource for the pods. + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + description: averageValue is the target value of + the average of the metric across all relevant + pods (as a quantity) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + description: type represents whether the metric + type is Utilization, Value, or AverageValue + type: string + value: + anyOf: + - type: integer + - type: string + description: value is the target value of the metric + (as a quantity). + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + type: + description: MetricSourceType indicates the type of metric. + type: string + required: + - type + type: object + type: array + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling + feature. Set this if your are using autoscaling. It must be + at least 1 + format: int32 + type: integer + targetCPUUtilization: + description: TargetCPUUtilization sets the target average CPU + used across all replicas. If average CPU exceeds this value, + the HPA will scale up. Defaults to 90 percent. + format: int32 + type: integer + targetMemoryUtilization: + description: TargetMemoryUtilization sets the target average memory + utilization across all replicas + format: int32 + type: integer + type: object + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + configmaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the OpenTelemetryCollector object, which shall be mounted into + the Collector Pods. + items: + properties: + mountpath: + type: string + name: + description: Configmap defines name and path where the configMaps + should be mounted. + type: string + required: + - mountpath + - name + type: object + type: array + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the OpenTelemetry Collector's Pods. These can then in certain cases + be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + ingress: + description: 'Ingress is used to specify how OpenTelemetry Collector + is exposed. This functionality is only available if one of the valid + modes is set. Valid modes are: deployment, daemonset and statefulset.' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' + type: object + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. + properties: + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object + ruleType: + description: RuleType defines how Ingress exposes collector receivers. + IngressRuleTypePath ("path") exposes each receiver port on a + unique path on single domain defined in Hostname. + enum: + - path + - subdomain + type: string + tls: + description: TLS configuration. + items: + description: IngressTLS describes the transport layer security + associated with an ingress. + properties: + hosts: + description: hosts is a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + description: secretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. + type: string + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress, + route' + enum: + - ingress + - route + type: string + type: object + initContainers: + description: InitContainers allows injecting initContainers to the + Collector's pod definition. + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: Arguments to the entrypoint. The container image's + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container's environment. + items: + type: string + type: array + command: + description: Entrypoint array. Not executed within a shell. + The container image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's + environment. + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + restartPolicy: + description: RestartPolicy defines the restart behavior of individual + containers in a pod. This field may only be set for init containers, + and the only allowed value is "Always". + type: string + securityContext: + description: SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a + process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. + type: string + type: object + type: object + startupProbe: + description: StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: Service is the name of the service to place + in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: Liveness config for the OpenTelemetry Collector except + the probe handler which is auto generated from the health extension + of the collector. + properties: + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. Defaults to 0 seconds. + Minimum value is 0. More info: https://kubernetes.' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Must + be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + managementState: + default: managed + description: ManagementState defines if the CR should be managed by + the operator or not. Default is managed. + enum: + - managed + - unmanaged + type: string + maxReplicas: + description: 'MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" + instead.' + format: int32 + type: integer + minReplicas: + description: 'MinReplicas sets a lower bound to the autoscaling feature. Set + this if you are using autoscaling. It must be at least 1 Deprecated: + use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' + format: int32 + type: integer + mode: + description: Mode represents how the collector should be deployed + (deployment, daemonset, statefulset or sidecar) + enum: + - daemonset + - deployment + - sidecar + - statefulset + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object + observability: + description: ObservabilitySpec defines how telemetry data gets handled. + properties: + metrics: + description: Metrics defines the metrics configuration for operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor or + PodMonitor(for sidecar mode) should be created for the service + managed by the OpenTelemetry Operator. The operator.observability. + type: boolean + type: object + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption budget + configuration to use for the OpenTelemetryCollector workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after the + eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object + podSecurityContext: + description: PodSecurityContext configures the pod security context + for the opentelemetry-collector pod, when running as a deployment, + daemonset, or statefulset. + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. Note that this field cannot be set when + spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. + type: string + nodePort: + description: The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector. Set this if your are not using autoscaling + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + securityContext: + description: SecurityContext configures the container security context + for the opentelemetry-collector container. + properties: + allowPrivilegeEscalation: + description: AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. + type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether + to spawn a target allocation resource or not. + properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for + the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector in + the specified namespaces, where co-located + is defined as running on a node whose ' + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-locate + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. + items: + type: string + type: array + topologyKey: + description: 'This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose ' + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + allocationStrategy: + description: AllocationStrategy determines which strategy the + target allocator should use for allocation. The current options + are least-weighted and consistent-hashing. The default option + is least-weighted + enum: + - least-weighted + - consistent-hashing + type: string + enabled: + description: Enabled indicates whether to use a target allocation + mechanism for Prometheus targets or not. + type: boolean + env: + description: ENV vars to set on the OpenTelemetry TargetAllocator's + Pods. These can then in certain cases be consumed in the config + file for the TargetAllocator. items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + description: EnvVar represents an environment variable present + in a Container. properties: name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object required: - name type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: + filterStrategy: + description: FilterStrategy determines how to filter targets before + allocating them among the collectors. The only current option + is relabel-config (drops targets based on prom relabel_config). + type: string + image: + description: Image indicates the container image to use for the + OpenTelemetry TargetAllocator. + type: string + nodeSelector: additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: string + description: NodeSelector to schedule OpenTelemetry TargetAllocator + pods. type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + observability: + description: ObservabilitySpec defines how telemetry data gets + handled. + properties: + metrics: + description: Metrics defines the metrics configuration for + operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor + or PodMonitor(for sidecar mode) should be created for + the service managed by the OpenTelemetry Operator. The + operator.observability. + type: boolean + type: object + type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption + budget configuration to use for the target allocator workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after + the eviction, i.e. even in the absence of the evicted pod. + x-kubernetes-int-or-string: true + type: object + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + podMonitorSelector: + additionalProperties: + type: string + description: PodMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a PodMonitor's + meta labels. + type: object + scrapeInterval: + default: 30s + description: "Interval between consecutive scrapes. Equivalent + to the same setting on the Prometheus CRD. \n Default: \"30s\"" + format: duration + type: string + serviceMonitorSelector: + additionalProperties: + type: string + description: ServiceMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a ServiceMonitor's + meta labels. + type: object + type: object + replicas: + description: Replicas is the number of pod instances for the underlying + TargetAllocator. This should only be set to a value other than + 1 if a strategy that allows for high availability is chosen. + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetryTargetAllocator + containers. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + securityContext: + description: SecurityContext configures the container security + context for the targetallocator. + properties: + fsGroup: + description: "A special supplemental group that applies to + all containers in a pod. Some volume types allow the Kubelet + to change the ownership of that volume to be owned by the + pod: \n 1." + format: int64 + type: integer + fsGroupChangePolicy: + description: fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + SecurityContext. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID, the fsGroup (if specified), and group memberships defined + in the container image for th + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. Note that this field cannot + be set when spec.os. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options within a container's + SecurityContext will be used. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. + type: string + type: object type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. When set, the operator + will not automatically create a ServiceAccount for the TargetAllocator. + type: string + tolerations: + description: Toleration embedded kubernetes pod configuration + option, controls how pods can be scheduled with matching taints + items: + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . + properties: + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod + configuration option, controls how pods are spread across your + cluster among failure-domains such as regions, zones, nodes, + and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to + select the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods + may be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with + a pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string + terminationGracePeriodSeconds: + description: Duration in seconds the pod needs to terminate gracefully + upon probe failure. + format: int64 + type: integer tolerations: - description: Toleration to schedule CloudWatch Agent pods. This is - only relevant to daemonset, statefulset, and deployment mode + description: Toleration to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -460,16 +5570,11 @@ spec: operator: description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod - can tolerate all taints of a particular category. type: string tolerationSeconds: description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. By default, it - is not set, which means tolerate the taint forever (do not - evict). Zero and negative values will be treated as 0 (evict - immediately) by the system. + this field is ignored) tolerates the taint. format: int64 type: integer value: @@ -479,6 +5584,128 @@ spec: type: string type: object type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined top + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: MaxSkew describes the degree to which pods may + be unevenly distributed. + format: int32 + type: integer + minDomains: + description: MinDomains indicates a minimum number of eligible + domains. + format: int32 + type: integer + nodeAffinityPolicy: + description: NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. + type: string + nodeTaintsPolicy: + description: NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. + type: string + whenUnsatisfiable: + description: WhenUnsatisfiable indicates how to deal with a + pod if it doesn't satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + updateStrategy: + description: UpdateStrategy represents the strategy the operator will + take replacing existing DaemonSet pods with new pods https://kubernetes. + properties: + rollingUpdate: + description: 'Rolling update config params. Present only if type + = "RollingUpdate". --- TODO: Update this to follow our convention + for oneOf, whatever we decide it to be. Same as Deployment `strategy.' + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: The maximum number of nodes with an existing + available DaemonSet pod that can have an updated DaemonSet + pod during during an update. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: The maximum number of DaemonSet pods that can + be unavailable during the update. + x-kubernetes-int-or-string: true + type: object + type: + description: Type of daemon set update. Can be "RollingUpdate" + or "OnDelete". Default is RollingUpdate. + type: string + type: object upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed @@ -494,16 +5721,15 @@ spec: to a persistent volume properties: apiVersion: - description: 'APIVersion defines the versioned schema of this + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + values. type: string kind: - description: 'Kind is a string value representing the REST resource + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' @@ -537,16 +5763,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will - not be copied to dataSource.' + * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -566,33 +5783,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object from which + description: dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only - succeed if the type of the specified object matches some - installed volume populator or dynamic provisioner. This - field will replace the functionality of the dataSource - field and as such if both fields are non-empty, they must - have the same value. For backwards compatibility, when - namespace isn''t specified in dataSourceRef, both fields - (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other - is non-empty. When namespace is specified in dataSourceRef, - dataSource isn''t set to the same value and must be empty. - There are three important differences between dataSource - and dataSourceRef: * While dataSource only allows two - specific types of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. * While - dataSource ignores disallowed values (dropping them), - dataSourceRef preserves all values, and generates an error - if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' + is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -609,48 +5802,16 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object - is required in the referent namespace to allow that - namespace's owner to accept the reference. See the - ReferenceGrant documentation for details. (Alpha) - This field requires the CrossNamespaceVolumeDataSource - feature gate to be enabled. + a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify resource - requirements that are lower than previous value but must - still be higher than capacity recorded in the status field - of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where - this field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map + description: resources represents the minimum resources + the volume should have. + properties: limits: additionalProperties: anyOf: @@ -668,11 +5829,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount - of compute resources required. If Requests is omitted - for a container, it defaults to Limits if that is - explicitly specified, otherwise to an implementation-defined - value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of + compute resources required. type: object type: object selector: @@ -701,8 +5859,6 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. items: type: string type: array @@ -715,10 +5871,6 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -726,6 +5878,10 @@ spec: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used to set + the VolumeAttributesClass used by this claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not @@ -746,6 +5902,18 @@ spec: items: type: string type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. + type: object + x-kubernetes-map-type: granular allocatedResources: additionalProperties: anyOf: @@ -753,18 +5921,9 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: allocatedResources is the storage resource - within AllocatedResources tracks the capacity allocated - to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. For storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used. If allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation. If a volume expansion - capacity request is lowered, allocatedResources is only - lowered if there are no expansion operations in progress - and if the actual volume capacity is equal or lower than - the requested capacity. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + description: allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. type: object capacity: additionalProperties: @@ -801,9 +5960,7 @@ spec: reason: description: reason is a unique, this should be a short, machine understandable string that gives - the reason for condition's last transition. If it - reports "ResizeStarted" that means the underlying - persistent volume is being resized. + the reason for condition's last transition. type: string status: type: string @@ -816,16 +5973,30 @@ spec: - type type: object type: array + currentVolumeAttributesClassName: + description: currentVolumeAttributesClassName is the current + name of the VolumeAttributesClass the PVC is using. + type: string + modifyVolumeStatus: + description: ModifyVolumeStatus represents the status object + of ControllerModifyVolume operation. When this is unset, + there is no ModifyVolume operation being attempted. + properties: + status: + description: status is the status of the ControllerModifyVolume + operation. + type: string + targetVolumeAttributesClassName: + description: targetVolumeAttributesClassName is the + name of the VolumeAttributesClass the PVC currently + being reconciled + type: string + required: + - status + type: object phase: description: phase represents the current phase of PersistentVolumeClaim. type: string - resizeStatus: - description: resizeStatus stores status of resize operation. - ResizeStatus is not set by default but when expansion - is complete resizeStatus is set to empty string by resize - controller or kubelet. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. - type: string type: object type: object type: array @@ -860,10 +6031,7 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which the - container's volume should be mounted. Behaves similarly to - SubPath but environment variable references $(VAR_NAME) are - expanded using the container's environment. Defaults to "" - (volume's root). SubPathExpr and SubPath are mutually exclusive. + container's volume should be mounted. type: string required: - mountPath @@ -881,23 +6049,19 @@ spec: awsElasticBlockStore: description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty).' + the partition as "1".' format: int32 type: integer readOnly: @@ -937,7 +6101,7 @@ spec: description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data - disk (only in managed availability set). defaults to shared' + disk (only in managed availability set).' type: string readOnly: description: readOnly Defaults to false (read/write). ReadOnly @@ -1016,7 +6180,7 @@ spec: description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + be "ext4" if unspecified.' type: string readOnly: description: 'readOnly defaults to false (read/write). ReadOnly @@ -1048,24 +6212,14 @@ spec: description: 'defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the ConfigMap, the volume setup will error unless it is - marked optional. Paths must be relative and may not contain - the '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -1076,12 +6230,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -1125,10 +6274,7 @@ spec: description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. This field is optional, - and may be empty if no secret is required. If the secret - object contains more than one secret, all secret references - are passed. + and NodeUnpublishVolume calls. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1157,14 +6303,7 @@ spec: defaultMode: description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set - permissions on created files by default. Must be an octal - value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + permissions on created files by default.' format: int32 type: integer items: @@ -1193,13 +6332,7 @@ spec: mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + and 0777 or a decimal value between 0 and 511.' format: int32 type: integer path: @@ -1244,64 +6377,29 @@ spec: shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'medium represents what type of storage medium + description: medium represents what type of storage medium should back this directory. The default is "" which means - to use the node''s default medium. Must be an empty string - (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + to use the node's default medium. Must be an empty string + (default) or Memory. type: string sizeLimit: anyOf: - type: integer - type: string - description: 'sizeLimit is the total amount of local storage + description: sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also - applicable for memory medium. The maximum usage on memory - medium EmptyDir would be the minimum value between the - SizeLimit specified here and the sum of memory limits - of all containers in a pod. The default is nil which means - that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + applicable for memory medium. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "ephemeral represents a volume that is handled - by a cluster storage driver. The volume's lifecycle is tied - to the pod that defines it - it will be created before the - pod starts, and deleted when the pod is removed. \n Use this - if: a) the volume is only needed while the pod runs, b) features - of normal volumes like restoring from snapshot or capacity - tracking are needed, c) the storage driver is specified through - a storage class, and d) the storage driver supports dynamic - volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource - for more information on the connection between this volume - type and PersistentVolumeClaim). \n Use PersistentVolumeClaim - or one of the vendor-specific APIs for volumes that persist - for longer than the lifecycle of an individual pod. \n Use - CSI for light-weight local ephemeral volumes if the CSI driver - is meant to be used that way - see the documentation of the - driver for more information. \n A pod can use both types of - ephemeral volumes and persistent volumes at the same time." + description: ephemeral represents a volume that is handled by + a cluster storage driver. properties: volumeClaimTemplate: - description: "Will be used to create a stand-alone PVC to + description: Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. the PVC - will be deleted together with the pod. The name of the - PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. - Pod validation will reject the pod if the concatenated - name is not valid for a PVC (for example, too long). \n - An existing PVC with that name that is not owned by the - pod will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC - is meant to be used by the pod, the PVC has to updated - with an owner reference to the pod once the pod exists. - Normally this should not be necessary, but it may be useful - when manually reconstructing a broken cluster. \n This - field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. \n Required, must - not be nil." + is embedded will be the owner of the PVC, i.e. properties: metadata: description: May contain labels and annotations that @@ -1328,8 +6426,7 @@ spec: spec: description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC - that gets created from this template. The same fields - as in a PersistentVolumeClaim are also valid here. + that gets created from this template. properties: accessModes: description: 'accessModes contains the desired access @@ -1339,17 +6436,7 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the - provisioner or an external controller can support - the specified data source, it will create a new - volume based on the contents of the specified - data source. When the AnyVolumeDataSource feature - gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will - be copied to dataSource when dataSourceRef.namespace - is not specified. If the namespace is specified, - then dataSourceRef will not be copied to dataSource.' + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1372,38 +6459,9 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: 'dataSourceRef specifies the object + description: dataSourceRef specifies the object from which to populate the volume with data, if - a non-empty volume is desired. This may be any - object from a non-empty API group (non core object) - or a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. - This field will replace the functionality of the - dataSource field and as such if both fields are - non-empty, they must have the same value. For - backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource - and dataSourceRef) will be set to the same value - automatically if one of them is empty and the - other is non-empty. When namespace is specified - in dataSourceRef, dataSource isn''t set to the - same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types - of objects, dataSourceRef allows any non-core - object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - * While dataSource only allows local objects, - dataSourceRef allows objects in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource - feature gate to be enabled. (Alpha) Using the - namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to - be enabled.' + a non-empty volume is desired. properties: apiGroup: description: APIGroup is the group for the resource @@ -1423,51 +6481,16 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace - is specified, a gateway.networking.k8s.io/ReferenceGrant - object is required in the referent namespace - to allow that namespace's owner to accept - the reference. See the ReferenceGrant documentation - for details. (Alpha) This field requires the - CrossNamespaceVolumeDataSource feature gate - to be enabled. + is specified, a gateway.networking.k8s. type: string required: - kind - name type: object resources: - description: 'resources represents the minimum resources - the volume should have. If RecoverVolumeExpansionFailure - feature is enabled users are allowed to specify - resource requirements that are lower than previous - value but must still be higher than capacity recorded - in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: resources represents the minimum resources + the volume should have. properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1485,12 +6508,8 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum - amount of compute resources required. If Requests - is omitted for a container, it defaults to - Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum + amount of compute resources required. type: object type: object selector: @@ -1522,9 +6541,7 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. + the values array must be empty. items: type: string type: array @@ -1537,11 +6554,7 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only "value". - The requirements are ANDed. + pairs. type: object type: object x-kubernetes-map-type: atomic @@ -1550,6 +6563,11 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -1570,11 +6588,10 @@ spec: pod. properties: fsType: - description: 'fsType is the filesystem type to mount. Must + description: fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. TODO: how do we prevent errors in the - filesystem from compromising the machine' + if unspecified. type: string lun: description: 'lun is Optional: FC target lun number' @@ -1626,9 +6643,7 @@ spec: description: 'secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no - secret object is specified. If the secret object contains - more than one secret, all secrets are passed to the plugin - scripts.' + secret object is specified.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1657,24 +6672,19 @@ spec: gcePersistentDisk: description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + to the pod. More info: https://kubernetes.' properties: fsType: description: 'fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "xfs", "ntfs".' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1". Similarly, the volume partition - for /dev/sda is "0" (or you can leave the property empty). - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + the partition as "1".' format: int32 type: integer pdName: @@ -1690,17 +6700,12 @@ spec: type: object gitRepo: description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated. To provision - a container with a git repo, mount an EmptyDir into an InitContainer - that clones the repo using git, then mount the EmptyDir into - the Pod''s container.' + revision. DEPRECATED: GitRepo is deprecated.' properties: directory: description: directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. Otherwise, - if specified, the volume will contain the git repository - in the subdirectory with the given name. + volume directory will be the git repository. type: string repository: description: repository is the URL @@ -1734,13 +6739,8 @@ spec: - path type: object hostPath: - description: 'hostPath represents a pre-existing file or directory + description: hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. - This is generally used for system agents or other privileged - things that are allowed to see the host machine. Most containers - will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - --- TODO(jonesdl) We need to restrict who can use host directory - mounts and who can/can not mount host directories as read/write.' properties: path: description: 'path of the directory on the host. If the @@ -1771,16 +6771,11 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string initiatorName: description: initiatorName is the custom iSCSI Initiator - Name. If initiatorName is specified with iscsiInterface - simultaneously, new iSCSI interface : will be created for the connection. + Name. type: string iqn: description: iqn is the target iSCSI Qualified Name. @@ -1852,7 +6847,7 @@ spec: persistentVolumeClaim: description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + More info: https://kubernetes.' properties: claimName: description: 'claimName is the name of a PersistentVolumeClaim @@ -1910,12 +6905,7 @@ spec: defaultMode: description: defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Directories within the path are - not affected by this setting. This might be in conflict - with other options that affect the file mode, like fsGroup, - and the result can be other mode bits set. + 0000 and 0777 or a decimal value between 0 and 511. format: int32 type: integer sources: @@ -1924,6 +6914,84 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project @@ -1933,13 +7001,6 @@ spec: pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the ConfigMap, the volume - setup will error unless it is marked optional. - Paths must be relative and may not contain the - '..' path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -1952,13 +7013,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -2019,14 +7074,7 @@ spec: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + a decimal value between 0 and 511.' format: int32 type: integer path: @@ -2078,13 +7126,6 @@ spec: pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. - If specified, the listed keys will be projected - into the specified paths, and unlisted keys - will not be present. If a key is specified which - is not present in the Secret, the volume setup - will error unless it is marked optional. Paths - must be relative and may not contain the '..' - path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -2097,13 +7138,7 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511. YAML accepts both octal and decimal - values, JSON requires decimal values for - mode bits. If not specified, the volume - defaultMode will be used. This might be - in conflict with other options that affect - the file mode, like fsGroup, and the result - can be other mode bits set.' + 511.' format: int32 type: integer path: @@ -2139,19 +7174,14 @@ spec: of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the - token. The audience defaults to the identifier - of the apiserver. + token. type: string expirationSeconds: description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate - the service account token. The kubelet will - start trying to rotate the token if the token - is older than 80 percent of its time to live - or if the token is older than 24 hours.Defaults - to 1 hour and must be at least 10 minutes. + the service account token. format: int64 type: integer path: @@ -2209,10 +7239,7 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - TODO: how do we prevent errors in the filesystem from - compromising the machine' + "ext4", "xfs", "ntfs".' type: string image: description: 'image is the rados image name. More info: @@ -2322,24 +7349,14 @@ spec: description: 'defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. Defaults to - 0644. Directories within the path are not affected by - this setting. This might be in conflict with other options - that affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer items: description: items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content - is the value. If specified, the listed keys will be projected - into the specified paths, and unlisted keys will not be - present. If a key is specified which is not present in - the Secret, the volume setup will error unless it is marked - optional. Paths must be relative and may not contain the - '..' path or start with '..'. + is the value. items: description: Maps a string key to a path within a volume. properties: @@ -2350,12 +7367,7 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511. YAML accepts both octal and decimal values, - JSON requires decimal values for mode bits. If not - specified, the volume defaultMode will be used. - This might be in conflict with other options that - affect the file mode, like fsGroup, and the result - can be other mode bits set.' + 0 and 511.' format: int32 type: integer path: @@ -2411,12 +7423,7 @@ spec: volumeNamespace: description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. This allows the - Kubernetes name scoping to be mirrored within StorageOS - for tighter integration. Set VolumeName to any name to - override the default behaviour. Set to "default" if you - are not using namespaces within StorageOS. Namespaces - that do not pre-exist within StorageOS will be created. + then the Pod's namespace will be used. type: string type: object vsphereVolume: @@ -2451,12 +7458,12 @@ spec: x-kubernetes-list-type: atomic type: object status: - description: AmazonCloudWatchAgentStatus defines the observed state of - AmazonCloudWatchAgent. + description: OpenTelemetryCollectorStatus defines the observed state of + OpenTelemetryCollector. properties: image: - description: Image indicates the container image to use for the CloudWatch - Agent. + description: Image indicates the container image to use for the OpenTelemetry + Collector. type: string messages: description: 'Messages about actions performed by the operator on @@ -2467,32 +7474,32 @@ spec: x-kubernetes-list-type: atomic replicas: description: 'Replicas is currently not being set and might be removed - in the next version. Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" + in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead.' format: int32 type: integer scale: - description: Scale is the AmazonCloudWatchAgent's scale subresource + description: Scale is the OpenTelemetryCollector's scale subresource status. properties: replicas: description: The total number non-terminated pods targeted by - this AmazonCloudWatchAgent's deployment or statefulSet. + this OpenTelemetryCollector's deployment or statefulSet. format: int32 type: integer selector: - description: The selector used to match the AmazonCloudWatchAgent's + description: The selector used to match the OpenTelemetryCollector's deployment or statefulSet pods. type: string statusReplicas: description: StatusReplicas is the number of pods targeted by - this AmazonCloudWatchAgent's with a Ready Condition / Total - number of non-terminated pods targeted by this AmazonCloudWatchAgent's - (their labels match the selector). Deployment, Daemonset, StatefulSet. + this OpenTelemetryCollector's with a Ready Condition / Total + number of non-terminated pods targeted by this OpenTelemetryCollector's + (their labels matc type: string type: object version: - description: Version of the managed CloudWatch Agent (operand) + description: Version of the managed OpenTelemetry Collector (operand) type: string type: object type: object diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml index acec5e4ae..d54c45347 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: instrumentations.cloudwatch.aws.amazon.com + name: instrumentations.opentelemetry.io spec: - group: cloudwatch.aws.amazon.com + group: opentelemetry.io names: kind: Instrumentation listKind: InstrumentationList @@ -36,14 +36,14 @@ spec: description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation + description: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. type: string kind: - description: 'Kind is a string value representing the REST resource this + description: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. type: string metadata: type: object @@ -51,12 +51,459 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + apacheHttpd: + description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Apache HTTPD agent specific attributes. + The precedence is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configPath: + description: Location of Apache HTTPD server configuration. Needed + only if different from default "/usr/local/apache2/conf" + type: string + env: + description: Env defines Apache HTTPD specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Apache SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + version: + description: Apache HTTPD server version. One of 2.4 or 2.2. Default + is 2.4 + type: string + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + dotnet: + description: DotNet defines configuration for DotNet auto-instrumentation. + properties: + env: + description: Env defines DotNet specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with DotNet SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object env: - description: 'Env defines common env vars. There are four layers for - env vars'' definitions and the precedence order is: `original container - env vars` > `language specific env vars` > `common env vars` > `instrument - spec configs'' vars`. If the former var had been defined, then the - other vars would be ignored.' + description: Env defines common env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -65,121 +512,726 @@ spec: description: Name of the environment variable. Must be a C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded using + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. Cannot be used if value is not empty. properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + go: + description: Go defines configuration for Go auto-instrumentation. + properties: + env: + description: Env defines Go specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Go SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + env: + description: Env defines java specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with javaagent auto-instrumentation + JAR. + type: string + resources: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: - key: - description: The key to select. - type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean required: - - key + - name type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + nginx: + description: Nginx defines configuration for Nginx auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Nginx agent specific attributes. The + precedence order is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + required: + - name + type: object + type: array + configFile: + description: Location of Nginx configuration file. Needed only + if different from default "/etx/nginx/nginx.conf" + type: string + env: + description: Env defines Nginx specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace + required: + - name + type: object + type: array + image: + description: Image is a container image with Nginx SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean required: - - key + - name type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - java: - description: Java defines configuration for java auto-instrumentation. + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. properties: env: - description: 'Env defines java specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` - > `common env vars` > `instrument spec configs'' vars`. If the - former var had been defined, then the other vars would be ignored.' + description: Env defines nodejs specific env vars. items: description: EnvVar represents an environment variable present in a Container. @@ -189,15 +1241,9 @@ spec: C_IDENTIFIER. type: string value: - description: 'Variable references $(VAR_NAME) are expanded + description: Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. If - a variable cannot be resolved, the reference in the input - string will be unchanged. Double $$ are reduced to a single - $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless - of whether the variable exists or not. Defaults to "".' + the container and any service environment variables. type: string valueFrom: description: Source for the environment variable's value. @@ -226,8 +1272,7 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' + spec.serviceAccountName, status.hostIP, status.' properties: apiVersion: description: Version of the schema the FieldPath @@ -245,7 +1290,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + and requests.' properties: containerName: description: 'Container name: required for volumes, @@ -293,18 +1338,16 @@ spec: type: object type: array image: - description: Image is a container image with javaagent auto-instrumentation - JAR. + description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string - resources: + resourceRequirements: description: Resources describes the compute resource requirements. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be - set for containers." + feature gate." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -338,13 +1381,18 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed - Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + description: Requests describes the minimum amount of compute + resources required. type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object propagators: description: Propagators defines inter-process context propagation @@ -363,6 +1411,173 @@ spec: - none type: string type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + env: + description: Env defines python specific env vars. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Python SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: Requests describes the minimum amount of compute + resources required. + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object resource: description: Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. @@ -384,8 +1599,7 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. The value - will be set in the OTEL_TRACES_SAMPLER_ARG env var. + sampler type it is a number in range [0..1] e.g. 0.25. type: string type: description: Type defines sampler type. The value will be set diff --git a/config/crd/bases/opentelemetry.io_instrumentations.yaml b/config/crd/bases/opentelemetry.io_instrumentations.yaml deleted file mode 100644 index d54c45347..000000000 --- a/config/crd/bases/opentelemetry.io_instrumentations.yaml +++ /dev/null @@ -1,1627 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: instrumentations.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: Instrumentation - listKind: InstrumentationList - plural: instrumentations - shortNames: - - otelinst - - otelinsts - singular: instrumentation - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .spec.exporter.endpoint - name: Endpoint - type: string - - jsonPath: .spec.sampler.type - name: Sampler - type: string - - jsonPath: .spec.sampler.argument - name: Sampler Arg - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Instrumentation is the spec for OpenTelemetry instrumentation. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: InstrumentationSpec defines the desired state of OpenTelemetry - SDK and instrumentation. - properties: - apacheHttpd: - description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Apache HTTPD agent specific attributes. - The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configPath: - description: Location of Apache HTTPD server configuration. Needed - only if different from default "/usr/local/apache2/conf" - type: string - env: - description: Env defines Apache HTTPD specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Apache SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - version: - description: Apache HTTPD server version. One of 2.4 or 2.2. Default - is 2.4 - type: string - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - dotnet: - description: DotNet defines configuration for DotNet auto-instrumentation. - properties: - env: - description: Env defines DotNet specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with DotNet SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - env: - description: Env defines common env vars. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string - type: object - go: - description: Go defines configuration for Go auto-instrumentation. - properties: - env: - description: Env defines Go specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Go SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - java: - description: Java defines configuration for java auto-instrumentation. - properties: - env: - description: Env defines java specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with javaagent auto-instrumentation - JAR. - type: string - resources: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nginx: - description: Nginx defines configuration for Nginx auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Nginx agent specific attributes. The - precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configFile: - description: Location of Nginx configuration file. Needed only - if different from default "/etx/nginx/nginx.conf" - type: string - env: - description: Env defines Nginx specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Nginx SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nodejs: - description: NodeJS defines configuration for nodejs auto-instrumentation. - properties: - env: - description: Env defines nodejs specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with NodeJS SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - propagators: - description: Propagators defines inter-process context propagation - configuration. Values in this list will be set in the OTEL_PROPAGATORS - env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none - items: - description: Propagator represents the propagation type. - enum: - - tracecontext - - baggage - - b3 - - b3multi - - jaeger - - xray - - ottrace - - none - type: string - type: array - python: - description: Python defines configuration for python auto-instrumentation. - properties: - env: - description: Env defines python specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Python SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - resource: - description: Resource defines the configuration for the resource attributes, - as defined by the OpenTelemetry specification. - properties: - addK8sUIDAttributes: - description: AddK8sUIDAttributes defines whether K8s UID attributes - should be collected (e.g. k8s.deployment.uid). - type: boolean - resourceAttributes: - additionalProperties: - type: string - description: 'Attributes defines attributes that are added to - the resource. For example environment: dev' - type: object - type: object - sampler: - description: Sampler defines sampling configuration. - properties: - argument: - description: Argument defines sampler argument. The value depends - on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. - type: string - type: - description: Type defines sampler type. The value will be set - in the OTEL_TRACES_SAMPLER env var. The value can be for instance - parentbased_always_on, parentbased_always_off, parentbased_traceidratio... - enum: - - always_on - - always_off - - traceidratio - - parentbased_always_on - - parentbased_always_off - - parentbased_traceidratio - - jaeger_remote - - xray - type: string - type: object - type: object - status: - description: InstrumentationStatus defines status of the instrumentation. - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/opentelemetry.io_opampbridges.yaml b/config/crd/bases/opentelemetry.io_opampbridges.yaml deleted file mode 100644 index cc5c8f9e8..000000000 --- a/config/crd/bases/opentelemetry.io_opampbridges.yaml +++ /dev/null @@ -1,2949 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: opampbridges.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpAMPBridge - listKind: OpAMPBridgeList - plural: opampbridges - singular: opampbridge - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .spec.endpoint - name: Endpoint - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpAMPBridge is the Schema for the opampbridges API. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: OpAMPBridgeSpec defines the desired state of OpAMPBridge. - properties: - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - capabilities: - additionalProperties: - type: boolean - description: Capabilities supported by the OpAMP Bridge - type: object - componentsAllowed: - additionalProperties: - items: - type: string - type: array - description: ComponentsAllowed is a list of allowed OpenTelemetry - components for each pipeline type (receiver, processor, etc.) - type: object - endpoint: - description: OpAMP backend Server endpoint - type: string - env: - description: ENV vars to set on the OpAMPBridge Pods. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpAMPBridge Pods. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - headers: - additionalProperties: - type: string - description: Headers is an optional map of headers to use when connecting - to the OpAMP Server, typically used to set access tokens or other - authorization headers. - type: object - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpAMPBridge. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpAMPBridge pods. - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to OpAMPBridge pods. - type: object - podSecurityContext: - description: PodSecurityContext will be set as the pod security context. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the OpAMPBridge. - format: int32 - maximum: 1 - type: integer - resources: - description: Resources to set on the OpAMPBridge pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext will be set as the container security - context. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the OpAMPBridge. - type: string - tolerations: - description: Toleration to schedule OpAMPBridge pods. - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle - upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying OpAMPBridge deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - OpAMPBridge deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk - resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, - Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the - blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob - storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed data - disk (only in managed availability set).' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains - Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is the - path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair in - the Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated - CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set - permissions on created files by default.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: medium represents what type of storage medium - should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: sizeLimit is the total amount of local storage - required for this EmptyDir volume. The size limit is also - applicable for memory medium. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. - properties: - volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. - properties: - metadata: - description: May contain labels and annotations that - will be copied into the PVC when creating it. No other - fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. - properties: - accessModes: - description: 'accessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object - from which to populate the volume with data, if - a non-empty volume is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace - is specified, a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the - StorageClass required by the claim. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used - to set the VolumeAttributesClass used by this - claim. - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem - is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use for - this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds extra - command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if no - secret object is specified.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored as - metadata -> name on the dataset for Flocker should be - considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This - is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem type - is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' - properties: - directory: - description: directory is the target directory name. Must - not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: hostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - properties: - path: - description: 'path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI - Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI - Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses - an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. The - portal is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target - and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The Portal - is either an IP or ip_addr:port if the port is other than - default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - clusterTrustBundle: - description: "ClusterTrustBundle allows a pod to access - the `.spec.trustBundle` field of ClusterTrustBundle - objects in an auto-updating file. \n Alpha, gated - by the ClusterTrustBundleProjection feature gate." - properties: - labelSelector: - description: Select all ClusterTrustBundles that - match this label selector. Only has effect - if signerName is set. Mutually-exclusive with - name. If unset, interpreted as "match nothing". - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: Select a single ClusterTrustBundle - by object name. Mutually-exclusive with signerName - and labelSelector. - type: string - optional: - description: If true, don't block pod startup - if the referenced ClusterTrustBundle(s) aren't - available. If using name, then the named ClusterTrustBundle - is allowed not to exist. - type: boolean - path: - description: Relative path from the volume root - to write the bundle. - type: string - signerName: - description: Select all ClusterTrustBundles that - match this signer name. Mutually-exclusive with - name. The contents of all selected ClusterTrustBundles - will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret data - to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional field specify whether the - Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information about - the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. - format: int64 - type: integer - path: - description: path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is no - group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for - a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: system is the name of the storage system as - configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair in - the Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret or - its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the - pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based - Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere - volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - required: - - capabilities - - endpoint - type: object - status: - description: OpAMPBridgeStatus defines the observed state of OpAMPBridge. - properties: - version: - description: Version of the managed OpAMP Bridge (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml deleted file mode 100644 index 56f84cbb6..000000000 --- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml +++ /dev/null @@ -1,7513 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.0 - name: opentelemetrycollectors.opentelemetry.io -spec: - group: opentelemetry.io - names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors - shortNames: - - otelcol - - otelcols - singular: opentelemetrycollector - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Deployment Mode - jsonPath: .spec.mode - name: Mode - type: string - - description: OpenTelemetry Version - jsonPath: .status.version - name: Version - type: string - - jsonPath: .status.scale.statusReplicas - name: Ready - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.image - name: Image - type: string - - description: Management State - jsonPath: .spec.managementState - name: Management - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors - API. - properties: - apiVersion: - description: APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. - type: string - kind: - description: Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - type: object - spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. - properties: - additionalContainers: - description: AdditionalContainers allows injecting additional containers - into the Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - autoscaler: - description: Autoscaler specifies the pod autoscaling configuration - to use for the OpenTelemetryCollector workload. - properties: - behavior: - description: HorizontalPodAutoscalerBehavior configures the scaling - behavior of the target in both Up and Down directions (scaleUp - and scaleDown fields respectively). - properties: - scaleDown: - description: scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down - to minReplicas pods, with a 300 second stabilization window - (i.e. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - scaleUp: - description: scaleUp is scaling policy for scaling Up. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - type: object - maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling - feature. If MaxReplicas is set autoscaling is enabled. - format: int32 - type: integer - metrics: - description: Metrics is meant to provide a customizable way to - configure HPA metrics. currently the only supported custom metrics - is type=Pod. - items: - description: MetricSpec defines a subset of metrics to be defined - for the HPA's metric array more metric type can be supported - as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec - for reference. - properties: - pods: - description: PodsMetricSource indicates how to scale on - a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: selector is the string-encoded form - of a standard kubernetes label selector for the - given metric When set, it is passed as an additional - parameter to the metrics server for more specific - metrics scopi - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: averageUtilization is the target value - of the average of the resource metric across all - relevant pods, represented as a percentage of - the requested value of the resource for the pods. - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: averageValue is the target value of - the average of the metric across all relevant - pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - type: - description: MetricSourceType indicates the type of metric. - type: string - required: - - type - type: object - type: array - minReplicas: - description: MinReplicas sets a lower bound to the autoscaling - feature. Set this if your are using autoscaling. It must be - at least 1 - format: int32 - type: integer - targetCPUUtilization: - description: TargetCPUUtilization sets the target average CPU - used across all replicas. If average CPU exceeds this value, - the HPA will scale up. Defaults to 90 percent. - format: int32 - type: integer - targetMemoryUtilization: - description: TargetMemoryUtilization sets the target average memory - utilization across all replicas - format: int32 - type: integer - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - configmaps: - description: ConfigMaps is a list of ConfigMaps in the same namespace - as the OpenTelemetryCollector object, which shall be mounted into - the Collector Pods. - items: - properties: - mountpath: - type: string - name: - description: Configmap defines name and path where the configMaps - should be mounted. - type: string - required: - - mountpath - - name - type: object - type: array - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. - These can then in certain cases be consumed in the config file for - the Collector. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpenTelemetry Collector's Pods. These can then in certain cases - be consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how OpenTelemetry Collector - is exposed. This functionality is only available if one of the valid - modes is set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' - type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. - properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt - type: string - type: object - ruleType: - description: RuleType defines how Ingress exposes collector receivers. - IngressRuleTypePath ("path") exposes each receiver port on a - unique path on single domain defined in Hostname. - enum: - - path - - subdomain - type: string - tls: - description: TLS configuration. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. - properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. - items: - type: string - type: array - x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. - type: string - type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress, - route' - enum: - - ingress - - route - type: string - type: object - initContainers: - description: InitContainers allows injecting initContainers to the - Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - lifecycle: - description: Actions that the management system should take in response - to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event such - as liveness/startup probe failure, preemption, resource contention, - etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: Liveness config for the OpenTelemetry Collector except - the probe handler which is auto generated from the health extension - of the collector. - properties: - failureThreshold: - description: Minimum consecutive failures for the probe to be - considered failed after having succeeded. Defaults to 3. Minimum - value is 1. - format: int32 - type: integer - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default - to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be - considered successful after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - managementState: - default: managed - description: ManagementState defines if the CR should be managed by - the operator or not. Default is managed. - enum: - - managed - - unmanaged - type: string - maxReplicas: - description: 'MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" - instead.' - format: int32 - type: integer - minReplicas: - description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if you are using autoscaling. It must be at least 1 Deprecated: - use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' - format: int32 - type: integer - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets handled. - properties: - metrics: - description: Metrics defines the metrics configuration for operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor or - PodMonitor(for sidecar mode) should be created for the service - managed by the OpenTelemetry Operator. The operator.observability. - type: boolean - type: object - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption budget - configuration to use for the OpenTelemetryCollector workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after the - eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - description: PodSecurityContext configures the pod security context - for the opentelemetry-collector pod, when running as a deployment, - daemonset, or statefulset. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetry Collector pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security context - for the opentelemetry-collector container. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string - targetAllocator: - description: TargetAllocator indicates a value which determines whether - to spawn a target allocation resource or not. - properties: - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects - (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term - matches no objects. The requirements of them are - ANDed. The TopologySelectorTerm type implements - a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the anti-affinity expressions - specified by this field, but it may choose a node that - violates one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified - by this field are not met at scheduling time, the pod - will not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - allocationStrategy: - description: AllocationStrategy determines which strategy the - target allocator should use for allocation. The current options - are least-weighted and consistent-hashing. The default option - is least-weighted - enum: - - least-weighted - - consistent-hashing - type: string - enabled: - description: Enabled indicates whether to use a target allocation - mechanism for Prometheus targets or not. - type: boolean - env: - description: ENV vars to set on the OpenTelemetry TargetAllocator's - Pods. These can then in certain cases be consumed in the config - file for the TargetAllocator. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - filterStrategy: - description: FilterStrategy determines how to filter targets before - allocating them among the collectors. The only current option - is relabel-config (drops targets based on prom relabel_config). - type: string - image: - description: Image indicates the container image to use for the - OpenTelemetry TargetAllocator. - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry TargetAllocator - pods. - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets - handled. - properties: - metrics: - description: Metrics defines the metrics configuration for - operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor - or PodMonitor(for sidecar mode) should be created for - the service managed by the OpenTelemetry Operator. The - operator.observability. - type: boolean - type: object - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption - budget configuration to use for the target allocator workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after - the eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - prometheusCR: - description: PrometheusCR defines the configuration for the retrieval - of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. - properties: - enabled: - description: Enabled indicates whether to use a PrometheusOperator - custom resources as targets or not. - type: boolean - podMonitorSelector: - additionalProperties: - type: string - description: PodMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a PodMonitor's - meta labels. - type: object - scrapeInterval: - default: 30s - description: "Interval between consecutive scrapes. Equivalent - to the same setting on the Prometheus CRD. \n Default: \"30s\"" - format: duration - type: string - serviceMonitorSelector: - additionalProperties: - type: string - description: ServiceMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a ServiceMonitor's - meta labels. - type: object - type: object - replicas: - description: Replicas is the number of pod instances for the underlying - TargetAllocator. This should only be set to a value other than - 1 if a strategy that allows for high availability is chosen. - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetryTargetAllocator - containers. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security - context for the targetallocator. - properties: - fsGroup: - description: "A special supplemental group that applies to - all containers in a pod. Some volume types allow the Kubelet - to change the ownership of that volume to be owned by the - pod: \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - SecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers - in this pod. Note that this field cannot be set when spec.os.name - is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process - run in each container, in addition to the container's primary - GID, the fsGroup (if specified), and group memberships defined - in the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used - for the pod. Pods with unsupported sysctls (by the container - runtime) might fail to launch. Note that this field cannot - be set when spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options within a container's - SecurityContext will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing - service account to use with this instance. When set, the operator - will not automatically create a ServiceAccount for the TargetAllocator. - type: string - tolerations: - description: Toleration embedded kubernetes pod configuration - option, controls how pods can be scheduled with matching taints - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using - the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. - Empty means match all taint effects. When specified, allowed - values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to - the value. Valid operators are Exists and Equal. Defaults - to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of - time the toleration (which must be of effect NoExecute, - otherwise this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod - configuration option, controls how pods are spread across your - cluster among failure-domains such as regions, zones, nodes, - and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine - the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to - select the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods - may be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat - node taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes - that have a label with this key and identical values are - considered to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with - a pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - type: object - terminationGracePeriodSeconds: - description: Duration in seconds the pod needs to terminate gracefully - upon probe failure. - format: int64 - type: integer - tolerations: - description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match all - values and all keys. - type: string - operator: - description: Operator represents a key's relationship to the - value. Valid operators are Exists and Equal. Defaults to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time - the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - updateStrategy: - description: UpdateStrategy represents the strategy the operator will - take replacing existing DaemonSet pods with new pods https://kubernetes. - properties: - rollingUpdate: - description: 'Rolling update config params. Present only if type - = "RollingUpdate". --- TODO: Update this to follow our convention - for oneOf, whatever we decide it to be. Same as Deployment `strategy.' - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: The maximum number of nodes with an existing - available DaemonSet pod that can have an updated DaemonSet - pod during during an update. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: The maximum number of DaemonSet pods that can - be unavailable during the update. - x-kubernetes-int-or-string: true - type: object - type: - description: Type of daemon set update. Can be "RollingUpdate" - or "OnDelete". Default is RollingUpdate. - type: string - type: object - upgradeStrategy: - description: UpgradeStrategy represents how the operator will handle - upgrades to the CR when a newer version of the operator is deployed - enum: - - automatic - - none - type: string - volumeClaimTemplates: - description: VolumeClaimTemplates will provide stable storage using - PersistentVolumes. Only available when the mode=statefulset. - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. - type: string - kind: - description: Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - type: string - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: 'spec defines the desired characteristics of a - volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, the - specified Kind must be in the core API group. For - any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace is specified, - a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of - compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of - compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used to set - the VolumeAttributesClass used by this claim. - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not - included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: 'status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the actual access modes - the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - allocatedResourceStatuses: - additionalProperties: - description: When a controller receives persistentvolume - claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that - update and let other controllers handle it. - type: string - description: allocatedResourceStatuses stores status of - resource being resized for the given PVC. Key names follow - standard Kubernetes label syntax. - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: allocatedResources tracks the resources allocated - to a PVC including its capacity. Key names follow standard - Kubernetes label syntax. - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: conditions is the current Condition of persistent - volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'ResizeStarted'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: reason is a unique, this should be a - short, machine understandable string that gives - the reason for condition's last transition. - type: string - status: - type: string - type: - description: PersistentVolumeClaimConditionType is - a valid value of PersistentVolumeClaimCondition.Type - type: string - required: - - status - - type - type: object - type: array - currentVolumeAttributesClassName: - description: currentVolumeAttributesClassName is the current - name of the VolumeAttributesClass the PVC is using. - type: string - modifyVolumeStatus: - description: ModifyVolumeStatus represents the status object - of ControllerModifyVolume operation. When this is unset, - there is no ModifyVolume operation being attempted. - properties: - status: - description: status is the status of the ControllerModifyVolume - operation. - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - x-kubernetes-list-type: atomic - volumeMounts: - description: VolumeMounts represents the mount points to use in the - underlying collector deployment(s) - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: Path within the container at which the volume should - be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are propagated - from the host to container and the other way around. When - not set, MountPropagationNone is used. This field is beta - in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which the - container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-type: atomic - volumes: - description: Volumes represents which volumes to use in the underlying - collector deployment(s). - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - properties: - awsElasticBlockStore: - description: 'awsElasticBlockStore represents an AWS Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - readOnly: - description: 'readOnly value true will force the readOnly - setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: boolean - volumeID: - description: 'volumeID is unique ID of the persistent disk - resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' - type: string - required: - - volumeID - type: object - azureDisk: - description: azureDisk represents an Azure Data Disk mount on - the host and bind mount to the pod. - properties: - cachingMode: - description: 'cachingMode is the Host Caching mode: None, - Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the data disk in the - blob storage - type: string - diskURI: - description: diskURI is the URI of data disk in the blob - storage - type: string - fsType: - description: fsType is Filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - kind: - description: 'kind expected values are Shared: multiple - blob disks per storage account Dedicated: single blob - disk per storage account Managed: azure managed data - disk (only in managed availability set).' - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI - type: object - azureFile: - description: azureFile represents an Azure File Service mount - on the host and bind mount to the pod. - properties: - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of secret that contains - Azure Storage Account Name and Key - type: string - shareName: - description: shareName is the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: - description: cephFS represents a Ceph FS mount on the host that - shares a pod's lifetime - properties: - monitors: - description: 'monitors is Required: Monitors is a collection - of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - items: - type: string - type: array - path: - description: 'path is Optional: Used as the mounted root, - rather than the full Ceph tree, default is /' - type: string - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: boolean - secretFile: - description: 'secretFile is Optional: SecretFile is the - path to key ring for User, default is /etc/ceph/user.secret - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - secretRef: - description: 'secretRef is Optional: SecretRef is reference - to the authentication secret for User, default is empty. - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is optional: User is the rados user name, - default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' - type: string - required: - - monitors - type: object - cinder: - description: 'cinder represents a cinder volume attached and - mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' - type: string - readOnly: - description: 'readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: boolean - secretRef: - description: 'secretRef is optional: points to a secret - object containing parameters used to connect to OpenStack.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: 'volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md' - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap that should populate - this volume - properties: - defaultMode: - description: 'defaultMode is optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items if unspecified, each key-value pair in - the Data field of the referenced ConfigMap will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: optional specify whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) represents ephemeral - storage that is handled by certain external CSI drivers (Beta - feature). - properties: - driver: - description: driver is the name of the CSI driver that handles - this volume. Consult with your admin for the correct name - as registered in the cluster. - type: string - fsType: - description: fsType to mount. Ex. "ext4", "xfs", "ntfs". - If not provided, the empty value is passed to the associated - CSI driver which will determine the default filesystem - to apply. - type: string - nodePublishSecretRef: - description: nodePublishSecretRef is a reference to the - secret object containing sensitive information to pass - to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: readOnly specifies a read-only configuration - for the volume. Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: volumeAttributes stores driver-specific properties - that are passed to the CSI driver. Consult your driver's - documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward API about the pod - that should populate this volume - properties: - defaultMode: - description: 'Optional: mode bits to use on created files - by default. Must be a Optional: mode bits used to set - permissions on created files by default.' - format: int32 - type: integer - items: - description: Items is a list of downward API volume file - items: - description: DownwardAPIVolumeFile represents information - to create the file containing the pod field - properties: - fieldRef: - description: 'Required: Selects a field of the pod: - only annotations, labels, name and namespace are - supported.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to set permissions - on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative path - name of the file to be created. Must not be absolute - or contain the ''..'' path. Must be utf-8 encoded. - The first item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, requests.cpu and requests.memory) - are currently supported.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - emptyDir: - description: 'emptyDir represents a temporary directory that - shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' - properties: - medium: - description: medium represents what type of storage medium - should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: sizeLimit is the total amount of local storage - required for this EmptyDir volume. The size limit is also - applicable for memory medium. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. - properties: - volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to - provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. - properties: - metadata: - description: May contain labels and annotations that - will be copied into the PVC when creating it. No other - fields are allowed and will be rejected during validation. - properties: - annotations: - additionalProperties: - type: string - type: object - finalizers: - items: - type: string - type: array - labels: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - type: object - spec: - description: The specification for the PersistentVolumeClaim. - The entire content is copied unchanged into the PVC - that gets created from this template. - properties: - accessModes: - description: 'accessModes contains the desired access - modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: dataSourceRef specifies the object - from which to populate the volume with data, if - a non-empty volume is desired. - properties: - apiGroup: - description: APIGroup is the group for the resource - being referenced. If APIGroup is not specified, - the specified Kind must be in the core API - group. For any other third-party types, APIGroup - is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string - name: - description: Name is the name of resource being - referenced - type: string - namespace: - description: Namespace is the namespace of resource - being referenced Note that when a namespace - is specified, a gateway.networking.k8s. - type: string - required: - - kind - - name - type: object - resources: - description: resources represents the minimum resources - the volume should have. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount - of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. - type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the - StorageClass required by the claim. More info: - https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used - to set the VolumeAttributesClass used by this - claim. - type: string - volumeMode: - description: volumeMode defines what type of volume - is required by the claim. Value of Filesystem - is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference - to the PersistentVolume backing this claim. - type: string - type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource that is - attached to a kubelet's host machine and then exposed to the - pod. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - lun: - description: 'lun is Optional: FC target lun number' - format: int32 - type: integer - readOnly: - description: 'readOnly is Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC target worldwide - names (WWNs)' - items: - type: string - type: array - wwids: - description: 'wwids Optional: FC volume world wide identifiers - (wwids) Either wwids or combination of targetWWNs and - lun must be set, but not both simultaneously.' - items: - type: string - type: array - type: object - flexVolume: - description: flexVolume represents a generic volume resource - that is provisioned/attached using an exec based plugin. - properties: - driver: - description: driver is the name of the driver to use for - this volume. - type: string - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". The default filesystem depends - on FlexVolume script. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this field holds extra - command options if any.' - type: object - readOnly: - description: 'readOnly is Optional: defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts.' - type: boolean - secretRef: - description: 'secretRef is Optional: secretRef is reference - to the secret object containing sensitive information - to pass to the plugin scripts. This may be empty if no - secret object is specified.' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - driver - type: object - flocker: - description: flocker represents a Flocker volume attached to - a kubelet's host machine. This depends on the Flocker control - service being running - properties: - datasetName: - description: datasetName is Name of the dataset stored as - metadata -> name on the dataset for Flocker should be - considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of the dataset. This - is unique identifier of a Flocker dataset - type: string - type: object - gcePersistentDisk: - description: 'gcePersistentDisk represents a GCE Disk resource - that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' - properties: - fsType: - description: 'fsType is filesystem type of the volume that - you want to mount. Tip: Ensure that the filesystem type - is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' - type: string - partition: - description: 'partition is the partition in the volume that - you want to mount. If omitted, the default is to mount - by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' - format: int32 - type: integer - pdName: - description: 'pdName is unique name of the PD resource in - GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' - type: boolean - required: - - pdName - type: object - gitRepo: - description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' - properties: - directory: - description: directory is the target directory name. Must - not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash for the specified - revision. - type: string - required: - - repository - type: object - glusterfs: - description: 'glusterfs represents a Glusterfs mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' - properties: - endpoints: - description: 'endpoints is the endpoint name that details - Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - path: - description: 'path is the Glusterfs volume path. More info: - https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: string - readOnly: - description: 'readOnly here will force the Glusterfs volume - to be mounted with read-only permissions. Defaults to - false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' - type: boolean - required: - - endpoints - - path - type: object - hostPath: - description: hostPath represents a pre-existing file or directory - on the host machine that is directly exposed to the container. - properties: - path: - description: 'path of the directory on the host. If the - path is a symlink, it will follow the link to the real - path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - type: - description: 'type for HostPath Volume Defaults to "" More - info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' - type: string - required: - - path - type: object - iscsi: - description: 'iscsi represents an ISCSI Disk resource that is - attached to a kubelet''s host machine and then exposed to - the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' - properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether support iSCSI - Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether support iSCSI - Session CHAP authentication - type: boolean - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - initiatorName: - description: initiatorName is the custom iSCSI Initiator - Name. - type: string - iqn: - description: iqn is the target iSCSI Qualified Name. - type: string - iscsiInterface: - description: iscsiInterface is the interface Name that uses - an iSCSI transport. Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: portals is the iSCSI Target Portal List. The - portal is either an IP or ip_addr:port if the port is - other than default (typically TCP ports 860 and 3260). - items: - type: string - type: array - readOnly: - description: readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret for iSCSI target - and initiator authentication - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: - description: targetPortal is iSCSI Target Portal. The Portal - is either an IP or ip_addr:port if the port is other than - default (typically TCP ports 860 and 3260). - type: string - required: - - iqn - - lun - - targetPortal - type: object - name: - description: 'name of the volume. Must be a DNS_LABEL and unique - within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - nfs: - description: 'nfs represents an NFS mount on the host that shares - a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - properties: - path: - description: 'path that is exported by the NFS server. More - info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - readOnly: - description: 'readOnly here will force the NFS export to - be mounted with read-only permissions. Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: boolean - server: - description: 'server is the hostname or IP address of the - NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' - type: string - required: - - path - - server - type: object - persistentVolumeClaim: - description: 'persistentVolumeClaimVolumeSource represents a - reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' - properties: - claimName: - description: 'claimName is the name of a PersistentVolumeClaim - in the same namespace as the pod using this volume. More - info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - type: string - readOnly: - description: readOnly Will force the ReadOnly setting in - VolumeMounts. Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: - description: photonPersistentDisk represents a PhotonController - persistent disk attached and mounted on kubelets host machine - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - pdID: - description: pdID is the ID that identifies Photon Controller - persistent disk - type: string - required: - - pdID - type: object - portworxVolume: - description: portworxVolume represents a portworx volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fSType represents the filesystem type to mount - Must be a filesystem type supported by the host operating - system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: defaultMode are the mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. - format: int32 - type: integer - sources: - description: sources is the list of volume projections - items: - description: Projection that may be projected along with - other supported volume types - properties: - clusterTrustBundle: - description: "ClusterTrustBundle allows a pod to access - the `.spec.trustBundle` field of ClusterTrustBundle - objects in an auto-updating file. \n Alpha, gated - by the ClusterTrustBundleProjection feature gate." - properties: - labelSelector: - description: Select all ClusterTrustBundles that - match this label selector. Only has effect - if signerName is set. Mutually-exclusive with - name. If unset, interpreted as "match nothing". - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: Select a single ClusterTrustBundle - by object name. Mutually-exclusive with signerName - and labelSelector. - type: string - optional: - description: If true, don't block pod startup - if the referenced ClusterTrustBundle(s) aren't - available. If using name, then the named ClusterTrustBundle - is allowed not to exist. - type: boolean - path: - description: Relative path from the volume root - to write the bundle. - type: string - signerName: - description: Select all ClusterTrustBundles that - match this signer name. Mutually-exclusive with - name. The contents of all selected ClusterTrustBundles - will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information about the configMap - data to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced ConfigMap - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional specify whether the ConfigMap - or its keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information about the downwardAPI - data to project - properties: - items: - description: Items is a list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field - properties: - fieldRef: - description: 'Required: Selects a field - of the pod: only annotations, labels, - name and namespace are supported.' - properties: - apiVersion: - description: Version of the schema the - FieldPath is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the field to select - in the specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - description: 'Optional: mode bits used to - set permissions on this file, must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' - format: int32 - type: integer - path: - description: 'Required: Path is the relative - path name of the file to be created. Must - not be absolute or contain the ''..'' - path. Must be utf-8 encoded. The first - item of the relative path must not start - with ''..''' - type: string - resourceFieldRef: - description: 'Selects a resource of the - container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu - and requests.memory) are currently supported.' - properties: - containerName: - description: 'Container name: required - for volumes, optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format - of the exposed resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - required: - - path - type: object - type: array - type: object - secret: - description: secret information about the secret data - to project - properties: - items: - description: items if unspecified, each key-value - pair in the Data field of the referenced Secret - will be projected into the volume as a file - whose name is the key and content is the value. - items: - description: Maps a string key to a path within - a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits - used to set permissions on this file. - Must be an octal value between 0000 and - 0777 or a decimal value between 0 and - 511.' - format: int32 - type: integer - path: - description: path is the relative path of - the file to map the key to. May not be - an absolute path. May not contain the - path element '..'. May not start with - the string '..'. - type: string - required: - - key - - path - type: object - type: array - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: optional field specify whether the - Secret or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is information about - the serviceAccountToken data to project - properties: - audience: - description: audience is the intended audience - of the token. A recipient of a token must identify - itself with an identifier specified in the audience - of the token, and otherwise should reject the - token. - type: string - expirationSeconds: - description: expirationSeconds is the requested - duration of validity of the service account - token. As the token approaches expiration, the - kubelet volume plugin will proactively rotate - the service account token. - format: int64 - type: integer - path: - description: path is the path relative to the - mount point of the file to project the token - into. - type: string - required: - - path - type: object - type: object - type: array - type: object - quobyte: - description: quobyte represents a Quobyte mount on the host - that shares a pod's lifetime - properties: - group: - description: group to map volume access to Default is no - group - type: string - readOnly: - description: readOnly here will force the Quobyte volume - to be mounted with read-only permissions. Defaults to - false. - type: boolean - registry: - description: registry represents a single or multiple Quobyte - Registry services specified as a string as host:port pair - (multiple entries are separated with commas) which acts - as the central registry for volumes - type: string - tenant: - description: tenant owning the given Quobyte volume in the - Backend Used with dynamically provisioned Quobyte volumes, - value is set by the plugin - type: string - user: - description: user to map volume access to Defaults to serivceaccount - user - type: string - volume: - description: volume is a string that references an already - created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: 'rbd represents a Rados Block Device mount on the - host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' - properties: - fsType: - description: 'fsType is the filesystem type of the volume - that you want to mount. Tip: Ensure that the filesystem - type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' - type: string - image: - description: 'image is the rados image name. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - keyring: - description: 'keyring is the path to key ring for RBDUser. - Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - monitors: - description: 'monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - items: - type: string - type: array - pool: - description: 'pool is the rados pool name. Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - readOnly: - description: 'readOnly here will force the ReadOnly setting - in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: boolean - secretRef: - description: 'secretRef is name of the authentication secret - for RBDUser. If provided overrides keyring. Default is - nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: 'user is the rados user name. Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' - type: string - required: - - image - - monitors - type: object - scaleIO: - description: scaleIO represents a ScaleIO persistent volume - attached and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Default is "xfs". - type: string - gateway: - description: gateway is the host address of the ScaleIO - API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name of the ScaleIO - Protection Domain for the configured storage. - type: string - readOnly: - description: readOnly Defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef references to the secret for ScaleIO - user and other sensitive information. If this is not provided, - Login operation will fail. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable SSL communication - with Gateway, default false - type: boolean - storageMode: - description: storageMode indicates whether the storage for - a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO Storage Pool associated - with the protection domain. - type: string - system: - description: system is the name of the storage system as - configured in ScaleIO. - type: string - volumeName: - description: volumeName is the name of a volume already - created in the ScaleIO system that is associated with - this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: 'secret represents a secret that should populate - this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - properties: - defaultMode: - description: 'defaultMode is Optional: mode bits used to - set permissions on created files by default. Must be an - octal value between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - items: - description: items If unspecified, each key-value pair in - the Data field of the referenced Secret will be projected - into the volume as a file whose name is the key and content - is the value. - items: - description: Maps a string key to a path within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: 'mode is Optional: mode bits used to - set permissions on this file. Must be an octal value - between 0000 and 0777 or a decimal value between - 0 and 511.' - format: int32 - type: integer - path: - description: path is the relative path of the file - to map the key to. May not be an absolute path. - May not contain the path element '..'. May not start - with the string '..'. - type: string - required: - - key - - path - type: object - type: array - optional: - description: optional field specify whether the Secret or - its keys must be defined - type: boolean - secretName: - description: 'secretName is the name of the secret in the - pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' - type: string - type: object - storageos: - description: storageOS represents a StorageOS volume attached - and mounted on Kubernetes nodes. - properties: - fsType: - description: fsType is the filesystem type to mount. Must - be a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - readOnly: - description: readOnly defaults to false (read/write). ReadOnly - here will force the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: secretRef specifies the secret to use for obtaining - the StorageOS API credentials. If not specified, default - values will be attempted. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: volumeName is the human-readable name of the - StorageOS volume. Volume names are only unique within - a namespace. - type: string - volumeNamespace: - description: volumeNamespace specifies the scope of the - volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. - type: string - type: object - vsphereVolume: - description: vsphereVolume represents a vSphere volume attached - and mounted on kubelets host machine - properties: - fsType: - description: fsType is filesystem type to mount. Must be - a filesystem type supported by the host operating system. - Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. - type: string - storagePolicyID: - description: storagePolicyID is the storage Policy Based - Management (SPBM) profile ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage Policy Based - Management (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path that identifies vSphere - volume vmdk - type: string - required: - - volumePath - type: object - required: - - name - type: object - type: array - x-kubernetes-list-type: atomic - type: object - status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector. - properties: - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - messages: - description: 'Messages about actions performed by the operator on - this resource. Deprecated: use Kubernetes events instead.' - items: - type: string - type: array - x-kubernetes-list-type: atomic - replicas: - description: 'Replicas is currently not being set and might be removed - in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" - instead.' - format: int32 - type: integer - scale: - description: Scale is the OpenTelemetryCollector's scale subresource - status. - properties: - replicas: - description: The total number non-terminated pods targeted by - this OpenTelemetryCollector's deployment or statefulSet. - format: int32 - type: integer - selector: - description: The selector used to match the OpenTelemetryCollector's - deployment or statefulSet pods. - type: string - statusReplicas: - description: StatusReplicas is the number of pods targeted by - this OpenTelemetryCollector's with a Ready Condition / Total - number of non-terminated pods targeted by this OpenTelemetryCollector's - (their labels matc - type: string - type: object - version: - description: Version of the managed OpenTelemetry Collector (operand) - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.scale.selector - specReplicasPath: .spec.replicas - statusReplicasPath: .status.scale.replicas - status: {} diff --git a/config/crd/kustomizeconfig.yaml b/config/crd/kustomizeconfig.yaml deleted file mode 100644 index 6f83d9a94..000000000 --- a/config/crd/kustomizeconfig.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# This file is for teaching kustomize how to substitute name and namespace reference in CRD -nameReference: -- kind: Service - version: v1 - fieldSpecs: - - kind: CustomResourceDefinition - group: apiextensions.k8s.io - path: spec/conversion/webhookClientConfig/service/name - -namespace: -- kind: CustomResourceDefinition - group: apiextensions.k8s.io - path: spec/conversion/webhookClientConfig/service/namespace - create: false - -varReference: -- path: metadata/annotations diff --git a/config/crd/patches/cainjection_in_opampbridges.yaml b/config/crd/patches/cainjection_in_opampbridges.yaml deleted file mode 100644 index 736bd5f17..000000000 --- a/config/crd/patches/cainjection_in_opampbridges.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: opampbridges.opentelemetry.io diff --git a/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml b/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml deleted file mode 100644 index 69f8ccd72..000000000 --- a/config/crd/patches/cainjection_in_opentelemetrycollectors.yaml +++ /dev/null @@ -1,8 +0,0 @@ -# The following patch adds a directive for certmanager to inject CA into the CRD -# CRD conversion requires k8s 1.13 or later. -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) - name: opentelemetrycollectors.opentelemetry.io diff --git a/config/crd/patches/webhook_in_opampbridges.yaml b/config/crd/patches/webhook_in_opampbridges.yaml deleted file mode 100644 index 8bf7a8144..000000000 --- a/config/crd/patches/webhook_in_opampbridges.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# The following patch enables a conversion webhook for the CRD -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: opampbridges.opentelemetry.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - namespace: system - name: webhook-service - path: /convert - conversionReviewVersions: - - v1 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml deleted file mode 100644 index 918d8a41a..000000000 --- a/config/default/manager_auth_proxy_patch.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# This patch inject a sidecar container which is a HTTP proxy for the -# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews. -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: kube-rbac-proxy - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.1 - args: - - "--secure-listen-address=0.0.0.0:8443" - - "--upstream=http://127.0.0.1:8080/" - - "--logtostderr=true" - - "--v=0" - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - - name: manager - args: - - "--metrics-addr=127.0.0.1:8080" - - "--enable-leader-election" - - "--zap-log-level=info" - - "--zap-time-encoding=rfc3339nano" - - "--feature-gates=+operator.autoinstrumentation.go,+operator.autoinstrumentation.nginx" diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2d404ed9b..2f838bfe2 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: 506463145083.dkr.ecr.us-west-2.amazonaws.com/cwagent-operator-pre-release - newTag: latest + newName: aws/cloudwatch-agent-operator + newTag: 1.0.2 diff --git a/config/rbac/_opampbridge_editor_role.yaml b/config/rbac/_opampbridge_editor_role.yaml deleted file mode 100644 index d98049e3b..000000000 --- a/config/rbac/_opampbridge_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit opampbridges. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opampbridge-editor-role -rules: -- apiGroups: - - opentelemetry.io - resources: - - opampbridges - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - opentelemetry.io - resources: - - opampbridges/status - verbs: - - get diff --git a/config/rbac/_opampbridge_viewer_role.yaml b/config/rbac/_opampbridge_viewer_role.yaml deleted file mode 100644 index 780c4f7f8..000000000 --- a/config/rbac/_opampbridge_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view opampbridges. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opampbridge-viewer-role -rules: -- apiGroups: - - opentelemetry.io - resources: - - opampbridges - verbs: - - get - - list - - watch -- apiGroups: - - opentelemetry.io - resources: - - opampbridges/status - verbs: - - get diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml deleted file mode 100644 index bd4af137a..000000000 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: metrics-reader -rules: -- nonResourceURLs: ["/metrics"] - verbs: ["get"] diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml deleted file mode 100644 index 618f5e417..000000000 --- a/config/rbac/auth_proxy_role.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: proxy-role -rules: -- apiGroups: ["authentication.k8s.io"] - resources: - - tokenreviews - verbs: ["create"] -- apiGroups: ["authorization.k8s.io"] - resources: - - subjectaccessreviews - verbs: ["create"] diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml deleted file mode 100644 index ec7acc0a1..000000000 --- a/config/rbac/auth_proxy_role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: proxy-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: proxy-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml deleted file mode 100644 index 45cbe801d..000000000 --- a/config/rbac/auth_proxy_service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: https - port: 8443 - targetPort: https - protocol: TCP - selector: - app.kubernetes.io/name: opentelemetry-operator - control-plane: controller-manager diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml deleted file mode 100644 index 7dc16c420..000000000 --- a/config/rbac/leader_election_role.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# permissions to do leader election. -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: leader-election-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml deleted file mode 100644 index 1d1321ed4..000000000 --- a/config/rbac/leader_election_role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: leader-election-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: leader-election-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/config/rbac/opentelemetrycollector_editor_role.yaml b/config/rbac/opentelemetrycollector_editor_role.yaml deleted file mode 100644 index ebc8e6a01..000000000 --- a/config/rbac/opentelemetrycollector_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit opentelemetrycollectors. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opentelemetrycollector-editor-role -rules: -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/status - verbs: - - get diff --git a/config/rbac/opentelemetrycollector_viewer_role.yaml b/config/rbac/opentelemetrycollector_viewer_role.yaml deleted file mode 100644 index 4a76c71d1..000000000 --- a/config/rbac/opentelemetrycollector_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view opentelemetrycollectors. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: opentelemetrycollector-viewer-role -rules: -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors - verbs: - - get - - list - - watch -- apiGroups: - - opentelemetry.io - resources: - - opentelemetrycollectors/status - verbs: - - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 972d1f889..09d018a85 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -8,6 +8,9 @@ rules: - "" resources: - configmaps + - pods + - serviceaccounts + - services verbs: - create - delete @@ -31,9 +34,11 @@ rules: - list - watch - apiGroups: - - "" + - apps resources: - - serviceaccounts + - daemonsets + - deployments + - statefulsets verbs: - create - delete @@ -43,9 +48,17 @@ rules: - update - watch - apiGroups: - - "" + - apps resources: - - services + - replicasets + verbs: + - get + - list + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers verbs: - create - delete @@ -55,9 +68,19 @@ rules: - update - watch - apiGroups: - - apps + - coordination.k8s.io resources: - - daemonsets + - leases + verbs: + - create + - get + - list + - update +- apiGroups: + - monitoring.coreos.com + resources: + - podmonitors + - servicemonitors verbs: - create - delete @@ -67,9 +90,9 @@ rules: - update - watch - apiGroups: - - apps + - networking.k8s.io resources: - - deployments + - ingresses verbs: - create - delete @@ -79,43 +102,45 @@ rules: - update - watch - apiGroups: - - apps + - opentelemetry.io resources: - - replicasets + - instrumentations verbs: - get - list + - patch + - update - watch - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io resources: - - amazoncloudwatchagents + - opampbridges verbs: + - create + - delete - get - list - patch - update - watch - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io resources: - - amazoncloudwatchagents/finalizers + - opampbridges/finalizers verbs: - - get - - patch - update - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io resources: - - amazoncloudwatchagents/status + - opampbridges/status verbs: - get - patch - update - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io resources: - - instrumentations + - opentelemetrycollectors verbs: - get - list @@ -123,18 +148,25 @@ rules: - update - watch - apiGroups: - - coordination.k8s.io + - opentelemetry.io resources: - - leases + - opentelemetrycollectors/finalizers verbs: - - create - get - - list + - patch - update - apiGroups: - - networking.k8s.io + - opentelemetry.io resources: - - ingresses + - opentelemetrycollectors/status + verbs: + - get + - patch + - update +- apiGroups: + - policy + resources: + - poddisruptionbudgets verbs: - create - delete diff --git a/config/samples/_v1alpha1_opampbridge.yaml b/config/samples/_v1alpha1_opampbridge.yaml deleted file mode 100644 index 7e18e320f..000000000 --- a/config/samples/_v1alpha1_opampbridge.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpAMPBridge -metadata: - name: opampbridge-sample -spec: - endpoint: ws://opamp-server:4320/v1/opamp - capabilities: - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRemoteConfig: true - AcceptsRestartCommand: true - ReportsEffectiveConfig: true - ReportsHealth: true - ReportsOwnLogs: true - ReportsOwnMetrics: true - ReportsOwnTraces: true - ReportsRemoteConfig: true - ReportsStatus: true - componentsAllowed: - receivers: - - otlp - processors: - - memory_limiter - exporters: - - logging diff --git a/config/samples/core_v1alpha1_opentelemetrycollector.yaml b/config/samples/core_v1alpha1_opentelemetrycollector.yaml deleted file mode 100644 index b9c7a8840..000000000 --- a/config/samples/core_v1alpha1_opentelemetrycollector.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: otel -spec: - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - exporters: [debug] diff --git a/config/samples/exporter-with-tls.yaml b/config/samples/exporter-with-tls.yaml deleted file mode 100644 index f954e3e8b..000000000 --- a/config/samples/exporter-with-tls.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# this example shows how to connect an OpenTelemetry Collector with a Jaeger instance in OpenShift, -# which is provisioned using TLS automatically. We use the inject-cabundle in the config map to -# get access to the CA that signed the certs, and tell the operator to mount the config map into the -# provisioned deployments and daemonsets ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: cabundle - annotations: - "service.beta.openshift.io/inject-cabundle": "true" ---- -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: opentelemetrycollector-sample -spec: - volumeMounts: - - name: cabundle-volume - mountPath: /etc/pki/ca-trust/source/service-ca - readOnly: true - volumes: - - name: cabundle-volume - configMap: - name: cabundle - - config: | - receivers: - jaeger: - protocols: - grpc: - - processors: - batch: - - exporters: - jaeger: - endpoint: "simplest-collector-headless.default.svc:14250" - ca_file: "/etc/pki/ca-trust/source/service-ca/service-ca.crt" - server_name_override: "simplest-collector-headless.default.svc.cluster.local" - - service: - pipelines: - traces: - receivers: [jaeger] - processors: [batch] - exporters: [jaeger] diff --git a/config/samples/instrumentation_v1alpha1_instrumentation.yaml b/config/samples/instrumentation_v1alpha1_instrumentation.yaml deleted file mode 100644 index 7fc3b1cc7..000000000 --- a/config/samples/instrumentation_v1alpha1_instrumentation.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: Instrumentation -metadata: - name: instrumentation -spec: - exporter: - endpoint: http://otel-collector-headless:4317 diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml deleted file mode 100644 index 5bca25105..000000000 --- a/config/samples/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -## Append samples you want in your CSV to this file as resources ## -resources: -- core_v1alpha1_opentelemetrycollector.yaml -- instrumentation_v1alpha1_instrumentation.yaml -- _v1alpha1_opampbridge.yaml -#+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/sidecar.yaml b/config/samples/sidecar.yaml deleted file mode 100644 index 5d6ede289..000000000 --- a/config/samples/sidecar.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: opentelemetry.io/v1alpha1 -kind: OpenTelemetryCollector -metadata: - name: opentelemetrycollector-as-sidecar -spec: - mode: sidecar - config: | - receivers: - otlp: - protocols: - grpc: - http: - - exporters: - debug: - - service: - pipelines: - traces: - receivers: [otlp] - exporters: [debug] diff --git a/config/scorecard/bases/config.yaml b/config/scorecard/bases/config.yaml deleted file mode 100644 index c77047841..000000000 --- a/config/scorecard/bases/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: [] diff --git a/config/scorecard/kustomization.yaml b/config/scorecard/kustomization.yaml deleted file mode 100644 index 50cd2d084..000000000 --- a/config/scorecard/kustomization.yaml +++ /dev/null @@ -1,16 +0,0 @@ -resources: -- bases/config.yaml -patchesJson6902: -- path: patches/basic.config.yaml - target: - group: scorecard.operatorframework.io - version: v1alpha3 - kind: Configuration - name: config -- path: patches/olm.config.yaml - target: - group: scorecard.operatorframework.io - version: v1alpha3 - kind: Configuration - name: config -#+kubebuilder:scaffold:patchesJson6902 diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml deleted file mode 100644 index fb742649c..000000000 --- a/config/scorecard/patches/basic.config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: basic - test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml deleted file mode 100644 index adaaf65de..000000000 --- a/config/scorecard/patches/olm.config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-bundle-validation-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-crds-have-validation-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-crds-have-resources - image: quay.io/operator-framework/scorecard-test:v1.27.0 - labels: - suite: olm - test: olm-crds-have-resources-test diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index ce347fbcf..ac743c476 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -10,19 +10,19 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /mutate-opentelemetry-io-v1alpha1-instrumentation failurePolicy: Fail - name: mamazoncloudwatchagent.kb.io + name: minstrumentation.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None - admissionReviewVersions: - v1 @@ -30,19 +30,39 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation + path: /mutate-opentelemetry-io-v1alpha1-opampbridge failurePolicy: Fail - name: minstrumentation.kb.io + name: mopampbridge.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - instrumentations + - opampbridges + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: mopentelemetrycollector.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors sideEffects: None - admissionReviewVersions: - v1 @@ -76,19 +96,19 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /validate-opentelemetry-io-v1alpha1-instrumentation failurePolicy: Fail - name: vamazoncloudwatchagentcreateupdate.kb.io + name: vinstrumentationcreateupdate.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None - admissionReviewVersions: - v1 @@ -96,18 +116,18 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /validate-opentelemetry-io-v1alpha1-instrumentation failurePolicy: Ignore - name: vamazoncloudwatchagentdelete.kb.io + name: vinstrumentationdelete.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - DELETE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None - admissionReviewVersions: - v1 @@ -115,19 +135,19 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation + path: /validate-opentelemetry-io-v1alpha1-opampbridge failurePolicy: Fail - name: vinstrumentationcreateupdate.kb.io + name: vopampbridgecreateupdate.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - instrumentations + - opampbridges sideEffects: None - admissionReviewVersions: - v1 @@ -135,16 +155,55 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation + path: /validate-opentelemetry-io-v1alpha1-opampbridge failurePolicy: Ignore - name: vinstrumentationdelete.kb.io + name: vopampbridgedelete.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - opentelemetry.io apiVersions: - v1alpha1 operations: - DELETE resources: - - instrumentations + - opampbridges + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Fail + name: vopentelemetrycollectorcreateupdate.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - opentelemetrycollectors + sideEffects: None +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: webhook-service + namespace: system + path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + failurePolicy: Ignore + name: vopentelemetrycollectordelete.kb.io + rules: + - apiGroups: + - opentelemetry.io + apiVersions: + - v1alpha1 + operations: + - DELETE + resources: + - opentelemetrycollectors sideEffects: None diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index feb2dc1cb..000000000 --- a/docs/api.md +++ /dev/null @@ -1,5368 +0,0 @@ -# API Reference - -Packages: - -- [cloudwatch.aws.amazon.com/v1alpha1](#cloudwatchawsamazoncomv1alpha1) - -# cloudwatch.aws.amazon.com/v1alpha1 - -Resource Types: - -- [AmazonCloudWatchAgent](#amazoncloudwatchagent) - -- [Instrumentation](#instrumentation) - - - - -## AmazonCloudWatchAgent -[↩ Parent](#cloudwatchawsamazoncomv1alpha1 ) - - - - - - -AmazonCloudWatchAgent is the Schema for the AmazonCloudWatchAgents API. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstringcloudwatch.aws.amazon.com/v1alpha1true
kindstringAmazonCloudWatchAgenttrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject - AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent.
-
false
statusobject - AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent.
-
false
- - -### AmazonCloudWatchAgent.spec -[↩ Parent](#amazoncloudwatchagent) - - - -AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
argsmap[string]string - Args is the set of arguments to pass to the CloudWatch Agent binary
-
false
configstring - Config is the raw JSON to be used as the collector's configuration. Refer to the CloudWatch Agent documentation for details.
-
false
env[]object - ENV vars to set on the CloudWatch Agent's Pods. These can then in certain cases be consumed in the config file for the Collector.
-
false
envFrom[]object - List of sources to populate environment variables on the CloudWatch Agent's Pods. These can then in certain cases be consumed in the config file for the Collector.
-
false
hostNetworkboolean - HostNetwork indicates if the pod should run in the host networking namespace.
-
false
imagestring - Image indicates the container image to use for the CloudWatch Agent.
-
false
imagePullPolicystring - ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent)
-
false
ingressobject - Ingress is used to specify how CloudWatch Agent is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset.
-
false
modeenum - Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar)
-
- Enum: daemonset, deployment, sidecar, statefulset
-
false
nodeSelectormap[string]string - NodeSelector to schedule CloudWatch Agent pods. This is only relevant to daemonset, statefulset, and deployment mode
-
false
podAnnotationsmap[string]string - PodAnnotations is the set of annotations that will be attached to Collector and Target Allocator pods.
-
false
ports[]object - Ports allows a set of ports to be exposed by the underlying v1.Service. By default, the operator will attempt to infer the required ports by parsing the .Spec.Config property but this property can be used to open additional ports that can't be inferred by the operator, like for custom receivers.
-
false
priorityClassNamestring - If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.
-
false
replicasinteger - Replicas is the number of pod instances for the underlying CloudWatch Agent. Set this if your are not using autoscaling
-
- Format: int32
-
false
resourcesobject - Resources to set on the CloudWatch Agent pods.
-
false
serviceAccountstring - ServiceAccount indicates the name of an existing service account to use with this instance. When set, the operator will not automatically create a ServiceAccount for the collector.
-
false
tolerations[]object - Toleration to schedule CloudWatch Agent pods. This is only relevant to daemonset, statefulset, and deployment mode
-
false
upgradeStrategyenum - UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed
-
- Enum: automatic, none
-
false
volumeClaimTemplates[]object - VolumeClaimTemplates will provide stable storage using PersistentVolumes. Only available when the mode=statefulset.
-
false
volumeMounts[]object - VolumeMounts represents the mount points to use in the underlying collector deployment(s)
-
false
volumes[]object - Volumes represents which volumes to use in the underlying collector deployment(s).
-
false
- - -### AmazonCloudWatchAgent.spec.env[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -EnvVar represents an environment variable present in a Container. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the environment variable. Must be a C_IDENTIFIER.
-
true
valuestring - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
-
false
valueFromobject - Source for the environment variable's value. Cannot be used if value is not empty.
-
false
- - -### AmazonCloudWatchAgent.spec.env[index].valueFrom -[↩ Parent](#amazoncloudwatchagentspecenvindex) - - - -Source for the environment variable's value. Cannot be used if value is not empty. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
configMapKeyRefobject - Selects a key of a ConfigMap.
-
false
fieldRefobject - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
-
false
resourceFieldRefobject - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
-
false
secretKeyRefobject - Selects a key of a secret in the pod's namespace
-
false
- - -### AmazonCloudWatchAgent.spec.env[index].valueFrom.configMapKeyRef -[↩ Parent](#amazoncloudwatchagentspecenvindexvaluefrom) - - - -Selects a key of a ConfigMap. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key to select.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the ConfigMap or its key must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.env[index].valueFrom.fieldRef -[↩ Parent](#amazoncloudwatchagentspecenvindexvaluefrom) - - - -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fieldPathstring - Path of the field to select in the specified API version.
-
true
apiVersionstring - Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
false
- - -### AmazonCloudWatchAgent.spec.env[index].valueFrom.resourceFieldRef -[↩ Parent](#amazoncloudwatchagentspecenvindexvaluefrom) - - - -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
resourcestring - Required: resource to select
-
true
containerNamestring - Container name: required for volumes, optional for env vars
-
false
divisorint or string - Specifies the output format of the exposed resources, defaults to "1"
-
false
- - -### AmazonCloudWatchAgent.spec.env[index].valueFrom.secretKeyRef -[↩ Parent](#amazoncloudwatchagentspecenvindexvaluefrom) - - - -Selects a key of a secret in the pod's namespace - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key of the secret to select from. Must be a valid secret key.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the Secret or its key must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.envFrom[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -EnvFromSource represents the source of a set of ConfigMaps - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
configMapRefobject - The ConfigMap to select from
-
false
prefixstring - An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
-
false
secretRefobject - The Secret to select from
-
false
- - -### AmazonCloudWatchAgent.spec.envFrom[index].configMapRef -[↩ Parent](#amazoncloudwatchagentspecenvfromindex) - - - -The ConfigMap to select from - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the ConfigMap must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.envFrom[index].secretRef -[↩ Parent](#amazoncloudwatchagentspecenvfromindex) - - - -The Secret to select from - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the Secret must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.ingress -[↩ Parent](#amazoncloudwatchagentspec) - - - -Ingress is used to specify how CloudWatch Agent is exposed. This functionality is only available if one of the valid modes is set. Valid modes are: deployment, daemonset and statefulset. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
annotationsmap[string]string - Annotations to add to ingress. e.g. 'cert-manager.io/cluster-issuer: "letsencrypt"'
-
false
hostnamestring - Hostname by which the ingress proxy can be reached.
-
false
ingressClassNamestring - IngressClassName is the name of an IngressClass cluster resource. Ingress controller implementations use this field to know whether they should be serving this Ingress resource.
-
false
routeobject - Route is an OpenShift specific section that is only considered when type "route" is used.
-
false
tls[]object - TLS configuration.
-
false
typeenum - Type default value is: "" Supported types are: ingress
-
- Enum: ingress, route
-
false
- - -### AmazonCloudWatchAgent.spec.ingress.route -[↩ Parent](#amazoncloudwatchagentspecingress) - - - -Route is an OpenShift specific section that is only considered when type "route" is used. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
terminationenum - Termination indicates termination type. By default "edge" is used.
-
- Enum: insecure, edge, passthrough, reencrypt
-
false
- - -### AmazonCloudWatchAgent.spec.ingress.tls[index] -[↩ Parent](#amazoncloudwatchagentspecingress) - - - -IngressTLS describes the transport layer security associated with an ingress. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
hosts[]string - hosts is a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
-
false
secretNamestring - secretName is the name of the secret used to terminate TLS traffic on port 443. Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the "Host" header is used for routing.
-
false
- - -### AmazonCloudWatchAgent.spec.ports[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -ServicePort contains information on service's port. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
portinteger - The port that will be exposed by this service.
-
- Format: int32
-
true
appProtocolstring - The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
-
false
namestring - The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.
-
false
nodePortinteger - The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
-
- Format: int32
-
false
protocolstring - The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
-
- Default: TCP
-
false
targetPortint or string - Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
-
false
- - -### AmazonCloudWatchAgent.spec.resources -[↩ Parent](#amazoncloudwatchagentspec) - - - -Resources to set on the CloudWatch Agent pods. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
-
false
limitsmap[string]int or string - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
requestsmap[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
- - -### AmazonCloudWatchAgent.spec.resources.claims[index] -[↩ Parent](#amazoncloudwatchagentspecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - -### AmazonCloudWatchAgent.spec.tolerations[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
effectstring - Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
-
false
keystring - Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
-
false
operatorstring - Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
-
false
tolerationSecondsinteger - TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
-
- Format: int64
-
false
valuestring - Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -PersistentVolumeClaim is a user's request for and claim to a persistent volume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstring - APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
-
false
kindstring - Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
false
metadataobject - Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
false
specobject - spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
-
false
statusobject - status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].metadata -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindex) - - - -Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
annotationsmap[string]string -
-
false
finalizers[]string -
-
false
labelsmap[string]string -
-
false
namestring -
-
false
namespacestring -
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindex) - - - -spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
accessModes[]string - accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
-
false
dataSourceobject - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
-
false
dataSourceRefobject - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
-
false
resourcesobject - resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
-
false
selectorobject - selector is a label query over volumes to consider for binding.
-
false
storageClassNamestring - storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
-
false
volumeModestring - volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
-
false
volumeNamestring - volumeName is the binding reference to the PersistentVolume backing this claim.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.dataSource -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspec) - - - -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind is the type of resource being referenced
-
true
namestring - Name is the name of resource being referenced
-
true
apiGroupstring - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.dataSourceRef -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspec) - - - -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind is the type of resource being referenced
-
true
namestring - Name is the name of resource being referenced
-
true
apiGroupstring - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-
false
namespacestring - Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.resources -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspec) - - - -resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
-
false
limitsmap[string]int or string - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
requestsmap[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.resources.claims[index] -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.selector -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspec) - - - -selector is a label query over volumes to consider for binding. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].spec.selector.matchExpressions[index] -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexspecselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].status -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindex) - - - -status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
accessModes[]string - accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
-
false
allocatedResourcesmap[string]int or string - allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
-
false
capacitymap[string]int or string - capacity represents the actual resources of the underlying volume.
-
false
conditions[]object - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.
-
false
phasestring - phase represents the current phase of PersistentVolumeClaim.
-
false
resizeStatusstring - resizeStatus stores status of resize operation. ResizeStatus is not set by default but when expansion is complete resizeStatus is set to empty string by resize controller or kubelet. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeClaimTemplates[index].status.conditions[index] -[↩ Parent](#amazoncloudwatchagentspecvolumeclaimtemplatesindexstatus) - - - -PersistentVolumeClaimCondition contains details about state of pvc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
statusstring -
-
true
typestring - PersistentVolumeClaimConditionType is a valid value of PersistentVolumeClaimCondition.Type
-
true
lastProbeTimestring - lastProbeTime is the time we probed the condition.
-
- Format: date-time
-
false
lastTransitionTimestring - lastTransitionTime is the time the condition transitioned from one status to another.
-
- Format: date-time
-
false
messagestring - message is the human-readable message indicating details about last transition.
-
false
reasonstring - reason is a unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized.
-
false
- - -### AmazonCloudWatchAgent.spec.volumeMounts[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -VolumeMount describes a mounting of a Volume within a container. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
mountPathstring - Path within the container at which the volume should be mounted. Must not contain ':'.
-
true
namestring - This must match the Name of a Volume.
-
true
mountPropagationstring - mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.
-
false
readOnlyboolean - Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
-
false
subPathstring - Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).
-
false
subPathExprstring - Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index] -[↩ Parent](#amazoncloudwatchagentspec) - - - -Volume represents a named volume in a pod that may be accessed by any container in the pod. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-
true
awsElasticBlockStoreobject - awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
false
azureDiskobject - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
-
false
azureFileobject - azureFile represents an Azure File Service mount on the host and bind mount to the pod.
-
false
cephfsobject - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
-
false
cinderobject - cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
-
false
configMapobject - configMap represents a configMap that should populate this volume
-
false
csiobject - csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
-
false
downwardAPIobject - downwardAPI represents downward API about the pod that should populate this volume
-
false
emptyDirobject - emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
-
false
ephemeralobject - ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time.
-
false
fcobject - fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
-
false
flexVolumeobject - flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
-
false
flockerobject - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
-
false
gcePersistentDiskobject - gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
-
false
gitRepoobject - gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.
-
false
glusterfsobject - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md
-
false
hostPathobject - hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write.
-
false
iscsiobject - iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md
-
false
nfsobject - nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
-
false
persistentVolumeClaimobject - persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
-
false
photonPersistentDiskobject - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
-
false
portworxVolumeobject - portworxVolume represents a portworx volume attached and mounted on kubelets host machine
-
false
projectedobject - projected items for all in one resources secrets, configmaps, and downward API
-
false
quobyteobject - quobyte represents a Quobyte mount on the host that shares a pod's lifetime
-
false
rbdobject - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md
-
false
scaleIOobject - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
-
false
secretobject - secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
-
false
storageosobject - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
-
false
vsphereVolumeobject - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].awsElasticBlockStore -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
volumeIDstring - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
true
fsTypestring - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine
-
false
partitioninteger - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
-
- Format: int32
-
false
readOnlyboolean - readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].azureDisk -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
diskNamestring - diskName is the Name of the data disk in the blob storage
-
true
diskURIstring - diskURI is the URI of data disk in the blob storage
-
true
cachingModestring - cachingMode is the Host Caching mode: None, Read Only, Read Write.
-
false
fsTypestring - fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
-
false
kindstring - kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared
-
false
readOnlyboolean - readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].azureFile -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -azureFile represents an Azure File Service mount on the host and bind mount to the pod. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
secretNamestring - secretName is the name of secret that contains Azure Storage Account Name and Key
-
true
shareNamestring - shareName is the azure share Name
-
true
readOnlyboolean - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].cephfs -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -cephFS represents a Ceph FS mount on the host that shares a pod's lifetime - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
monitors[]string - monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
-
true
pathstring - path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
-
false
readOnlyboolean - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
-
false
secretFilestring - secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
-
false
secretRefobject - secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
-
false
userstring - user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].cephfs.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexcephfs) - - - -secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].cinder -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
volumeIDstring - volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
-
true
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
-
false
readOnlyboolean - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
-
false
secretRefobject - secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].cinder.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexcinder) - - - -secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].configMap -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -configMap represents a configMap that should populate this volume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
defaultModeinteger - defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
items[]object - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
-
false
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - optional specify whether the ConfigMap or its keys must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].configMap.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexconfigmap) - - - -Maps a string key to a path within a volume. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the key to project.
-
true
pathstring - path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
-
true
modeinteger - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].csi -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
driverstring - driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.
-
true
fsTypestring - fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.
-
false
nodePublishSecretRefobject - nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
-
false
readOnlyboolean - readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).
-
false
volumeAttributesmap[string]string - volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].csi.nodePublishSecretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexcsi) - - - -nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].downwardAPI -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -downwardAPI represents downward API about the pod that should populate this volume - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
defaultModeinteger - Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
items[]object - Items is a list of downward API volume file
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].downwardAPI.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexdownwardapi) - - - -DownwardAPIVolumeFile represents information to create the file containing the pod field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pathstring - Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
-
true
fieldRefobject - Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
-
false
modeinteger - Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
resourceFieldRefobject - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].downwardAPI.items[index].fieldRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexdownwardapiitemsindex) - - - -Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fieldPathstring - Path of the field to select in the specified API version.
-
true
apiVersionstring - Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].downwardAPI.items[index].resourceFieldRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexdownwardapiitemsindex) - - - -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
resourcestring - Required: resource to select
-
true
containerNamestring - Container name: required for volumes, optional for env vars
-
false
divisorint or string - Specifies the output format of the exposed resources, defaults to "1"
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].emptyDir -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
mediumstring - medium represents what type of storage medium should back this directory. The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
-
false
sizeLimitint or string - sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. - Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. - A pod can use both types of ephemeral volumes and persistent volumes at the same time. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
volumeClaimTemplateobject - Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. - Required, must not be nil.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeral) - - - -Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. - Required, must not be nil. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
specobject - The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.
-
true
metadataobject - May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplate) - - - -The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
accessModes[]string - accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
-
false
dataSourceobject - dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
-
false
dataSourceRefobject - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
-
false
resourcesobject - resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
-
false
selectorobject - selector is a label query over volumes to consider for binding.
-
false
storageClassNamestring - storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
-
false
volumeModestring - volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
-
false
volumeNamestring - volumeName is the binding reference to the PersistentVolume backing this claim.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSource -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespec) - - - -dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind is the type of resource being referenced
-
true
namestring - Name is the name of resource being referenced
-
true
apiGroupstring - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.dataSourceRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespec) - - - -dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified. * While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
kindstring - Kind is the type of resource being referenced
-
true
namestring - Name is the name of resource being referenced
-
true
apiGroupstring - APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-
false
namespacestring - Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespec) - - - -resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
-
false
limitsmap[string]int or string - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
requestsmap[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.resources.claims[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespecresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespec) - - - -selector is a label query over volumes to consider for binding. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]object - matchExpressions is a list of label selector requirements. The requirements are ANDed.
-
false
matchLabelsmap[string]string - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.spec.selector.matchExpressions[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplatespecselector) - - - -A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the label key that the selector applies to.
-
true
operatorstring - operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-
true
values[]string - values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].ephemeral.volumeClaimTemplate.metadata -[↩ Parent](#amazoncloudwatchagentspecvolumesindexephemeralvolumeclaimtemplate) - - - -May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
annotationsmap[string]string -
-
false
finalizers[]string -
-
false
labelsmap[string]string -
-
false
namestring -
-
false
namespacestring -
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].fc -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine
-
false
luninteger - lun is Optional: FC target lun number
-
- Format: int32
-
false
readOnlyboolean - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
targetWWNs[]string - targetWWNs is Optional: FC target worldwide names (WWNs)
-
false
wwids[]string - wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].flexVolume -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
driverstring - driver is the name of the driver to use for this volume.
-
true
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
-
false
optionsmap[string]string - options is Optional: this field holds extra command options if any.
-
false
readOnlyboolean - readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
secretRefobject - secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].flexVolume.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexflexvolume) - - - -secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].flocker -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
datasetNamestring - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated
-
false
datasetUUIDstring - datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].gcePersistentDisk -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pdNamestring - pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
-
true
fsTypestring - fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine
-
false
partitioninteger - partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
-
- Format: int32
-
false
readOnlyboolean - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].gitRepo -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
repositorystring - repository is the URL
-
true
directorystring - directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.
-
false
revisionstring - revision is the commit hash for the specified revision.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].glusterfs -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endpointsstring - endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
-
true
pathstring - path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
-
true
readOnlyboolean - readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].hostPath -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pathstring - path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
-
true
typestring - type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].iscsi -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -iscsi represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
iqnstring - iqn is the target iSCSI Qualified Name.
-
true
luninteger - lun represents iSCSI Target Lun number.
-
- Format: int32
-
true
targetPortalstring - targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
-
true
chapAuthDiscoveryboolean - chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
-
false
chapAuthSessionboolean - chapAuthSession defines whether support iSCSI Session CHAP authentication
-
false
fsTypestring - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine
-
false
initiatorNamestring - initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.
-
false
iscsiInterfacestring - iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).
-
false
portals[]string - portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).
-
false
readOnlyboolean - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.
-
false
secretRefobject - secretRef is the CHAP Secret for iSCSI target and initiator authentication
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].iscsi.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexiscsi) - - - -secretRef is the CHAP Secret for iSCSI target and initiator authentication - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].nfs -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -nfs represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pathstring - path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
-
true
serverstring - server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
-
true
readOnlyboolean - readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].persistentVolumeClaim -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
claimNamestring - claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
-
true
readOnlyboolean - readOnly Will force the ReadOnly setting in VolumeMounts. Default false.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].photonPersistentDisk -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pdIDstring - pdID is the ID that identifies Photon Controller persistent disk
-
true
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].portworxVolume -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -portworxVolume represents a portworx volume attached and mounted on kubelets host machine - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
volumeIDstring - volumeID uniquely identifies a Portworx volume
-
true
fsTypestring - fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
-
false
readOnlyboolean - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -projected items for all in one resources secrets, configmaps, and downward API - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
defaultModeinteger - defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
sources[]object - sources is the list of volume projections
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojected) - - - -Projection that may be projected along with other supported volume types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
configMapobject - configMap information about the configMap data to project
-
false
downwardAPIobject - downwardAPI information about the downwardAPI data to project
-
false
secretobject - secret information about the secret data to project
-
false
serviceAccountTokenobject - serviceAccountToken is information about the serviceAccountToken data to project
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].configMap -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindex) - - - -configMap information about the configMap data to project - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object - items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
-
false
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - optional specify whether the ConfigMap or its keys must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].configMap.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindexconfigmap) - - - -Maps a string key to a path within a volume. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the key to project.
-
true
pathstring - path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
-
true
modeinteger - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].downwardAPI -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindex) - - - -downwardAPI information about the downwardAPI data to project - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object - Items is a list of DownwardAPIVolume file
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].downwardAPI.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindexdownwardapi) - - - -DownwardAPIVolumeFile represents information to create the file containing the pod field - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pathstring - Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
-
true
fieldRefobject - Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
-
false
modeinteger - Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
resourceFieldRefobject - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].downwardAPI.items[index].fieldRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindexdownwardapiitemsindex) - - - -Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fieldPathstring - Path of the field to select in the specified API version.
-
true
apiVersionstring - Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].downwardAPI.items[index].resourceFieldRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindexdownwardapiitemsindex) - - - -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
resourcestring - Required: resource to select
-
true
containerNamestring - Container name: required for volumes, optional for env vars
-
false
divisorint or string - Specifies the output format of the exposed resources, defaults to "1"
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].secret -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindex) - - - -secret information about the secret data to project - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
items[]object - items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
-
false
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - optional field specify whether the Secret or its key must be defined
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].secret.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindexsecret) - - - -Maps a string key to a path within a volume. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the key to project.
-
true
pathstring - path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
-
true
modeinteger - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].projected.sources[index].serviceAccountToken -[↩ Parent](#amazoncloudwatchagentspecvolumesindexprojectedsourcesindex) - - - -serviceAccountToken is information about the serviceAccountToken data to project - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
pathstring - path is the path relative to the mount point of the file to project the token into.
-
true
audiencestring - audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.
-
false
expirationSecondsinteger - expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.
-
- Format: int64
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].quobyte -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -quobyte represents a Quobyte mount on the host that shares a pod's lifetime - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
registrystring - registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes
-
true
volumestring - volume is a string that references an already created Quobyte volume by name.
-
true
groupstring - group to map volume access to Default is no group
-
false
readOnlyboolean - readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.
-
false
tenantstring - tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin
-
false
userstring - user to map volume access to Defaults to serivceaccount user
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].rbd -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
imagestring - image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
true
monitors[]string - monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
true
fsTypestring - fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine
-
false
keyringstring - keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
false
poolstring - pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
false
readOnlyboolean - readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
false
secretRefobject - secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
false
userstring - user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].rbd.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexrbd) - - - -secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].scaleIO -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
gatewaystring - gateway is the host address of the ScaleIO API Gateway.
-
true
secretRefobject - secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.
-
true
systemstring - system is the name of the storage system as configured in ScaleIO.
-
true
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".
-
false
protectionDomainstring - protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
-
false
readOnlyboolean - readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
sslEnabledboolean - sslEnabled Flag enable/disable SSL communication with Gateway, default false
-
false
storageModestring - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.
-
false
storagePoolstring - storagePool is the ScaleIO Storage Pool associated with the protection domain.
-
false
volumeNamestring - volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].scaleIO.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexscaleio) - - - -secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].secret -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
defaultModeinteger - defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
items[]object - items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
-
false
optionalboolean - optional field specify whether the Secret or its keys must be defined
-
false
secretNamestring - secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].secret.items[index] -[↩ Parent](#amazoncloudwatchagentspecvolumesindexsecret) - - - -Maps a string key to a path within a volume. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - key is the key to project.
-
true
pathstring - path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.
-
true
modeinteger - mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
-
- Format: int32
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].storageos -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fsTypestring - fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
-
false
readOnlyboolean - readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
-
false
secretRefobject - secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.
-
false
volumeNamestring - volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.
-
false
volumeNamespacestring - volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].storageos.secretRef -[↩ Parent](#amazoncloudwatchagentspecvolumesindexstorageos) - - - -secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
- - -### AmazonCloudWatchAgent.spec.volumes[index].vsphereVolume -[↩ Parent](#amazoncloudwatchagentspecvolumesindex) - - - -vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
volumePathstring - volumePath is the path that identifies vSphere volume vmdk
-
true
fsTypestring - fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
-
false
storagePolicyIDstring - storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
-
false
storagePolicyNamestring - storagePolicyName is the storage Policy Based Management (SPBM) profile name.
-
false
- - -### AmazonCloudWatchAgent.status -[↩ Parent](#amazoncloudwatchagent) - - - -AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
imagestring - Image indicates the container image to use for the CloudWatch Agent.
-
false
messages[]string - Messages about actions performed by the operator on this resource. Deprecated: use Kubernetes events instead.
-
false
replicasinteger - Replicas is currently not being set and might be removed in the next version. Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" instead.
-
- Format: int32
-
false
scaleobject - Scale is the AmazonCloudWatchAgent's scale subresource status.
-
false
versionstring - Version of the managed CloudWatch Agent (operand)
-
false
- - -### AmazonCloudWatchAgent.status.scale -[↩ Parent](#amazoncloudwatchagentstatus) - - - -Scale is the AmazonCloudWatchAgent's scale subresource status. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
replicasinteger - The total number non-terminated pods targeted by this AmazonCloudWatchAgent's deployment or statefulSet.
-
- Format: int32
-
false
selectorstring - The selector used to match the AmazonCloudWatchAgent's deployment or statefulSet pods.
-
false
statusReplicasstring - StatusReplicas is the number of pods targeted by this AmazonCloudWatchAgent's with a Ready Condition / Total number of non-terminated pods targeted by this AmazonCloudWatchAgent's (their labels match the selector). Deployment, Daemonset, StatefulSet.
-
false
- -## Instrumentation -[↩ Parent](#cloudwatchawsamazoncomv1alpha1 ) - - - - - - -Instrumentation is the spec for OpenTelemetry instrumentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
apiVersionstringcloudwatch.aws.amazon.com/v1alpha1true
kindstringInstrumentationtrue
metadataobjectRefer to the Kubernetes API documentation for the fields of the `metadata` field.true
specobject - InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation.
-
false
statusobject - InstrumentationStatus defines status of the instrumentation.
-
false
- - -### Instrumentation.spec -[↩ Parent](#instrumentation) - - - -InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
env[]object - Env defines common env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
-
false
exporterobject - Exporter defines exporter configuration.
-
false
javaobject - Java defines configuration for java auto-instrumentation.
-
false
propagators[]enum - Propagators defines inter-process context propagation configuration. Values in this list will be set in the OTEL_PROPAGATORS env var. Enum=tracecontext;baggage;b3;b3multi;jaeger;xray;ottrace;none
-
false
resourceobject - Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
-
false
samplerobject - Sampler defines sampling configuration.
-
false
- - -### Instrumentation.spec.env[index] -[↩ Parent](#instrumentationspec) - - - -EnvVar represents an environment variable present in a Container. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the environment variable. Must be a C_IDENTIFIER.
-
true
valuestring - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
-
false
valueFromobject - Source for the environment variable's value. Cannot be used if value is not empty.
-
false
- - -### Instrumentation.spec.env[index].valueFrom -[↩ Parent](#instrumentationspecenvindex) - - - -Source for the environment variable's value. Cannot be used if value is not empty. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
configMapKeyRefobject - Selects a key of a ConfigMap.
-
false
fieldRefobject - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
-
false
resourceFieldRefobject - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
-
false
secretKeyRefobject - Selects a key of a secret in the pod's namespace
-
false
- - -### Instrumentation.spec.env[index].valueFrom.configMapKeyRef -[↩ Parent](#instrumentationspecenvindexvaluefrom) - - - -Selects a key of a ConfigMap. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key to select.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the ConfigMap or its key must be defined
-
false
- - -### Instrumentation.spec.env[index].valueFrom.fieldRef -[↩ Parent](#instrumentationspecenvindexvaluefrom) - - - -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fieldPathstring - Path of the field to select in the specified API version.
-
true
apiVersionstring - Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
false
- - -### Instrumentation.spec.env[index].valueFrom.resourceFieldRef -[↩ Parent](#instrumentationspecenvindexvaluefrom) - - - -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
resourcestring - Required: resource to select
-
true
containerNamestring - Container name: required for volumes, optional for env vars
-
false
divisorint or string - Specifies the output format of the exposed resources, defaults to "1"
-
false
- - -### Instrumentation.spec.env[index].valueFrom.secretKeyRef -[↩ Parent](#instrumentationspecenvindexvaluefrom) - - - -Selects a key of a secret in the pod's namespace - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key of the secret to select from. Must be a valid secret key.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the Secret or its key must be defined
-
false
- - -### Instrumentation.spec.exporter -[↩ Parent](#instrumentationspec) - - - -Exporter defines exporter configuration. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
endpointstring - Endpoint is address of the collector with OTLP endpoint.
-
false
- - -### Instrumentation.spec.java -[↩ Parent](#instrumentationspec) - - - -Java defines configuration for java auto-instrumentation. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
env[]object - Env defines java specific env vars. There are four layers for env vars' definitions and the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`. If the former var had been defined, then the other vars would be ignored.
-
false
imagestring - Image is a container image with javaagent auto-instrumentation JAR.
-
false
resourcesobject - Resources describes the compute resource requirements.
-
false
- - -### Instrumentation.spec.java.env[index] -[↩ Parent](#instrumentationspecjava) - - - -EnvVar represents an environment variable present in a Container. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name of the environment variable. Must be a C_IDENTIFIER.
-
true
valuestring - Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".
-
false
valueFromobject - Source for the environment variable's value. Cannot be used if value is not empty.
-
false
- - -### Instrumentation.spec.java.env[index].valueFrom -[↩ Parent](#instrumentationspecjavaenvindex) - - - -Source for the environment variable's value. Cannot be used if value is not empty. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
configMapKeyRefobject - Selects a key of a ConfigMap.
-
false
fieldRefobject - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
-
false
resourceFieldRefobject - Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
-
false
secretKeyRefobject - Selects a key of a secret in the pod's namespace
-
false
- - -### Instrumentation.spec.java.env[index].valueFrom.configMapKeyRef -[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) - - - -Selects a key of a ConfigMap. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key to select.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the ConfigMap or its key must be defined
-
false
- - -### Instrumentation.spec.java.env[index].valueFrom.fieldRef -[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) - - - -Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
fieldPathstring - Path of the field to select in the specified API version.
-
true
apiVersionstring - Version of the schema the FieldPath is written in terms of, defaults to "v1".
-
false
- - -### Instrumentation.spec.java.env[index].valueFrom.resourceFieldRef -[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) - - - -Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
resourcestring - Required: resource to select
-
true
containerNamestring - Container name: required for volumes, optional for env vars
-
false
divisorint or string - Specifies the output format of the exposed resources, defaults to "1"
-
false
- - -### Instrumentation.spec.java.env[index].valueFrom.secretKeyRef -[↩ Parent](#instrumentationspecjavaenvindexvaluefrom) - - - -Selects a key of a secret in the pod's namespace - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
keystring - The key of the secret to select from. Must be a valid secret key.
-
true
namestring - Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?
-
false
optionalboolean - Specify whether the Secret or its key must be defined
-
false
- - -### Instrumentation.spec.java.resources -[↩ Parent](#instrumentationspecjava) - - - -Resources describes the compute resource requirements. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
claims[]object - Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers.
-
false
limitsmap[string]int or string - Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
requestsmap[string]int or string - Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
-
false
- - -### Instrumentation.spec.java.resources.claims[index] -[↩ Parent](#instrumentationspecjavaresources) - - - -ResourceClaim references one entry in PodSpec.ResourceClaims. - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
namestring - Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
-
true
- - -### Instrumentation.spec.resource -[↩ Parent](#instrumentationspec) - - - -Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
addK8sUIDAttributesboolean - AddK8sUIDAttributes defines whether K8s UID attributes should be collected (e.g. k8s.deployment.uid).
-
false
resourceAttributesmap[string]string - Attributes defines attributes that are added to the resource. For example environment: dev
-
false
- - -### Instrumentation.spec.sampler -[↩ Parent](#instrumentationspec) - - - -Sampler defines sampling configuration. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
argumentstring - Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio sampler type it is a number in range [0..1] e.g. 0.25. The value will be set in the OTEL_TRACES_SAMPLER_ARG env var.
-
false
typeenum - Type defines sampler type. The value will be set in the OTEL_TRACES_SAMPLER env var. The value can be for instance parentbased_always_on, parentbased_always_off, parentbased_traceidratio...
-
- Enum: always_on, always_off, traceidratio, parentbased_always_on, parentbased_always_off, parentbased_traceidratio, jaeger_remote, xray
-
false
\ No newline at end of file diff --git a/integration-tests/manifests/cmd/validate_instrumentation_vars.go b/integration-tests/manifests/cmd/validate_instrumentation_vars.go index b7689a851..979e8c462 100644 --- a/integration-tests/manifests/cmd/validate_instrumentation_vars.go +++ b/integration-tests/manifests/cmd/validate_instrumentation_vars.go @@ -26,20 +26,20 @@ func main() { userHomeDir, err := os.UserHomeDir() if err != nil { - fmt.Println("error getting user home dir: %v\n", err) + fmt.Printf("error getting user home dir: %v\n\n", err) } kubeConfigPath := filepath.Join(userHomeDir, ".kube", "config") - fmt.Println("Using kubeconfig: %s\n", kubeConfigPath) + fmt.Printf("Using kubeconfig: %s\n\n", kubeConfigPath) kubeConfig, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) if err != nil { - fmt.Println("Error getting kubernetes config: %v\n", err) + fmt.Printf("Error getting kubernetes config: %v\n\n", err) } clientSet, err := kubernetes.NewForConfig(kubeConfig) if err != nil { - fmt.Println("error getting kubernetes config: %v\n", err) + fmt.Printf("error getting kubernetes config: %v\n\n", err) } success := verifyInstrumentationEnvVariables(clientSet, namespace, jsonFilePath) diff --git a/main.go b/main.go index e864ee7c7..240f5c503 100644 --- a/main.go +++ b/main.go @@ -115,8 +115,8 @@ func main() { pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") - stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") - stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("ghcr.io/aws/amazon-cloudwatch-agent-operator/autoinstrumentation-java:%s", v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("%s:%s", autoInstrumentationJavaImageRepository, v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() // set java instrumentation java image in environment variable to be used for default instrumentation diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index 4653a6e9f..d2cd265f4 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -397,7 +397,8 @@ func (pm *instPodMutator) selectInstrumentationInstanceFromNamespace(ctx context switch s := len(otelInsts.Items); { case s == 0: - return nil, errNoInstancesAvailable + pm.Logger.Info("no OpenTelemetry Instrumentation instances available. Using default Instrumentation instance") + return getDefaultInstrumentation() case s > 1: return nil, errMultipleInstancesPossible default: diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 8429dd580..75dc95d70 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -17,6 +17,7 @@ package instrumentation import ( "context" "fmt" + "os" "testing" "github.com/go-logr/logr" @@ -26,11 +27,33 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" + "sigs.k8s.io/controller-runtime/pkg/client/fake" "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) +func TestGetInstrumentationInstanceFromNameSpaceDefault(t *testing.T) { + namespace := corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default-namespace", + }, + } + if err := v1alpha1.AddToScheme(testScheme); err != nil { + fmt.Printf("failed to register scheme: %v", err) + os.Exit(1) + } + podMutator := instPodMutator{ + Client: fake.NewClientBuilder().Build(), + Logger: logr.Logger{}, + } + instrumentation, err := podMutator.selectInstrumentationInstanceFromNamespace(context.Background(), namespace) + + assert.Nil(t, err) + assert.Equal(t, defaultInst, instrumentation) + +} + func TestMutatePod(t *testing.T) { mutator := NewMutator(logr.Discard(), k8sClient, record.NewFakeRecorder(100)) require.NotNil(t, mutator) From 11236a161c924cd1378bb6947d136e041b5ef4d3 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 2 Jan 2024 15:05:22 -0500 Subject: [PATCH 1215/1234] Add license --- apis/v1alpha1/allocation_strategy.go | 15 ++------------- apis/v1alpha1/collector_webhook.go | 15 ++------------- apis/v1alpha1/collector_webhook_test.go | 15 ++------------- apis/v1alpha1/ingress_type.go | 15 ++------------- apis/v1alpha1/instrumentation_types.go | 15 ++------------- apis/v1alpha1/instrumentation_webhook.go | 15 ++------------- apis/v1alpha1/instrumentation_webhook_test.go | 15 ++------------- apis/v1alpha1/mode.go | 15 ++------------- apis/v1alpha1/opampbridge_capabilities.go | 15 ++------------- apis/v1alpha1/opampbridge_types.go | 15 ++------------- apis/v1alpha1/opampbridge_webhook.go | 15 ++------------- apis/v1alpha1/opampbridge_webhook_test.go | 15 ++------------- apis/v1alpha1/opentelemetrycollector_types.go | 15 ++------------- apis/v1alpha1/propagators.go | 15 ++------------- apis/v1alpha1/samplers.go | 15 ++------------- apis/v1alpha1/upgrade_strategy.go | 15 ++------------- apis/v1alpha2/groupversion_info.go | 15 ++------------- apis/v1alpha2/instrumentation_types.go | 15 ++------------- apis/v1alpha2/opentelemetrycollector_types.go | 15 ++------------- controllers/builder_test.go | 15 ++------------- controllers/common.go | 15 ++------------- controllers/opampbridge_controller.go | 15 ++------------- controllers/opampbridge_controller_test.go | 15 ++------------- controllers/opentelemetrycollector_controller.go | 15 ++------------- controllers/reconcile_test.go | 15 ++------------- controllers/suite_test.go | 15 ++------------- internal/autodetect/main.go | 15 ++------------- internal/autodetect/main_test.go | 15 ++------------- internal/autodetect/openshift/routes.go | 15 ++------------- internal/config/main.go | 15 ++------------- internal/config/main_test.go | 15 ++------------- internal/config/options.go | 15 ++------------- internal/manifests/builder.go | 15 ++------------- .../manifests/collector/adapters/config_from.go | 15 ++------------- .../collector/adapters/config_from_test.go | 15 ++------------- .../collector/adapters/config_to_ports.go | 15 ++------------- .../collector/adapters/config_to_ports_test.go | 15 ++------------- .../collector/adapters/config_to_probe.go | 15 ++------------- .../collector/adapters/config_to_probe_test.go | 15 ++------------- .../collector/adapters/config_validate.go | 15 ++------------- .../collector/adapters/config_validate_test.go | 15 ++------------- internal/manifests/collector/annotations.go | 15 ++------------- internal/manifests/collector/annotations_test.go | 15 ++------------- internal/manifests/collector/collector.go | 15 ++------------- internal/manifests/collector/config_replace.go | 15 ++------------- .../manifests/collector/config_replace_test.go | 15 ++------------- internal/manifests/collector/configmap.go | 15 ++------------- internal/manifests/collector/configmap_test.go | 15 ++------------- internal/manifests/collector/container.go | 15 ++------------- internal/manifests/collector/container_test.go | 15 ++------------- internal/manifests/collector/daemonset.go | 15 ++------------- internal/manifests/collector/daemonset_test.go | 15 ++------------- internal/manifests/collector/deployment.go | 15 ++------------- internal/manifests/collector/deployment_test.go | 15 ++------------- .../collector/horizontalpodautoscaler.go | 15 ++------------- .../collector/horizontalpodautoscaler_test.go | 15 ++------------- internal/manifests/collector/ingress.go | 15 ++------------- internal/manifests/collector/ingress_test.go | 15 ++------------- .../collector/parser/exporter/exporter.go | 15 ++------------- .../parser/exporter/exporter_prometheus.go | 15 ++------------- internal/manifests/collector/parser/parser.go | 15 ++------------- .../collector/parser/receiver/receiver.go | 15 ++------------- .../parser/receiver/receiver_aws-xray.go | 15 ++------------- .../parser/receiver/receiver_aws-xray_test.go | 15 ++------------- .../collector/parser/receiver/receiver_carbon.go | 15 ++------------- .../parser/receiver/receiver_carbon_test.go | 15 ++------------- .../parser/receiver/receiver_collectd.go | 15 ++------------- .../parser/receiver/receiver_collectd_test.go | 15 ++------------- .../parser/receiver/receiver_fluent-forward.go | 15 ++------------- .../receiver/receiver_fluent-forward_test.go | 15 ++------------- .../collector/parser/receiver/receiver_generic.go | 15 ++------------- .../parser/receiver/receiver_generic_test.go | 15 ++------------- .../parser/receiver/receiver_influxdb.go | 15 ++------------- .../parser/receiver/receiver_influxdb_test.go | 15 ++------------- .../collector/parser/receiver/receiver_jaeger.go | 15 ++------------- .../parser/receiver/receiver_jaeger_test.go | 15 ++------------- .../collector/parser/receiver/receiver_loki.go | 15 ++------------- .../parser/receiver/receiver_loki_test.go | 15 ++------------- .../collector/parser/receiver/receiver_oc.go | 15 ++------------- .../collector/parser/receiver/receiver_oc_test.go | 15 ++------------- .../collector/parser/receiver/receiver_otlp.go | 15 ++------------- .../parser/receiver/receiver_otlp_test.go | 15 ++------------- .../collector/parser/receiver/receiver_sapm.go | 15 ++------------- .../parser/receiver/receiver_sapm_test.go | 15 ++------------- .../parser/receiver/receiver_signalfx.go | 15 ++------------- .../parser/receiver/receiver_signalfx_test.go | 15 ++------------- .../parser/receiver/receiver_skywalking.go | 15 ++------------- .../parser/receiver/receiver_skywalking_test.go | 15 ++------------- .../parser/receiver/receiver_splunk-hec.go | 15 ++------------- .../parser/receiver/receiver_splunk-hec_test.go | 15 ++------------- .../collector/parser/receiver/receiver_statsd.go | 15 ++------------- .../parser/receiver/receiver_statsd_test.go | 15 ++------------- .../collector/parser/receiver/receiver_test.go | 15 ++------------- .../parser/receiver/receiver_wavefront.go | 15 ++------------- .../parser/receiver/receiver_wavefront_test.go | 15 ++------------- .../parser/receiver/receiver_zipkin-scribe.go | 15 ++------------- .../receiver/receiver_zipkin-scribe_test.go | 15 ++------------- .../collector/parser/receiver/receiver_zipkin.go | 15 ++------------- .../parser/receiver/receiver_zipkin_test.go | 15 ++------------- .../manifests/collector/poddisruptionbudget.go | 15 ++------------- .../collector/poddisruptionbudget_test.go | 15 ++------------- internal/manifests/collector/podmonitor.go | 15 ++------------- internal/manifests/collector/podmonitor_test.go | 15 ++------------- internal/manifests/collector/route.go | 15 ++------------- internal/manifests/collector/route_test.go | 15 ++------------- internal/manifests/collector/service.go | 15 ++------------- internal/manifests/collector/service_test.go | 15 ++------------- internal/manifests/collector/serviceaccount.go | 15 ++------------- .../manifests/collector/serviceaccount_test.go | 15 ++------------- internal/manifests/collector/servicemonitor.go | 15 ++------------- .../manifests/collector/servicemonitor_test.go | 15 ++------------- internal/manifests/collector/statefulset.go | 15 ++------------- internal/manifests/collector/statefulset_test.go | 15 ++------------- internal/manifests/collector/suite_test.go | 15 ++------------- .../manifests/collector/testdata/route_crd.go | 15 ++------------- internal/manifests/collector/utils.go | 15 ++------------- internal/manifests/collector/volume.go | 15 ++------------- internal/manifests/collector/volume_test.go | 15 ++------------- internal/manifests/collector/volumeclaim.go | 15 ++------------- internal/manifests/collector/volumeclaim_test.go | 15 ++------------- internal/manifests/manifestutils/labels.go | 15 ++------------- internal/manifests/manifestutils/labels_test.go | 15 ++------------- internal/manifests/mutate.go | 15 ++------------- internal/manifests/opampbridge/configmap.go | 15 ++------------- internal/manifests/opampbridge/configmap_test.go | 15 ++------------- internal/manifests/opampbridge/container.go | 15 ++------------- internal/manifests/opampbridge/container_test.go | 15 ++------------- internal/manifests/opampbridge/deployment.go | 15 ++------------- internal/manifests/opampbridge/deployment_test.go | 15 ++------------- internal/manifests/opampbridge/opampbridge.go | 15 ++------------- internal/manifests/opampbridge/service.go | 15 ++------------- internal/manifests/opampbridge/serviceaccount.go | 15 ++------------- .../manifests/opampbridge/serviceaccount_test.go | 15 ++------------- internal/manifests/opampbridge/utils.go | 15 ++------------- internal/manifests/opampbridge/volume.go | 15 ++------------- internal/manifests/opampbridge/volume_test.go | 15 ++------------- internal/manifests/params.go | 15 ++------------- .../adapters/config_to_prom_config.go | 15 ++------------- .../adapters/config_to_prom_config_test.go | 15 ++------------- internal/manifests/targetallocator/annotations.go | 15 ++------------- .../manifests/targetallocator/annotations_test.go | 15 ++------------- internal/manifests/targetallocator/configmap.go | 15 ++------------- .../manifests/targetallocator/configmap_test.go | 15 ++------------- internal/manifests/targetallocator/container.go | 15 ++------------- .../manifests/targetallocator/container_test.go | 15 ++------------- internal/manifests/targetallocator/deployment.go | 15 ++------------- .../manifests/targetallocator/deployment_test.go | 15 ++------------- internal/manifests/targetallocator/labels.go | 15 ++------------- internal/manifests/targetallocator/labels_test.go | 15 ++------------- .../targetallocator/poddisruptionbudget.go | 15 ++------------- .../targetallocator/poddisruptionbudget_test.go | 15 ++------------- internal/manifests/targetallocator/service.go | 15 ++------------- .../manifests/targetallocator/service_test.go | 15 ++------------- .../manifests/targetallocator/serviceaccount.go | 15 ++------------- .../targetallocator/serviceaccount_test.go | 15 ++------------- .../manifests/targetallocator/servicemonitor.go | 15 ++------------- .../targetallocator/servicemonitor_test.go | 15 ++------------- .../manifests/targetallocator/targetallocator.go | 15 ++------------- internal/manifests/targetallocator/volume.go | 15 ++------------- internal/manifests/targetallocator/volume_test.go | 15 ++------------- internal/naming/dns.go | 15 ++------------- internal/naming/dns_test.go | 15 ++------------- internal/naming/main.go | 15 ++------------- internal/naming/port.go | 15 ++------------- internal/naming/port_test.go | 15 ++------------- internal/naming/triming.go | 15 ++------------- internal/naming/triming_test.go | 15 ++------------- internal/status/collector/collector.go | 15 ++------------- internal/status/collector/handle.go | 15 ++------------- internal/status/opampbridge/handle.go | 15 ++------------- internal/status/opampbridge/opampbridge.go | 15 ++------------- internal/version/main.go | 15 ++------------- internal/version/main_test.go | 15 ++------------- internal/webhook/podmutation/webhookhandler.go | 15 ++------------- .../podmutation/webhookhandler_suite_test.go | 15 ++------------- .../webhook/podmutation/webhookhandler_test.go | 15 ++------------- pkg/collector/upgrade/noop.go | 15 ++------------- pkg/collector/upgrade/suite_test.go | 15 ++------------- pkg/collector/upgrade/upgrade.go | 15 ++------------- pkg/collector/upgrade/upgrade_test.go | 15 ++------------- pkg/collector/upgrade/v0_15_0.go | 15 ++------------- pkg/collector/upgrade/v0_15_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_19_0.go | 15 ++------------- pkg/collector/upgrade/v0_19_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_24_0.go | 15 ++------------- pkg/collector/upgrade/v0_24_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_2_10.go | 15 ++------------- pkg/collector/upgrade/v0_31_0.go | 15 ++------------- pkg/collector/upgrade/v0_31_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_36_0.go | 15 ++------------- pkg/collector/upgrade/v0_36_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_38_0.go | 15 ++------------- pkg/collector/upgrade/v0_38_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_39_0.go | 15 ++------------- pkg/collector/upgrade/v0_39_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_41_0.go | 15 ++------------- pkg/collector/upgrade/v0_41_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_43_0.go | 15 ++------------- pkg/collector/upgrade/v0_43_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_56_0.go | 15 ++------------- pkg/collector/upgrade/v0_56_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_57_2.go | 15 ++------------- pkg/collector/upgrade/v0_57_2_test.go | 15 ++------------- pkg/collector/upgrade/v0_61_0.go | 15 ++------------- pkg/collector/upgrade/v0_61_0_test.go | 15 ++------------- pkg/collector/upgrade/v0_9_0.go | 15 ++------------- pkg/collector/upgrade/v0_9_0_test.go | 15 ++------------- pkg/collector/upgrade/versions.go | 15 ++------------- pkg/constants/env.go | 15 ++------------- pkg/featuregate/featuregate.go | 15 ++------------- pkg/featuregate/featuregate_test.go | 15 ++------------- pkg/instrumentation/annotation.go | 15 ++------------- pkg/instrumentation/annotation_test.go | 15 ++------------- pkg/instrumentation/apachehttpd.go | 15 ++------------- pkg/instrumentation/apachehttpd_test.go | 15 ++------------- pkg/instrumentation/dotnet.go | 15 ++------------- pkg/instrumentation/dotnet_test.go | 15 ++------------- pkg/instrumentation/golang.go | 15 ++------------- pkg/instrumentation/golang_test.go | 15 ++------------- pkg/instrumentation/helper.go | 15 ++------------- pkg/instrumentation/helper_test.go | 15 ++------------- pkg/instrumentation/instrumentation_suite_test.go | 15 ++------------- pkg/instrumentation/javaagent.go | 15 ++------------- pkg/instrumentation/javaagent_test.go | 15 ++------------- pkg/instrumentation/nginx.go | 15 ++------------- pkg/instrumentation/nginx_test.go | 15 ++------------- pkg/instrumentation/nodejs.go | 15 ++------------- pkg/instrumentation/nodejs_test.go | 15 ++------------- pkg/instrumentation/podmutator.go | 15 ++------------- pkg/instrumentation/podmutator_test.go | 15 ++------------- pkg/instrumentation/python.go | 15 ++------------- pkg/instrumentation/python_test.go | 15 ++------------- pkg/instrumentation/sdk.go | 15 ++------------- pkg/instrumentation/sdk_test.go | 15 ++------------- pkg/instrumentation/upgrade/upgrade.go | 15 ++------------- pkg/instrumentation/upgrade/upgrade_suite_test.go | 15 ++------------- pkg/instrumentation/upgrade/upgrade_test.go | 15 ++------------- pkg/sidecar/annotation.go | 15 ++------------- pkg/sidecar/annotation_test.go | 15 ++------------- pkg/sidecar/attributes.go | 15 ++------------- pkg/sidecar/attributes_test.go | 15 ++------------- pkg/sidecar/pod.go | 15 ++------------- pkg/sidecar/pod_test.go | 15 ++------------- pkg/sidecar/podmutator.go | 15 ++------------- 244 files changed, 488 insertions(+), 3172 deletions(-) diff --git a/apis/v1alpha1/allocation_strategy.go b/apis/v1alpha1/allocation_strategy.go index 49c794517..36fa771de 100644 --- a/apis/v1alpha1/allocation_strategy.go +++ b/apis/v1alpha1/allocation_strategy.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 5ec36b73a..4afa2e1c4 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index 3815973a7..46f2a1c7c 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/ingress_type.go b/apis/v1alpha1/ingress_type.go index 63ff85884..e4fcfb1b5 100644 --- a/apis/v1alpha1/ingress_type.go +++ b/apis/v1alpha1/ingress_type.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/instrumentation_types.go b/apis/v1alpha1/instrumentation_types.go index 0f3abf420..c206a9563 100644 --- a/apis/v1alpha1/instrumentation_types.go +++ b/apis/v1alpha1/instrumentation_types.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 61a80688c..3cf40b57b 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/instrumentation_webhook_test.go b/apis/v1alpha1/instrumentation_webhook_test.go index a236c24bd..8b3f98372 100644 --- a/apis/v1alpha1/instrumentation_webhook_test.go +++ b/apis/v1alpha1/instrumentation_webhook_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/mode.go b/apis/v1alpha1/mode.go index 37747e73f..675068811 100644 --- a/apis/v1alpha1/mode.go +++ b/apis/v1alpha1/mode.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/opampbridge_capabilities.go b/apis/v1alpha1/opampbridge_capabilities.go index 607656a44..f4e69af2b 100644 --- a/apis/v1alpha1/opampbridge_capabilities.go +++ b/apis/v1alpha1/opampbridge_capabilities.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/opampbridge_types.go b/apis/v1alpha1/opampbridge_types.go index 0479b1019..97e11a03f 100644 --- a/apis/v1alpha1/opampbridge_types.go +++ b/apis/v1alpha1/opampbridge_types.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go index 31bf5866f..82eccd8e1 100644 --- a/apis/v1alpha1/opampbridge_webhook.go +++ b/apis/v1alpha1/opampbridge_webhook.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go index dceab4157..89ee2abb0 100644 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 84ae2b543..566ec0701 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/propagators.go b/apis/v1alpha1/propagators.go index 07f005ecb..7c9daee6b 100644 --- a/apis/v1alpha1/propagators.go +++ b/apis/v1alpha1/propagators.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/samplers.go b/apis/v1alpha1/samplers.go index ff0d23e10..362608ad4 100644 --- a/apis/v1alpha1/samplers.go +++ b/apis/v1alpha1/samplers.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha1/upgrade_strategy.go b/apis/v1alpha1/upgrade_strategy.go index 95e16f121..d7dc8015f 100644 --- a/apis/v1alpha1/upgrade_strategy.go +++ b/apis/v1alpha1/upgrade_strategy.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package v1alpha1 diff --git a/apis/v1alpha2/groupversion_info.go b/apis/v1alpha2/groupversion_info.go index 4a5c2ac8c..db8159bc3 100644 --- a/apis/v1alpha2/groupversion_info.go +++ b/apis/v1alpha2/groupversion_info.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package v1alpha2 contains API Schema definitions for the v1alpha2 API group // +kubebuilder:object:generate=true diff --git a/apis/v1alpha2/instrumentation_types.go b/apis/v1alpha2/instrumentation_types.go index 10ce8b94a..ee7f0531a 100644 --- a/apis/v1alpha2/instrumentation_types.go +++ b/apis/v1alpha2/instrumentation_types.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // +kubebuilder:skip diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/opentelemetrycollector_types.go index ae247d03a..ab06efbf7 100644 --- a/apis/v1alpha2/opentelemetrycollector_types.go +++ b/apis/v1alpha2/opentelemetrycollector_types.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // +kubebuilder:skip diff --git a/controllers/builder_test.go b/controllers/builder_test.go index 1fec609f6..e28a86de8 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/common.go b/controllers/common.go index 4b3c42bc6..92248a0b1 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/opampbridge_controller.go b/controllers/opampbridge_controller.go index 854441d34..29550ac34 100644 --- a/controllers/opampbridge_controller.go +++ b/controllers/opampbridge_controller.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go index 76fb7baaa..2fd73d968 100644 --- a/controllers/opampbridge_controller_test.go +++ b/controllers/opampbridge_controller_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers_test diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 041166c0a..17de024c9 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package controllers contains the main controller, where the reconciliation starts. package controllers diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 543e4eb4c..1cc7ce71d 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers_test diff --git a/controllers/suite_test.go b/controllers/suite_test.go index c7dea30d1..651439bcd 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package controllers_test diff --git a/internal/autodetect/main.go b/internal/autodetect/main.go index e0c36bb93..df88dd691 100644 --- a/internal/autodetect/main.go +++ b/internal/autodetect/main.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...). package autodetect diff --git a/internal/autodetect/main_test.go b/internal/autodetect/main_test.go index 048f7b29d..9324171e1 100644 --- a/internal/autodetect/main_test.go +++ b/internal/autodetect/main_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package autodetect_test diff --git a/internal/autodetect/openshift/routes.go b/internal/autodetect/openshift/routes.go index 1872b9ba1..6df728f22 100644 --- a/internal/autodetect/openshift/routes.go +++ b/internal/autodetect/openshift/routes.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package openshift diff --git a/internal/config/main.go b/internal/config/main.go index c0100333c..a16f165f4 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package config contains the operator's runtime configuration. package config diff --git a/internal/config/main_test.go b/internal/config/main_test.go index c387de968..a4991752c 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package config_test diff --git a/internal/config/options.go b/internal/config/options.go index 9b8f678c2..97f2c077e 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/manifests/builder.go b/internal/manifests/builder.go index 88a47ed27..550516979 100644 --- a/internal/manifests/builder.go +++ b/internal/manifests/builder.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package manifests diff --git a/internal/manifests/collector/adapters/config_from.go b/internal/manifests/collector/adapters/config_from.go index 0f9883ce2..110ebf3c1 100644 --- a/internal/manifests/collector/adapters/config_from.go +++ b/internal/manifests/collector/adapters/config_from.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package adapters is for data conversion. package adapters diff --git a/internal/manifests/collector/adapters/config_from_test.go b/internal/manifests/collector/adapters/config_from_test.go index 26c23d87c..fb08fdc33 100644 --- a/internal/manifests/collector/adapters/config_from_test.go +++ b/internal/manifests/collector/adapters/config_from_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters_test diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index d8540247e..418e57b4d 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/collector/adapters/config_to_ports_test.go b/internal/manifests/collector/adapters/config_to_ports_test.go index 4db9d987d..ba134acd7 100644 --- a/internal/manifests/collector/adapters/config_to_ports_test.go +++ b/internal/manifests/collector/adapters/config_to_ports_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters_test diff --git a/internal/manifests/collector/adapters/config_to_probe.go b/internal/manifests/collector/adapters/config_to_probe.go index 897b7db06..1396bca6d 100644 --- a/internal/manifests/collector/adapters/config_to_probe.go +++ b/internal/manifests/collector/adapters/config_to_probe.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/collector/adapters/config_to_probe_test.go b/internal/manifests/collector/adapters/config_to_probe_test.go index 89e1f9734..6d59de7b1 100644 --- a/internal/manifests/collector/adapters/config_to_probe_test.go +++ b/internal/manifests/collector/adapters/config_to_probe_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/collector/adapters/config_validate.go b/internal/manifests/collector/adapters/config_validate.go index 8283702cf..c1bcb1015 100644 --- a/internal/manifests/collector/adapters/config_validate.go +++ b/internal/manifests/collector/adapters/config_validate.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/collector/adapters/config_validate_test.go b/internal/manifests/collector/adapters/config_validate_test.go index 7003235fe..78dc3244c 100644 --- a/internal/manifests/collector/adapters/config_validate_test.go +++ b/internal/manifests/collector/adapters/config_validate_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/collector/annotations.go b/internal/manifests/collector/annotations.go index 9e651de3a..c82ae39d4 100644 --- a/internal/manifests/collector/annotations.go +++ b/internal/manifests/collector/annotations.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/annotations_test.go b/internal/manifests/collector/annotations_test.go index 1cfcf6694..d91a9d188 100644 --- a/internal/manifests/collector/annotations_test.go +++ b/internal/manifests/collector/annotations_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index 047195a1c..a40e35084 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/config_replace.go b/internal/manifests/collector/config_replace.go index 4ce58c39a..4a05de6bf 100644 --- a/internal/manifests/collector/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/config_replace_test.go b/internal/manifests/collector/config_replace_test.go index e551d4150..7adad992e 100644 --- a/internal/manifests/collector/config_replace_test.go +++ b/internal/manifests/collector/config_replace_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 523f5ebf5..0144bf1c4 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 072bf7004..460440f41 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 11c5094d2..4394b6082 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index f2cb33b25..c12a500ad 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index c6c1ad853..a9ed5e3f5 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index 84cd57cd7..8039ecfeb 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index d5e5f2593..38d2c5918 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go index 9b2150a8a..de7058007 100644 --- a/internal/manifests/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index 5f51b509a..2d24bc3ca 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go index 7adcd5d03..0aba2889d 100644 --- a/internal/manifests/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index e22c04aed..f5111d774 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index a8ce01a3b..9dc1b31ec 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/parser/exporter/exporter.go b/internal/manifests/collector/parser/exporter/exporter.go index 0b7d26842..1c7918d45 100644 --- a/internal/manifests/collector/parser/exporter/exporter.go +++ b/internal/manifests/collector/parser/exporter/exporter.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package parser is for parsing the OpenTelemetry Collector configuration. package exporter diff --git a/internal/manifests/collector/parser/exporter/exporter_prometheus.go b/internal/manifests/collector/parser/exporter/exporter_prometheus.go index 02a0cdd9d..8b45e4ba0 100644 --- a/internal/manifests/collector/parser/exporter/exporter_prometheus.go +++ b/internal/manifests/collector/parser/exporter/exporter_prometheus.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package exporter diff --git a/internal/manifests/collector/parser/parser.go b/internal/manifests/collector/parser/parser.go index 62de283b1..73333bbb1 100644 --- a/internal/manifests/collector/parser/parser.go +++ b/internal/manifests/collector/parser/parser.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package parser diff --git a/internal/manifests/collector/parser/receiver/receiver.go b/internal/manifests/collector/parser/receiver/receiver.go index 4990f2ea4..9b7d1e86a 100644 --- a/internal/manifests/collector/parser/receiver/receiver.go +++ b/internal/manifests/collector/parser/receiver/receiver.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package parser is for parsing the OpenTelemetry Collector configuration. package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go index abe0c6798..41c73148a 100644 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go index 5a99f9e89..ed8c9ec7b 100644 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon.go b/internal/manifests/collector/parser/receiver/receiver_carbon.go index 8e2d8f8a8..e6b62da27 100644 --- a/internal/manifests/collector/parser/receiver/receiver_carbon.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon_test.go b/internal/manifests/collector/parser/receiver/receiver_carbon_test.go index 370732182..f2663d1a2 100644 --- a/internal/manifests/collector/parser/receiver/receiver_carbon_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_carbon_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd.go b/internal/manifests/collector/parser/receiver/receiver_collectd.go index d7ac3ab73..f102fb8cd 100644 --- a/internal/manifests/collector/parser/receiver/receiver_collectd.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd_test.go b/internal/manifests/collector/parser/receiver/receiver_collectd_test.go index 5e0e6d012..9c6000855 100644 --- a/internal/manifests/collector/parser/receiver/receiver_collectd_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_collectd_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go index 4c17a0c54..ba6f4d94e 100644 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go index af1500698..ab4786ad1 100644 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_generic.go b/internal/manifests/collector/parser/receiver/receiver_generic.go index f446da4ab..2d416a9a3 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go index 987713cee..4d4059ee1 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver_test diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb.go b/internal/manifests/collector/parser/receiver/receiver_influxdb.go index caff265a4..cb242a54e 100644 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go b/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go index 94f596ee0..49b2699b7 100644 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger.go b/internal/manifests/collector/parser/receiver/receiver_jaeger.go index b20315aa8..c5a7fdb14 100644 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go index dadf3e0cb..42df5777b 100644 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_loki.go b/internal/manifests/collector/parser/receiver/receiver_loki.go index bdecadc07..73bb25099 100644 --- a/internal/manifests/collector/parser/receiver/receiver_loki.go +++ b/internal/manifests/collector/parser/receiver/receiver_loki.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_loki_test.go b/internal/manifests/collector/parser/receiver/receiver_loki_test.go index cc10edc9f..ed4187525 100644 --- a/internal/manifests/collector/parser/receiver/receiver_loki_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_loki_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_oc.go b/internal/manifests/collector/parser/receiver/receiver_oc.go index 4fcbf6800..e74609bfb 100644 --- a/internal/manifests/collector/parser/receiver/receiver_oc.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_oc_test.go b/internal/manifests/collector/parser/receiver/receiver_oc_test.go index 74b606242..beb842867 100644 --- a/internal/manifests/collector/parser/receiver/receiver_oc_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_oc_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp.go b/internal/manifests/collector/parser/receiver/receiver_otlp.go index c616761d8..4560997b5 100644 --- a/internal/manifests/collector/parser/receiver/receiver_otlp.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go index 7165153dd..8c2c716d9 100644 --- a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm.go b/internal/manifests/collector/parser/receiver/receiver_sapm.go index 0b58ba461..444fcb799 100644 --- a/internal/manifests/collector/parser/receiver/receiver_sapm.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm_test.go b/internal/manifests/collector/parser/receiver/receiver_sapm_test.go index 094008626..38ab17351 100644 --- a/internal/manifests/collector/parser/receiver/receiver_sapm_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_sapm_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx.go b/internal/manifests/collector/parser/receiver/receiver_signalfx.go index 7285f4694..e4b24f35f 100644 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go b/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go index eaee10189..7ab97f6ed 100644 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking.go b/internal/manifests/collector/parser/receiver/receiver_skywalking.go index 6bccb9872..5ba4eec61 100644 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go index ab00c852c..6398ceb09 100644 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go index fda9d466d..d72458269 100644 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go index e6f99f785..5e267595c 100644 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd.go b/internal/manifests/collector/parser/receiver/receiver_statsd.go index 24d8dfa9c..49d6eb0dd 100644 --- a/internal/manifests/collector/parser/receiver/receiver_statsd.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd_test.go b/internal/manifests/collector/parser/receiver/receiver_statsd_test.go index 338971ba4..027d05317 100644 --- a/internal/manifests/collector/parser/receiver/receiver_statsd_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_statsd_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_test.go b/internal/manifests/collector/parser/receiver/receiver_test.go index a224364e9..96e23cbc6 100644 --- a/internal/manifests/collector/parser/receiver/receiver_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront.go b/internal/manifests/collector/parser/receiver/receiver_wavefront.go index bfda3b7c7..f631f0efe 100644 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go b/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go index 0dd31b947..83fa1fd71 100644 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go index 83c111792..9c9302f06 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go index 6475eb02f..938b5a7ba 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin.go b/internal/manifests/collector/parser/receiver/receiver_zipkin.go index ec5f46c57..b4e8b849f 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go index 8f1af43c5..eae341bc2 100644 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package receiver diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go index 5366f1690..427fe83d0 100644 --- a/internal/manifests/collector/poddisruptionbudget.go +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/poddisruptionbudget_test.go b/internal/manifests/collector/poddisruptionbudget_test.go index 64fcffb9c..4bae8b4f4 100644 --- a/internal/manifests/collector/poddisruptionbudget_test.go +++ b/internal/manifests/collector/poddisruptionbudget_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/podmonitor.go b/internal/manifests/collector/podmonitor.go index 335cfd039..359c4696d 100644 --- a/internal/manifests/collector/podmonitor.go +++ b/internal/manifests/collector/podmonitor.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/podmonitor_test.go b/internal/manifests/collector/podmonitor_test.go index ed4d7240a..2b0889b05 100644 --- a/internal/manifests/collector/podmonitor_test.go +++ b/internal/manifests/collector/podmonitor_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index 90e8a4bf0..2265ab7c3 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 2301a5948..90efcdaf3 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index e3710b07f..3f8692191 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index e6679cad7..0ee00dc31 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index 7c59b23da..fd4c30d4e 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/serviceaccount_test.go b/internal/manifests/collector/serviceaccount_test.go index 51bfc81aa..877e25495 100644 --- a/internal/manifests/collector/serviceaccount_test.go +++ b/internal/manifests/collector/serviceaccount_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 35bf05b5f..26aab110c 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/servicemonitor_test.go b/internal/manifests/collector/servicemonitor_test.go index c3fdf0c96..729c04f3a 100644 --- a/internal/manifests/collector/servicemonitor_test.go +++ b/internal/manifests/collector/servicemonitor_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index 481c87179..2ac220115 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index a4510b47f..280581ab3 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index 306c687b9..de677c88e 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/testdata/route_crd.go b/internal/manifests/collector/testdata/route_crd.go index c32a7f95b..d8660e239 100644 --- a/internal/manifests/collector/testdata/route_crd.go +++ b/internal/manifests/collector/testdata/route_crd.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package testdata diff --git a/internal/manifests/collector/utils.go b/internal/manifests/collector/utils.go index 718bc07e3..f752533a6 100644 --- a/internal/manifests/collector/utils.go +++ b/internal/manifests/collector/utils.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/manifests/collector/volume.go b/internal/manifests/collector/volume.go index ac40a3521..2d7d594f8 100644 --- a/internal/manifests/collector/volume.go +++ b/internal/manifests/collector/volume.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package collector handles the OpenTelemetry Collector. package collector diff --git a/internal/manifests/collector/volume_test.go b/internal/manifests/collector/volume_test.go index c4c71b355..b6ae68f84 100644 --- a/internal/manifests/collector/volume_test.go +++ b/internal/manifests/collector/volume_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/collector/volumeclaim.go b/internal/manifests/collector/volumeclaim.go index dd906a222..5995d8f22 100644 --- a/internal/manifests/collector/volumeclaim.go +++ b/internal/manifests/collector/volumeclaim.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package collector handles the OpenTelemetry Collector. package collector diff --git a/internal/manifests/collector/volumeclaim_test.go b/internal/manifests/collector/volumeclaim_test.go index 2483b2b5d..01512c400 100644 --- a/internal/manifests/collector/volumeclaim_test.go +++ b/internal/manifests/collector/volumeclaim_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector_test diff --git a/internal/manifests/manifestutils/labels.go b/internal/manifests/manifestutils/labels.go index 53012aa37..ac9898277 100644 --- a/internal/manifests/manifestutils/labels.go +++ b/internal/manifests/manifestutils/labels.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package manifestutils diff --git a/internal/manifests/manifestutils/labels_test.go b/internal/manifests/manifestutils/labels_test.go index bc2a6cd43..955939260 100644 --- a/internal/manifests/manifestutils/labels_test.go +++ b/internal/manifests/manifestutils/labels_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package manifestutils diff --git a/internal/manifests/mutate.go b/internal/manifests/mutate.go index 09f48daf5..db8182222 100644 --- a/internal/manifests/mutate.go +++ b/internal/manifests/mutate.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package manifests diff --git a/internal/manifests/opampbridge/configmap.go b/internal/manifests/opampbridge/configmap.go index 221106e75..a61255100 100644 --- a/internal/manifests/opampbridge/configmap.go +++ b/internal/manifests/opampbridge/configmap.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go index d1dd8cb69..7a6e22868 100644 --- a/internal/manifests/opampbridge/configmap_test.go +++ b/internal/manifests/opampbridge/configmap_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/container.go b/internal/manifests/opampbridge/container.go index fa94ee55c..977f0a1c4 100644 --- a/internal/manifests/opampbridge/container.go +++ b/internal/manifests/opampbridge/container.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/container_test.go b/internal/manifests/opampbridge/container_test.go index cd0db649e..13985cdfc 100644 --- a/internal/manifests/opampbridge/container_test.go +++ b/internal/manifests/opampbridge/container_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/deployment.go b/internal/manifests/opampbridge/deployment.go index d58914b5c..15bfe8903 100644 --- a/internal/manifests/opampbridge/deployment.go +++ b/internal/manifests/opampbridge/deployment.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/deployment_test.go b/internal/manifests/opampbridge/deployment_test.go index 59c7be112..bc40c14f7 100644 --- a/internal/manifests/opampbridge/deployment_test.go +++ b/internal/manifests/opampbridge/deployment_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/opampbridge.go b/internal/manifests/opampbridge/opampbridge.go index 2419b1050..47aa99cb3 100644 --- a/internal/manifests/opampbridge/opampbridge.go +++ b/internal/manifests/opampbridge/opampbridge.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/service.go b/internal/manifests/opampbridge/service.go index 17e1d22d4..53f734e4f 100644 --- a/internal/manifests/opampbridge/service.go +++ b/internal/manifests/opampbridge/service.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/serviceaccount.go b/internal/manifests/opampbridge/serviceaccount.go index c0cef4052..b929db39c 100644 --- a/internal/manifests/opampbridge/serviceaccount.go +++ b/internal/manifests/opampbridge/serviceaccount.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/serviceaccount_test.go b/internal/manifests/opampbridge/serviceaccount_test.go index 464f83c4a..c65bd3bbe 100644 --- a/internal/manifests/opampbridge/serviceaccount_test.go +++ b/internal/manifests/opampbridge/serviceaccount_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/utils.go b/internal/manifests/opampbridge/utils.go index ef8119964..799e414b7 100644 --- a/internal/manifests/opampbridge/utils.go +++ b/internal/manifests/opampbridge/utils.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/volume.go b/internal/manifests/opampbridge/volume.go index c5b1814e3..e1e55f4f0 100644 --- a/internal/manifests/opampbridge/volume.go +++ b/internal/manifests/opampbridge/volume.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/opampbridge/volume_test.go b/internal/manifests/opampbridge/volume_test.go index bd33a5e64..c3b2861e3 100644 --- a/internal/manifests/opampbridge/volume_test.go +++ b/internal/manifests/opampbridge/volume_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/manifests/params.go b/internal/manifests/params.go index 3c331abad..c75b2c076 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package manifests diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config.go b/internal/manifests/targetallocator/adapters/config_to_prom_config.go index 84081906b..cb69435ac 100644 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go index 8cc56ab1e..0fe2e8c26 100644 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go +++ b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package adapters_test diff --git a/internal/manifests/targetallocator/annotations.go b/internal/manifests/targetallocator/annotations.go index 91be43b27..79f7741af 100644 --- a/internal/manifests/targetallocator/annotations.go +++ b/internal/manifests/targetallocator/annotations.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/annotations_test.go b/internal/manifests/targetallocator/annotations_test.go index d16fdca4e..58b998791 100644 --- a/internal/manifests/targetallocator/annotations_test.go +++ b/internal/manifests/targetallocator/annotations_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index 01d0002bd..ec819b665 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go index 0f300a20a..c1f2af217 100644 --- a/internal/manifests/targetallocator/configmap_test.go +++ b/internal/manifests/targetallocator/configmap_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 3c078b8a9..8ff26ebc3 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 405a096b9..0e8eee64a 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go index 10c798e60..54f92c61c 100644 --- a/internal/manifests/targetallocator/deployment.go +++ b/internal/manifests/targetallocator/deployment.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index ac6970520..b2b1b9057 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go index e69159b2a..d80859869 100644 --- a/internal/manifests/targetallocator/labels.go +++ b/internal/manifests/targetallocator/labels.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go index a59e3d0a5..be0d4438d 100644 --- a/internal/manifests/targetallocator/labels_test.go +++ b/internal/manifests/targetallocator/labels_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/poddisruptionbudget.go b/internal/manifests/targetallocator/poddisruptionbudget.go index cc293f5a4..ad60a4e2e 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget.go +++ b/internal/manifests/targetallocator/poddisruptionbudget.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/poddisruptionbudget_test.go b/internal/manifests/targetallocator/poddisruptionbudget_test.go index 39de4d691..421dac52e 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget_test.go +++ b/internal/manifests/targetallocator/poddisruptionbudget_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go index b80ca6aa7..4f16b6ab1 100644 --- a/internal/manifests/targetallocator/service.go +++ b/internal/manifests/targetallocator/service.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/service_test.go b/internal/manifests/targetallocator/service_test.go index 0c1d85d69..1391d64fc 100644 --- a/internal/manifests/targetallocator/service_test.go +++ b/internal/manifests/targetallocator/service_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go index af9220d37..a906c630c 100644 --- a/internal/manifests/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go index 742207c20..292991e36 100644 --- a/internal/manifests/targetallocator/serviceaccount_test.go +++ b/internal/manifests/targetallocator/serviceaccount_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/servicemonitor.go b/internal/manifests/targetallocator/servicemonitor.go index 367185b43..c4633ff43 100644 --- a/internal/manifests/targetallocator/servicemonitor.go +++ b/internal/manifests/targetallocator/servicemonitor.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/servicemonitor_test.go b/internal/manifests/targetallocator/servicemonitor_test.go index f5989be30..12625c490 100644 --- a/internal/manifests/targetallocator/servicemonitor_test.go +++ b/internal/manifests/targetallocator/servicemonitor_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go index 4e9c1dfb1..dc58d8182 100644 --- a/internal/manifests/targetallocator/targetallocator.go +++ b/internal/manifests/targetallocator/targetallocator.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/volume.go b/internal/manifests/targetallocator/volume.go index d4af24c2c..7969fef20 100644 --- a/internal/manifests/targetallocator/volume.go +++ b/internal/manifests/targetallocator/volume.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/manifests/targetallocator/volume_test.go b/internal/manifests/targetallocator/volume_test.go index 3f7678785..3dffed981 100644 --- a/internal/manifests/targetallocator/volume_test.go +++ b/internal/manifests/targetallocator/volume_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package targetallocator diff --git a/internal/naming/dns.go b/internal/naming/dns.go index 4f78d9ebe..da0099434 100644 --- a/internal/naming/dns.go +++ b/internal/naming/dns.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Additional copyrights: // Copyright The Jaeger Authors diff --git a/internal/naming/dns_test.go b/internal/naming/dns_test.go index ad53e9b08..177c1a1ce 100644 --- a/internal/naming/dns_test.go +++ b/internal/naming/dns_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Additional copyrights: // Copyright The Jaeger Authors diff --git a/internal/naming/main.go b/internal/naming/main.go index 58b43787c..4d6899137 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package naming is for determining the names for components (containers, services, ...). package naming diff --git a/internal/naming/port.go b/internal/naming/port.go index f4ba37aca..5cac9f3c5 100644 --- a/internal/naming/port.go +++ b/internal/naming/port.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package naming diff --git a/internal/naming/port_test.go b/internal/naming/port_test.go index 172956b4c..b4c8e8ae9 100644 --- a/internal/naming/port_test.go +++ b/internal/naming/port_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package naming diff --git a/internal/naming/triming.go b/internal/naming/triming.go index 4b2dde37e..4abf699f7 100644 --- a/internal/naming/triming.go +++ b/internal/naming/triming.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Additional copyrights: // Copyright The Jaeger Authors diff --git a/internal/naming/triming_test.go b/internal/naming/triming_test.go index 7d6a0557a..63a4074ef 100644 --- a/internal/naming/triming_test.go +++ b/internal/naming/triming_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Additional copyrights: // Copyright The Jaeger Authors diff --git a/internal/status/collector/collector.go b/internal/status/collector/collector.go index 27337e793..9a9d9096c 100644 --- a/internal/status/collector/collector.go +++ b/internal/status/collector/collector.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/status/collector/handle.go b/internal/status/collector/handle.go index f01049aa0..a0391ee19 100644 --- a/internal/status/collector/handle.go +++ b/internal/status/collector/handle.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package collector diff --git a/internal/status/opampbridge/handle.go b/internal/status/opampbridge/handle.go index 809bc52ce..a2dcd3968 100644 --- a/internal/status/opampbridge/handle.go +++ b/internal/status/opampbridge/handle.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/status/opampbridge/opampbridge.go b/internal/status/opampbridge/opampbridge.go index 35986f132..8333130ff 100644 --- a/internal/status/opampbridge/opampbridge.go +++ b/internal/status/opampbridge/opampbridge.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package opampbridge diff --git a/internal/version/main.go b/internal/version/main.go index 7e85af2f1..14df29d35 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package version contains the operator's version, as well as versions of underlying components. package version diff --git a/internal/version/main_test.go b/internal/version/main_test.go index 65d194337..be1a89ec6 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package version diff --git a/internal/webhook/podmutation/webhookhandler.go b/internal/webhook/podmutation/webhookhandler.go index d8d861855..cb6b9b51b 100644 --- a/internal/webhook/podmutation/webhookhandler.go +++ b/internal/webhook/podmutation/webhookhandler.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package podmutation contains the webhook that injects sidecars into pods. package podmutation diff --git a/internal/webhook/podmutation/webhookhandler_suite_test.go b/internal/webhook/podmutation/webhookhandler_suite_test.go index 7769916eb..5d1b93986 100644 --- a/internal/webhook/podmutation/webhookhandler_suite_test.go +++ b/internal/webhook/podmutation/webhookhandler_suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package podmutation_test diff --git a/internal/webhook/podmutation/webhookhandler_test.go b/internal/webhook/podmutation/webhookhandler_test.go index a11f3d763..de4ff32c1 100644 --- a/internal/webhook/podmutation/webhookhandler_test.go +++ b/internal/webhook/podmutation/webhookhandler_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package podmutation_test diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index 84706e46e..18d2e93da 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go index b1cd5a808..1ac41aa25 100644 --- a/pkg/collector/upgrade/suite_test.go +++ b/pkg/collector/upgrade/suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index c21bc3971..1e1ccb7f7 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next. package upgrade diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index ac44a7f47..5e7d873be 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index db36684c3..2c2db3a15 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index 3f41b15ea..e7c9f4ea2 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index 0b8bd509f..07ba720db 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index 97515f95c..fb458851d 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index 76a1f5172..e5a472aa7 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 1ec95fdfd..37e2bad70 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index 9ca7fa35d..05376d281 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index eb5e7a8fb..1b0ed7480 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index 6067c08f9..9eba6c675 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index b57a279b2..3c3d74b17 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index 4ab1dc41c..dd683a241 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index 21e45558a..befc52ca0 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index f86b929c4..4ca233fe1 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go index b2bfeab9e..9ceb8f831 100644 --- a/pkg/collector/upgrade/v0_39_0.go +++ b/pkg/collector/upgrade/v0_39_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go index 67615fd8a..5dfccca1d 100644 --- a/pkg/collector/upgrade/v0_39_0_test.go +++ b/pkg/collector/upgrade/v0_39_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go index 9af14ced2..d1522340b 100644 --- a/pkg/collector/upgrade/v0_41_0.go +++ b/pkg/collector/upgrade/v0_41_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go index ee6681323..0199e117e 100644 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go index 5c1455c0f..2a63fed37 100644 --- a/pkg/collector/upgrade/v0_43_0.go +++ b/pkg/collector/upgrade/v0_43_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go index c935d5f9e..ae478d992 100644 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go index 0a3f4668d..39f38aee8 100644 --- a/pkg/collector/upgrade/v0_56_0.go +++ b/pkg/collector/upgrade/v0_56_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_56_0_test.go b/pkg/collector/upgrade/v0_56_0_test.go index 899669d8c..cbde280b0 100644 --- a/pkg/collector/upgrade/v0_56_0_test.go +++ b/pkg/collector/upgrade/v0_56_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go index 9b097a172..1a9705dd8 100644 --- a/pkg/collector/upgrade/v0_57_2.go +++ b/pkg/collector/upgrade/v0_57_2.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_57_2_test.go b/pkg/collector/upgrade/v0_57_2_test.go index b35f414ae..3850b6a99 100644 --- a/pkg/collector/upgrade/v0_57_2_test.go +++ b/pkg/collector/upgrade/v0_57_2_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go index dd3c87bdc..d800205c1 100644 --- a/pkg/collector/upgrade/v0_61_0.go +++ b/pkg/collector/upgrade/v0_61_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_61_0_test.go b/pkg/collector/upgrade/v0_61_0_test.go index 76425dcad..42434474a 100644 --- a/pkg/collector/upgrade/v0_61_0_test.go +++ b/pkg/collector/upgrade/v0_61_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index 5201f8a03..f7613f03a 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 2e2282eb8..0c92366df 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade_test diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 40820972c..34349d7e0 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/constants/env.go b/pkg/constants/env.go index 93f0e98bf..a1f3f9b9d 100644 --- a/pkg/constants/env.go +++ b/pkg/constants/env.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package constants diff --git a/pkg/featuregate/featuregate.go b/pkg/featuregate/featuregate.go index 27eb61f3c..04f1a2428 100644 --- a/pkg/featuregate/featuregate.go +++ b/pkg/featuregate/featuregate.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package featuregate diff --git a/pkg/featuregate/featuregate_test.go b/pkg/featuregate/featuregate_test.go index 3bb5113df..f759506ac 100644 --- a/pkg/featuregate/featuregate_test.go +++ b/pkg/featuregate/featuregate_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package featuregate diff --git a/pkg/instrumentation/annotation.go b/pkg/instrumentation/annotation.go index 28ef7bf3d..62fd5d1cd 100644 --- a/pkg/instrumentation/annotation.go +++ b/pkg/instrumentation/annotation.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/annotation_test.go b/pkg/instrumentation/annotation_test.go index 511a71ade..a1b697f73 100644 --- a/pkg/instrumentation/annotation_test.go +++ b/pkg/instrumentation/annotation_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/apachehttpd.go b/pkg/instrumentation/apachehttpd.go index 68d63fc9d..2677e782d 100644 --- a/pkg/instrumentation/apachehttpd.go +++ b/pkg/instrumentation/apachehttpd.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/apachehttpd_test.go b/pkg/instrumentation/apachehttpd_test.go index b03fe26b2..6b4256dd8 100644 --- a/pkg/instrumentation/apachehttpd_test.go +++ b/pkg/instrumentation/apachehttpd_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/dotnet.go b/pkg/instrumentation/dotnet.go index 4f35513bc..73874611e 100644 --- a/pkg/instrumentation/dotnet.go +++ b/pkg/instrumentation/dotnet.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/dotnet_test.go b/pkg/instrumentation/dotnet_test.go index 895b94739..9870ff5e6 100644 --- a/pkg/instrumentation/dotnet_test.go +++ b/pkg/instrumentation/dotnet_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/golang.go b/pkg/instrumentation/golang.go index 59125621e..110b70049 100644 --- a/pkg/instrumentation/golang.go +++ b/pkg/instrumentation/golang.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/golang_test.go b/pkg/instrumentation/golang_test.go index ba4ddc4b3..a068767b1 100644 --- a/pkg/instrumentation/golang_test.go +++ b/pkg/instrumentation/golang_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/helper.go b/pkg/instrumentation/helper.go index 910b11737..19cf6ced0 100644 --- a/pkg/instrumentation/helper.go +++ b/pkg/instrumentation/helper.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/helper_test.go b/pkg/instrumentation/helper_test.go index 6282f928b..d28007e43 100644 --- a/pkg/instrumentation/helper_test.go +++ b/pkg/instrumentation/helper_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/instrumentation_suite_test.go b/pkg/instrumentation/instrumentation_suite_test.go index 4b4aa3596..d5e095ec0 100644 --- a/pkg/instrumentation/instrumentation_suite_test.go +++ b/pkg/instrumentation/instrumentation_suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/javaagent.go b/pkg/instrumentation/javaagent.go index 2e645eba7..f68f5213a 100644 --- a/pkg/instrumentation/javaagent.go +++ b/pkg/instrumentation/javaagent.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/javaagent_test.go b/pkg/instrumentation/javaagent_test.go index 90999be61..c8f8256b2 100644 --- a/pkg/instrumentation/javaagent_test.go +++ b/pkg/instrumentation/javaagent_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/nginx.go b/pkg/instrumentation/nginx.go index 10bdde5af..13d0d1f5e 100644 --- a/pkg/instrumentation/nginx.go +++ b/pkg/instrumentation/nginx.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/nginx_test.go b/pkg/instrumentation/nginx_test.go index ef520dcfb..649518ccf 100644 --- a/pkg/instrumentation/nginx_test.go +++ b/pkg/instrumentation/nginx_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/nodejs.go b/pkg/instrumentation/nodejs.go index 9a2e3ce8e..70e1732ca 100644 --- a/pkg/instrumentation/nodejs.go +++ b/pkg/instrumentation/nodejs.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/nodejs_test.go b/pkg/instrumentation/nodejs_test.go index 832fc2b0d..a4d47883d 100644 --- a/pkg/instrumentation/nodejs_test.go +++ b/pkg/instrumentation/nodejs_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/podmutator.go b/pkg/instrumentation/podmutator.go index d2cd265f4..f38a886a0 100644 --- a/pkg/instrumentation/podmutator.go +++ b/pkg/instrumentation/podmutator.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 75dc95d70..851c13de6 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/python.go b/pkg/instrumentation/python.go index 07def83c9..90475cc5e 100644 --- a/pkg/instrumentation/python.go +++ b/pkg/instrumentation/python.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/python_test.go b/pkg/instrumentation/python_test.go index dbee8e761..4122c2083 100644 --- a/pkg/instrumentation/python_test.go +++ b/pkg/instrumentation/python_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 30abc63d7..5397dc997 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/sdk_test.go b/pkg/instrumentation/sdk_test.go index 9d503d447..ddae86f9b 100644 --- a/pkg/instrumentation/sdk_test.go +++ b/pkg/instrumentation/sdk_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package instrumentation diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index f39e9944f..5eb5376ab 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/instrumentation/upgrade/upgrade_suite_test.go b/pkg/instrumentation/upgrade/upgrade_suite_test.go index 1a2926fc5..8df5e9be5 100644 --- a/pkg/instrumentation/upgrade/upgrade_suite_test.go +++ b/pkg/instrumentation/upgrade/upgrade_suite_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/instrumentation/upgrade/upgrade_test.go b/pkg/instrumentation/upgrade/upgrade_test.go index 5614885e8..f52748514 100644 --- a/pkg/instrumentation/upgrade/upgrade_test.go +++ b/pkg/instrumentation/upgrade/upgrade_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package upgrade diff --git a/pkg/sidecar/annotation.go b/pkg/sidecar/annotation.go index f7558add7..93122688e 100644 --- a/pkg/sidecar/annotation.go +++ b/pkg/sidecar/annotation.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package sidecar diff --git a/pkg/sidecar/annotation_test.go b/pkg/sidecar/annotation_test.go index d292be77d..d7f83c42d 100644 --- a/pkg/sidecar/annotation_test.go +++ b/pkg/sidecar/annotation_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package sidecar diff --git a/pkg/sidecar/attributes.go b/pkg/sidecar/attributes.go index 30e64c630..f907ecae8 100644 --- a/pkg/sidecar/attributes.go +++ b/pkg/sidecar/attributes.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package sidecar contains operations related to sidecar manipulation (Add, update, remove). package sidecar diff --git a/pkg/sidecar/attributes_test.go b/pkg/sidecar/attributes_test.go index 7085047b7..37736412b 100644 --- a/pkg/sidecar/attributes_test.go +++ b/pkg/sidecar/attributes_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package sidecar diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 17c246a79..40ed7b0f8 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 // Package sidecar contains operations related to sidecar manipulation (Add, update, remove). package sidecar diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index e2853f3a9..f13d21a40 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package sidecar diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 02fffd33d..72ea70894 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -1,16 +1,5 @@ -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 package sidecar From cd631b4cff0f5e5da15c8f83271cb343a104da7f Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 2 Jan 2024 15:11:07 -0500 Subject: [PATCH 1216/1234] Rename opentelemetry to amazoncloudwatchagent --- apis/v1alpha1/collector_webhook.go | 30 +-- apis/v1alpha1/collector_webhook_test.go | 232 +++++++++--------- apis/v1alpha1/instrumentation_webhook.go | 8 +- apis/v1alpha1/opampbridge_webhook.go | 8 +- apis/v1alpha1/opampbridge_webhook_test.go | 6 +- apis/v1alpha1/opentelemetrycollector_types.go | 62 ++--- apis/v1alpha1/zz_generated.deepcopy.go | 38 +-- apis/v1alpha2/groupversion_info.go | 2 +- apis/v1alpha2/opentelemetrycollector_types.go | 36 +-- apis/v1alpha2/zz_generated.deepcopy.go | 38 +-- ...aws.amazon.com_amazoncloudwatchagents.yaml | 40 +-- ...emetry-operator.clusterserviceversion.yaml | 16 +- config/prometheus/monitor.yaml | 6 +- config/rbac/role.yaml | 6 +- config/webhook/manifests.yaml | 30 +-- controllers/builder_test.go | 210 ++++++++-------- controllers/opampbridge_controller_test.go | 2 +- .../opentelemetrycollector_controller.go | 36 +-- controllers/reconcile_test.go | 8 +- controllers/suite_test.go | 28 +-- internal/manifests/collector/annotations.go | 12 +- .../manifests/collector/annotations_test.go | 26 +- internal/manifests/collector/collector.go | 2 +- .../manifests/collector/config_replace.go | 2 +- internal/manifests/collector/configmap.go | 2 +- .../manifests/collector/configmap_test.go | 2 +- internal/manifests/collector/container.go | 8 +- .../manifests/collector/container_test.go | 82 +++---- internal/manifests/collector/daemonset.go | 4 +- .../manifests/collector/daemonset_test.go | 82 +++---- internal/manifests/collector/deployment.go | 4 +- .../manifests/collector/deployment_test.go | 84 +++---- .../collector/horizontalpodautoscaler.go | 6 +- .../collector/horizontalpodautoscaler_test.go | 6 +- internal/manifests/collector/ingress.go | 4 +- internal/manifests/collector/ingress_test.go | 16 +- .../collector/poddisruptionbudget.go | 2 +- .../collector/poddisruptionbudget_test.go | 2 +- internal/manifests/collector/podmonitor.go | 6 +- internal/manifests/collector/route.go | 2 +- internal/manifests/collector/route_test.go | 14 +- internal/manifests/collector/service.go | 8 +- internal/manifests/collector/service_test.go | 12 +- .../manifests/collector/serviceaccount.go | 4 +- .../collector/serviceaccount_test.go | 6 +- .../manifests/collector/servicemonitor.go | 6 +- internal/manifests/collector/statefulset.go | 4 +- .../manifests/collector/statefulset_test.go | 86 +++---- internal/manifests/collector/suite_test.go | 14 +- internal/manifests/collector/utils.go | 2 +- internal/manifests/collector/volume.go | 2 +- internal/manifests/collector/volume_test.go | 10 +- internal/manifests/collector/volumeclaim.go | 2 +- .../manifests/collector/volumeclaim_test.go | 8 +- internal/manifests/manifestutils/labels.go | 2 +- .../manifests/manifestutils/labels_test.go | 48 ++-- .../manifests/opampbridge/configmap_test.go | 2 +- .../manifests/opampbridge/deployment_test.go | 4 +- internal/manifests/params.go | 2 +- .../manifests/targetallocator/annotations.go | 2 +- .../manifests/targetallocator/configmap.go | 2 +- .../targetallocator/configmap_test.go | 8 +- .../manifests/targetallocator/container.go | 2 +- .../targetallocator/container_test.go | 38 +-- .../targetallocator/deployment_test.go | 38 +-- internal/manifests/targetallocator/labels.go | 6 +- .../manifests/targetallocator/labels_test.go | 10 +- .../poddisruptionbudget_test.go | 12 +- .../targetallocator/serviceaccount.go | 2 +- .../targetallocator/serviceaccount_test.go | 12 +- .../targetallocator/servicemonitor_test.go | 4 +- internal/manifests/targetallocator/volume.go | 2 +- .../manifests/targetallocator/volume_test.go | 2 +- internal/naming/main.go | 10 +- internal/status/collector/collector.go | 6 +- internal/version/main.go | 14 +- internal/version/main_test.go | 4 +- .../webhook/podmutation/webhookhandler.go | 2 +- .../podmutation/webhookhandler_test.go | 46 ++-- main.go | 18 +- pkg/collector/upgrade/noop.go | 2 +- pkg/collector/upgrade/upgrade.go | 12 +- pkg/collector/upgrade/upgrade_test.go | 16 +- pkg/collector/upgrade/v0_15_0.go | 2 +- pkg/collector/upgrade/v0_15_0_test.go | 6 +- pkg/collector/upgrade/v0_19_0.go | 2 +- pkg/collector/upgrade/v0_19_0_test.go | 18 +- pkg/collector/upgrade/v0_24_0.go | 2 +- pkg/collector/upgrade/v0_24_0_test.go | 6 +- pkg/collector/upgrade/v0_2_10.go | 2 +- pkg/collector/upgrade/v0_31_0.go | 2 +- pkg/collector/upgrade/v0_31_0_test.go | 6 +- pkg/collector/upgrade/v0_36_0.go | 2 +- pkg/collector/upgrade/v0_36_0_test.go | 6 +- pkg/collector/upgrade/v0_38_0.go | 2 +- pkg/collector/upgrade/v0_38_0_test.go | 6 +- pkg/collector/upgrade/v0_39_0.go | 4 +- pkg/collector/upgrade/v0_39_0_test.go | 10 +- pkg/collector/upgrade/v0_41_0.go | 2 +- pkg/collector/upgrade/v0_41_0_test.go | 12 +- pkg/collector/upgrade/v0_43_0.go | 2 +- pkg/collector/upgrade/v0_43_0_test.go | 6 +- pkg/collector/upgrade/v0_56_0.go | 10 +- pkg/collector/upgrade/v0_56_0_test.go | 6 +- pkg/collector/upgrade/v0_57_2.go | 2 +- pkg/collector/upgrade/v0_57_2_test.go | 6 +- pkg/collector/upgrade/v0_61_0.go | 2 +- pkg/collector/upgrade/v0_61_0_test.go | 6 +- pkg/collector/upgrade/v0_9_0.go | 2 +- pkg/collector/upgrade/v0_9_0_test.go | 6 +- pkg/collector/upgrade/versions.go | 2 +- pkg/instrumentation/sdk.go | 2 +- pkg/instrumentation/upgrade/upgrade.go | 4 +- pkg/sidecar/pod.go | 4 +- pkg/sidecar/pod_test.go | 8 +- pkg/sidecar/podmutator.go | 18 +- 116 files changed, 939 insertions(+), 939 deletions(-) diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 4afa2e1c4..88336bbb0 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -25,9 +25,9 @@ var ( _ admission.CustomDefaulter = &CollectorWebhook{} ) -// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=create;update,versions=v1alpha1,name=mopentelemetrycollector.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectorcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-opentelemetrycollector,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=opentelemetrycollectors,versions=v1alpha1,name=vopentelemetrycollectordelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=create;update,versions=v1alpha1,name=mamazoncloudwatchagent.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:object:generate=false type CollectorWebhook struct { @@ -37,38 +37,38 @@ type CollectorWebhook struct { } func (c CollectorWebhook) Default(ctx context.Context, obj runtime.Object) error { - otelcol, ok := obj.(*OpenTelemetryCollector) + otelcol, ok := obj.(*AmazonCloudWatchAgent) if !ok { - return fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + return fmt.Errorf("expected an AmazonCloudWatchAgent, received %T", obj) } return c.defaulter(otelcol) } func (c CollectorWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { - otelcol, ok := obj.(*OpenTelemetryCollector) + otelcol, ok := obj.(*AmazonCloudWatchAgent) if !ok { - return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + return nil, fmt.Errorf("expected an AmazonCloudWatchAgent, received %T", obj) } return c.validate(otelcol) } func (c CollectorWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { - otelcol, ok := newObj.(*OpenTelemetryCollector) + otelcol, ok := newObj.(*AmazonCloudWatchAgent) if !ok { - return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", newObj) + return nil, fmt.Errorf("expected an AmazonCloudWatchAgent, received %T", newObj) } return c.validate(otelcol) } func (c CollectorWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { - otelcol, ok := obj.(*OpenTelemetryCollector) + otelcol, ok := obj.(*AmazonCloudWatchAgent) if !ok || otelcol == nil { - return nil, fmt.Errorf("expected an OpenTelemetryCollector, received %T", obj) + return nil, fmt.Errorf("expected an AmazonCloudWatchAgent, received %T", obj) } return c.validate(otelcol) } -func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { +func (c CollectorWebhook) defaulter(r *AmazonCloudWatchAgent) error { if len(r.Spec.Mode) == 0 { r.Spec.Mode = ModeDeployment } @@ -80,7 +80,7 @@ func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { r.Labels = map[string]string{} } if r.Labels["app.kubernetes.io/managed-by"] == "" { - r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + r.Labels["app.kubernetes.io/managed-by"] = "amazon-cloudwatch-agent-operator" } // We can default to one because dependent objects Deployment and HorizontalPodAutoScaler @@ -158,7 +158,7 @@ func (c CollectorWebhook) defaulter(r *OpenTelemetryCollector) error { return nil } -func (c CollectorWebhook) validate(r *OpenTelemetryCollector) (admission.Warnings, error) { +func (c CollectorWebhook) validate(r *AmazonCloudWatchAgent) (admission.Warnings, error) { warnings := admission.Warnings{} // validate volumeClaimTemplates if r.Spec.Mode != ModeStatefulSet && len(r.Spec.VolumeClaimTemplates) > 0 { @@ -356,7 +356,7 @@ func SetupCollectorWebhook(mgr ctrl.Manager, cfg config.Config) error { cfg: cfg, } return ctrl.NewWebhookManagedBy(mgr). - For(&OpenTelemetryCollector{}). + For(&AmazonCloudWatchAgent{}). WithValidator(cvw). WithDefaulter(cvw). Complete() diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index 46f2a1c7c..c63859f94 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -39,19 +39,19 @@ func TestOTELColDefaultingWebhook(t *testing.T) { tests := []struct { name string - otelcol OpenTelemetryCollector - expected OpenTelemetryCollector + otelcol AmazonCloudWatchAgent + expected AmazonCloudWatchAgent }{ { name: "all fields default", - otelcol: OpenTelemetryCollector{}, - expected: OpenTelemetryCollector{ + otelcol: AmazonCloudWatchAgent{}, + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -67,20 +67,20 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "provided values in spec", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", @@ -96,21 +96,21 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "doesn't override unmanaged", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ ManagementState: ManagementStateUnmanaged, Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Replicas: &five, UpgradeStrategy: "adhoc", @@ -126,21 +126,21 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Setting Autoscaler MaxReplicas", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Autoscaler: &AutoscalerSpec{ MaxReplicas: &five, MinReplicas: &one, }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -161,18 +161,18 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "MaxReplicas but no Autoscale", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &five, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -180,7 +180,7 @@ func TestOTELColDefaultingWebhook(t *testing.T) { Autoscaler: &AutoscalerSpec{ TargetCPUUtilization: &defaultCPUTarget, // webhook Default adds MaxReplicas to Autoscaler because - // OpenTelemetryCollector.Spec.MaxReplicas is deprecated. + // AmazonCloudWatchAgent.Spec.MaxReplicas is deprecated. MaxReplicas: &five, MinReplicas: &one, }, @@ -196,21 +196,21 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Missing route termination", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Ingress: Ingress{ Type: IngressTypeRoute, }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, ManagementState: ManagementStateManaged, Ingress: Ingress{ @@ -232,8 +232,8 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Defined PDB for collector", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, PodDisruptionBudget: &PodDisruptionBudgetSpec{ MinAvailable: &intstr.IntOrString{ @@ -243,13 +243,13 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -265,8 +265,8 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Defined PDB for target allocator", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, TargetAllocator: OpenTelemetryTargetAllocator{ Enabled: true, @@ -280,13 +280,13 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -313,8 +313,8 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Undefined PDB for target allocator and consistent-hashing strategy", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, TargetAllocator: OpenTelemetryTargetAllocator{ Enabled: true, @@ -323,13 +323,13 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -356,8 +356,8 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, { name: "Undefined PDB for target allocator and not consistent-hashing strategy", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, TargetAllocator: OpenTelemetryTargetAllocator{ Enabled: true, @@ -365,13 +365,13 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, - expected: OpenTelemetryCollector{ + expected: AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: OpenTelemetryCollectorSpec{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, Replicas: &one, UpgradeStrategy: UpgradeStrategyAutomatic, @@ -424,18 +424,18 @@ func TestOTELColValidatingWebhook(t *testing.T) { tests := []struct { //nolint:govet name string - otelcol OpenTelemetryCollector + otelcol AmazonCloudWatchAgent expectedErr string expectedWarnings []string }{ { name: "valid empty spec", - otelcol: OpenTelemetryCollector{}, + otelcol: AmazonCloudWatchAgent{}, }, { name: "valid full spec", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeStatefulSet, MinReplicas: &one, Replicas: &three, @@ -486,8 +486,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid mode with volume claim templates", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, VolumeClaimTemplates: []v1.PersistentVolumeClaim{{}, {}}, }, @@ -496,8 +496,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid mode with tolerations", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Tolerations: []v1.Toleration{{}, {}}, }, @@ -506,8 +506,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid mode with target allocator", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, TargetAllocator: OpenTelemetryTargetAllocator{ Enabled: true, @@ -518,8 +518,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid target allocator config", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeStatefulSet, TargetAllocator: OpenTelemetryTargetAllocator{ Enabled: true, @@ -530,8 +530,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid port name", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Ports: []v1.ServicePort{ { // this port name contains a non alphanumeric character, which is invalid. @@ -546,8 +546,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid port name, too long", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Ports: []v1.ServicePort{ { Name: "aaaabbbbccccdddd", // len: 16, too long @@ -560,8 +560,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid port num", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Ports: []v1.ServicePort{ { Name: "aaaabbbbccccddd", // len: 15 @@ -574,8 +574,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid max replicas", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &zero, }, }, @@ -584,8 +584,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid replicas, greater than max", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Replicas: &five, }, @@ -595,8 +595,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid min replicas, greater than max", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, MinReplicas: &five, }, @@ -606,8 +606,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid min replicas, lesser than 1", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, MinReplicas: &zero, }, @@ -617,8 +617,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid autoscaler scale down", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ Behavior: &autoscalingv2.HorizontalPodAutoscalerBehavior{ @@ -634,8 +634,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid autoscaler scale up", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ Behavior: &autoscalingv2.HorizontalPodAutoscalerBehavior{ @@ -651,8 +651,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid autoscaler target cpu utilization", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ TargetCPUUtilization: &zero, @@ -664,8 +664,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "autoscaler minReplicas is less than maxReplicas", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Autoscaler: &AutoscalerSpec{ MaxReplicas: &one, MinReplicas: &five, @@ -676,8 +676,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid autoscaler metric type", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ Metrics: []MetricSpec{ @@ -693,8 +693,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid pod metric average value", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ Metrics: []MetricSpec{ @@ -719,8 +719,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "utilization target is not valid with pod metrics", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ MaxReplicas: &three, Autoscaler: &AutoscalerSpec{ Metrics: []MetricSpec{ @@ -745,8 +745,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid deployment mode incompabible with ingress settings", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Ingress: Ingress{ Type: IngressTypeNginx, @@ -759,8 +759,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid mode with priorityClassName", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, PriorityClassName: "test-class", }, @@ -769,8 +769,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid mode with affinity", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, Affinity: &v1.Affinity{ NodeAffinity: &v1.NodeAffinity{ @@ -795,8 +795,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid InitialDelaySeconds", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ InitialDelaySeconds: &minusOne, }, @@ -806,8 +806,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid PeriodSeconds", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ PeriodSeconds: &zero, }, @@ -817,8 +817,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid TimeoutSeconds", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ TimeoutSeconds: &zero, }, @@ -828,8 +828,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid SuccessThreshold", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ SuccessThreshold: &zero, }, @@ -839,8 +839,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid FailureThreshold", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ FailureThreshold: &zero, }, @@ -850,8 +850,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid TerminationGracePeriodSeconds", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ LivenessProbe: &Probe{ TerminationGracePeriodSeconds: &zero64, }, @@ -861,8 +861,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid AdditionalContainers", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeSidecar, AdditionalContainers: []v1.Container{ { @@ -875,8 +875,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "missing ingress hostname for subdomain ruleType", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Ingress: Ingress{ RuleType: IngressRuleTypeSubdomain, }, @@ -886,8 +886,8 @@ func TestOTELColValidatingWebhook(t *testing.T) { }, { name: "invalid updateStrategy for Deployment mode", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ + otelcol: AmazonCloudWatchAgent{ + Spec: AmazonCloudWatchAgentSpec{ Mode: ModeDeployment, UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ Type: "RollingUpdate", diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 3cf40b57b..7ebd0781f 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -38,9 +38,9 @@ var ( } ) -// +kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=create;update,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-opentelemetry-io-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:object:generate=false type InstrumentationWebhook struct { @@ -86,7 +86,7 @@ func (w InstrumentationWebhook) defaulter(r *Instrumentation) error { r.Labels = map[string]string{} } if r.Labels["app.kubernetes.io/managed-by"] == "" { - r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + r.Labels["app.kubernetes.io/managed-by"] = "amazon-cloudwatch-agent-operator" } if r.Spec.Java.Image == "" { diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go index 82eccd8e1..363ea3a01 100644 --- a/apis/v1alpha1/opampbridge_webhook.go +++ b/apis/v1alpha1/opampbridge_webhook.go @@ -23,9 +23,9 @@ var ( _ admission.CustomDefaulter = &OpAMPBridgeWebhook{} ) -//+kubebuilder:webhook:path=/mutate-opentelemetry-io-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 -//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=vopampbridgecreateupdate.kb.io,admissionReviewVersions=v1 -//+kubebuilder:webhook:path=/validate-opentelemetry-io-v1alpha1-opampbridge,mutating=false,failurePolicy=ignore,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=delete,versions=v1alpha1,name=vopampbridgedelete.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=vopampbridgecreateupdate.kb.io,admissionReviewVersions=v1 +//+kubebuilder:webhook:path=/validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=false,failurePolicy=ignore,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=delete,versions=v1alpha1,name=vopampbridgedelete.kb.io,admissionReviewVersions=v1 //+kubebuilder:object:generate=false type OpAMPBridgeWebhook struct { @@ -75,7 +75,7 @@ func (o OpAMPBridgeWebhook) defaulter(r *OpAMPBridge) error { r.Labels = map[string]string{} } if r.Labels["app.kubernetes.io/managed-by"] == "" { - r.Labels["app.kubernetes.io/managed-by"] = "opentelemetry-operator" + r.Labels["app.kubernetes.io/managed-by"] = "amazon-cloudwatch-agent-operator" } one := int32(1) diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go index 89ee2abb0..5e635d5ee 100644 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ b/apis/v1alpha1/opampbridge_webhook_test.go @@ -39,7 +39,7 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { expected: OpAMPBridge{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: OpAMPBridgeSpec{ @@ -60,7 +60,7 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { expected: OpAMPBridge{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: OpAMPBridgeSpec{ @@ -82,7 +82,7 @@ func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { expected: OpAMPBridge{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: OpAMPBridgeSpec{ diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index 566ec0701..beddf6a45 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -18,11 +18,11 @@ import ( type ManagementStateType string const ( - // ManagementStateManaged when the OpenTelemetryCollector custom resource should be + // ManagementStateManaged when the AmazonCloudWatchAgent custom resource should be // reconciled by the operator. ManagementStateManaged ManagementStateType = "managed" - // ManagementStateUnmanaged when the OpenTelemetryCollector custom resource should not be + // ManagementStateUnmanaged when the AmazonCloudWatchAgent custom resource should not be // reconciled by the operator. ManagementStateUnmanaged ManagementStateType = "unmanaged" ) @@ -36,7 +36,7 @@ const ( // SEE: https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1306. // NOTE: As a workaround, port name and appProtocol could be specified directly // in the CR. -// SEE: OpenTelemetryCollector.spec.ports[index]. +// SEE: AmazonCloudWatchAgent.spec.ports[index]. type Ingress struct { // Type default value is: "" // Supported types are: ingress, route @@ -79,8 +79,8 @@ type OpenShiftRoute struct { Termination TLSRouteTerminationType `json:"termination,omitempty"` } -// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. -type OpenTelemetryCollectorSpec struct { +// AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentSpec struct { // ManagementState defines if the CR should be managed by the operator or not. // Default is managed. // @@ -103,19 +103,19 @@ type OpenTelemetryCollectorSpec struct { Replicas *int32 `json:"replicas,omitempty"` // MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 // +optional - // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead. + // Deprecated: use "AmazonCloudWatchAgent.Spec.Autoscaler.MinReplicas" instead. MinReplicas *int32 `json:"minReplicas,omitempty"` // MaxReplicas sets an upper bound to the autoscaling feature. If MaxReplicas is set autoscaling is enabled. // +optional - // Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" instead. + // Deprecated: use "AmazonCloudWatchAgent.Spec.Autoscaler.MaxReplicas" instead. MaxReplicas *int32 `json:"maxReplicas,omitempty"` // Autoscaler specifies the pod autoscaling configuration to use - // for the OpenTelemetryCollector workload. + // for the AmazonCloudWatchAgent workload. // // +optional Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"` // PodDisruptionBudget specifies the pod disruption budget configuration to use - // for the OpenTelemetryCollector workload. + // for the AmazonCloudWatchAgent workload. // // +optional PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` @@ -135,7 +135,7 @@ type OpenTelemetryCollectorSpec struct { // opentelemetry-collector pod, when running as a deployment, daemonset, // or statefulset. // - // In sidecar mode, the opentelemetry-operator will ignore this setting. + // In sidecar mode, the amazon-cloudwatch-agent-operator will ignore this setting. // // +optional PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` @@ -261,7 +261,7 @@ type OpenTelemetryCollectorSpec struct { // +optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector + // ConfigMaps is a list of ConfigMaps in the same namespace as the AmazonCloudWatchAgent // object, which shall be mounted into the Collector Pods. // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`. ConfigMaps []ConfigMapsSpec `json:"configmaps,omitempty"` @@ -364,29 +364,29 @@ type OpenTelemetryTargetAllocatorPrometheusCR struct { ServiceMonitorSelector map[string]string `json:"serviceMonitorSelector,omitempty"` } -// ScaleSubresourceStatus defines the observed state of the OpenTelemetryCollector's +// ScaleSubresourceStatus defines the observed state of the AmazonCloudWatchAgent's // scale subresource. type ScaleSubresourceStatus struct { - // The selector used to match the OpenTelemetryCollector's + // The selector used to match the AmazonCloudWatchAgent's // deployment or statefulSet pods. // +optional Selector string `json:"selector,omitempty"` // The total number non-terminated pods targeted by this - // OpenTelemetryCollector's deployment or statefulSet. + // AmazonCloudWatchAgent's deployment or statefulSet. // +optional Replicas int32 `json:"replicas,omitempty"` - // StatusReplicas is the number of pods targeted by this OpenTelemetryCollector's with a Ready Condition / - // Total number of non-terminated pods targeted by this OpenTelemetryCollector's (their labels match the selector). + // StatusReplicas is the number of pods targeted by this AmazonCloudWatchAgent's with a Ready Condition / + // Total number of non-terminated pods targeted by this AmazonCloudWatchAgent's (their labels match the selector). // Deployment, Daemonset, StatefulSet. // +optional StatusReplicas string `json:"statusReplicas,omitempty"` } -// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. -type OpenTelemetryCollectorStatus struct { - // Scale is the OpenTelemetryCollector's scale subresource status. +// AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentStatus struct { + // Scale is the AmazonCloudWatchAgent's scale subresource status. // +optional Scale ScaleSubresourceStatus `json:"scale,omitempty"` @@ -406,7 +406,7 @@ type OpenTelemetryCollectorStatus struct { // Replicas is currently not being set and might be removed in the next version. // +optional - // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. + // Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" instead. Replicas int32 `json:"replicas,omitempty"` } @@ -422,29 +422,29 @@ type OpenTelemetryCollectorStatus struct { // +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".status.image" // +kubebuilder:printcolumn:name="Management",type="string",JSONPath=".spec.managementState",description="Management State" // +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Collector" -// This annotation provides a hint for OLM which resources are managed by OpenTelemetryCollector kind. +// This annotation provides a hint for OLM which resources are managed by AmazonCloudWatchAgent kind. // It's not mandatory to list all resources. // +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{DaemonSets,apps/v1},{StatefulSets,apps/v1},{ConfigMaps,v1},{Service,v1}} -// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. -type OpenTelemetryCollector struct { +// AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. +type AmazonCloudWatchAgent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec OpenTelemetryCollectorSpec `json:"spec,omitempty"` - Status OpenTelemetryCollectorStatus `json:"status,omitempty"` + Spec AmazonCloudWatchAgentSpec `json:"spec,omitempty"` + Status AmazonCloudWatchAgentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true -// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector. -type OpenTelemetryCollectorList struct { +// AmazonCloudWatchAgentList contains a list of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []OpenTelemetryCollector `json:"items"` + Items []AmazonCloudWatchAgent `json:"items"` } -// AutoscalerSpec defines the OpenTelemetryCollector's pod autoscaling specification. +// AutoscalerSpec defines the AmazonCloudWatchAgent's pod autoscaling specification. type AutoscalerSpec struct { // MinReplicas sets a lower bound to the autoscaling feature. Set this if your are using autoscaling. It must be at least 1 // +optional @@ -468,7 +468,7 @@ type AutoscalerSpec struct { TargetMemoryUtilization *int32 `json:"targetMemoryUtilization,omitempty"` } -// PodDisruptionBudgetSpec defines the OpenTelemetryCollector's pod disruption budget specification. +// PodDisruptionBudgetSpec defines the AmazonCloudWatchAgent's pod disruption budget specification. type PodDisruptionBudgetSpec struct { // An eviction is allowed if at least "minAvailable" pods selected by // "selector" will still be available after the eviction, i.e. even in the @@ -559,5 +559,5 @@ type ConfigMapsSpec struct { } func init() { - SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) + SchemeBuilder.Register(&AmazonCloudWatchAgent{}, &AmazonCloudWatchAgentList{}) } diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 68a313318..fa8b11563 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -690,7 +690,7 @@ func (in *OpenShiftRoute) DeepCopy() *OpenShiftRoute { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { +func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -698,18 +698,18 @@ func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector. -func (in *OpenTelemetryCollector) DeepCopy() *OpenTelemetryCollector { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. +func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { if in == nil { return nil } - out := new(OpenTelemetryCollector) + out := new(AmazonCloudWatchAgent) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { +func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -717,31 +717,31 @@ func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorList) { +func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]OpenTelemetryCollector, len(*in)) + *out = make([]AmazonCloudWatchAgent, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList. -func (in *OpenTelemetryCollectorList) DeepCopy() *OpenTelemetryCollectorList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. +func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { if in == nil { return nil } - out := new(OpenTelemetryCollectorList) + out := new(AmazonCloudWatchAgentList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { +func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -749,7 +749,7 @@ func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSpec) { +func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { *out = *in in.Resources.DeepCopyInto(&out.Resources) if in.NodeSelector != nil { @@ -909,18 +909,18 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. -func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. +func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { if in == nil { return nil } - out := new(OpenTelemetryCollectorSpec) + out := new(AmazonCloudWatchAgentSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { +func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { *out = *in out.Scale = in.Scale if in.Messages != nil { @@ -930,12 +930,12 @@ func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollector } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus. -func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. +func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { if in == nil { return nil } - out := new(OpenTelemetryCollectorStatus) + out := new(AmazonCloudWatchAgentStatus) in.DeepCopyInto(out) return out } diff --git a/apis/v1alpha2/groupversion_info.go b/apis/v1alpha2/groupversion_info.go index db8159bc3..a765a3488 100644 --- a/apis/v1alpha2/groupversion_info.go +++ b/apis/v1alpha2/groupversion_info.go @@ -13,7 +13,7 @@ import ( var ( // GroupVersion is group version used to register these objects. - GroupVersion = schema.GroupVersion{Group: "opentelemetry.io", Version: "v1alpha2"} + GroupVersion = schema.GroupVersion{Group: "cloudwatch.aws.amazon.com", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/opentelemetrycollector_types.go index ab06efbf7..31c710878 100644 --- a/apis/v1alpha2/opentelemetrycollector_types.go +++ b/apis/v1alpha2/opentelemetrycollector_types.go @@ -12,8 +12,8 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) -// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. -type OpenTelemetryCollectorSpec struct { +// AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentSpec struct { // ManagementState defines if the CR should be managed by the operator or not. // Default is managed. // @@ -35,12 +35,12 @@ type OpenTelemetryCollectorSpec struct { // +optional Replicas *int32 `json:"replicas,omitempty"` // Autoscaler specifies the pod autoscaling configuration to use - // for the OpenTelemetryCollector workload. + // for the AmazonCloudWatchAgent workload. // // +optional Autoscaler *v1alpha1.AutoscalerSpec `json:"autoscaler,omitempty"` // PodDisruptionBudget specifies the pod disruption budget configuration to use - // for the OpenTelemetryCollector workload. + // for the AmazonCloudWatchAgent workload. // // +optional PodDisruptionBudget *v1alpha1.PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` @@ -60,7 +60,7 @@ type OpenTelemetryCollectorSpec struct { // opentelemetry-collector pod, when running as a deployment, daemonset, // or statefulset. // - // In sidecar mode, the opentelemetry-operator will ignore this setting. + // In sidecar mode, the amazon-cloudwatch-agent-operator will ignore this setting. // // +optional PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` @@ -186,15 +186,15 @@ type OpenTelemetryCollectorSpec struct { // +optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // ConfigMaps is a list of ConfigMaps in the same namespace as the OpenTelemetryCollector + // ConfigMaps is a list of ConfigMaps in the same namespace as the AmazonCloudWatchAgent // object, which shall be mounted into the Collector Pods. // Each ConfigMap will be added to the Collector's Deployments as a volume named `configmap-`. ConfigMaps []v1alpha1.ConfigMapsSpec `json:"configmaps,omitempty"` } -// OpenTelemetryCollectorStatus defines the observed state of OpenTelemetryCollector. -type OpenTelemetryCollectorStatus struct { - // Scale is the OpenTelemetryCollector's scale subresource status. +// AmazonCloudWatchAgentStatus defines the observed state of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentStatus struct { + // Scale is the AmazonCloudWatchAgent's scale subresource status. // +optional Scale v1alpha1.ScaleSubresourceStatus `json:"scale,omitempty"` @@ -214,31 +214,31 @@ type OpenTelemetryCollectorStatus struct { // Replicas is currently not being set and might be removed in the next version. // +optional - // Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" instead. + // Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" instead. Replicas int32 `json:"replicas,omitempty"` } //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// OpenTelemetryCollector is the Schema for the opentelemetrycollectors API. -type OpenTelemetryCollector struct { +// AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. +type AmazonCloudWatchAgent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec OpenTelemetryCollectorSpec `json:"spec,omitempty"` - Status OpenTelemetryCollectorStatus `json:"status,omitempty"` + Spec AmazonCloudWatchAgentSpec `json:"spec,omitempty"` + Status AmazonCloudWatchAgentStatus `json:"status,omitempty"` } //+kubebuilder:object:root=true -// OpenTelemetryCollectorList contains a list of OpenTelemetryCollector. -type OpenTelemetryCollectorList struct { +// AmazonCloudWatchAgentList contains a list of AmazonCloudWatchAgent. +type AmazonCloudWatchAgentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []OpenTelemetryCollector `json:"items"` + Items []AmazonCloudWatchAgent `json:"items"` } func init() { - SchemeBuilder.Register(&OpenTelemetryCollector{}, &OpenTelemetryCollectorList{}) + SchemeBuilder.Register(&AmazonCloudWatchAgent{}, &AmazonCloudWatchAgentList{}) } diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index e75a6491c..76b7b7fa8 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -323,7 +323,7 @@ func (in *NodeJS) DeepCopy() *NodeJS { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { +func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -331,18 +331,18 @@ func (in *OpenTelemetryCollector) DeepCopyInto(out *OpenTelemetryCollector) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollector. -func (in *OpenTelemetryCollector) DeepCopy() *OpenTelemetryCollector { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. +func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { if in == nil { return nil } - out := new(OpenTelemetryCollector) + out := new(AmazonCloudWatchAgent) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { +func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -350,31 +350,31 @@ func (in *OpenTelemetryCollector) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorList) DeepCopyInto(out *OpenTelemetryCollectorList) { +func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]OpenTelemetryCollector, len(*in)) + *out = make([]AmazonCloudWatchAgent, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorList. -func (in *OpenTelemetryCollectorList) DeepCopy() *OpenTelemetryCollectorList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. +func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { if in == nil { return nil } - out := new(OpenTelemetryCollectorList) + out := new(AmazonCloudWatchAgentList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { +func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -382,7 +382,7 @@ func (in *OpenTelemetryCollectorList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSpec) { +func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { *out = *in in.Resources.DeepCopyInto(&out.Resources) if in.NodeSelector != nil { @@ -531,18 +531,18 @@ func (in *OpenTelemetryCollectorSpec) DeepCopyInto(out *OpenTelemetryCollectorSp } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorSpec. -func (in *OpenTelemetryCollectorSpec) DeepCopy() *OpenTelemetryCollectorSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. +func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { if in == nil { return nil } - out := new(OpenTelemetryCollectorSpec) + out := new(AmazonCloudWatchAgentSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollectorStatus) { +func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { *out = *in out.Scale = in.Scale if in.Messages != nil { @@ -552,12 +552,12 @@ func (in *OpenTelemetryCollectorStatus) DeepCopyInto(out *OpenTelemetryCollector } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryCollectorStatus. -func (in *OpenTelemetryCollectorStatus) DeepCopy() *OpenTelemetryCollectorStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. +func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { if in == nil { return nil } - out := new(OpenTelemetryCollectorStatus) + out := new(AmazonCloudWatchAgentStatus) in.DeepCopyInto(out) return out } diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml index 56f84cbb6..01e3786df 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml @@ -4,17 +4,17 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: opentelemetrycollectors.opentelemetry.io + name: amazoncloudwatchagents.opentelemetry.io spec: group: opentelemetry.io names: - kind: OpenTelemetryCollector - listKind: OpenTelemetryCollectorList - plural: opentelemetrycollectors + kind: AmazonCloudWatchAgent + listKind: AmazonCloudWatchAgentList + plural: amazoncloudwatchagents shortNames: - otelcol - otelcols - singular: opentelemetrycollector + singular: amazoncloudwatchagent scope: Namespaced versions: - additionalPrinterColumns: @@ -42,7 +42,7 @@ spec: name: v1alpha1 schema: openAPIV3Schema: - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. properties: apiVersion: @@ -58,7 +58,7 @@ spec: metadata: type: object spec: - description: OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector. + description: AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. properties: additionalContainers: description: AdditionalContainers allows injecting additional containers @@ -1946,7 +1946,7 @@ spec: type: object autoscaler: description: Autoscaler specifies the pod autoscaling configuration - to use for the OpenTelemetryCollector workload. + to use for the AmazonCloudWatchAgent workload. properties: behavior: description: HorizontalPodAutoscalerBehavior configures the scaling @@ -2203,7 +2203,7 @@ spec: type: string configmaps: description: ConfigMaps is a list of ConfigMaps in the same namespace - as the OpenTelemetryCollector object, which shall be mounted into + as the AmazonCloudWatchAgent object, which shall be mounted into the Collector Pods. items: properties: @@ -3801,14 +3801,14 @@ spec: type: string maxReplicas: description: 'MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. Deprecated: use "OpenTelemetryCollector.Spec.Autoscaler.MaxReplicas" + If MaxReplicas is set autoscaling is enabled. Deprecated: use "AmazonCloudWatchAgent.Spec.Autoscaler.MaxReplicas" instead.' format: int32 type: integer minReplicas: description: 'MinReplicas sets a lower bound to the autoscaling feature. Set this if you are using autoscaling. It must be at least 1 Deprecated: - use "OpenTelemetryCollector.Spec.Autoscaler.MinReplicas" instead.' + use "AmazonCloudWatchAgent.Spec.Autoscaler.MinReplicas" instead.' format: int32 type: integer mode: @@ -3848,7 +3848,7 @@ spec: type: object podDisruptionBudget: description: PodDisruptionBudget specifies the pod disruption budget - configuration to use for the OpenTelemetryCollector workload. + configuration to use for the AmazonCloudWatchAgent workload. properties: maxUnavailable: anyOf: @@ -7458,8 +7458,8 @@ spec: x-kubernetes-list-type: atomic type: object status: - description: OpenTelemetryCollectorStatus defines the observed state of - OpenTelemetryCollector. + description: AmazonCloudWatchAgentStatus defines the observed state of + AmazonCloudWatchAgent. properties: image: description: Image indicates the container image to use for the OpenTelemetry @@ -7474,27 +7474,27 @@ spec: x-kubernetes-list-type: atomic replicas: description: 'Replicas is currently not being set and might be removed - in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" + in the next version. Deprecated: use "AmazonCloudWatchAgent.Status.Scale.Replicas" instead.' format: int32 type: integer scale: - description: Scale is the OpenTelemetryCollector's scale subresource + description: Scale is the AmazonCloudWatchAgent's scale subresource status. properties: replicas: description: The total number non-terminated pods targeted by - this OpenTelemetryCollector's deployment or statefulSet. + this AmazonCloudWatchAgent's deployment or statefulSet. format: int32 type: integer selector: - description: The selector used to match the OpenTelemetryCollector's + description: The selector used to match the AmazonCloudWatchAgent's deployment or statefulSet pods. type: string statusReplicas: description: StatusReplicas is the number of pods targeted by - this OpenTelemetryCollector's with a Ready Condition / Total - number of non-terminated pods targeted by this OpenTelemetryCollector's + this AmazonCloudWatchAgent's with a Ready Condition / Total + number of non-terminated pods targeted by this AmazonCloudWatchAgent's (their labels matc type: string type: object diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml index ffeabae85..833b9ea46 100644 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml @@ -6,22 +6,22 @@ metadata: capabilities: Deep Insights categories: Logging & Tracing,Monitoring certified: "false" - containerImage: ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator + containerImage: ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator createdAt: "2020-12-16T13:37:00+00:00" description: Provides the OpenTelemetry components, including the Collector repository: github.com/aws/amazon-cloudwatch-agent-operator support: OpenTelemetry Community - name: opentelemetry-operator.v0.0.0 + name: amazon-cloudwatch-agent-operator.v0.0.0 namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + - description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. displayName: OpenTelemetry Collector - kind: OpenTelemetryCollector - name: opentelemetrycollectors.core.opentelemetry.io + kind: AmazonCloudWatchAgent + name: amazoncloudwatchagents.core.opentelemetry.io version: v1alpha1 - description: Instrumentation is the spec for OpenTelemetry instrumentation. displayName: OpenTelemetry Instrumentation @@ -50,11 +50,11 @@ spec: name: "" version: v1 version: v1alpha1 - - description: OpenTelemetryCollector is the Schema for the opentelemetrycollectors + - description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. displayName: OpenTelemetry Collector - kind: OpenTelemetryCollector - name: opentelemetrycollectors.opentelemetry.io + kind: AmazonCloudWatchAgent + name: amazoncloudwatchagents.opentelemetry.io resources: - kind: ConfigMaps name: "" diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 6e5f438a2..c4f803ac8 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: - app.kubernetes.io/name: opentelemetry-operator + app.kubernetes.io/name: amazon-cloudwatch-agent-operator control-plane: controller-manager name: controller-manager-metrics-monitor namespace: system @@ -19,8 +19,8 @@ spec: ca: secret: key: ca.crt - name: opentelemetry-operator-controller-manager-service-cert + name: amazon-cloudwatch-agent-operator-controller-manager-service-cert selector: matchLabels: - app.kubernetes.io/name: opentelemetry-operator + app.kubernetes.io/name: amazon-cloudwatch-agent-operator control-plane: controller-manager diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 09d018a85..080d9201f 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -140,7 +140,7 @@ rules: - apiGroups: - opentelemetry.io resources: - - opentelemetrycollectors + - amazoncloudwatchagents verbs: - get - list @@ -150,7 +150,7 @@ rules: - apiGroups: - opentelemetry.io resources: - - opentelemetrycollectors/finalizers + - amazoncloudwatchagents/finalizers verbs: - get - patch @@ -158,7 +158,7 @@ rules: - apiGroups: - opentelemetry.io resources: - - opentelemetrycollectors/status + - amazoncloudwatchagents/status verbs: - get - patch diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index ac743c476..b839ced73 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -10,7 +10,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-opentelemetry-io-v1alpha1-instrumentation + path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Fail name: minstrumentation.kb.io rules: @@ -30,7 +30,7 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-opentelemetry-io-v1alpha1-opampbridge + path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge failurePolicy: Fail name: mopampbridge.kb.io rules: @@ -50,9 +50,9 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector + path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Fail - name: mopentelemetrycollector.kb.io + name: mamazoncloudwatchagent.kb.io rules: - apiGroups: - opentelemetry.io @@ -62,7 +62,7 @@ webhooks: - CREATE - UPDATE resources: - - opentelemetrycollectors + - amazoncloudwatchagents sideEffects: None - admissionReviewVersions: - v1 @@ -96,7 +96,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-instrumentation + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Fail name: vinstrumentationcreateupdate.kb.io rules: @@ -116,7 +116,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-instrumentation + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Ignore name: vinstrumentationdelete.kb.io rules: @@ -135,7 +135,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-opampbridge + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge failurePolicy: Fail name: vopampbridgecreateupdate.kb.io rules: @@ -155,7 +155,7 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-opampbridge + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge failurePolicy: Ignore name: vopampbridgedelete.kb.io rules: @@ -174,9 +174,9 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Fail - name: vopentelemetrycollectorcreateupdate.kb.io + name: vamazoncloudwatchagentcreateupdate.kb.io rules: - apiGroups: - opentelemetry.io @@ -186,7 +186,7 @@ webhooks: - CREATE - UPDATE resources: - - opentelemetrycollectors + - amazoncloudwatchagents sideEffects: None - admissionReviewVersions: - v1 @@ -194,9 +194,9 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Ignore - name: vopentelemetrycollectordelete.kb.io + name: vamazoncloudwatchagentdelete.kb.io rules: - apiGroups: - opentelemetry.io @@ -205,5 +205,5 @@ webhooks: operations: - DELETE resources: - - opentelemetrycollectors + - amazoncloudwatchagents sideEffects: None diff --git a/controllers/builder_test.go b/controllers/builder_test.go index e28a86de8..46118574d 100644 --- a/controllers/builder_test.go +++ b/controllers/builder_test.go @@ -28,7 +28,7 @@ import ( var ( selectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", @@ -43,7 +43,7 @@ var ( var ( opampbridgeSelectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", @@ -52,7 +52,7 @@ var ( var ( taSelectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", @@ -74,7 +74,7 @@ service: ` one := int32(1) type args struct { - instance v1alpha1.OpenTelemetryCollector + instance v1alpha1.AmazonCloudWatchAgent } tests := []struct { name string @@ -85,12 +85,12 @@ service: { name: "base case", args: args{ - instance: v1alpha1.OpenTelemetryCollector{ + instance: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, Mode: "deployment", Image: "test", @@ -107,16 +107,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: appsv1.DeploymentSpec{ @@ -129,16 +129,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: corev1.PodSpec{ @@ -211,7 +211,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -229,7 +229,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -244,7 +244,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -269,7 +269,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -298,7 +298,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector-monitoring", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -321,12 +321,12 @@ service: { name: "ingress", args: args{ - instance: v1alpha1.OpenTelemetryCollector{ + instance: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, Mode: "deployment", Image: "test", @@ -350,16 +350,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: appsv1.DeploymentSpec{ @@ -372,16 +372,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: corev1.PodSpec{ @@ -454,7 +454,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -472,7 +472,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -487,7 +487,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -512,7 +512,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -541,7 +541,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector-monitoring", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -564,7 +564,7 @@ service: Namespace: "test", Labels: map[string]string{ "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-ingress", }, Annotations: map[string]string{ @@ -603,12 +603,12 @@ service: { name: "specified service account case", args: args{ - instance: v1alpha1.OpenTelemetryCollector{ + instance: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, Mode: "deployment", Image: "test", @@ -626,16 +626,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: appsv1.DeploymentSpec{ @@ -648,16 +648,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: corev1.PodSpec{ @@ -730,7 +730,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -748,7 +748,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -773,7 +773,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -802,7 +802,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector-monitoring", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -895,7 +895,7 @@ func TestBuildAll_OpAMPBridge(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -911,7 +911,7 @@ func TestBuildAll_OpAMPBridge(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -971,7 +971,7 @@ func TestBuildAll_OpAMPBridge(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1008,7 +1008,7 @@ endpoint: ws://opamp-server:4320/v1/opamp Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1023,7 +1023,7 @@ endpoint: ws://opamp-server:4320/v1/opamp Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1095,7 +1095,7 @@ service: ` one := int32(1) type args struct { - instance v1alpha1.OpenTelemetryCollector + instance v1alpha1.AmazonCloudWatchAgent } tests := []struct { name string @@ -1107,12 +1107,12 @@ service: { name: "base case", args: args{ - instance: v1alpha1.OpenTelemetryCollector{ + instance: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, Mode: "statefulset", Image: "test", @@ -1135,16 +1135,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: appsv1.StatefulSetSpec{ @@ -1158,16 +1158,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: corev1.PodSpec{ @@ -1240,7 +1240,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1258,7 +1258,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1273,7 +1273,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector-monitoring", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1297,7 +1297,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1305,7 +1305,7 @@ service: Annotations: nil, }, Data: map[string]string{ - "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: opentelemetry-operator\n app.kubernetes.io/part-of: opentelemetry\n", + "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator\n app.kubernetes.io/part-of: opentelemetry\n", }, }, &appsv1.Deployment{ @@ -1315,7 +1315,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1331,7 +1331,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1421,7 +1421,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1435,7 +1435,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1462,12 +1462,12 @@ service: { name: "enable metrics case", args: args{ - instance: v1alpha1.OpenTelemetryCollector{ + instance: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "test", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, Mode: "statefulset", Image: "test", @@ -1495,16 +1495,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: appsv1.StatefulSetSpec{ @@ -1518,16 +1518,16 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", }, Annotations: map[string]string{ - "opentelemetry-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", }, }, Spec: corev1.PodSpec{ @@ -1600,7 +1600,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1618,7 +1618,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1633,7 +1633,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-collector-monitoring", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1657,7 +1657,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1665,7 +1665,7 @@ service: Annotations: nil, }, Data: map[string]string{ - "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: opentelemetry-operator\n app.kubernetes.io/part-of: opentelemetry\n", + "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator\n app.kubernetes.io/part-of: opentelemetry\n", }, }, &appsv1.Deployment{ @@ -1675,7 +1675,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1691,7 +1691,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1781,7 +1781,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1795,7 +1795,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1823,7 +1823,7 @@ service: Labels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -1838,7 +1838,7 @@ service: MatchLabels: map[string]string{ "app.kubernetes.io/component": "opentelemetry-targetallocator", "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "test-targetallocator", "app.kubernetes.io/part-of": "opentelemetry", }, diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go index 2fd73d968..5cd8b282d 100644 --- a/controllers/opampbridge_controller_test.go +++ b/controllers/opampbridge_controller_test.go @@ -89,7 +89,7 @@ func TestNewObjectsOnReconciliation_OpAMPBridge(t *testing.T) { client.InNamespace(nsn.Namespace), client.MatchingLabels(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/component": "opentelemetry-opamp-bridge", }), } diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 17de024c9..0ea94cb70 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -26,8 +26,8 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) -// OpenTelemetryCollectorReconciler reconciles a OpenTelemetryCollector object. -type OpenTelemetryCollectorReconciler struct { +// AmazonCloudWatchAgentReconciler reconciles a AmazonCloudWatchAgent object. +type AmazonCloudWatchAgentReconciler struct { client.Client recorder record.EventRecorder scheme *runtime.Scheme @@ -35,7 +35,7 @@ type OpenTelemetryCollectorReconciler struct { config config.Config } -// Params is the set of options to build a new OpenTelemetryCollectorReconciler. +// Params is the set of options to build a new AmazonCloudWatchAgentReconciler. type Params struct { client.Client Recorder record.EventRecorder @@ -44,7 +44,7 @@ type Params struct { Config config.Config } -func (r *OpenTelemetryCollectorReconciler) getParams(instance v1alpha1.OpenTelemetryCollector) manifests.Params { +func (r *AmazonCloudWatchAgentReconciler) getParams(instance v1alpha1.AmazonCloudWatchAgent) manifests.Params { return manifests.Params{ Config: r.config, Client: r.Client, @@ -55,9 +55,9 @@ func (r *OpenTelemetryCollectorReconciler) getParams(instance v1alpha1.OpenTelem } } -// NewReconciler creates a new reconciler for OpenTelemetryCollector objects. -func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { - r := &OpenTelemetryCollectorReconciler{ +// NewReconciler creates a new reconciler for AmazonCloudWatchAgent objects. +func NewReconciler(p Params) *AmazonCloudWatchAgentReconciler { + r := &AmazonCloudWatchAgentReconciler{ Client: p.Client, log: p.Log, scheme: p.Scheme, @@ -76,18 +76,18 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors;podmonitors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;update;patch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=get;list;watch;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents/finalizers,verbs=get;update;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state. -func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - log := r.log.WithValues("opentelemetrycollector", req.NamespacedName) +func (r *AmazonCloudWatchAgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + log := r.log.WithValues("amazoncloudwatchagent", req.NamespacedName) - var instance v1alpha1.OpenTelemetryCollector + var instance v1alpha1.AmazonCloudWatchAgent if err := r.Get(ctx, req.NamespacedName, &instance); err != nil { if !apierrors.IsNotFound(err) { - log.Error(err, "unable to fetch OpenTelemetryCollector") + log.Error(err, "unable to fetch AmazonCloudWatchAgent") } // we'll ignore not-found errors, since they can't be fixed by an immediate @@ -101,8 +101,8 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct } if instance.Spec.ManagementState == v1alpha1.ManagementStateUnmanaged { - log.Info("Skipping reconciliation for unmanaged OpenTelemetryCollector resource", "name", req.String()) - // Stop requeueing for unmanaged OpenTelemetryCollector custom resources + log.Info("Skipping reconciliation for unmanaged AmazonCloudWatchAgent resource", "name", req.String()) + // Stop requeueing for unmanaged AmazonCloudWatchAgent custom resources return ctrl.Result{}, nil } @@ -117,9 +117,9 @@ func (r *OpenTelemetryCollectorReconciler) Reconcile(ctx context.Context, req ct } // SetupWithManager tells the manager what our controller is interested in. -func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) error { +func (r *AmazonCloudWatchAgentReconciler) SetupWithManager(mgr ctrl.Manager) error { builder := ctrl.NewControllerManagedBy(mgr). - For(&v1alpha1.OpenTelemetryCollector{}). + For(&v1alpha1.AmazonCloudWatchAgent{}). Owns(&corev1.ConfigMap{}). Owns(&corev1.ServiceAccount{}). Owns(&corev1.Service{}). diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go index 1cc7ce71d..75d92702b 100644 --- a/controllers/reconcile_test.go +++ b/controllers/reconcile_test.go @@ -67,7 +67,7 @@ func newParamsAssertNoErr(t *testing.T, taContainerImage string, file string) ma return p } -func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { +func TestAmazonCloudWatchAgentReconciler_Reconcile(t *testing.T) { addedMetadataDeployment := paramsWithMode(v1alpha1.ModeDeployment) addedMetadataDeployment.OtelCol.Labels = map[string]string{ labelName: labelVal, @@ -434,7 +434,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { taConfig := make(map[interface{}]interface{}) taConfig["label_selector"] = map[string]string{ "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/part-of": "opentelemetry", } @@ -498,7 +498,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { result: controllerruntime.Result{}, checks: []check{ func(t *testing.T, params manifests.Params) { - o := v1alpha1.OpenTelemetryCollector{} + o := v1alpha1.AmazonCloudWatchAgent{} exists, err := populateObjectIfExists(t, &o, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) assert.NoError(t, err) assert.False(t, exists) // There should be no collector anymore @@ -554,7 +554,7 @@ func TestOpenTelemetryCollectorReconciler_Reconcile(t *testing.T) { // run the next set of checks for pid, updateParam := range tt.args.updates { updateParam := updateParam - existing := v1alpha1.OpenTelemetryCollector{} + existing := v1alpha1.AmazonCloudWatchAgent{} found, err := populateObjectIfExists(t, &existing, nsn) assert.True(t, found) assert.NoError(t, err) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 651439bcd..96a1e5ae9 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -210,17 +210,17 @@ func paramsWithModeAndReplicas(mode v1alpha1.Mode, replicas int32) manifests.Par return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "default", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", Ports: []v1.ServicePort{{ Name: "web", Port: 80, @@ -260,16 +260,16 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ Name: "test", Namespace: "default", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeStatefulSet, Ports: []v1.ServicePort{{ Name: "web", @@ -306,9 +306,9 @@ func paramsWithHPA(minReps, maxReps int32) manifests.Params { return manifests.Params{ Config: configuration, Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ @@ -316,7 +316,7 @@ func paramsWithHPA(minReps, maxReps int32) manifests.Params { Namespace: "default", UID: instanceUID, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ports: []v1.ServicePort{{ Name: "web", Port: 80, @@ -372,9 +372,9 @@ func paramsWithPolicy(minAvailable, maxUnavailable int32) manifests.Params { return manifests.Params{ Config: configuration, Client: k8sClient, - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ @@ -382,7 +382,7 @@ func paramsWithPolicy(minAvailable, maxUnavailable int32) manifests.Params { Namespace: "default", UID: instanceUID, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ports: []v1.ServicePort{{ Name: "web", Port: 80, @@ -408,7 +408,7 @@ func opampBridgeParams() manifests.Params { Client: k8sClient, OpAMPBridge: v1alpha1.OpAMPBridge{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/annotations.go b/internal/manifests/collector/annotations.go index c82ae39d4..3c610fda6 100644 --- a/internal/manifests/collector/annotations.go +++ b/internal/manifests/collector/annotations.go @@ -10,8 +10,8 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) -// Annotations return the annotations for OpenTelemetryCollector pod. -func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { +// Annotations return the annotations for AmazonCloudWatchAgent pod. +func Annotations(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { // new map every time, so that we don't touch the instance's annotations annotations := map[string]string{} @@ -27,13 +27,13 @@ func Annotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { } } // make sure sha256 for configMap is always calculated - annotations["opentelemetry-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) + annotations["amazon-cloudwatch-agent-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) return annotations } -// PodAnnotations return the spec annotations for OpenTelemetryCollector pod. -func PodAnnotations(instance v1alpha1.OpenTelemetryCollector) map[string]string { +// PodAnnotations return the spec annotations for AmazonCloudWatchAgent pod. +func PodAnnotations(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { // new map every time, so that we don't touch the instance's annotations podAnnotations := map[string]string{} @@ -50,7 +50,7 @@ func PodAnnotations(instance v1alpha1.OpenTelemetryCollector) map[string]string } // make sure sha256 for configMap is always calculated - podAnnotations["opentelemetry-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) + podAnnotations["amazon-cloudwatch-agent-operator-config/sha256"] = getConfigMapSHA(instance.Spec.Config) return podAnnotations } diff --git a/internal/manifests/collector/annotations_test.go b/internal/manifests/collector/annotations_test.go index d91a9d188..992fa59d9 100644 --- a/internal/manifests/collector/annotations_test.go +++ b/internal/manifests/collector/annotations_test.go @@ -14,12 +14,12 @@ import ( func TestDefaultAnnotations(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-ns", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "test", }, } @@ -32,27 +32,27 @@ func TestDefaultAnnotations(t *testing.T) { assert.Equal(t, "true", annotations["prometheus.io/scrape"]) assert.Equal(t, "8888", annotations["prometheus.io/port"]) assert.Equal(t, "/metrics", annotations["prometheus.io/path"]) - assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["amazon-cloudwatch-agent-operator-config/sha256"]) //verify propagation from metadata.annotations to spec.template.spec.metadata.annotations assert.Equal(t, "true", podAnnotations["prometheus.io/scrape"]) assert.Equal(t, "8888", podAnnotations["prometheus.io/port"]) assert.Equal(t, "/metrics", podAnnotations["prometheus.io/path"]) - assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["opentelemetry-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["amazon-cloudwatch-agent-operator-config/sha256"]) } func TestUserAnnotations(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-ns", Annotations: map[string]string{"prometheus.io/scrape": "false", - "prometheus.io/port": "1234", - "prometheus.io/path": "/test", - "opentelemetry-operator-config/sha256": "shouldBeOverwritten", + "prometheus.io/port": "1234", + "prometheus.io/path": "/test", + "amazon-cloudwatch-agent-operator-config/sha256": "shouldBeOverwritten", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "test", }, } @@ -65,17 +65,17 @@ func TestUserAnnotations(t *testing.T) { assert.Equal(t, "false", annotations["prometheus.io/scrape"]) assert.Equal(t, "1234", annotations["prometheus.io/port"]) assert.Equal(t, "/test", annotations["prometheus.io/path"]) - assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["opentelemetry-operator-config/sha256"]) - assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["opentelemetry-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", annotations["amazon-cloudwatch-agent-operator-config/sha256"]) + assert.Equal(t, "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", podAnnotations["amazon-cloudwatch-agent-operator-config/sha256"]) } func TestAnnotationsPropagateDown(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{"myapp": "mycomponent"}, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodAnnotations: map[string]string{"pod_annotation": "pod_annotation_value"}, }, } diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index a40e35084..ff2feb490 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -12,7 +12,7 @@ import ( ) const ( - ComponentOpenTelemetryCollector = "opentelemetry-collector" + ComponentAmazonCloudWatchAgent = "opentelemetry-collector" ) // Build creates the manifest for the collector resource. diff --git a/internal/manifests/collector/config_replace.go b/internal/manifests/collector/config_replace.go index 4a05de6bf..2b85f714f 100644 --- a/internal/manifests/collector/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -31,7 +31,7 @@ type Config struct { TargetAllocConfig *targetAllocator `yaml:"target_allocator,omitempty"` } -func ReplaceConfig(instance v1alpha1.OpenTelemetryCollector) (string, error) { +func ReplaceConfig(instance v1alpha1.AmazonCloudWatchAgent) (string, error) { // Check if TargetAllocator is enabled, if not, return the original config if !instance.Spec.TargetAllocator.Enabled { return instance.Spec.Config, nil diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 0144bf1c4..57af69ad2 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -14,7 +14,7 @@ import ( func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { name := naming.ConfigMap(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) replacedConf, err := ReplaceConfig(params.OtelCol) if err != nil { diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 460440f41..06e9dfad7 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -15,7 +15,7 @@ import ( func TestDesiredConfigMap(t *testing.T) { expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": "default.test", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "0.47.0", diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 4394b6082..96eedc655 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -25,7 +25,7 @@ import ( const maxPortLen = 15 // Container builds a container for the given collector. -func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, addConfig bool) corev1.Container { +func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent, addConfig bool) corev1.Container { image := otelcol.Spec.Image if len(image) == 0 { image = cfg.CollectorImage() @@ -52,11 +52,11 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem } // defines the output (sorted) array for final output var args []string - // When adding a config via v1alpha1.OpenTelemetryCollectorSpec.Config, we ensure that it is always the + // When adding a config via v1alpha1.AmazonCloudWatchAgentSpec.Config, we ensure that it is always the // first item in the args. At the time of writing, although multiple configs are allowed in the // opentelemetry collector, the operator has yet to implement such functionality. When multiple configs // are present they should be merged in a deterministic manner using the order given, and because - // v1alpha1.OpenTelemetryCollectorSpec.Config is a required field we assume that it will always be the + // v1alpha1.AmazonCloudWatchAgentSpec.Config is a required field we assume that it will always be the // "primary" config and in the future additional configs can be appended to the container args in a simple manner. if addConfig { // if key exists then delete key and excluded from the iteration after this block @@ -72,7 +72,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelem }) } - // ensure that the v1alpha1.OpenTelemetryCollectorSpec.Args are ordered when moved to container.Args, + // ensure that the v1alpha1.AmazonCloudWatchAgentSpec.Args are ordered when moved to container.Args, // where iterating over a map does not guarantee, so that reconcile will not be fooled by different // ordering in args. var sortedArgs []string diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index c12a500ad..9310bbec3 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -41,8 +41,8 @@ func TestContainerNewDefault(t *testing.T) { receivers: [otlp] exporters: [debug]` - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ports: []corev1.ServicePort{ { Name: "metrics", @@ -65,8 +65,8 @@ func TestContainerNewDefault(t *testing.T) { func TestContainerWithImageOverridden(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Image: "overridden-image", }, } @@ -339,8 +339,8 @@ service: for _, testCase := range tests { t.Run(testCase.description, func(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: testCase.specConfig, Ports: testCase.specPorts, }, @@ -358,8 +358,8 @@ service: func TestContainerConfigFlagIsIgnored(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ "key": "value", "config": "/some-custom-file.yaml", @@ -379,8 +379,8 @@ func TestContainerConfigFlagIsIgnored(t *testing.T) { func TestContainerCustomVolumes(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ VolumeMounts: []corev1.VolumeMount{{ Name: "custom-volume-mount", }}, @@ -398,8 +398,8 @@ func TestContainerCustomVolumes(t *testing.T) { func TestContainerCustomConfigMapsVolumes(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ ConfigMaps: []v1alpha1.ConfigMapsSpec{{ Name: "test", MountPath: "/", @@ -424,7 +424,7 @@ func TestContainerCustomConfigMapsVolumes(t *testing.T) { func TestContainerCustomSecurityContext(t *testing.T) { // default config without security context - c1 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{Spec: v1alpha1.OpenTelemetryCollectorSpec{}}, true) + c1 := Container(config.New(), logger, v1alpha1.AmazonCloudWatchAgent{Spec: v1alpha1.AmazonCloudWatchAgentSpec{}}, true) // verify assert.Nil(t, c1.SecurityContext) @@ -434,8 +434,8 @@ func TestContainerCustomSecurityContext(t *testing.T) { uid := int64(1234) // test - c2 := Container(config.New(), logger, v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + c2 := Container(config.New(), logger, v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ SecurityContext: &corev1.SecurityContext{ Privileged: &isPrivileged, RunAsUser: &uid, @@ -450,8 +450,8 @@ func TestContainerCustomSecurityContext(t *testing.T) { } func TestContainerEnvVarsOverridden(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Env: []corev1.EnvVar{ { Name: "foo", @@ -473,8 +473,8 @@ func TestContainerEnvVarsOverridden(t *testing.T) { } func TestContainerDefaultEnvVars(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New() @@ -491,8 +491,8 @@ func TestContainerProxyEnvVars(t *testing.T) { err := os.Setenv("NO_PROXY", "localhost") require.NoError(t, err) defer os.Unsetenv("NO_PROXY") - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New() @@ -508,8 +508,8 @@ func TestContainerProxyEnvVars(t *testing.T) { } func TestContainerResourceRequirements(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Resources: corev1.ResourceRequirements{ Limits: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("100m"), @@ -536,8 +536,8 @@ func TestContainerResourceRequirements(t *testing.T) { } func TestContainerDefaultResourceRequirements(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New() @@ -551,8 +551,8 @@ func TestContainerDefaultResourceRequirements(t *testing.T) { func TestContainerArgs(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ "metrics-level": "detailed", "log-level": "debug", @@ -571,8 +571,8 @@ func TestContainerArgs(t *testing.T) { func TestContainerOrderedArgs(t *testing.T) { // prepare a scenario where the debug level and a feature gate has been enabled - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ "log-level": "debug", "feature-gates": "+random-feature", @@ -593,8 +593,8 @@ func TestContainerOrderedArgs(t *testing.T) { func TestContainerImagePullPolicy(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ ImagePullPolicy: corev1.PullIfNotPresent, }, } @@ -623,8 +623,8 @@ func TestContainerEnvFrom(t *testing.T) { }, }, } - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ EnvFrom: []corev1.EnvFromSource{ envFrom1, envFrom2, @@ -649,8 +649,8 @@ func TestContainerProbe(t *testing.T) { successThreshold := int32(13) failureThreshold := int32(14) terminationGracePeriodSeconds := int64(15) - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `extensions: health_check: service: @@ -686,8 +686,8 @@ service: func TestContainerProbeEmptyConfig(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `extensions: health_check: service: @@ -709,8 +709,8 @@ service: func TestContainerProbeNoConfig(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `extensions: health_check: service: @@ -730,8 +730,8 @@ service: func TestContainerLifecycle(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Lifecycle: &corev1.Lifecycle{ PostStart: &corev1.LifecycleHandler{ Exec: &corev1.ExecAction{Command: []string{"sh", "sleep 100"}}, diff --git a/internal/manifests/collector/daemonset.go b/internal/manifests/collector/daemonset.go index a9ed5e3f5..3cc64265f 100644 --- a/internal/manifests/collector/daemonset.go +++ b/internal/manifests/collector/daemonset.go @@ -16,7 +16,7 @@ import ( // DaemonSet builds the deployment for the given instance. func DaemonSet(params manifests.Params) *appsv1.DaemonSet { name := naming.Collector(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -29,7 +29,7 @@ func DaemonSet(params manifests.Params) *appsv1.DaemonSet { }, Spec: appsv1.DaemonSetSpec{ Selector: &metav1.LabelSelector{ - MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/daemonset_test.go b/internal/manifests/collector/daemonset_test.go index 8039ecfeb..cb0b034dc 100644 --- a/internal/manifests/collector/daemonset_test.go +++ b/internal/manifests/collector/daemonset_test.go @@ -22,12 +22,12 @@ func TestDaemonSetNewDefault(t *testing.T) { // prepare params := manifests.Params{ Config: config.New(), - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Tolerations: testTolerationValues, }, }, @@ -49,17 +49,17 @@ func TestDaemonSetNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) expectedLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "my-instance-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -69,7 +69,7 @@ func TestDaemonSetNewDefault(t *testing.T) { expectedSelectorLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", } assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) @@ -83,12 +83,12 @@ func TestDaemonSetNewDefault(t *testing.T) { func TestDaemonsetHostNetwork(t *testing.T) { params1 := manifests.Params{ Config: config.New(), - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, }, Log: logger, } @@ -100,12 +100,12 @@ func TestDaemonsetHostNetwork(t *testing.T) { // verify custom params2 := manifests.Params{ Config: config.New(), - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, }, }, @@ -119,11 +119,11 @@ func TestDaemonsetHostNetwork(t *testing.T) { func TestDaemonsetPodAnnotations(t *testing.T) { // prepare testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodAnnotations: testPodAnnotationValues, }, } @@ -139,14 +139,14 @@ func TestDaemonsetPodAnnotations(t *testing.T) { ds := DaemonSet(params) // Add sha256 podAnnotation - testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + testPodAnnotationValues["amazon-cloudwatch-agent-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" expectedAnnotations := map[string]string{ - "annotation-key": "annotation-value", - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "annotation-key": "annotation-value", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } // verify @@ -160,11 +160,11 @@ func TestDaemonstPodSecurityContext(t *testing.T) { runAsUser := int64(1337) runasGroup := int64(1338) - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodSecurityContext: &v1.PodSecurityContext{ RunAsNonRoot: &runAsNonRoot, RunAsUser: &runAsUser, @@ -194,12 +194,12 @@ func TestDaemonsetFilterLabels(t *testing.T) { "app.foo.bar": "1", } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Labels: excludedLabels, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) @@ -220,7 +220,7 @@ func TestDaemonsetFilterLabels(t *testing.T) { func TestDaemonSetNodeSelector(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -239,11 +239,11 @@ func TestDaemonSetNodeSelector(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, NodeSelector: map[string]string{ "node-key": "node-value", @@ -264,7 +264,7 @@ func TestDaemonSetNodeSelector(t *testing.T) { } func TestDaemonSetPriorityClassName(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -283,11 +283,11 @@ func TestDaemonSetPriorityClassName(t *testing.T) { priorityClassName := "test-class" - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PriorityClassName: priorityClassName, }, } @@ -305,7 +305,7 @@ func TestDaemonSetPriorityClassName(t *testing.T) { } func TestDaemonSetAffinity(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -322,11 +322,11 @@ func TestDaemonSetAffinity(t *testing.T) { d1 := DaemonSet(params1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Affinity: testAffinityValue, }, } @@ -346,12 +346,12 @@ func TestDaemonSetAffinity(t *testing.T) { func TestDaemonSetInitContainer(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ InitContainers: []v1.Container{ { Name: "test", @@ -379,12 +379,12 @@ func TestDaemonSetInitContainer(t *testing.T) { func TestDaemonSetAdditionalContainer(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ AdditionalContainers: []v1.Container{ { Name: "test", @@ -413,12 +413,12 @@ func TestDaemonSetAdditionalContainer(t *testing.T) { func TestDaemonSetDefaultUpdateStrategy(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ Type: "RollingUpdate", RollingUpdate: &appsv1.RollingUpdateDaemonSet{ @@ -447,12 +447,12 @@ func TestDaemonSetDefaultUpdateStrategy(t *testing.T) { func TestDaemonSetOnDeleteUpdateStrategy(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ Type: "OnDelete", RollingUpdate: &appsv1.RollingUpdateDaemonSet{ diff --git a/internal/manifests/collector/deployment.go b/internal/manifests/collector/deployment.go index 38d2c5918..ebb800a2d 100644 --- a/internal/manifests/collector/deployment.go +++ b/internal/manifests/collector/deployment.go @@ -16,7 +16,7 @@ import ( // Deployment builds the deployment for the given instance. func Deployment(params manifests.Params) *appsv1.Deployment { name := naming.Collector(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -31,7 +31,7 @@ func Deployment(params manifests.Params) *appsv1.Deployment { Spec: appsv1.DeploymentSpec{ Replicas: params.OtelCol.Spec.Replicas, Selector: &metav1.LabelSelector{ - MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/deployment_test.go b/internal/manifests/collector/deployment_test.go index de7058007..892342a3d 100644 --- a/internal/manifests/collector/deployment_test.go +++ b/internal/manifests/collector/deployment_test.go @@ -57,12 +57,12 @@ var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ func TestDeploymentNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Tolerations: testTolerationValues, }, } @@ -89,17 +89,17 @@ func TestDeploymentNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, d.Spec.Template.Annotations) expectedLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "my-instance-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -109,7 +109,7 @@ func TestDeploymentNewDefault(t *testing.T) { expectedSelectorLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", } assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) @@ -123,11 +123,11 @@ func TestDeploymentNewDefault(t *testing.T) { func TestDeploymentPodAnnotations(t *testing.T) { // prepare testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodAnnotations: testPodAnnotationValues, }, } @@ -143,14 +143,14 @@ func TestDeploymentPodAnnotations(t *testing.T) { d := Deployment(params) // Add sha256 podAnnotation - testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + testPodAnnotationValues["amazon-cloudwatch-agent-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" expectedPodAnnotationValues := map[string]string{ - "annotation-key": "annotation-value", - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "annotation-key": "annotation-value", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } // verify @@ -164,11 +164,11 @@ func TestDeploymenttPodSecurityContext(t *testing.T) { runAsUser := int64(1337) runasGroup := int64(1338) - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodSecurityContext: &v1.PodSecurityContext{ RunAsNonRoot: &runAsNonRoot, RunAsUser: &runAsUser, @@ -194,7 +194,7 @@ func TestDeploymenttPodSecurityContext(t *testing.T) { func TestDeploymentHostNetwork(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -214,11 +214,11 @@ func TestDeploymentHostNetwork(t *testing.T) { assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // Test hostNetwork=true - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-hostnetwork", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, }, } @@ -242,12 +242,12 @@ func TestDeploymentFilterLabels(t *testing.T) { "app.foo.bar": "1", } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Labels: excludedLabels, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) @@ -268,7 +268,7 @@ func TestDeploymentFilterLabels(t *testing.T) { func TestDeploymentNodeSelector(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -287,11 +287,11 @@ func TestDeploymentNodeSelector(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, NodeSelector: map[string]string{ "node-key": "node-value", @@ -312,7 +312,7 @@ func TestDeploymentNodeSelector(t *testing.T) { } func TestDeploymentPriorityClassName(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -331,11 +331,11 @@ func TestDeploymentPriorityClassName(t *testing.T) { priorityClassName := "test-class" - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PriorityClassName: priorityClassName, }, } @@ -353,7 +353,7 @@ func TestDeploymentPriorityClassName(t *testing.T) { } func TestDeploymentAffinity(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -370,11 +370,11 @@ func TestDeploymentAffinity(t *testing.T) { d1 := Deployment(params1) assert.Nil(t, d1.Spec.Template.Spec.Affinity) - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Affinity: testAffinityValue, }, } @@ -393,7 +393,7 @@ func TestDeploymentAffinity(t *testing.T) { } func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -412,11 +412,11 @@ func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { gracePeriodSec := int64(60) - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-terminationGracePeriodSeconds", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TerminationGracePeriodSeconds: &gracePeriodSec, }, } @@ -436,12 +436,12 @@ func TestDeploymentTerminationGracePeriodSeconds(t *testing.T) { func TestDeploymentSetInitContainer(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ InitContainers: []v1.Container{ { Name: "test", @@ -469,7 +469,7 @@ func TestDeploymentSetInitContainer(t *testing.T) { func TestDeploymentTopologySpreadConstraints(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -487,11 +487,11 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) // Test TopologySpreadConstraints - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-topologyspreadconstraint", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TopologySpreadConstraints: testTopologySpreadConstraintValue, }, } @@ -512,12 +512,12 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { func TestDeploymentAdditionalContainers(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ AdditionalContainers: []v1.Container{ { Name: "test", diff --git a/internal/manifests/collector/horizontalpodautoscaler.go b/internal/manifests/collector/horizontalpodautoscaler.go index 2d24bc3ca..aab67eb0d 100644 --- a/internal/manifests/collector/horizontalpodautoscaler.go +++ b/internal/manifests/collector/horizontalpodautoscaler.go @@ -17,7 +17,7 @@ import ( func HorizontalPodAutoscaler(params manifests.Params) client.Object { name := naming.Collector(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) var result client.Object @@ -81,8 +81,8 @@ func HorizontalPodAutoscaler(params manifests.Params) client.Object { Spec: autoscalingv2.HorizontalPodAutoscalerSpec{ ScaleTargetRef: autoscalingv2.CrossVersionObjectReference{ APIVersion: v1alpha1.GroupVersion.String(), - Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollector(params.OtelCol.Name), + Kind: "AmazonCloudWatchAgent", + Name: naming.AmazonCloudWatchAgent(params.OtelCol.Name), }, MinReplicas: params.OtelCol.Spec.Autoscaler.MinReplicas, MaxReplicas: *params.OtelCol.Spec.Autoscaler.MaxReplicas, diff --git a/internal/manifests/collector/horizontalpodautoscaler_test.go b/internal/manifests/collector/horizontalpodautoscaler_test.go index 0aba2889d..b9a9e28da 100644 --- a/internal/manifests/collector/horizontalpodautoscaler_test.go +++ b/internal/manifests/collector/horizontalpodautoscaler_test.go @@ -29,12 +29,12 @@ func TestHPA(t *testing.T) { var cpuUtilization int32 = 66 var memoryUtilization int32 = 77 - otelcols := []v1alpha1.OpenTelemetryCollector{ + otelcols := []v1alpha1.AmazonCloudWatchAgent{ { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Autoscaler: &v1alpha1.AutoscalerSpec{ MinReplicas: &minReplicas, MaxReplicas: &maxReplicas, @@ -47,7 +47,7 @@ func TestHPA(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ MinReplicas: &minReplicas, MaxReplicas: &maxReplicas, Autoscaler: &v1alpha1.AutoscalerSpec{ diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index f5111d774..c11682cbf 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -50,7 +50,7 @@ func Ingress(params manifests.Params) (*networkingv1.Ingress, error) { Labels: map[string]string{ "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: networkingv1.IngressSpec{ @@ -125,7 +125,7 @@ func createSubdomainIngressRules(otelcol string, hostname string, ports []corev1 return rules } -func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) ([]corev1.ServicePort, error) { +func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) ([]corev1.ServicePort, error) { configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { logger.Error(err, "couldn't extract the configuration from the context") diff --git a/internal/manifests/collector/ingress_test.go b/internal/manifests/collector/ingress_test.go index 9dc1b31ec..85565fbeb 100644 --- a/internal/manifests/collector/ingress_test.go +++ b/internal/manifests/collector/ingress_test.go @@ -26,8 +26,8 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressType("unknown"), }, @@ -44,8 +44,8 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "!!!", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeNginx, @@ -64,8 +64,8 @@ func TestDesiredIngresses(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "---", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeNginx, @@ -113,7 +113,7 @@ func TestDesiredIngresses(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: networkingv1.IngressSpec{ @@ -202,7 +202,7 @@ func TestDesiredIngresses(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/name": naming.Ingress(params.OtelCol.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: networkingv1.IngressSpec{ diff --git a/internal/manifests/collector/poddisruptionbudget.go b/internal/manifests/collector/poddisruptionbudget.go index 427fe83d0..8f69341ce 100644 --- a/internal/manifests/collector/poddisruptionbudget.go +++ b/internal/manifests/collector/poddisruptionbudget.go @@ -20,7 +20,7 @@ func PodDisruptionBudget(params manifests.Params) *policyV1.PodDisruptionBudget } name := naming.Collector(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) objectMeta := metav1.ObjectMeta{ diff --git a/internal/manifests/collector/poddisruptionbudget_test.go b/internal/manifests/collector/poddisruptionbudget_test.go index 4bae8b4f4..71084637e 100644 --- a/internal/manifests/collector/poddisruptionbudget_test.go +++ b/internal/manifests/collector/poddisruptionbudget_test.go @@ -53,7 +53,7 @@ func TestPDB(t *testing.T) { }, } - otelcols := []v1alpha1.OpenTelemetryCollector{ + otelcols := []v1alpha1.AmazonCloudWatchAgent{ { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", diff --git a/internal/manifests/collector/podmonitor.go b/internal/manifests/collector/podmonitor.go index 359c4696d..0db4ef908 100644 --- a/internal/manifests/collector/podmonitor.go +++ b/internal/manifests/collector/podmonitor.go @@ -39,7 +39,7 @@ func PodMonitor(params manifests.Params) (*monitoringv1.PodMonitor, error) { Labels: map[string]string{ "app.kubernetes.io/name": naming.PodMonitor(params.OtelCol.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: monitoringv1.PodMonitorSpec{ @@ -50,7 +50,7 @@ func PodMonitor(params manifests.Params) (*monitoringv1.PodMonitor, error) { }, Selector: metav1.LabelSelector{ MatchLabels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), }, }, @@ -66,7 +66,7 @@ func PodMonitor(params manifests.Params) (*monitoringv1.PodMonitor, error) { return &pm, nil } -func metricsEndpointsFromConfig(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []monitoringv1.PodMetricsEndpoint { +func metricsEndpointsFromConfig(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) []monitoringv1.PodMetricsEndpoint { config, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { logger.V(2).Error(err, "Error while parsing the configuration") diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index 2265ab7c3..739f13c64 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -68,7 +68,7 @@ func Routes(params manifests.Params) ([]*routev1.Route, error) { Labels: map[string]string{ "app.kubernetes.io/name": naming.Route(params.OtelCol.Name, p.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/component": "opentelemetry-collector", }, }, diff --git a/internal/manifests/collector/route_test.go b/internal/manifests/collector/route_test.go index 90efcdaf3..5be8e0beb 100644 --- a/internal/manifests/collector/route_test.go +++ b/internal/manifests/collector/route_test.go @@ -25,8 +25,8 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressType("unknown"), }, @@ -43,8 +43,8 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "!!!", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, @@ -65,8 +65,8 @@ func TestDesiredRoutes(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: "---", Ingress: v1alpha1.Ingress{ Type: v1alpha1.IngressTypeRoute, @@ -116,7 +116,7 @@ func TestDesiredRoutes(t *testing.T) { Labels: map[string]string{ "app.kubernetes.io/name": naming.Route(params.OtelCol.Name, ""), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/component": "opentelemetry-collector", }, }, diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 3f8692191..9dafbb481 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -48,7 +48,7 @@ func HeadlessService(params manifests.Params) (*corev1.Service, error) { func MonitoringService(params manifests.Params) (*corev1.Service, error) { name := naming.MonitoringService(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) c, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) if err != nil { @@ -69,7 +69,7 @@ func MonitoringService(params manifests.Params) (*corev1.Service, error) { Annotations: params.OtelCol.Annotations, }, Spec: corev1.ServiceSpec{ - Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), ClusterIP: "", Ports: []corev1.ServicePort{{ Name: "monitoring", @@ -81,7 +81,7 @@ func MonitoringService(params manifests.Params) (*corev1.Service, error) { func Service(params manifests.Params) (*corev1.Service, error) { name := naming.Service(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) configFromString, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) if err != nil { @@ -143,7 +143,7 @@ func Service(params manifests.Params) (*corev1.Service, error) { }, Spec: corev1.ServiceSpec{ InternalTrafficPolicy: &trafficPolicy, - Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/service_test.go b/internal/manifests/collector/service_test.go index 0ee00dc31..5bf80a7cc 100644 --- a/internal/manifests/collector/service_test.go +++ b/internal/manifests/collector/service_test.go @@ -88,8 +88,8 @@ func TestDesiredService(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `receivers: + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{Config: `receivers: test: protocols: unknown:`}, @@ -164,8 +164,8 @@ func TestDesiredService(t *testing.T) { params := manifests.Params{ Config: config.Config{}, Log: logger, - OtelCol: v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{Config: `!!!`}, + OtelCol: v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{Config: `!!!`}, }, } @@ -226,7 +226,7 @@ func service(name string, ports []v1.ServicePort) v1.Service { func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, internalTrafficPolicy v1.ServiceInternalTrafficPolicyType) v1.Service { params := deploymentParams() - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) return v1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -237,7 +237,7 @@ func serviceWithInternalTrafficPolicy(name string, ports []v1.ServicePort, inter }, Spec: v1.ServiceSpec{ InternalTrafficPolicy: &internalTrafficPolicy, - Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + Selector: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), ClusterIP: "", Ports: ports, }, diff --git a/internal/manifests/collector/serviceaccount.go b/internal/manifests/collector/serviceaccount.go index fd4c30d4e..de5e4a5da 100644 --- a/internal/manifests/collector/serviceaccount.go +++ b/internal/manifests/collector/serviceaccount.go @@ -14,7 +14,7 @@ import ( ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. -func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { +func ServiceAccountName(instance v1alpha1.AmazonCloudWatchAgent) string { if len(instance.Spec.ServiceAccount) == 0 { return naming.ServiceAccount(instance.Name) } @@ -28,7 +28,7 @@ func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { return nil } name := naming.ServiceAccount(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) return &corev1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/serviceaccount_test.go b/internal/manifests/collector/serviceaccount_test.go index 877e25495..69fd54f12 100644 --- a/internal/manifests/collector/serviceaccount_test.go +++ b/internal/manifests/collector/serviceaccount_test.go @@ -15,7 +15,7 @@ import ( func TestServiceAccountNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -30,11 +30,11 @@ func TestServiceAccountNewDefault(t *testing.T) { func TestServiceAccountOverride(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ ServiceAccount: "my-special-sa", }, } diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 26aab110c..77f57059b 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -38,7 +38,7 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro Labels: map[string]string{ "app.kubernetes.io/name": naming.ServiceMonitor(params.OtelCol.Name), "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, Spec: monitoringv1.ServiceMonitorSpec{ @@ -52,7 +52,7 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro }, Selector: metav1.LabelSelector{ MatchLabels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", params.OtelCol.Namespace, params.OtelCol.Name), }, }, @@ -62,7 +62,7 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro return &sm, nil } -func endpointsFromConfig(logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) []monitoringv1.Endpoint { +func endpointsFromConfig(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) []monitoringv1.Endpoint { c, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { logger.V(2).Error(err, "Error while parsing the configuration") diff --git a/internal/manifests/collector/statefulset.go b/internal/manifests/collector/statefulset.go index 2ac220115..503b7d9b7 100644 --- a/internal/manifests/collector/statefulset.go +++ b/internal/manifests/collector/statefulset.go @@ -16,7 +16,7 @@ import ( // StatefulSet builds the statefulset for the given instance. func StatefulSet(params manifests.Params) *appsv1.StatefulSet { name := naming.Collector(params.OtelCol.Name) - labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentOpenTelemetryCollector, params.Config.LabelsFilter()) + labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, params.Config.LabelsFilter()) annotations := Annotations(params.OtelCol) podAnnotations := PodAnnotations(params.OtelCol) @@ -31,7 +31,7 @@ func StatefulSet(params manifests.Params) *appsv1.StatefulSet { Spec: appsv1.StatefulSetSpec{ ServiceName: naming.Service(params.OtelCol.Name), Selector: &metav1.LabelSelector{ - MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentOpenTelemetryCollector), + MatchLabels: manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, ComponentAmazonCloudWatchAgent), }, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/collector/statefulset_test.go b/internal/manifests/collector/statefulset_test.go index 280581ab3..c39ba515d 100644 --- a/internal/manifests/collector/statefulset_test.go +++ b/internal/manifests/collector/statefulset_test.go @@ -21,12 +21,12 @@ import ( func TestStatefulSetNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: "statefulset", Tolerations: testTolerationValues, }, @@ -54,17 +54,17 @@ func TestStatefulSetNewDefault(t *testing.T) { // verify sha256 podAnnotation expectedAnnotations := map[string]string{ - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } assert.Equal(t, expectedAnnotations, ss.Spec.Template.Annotations) expectedLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "my-instance-collector", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -74,7 +74,7 @@ func TestStatefulSetNewDefault(t *testing.T) { expectedSelectorLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", } assert.Equal(t, expectedSelectorLabels, ss.Spec.Selector.MatchLabels) @@ -94,11 +94,11 @@ func TestStatefulSetNewDefault(t *testing.T) { func TestStatefulSetReplicas(t *testing.T) { // prepare replicaInt := int32(3) - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: "statefulset", Replicas: &replicaInt, }, @@ -120,11 +120,11 @@ func TestStatefulSetReplicas(t *testing.T) { func TestStatefulSetVolumeClaimTemplates(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: "statefulset", VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ ObjectMeta: metav1.ObjectMeta{ @@ -163,11 +163,11 @@ func TestStatefulSetVolumeClaimTemplates(t *testing.T) { func TestStatefulSetPodAnnotations(t *testing.T) { // prepare testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodAnnotations: testPodAnnotationValues, }, } @@ -183,14 +183,14 @@ func TestStatefulSetPodAnnotations(t *testing.T) { ss := StatefulSet(params) // Add sha256 podAnnotation - testPodAnnotationValues["opentelemetry-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + testPodAnnotationValues["amazon-cloudwatch-agent-operator-config/sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" expectedAnnotations := map[string]string{ - "annotation-key": "annotation-value", - "opentelemetry-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", + "annotation-key": "annotation-value", + "amazon-cloudwatch-agent-operator-config/sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "prometheus.io/path": "/metrics", + "prometheus.io/port": "8888", + "prometheus.io/scrape": "true", } // verify assert.Equal(t, "my-instance-collector", ss.Name) @@ -202,11 +202,11 @@ func TestStatefulSetPodSecurityContext(t *testing.T) { runAsUser := int64(1337) runasGroup := int64(1338) - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PodSecurityContext: &v1.PodSecurityContext{ RunAsNonRoot: &runAsNonRoot, RunAsUser: &runAsUser, @@ -232,7 +232,7 @@ func TestStatefulSetPodSecurityContext(t *testing.T) { func TestStatefulSetHostNetwork(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -252,11 +252,11 @@ func TestStatefulSetHostNetwork(t *testing.T) { assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) // Test hostNetwork=true - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-hostnetwork", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, }, } @@ -280,12 +280,12 @@ func TestStatefulSetFilterLabels(t *testing.T) { "app.foo.bar": "1", } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Labels: excludedLabels, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) @@ -306,7 +306,7 @@ func TestStatefulSetFilterLabels(t *testing.T) { func TestStatefulSetNodeSelector(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -325,11 +325,11 @@ func TestStatefulSetNodeSelector(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ HostNetwork: true, NodeSelector: map[string]string{ "node-key": "node-value", @@ -350,7 +350,7 @@ func TestStatefulSetNodeSelector(t *testing.T) { } func TestStatefulSetPriorityClassName(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -369,11 +369,11 @@ func TestStatefulSetPriorityClassName(t *testing.T) { priorityClassName := "test-class" - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ PriorityClassName: priorityClassName, }, } @@ -391,7 +391,7 @@ func TestStatefulSetPriorityClassName(t *testing.T) { } func TestStatefulSetAffinity(t *testing.T) { - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -408,11 +408,11 @@ func TestStatefulSetAffinity(t *testing.T) { sts1 := Deployment(params1) assert.Nil(t, sts1.Spec.Template.Spec.Affinity) - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-priortyClassName", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Affinity: testAffinityValue, }, } @@ -432,12 +432,12 @@ func TestStatefulSetAffinity(t *testing.T) { func TestStatefulSetInitContainer(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ InitContainers: []v1.Container{ { Name: "test", @@ -465,7 +465,7 @@ func TestStatefulSetInitContainer(t *testing.T) { func TestStatefulSetTopologySpreadConstraints(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -483,11 +483,11 @@ func TestStatefulSetTopologySpreadConstraints(t *testing.T) { assert.Empty(t, s1.Spec.Template.Spec.TopologySpreadConstraints) // Test TopologySpreadConstraints - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-topologyspreadconstraint", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TopologySpreadConstraints: testTopologySpreadConstraintValue, }, } @@ -509,12 +509,12 @@ func TestStatefulSetTopologySpreadConstraints(t *testing.T) { func TestStatefulSetAdditionalContainers(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ AdditionalContainers: []v1.Container{ { Name: "test", diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index de677c88e..bf697b50d 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -42,9 +42,9 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { } return manifests.Params{ Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ @@ -52,8 +52,8 @@ func paramsWithMode(mode v1alpha1.Mode) manifests.Params { Namespace: "default", UID: instanceUID, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", Ports: []v1.ServicePort{{ Name: "web", Port: 80, @@ -95,9 +95,9 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { return manifests.Params{ Config: cfg, - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "opentelemetry.io", + Kind: "cloudwatch.aws.amazon.com", APIVersion: "v1", }, ObjectMeta: metav1.ObjectMeta{ @@ -105,7 +105,7 @@ func newParams(taContainerImage string, file string) (manifests.Params, error) { Namespace: "default", UID: instanceUID, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeStatefulSet, Ports: []v1.ServicePort{{ Name: "web", diff --git a/internal/manifests/collector/utils.go b/internal/manifests/collector/utils.go index f752533a6..5e8537dbd 100644 --- a/internal/manifests/collector/utils.go +++ b/internal/manifests/collector/utils.go @@ -9,7 +9,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) -func getDNSPolicy(otelcol v1alpha1.OpenTelemetryCollector) corev1.DNSPolicy { +func getDNSPolicy(otelcol v1alpha1.AmazonCloudWatchAgent) corev1.DNSPolicy { dnsPolicy := corev1.DNSClusterFirst if otelcol.Spec.HostNetwork { dnsPolicy = corev1.DNSClusterFirstWithHostNet diff --git a/internal/manifests/collector/volume.go b/internal/manifests/collector/volume.go index 2d7d594f8..ead3c005a 100644 --- a/internal/manifests/collector/volume.go +++ b/internal/manifests/collector/volume.go @@ -13,7 +13,7 @@ import ( ) // Volumes builds the volumes for the given instance, including the config map volume. -func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.Volume { +func Volumes(cfg config.Config, otelcol v1alpha1.AmazonCloudWatchAgent) []corev1.Volume { volumes := []corev1.Volume{{ Name: naming.ConfigMapVolume(), VolumeSource: corev1.VolumeSource{ diff --git a/internal/manifests/collector/volume_test.go b/internal/manifests/collector/volume_test.go index b6ae68f84..a86459af5 100644 --- a/internal/manifests/collector/volume_test.go +++ b/internal/manifests/collector/volume_test.go @@ -17,7 +17,7 @@ import ( func TestVolumeNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} + otelcol := v1alpha1.AmazonCloudWatchAgent{} cfg := config.New() // test @@ -32,8 +32,8 @@ func TestVolumeNewDefault(t *testing.T) { func TestVolumeAllowsMoreToBeAdded(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Volumes: []corev1.Volume{{ Name: "my-volume", }}, @@ -53,8 +53,8 @@ func TestVolumeAllowsMoreToBeAdded(t *testing.T) { func TestVolumeWithMoreConfigMaps(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ ConfigMaps: []v1alpha1.ConfigMapsSpec{{ Name: "configmap-test", MountPath: "/", diff --git a/internal/manifests/collector/volumeclaim.go b/internal/manifests/collector/volumeclaim.go index 5995d8f22..7ec6ef40b 100644 --- a/internal/manifests/collector/volumeclaim.go +++ b/internal/manifests/collector/volumeclaim.go @@ -12,7 +12,7 @@ import ( // VolumeClaimTemplates builds the volumeClaimTemplates for the given instance, // including the config map volume mount. -func VolumeClaimTemplates(otelcol v1alpha1.OpenTelemetryCollector) []corev1.PersistentVolumeClaim { +func VolumeClaimTemplates(otelcol v1alpha1.AmazonCloudWatchAgent) []corev1.PersistentVolumeClaim { if otelcol.Spec.Mode != "statefulset" { return []corev1.PersistentVolumeClaim{} } diff --git a/internal/manifests/collector/volumeclaim_test.go b/internal/manifests/collector/volumeclaim_test.go index 01512c400..e9c8ab454 100644 --- a/internal/manifests/collector/volumeclaim_test.go +++ b/internal/manifests/collector/volumeclaim_test.go @@ -17,8 +17,8 @@ import ( func TestVolumeClaimAllowsUserToAdd(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: "statefulset", VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ ObjectMeta: metav1.ObjectMeta{ @@ -52,8 +52,8 @@ func TestVolumeClaimAllowsUserToAdd(t *testing.T) { func TestVolumeClaimChecksForStatefulset(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: "daemonset", VolumeClaimTemplates: []corev1.PersistentVolumeClaim{{ ObjectMeta: metav1.ObjectMeta{ diff --git a/internal/manifests/manifestutils/labels.go b/internal/manifests/manifestutils/labels.go index ac9898277..249b533f1 100644 --- a/internal/manifests/manifestutils/labels.go +++ b/internal/manifests/manifestutils/labels.go @@ -64,7 +64,7 @@ func Labels(instance metav1.ObjectMeta, name string, image string, component str // expected to be modified for the lifetime of the object. func SelectorLabels(instance metav1.ObjectMeta, component string) map[string]string { return map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": naming.Truncate("%s.%s", 63, instance.Namespace, instance.Name), "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/component": component, diff --git a/internal/manifests/manifestutils/labels_test.go b/internal/manifests/manifestutils/labels_test.go index 955939260..5394697aa 100644 --- a/internal/manifests/manifestutils/labels_test.go +++ b/internal/manifests/manifestutils/labels_test.go @@ -19,19 +19,19 @@ const ( func TestLabelsCommonSet(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: collectorName, Namespace: collectorNamespace, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", }, } // test labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) - assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "0.47.0", labels["app.kubernetes.io/version"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) @@ -39,38 +39,38 @@ func TestLabelsCommonSet(t *testing.T) { } func TestLabelsSha256Set(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: collectorName, Namespace: collectorNamespace, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", }, } // test labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) - assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b53", labels["app.kubernetes.io/version"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-collector", labels["app.kubernetes.io/component"]) // prepare - otelcolTag := v1alpha1.OpenTelemetryCollector{ + otelcolTag := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: collectorName, Namespace: collectorNamespace, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.81.0@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.81.0@sha256:c6671841470b83007e0553cdadbc9d05f6cfe17b3ebe9733728dc4a579a5b532", }, } // test labelsTag := Labels(otelcolTag.ObjectMeta, collectorName, otelcolTag.Spec.Image, "opentelemetry-collector", []string{}) - assert.Equal(t, "opentelemetry-operator", labelsTag["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labelsTag["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labelsTag["app.kubernetes.io/instance"]) assert.Equal(t, "0.81.0", labelsTag["app.kubernetes.io/version"]) assert.Equal(t, "opentelemetry", labelsTag["app.kubernetes.io/part-of"]) @@ -78,19 +78,19 @@ func TestLabelsSha256Set(t *testing.T) { } func TestLabelsTagUnset(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: collectorName, Namespace: collectorNamespace, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator", }, } // test labels := Labels(otelcol.ObjectMeta, collectorName, otelcol.Spec.Image, "opentelemetry-collector", []string{}) - assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) @@ -99,15 +99,15 @@ func TestLabelsTagUnset(t *testing.T) { func TestLabelsPropagateDown(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "myapp": "mycomponent", "app.kubernetes.io/name": "test", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator", }, } @@ -121,12 +121,12 @@ func TestLabelsPropagateDown(t *testing.T) { } func TestLabelsFilter(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{"test.bar.io": "foo", "test.foo.io": "bar"}, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator", }, } @@ -144,10 +144,10 @@ func TestSelectorLabels(t *testing.T) { expected := map[string]string{ "app.kubernetes.io/component": "opentelemetry-collector", "app.kubernetes.io/instance": "my-namespace.my-opentelemetry-collector", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{Name: "my-opentelemetry-collector", Namespace: "my-namespace"}, } diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go index 7a6e22868..bb312ddfa 100644 --- a/internal/manifests/opampbridge/configmap_test.go +++ b/internal/manifests/opampbridge/configmap_test.go @@ -17,7 +17,7 @@ import ( func TestDesiredConfigMap(t *testing.T) { expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": "my-namespace.my-instance", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "0.69.0", diff --git a/internal/manifests/opampbridge/deployment_test.go b/internal/manifests/opampbridge/deployment_test.go index bc40c14f7..945d8aa50 100644 --- a/internal/manifests/opampbridge/deployment_test.go +++ b/internal/manifests/opampbridge/deployment_test.go @@ -86,7 +86,7 @@ func TestDeploymentNewDefault(t *testing.T) { expectedLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/name": "my-instance-opamp-bridge", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "latest", @@ -96,7 +96,7 @@ func TestDeploymentNewDefault(t *testing.T) { expectedSelectorLabels := map[string]string{ "app.kubernetes.io/component": "opentelemetry-opamp-bridge", "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/part-of": "opentelemetry", } assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) diff --git a/internal/manifests/params.go b/internal/manifests/params.go index c75b2c076..23f1c3fb5 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -19,7 +19,7 @@ type Params struct { Recorder record.EventRecorder Scheme *runtime.Scheme Log logr.Logger - OtelCol v1alpha1.OpenTelemetryCollector + OtelCol v1alpha1.AmazonCloudWatchAgent OpAMPBridge v1alpha1.OpAMPBridge Config config.Config } diff --git a/internal/manifests/targetallocator/annotations.go b/internal/manifests/targetallocator/annotations.go index 79f7741af..4875d5f79 100644 --- a/internal/manifests/targetallocator/annotations.go +++ b/internal/manifests/targetallocator/annotations.go @@ -15,7 +15,7 @@ import ( const configMapHashAnnotationKey = "opentelemetry-targetallocator-config/hash" // Annotations returns the annotations for the TargetAllocator Pod. -func Annotations(instance v1alpha1.OpenTelemetryCollector, configMap *v1.ConfigMap) map[string]string { +func Annotations(instance v1alpha1.AmazonCloudWatchAgent, configMap *v1.ConfigMap) map[string]string { // Make a copy of PodAnnotations to be safe annotations := make(map[string]string, len(instance.Spec.PodAnnotations)) for key, value := range instance.Spec.PodAnnotations { diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go index ec819b665..99a0bbfd1 100644 --- a/internal/manifests/targetallocator/configmap.go +++ b/internal/manifests/targetallocator/configmap.go @@ -33,7 +33,7 @@ func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { taConfig := make(map[interface{}]interface{}) prometheusCRConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, collector.ComponentOpenTelemetryCollector) + taConfig["label_selector"] = manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, collector.ComponentAmazonCloudWatchAgent) // We only take the "config" from the returned object, if it's present if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { taConfig["config"] = prometheusConfig diff --git a/internal/manifests/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go index c1f2af217..1d1cd2617 100644 --- a/internal/manifests/targetallocator/configmap_test.go +++ b/internal/manifests/targetallocator/configmap_test.go @@ -17,7 +17,7 @@ import ( func TestDesiredConfigMap(t *testing.T) { expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", "app.kubernetes.io/instance": "default.my-instance", "app.kubernetes.io/part-of": "opentelemetry", "app.kubernetes.io/version": "0.47.0", @@ -40,7 +40,7 @@ config: label_selector: app.kubernetes.io/component: opentelemetry-collector app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator app.kubernetes.io/part-of: opentelemetry `, } @@ -76,7 +76,7 @@ config: label_selector: app.kubernetes.io/component: opentelemetry-collector app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator app.kubernetes.io/part-of: opentelemetry pod_monitor_selector: release: my-instance @@ -122,7 +122,7 @@ config: label_selector: app.kubernetes.io/component: opentelemetry-collector app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: opentelemetry-operator + app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator app.kubernetes.io/part-of: opentelemetry prometheus_cr: scrape_interval: 30s diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go index 8ff26ebc3..7a6931c9a 100644 --- a/internal/manifests/targetallocator/container.go +++ b/internal/manifests/targetallocator/container.go @@ -15,7 +15,7 @@ import ( ) // Container builds a container for the given TargetAllocator. -func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector) corev1.Container { +func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) corev1.Container { image := otelcol.Spec.TargetAllocator.Image if len(image) == 0 { image = cfg.TargetAllocatorImage() diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go index 0e8eee64a..e1aad5a68 100644 --- a/internal/manifests/targetallocator/container_test.go +++ b/internal/manifests/targetallocator/container_test.go @@ -23,7 +23,7 @@ var logger = logf.Log.WithName("unit-tests") func TestContainerNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} + otelcol := v1alpha1.AmazonCloudWatchAgent{} cfg := config.New(config.WithTargetAllocatorImage("default-image")) // test @@ -35,8 +35,8 @@ func TestContainerNewDefault(t *testing.T) { func TestContainerWithImageOverridden(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: "overridden-image", @@ -54,8 +54,8 @@ func TestContainerWithImageOverridden(t *testing.T) { func TestContainerPorts(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: "default-image", @@ -75,8 +75,8 @@ func TestContainerPorts(t *testing.T) { func TestContainerVolumes(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Image: "default-image", @@ -94,8 +94,8 @@ func TestContainerVolumes(t *testing.T) { } func TestContainerResourceRequirements(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Resources: corev1.ResourceRequirements{ Limits: corev1.ResourceList{ @@ -132,8 +132,8 @@ func TestContainerResourceRequirements(t *testing.T) { func TestContainerHasEnvVars(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Env: []corev1.EnvVar{ @@ -217,8 +217,8 @@ func TestContainerHasProxyEnvVars(t *testing.T) { defer os.Unsetenv("NO_PROXY") // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Env: []corev1.EnvVar{ @@ -243,8 +243,8 @@ func TestContainerHasProxyEnvVars(t *testing.T) { func TestContainerDoesNotOverrideEnvVars(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, Env: []corev1.EnvVar{ @@ -309,8 +309,8 @@ func TestContainerDoesNotOverrideEnvVars(t *testing.T) { assert.Equal(t, expected, c) } func TestReadinessProbe(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, }, @@ -334,8 +334,8 @@ func TestReadinessProbe(t *testing.T) { } func TestLivenessProbe(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Enabled: true, }, diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go index b2b1b9057..9a993ca88 100644 --- a/internal/manifests/targetallocator/deployment_test.go +++ b/internal/manifests/targetallocator/deployment_test.go @@ -66,7 +66,7 @@ var testSecurityContextValue = &v1.PodSecurityContext{ func TestDeploymentSecurityContext(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -86,11 +86,11 @@ func TestDeploymentSecurityContext(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.SecurityContext) // Test SecurityContext - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-securitycontext", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ SecurityContext: testSecurityContextValue, }, @@ -163,18 +163,18 @@ func TestDeploymentPodAnnotations(t *testing.T) { assert.Subset(t, ds.Spec.Template.Annotations, testPodAnnotationValues) } -func collectorInstance() v1alpha1.OpenTelemetryCollector { +func collectorInstance() v1alpha1.AmazonCloudWatchAgent { configYAML, err := os.ReadFile("testdata/test.yaml") if err != nil { fmt.Printf("Error getting yaml file: %v", err) } - return v1alpha1.OpenTelemetryCollector{ + return v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "default", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-operator:0.47.0", + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ + Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", Config: string(configYAML), TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-targetallocator:0.47.0", @@ -185,7 +185,7 @@ func collectorInstance() v1alpha1.OpenTelemetryCollector { func TestDeploymentNodeSelector(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -203,11 +203,11 @@ func TestDeploymentNodeSelector(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) // Test nodeSelector - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-nodeselector", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ NodeSelector: map[string]string{ "node-key": "node-value", @@ -230,7 +230,7 @@ func TestDeploymentNodeSelector(t *testing.T) { } func TestDeploymentAffinity(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -248,11 +248,11 @@ func TestDeploymentAffinity(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.Affinity) // Test affinity - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-affinity", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Affinity: testAffinityValue, }, @@ -274,7 +274,7 @@ func TestDeploymentAffinity(t *testing.T) { func TestDeploymentTolerations(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -292,11 +292,11 @@ func TestDeploymentTolerations(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.Tolerations) // Test Tolerations - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-toleration", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ Tolerations: testTolerationValues, }, @@ -318,7 +318,7 @@ func TestDeploymentTolerations(t *testing.T) { func TestDeploymentTopologySpreadConstraints(t *testing.T) { // Test default - otelcol1 := v1alpha1.OpenTelemetryCollector{ + otelcol1 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -337,11 +337,11 @@ func TestDeploymentTopologySpreadConstraints(t *testing.T) { assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) // Test TopologySpreadConstraints - otelcol2 := v1alpha1.OpenTelemetryCollector{ + otelcol2 := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-topologyspreadconstraint", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ TopologySpreadConstraints: testTopologySpreadConstraintValue, }, diff --git a/internal/manifests/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go index d80859869..a4566938c 100644 --- a/internal/manifests/targetallocator/labels.go +++ b/internal/manifests/targetallocator/labels.go @@ -9,13 +9,13 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) -// Labels return the common labels to all TargetAllocator objects that are part of a managed OpenTelemetryCollector. -func Labels(instance v1alpha1.OpenTelemetryCollector, name string) map[string]string { +// Labels return the common labels to all TargetAllocator objects that are part of a managed AmazonCloudWatchAgent. +func Labels(instance v1alpha1.AmazonCloudWatchAgent, name string) map[string]string { return manifestutils.Labels(instance.ObjectMeta, name, instance.Spec.TargetAllocator.Image, ComponentOpenTelemetryTargetAllocator, nil) } // SelectorLabels return the selector labels for Target Allocator Pods. -func SelectorLabels(instance v1alpha1.OpenTelemetryCollector) map[string]string { +func SelectorLabels(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { selectorLabels := manifestutils.SelectorLabels(instance.ObjectMeta, ComponentOpenTelemetryTargetAllocator) // TargetAllocator uses the name label as well for selection // This is inconsistent with the Collector, but changing is a somewhat painful breaking change diff --git a/internal/manifests/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go index be0d4438d..26f030254 100644 --- a/internal/manifests/targetallocator/labels_test.go +++ b/internal/manifests/targetallocator/labels_test.go @@ -20,7 +20,7 @@ const ( func TestLabelsCommonSet(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -29,7 +29,7 @@ func TestLabelsCommonSet(t *testing.T) { // test labels := Labels(otelcol, name) - assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) @@ -39,7 +39,7 @@ func TestLabelsCommonSet(t *testing.T) { func TestLabelsPropagateDown(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "myapp": "mycomponent", @@ -59,7 +59,7 @@ func TestLabelsPropagateDown(t *testing.T) { func TestSelectorLabels(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: namespace, @@ -68,7 +68,7 @@ func TestSelectorLabels(t *testing.T) { // test labels := SelectorLabels(otelcol) - assert.Equal(t, "opentelemetry-operator", labels["app.kubernetes.io/managed-by"]) + assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) diff --git a/internal/manifests/targetallocator/poddisruptionbudget_test.go b/internal/manifests/targetallocator/poddisruptionbudget_test.go index 421dac52e..18d267c41 100644 --- a/internal/manifests/targetallocator/poddisruptionbudget_test.go +++ b/internal/manifests/targetallocator/poddisruptionbudget_test.go @@ -55,11 +55,11 @@ var tests = []test{ func TestPDBWithValidStrategy(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ MinAvailable: test.MinAvailable, @@ -89,11 +89,11 @@ func TestPDBWithValidStrategy(t *testing.T) { func TestPDBWithNotValidStrategy(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ MinAvailable: test.MinAvailable, @@ -118,11 +118,11 @@ func TestPDBWithNotValidStrategy(t *testing.T) { } func TestNoPDB(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, }, diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go index a906c630c..5d0d64c7c 100644 --- a/internal/manifests/targetallocator/serviceaccount.go +++ b/internal/manifests/targetallocator/serviceaccount.go @@ -14,7 +14,7 @@ import ( ) // ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. -func ServiceAccountName(instance v1alpha1.OpenTelemetryCollector) string { +func ServiceAccountName(instance v1alpha1.AmazonCloudWatchAgent) string { if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 { return naming.TargetAllocatorServiceAccount(instance.Name) } diff --git a/internal/manifests/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go index 292991e36..4ea17f211 100644 --- a/internal/manifests/targetallocator/serviceaccount_test.go +++ b/internal/manifests/targetallocator/serviceaccount_test.go @@ -16,7 +16,7 @@ import ( func TestServiceAccountDefaultName(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -31,11 +31,11 @@ func TestServiceAccountDefaultName(t *testing.T) { func TestServiceAccountOverrideName(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ ServiceAccount: "my-special-sa", }, @@ -51,7 +51,7 @@ func TestServiceAccountOverrideName(t *testing.T) { func TestServiceAccountDefault(t *testing.T) { params := manifests.Params{ - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, @@ -75,11 +75,11 @@ func TestServiceAccountDefault(t *testing.T) { func TestServiceAccountOverride(t *testing.T) { params := manifests.Params{ - OtelCol: v1alpha1.OpenTelemetryCollector{ + OtelCol: v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ ServiceAccount: "my-special-sa", }, diff --git a/internal/manifests/targetallocator/servicemonitor_test.go b/internal/manifests/targetallocator/servicemonitor_test.go index 12625c490..5924dcda4 100644 --- a/internal/manifests/targetallocator/servicemonitor_test.go +++ b/internal/manifests/targetallocator/servicemonitor_test.go @@ -17,12 +17,12 @@ import ( ) func TestDesiredServiceMonitors(t *testing.T) { - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeStatefulSet, Tolerations: testTolerationValues, }, diff --git a/internal/manifests/targetallocator/volume.go b/internal/manifests/targetallocator/volume.go index 7969fef20..a4ac2ecfe 100644 --- a/internal/manifests/targetallocator/volume.go +++ b/internal/manifests/targetallocator/volume.go @@ -12,7 +12,7 @@ import ( ) // Volumes builds the volumes for the given instance, including the config map volume. -func Volumes(cfg config.Config, otelcol v1alpha1.OpenTelemetryCollector) []corev1.Volume { +func Volumes(cfg config.Config, otelcol v1alpha1.AmazonCloudWatchAgent) []corev1.Volume { volumes := []corev1.Volume{{ Name: naming.TAConfigMapVolume(), VolumeSource: corev1.VolumeSource{ diff --git a/internal/manifests/targetallocator/volume_test.go b/internal/manifests/targetallocator/volume_test.go index 3dffed981..9e60c7a9f 100644 --- a/internal/manifests/targetallocator/volume_test.go +++ b/internal/manifests/targetallocator/volume_test.go @@ -15,7 +15,7 @@ import ( func TestVolumeNewDefault(t *testing.T) { // prepare - otelcol := v1alpha1.OpenTelemetryCollector{} + otelcol := v1alpha1.AmazonCloudWatchAgent{} cfg := config.New() // test diff --git a/internal/naming/main.go b/internal/naming/main.go index 4d6899137..7a0d455c2 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -4,7 +4,7 @@ // Package naming is for determining the names for components (containers, services, ...). package naming -// ConfigMap builds the name for the config map used in the OpenTelemetryCollector containers. +// ConfigMap builds the name for the config map used in the AmazonCloudWatchAgent containers. func ConfigMap(otelcol string) string { return DNSName(Truncate("%s-collector", 63, otelcol)) } @@ -74,13 +74,13 @@ func TAPodDisruptionBudget(otelcol string) string { return DNSName(Truncate("%s-targetallocator", 63, otelcol)) } -// OpenTelemetryCollector builds the collector (deployment/daemonset) name based on the instance. -func OpenTelemetryCollector(otelcol string) string { +// AmazonCloudWatchAgent builds the collector (deployment/daemonset) name based on the instance. +func AmazonCloudWatchAgent(otelcol string) string { return DNSName(Truncate("%s", 63, otelcol)) } -// OpenTelemetryCollectorName builds the collector (deployment/daemonset) name based on the instance. -func OpenTelemetryCollectorName(otelcolName string) string { +// AmazonCloudWatchAgentName builds the collector (deployment/daemonset) name based on the instance. +func AmazonCloudWatchAgentName(otelcolName string) string { return DNSName(Truncate("%s", 63, otelcolName)) } diff --git a/internal/status/collector/collector.go b/internal/status/collector/collector.go index 9a9d9096c..cc829d975 100644 --- a/internal/status/collector/collector.go +++ b/internal/status/collector/collector.go @@ -19,10 +19,10 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) -func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpenTelemetryCollector) error { +func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1alpha1.AmazonCloudWatchAgent) error { if changed.Status.Version == "" { // a version is not set, otherwise let the upgrade mechanism take care of it! - changed.Status.Version = version.OpenTelemetryCollector() + changed.Status.Version = version.AmazonCloudWatchAgent() } mode := changed.Spec.Mode if mode != v1alpha1.ModeDeployment && mode != v1alpha1.ModeStatefulSet { @@ -34,7 +34,7 @@ func UpdateCollectorStatus(ctx context.Context, cli client.Client, changed *v1al name := naming.Collector(changed.Name) // Set the scale selector - labels := manifestutils.Labels(changed.ObjectMeta, name, changed.Spec.Image, collector.ComponentOpenTelemetryCollector, []string{}) + labels := manifestutils.Labels(changed.ObjectMeta, name, changed.Spec.Image, collector.ComponentAmazonCloudWatchAgent, []string{}) selector, err := metav1.LabelSelectorAsSelector(&metav1.LabelSelector{MatchLabels: labels}) if err != nil { return fmt.Errorf("failed to get selector for labelSelector: %w", err) diff --git a/internal/version/main.go b/internal/version/main.go index 14df29d35..8ba7f0812 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -26,9 +26,9 @@ var ( // Version holds this Operator's version as well as the version of some of the components it uses. type Version struct { - Operator string `json:"opentelemetry-operator"` + Operator string `json:"amazon-cloudwatch-agent-operator"` BuildDate string `json:"build-date"` - OpenTelemetryCollector string `json:"opentelemetry-collector-version"` + AmazonCloudWatchAgent string `json:"opentelemetry-collector-version"` Go string `json:"go-version"` TargetAllocator string `json:"target-allocator-version"` OperatorOpAMPBridge string `json:"operator-opamp-bridge"` @@ -46,7 +46,7 @@ func Get() Version { return Version{ Operator: version, BuildDate: buildDate, - OpenTelemetryCollector: OpenTelemetryCollector(), + AmazonCloudWatchAgent: AmazonCloudWatchAgent(), Go: runtime.Version(), TargetAllocator: TargetAllocator(), OperatorOpAMPBridge: OperatorOpAMPBridge(), @@ -62,10 +62,10 @@ func Get() Version { func (v Version) String() string { return fmt.Sprintf( - "Version(Operator='%v', BuildDate='%v', OpenTelemetryCollector='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v', AutoInstrumentationApacheHttpd='%v', AutoInstrumentationNginx='%v')", + "Version(Operator='%v', BuildDate='%v', AmazonCloudWatchAgent='%v', Go='%v', TargetAllocator='%v', OperatorOpAMPBridge='%v', AutoInstrumentationJava='%v', AutoInstrumentationNodeJS='%v', AutoInstrumentationPython='%v', AutoInstrumentationDotNet='%v', AutoInstrumentationGo='%v', AutoInstrumentationApacheHttpd='%v', AutoInstrumentationNginx='%v')", v.Operator, v.BuildDate, - v.OpenTelemetryCollector, + v.AmazonCloudWatchAgent, v.Go, v.TargetAllocator, v.OperatorOpAMPBridge, @@ -79,8 +79,8 @@ func (v Version) String() string { ) } -// OpenTelemetryCollector returns the default OpenTelemetryCollector to use when no versions are specified via CLI or configuration. -func OpenTelemetryCollector() string { +// AmazonCloudWatchAgent returns the default AmazonCloudWatchAgent to use when no versions are specified via CLI or configuration. +func AmazonCloudWatchAgent() string { if len(otelCol) > 0 { // this should always be set, as it's specified during the build return otelCol diff --git a/internal/version/main_test.go b/internal/version/main_test.go index be1a89ec6..ab0cfba3e 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -10,7 +10,7 @@ import ( ) func TestFallbackVersion(t *testing.T) { - assert.Equal(t, "0.0.0", OpenTelemetryCollector()) + assert.Equal(t, "0.0.0", AmazonCloudWatchAgent()) } func TestVersionFromBuild(t *testing.T) { @@ -20,7 +20,7 @@ func TestVersionFromBuild(t *testing.T) { otelCol = "" }() - assert.Equal(t, otelCol, OpenTelemetryCollector()) + assert.Equal(t, otelCol, AmazonCloudWatchAgent()) assert.Contains(t, Get().String(), otelCol) } diff --git a/internal/webhook/podmutation/webhookhandler.go b/internal/webhook/podmutation/webhookhandler.go index cb6b9b51b..a65847c61 100644 --- a/internal/webhook/podmutation/webhookhandler.go +++ b/internal/webhook/podmutation/webhookhandler.go @@ -20,7 +20,7 @@ import ( // +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=get;list;watch // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch // +kubebuilder:rbac:groups="apps",resources=replicasets,verbs=get;list;watch diff --git a/internal/webhook/podmutation/webhookhandler_test.go b/internal/webhook/podmutation/webhookhandler_test.go index de4ff32c1..24a923a44 100644 --- a/internal/webhook/podmutation/webhookhandler_test.go +++ b/internal/webhook/podmutation/webhookhandler_test.go @@ -33,7 +33,7 @@ func TestShouldInjectSidecar(t *testing.T) { name string ns corev1.Namespace pod corev1.Pod - otelcols []v1alpha1.OpenTelemetryCollector + otelcols []v1alpha1.AmazonCloudWatchAgent }{ { // this is the simplest positive test: a pod is being created with an annotation @@ -50,12 +50,12 @@ func TestShouldInjectSidecar(t *testing.T) { Annotations: map[string]string{sidecar.Annotation: "my-instance"}, }, }, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-simplest-positive-case", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }}, @@ -70,12 +70,12 @@ func TestShouldInjectSidecar(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-annotated-namespace", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }}, @@ -90,13 +90,13 @@ func TestShouldInjectSidecar(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{ { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-with-autoselect", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }, @@ -105,7 +105,7 @@ func TestShouldInjectSidecar(t *testing.T) { Name: "a-deployment-instance", Namespace: "my-namespace-with-autoselect", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeDeployment, }, }, @@ -182,7 +182,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { name string ns corev1.Namespace pod corev1.Pod - otelcols []v1alpha1.OpenTelemetryCollector + otelcols []v1alpha1.AmazonCloudWatchAgent }{ { name: "namespace has no annotations", @@ -192,12 +192,12 @@ func TestPodShouldNotBeChanged(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-no-annotations", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }}, @@ -211,13 +211,13 @@ func TestPodShouldNotBeChanged(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{ { ObjectMeta: metav1.ObjectMeta{ Name: "my-instance-1", Namespace: "my-namespace-multiple-otelcols", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }, @@ -226,7 +226,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { Name: "my-instance-2", Namespace: "my-namespace-multiple-otelcols", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }, @@ -241,7 +241,7 @@ func TestPodShouldNotBeChanged(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{}, + otelcols: []v1alpha1.AmazonCloudWatchAgent{}, }, { name: "otelcol is not a sidecar", @@ -252,12 +252,12 @@ func TestPodShouldNotBeChanged(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-no-sidecar-otelcol", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeDaemonSet, }, }}, @@ -271,12 +271,12 @@ func TestPodShouldNotBeChanged(t *testing.T) { }, }, pod: corev1.Pod{}, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-no-automatic-sidecar-otelcol", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeDaemonSet, }, }}, @@ -298,12 +298,12 @@ func TestPodShouldNotBeChanged(t *testing.T) { }}, }, }, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-pod-has-sidecar", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }}, @@ -320,12 +320,12 @@ func TestPodShouldNotBeChanged(t *testing.T) { Annotations: map[string]string{sidecar.Annotation: "false"}, }, }, - otelcols: []v1alpha1.OpenTelemetryCollector{{ + otelcols: []v1alpha1.AmazonCloudWatchAgent{{ ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "my-namespace-sidecar-not-desired", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Mode: v1alpha1.ModeSidecar, }, }}, diff --git a/main.go b/main.go index 240f5c503..6452b52bf 100644 --- a/main.go +++ b/main.go @@ -115,7 +115,7 @@ func main() { pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") - stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("%s:%s", autoInstrumentationJavaImageRepository, v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() @@ -126,7 +126,7 @@ func main() { ctrl.SetLogger(logger) logger.Info("Starting the OpenTelemetry Operator", - "opentelemetry-operator", v.Operator, + "amazon-cloudwatch-agent-operator", v.Operator, "opentelemetry-collector", collectorImage, "auto-instrumentation-java", autoInstrumentationJava, "build-date", v.BuildDate, @@ -224,12 +224,12 @@ func main() { if err = controllers.NewReconciler(controllers.Params{ Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("OpenTelemetryCollector"), + Log: ctrl.Log.WithName("controllers").WithName("AmazonCloudWatchAgent"), Scheme: mgr.GetScheme(), Config: cfg, - Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), + Recorder: mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator"), }).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "OpenTelemetryCollector") + setupLog.Error(err, "unable to create controller", "controller", "AmazonCloudWatchAgent") os.Exit(1) } @@ -246,7 +246,7 @@ func main() { if os.Getenv("ENABLE_WEBHOOKS") != "false" { if err = otelv1alpha1.SetupCollectorWebhook(mgr, cfg); err != nil { - setupLog.Error(err, "unable to create webhook", "webhook", "OpenTelemetryCollector") + setupLog.Error(err, "unable to create webhook", "webhook", "AmazonCloudWatchAgent") os.Exit(1) } if err = otelv1alpha1.SetupInstrumentationWebhook(mgr, cfg); err != nil { @@ -258,7 +258,7 @@ func main() { Handler: podmutation.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), decoder, mgr.GetClient(), []podmutation.PodMutator{ sidecar.NewMutator(logger, cfg, mgr.GetClient()), - instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("opentelemetry-operator")), + instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator")), }), }) @@ -299,7 +299,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v return up.ManagedInstances(c) })) if err != nil { - return fmt.Errorf("failed to upgrade OpenTelemetryCollector instances: %w", err) + return fmt.Errorf("failed to upgrade AmazonCloudWatchAgent instances: %w", err) } // adds the upgrade mechanism to be executed once the manager is ready @@ -314,7 +314,7 @@ func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v v DefaultAutoInstApacheHttpd: cfg.AutoInstrumentationApacheHttpdImage(), DefaultAutoInstNginx: cfg.AutoInstrumentationNginxImage(), Client: mgr.GetClient(), - Recorder: mgr.GetEventRecorderFor("opentelemetry-operator"), + Recorder: mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator"), } return u.ManagedInstances(c) })) diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go index 18d2e93da..e61eeb48a 100644 --- a/pkg/collector/upgrade/noop.go +++ b/pkg/collector/upgrade/noop.go @@ -10,6 +10,6 @@ import ( ) // nolint unused -func noop(cl client.Client, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func noop(cl client.Client, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { return otelcol, nil } diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go index 1e1ccb7f7..cb68599fa 100644 --- a/pkg/collector/upgrade/upgrade.go +++ b/pkg/collector/upgrade/upgrade.go @@ -33,10 +33,10 @@ func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { opts := []client.ListOption{ client.MatchingLabels(map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }), } - list := &v1alpha1.OpenTelemetryCollectorList{} + list := &v1alpha1.AmazonCloudWatchAgentList{} if err := u.Client.List(ctx, list, opts...); err != nil { return fmt.Errorf("failed to list: %w", err) } @@ -90,7 +90,7 @@ func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { } // ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version. -func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.OpenTelemetryCollector) (v1alpha1.OpenTelemetryCollector, error) { +func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.AmazonCloudWatchAgent) (v1alpha1.AmazonCloudWatchAgent, error) { // this is likely a new instance, assume it's already up to date if otelcol.Status.Version == "" { return otelcol, nil @@ -106,13 +106,13 @@ func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.Op // Update with the latest known version, which is what we have from versions.txt u.Log.Info("no upgrade routines are needed for the OpenTelemetry instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) - otelColV, err := semver.NewVersion(u.Version.OpenTelemetryCollector) + otelColV, err := semver.NewVersion(u.Version.AmazonCloudWatchAgent) if err != nil { return otelcol, err } if instanceV.LessThan(otelColV) { u.Log.Info("upgraded OpenTelemetry Collector version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) - otelcol.Status.Version = u.Version.OpenTelemetryCollector + otelcol.Status.Version = u.Version.AmazonCloudWatchAgent } else { u.Log.Info("skipping upgrade for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace) } @@ -135,7 +135,7 @@ func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.Op } } // Update with the latest known version, which is what we have from versions.txt - otelcol.Status.Version = u.Version.OpenTelemetryCollector + otelcol.Status.Version = u.Version.AmazonCloudWatchAgent u.Log.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) return otelcol, nil diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go index 5e7d873be..a9b7a36ab 100644 --- a/pkg/collector/upgrade/upgrade_test.go +++ b/pkg/collector/upgrade/upgrade_test.go @@ -25,7 +25,7 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { const beginV = "0.0.1" // this is the first version we have an upgrade function currentV := version.Get() - currentV.OpenTelemetryCollector = upgrade.Latest.String() + currentV.AmazonCloudWatchAgent = upgrade.Latest.String() for _, tt := range []struct { strategy v1alpha1.UpgradeStrategy @@ -46,7 +46,7 @@ func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { require.NoError(t, err) // sanity check - persisted := &v1alpha1.OpenTelemetryCollector{} + persisted := &v1alpha1.AmazonCloudWatchAgent{} err = k8sClient.Get(context.Background(), nsn, persisted) require.NoError(t, err) require.Equal(t, beginV, persisted.Status.Version) @@ -88,7 +88,7 @@ func TestUpgradeUpToLatestKnownVersion(t *testing.T) { existing.Status.Version = tt.v currentV := version.Get() - currentV.OpenTelemetryCollector = tt.expectedV + currentV.AmazonCloudWatchAgent = tt.expectedV up := &upgrade.VersionUpgrade{ Log: logger, Version: currentV, @@ -126,7 +126,7 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { existing.Status.Version = tt.v currentV := version.Get() - currentV.OpenTelemetryCollector = upgrade.Latest.String() + currentV.AmazonCloudWatchAgent = upgrade.Latest.String() up := &upgrade.VersionUpgrade{ Log: logger, @@ -149,16 +149,16 @@ func TestVersionsShouldNotBeChanged(t *testing.T) { } } -func makeOtelcol(nsn types.NamespacedName, managementState v1alpha1.ManagementStateType) v1alpha1.OpenTelemetryCollector { - return v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ +func makeOtelcol(nsn types.NamespacedName, managementState v1alpha1.ManagementStateType) v1alpha1.AmazonCloudWatchAgent { + return v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ ManagementState: managementState, }, ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, } diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go index 2c2db3a15..f9c14d008 100644 --- a/pkg/collector/upgrade/v0_15_0.go +++ b/pkg/collector/upgrade/v0_15_0.go @@ -9,7 +9,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_15_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_15_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { delete(otelcol.Spec.Args, "--new-metrics") delete(otelcol.Spec.Args, "--legacy-metrics") existing := &corev1.ConfigMap{} diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go index e7c9f4ea2..91b76c051 100644 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ b/pkg/collector/upgrade/v0_15_0_test.go @@ -21,15 +21,15 @@ import ( func TestRemoveMetricsTypeFlags(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ // this would not happen in the real world, as it's either one or another, but we aren't going that far "--new-metrics": "true", diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go index 07ba720db..8c3368154 100644 --- a/pkg/collector/upgrade/v0_19_0.go +++ b/pkg/collector/upgrade/v0_19_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_19_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_19_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go index fb458851d..15162d958 100644 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ b/pkg/collector/upgrade/v0_19_0_test.go @@ -22,15 +22,15 @@ import ( func TestRemoveQueuedRetryProcessor(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `processors: queued_retry: otherprocessor: @@ -67,15 +67,15 @@ func TestRemoveQueuedRetryProcessor(t *testing.T) { func TestMigrateResourceType(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `processors: resource: type: some-type @@ -107,15 +107,15 @@ func TestMigrateResourceType(t *testing.T) { func TestMigrateLabels(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `processors: resource: labels: diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go index e5a472aa7..1fcec8045 100644 --- a/pkg/collector/upgrade/v0_24_0.go +++ b/pkg/collector/upgrade/v0_24_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_24_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_24_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go index 37e2bad70..0ced8f332 100644 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ b/pkg/collector/upgrade/v0_24_0_test.go @@ -20,15 +20,15 @@ import ( func TestHealthCheckEndpointMigration(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `extensions: health_check/2: endpoint: "localhost:13133" diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go index 05376d281..5d87674f5 100644 --- a/pkg/collector/upgrade/v0_2_10.go +++ b/pkg/collector/upgrade/v0_2_10.go @@ -8,7 +8,7 @@ import ( ) // this is our first version under otel/opentelemetry-collector. -func upgrade0_2_10(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_2_10(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { // this is a no-op, but serves to keep the skeleton here for the future versions return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go index 1b0ed7480..5319027b0 100644 --- a/pkg/collector/upgrade/v0_31_0.go +++ b/pkg/collector/upgrade/v0_31_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_31_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_31_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go index 9eba6c675..4eab6edd1 100644 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ b/pkg/collector/upgrade/v0_31_0_test.go @@ -20,15 +20,15 @@ import ( func TestInfluxdbReceiverPropertyDrop(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: ` receivers: influxdb: diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go index 3c3d74b17..34bba7a6b 100644 --- a/pkg/collector/upgrade/v0_36_0.go +++ b/pkg/collector/upgrade/v0_36_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go index dd683a241..6a90aa7b6 100644 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ b/pkg/collector/upgrade/v0_36_0_test.go @@ -20,15 +20,15 @@ import ( func Test0_36_0Upgrade(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: ` receivers: otlp/mtls: diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go index befc52ca0..4b6cc92d3 100644 --- a/pkg/collector/upgrade/v0_38_0.go +++ b/pkg/collector/upgrade/v0_38_0.go @@ -17,7 +17,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_38_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_38_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { // return if args exist if len(otelcol.Spec.Args) == 0 { return otelcol, nil diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index 4ca233fe1..4404d8e68 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -20,15 +20,15 @@ import ( func Test0_38_0Upgrade(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ "--hii": "hello", "--log-profile": "", diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go index 9ceb8f831..0638f9094 100644 --- a/pkg/collector/upgrade/v0_39_0.go +++ b/pkg/collector/upgrade/v0_39_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_39_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_39_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to parse configuration: %w", err) @@ -101,7 +101,7 @@ func upgrade0_39_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) ( return updateConfig(otelcol, cfg) } -func updateConfig(otelcol *v1alpha1.OpenTelemetryCollector, cfg map[interface{}]interface{}) (*v1alpha1.OpenTelemetryCollector, error) { +func updateConfig(otelcol *v1alpha1.AmazonCloudWatchAgent, cfg map[interface{}]interface{}) (*v1alpha1.AmazonCloudWatchAgent, error) { res, err := yaml.Marshal(cfg) if err != nil { return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to marshall back configuration: %w", err) diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go index 5dfccca1d..f02424253 100644 --- a/pkg/collector/upgrade/v0_39_0_test.go +++ b/pkg/collector/upgrade/v0_39_0_test.go @@ -20,15 +20,15 @@ import ( func Test0_39_0Upgrade(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: ` receivers: httpd/mtls: @@ -90,8 +90,8 @@ service: `, res.Spec.Config) // TESTCASE 2: Drop ballast_size_mib from memory_limiter processor - existing1 := v1alpha1.OpenTelemetryCollector{ - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + existing1 := v1alpha1.AmazonCloudWatchAgent{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `receivers: otlp/mtls: protocols: diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go index d1522340b..3b7ffdf97 100644 --- a/pkg/collector/upgrade/v0_41_0.go +++ b/pkg/collector/upgrade/v0_41_0.go @@ -13,7 +13,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_41_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_41_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) if err != nil { return otelcol, fmt.Errorf("couldn't upgrade to v0.41.0, failed to parse configuration: %w", err) diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go index 0199e117e..013b20270 100644 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ b/pkg/collector/upgrade/v0_41_0_test.go @@ -20,15 +20,15 @@ import ( func Test0_41_0Upgrade(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: ` receivers: otlp: @@ -76,15 +76,15 @@ service: `, res.Spec.Config) // TESTCASE 2: re-structure cors for allowed_origins - existing = v1alpha1.OpenTelemetryCollector{ + existing = v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: ` receivers: otlp: diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go index 2a63fed37..9f01ef848 100644 --- a/pkg/collector/upgrade/v0_43_0.go +++ b/pkg/collector/upgrade/v0_43_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_43_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_43_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { // return if args exist if len(otelcol.Spec.Args) == 0 { return otelcol, nil diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go index ae478d992..0ded79e04 100644 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -20,15 +20,15 @@ import ( func Test0_43_0Upgrade(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Args: map[string]string{ "--metrics-addr": ":8988", "--metrics-level": "detailed", diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go index 39f38aee8..7adb23ed9 100644 --- a/pkg/collector/upgrade/v0_56_0.go +++ b/pkg/collector/upgrade/v0_56_0.go @@ -14,7 +14,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) -func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { // return if this does not use an autoscaler if otelcol.Spec.MaxReplicas == nil { return otelcol, nil @@ -29,7 +29,7 @@ func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) ( client.InNamespace(otelcol.Namespace), client.MatchingLabels(map[string]string{ "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }), } @@ -42,12 +42,12 @@ func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) ( errors := []error{} for i := range hpaList.Items { existing := hpaList.Items[i] - // If there is an autoscaler based on Deployment, replace it with one based on OpenTelemetryCollector + // If there is an autoscaler based on Deployment, replace it with one based on AmazonCloudWatchAgent if existing.Spec.ScaleTargetRef.Kind == "Deployment" { updated := existing.DeepCopy() updated.Spec.ScaleTargetRef = autoscalingv1.CrossVersionObjectReference{ - Kind: "OpenTelemetryCollector", - Name: naming.OpenTelemetryCollectorName(otelcol.Name), + Kind: "AmazonCloudWatchAgent", + Name: naming.AmazonCloudWatchAgentName(otelcol.Name), APIVersion: v1alpha1.GroupVersion.String(), } patch := client.MergeFrom(&existing) diff --git a/pkg/collector/upgrade/v0_56_0_test.go b/pkg/collector/upgrade/v0_56_0_test.go index cbde280b0..13e92035d 100644 --- a/pkg/collector/upgrade/v0_56_0_test.go +++ b/pkg/collector/upgrade/v0_56_0_test.go @@ -20,16 +20,16 @@ func Test0_56_0Upgrade(t *testing.T) { one := int32(1) three := int32(3) - collectorInstance := v1alpha1.OpenTelemetryCollector{ + collectorInstance := v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "OpenTelemetryCollector", + Kind: "AmazonCloudWatchAgent", APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: "my-instance", Namespace: "somewhere", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Replicas: &one, MaxReplicas: &three, }, diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go index 1a9705dd8..122a85431 100644 --- a/pkg/collector/upgrade/v0_57_2.go +++ b/pkg/collector/upgrade/v0_57_2.go @@ -13,7 +13,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) -func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil diff --git a/pkg/collector/upgrade/v0_57_2_test.go b/pkg/collector/upgrade/v0_57_2_test.go index 3850b6a99..86d88ec15 100644 --- a/pkg/collector/upgrade/v0_57_2_test.go +++ b/pkg/collector/upgrade/v0_57_2_test.go @@ -17,16 +17,16 @@ import ( ) func Test0_57_0Upgrade(t *testing.T) { - collectorInstance := v1alpha1.OpenTelemetryCollector{ + collectorInstance := v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "OpenTelemetryCollector", + Kind: "AmazonCloudWatchAgent", APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: "otel-my-instance", Namespace: "somewhere", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `receivers: otlp: protocols: diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go index d800205c1..82b448f8b 100644 --- a/pkg/collector/upgrade/v0_61_0.go +++ b/pkg/collector/upgrade/v0_61_0.go @@ -12,7 +12,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) -func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_61_0_test.go b/pkg/collector/upgrade/v0_61_0_test.go index 42434474a..aa4629298 100644 --- a/pkg/collector/upgrade/v0_61_0_test.go +++ b/pkg/collector/upgrade/v0_61_0_test.go @@ -25,16 +25,16 @@ var ( func Test0_61_0Upgrade(t *testing.T) { - collectorInstance := v1alpha1.OpenTelemetryCollector{ + collectorInstance := v1alpha1.AmazonCloudWatchAgent{ TypeMeta: metav1.TypeMeta{ - Kind: "OpenTelemetryCollector", + Kind: "AmazonCloudWatchAgent", APIVersion: "v1alpha1", }, ObjectMeta: metav1.ObjectMeta{ Name: "otel-my-instance", Namespace: "somewhere", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{}, + Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, } tt := []struct { diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go index f7613f03a..b19f9c4bd 100644 --- a/pkg/collector/upgrade/v0_9_0.go +++ b/pkg/collector/upgrade/v0_9_0.go @@ -15,7 +15,7 @@ import ( corev1 "k8s.io/api/core/v1" ) -func upgrade0_9_0(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) { +func upgrade0_9_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { if len(otelcol.Spec.Config) == 0 { return otelcol, nil } diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go index 0c92366df..0ea23d051 100644 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ b/pkg/collector/upgrade/v0_9_0_test.go @@ -21,15 +21,15 @@ import ( func TestRemoveConnectionDelay(t *testing.T) { // prepare nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.OpenTelemetryCollector{ + existing := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: nsn.Name, Namespace: nsn.Namespace, Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }, }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Config: `exporters: opencensus: compression: "on" diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go index 34349d7e0..a43ffbb72 100644 --- a/pkg/collector/upgrade/versions.go +++ b/pkg/collector/upgrade/versions.go @@ -9,7 +9,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) -type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.OpenTelemetryCollector) (*v1alpha1.OpenTelemetryCollector, error) +type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) type otelcolVersion struct { upgrade upgradeFunc diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 5397dc997..c7adc677e 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -34,7 +34,7 @@ const ( sideCarName = "opentelemetry-auto-instrumentation" ) -// inject a new sidecar container to the given pod, based on the given OpenTelemetryCollector. +// inject a new sidecar container to the given pod, based on the given AmazonCloudWatchAgent. type sdkInjector struct { client client.Client diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index 5eb5376ab..bcb4b3215 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -45,13 +45,13 @@ type InstrumentationUpgrade struct { // +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch -// ManagedInstances upgrades managed instances by the opentelemetry-operator. +// ManagedInstances upgrades managed instances by the amazon-cloudwatch-agent-operator. func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { u.Logger.Info("looking for managed Instrumentation instances to upgrade") opts := []client.ListOption{ client.MatchingLabels(map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", + "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", }), } list := &v1alpha1.InstrumentationList{} diff --git a/pkg/sidecar/pod.go b/pkg/sidecar/pod.go index 40ed7b0f8..6425026ea 100644 --- a/pkg/sidecar/pod.go +++ b/pkg/sidecar/pod.go @@ -21,8 +21,8 @@ const ( confEnvVar = "OTEL_CONFIG" ) -// add a new sidecar container to the given pod, based on the given OpenTelemetryCollector. -func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.OpenTelemetryCollector, pod corev1.Pod, attributes []corev1.EnvVar) (corev1.Pod, error) { +// add a new sidecar container to the given pod, based on the given AmazonCloudWatchAgent. +func add(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent, pod corev1.Pod, attributes []corev1.EnvVar) (corev1.Pod, error) { otelColCfg, err := collector.ReplaceConfig(otelcol) if err != nil { return pod, err diff --git a/pkg/sidecar/pod_test.go b/pkg/sidecar/pod_test.go index f13d21a40..00bfa52c2 100644 --- a/pkg/sidecar/pod_test.go +++ b/pkg/sidecar/pod_test.go @@ -35,12 +35,12 @@ func TestAddSidecarWhenNoSidecarExists(t *testing.T) { Volumes: []corev1.Volume{{}}, }, } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "otelcol-sample-with-a-name-that-is-longer-than-sixty-three-characters", Namespace: "some-app", }, - Spec: v1alpha1.OpenTelemetryCollectorSpec{ + Spec: v1alpha1.AmazonCloudWatchAgentSpec{ Ports: []corev1.ServicePort{ { Name: "metrics", @@ -112,7 +112,7 @@ func TestAddSidecarWhenOneExistsAlready(t *testing.T) { }, }, } - otelcol := v1alpha1.OpenTelemetryCollector{} + otelcol := v1alpha1.AmazonCloudWatchAgent{} cfg := config.New(config.WithCollectorImage("some-default-image")) // test @@ -201,7 +201,7 @@ func TestAddSidecarWithAditionalEnv(t *testing.T) { }, }, } - otelcol := v1alpha1.OpenTelemetryCollector{ + otelcol := v1alpha1.AmazonCloudWatchAgent{ ObjectMeta: metav1.ObjectMeta{ Name: "otelcol-sample", Namespace: "some-app", diff --git a/pkg/sidecar/podmutator.go b/pkg/sidecar/podmutator.go index 72ea70894..e3b8d33aa 100644 --- a/pkg/sidecar/podmutator.go +++ b/pkg/sidecar/podmutator.go @@ -89,12 +89,12 @@ func (p *sidecarPodMutator) Mutate(ctx context.Context, ns corev1.Namespace, pod return add(p.config, p.logger, otelcol, pod, attributes) } -func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.OpenTelemetryCollector, error) { +func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1.Namespace, ann string) (v1alpha1.AmazonCloudWatchAgent, error) { if strings.EqualFold(ann, "true") { return p.selectCollectorInstance(ctx, ns) } - otelcol := v1alpha1.OpenTelemetryCollector{} + otelcol := v1alpha1.AmazonCloudWatchAgent{} var nsnOtelcol types.NamespacedName instNamespace, instName, namespaced := strings.Cut(ann, "/") if namespaced { @@ -108,20 +108,20 @@ func (p *sidecarPodMutator) getCollectorInstance(ctx context.Context, ns corev1. } if otelcol.Spec.Mode != v1alpha1.ModeSidecar { - return v1alpha1.OpenTelemetryCollector{}, errInstanceNotSidecar + return v1alpha1.AmazonCloudWatchAgent{}, errInstanceNotSidecar } return otelcol, nil } -func (p *sidecarPodMutator) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.OpenTelemetryCollector, error) { +func (p *sidecarPodMutator) selectCollectorInstance(ctx context.Context, ns corev1.Namespace) (v1alpha1.AmazonCloudWatchAgent, error) { var ( - otelcols = v1alpha1.OpenTelemetryCollectorList{} - sidecars []v1alpha1.OpenTelemetryCollector + otelcols = v1alpha1.AmazonCloudWatchAgentList{} + sidecars []v1alpha1.AmazonCloudWatchAgent ) if err := p.client.List(ctx, &otelcols, client.InNamespace(ns.Name)); err != nil { - return v1alpha1.OpenTelemetryCollector{}, err + return v1alpha1.AmazonCloudWatchAgent{}, err } for i := range otelcols.Items { @@ -133,9 +133,9 @@ func (p *sidecarPodMutator) selectCollectorInstance(ctx context.Context, ns core switch { case len(sidecars) == 0: - return v1alpha1.OpenTelemetryCollector{}, errNoInstancesAvailable + return v1alpha1.AmazonCloudWatchAgent{}, errNoInstancesAvailable case len(sidecars) > 1: - return v1alpha1.OpenTelemetryCollector{}, errMultipleInstancesPossible + return v1alpha1.AmazonCloudWatchAgent{}, errMultipleInstancesPossible default: return sidecars[0], nil } From 3693a8cd9fb6857c86b0c54ddc082994d8f37ad3 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 2 Jan 2024 20:50:16 -0500 Subject: [PATCH 1217/1234] Revert Makefile. Delete autoinstrumentation dir --- Makefile | 2 +- autoinstrumentation/apache-httpd/Dockerfile | 26 -------- autoinstrumentation/apache-httpd/README.md | 13 ---- autoinstrumentation/apache-httpd/version.txt | 1 - autoinstrumentation/dotnet/Dockerfile | 29 --------- autoinstrumentation/dotnet/version.txt | 1 - autoinstrumentation/java/Dockerfile | 13 ---- autoinstrumentation/java/version.txt | 1 - autoinstrumentation/nodejs/.dockerignore | 2 - autoinstrumentation/nodejs/Dockerfile | 23 -------- autoinstrumentation/nodejs/package.json | 30 ---------- .../nodejs/src/autoinstrumentation.ts | 59 ------------------- autoinstrumentation/nodejs/tsconfig.json | 34 ----------- autoinstrumentation/python/Dockerfile | 24 -------- autoinstrumentation/python/requirements.txt | 56 ------------------ 15 files changed, 1 insertion(+), 313 deletions(-) delete mode 100644 autoinstrumentation/apache-httpd/Dockerfile delete mode 100644 autoinstrumentation/apache-httpd/README.md delete mode 100644 autoinstrumentation/apache-httpd/version.txt delete mode 100644 autoinstrumentation/dotnet/Dockerfile delete mode 100644 autoinstrumentation/dotnet/version.txt delete mode 100644 autoinstrumentation/java/Dockerfile delete mode 100644 autoinstrumentation/java/version.txt delete mode 100644 autoinstrumentation/nodejs/.dockerignore delete mode 100644 autoinstrumentation/nodejs/Dockerfile delete mode 100644 autoinstrumentation/nodejs/package.json delete mode 100644 autoinstrumentation/nodejs/src/autoinstrumentation.ts delete mode 100644 autoinstrumentation/nodejs/tsconfig.json delete mode 100644 autoinstrumentation/python/Dockerfile delete mode 100644 autoinstrumentation/python/requirements.txt diff --git a/Makefile b/Makefile index d3559de07..f7957b5f1 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ ci: test # Run tests # setup-envtest uses KUBEBUILDER_ASSETS which points to a directory with binaries (api-server, etcd and kubectl) .PHONY: test -test: generate fmt vet envtest +test: generate fmt vet ensure-generate-is-noop envtest KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... cd cmd/otel-allocator && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... cd cmd/operator-opamp-bridge && KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(KUBE_VERSION) -p path)" go test ${GOTEST_OPTS} ./... diff --git a/autoinstrumentation/apache-httpd/Dockerfile b/autoinstrumentation/apache-httpd/Dockerfile deleted file mode 100644 index 14d70d048..000000000 --- a/autoinstrumentation/apache-httpd/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ - -############################ -# STEP 1 download the webserver agent -############################ -FROM alpine:latest as agent - -ARG version - -RUN mkdir /opt/opentelemetry -WORKDIR /opt/opentelemetry - -RUN mkdir agent -RUN wget -c https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz -RUN unzip -p opentelemetry-webserver-sdk-x64-linux.tgz | tar -zx -C agent - -############################ -# STEP 2 download the webserver agent -############################ -FROM alpine:latest - -COPY --from=agent /opt/opentelemetry/agent/opentelemetry-webserver-sdk /opt/opentelemetry - -RUN chmod 775 -R /opt/opentelemetry/ -RUN chmod a+w /opt/opentelemetry/logs - -CMD ["cat", "Just delivering the Opentelemetry Apache/Nginx agent"] \ No newline at end of file diff --git a/autoinstrumentation/apache-httpd/README.md b/autoinstrumentation/apache-httpd/README.md deleted file mode 100644 index 2ff4f1aa6..000000000 --- a/autoinstrumentation/apache-httpd/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# How to build Apache HTTPD auto-instrumentation docker image - -To build image for Apache HTTPD auto instrumentation, use the following commands - -``` -export REPO_NAME="" -export IMAGE_NAME_PREFIX="autoinstrumentation-apache-httpd" -export IMAGE_VERSION=`cat version.txt` -export IMAGE_NAME=${REPO_NAME}/${IMAGE_NAME_PREFIX}:${IMAGE_VERSION} -docker build --build-arg version=${IMAGE_VERSION} . -t ${IMAGE_NAME} -t ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest -docker push ${IMAGE_NAME} -docker push ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest -``` diff --git a/autoinstrumentation/apache-httpd/version.txt b/autoinstrumentation/apache-httpd/version.txt deleted file mode 100644 index a6a3a43c3..000000000 --- a/autoinstrumentation/apache-httpd/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.4 \ No newline at end of file diff --git a/autoinstrumentation/dotnet/Dockerfile b/autoinstrumentation/dotnet/Dockerfile deleted file mode 100644 index 29527b2af..000000000 --- a/autoinstrumentation/dotnet/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# To build one auto-instrumentation image for dotnet, please: -# - Download your dotnet auto-instrumentation artefacts to `/autoinstrumentation` directory. This is required as when instrumenting the pod, -# one init container will be created to copy the files to your app's container. -# - Grant the necessary access to the files in the `/autoinstrumentation` directory. -# - Following environment variables are injected to the application container to enable the auto-instrumentation. -# CORECLR_ENABLE_PROFILING=1 -# CORECLR_PROFILER={918728DD-259F-4A6A-AC2B-B85E1B658318} -# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so # for glibc based images -# CORECLR_PROFILER_PATH=%InstallationLocation%/linux-musl-x64/OpenTelemetry.AutoInstrumentation.Native.so # for musl based images -# DOTNET_ADDITIONAL_DEPS=%InstallationLocation%/AdditionalDeps -# DOTNET_SHARED_STORE=%InstallationLocation%/store -# DOTNET_STARTUP_HOOKS=%InstallationLocation%/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll -# OTEL_DOTNET_AUTO_HOME=%InstallationLocation% -# - For auto-instrumentation by container injection, the Linux command cp is -# used and must be availabe in the image. - -FROM busybox - -ARG version - -WORKDIR /autoinstrumentation - -ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-glibc.zip . -ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v$version/opentelemetry-dotnet-instrumentation-linux-musl.zip . - -RUN unzip opentelemetry-dotnet-instrumentation-linux-glibc.zip &&\ - unzip opentelemetry-dotnet-instrumentation-linux-musl.zip "linux-musl-x64/*" -d . &&\ - rm opentelemetry-dotnet-instrumentation-linux-glibc.zip opentelemetry-dotnet-instrumentation-linux-musl.zip &&\ - chmod -R go+r . \ No newline at end of file diff --git a/autoinstrumentation/dotnet/version.txt b/autoinstrumentation/dotnet/version.txt deleted file mode 100644 index 26aaba0e8..000000000 --- a/autoinstrumentation/dotnet/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.2.0 diff --git a/autoinstrumentation/java/Dockerfile b/autoinstrumentation/java/Dockerfile deleted file mode 100644 index 41941402f..000000000 --- a/autoinstrumentation/java/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -# To build one auto-instrumentation image for Java, please: -# - Download your customized `javaagent.jar` to `/javaagent.jar`. This is required as when instrumenting the pod, -# one init container will be created to copy the jar to your app's container. -# - Grant the necessary access to the jar. `chmod -R go+r /javaagent.jar` -# - For auto-instrumentation by container injection, the Linux command cp is -# used and must be availabe in the image. -FROM busybox - -ARG version - -ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /javaagent.jar - -RUN chmod -R go+r /javaagent.jar diff --git a/autoinstrumentation/java/version.txt b/autoinstrumentation/java/version.txt deleted file mode 100644 index 359c41089..000000000 --- a/autoinstrumentation/java/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.32.0 diff --git a/autoinstrumentation/nodejs/.dockerignore b/autoinstrumentation/nodejs/.dockerignore deleted file mode 100644 index 48912d244..000000000 --- a/autoinstrumentation/nodejs/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -build -node_modules \ No newline at end of file diff --git a/autoinstrumentation/nodejs/Dockerfile b/autoinstrumentation/nodejs/Dockerfile deleted file mode 100644 index 48f1f9ae7..000000000 --- a/autoinstrumentation/nodejs/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# To build one auto-instrumentation image for Node.js, please: -# - Ensure the packages are installed in the `/autoinstrumentation` directory. This is required as when instrumenting the pod, -# one init container will be created to copy all the content in `/autoinstrumentation` directory to your app's container. Then -# update the `NODE_OPTIONS` environment variable accordingly. To achieve this, you can mimic the one in `autoinstrumentation/nodejs/Dockerfile` -# by using multi-stage builds. In the first stage, install all the required packages in one custom directory. -# Then in the second stage, copy the directory to `/autoinstrumentation`. -# - Ensure you have `@opentelemetry/api`, `@opentelemetry/auto-instrumentations-node`, and `@opentelemetry/sdk-node` or your customized -# alternatives installed. -# - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` -# - For auto-instrumentation by container injection, the Linux command cp is -# used and must be availabe in the image. -FROM node:20 AS build - -WORKDIR /operator-build -COPY . . - -RUN npm install - -FROM busybox - -COPY --from=build /operator-build/build/workspace /autoinstrumentation - -RUN chmod -R go+r /autoinstrumentation diff --git a/autoinstrumentation/nodejs/package.json b/autoinstrumentation/nodejs/package.json deleted file mode 100644 index f62865fc3..000000000 --- a/autoinstrumentation/nodejs/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@opentelemetry/k8s-autoinstrumentation", - "version": "0.0.1", - "private": true, - "scripts": { - "clean": "rimraf build/*", - "prepare": "npm run compile", - "compile": "tsc -p .", - "postcompile": "copyfiles -f 'build/src/**' build/workspace/ && copyfiles 'node_modules/**' build/workspace/" - }, - "devDependencies": { - "copyfiles": "^2.4.1", - "rimraf": "^3.0.2", - "typescript": "^4.4.4" - }, - "dependencies": { - "@opentelemetry/api": "1.7.0", - "@opentelemetry/auto-instrumentations-node": "0.40.2", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.46.0", - "@opentelemetry/exporter-prometheus": "0.46.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.46.0", - "@opentelemetry/resource-detector-alibaba-cloud": "0.28.4", - "@opentelemetry/resource-detector-aws": "1.3.4", - "@opentelemetry/resource-detector-container": "0.3.4", - "@opentelemetry/resource-detector-gcp": "0.29.4", - "@opentelemetry/resources": "1.19.0", - "@opentelemetry/sdk-metrics": "1.19.0", - "@opentelemetry/sdk-node": "0.46.0" - } -} diff --git a/autoinstrumentation/nodejs/src/autoinstrumentation.ts b/autoinstrumentation/nodejs/src/autoinstrumentation.ts deleted file mode 100644 index 928e6d557..000000000 --- a/autoinstrumentation/nodejs/src/autoinstrumentation.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'; -import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; -import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-grpc'; -import { PrometheusExporter } from '@opentelemetry/exporter-prometheus'; -import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics'; -import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'; -import { awsEc2Detector, awsEksDetector } from '@opentelemetry/resource-detector-aws'; -import { containerDetector } from '@opentelemetry/resource-detector-container'; -import { gcpDetector } from '@opentelemetry/resource-detector-gcp'; -import { envDetector, hostDetector, osDetector, processDetector } from '@opentelemetry/resources'; -import { diag } from '@opentelemetry/api'; - -import { NodeSDK } from '@opentelemetry/sdk-node'; - -function getMetricReader() { - switch (process.env.OTEL_METRICS_EXPORTER) { - case undefined: - case '': - case 'otlp': - diag.info('using otel metrics exporter'); - return new PeriodicExportingMetricReader({ - exporter: new OTLPMetricExporter(), - }); - case 'prometheus': - diag.info('using prometheus metrics exporter'); - return new PrometheusExporter({}); - case 'none': - diag.info('disabling metrics reader'); - return undefined; - default: - throw Error(`no valid option for OTEL_METRICS_EXPORTER: ${process.env.OTEL_METRICS_EXPORTER}`) - } -} - -const sdk = new NodeSDK({ - autoDetectResources: true, - instrumentations: [getNodeAutoInstrumentations()], - traceExporter: new OTLPTraceExporter(), - metricReader: getMetricReader(), - resourceDetectors: - [ - // Standard resource detectors. - containerDetector, - envDetector, - hostDetector, - osDetector, - processDetector, - - // Cloud resource detectors. - alibabaCloudEcsDetector, - // Ordered AWS Resource Detectors as per: - // https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md#ordering - awsEksDetector, - awsEc2Detector, - gcpDetector, - ], -}); - -sdk.start(); diff --git a/autoinstrumentation/nodejs/tsconfig.json b/autoinstrumentation/nodejs/tsconfig.json deleted file mode 100644 index 38012118d..000000000 --- a/autoinstrumentation/nodejs/tsconfig.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - - "allowUnreachableCode": false, - "allowUnusedLabels": false, - "composite": true, - "declaration": true, - "declarationMap": true, - "forceConsistentCasingInFileNames": true, - "incremental": true, - "inlineSources": true, - "module": "commonjs", - "newLine": "LF", - "noEmitOnError": true, - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "pretty": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "strictNullChecks": true, - "target": "es2017" - }, - "include": [ - "src/**/*.ts", - ], - "exclude": [ - "node_modules" - ] -} \ No newline at end of file diff --git a/autoinstrumentation/python/Dockerfile b/autoinstrumentation/python/Dockerfile deleted file mode 100644 index 9a6dfa740..000000000 --- a/autoinstrumentation/python/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# To build one auto-instrumentation image for Python, please: -# - Ensure the packages are installed in the `/autoinstrumentation` directory. This is required as when instrumenting the pod, -# one init container will be created to copy all the content in `/autoinstrumentation` directory to your app's container. Then -# update the `PYTHONPATH` environment variable accordingly. To achieve this, you can mimic the one in `autoinstrumentation/python/Dockerfile` -# by using multi-stage builds. In the first stage, install all the required packages in one custom directory with `pip install --target`. -# Then in the second stage, copy the directory to `/autoinstrumentation`. -# - Ensure you have `opentelemetry-distro` and `opentelemetry-instrumentation` or your customized alternatives installed. -# Those two packages are essential to Python auto-instrumentation. -# - Grant the necessary access to `/autoinstrumentation` directory. `chmod -R go+r /autoinstrumentation` -# - For auto-instrumentation by container injection, the Linux command cp is -# used and must be availabe in the image. -FROM python:3.11 AS build - -WORKDIR /operator-build - -ADD requirements.txt . - -RUN mkdir workspace && pip install --target workspace -r requirements.txt - -FROM busybox - -COPY --from=build /operator-build/workspace /autoinstrumentation - -RUN chmod -R go+r /autoinstrumentation diff --git a/autoinstrumentation/python/requirements.txt b/autoinstrumentation/python/requirements.txt deleted file mode 100644 index 8257b291c..000000000 --- a/autoinstrumentation/python/requirements.txt +++ /dev/null @@ -1,56 +0,0 @@ -opentelemetry-distro==0.43b0 -# We don't use the distro[otlp] option which automatically includes exporters since gRPC is not appropriate for -# injected auto-instrumentation, where it has a strict dependency on the OS / Python version the artifact is built for. -opentelemetry-exporter-otlp-proto-http==1.22.0 - -opentelemetry-propagator-b3==1.22.0 -opentelemetry-propagator-jaeger==1.22.0 -opentelemetry-propagator-aws-xray==1.0.1 - -opentelemetry-instrumentation==0.43b0 -opentelemetry-propagator-ot-trace==0.43b0 - -# Copied in from https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation -# except for aws-lambda -opentelemetry-instrumentation-aio-pika==0.43b0 -opentelemetry-instrumentation-aiohttp-client==0.43b0 -opentelemetry-instrumentation-aiopg==0.43b0 -opentelemetry-instrumentation-asgi==0.43b0 -opentelemetry-instrumentation-asyncpg==0.43b0 -opentelemetry-instrumentation-boto==0.43b0 -opentelemetry-instrumentation-boto3sqs==0.43b0 -opentelemetry-instrumentation-botocore==0.43b0 -opentelemetry-instrumentation-celery==0.43b0 -opentelemetry-instrumentation-confluent-kafka==0.43b0 -opentelemetry-instrumentation-dbapi==0.43b0 -opentelemetry-instrumentation-django==0.43b0 -opentelemetry-instrumentation-elasticsearch==0.43b0 -opentelemetry-instrumentation-falcon==0.43b0 -opentelemetry-instrumentation-fastapi==0.43b0 -opentelemetry-instrumentation-flask==0.43b0 -opentelemetry-instrumentation-grpc==0.43b0 -opentelemetry-instrumentation-httpx==0.43b0 -opentelemetry-instrumentation-jinja2==0.43b0 -opentelemetry-instrumentation-kafka-python==0.43b0 -opentelemetry-instrumentation-logging==0.43b0 -opentelemetry-instrumentation-mysql==0.43b0 -opentelemetry-instrumentation-mysqlclient==0.43b0 -opentelemetry-instrumentation-pika==0.43b0 -opentelemetry-instrumentation-psycopg2==0.43b0 -opentelemetry-instrumentation-pymemcache==0.43b0 -opentelemetry-instrumentation-pymongo==0.43b0 -opentelemetry-instrumentation-pymysql==0.43b0 -opentelemetry-instrumentation-pyramid==0.43b0 -opentelemetry-instrumentation-redis==0.43b0 -opentelemetry-instrumentation-remoulade==0.43b0 -opentelemetry-instrumentation-requests==0.43b0 -opentelemetry-instrumentation-sklearn==0.43b0 -opentelemetry-instrumentation-sqlalchemy==0.43b0 -opentelemetry-instrumentation-sqlite3==0.43b0 -opentelemetry-instrumentation-starlette==0.43b0 -opentelemetry-instrumentation-system-metrics==0.43b0 -opentelemetry-instrumentation-tornado==0.43b0 -opentelemetry-instrumentation-tortoiseorm==0.43b0 -opentelemetry-instrumentation-urllib==0.43b0 -opentelemetry-instrumentation-urllib3==0.43b0 -opentelemetry-instrumentation-wsgi==0.43b0 From 3a309eb84fb5780bf5b9173a7d73689abcccbdf6 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 11:04:06 -0500 Subject: [PATCH 1218/1234] Revert /config to main --- ...aws.amazon.com_amazoncloudwatchagents.yaml | 6527 ++--------------- ...watch.aws.amazon.com_instrumentations.yaml | 1492 +--- config/manager/kustomization.yaml | 4 +- config/rbac/role.yaml | 84 +- config/webhook/manifests.yaml | 107 +- 5 files changed, 951 insertions(+), 7263 deletions(-) diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml index 01e3786df..53242ead4 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: amazoncloudwatchagents.opentelemetry.io + name: amazoncloudwatchagents.cloudwatch.aws.amazon.com spec: - group: opentelemetry.io + group: cloudwatch.aws.amazon.com names: kind: AmazonCloudWatchAgent listKind: AmazonCloudWatchAgentList @@ -22,7 +22,7 @@ spec: jsonPath: .spec.mode name: Mode type: string - - description: OpenTelemetry Version + - description: CloudWatch Agent Version jsonPath: .status.version name: Version type: string @@ -35,5522 +35,412 @@ spec: - jsonPath: .status.image name: Image type: string - - description: Management State - jsonPath: .spec.managementState - name: Management - type: string name: v1alpha1 schema: openAPIV3Schema: - description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents + description: AmazonCloudWatchAgent is the Schema for the AmazonCloudWatchAgents API. properties: apiVersion: - description: APIVersion defines the versioned schema of this representation + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: Kind is a string value representing the REST resource this + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: description: AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. properties: - additionalContainers: - description: AdditionalContainers allows injecting additional containers - into the Collector's pod definition. + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the CloudWatch + Agent binary + type: object + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the CloudWatch Agent documentation for details. + type: string + env: + description: ENV vars to set on the CloudWatch Agent's Pods. These + can then in certain cases be consumed in the config file for the + Collector. items: - description: A single application container that you want to run - within a pod. + description: EnvVar represents an environment variable present in + a Container. properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. + configMapKeyRef: + description: Selects a key of a ConfigMap. properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean required: - - port + - key type: object - httpGet: - description: HTTPGet specifies the http request to perform. + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. + fieldPath: + description: Path of the field to select in the specified + API version. type: string required: - - port + - fieldPath type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' + containerName: + description: 'Container name: required for volumes, + optional for env vars' type: string - port: + divisor: anyOf: - type: integer - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + resource: + description: 'Required: resource to select' type: string required: - - port + - resource type: object - httpGet: - description: HTTPGet specifies the http request to perform. + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. + key: + description: The key of the secret to select from. Must + be a valid secret key. type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port + - key type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer + x-kubernetes-map-type: atomic type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the CloudWatch Agent's Pods. These can then in certain cases be + consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. + secretRef: + description: The Secret to select from properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. + optional: + description: Specify whether the Secret must be defined type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name + x-kubernetes-map-type: atomic type: object type: array - affinity: - description: If specified, indicates the pod's scheduling constraints + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the CloudWatch + Agent. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + ingress: + description: 'Ingress is used to specify how CloudWatch Agent is exposed. + This functionality is only available if one of the valid modes is + set. Valid modes are: deployment, daemonset and statefulset.' properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the - pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects (i.e. - is also a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists, DoesNotExist. Gt, and - Lt. - type: string - values: - description: An array of string values. If - the operator is In or NotIn, the values - array must be non-empty. If the operator - is Exists or DoesNotExist, the values array - must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the affinity expressions specified by - this field, but it may choose a node that violates one or - more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to - nodes that satisfy the anti-affinity expressions specified - by this field, but it may choose a node that violates one - or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys - to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied to the - union of the namespaces selected by this field and - the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a - selector that contains values, a key, and an - operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are - In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If the - operator is Exists or DoesNotExist, the - values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list of namespace - names that the term applies to. The term is applied - to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the OpenTelemetry - Collector binary - type: object - autoscaler: - description: Autoscaler specifies the pod autoscaling configuration - to use for the AmazonCloudWatchAgent workload. - properties: - behavior: - description: HorizontalPodAutoscalerBehavior configures the scaling - behavior of the target in both Up and Down directions (scaleUp - and scaleDown fields respectively). - properties: - scaleDown: - description: scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down - to minReplicas pods, with a 300 second stabilization window - (i.e. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - scaleUp: - description: scaleUp is scaling policy for scaling Up. - properties: - policies: - description: policies is a list of potential scaling polices - which can be used during scaling. At least one policy - must be specified, otherwise the HPAScalingRules will - be discarded as invalid - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. - properties: - periodSeconds: - description: periodSeconds specifies the window - of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less - than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: value contains the amount of change - which is permitted by the policy. It must be greater - than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value - type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: selectPolicy is used to specify which policy - should be used. If not set, the default value Max is - used. - type: string - stabilizationWindowSeconds: - description: stabilizationWindowSeconds is the number - of seconds for which past recommendations should be - considered while scaling up or scaling down. - format: int32 - type: integer - type: object - type: object - maxReplicas: - description: MaxReplicas sets an upper bound to the autoscaling - feature. If MaxReplicas is set autoscaling is enabled. - format: int32 - type: integer - metrics: - description: Metrics is meant to provide a customizable way to - configure HPA metrics. currently the only supported custom metrics - is type=Pod. - items: - description: MetricSpec defines a subset of metrics to be defined - for the HPA's metric array more metric type can be supported - as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec - for reference. - properties: - pods: - description: PodsMetricSource indicates how to scale on - a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: selector is the string-encoded form - of a standard kubernetes label selector for the - given metric When set, it is passed as an additional - parameter to the metrics server for more specific - metrics scopi - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: averageUtilization is the target value - of the average of the resource metric across all - relevant pods, represented as a percentage of - the requested value of the resource for the pods. - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: averageValue is the target value of - the average of the metric across all relevant - pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - type: - description: MetricSourceType indicates the type of metric. - type: string - required: - - type - type: object - type: array - minReplicas: - description: MinReplicas sets a lower bound to the autoscaling - feature. Set this if your are using autoscaling. It must be - at least 1 - format: int32 - type: integer - targetCPUUtilization: - description: TargetCPUUtilization sets the target average CPU - used across all replicas. If average CPU exceeds this value, - the HPA will scale up. Defaults to 90 percent. - format: int32 - type: integer - targetMemoryUtilization: - description: TargetMemoryUtilization sets the target average memory - utilization across all replicas - format: int32 - type: integer - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the OpenTelemetry Collector documentation - for details. - type: string - configmaps: - description: ConfigMaps is a list of ConfigMaps in the same namespace - as the AmazonCloudWatchAgent object, which shall be mounted into - the Collector Pods. - items: - properties: - mountpath: - type: string - name: - description: Configmap defines name and path where the configMaps - should be mounted. - type: string - required: - - mountpath - - name - type: object - type: array - env: - description: ENV vars to set on the OpenTelemetry Collector's Pods. - These can then in certain cases be consumed in the config file for - the Collector. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables on - the OpenTelemetry Collector's Pods. These can then in certain cases - be consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how OpenTelemetry Collector - is exposed. This functionality is only available if one of the valid - modes is set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' - type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. - properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt - type: string - type: object - ruleType: - description: RuleType defines how Ingress exposes collector receivers. - IngressRuleTypePath ("path") exposes each receiver port on a - unique path on single domain defined in Hostname. - enum: - - path - - subdomain - type: string - tls: - description: TLS configuration. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. - properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. - items: - type: string - type: array - x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. - type: string - type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress, - route' - enum: - - ingress - - route - type: string - type: object - initContainers: - description: InitContainers allows injecting initContainers to the - Collector's pod definition. - items: - description: A single application container that you want to run - within a pod. - properties: - args: - description: Arguments to the entrypoint. The container image's - CMD is used if this is not provided. Variable references $(VAR_NAME) - are expanded using the container's environment. - items: - type: string - type: array - command: - description: Entrypoint array. Not executed within a shell. - The container image's ENTRYPOINT is used if this is not provided. - Variable references $(VAR_NAME) are expanded using the container's - environment. - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be - a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: - only resources limits and requests (limits.cpu, - limits.memory, limits.ephemeral-storage, requests.cpu, - requests.memory and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - envFrom: - description: List of sources to populate environment variables - in the container. The keys defined within a source must be - a C_IDENTIFIER. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each - key in the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: 'Container image name. More info: https://kubernetes.' - type: string - imagePullPolicy: - description: 'Image pull policy. One of Always, Never, IfNotPresent. - Defaults to Always if :latest tag is specified, or IfNotPresent - otherwise. Cannot be updated. More info: https://kubernetes.' - type: string - lifecycle: - description: Actions that the management system should take - in response to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event - such as liveness/startup probe failure, preemption, resource - contention, etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for - the command is root ('/') in the container's - filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to - the pod IP. You probably want to set "Host" in - httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in the request. - HTTP allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access - on the container. Number must be in the range - 1 to 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: 'Periodic probe of container liveness. Container - will be restarted if the probe fails. Cannot be updated. More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - name: - description: Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: List of ports to expose from the container. Not - specifying a port here DOES NOT prevent that port from being - exposed. Any port which is listening on the default "0.0.0. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the external port to. - type: string - hostPort: - description: Number of port to expose on the host. If - specified, this must be a valid port number, 0 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - name: - description: If specified, this must be an IANA_SVC_NAME - and unique within the pod. Each named port in a pod - must have a unique name. Name for the port that can - be referred to by services. - type: string - protocol: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: 'Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe - fails. Cannot be updated. More info: https://kubernetes.' - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize policy for the container. - items: - description: ContainerResizePolicy represents resource resize - policy for the container. - properties: - resourceName: - description: 'Name of the resource to which this resource - resize policy applies. Supported values: cpu, memory.' - type: string - restartPolicy: - description: Restart policy to apply when specified resource - is resized. If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - restartPolicy: - description: RestartPolicy defines the restart behavior of individual - containers in a pod. This field may only be set for init containers, - and the only allowed value is "Always". - type: string - securityContext: - description: SecurityContext defines the security options the - container should be run with. If set, the fields of SecurityContext - override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a - process can gain more privileges than its parent process. - This bool directly controls if the no_new_privs flag will - be set on the container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to - use for the containers. The default is DefaultProcMount - which uses the container runtime defaults for readonly - paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile - must be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. - type: string - type: object - type: object - startupProbe: - description: StartupProbe indicates that the Pod has successfully - initialized. If specified, no other probes are executed until - this completes successfully. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute - inside the container, the working directory for the - command is root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: Service is the name of the service to place - in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: 'Number of seconds after the container has - started before liveness probes are initiated. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe - to be considered successful after having failed. Defaults - to 1. Must be 1 for liveness and startup. Minimum value - is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on - the container. Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs - to terminate gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times - out. Defaults to 1 second. Minimum value is 1. More info: - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - stdin: - description: Whether this container should allocate a buffer - for stdin in the container runtime. If this is not set, reads - from stdin in the container will always result in EOF. Default - is false. - type: boolean - stdinOnce: - description: Whether the container runtime should close the - stdin channel after it has been opened by a single attach. - When stdin is true the stdin stream will remain open across - multiple attach sessions. - type: boolean - terminationMessagePath: - description: 'Optional: Path at which the file to which the - container''s termination message will be written is mounted - into the container''s filesystem.' - type: string - terminationMessagePolicy: - description: Indicate how the termination message should be - populated. File will use the contents of terminationMessagePath - to populate the container status message on both success and - failure. - type: string - tty: - description: Whether this container should allocate a TTY for - itself, also requires 'stdin' to be true. Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block devices to be - used by the container. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - properties: - devicePath: - description: devicePath is the path inside of the container - that the device will be mapped to. - type: string - name: - description: name must match the name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: Path within the container at which the volume - should be mounted. Must not contain ':'. - type: string - mountPropagation: - description: mountPropagation determines how mounts are - propagated from the host to container and the other - way around. When not set, MountPropagationNone is used. - This field is beta in 1.10. - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: Mounted read-only if true, read-write otherwise - (false or unspecified). Defaults to false. - type: boolean - subPath: - description: Path within the volume from which the container's - volume should be mounted. Defaults to "" (volume's root). - type: string - subPathExpr: - description: Expanded path within the volume from which - the container's volume should be mounted. - type: string - required: - - mountPath - - name - type: object - type: array - workingDir: - description: Container's working directory. If not specified, - the container runtime's default will be used, which might - be configured in the container image. Cannot be updated. - type: string - required: - - name - type: object - type: array - lifecycle: - description: Actions that the management system should take in response - to container lifecycle events. Cannot be updated. - properties: - postStart: - description: PostStart is called immediately after a container - is created. If the handler fails, the container is terminated - and restarted according to its restart policy. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: PreStop is called immediately before a container - is terminated due to an API request or management event such - as liveness/startup probe failure, preemption, resource contention, - etc. - properties: - exec: - description: Exec specifies the action to take. - properties: - command: - description: Command is the command line to execute inside - the container, the working directory for the command is - root ('/') in the container's filesystem. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - properties: - host: - description: Host name to connect to, defaults to the - pod IP. You probably want to set "Host" in httpHeaders - instead. - type: string - httpHeaders: - description: Custom headers to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader describes a custom header to - be used in HTTP probes - properties: - name: - description: The header field name. This will be - canonicalized upon output, so case-variant names - will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: Name or number of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the container - should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler - and kept for the backward compatibility. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the - container. Number must be in the range 1 to 65535. Name - must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - livenessProbe: - description: Liveness config for the OpenTelemetry Collector except - the probe handler which is auto generated from the health extension - of the collector. - properties: - failureThreshold: - description: Minimum consecutive failures for the probe to be - considered failed after having succeeded. Defaults to 3. Minimum - value is 1. - format: int32 - type: integer - initialDelaySeconds: - description: 'Number of seconds after the container has started - before liveness probes are initiated. Defaults to 0 seconds. - Minimum value is 0. More info: https://kubernetes.' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. Default - to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: Minimum consecutive successes for the probe to be - considered successful after having failed. Defaults to 1. Must - be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - terminationGracePeriodSeconds: - description: Optional duration in seconds the pod needs to terminate - gracefully upon probe failure. - format: int64 - type: integer - timeoutSeconds: - description: 'Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' - format: int32 - type: integer - type: object - managementState: - default: managed - description: ManagementState defines if the CR should be managed by - the operator or not. Default is managed. - enum: - - managed - - unmanaged - type: string - maxReplicas: - description: 'MaxReplicas sets an upper bound to the autoscaling feature. - If MaxReplicas is set autoscaling is enabled. Deprecated: use "AmazonCloudWatchAgent.Spec.Autoscaler.MaxReplicas" - instead.' - format: int32 - type: integer - minReplicas: - description: 'MinReplicas sets a lower bound to the autoscaling feature. Set - this if you are using autoscaling. It must be at least 1 Deprecated: - use "AmazonCloudWatchAgent.Spec.Autoscaler.MinReplicas" instead.' - format: int32 - type: integer - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets handled. - properties: - metrics: - description: Metrics defines the metrics configuration for operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor or - PodMonitor(for sidecar mode) should be created for the service - managed by the OpenTelemetry Operator. The operator.observability. - type: boolean - type: object - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption budget - configuration to use for the AmazonCloudWatchAgent workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after the - eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - podSecurityContext: - description: PodSecurityContext configures the pod security context - for the opentelemetry-collector pod, when running as a deployment, - daemonset, or statefulset. - properties: - fsGroup: - description: "A special supplemental group that applies to all - containers in a pod. Some volume types allow the Kubelet to - change the ownership of that volume to be owned by the pod: - \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in SecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers in this - pod. Note that this field cannot be set when spec.os.name is - windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process run - in each container, in addition to the container's primary GID, - the fsGroup (if specified), and group memberships defined in - the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used for - the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. Note that this field cannot be set when - spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext - will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This is - used as a hint for implementations to offer richer behavior - for protocols that they understand. This field follows standard - Kubernetes label syntax. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. - type: string - nodePort: - description: The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetry Collector pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security context - for the opentelemetry-collector container. - properties: - allowPrivilegeEscalation: - description: AllowPrivilegeEscalation controls whether a process - can gain more privileges than its parent process. This bool - directly controls if the no_new_privs flag will be set on the - container process. - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container - runtime. Note that this field cannot be set when spec.os.name - is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes in privileged - containers are essentially equivalent to root on the host. Defaults - to false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - procMount: - description: procMount denotes the type of proc mount to use for - the containers. The default is DefaultProcMount which uses the - container runtime defaults for readonly paths and masked paths. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root filesystem. - Default is false. Note that this field cannot be set when spec.os.name - is windows. - type: boolean - runAsGroup: - description: The GID to run the entrypoint of the container process. - Uses runtime default if unset. May also be set in PodSecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in PodSecurityContext. - properties: - level: - description: Level is SELinux level label that applies to - the container. - type: string - role: - description: Role is a SELinux role label that applies to - the container. - type: string - type: - description: Type is a SELinux type label that applies to - the container. - type: string - user: - description: User is a SELinux user label that applies to - the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. If - seccomp options are provided at both the pod & container level, - the container options override the pod options. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must be - preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a profile - defined in a file on the node should be used." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will - be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named by - the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string - targetAllocator: - description: TargetAllocator indicates a value which determines whether - to spawn a target allocation resource or not. - properties: - affinity: - description: If specified, indicates the pod's scheduling constraints - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for - the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: An empty preferred scheduling term matches - all objects with implicit weight 0 (i.e. it's a no-op). - A null preferred scheduling term matches no objects - (i.e. is also a no-op). - properties: - preference: - description: A node selector term, associated with - the corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - weight: - description: Weight associated with matching the - corresponding nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. - The terms are ORed. - items: - description: A null or empty node selector term - matches no objects. The requirements of them are - ANDed. The TopologySelectorTerm type implements - a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is - a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators - are In, NotIn, Exists, DoesNotExist. - Gt, and Lt. - type: string - values: - description: An array of string values. - If the operator is In or NotIn, the - values array must be non-empty. If the - operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - x-kubernetes-map-type: atomic - type: array - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. - co-locate this pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the affinity expressions specified - by this field, but it may choose a node that violates - one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by - this field are not met at scheduling time, the pod will - not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules - (e.g. avoid putting this pod in the same node, zone, etc. - as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods - to nodes that satisfy the anti-affinity expressions - specified by this field, but it may choose a node that - violates one or more of the expressions. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred - node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod - label keys to select which pods will be taken - into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by - this field and the ones listed in the namespaces - field. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. - The term is applied to the union of the namespaces - listed in this field and the ones selected - by namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located - (affinity) or not co-located (anti-affinity) - with the pods matching the labelSelector in - the specified namespaces, where co-located - is defined as running on a node whose ' - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the - corresponding podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified - by this field are not met at scheduling time, the pod - will not be scheduled onto the node. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) - that this pod should be co-located (affinity) or not - co-located (anti-affinity) with, where co-locate - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. If it's null, this PodAffinityTerm - matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - mismatchLabelKeys: - description: MismatchLabelKeys is a set of pod label - keys to select which pods will be taken into consideration. - items: - type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: A label query over the set of namespaces - that the term applies to. The term is applied - to the union of the namespaces selected by this - field and the ones listed in the namespaces field. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement - is a selector that contains values, a key, - and an operator that relates the key and - values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: namespaces specifies a static list - of namespace names that the term applies to. The - term is applied to the union of the namespaces - listed in this field and the ones selected by - namespaceSelector. - items: - type: string - type: array - topologyKey: - description: 'This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose ' - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - allocationStrategy: - description: AllocationStrategy determines which strategy the - target allocator should use for allocation. The current options - are least-weighted and consistent-hashing. The default option - is least-weighted - enum: - - least-weighted - - consistent-hashing - type: string - enabled: - description: Enabled indicates whether to use a target allocation - mechanism for Prometheus targets or not. - type: boolean - env: - description: ENV vars to set on the OpenTelemetry TargetAllocator's - Pods. These can then in certain cases be consumed in the config - file for the TargetAllocator. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - filterStrategy: - description: FilterStrategy determines how to filter targets before - allocating them among the collectors. The only current option - is relabel-config (drops targets based on prom relabel_config). - type: string - image: - description: Image indicates the container image to use for the - OpenTelemetry TargetAllocator. - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule OpenTelemetry TargetAllocator - pods. - type: object - observability: - description: ObservabilitySpec defines how telemetry data gets - handled. - properties: - metrics: - description: Metrics defines the metrics configuration for - operands. - properties: - enableMetrics: - description: EnableMetrics specifies if ServiceMonitor - or PodMonitor(for sidecar mode) should be created for - the service managed by the OpenTelemetry Operator. The - operator.observability. - type: boolean - type: object - type: object - podDisruptionBudget: - description: PodDisruptionBudget specifies the pod disruption - budget configuration to use for the target allocator workload. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at most "maxUnavailable" - pods selected by "selector" are unavailable after the eviction, - i.e. even in absence of the evicted pod. - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: An eviction is allowed if at least "minAvailable" - pods selected by "selector" will still be available after - the eviction, i.e. even in the absence of the evicted pod. - x-kubernetes-int-or-string: true - type: object - prometheusCR: - description: PrometheusCR defines the configuration for the retrieval - of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 - and podmonitor.monitoring.coreos.com/v1 ) retrieval. - properties: - enabled: - description: Enabled indicates whether to use a PrometheusOperator - custom resources as targets or not. - type: boolean - podMonitorSelector: - additionalProperties: - type: string - description: PodMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a PodMonitor's - meta labels. - type: object - scrapeInterval: - default: 30s - description: "Interval between consecutive scrapes. Equivalent - to the same setting on the Prometheus CRD. \n Default: \"30s\"" - format: duration - type: string - serviceMonitorSelector: - additionalProperties: - type: string - description: ServiceMonitors to be selected for target discovery. - This is a map of {key,value} pairs. Each {key,value} in - the map is going to exactly match a label in a ServiceMonitor's - meta labels. - type: object - type: object - replicas: - description: Replicas is the number of pod instances for the underlying - TargetAllocator. This should only be set to a value other than - 1 if a strategy that allows for high availability is chosen. - format: int32 - type: integer - resources: - description: Resources to set on the OpenTelemetryTargetAllocator - containers. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - securityContext: - description: SecurityContext configures the container security - context for the targetallocator. - properties: - fsGroup: - description: "A special supplemental group that applies to - all containers in a pod. Some volume types allow the Kubelet - to change the ownership of that volume to be owned by the - pod: \n 1." - format: int64 - type: integer - fsGroupChangePolicy: - description: fsGroupChangePolicy defines behavior of changing - ownership and permission of the volume before being exposed - inside Pod. - type: string - runAsGroup: - description: The GID to run the entrypoint of the container - process. Uses runtime default if unset. May also be set - in SecurityContext. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a non-root - user. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata if - unspecified. May also be set in SecurityContext. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random - SELinux context for each container. May also be set in - SecurityContext. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by the containers - in this pod. Note that this field cannot be set when spec.os.name - is windows. - properties: - localhostProfile: - description: localhostProfile indicates a profile defined - in a file on the node should be used. The profile must - be preconfigured on the node to work. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - a - profile defined in a file on the node should be used." - type: string - required: - - type - type: object - supplementalGroups: - description: A list of groups applied to the first process - run in each container, in addition to the container's primary - GID, the fsGroup (if specified), and group memberships defined - in the container image for th - items: - format: int64 - type: integer - type: array - sysctls: - description: Sysctls hold a list of namespaced sysctls used - for the pod. Pods with unsupported sysctls (by the container - runtime) might fail to launch. Note that this field cannot - be set when spec.os. - items: - description: Sysctl defines a kernel parameter to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value - type: object - type: array - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options within a container's - SecurityContext will be used. - properties: - gmsaCredentialSpec: - description: GMSACredentialSpec is where the GMSA admission - webhook (https://github.com/kubernetes-sigs/windows-gmsa) - inlines the contents of the GMSA credential spec named - by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the name of the - GMSA credential spec to use. - type: string - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set in - PodSecurityContext. - type: string - type: object - type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing - service account to use with this instance. When set, the operator - will not automatically create a ServiceAccount for the TargetAllocator. - type: string - tolerations: - description: Toleration embedded kubernetes pod configuration - option, controls how pods can be scheduled with matching taints - items: - description: The pod this Toleration is attached to tolerates - any taint that matches the triple using - the matching operator . - properties: - effect: - description: Effect indicates the taint effect to match. - Empty means match all taint effects. When specified, allowed - values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, - operator must be Exists; this combination means to match - all values and all keys. - type: string - operator: - description: Operator represents a key's relationship to - the value. Valid operators are Exists and Equal. Defaults - to Equal. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of - time the toleration (which must be of effect NoExecute, - otherwise this field is ignored) tolerates the taint. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches - to. If the operator is Exists, the value should be empty, - otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod - configuration option, controls how pods are spread across your - cluster among failure-domains such as regions, zones, nodes, - and other user-defined top + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object + tls: + description: TLS configuration. items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. + description: IngressTLS describes the transport layer security + associated with an ingress. properties: - labelSelector: - description: LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine - the number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to - select the pods over which spreading will be calculated. + hosts: + description: hosts is a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. Defaults to the wildcard host setting + for the loadbalancer controller fulfilling this Ingress, + if left unspecified. items: type: string type: array x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods - may be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat - node taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes - that have a label with this key and identical values are - considered to be in the same topology. + secretName: + description: secretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. If the + SNI host in a listener conflicts with the "Host" header + field used by an IngressRule, the SNI host is used for + termination and value of the "Host" header is used for + routing. type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with - a pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress' + enum: + - ingress + - route + type: string + type: object + mode: + description: Mode represents how the collector should be deployed + (deployment, daemonset, statefulset or sidecar) + enum: + - daemonset + - deployment + - sidecar + - statefulset + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule CloudWatch Agent pods. This + is only relevant to daemonset, statefulset, and deployment mode + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open additional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: The application protocol for this port. This field + follows standard Kubernetes label syntax. Un-prefixed names + are reserved for IANA standard service names (as per RFC-6335 + and https://www.iana.org/assignments/service-names). Non-standard + protocols should use prefixed names such as mycompany.com/my-custom-protocol. + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. If a value is specified, in-range, and not + in use it will be used, otherwise the operation will fail. If + not specified, a port will be allocated if this Service requires + one. If this field is specified when creating a Service which + does not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + CloudWatch Agent. Set this if your are not using autoscaling + format: int32 + type: integer + resources: + description: Resources to set on the CloudWatch Agent pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. type: string required: - - maxSkew - - topologyKey - - whenUnsatisfiable + - name type: object type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object type: object - terminationGracePeriodSeconds: - description: Duration in seconds the pod needs to terminate gracefully - upon probe failure. - format: int64 - type: integer + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. + type: string tolerations: - description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonset, statefulset, and deployment - mode + description: Toleration to schedule CloudWatch Agent pods. This is + only relevant to daemonset, statefulset, and deployment mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -5570,11 +460,16 @@ spec: operator: description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod + can tolerate all taints of a particular category. type: string tolerationSeconds: description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise - this field is ignored) tolerates the taint. + this field is ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever (do not + evict). Zero and negative values will be treated as 0 (evict + immediately) by the system. format: int64 type: integer value: @@ -5584,128 +479,6 @@ spec: type: string type: object type: array - topologySpreadConstraints: - description: TopologySpreadConstraints embedded kubernetes pod configuration - option, controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined top - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - properties: - labelSelector: - description: LabelSelector is used to find matching pods. Pods - that match this label selector are counted to determine the - number of pods in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: MatchLabelKeys is a set of pod label keys to select - the pods over which spreading will be calculated. - items: - type: string - type: array - x-kubernetes-list-type: atomic - maxSkew: - description: MaxSkew describes the degree to which pods may - be unevenly distributed. - format: int32 - type: integer - minDomains: - description: MinDomains indicates a minimum number of eligible - domains. - format: int32 - type: integer - nodeAffinityPolicy: - description: NodeAffinityPolicy indicates how we will treat - Pod's nodeAffinity/nodeSelector when calculating pod topology - spread skew. - type: string - nodeTaintsPolicy: - description: NodeTaintsPolicy indicates how we will treat node - taints when calculating pod topology spread skew. - type: string - topologyKey: - description: TopologyKey is the key of node labels. Nodes that - have a label with this key and identical values are considered - to be in the same topology. - type: string - whenUnsatisfiable: - description: WhenUnsatisfiable indicates how to deal with a - pod if it doesn't satisfy the spread constraint. - DoNotSchedule - (default) tells the scheduler not to schedule it. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - updateStrategy: - description: UpdateStrategy represents the strategy the operator will - take replacing existing DaemonSet pods with new pods https://kubernetes. - properties: - rollingUpdate: - description: 'Rolling update config params. Present only if type - = "RollingUpdate". --- TODO: Update this to follow our convention - for oneOf, whatever we decide it to be. Same as Deployment `strategy.' - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: The maximum number of nodes with an existing - available DaemonSet pod that can have an updated DaemonSet - pod during during an update. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: The maximum number of DaemonSet pods that can - be unavailable during the update. - x-kubernetes-int-or-string: true - type: object - type: - description: Type of daemon set update. Can be "RollingUpdate" - or "OnDelete". Default is RollingUpdate. - type: string - type: object upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed @@ -5721,15 +494,16 @@ spec: to a persistent volume properties: apiVersion: - description: APIVersion defines the versioned schema of this + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized - values. + values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: Kind is a string value representing the REST resource + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' @@ -5763,7 +537,16 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.' + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the provisioner + or an external controller can support the specified data + source, it will create a new volume based on the contents + of the specified data source. When the AnyVolumeDataSource + feature gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will be copied + to dataSource when dataSourceRef.namespace is not specified. + If the namespace is specified, then dataSourceRef will + not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -5783,9 +566,33 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: dataSourceRef specifies the object from which + description: 'dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume - is desired. + is desired. This may be any object from a non-empty API + group (non core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding will only + succeed if the type of the specified object matches some + installed volume populator or dynamic provisioner. This + field will replace the functionality of the dataSource + field and as such if both fields are non-empty, they must + have the same value. For backwards compatibility, when + namespace isn''t specified in dataSourceRef, both fields + (dataSource and dataSourceRef) will be set to the same + value automatically if one of them is empty and the other + is non-empty. When namespace is specified in dataSourceRef, + dataSource isn''t set to the same value and must be empty. + There are three important differences between dataSource + and dataSourceRef: * While dataSource only allows two + specific types of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. * While + dataSource ignores disallowed values (dropping them), + dataSourceRef preserves all values, and generates an error + if a disallowed value is specified. * While dataSource + only allows local objects, dataSourceRef allows objects + in any namespaces. (Beta) Using this field requires the + AnyVolumeDataSource feature gate to be enabled. (Alpha) + Using the namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -5802,16 +609,48 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace is specified, - a gateway.networking.k8s. + a gateway.networking.k8s.io/ReferenceGrant object + is required in the referent namespace to allow that + namespace's owner to accept the reference. See the + ReferenceGrant documentation for details. (Alpha) + This field requires the CrossNamespaceVolumeDataSource + feature gate to be enabled. type: string required: - kind - name type: object resources: - description: resources represents the minimum resources - the volume should have. - properties: + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. \n This field + is immutable. It can only be set for containers." + items: + description: ResourceClaim references one entry in + PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where + this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -5829,8 +668,11 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of - compute resources required. + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: @@ -5859,6 +701,8 @@ spec: If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. items: type: string type: array @@ -5871,6 +715,10 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -5878,10 +726,6 @@ spec: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used to set - the VolumeAttributesClass used by this claim. - type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not @@ -5902,18 +746,6 @@ spec: items: type: string type: array - allocatedResourceStatuses: - additionalProperties: - description: When a controller receives persistentvolume - claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that - update and let other controllers handle it. - type: string - description: allocatedResourceStatuses stores status of - resource being resized for the given PVC. Key names follow - standard Kubernetes label syntax. - type: object - x-kubernetes-map-type: granular allocatedResources: additionalProperties: anyOf: @@ -5921,9 +753,18 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: allocatedResources tracks the resources allocated - to a PVC including its capacity. Key names follow standard - Kubernetes label syntax. + description: allocatedResources is the storage resource + within AllocatedResources tracks the capacity allocated + to a PVC. It may be larger than the actual capacity when + a volume expansion operation is requested. For storage + quota, the larger value from allocatedResources and PVC.spec.resources + is used. If allocatedResources is not set, PVC.spec.resources + alone is used for quota calculation. If a volume expansion + capacity request is lowered, allocatedResources is only + lowered if there are no expansion operations in progress + and if the actual volume capacity is equal or lower than + the requested capacity. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. type: object capacity: additionalProperties: @@ -5960,7 +801,9 @@ spec: reason: description: reason is a unique, this should be a short, machine understandable string that gives - the reason for condition's last transition. + the reason for condition's last transition. If it + reports "ResizeStarted" that means the underlying + persistent volume is being resized. type: string status: type: string @@ -5973,30 +816,16 @@ spec: - type type: object type: array - currentVolumeAttributesClassName: - description: currentVolumeAttributesClassName is the current - name of the VolumeAttributesClass the PVC is using. - type: string - modifyVolumeStatus: - description: ModifyVolumeStatus represents the status object - of ControllerModifyVolume operation. When this is unset, - there is no ModifyVolume operation being attempted. - properties: - status: - description: status is the status of the ControllerModifyVolume - operation. - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object phase: description: phase represents the current phase of PersistentVolumeClaim. type: string + resizeStatus: + description: resizeStatus stores status of resize operation. + ResizeStatus is not set by default but when expansion + is complete resizeStatus is set to empty string by resize + controller or kubelet. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: string type: object type: object type: array @@ -6031,7 +860,10 @@ spec: type: string subPathExpr: description: Expanded path within the volume from which the - container's volume should be mounted. + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath @@ -6049,19 +881,23 @@ spec: awsElasticBlockStore: description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' properties: fsType: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty).' format: int32 type: integer readOnly: @@ -6101,7 +937,7 @@ spec: description: 'kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data - disk (only in managed availability set).' + disk (only in managed availability set). defaults to shared' type: string readOnly: description: readOnly Defaults to false (read/write). ReadOnly @@ -6180,7 +1016,7 @@ spec: description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to - be "ext4" if unspecified.' + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string readOnly: description: 'readOnly defaults to false (read/write). ReadOnly @@ -6212,14 +1048,24 @@ spec: description: 'defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511.' + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: description: items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content - is the value. + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the ConfigMap, the volume setup will error unless it is + marked optional. Paths must be relative and may not contain + the '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: @@ -6230,7 +1076,12 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511.' + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: @@ -6274,7 +1125,10 @@ spec: description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume - and NodeUnpublishVolume calls. + and NodeUnpublishVolume calls. This field is optional, + and may be empty if no secret is required. If the secret + object contains more than one secret, all secret references + are passed. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6303,7 +1157,14 @@ spec: defaultMode: description: 'Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set - permissions on created files by default.' + permissions on created files by default. Must be an octal + value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: @@ -6332,7 +1193,13 @@ spec: mode: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511.' + and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires + decimal values for mode bits. If not specified, + the volume defaultMode will be used. This might + be in conflict with other options that affect the + file mode, like fsGroup, and the result can be other + mode bits set.' format: int32 type: integer path: @@ -6377,29 +1244,64 @@ spec: shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: medium represents what type of storage medium + description: 'medium represents what type of storage medium should back this directory. The default is "" which means - to use the node's default medium. Must be an empty string - (default) or Memory. + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: anyOf: - type: integer - type: string - description: sizeLimit is the total amount of local storage + description: 'sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also - applicable for memory medium. + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the + SizeLimit specified here and the sum of memory limits + of all containers in a pod. The default is nil which means + that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: ephemeral represents a volume that is handled by - a cluster storage driver. + description: "ephemeral represents a volume that is handled + by a cluster storage driver. The volume's lifecycle is tied + to the pod that defines it - it will be created before the + pod starts, and deleted when the pod is removed. \n Use this + if: a) the volume is only needed while the pod runs, b) features + of normal volumes like restoring from snapshot or capacity + tracking are needed, c) the storage driver is specified through + a storage class, and d) the storage driver supports dynamic + volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n Use + CSI for light-weight local ephemeral volumes if the CSI driver + is meant to be used that way - see the documentation of the + driver for more information. \n A pod can use both types of + ephemeral volumes and persistent volumes at the same time." properties: volumeClaimTemplate: - description: Will be used to create a stand-alone PVC to + description: "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource - is embedded will be the owner of the PVC, i.e. + is embedded will be the owner of the PVC, i.e. the PVC + will be deleted together with the pod. The name of the + PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. + Pod validation will reject the pod if the concatenated + name is not valid for a PVC (for example, too long). \n + An existing PVC with that name that is not owned by the + pod will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC + is meant to be used by the pod, the PVC has to updated + with an owner reference to the pod once the pod exists. + Normally this should not be necessary, but it may be useful + when manually reconstructing a broken cluster. \n This + field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. \n Required, must + not be nil." properties: metadata: description: May contain labels and annotations that @@ -6426,7 +1328,8 @@ spec: spec: description: The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC - that gets created from this template. + that gets created from this template. The same fields + as in a PersistentVolumeClaim are also valid here. properties: accessModes: description: 'accessModes contains the desired access @@ -6436,7 +1339,17 @@ spec: type: array dataSource: description: 'dataSource field can be used to specify - either: * An existing VolumeSnapshot object (snapshot.storage.k8s.' + either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) If the + provisioner or an external controller can support + the specified data source, it will create a new + volume based on the contents of the specified + data source. When the AnyVolumeDataSource feature + gate is enabled, dataSource contents will be copied + to dataSourceRef, and dataSourceRef contents will + be copied to dataSource when dataSourceRef.namespace + is not specified. If the namespace is specified, + then dataSourceRef will not be copied to dataSource.' properties: apiGroup: description: APIGroup is the group for the resource @@ -6459,9 +1372,38 @@ spec: type: object x-kubernetes-map-type: atomic dataSourceRef: - description: dataSourceRef specifies the object + description: 'dataSourceRef specifies the object from which to populate the volume with data, if - a non-empty volume is desired. + a non-empty volume is desired. This may be any + object from a non-empty API group (non core object) + or a PersistentVolumeClaim object. When this field + is specified, volume binding will only succeed + if the type of the specified object matches some + installed volume populator or dynamic provisioner. + This field will replace the functionality of the + dataSource field and as such if both fields are + non-empty, they must have the same value. For + backwards compatibility, when namespace isn''t + specified in dataSourceRef, both fields (dataSource + and dataSourceRef) will be set to the same value + automatically if one of them is empty and the + other is non-empty. When namespace is specified + in dataSourceRef, dataSource isn''t set to the + same value and must be empty. There are three + important differences between dataSource and dataSourceRef: + * While dataSource only allows two specific types + of objects, dataSourceRef allows any non-core + object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping + them), dataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + * While dataSource only allows local objects, + dataSourceRef allows objects in any namespaces. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled. (Alpha) Using the + namespace field of dataSourceRef requires the + CrossNamespaceVolumeDataSource feature gate to + be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -6481,16 +1423,51 @@ spec: namespace: description: Namespace is the namespace of resource being referenced Note that when a namespace - is specified, a gateway.networking.k8s. + is specified, a gateway.networking.k8s.io/ReferenceGrant + object is required in the referent namespace + to allow that namespace's owner to accept + the reference. See the ReferenceGrant documentation + for details. (Alpha) This field requires the + CrossNamespaceVolumeDataSource feature gate + to be enabled. type: string required: - kind - name type: object resources: - description: resources represents the minimum resources - the volume should have. + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: + claims: + description: "Claims lists the names of resources, + defined in spec.resourceClaims, that are used + by this container. \n This is an alpha field + and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. + It can only be set for containers." + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name + of one entry in pod.spec.resourceClaims + of the Pod where this field is used. + It makes that resource available inside + a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -6508,8 +1485,12 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Requests describes the minimum - amount of compute resources required. + description: 'Requests describes the minimum + amount of compute resources required. If Requests + is omitted for a container, it defaults to + Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object selector: @@ -6541,7 +1522,9 @@ spec: values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. + the values array must be empty. This + array is replaced during a strategic + merge patch. items: type: string type: array @@ -6554,7 +1537,11 @@ spec: additionalProperties: type: string description: matchLabels is a map of {key,value} - pairs. + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. type: object type: object x-kubernetes-map-type: atomic @@ -6563,11 +1550,6 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string - volumeAttributesClassName: - description: volumeAttributesClassName may be used - to set the VolumeAttributesClass used by this - claim. - type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -6588,10 +1570,11 @@ spec: pod. properties: fsType: - description: fsType is the filesystem type to mount. Must + description: 'fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. + if unspecified. TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string lun: description: 'lun is Optional: FC target lun number' @@ -6643,7 +1626,9 @@ spec: description: 'secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no - secret object is specified.' + secret object is specified. If the secret object contains + more than one secret, all secrets are passed to the plugin + scripts.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -6672,19 +1657,24 @@ spec: gcePersistentDisk: description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed - to the pod. More info: https://kubernetes.' + to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' properties: fsType: description: 'fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", - "xfs", "ntfs".' + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string partition: description: 'partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify - the partition as "1".' + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' format: int32 type: integer pdName: @@ -6700,12 +1690,17 @@ spec: type: object gitRepo: description: 'gitRepo represents a git repository at a particular - revision. DEPRECATED: GitRepo is deprecated.' + revision. DEPRECATED: GitRepo is deprecated. To provision + a container with a git repo, mount an EmptyDir into an InitContainer + that clones the repo using git, then mount the EmptyDir into + the Pod''s container.' properties: directory: description: directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the - volume directory will be the git repository. + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. type: string repository: description: repository is the URL @@ -6739,8 +1734,13 @@ spec: - path type: object hostPath: - description: hostPath represents a pre-existing file or directory + description: 'hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. + This is generally used for system agents or other privileged + things that are allowed to see the host machine. Most containers + will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- TODO(jonesdl) We need to restrict who can use host directory + mounts and who can/can not mount host directories as read/write.' properties: path: description: 'path of the directory on the host. If the @@ -6771,11 +1771,16 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string initiatorName: description: initiatorName is the custom iSCSI Initiator - Name. + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. type: string iqn: description: iqn is the target iSCSI Qualified Name. @@ -6847,7 +1852,7 @@ spec: persistentVolumeClaim: description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. - More info: https://kubernetes.' + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: claimName: description: 'claimName is the name of a PersistentVolumeClaim @@ -6905,7 +1910,12 @@ spec: defaultMode: description: defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like fsGroup, + and the result can be other mode bits set. format: int32 type: integer sources: @@ -6914,84 +1924,6 @@ spec: description: Projection that may be projected along with other supported volume types properties: - clusterTrustBundle: - description: "ClusterTrustBundle allows a pod to access - the `.spec.trustBundle` field of ClusterTrustBundle - objects in an auto-updating file. \n Alpha, gated - by the ClusterTrustBundleProjection feature gate." - properties: - labelSelector: - description: Select all ClusterTrustBundles that - match this label selector. Only has effect - if signerName is set. Mutually-exclusive with - name. If unset, interpreted as "match nothing". - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: Select a single ClusterTrustBundle - by object name. Mutually-exclusive with signerName - and labelSelector. - type: string - optional: - description: If true, don't block pod startup - if the referenced ClusterTrustBundle(s) aren't - available. If using name, then the named ClusterTrustBundle - is allowed not to exist. - type: boolean - path: - description: Relative path from the volume root - to write the bundle. - type: string - signerName: - description: Select all ClusterTrustBundles that - match this signer name. Mutually-exclusive with - name. The contents of all selected ClusterTrustBundles - will be unified and deduplicated. - type: string - required: - - path - type: object configMap: description: configMap information about the configMap data to project @@ -7001,6 +1933,13 @@ spec: pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the ConfigMap, the volume + setup will error unless it is marked optional. + Paths must be relative and may not contain the + '..' path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -7013,7 +1952,13 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511.' + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: @@ -7074,7 +2019,14 @@ spec: description: 'Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or - a decimal value between 0 and 511.' + a decimal value between 0 and 511. YAML + accepts both octal and decimal values, + JSON requires decimal values for mode + bits. If not specified, the volume defaultMode + will be used. This might be in conflict + with other options that affect the file + mode, like fsGroup, and the result can + be other mode bits set.' format: int32 type: integer path: @@ -7126,6 +2078,13 @@ spec: pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. + If specified, the listed keys will be projected + into the specified paths, and unlisted keys + will not be present. If a key is specified which + is not present in the Secret, the volume setup + will error unless it is marked optional. Paths + must be relative and may not contain the '..' + path or start with '..'. items: description: Maps a string key to a path within a volume. @@ -7138,7 +2097,13 @@ spec: used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and - 511.' + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: @@ -7174,14 +2139,19 @@ spec: of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the - token. + token. The audience defaults to the identifier + of the apiserver. type: string expirationSeconds: description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate - the service account token. + the service account token. The kubelet will + start trying to rotate the token if the token + is older than 80 percent of its time to live + or if the token is older than 24 hours.Defaults + to 1 hour and must be at least 10 minutes. format: int64 type: integer path: @@ -7239,7 +2209,10 @@ spec: description: 'fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: - "ext4", "xfs", "ntfs".' + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from + compromising the machine' type: string image: description: 'image is the rados image name. More info: @@ -7349,14 +2322,24 @@ spec: description: 'defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511.' + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: description: items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content - is the value. + is the value. If specified, the listed keys will be projected + into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in + the Secret, the volume setup will error unless it is marked + optional. Paths must be relative and may not contain the + '..' path or start with '..'. items: description: Maps a string key to a path within a volume. properties: @@ -7367,7 +2350,12 @@ spec: description: 'mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between - 0 and 511.' + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: @@ -7423,7 +2411,12 @@ spec: volumeNamespace: description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified - then the Pod's namespace will be used. + then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS + for tighter integration. Set VolumeName to any name to + override the default behaviour. Set to "default" if you + are not using namespaces within StorageOS. Namespaces + that do not pre-exist within StorageOS will be created. type: string type: object vsphereVolume: @@ -7462,8 +2455,8 @@ spec: AmazonCloudWatchAgent. properties: image: - description: Image indicates the container image to use for the OpenTelemetry - Collector. + description: Image indicates the container image to use for the CloudWatch + Agent. type: string messages: description: 'Messages about actions performed by the operator on @@ -7495,11 +2488,11 @@ spec: description: StatusReplicas is the number of pods targeted by this AmazonCloudWatchAgent's with a Ready Condition / Total number of non-terminated pods targeted by this AmazonCloudWatchAgent's - (their labels matc + (their labels match the selector). Deployment, Daemonset, StatefulSet. type: string type: object version: - description: Version of the managed OpenTelemetry Collector (operand) + description: Version of the managed CloudWatch Agent (operand) type: string type: object type: object diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml index d54c45347..acec5e4ae 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: instrumentations.opentelemetry.io + name: instrumentations.cloudwatch.aws.amazon.com spec: - group: opentelemetry.io + group: cloudwatch.aws.amazon.com names: kind: Instrumentation listKind: InstrumentationList @@ -36,14 +36,14 @@ spec: description: Instrumentation is the spec for OpenTelemetry instrumentation. properties: apiVersion: - description: APIVersion defines the versioned schema of this representation + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: Kind is a string value representing the REST resource this + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -51,1187 +51,135 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: - apacheHttpd: - description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Apache HTTPD agent specific attributes. - The precedence is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configPath: - description: Location of Apache HTTPD server configuration. Needed - only if different from default "/usr/local/apache2/conf" - type: string - env: - description: Env defines Apache HTTPD specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. + env: + description: 'Env defines common env vars. There are four layers for + env vars'' definitions and the precedence order is: `original container + env vars` > `language specific env vars` > `common env vars` > `instrument + spec configs'' vars`. If the former var had been defined, then the + other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Apache SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + configMapKeyRef: + description: Selects a key of a ConfigMap. properties: + key: + description: The key to select. + type: string name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - version: - description: Apache HTTPD server version. One of 2.4 or 2.2. Default - is 2.4 - type: string - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - dotnet: - description: DotNet defines configuration for DotNet auto-instrumentation. - properties: - env: - description: Env defines DotNet specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with DotNet SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - env: - description: Env defines common env vars. - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key + - key type: object x-kubernetes-map-type: atomic fieldRef: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.' - properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string - type: object - go: - description: Go defines configuration for Go auto-instrumentation. - properties: - env: - description: Env defines Go specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Go SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - java: - description: Java defines configuration for java auto-instrumentation. - properties: - env: - description: Env defines java specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with javaagent auto-instrumentation - JAR. - type: string - resources: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - nginx: - description: Nginx defines configuration for Nginx auto-instrumentation. - properties: - attrs: - description: 'Attrs defines Nginx agent specific attributes. The - precedence order is: `agent default attributes` > `instrument - spec attributes` . Attributes are documented at https://github.' - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - configFile: - description: Location of Nginx configuration file. Needed only - if different from default "/etx/nginx/nginx.conf" - type: string - env: - description: Env defines Nginx specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Nginx SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean required: - - name + - key type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string type: object - nodejs: - description: NodeJS defines configuration for nodejs auto-instrumentation. + java: + description: Java defines configuration for java auto-instrumentation. properties: env: - description: Env defines nodejs specific env vars. + description: 'Env defines java specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' items: description: EnvVar represents an environment variable present in a Container. @@ -1241,9 +189,15 @@ spec: C_IDENTIFIER. type: string value: - description: Variable references $(VAR_NAME) are expanded + description: 'Variable references $(VAR_NAME) are expanded using the previously defined environment variables in - the container and any service environment variables. + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' type: string valueFrom: description: Source for the environment variable's value. @@ -1272,7 +226,8 @@ spec: description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' properties: apiVersion: description: Version of the schema the FieldPath @@ -1290,7 +245,7 @@ spec: description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' + and requests.ephemeral-storage) are currently supported.' properties: containerName: description: 'Container name: required for volumes, @@ -1338,16 +293,18 @@ spec: type: object type: array image: - description: Image is a container image with NodeJS SDK and auto-instrumentation. + description: Image is a container image with javaagent auto-instrumentation + JAR. type: string - resourceRequirements: + resources: description: Resources describes the compute resource requirements. properties: claims: description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." + feature gate. \n This field is immutable. It can only be + set for containers." items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: @@ -1381,18 +338,13 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true type: object propagators: description: Propagators defines inter-process context propagation @@ -1411,173 +363,6 @@ spec: - none type: string type: array - python: - description: Python defines configuration for python auto-instrumentation. - properties: - env: - description: Env defines python specific env vars. - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: Name of the environment variable. Must be a - C_IDENTIFIER. - type: string - value: - description: Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in - the container and any service environment variables. - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.' - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - image: - description: Image is a container image with Python SDK and auto-instrumentation. - type: string - resourceRequirements: - description: Resources describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in - pod.spec.resourceClaims of the Pod where this field - is used. It makes that resource available inside a - container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Requests describes the minimum amount of compute - resources required. - type: object - type: object - volumeLimitSize: - anyOf: - - type: integer - - type: string - description: VolumeSizeLimit defines size limit for volume used - for auto-instrumentation. The default size is 200Mi. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object resource: description: Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. @@ -1599,7 +384,8 @@ spec: argument: description: Argument defines sampler argument. The value depends on the sampler type. For instance for parentbased_traceidratio - sampler type it is a number in range [0..1] e.g. 0.25. + sampler type it is a number in range [0..1] e.g. 0.25. The value + will be set in the OTEL_TRACES_SAMPLER_ARG env var. type: string type: description: Type defines sampler type. The value will be set diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2f838bfe2..2d404ed9b 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: aws/cloudwatch-agent-operator - newTag: 1.0.2 + newName: 506463145083.dkr.ecr.us-west-2.amazonaws.com/cwagent-operator-pre-release + newTag: latest diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 080d9201f..972d1f889 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -8,9 +8,6 @@ rules: - "" resources: - configmaps - - pods - - serviceaccounts - - services verbs: - create - delete @@ -34,11 +31,9 @@ rules: - list - watch - apiGroups: - - apps + - "" resources: - - daemonsets - - deployments - - statefulsets + - serviceaccounts verbs: - create - delete @@ -48,17 +43,9 @@ rules: - update - watch - apiGroups: - - apps - resources: - - replicasets - verbs: - - get - - list - - watch -- apiGroups: - - autoscaling + - "" resources: - - horizontalpodautoscalers + - services verbs: - create - delete @@ -68,19 +55,9 @@ rules: - update - watch - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - list - - update -- apiGroups: - - monitoring.coreos.com + - apps resources: - - podmonitors - - servicemonitors + - daemonsets verbs: - create - delete @@ -90,9 +67,9 @@ rules: - update - watch - apiGroups: - - networking.k8s.io + - apps resources: - - ingresses + - deployments verbs: - create - delete @@ -102,71 +79,62 @@ rules: - update - watch - apiGroups: - - opentelemetry.io + - apps resources: - - instrumentations + - replicasets verbs: - get - list - - patch - - update - watch - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com resources: - - opampbridges + - amazoncloudwatchagents verbs: - - create - - delete - get - list - patch - update - watch - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com resources: - - opampbridges/finalizers - verbs: - - update -- apiGroups: - - opentelemetry.io - resources: - - opampbridges/status + - amazoncloudwatchagents/finalizers verbs: - get - patch - update - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com resources: - - amazoncloudwatchagents + - amazoncloudwatchagents/status verbs: - get - - list - patch - update - - watch - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com resources: - - amazoncloudwatchagents/finalizers + - instrumentations verbs: - get + - list - patch - update + - watch - apiGroups: - - opentelemetry.io + - coordination.k8s.io resources: - - amazoncloudwatchagents/status + - leases verbs: + - create - get - - patch + - list - update - apiGroups: - - policy + - networking.k8s.io resources: - - poddisruptionbudgets + - ingresses verbs: - create - delete diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index b839ced73..ce347fbcf 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -10,39 +10,19 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation - failurePolicy: Fail - name: minstrumentation.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge + path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Fail - name: mopampbridge.kb.io + name: mamazoncloudwatchagent.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - opampbridges + - amazoncloudwatchagents sideEffects: None - admissionReviewVersions: - v1 @@ -50,19 +30,19 @@ webhooks: service: name: webhook-service namespace: system - path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Fail - name: mamazoncloudwatchagent.kb.io + name: minstrumentation.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None - admissionReviewVersions: - v1 @@ -96,58 +76,19 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation - failurePolicy: Fail - name: vinstrumentationcreateupdate.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation - failurePolicy: Ignore - name: vinstrumentationdelete.kb.io - rules: - - apiGroups: - - opentelemetry.io - apiVersions: - - v1alpha1 - operations: - - DELETE - resources: - - instrumentations - sideEffects: None -- admissionReviewVersions: - - v1 - clientConfig: - service: - name: webhook-service - namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Fail - name: vopampbridgecreateupdate.kb.io + name: vamazoncloudwatchagentcreateupdate.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - opampbridges + - amazoncloudwatchagents sideEffects: None - admissionReviewVersions: - v1 @@ -155,18 +96,18 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent failurePolicy: Ignore - name: vopampbridgedelete.kb.io + name: vamazoncloudwatchagentdelete.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - DELETE resources: - - opampbridges + - amazoncloudwatchagents sideEffects: None - admissionReviewVersions: - v1 @@ -174,19 +115,19 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Fail - name: vamazoncloudwatchagentcreateupdate.kb.io + name: vinstrumentationcreateupdate.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None - admissionReviewVersions: - v1 @@ -194,16 +135,16 @@ webhooks: service: name: webhook-service namespace: system - path: /validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent + path: /validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation failurePolicy: Ignore - name: vamazoncloudwatchagentdelete.kb.io + name: vinstrumentationdelete.kb.io rules: - apiGroups: - - opentelemetry.io + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: - DELETE resources: - - amazoncloudwatchagents + - instrumentations sideEffects: None From 31d1859053b2f40fd3f2008b172330a67208f65f Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 14:18:32 -0500 Subject: [PATCH 1219/1234] Remove unused components --- main.go | 63 ++------------------------------------------------------- 1 file changed, 2 insertions(+), 61 deletions(-) diff --git a/main.go b/main.go index 6452b52bf..832dd196d 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,6 @@ import ( "os" "runtime" "strings" - "time" routev1 "github.com/openshift/api/route/v1" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -33,7 +32,6 @@ import ( otelv1alpha1 "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/controllers" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" @@ -93,18 +91,8 @@ func main() { metricsAddr string probeAddr string pprofAddr string - enableLeaderElection bool collectorImage string - targetAllocatorImage string - operatorOpAMPBridgeImage string autoInstrumentationJava string - autoInstrumentationNodeJS string - autoInstrumentationPython string - autoInstrumentationDotNet string - autoInstrumentationApacheHttpd string - autoInstrumentationNginx string - autoInstrumentationGo string - labelsFilter []string webhookPort int tlsOpt tlsConfig ) @@ -112,9 +100,6 @@ func main() { pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.StringVar(&pprofAddr, "pprof-addr", "", "The address to expose the pprof server. Default is empty string which disables the pprof server.") - pflag.BoolVar(&enableLeaderElection, "enable-leader-election", false, - "Enable leader election for controller manager. "+ - "Enabling this will ensure there is only one active controller manager.") stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("%s:%s", autoInstrumentationJavaImageRepository, v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() @@ -125,9 +110,9 @@ func main() { logger := zap.New(zap.UseFlagOptions(&opts)) ctrl.SetLogger(logger) - logger.Info("Starting the OpenTelemetry Operator", + logger.Info("Starting the Amazon CloudWatch Agent Operator", "amazon-cloudwatch-agent-operator", v.Operator, - "opentelemetry-collector", collectorImage, + "cloudwatch-agent", collectorImage, "auto-instrumentation-java", autoInstrumentationJava, "build-date", v.BuildDate, "go-version", v.Go, @@ -135,35 +120,12 @@ func main() { "go-os", runtime.GOOS, ) - restConfig := ctrl.GetConfigOrDie() - - // builds the operator's configuration - ad, err := autodetect.New(restConfig) - if err != nil { - setupLog.Error(err, "failed to setup auto-detect routine") - os.Exit(1) - } - cfg := config.New( config.WithLogger(ctrl.Log.WithName("config")), config.WithVersion(v), config.WithCollectorImage(collectorImage), - config.WithTargetAllocatorImage(targetAllocatorImage), - config.WithOperatorOpAMPBridgeImage(operatorOpAMPBridgeImage), config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), - config.WithAutoInstrumentationNodeJSImage(autoInstrumentationNodeJS), - config.WithAutoInstrumentationPythonImage(autoInstrumentationPython), - config.WithAutoInstrumentationDotNetImage(autoInstrumentationDotNet), - config.WithAutoInstrumentationGoImage(autoInstrumentationGo), - config.WithAutoInstrumentationApacheHttpdImage(autoInstrumentationApacheHttpd), - config.WithAutoInstrumentationNginxImage(autoInstrumentationNginx), - config.WithAutoDetect(ad), - config.WithLabelFilters(labelsFilter), ) - err = cfg.AutoDetect() - if err != nil { - setupLog.Error(err, "failed to autodetect config variables") - } watchNamespace, found := os.LookupEnv("WATCH_NAMESPACE") if found { @@ -172,11 +134,6 @@ func main() { setupLog.Info("the env var WATCH_NAMESPACE isn't set, watching all namespaces") } - // see https://github.com/openshift/library-go/blob/4362aa519714a4b62b00ab8318197ba2bba51cb7/pkg/config/leaderelection/leaderelection.go#L104 - leaseDuration := time.Second * 137 - renewDeadline := time.Second * 107 - retryPeriod := time.Second * 26 - optionsTlSOptsFuncs := []func(*tls.Config){ func(config *tls.Config) { tlsConfigSetting(config, tlsOpt) }, } @@ -194,11 +151,6 @@ func main() { BindAddress: metricsAddr, }, HealthProbeBindAddress: probeAddr, - LeaderElection: enableLeaderElection, - LeaderElectionID: "9f7554c3.opentelemetry.io", - LeaseDuration: &leaseDuration, - RenewDeadline: &renewDeadline, - RetryPeriod: &retryPeriod, PprofBindAddress: pprofAddr, WebhookServer: webhook.NewServer(webhook.Options{ Port: webhookPort, @@ -233,17 +185,6 @@ func main() { os.Exit(1) } - if err = controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ - Client: mgr.GetClient(), - Log: ctrl.Log.WithName("controllers").WithName("OpAMPBridge"), - Scheme: mgr.GetScheme(), - Config: cfg, - Recorder: mgr.GetEventRecorderFor("opamp-bridge"), - }).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "OpAMPBridge") - os.Exit(1) - } - if os.Getenv("ENABLE_WEBHOOKS") != "false" { if err = otelv1alpha1.SetupCollectorWebhook(mgr, cfg); err != nil { setupLog.Error(err, "unable to create webhook", "webhook", "AmazonCloudWatchAgent") From 5513c9b264965b8dfc29706ce90fcb8154d5a15a Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 14:33:15 -0500 Subject: [PATCH 1220/1234] Do not use kubebuilder to rebuild configs --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f7957b5f1..c2eddce91 100644 --- a/Makefile +++ b/Makefile @@ -114,12 +114,12 @@ set-image-controller: manifests kustomize # Deploy controller in the current Kubernetes context, configured in ~/.kube/config .PHONY: deploy -deploy: set-image-controller +deploy: #set-image-controller $(KUSTOMIZE) build config/default | kubectl apply -f - # Undeploy controller in the current Kubernetes context, configured in ~/.kube/config .PHONY: undeploy -undeploy: set-image-controller +undeploy: #set-image-controller $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - # Generates the released manifests From 625272399fc5339db55e6576e8427e34512ecb7b Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 18:52:54 -0500 Subject: [PATCH 1221/1234] Change group to cloudwatch.aws.amazon.com --- apis/v1alpha1/collector_webhook.go | 6 +- apis/v1alpha1/instrumentation_webhook.go | 6 +- apis/v1alpha1/opampbridge_capabilities.go | 24 - apis/v1alpha1/opampbridge_types.go | 134 - apis/v1alpha1/opampbridge_webhook.go | 138 - apis/v1alpha1/opampbridge_webhook_test.go | 312 - apis/v1alpha1/opentelemetrycollector_types.go | 4 +- ...aws.amazon.com_amazoncloudwatchagents.yaml | 7531 ++++++++++++++++- ...watch.aws.amazon.com_instrumentations.yaml | 1584 +++- config/manager/kustomization.yaml | 2 +- config/rbac/role.yaml | 60 +- config/webhook/manifests.yaml | 6 +- controllers/opampbridge_controller.go | 108 - controllers/opampbridge_controller_test.go | 162 - .../opentelemetrycollector_controller.go | 6 +- .../webhook/podmutation/webhookhandler.go | 4 +- pkg/constants/ports.go | 1 + pkg/instrumentation/upgrade/upgrade.go | 2 +- 18 files changed, 8652 insertions(+), 1438 deletions(-) delete mode 100644 apis/v1alpha1/opampbridge_capabilities.go delete mode 100644 apis/v1alpha1/opampbridge_types.go delete mode 100644 apis/v1alpha1/opampbridge_webhook.go delete mode 100644 apis/v1alpha1/opampbridge_webhook_test.go delete mode 100644 controllers/opampbridge_controller.go delete mode 100644 controllers/opampbridge_controller_test.go create mode 100644 pkg/constants/ports.go diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 88336bbb0..71590ec09 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -25,9 +25,9 @@ var ( _ admission.CustomDefaulter = &CollectorWebhook{} ) -// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=true,failurePolicy=fail,groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=create;update,versions=v1alpha1,name=mamazoncloudwatchagent.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=true,failurePolicy=fail,groups=cloudwatch.aws.amazon.co,resources=amazoncloudwatchagents,verbs=create;update,versions=v1alpha1,name=mamazoncloudwatchagent.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=fail,groups=cloudwatch.aws.amazon.co,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-amazoncloudwatchagent,mutating=false,failurePolicy=ignore,groups=cloudwatch.aws.amazon.co,resources=amazoncloudwatchagents,versions=v1alpha1,name=vamazoncloudwatchagentdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:object:generate=false type CollectorWebhook struct { diff --git a/apis/v1alpha1/instrumentation_webhook.go b/apis/v1alpha1/instrumentation_webhook.go index 7ebd0781f..a23e7235d 100644 --- a/apis/v1alpha1/instrumentation_webhook.go +++ b/apis/v1alpha1/instrumentation_webhook.go @@ -38,9 +38,9 @@ var ( } ) -// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 -// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=opentelemetry.io,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=true,failurePolicy=fail,sideEffects=None,groups=cloudwatch.aws.amazon.com,resources=instrumentations,verbs=create;update,versions=v1alpha1,name=minstrumentation.kb.io,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=create;update,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=fail,groups=cloudwatch.aws.amazon.com,resources=instrumentations,versions=v1alpha1,name=vinstrumentationcreateupdate.kb.io,sideEffects=none,admissionReviewVersions=v1 +// +kubebuilder:webhook:verbs=delete,path=/validate-cloudwatch-aws-amazon-com-v1alpha1-instrumentation,mutating=false,failurePolicy=ignore,groups=cloudwatch.aws.amazon.com,resources=instrumentations,versions=v1alpha1,name=vinstrumentationdelete.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:object:generate=false type InstrumentationWebhook struct { diff --git a/apis/v1alpha1/opampbridge_capabilities.go b/apis/v1alpha1/opampbridge_capabilities.go deleted file mode 100644 index f4e69af2b..000000000 --- a/apis/v1alpha1/opampbridge_capabilities.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -type ( - // OpAMPBridgeCapability represents capability supported by OpAMP Bridge. - // +kubebuilder:validation:Enum=AcceptsRemoteConfig;ReportsEffectiveConfig;ReportsOwnTraces;ReportsOwnMetrics;ReportsOwnLogs;AcceptsOpAMPConnectionSettings;AcceptsOtherConnectionSettings;AcceptsRestartCommand;ReportsHealth;ReportsRemoteConfig - OpAMPBridgeCapability string -) - -const ( - OpAMPBridgeCapabilityReportsStatus OpAMPBridgeCapability = "ReportsStatus" - OpAMPBridgeCapabilityAcceptsRemoteConfig OpAMPBridgeCapability = "AcceptsRemoteConfig" - OpAMPBridgeCapabilityReportsEffectiveConfig OpAMPBridgeCapability = "ReportsEffectiveConfig" - OpAMPBridgeCapabilityReportsOwnTraces OpAMPBridgeCapability = "ReportsOwnTraces" - OpAMPBridgeCapabilityReportsOwnMetrics OpAMPBridgeCapability = "ReportsOwnMetrics" - OpAMPBridgeCapabilityReportsOwnLogs OpAMPBridgeCapability = "ReportsOwnLogs" - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings OpAMPBridgeCapability = "AcceptsOpAMPConnectionSettings" - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings OpAMPBridgeCapability = "AcceptsOtherConnectionSettings" - OpAMPBridgeCapabilityAcceptsRestartCommand OpAMPBridgeCapability = "AcceptsRestartCommand" - OpAMPBridgeCapabilityReportsHealth OpAMPBridgeCapability = "ReportsHealth" - OpAMPBridgeCapabilityReportsRemoteConfig OpAMPBridgeCapability = "ReportsRemoteConfig" -) diff --git a/apis/v1alpha1/opampbridge_types.go b/apis/v1alpha1/opampbridge_types.go deleted file mode 100644 index 97e11a03f..000000000 --- a/apis/v1alpha1/opampbridge_types.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OpAMPBridgeSpec defines the desired state of OpAMPBridge. -type OpAMPBridgeSpec struct { - // OpAMP backend Server endpoint - // +required - Endpoint string `json:"endpoint"` - // Headers is an optional map of headers to use when connecting to the OpAMP Server, - // typically used to set access tokens or other authorization headers. - // +optional - Headers map[string]string `json:"headers,omitempty"` - // Capabilities supported by the OpAMP Bridge - // +required - Capabilities map[OpAMPBridgeCapability]bool `json:"capabilities"` - // ComponentsAllowed is a list of allowed OpenTelemetry components for each pipeline type (receiver, processor, etc.) - // +optional - ComponentsAllowed map[string][]string `json:"componentsAllowed,omitempty"` - // Resources to set on the OpAMPBridge pods. - // +optional - Resources v1.ResourceRequirements `json:"resources,omitempty"` - // NodeSelector to schedule OpAMPBridge pods. - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // Replicas is the number of pod instances for the OpAMPBridge. - // +optional - // +kubebuilder:validation:Maximum=1 - Replicas *int32 `json:"replicas,omitempty"` - // SecurityContext will be set as the container security context. - // +optional - SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` - // PodSecurityContext will be set as the pod security context. - // +optional - PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` - // PodAnnotations is the set of annotations that will be attached to - // OpAMPBridge pods. - // +optional - PodAnnotations map[string]string `json:"podAnnotations,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. When set, - // the operator will not automatically create a ServiceAccount for the OpAMPBridge. - // +optional - ServiceAccount string `json:"serviceAccount,omitempty"` - // Image indicates the container image to use for the OpAMPBridge. - // +optional - Image string `json:"image,omitempty"` - // UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed - // +optional - UpgradeStrategy UpgradeStrategy `json:"upgradeStrategy"` - // ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) - // +optional - ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` - // VolumeMounts represents the mount points to use in the underlying OpAMPBridge deployment(s) - // +optional - // +listType=atomic - VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` - // Ports allows a set of ports to be exposed by the underlying v1.Service. - // +optional - // +listType=atomic - Ports []v1.ServicePort `json:"ports,omitempty"` - // ENV vars to set on the OpAMPBridge Pods. - // +optional - Env []v1.EnvVar `json:"env,omitempty"` - // List of sources to populate environment variables on the OpAMPBridge Pods. - // +optional - EnvFrom []v1.EnvFromSource `json:"envFrom,omitempty"` - // Toleration to schedule OpAMPBridge pods. - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // Volumes represents which volumes to use in the underlying OpAMPBridge deployment(s). - // +optional - // +listType=atomic - Volumes []v1.Volume `json:"volumes,omitempty"` - // HostNetwork indicates if the pod should run in the host networking namespace. - // +optional - HostNetwork bool `json:"hostNetwork,omitempty"` - // If specified, indicates the pod's priority. - // If not specified, the pod priority will be default or zero if there is no - // default. - // +optional - PriorityClassName string `json:"priorityClassName,omitempty"` - // If specified, indicates the pod's scheduling constraints - // +optional - Affinity *v1.Affinity `json:"affinity,omitempty"` - // TopologySpreadConstraints embedded kubernetes pod configuration option, - // controls how pods are spread across your cluster among failure-domains - // such as regions, zones, nodes, and other user-defined topology domains - // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// OpAMPBridgeStatus defines the observed state of OpAMPBridge. -type OpAMPBridgeStatus struct { - // Version of the managed OpAMP Bridge (operand) - // +optional - Version string `json:"version,omitempty"` -} - -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" -// +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".spec.endpoint" -// +operator-sdk:csv:customresourcedefinitions:displayName="OpAMP Bridge" -// +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{ConfigMaps,v1},{Service,v1}} - -// OpAMPBridge is the Schema for the opampbridges API. -type OpAMPBridge struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec OpAMPBridgeSpec `json:"spec,omitempty"` - Status OpAMPBridgeStatus `json:"status,omitempty"` -} - -//+kubebuilder:object:root=true - -// OpAMPBridgeList contains a list of OpAMPBridge. -type OpAMPBridgeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []OpAMPBridge `json:"items"` -} - -func init() { - SchemeBuilder.Register(&OpAMPBridge{}, &OpAMPBridgeList{}) -} diff --git a/apis/v1alpha1/opampbridge_webhook.go b/apis/v1alpha1/opampbridge_webhook.go deleted file mode 100644 index 363ea3a01..000000000 --- a/apis/v1alpha1/opampbridge_webhook.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "context" - "fmt" - "strings" - - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/webhook/admission" -) - -var ( - _ admission.CustomValidator = &OpAMPBridgeWebhook{} - _ admission.CustomDefaulter = &OpAMPBridgeWebhook{} -) - -//+kubebuilder:webhook:path=/mutate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=true,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=mopampbridge.kb.io,admissionReviewVersions=v1 -//+kubebuilder:webhook:path=/validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=false,failurePolicy=fail,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=create;update,versions=v1alpha1,name=vopampbridgecreateupdate.kb.io,admissionReviewVersions=v1 -//+kubebuilder:webhook:path=/validate-cloudwatch-aws-amazon-com-v1alpha1-opampbridge,mutating=false,failurePolicy=ignore,sideEffects=None,groups=opentelemetry.io,resources=opampbridges,verbs=delete,versions=v1alpha1,name=vopampbridgedelete.kb.io,admissionReviewVersions=v1 -//+kubebuilder:object:generate=false - -type OpAMPBridgeWebhook struct { - logger logr.Logger - cfg config.Config - scheme *runtime.Scheme -} - -func (o *OpAMPBridgeWebhook) Default(ctx context.Context, obj runtime.Object) error { - opampBridge, ok := obj.(*OpAMPBridge) - if !ok { - return fmt.Errorf("expected an OpAMPBridge, received %T", obj) - } - return o.defaulter(opampBridge) -} - -func (c OpAMPBridgeWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { - opampBridge, ok := obj.(*OpAMPBridge) - if !ok { - return nil, fmt.Errorf("expected an OpAMPBridge, received %T", obj) - } - return c.validate(opampBridge) -} - -func (c OpAMPBridgeWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error) { - opampBridge, ok := newObj.(*OpAMPBridge) - if !ok { - return nil, fmt.Errorf("expected an OpAMPBridge, received %T", newObj) - } - return c.validate(opampBridge) -} - -func (o OpAMPBridgeWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error) { - opampBridge, ok := obj.(*OpAMPBridge) - if !ok || opampBridge == nil { - return nil, fmt.Errorf("expected an OpAMPBridge, received %T", obj) - } - return o.validate(opampBridge) -} - -func (o OpAMPBridgeWebhook) defaulter(r *OpAMPBridge) error { - if len(r.Spec.UpgradeStrategy) == 0 { - r.Spec.UpgradeStrategy = UpgradeStrategyAutomatic - } - - if r.Labels == nil { - r.Labels = map[string]string{} - } - if r.Labels["app.kubernetes.io/managed-by"] == "" { - r.Labels["app.kubernetes.io/managed-by"] = "amazon-cloudwatch-agent-operator" - } - - one := int32(1) - if r.Spec.Replicas == nil { - r.Spec.Replicas = &one - } - - // ReportsStatus Capability must be set - if r.Spec.Capabilities == nil { - r.Spec.Capabilities = make(map[OpAMPBridgeCapability]bool) - } - enabled, found := r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] - if !enabled || !found { - r.Spec.Capabilities[OpAMPBridgeCapabilityReportsStatus] = true - } - return nil -} - -func (o OpAMPBridgeWebhook) validate(r *OpAMPBridge) (admission.Warnings, error) { - warnings := admission.Warnings{} - - // validate OpAMP server endpoint - if len(strings.TrimSpace(r.Spec.Endpoint)) == 0 { - return warnings, fmt.Errorf("the OpAMP server endpoint is not specified") - } - - // validate OpAMPBridge capabilities - if len(r.Spec.Capabilities) == 0 { - return warnings, fmt.Errorf("the capabilities supported by OpAMP Bridge are not specified") - } - - // validate port config - for _, p := range r.Spec.Ports { - nameErrs := validation.IsValidPortName(p.Name) - numErrs := validation.IsValidPortNum(int(p.Port)) - if len(nameErrs) > 0 || len(numErrs) > 0 { - return warnings, fmt.Errorf("the OpAMPBridge Spec Ports configuration is incorrect, port name '%s' errors: %s, num '%d' errors: %s", - p.Name, nameErrs, p.Port, numErrs) - } - } - - // check for maximum replica count - if r.Spec.Replicas != nil && *r.Spec.Replicas > 1 { - return warnings, fmt.Errorf("replica count must not be greater than 1") - } - return warnings, nil -} - -func SetupOpAMPBridgeWebhook(mgr ctrl.Manager, cfg config.Config) error { - webhook := &OpAMPBridgeWebhook{ - logger: mgr.GetLogger().WithValues("handler", "OpAMPBridgeWebhook"), - scheme: mgr.GetScheme(), - cfg: cfg, - } - return ctrl.NewWebhookManagedBy(mgr). - For(&OpAMPBridge{}). - WithValidator(webhook). - WithDefaulter(webhook). - Complete() -} diff --git a/apis/v1alpha1/opampbridge_webhook_test.go b/apis/v1alpha1/opampbridge_webhook_test.go deleted file mode 100644 index 5e635d5ee..000000000 --- a/apis/v1alpha1/opampbridge_webhook_test.go +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - "context" - "fmt" - "os" - "testing" - - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - - "github.com/stretchr/testify/assert" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func TestOpAMPBridgeDefaultingWebhook(t *testing.T) { - one := int32(1) - five := int32(5) - - if err := AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - tests := []struct { - name string - opampBridge OpAMPBridge - expected OpAMPBridge - }{ - { - name: "all fields default", - opampBridge: OpAMPBridge{}, - expected: OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: OpAMPBridgeSpec{ - Replicas: &one, - UpgradeStrategy: UpgradeStrategyAutomatic, - Capabilities: map[OpAMPBridgeCapability]bool{OpAMPBridgeCapabilityReportsStatus: true}, - }, - }, - }, - { - name: "provided values in spec", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Replicas: &five, - UpgradeStrategy: "adhoc", - }, - }, - expected: OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: OpAMPBridgeSpec{ - Replicas: &five, - UpgradeStrategy: "adhoc", - Capabilities: map[OpAMPBridgeCapability]bool{OpAMPBridgeCapabilityReportsStatus: true}, - }, - }, - }, - { - name: "enable ReportsStatus capability if not enabled already", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: false, - }, - }, - }, - expected: OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: OpAMPBridgeSpec{ - Replicas: &one, - UpgradeStrategy: UpgradeStrategyAutomatic, - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - }, - }, - }, - }, - } - - for _, test := range tests { - test := test - t.Run(test.name, func(t *testing.T) { - webhook := &OpAMPBridgeWebhook{ - logger: logr.Discard(), - scheme: testScheme, - cfg: config.New( - config.WithCollectorImage("collector:v0.0.0"), - config.WithTargetAllocatorImage("ta:v0.0.0"), - config.WithOperatorOpAMPBridgeImage("opampbridge:v0.0.0"), - ), - } - ctx := context.Background() - err := webhook.Default(ctx, &test.opampBridge) - assert.NoError(t, err) - assert.Equal(t, test.expected, test.opampBridge) - }) - } -} - -func TestOpAMPBridgeValidatingWebhook(t *testing.T) { - - two := int32(2) - - tests := []struct { //nolint:govet - name string - opampBridge OpAMPBridge - expectedErr string - expectedWarnings []string - }{ - { - name: "specify all required fields, should not return error", - opampBridge: OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Spec: OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - OpAMPBridgeCapabilityReportsEffectiveConfig: true, - OpAMPBridgeCapabilityReportsOwnTraces: true, - OpAMPBridgeCapabilityReportsOwnMetrics: true, - OpAMPBridgeCapabilityReportsOwnLogs: true, - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsRestartCommand: true, - OpAMPBridgeCapabilityReportsHealth: true, - OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - }, - }, - }, - { - name: "empty OpAMP Server endpoint", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Endpoint: "", - }, - }, - expectedErr: "the OpAMP server endpoint is not specified", - }, - { - name: "empty capabilities", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - }, - }, - expectedErr: "the capabilities supported by OpAMP Bridge are not specified", - }, - { - name: "replica count greater than 1 should return error", - opampBridge: OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Spec: OpAMPBridgeSpec{ - Replicas: &two, - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - OpAMPBridgeCapabilityReportsEffectiveConfig: true, - OpAMPBridgeCapabilityReportsOwnTraces: true, - OpAMPBridgeCapabilityReportsOwnMetrics: true, - OpAMPBridgeCapabilityReportsOwnLogs: true, - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsRestartCommand: true, - OpAMPBridgeCapabilityReportsHealth: true, - OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - }, - }, - expectedErr: "replica count must not be greater than 1", - }, - { - name: "invalid port name", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - OpAMPBridgeCapabilityReportsEffectiveConfig: true, - OpAMPBridgeCapabilityReportsOwnTraces: true, - OpAMPBridgeCapabilityReportsOwnMetrics: true, - OpAMPBridgeCapabilityReportsOwnLogs: true, - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsRestartCommand: true, - OpAMPBridgeCapabilityReportsHealth: true, - OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - Ports: []v1.ServicePort{ - { - // this port name contains a non alphanumeric character, which is invalid. - Name: "-test🦄port", - Port: 12345, - Protocol: v1.ProtocolTCP, - }, - }, - }, - }, - expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", - }, - { - name: "invalid port name, too long", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - OpAMPBridgeCapabilityReportsEffectiveConfig: true, - OpAMPBridgeCapabilityReportsOwnTraces: true, - OpAMPBridgeCapabilityReportsOwnMetrics: true, - OpAMPBridgeCapabilityReportsOwnLogs: true, - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsRestartCommand: true, - OpAMPBridgeCapabilityReportsHealth: true, - OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, Ports: []v1.ServicePort{ - { - Name: "aaaabbbbccccdddd", // len: 16, too long - Port: 5555, - }, - }, - }, - }, - expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", - }, - { - name: "invalid port num", - opampBridge: OpAMPBridge{ - Spec: OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[OpAMPBridgeCapability]bool{ - OpAMPBridgeCapabilityReportsStatus: true, - OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - OpAMPBridgeCapabilityReportsEffectiveConfig: true, - OpAMPBridgeCapabilityReportsOwnTraces: true, - OpAMPBridgeCapabilityReportsOwnMetrics: true, - OpAMPBridgeCapabilityReportsOwnLogs: true, - OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - OpAMPBridgeCapabilityAcceptsRestartCommand: true, - OpAMPBridgeCapabilityReportsHealth: true, - OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - Ports: []v1.ServicePort{ - { - Name: "aaaabbbbccccddd", // len: 15 - // no port set means it's 0, which is invalid - }, - }, - }, - }, - expectedErr: "the OpAMPBridge Spec Ports configuration is incorrect", - }, - } - - for _, test := range tests { - test := test - t.Run(test.name, func(t *testing.T) { - webhook := &OpAMPBridgeWebhook{ - logger: logr.Discard(), - scheme: testScheme, - cfg: config.New( - config.WithCollectorImage("collector:v0.0.0"), - config.WithTargetAllocatorImage("ta:v0.0.0"), - config.WithOperatorOpAMPBridgeImage("opampbridge:v0.0.0"), - ), - } - ctx := context.Background() - warnings, err := webhook.ValidateCreate(ctx, &test.opampBridge) - if test.expectedErr == "" { - assert.NoError(t, err) - return - } - if len(test.expectedWarnings) == 0 { - assert.Empty(t, warnings, test.expectedWarnings) - } else { - assert.ElementsMatch(t, warnings, test.expectedWarnings) - } - assert.ErrorContains(t, err, test.expectedErr) - }) - } -} diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go index beddf6a45..e1a249922 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/opentelemetrycollector_types.go @@ -416,12 +416,12 @@ type AmazonCloudWatchAgentStatus struct { // +kubebuilder:subresource:status // +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.scale.replicas,selectorpath=.status.scale.selector // +kubebuilder:printcolumn:name="Mode",type="string",JSONPath=".spec.mode",description="Deployment Mode" -// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="OpenTelemetry Version" +// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="CloudWatch Agent Version" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.scale.statusReplicas" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Image",type="string",JSONPath=".status.image" // +kubebuilder:printcolumn:name="Management",type="string",JSONPath=".spec.managementState",description="Management State" -// +operator-sdk:csv:customresourcedefinitions:displayName="OpenTelemetry Collector" +// +operator-sdk:csv:customresourcedefinitions:displayName="Amazon CloudWatch Agent" // This annotation provides a hint for OLM which resources are managed by AmazonCloudWatchAgent kind. // It's not mandatory to list all resources. // +operator-sdk:csv:customresourcedefinitions:resources={{Pod,v1},{Deployment,apps/v1},{DaemonSets,apps/v1},{StatefulSets,apps/v1},{ConfigMaps,v1},{Service,v1}} diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml index 53242ead4..2fb56290e 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_amazoncloudwatchagents.yaml @@ -35,10 +35,14 @@ spec: - jsonPath: .status.image name: Image type: string + - description: Management State + jsonPath: .spec.managementState + name: Management + type: string name: v1alpha1 schema: openAPIV3Schema: - description: AmazonCloudWatchAgent is the Schema for the AmazonCloudWatchAgents + description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents API. properties: apiVersion: @@ -56,391 +60,6701 @@ spec: spec: description: AmazonCloudWatchAgentSpec defines the desired state of AmazonCloudWatchAgent. properties: - args: - additionalProperties: - type: string - description: Args is the set of arguments to pass to the CloudWatch - Agent binary - type: object - config: - description: Config is the raw JSON to be used as the collector's - configuration. Refer to the CloudWatch Agent documentation for details. - type: string - env: - description: ENV vars to set on the CloudWatch Agent's Pods. These - can then in certain cases be consumed in the config file for the - Collector. + additionalContainers: + description: "AdditionalContainers allows injecting additional containers + into the Collector's pod definition. These sidecar containers can + be used for authentication proxies, log shipping sidecars, agents + for shipping metrics to their cloud, or in general sidecars that + do not support automatic injection. This option only applies to + Deployment, DaemonSet, and StatefulSet deployment modes of the collector. + It does not apply to the sidecar deployment mode. More info about + sidecars: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ + \n Container names managed by the operator: * `otc-container` \n + Overriding containers managed by the operator is outside the scope + of what the maintainers will support and by doing so, you wil accept + the risk of it breaking things." items: - description: EnvVar represents an environment variable present in - a Container. + description: A single application container that you want to run + within a pod. properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean required: - - key + - port type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + httpGet: + description: HTTPGet specifies the http request to perform. properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. type: string - fieldPath: - description: Path of the field to select in the specified - API version. + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - - fieldPath + - port type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' type: string - divisor: + port: anyOf: - type: integer - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string required: - - resource + - port type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean required: - - key + - port type: object - x-kubernetes-map-type: atomic - type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior of + individual containers in a pod. This field may only be set + for init containers, and the only allowed value is "Always". + For non-init containers or when this field is not specified, + the restart behavior is defined by the Pod''s restart policy + and the container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: this + init container will be continually restarted on exit until + all regular containers have terminated. Once all regular containers + have completed, all init containers with restartPolicy "Always" + will be shut down. This lifecycle differs from normal init + containers and is often referred to as a "sidecar" container. + Although this init container still starts in the init container + sequence, it does not wait for the container to complete before + proceeding to the next init container. Instead, the next init + container starts immediately after this init container is + started, or after any startupProbe has successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also + be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string required: - name type: object type: array - envFrom: - description: List of sources to populate environment variables on - the CloudWatch Agent's Pods. These can then in certain cases be - consumed in the config file for the Collector. - items: - description: EnvFromSource represents the source of a set of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for the + pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node matches + the corresponding matchExpressions; the node(s) with the + highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated with the + corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the corresponding + nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to an update), the system may or may not try to + eventually evict the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term matches + no objects. The requirements of them are ANDed. The + TopologySelectorTerm type implements a subset of the + NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists, DoesNotExist. Gt, and + Lt. + type: string + values: + description: An array of string values. If + the operator is In or NotIn, the values + array must be non-empty. If the operator + is Exists or DoesNotExist, the values array + must be empty. If the operator is Gt or + Lt, the values array must have a single + element, which will be interpreted as an + integer. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. co-locate + this pod in the same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the affinity expressions specified by + this field, but it may choose a node that violates one or + more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by this + field are not met at scheduling time, the pod will not be + scheduled onto the node. If the affinity requirements specified + by this field cease to be met at some point during pod execution + (e.g. due to a pod label update), the system may or may + not try to eventually evict the pod from its node. When + there are multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. all terms + must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules (e.g. + avoid putting this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods to + nodes that satisfy the anti-affinity expressions specified + by this field, but it may choose a node that violates one + or more of the expressions. The node that is most preferred + is the one with the greatest sum of weights, i.e. for each + node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, + etc.), compute a sum by iterating through the elements of + this field and adding "weight" to the sum if the node has + pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the corresponding + podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the anti-affinity requirements + specified by this field cease to be met at some point during + pod execution (e.g. due to a pod label update), the system + may or may not try to eventually evict the pod from its + node. When there are multiple elements, the lists of nodes + corresponding to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is defined as running + on a node whose value of the label with key + matches that of any node on which a pod of the set of + pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label keys + to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key in (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged with + `LabelSelector` as `key notin (value)` to select the + group of existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) affinity. + Keys that don't exist in the incoming pod labels will + be ignored. The default value is empty. The same key + is forbidden to exist in both MismatchLabelKeys and + LabelSelector. Also, MismatchLabelKeys cannot be set + when LabelSelector isn't set. This is an alpha field + and requires enabling MatchLabelKeysInPodAffinity + feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied to the + union of the namespaces selected by this field and + the ones listed in the namespaces field. null selector + and null or empty namespaces list means "this pod's + namespace". An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a + selector that contains values, a key, and an + operator that relates the key and values. + properties: + key: + description: key is the label key that the + selector applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. If the + operator is Exists or DoesNotExist, the + values array must be empty. This array is + replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is "In", + and the values array contains only "value". The + requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list of namespace + names that the term applies to. The term is applied + to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. null or + empty namespaces list and null namespaceSelector means + "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where + co-located is defined as running on a node whose value + of the label with key topologyKey matches that of + any node on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + args: + additionalProperties: + type: string + description: Args is the set of arguments to pass to the OpenTelemetry + Collector binary + type: object + autoscaler: + description: Autoscaler specifies the pod autoscaling configuration + to use for the AmazonCloudWatchAgent workload. + properties: + behavior: + description: HorizontalPodAutoscalerBehavior configures the scaling + behavior of the target in both Up and Down directions (scaleUp + and scaleDown fields respectively). + properties: + scaleDown: + description: scaleDown is scaling policy for scaling Down. + If not set, the default value is to allow to scale down + to minReplicas pods, with a 300 second stabilization window + (i.e., the highest recommendation for the last 300sec is + used). + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + scaleUp: + description: 'scaleUp is scaling policy for scaling Up. If + not set, the default value is the higher of: * increase + no more than 4 pods per 60 seconds * double the number of + pods per 60 seconds No stabilization is used.' + properties: + policies: + description: policies is a list of potential scaling polices + which can be used during scaling. At least one policy + must be specified, otherwise the HPAScalingRules will + be discarded as invalid + items: + description: HPAScalingPolicy is a single policy which + must hold true for a specified past interval. + properties: + periodSeconds: + description: periodSeconds specifies the window + of time for which the policy should hold true. + PeriodSeconds must be greater than zero and less + than or equal to 1800 (30 min). + format: int32 + type: integer + type: + description: type is used to specify the scaling + policy. + type: string + value: + description: value contains the amount of change + which is permitted by the policy. It must be greater + than zero + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + description: selectPolicy is used to specify which policy + should be used. If not set, the default value Max is + used. + type: string + stabilizationWindowSeconds: + description: 'stabilizationWindowSeconds is the number + of seconds for which past recommendations should be + considered while scaling up or scaling down. StabilizationWindowSeconds + must be greater than or equal to zero and less than + or equal to 3600 (one hour). If not set, use the default + values: - For scale up: 0 (i.e. no stabilization is + done). - For scale down: 300 (i.e. the stabilization + window is 300 seconds long).' + format: int32 + type: integer + type: object + type: object + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling + feature. If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + metrics: + description: Metrics is meant to provide a customizable way to + configure HPA metrics. currently the only supported custom metrics + is type=Pod. Use TargetCPUUtilization or TargetMemoryUtilization + instead if scaling on these common resource metrics. + items: + description: MetricSpec defines a subset of metrics to be defined + for the HPA's metric array more metric type can be supported + as needed. See https://pkg.go.dev/k8s.io/api/autoscaling/v2#MetricSpec + for reference. + properties: + pods: + description: PodsMetricSource indicates how to scale on + a metric describing each pod in the current scale target + (for example, transactions-processed-per-second). The + values will be averaged together before being compared + to the target value. + properties: + metric: + description: metric identifies the target metric by + name and selector + properties: + name: + description: name is the name of the given metric + type: string + selector: + description: selector is the string-encoded form + of a standard kubernetes label selector for the + given metric When set, it is passed as an additional + parameter to the metrics server for more specific + metrics scoping. When unset, just the metricName + will be used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + description: target specifies the target value for the + given metric + properties: + averageUtilization: + description: averageUtilization is the target value + of the average of the resource metric across all + relevant pods, represented as a percentage of + the requested value of the resource for the pods. + Currently only valid for Resource metric source + type + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + description: averageValue is the target value of + the average of the metric across all relevant + pods (as a quantity) + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + description: type represents whether the metric + type is Utilization, Value, or AverageValue + type: string + value: + anyOf: + - type: integer + - type: string + description: value is the target value of the metric + (as a quantity). + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + type: + description: MetricSourceType indicates the type of metric. + type: string + required: + - type + type: object + type: array + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling + feature. Set this if your are using autoscaling. It must be + at least 1 + format: int32 + type: integer + targetCPUUtilization: + description: TargetCPUUtilization sets the target average CPU + used across all replicas. If average CPU exceeds this value, + the HPA will scale up. Defaults to 90 percent. + format: int32 + type: integer + targetMemoryUtilization: + description: TargetMemoryUtilization sets the target average memory + utilization across all replicas + format: int32 + type: integer + type: object + config: + description: Config is the raw JSON to be used as the collector's + configuration. Refer to the OpenTelemetry Collector documentation + for details. + type: string + configmaps: + description: ConfigMaps is a list of ConfigMaps in the same namespace + as the AmazonCloudWatchAgent object, which shall be mounted into + the Collector Pods. Each ConfigMap will be added to the Collector's + Deployments as a volume named `configmap-`. + items: + properties: + mountpath: + type: string + name: + description: Configmap defines name and path where the configMaps + should be mounted. + type: string + required: + - mountpath + - name + type: object + type: array + env: + description: ENV vars to set on the OpenTelemetry Collector's Pods. + These can then in certain cases be consumed in the config file for + the Collector. + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables on + the OpenTelemetry Collector's Pods. These can then in certain cases + be consumed in the config file for the Collector. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each key in + the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + hostNetwork: + description: HostNetwork indicates if the pod should run in the host + networking namespace. + type: boolean + image: + description: Image indicates the container image to use for the OpenTelemetry + Collector. + type: string + imagePullPolicy: + description: ImagePullPolicy indicates the pull policy to be used + for retrieving the container image (Always, Never, IfNotPresent) + type: string + ingress: + description: 'Ingress is used to specify how OpenTelemetry Collector + is exposed. This functionality is only available if one of the valid + modes is set. Valid modes are: deployment, daemonset and statefulset.' + properties: + annotations: + additionalProperties: + type: string + description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: + "letsencrypt"''' + type: object + hostname: + description: Hostname by which the ingress proxy can be reached. + type: string + ingressClassName: + description: IngressClassName is the name of an IngressClass cluster + resource. Ingress controller implementations use this field + to know whether they should be serving this Ingress resource. + type: string + route: + description: Route is an OpenShift specific section that is only + considered when type "route" is used. + properties: + termination: + description: Termination indicates termination type. By default + "edge" is used. + enum: + - insecure + - edge + - passthrough + - reencrypt + type: string + type: object + ruleType: + description: RuleType defines how Ingress exposes collector receivers. + IngressRuleTypePath ("path") exposes each receiver port on a + unique path on single domain defined in Hostname. IngressRuleTypeSubdomain + ("subdomain") exposes each receiver port on a unique subdomain + of Hostname. Default is IngressRuleTypePath ("path"). + enum: + - path + - subdomain + type: string + tls: + description: TLS configuration. + items: + description: IngressTLS describes the transport layer security + associated with an ingress. + properties: + hosts: + description: hosts is a list of hosts included in the TLS + certificate. The values in this list must match the name/s + used in the tlsSecret. Defaults to the wildcard host setting + for the loadbalancer controller fulfilling this Ingress, + if left unspecified. + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + description: secretName is the name of the secret used to + terminate TLS traffic on port 443. Field is left optional + to allow TLS routing based on SNI hostname alone. If the + SNI host in a listener conflicts with the "Host" header + field used by an IngressRule, the SNI host is used for + termination and value of the "Host" header is used for + routing. + type: string + type: object + type: array + type: + description: 'Type default value is: "" Supported types are: ingress, + route' + enum: + - ingress + - route + type: string + type: object + initContainers: + description: 'InitContainers allows injecting initContainers to the + Collector''s pod definition. These init containers can be used to + fetch secrets for injection into the configuration from external + sources, run added checks, etc. Any errors during the execution + of an initContainer will lead to a restart of the Pod. More info: + https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you want to run + within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The container image''s + CMD is used if this is not provided. Variable references $(VAR_NAME) + are expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string will + be unchanged. Double $$ are reduced to a single $, which allows + for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. + The container image''s ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: + i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. More info: + https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be + a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in the + input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) + syntax: i.e. "$$(VAR_NAME)" will produce the string + literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must be + a C_IDENTIFIER. All invalid keys will be reported as an event + when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take + precedence. Values defined by an Env with a duplicate key + will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set + of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: An optional identifier to prepend to each + key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + description: 'Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management + to default or override container images in workload controllers + like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent + otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should take + in response to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More + info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event + such as liveness/startup probe failure, preemption, resource + contention, etc. The handler is not called if the container + crashes or exits. The Pod''s termination grace period + countdown begins before the PreStop hook is executed. + Regardless of the outcome of the handler, the container + will eventually terminate within the Pod''s termination + grace period (unless delayed by finalizers). Other management + of the container blocks until the hook completes or until + the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for + the command is root ('/') in the container's + filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you need + to explicitly call out to that shell. Exit status + of 0 is treated as live/healthy and non-zero is + unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to + the pod IP. You probably want to set "Host" in + httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the + container should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to + sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported + as a LifecycleHandler and kept for the backward compatibility. + There are no validation of this field and lifecycle + hooks will fail in runtime when tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. More + info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. Not + specifying a port here DOES NOT prevent that port from being + exposed. Any port which is listening on the default "0.0.0.0" + address inside a container will be accessible from the network. + Modifying this array with strategic merge patch may corrupt + the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. + Cannot be updated. + items: + description: ContainerPort represents a network port in a + single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP + address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If + specified, this must be a valid port number, 0 < x < + 65536. If HostNetwork is specified, this must match + ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in a pod + must have a unique name. Name for the port that can + be referred to by services. + type: string + protocol: + default: TCP + description: Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe + fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents resource resize + policy for the container. + properties: + resourceName: + description: 'Name of the resource to which this resource + resize policy applies. Supported values: cpu, memory.' + type: string + restartPolicy: + description: Restart policy to apply when specified resource + is resized. If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only + be set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry + in pod.spec.resourceClaims of the Pod where this + field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests + cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + restartPolicy: + description: 'RestartPolicy defines the restart behavior of + individual containers in a pod. This field may only be set + for init containers, and the only allowed value is "Always". + For non-init containers or when this field is not specified, + the restart behavior is defined by the Pod''s restart policy + and the container type. Setting the RestartPolicy as "Always" + for the init container will have the following effect: this + init container will be continually restarted on exit until + all regular containers have terminated. Once all regular containers + have completed, all init containers with restartPolicy "Always" + will be shut down. This lifecycle differs from normal init + containers and is often referred to as a "sidecar" container. + Although this init container still starts in the init container + sequence, it does not wait for the container to complete before + proceeding to the next init container. Instead, the next init + container starts immediately after this init container is + started, or after any startupProbe has successfully completed.' + type: string + securityContext: + description: 'SecurityContext defines the security options the + container should be run with. If set, the fields of SecurityContext + override the equivalent fields of PodSecurityContext. More + info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent process. + This bool directly controls if the no_new_privs flag will + be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as Privileged + 2) has CAP_SYS_ADMIN Note that this field cannot be set + when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by + the container runtime. Note that this field cannot be + set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent to + root on the host. Defaults to false. Note that this field + cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to + use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. Note that this field cannot + be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root + filesystem. Default is false. Note that this field cannot + be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a + non-root user. If true, the Kubelet will validate the + image at runtime to ensure that it does not run as UID + 0 (root) and fail to start the container if it does. If + unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both + SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata + if unspecified. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a + random SELinux context for each container. May also be + set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. + If seccomp options are provided at both the pod & container + level, the container options override the pod options. + Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile + must be preconfigured on the node to work. Must be + a descending path, relative to the kubelet's configured + seccomp profile location. Must be set if type is "Localhost". + Must NOT be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - + a profile defined in a file on the node should be + used. RuntimeDefault - the container runtime default + profile should be used. Unconfined - no profile should + be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options from the PodSecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is + linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also + be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set + in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully + initialized. If specified, no other probes are executed until + this completes successfully. If this probe fails, the Pod + will be restarted, just as if the livenessProbe failed. This + can be used to provide different probe parameters at the beginning + of a Pod''s lifecycle, when it might take a long time to load + data or warm a cache, than during steady-state operation. + This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory for the + command is root ('/') in the container's filesystem. + The command is simply exec'd, it is not run inside + a shell, so traditional shell instructions ('|', etc) + won't work. To use a shell, you need to explicitly + call out to that shell. Exit status of 0 is treated + as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe + to be considered failed after having succeeded. Defaults + to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies an action involving a GRPC port. + properties: + port: + description: Port number of the gRPC service. Number + must be in the range 1 to 65535. + format: int32 + type: integer + service: + description: "Service is the name of the service to + place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + \n If this is not specified, the default behavior + is defined by gRPC." + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has + started before liveness probes are initiated. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe + to be considered successful after having failed. Defaults + to 1. Must be 1 for liveness and startup. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies an action involving a TCP + port. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on + the container. Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully upon probe failure. The grace + period is the duration in seconds after the processes + running in the pod are sent a termination signal and the + time when the processes are forcibly halted with a kill + signal. Set this value longer than the expected cleanup + time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, + this value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates + stop immediately via the kill signal (no opportunity to + shut down). This is a beta field and requires enabling + ProbeTerminationGracePeriod feature gate. Minimum value + is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times + out. Defaults to 1 second. Minimum value is 1. More info: + https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer + for stdin in the container runtime. If this is not set, reads + from stdin in the container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the + stdin channel after it has been opened by a single attach. + When stdin is true the stdin stream will remain open across + multiple attach sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until the first client + attaches to stdin, and then remains open and accepts data + until the client disconnects, at which time stdin is closed + and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the + container''s termination message will be written is mounted + into the container''s filesystem. Message written is intended + to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. + The total message length across all containers will be limited + to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be + populated. File will use the contents of terminationMessagePath + to populate the container status message on both success and + failure. FallbackToLogsOnError will use the last chunk of + container log output if the termination message file is empty + and the container exited with an error. The log output is + limited to 2048 bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for + itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be + used by the container. + items: + description: volumeDevice describes a mapping of a raw block + device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container + that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which the volume + should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are + propagated from the host to container and the other + way around. When not set, MountPropagationNone is used. + This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which + the container's volume should be mounted. Behaves similarly + to SubPath but environment variable references $(VAR_NAME) + are expanded using the container's environment. Defaults + to "" (volume's root). SubPathExpr and SubPath are mutually + exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which might + be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + lifecycle: + description: Actions that the management system should take in response + to container lifecycle events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately after a container + is created. If the handler fails, the container is terminated + and restarted according to its restart policy. Other management + of the container blocks until the hook completes. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container + is terminated due to an API request or management event such + as liveness/startup probe failure, preemption, resource contention, + etc. The handler is not called if the container crashes or exits. + The Pod''s termination grace period countdown begins before + the PreStop hook is executed. Regardless of the outcome of the + handler, the container will eventually terminate within the + Pod''s termination grace period (unless delayed by finalizers). + Other management of the container blocks until the hook completes + or until the termination grace period is reached. More info: + https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside + the container, the working directory for the command is + root ('/') in the container's filesystem. The command + is simply exec'd, it is not run inside a shell, so traditional + shell instructions ('|', etc) won't work. To use a shell, + you need to explicitly call out to that shell. Exit + status of 0 is treated as live/healthy and non-zero + is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the + pod IP. You probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP + allows repeated headers. + items: + description: HTTPHeader describes a custom header to + be used in HTTP probes + properties: + name: + description: The header field name. This will be + canonicalized upon output, so case-variant names + will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents the duration that the container + should sleep before being terminated. + properties: + seconds: + description: Seconds is the number of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: Deprecated. TCPSocket is NOT supported as a LifecycleHandler + and kept for the backward compatibility. There are no validation + of this field and lifecycle hooks will fail in runtime when + tcp handler is specified. + properties: + host: + description: 'Optional: Host name to connect to, defaults + to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the + container. Number must be in the range 1 to 65535. Name + must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: Liveness config for the OpenTelemetry Collector except + the probe handler which is auto generated from the health extension + of the collector. It is only effective when healthcheckextension + is configured in the OpenTelemetry Collector pipeline. + properties: + failureThreshold: + description: Minimum consecutive failures for the probe to be + considered failed after having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + initialDelaySeconds: + description: 'Number of seconds after the container has started + before liveness probes are initiated. Defaults to 0 seconds. + Minimum value is 0. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default + to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be + considered successful after having failed. Defaults to 1. Must + be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs to terminate + gracefully upon probe failure. The grace period is the duration + in seconds after the processes running in the pod are sent a + termination signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than the expected + cleanup time for your process. If this value is nil, the pod's + terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. Value must + be non-negative integer. The value zero indicates stop immediately + via the kill signal (no opportunity to shut down). This is a + beta field and requires enabling ProbeTerminationGracePeriod + feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds + is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: 'Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + managementState: + default: managed + description: ManagementState defines if the CR should be managed by + the operator or not. Default is managed. + enum: + - managed + - unmanaged + type: string + maxReplicas: + description: 'MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. Deprecated: use "AmazonCloudWatchAgent.Spec.Autoscaler.MaxReplicas" + instead.' + format: int32 + type: integer + minReplicas: + description: 'MinReplicas sets a lower bound to the autoscaling feature. Set + this if you are using autoscaling. It must be at least 1 Deprecated: + use "AmazonCloudWatchAgent.Spec.Autoscaler.MinReplicas" instead.' + format: int32 + type: integer + mode: + description: Mode represents how the collector should be deployed + (deployment, daemonset, statefulset or sidecar) + enum: + - daemonset + - deployment + - sidecar + - statefulset + type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object + observability: + description: ObservabilitySpec defines how telemetry data gets handled. + properties: + metrics: + description: Metrics defines the metrics configuration for operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor or + PodMonitor(for sidecar mode) should be created for the service + managed by the OpenTelemetry Operator. The operator.observability.prometheus + feature gate must be enabled to use this feature. + type: boolean + type: object + type: object + podAnnotations: + additionalProperties: + type: string + description: PodAnnotations is the set of annotations that will be + attached to Collector and Target Allocator pods. + type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption budget + configuration to use for the AmazonCloudWatchAgent workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. For example, one can + prevent all voluntary evictions by specifying 0. This is a mutually + exclusive setting with "minAvailable". + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after the + eviction, i.e. even in the absence of the evicted pod. So for + example you can prevent all voluntary evictions by specifying + "100%". + x-kubernetes-int-or-string: true + type: object + podSecurityContext: + description: "PodSecurityContext configures the pod security context + for the opentelemetry-collector pod, when running as a deployment, + daemonset, or statefulset. \n In sidecar mode, the amazon-cloudwatch-agent-operator + will ignore this setting." + properties: + fsGroup: + description: "A special supplemental group that applies to all + containers in a pod. Some volume types allow the Kubelet to + change the ownership of that volume to be owned by the pod: + \n 1. The owning GID will be the FSGroup 2. The setgid bit is + set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- \n If unset, + the Kubelet will not modify the ownership and permissions of + any volume. Note that this field cannot be set when spec.os.name + is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. This field will only apply to volume types which + support fsGroup based ownership(and permissions). It will have + no effect on ephemeral volume types such as: secret, configmaps + and emptydir. Valid values are "OnRootMismatch" and "Always". + If not specified, "Always" is used. Note that this field cannot + be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value specified + in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this field cannot + be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers in this + pod. Note that this field cannot be set when spec.os.name is + windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process run + in each container, in addition to the container's primary GID, + the fsGroup (if specified), and group memberships defined in + the container image for the uid of the container process. If + unspecified, no additional groups are added to any container. + Note that group memberships defined in the container image for + the uid of the container process are still effective, even if + they are not included in this list. Note that this field cannot + be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used for + the pod. Pods with unsupported sysctls (by the container runtime) + might fail to launch. Note that this field cannot be set when + spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext + will be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's containers + must have the same effective HostProcess value (it is not + allowed to have a mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object + ports: + description: Ports allows a set of ports to be exposed by the underlying + v1.Service. By default, the operator will attempt to infer the required + ports by parsing the .Spec.Config property but this property can + be used to open additional ports that can't be inferred by the operator, + like for custom receivers. + items: + description: ServicePort contains information on service's port. + properties: + appProtocol: + description: "The application protocol for this port. This is + used as a hint for implementations to offer richer behavior + for protocols that they understand. This field follows standard + Kubernetes label syntax. Valid values are either: \n * Un-prefixed + protocol names - reserved for IANA standard service names + (as per RFC-6335 and https://www.iana.org/assignments/service-names). + \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c' + - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + * 'kubernetes.io/ws' - WebSocket over cleartext as described + in https://www.rfc-editor.org/rfc/rfc6455 * 'kubernetes.io/wss' + - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + \n * Other protocols should use implementation-defined prefixed + names such as mycompany.com/my-custom-protocol." + type: string + name: + description: The name of this port within the service. This + must be a DNS_LABEL. All ports within a ServiceSpec must have + unique names. When considering the endpoints for a Service, + this must match the 'name' field in the EndpointPort. Optional + if only one ServicePort is defined on this service. + type: string + nodePort: + description: 'The port on each node on which this service is + exposed when type is NodePort or LoadBalancer. Usually assigned + by the system. If a value is specified, in-range, and not + in use it will be used, otherwise the operation will fail. If + not specified, a port will be allocated if this Service requires + one. If this field is specified when creating a Service which + does not need it, creation will fail. This field will be wiped + when updating a Service to no longer need it (e.g. changing + type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' + format: int32 + type: integer + port: + description: The port that will be exposed by this service. + format: int32 + type: integer + protocol: + default: TCP + description: The IP protocol for this port. Supports "TCP", + "UDP", and "SCTP". Default is TCP. + type: string + targetPort: + anyOf: + - type: integer + - type: string + description: 'Number or name of the port to access on the pods + targeted by the service. Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. If this is a string, + it will be looked up as a named port in the target Pod''s + container ports. If this is not specified, the value of the + ''port'' field is used (an identity map). This field is ignored + for services with clusterIP=None, and should be omitted or + set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-type: atomic + priorityClassName: + description: If specified, indicates the pod's priority. If not specified, + the pod priority will be default or zero if there is no default. + type: string + replicas: + description: Replicas is the number of pod instances for the underlying + OpenTelemetry Collector. Set this if your are not using autoscaling + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetry Collector pods. + properties: + claims: + description: "Claims lists the names of resources, defined in + spec.resourceClaims, that are used by this container. \n This + is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be set + for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in pod.spec.resourceClaims + of the Pod where this field is used. It makes that resource + available inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources + allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: "SecurityContext configures the container security context + for the opentelemetry-collector container. \n In deployment, daemonset, + or statefulset mode, this controls the security context settings + for the primary application container. \n In sidecar mode, this + controls the security context for the injected sidecar container." + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process + can gain more privileges than its parent process. This bool + directly controls if the no_new_privs flag will be set on the + container process. AllowPrivilegeEscalation is true always when + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container + runtime. Note that this field cannot be set when spec.os.name + is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged + containers are essentially equivalent to root on the host. Defaults + to false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for + the containers. The default is DefaultProcMount which uses the + container runtime defaults for readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. + Default is false. Note that this field cannot be set when spec.os.name + is windows. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. + Uses runtime default if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when spec.os.name + is windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies to + the container. + type: string + role: + description: Role is a SELinux role label that applies to + the container. + type: string + type: + description: Type is a SELinux type label that applies to + the container. + type: string + user: + description: User is a SELinux user label that applies to + the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by this container. If + seccomp options are provided at both the pod & container level, + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must be + preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT be + set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a profile + defined in a file on the node should be used. RuntimeDefault + - the container runtime default profile should be used. + Unconfined - no profile should be applied." + type: string + required: + - type + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will + be used. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named by + the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's containers + must have the same effective HostProcess value (it is not + allowed to have a mix of HostProcess containers and non-HostProcess + containers). In addition, if HostProcess is true then HostNetwork + must also be set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in PodSecurityContext. + If set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing service + account to use with this instance. When set, the operator will not + automatically create a ServiceAccount for the collector. + type: string + targetAllocator: + description: TargetAllocator indicates a value which determines whether + to spawn a target allocation resource or not. + properties: + affinity: + description: If specified, indicates the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling rules for + the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most preferred. + items: + description: An empty preferred scheduling term matches + all objects with implicit weight 0 (i.e. it's a no-op). + A null preferred scheduling term matches no objects + (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching the + corresponding nodeSelectorTerm, in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from + its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector terms. + The terms are ORed. + items: + description: A null or empty node selector term + matches no objects. The requirements of them are + ANDed. The TopologySelectorTerm type implements + a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector requirements + by node's labels. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector requirements + by node's fields. + items: + description: A node selector requirement is + a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: The label key that the selector + applies to. + type: string + operator: + description: Represents a key's relationship + to a set of values. Valid operators + are In, NotIn, Exists, DoesNotExist. + Gt, and Lt. + type: string + values: + description: An array of string values. + If the operator is In or NotIn, the + values array must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. If the + operator is Gt or Lt, the values array + must have a single element, which will + be interpreted as an integer. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + x-kubernetes-map-type: atomic + type: array + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules (e.g. + co-locate this pod in the same node, zone, etc. as some + other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the affinity expressions specified + by this field, but it may choose a node that violates + one or more of the expressions. The node that is most + preferred is the one with the greatest sum of weights, + i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. The keys are used to lookup + values from the incoming pod labels, those + key-value labels are merged with `LabelSelector` + as `key in (value)` to select the group of + existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) + affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value + is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature + gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. The keys are used to lookup + values from the incoming pod labels, those + key-value labels are merged with `LabelSelector` + as `key notin (value)` to select the group + of existing pods which pods will be taken + into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist + in the incoming pod labels will be ignored. + The default value is empty. The same key is + forbidden to exist in both MismatchLabelKeys + and LabelSelector. Also, MismatchLabelKeys + cannot be set when LabelSelector isn't set. + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified by + this field are not met at scheduling time, the pod will + not be scheduled onto the node. If the affinity requirements + specified by this field cease to be met at some point + during pod execution (e.g. due to a pod label update), + the system may or may not try to eventually evict the + pod from its node. When there are multiple elements, + the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling rules + (e.g. avoid putting this pod in the same node, zone, etc. + as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule pods + to nodes that satisfy the anti-affinity expressions + specified by this field, but it may choose a node that + violates one or more of the expressions. The node that + is most preferred is the one with the greatest sum of + weights, i.e. for each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + anti-affinity expressions, etc.), compute a sum by iterating + through the elements of this field and adding "weight" + to the sum if the node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest sum are + the most preferred. + items: + description: The weights of all of the matched WeightedPodAffinityTerm + fields are added per-node to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, associated + with the corresponding weight. + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. The keys are used to lookup + values from the incoming pod labels, those + key-value labels are merged with `LabelSelector` + as `key in (value)` to select the group of + existing pods which pods will be taken into + consideration for the incoming pod's pod (anti) + affinity. Keys that don't exist in the incoming + pod labels will be ignored. The default value + is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. + Also, MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature + gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod + label keys to select which pods will be taken + into consideration. The keys are used to lookup + values from the incoming pod labels, those + key-value labels are merged with `LabelSelector` + as `key notin (value)` to select the group + of existing pods which pods will be taken + into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist + in the incoming pod labels will be ignored. + The default value is empty. The same key is + forbidden to exist in both MismatchLabelKeys + and LabelSelector. Also, MismatchLabelKeys + cannot be set when LabelSelector isn't set. + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by + this field and the ones listed in the namespaces + field. null selector and null or empty namespaces + list means "this pod's namespace". An empty + selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents a + key's relationship to a set of values. + Valid operators are In, NotIn, Exists + and DoesNotExist. + type: string + values: + description: values is an array of + string values. If the operator is + In or NotIn, the values array must + be non-empty. If the operator is + Exists or DoesNotExist, the values + array must be empty. This array + is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. + The term is applied to the union of the namespaces + listed in this field and the ones selected + by namespaceSelector. null or empty namespaces + list and null namespaceSelector means "this + pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the + pods matching the labelSelector in the specified + namespaces, where co-located is defined as + running on a node whose value of the label + with key topologyKey matches that of any node + on which any of the selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching the + corresponding podAffinityTerm, in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements specified + by this field are not met at scheduling time, the pod + will not be scheduled onto the node. If the anti-affinity + requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod + label update), the system may or may not try to eventually + evict the pod from its node. When there are multiple + elements, the lists of nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely those matching + the labelSelector relative to the given namespace(s)) + that this pod should be co-located (affinity) or not + co-located (anti-affinity) with, where co-located + is defined as running on a node whose value of the + label with key matches that of any node + on which a pod of the set of pods is running + properties: + labelSelector: + description: A label query over a set of resources, + in this case pods. If it's null, this PodAffinityTerm + matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: MatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key in (value)` to select + the group of existing pods which pods will be + taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MatchLabelKeys and LabelSelector. Also, + MatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: MismatchLabelKeys is a set of pod label + keys to select which pods will be taken into consideration. + The keys are used to lookup values from the incoming + pod labels, those key-value labels are merged + with `LabelSelector` as `key notin (value)` to + select the group of existing pods which pods will + be taken into consideration for the incoming pod's + pod (anti) affinity. Keys that don't exist in + the incoming pod labels will be ignored. The default + value is empty. The same key is forbidden to exist + in both MismatchLabelKeys and LabelSelector. Also, + MismatchLabelKeys cannot be set when LabelSelector + isn't set. This is an alpha field and requires + enabling MatchLabelKeysInPodAffinity feature gate. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: A label query over the set of namespaces + that the term applies to. The term is applied + to the union of the namespaces selected by this + field and the ones listed in the namespaces field. + null selector and null or empty namespaces list + means "this pod's namespace". An empty selector + ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: + description: A label selector requirement + is a selector that contains values, a key, + and an operator that relates the key and + values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only "value". + The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: namespaces specifies a static list + of namespace names that the term applies to. The + term is applied to the union of the namespaces + listed in this field and the ones selected by + namespaceSelector. null or empty namespaces list + and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + topologyKey: + description: This pod should be co-located (affinity) + or not co-located (anti-affinity) with the pods + matching the labelSelector in the specified namespaces, + where co-located is defined as running on a node + whose value of the label with key topologyKey + matches that of any node on which any of the selected + pods is running. Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + allocationStrategy: + description: AllocationStrategy determines which strategy the + target allocator should use for allocation. The current options + are least-weighted and consistent-hashing. The default option + is least-weighted + enum: + - least-weighted + - consistent-hashing + type: string + enabled: + description: Enabled indicates whether to use a target allocation + mechanism for Prometheus targets or not. + type: boolean + env: + description: ENV vars to set on the OpenTelemetry TargetAllocator's + Pods. These can then in certain cases be consumed in the config + file for the TargetAllocator. + items: + description: EnvVar represents an environment variable present + in a Container. properties: name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: Name of the environment variable. Must be a + C_IDENTIFIER. type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. - type: string - secretRef: - description: The Secret to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name type: object - x-kubernetes-map-type: atomic - type: object - type: array - hostNetwork: - description: HostNetwork indicates if the pod should run in the host - networking namespace. - type: boolean - image: - description: Image indicates the container image to use for the CloudWatch - Agent. - type: string - imagePullPolicy: - description: ImagePullPolicy indicates the pull policy to be used - for retrieving the container image (Always, Never, IfNotPresent) - type: string - ingress: - description: 'Ingress is used to specify how CloudWatch Agent is exposed. - This functionality is only available if one of the valid modes is - set. Valid modes are: deployment, daemonset and statefulset.' - properties: - annotations: + type: array + filterStrategy: + description: FilterStrategy determines how to filter targets before + allocating them among the collectors. The only current option + is relabel-config (drops targets based on prom relabel_config). + Filtering is disabled by default. + type: string + image: + description: Image indicates the container image to use for the + OpenTelemetry TargetAllocator. + type: string + nodeSelector: additionalProperties: type: string - description: 'Annotations to add to ingress. e.g. ''cert-manager.io/cluster-issuer: - "letsencrypt"''' + description: NodeSelector to schedule OpenTelemetry TargetAllocator + pods. type: object - hostname: - description: Hostname by which the ingress proxy can be reached. - type: string - ingressClassName: - description: IngressClassName is the name of an IngressClass cluster - resource. Ingress controller implementations use this field - to know whether they should be serving this Ingress resource. - type: string - route: - description: Route is an OpenShift specific section that is only - considered when type "route" is used. + observability: + description: ObservabilitySpec defines how telemetry data gets + handled. properties: - termination: - description: Termination indicates termination type. By default - "edge" is used. - enum: - - insecure - - edge - - passthrough - - reencrypt + metrics: + description: Metrics defines the metrics configuration for + operands. + properties: + enableMetrics: + description: EnableMetrics specifies if ServiceMonitor + or PodMonitor(for sidecar mode) should be created for + the service managed by the OpenTelemetry Operator. The + operator.observability.prometheus feature gate must + be enabled to use this feature. + type: boolean + type: object + type: object + podDisruptionBudget: + description: PodDisruptionBudget specifies the pod disruption + budget configuration to use for the target allocator workload. + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at most "maxUnavailable" + pods selected by "selector" are unavailable after the eviction, + i.e. even in absence of the evicted pod. For example, one + can prevent all voluntary evictions by specifying 0. This + is a mutually exclusive setting with "minAvailable". + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + description: An eviction is allowed if at least "minAvailable" + pods selected by "selector" will still be available after + the eviction, i.e. even in the absence of the evicted pod. So + for example you can prevent all voluntary evictions by specifying + "100%". + x-kubernetes-int-or-string: true + type: object + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR + instances which the ServiceAccount has access to will be retrieved. + This includes other namespaces. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + podMonitorSelector: + additionalProperties: + type: string + description: PodMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a PodMonitor's + meta labels. The requirements are ANDed. + type: object + scrapeInterval: + default: 30s + description: "Interval between consecutive scrapes. Equivalent + to the same setting on the Prometheus CRD. \n Default: \"30s\"" + format: duration type: string + serviceMonitorSelector: + additionalProperties: + type: string + description: ServiceMonitors to be selected for target discovery. + This is a map of {key,value} pairs. Each {key,value} in + the map is going to exactly match a label in a ServiceMonitor's + meta labels. The requirements are ANDed. + type: object type: object - tls: - description: TLS configuration. + replicas: + description: Replicas is the number of pod instances for the underlying + TargetAllocator. This should only be set to a value other than + 1 if a strategy that allows for high availability is chosen. + Currently, the only allocation strategy that can be run in a + high availability mode is consistent-hashing. + format: int32 + type: integer + resources: + description: Resources to set on the OpenTelemetryTargetAllocator + containers. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + securityContext: + description: SecurityContext configures the container security + context for the targetallocator. + properties: + fsGroup: + description: "A special supplemental group that applies to + all containers in a pod. Some volume types allow the Kubelet + to change the ownership of that volume to be owned by the + pod: \n 1. The owning GID will be the FSGroup 2. The setgid + bit is set (new files created in the volume will be owned + by FSGroup) 3. The permission bits are OR'd with rw-rw---- + \n If unset, the Kubelet will not modify the ownership and + permissions of any volume. Note that this field cannot be + set when spec.os.name is windows." + format: int64 + type: integer + fsGroupChangePolicy: + description: 'fsGroupChangePolicy defines behavior of changing + ownership and permission of the volume before being exposed + inside Pod. This field will only apply to volume types which + support fsGroup based ownership(and permissions). It will + have no effect on ephemeral volume types such as: secret, + configmaps and emptydir. Valid values are "OnRootMismatch" + and "Always". If not specified, "Always" is used. Note that + this field cannot be set when spec.os.name is windows.' + type: string + runAsGroup: + description: The GID to run the entrypoint of the container + process. Uses runtime default if unset. May also be set + in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. Note that this field + cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root + user. If true, the Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 (root) and fail + to start the container if it does. If unset or false, no + such validation will be performed. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container + process. Defaults to user specified in image metadata if + unspecified. May also be set in SecurityContext. If set + in both SecurityContext and PodSecurityContext, the value + specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is + windows. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random + SELinux context for each container. May also be set in + SecurityContext. If set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. Note that this field cannot be set when + spec.os.name is windows. + properties: + level: + description: Level is SELinux level label that applies + to the container. + type: string + role: + description: Role is a SELinux role label that applies + to the container. + type: string + type: + description: Type is a SELinux type label that applies + to the container. + type: string + user: + description: User is a SELinux user label that applies + to the container. + type: string + type: object + seccompProfile: + description: The seccomp options to use by the containers + in this pod. Note that this field cannot be set when spec.os.name + is windows. + properties: + localhostProfile: + description: localhostProfile indicates a profile defined + in a file on the node should be used. The profile must + be preconfigured on the node to work. Must be a descending + path, relative to the kubelet's configured seccomp profile + location. Must be set if type is "Localhost". Must NOT + be set for any other type. + type: string + type: + description: "type indicates which kind of seccomp profile + will be applied. Valid options are: \n Localhost - a + profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile + should be used. Unconfined - no profile should be applied." + type: string + required: + - type + type: object + supplementalGroups: + description: A list of groups applied to the first process + run in each container, in addition to the container's primary + GID, the fsGroup (if specified), and group memberships defined + in the container image for the uid of the container process. + If unspecified, no additional groups are added to any container. + Note that group memberships defined in the container image + for the uid of the container process are still effective, + even if they are not included in this list. Note that this + field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls used + for the pod. Pods with unsupported sysctls (by the container + runtime) might fail to launch. Note that this field cannot + be set when spec.os.name is windows. + items: + description: Sysctl defines a kernel parameter to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + description: The Windows specific settings applied to all + containers. If unspecified, the options within a container's + SecurityContext will be used. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. Note that this field cannot be set when + spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission + webhook (https://github.com/kubernetes-sigs/windows-gmsa) + inlines the contents of the GMSA credential spec named + by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the + GMSA credential spec to use. + type: string + hostProcess: + description: HostProcess determines if a container should + be run as a 'Host Process' container. All of a Pod's + containers must have the same effective HostProcess + value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, + if HostProcess is true then HostNetwork must also be + set to true. + type: boolean + runAsUserName: + description: The UserName in Windows to run the entrypoint + of the container process. Defaults to the user specified + in image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext + takes precedence. + type: string + type: object + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. When set, the operator + will not automatically create a ServiceAccount for the TargetAllocator. + type: string + tolerations: + description: Toleration embedded kubernetes pod configuration + option, controls how pods can be scheduled with matching taints items: - description: IngressTLS describes the transport layer security - associated with an ingress. + description: The pod this Toleration is attached to tolerates + any taint that matches the triple using + the matching operator . properties: - hosts: - description: hosts is a list of hosts included in the TLS - certificate. The values in this list must match the name/s - used in the tlsSecret. Defaults to the wildcard host setting - for the loadbalancer controller fulfilling this Ingress, - if left unspecified. + effect: + description: Effect indicates the taint effect to match. + Empty means match all taint effects. When specified, allowed + values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration applies + to. Empty means match all taint keys. If the key is empty, + operator must be Exists; this combination means to match + all values and all keys. + type: string + operator: + description: Operator represents a key's relationship to + the value. Valid operators are Exists and Equal. Defaults + to Equal. Exists is equivalent to wildcard for value, + so that a pod can tolerate all taints of a particular + category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the period of + time the toleration (which must be of effect NoExecute, + otherwise this field is ignored) tolerates the taint. + By default, it is not set, which means tolerate the taint + forever (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration matches + to. If the operator is Exists, the value should be empty, + otherwise just a regular string. + type: string + type: object + type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod + configuration option, controls how pods are spread across your + cluster among failure-domains such as regions, zones, nodes, + and other user-defined topology domains https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + items: + description: TopologySpreadConstraint specifies how to spread + matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine + the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists + or DoesNotExist, the values array must be empty. + This array is replaced during a strategic merge + patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys + to select the pods over which spreading will be calculated. + The keys are used to lookup values from the incoming pod + labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading + will be calculated for the incoming pod. The same key + is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't + set. Keys that don't exist in the incoming pod labels + will be ignored. A null or empty list means only match + against labelSelector. \n This is a beta field and requires + the MatchLabelKeysInPodTopologySpread feature gate to + be enabled (enabled by default)." items: type: string type: array x-kubernetes-list-type: atomic - secretName: - description: secretName is the name of the secret used to - terminate TLS traffic on port 443. Field is left optional - to allow TLS routing based on SNI hostname alone. If the - SNI host in a listener conflicts with the "Host" header - field used by an IngressRule, the SNI host is used for - termination and value of the "Host" header is used for - routing. + maxSkew: + description: 'MaxSkew describes the degree to which pods + may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global + minimum. The global minimum is the minimum number of matching + pods in an eligible domain or zero if the number of eligible + domains is less than MinDomains. For example, in a 3-zone + cluster, MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | | P P | P P | P | - + if MaxSkew is 1, incoming pod can only be scheduled to + zone3 to become 2/2/2; scheduling it onto zone1(zone2) + would make the ActualSkew(3-1) on zone1(zone2) violate + MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled + onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that + satisfy it. It''s a required field. Default value is 1 + and 0 is not allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation + of Skew is performed. And when the number of eligible + domains with matching topology keys equals or greater + than minDomains, this value has no effect on scheduling. + As a result, when the number of eligible domains is less + than minDomains, scheduler won't schedule more than maxSkew + Pods to those domains. If value is nil, the constraint + behaves as if MinDomains is equal to 1. Valid values are + integers greater than 0. When value is not nil, WhenUnsatisfiable + must be DoNotSchedule. \n For example, in a 3-zone cluster, + MaxSkew is set to 2, MinDomains is set to 5 and pods with + the same labelSelector spread as 2/2/2: | zone1 | zone2 + | zone3 | | P P | P P | P P | The number of domains + is less than 5(MinDomains), so \"global minimum\" is treated + as 0. In this situation, new pod with the same labelSelector + cannot be scheduled, because computed skew will be 3(3 + - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. \n This is a beta field and requires + the MinDomainsInPodTopologySpread feature gate to be enabled + (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching + nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes + are included in the calculations. \n If this value is + nil, the behavior is equivalent to the Honor policy. This + is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." type: string - type: object - type: array - type: - description: 'Type default value is: "" Supported types are: ingress' - enum: - - ingress - - route - type: string - type: object - mode: - description: Mode represents how the collector should be deployed - (deployment, daemonset, statefulset or sidecar) - enum: - - daemonset - - deployment - - sidecar - - statefulset - type: string - nodeSelector: - additionalProperties: - type: string - description: NodeSelector to schedule CloudWatch Agent pods. This - is only relevant to daemonset, statefulset, and deployment mode - type: object - podAnnotations: - additionalProperties: - type: string - description: PodAnnotations is the set of annotations that will be - attached to Collector and Target Allocator pods. - type: object - ports: - description: Ports allows a set of ports to be exposed by the underlying - v1.Service. By default, the operator will attempt to infer the required - ports by parsing the .Spec.Config property but this property can - be used to open additional ports that can't be inferred by the operator, - like for custom receivers. - items: - description: ServicePort contains information on service's port. - properties: - appProtocol: - description: The application protocol for this port. This field - follows standard Kubernetes label syntax. Un-prefixed names - are reserved for IANA standard service names (as per RFC-6335 - and https://www.iana.org/assignments/service-names). Non-standard - protocols should use prefixed names such as mycompany.com/my-custom-protocol. - type: string - name: - description: The name of this port within the service. This - must be a DNS_LABEL. All ports within a ServiceSpec must have - unique names. When considering the endpoints for a Service, - this must match the 'name' field in the EndpointPort. Optional - if only one ServicePort is defined on this service. - type: string - nodePort: - description: 'The port on each node on which this service is - exposed when type is NodePort or LoadBalancer. Usually assigned - by the system. If a value is specified, in-range, and not - in use it will be used, otherwise the operation will fail. If - not specified, a port will be allocated if this Service requires - one. If this field is specified when creating a Service which - does not need it, creation will fail. This field will be wiped - when updating a Service to no longer need it (e.g. changing - type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport' - format: int32 - type: integer - port: - description: The port that will be exposed by this service. - format: int32 - type: integer - protocol: - default: TCP - description: The IP protocol for this port. Supports "TCP", - "UDP", and "SCTP". Default is TCP. - type: string - targetPort: - anyOf: - - type: integer - - type: string - description: 'Number or name of the port to access on the pods - targeted by the service. Number must be in the range 1 to - 65535. Name must be an IANA_SVC_NAME. If this is a string, - it will be looked up as a named port in the target Pod''s - container ports. If this is not specified, the value of the - ''port'' field is used (an identity map). This field is ignored - for services with clusterIP=None, and should be omitted or - set equal to the ''port'' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service' - x-kubernetes-int-or-string: true - required: - - port - type: object - type: array - x-kubernetes-list-type: atomic - priorityClassName: - description: If specified, indicates the pod's priority. If not specified, - the pod priority will be default or zero if there is no default. - type: string - replicas: - description: Replicas is the number of pod instances for the underlying - CloudWatch Agent. Set this if your are not using autoscaling - format: int32 - type: integer - resources: - description: Resources to set on the CloudWatch Agent pods. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat + node taints when calculating pod topology spread skew. + Options are: - Honor: nodes without taints, along with + tainted nodes for which the incoming pod has a toleration, + are included. - Ignore: node taints are ignored. All nodes + are included. \n If this value is nil, the behavior is + equivalent to the Ignore policy. This is a beta-level + feature default enabled by the NodeInclusionPolicyInPodTopologySpread + feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes + that have a label with this key and identical values are + considered to be in the same topology. We consider each + as a "bucket", and try to put balanced number + of pods into each bucket. We define a domain as a particular + instance of a topology. Also, we define an eligible domain + as a domain whose nodes meet the requirements of nodeAffinityPolicy + and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain + of that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with + a pod if it doesn''t satisfy the spread constraint. - + DoNotSchedule (default) tells the scheduler not to schedule + it. - ScheduleAnyway tells the scheduler to schedule the + pod in any location, but giving higher precedence to topologies + that would help reduce the skew. A constraint is considered + "Unsatisfiable" for an incoming pod if and only if every + possible node assignment for that pod would violate "MaxSkew" + on some topology. For example, in a 3-zone cluster, MaxSkew + is set to 1, and pods with the same labelSelector spread + as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming + pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) + as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). + In other words, the cluster can still be imbalanced, but + scheduler won''t make it *more* imbalanced. It''s a required + field.' type: string required: - - name + - maxSkew + - topologyKey + - whenUnsatisfiable type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object type: object - serviceAccount: - description: ServiceAccount indicates the name of an existing service - account to use with this instance. When set, the operator will not - automatically create a ServiceAccount for the collector. - type: string + terminationGracePeriodSeconds: + description: Duration in seconds the pod needs to terminate gracefully + upon probe failure. + format: int64 + type: integer tolerations: - description: Toleration to schedule CloudWatch Agent pods. This is - only relevant to daemonset, statefulset, and deployment mode + description: Toleration to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -479,6 +6793,245 @@ spec: type: string type: object type: array + topologySpreadConstraints: + description: TopologySpreadConstraints embedded kubernetes pod configuration + option, controls how pods are spread across your cluster among failure-domains + such as regions, zones, nodes, and other user-defined topology domains + https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + This is only relevant to statefulset, and deployment mode + items: + description: TopologySpreadConstraint specifies how to spread matching + pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods + that match this label selector are counted to determine the + number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values array + must be non-empty. If the operator is Exists or + DoesNotExist, the values array must be empty. This + array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field is + "key", the operator is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: "MatchLabelKeys is a set of pod label keys to select + the pods over which spreading will be calculated. The keys + are used to lookup values from the incoming pod labels, those + key-value labels are ANDed with labelSelector to select the + group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in + both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot + be set when LabelSelector isn't set. Keys that don't exist + in the incoming pod labels will be ignored. A null or empty + list means only match against labelSelector. \n This is a + beta field and requires the MatchLabelKeysInPodTopologySpread + feature gate to be enabled (enabled by default)." + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: 'MaxSkew describes the degree to which pods may + be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, + it is the maximum permitted difference between the number + of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods + in an eligible domain or zero if the number of eligible domains + is less than MinDomains. For example, in a 3-zone cluster, + MaxSkew is set to 1, and pods with the same labelSelector + spread as 2/2/1: In this case, the global minimum is 1. | + zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew + is 1, incoming pod can only be scheduled to zone3 to become + 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) + on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming + pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, + it is used to give higher precedence to topologies that satisfy + it. It''s a required field. Default value is 1 and 0 is not + allowed.' + format: int32 + type: integer + minDomains: + description: "MinDomains indicates a minimum number of eligible + domains. When the number of eligible domains with matching + topology keys is less than minDomains, Pod Topology Spread + treats \"global minimum\" as 0, and then the calculation of + Skew is performed. And when the number of eligible domains + with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. As a result, when + the number of eligible domains is less than minDomains, scheduler + won't schedule more than maxSkew Pods to those domains. If + value is nil, the constraint behaves as if MinDomains is equal + to 1. Valid values are integers greater than 0. When value + is not nil, WhenUnsatisfiable must be DoNotSchedule. \n For + example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains + is set to 5 and pods with the same labelSelector spread as + 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | + The number of domains is less than 5(MinDomains), so \"global + minimum\" is treated as 0. In this situation, new pod with + the same labelSelector cannot be scheduled, because computed + skew will be 3(3 - 0) if new Pod is scheduled to any of the + three zones, it will violate MaxSkew. \n This is a beta field + and requires the MinDomainsInPodTopologySpread feature gate + to be enabled (enabled by default)." + format: int32 + type: integer + nodeAffinityPolicy: + description: "NodeAffinityPolicy indicates how we will treat + Pod's nodeAffinity/nodeSelector when calculating pod topology + spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector + are included in the calculations. - Ignore: nodeAffinity/nodeSelector + are ignored. All nodes are included in the calculations. \n + If this value is nil, the behavior is equivalent to the Honor + policy. This is a beta-level feature default enabled by the + NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + nodeTaintsPolicy: + description: "NodeTaintsPolicy indicates how we will treat node + taints when calculating pod topology spread skew. Options + are: - Honor: nodes without taints, along with tainted nodes + for which the incoming pod has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + \n If this value is nil, the behavior is equivalent to the + Ignore policy. This is a beta-level feature default enabled + by the NodeInclusionPolicyInPodTopologySpread feature flag." + type: string + topologyKey: + description: TopologyKey is the key of node labels. Nodes that + have a label with this key and identical values are considered + to be in the same topology. We consider each + as a "bucket", and try to put balanced number of pods into + each bucket. We define a domain as a particular instance of + a topology. Also, we define an eligible domain as a domain + whose nodes meet the requirements of nodeAffinityPolicy and + nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", + each Node is a domain of that topology. And, if TopologyKey + is "topology.kubernetes.io/zone", each zone is a domain of + that topology. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with a + pod if it doesn''t satisfy the spread constraint. - DoNotSchedule + (default) tells the scheduler not to schedule it. - ScheduleAnyway + tells the scheduler to schedule the pod in any location, but + giving higher precedence to topologies that would help reduce + the skew. A constraint is considered "Unsatisfiable" for an + incoming pod if and only if every possible node assignment + for that pod would violate "MaxSkew" on some topology. For + example, in a 3-zone cluster, MaxSkew is set to 1, and pods + with the same labelSelector spread as 3/1/1: | zone1 | zone2 + | zone3 | | P P P | P | P | If WhenUnsatisfiable is + set to DoNotSchedule, incoming pod can only be scheduled to + zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on + zone2(zone3) satisfies MaxSkew(1). In other words, the cluster + can still be imbalanced, but scheduler won''t make it *more* + imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + updateStrategy: + description: UpdateStrategy represents the strategy the operator will + take replacing existing DaemonSet pods with new pods https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec + This is only applicable to Daemonset mode. + properties: + rollingUpdate: + description: 'Rolling update config params. Present only if type + = "RollingUpdate". --- TODO: Update this to follow our convention + for oneOf, whatever we decide it to be. Same as Deployment `strategy.rollingUpdate`. + See https://github.com/kubernetes/kubernetes/issues/35345' + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: 'The maximum number of nodes with an existing + available DaemonSet pod that can have an updated DaemonSet + pod during during an update. Value can be an absolute number + (ex: 5) or a percentage of desired pods (ex: 10%). This + can not be 0 if MaxUnavailable is 0. Absolute number is + calculated from percentage by rounding up to a minimum of + 1. Default value is 0. Example: when this is set to 30%, + at most 30% of the total number of nodes that should be + running the daemon pod (i.e. status.desiredNumberScheduled) + can have their a new pod created before the old pod is marked + as deleted. The update starts by launching new pods on 30% + of nodes. Once an updated pod is available (Ready for at + least minReadySeconds) the old DaemonSet pod on that node + is marked deleted. If the old pod becomes unavailable for + any reason (Ready transitions to false, is evicted, or is + drained) an updated pod is immediatedly created on that + node without considering surge limits. Allowing surge implies + the possibility that the resources consumed by the daemonset + on any given node can double if the readiness check fails, + and so resource intensive daemonsets should take into account + that they may cause evictions during disruption.' + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: 'The maximum number of DaemonSet pods that can + be unavailable during the update. Value can be an absolute + number (ex: 5) or a percentage of total number of DaemonSet + pods at the start of the update (ex: 10%). Absolute number + is calculated from percentage by rounding up. This cannot + be 0 if MaxSurge is 0 Default value is 1. Example: when + this is set to 30%, at most 30% of the total number of nodes + that should be running the daemon pod (i.e. status.desiredNumberScheduled) + can have their pods stopped for an update at any given time. + The update starts by stopping at most 30% of those DaemonSet + pods and then brings up new DaemonSet pods in their place. + Once the new pods are available, it then proceeds onto other + DaemonSet pods, thus ensuring that at least 70% of original + number of DaemonSet pods are available at all times during + the update.' + x-kubernetes-int-or-string: true + type: object + type: + description: Type of daemon set update. Can be "RollingUpdate" + or "OnDelete". Default is RollingUpdate. + type: string + type: object upgradeStrategy: description: UpgradeStrategy represents how the operator will handle upgrades to the CR when a newer version of the operator is deployed @@ -628,29 +7181,6 @@ spec: still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in - PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where - this field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -726,6 +7256,25 @@ spec: description: 'storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: 'volumeAttributesClassName may be used to set + the VolumeAttributesClass used by this claim. If specified, + the CSI driver will create or update the volume with the + attributes defined in the corresponding VolumeAttributesClass. + This has a different purpose than storageClassName, it + can be changed after the claim is created. An empty string + value means that no VolumeAttributesClass will be applied + to the claim but it''s not allowed to reset this field + to empty string once it is set. If unspecified and the + PersistentVolumeClaim is unbound, the default VolumeAttributesClass + will be set by the persistentvolume controller if it exists. + If the resource referred to by volumeAttributesClass does + not exist, this PersistentVolumeClaim will be set to a + Pending state, as reflected by the modifyVolumeStatus + field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + (Alpha) Using this field requires the VolumeAttributesClass + feature gate to be enabled.' + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not @@ -746,6 +7295,50 @@ spec: items: type: string type: array + allocatedResourceStatuses: + additionalProperties: + description: When a controller receives persistentvolume + claim update with ClaimResourceStatus for a resource + that it does not recognizes, then it should ignore that + update and let other controllers handle it. + type: string + description: "allocatedResourceStatuses stores status of + resource being resized for the given PVC. Key names follow + standard Kubernetes label syntax. Valid values are either: + * Un-prefixed keys: - storage - the capacity of the volume. + * Custom resources must use implementation-defined prefixed + names such as \"example.com/my-custom-resource\" Apart + from above values - keys that are unprefixed or have kubernetes.io + prefix are considered reserved and hence may not be used. + \n ClaimResourceStatus can be in any of following states: + - ControllerResizeInProgress: State set when resize controller + starts resizing the volume in control-plane. - ControllerResizeFailed: + State set when resize has failed in resize controller + with a terminal error. - NodeResizePending: State set + when resize controller has finished resizing the volume + but further resizing of volume is needed on the node. + - NodeResizeInProgress: State set when kubelet starts + resizing the volume. - NodeResizeFailed: State set when + resizing has failed in kubelet with a terminal error. + Transient errors don't set NodeResizeFailed. For example: + if expanding a PVC for more capacity - this field can + be one of the following states: - pvc.status.allocatedResourceStatus['storage'] + = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] + = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizePending\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus['storage'] + = \"NodeResizeFailed\" When this field is not set, it + means that no resize operation is in progress for the + given PVC. \n A controller that receives PVC update with + previously unknown resourceName or ClaimResourceStatus + should ignore the update for the purpose it was designed. + For example - a controller that only is responsible for + resizing capacity of the volume, should ignore PVC updates + that change other valid resources associated with PVC. + \n This is an alpha field and requires enabling RecoverVolumeExpansionFailure + feature." + type: object + x-kubernetes-map-type: granular allocatedResources: additionalProperties: anyOf: @@ -753,18 +7346,30 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: allocatedResources is the storage resource - within AllocatedResources tracks the capacity allocated - to a PVC. It may be larger than the actual capacity when - a volume expansion operation is requested. For storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used. If allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation. If a volume expansion - capacity request is lowered, allocatedResources is only - lowered if there are no expansion operations in progress - and if the actual volume capacity is equal or lower than - the requested capacity. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. + description: "allocatedResources tracks the resources allocated + to a PVC including its capacity. Key names follow standard + Kubernetes label syntax. Valid values are either: * Un-prefixed + keys: - storage - the capacity of the volume. * Custom + resources must use implementation-defined prefixed names + such as \"example.com/my-custom-resource\" Apart from + above values - keys that are unprefixed or have kubernetes.io + prefix are considered reserved and hence may not be used. + \n Capacity reported here may be larger than the actual + capacity when a volume expansion operation is requested. + For storage quota, the larger value from allocatedResources + and PVC.spec.resources is used. If allocatedResources + is not set, PVC.spec.resources alone is used for quota + calculation. If a volume expansion capacity request is + lowered, allocatedResources is only lowered if there are + no expansion operations in progress and if the actual + volume capacity is equal or lower than the requested capacity. + \n A controller that receives PVC update with previously + unknown resourceName should ignore the update for the + purpose it was designed. For example - a controller that + only is responsible for resizing capacity of the volume, + should ignore PVC updates that change other valid resources + associated with PVC. \n This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature." type: object capacity: additionalProperties: @@ -816,16 +7421,45 @@ spec: - type type: object type: array + currentVolumeAttributesClassName: + description: currentVolumeAttributesClassName is the current + name of the VolumeAttributesClass the PVC is using. When + unset, there is no VolumeAttributeClass applied to this + PersistentVolumeClaim This is an alpha field and requires + enabling VolumeAttributesClass feature. + type: string + modifyVolumeStatus: + description: ModifyVolumeStatus represents the status object + of ControllerModifyVolume operation. When this is unset, + there is no ModifyVolume operation being attempted. This + is an alpha field and requires enabling VolumeAttributesClass + feature. + properties: + status: + description: 'status is the status of the ControllerModifyVolume + operation. It can be in any of following states: - + Pending Pending indicates that the PersistentVolumeClaim + cannot be modified due to unmet requirements, such + as the specified VolumeAttributesClass not existing. + - InProgress InProgress indicates that the volume + is being modified. - Infeasible Infeasible indicates + that the request has been rejected as invalid by the + CSI driver. To resolve the error, a valid VolumeAttributesClass + needs to be specified. Note: New statuses can be added + in the future. Consumers should check for unknown + statuses and fail appropriately.' + type: string + targetVolumeAttributesClassName: + description: targetVolumeAttributesClassName is the + name of the VolumeAttributesClass the PVC currently + being reconciled + type: string + required: + - status + type: object phase: description: phase represents the current phase of PersistentVolumeClaim. type: string - resizeStatus: - description: resizeStatus stores status of resize operation. - ResizeStatus is not set by default but when expansion - is complete resizeStatus is set to empty string by resize - controller or kubelet. This is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature. - type: string type: object type: object type: array @@ -1443,31 +8077,6 @@ spec: value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: - claims: - description: "Claims lists the names of resources, - defined in spec.resourceClaims, that are used - by this container. \n This is an alpha field - and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. - It can only be set for containers." - items: - description: ResourceClaim references one - entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name - of one entry in pod.spec.resourceClaims - of the Pod where this field is used. - It makes that resource available inside - a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map limits: additionalProperties: anyOf: @@ -1550,6 +8159,28 @@ spec: StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string + volumeAttributesClassName: + description: 'volumeAttributesClassName may be used + to set the VolumeAttributesClass used by this + claim. If specified, the CSI driver will create + or update the volume with the attributes defined + in the corresponding VolumeAttributesClass. This + has a different purpose than storageClassName, + it can be changed after the claim is created. + An empty string value means that no VolumeAttributesClass + will be applied to the claim but it''s not allowed + to reset this field to empty string once it is + set. If unspecified and the PersistentVolumeClaim + is unbound, the default VolumeAttributesClass + will be set by the persistentvolume controller + if it exists. If the resource referred to by volumeAttributesClass + does not exist, this PersistentVolumeClaim will + be set to a Pending state, as reflected by the + modifyVolumeStatus field, until such as a resource + exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass + (Alpha) Using this field requires the VolumeAttributesClass + feature gate to be enabled.' + type: string volumeMode: description: volumeMode defines what type of volume is required by the claim. Value of Filesystem @@ -1924,6 +8555,102 @@ spec: description: Projection that may be projected along with other supported volume types properties: + clusterTrustBundle: + description: "ClusterTrustBundle allows a pod to access + the `.spec.trustBundle` field of ClusterTrustBundle + objects in an auto-updating file. \n Alpha, gated + by the ClusterTrustBundleProjection feature gate. + \n ClusterTrustBundle objects can either be selected + by name, or by the combination of signer name and + a label selector. \n Kubelet performs aggressive + normalization of the PEM contents written into the + pod filesystem. Esoteric PEM features such as inter-block + comments and block headers are stripped. Certificates + are deduplicated. The ordering of certificates within + the file is arbitrary, and Kubelet may change the + order over time." + properties: + labelSelector: + description: Select all ClusterTrustBundles that + match this label selector. Only has effect + if signerName is set. Mutually-exclusive with + name. If unset, interpreted as "match nothing". If + set but empty, interpreted as "match everything". + properties: + matchExpressions: + description: matchExpressions is a list of + label selector requirements. The requirements + are ANDed. + items: + description: A label selector requirement + is a selector that contains values, a + key, and an operator that relates the + key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: operator represents a key's + relationship to a set of values. Valid + operators are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array of string + values. If the operator is In or NotIn, + the values array must be non-empty. + If the operator is Exists or DoesNotExist, + the values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator is + "In", and the values array contains only + "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + name: + description: Select a single ClusterTrustBundle + by object name. Mutually-exclusive with signerName + and labelSelector. + type: string + optional: + description: If true, don't block pod startup + if the referenced ClusterTrustBundle(s) aren't + available. If using name, then the named ClusterTrustBundle + is allowed not to exist. If using signerName, + then the combination of signerName and labelSelector + is allowed to match zero ClusterTrustBundles. + type: boolean + path: + description: Relative path from the volume root + to write the bundle. + type: string + signerName: + description: Select all ClusterTrustBundles that + match this signer name. Mutually-exclusive with + name. The contents of all selected ClusterTrustBundles + will be unified and deduplicated. + type: string + required: + - path + type: object configMap: description: configMap information about the configMap data to project @@ -2455,8 +9182,8 @@ spec: AmazonCloudWatchAgent. properties: image: - description: Image indicates the container image to use for the CloudWatch - Agent. + description: Image indicates the container image to use for the OpenTelemetry + Collector. type: string messages: description: 'Messages about actions performed by the operator on @@ -2492,7 +9219,7 @@ spec: type: string type: object version: - description: Version of the managed CloudWatch Agent (operand) + description: Version of the managed OpenTelemetry Collector (operand) type: string type: object type: object diff --git a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml index acec5e4ae..d3fc23183 100644 --- a/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml +++ b/config/crd/bases/cloudwatch.aws.amazon.com_instrumentations.yaml @@ -51,133 +51,1294 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: - env: - description: 'Env defines common env vars. There are four layers for - env vars'' definitions and the precedence order is: `original container - env vars` > `language specific env vars` > `common env vars` > `instrument - spec configs'' vars`. If the former var had been defined, then the - other vars would be ignored.' - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: Name of the environment variable. Must be a C_IDENTIFIER. - type: string - value: - description: 'Variable references $(VAR_NAME) are expanded using - the previously defined environment variables in the container - and any service environment variables. If a variable cannot - be resolved, the reference in the input string will be unchanged. - Double $$ are reduced to a single $, which allows for escaping - the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the - string literal "$(VAR_NAME)". Escaped references will never - be expanded, regardless of whether the variable exists or - not. Defaults to "".' - type: string - valueFrom: - description: Source for the environment variable's value. Cannot - be used if value is not empty. + apacheHttpd: + description: ApacheHttpd defines configuration for Apache HTTPD auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Apache HTTPD agent specific attributes. + The precedence is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports metadata.name, - metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, - status.podIP, status.podIPs.' + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. properties: - apiVersion: - description: Version of the schema the FieldPath is - written in terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field to select in the specified - API version. - type: string - required: - - fieldPath + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: 'Selects a resource of the container: only - resources limits and requests (limits.cpu, limits.memory, - limits.ephemeral-storage, requests.cpu, requests.memory - and requests.ephemeral-storage) are currently supported.' + required: + - name + type: object + type: array + configPath: + description: Location of Apache HTTPD server configuration. Needed + only if different from default "/usr/local/apache2/conf" + type: string + env: + description: 'Env defines Apache HTTPD specific env vars. There + are four layers for env vars'' definitions and the precedence + order is: `original container env vars` > `language specific + env vars` > `common env vars` > `instrument spec configs'' vars`. + If the former var had been defined, then the other vars would + be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the exposed - resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Apache SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + version: + description: Apache HTTPD server version. One of 2.4 or 2.2. Default + is 2.4 + type: string + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + dotnet: + description: DotNet defines configuration for DotNet auto-instrumentation. + properties: + env: + description: 'Env defines DotNet specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with DotNet SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + env: + description: 'Env defines common env vars. There are four layers for + env vars'' definitions and the precedence order is: `original container + env vars` > `language specific env vars` > `common env vars` > `instrument + spec configs'' vars`. If the former var had been defined, then the + other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + exporter: + description: Exporter defines exporter configuration. + properties: + endpoint: + description: Endpoint is address of the collector with OTLP endpoint. + type: string + type: object + go: + description: Go defines configuration for Go auto-instrumentation. + When using Go auto-instrumentation you must provide a value for + the OTEL_GO_AUTO_TARGET_EXE env var via the Instrumentation env + vars or via the instrumentation.opentelemetry.io/otel-go-auto-target-exe + pod annotation. Failure to set this value causes instrumentation + injection to abort, leaving the original pod unchanged. + properties: + env: + description: 'Env defines Go specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Go SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + java: + description: Java defines configuration for java auto-instrumentation. + properties: + env: + description: 'Env defines java specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with javaagent auto-instrumentation + JAR. + type: string + resources: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + nginx: + description: Nginx defines configuration for Nginx auto-instrumentation. + properties: + attrs: + description: 'Attrs defines Nginx agent specific attributes. The + precedence order is: `agent default attributes` > `instrument + spec attributes` . Attributes are documented at https://github.com/open-telemetry/opentelemetry-cpp-contrib/tree/main/instrumentation/otel-webserver-module' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + configFile: + description: Location of Nginx configuration file. Needed only + if different from default "/etx/nginx/nginx.conf" + type: string + env: + description: 'Env defines Nginx specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's namespace + required: + - name + type: object + type: array + image: + description: Image is a container image with Nginx SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean required: - - key + - name type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - exporter: - description: Exporter defines exporter configuration. - properties: - endpoint: - description: Endpoint is address of the collector with OTLP endpoint. - type: string + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - java: - description: Java defines configuration for java auto-instrumentation. + nodejs: + description: NodeJS defines configuration for nodejs auto-instrumentation. properties: env: - description: 'Env defines java specific env vars. There are four - layers for env vars'' definitions and the precedence order is: - `original container env vars` > `language specific env vars` + description: 'Env defines nodejs specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs'' vars`. If the former var had been defined, then the other vars would be ignored.' items: @@ -293,10 +1454,9 @@ spec: type: object type: array image: - description: Image is a container image with javaagent auto-instrumentation - JAR. + description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string - resources: + resourceRequirements: description: Resources describes the compute resource requirements. properties: claims: @@ -345,6 +1505,14 @@ spec: Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object propagators: description: Propagators defines inter-process context propagation @@ -363,6 +1531,188 @@ spec: - none type: string type: array + python: + description: Python defines configuration for python auto-instrumentation. + properties: + env: + description: 'Env defines python specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + image: + description: Image is a container image with Python SDK and auto-instrumentation. + type: string + resourceRequirements: + description: Resources describes the compute resource requirements. + properties: + claims: + description: "Claims lists the names of resources, defined + in spec.resourceClaims, that are used by this container. + \n This is an alpha field and requires enabling the DynamicResourceAllocation + feature gate. \n This field is immutable. It can only be + set for containers." + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: Name must match the name of one entry in + pod.spec.resourceClaims of the Pod where this field + is used. It makes that resource available inside a + container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. Requests cannot exceed + Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' + type: object + type: object + volumeLimitSize: + anyOf: + - type: integer + - type: string + description: VolumeSizeLimit defines size limit for volume used + for auto-instrumentation. The default size is 200Mi. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object resource: description: Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification. diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2d404ed9b..f7f01ece9 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: 506463145083.dkr.ecr.us-west-2.amazonaws.com/cwagent-operator-pre-release + newName: 355660395157.dkr.ecr.us-east-1.amazonaws.com/amazon-cloudwatch-agent-operator newTag: latest diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 972d1f889..25ce5e378 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -8,6 +8,9 @@ rules: - "" resources: - configmaps + - pods + - serviceaccounts + - services verbs: - create - delete @@ -31,21 +34,11 @@ rules: - list - watch - apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" + - apps resources: - - services + - daemonsets + - deployments + - statefulsets verbs: - create - delete @@ -57,19 +50,15 @@ rules: - apiGroups: - apps resources: - - daemonsets + - replicasets verbs: - - create - - delete - get - list - - patch - - update - watch - apiGroups: - - apps + - autoscaling resources: - - deployments + - horizontalpodautoscalers verbs: - create - delete @@ -79,9 +68,9 @@ rules: - update - watch - apiGroups: - - apps + - cloudwatch.aws.amazon.co resources: - - replicasets + - instrumentations verbs: - get - list @@ -131,6 +120,19 @@ rules: - get - list - update +- apiGroups: + - monitoring.coreos.com + resources: + - podmonitors + - servicemonitors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - networking.k8s.io resources: @@ -143,6 +145,18 @@ rules: - patch - update - watch +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - route.openshift.io resources: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index ce347fbcf..7fde915d1 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -15,7 +15,7 @@ webhooks: name: mamazoncloudwatchagent.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - cloudwatch.aws.amazon.co apiVersions: - v1alpha1 operations: @@ -81,7 +81,7 @@ webhooks: name: vamazoncloudwatchagentcreateupdate.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - cloudwatch.aws.amazon.co apiVersions: - v1alpha1 operations: @@ -101,7 +101,7 @@ webhooks: name: vamazoncloudwatchagentdelete.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.com + - cloudwatch.aws.amazon.co apiVersions: - v1alpha1 operations: diff --git a/controllers/opampbridge_controller.go b/controllers/opampbridge_controller.go deleted file mode 100644 index 29550ac34..000000000 --- a/controllers/opampbridge_controller.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers - -import ( - "context" - - "github.com/go-logr/logr" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/record" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - opampbridgeStatus "github.com/aws/amazon-cloudwatch-agent-operator/internal/status/opampbridge" -) - -// OpAMPBridgeReconciler reconciles a OpAMPBridge object. -type OpAMPBridgeReconciler struct { - client.Client - scheme *runtime.Scheme - log logr.Logger - recorder record.EventRecorder - config config.Config -} - -// OpAMPBridgeReconcilerParams is the set of options to build a new OpAMPBridgeReconciler. -type OpAMPBridgeReconcilerParams struct { - client.Client - Recorder record.EventRecorder - Scheme *runtime.Scheme - Log logr.Logger - Config config.Config -} - -func (r *OpAMPBridgeReconciler) getParams(instance v1alpha1.OpAMPBridge) manifests.Params { - return manifests.Params{ - Config: r.config, - Client: r.Client, - OpAMPBridge: instance, - Log: r.log, - Scheme: r.scheme, - Recorder: r.recorder, - } -} - -func NewOpAMPBridgeReconciler(params OpAMPBridgeReconcilerParams) *OpAMPBridgeReconciler { - reconciler := &OpAMPBridgeReconciler{ - Client: params.Client, - scheme: params.Scheme, - log: params.Log, - recorder: params.Recorder, - config: params.Config, - } - return reconciler -} - -//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=opentelemetry.io,resources=opampbridges/finalizers,verbs=update - -// Reconcile is part of the main kubernetes reconciliation loop which aims to -// move the current state of the cluster closer to the desired state. -// For more details, check Reconcile and its Result here: -// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile -func (r *OpAMPBridgeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - log := r.log.WithValues("opamp-bridge", req.NamespacedName) - var instance v1alpha1.OpAMPBridge - if err := r.Client.Get(ctx, req.NamespacedName, &instance); err != nil { - if !apierrors.IsNotFound(err) { - log.Error(err, "unable to fetch OpAMPBridge") - } - // we'll ignore not-found errors, since they can't be fixed by an immediate - // requeue (we'll need to wait for a new notification), and we can get them - // on deleted requests. - return ctrl.Result{}, client.IgnoreNotFound(err) - } - // We have a deletion, short circuit and let the deletion happen - if deletionTimestamp := instance.GetDeletionTimestamp(); deletionTimestamp != nil { - return ctrl.Result{}, nil - } - - params := r.getParams(instance) - - desiredObjects, buildErr := BuildOpAMPBridge(params) - if buildErr != nil { - return ctrl.Result{}, buildErr - } - err := reconcileDesiredObjects(ctx, r.Client, log, ¶ms.OpAMPBridge, params.Scheme, desiredObjects...) - return opampbridgeStatus.HandleReconcileStatus(ctx, log, params, err) -} - -// SetupWithManager sets up the controller with the Manager. -func (r *OpAMPBridgeReconciler) SetupWithManager(mgr ctrl.Manager) error { - return ctrl.NewControllerManagedBy(mgr). - For(&v1alpha1.OpAMPBridge{}). - Owns(&corev1.ConfigMap{}). - Owns(&corev1.ServiceAccount{}). - Owns(&corev1.Service{}). - Owns(&appsv1.Deployment{}). - Complete(r) -} diff --git a/controllers/opampbridge_controller_test.go b/controllers/opampbridge_controller_test.go deleted file mode 100644 index 5cd8b282d..000000000 --- a/controllers/opampbridge_controller_test.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers_test - -import ( - "context" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - "k8s.io/kubectl/pkg/scheme" - "sigs.k8s.io/controller-runtime/pkg/client" - k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" - logf "sigs.k8s.io/controller-runtime/pkg/log" - "sigs.k8s.io/controller-runtime/pkg/manager" - k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/controllers" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" -) - -var opampBridgeLogger = logf.Log.WithName("opamp-bridge-controller-unit-tests") -var opampBridgeMockAutoDetector = &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { - return openshift.RoutesAvailable, nil - }, -} - -func TestNewObjectsOnReconciliation_OpAMPBridge(t *testing.T) { - // prepare - cfg := config.New( - config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), - config.WithAutoDetect(opampBridgeMockAutoDetector), - ) - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ - Client: k8sClient, - Log: opampBridgeLogger, - Scheme: testScheme, - Recorder: record.NewFakeRecorder(10), - Config: cfg, - }) - require.NoError(t, cfg.AutoDetect()) - created := &v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ - v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, - v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, - v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - }, - } - err := k8sClient.Create(context.Background(), created) - require.NoError(t, err) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(context.Background(), req) - - // verify - require.NoError(t, err) - - // the base query for the underlying objects - opts := []client.ListOption{ - client.InNamespace(nsn.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", nsn.Namespace, nsn.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - }), - } - - // verify that we have at least one object for each of the types we create - // whether we have the right ones is up to the specific tests for each type - { - list := &corev1.ConfigMapList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceAccountList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &corev1.ServiceList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - { - list := &appsv1.DeploymentList{} - err = k8sClient.List(context.Background(), list, opts...) - assert.NoError(t, err) - assert.NotEmpty(t, list.Items) - } - // cleanup - require.NoError(t, k8sClient.Delete(context.Background(), created)) -} - -func TestSkipWhenInstanceDoesNotExist_OpAMPBridge(t *testing.T) { - // prepare - cfg := config.New() - nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} - reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ - Client: k8sClient, - Log: opampBridgeLogger, - Scheme: scheme.Scheme, - Config: cfg, - }) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err := reconciler.Reconcile(context.Background(), req) - - // verify - assert.NoError(t, err) -} - -func TestRegisterWithManager_OpAMPBridge(t *testing.T) { - t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") - - // prepare - mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) - require.NoError(t, err) - - reconciler := controllers.NewReconciler(controllers.Params{}) - - // test - err = reconciler.SetupWithManager(mgr) - - // verify - assert.NoError(t, err) -} diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 0ea94cb70..678f246f4 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -76,9 +76,9 @@ func NewReconciler(p Params) *AmazonCloudWatchAgentReconciler { // +kubebuilder:rbac:groups=monitoring.coreos.com,resources=servicemonitors;podmonitors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=route.openshift.io,resources=routes;routes/custom-host,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=get;list;watch;update;patch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents/finalizers,verbs=get;update;patch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,verbs=get;list;watch;update;patch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents/finalizers,verbs=get;update;patch // Reconcile the current state of an OpenTelemetry collector resource with the desired state. func (r *AmazonCloudWatchAgentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { diff --git a/internal/webhook/podmutation/webhookhandler.go b/internal/webhook/podmutation/webhookhandler.go index a65847c61..d2ac3274f 100644 --- a/internal/webhook/podmutation/webhookhandler.go +++ b/internal/webhook/podmutation/webhookhandler.go @@ -20,8 +20,8 @@ import ( // +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1 // +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=amazoncloudwatchagents,verbs=get;list;watch -// +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=amazoncloudwatchagents,verbs=get;list;watch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.co,resources=instrumentations,verbs=get;list;watch // +kubebuilder:rbac:groups="apps",resources=replicasets,verbs=get;list;watch var _ WebhookHandler = (*podMutationWebhook)(nil) diff --git a/pkg/constants/ports.go b/pkg/constants/ports.go new file mode 100644 index 000000000..1255fc8ba --- /dev/null +++ b/pkg/constants/ports.go @@ -0,0 +1 @@ +package constants diff --git a/pkg/instrumentation/upgrade/upgrade.go b/pkg/instrumentation/upgrade/upgrade.go index bcb4b3215..25f1da84c 100644 --- a/pkg/instrumentation/upgrade/upgrade.go +++ b/pkg/instrumentation/upgrade/upgrade.go @@ -43,7 +43,7 @@ type InstrumentationUpgrade struct { DefaultAutoInstGo string } -// +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch;update;patch +// +kubebuilder:rbac:groups=cloudwatch.aws.amazon.com,resources=instrumentations,verbs=get;list;watch;update;patch // ManagedInstances upgrades managed instances by the amazon-cloudwatch-agent-operator. func (u *InstrumentationUpgrade) ManagedInstances(ctx context.Context) error { From e313a91bf8cb05cd321f94a9ac731fe8cccc459b Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 18:53:27 -0500 Subject: [PATCH 1222/1234] Use --server-side in kubectl apply for make deploy --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c2eddce91..5e184524d 100644 --- a/Makefile +++ b/Makefile @@ -114,12 +114,12 @@ set-image-controller: manifests kustomize # Deploy controller in the current Kubernetes context, configured in ~/.kube/config .PHONY: deploy -deploy: #set-image-controller - $(KUSTOMIZE) build config/default | kubectl apply -f - +deploy: set-image-controller + $(KUSTOMIZE) build config/default | kubectl apply --server-side -f - # Undeploy controller in the current Kubernetes context, configured in ~/.kube/config .PHONY: undeploy -undeploy: #set-image-controller +undeploy: set-image-controller $(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f - # Generates the released manifests From d17126050d7b0ba662fa808a068f71c71b71540b Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 18:53:53 -0500 Subject: [PATCH 1223/1234] Use predefined cloudwatch agent ports --- internal/manifests/collector/collector.go | 2 +- internal/manifests/collector/container.go | 11 ++++------- internal/manifests/collector/service.go | 24 +++-------------------- pkg/constants/ports.go | 22 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/internal/manifests/collector/collector.go b/internal/manifests/collector/collector.go index ff2feb490..34df8b56a 100644 --- a/internal/manifests/collector/collector.go +++ b/internal/manifests/collector/collector.go @@ -12,7 +12,7 @@ import ( ) const ( - ComponentAmazonCloudWatchAgent = "opentelemetry-collector" + ComponentAmazonCloudWatchAgent = "amazon-cloudwatch-agent" ) // Build creates the manifest for the collector resource. diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 96eedc655..138deed32 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -18,6 +18,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) // maxPortLen allows us to truncate a port name according to what is considered valid port syntax: @@ -31,13 +32,9 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo image = cfg.CollectorImage() } - // build container ports from service ports - ports, err := getConfigContainerPorts(logger, otelcol.Spec.Config) - if err != nil { - logger.Error(err, "container ports config") - } - - for _, p := range otelcol.Spec.Ports { + // Use defined cloudwatch agent ports + ports := map[string]corev1.ContainerPort{} + for _, p := range constants.CloudwatchAgentPorts { ports[p.Name] = corev1.ContainerPort{ Name: p.Name, ContainerPort: p.Port, diff --git a/internal/manifests/collector/service.go b/internal/manifests/collector/service.go index 9dafbb481..8f0d30df8 100644 --- a/internal/manifests/collector/service.go +++ b/internal/manifests/collector/service.go @@ -5,7 +5,6 @@ package collector import ( "fmt" - "strings" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" @@ -16,6 +15,7 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" + "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) // headless label is to differentiate the headless service from the clusterIP service. @@ -83,25 +83,7 @@ func Service(params manifests.Params) (*corev1.Service, error) { name := naming.Service(params.OtelCol.Name) labels := manifestutils.Labels(params.OtelCol.ObjectMeta, name, params.OtelCol.Spec.Image, ComponentAmazonCloudWatchAgent, []string{}) - configFromString, err := adapters.ConfigFromString(params.OtelCol.Spec.Config) - if err != nil { - params.Log.Error(err, "couldn't extract the configuration from the context") - return nil, err - } - - ports, err := adapters.ConfigToPorts(params.Log, configFromString) - if err != nil { - return nil, err - } - - // set appProtocol to h2c for grpc ports on OpenShift. - // OpenShift uses HA proxy that uses appProtocol for its configuration. - for i := range ports { - h2c := "h2c" - if params.OtelCol.Spec.Ingress.Type == v1alpha1.IngressTypeRoute && ports[i].AppProtocol != nil && strings.EqualFold(*ports[i].AppProtocol, "grpc") { - ports[i].AppProtocol = &h2c - } - } + ports := constants.CloudwatchAgentPorts if len(params.OtelCol.Spec.Ports) > 0 { // we should add all the ports from the CR @@ -126,7 +108,7 @@ func Service(params manifests.Params) (*corev1.Service, error) { if len(ports) == 0 { params.Log.V(1).Info("the instance's configuration didn't yield any ports to open, skipping service", "instance.name", params.OtelCol.Name, "instance.namespace", params.OtelCol.Namespace) - return nil, err + return nil, nil } trafficPolicy := corev1.ServiceInternalTrafficPolicyCluster diff --git a/pkg/constants/ports.go b/pkg/constants/ports.go index 1255fc8ba..c9af0fc1a 100644 --- a/pkg/constants/ports.go +++ b/pkg/constants/ports.go @@ -1 +1,23 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + package constants + +import ( + corev1 "k8s.io/api/core/v1" +) + +var CloudwatchAgentPorts = []corev1.ServicePort{ + { + Name: "otlp-grpc", + Port: 4315, + }, + { + Name: "otlp-http", + Port: 4316, + }, + { + Name: "aws-proxy", + Port: 2000, + }, +} From 2d70c503cf820cbde5ca865d28343ec09b4148f8 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 19:47:53 -0500 Subject: [PATCH 1224/1234] Remove opampbridge artifacts --- apis/v1alpha1/zz_generated.deepcopy.go | 710 +++++++----------- apis/v1alpha2/zz_generated.deepcopy.go | 485 ++++++------ controllers/common.go | 17 - internal/manifests/opampbridge/configmap.go | 64 -- .../manifests/opampbridge/configmap_test.go | 96 --- internal/manifests/opampbridge/container.go | 66 -- .../manifests/opampbridge/container_test.go | 63 -- internal/manifests/opampbridge/deployment.go | 54 -- .../manifests/opampbridge/deployment_test.go | 414 ---------- internal/manifests/opampbridge/opampbridge.go | 34 - internal/manifests/opampbridge/service.go | 40 - .../manifests/opampbridge/serviceaccount.go | 37 - .../opampbridge/serviceaccount_test.go | 46 -- internal/manifests/opampbridge/utils.go | 18 - internal/manifests/opampbridge/volume.go | 32 - internal/manifests/opampbridge/volume_test.go | 32 - internal/manifests/params.go | 2 +- internal/status/opampbridge/handle.go | 47 -- internal/status/opampbridge/opampbridge.go | 20 - main.go | 4 - 20 files changed, 497 insertions(+), 1784 deletions(-) delete mode 100644 internal/manifests/opampbridge/configmap.go delete mode 100644 internal/manifests/opampbridge/configmap_test.go delete mode 100644 internal/manifests/opampbridge/container.go delete mode 100644 internal/manifests/opampbridge/container_test.go delete mode 100644 internal/manifests/opampbridge/deployment.go delete mode 100644 internal/manifests/opampbridge/deployment_test.go delete mode 100644 internal/manifests/opampbridge/opampbridge.go delete mode 100644 internal/manifests/opampbridge/service.go delete mode 100644 internal/manifests/opampbridge/serviceaccount.go delete mode 100644 internal/manifests/opampbridge/serviceaccount_test.go delete mode 100644 internal/manifests/opampbridge/utils.go delete mode 100644 internal/manifests/opampbridge/volume.go delete mode 100644 internal/manifests/opampbridge/volume_test.go delete mode 100644 internal/status/opampbridge/handle.go delete mode 100644 internal/status/opampbridge/opampbridge.go diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index fa8b11563..7b3d4613e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -8,14 +8,265 @@ package v1alpha1 import ( - v2 "k8s.io/api/autoscaling/v2" - v1 "k8s.io/api/core/v1" + "k8s.io/api/autoscaling/v2" + "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. +func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AmazonCloudWatchAgent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. +func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { + *out = *in + in.Resources.DeepCopyInto(&out.Resources) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.MinReplicas != nil { + in, out := &in.MinReplicas, &out.MinReplicas + *out = new(int32) + **out = **in + } + if in.MaxReplicas != nil { + in, out := &in.MaxReplicas, &out.MaxReplicas + *out = new(int32) + **out = **in + } + if in.Autoscaler != nil { + in, out := &in.Autoscaler, &out.Autoscaler + *out = new(AutoscalerSpec) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(PodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1.ServicePort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]v1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Ingress.DeepCopyInto(&out.Ingress) + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Lifecycle != nil { + in, out := &in.Lifecycle, &out.Lifecycle + *out = new(v1.Lifecycle) + (*in).DeepCopyInto(*out) + } + if in.TerminationGracePeriodSeconds != nil { + in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.LivenessProbe != nil { + in, out := &in.LivenessProbe, &out.LivenessProbe + *out = new(Probe) + (*in).DeepCopyInto(*out) + } + if in.InitContainers != nil { + in, out := &in.InitContainers, &out.InitContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdditionalContainers != nil { + in, out := &in.AdditionalContainers, &out.AdditionalContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.Observability = in.Observability + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]ConfigMapsSpec, len(*in)) + copy(*out, *in) + } + in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. +func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { + *out = *in + out.Scale = in.Scale + if in.Messages != nil { + in, out := &in.Messages, &out.Messages + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. +func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { *out = *in @@ -473,209 +724,7 @@ func (in *ObservabilitySpec) DeepCopy() *ObservabilitySpec { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpAMPBridge) DeepCopyInto(out *OpAMPBridge) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridge. -func (in *OpAMPBridge) DeepCopy() *OpAMPBridge { - if in == nil { - return nil - } - out := new(OpAMPBridge) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpAMPBridge) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpAMPBridgeList) DeepCopyInto(out *OpAMPBridgeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OpAMPBridge, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeList. -func (in *OpAMPBridgeList) DeepCopy() *OpAMPBridgeList { - if in == nil { - return nil - } - out := new(OpAMPBridgeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpAMPBridgeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpAMPBridgeSpec) DeepCopyInto(out *OpAMPBridgeSpec) { - *out = *in - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = make(map[OpAMPBridgeCapability]bool, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ComponentsAllowed != nil { - in, out := &in.ComponentsAllowed, &out.ComponentsAllowed - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - in.Resources.DeepCopyInto(&out.Resources) - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(v1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodSecurityContext != nil { - in, out := &in.PodSecurityContext, &out.PodSecurityContext - *out = new(v1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodAnnotations != nil { - in, out := &in.PodAnnotations, &out.PodAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]v1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]v1.ServicePort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]v1.EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]v1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeSpec. -func (in *OpAMPBridgeSpec) DeepCopy() *OpAMPBridgeSpec { - if in == nil { - return nil - } - out := new(OpAMPBridgeSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpAMPBridgeStatus) DeepCopyInto(out *OpAMPBridgeStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpAMPBridgeStatus. -func (in *OpAMPBridgeStatus) DeepCopy() *OpAMPBridgeStatus { - if in == nil { - return nil - } - out := new(OpAMPBridgeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftRoute) DeepCopyInto(out *OpenShiftRoute) { +func (in *OpenShiftRoute) DeepCopyInto(out *OpenShiftRoute) { *out = *in } @@ -689,257 +738,6 @@ func (in *OpenShiftRoute) DeepCopy() *OpenShiftRoute { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. -func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AmazonCloudWatchAgent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. -func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { - *out = *in - in.Resources.DeepCopyInto(&out.Resources) - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.MinReplicas != nil { - in, out := &in.MinReplicas, &out.MinReplicas - *out = new(int32) - **out = **in - } - if in.MaxReplicas != nil { - in, out := &in.MaxReplicas, &out.MaxReplicas - *out = new(int32) - **out = **in - } - if in.Autoscaler != nil { - in, out := &in.Autoscaler, &out.Autoscaler - *out = new(AutoscalerSpec) - (*in).DeepCopyInto(*out) - } - if in.PodDisruptionBudget != nil { - in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget - *out = new(PodDisruptionBudgetSpec) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(v1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodSecurityContext != nil { - in, out := &in.PodSecurityContext, &out.PodSecurityContext - *out = new(v1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodAnnotations != nil { - in, out := &in.PodAnnotations, &out.PodAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]v1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]v1.ServicePort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]v1.EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]v1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Ingress.DeepCopyInto(&out.Ingress) - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Lifecycle != nil { - in, out := &in.Lifecycle, &out.Lifecycle - *out = new(v1.Lifecycle) - (*in).DeepCopyInto(*out) - } - if in.TerminationGracePeriodSeconds != nil { - in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - *out = new(int64) - **out = **in - } - if in.LivenessProbe != nil { - in, out := &in.LivenessProbe, &out.LivenessProbe - *out = new(Probe) - (*in).DeepCopyInto(*out) - } - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]v1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalContainers != nil { - in, out := &in.AdditionalContainers, &out.AdditionalContainers - *out = make([]v1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Observability = in.Observability - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ConfigMaps != nil { - in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]ConfigMapsSpec, len(*in)) - copy(*out, *in) - } - in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. -func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { - *out = *in - out.Scale = in.Scale - if in.Messages != nil { - in, out := &in.Messages, &out.Messages - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. -func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { *out = *in diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index 76b7b7fa8..bcd16d3d5 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -8,12 +8,251 @@ package v1alpha2 import ( - v1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" + "k8s.io/api/core/v1" + runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. +func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AmazonCloudWatchAgent, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. +func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { + *out = *in + in.Resources.DeepCopyInto(&out.Resources) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Autoscaler != nil { + in, out := &in.Autoscaler, &out.Autoscaler + *out = new(v1alpha1.AutoscalerSpec) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(v1alpha1.PodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodAnnotations != nil { + in, out := &in.PodAnnotations, &out.PodAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]v1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]v1.ServicePort, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.EnvFrom != nil { + in, out := &in.EnvFrom, &out.EnvFrom + *out = make([]v1.EnvFromSource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.VolumeClaimTemplates != nil { + in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates + *out = make([]v1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]v1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]v1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Ingress.DeepCopyInto(&out.Ingress) + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(v1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Lifecycle != nil { + in, out := &in.Lifecycle, &out.Lifecycle + *out = new(v1.Lifecycle) + (*in).DeepCopyInto(*out) + } + if in.TerminationGracePeriodSeconds != nil { + in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.LivenessProbe != nil { + in, out := &in.LivenessProbe, &out.LivenessProbe + *out = new(v1alpha1.Probe) + (*in).DeepCopyInto(*out) + } + if in.InitContainers != nil { + in, out := &in.InitContainers, &out.InitContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AdditionalContainers != nil { + in, out := &in.AdditionalContainers, &out.AdditionalContainers + *out = make([]v1.Container, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.Observability = in.Observability + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]v1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ConfigMaps != nil { + in, out := &in.ConfigMaps, &out.ConfigMaps + *out = make([]v1alpha1.ConfigMapsSpec, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. +func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { + *out = *in + out.Scale = in.Scale + if in.Messages != nil { + in, out := &in.Messages, &out.Messages + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. +func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { + if in == nil { + return nil + } + out := new(AmazonCloudWatchAgentStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { *out = *in @@ -322,246 +561,6 @@ func (in *NodeJS) DeepCopy() *NodeJS { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgent) DeepCopyInto(out *AmazonCloudWatchAgent) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgent. -func (in *AmazonCloudWatchAgent) DeepCopy() *AmazonCloudWatchAgent { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AmazonCloudWatchAgent) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentList) DeepCopyInto(out *AmazonCloudWatchAgentList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AmazonCloudWatchAgent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentList. -func (in *AmazonCloudWatchAgentList) DeepCopy() *AmazonCloudWatchAgentList { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AmazonCloudWatchAgentList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec) { - *out = *in - in.Resources.DeepCopyInto(&out.Resources) - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Autoscaler != nil { - in, out := &in.Autoscaler, &out.Autoscaler - *out = new(v1alpha1.AutoscalerSpec) - (*in).DeepCopyInto(*out) - } - if in.PodDisruptionBudget != nil { - in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget - *out = new(v1alpha1.PodDisruptionBudgetSpec) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(v1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodSecurityContext != nil { - in, out := &in.PodSecurityContext, &out.PodSecurityContext - *out = new(v1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.PodAnnotations != nil { - in, out := &in.PodAnnotations, &out.PodAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]v1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]v1.ServicePort, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EnvFrom != nil { - in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]v1.EnvFromSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeClaimTemplates != nil { - in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]v1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Ingress.DeepCopyInto(&out.Ingress) - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Lifecycle != nil { - in, out := &in.Lifecycle, &out.Lifecycle - *out = new(v1.Lifecycle) - (*in).DeepCopyInto(*out) - } - if in.TerminationGracePeriodSeconds != nil { - in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - *out = new(int64) - **out = **in - } - if in.LivenessProbe != nil { - in, out := &in.LivenessProbe, &out.LivenessProbe - *out = new(v1alpha1.Probe) - (*in).DeepCopyInto(*out) - } - if in.InitContainers != nil { - in, out := &in.InitContainers, &out.InitContainers - *out = make([]v1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalContainers != nil { - in, out := &in.AdditionalContainers, &out.AdditionalContainers - *out = make([]v1.Container, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Observability = in.Observability - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ConfigMaps != nil { - in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]v1alpha1.ConfigMapsSpec, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentSpec. -func (in *AmazonCloudWatchAgentSpec) DeepCopy() *AmazonCloudWatchAgentSpec { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AmazonCloudWatchAgentStatus) DeepCopyInto(out *AmazonCloudWatchAgentStatus) { - *out = *in - out.Scale = in.Scale - if in.Messages != nil { - in, out := &in.Messages, &out.Messages - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AmazonCloudWatchAgentStatus. -func (in *AmazonCloudWatchAgentStatus) DeepCopy() *AmazonCloudWatchAgentStatus { - if in == nil { - return nil - } - out := new(AmazonCloudWatchAgentStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Python) DeepCopyInto(out *Python) { *out = *in diff --git a/controllers/common.go b/controllers/common.go index 92248a0b1..efe1ba104 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -19,7 +19,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/opampbridge" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator" ) @@ -49,22 +48,6 @@ func BuildCollector(params manifests.Params) ([]client.Object, error) { return resources, nil } -// BuildOpAMPBridge returns the generation and collected errors of all manifests for a given instance. -func BuildOpAMPBridge(params manifests.Params) ([]client.Object, error) { - builders := []manifests.Builder{ - opampbridge.Build, - } - var resources []client.Object - for _, builder := range builders { - objs, err := builder(params) - if err != nil { - return nil, err - } - resources = append(resources, objs...) - } - return resources, nil -} - // reconcileDesiredObjects runs the reconcile process using the mutateFn over the given list of objects. func reconcileDesiredObjects(ctx context.Context, kubeClient client.Client, logger logr.Logger, owner metav1.Object, scheme *runtime.Scheme, desiredObjects ...client.Object) error { var errs []error diff --git a/internal/manifests/opampbridge/configmap.go b/internal/manifests/opampbridge/configmap.go deleted file mode 100644 index a61255100..000000000 --- a/internal/manifests/opampbridge/configmap.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { - name := naming.OpAMPBridgeConfigMap(params.OpAMPBridge.Name) - version := strings.Split(params.OpAMPBridge.Spec.Image, ":") - labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) - - if len(version) > 1 { - labels["app.kubernetes.io/version"] = version[len(version)-1] - } else { - labels["app.kubernetes.io/version"] = "latest" - } - - config := make(map[interface{}]interface{}) - - if len(params.OpAMPBridge.Spec.Endpoint) > 0 { - config["endpoint"] = params.OpAMPBridge.Spec.Endpoint - } - - if len(params.OpAMPBridge.Spec.Headers) > 0 { - config["headers"] = params.OpAMPBridge.Spec.Headers - } - - if params.OpAMPBridge.Spec.Capabilities != nil { - config["capabilities"] = params.OpAMPBridge.Spec.Capabilities - } - - if params.OpAMPBridge.Spec.ComponentsAllowed != nil { - config["componentsAllowed"] = params.OpAMPBridge.Spec.ComponentsAllowed - } - - configYAML, err := yaml.Marshal(config) - if err != nil { - return &corev1.ConfigMap{}, err - } - - return &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OpAMPBridge.Namespace, - Labels: labels, - Annotations: params.OpAMPBridge.Annotations, - }, - Data: map[string]string{ - "remoteconfiguration.yaml": string(configYAML), - }, - }, nil -} diff --git a/internal/manifests/opampbridge/configmap_test.go b/internal/manifests/opampbridge/configmap_test.go deleted file mode 100644 index bb312ddfa..000000000 --- a/internal/manifests/opampbridge/configmap_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "testing" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - - "github.com/stretchr/testify/assert" -) - -func TestDesiredConfigMap(t *testing.T) { - expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "0.69.0", - } - - t.Run("should return expected opamp-bridge config map", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-opamp-bridge" - expectedLables["app.kubernetes.io/name"] = "my-instance-opamp-bridge" - - expectedData := map[string]string{ - "remoteconfiguration.yaml": `capabilities: - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRemoteConfig: true - AcceptsRestartCommand: true - ReportsEffectiveConfig: true - ReportsHealth: true - ReportsOwnLogs: true - ReportsOwnMetrics: true - ReportsOwnTraces: true - ReportsRemoteConfig: true - ReportsStatus: true -componentsAllowed: - exporters: - - logging - processors: - - memory_limiter - receivers: - - otlp -endpoint: ws://opamp-server:4320/v1/opamp -headers: - authorization: access-12345-token -`} - - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/operator-opamp-bridge:0.69.0", - Endpoint: "ws://opamp-server:4320/v1/opamp", - Headers: map[string]string{"authorization": "access-12345-token"}, - Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ - v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, - v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, - v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, - }, - } - - cfg := config.New() - - params := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge, - Log: logger, - } - - actual, err := ConfigMap(params) - assert.NoError(t, err) - - assert.Equal(t, "my-instance-opamp-bridge", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - }) -} diff --git a/internal/manifests/opampbridge/container.go b/internal/manifests/opampbridge/container.go deleted file mode 100644 index 977f0a1c4..000000000 --- a/internal/manifests/opampbridge/container.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "github.com/go-logr/logr" - "github.com/operator-framework/operator-lib/proxy" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Container builds a container for the given OpAMPBridge. -func Container(cfg config.Config, logger logr.Logger, opampBridge v1alpha1.OpAMPBridge) corev1.Container { - image := opampBridge.Spec.Image - if len(image) == 0 { - image = cfg.OperatorOpAMPBridgeImage() - } - - volumeMounts := []corev1.VolumeMount{{ - Name: naming.OpAMPBridgeConfigMapVolume(), - MountPath: "/conf", - }} - - if len(opampBridge.Spec.VolumeMounts) > 0 { - volumeMounts = append(volumeMounts, opampBridge.Spec.VolumeMounts...) - } - - var envVars = opampBridge.Spec.Env - if opampBridge.Spec.Env == nil { - envVars = []corev1.EnvVar{} - } - - idx := -1 - for i := range envVars { - if envVars[i].Name == "OTELCOL_NAMESPACE" { - idx = i - } - } - if idx == -1 { - envVars = append(envVars, corev1.EnvVar{ - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", - }, - }, - }) - } - - envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) - - return corev1.Container{ - Name: naming.OpAMPBridgeContainer(), - Image: image, - ImagePullPolicy: opampBridge.Spec.ImagePullPolicy, - Env: envVars, - VolumeMounts: volumeMounts, - EnvFrom: opampBridge.Spec.EnvFrom, - Resources: opampBridge.Spec.Resources, - SecurityContext: opampBridge.Spec.SecurityContext, - } -} diff --git a/internal/manifests/opampbridge/container_test.go b/internal/manifests/opampbridge/container_test.go deleted file mode 100644 index 13985cdfc..000000000 --- a/internal/manifests/opampbridge/container_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "testing" - - "github.com/stretchr/testify/assert" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestContainerNewDefault(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{} - cfg := config.New(config.WithOperatorOpAMPBridgeImage("default-image")) - - // test - c := Container(cfg, logger, opampBridge) - - // verify - assert.Equal(t, "default-image", c.Image) -} - -func TestContainerWithImageOverridden(t *testing.T) { - // prepare - otelcol := v1alpha1.OpAMPBridge{ - Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "overridden-image", - }, - } - - cfg := config.New(config.WithOperatorOpAMPBridgeImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, "overridden-image", c.Image) -} - -func TestContainerVolumes(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{ - Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "default-image", - }, - } - cfg := config.New() - - // test - c := Container(cfg, logger, opampBridge) - - // verify - assert.Len(t, c.VolumeMounts, 1) - assert.Equal(t, naming.OpAMPBridgeConfigMapVolume(), c.VolumeMounts[0].Name) -} diff --git a/internal/manifests/opampbridge/deployment.go b/internal/manifests/opampbridge/deployment.go deleted file mode 100644 index 15bfe8903..000000000 --- a/internal/manifests/opampbridge/deployment.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Deployment builds the deployment for the given instance. -func Deployment(params manifests.Params) *appsv1.Deployment { - name := naming.OpAMPBridge(params.OpAMPBridge.Name) - labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, params.Config.LabelsFilter()) - - return &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OpAMPBridge.Namespace, - Labels: labels, - Annotations: params.OpAMPBridge.Annotations, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: params.OpAMPBridge.Spec.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: manifestutils.SelectorLabels(params.OpAMPBridge.ObjectMeta, ComponentOpAMPBridge), - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: params.OpAMPBridge.Spec.PodAnnotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(params.OpAMPBridge), - Containers: []corev1.Container{Container(params.Config, params.Log, params.OpAMPBridge)}, - Volumes: Volumes(params.Config, params.OpAMPBridge), - DNSPolicy: getDNSPolicy(params.OpAMPBridge), - HostNetwork: params.OpAMPBridge.Spec.HostNetwork, - Tolerations: params.OpAMPBridge.Spec.Tolerations, - NodeSelector: params.OpAMPBridge.Spec.NodeSelector, - SecurityContext: params.OpAMPBridge.Spec.PodSecurityContext, - PriorityClassName: params.OpAMPBridge.Spec.PriorityClassName, - Affinity: params.OpAMPBridge.Spec.Affinity, - TopologySpreadConstraints: params.OpAMPBridge.Spec.TopologySpreadConstraints, - }, - }, - }, - } -} diff --git a/internal/manifests/opampbridge/deployment_test.go b/internal/manifests/opampbridge/deployment_test.go deleted file mode 100644 index 945d8aa50..000000000 --- a/internal/manifests/opampbridge/deployment_test.go +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "testing" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -var testTolerationValues = []v1.Toleration{ - { - Key: "hii", - Value: "greeting", - Effect: "NoSchedule", - }, -} - -var testAffinityValue = &v1.Affinity{ - NodeAffinity: &v1.NodeAffinity{ - RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - { - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: "node", - Operator: v1.NodeSelectorOpIn, - Values: []string{"test-node"}, - }, - }, - }, - }, - }, - }, -} - -var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ - { - MaxSkew: 1, - TopologyKey: "kubernetes.io/hostname", - WhenUnsatisfiable: "DoNotSchedule", - LabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "foo": "bar", - }, - }, - }, -} - -func TestDeploymentNewDefault(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Tolerations: testTolerationValues, - }, - } - cfg := config.New() - - params := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge, - Log: logger, - } - - // test - d := Deployment(params) - - // verify - assert.Equal(t, "my-instance-opamp-bridge", d.Name) - assert.Equal(t, "my-instance-opamp-bridge", d.Labels["app.kubernetes.io/name"]) - assert.Equal(t, testTolerationValues, d.Spec.Template.Spec.Tolerations) - - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - - expectedLabels := map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "my-instance-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - } - assert.Equal(t, expectedLabels, d.Spec.Template.Labels) - - expectedSelectorLabels := map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "my-namespace.my-instance", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/part-of": "opentelemetry", - } - assert.Equal(t, expectedSelectorLabels, d.Spec.Selector.MatchLabels) - - // the pod selector must be contained within pod spec's labels - for k, v := range d.Spec.Selector.MatchLabels { - assert.Equal(t, v, d.Spec.Template.Labels[k]) - } -} - -func TestDeploymentPodAnnotations(t *testing.T) { - // prepare - testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - PodAnnotations: testPodAnnotationValues, - }, - } - cfg := config.New() - - params := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge, - Log: logger, - } - - // test - d := Deployment(params) - - // verify - assert.Len(t, d.Spec.Template.Annotations, 1) - assert.Equal(t, "my-instance-opamp-bridge", d.Name) - assert.Equal(t, testPodAnnotationValues, d.Spec.Template.Annotations) -} - -func TestDeploymentPodSecurityContext(t *testing.T) { - runAsNonRoot := true - runAsUser := int64(1337) - runasGroup := int64(1338) - - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - PodSecurityContext: &v1.PodSecurityContext{ - RunAsNonRoot: &runAsNonRoot, - RunAsUser: &runAsUser, - RunAsGroup: &runasGroup, - }, - }, - } - - cfg := config.New() - - params := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge, - Log: logger, - } - - d := Deployment(params) - - assert.Equal(t, &runAsNonRoot, d.Spec.Template.Spec.SecurityContext.RunAsNonRoot) - assert.Equal(t, &runAsUser, d.Spec.Template.Spec.SecurityContext.RunAsUser) - assert.Equal(t, &runasGroup, d.Spec.Template.Spec.SecurityContext.RunAsGroup) -} - -func TestDeploymentHostNetwork(t *testing.T) { - // Test default - opampBridge1 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge1, - Log: logger, - } - - d1 := Deployment(params1) - - assert.Equal(t, d1.Spec.Template.Spec.HostNetwork, false) - assert.Equal(t, d1.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirst) - - // Test hostNetwork=true - opampBridge2 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-hostnetwork", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - HostNetwork: true, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge2, - Log: logger, - } - - d2 := Deployment(params2) - assert.Equal(t, d2.Spec.Template.Spec.HostNetwork, true) - assert.Equal(t, d2.Spec.Template.Spec.DNSPolicy, v1.DNSClusterFirstWithHostNet) -} - -func TestDeploymentFilterLabels(t *testing.T) { - excludedLabels := map[string]string{ - "foo": "1", - "app.foo.bar": "1", - } - - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Labels: excludedLabels, - }, - Spec: v1alpha1.OpAMPBridgeSpec{}, - } - - cfg := config.New(config.WithLabelFilters([]string{"foo*", "app.*.bar"})) - - params := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge, - Log: logger, - } - - d := Deployment(params) - - assert.Len(t, d.ObjectMeta.Labels, 6) - for k := range excludedLabels { - assert.NotContains(t, d.ObjectMeta.Labels, k) - } -} - -func TestDeploymentNodeSelector(t *testing.T) { - // Test default - opampBridge1 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge1, - Log: logger, - } - - d1 := Deployment(params1) - - assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) - - // Test nodeSelector - opampBridge2 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-nodeselector", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - HostNetwork: true, - NodeSelector: map[string]string{ - "node-key": "node-value", - }, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge2, - Log: logger, - } - - d2 := Deployment(params2) - assert.Equal(t, d2.Spec.Template.Spec.NodeSelector, map[string]string{"node-key": "node-value"}) -} - -func TestDeploymentPriorityClassName(t *testing.T) { - opampBridge1 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge1, - Log: logger, - } - - d1 := Deployment(params1) - assert.Empty(t, d1.Spec.Template.Spec.PriorityClassName) - - priorityClassName := "test-class" - - opampBridge2 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-priortyClassName", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - PriorityClassName: priorityClassName, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge2, - Log: logger, - } - - d2 := Deployment(params2) - assert.Equal(t, priorityClassName, d2.Spec.Template.Spec.PriorityClassName) -} - -func TestDeploymentAffinity(t *testing.T) { - opampBridge1 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge1, - Log: logger, - } - - d1 := Deployment(params1) - assert.Nil(t, d1.Spec.Template.Spec.Affinity) - - opampBridge2 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-priortyClassName", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Affinity: testAffinityValue, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge2, - Log: logger, - } - - d2 := Deployment(params2) - assert.NotNil(t, d2.Spec.Template.Spec.Affinity) - assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) -} - -func TestDeploymentTopologySpreadConstraints(t *testing.T) { - // Test default - opampBridge1 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge1, - Log: logger, - } - - d1 := Deployment(params1) - assert.Equal(t, "my-instance-opamp-bridge", d1.Name) - assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) - - // Test TopologySpreadConstraints - opampBridge2 := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-topologyspreadconstraint", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - TopologySpreadConstraints: testTopologySpreadConstraintValue, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - Config: cfg, - OpAMPBridge: opampBridge2, - Log: logger, - } - - d2 := Deployment(params2) - assert.Equal(t, "my-instance-topologyspreadconstraint-opamp-bridge", d2.Name) - assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) - assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) - assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) -} diff --git a/internal/manifests/opampbridge/opampbridge.go b/internal/manifests/opampbridge/opampbridge.go deleted file mode 100644 index 47aa99cb3..000000000 --- a/internal/manifests/opampbridge/opampbridge.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -const ( - ComponentOpAMPBridge = "opentelemetry-opamp-bridge" -) - -// Build creates the manifest for the OpAMPBridge resource. -func Build(params manifests.Params) ([]client.Object, error) { - var resourceManifests []client.Object - resourceFactories := []manifests.K8sManifestFactory{ - manifests.FactoryWithoutError(Deployment), - manifests.Factory(ConfigMap), - manifests.FactoryWithoutError(ServiceAccount), - manifests.FactoryWithoutError(Service), - } - for _, factory := range resourceFactories { - res, err := factory(params) - if err != nil { - return nil, err - } else if manifests.ObjectIsNotNil(res) { - resourceManifests = append(resourceManifests, res) - } - } - return resourceManifests, nil -} diff --git a/internal/manifests/opampbridge/service.go b/internal/manifests/opampbridge/service.go deleted file mode 100644 index 53f734e4f..000000000 --- a/internal/manifests/opampbridge/service.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func Service(params manifests.Params) *corev1.Service { - name := naming.OpAMPBridgeService(params.OpAMPBridge.Name) - labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) - selector := manifestutils.SelectorLabels(params.OpAMPBridge.ObjectMeta, ComponentOpAMPBridge) - - ports := []corev1.ServicePort{{ - Name: "opamp-bridge", - Port: 80, - TargetPort: intstr.FromInt(8080), - }} - - ports = append(params.OpAMPBridge.Spec.Ports, ports...) - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OpAMPBridge.Namespace, - Labels: labels, - }, - Spec: corev1.ServiceSpec{ - Selector: selector, - Ports: ports, - }, - } -} diff --git a/internal/manifests/opampbridge/serviceaccount.go b/internal/manifests/opampbridge/serviceaccount.go deleted file mode 100644 index b929db39c..000000000 --- a/internal/manifests/opampbridge/serviceaccount.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. -func ServiceAccountName(instance v1alpha1.OpAMPBridge) string { - if len(instance.Spec.ServiceAccount) == 0 { - return naming.OpAMPBridgeServiceAccount(instance.Name) - } - return instance.Spec.ServiceAccount -} - -// ServiceAccount returns the service account for the given instance. -func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { - name := naming.OpAMPBridgeServiceAccount(params.OpAMPBridge.Name) - labels := manifestutils.Labels(params.OpAMPBridge.ObjectMeta, name, params.OpAMPBridge.Spec.Image, ComponentOpAMPBridge, []string{}) - - return &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OpAMPBridge.Namespace, - Labels: labels, - Annotations: params.OpAMPBridge.Annotations, - }, - } -} diff --git a/internal/manifests/opampbridge/serviceaccount_test.go b/internal/manifests/opampbridge/serviceaccount_test.go deleted file mode 100644 index c65bd3bbe..000000000 --- a/internal/manifests/opampbridge/serviceaccount_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -func TestServiceAccountNewDefault(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - // test - sa := ServiceAccountName(opampBridge) - - // verify - assert.Equal(t, "my-instance-opamp-bridge", sa) -} - -func TestServiceAccountOverride(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - ServiceAccount: "my-special-sa", - }, - } - - // test - sa := ServiceAccountName(opampBridge) - - // verify - assert.Equal(t, "my-special-sa", sa) -} diff --git a/internal/manifests/opampbridge/utils.go b/internal/manifests/opampbridge/utils.go deleted file mode 100644 index 799e414b7..000000000 --- a/internal/manifests/opampbridge/utils.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -func getDNSPolicy(opampBridge v1alpha1.OpAMPBridge) corev1.DNSPolicy { - dnsPolicy := corev1.DNSClusterFirst - if opampBridge.Spec.HostNetwork { - dnsPolicy = corev1.DNSClusterFirstWithHostNet - } - return dnsPolicy -} diff --git a/internal/manifests/opampbridge/volume.go b/internal/manifests/opampbridge/volume.go deleted file mode 100644 index e1e55f4f0..000000000 --- a/internal/manifests/opampbridge/volume.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Volumes builds the volumes for the given instance, including the config map volume. -func Volumes(cfg config.Config, opampBridge v1alpha1.OpAMPBridge) []corev1.Volume { - volumes := []corev1.Volume{{ - Name: naming.OpAMPBridgeConfigMapVolume(), - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: naming.OpAMPBridgeConfigMap(opampBridge.Name)}, - Items: []corev1.KeyToPath{ - { - Key: cfg.OperatorOpAMPBridgeConfigMapEntry(), - Path: cfg.OperatorOpAMPBridgeConfigMapEntry(), - }, - }, - }, - }, - }} - - return volumes -} diff --git a/internal/manifests/opampbridge/volume_test.go b/internal/manifests/opampbridge/volume_test.go deleted file mode 100644 index c3b2861e3..000000000 --- a/internal/manifests/opampbridge/volume_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func TestVolumeNewDefault(t *testing.T) { - // prepare - opampBridge := v1alpha1.OpAMPBridge{} - cfg := config.New() - - // test - volumes := Volumes(cfg, opampBridge) - - // verify - assert.Len(t, volumes, 1) - - // check if the number of elements in the volume source items list is 1 - assert.Len(t, volumes[0].VolumeSource.ConfigMap.Items, 1) - - // check that it's the opamp-bridge-internal volume, with the config map - assert.Equal(t, naming.OpAMPBridgeConfigMapVolume(), volumes[0].Name) -} diff --git a/internal/manifests/params.go b/internal/manifests/params.go index 23f1c3fb5..9656e5b1a 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -20,6 +20,6 @@ type Params struct { Scheme *runtime.Scheme Log logr.Logger OtelCol v1alpha1.AmazonCloudWatchAgent - OpAMPBridge v1alpha1.OpAMPBridge + //OpAMPBridge v1alpha1.OpAMPBridge Config config.Config } diff --git a/internal/status/opampbridge/handle.go b/internal/status/opampbridge/handle.go deleted file mode 100644 index a2dcd3968..000000000 --- a/internal/status/opampbridge/handle.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "context" - "fmt" - - "github.com/go-logr/logr" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -const ( - eventTypeNormal = "Normal" - eventTypeWarning = "Warning" - - reasonError = "Error" - reasonStatusFailure = "StatusFailure" - reasonInfo = "Info" -) - -// HandleReconcileStatus handles updating the status of the CRDs managed by the operator. -// TODO: make the status more useful https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1972 -func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { - log.V(2).Info("updating opampbridge status") - if err != nil { - params.Recorder.Event(¶ms.OpAMPBridge, eventTypeWarning, reasonError, err.Error()) - return ctrl.Result{}, err - } - changed := params.OpAMPBridge.DeepCopy() - - statusErr := UpdateOpAMPBridgeStatus(ctx, params.Client, changed) - if statusErr != nil { - params.Recorder.Event(changed, eventTypeWarning, reasonStatusFailure, statusErr.Error()) - return ctrl.Result{}, statusErr - } - statusPatch := client.MergeFrom(¶ms.OpAMPBridge) - if err := params.Client.Status().Patch(ctx, changed, statusPatch); err != nil { - return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) - } - params.Recorder.Event(changed, eventTypeNormal, reasonInfo, "applied status changes") - return ctrl.Result{}, nil -} diff --git a/internal/status/opampbridge/opampbridge.go b/internal/status/opampbridge/opampbridge.go deleted file mode 100644 index 8333130ff..000000000 --- a/internal/status/opampbridge/opampbridge.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package opampbridge - -import ( - "context" - - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" -) - -func UpdateOpAMPBridgeStatus(ctx context.Context, cli client.Client, changed *v1alpha1.OpAMPBridge) error { - if changed.Status.Version == "" { - changed.Status.Version = version.OperatorOpAMPBridge() - } - return nil -} diff --git a/main.go b/main.go index 832dd196d..289f9f605 100644 --- a/main.go +++ b/main.go @@ -203,10 +203,6 @@ func main() { }), }) - if err = otelv1alpha1.SetupOpAMPBridgeWebhook(mgr, cfg); err != nil { - setupLog.Error(err, "unable to create webhook", "webhook", "OpAMPBridge") - os.Exit(1) - } } else { ctrl.Log.Info("Webhooks are disabled, operator is running an unsupported mode", "ENABLE_WEBHOOKS", "false") } From 968ccedc02996c459bc6d46c94972eb5d79bf7b0 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 22:30:21 -0500 Subject: [PATCH 1225/1234] Change integ test to new java instrumentation path. Change naming to remove -collector suffix --- .../default_instrumentation_env_variables.json | 2 +- internal/naming/main.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integration-tests/manifests/cmd/default_instrumentation_env_variables.json b/integration-tests/manifests/cmd/default_instrumentation_env_variables.json index 6b35813a7..e11463302 100644 --- a/integration-tests/manifests/cmd/default_instrumentation_env_variables.json +++ b/integration-tests/manifests/cmd/default_instrumentation_env_variables.json @@ -5,5 +5,5 @@ "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4315", "OTEL_AWS_SMP_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4315", "OTEL_METRICS_EXPORTER": "none", - "JAVA_TOOL_OPTIONS": "-javaagent:/otel-auto-instrumentation/javaagent.jar" + "JAVA_TOOL_OPTIONS": "-javaagent:/otel-auto-instrumentation-java/javaagent.jar" } \ No newline at end of file diff --git a/internal/naming/main.go b/internal/naming/main.go index 7a0d455c2..0f52724c4 100644 --- a/internal/naming/main.go +++ b/internal/naming/main.go @@ -6,7 +6,7 @@ package naming // ConfigMap builds the name for the config map used in the AmazonCloudWatchAgent containers. func ConfigMap(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // TAConfigMap returns the name for the config map used in the TargetAllocator. @@ -56,17 +56,17 @@ func OpAMPBridgeContainer() string { // Collector builds the collector (deployment/daemonset) name based on the instance. func Collector(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // HorizontalPodAutoscaler builds the autoscaler name based on the instance. func HorizontalPodAutoscaler(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // PodDisruptionBudget builds the pdb name based on the instance. func PodDisruptionBudget(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // TAPodDisruptionBudget builds the pdb name based on the instance. @@ -106,7 +106,7 @@ func MonitoringService(otelcol string) string { // Service builds the service name based on the instance. func Service(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // Ingress builds the ingress name based on the instance. @@ -131,17 +131,17 @@ func OpAMPBridgeService(opampBridge string) string { // ServiceAccount builds the service account name based on the instance. func ServiceAccount(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // ServiceMonitor builds the service Monitor name based on the instance. func ServiceMonitor(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // PodMonitor builds the pod Monitor name based on the instance. func PodMonitor(otelcol string) string { - return DNSName(Truncate("%s-collector", 63, otelcol)) + return DNSName(Truncate("%s", 63, otelcol)) } // TargetAllocatorServiceAccount returns the TargetAllocator service account resource name. From f02187d31875585f5978aac17f08790171d96f1c Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 22:53:27 -0500 Subject: [PATCH 1226/1234] Remove unused upgrade mechanism. Comment out line causing issues with runAsNonRoot --- main.go | 47 -------------------------------------- pkg/instrumentation/sdk.go | 4 +++- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/main.go b/main.go index 289f9f605..8aaa479d6 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,6 @@ package main import ( - "context" "crypto/tls" "flag" "fmt" @@ -19,13 +18,11 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" - "k8s.io/client-go/tools/record" k8sapiflag "k8s.io/component-base/cli/flag" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "sigs.k8s.io/controller-runtime/pkg/manager" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" @@ -35,10 +32,8 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" "github.com/aws/amazon-cloudwatch-agent-operator/internal/webhook/podmutation" - collectorupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" "github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation" - instrumentationupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/upgrade" "github.com/aws/amazon-cloudwatch-agent-operator/pkg/sidecar" // +kubebuilder:scaffold:imports ) @@ -168,11 +163,6 @@ func main() { } ctx := ctrl.SetupSignalHandler() - err = addDependencies(ctx, mgr, cfg, v) - if err != nil { - setupLog.Error(err, "failed to add/run bootstrap dependencies to the controller manager") - os.Exit(1) - } if err = controllers.NewReconciler(controllers.Params{ Client: mgr.GetClient(), @@ -224,43 +214,6 @@ func main() { } } -func addDependencies(_ context.Context, mgr ctrl.Manager, cfg config.Config, v version.Version) error { - // adds the upgrade mechanism to be executed once the manager is ready - err := mgr.Add(manager.RunnableFunc(func(c context.Context) error { - up := &collectorupgrade.VersionUpgrade{ - Log: ctrl.Log.WithName("collector-upgrade"), - Version: v, - Client: mgr.GetClient(), - Recorder: record.NewFakeRecorder(collectorupgrade.RecordBufferSize), - } - return up.ManagedInstances(c) - })) - if err != nil { - return fmt.Errorf("failed to upgrade AmazonCloudWatchAgent instances: %w", err) - } - - // adds the upgrade mechanism to be executed once the manager is ready - err = mgr.Add(manager.RunnableFunc(func(c context.Context) error { - u := &instrumentationupgrade.InstrumentationUpgrade{ - Logger: ctrl.Log.WithName("instrumentation-upgrade"), - DefaultAutoInstJava: cfg.AutoInstrumentationJavaImage(), - DefaultAutoInstNodeJS: cfg.AutoInstrumentationNodeJSImage(), - DefaultAutoInstPython: cfg.AutoInstrumentationPythonImage(), - DefaultAutoInstDotNet: cfg.AutoInstrumentationDotNetImage(), - DefaultAutoInstGo: cfg.AutoInstrumentationDotNetImage(), - DefaultAutoInstApacheHttpd: cfg.AutoInstrumentationApacheHttpdImage(), - DefaultAutoInstNginx: cfg.AutoInstrumentationNginxImage(), - Client: mgr.GetClient(), - Recorder: mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator"), - } - return u.ManagedInstances(c) - })) - if err != nil { - return fmt.Errorf("failed to upgrade Instrumentation instances: %w", err) - } - return nil -} - // This function get the option from command argument (tlsConfig), check the validity through k8sapiflag // and set the config for webhook server. // refer to https://pkg.go.dev/k8s.io/component-base/cli/flag diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index c7adc677e..01b0ba368 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -61,7 +61,9 @@ func (i *sdkInjector) inject(ctx context.Context, insts languageInstrumentations } else { pod = i.injectCommonEnvVar(otelinst, pod, index) pod = i.injectCommonSDKConfig(ctx, otelinst, ns, pod, index, index) - pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, javaInitContainerName) + //disable setting security context in init container due to issue with runAsNonRoot conflict + //https://github.com/open-telemetry/opentelemetry-operator/issues/2272 + //pod = i.setInitContainerSecurityContext(pod, pod.Spec.Containers[index].SecurityContext, javaInitContainerName) } } } From 94a474351173a1925988d1fbe44fb23034c13dfa Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Tue, 9 Jan 2024 23:59:55 -0500 Subject: [PATCH 1227/1234] use cloudwatch agent config instead of collector.yaml. Run make fmt. Fix versioning with the agent --- Dockerfile | 2 +- internal/config/main.go | 2 +- internal/manifests/collector/configmap.go | 2 +- internal/manifests/collector/container.go | 2 +- internal/manifests/params.go | 12 ++++++------ main.go | 14 +++++++------- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2911f59b4..1e880e897 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ARG AGENT_VERSION ARG AUTO_INSTRUMENTATION_JAVA_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.agent=${AGENT_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${AGENT_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/internal/config/main.go b/internal/config/main.go index a16f165f4..2739e84c2 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -17,7 +17,7 @@ import ( const ( defaultAutoDetectFrequency = 5 * time.Second - defaultCollectorConfigMapEntry = "collector.yaml" + defaultCollectorConfigMapEntry = "cwagentconfig.json" defaultTargetAllocatorConfigMapEntry = "targetallocator.yaml" defaultOperatorOpAMPBridgeConfigMapEntry = "remoteconfiguration.yaml" ) diff --git a/internal/manifests/collector/configmap.go b/internal/manifests/collector/configmap.go index 57af69ad2..b3a5ebe0c 100644 --- a/internal/manifests/collector/configmap.go +++ b/internal/manifests/collector/configmap.go @@ -30,7 +30,7 @@ func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { Annotations: params.OtelCol.Annotations, }, Data: map[string]string{ - "collector.yaml": replacedConf, + "cwagentconfig.json": replacedConf, }, }, nil } diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index 138deed32..b9d97fa6a 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -65,7 +65,7 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo volumeMounts = append(volumeMounts, corev1.VolumeMount{ Name: naming.ConfigMapVolume(), - MountPath: "/conf", + MountPath: "/etc/cwagentconfig", }) } diff --git a/internal/manifests/params.go b/internal/manifests/params.go index 9656e5b1a..34d581e86 100644 --- a/internal/manifests/params.go +++ b/internal/manifests/params.go @@ -15,11 +15,11 @@ import ( // Params holds the reconciliation-specific parameters. type Params struct { - Client client.Client - Recorder record.EventRecorder - Scheme *runtime.Scheme - Log logr.Logger - OtelCol v1alpha1.AmazonCloudWatchAgent + Client client.Client + Recorder record.EventRecorder + Scheme *runtime.Scheme + Log logr.Logger + OtelCol v1alpha1.AmazonCloudWatchAgent //OpAMPBridge v1alpha1.OpAMPBridge - Config config.Config + Config config.Config } diff --git a/main.go b/main.go index 8aaa479d6..2bfc235d3 100644 --- a/main.go +++ b/main.go @@ -83,13 +83,13 @@ func main() { // add flags related to this operator var ( - metricsAddr string - probeAddr string - pprofAddr string - collectorImage string - autoInstrumentationJava string - webhookPort int - tlsOpt tlsConfig + metricsAddr string + probeAddr string + pprofAddr string + collectorImage string + autoInstrumentationJava string + webhookPort int + tlsOpt tlsConfig ) pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") From 3fd443d6d3effaa765df360bef6a5c0e45493504 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 09:52:11 -0500 Subject: [PATCH 1228/1234] Remove receiver parser except generic --- config/prometheus/kustomization.yaml | 2 - config/prometheus/monitor.yaml | 26 --- .../parser/receiver/receiver_aws-xray.go | 27 ---- .../parser/receiver/receiver_aws-xray_test.go | 6 - .../parser/receiver/receiver_carbon.go | 27 ---- .../parser/receiver/receiver_carbon_test.go | 6 - .../parser/receiver/receiver_collectd.go | 27 ---- .../parser/receiver/receiver_collectd_test.go | 6 - .../receiver/receiver_fluent-forward.go | 27 ---- .../receiver/receiver_fluent-forward_test.go | 6 - .../parser/receiver/receiver_generic_test.go | 68 -------- .../parser/receiver/receiver_influxdb.go | 27 ---- .../parser/receiver/receiver_influxdb_test.go | 6 - .../parser/receiver/receiver_jaeger.go | 127 --------------- .../parser/receiver/receiver_jaeger_test.go | 104 ------------ .../parser/receiver/receiver_loki.go | 120 -------------- .../parser/receiver/receiver_loki_test.go | 98 ----------- .../collector/parser/receiver/receiver_oc.go | 27 ---- .../parser/receiver/receiver_oc_test.go | 6 - .../parser/receiver/receiver_otlp.go | 125 -------------- .../parser/receiver/receiver_otlp_test.go | 98 ----------- .../parser/receiver/receiver_sapm.go | 27 ---- .../parser/receiver/receiver_sapm_test.go | 6 - .../parser/receiver/receiver_signalfx.go | 27 ---- .../parser/receiver/receiver_signalfx_test.go | 6 - .../parser/receiver/receiver_skywalking.go | 120 -------------- .../receiver/receiver_skywalking_test.go | 98 ----------- .../parser/receiver/receiver_splunk-hec.go | 27 ---- .../receiver/receiver_splunk-hec_test.go | 6 - .../parser/receiver/receiver_statsd.go | 29 ---- .../parser/receiver/receiver_statsd_test.go | 6 - .../parser/receiver/receiver_test.go | 153 ------------------ .../parser/receiver/receiver_wavefront.go | 27 ---- .../receiver/receiver_wavefront_test.go | 6 - .../parser/receiver/receiver_zipkin-scribe.go | 27 ---- .../receiver/receiver_zipkin-scribe_test.go | 6 - .../parser/receiver/receiver_zipkin.go | 31 ---- .../parser/receiver/receiver_zipkin_test.go | 6 - 38 files changed, 1574 deletions(-) delete mode 100644 config/prometheus/kustomization.yaml delete mode 100644 config/prometheus/monitor.yaml delete mode 100644 internal/manifests/collector/parser/receiver/receiver_aws-xray.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_carbon.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_carbon_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_collectd.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_collectd_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_fluent-forward.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_influxdb.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_influxdb_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_jaeger.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_jaeger_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_loki.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_loki_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_oc.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_oc_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_otlp.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_otlp_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_sapm.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_sapm_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_signalfx.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_signalfx_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_skywalking.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_skywalking_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_splunk-hec.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_statsd.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_statsd_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_wavefront.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_wavefront_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_zipkin.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_zipkin_test.go diff --git a/config/prometheus/kustomization.yaml b/config/prometheus/kustomization.yaml deleted file mode 100644 index ed137168a..000000000 --- a/config/prometheus/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: -- monitor.yaml diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml deleted file mode 100644 index c4f803ac8..000000000 --- a/config/prometheus/monitor.yaml +++ /dev/null @@ -1,26 +0,0 @@ - -# Prometheus Monitor Service (Metrics) -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app.kubernetes.io/name: amazon-cloudwatch-agent-operator - control-plane: controller-manager - name: controller-manager-metrics-monitor - namespace: system -spec: - endpoints: - - path: /metrics - port: https - scheme: https - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - tlsConfig: - insecureSkipVerify: false - ca: - secret: - key: ca.crt - name: amazon-cloudwatch-agent-operator-controller-manager-service-cert - selector: - matchLabels: - app.kubernetes.io/name: amazon-cloudwatch-agent-operator - control-plane: controller-manager diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray.go deleted file mode 100644 index 41c73148a..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameAWSXRAY = "__awsxray" - -// NewAWSXrayReceiverParser builds a new parser for AWS xray receivers, from the contrib repository. -func NewAWSXrayReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 2000, - parserName: parserNameAWSXRAY, - } -} - -func init() { - Register("awsxray", NewAWSXrayReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go b/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go deleted file mode 100644 index ed8c9ec7b..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_aws-xray_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the AWS XRAY parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon.go b/internal/manifests/collector/parser/receiver/receiver_carbon.go deleted file mode 100644 index e6b62da27..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_carbon.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameCarbon = "__carbon" - -// NewCarbonReceiverParser builds a new parser for Carbon receivers, from the contrib repository. -func NewCarbonReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 2003, - parserName: parserNameCarbon, - } -} - -func init() { - Register("carbon", NewCarbonReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_carbon_test.go b/internal/manifests/collector/parser/receiver/receiver_carbon_test.go deleted file mode 100644 index f2663d1a2..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_carbon_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Carbon parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd.go b/internal/manifests/collector/parser/receiver/receiver_collectd.go deleted file mode 100644 index f102fb8cd..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_collectd.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameCollectd = "__collectd" - -// NewCollectdReceiverParser builds a new parser for Collectd receivers, from the contrib repository. -func NewCollectdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8081, - parserName: parserNameCollectd, - } -} - -func init() { - Register("collectd", NewCollectdReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_collectd_test.go b/internal/manifests/collector/parser/receiver/receiver_collectd_test.go deleted file mode 100644 index 9c6000855..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_collectd_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Collectd parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go deleted file mode 100644 index ba6f4d94e..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameFluentForward = "__fluentforward" - -// NewFluentForwardReceiverParser builds a new parser for FluentForward receivers, from the contrib repository. -func NewFluentForwardReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8006, - parserName: parserNameFluentForward, - } -} - -func init() { - Register("fluentforward", NewFluentForwardReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go b/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go deleted file mode 100644 index ab4786ad1..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_fluent-forward_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the FluentForward parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go index 4d4059ee1..6d0e9520c 100644 --- a/internal/manifests/collector/parser/receiver/receiver_generic_test.go +++ b/internal/manifests/collector/parser/receiver/receiver_generic_test.go @@ -6,11 +6,9 @@ package receiver_test import ( "testing" - "github.com/go-logr/logr" "github.com/stretchr/testify/assert" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" ) @@ -46,69 +44,3 @@ func TestFailedToParseEndpoint(t *testing.T) { assert.NoError(t, err) assert.Len(t, ports, 0) } - -func TestDownstreamParsers(t *testing.T) { - for _, tt := range []struct { - builder func(logr.Logger, string, map[interface{}]interface{}) parser.ComponentPortParser - desc string - receiverName string - parserName string - defaultPort int - }{ - {receiver.NewZipkinReceiverParser, "zipkin", "zipkin", "__zipkin", 9411}, - {receiver.NewOpenCensusReceiverParser, "opencensus", "opencensus", "__opencensus", 55678}, - - // contrib receivers - {receiver.NewCarbonReceiverParser, "carbon", "carbon", "__carbon", 2003}, - {receiver.NewCollectdReceiverParser, "collectd", "collectd", "__collectd", 8081}, - {receiver.NewSAPMReceiverParser, "sapm", "sapm", "__sapm", 7276}, - {receiver.NewSignalFxReceiverParser, "signalfx", "signalfx", "__signalfx", 9943}, - {receiver.NewWavefrontReceiverParser, "wavefront", "wavefront", "__wavefront", 2003}, - {receiver.NewZipkinScribeReceiverParser, "zipkin-scribe", "zipkin-scribe", "__zipkinscribe", 9410}, - {receiver.NewFluentForwardReceiverParser, "fluentforward", "fluentforward", "__fluentforward", 8006}, - {receiver.NewStatsdReceiverParser, "statsd", "statsd", "__statsd", 8125}, - {receiver.NewInfluxdbReceiverParser, "influxdb", "influxdb", "__influxdb", 8086}, - {receiver.NewSplunkHecReceiverParser, "splunk-hec", "splunk-hec", "__splunk_hec", 8088}, - {receiver.NewAWSXrayReceiverParser, "awsxray", "awsxray", "__awsxray", 2000}, - } { - t.Run(tt.receiverName, func(t *testing.T) { - t.Run("builds successfully", func(t *testing.T) { - // test - builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{}) - - // verify - assert.Equal(t, tt.parserName, builder.ParserName()) - }) - - t.Run("assigns the expected port", func(t *testing.T) { - // prepare - builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{}) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, tt.defaultPort, ports[0].Port) - assert.Equal(t, tt.receiverName, ports[0].Name) - }) - - t.Run("allows port to be overridden", func(t *testing.T) { - // prepare - builder := tt.builder(logger, tt.receiverName, map[interface{}]interface{}{ - "endpoint": "0.0.0.0:65535", - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 65535, ports[0].Port) - assert.Equal(t, tt.receiverName, ports[0].Name) - }) - }) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb.go b/internal/manifests/collector/parser/receiver/receiver_influxdb.go deleted file mode 100644 index cb242a54e..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameInfluxdb = "__influxdb" - -// NewInfluxdbReceiverParser builds a new parser for Influxdb receivers, from the contrib repository. -func NewInfluxdbReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8086, - parserName: parserNameInfluxdb, - } -} - -func init() { - Register("influxdb", NewInfluxdbReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go b/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go deleted file mode 100644 index 49b2699b7..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_influxdb_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Influxdb parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger.go b/internal/manifests/collector/parser/receiver/receiver_jaeger.go deleted file mode 100644 index c5a7fdb14..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var _ parser.ComponentPortParser = &JaegerReceiverParser{} - -const ( - parserNameJaeger = "__jaeger" - - defaultGRPCPort int32 = 14250 - defaultThriftHTTPPort int32 = 14268 - defaultThriftCompactPort int32 = 6831 - defaultThriftBinaryPort int32 = 6832 -) - -// JaegerReceiverParser parses the configuration for Jaeger-specific receivers. -type JaegerReceiverParser struct { - config map[interface{}]interface{} - logger logr.Logger - name string -} - -// NewJaegerReceiverParser builds a new parser for Jaeger receivers. -func NewJaegerReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { - return &JaegerReceiverParser{ - logger: logger, - name: name, - config: protocols, - } - } - - return &JaegerReceiverParser{ - name: name, - config: map[interface{}]interface{}{}, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (j *JaegerReceiverParser) Ports() ([]corev1.ServicePort, error) { - ports := []corev1.ServicePort{} - - for _, protocol := range []struct { - name string - transportProtocol corev1.Protocol - appProtocol string - defaultPort int32 - }{ - { - name: "grpc", - defaultPort: defaultGRPCPort, - transportProtocol: corev1.ProtocolTCP, - appProtocol: "grpc", - }, - { - name: "thrift_http", - defaultPort: defaultThriftHTTPPort, - transportProtocol: corev1.ProtocolTCP, - appProtocol: "http", - }, - { - name: "thrift_compact", - defaultPort: defaultThriftCompactPort, - transportProtocol: corev1.ProtocolUDP, - }, - { - name: "thrift_binary", - defaultPort: defaultThriftBinaryPort, - transportProtocol: corev1.ProtocolUDP, - }, - } { - // do we have the protocol specified at all? - if receiverProtocol, ok := j.config[protocol.name]; ok { - // we have the specified protocol, we definitely need a service port - nameWithProtocol := fmt.Sprintf("%s-%s", j.name, protocol.name) - var protocolPort *corev1.ServicePort - - // do we have a configuration block for the protocol? - settings, ok := receiverProtocol.(map[interface{}]interface{}) - if ok { - protocolPort = singlePortFromConfigEndpoint(j.logger, nameWithProtocol, settings) - } - - // have we parsed a port based on the configuration block? - // if not, we use the default port - if protocolPort == nil { - protocolPort = &corev1.ServicePort{ - Name: naming.PortName(nameWithProtocol, protocol.defaultPort), - Port: protocol.defaultPort, - } - } - - // set the appropriate transport protocol (i.e. TCP/UDP) for this kind of receiver protocol - protocolPort.Protocol = protocol.transportProtocol - - if protocol.appProtocol != "" { - c := protocol.appProtocol - protocolPort.AppProtocol = &c - } - - // at this point, we *have* a port specified, add it to the list of ports - ports = append(ports, *protocolPort) - } - } - - return ports, nil -} - -// ParserName returns the name of this parser. -func (j *JaegerReceiverParser) ParserName() string { - return parserNameJaeger -} - -func init() { - Register("jaeger", NewJaegerReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go b/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go deleted file mode 100644 index 42df5777b..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_jaeger_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "testing" - - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" -) - -func TestJaegerSelfRegisters(t *testing.T) { - // verify - assert.True(t, IsRegistered("jaeger")) -} - -func TestJaegerIsFoundByName(t *testing.T) { - // test - p, err := For(logger, "jaeger", map[interface{}]interface{}{}) - assert.NoError(t, err) - - // verify - assert.Equal(t, "__jaeger", p.ParserName()) -} - -func TestJaegerMinimalConfiguration(t *testing.T) { - // prepare - builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - }, - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 14250, ports[0].Port) - assert.EqualValues(t, corev1.ProtocolTCP, ports[0].Protocol) -} - -func TestJaegerPortsOverridden(t *testing.T) { - // prepare - builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - }, - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 1234, ports[0].Port) - assert.EqualValues(t, corev1.ProtocolTCP, ports[0].Protocol) -} - -func TestJaegerExposeDefaultPorts(t *testing.T) { - // prepare - builder := NewJaegerReceiverParser(logger, "jaeger", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "thrift_http": map[interface{}]interface{}{}, - "thrift_compact": map[interface{}]interface{}{}, - "thrift_binary": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - transportProtocol corev1.Protocol - portNumber int32 - seen bool - }{ - "jaeger-grpc": {portNumber: 14250, transportProtocol: corev1.ProtocolTCP}, - "port-14268": {portNumber: 14268, transportProtocol: corev1.ProtocolTCP}, - "port-6831": {portNumber: 6831, transportProtocol: corev1.ProtocolUDP}, - "port-6832": {portNumber: 6832, transportProtocol: corev1.ProtocolUDP}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 4) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - assert.EqualValues(t, r.transportProtocol, port.Protocol) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_loki.go b/internal/manifests/collector/parser/receiver/receiver_loki.go deleted file mode 100644 index 73bb25099..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_loki.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var _ parser.ComponentPortParser = &LokiReceiverParser{} - -const ( - parserNameLoki = "__loki" - - defaultLokiGRPCPort int32 = 9095 - defaultLokiHTTPPort int32 = 3100 -) - -// LokiReceiverParser parses the configuration for Loki receivers. -type LokiReceiverParser struct { - config map[interface{}]interface{} - logger logr.Logger - name string -} - -// NewLokiReceiverParser builds a new parser for Loki receivers. -func NewLokiReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { - return &LokiReceiverParser{ - logger: logger, - name: name, - config: protocols, - } - } - - return &LokiReceiverParser{ - name: name, - config: map[interface{}]interface{}{}, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (o *LokiReceiverParser) Ports() ([]corev1.ServicePort, error) { - ports := []corev1.ServicePort{} - - for _, protocol := range []struct { - name string - defaultPorts []corev1.ServicePort - }{ - { - name: grpc, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultLokiGRPCPort), - Port: defaultLokiGRPCPort, - TargetPort: intstr.FromInt(int(defaultLokiGRPCPort)), - AppProtocol: &grpc, - }, - }, - }, - { - name: http, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultLokiHTTPPort), - Port: defaultLokiHTTPPort, - TargetPort: intstr.FromInt(int(defaultLokiHTTPPort)), - AppProtocol: &http, - }, - }, - }, - } { - // do we have the protocol specified at all? - if receiverProtocol, ok := o.config[protocol.name]; ok { - // we have the specified protocol, we definitely need a service port - nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) - var protocolPort *corev1.ServicePort - - // do we have a configuration block for the protocol? - settings, ok := receiverProtocol.(map[interface{}]interface{}) - if ok { - protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) - } - - // have we parsed a port based on the configuration block? - // if not, we use the default port - if protocolPort == nil { - ports = append(ports, protocol.defaultPorts...) - } else { - // infer protocol and appProtocol from protocol.name - if protocol.name == grpc { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &grpc - } else if protocol.name == http { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &http - } - ports = append(ports, *protocolPort) - } - } - } - - return ports, nil -} - -// ParserName returns the name of this parser. -func (o *LokiReceiverParser) ParserName() string { - return parserNameLoki -} - -func init() { - Register("loki", NewLokiReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_loki_test.go b/internal/manifests/collector/parser/receiver/receiver_loki_test.go deleted file mode 100644 index ed4187525..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_loki_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestLokiSelfRegisters(t *testing.T) { - // verify - assert.True(t, IsRegistered("loki")) -} - -func TestLokiIsFoundByName(t *testing.T) { - // test - p, err := For(logger, "loki", map[interface{}]interface{}{}) - assert.NoError(t, err) - - // verify - assert.Equal(t, "__loki", p.ParserName()) -} - -func TestLokiPortsOverridden(t *testing.T) { - // prepare - builder := NewLokiReceiverParser(logger, "loki", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - "http": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1235", - }, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "loki-grpc": {portNumber: 1234}, - "loki-http": {portNumber: 1235}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} - -func TestLokiExposeDefaultPorts(t *testing.T) { - // prepare - builder := NewLokiReceiverParser(logger, "loki", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "http": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "loki-grpc": {portNumber: 9095}, - "loki-http": {portNumber: 3100}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_oc.go b/internal/manifests/collector/parser/receiver/receiver_oc.go deleted file mode 100644 index e74609bfb..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_oc.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameOpenCensus = "__opencensus" - -// NewOpenCensusReceiverParser builds a new parser for OpenCensus receivers. -func NewOpenCensusReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 55678, - parserName: parserNameOpenCensus, - } -} - -func init() { - Register("opencensus", NewOpenCensusReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_oc_test.go b/internal/manifests/collector/parser/receiver/receiver_oc_test.go deleted file mode 100644 index beb842867..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_oc_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the OpenCensus parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp.go b/internal/manifests/collector/parser/receiver/receiver_otlp.go deleted file mode 100644 index 4560997b5..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_otlp.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var _ parser.ComponentPortParser = &OTLPReceiverParser{} - -const ( - parserNameOTLP = "__otlp" - - defaultOTLPGRPCPort int32 = 4317 - defaultOTLPHTTPPort int32 = 4318 -) - -var ( - grpc = "grpc" - http = "http" -) - -// OTLPReceiverParser parses the configuration for OTLP receivers. -type OTLPReceiverParser struct { - config map[interface{}]interface{} - logger logr.Logger - name string -} - -// NewOTLPReceiverParser builds a new parser for OTLP receivers. -func NewOTLPReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { - return &OTLPReceiverParser{ - logger: logger, - name: name, - config: protocols, - } - } - - return &OTLPReceiverParser{ - name: name, - config: map[interface{}]interface{}{}, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (o *OTLPReceiverParser) Ports() ([]corev1.ServicePort, error) { - ports := []corev1.ServicePort{} - - for _, protocol := range []struct { - name string - defaultPorts []corev1.ServicePort - }{ - { - name: grpc, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultOTLPGRPCPort), - Port: defaultOTLPGRPCPort, - TargetPort: intstr.FromInt(int(defaultOTLPGRPCPort)), - AppProtocol: &grpc, - }, - }, - }, - { - name: http, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultOTLPHTTPPort), - Port: defaultOTLPHTTPPort, - TargetPort: intstr.FromInt(int(defaultOTLPHTTPPort)), - AppProtocol: &http, - }, - }, - }, - } { - // do we have the protocol specified at all? - if receiverProtocol, ok := o.config[protocol.name]; ok { - // we have the specified protocol, we definitely need a service port - nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) - var protocolPort *corev1.ServicePort - - // do we have a configuration block for the protocol? - settings, ok := receiverProtocol.(map[interface{}]interface{}) - if ok { - protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) - } - - // have we parsed a port based on the configuration block? - // if not, we use the default port - if protocolPort == nil { - ports = append(ports, protocol.defaultPorts...) - } else { - // infer protocol and appProtocol from protocol.name - if protocol.name == grpc { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &grpc - } else if protocol.name == http { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &http - } - ports = append(ports, *protocolPort) - } - } - } - - return ports, nil -} - -// ParserName returns the name of this parser. -func (o *OTLPReceiverParser) ParserName() string { - return parserNameOTLP -} - -func init() { - Register("otlp", NewOTLPReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go b/internal/manifests/collector/parser/receiver/receiver_otlp_test.go deleted file mode 100644 index 8c2c716d9..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_otlp_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestOTLPSelfRegisters(t *testing.T) { - // verify - assert.True(t, IsRegistered("otlp")) -} - -func TestOTLPIsFoundByName(t *testing.T) { - // test - p, err := For(logger, "otlp", map[interface{}]interface{}{}) - assert.NoError(t, err) - - // verify - assert.Equal(t, "__otlp", p.ParserName()) -} - -func TestOTLPPortsOverridden(t *testing.T) { - // prepare - builder := NewOTLPReceiverParser(logger, "otlp", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - "http": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1235", - }, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "otlp-grpc": {portNumber: 1234}, - "otlp-http": {portNumber: 1235}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} - -func TestOTLPExposeDefaultPorts(t *testing.T) { - // prepare - builder := NewOTLPReceiverParser(logger, "otlp", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "http": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "otlp-grpc": {portNumber: 4317}, - "otlp-http": {portNumber: 4318}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm.go b/internal/manifests/collector/parser/receiver/receiver_sapm.go deleted file mode 100644 index 444fcb799..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_sapm.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameSAPM = "__sapm" - -// NewSAPMReceiverParser builds a new parser for SAPM receivers, from the contrib repository. -func NewSAPMReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 7276, - parserName: parserNameSAPM, - } -} - -func init() { - Register("sapm", NewSAPMReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_sapm_test.go b/internal/manifests/collector/parser/receiver/receiver_sapm_test.go deleted file mode 100644 index 38ab17351..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_sapm_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the SAPM parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx.go b/internal/manifests/collector/parser/receiver/receiver_signalfx.go deleted file mode 100644 index e4b24f35f..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameSignalFx = "__signalfx" - -// NewSignalFxReceiverParser builds a new parser for SignalFx receivers, from the contrib repository. -func NewSignalFxReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 9943, - parserName: parserNameSignalFx, - } -} - -func init() { - Register("signalfx", NewSignalFxReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go b/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go deleted file mode 100644 index 7ab97f6ed..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_signalfx_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the SignalFx parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking.go b/internal/manifests/collector/parser/receiver/receiver_skywalking.go deleted file mode 100644 index 5ba4eec61..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "fmt" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var _ parser.ComponentPortParser = &SkywalkingReceiverParser{} - -const ( - parserNameSkywalking = "__skywalking" - - defaultSkywalkingGRPCPort int32 = 11800 - defaultSkywalkingHTTPPort int32 = 12800 -) - -// SkywalkingReceiverParser parses the configuration for Skywalking receivers. -type SkywalkingReceiverParser struct { - config map[interface{}]interface{} - logger logr.Logger - name string -} - -// NewSkywalkingReceiverParser builds a new parser for Skywalking receivers. -func NewSkywalkingReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - if protocols, ok := config["protocols"].(map[interface{}]interface{}); ok { - return &SkywalkingReceiverParser{ - logger: logger, - name: name, - config: protocols, - } - } - - return &SkywalkingReceiverParser{ - name: name, - config: map[interface{}]interface{}{}, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (o *SkywalkingReceiverParser) Ports() ([]corev1.ServicePort, error) { - ports := []corev1.ServicePort{} - - for _, protocol := range []struct { - name string - defaultPorts []corev1.ServicePort - }{ - { - name: grpc, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-grpc", o.name), defaultSkywalkingGRPCPort), - Port: defaultSkywalkingGRPCPort, - TargetPort: intstr.FromInt(int(defaultSkywalkingGRPCPort)), - AppProtocol: &grpc, - }, - }, - }, - { - name: http, - defaultPorts: []corev1.ServicePort{ - { - Name: naming.PortName(fmt.Sprintf("%s-http", o.name), defaultSkywalkingHTTPPort), - Port: defaultSkywalkingHTTPPort, - TargetPort: intstr.FromInt(int(defaultSkywalkingHTTPPort)), - AppProtocol: &http, - }, - }, - }, - } { - // do we have the protocol specified at all? - if receiverProtocol, ok := o.config[protocol.name]; ok { - // we have the specified protocol, we definitely need a service port - nameWithProtocol := fmt.Sprintf("%s-%s", o.name, protocol.name) - var protocolPort *corev1.ServicePort - - // do we have a configuration block for the protocol? - settings, ok := receiverProtocol.(map[interface{}]interface{}) - if ok { - protocolPort = singlePortFromConfigEndpoint(o.logger, nameWithProtocol, settings) - } - - // have we parsed a port based on the configuration block? - // if not, we use the default port - if protocolPort == nil { - ports = append(ports, protocol.defaultPorts...) - } else { - // infer protocol and appProtocol from protocol.name - if protocol.name == grpc { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &grpc - } else if protocol.name == http { - protocolPort.Protocol = corev1.ProtocolTCP - protocolPort.AppProtocol = &http - } - ports = append(ports, *protocolPort) - } - } - } - - return ports, nil -} - -// ParserName returns the name of this parser. -func (o *SkywalkingReceiverParser) ParserName() string { - return parserNameSkywalking -} - -func init() { - Register("skywalking", NewSkywalkingReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go b/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go deleted file mode 100644 index 6398ceb09..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_skywalking_test.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestSkywalkingSelfRegisters(t *testing.T) { - // verify - assert.True(t, IsRegistered("skywalking")) -} - -func TestSkywalkingIsFoundByName(t *testing.T) { - // test - p, err := For(logger, "skywalking", map[interface{}]interface{}{}) - assert.NoError(t, err) - - // verify - assert.Equal(t, "__skywalking", p.ParserName()) -} - -func TestSkywalkingPortsOverridden(t *testing.T) { - // prepare - builder := NewSkywalkingReceiverParser(logger, "skywalking", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }, - "http": map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1235", - }, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "skywalking-grpc": {portNumber: 1234}, - "skywalking-http": {portNumber: 1235}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} - -func TestSkywalkingExposeDefaultPorts(t *testing.T) { - // prepare - builder := NewSkywalkingReceiverParser(logger, "skywalking", map[interface{}]interface{}{ - "protocols": map[interface{}]interface{}{ - "grpc": map[interface{}]interface{}{}, - "http": map[interface{}]interface{}{}, - }, - }) - - expectedResults := map[string]struct { - portNumber int32 - seen bool - }{ - "skywalking-grpc": {portNumber: 11800}, - "skywalking-http": {portNumber: 12800}, - } - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, len(expectedResults)) - - for _, port := range ports { - r := expectedResults[port.Name] - r.seen = true - expectedResults[port.Name] = r - assert.EqualValues(t, r.portNumber, port.Port) - } - for k, v := range expectedResults { - assert.True(t, v.seen, "the port %s wasn't included in the service ports", k) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go deleted file mode 100644 index d72458269..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameSplunkHec = "__splunk_hec" - -// NewSplunkHecReceiverParser builds a new parser for Splunk Hec receivers, from the contrib repository. -func NewSplunkHecReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8088, - parserName: parserNameSplunkHec, - } -} - -func init() { - Register("splunk_hec", NewSplunkHecReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go b/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go deleted file mode 100644 index 5e267595c..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_splunk-hec_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Splunk Hec parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd.go b/internal/manifests/collector/parser/receiver/receiver_statsd.go deleted file mode 100644 index 49d6eb0dd..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_statsd.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameStatsd = "__statsd" - -// NewStatsdReceiverParser builds a new parser for Statsd receivers, from the contrib repository. -func NewStatsdReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 8125, - defaultProtocol: corev1.ProtocolUDP, - parserName: parserNameStatsd, - } -} - -func init() { - Register("statsd", NewStatsdReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_statsd_test.go b/internal/manifests/collector/parser/receiver/receiver_statsd_test.go deleted file mode 100644 index 027d05317..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_statsd_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Statsd parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_test.go b/internal/manifests/collector/parser/receiver/receiver_test.go deleted file mode 100644 index 96e23cbc6..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "testing" - - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestReceiverPortNames(t *testing.T) { - for _, tt := range []struct { - desc string - candidate string - expected string - port int - }{ - {"regular case", "my-receiver", "my-receiver", 123}, - {"name too long", "long-name-long-name-long-name-long-name-long-name-long-name-long-name-long-name", "port-123", 123}, - {"name with invalid chars", "my-🦄-receiver", "port-123", 123}, - {"name starting with invalid char", "-my-receiver", "port-123", 123}, - } { - t.Run(tt.desc, func(t *testing.T) { - assert.Equal(t, tt.expected, naming.PortName(tt.candidate, int32(tt.port))) - }) - } -} - -func TestReceiverType(t *testing.T) { - for _, tt := range []struct { - desc string - name string - expected string - }{ - {"regular case", "myreceiver", "myreceiver"}, - {"named instance", "myreceiver/custom", "myreceiver"}, - } { - t.Run(tt.desc, func(t *testing.T) { - // test and verify - assert.Equal(t, tt.expected, receiverType(tt.name)) - }) - } -} - -func TestReceiverParsePortFromEndpoint(t *testing.T) { - for _, tt := range []struct { - desc string - endpoint string - expected int - errorExpected bool - }{ - {"regular case", "http://localhost:1234", 1234, false}, - {"absolute with path", "http://localhost:1234/server-status?auto", 1234, false}, - {"no protocol", "0.0.0.0:1234", 1234, false}, - {"just port", ":1234", 1234, false}, - {"no port at all", "http://localhost", 0, true}, - } { - t.Run(tt.desc, func(t *testing.T) { - // test - val, err := portFromEndpoint(tt.endpoint) - if tt.errorExpected { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - assert.EqualValues(t, tt.expected, val, "wrong port from endpoint %s: %d", tt.endpoint, val) - }) - } -} - -func TestReceiverFailsWhenPortIsntString(t *testing.T) { - // prepare - config := map[interface{}]interface{}{ - "endpoint": 123, - } - - // test - p := singlePortFromConfigEndpoint(logger, "myreceiver", config) - - // verify - assert.Nil(t, p) -} - -func TestIgnorekubeletstatsEndpoint(t *testing.T) { - // ignore "kubeletstats" receiver endpoint field, this is special case - // as this receiver gets parsed by generic receiver parser - builder := NewGenericReceiverParser(logger, "kubeletstats", map[interface{}]interface{}{ - "endpoint": "0.0.0.0:9000", - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 0) -} - -func TestReceiverFallbackWhenNotRegistered(t *testing.T) { - // test - p, err := For(logger, "myreceiver", map[interface{}]interface{}{}) - assert.NoError(t, err) - - // test - assert.Equal(t, "__generic", p.ParserName()) -} - -func TestReceiverShouldFindRegisteredParser(t *testing.T) { - // prepare - builderCalled := false - Register("mock", func(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - builderCalled = true - return &mockParser{} - }) - - // test - _, _ = For(logger, "mock", map[interface{}]interface{}{}) - - // verify - assert.True(t, builderCalled) -} - -type mockParser struct { -} - -func (m *mockParser) Ports() ([]corev1.ServicePort, error) { - return nil, nil -} - -func (m *mockParser) ParserName() string { - return "__mock" -} - -func TestSkipPortsForScrapers(t *testing.T) { - for receiver := range scraperReceivers { - builder := NewGenericReceiverParser(logger, receiver, map[interface{}]interface{}{ - "endpoint": "0.0.0.0:42069", - }) - ports, err := builder.Ports() - assert.NoError(t, err) - assert.Len(t, ports, 0) - } -} diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront.go b/internal/manifests/collector/parser/receiver/receiver_wavefront.go deleted file mode 100644 index f631f0efe..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameWavefront = "__wavefront" - -// NewWavefrontReceiverParser builds a new parser for Wavefront receivers, from the contrib repository. -func NewWavefrontReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 2003, - parserName: parserNameWavefront, - } -} - -func init() { - Register("wavefront", NewWavefrontReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go b/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go deleted file mode 100644 index 83fa1fd71..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_wavefront_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Wavefront parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go deleted file mode 100644 index 9c9302f06..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameZipkinScribe = "__zipkinscribe" - -// NewZipkinScribeReceiverParser builds a new parser for ZipkinScribe receivers. -func NewZipkinScribeReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 9410, - parserName: parserNameZipkinScribe, - } -} - -func init() { - Register("zipkin-scribe", NewZipkinScribeReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go deleted file mode 100644 index 938b5a7ba..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin-scribe_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the ZipkinScribe parser are currently part of the test TestDownstreamParsers diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin.go b/internal/manifests/collector/parser/receiver/receiver_zipkin.go deleted file mode 100644 index b4e8b849f..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" -) - -const parserNameZipkin = "__zipkin" - -// NewZipkinReceiverParser builds a new parser for Zipkin receivers. -func NewZipkinReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - http := "http" - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - defaultPort: 9411, - defaultProtocol: corev1.ProtocolTCP, - defaultAppProtocol: &http, - parserName: parserNameZipkin, - } -} - -func init() { - Register("zipkin", NewZipkinReceiverParser) -} diff --git a/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go b/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go deleted file mode 100644 index eae341bc2..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_zipkin_test.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -// all tests for the Zipkin parser are currently part of the test TestDownstreamParsers From 9439dbfef462e4b05d1e29c5d2122c0f9c192878 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 09:52:29 -0500 Subject: [PATCH 1229/1234] Fix typos --- config/manager/kustomization.yaml | 2 +- config/webhook/manifests.yaml | 2 +- main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index f7f01ece9..d9f4b4b6e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: 355660395157.dkr.ecr.us-east-1.amazonaws.com/amazon-cloudwatch-agent-operator + newName: aws/amazon-cloudwatch-agent-operator newTag: latest diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 7fde915d1..3a262c971 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -15,7 +15,7 @@ webhooks: name: mamazoncloudwatchagent.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.co + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: diff --git a/main.go b/main.go index 2bfc235d3..b3ff59509 100644 --- a/main.go +++ b/main.go @@ -95,7 +95,7 @@ func main() { pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.StringVar(&pprofAddr, "pprof-addr", "", "The address to expose the pprof server. Default is empty string which disables the pprof server.") - stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default CloudWatch Agent image. This image is used when no image is specified in the CustomResource.") stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("%s:%s", autoInstrumentationJavaImageRepository, v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() From 20030cfae641bfa08af6fa20e8ce75529b7a8eb5 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 09:53:02 -0500 Subject: [PATCH 1230/1234] Revert to using cloudwatch agent parsing for config ports --- apis/v1alpha1/zz_generated.deepcopy.go | 4 +- apis/v1alpha2/zz_generated.deepcopy.go | 5 +- .../collector/adapters/config_from.go | 13 +++- internal/manifests/collector/container.go | 66 +++++++------------ 4 files changed, 41 insertions(+), 47 deletions(-) diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 7b3d4613e..b62396b2e 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -8,8 +8,8 @@ package v1alpha1 import ( - "k8s.io/api/autoscaling/v2" - "k8s.io/api/core/v1" + v2 "k8s.io/api/autoscaling/v2" + v1 "k8s.io/api/core/v1" networkingv1 "k8s.io/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index bcd16d3d5..bc0faeac6 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -8,9 +8,10 @@ package v1alpha2 import ( - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" + + "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/internal/manifests/collector/adapters/config_from.go b/internal/manifests/collector/adapters/config_from.go index 110ebf3c1..219d0ee13 100644 --- a/internal/manifests/collector/adapters/config_from.go +++ b/internal/manifests/collector/adapters/config_from.go @@ -5,6 +5,7 @@ package adapters import ( + "encoding/json" "errors" "gopkg.in/yaml.v2" @@ -12,7 +13,8 @@ import ( var ( // ErrInvalidYAML represents an error in the format of the configuration file. - ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration") + ErrInvalidYAML = errors.New("couldn't parse the yaml configuration") + ErrInvalidJSON = errors.New("couldn't parse cloudwatch agent json configuration") ) // ConfigFromString extracts a configuration map from the given string. @@ -25,3 +27,12 @@ func ConfigFromString(configStr string) (map[interface{}]interface{}, error) { return config, nil } + +func ConfigFromJSONString(configStr string) (map[string]interface{}, error) { + config := make(map[string]interface{}) + if err := json.Unmarshal([]byte(configStr), &config); err != nil { + return nil, ErrInvalidJSON + } + + return config, nil +} diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index b9d97fa6a..c8b049782 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -32,9 +32,13 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo image = cfg.CollectorImage() } - // Use defined cloudwatch agent ports - ports := map[string]corev1.ContainerPort{} - for _, p := range constants.CloudwatchAgentPorts { + // build container ports from service ports + ports, err := getConfigContainerPorts(logger, otelcol.Spec.Config) + if err != nil { + logger.Error(err, "container ports config") + } + + for _, p := range otelcol.Spec.Ports { ports[p.Name] = corev1.ContainerPort{ Name: p.Name, ContainerPort: p.Port, @@ -150,46 +154,24 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo func getConfigContainerPorts(logger logr.Logger, cfg string) (map[string]corev1.ContainerPort, error) { ports := map[string]corev1.ContainerPort{} - c, err := adapters.ConfigFromString(cfg) - if err != nil { - logger.Error(err, "couldn't extract the configuration") - return ports, err - } - ps, err := adapters.ConfigToPorts(logger, c) - if err != nil { - return ports, err - } - if len(ps) > 0 { - for _, p := range ps { - truncName := naming.Truncate(p.Name, maxPortLen) - if p.Name != truncName { - logger.Info("truncating container port name", - "port.name.prev", p.Name, "port.name.new", truncName) - } - nameErrs := validation.IsValidPortName(truncName) - numErrs := validation.IsValidPortNum(int(p.Port)) - if len(nameErrs) > 0 || len(numErrs) > 0 { - logger.Info("dropping invalid container port", "port.name", truncName, "port.num", p.Port, - "port.name.errs", nameErrs, "num.errs", numErrs) - continue - } - ports[truncName] = corev1.ContainerPort{ - Name: truncName, - ContainerPort: p.Port, - Protocol: p.Protocol, - } + for _, p := range constants.CloudwatchAgentPorts { + truncName := naming.Truncate(p.Name, maxPortLen) + if p.Name != truncName { + logger.Info("truncating container port name", + "port.name.prev", p.Name, "port.name.new", truncName) + } + nameErrs := validation.IsValidPortName(truncName) + numErrs := validation.IsValidPortNum(int(p.Port)) + if len(nameErrs) > 0 || len(numErrs) > 0 { + logger.Info("dropping invalid container port", "port.name", truncName, "port.num", p.Port, + "port.name.errs", nameErrs, "num.errs", numErrs) + continue + } + ports[truncName] = corev1.ContainerPort{ + Name: truncName, + ContainerPort: p.Port, + Protocol: p.Protocol, } - } - - metricsPort, err := adapters.ConfigToMetricsPort(logger, c) - if err != nil { - logger.Info("couldn't determine metrics port from configuration, using 8888 default value", "error", err) - metricsPort = 8888 - } - ports["metrics"] = corev1.ContainerPort{ - Name: "metrics", - ContainerPort: metricsPort, - Protocol: corev1.ProtocolTCP, } return ports, nil From fffb9f9a85f02ad33ae5c8f675f92959b3516139 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 14:16:08 -0500 Subject: [PATCH 1231/1234] Resolve typos --- config/rbac/role.yaml | 2 +- config/webhook/manifests.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 25ce5e378..40ad3dfda 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -68,7 +68,7 @@ rules: - update - watch - apiGroups: - - cloudwatch.aws.amazon.co + - cloudwatch.aws.amazon.com resources: - instrumentations verbs: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 3a262c971..ce347fbcf 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -81,7 +81,7 @@ webhooks: name: vamazoncloudwatchagentcreateupdate.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.co + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: @@ -101,7 +101,7 @@ webhooks: name: vamazoncloudwatchagentdelete.kb.io rules: - apiGroups: - - cloudwatch.aws.amazon.co + - cloudwatch.aws.amazon.com apiVersions: - v1alpha1 operations: From 214c0b6c03b5da37dfb225aba2fac5fa3618be99 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 17:08:17 -0500 Subject: [PATCH 1232/1234] Remove TargetAllocator, AutoDetect, config parser, unused tests, upgrade logic. Renamed to amazoncloudwatchagent --- apis/v1alpha1/allocation_strategy.go | 18 - ...ypes.go => amazoncloudwatchagent_types.go} | 95 - apis/v1alpha1/collector_webhook.go | 42 - apis/v1alpha1/collector_webhook_test.go | 127 -- apis/v1alpha1/zz_generated.deepcopy.go | 156 +- ...ypes.go => amazoncloudwatchagent_types.go} | 3 - apis/v1alpha2/zz_generated.deepcopy.go | 1 - ...go => amazoncloudwatchagent_controller.go} | 7 - controllers/builder_test.go | 1884 ----------------- controllers/common.go | 2 - controllers/reconcile_test.go | 788 ------- controllers/suite_test.go | 464 ---- internal/autodetect/main.go | 55 - internal/autodetect/main_test.go | 62 - internal/autodetect/openshift/routes.go | 19 - internal/config/main.go | 67 +- internal/config/main_test.go | 40 - internal/config/options.go | 39 - .../collector/adapters/config_to_ports.go | 107 - .../manifests/collector/config_replace.go | 64 - .../collector/config_replace_test.go | 192 -- internal/manifests/collector/container.go | 54 - internal/manifests/collector/ingress.go | 16 +- .../collector/parser/exporter/exporter.go | 117 - .../parser/exporter/exporter_prometheus.go | 66 - internal/manifests/collector/parser/parser.go | 20 - .../collector/parser/receiver/receiver.go | 187 -- .../parser/receiver/receiver_generic.go | 66 - .../parser/receiver/receiver_generic_test.go | 46 - internal/manifests/collector/podmonitor.go | 21 +- internal/manifests/collector/route.go | 3 +- .../manifests/collector/servicemonitor.go | 27 +- .../collector/servicemonitor_test.go | 39 - .../config_expected_targetallocator.yaml | 22 - .../http_sd_config_servicemonitor_test.yaml | 25 - ..._sd_config_servicemonitor_test_ta_set.yaml | 31 - .../testdata/http_sd_config_ta_test.yaml | 25 - .../testdata/http_sd_config_test.yaml | 36 - .../collector/testdata/ingress_testdata.yaml | 19 - .../testdata/prometheus-exporter.yaml | 19 - ...elabel_config_expected_with_sd_config.yaml | 57 - .../testdata/relabel_config_original.yaml | 51 - .../manifests/collector/testdata/route_crd.go | 63 - .../manifests/collector/testdata/sm_crd.go | 41 - .../manifests/collector/testdata/test.yaml | 22 - .../adapters/config_to_prom_config.go | 320 --- .../adapters/config_to_prom_config_test.go | 439 ---- .../manifests/targetallocator/annotations.go | 43 - .../targetallocator/annotations_test.go | 52 - .../manifests/targetallocator/configmap.go | 84 - .../targetallocator/configmap_test.go | 149 -- .../manifests/targetallocator/container.go | 91 - .../targetallocator/container_test.go | 359 ---- .../manifests/targetallocator/deployment.go | 56 - .../targetallocator/deployment_test.go | 364 ---- internal/manifests/targetallocator/labels.go | 24 - .../manifests/targetallocator/labels_test.go | 76 - .../targetallocator/poddisruptionbudget.go | 54 - .../poddisruptionbudget_test.go | 141 -- internal/manifests/targetallocator/service.go | 36 - .../manifests/targetallocator/service_test.go | 34 - .../targetallocator/serviceaccount.go | 42 - .../targetallocator/serviceaccount_test.go | 92 - .../targetallocator/servicemonitor.go | 40 - .../targetallocator/servicemonitor_test.go | 44 - .../targetallocator/targetallocator.go | 44 - .../targetallocator/testdata/test.yaml | 22 - internal/manifests/targetallocator/volume.go | 31 - .../manifests/targetallocator/volume_test.go | 32 - internal/status/collector/handle.go | 19 +- internal/version/main.go | 32 +- internal/version/main_test.go | 15 - pkg/collector/upgrade/noop.go | 15 - pkg/collector/upgrade/suite_test.go | 146 -- .../upgrade/testdata/v0_61_0-invalid.yaml | 8 - .../upgrade/testdata/v0_61_0-valid.yaml | 5 - pkg/collector/upgrade/upgrade.go | 142 -- pkg/collector/upgrade/upgrade_test.go | 165 -- pkg/collector/upgrade/v0_15_0.go | 20 - pkg/collector/upgrade/v0_15_0_test.go | 59 - pkg/collector/upgrade/v0_19_0.go | 117 - pkg/collector/upgrade/v0_19_0_test.go | 148 -- pkg/collector/upgrade/v0_24_0.go | 66 - pkg/collector/upgrade/v0_24_0_test.go | 59 - pkg/collector/upgrade/v0_2_10.go | 14 - pkg/collector/upgrade/v0_31_0.go | 65 - pkg/collector/upgrade/v0_31_0_test.go | 77 - pkg/collector/upgrade/v0_36_0.go | 120 -- pkg/collector/upgrade/v0_36_0_test.go | 114 - pkg/collector/upgrade/v0_38_0.go | 92 - pkg/collector/upgrade/v0_38_0_test.go | 141 -- pkg/collector/upgrade/v0_39_0.go | 114 - pkg/collector/upgrade/v0_39_0_test.go | 146 -- pkg/collector/upgrade/v0_41_0.go | 50 - pkg/collector/upgrade/v0_41_0_test.go | 122 -- pkg/collector/upgrade/v0_43_0.go | 83 - pkg/collector/upgrade/v0_43_0_test.go | 134 -- pkg/collector/upgrade/v0_56_0.go | 69 - pkg/collector/upgrade/v0_56_0_test.go | 48 - pkg/collector/upgrade/v0_57_2.go | 58 - pkg/collector/upgrade/v0_57_2_test.go | 86 - pkg/collector/upgrade/v0_61_0.go | 58 - pkg/collector/upgrade/v0_61_0_test.go | 75 - pkg/collector/upgrade/v0_9_0.go | 62 - pkg/collector/upgrade/v0_9_0_test.go | 60 - pkg/collector/upgrade/versions.go | 81 - 106 files changed, 40 insertions(+), 10819 deletions(-) delete mode 100644 apis/v1alpha1/allocation_strategy.go rename apis/v1alpha1/{opentelemetrycollector_types.go => amazoncloudwatchagent_types.go} (81%) rename apis/v1alpha2/{opentelemetrycollector_types.go => amazoncloudwatchagent_types.go} (98%) rename controllers/{opentelemetrycollector_controller.go => amazoncloudwatchagent_controller.go} (94%) delete mode 100644 controllers/builder_test.go delete mode 100644 controllers/reconcile_test.go delete mode 100644 controllers/suite_test.go delete mode 100644 internal/autodetect/main.go delete mode 100644 internal/autodetect/main_test.go delete mode 100644 internal/autodetect/openshift/routes.go delete mode 100644 internal/manifests/collector/config_replace_test.go delete mode 100644 internal/manifests/collector/parser/exporter/exporter.go delete mode 100644 internal/manifests/collector/parser/exporter/exporter_prometheus.go delete mode 100644 internal/manifests/collector/parser/parser.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_generic.go delete mode 100644 internal/manifests/collector/parser/receiver/receiver_generic_test.go delete mode 100644 internal/manifests/collector/servicemonitor_test.go delete mode 100644 internal/manifests/collector/testdata/config_expected_targetallocator.yaml delete mode 100644 internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml delete mode 100644 internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml delete mode 100644 internal/manifests/collector/testdata/http_sd_config_ta_test.yaml delete mode 100644 internal/manifests/collector/testdata/http_sd_config_test.yaml delete mode 100644 internal/manifests/collector/testdata/ingress_testdata.yaml delete mode 100644 internal/manifests/collector/testdata/prometheus-exporter.yaml delete mode 100644 internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml delete mode 100644 internal/manifests/collector/testdata/relabel_config_original.yaml delete mode 100644 internal/manifests/collector/testdata/route_crd.go delete mode 100644 internal/manifests/collector/testdata/sm_crd.go delete mode 100644 internal/manifests/collector/testdata/test.yaml delete mode 100644 internal/manifests/targetallocator/adapters/config_to_prom_config.go delete mode 100644 internal/manifests/targetallocator/adapters/config_to_prom_config_test.go delete mode 100644 internal/manifests/targetallocator/annotations.go delete mode 100644 internal/manifests/targetallocator/annotations_test.go delete mode 100644 internal/manifests/targetallocator/configmap.go delete mode 100644 internal/manifests/targetallocator/configmap_test.go delete mode 100644 internal/manifests/targetallocator/container.go delete mode 100644 internal/manifests/targetallocator/container_test.go delete mode 100644 internal/manifests/targetallocator/deployment.go delete mode 100644 internal/manifests/targetallocator/deployment_test.go delete mode 100644 internal/manifests/targetallocator/labels.go delete mode 100644 internal/manifests/targetallocator/labels_test.go delete mode 100644 internal/manifests/targetallocator/poddisruptionbudget.go delete mode 100644 internal/manifests/targetallocator/poddisruptionbudget_test.go delete mode 100644 internal/manifests/targetallocator/service.go delete mode 100644 internal/manifests/targetallocator/service_test.go delete mode 100644 internal/manifests/targetallocator/serviceaccount.go delete mode 100644 internal/manifests/targetallocator/serviceaccount_test.go delete mode 100644 internal/manifests/targetallocator/servicemonitor.go delete mode 100644 internal/manifests/targetallocator/servicemonitor_test.go delete mode 100644 internal/manifests/targetallocator/targetallocator.go delete mode 100644 internal/manifests/targetallocator/testdata/test.yaml delete mode 100644 internal/manifests/targetallocator/volume.go delete mode 100644 internal/manifests/targetallocator/volume_test.go delete mode 100644 pkg/collector/upgrade/noop.go delete mode 100644 pkg/collector/upgrade/suite_test.go delete mode 100644 pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml delete mode 100644 pkg/collector/upgrade/testdata/v0_61_0-valid.yaml delete mode 100644 pkg/collector/upgrade/upgrade.go delete mode 100644 pkg/collector/upgrade/upgrade_test.go delete mode 100644 pkg/collector/upgrade/v0_15_0.go delete mode 100644 pkg/collector/upgrade/v0_15_0_test.go delete mode 100644 pkg/collector/upgrade/v0_19_0.go delete mode 100644 pkg/collector/upgrade/v0_19_0_test.go delete mode 100644 pkg/collector/upgrade/v0_24_0.go delete mode 100644 pkg/collector/upgrade/v0_24_0_test.go delete mode 100644 pkg/collector/upgrade/v0_2_10.go delete mode 100644 pkg/collector/upgrade/v0_31_0.go delete mode 100644 pkg/collector/upgrade/v0_31_0_test.go delete mode 100644 pkg/collector/upgrade/v0_36_0.go delete mode 100644 pkg/collector/upgrade/v0_36_0_test.go delete mode 100644 pkg/collector/upgrade/v0_38_0.go delete mode 100644 pkg/collector/upgrade/v0_38_0_test.go delete mode 100644 pkg/collector/upgrade/v0_39_0.go delete mode 100644 pkg/collector/upgrade/v0_39_0_test.go delete mode 100644 pkg/collector/upgrade/v0_41_0.go delete mode 100644 pkg/collector/upgrade/v0_41_0_test.go delete mode 100644 pkg/collector/upgrade/v0_43_0.go delete mode 100644 pkg/collector/upgrade/v0_43_0_test.go delete mode 100644 pkg/collector/upgrade/v0_56_0.go delete mode 100644 pkg/collector/upgrade/v0_56_0_test.go delete mode 100644 pkg/collector/upgrade/v0_57_2.go delete mode 100644 pkg/collector/upgrade/v0_57_2_test.go delete mode 100644 pkg/collector/upgrade/v0_61_0.go delete mode 100644 pkg/collector/upgrade/v0_61_0_test.go delete mode 100644 pkg/collector/upgrade/v0_9_0.go delete mode 100644 pkg/collector/upgrade/v0_9_0_test.go delete mode 100644 pkg/collector/upgrade/versions.go diff --git a/apis/v1alpha1/allocation_strategy.go b/apis/v1alpha1/allocation_strategy.go deleted file mode 100644 index 36fa771de..000000000 --- a/apis/v1alpha1/allocation_strategy.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -type ( - // OpenTelemetryTargetAllocatorAllocationStrategy represent which strategy to distribute target to each collector - // +kubebuilder:validation:Enum=least-weighted;consistent-hashing - OpenTelemetryTargetAllocatorAllocationStrategy string -) - -const ( - // OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted targets will be distributed to collector with fewer targets currently assigned. - OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted OpenTelemetryTargetAllocatorAllocationStrategy = "least-weighted" - - // OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing targets will be consistently added to collectors, which allows a high-availability setup. - OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing OpenTelemetryTargetAllocatorAllocationStrategy = "consistent-hashing" -) diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/amazoncloudwatchagent_types.go similarity index 81% rename from apis/v1alpha1/opentelemetrycollector_types.go rename to apis/v1alpha1/amazoncloudwatchagent_types.go index e1a249922..e517ad48a 100644 --- a/apis/v1alpha1/opentelemetrycollector_types.go +++ b/apis/v1alpha1/amazoncloudwatchagent_types.go @@ -143,9 +143,6 @@ type AmazonCloudWatchAgentSpec struct { // Collector and Target Allocator pods. // +optional PodAnnotations map[string]string `json:"podAnnotations,omitempty"` - // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. - // +optional - TargetAllocator OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"` // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional Mode Mode `json:"mode,omitempty"` @@ -272,98 +269,6 @@ type AmazonCloudWatchAgentSpec struct { UpdateStrategy appsv1.DaemonSetUpdateStrategy `json:"updateStrategy,omitempty"` } -// OpenTelemetryTargetAllocator defines the configurations for the Prometheus target allocator. -type OpenTelemetryTargetAllocator struct { - // Replicas is the number of pod instances for the underlying TargetAllocator. This should only be set to a value - // other than 1 if a strategy that allows for high availability is chosen. Currently, the only allocation strategy - // that can be run in a high availability mode is consistent-hashing. - // +optional - Replicas *int32 `json:"replicas,omitempty"` - // NodeSelector to schedule OpenTelemetry TargetAllocator pods. - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // Resources to set on the OpenTelemetryTargetAllocator containers. - // +optional - Resources v1.ResourceRequirements `json:"resources,omitempty"` - // AllocationStrategy determines which strategy the target allocator should use for allocation. - // The current options are least-weighted and consistent-hashing. The default option is least-weighted - // +optional - AllocationStrategy OpenTelemetryTargetAllocatorAllocationStrategy `json:"allocationStrategy,omitempty"` - // FilterStrategy determines how to filter targets before allocating them among the collectors. - // The only current option is relabel-config (drops targets based on prom relabel_config). - // Filtering is disabled by default. - // +optional - FilterStrategy string `json:"filterStrategy,omitempty"` - // ServiceAccount indicates the name of an existing service account to use with this instance. When set, - // the operator will not automatically create a ServiceAccount for the TargetAllocator. - // +optional - ServiceAccount string `json:"serviceAccount,omitempty"` - // Image indicates the container image to use for the OpenTelemetry TargetAllocator. - // +optional - Image string `json:"image,omitempty"` - // Enabled indicates whether to use a target allocation mechanism for Prometheus targets or not. - // +optional - Enabled bool `json:"enabled,omitempty"` - // If specified, indicates the pod's scheduling constraints - // +optional - Affinity *v1.Affinity `json:"affinity,omitempty"` - // PrometheusCR defines the configuration for the retrieval of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 and podmonitor.monitoring.coreos.com/v1 ) retrieval. - // All CR instances which the ServiceAccount has access to will be retrieved. This includes other namespaces. - // +optional - PrometheusCR OpenTelemetryTargetAllocatorPrometheusCR `json:"prometheusCR,omitempty"` - // SecurityContext configures the container security context for - // the targetallocator. - // +optional - SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` - // TopologySpreadConstraints embedded kubernetes pod configuration option, - // controls how pods are spread across your cluster among failure-domains - // such as regions, zones, nodes, and other user-defined topology domains - // https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // Toleration embedded kubernetes pod configuration option, - // controls how pods can be scheduled with matching taints - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // ENV vars to set on the OpenTelemetry TargetAllocator's Pods. These can then in certain cases be - // consumed in the config file for the TargetAllocator. - // +optional - Env []v1.EnvVar `json:"env,omitempty"` - // ObservabilitySpec defines how telemetry data gets handled. - // - // +optional - // +kubebuilder:validation:Optional - // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Observability" - Observability ObservabilitySpec `json:"observability,omitempty"` - // PodDisruptionBudget specifies the pod disruption budget configuration to use - // for the target allocator workload. - // - // +optional - PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` -} - -type OpenTelemetryTargetAllocatorPrometheusCR struct { - // Enabled indicates whether to use a PrometheusOperator custom resources as targets or not. - // +optional - Enabled bool `json:"enabled,omitempty"` - // Interval between consecutive scrapes. Equivalent to the same setting on the Prometheus CRD. - // - // Default: "30s" - // +kubebuilder:default:="30s" - // +kubebuilder:validation:Format:=duration - ScrapeInterval *metav1.Duration `json:"scrapeInterval,omitempty"` - // PodMonitors to be selected for target discovery. - // This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a - // PodMonitor's meta labels. The requirements are ANDed. - // +optional - PodMonitorSelector map[string]string `json:"podMonitorSelector,omitempty"` - // ServiceMonitors to be selected for target discovery. - // This is a map of {key,value} pairs. Each {key,value} in the map is going to exactly match a label in a - // ServiceMonitor's meta labels. The requirements are ANDed. - // +optional - ServiceMonitorSelector map[string]string `json:"serviceMonitorSelector,omitempty"` -} - // ScaleSubresourceStatus defines the observed state of the AmazonCloudWatchAgent's // scale subresource. type ScaleSubresourceStatus struct { diff --git a/apis/v1alpha1/collector_webhook.go b/apis/v1alpha1/collector_webhook.go index 71590ec09..2b287aa7d 100644 --- a/apis/v1alpha1/collector_webhook.go +++ b/apis/v1alpha1/collector_webhook.go @@ -16,8 +16,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook/admission" "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) var ( @@ -89,9 +87,6 @@ func (c CollectorWebhook) defaulter(r *AmazonCloudWatchAgent) error { if r.Spec.Replicas == nil { r.Spec.Replicas = &one } - if r.Spec.TargetAllocator.Enabled && r.Spec.TargetAllocator.Replicas == nil { - r.Spec.TargetAllocator.Replicas = &one - } if r.Spec.MaxReplicas != nil || (r.Spec.Autoscaler != nil && r.Spec.Autoscaler.MaxReplicas != nil) { if r.Spec.Autoscaler == nil { @@ -128,22 +123,6 @@ func (c CollectorWebhook) defaulter(r *AmazonCloudWatchAgent) error { } } - // if pdb isn't provided for target allocator and it's enabled - // using a valid strategy (consistent-hashing), - // we set MaxUnavailable 1, which will work even if there is - // just one replica, not blocking node drains but preventing - // out-of-the-box from disruption generated by them with replicas > 1 - if r.Spec.TargetAllocator.Enabled && - r.Spec.TargetAllocator.AllocationStrategy == OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing && - r.Spec.TargetAllocator.PodDisruptionBudget == nil { - r.Spec.TargetAllocator.PodDisruptionBudget = &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - } - } - if r.Spec.Ingress.Type == IngressTypeRoute && r.Spec.Ingress.Route.Termination == "" { r.Spec.Ingress.Route.Termination = TLSRouteTerminationTypeEdge } @@ -184,27 +163,6 @@ func (c CollectorWebhook) validate(r *AmazonCloudWatchAgent) (admission.Warnings return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the attribute 'AdditionalContainers'", r.Spec.Mode) } - // validate target allocation - if r.Spec.TargetAllocator.Enabled && r.Spec.Mode != ModeStatefulSet { - return warnings, fmt.Errorf("the OpenTelemetry Collector mode is set to %s, which does not support the target allocation deployment", r.Spec.Mode) - } - - // validate Prometheus config for target allocation - if r.Spec.TargetAllocator.Enabled { - promCfg, err := ta.ConfigToPromConfig(r.Spec.Config) - if err != nil { - return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) - } - err = ta.ValidatePromConfig(promCfg, r.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled()) - if err != nil { - return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) - } - err = ta.ValidateTargetAllocatorConfig(r.Spec.TargetAllocator.PrometheusCR.Enabled, promCfg) - if err != nil { - return warnings, fmt.Errorf("the OpenTelemetry Spec Prometheus configuration is incorrect, %w", err) - } - } - // validator port config for _, p := range r.Spec.Ports { nameErrs := validation.IsValidPortName(p.Name) diff --git a/apis/v1alpha1/collector_webhook_test.go b/apis/v1alpha1/collector_webhook_test.go index c63859f94..8cab62d4b 100644 --- a/apis/v1alpha1/collector_webhook_test.go +++ b/apis/v1alpha1/collector_webhook_test.go @@ -263,133 +263,6 @@ func TestOTELColDefaultingWebhook(t *testing.T) { }, }, }, - { - name: "Defined PDB for target allocator", - otelcol: AmazonCloudWatchAgent{ - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MinAvailable: &intstr.IntOrString{ - Type: intstr.String, - StrVal: "10%", - }, - }, - }, - }, - }, - expected: AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - Replicas: &one, - UpgradeStrategy: UpgradeStrategyAutomatic, - ManagementState: ManagementStateManaged, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &one, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MinAvailable: &intstr.IntOrString{ - Type: intstr.String, - StrVal: "10%", - }, - }, - }, - }, - }, - }, - { - name: "Undefined PDB for target allocator and consistent-hashing strategy", - otelcol: AmazonCloudWatchAgent{ - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &one, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, - }, - }, - }, - expected: AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - Replicas: &one, - UpgradeStrategy: UpgradeStrategyAutomatic, - ManagementState: ManagementStateManaged, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &one, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - }, - }, - }, - }, - { - name: "Undefined PDB for target allocator and not consistent-hashing strategy", - otelcol: AmazonCloudWatchAgent{ - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, - }, - }, - }, - expected: AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: AmazonCloudWatchAgentSpec{ - Mode: ModeDeployment, - Replicas: &one, - UpgradeStrategy: UpgradeStrategyAutomatic, - ManagementState: ManagementStateManaged, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - TargetAllocator: OpenTelemetryTargetAllocator{ - Enabled: true, - Replicas: &one, - AllocationStrategy: OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, - }, - }, - }, - }, } for _, test := range tests { diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index b62396b2e..f5324a637 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -9,9 +9,8 @@ package v1alpha1 import ( v2 "k8s.io/api/autoscaling/v2" - v1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/intstr" ) @@ -120,12 +119,12 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext - *out = new(v1.SecurityContext) + *out = new(corev1.SecurityContext) (*in).DeepCopyInto(*out) } if in.PodSecurityContext != nil { in, out := &in.PodSecurityContext, &out.PodSecurityContext - *out = new(v1.PodSecurityContext) + *out = new(corev1.PodSecurityContext) (*in).DeepCopyInto(*out) } if in.PodAnnotations != nil { @@ -135,52 +134,51 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec (*out)[key] = val } } - in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]v1.VolumeMount, len(*in)) + *out = make([]corev1.VolumeMount, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Ports != nil { in, out := &in.Ports, &out.Ports - *out = make([]v1.ServicePort, len(*in)) + *out = make([]corev1.ServicePort, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.EnvFrom != nil { in, out := &in.EnvFrom, &out.EnvFrom - *out = make([]v1.EnvFromSource, len(*in)) + *out = make([]corev1.EnvFromSource, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]v1.PersistentVolumeClaim, len(*in)) + *out = make([]corev1.PersistentVolumeClaim, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) + *out = make([]corev1.Toleration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Volumes != nil { in, out := &in.Volumes, &out.Volumes - *out = make([]v1.Volume, len(*in)) + *out = make([]corev1.Volume, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -188,12 +186,12 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec in.Ingress.DeepCopyInto(&out.Ingress) if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) + *out = new(corev1.Affinity) (*in).DeepCopyInto(*out) } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle - *out = new(v1.Lifecycle) + *out = new(corev1.Lifecycle) (*in).DeepCopyInto(*out) } if in.TerminationGracePeriodSeconds != nil { @@ -208,14 +206,14 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec } if in.InitContainers != nil { in, out := &in.InitContainers, &out.InitContainers - *out = make([]v1.Container, len(*in)) + *out = make([]corev1.Container, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AdditionalContainers != nil { in, out := &in.AdditionalContainers, &out.AdditionalContainers - *out = make([]v1.Container, len(*in)) + *out = make([]corev1.Container, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -223,7 +221,7 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec out.Observability = in.Observability if in.TopologySpreadConstraints != nil { in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) + *out = make([]corev1.TopologySpreadConstraint, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -277,14 +275,14 @@ func (in *ApacheHttpd) DeepCopyInto(out *ApacheHttpd) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Attrs != nil { in, out := &in.Attrs, &out.Attrs - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -374,7 +372,7 @@ func (in *DotNet) DeepCopyInto(out *DotNet) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -417,7 +415,7 @@ func (in *Go) DeepCopyInto(out *Go) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -447,7 +445,7 @@ func (in *Ingress) DeepCopyInto(out *Ingress) { } if in.TLS != nil { in, out := &in.TLS, &out.TLS - *out = make([]networkingv1.IngressTLS, len(*in)) + *out = make([]v1.IngressTLS, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -542,7 +540,7 @@ func (in *InstrumentationSpec) DeepCopyInto(out *InstrumentationSpec) { out.Sampler = in.Sampler if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -591,7 +589,7 @@ func (in *Java) DeepCopyInto(out *Java) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -654,14 +652,14 @@ func (in *Nginx) DeepCopyInto(out *Nginx) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Attrs != nil { in, out := &in.Attrs, &out.Attrs - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -689,7 +687,7 @@ func (in *NodeJS) DeepCopyInto(out *NodeJS) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -738,106 +736,6 @@ func (in *OpenShiftRoute) DeepCopy() *OpenShiftRoute { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryTargetAllocator) DeepCopyInto(out *OpenTelemetryTargetAllocator) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.Resources.DeepCopyInto(&out.Resources) - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(v1.Affinity) - (*in).DeepCopyInto(*out) - } - in.PrometheusCR.DeepCopyInto(&out.PrometheusCR) - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(v1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Observability = in.Observability - if in.PodDisruptionBudget != nil { - in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget - *out = new(PodDisruptionBudgetSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocator. -func (in *OpenTelemetryTargetAllocator) DeepCopy() *OpenTelemetryTargetAllocator { - if in == nil { - return nil - } - out := new(OpenTelemetryTargetAllocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopyInto(out *OpenTelemetryTargetAllocatorPrometheusCR) { - *out = *in - if in.ScrapeInterval != nil { - in, out := &in.ScrapeInterval, &out.ScrapeInterval - *out = new(metav1.Duration) - **out = **in - } - if in.PodMonitorSelector != nil { - in, out := &in.PodMonitorSelector, &out.PodMonitorSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ServiceMonitorSelector != nil { - in, out := &in.ServiceMonitorSelector, &out.ServiceMonitorSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTargetAllocatorPrometheusCR. -func (in *OpenTelemetryTargetAllocatorPrometheusCR) DeepCopy() *OpenTelemetryTargetAllocatorPrometheusCR { - if in == nil { - return nil - } - out := new(OpenTelemetryTargetAllocatorPrometheusCR) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { *out = *in @@ -918,7 +816,7 @@ func (in *Python) DeepCopyInto(out *Python) { } if in.Env != nil { in, out := &in.Env, &out.Env - *out = make([]v1.EnvVar, len(*in)) + *out = make([]corev1.EnvVar, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/apis/v1alpha2/opentelemetrycollector_types.go b/apis/v1alpha2/amazoncloudwatchagent_types.go similarity index 98% rename from apis/v1alpha2/opentelemetrycollector_types.go rename to apis/v1alpha2/amazoncloudwatchagent_types.go index 31c710878..ff5e5a9d5 100644 --- a/apis/v1alpha2/opentelemetrycollector_types.go +++ b/apis/v1alpha2/amazoncloudwatchagent_types.go @@ -68,9 +68,6 @@ type AmazonCloudWatchAgentSpec struct { // Collector and Target Allocator pods. // +optional PodAnnotations map[string]string `json:"podAnnotations,omitempty"` - // TargetAllocator indicates a value which determines whether to spawn a target allocation resource or not. - // +optional - TargetAllocator v1alpha1.OpenTelemetryTargetAllocator `json:"targetAllocator,omitempty"` // Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) // +optional Mode v1alpha1.Mode `json:"mode,omitempty"` diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index bc0faeac6..8ab5ffec1 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -123,7 +123,6 @@ func (in *AmazonCloudWatchAgentSpec) DeepCopyInto(out *AmazonCloudWatchAgentSpec (*out)[key] = val } } - in.TargetAllocator.DeepCopyInto(&out.TargetAllocator) if in.VolumeMounts != nil { in, out := &in.VolumeMounts, &out.VolumeMounts *out = make([]v1.VolumeMount, len(*in)) diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/amazoncloudwatchagent_controller.go similarity index 94% rename from controllers/opentelemetrycollector_controller.go rename to controllers/amazoncloudwatchagent_controller.go index 678f246f4..d39d778d0 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/amazoncloudwatchagent_controller.go @@ -8,7 +8,6 @@ import ( "context" "github.com/go-logr/logr" - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" appsv1 "k8s.io/api/apps/v1" autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" @@ -23,7 +22,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" collectorStatus "github.com/aws/amazon-cloudwatch-agent-operator/internal/status/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) // AmazonCloudWatchAgentReconciler reconciles a AmazonCloudWatchAgent object. @@ -129,10 +127,5 @@ func (r *AmazonCloudWatchAgentReconciler) SetupWithManager(mgr ctrl.Manager) err Owns(&autoscalingv2.HorizontalPodAutoscaler{}). Owns(&policyV1.PodDisruptionBudget{}) - if featuregate.PrometheusOperatorIsAvailable.IsEnabled() { - builder.Owns(&monitoringv1.ServiceMonitor{}) - builder.Owns(&monitoringv1.PodMonitor{}) - } - return builder.Complete(r) } diff --git a/controllers/builder_test.go b/controllers/builder_test.go deleted file mode 100644 index 46118574d..000000000 --- a/controllers/builder_test.go +++ /dev/null @@ -1,1884 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers - -import ( - "strings" - "testing" - - "github.com/go-logr/logr" - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - "github.com/stretchr/testify/require" - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - "sigs.k8s.io/controller-runtime/pkg/client" - - colfeaturegate "go.opentelemetry.io/collector/featuregate" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" -) - -var ( - selectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - } - basePolicy = corev1.ServiceInternalTrafficPolicyCluster - pathTypePrefix = networkingv1.PathTypePrefix -) - -var ( - prometheusFeatureGate = featuregate.PrometheusOperatorIsAvailable.ID() -) - -var ( - opampbridgeSelectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - } -) - -var ( - taSelectorLabels = map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/name": "test-targetallocator", - } -) - -func TestBuildCollector(t *testing.T) { - var goodConfig = `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" -exporters: - logging: -service: - pipelines: - metrics: - receivers: [examplereceiver] - exporters: [logging] -` - one := int32(1) - type args struct { - instance v1alpha1.AmazonCloudWatchAgent - } - tests := []struct { - name string - args args - want []client.Object - wantErr bool - }{ - { - name: "base case", - args: args{ - instance: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - Mode: "deployment", - Image: "test", - Config: goodConfig, - }, - }, - }, - want: []client.Object{ - &appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: selectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "otc-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-collector", - }, - Items: []corev1.KeyToPath{ - { - Key: "collector.yaml", - Path: "collector.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "otc-container", - Image: "test", - Args: []string{ - "--config=/conf/collector.yaml", - }, - Ports: []corev1.ContainerPort{ - { - Name: "examplereceiver", - HostPort: 0, - ContainerPort: 12345, - }, - { - Name: "metrics", - HostPort: 0, - ContainerPort: 8888, - Protocol: "TCP", - }, - }, - Env: []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "otc-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "test-collector", - }, - }, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-headless", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - "operator.opentelemetry.io/collector-headless-service": "Exists", - }, - Annotations: map[string]string{ - "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", - }, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - ClusterIP: "None", - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-monitoring", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector-monitoring", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "monitoring", - Port: 8888, - }, - }, - Selector: selectorLabels, - }, - }, - }, - wantErr: false, - }, - { - name: "ingress", - args: args{ - instance: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - Mode: "deployment", - Image: "test", - Ingress: v1alpha1.Ingress{ - Type: v1alpha1.IngressTypeNginx, - Hostname: "example.com", - Annotations: map[string]string{ - "something": "true", - }, - }, - Config: goodConfig, - }, - }, - }, - want: []client.Object{ - &appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: selectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "otc-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-collector", - }, - Items: []corev1.KeyToPath{ - { - Key: "collector.yaml", - Path: "collector.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "otc-container", - Image: "test", - Args: []string{ - "--config=/conf/collector.yaml", - }, - Ports: []corev1.ContainerPort{ - { - Name: "examplereceiver", - HostPort: 0, - ContainerPort: 12345, - }, - { - Name: "metrics", - HostPort: 0, - ContainerPort: 8888, - Protocol: "TCP", - }, - }, - Env: []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "otc-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "test-collector", - }, - }, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-headless", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - "operator.opentelemetry.io/collector-headless-service": "Exists", - }, - Annotations: map[string]string{ - "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", - }, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - ClusterIP: "None", - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-monitoring", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector-monitoring", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "monitoring", - Port: 8888, - }, - }, - Selector: selectorLabels, - }, - }, - &networkingv1.Ingress{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-ingress", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-ingress", - }, - Annotations: map[string]string{ - "something": "true", - }, - }, - Spec: networkingv1.IngressSpec{ - Rules: []networkingv1.IngressRule{ - { - Host: "example.com", - IngressRuleValue: networkingv1.IngressRuleValue{ - HTTP: &networkingv1.HTTPIngressRuleValue{ - Paths: []networkingv1.HTTPIngressPath{ - { - Path: "/examplereceiver", - PathType: &pathTypePrefix, - Backend: networkingv1.IngressBackend{ - Service: &networkingv1.IngressServiceBackend{ - Name: "test-collector", - Port: networkingv1.ServiceBackendPort{ - Name: "examplereceiver", - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - wantErr: false, - }, - { - name: "specified service account case", - args: args{ - instance: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - Mode: "deployment", - Image: "test", - Config: goodConfig, - ServiceAccount: "my-special-sa", - }, - }, - }, - want: []client.Object{ - &appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: selectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "8188c85abd4aa5e9c798874b4f47d37f08d4778933154e3f7d60246510ed9dd2", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "otc-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-collector", - }, - Items: []corev1.KeyToPath{ - { - Key: "collector.yaml", - Path: "collector.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "otc-container", - Image: "test", - Args: []string{ - "--config=/conf/collector.yaml", - }, - Ports: []corev1.ContainerPort{ - { - Name: "examplereceiver", - HostPort: 0, - ContainerPort: 12345, - }, - { - Name: "metrics", - HostPort: 0, - ContainerPort: 8888, - Protocol: "TCP", - }, - }, - Env: []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "otc-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "my-special-sa", - }, - }, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "collector.yaml": "receivers:\n examplereceiver:\n endpoint: \"0.0.0.0:12345\"\nexporters:\n logging:\nservice:\n pipelines:\n metrics:\n receivers: [examplereceiver]\n exporters: [logging]\n", - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-headless", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - "operator.opentelemetry.io/collector-headless-service": "Exists", - }, - Annotations: map[string]string{ - "service.beta.openshift.io/serving-cert-secret-name": "test-collector-headless-tls", - }, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "examplereceiver", - Port: 12345, - }, - }, - Selector: selectorLabels, - InternalTrafficPolicy: &basePolicy, - ClusterIP: "None", - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-monitoring", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector-monitoring", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "monitoring", - Port: 8888, - }, - }, - Selector: selectorLabels, - }, - }, - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := config.New( - config.WithCollectorImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - ) - params := manifests.Params{ - Log: logr.Discard(), - Config: cfg, - OtelCol: tt.args.instance, - } - got, err := BuildCollector(params) - if (err != nil) != tt.wantErr { - t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) - return - } - require.Equal(t, tt.want, got) - - }) - } -} - -func TestBuildAll_OpAMPBridge(t *testing.T) { - one := int32(1) - type args struct { - instance v1alpha1.OpAMPBridge - } - tests := []struct { - name string - args args - want []client.Object - wantErr bool - }{ - { - - name: "base case", - args: args{ - instance: v1alpha1.OpAMPBridge{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Replicas: &one, - Image: "test", - Endpoint: "ws://opamp-server:4320/v1/opamp", - Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ - v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, - v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, - v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, - }, - }, - }, - want: []client.Object{ - &appsv1.Deployment{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-opamp-bridge", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: opampbridgeSelectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "opamp-bridge-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-opamp-bridge", - }, - Items: []corev1.KeyToPath{ - { - Key: "remoteconfiguration.yaml", - Path: "remoteconfiguration.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "opamp-bridge-container", - Image: "test", - Env: []corev1.EnvVar{ - { - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", - }, - }, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "opamp-bridge-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "test-opamp-bridge", - }, - }, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-opamp-bridge", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "remoteconfiguration.yaml": `capabilities: - AcceptsOpAMPConnectionSettings: true - AcceptsOtherConnectionSettings: true - AcceptsRemoteConfig: true - AcceptsRestartCommand: true - ReportsEffectiveConfig: true - ReportsHealth: true - ReportsOwnLogs: true - ReportsOwnMetrics: true - ReportsOwnTraces: true - ReportsRemoteConfig: true - ReportsStatus: true -componentsAllowed: - exporters: - - logging - processors: - - memory_limiter - receivers: - - otlp -endpoint: ws://opamp-server:4320/v1/opamp -`}, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-opamp-bridge", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-opamp-bridge", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-opamp-bridge", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-opamp-bridge", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "opamp-bridge", - Port: 80, - TargetPort: intstr.FromInt(8080), - }, - }, - Selector: opampbridgeSelectorLabels, - }, - }, - }, - wantErr: false, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := config.New( - config.WithOperatorOpAMPBridgeImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), - ) - reconciler := NewOpAMPBridgeReconciler(OpAMPBridgeReconcilerParams{ - Log: logr.Discard(), - Config: cfg, - }) - params := reconciler.getParams(tt.args.instance) - got, err := BuildOpAMPBridge(params) - if (err != nil) != tt.wantErr { - t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) - return - } - require.Equal(t, tt.want, got) - }) - } -} - -func TestBuildTargetAllocator(t *testing.T) { - var goodConfig = ` -receivers: - prometheus: - config: - scrape_configs: - - job_name: 'example' - relabel_configs: - - source_labels: ['__meta_service_id'] - target_label: 'job' - replacement: 'my_service_$$1' - - source_labels: ['__meta_service_name'] - target_label: 'instance' - replacement: '$1' - metric_relabel_configs: - - source_labels: ['job'] - target_label: 'job' - replacement: '$$1_$2' -exporters: - logging: -service: - pipelines: - metrics: - receivers: [prometheus] - exporters: [logging] -` - one := int32(1) - type args struct { - instance v1alpha1.AmazonCloudWatchAgent - } - tests := []struct { - name string - args args - want []client.Object - featuregates []string - wantErr bool - }{ - { - name: "base case", - args: args{ - instance: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - Mode: "statefulset", - Image: "test", - Config: goodConfig, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - PrometheusCR: v1alpha1.OpenTelemetryTargetAllocatorPrometheusCR{ - Enabled: true, - }, - }, - }, - }, - }, - want: []client.Object{ - &appsv1.StatefulSet{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: appsv1.StatefulSetSpec{ - ServiceName: "test-collector", - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: selectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "otc-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-collector", - }, - Items: []corev1.KeyToPath{ - { - Key: "collector.yaml", - Path: "collector.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "otc-container", - Image: "test", - Args: []string{ - "--config=/conf/collector.yaml", - }, - Env: []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - { - Name: "SHARD", - Value: "0", - }, - }, - Ports: []corev1.ContainerPort{ - { - Name: "metrics", - HostPort: 0, - ContainerPort: 8888, - Protocol: "TCP", - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "otc-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "test-collector", - }, - }, - PodManagementPolicy: "Parallel", - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "collector.yaml": "exporters:\n logging: null\nreceivers:\n prometheus:\n config: {}\n target_allocator:\n collector_id: ${POD_NAME}\n endpoint: http://test-targetallocator:80\n interval: 30s\nservice:\n pipelines:\n metrics:\n exporters:\n - logging\n receivers:\n - prometheus\n", - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-monitoring", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector-monitoring", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "monitoring", - Port: 8888, - }, - }, - Selector: selectorLabels, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator\n app.kubernetes.io/part-of: opentelemetry\n", - }, - }, - &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: appsv1.DeploymentSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: taSelectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "ta-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-targetallocator", - }, - Items: []corev1.KeyToPath{ - { - Key: "targetallocator.yaml", - Path: "targetallocator.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "ta-container", - Image: "default-ta-allocator", - Env: []corev1.EnvVar{ - { - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", - }, - }, - }, - }, - Args: []string{ - "--enable-prometheus-cr-watcher", - }, - Ports: []corev1.ContainerPort{ - { - Name: "http", - HostPort: 0, - ContainerPort: 8080, - Protocol: "TCP", - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "ta-internal", - MountPath: "/conf", - }, - }, - LivenessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - }, - ReadinessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - }, - }, - }, - DNSPolicy: "", - ServiceAccountName: "test-targetallocator", - }, - }, - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "targetallocation", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: 1, - StrVal: "http", - }, - }, - }, - Selector: taSelectorLabels, - }, - }, - }, - wantErr: false, - }, - { - name: "enable metrics case", - args: args{ - instance: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "test", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - Mode: "statefulset", - Image: "test", - Config: goodConfig, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - PrometheusCR: v1alpha1.OpenTelemetryTargetAllocatorPrometheusCR{ - Enabled: true, - }, - Observability: v1alpha1.ObservabilitySpec{ - Metrics: v1alpha1.MetricsConfigSpec{ - EnableMetrics: true, - }, - }, - }, - }, - }, - }, - want: []client.Object{ - &appsv1.StatefulSet{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: appsv1.StatefulSetSpec{ - ServiceName: "test-collector", - Replicas: &one, - Selector: &metav1.LabelSelector{ - MatchLabels: selectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "amazon-cloudwatch-agent-operator-config/sha256": "5fe4d7d7faf3247bd7ec88688c9f73618f9ab8e170362bd7203c54e7a2f5cec0", - "prometheus.io/path": "/metrics", - "prometheus.io/port": "8888", - "prometheus.io/scrape": "true", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "otc-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-collector", - }, - Items: []corev1.KeyToPath{ - { - Key: "collector.yaml", - Path: "collector.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "otc-container", - Image: "test", - Args: []string{ - "--config=/conf/collector.yaml", - }, - Env: []corev1.EnvVar{ - { - Name: "POD_NAME", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.name", - }, - }, - }, - { - Name: "SHARD", - Value: "0", - }, - }, - Ports: []corev1.ContainerPort{ - { - Name: "metrics", - HostPort: 0, - ContainerPort: 8888, - Protocol: "TCP", - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "otc-internal", - MountPath: "/conf", - }, - }, - }, - }, - DNSPolicy: "ClusterFirst", - ServiceAccountName: "test-collector", - }, - }, - PodManagementPolicy: "Parallel", - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "collector.yaml": "exporters:\n logging: null\nreceivers:\n prometheus:\n config: {}\n target_allocator:\n collector_id: ${POD_NAME}\n endpoint: http://test-targetallocator:80\n interval: 30s\nservice:\n pipelines:\n metrics:\n exporters:\n - logging\n receivers:\n - prometheus\n", - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-collector-monitoring", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-collector-monitoring", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "monitoring", - Port: 8888, - }, - }, - Selector: selectorLabels, - }, - }, - &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Data: map[string]string{ - "targetallocator.yaml": "allocation_strategy: least-weighted\nconfig:\n scrape_configs:\n - job_name: example\n metric_relabel_configs:\n - replacement: $1_$2\n source_labels:\n - job\n target_label: job\n relabel_configs:\n - replacement: my_service_$1\n source_labels:\n - __meta_service_id\n target_label: job\n - replacement: $1\n source_labels:\n - __meta_service_name\n target_label: instance\nlabel_selector:\n app.kubernetes.io/component: opentelemetry-collector\n app.kubernetes.io/instance: test.test\n app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator\n app.kubernetes.io/part-of: opentelemetry\n", - }, - }, - &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: appsv1.DeploymentSpec{ - Selector: &metav1.LabelSelector{ - MatchLabels: taSelectorLabels, - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: map[string]string{ - "opentelemetry-targetallocator-config/hash": "4d1911fd40106e9e2dd3d928f067a6c8c9eab0c569f737ba3701c6f5a9aad6d7", - }, - }, - Spec: corev1.PodSpec{ - Volumes: []corev1.Volume{ - { - Name: "ta-internal", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: "test-targetallocator", - }, - Items: []corev1.KeyToPath{ - { - Key: "targetallocator.yaml", - Path: "targetallocator.yaml", - }, - }, - }, - }, - }, - }, - Containers: []corev1.Container{ - { - Name: "ta-container", - Image: "default-ta-allocator", - Env: []corev1.EnvVar{ - { - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", - }, - }, - }, - }, - Args: []string{ - "--enable-prometheus-cr-watcher", - }, - Ports: []corev1.ContainerPort{ - { - Name: "http", - HostPort: 0, - ContainerPort: 8080, - Protocol: "TCP", - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "ta-internal", - MountPath: "/conf", - }, - }, - LivenessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - }, - ReadinessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - }, - }, - }, - DNSPolicy: "", - ServiceAccountName: "test-targetallocator", - }, - }, - }, - }, - &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - }, - }, - &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: corev1.ServiceSpec{ - Ports: []corev1.ServicePort{ - { - Name: "targetallocation", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: 1, - StrVal: "http", - }, - }, - }, - Selector: taSelectorLabels, - }, - }, - &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-targetallocator", - Namespace: "test", - Labels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "latest", - }, - Annotations: nil, - }, - Spec: monitoringv1.ServiceMonitorSpec{ - Endpoints: []monitoringv1.Endpoint{ - monitoringv1.Endpoint{Port: "targetallocation"}, - }, - Selector: v1.LabelSelector{ - MatchLabels: map[string]string{ - "app.kubernetes.io/component": "opentelemetry-targetallocator", - "app.kubernetes.io/instance": "test.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/name": "test-targetallocator", - "app.kubernetes.io/part-of": "opentelemetry", - }, - }, - NamespaceSelector: monitoringv1.NamespaceSelector{ - MatchNames: []string{"test"}, - }, - }, - }, - }, - wantErr: false, - featuregates: []string{prometheusFeatureGate}, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - cfg := config.New( - config.WithCollectorImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - ) - params := manifests.Params{ - Log: logr.Discard(), - Config: cfg, - OtelCol: tt.args.instance, - } - if len(tt.featuregates) > 0 { - fg := strings.Join(tt.featuregates, ",") - flagset := featuregate.Flags(colfeaturegate.GlobalRegistry()) - if err := flagset.Set(featuregate.FeatureGatesFlag, fg); err != nil { - t.Errorf("featuregate setting error = %v", err) - return - } - } - got, err := BuildCollector(params) - if (err != nil) != tt.wantErr { - t.Errorf("BuildAll() error = %v, wantErr %v", err, tt.wantErr) - return - } - require.Equal(t, tt.want, got) - - }) - } -} diff --git a/controllers/common.go b/controllers/common.go index efe1ba104..5e4f875d1 100644 --- a/controllers/common.go +++ b/controllers/common.go @@ -19,7 +19,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator" ) func isNamespaceScoped(obj client.Object) bool { @@ -35,7 +34,6 @@ func isNamespaceScoped(obj client.Object) bool { func BuildCollector(params manifests.Params) ([]client.Object, error) { builders := []manifests.Builder{ collector.Build, - targetallocator.Build, } var resources []client.Object for _, builder := range builders { diff --git a/controllers/reconcile_test.go b/controllers/reconcile_test.go deleted file mode 100644 index 75d92702b..000000000 --- a/controllers/reconcile_test.go +++ /dev/null @@ -1,788 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers_test - -import ( - "context" - "testing" - "time" - - routev1 "github.com/openshift/api/route/v1" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "gopkg.in/yaml.v2" - appsv1 "k8s.io/api/apps/v1" - autoscalingv2 "k8s.io/api/autoscaling/v2" - v1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - policyV1 "k8s.io/api/policy/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/tools/record" - controllerruntime "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - k8sconfig "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/manager" - k8sreconcile "sigs.k8s.io/controller-runtime/pkg/reconcile" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/controllers" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -const ( - baseTaImage = "something:tag" - updatedTaImage = "another:tag" - expectHostname = "something-else.com" - labelName = "something" - labelVal = "great" - annotationName = "io.opentelemetry/test" - annotationVal = "true" -) - -var ( - extraPorts = v1.ServicePort{ - Name: "port-web", - Protocol: "TCP", - Port: 8080, - TargetPort: intstr.FromInt32(8080), - } -) - -type check func(t *testing.T, params manifests.Params) - -func newParamsAssertNoErr(t *testing.T, taContainerImage string, file string) manifests.Params { - p, err := newParams(taContainerImage, file) - assert.NoError(t, err) - if len(taContainerImage) == 0 { - p.OtelCol.Spec.TargetAllocator.Enabled = false - } - return p -} - -func TestAmazonCloudWatchAgentReconciler_Reconcile(t *testing.T) { - addedMetadataDeployment := paramsWithMode(v1alpha1.ModeDeployment) - addedMetadataDeployment.OtelCol.Labels = map[string]string{ - labelName: labelVal, - } - addedMetadataDeployment.OtelCol.Annotations = map[string]string{ - annotationName: annotationVal, - } - deploymentExtraPorts := paramsWithModeAndReplicas(v1alpha1.ModeDeployment, 3) - deploymentExtraPorts.OtelCol.Spec.Ports = append(deploymentExtraPorts.OtelCol.Spec.Ports, extraPorts) - ingressParams := newParamsAssertNoErr(t, "", testFileIngress) - ingressParams.OtelCol.Spec.Ingress.Type = "ingress" - updatedIngressParams := newParamsAssertNoErr(t, "", testFileIngress) - updatedIngressParams.OtelCol.Spec.Ingress.Type = "ingress" - updatedIngressParams.OtelCol.Spec.Ingress.Annotations = map[string]string{"blub": "blob"} - updatedIngressParams.OtelCol.Spec.Ingress.Hostname = expectHostname - routeParams := newParamsAssertNoErr(t, "", testFileIngress) - routeParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - routeParams.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - updatedRouteParams := newParamsAssertNoErr(t, "", testFileIngress) - updatedRouteParams.OtelCol.Spec.Ingress.Type = v1alpha1.IngressTypeRoute - updatedRouteParams.OtelCol.Spec.Ingress.Route.Termination = v1alpha1.TLSRouteTerminationTypeInsecure - updatedRouteParams.OtelCol.Spec.Ingress.Hostname = expectHostname - deletedParams := paramsWithMode(v1alpha1.ModeDeployment) - now := metav1.NewTime(time.Now()) - deletedParams.OtelCol.DeletionTimestamp = &now - - type args struct { - params manifests.Params - // an optional list of updates to supply after the initial object - updates []manifests.Params - } - type want struct { - // result check - result controllerruntime.Result - // a check to run against the current state applied - checks []check - // if an error from creation validation is expected - validateErr assert.ErrorAssertionFunc - // if an error from reconciliation is expected - wantErr assert.ErrorAssertionFunc - } - tests := []struct { - name string - args args - want []want - }{ - { - name: "deployment collector", - args: args{ - params: addedMetadataDeployment, - updates: []manifests.Params{deploymentExtraPorts}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, int32(2), *d.Spec.Replicas) - assert.Contains(t, d.Annotations, annotationName) - assert.Contains(t, d.Labels, labelName) - exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(naming.Service(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.ServiceAccount(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, int32(3), *d.Spec.Replicas) - // confirm that we don't remove annotations and labels even if we don't set them - assert.Contains(t, d.Annotations, annotationName) - assert.Contains(t, d.Labels, labelName) - actual := v1.Service{} - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.Service(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Contains(t, actual.Spec.Ports, extraPorts) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "invalid mode", - args: args{ - params: paramsWithMode("bad"), - updates: []manifests.Params{}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{}, - wantErr: assert.NoError, - validateErr: func(t assert.TestingT, err2 error, msgAndArgs ...interface{}) bool { - return assert.ErrorContains(t, err2, "Unsupported value: \"bad\"", msgAndArgs) - }, - }, - }, - }, - { - name: "invalid prometheus configuration", - args: args{ - params: newParamsAssertNoErr(t, baseTaImage, testFileIngress), - updates: []manifests.Params{}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{}, - wantErr: assert.NoError, - validateErr: func(t assert.TestingT, err2 error, msgAndArgs ...interface{}) bool { - return assert.ErrorContains(t, err2, "no prometheus available as part of the configuration", msgAndArgs) - }, - }, - }, - }, - { - name: "deployment collector with ingress", - args: args{ - params: ingressParams, - updates: []manifests.Params{updatedIngressParams}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := networkingv1.Ingress{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Ingress(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := networkingv1.Ingress{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.Ingress(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, "something-else.com", d.Spec.Rules[0].Host) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "deployment collector with routes", - args: args{ - params: routeParams, - updates: []manifests.Params{updatedRouteParams}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - got := routev1.Route{} - nsn := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} - exists, err := populateObjectIfExists(t, &got, nsn) - assert.NoError(t, err) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - got := routev1.Route{} - nsn := types.NamespacedName{Namespace: params.OtelCol.Namespace, Name: "otlp-grpc-test-route"} - exists, err := populateObjectIfExists(t, &got, nsn) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, "otlp-grpc.something-else.com", got.Spec.Host) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "hpa v2 deployment collector", - args: args{ - params: paramsWithHPA(3, 5), - updates: []manifests.Params{paramsWithHPA(1, 9)}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - assert.Equal(t, int32(3), *actual.Spec.MinReplicas) - assert.Equal(t, int32(5), actual.Spec.MaxReplicas) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - actual := autoscalingv2.HorizontalPodAutoscaler{} - exists, hpaErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, hpaErr) - require.Len(t, actual.Spec.Metrics, 1) - assert.Equal(t, int32(90), *actual.Spec.Metrics[0].Resource.Target.AverageUtilization) - assert.Equal(t, int32(1), *actual.Spec.MinReplicas) - assert.Equal(t, int32(9), actual.Spec.MaxReplicas) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "policy v1 deployment collector", - args: args{ - params: paramsWithPolicy(1, 0), - updates: []manifests.Params{paramsWithPolicy(0, 1)}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - actual := policyV1.PodDisruptionBudget{} - exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, pdbErr) - assert.Equal(t, int32(1), actual.Spec.MinAvailable.IntVal) - assert.Nil(t, actual.Spec.MaxUnavailable) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - actual := policyV1.PodDisruptionBudget{} - exists, pdbErr := populateObjectIfExists(t, &actual, namespacedObjectName(naming.HorizontalPodAutoscaler(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, pdbErr) - assert.Nil(t, actual.Spec.MinAvailable) - assert.Equal(t, int32(1), actual.Spec.MaxUnavailable.IntVal) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "daemonset collector", - args: args{ - params: paramsWithMode(v1alpha1.ModeDaemonSet), - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - exists, err := populateObjectIfExists(t, &appsv1.DaemonSet{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "stateful should update collector with TA", - args: args{ - params: paramsWithMode(v1alpha1.ModeStatefulSet), - updates: []manifests.Params{ - newParamsAssertNoErr(t, baseTaImage, promFile), - newParamsAssertNoErr(t, baseTaImage, updatedPromFile), - newParamsAssertNoErr(t, updatedTaImage, updatedPromFile), - }, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &appsv1.StatefulSet{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - // Check the TA doesn't exist - exists, err = populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.False(t, exists) - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.False(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - actual := v1.ConfigMap{} - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.TargetAllocatorServiceAccount(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - - promConfig, err := ta.ConfigToPromConfig(newParamsAssertNoErr(t, baseTaImage, promFile).OtelCol.Spec.Config) - assert.NoError(t, err) - - taConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = map[string]string{ - "app.kubernetes.io/instance": "default.test", - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/component": "opentelemetry-collector", - "app.kubernetes.io/part-of": "opentelemetry", - } - taConfig["config"] = promConfig["config"] - taConfig["allocation_strategy"] = "least-weighted" - taConfig["prometheus_cr"] = map[string]string{ - "scrape_interval": "30s", - } - taConfigYAML, _ := yaml.Marshal(taConfig) - assert.Equal(t, string(taConfigYAML), actual.Data["targetallocator.yaml"]) - assert.NotContains(t, actual.Data["targetallocator.yaml"], "0.0.0.0:10100") - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - exists, err := populateObjectIfExists(t, &v1.ConfigMap{}, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - actual := v1.ConfigMap{} - exists, err = populateObjectIfExists(t, &appsv1.Deployment{}, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Contains(t, actual.Data["targetallocator.yaml"], "0.0.0.0:10100") - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - actual := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &actual, namespacedObjectName(naming.TargetAllocator(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, actual.Spec.Template.Spec.Containers[0].Image, updatedTaImage) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - { - name: "collector is being deleted", - args: args{ - params: deletedParams, - updates: []manifests.Params{}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - o := v1alpha1.AmazonCloudWatchAgent{} - exists, err := populateObjectIfExists(t, &o, namespacedObjectName(naming.Collector(params.OtelCol.Name), params.OtelCol.Namespace)) - assert.NoError(t, err) - assert.False(t, exists) // There should be no collector anymore - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - testContext := context.Background() - nsn := types.NamespacedName{Name: tt.args.params.OtelCol.Name, Namespace: tt.args.params.OtelCol.Namespace} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Recorder: record.NewFakeRecorder(20), - Config: config.New( - config.WithCollectorImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - config.WithOpenShiftRoutesAvailability(openshift.RoutesAvailable), - ), - }) - - assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") - firstCheck := tt.want[0] - // Check for this before create, otherwise it's blown away. - deletionTimestamp := tt.args.params.OtelCol.GetDeletionTimestamp() - createErr := k8sClient.Create(testContext, &tt.args.params.OtelCol) - if !firstCheck.validateErr(t, createErr) { - return - } - if deletionTimestamp != nil { - err := k8sClient.Delete(testContext, &tt.args.params.OtelCol, client.PropagationPolicy(metav1.DeletePropagationForeground)) - assert.NoError(t, err) - } - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - got, reconcileErr := reconciler.Reconcile(testContext, req) - if !firstCheck.wantErr(t, reconcileErr) { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OtelCol)) - return - } - assert.Equal(t, firstCheck.result, got) - for _, check := range firstCheck.checks { - check(t, tt.args.params) - } - // run the next set of checks - for pid, updateParam := range tt.args.updates { - updateParam := updateParam - existing := v1alpha1.AmazonCloudWatchAgent{} - found, err := populateObjectIfExists(t, &existing, nsn) - assert.True(t, found) - assert.NoError(t, err) - - updateParam.OtelCol.SetResourceVersion(existing.ResourceVersion) - updateParam.OtelCol.SetUID(existing.UID) - err = k8sClient.Update(testContext, &updateParam.OtelCol) - assert.NoError(t, err) - if err != nil { - continue - } - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(testContext, req) - // account for already checking the initial group - checkGroup := tt.want[pid+1] - if !checkGroup.wantErr(t, err) { - return - } - assert.Equal(t, checkGroup.result, got) - for _, check := range checkGroup.checks { - check(t, updateParam) - } - } - // Only delete upon a successful creation - if createErr == nil { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OtelCol)) - } - }) - } -} - -func TestOpAMPBridgeReconciler_Reconcile(t *testing.T) { - addedMetadataDeployment := opampBridgeParams() - addedMetadataDeployment.OpAMPBridge.Labels = map[string]string{ - labelName: labelVal, - } - addedMetadataDeployment.OpAMPBridge.Spec.PodAnnotations = map[string]string{ - annotationName: annotationVal, - } - deploymentExtraPorts := opampBridgeParams() - deploymentExtraPorts.OpAMPBridge.Spec.Ports = append(deploymentExtraPorts.OpAMPBridge.Spec.Ports, extraPorts) - - type args struct { - params manifests.Params - // an optional list of updates to supply after the initial object - updates []manifests.Params - } - type want struct { - // result check - result controllerruntime.Result - // a check to run against the current state applied - checks []check - // if an error from creation validation is expected - validateErr assert.ErrorAssertionFunc - // if an error from reconciliation is expected - wantErr assert.ErrorAssertionFunc - } - tests := []struct { - name string - args args - want []want - }{ - { - name: "deployment opamp-bridge", - args: args{ - params: addedMetadataDeployment, - updates: []manifests.Params{deploymentExtraPorts}, - }, - want: []want{ - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Equal(t, int32(1), *d.Spec.Replicas) - assert.Contains(t, d.Spec.Template.Annotations, annotationName) - assert.Contains(t, d.Labels, labelName) - exists, err = populateObjectIfExists(t, &v1.Service{}, namespacedObjectName(naming.OpAMPBridgeService(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - exists, err = populateObjectIfExists(t, &v1.ServiceAccount{}, namespacedObjectName(naming.ServiceAccount(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - { - result: controllerruntime.Result{}, - checks: []check{ - func(t *testing.T, params manifests.Params) { - d := appsv1.Deployment{} - exists, err := populateObjectIfExists(t, &d, namespacedObjectName(naming.OpAMPBridge(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - // confirm that we don't remove annotations and labels even if we don't set them - assert.Contains(t, d.Spec.Template.Annotations, annotationName) - assert.Contains(t, d.Labels, labelName) - actual := v1.Service{} - exists, err = populateObjectIfExists(t, &actual, namespacedObjectName(naming.OpAMPBridgeService(params.OpAMPBridge.Name), params.OpAMPBridge.Namespace)) - assert.NoError(t, err) - assert.True(t, exists) - assert.Contains(t, actual.Spec.Ports, extraPorts) - }, - }, - wantErr: assert.NoError, - validateErr: assert.NoError, - }, - }, - }, - } - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - testContext := context.Background() - nsn := types.NamespacedName{Name: tt.args.params.OpAMPBridge.Name, Namespace: tt.args.params.OpAMPBridge.Namespace} - reconciler := controllers.NewOpAMPBridgeReconciler(controllers.OpAMPBridgeReconcilerParams{ - Client: k8sClient, - Log: logger, - Scheme: testScheme, - Recorder: record.NewFakeRecorder(20), - Config: config.New( - config.WithCollectorImage("default-collector"), - config.WithTargetAllocatorImage("default-ta-allocator"), - config.WithOperatorOpAMPBridgeImage("default-opamp-bridge"), - ), - }) - assert.True(t, len(tt.want) > 0, "must have at least one group of checks to run") - firstCheck := tt.want[0] - createErr := k8sClient.Create(testContext, &tt.args.params.OpAMPBridge) - if !firstCheck.validateErr(t, createErr) { - return - } - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - got, reconcileErr := reconciler.Reconcile(testContext, req) - if !firstCheck.wantErr(t, reconcileErr) { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OpAMPBridge)) - return - } - assert.Equal(t, firstCheck.result, got) - for _, check := range firstCheck.checks { - check(t, tt.args.params) - } - // run the next set of checks - for pid, updateParam := range tt.args.updates { - updateParam := updateParam - existing := v1alpha1.OpAMPBridge{} - found, err := populateObjectIfExists(t, &existing, nsn) - assert.True(t, found) - assert.NoError(t, err) - - updateParam.OpAMPBridge.SetResourceVersion(existing.ResourceVersion) - updateParam.OpAMPBridge.SetUID(existing.UID) - err = k8sClient.Update(testContext, &updateParam.OpAMPBridge) - assert.NoError(t, err) - if err != nil { - continue - } - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err = reconciler.Reconcile(testContext, req) - // account for already checking the initial group - checkGroup := tt.want[pid+1] - if !checkGroup.wantErr(t, err) { - return - } - assert.Equal(t, checkGroup.result, got) - for _, check := range checkGroup.checks { - check(t, updateParam) - } - } - // Only delete upon a successful creation - if createErr == nil { - require.NoError(t, k8sClient.Delete(testContext, &tt.args.params.OpAMPBridge)) - } - }) - } -} - -func TestSkipWhenInstanceDoesNotExist(t *testing.T) { - // prepare - cfg := config.New() - nsn := types.NamespacedName{Name: "non-existing-my-instance", Namespace: "default"} - reconciler := controllers.NewReconciler(controllers.Params{ - Client: k8sClient, - Log: logger, - Scheme: scheme.Scheme, - Config: cfg, - }) - - // test - req := k8sreconcile.Request{ - NamespacedName: nsn, - } - _, err := reconciler.Reconcile(context.Background(), req) - - // verify - assert.NoError(t, err) -} - -func TestRegisterWithManager(t *testing.T) { - t.Skip("this test requires a real cluster, otherwise the GetConfigOrDie will die") - - // prepare - mgr, err := manager.New(k8sconfig.GetConfigOrDie(), manager.Options{}) - require.NoError(t, err) - - reconciler := controllers.NewReconciler(controllers.Params{}) - - // test - err = reconciler.SetupWithManager(mgr) - - // verify - assert.NoError(t, err) -} - -func namespacedObjectName(name string, namespace string) types.NamespacedName { - return types.NamespacedName{ - Namespace: namespace, - Name: name, - } -} diff --git a/controllers/suite_test.go b/controllers/suite_test.go deleted file mode 100644 index 96a1e5ae9..000000000 --- a/controllers/suite_test.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package controllers_test - -import ( - "context" - "crypto/tls" - "fmt" - "net" - "os" - "path/filepath" - "sync" - "testing" - "time" - - routev1 "github.com/openshift/api/route/v1" - v1 "k8s.io/api/core/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/intstr" - "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/record" - "k8s.io/client-go/util/retry" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - logf "sigs.k8s.io/controller-runtime/pkg/log" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - "sigs.k8s.io/controller-runtime/pkg/webhook" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/testdata" - // +kubebuilder:scaffold:imports -) - -var ( - k8sClient client.Client - testEnv *envtest.Environment - testScheme *runtime.Scheme = scheme.Scheme - ctx context.Context - cancel context.CancelFunc - err error - cfg *rest.Config - logger = logf.Log.WithName("unit-tests") - - instanceUID = uuid.NewUUID() - mockAutoDetector = &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { - return openshift.RoutesAvailable, nil - }, - } -) - -const ( - defaultCollectorImage = "default-collector" - defaultTaAllocationImage = "default-ta-allocator" - defaultOpAMPBridgeImage = "default-opamp-bridge" - promFile = "testdata/test.yaml" - updatedPromFile = "testdata/test_ta_update.yaml" - testFileIngress = "testdata/ingress_testdata.yaml" -) - -var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) - -type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (openshift.RoutesAvailability, error) -} - -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { - if m.OpenShiftRoutesAvailabilityFunc != nil { - return m.OpenShiftRoutesAvailabilityFunc() - } - return openshift.RoutesNotAvailable, nil -} - -func TestMain(m *testing.M) { - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, - CRDs: []*apiextensionsv1.CustomResourceDefinition{testdata.OpenShiftRouteCRD}, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "config", "webhook")}, - }, - } - cfg, err = testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err = routev1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - - if err = v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - LeaderElection: false, - WebhookServer: webhook.NewServer(webhook.Options{ - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - }), - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - }) - if mgrErr != nil { - fmt.Printf("failed to start webhook server: %v", mgrErr) - os.Exit(1) - } - - if err = v1alpha1.SetupCollectorWebhook(mgr, config.New()); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - if err = v1alpha1.SetupOpAMPBridgeWebhook(mgr, config.New()); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - go func() { - if err = mgr.Start(ctx); err != nil { - fmt.Printf("failed to start manager: %v", err) - os.Exit(1) - } - }() - - // wait for the webhook server to get ready - wg := &sync.WaitGroup{} - wg.Add(1) - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - go func(wg *sync.WaitGroup) { - defer wg.Done() - if err = retry.OnError(wait.Backoff{ - Steps: 20, - Duration: 10 * time.Millisecond, - Factor: 1.5, - Jitter: 0.1, - Cap: time.Second * 30, - }, func(error) bool { - return true - }, func() error { - // #nosec G402 - conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if tlsErr != nil { - return tlsErr - } - _ = conn.Close() - return nil - }); err != nil { - fmt.Printf("failed to wait for webhook server to be ready: %v", err) - os.Exit(1) - } - }(wg) - wg.Wait() - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} - -func paramsWithMode(mode v1alpha1.Mode) manifests.Params { - replicas := int32(2) - return paramsWithModeAndReplicas(mode, replicas) -} - -func paramsWithModeAndReplicas(mode v1alpha1.Mode, replicas int32) manifests.Params { - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - return manifests.Params{ - Config: config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)), - Client: k8sClient, - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "cloudwatch.aws.amazon.com", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - Replicas: &replicas, - Config: string(configYAML), - Mode: mode, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -func newParams(taContainerImage string, file string) (manifests.Params, error) { - replicas := int32(1) - var configYAML []byte - var err error - - if file == "" { - configYAML, err = os.ReadFile("testdata/test.yaml") - } else { - configYAML, err = os.ReadFile(file) - } - if err != nil { - return manifests.Params{}, fmt.Errorf("Error getting yaml file: %w", err) - } - - cfg := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - - return manifests.Params{ - Config: cfg, - Client: k8sClient, - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "cloudwatch.aws.amazon.com", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeStatefulSet, - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Image: taContainerImage, - }, - Replicas: &replicas, - Config: string(configYAML), - }, - }, - Scheme: testScheme, - Log: logger, - }, nil -} - -func paramsWithHPA(minReps, maxReps int32) manifests.Params { - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - - cpuUtilization := int32(90) - - configuration := config.New(config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - - return manifests.Params{ - Config: configuration, - Client: k8sClient, - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "cloudwatch.aws.amazon.com", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "hpatest", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - Config: string(configYAML), - Autoscaler: &v1alpha1.AutoscalerSpec{ - MinReplicas: &minReps, - MaxReplicas: &maxReps, - TargetCPUUtilization: &cpuUtilization, - }, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -func paramsWithPolicy(minAvailable, maxUnavailable int32) manifests.Params { - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - - configuration := config.New(config.WithAutoDetect(mockAutoDetector), config.WithCollectorImage(defaultCollectorImage), config.WithTargetAllocatorImage(defaultTaAllocationImage)) - err = configuration.AutoDetect() - if err != nil { - logger.Error(err, "configuration.autodetect failed") - } - - pdb := &v1alpha1.PodDisruptionBudgetSpec{} - - if maxUnavailable > 0 && minAvailable > 0 { - fmt.Printf("worng configuration: %v", fmt.Errorf("minAvailable and maxUnavailable cannot be both set")) - } - if maxUnavailable > 0 { - pdb.MaxUnavailable = &intstr.IntOrString{ - Type: intstr.Int, - IntVal: maxUnavailable, - } - } else { - pdb.MinAvailable = &intstr.IntOrString{ - Type: intstr.Int, - IntVal: minAvailable, - } - } - - return manifests.Params{ - Config: configuration, - Client: k8sClient, - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "cloudwatch.aws.amazon.com", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "policytest", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Ports: []v1.ServicePort{{ - Name: "web", - Port: 80, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 80, - }, - NodePort: 0, - }}, - Config: string(configYAML), - PodDisruptionBudget: pdb, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -func opampBridgeParams() manifests.Params { - return manifests.Params{ - Config: config.New(config.WithOperatorOpAMPBridgeImage(defaultOpAMPBridgeImage)), - Client: k8sClient, - OpAMPBridge: v1alpha1.OpAMPBridge{ - TypeMeta: metav1.TypeMeta{ - Kind: "cloudwatch.aws.amazon.com", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "test", - Namespace: "default", - UID: instanceUID, - }, - Spec: v1alpha1.OpAMPBridgeSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/operator-opamp-bridge:0.69.0", - Ports: []v1.ServicePort{ - { - Name: "metrics", - Port: 8081, - TargetPort: intstr.IntOrString{ - Type: intstr.Int, - IntVal: 8081, - }, - }, - }, - Endpoint: "ws://127.0.0.1:4320/v1/opamp", - Capabilities: map[v1alpha1.OpAMPBridgeCapability]bool{ - v1alpha1.OpAMPBridgeCapabilityReportsStatus: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRemoteConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsEffectiveConfig: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnTraces: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnMetrics: true, - v1alpha1.OpAMPBridgeCapabilityReportsOwnLogs: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOpAMPConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsOtherConnectionSettings: true, - v1alpha1.OpAMPBridgeCapabilityAcceptsRestartCommand: true, - v1alpha1.OpAMPBridgeCapabilityReportsHealth: true, - v1alpha1.OpAMPBridgeCapabilityReportsRemoteConfig: true, - }, - ComponentsAllowed: map[string][]string{"receivers": {"otlp"}, "processors": {"memory_limiter"}, "exporters": {"logging"}}, - }, - }, - Scheme: testScheme, - Log: logger, - Recorder: record.NewFakeRecorder(10), - } -} - -func populateObjectIfExists(t testing.TB, object client.Object, namespacedName types.NamespacedName) (bool, error) { - t.Helper() - err := k8sClient.Get(context.Background(), namespacedName, object) - if errors.IsNotFound(err) { - return false, nil - } - if err != nil { - return false, err - } - return true, nil -} diff --git a/internal/autodetect/main.go b/internal/autodetect/main.go deleted file mode 100644 index df88dd691..000000000 --- a/internal/autodetect/main.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package autodetect is for auto-detecting traits from the environment (platform, APIs, ...). -package autodetect - -import ( - "k8s.io/client-go/discovery" - "k8s.io/client-go/rest" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" -) - -var _ AutoDetect = (*autoDetect)(nil) - -// AutoDetect provides an assortment of routines that auto-detect traits based on the runtime. -type AutoDetect interface { - OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) -} - -type autoDetect struct { - dcl discovery.DiscoveryInterface -} - -// New creates a new auto-detection worker, using the given client when talking to the current cluster. -func New(restConfig *rest.Config) (AutoDetect, error) { - dcl, err := discovery.NewDiscoveryClientForConfig(restConfig) - if err != nil { - // it's pretty much impossible to get into this problem, as most of the - // code branches from the previous call just won't fail at all, - // but let's handle this error anyway... - return nil, err - } - - return &autoDetect{ - dcl: dcl, - }, nil -} - -// OpenShiftRoutesAvailability checks if OpenShift Route are available. -func (a *autoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { - apiList, err := a.dcl.ServerGroups() - if err != nil { - return openshift.RoutesNotAvailable, err - } - - apiGroups := apiList.Groups - for i := 0; i < len(apiGroups); i++ { - if apiGroups[i].Name == "route.openshift.io" { - return openshift.RoutesAvailable, nil - } - } - - return openshift.RoutesNotAvailable, nil -} diff --git a/internal/autodetect/main_test.go b/internal/autodetect/main_test.go deleted file mode 100644 index 9324171e1..000000000 --- a/internal/autodetect/main_test.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package autodetect_test - -import ( - "encoding/json" - "net/http" - "net/http/httptest" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/rest" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" -) - -func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) { - for _, tt := range []struct { - apiGroupList *metav1.APIGroupList - expected openshift.RoutesAvailability - }{ - { - &metav1.APIGroupList{}, - openshift.RoutesNotAvailable, - }, - { - &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "route.openshift.io", - }, - }, - }, - openshift.RoutesAvailable, - }, - } { - server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - output, err := json.Marshal(tt.apiGroupList) - require.NoError(t, err) - - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) - _, err = w.Write(output) - require.NoError(t, err) - })) - defer server.Close() - - autoDetect, err := autodetect.New(&rest.Config{Host: server.URL}) - require.NoError(t, err) - - // test - ora, err := autoDetect.OpenShiftRoutesAvailability() - - // verify - assert.NoError(t, err) - assert.Equal(t, tt.expected, ora) - } -} diff --git a/internal/autodetect/openshift/routes.go b/internal/autodetect/openshift/routes.go deleted file mode 100644 index 6df728f22..000000000 --- a/internal/autodetect/openshift/routes.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package openshift - -// RoutesAvailability holds the auto-detected OpenShift Routes availability API. -type RoutesAvailability int - -const ( - // RoutesAvailable represents the route.openshift.io API is available. - RoutesAvailable RoutesAvailability = iota - - // RoutesNotAvailable represents the route.openshift.io API is not available. - RoutesNotAvailable -) - -func (p RoutesAvailability) String() string { - return [...]string{"Available", "NotAvailable"}[p] -} diff --git a/internal/config/main.go b/internal/config/main.go index 2739e84c2..11f715199 100644 --- a/internal/config/main.go +++ b/internal/config/main.go @@ -5,29 +5,19 @@ package config import ( - "time" - "github.com/go-logr/logr" logf "sigs.k8s.io/controller-runtime/pkg/log" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) const ( - defaultAutoDetectFrequency = 5 * time.Second - defaultCollectorConfigMapEntry = "cwagentconfig.json" - defaultTargetAllocatorConfigMapEntry = "targetallocator.yaml" - defaultOperatorOpAMPBridgeConfigMapEntry = "remoteconfiguration.yaml" + defaultCollectorConfigMapEntry = "cwagentconfig.json" ) // Config holds the static configuration for this operator. type Config struct { - autoDetect autodetect.AutoDetect logger logr.Logger - targetAllocatorImage string - operatorOpAMPBridgeImage string autoInstrumentationPythonImage string collectorImage string collectorConfigMapEntry string @@ -35,11 +25,8 @@ type Config struct { autoInstrumentationGoImage string autoInstrumentationApacheHttpdImage string autoInstrumentationNginxImage string - targetAllocatorConfigMapEntry string - operatorOpAMPBridgeConfigMapEntry string autoInstrumentationNodeJSImage string autoInstrumentationJavaImage string - openshiftRoutesAvailability openshift.RoutesAvailability labelsFilter []string } @@ -47,27 +34,18 @@ type Config struct { func New(opts ...Option) Config { // initialize with the default values o := options{ - openshiftRoutesAvailability: openshift.RoutesNotAvailable, - collectorConfigMapEntry: defaultCollectorConfigMapEntry, - targetAllocatorConfigMapEntry: defaultTargetAllocatorConfigMapEntry, - operatorOpAMPBridgeConfigMapEntry: defaultOperatorOpAMPBridgeConfigMapEntry, - logger: logf.Log.WithName("config"), - version: version.Get(), + collectorConfigMapEntry: defaultCollectorConfigMapEntry, + logger: logf.Log.WithName("config"), + version: version.Get(), } for _, opt := range opts { opt(&o) } return Config{ - autoDetect: o.autoDetect, collectorImage: o.collectorImage, collectorConfigMapEntry: o.collectorConfigMapEntry, - targetAllocatorImage: o.targetAllocatorImage, - operatorOpAMPBridgeImage: o.operatorOpAMPBridgeImage, - targetAllocatorConfigMapEntry: o.targetAllocatorConfigMapEntry, - operatorOpAMPBridgeConfigMapEntry: o.operatorOpAMPBridgeConfigMapEntry, logger: o.logger, - openshiftRoutesAvailability: o.openshiftRoutesAvailability, autoInstrumentationJavaImage: o.autoInstrumentationJavaImage, autoInstrumentationNodeJSImage: o.autoInstrumentationNodeJSImage, autoInstrumentationPythonImage: o.autoInstrumentationPythonImage, @@ -79,18 +57,6 @@ func New(opts ...Option) Config { } } -// AutoDetect attempts to automatically detect relevant information for this operator. -func (c *Config) AutoDetect() error { - c.logger.V(2).Info("auto-detecting the configuration based on the environment") - - ora, err := c.autoDetect.OpenShiftRoutesAvailability() - if err != nil { - return err - } - c.openshiftRoutesAvailability = ora - return nil -} - // CollectorImage represents the flag to override the OpenTelemetry Collector container image. func (c *Config) CollectorImage() string { return c.collectorImage @@ -101,31 +67,6 @@ func (c *Config) CollectorConfigMapEntry() string { return c.collectorConfigMapEntry } -// TargetAllocatorImage represents the flag to override the OpenTelemetry TargetAllocator container image. -func (c *Config) TargetAllocatorImage() string { - return c.targetAllocatorImage -} - -// OperatorOpAMPBridgeImage represents the flag to override the OpAMPBridge container image. -func (c *Config) OperatorOpAMPBridgeImage() string { - return c.operatorOpAMPBridgeImage -} - -// TargetAllocatorConfigMapEntry represents the configuration file name for the TargetAllocator. Immutable. -func (c *Config) TargetAllocatorConfigMapEntry() string { - return c.targetAllocatorConfigMapEntry -} - -// OperatorOpAMPBridgeImageConfigMapEntry represents the configuration file name for the OpAMPBridge. Immutable. -func (c *Config) OperatorOpAMPBridgeConfigMapEntry() string { - return c.operatorOpAMPBridgeConfigMapEntry -} - -// OpenShiftRoutesAvailability represents the availability of the OpenShift Routes API. -func (c *Config) OpenShiftRoutesAvailability() openshift.RoutesAvailability { - return c.openshiftRoutesAvailability -} - // AutoInstrumentationJavaImage returns OpenTelemetry Java auto-instrumentation container image. func (c *Config) AutoInstrumentationJavaImage() string { return c.autoInstrumentationJavaImage diff --git a/internal/config/main_test.go b/internal/config/main_test.go index a4991752c..1b8d279a5 100644 --- a/internal/config/main_test.go +++ b/internal/config/main_test.go @@ -7,10 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" ) @@ -19,46 +16,9 @@ func TestNewConfig(t *testing.T) { cfg := config.New( config.WithCollectorImage("some-image"), config.WithCollectorConfigMapEntry("some-config.yaml"), - config.WithOpenShiftRoutesAvailability(openshift.RoutesAvailable), ) // test assert.Equal(t, "some-image", cfg.CollectorImage()) assert.Equal(t, "some-config.yaml", cfg.CollectorConfigMapEntry()) - assert.Equal(t, openshift.RoutesAvailable, cfg.OpenShiftRoutesAvailability()) -} - -func TestConfigChangesOnAutoDetect(t *testing.T) { - // prepare - mock := &mockAutoDetect{ - OpenShiftRoutesAvailabilityFunc: func() (openshift.RoutesAvailability, error) { - return openshift.RoutesAvailable, nil - }, - } - cfg := config.New( - config.WithAutoDetect(mock), - ) - - // sanity check - require.Equal(t, openshift.RoutesNotAvailable, cfg.OpenShiftRoutesAvailability()) - - // test - err := cfg.AutoDetect() - require.NoError(t, err) - - // verify - assert.Equal(t, openshift.RoutesAvailable, cfg.OpenShiftRoutesAvailability()) -} - -var _ autodetect.AutoDetect = (*mockAutoDetect)(nil) - -type mockAutoDetect struct { - OpenShiftRoutesAvailabilityFunc func() (openshift.RoutesAvailability, error) -} - -func (m *mockAutoDetect) OpenShiftRoutesAvailability() (openshift.RoutesAvailability, error) { - if m.OpenShiftRoutesAvailabilityFunc != nil { - return m.OpenShiftRoutesAvailabilityFunc() - } - return openshift.RoutesNotAvailable, nil } diff --git a/internal/config/options.go b/internal/config/options.go index 97f2c077e..05512f704 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -9,8 +9,6 @@ import ( "github.com/go-logr/logr" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" ) @@ -18,7 +16,6 @@ import ( type Option func(c *options) type options struct { - autoDetect autodetect.AutoDetect version version.Version logger logr.Logger autoInstrumentationDotNetImage string @@ -30,29 +27,9 @@ type options struct { autoInstrumentationNginxImage string collectorImage string collectorConfigMapEntry string - targetAllocatorConfigMapEntry string - operatorOpAMPBridgeConfigMapEntry string - targetAllocatorImage string - operatorOpAMPBridgeImage string - openshiftRoutesAvailability openshift.RoutesAvailability labelsFilter []string } -func WithAutoDetect(a autodetect.AutoDetect) Option { - return func(o *options) { - o.autoDetect = a - } -} -func WithTargetAllocatorImage(s string) Option { - return func(o *options) { - o.targetAllocatorImage = s - } -} -func WithOperatorOpAMPBridgeImage(s string) Option { - return func(o *options) { - o.operatorOpAMPBridgeImage = s - } -} func WithCollectorImage(s string) Option { return func(o *options) { o.collectorImage = s @@ -63,16 +40,6 @@ func WithCollectorConfigMapEntry(s string) Option { o.collectorConfigMapEntry = s } } -func WithTargetAllocatorConfigMapEntry(s string) Option { - return func(o *options) { - o.targetAllocatorConfigMapEntry = s - } -} -func WithOperatorOpAMPBridgeConfigMapEntry(s string) Option { - return func(o *options) { - o.operatorOpAMPBridgeConfigMapEntry = s - } -} func WithLogger(logger logr.Logger) Option { return func(o *options) { o.logger = logger @@ -126,12 +93,6 @@ func WithAutoInstrumentationNginxImage(s string) Option { } } -func WithOpenShiftRoutesAvailability(os openshift.RoutesAvailability) Option { - return func(o *options) { - o.openshiftRoutesAvailability = os - } -} - func WithLabelFilters(labelFilters []string) Option { return func(o *options) { diff --git a/internal/manifests/collector/adapters/config_to_ports.go b/internal/manifests/collector/adapters/config_to_ports.go index 418e57b4d..f9cbe069e 100644 --- a/internal/manifests/collector/adapters/config_to_ports.go +++ b/internal/manifests/collector/adapters/config_to_ports.go @@ -4,19 +4,12 @@ package adapters import ( - "fmt" "net" - "sort" "strconv" "strings" "github.com/go-logr/logr" "github.com/mitchellh/mapstructure" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - exporterParser "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/exporter" - receiverParser "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" ) type ComponentType int @@ -30,106 +23,6 @@ func (c ComponentType) String() string { return [...]string{"receiver", "exporter"}[c] } -// ConfigToComponentPorts converts the incoming configuration object into a set of service ports required by the exporters. -func ConfigToComponentPorts(logger logr.Logger, cType ComponentType, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { - // now, we gather which ports we might need to open - // for that, we get all the exporters and check their `endpoint` properties, - // extracting the port from it. The port name has to be a "DNS_LABEL", so, we try to make it follow the pattern: - // ${instance.Name}-${exporter.name}-${exporter.qualifier} - // the exporter-name is typically the node name from the exporters map - // the exporter-qualifier is what comes after the slash in the exporter name, but typically nil - // examples: - // ```yaml - // components: - // componentexample: - // endpoint: 0.0.0.0:12345 - // componentexample/settings: - // endpoint: 0.0.0.0:12346 - // in this case, we have 2 ports, named: "componentexample" and "componentexample-settings" - componentsProperty, ok := config[fmt.Sprintf("%ss", cType.String())] - if !ok { - return nil, fmt.Errorf("no %ss available as part of the configuration", cType) - } - - components, ok := componentsProperty.(map[interface{}]interface{}) - if !ok { - return nil, fmt.Errorf("%ss doesn't contain valid components", cType.String()) - } - - compEnabled := getEnabledComponents(config, cType) - - if compEnabled == nil { - return nil, fmt.Errorf("no enabled %ss available as part of the configuration", cType) - } - - ports := []corev1.ServicePort{} - for key, val := range components { - // This check will pass only the enabled components, - // then only the related ports will be opened. - if !compEnabled[key] { - continue - } - exporter, ok := val.(map[interface{}]interface{}) - if !ok { - logger.V(2).Info("component doesn't seem to be a map of properties", cType.String(), key) - exporter = map[interface{}]interface{}{} - } - - cmptName := key.(string) - var cmptParser parser.ComponentPortParser - var err error - switch cType { - case ComponentTypeExporter: - cmptParser, err = exporterParser.For(logger, cmptName, exporter) - case ComponentTypeReceiver: - cmptParser, err = receiverParser.For(logger, cmptName, exporter) - } - - if err != nil { - logger.V(2).Info("no parser found for '%s'", cmptName) - continue - } - - exprtPorts, err := cmptParser.Ports() - if err != nil { - logger.Error(err, "parser for '%s' has returned an error: %w", cmptName, err) - continue - } - - if len(exprtPorts) > 0 { - ports = append(ports, exprtPorts...) - } - } - - sort.Slice(ports, func(i, j int) bool { - return ports[i].Name < ports[j].Name - }) - - return ports, nil -} - -func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error) { - ports, err := ConfigToComponentPorts(logger, ComponentTypeReceiver, config) - if err != nil { - logger.Error(err, "there was a problem while getting the ports from the receivers") - return nil, err - } - - exporterPorts, err := ConfigToComponentPorts(logger, ComponentTypeExporter, config) - if err != nil { - logger.Error(err, "there was a problem while getting the ports from the exporters") - return nil, err - } - - ports = append(ports, exporterPorts...) - - sort.Slice(ports, func(i, j int) bool { - return ports[i].Name < ports[j].Name - }) - - return ports, nil -} - // ConfigToMetricsPort gets the port number for the metrics endpoint from the collector config if it has been set. func ConfigToMetricsPort(logger logr.Logger, config map[interface{}]interface{}) (int32, error) { // we don't need to unmarshal the whole config, just follow the keys down to diff --git a/internal/manifests/collector/config_replace.go b/internal/manifests/collector/config_replace.go index 2b85f714f..53201e171 100644 --- a/internal/manifests/collector/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -4,83 +4,19 @@ package collector import ( - "time" - - promconfig "github.com/prometheus/prometheus/config" _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. "gopkg.in/yaml.v2" "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" ) -type targetAllocator struct { - Endpoint string `yaml:"endpoint"` - Interval time.Duration `yaml:"interval"` - CollectorID string `yaml:"collector_id"` - // HTTPSDConfig is a preference that can be set for the collector's target allocator, but the operator doesn't - // care about what the value is set to. We just need this for validation when unmarshalling the configmap. - HTTPSDConfig interface{} `yaml:"http_sd_config,omitempty"` -} - -type Config struct { - PromConfig *promconfig.Config `yaml:"config"` - TargetAllocConfig *targetAllocator `yaml:"target_allocator,omitempty"` -} - func ReplaceConfig(instance v1alpha1.AmazonCloudWatchAgent) (string, error) { - // Check if TargetAllocator is enabled, if not, return the original config - if !instance.Spec.TargetAllocator.Enabled { - return instance.Spec.Config, nil - } - config, err := adapters.ConfigFromString(instance.Spec.Config) if err != nil { return "", err } - promCfgMap, getCfgPromErr := ta.ConfigToPromConfig(instance.Spec.Config) - if getCfgPromErr != nil { - return "", getCfgPromErr - } - - validateCfgPromErr := ta.ValidatePromConfig(promCfgMap, instance.Spec.TargetAllocator.Enabled, featuregate.EnableTargetAllocatorRewrite.IsEnabled()) - if validateCfgPromErr != nil { - return "", validateCfgPromErr - } - - if featuregate.EnableTargetAllocatorRewrite.IsEnabled() { - // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters - // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. - updPromCfgMap, getCfgPromErr := ta.AddTAConfigToPromConfig(promCfgMap, naming.TAService(instance.Name)) - if getCfgPromErr != nil { - return "", getCfgPromErr - } - - // type coercion checks are handled in the AddTAConfigToPromConfig method above - config["receivers"].(map[interface{}]interface{})["prometheus"] = updPromCfgMap - - out, updCfgMarshalErr := yaml.Marshal(config) - if updCfgMarshalErr != nil { - return "", updCfgMarshalErr - } - - return string(out), nil - } - - // To avoid issues caused by Prometheus validation logic, which fails regex validation when it encounters - // $$ in the prom config, we update the YAML file directly without marshaling and unmarshalling. - updPromCfgMap, err := ta.AddHTTPSDConfigToPromConfig(promCfgMap, naming.TAService(instance.Name)) - if err != nil { - return "", err - } - - // type coercion checks are handled in the ConfigToPromConfig method above - config["receivers"].(map[interface{}]interface{})["prometheus"] = updPromCfgMap - out, err := yaml.Marshal(config) if err != nil { return "", err diff --git a/internal/manifests/collector/config_replace_test.go b/internal/manifests/collector/config_replace_test.go deleted file mode 100644 index 7adad992e..000000000 --- a/internal/manifests/collector/config_replace_test.go +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "os" - "testing" - - "github.com/prometheus/prometheus/discovery/http" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - colfeaturegate "go.opentelemetry.io/collector/featuregate" - "gopkg.in/yaml.v2" - - ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" -) - -func TestPrometheusParser(t *testing.T) { - param, err := newParams("test/test-img", "testdata/http_sd_config_test.yaml") - assert.NoError(t, err) - - t.Run("should update config with http_sd_config", func(t *testing.T) { - err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) - require.NoError(t, err) - t.Cleanup(func() { - _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - }) - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - // prepare - var cfg Config - promCfgMap, err := ta.ConfigToPromConfig(actualConfig) - assert.NoError(t, err) - - promCfg, err := yaml.Marshal(promCfgMap) - assert.NoError(t, err) - - err = yaml.UnmarshalStrict(promCfg, &cfg) - assert.NoError(t, err) - - // test - expectedMap := map[string]bool{ - "prometheus": false, - "service-x": false, - } - for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { - assert.Len(t, scrapeConfig.ServiceDiscoveryConfigs, 1) - assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].Name(), "http") - assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].(*http.SDConfig).URL, "http://test-targetallocator:80/jobs/"+scrapeConfig.JobName+"/targets?collector_id=$POD_NAME") - expectedMap[scrapeConfig.JobName] = true - } - for k := range expectedMap { - assert.True(t, expectedMap[k], k) - } - assert.True(t, cfg.TargetAllocConfig == nil) - }) - - t.Run("should update config with targetAllocator block if block not present", func(t *testing.T) { - // Set up the test scenario - param.OtelCol.Spec.TargetAllocator.Enabled = true - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - // Verify the expected changes in the config - promCfgMap, err := ta.ConfigToPromConfig(actualConfig) - assert.NoError(t, err) - - prometheusConfig := promCfgMap["config"].(map[interface{}]interface{}) - - assert.NotContains(t, prometheusConfig, "scrape_configs") - - expectedTAConfig := map[interface{}]interface{}{ - "endpoint": "http://test-targetallocator:80", - "interval": "30s", - "collector_id": "${POD_NAME}", - } - assert.Equal(t, expectedTAConfig, promCfgMap["target_allocator"]) - assert.NoError(t, err) - }) - - t.Run("should update config with targetAllocator block if block already present", func(t *testing.T) { - // Set up the test scenario - paramTa, err := newParams("test/test-img", "testdata/http_sd_config_ta_test.yaml") - require.NoError(t, err) - paramTa.OtelCol.Spec.TargetAllocator.Enabled = true - - actualConfig, err := ReplaceConfig(paramTa.OtelCol) - assert.NoError(t, err) - - // Verify the expected changes in the config - promCfgMap, err := ta.ConfigToPromConfig(actualConfig) - assert.NoError(t, err) - - prometheusConfig := promCfgMap["config"].(map[interface{}]interface{}) - - assert.NotContains(t, prometheusConfig, "scrape_configs") - - expectedTAConfig := map[interface{}]interface{}{ - "endpoint": "http://test-targetallocator:80", - "interval": "30s", - "collector_id": "${POD_NAME}", - } - assert.Equal(t, expectedTAConfig, promCfgMap["target_allocator"]) - assert.NoError(t, err) - }) - - t.Run("should not update config with http_sd_config", func(t *testing.T) { - param.OtelCol.Spec.TargetAllocator.Enabled = false - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - // prepare - var cfg Config - promCfgMap, err := ta.ConfigToPromConfig(actualConfig) - assert.NoError(t, err) - - promCfg, err := yaml.Marshal(promCfgMap) - assert.NoError(t, err) - - err = yaml.UnmarshalStrict(promCfg, &cfg) - assert.NoError(t, err) - - // test - expectedMap := map[string]bool{ - "prometheus": false, - "service-x": false, - } - for _, scrapeConfig := range cfg.PromConfig.ScrapeConfigs { - assert.Len(t, scrapeConfig.ServiceDiscoveryConfigs, 2) - assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[0].Name(), "file") - assert.Equal(t, scrapeConfig.ServiceDiscoveryConfigs[1].Name(), "static") - expectedMap[scrapeConfig.JobName] = true - } - for k := range expectedMap { - assert.True(t, expectedMap[k], k) - } - assert.True(t, cfg.TargetAllocConfig == nil) - }) - -} - -func TestReplaceConfig(t *testing.T) { - param, err := newParams("test/test-img", "testdata/relabel_config_original.yaml") - assert.NoError(t, err) - - t.Run("should not modify config when TargetAllocator is disabled", func(t *testing.T) { - param.OtelCol.Spec.TargetAllocator.Enabled = false - expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_original.yaml") - assert.NoError(t, err) - expectedConfig := string(expectedConfigBytes) - - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - assert.Equal(t, expectedConfig, actualConfig) - }) - - t.Run("should rewrite scrape configs with SD config when TargetAllocator is enabled and feature flag is not set", func(t *testing.T) { - err := colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), false) - require.NoError(t, err) - t.Cleanup(func() { - _ = colfeaturegate.GlobalRegistry().Set(featuregate.EnableTargetAllocatorRewrite.ID(), true) - }) - - param.OtelCol.Spec.TargetAllocator.Enabled = true - - expectedConfigBytes, err := os.ReadFile("testdata/relabel_config_expected_with_sd_config.yaml") - assert.NoError(t, err) - expectedConfig := string(expectedConfigBytes) - - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - assert.Equal(t, expectedConfig, actualConfig) - }) - - t.Run("should remove scrape configs if TargetAllocator is enabled and feature flag is set", func(t *testing.T) { - param.OtelCol.Spec.TargetAllocator.Enabled = true - - expectedConfigBytes, err := os.ReadFile("testdata/config_expected_targetallocator.yaml") - assert.NoError(t, err) - expectedConfig := string(expectedConfigBytes) - - actualConfig, err := ReplaceConfig(param.OtelCol) - assert.NoError(t, err) - - assert.Equal(t, expectedConfig, actualConfig) - }) -} diff --git a/internal/manifests/collector/container.go b/internal/manifests/collector/container.go index c8b049782..b89d8eaad 100644 --- a/internal/manifests/collector/container.go +++ b/internal/manifests/collector/container.go @@ -4,7 +4,6 @@ package collector import ( - "errors" "fmt" "path" "sort" @@ -16,7 +15,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" "github.com/aws/amazon-cloudwatch-agent-operator/pkg/constants" ) @@ -110,31 +108,6 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo } } - if otelcol.Spec.TargetAllocator.Enabled { - // We need to add a SHARD here so the collector is able to keep targets after the hashmod operation which is - // added by default by the Prometheus operator's config generator. - // All collector instances use SHARD == 0 as they only receive targets - // allocated to them and should not use the Prometheus hashmod-based - // allocation. - envVars = append(envVars, corev1.EnvVar{ - Name: "SHARD", - Value: "0", - }) - } - - var livenessProbe *corev1.Probe - if configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config); err == nil { - if probe, err := getLivenessProbe(configFromString, otelcol.Spec.LivenessProbe); err == nil { - livenessProbe = probe - } else if errors.Is(err, adapters.ErrNoServiceExtensions) { - logger.Info("extensions not configured, skipping liveness probe creation") - } else if errors.Is(err, adapters.ErrNoServiceExtensionHealthCheck) { - logger.Info("healthcheck extension not configured, skipping liveness probe creation") - } else { - logger.Error(err, "cannot create liveness probe.") - } - } - envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) return corev1.Container{ Name: naming.Container(), @@ -147,7 +120,6 @@ func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonClo EnvFrom: otelcol.Spec.EnvFrom, Resources: otelcol.Spec.Resources, SecurityContext: otelcol.Spec.SecurityContext, - LivenessProbe: livenessProbe, Lifecycle: otelcol.Spec.Lifecycle, } } @@ -187,29 +159,3 @@ func portMapToList(portMap map[string]corev1.ContainerPort) []corev1.ContainerPo }) return ports } - -func getLivenessProbe(config map[interface{}]interface{}, probeConfig *v1alpha1.Probe) (*corev1.Probe, error) { - probe, err := adapters.ConfigToContainerProbe(config) - if err != nil { - return nil, err - } - if probeConfig != nil { - if probeConfig.InitialDelaySeconds != nil { - probe.InitialDelaySeconds = *probeConfig.InitialDelaySeconds - } - if probeConfig.PeriodSeconds != nil { - probe.PeriodSeconds = *probeConfig.PeriodSeconds - } - if probeConfig.FailureThreshold != nil { - probe.FailureThreshold = *probeConfig.FailureThreshold - } - if probeConfig.SuccessThreshold != nil { - probe.SuccessThreshold = *probeConfig.SuccessThreshold - } - if probeConfig.TimeoutSeconds != nil { - probe.TimeoutSeconds = *probeConfig.TimeoutSeconds - } - probe.TerminationGracePeriodSeconds = probeConfig.TerminationGracePeriodSeconds - } - return probe, nil -} diff --git a/internal/manifests/collector/ingress.go b/internal/manifests/collector/ingress.go index c11682cbf..e576be9ce 100644 --- a/internal/manifests/collector/ingress.go +++ b/internal/manifests/collector/ingress.go @@ -13,7 +13,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) @@ -126,18 +125,7 @@ func createSubdomainIngressRules(otelcol string, hostname string, ports []corev1 } func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) ([]corev1.ServicePort, error) { - configFromString, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - logger.Error(err, "couldn't extract the configuration from the context") - return nil, err - } - - ports, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeReceiver, configFromString) - if err != nil { - logger.Error(err, "couldn't build the ingress for this instance") - return nil, err - } - + var ports []corev1.ServicePort if len(otelcol.Spec.Ports) > 0 { // we should add all the ports from the CR // there are two cases where problems might occur: @@ -155,5 +143,5 @@ func servicePortsFromCfg(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAg } ports = append(otelcol.Spec.Ports, resultingInferredPorts...) } - return ports, err + return ports, nil } diff --git a/internal/manifests/collector/parser/exporter/exporter.go b/internal/manifests/collector/parser/exporter/exporter.go deleted file mode 100644 index 1c7918d45..000000000 --- a/internal/manifests/collector/parser/exporter/exporter.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package parser is for parsing the OpenTelemetry Collector configuration. -package exporter - -import ( - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// registry holds a record of all known exporter parsers. -var registry = make(map[string]parser.Builder) - -// BuilderFor returns a parser builder for the given exporter name. -func BuilderFor(name string) parser.Builder { - return registry[exporterType(name)] -} - -// For returns a new parser for the given exporter name + config. -func For(logger logr.Logger, name string, config map[interface{}]interface{}) (parser.ComponentPortParser, error) { - builder := BuilderFor(name) - if builder == nil { - return nil, fmt.Errorf("no builders for %s", name) - } - return builder(logger, name, config), nil -} - -// Register adds a new parser builder to the list of known builders. -func Register(name string, builder parser.Builder) { - registry[name] = builder -} - -// IsRegistered checks whether a parser is registered with the given name. -func IsRegistered(name string) bool { - _, ok := registry[name] - return ok -} - -var ( - endpointKey = "endpoint" -) - -func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *corev1.ServicePort { - endpoint := getAddressFromConfig(logger, name, endpointKey, config) - - switch e := endpoint.(type) { - case nil: - break - case string: - port, err := portFromEndpoint(e) - if err != nil { - logger.WithValues(endpointKey, e).Error(err, "couldn't parse the endpoint's port") - return nil - } - - return &corev1.ServicePort{ - Name: naming.PortName(name, port), - Port: port, - } - default: - logger.WithValues(endpointKey, endpoint).Error(fmt.Errorf("unrecognized type %T", endpoint), "exporter's endpoint isn't a string") - } - - return nil -} - -func getAddressFromConfig(logger logr.Logger, name, key string, config map[interface{}]interface{}) interface{} { - endpoint, ok := config[key] - if !ok { - logger.V(2).Info("%s exporter doesn't have an %s", name, key) - return nil - } - return endpoint -} - -func portFromEndpoint(endpoint string) (int32, error) { - var err error - var port int64 - - r := regexp.MustCompile(":[0-9]+") - - if r.MatchString(endpoint) { - port, err = strconv.ParseInt(strings.Replace(r.FindString(endpoint), ":", "", -1), 10, 32) - - if err != nil { - return 0, err - } - } - - if port == 0 { - return 0, errors.New("port should not be empty") - } - - return int32(port), err -} - -func exporterType(name string) string { - // exporters have a name like: - // - myexporter/custom - // - myexporter - // we extract the "myexporter" part and see if we have a parser for the exporter - if strings.Contains(name, "/") { - return name[:strings.Index(name, "/")] - } - - return name -} diff --git a/internal/manifests/collector/parser/exporter/exporter_prometheus.go b/internal/manifests/collector/parser/exporter/exporter_prometheus.go deleted file mode 100644 index 8b45e4ba0..000000000 --- a/internal/manifests/collector/parser/exporter/exporter_prometheus.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package exporter - -import ( - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var _ parser.ComponentPortParser = &PrometheusExporterParser{} - -const ( - parserNamePrometheus = "__prometheus" - defaultPrometheusPort = 8888 -) - -// PrometheusExporterParser parses the configuration for OTLP receivers. -type PrometheusExporterParser struct { - config map[interface{}]interface{} - logger logr.Logger - name string -} - -// NewPrometheusExporterParser builds a new parser for OTLP receivers. -func NewPrometheusExporterParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &PrometheusExporterParser{ - logger: logger, - name: name, - config: config, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (o *PrometheusExporterParser) Ports() ([]corev1.ServicePort, error) { - ports := []corev1.ServicePort{} - if o.config == nil { - ports = append(ports, - corev1.ServicePort{ - Name: naming.PortName(o.name, defaultPrometheusPort), - Port: defaultPrometheusPort, - TargetPort: intstr.FromInt(int(defaultPrometheusPort)), - Protocol: corev1.ProtocolTCP, - }, - ) - } else { - ports = append( - ports, *singlePortFromConfigEndpoint(o.logger, o.name, o.config), - ) - } - - return ports, nil -} - -// ParserName returns the name of this parser. -func (o *PrometheusExporterParser) ParserName() string { - return parserNamePrometheus -} - -func init() { - Register("prometheus", NewPrometheusExporterParser) -} diff --git a/internal/manifests/collector/parser/parser.go b/internal/manifests/collector/parser/parser.go deleted file mode 100644 index 73333bbb1..000000000 --- a/internal/manifests/collector/parser/parser.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package parser - -import ( - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" -) - -type ComponentPortParser interface { - // Ports returns the service ports parsed based on the exporter's configuration - Ports() ([]corev1.ServicePort, error) - - // ParserName returns the name of this parser - ParserName() string -} - -// Builder specifies the signature required for parser builders. -type Builder func(logr.Logger, string, map[interface{}]interface{}) ComponentPortParser diff --git a/internal/manifests/collector/parser/receiver/receiver.go b/internal/manifests/collector/parser/receiver/receiver.go deleted file mode 100644 index 9b7d1e86a..000000000 --- a/internal/manifests/collector/parser/receiver/receiver.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package parser is for parsing the OpenTelemetry Collector configuration. -package receiver - -import ( - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// registry holds a record of all known receiver parsers. -var registry = make(map[string]parser.Builder) - -// BuilderFor returns a parser builder for the given receiver name. -func BuilderFor(name string) parser.Builder { - builder := registry[receiverType(name)] - if builder == nil { - builder = NewGenericReceiverParser - } - - return builder -} - -// For returns a new parser for the given receiver name + config. -func For(logger logr.Logger, name string, config map[interface{}]interface{}) (parser.ComponentPortParser, error) { - builder := BuilderFor(name) - return builder(logger, name, config), nil -} - -// Register adds a new parser builder to the list of known builders. -func Register(name string, builder parser.Builder) { - registry[name] = builder -} - -// IsRegistered checks whether a parser is registered with the given name. -func IsRegistered(name string) bool { - _, ok := registry[name] - return ok -} - -var ( - endpointKey = "endpoint" - listenAddressKey = "listen_address" - scraperReceivers = map[string]struct{}{ - "prometheus": {}, - "kubeletstats": {}, - "sshcheck": {}, - "cloudfoundry": {}, - "vcenter": {}, - "oracledb": {}, - "snmp": {}, - "googlecloudpubsub": {}, - "chrony": {}, - "jmx": {}, - "podman_stats": {}, - "pulsar": {}, - "docker_stats": {}, - "aerospike": {}, - "zookeeper": {}, - "prometheus_simple": {}, - "saphana": {}, - "riak": {}, - "redis": {}, - "rabbitmq": {}, - "purefb": {}, - "postgresql": {}, - "nsxt": {}, - "nginx": {}, - "mysql": {}, - "memcached": {}, - "httpcheck": {}, - "haproxy": {}, - "flinkmetrics": {}, - "couchdb": {}, - } -) - -func isScraperReceiver(name string) bool { - _, exists := scraperReceivers[name] - return exists -} - -func singlePortFromConfigEndpoint(logger logr.Logger, name string, config map[interface{}]interface{}) *v1.ServicePort { - var endpoint interface{} - switch { - // syslog receiver contains the endpoint - // that needs to be exposed one level down inside config - // i.e. either in tcp or udp section with field key - // as `listen_address` - case name == "syslog": - var c map[interface{}]interface{} - if udp, isUDP := config["udp"]; isUDP && udp != nil { - c = udp.(map[interface{}]interface{}) - endpoint = getAddressFromConfig(logger, name, listenAddressKey, c) - } else if tcp, isTCP := config["tcp"]; isTCP && tcp != nil { - c = tcp.(map[interface{}]interface{}) - endpoint = getAddressFromConfig(logger, name, listenAddressKey, c) - } - - // tcplog and udplog receivers hold the endpoint - // value in `listen_address` field - case name == "tcplog" || name == "udplog": - endpoint = getAddressFromConfig(logger, name, listenAddressKey, config) - - // ignore the receiver as it holds the field key endpoint, and it - // is a scraper, we only expose endpoint through k8s service objects for - // receivers that aren't scrapers. - case isScraperReceiver(name): - return nil - - default: - endpoint = getAddressFromConfig(logger, name, endpointKey, config) - } - - switch e := endpoint.(type) { - case nil: - break - case string: - port, err := portFromEndpoint(e) - if err != nil { - logger.WithValues(endpointKey, e).Error(err, "couldn't parse the endpoint's port") - return nil - } - - return &corev1.ServicePort{ - Name: naming.PortName(name, port), - Port: port, - } - default: - logger.WithValues(endpointKey, endpoint).Error(fmt.Errorf("unrecognized type %T", endpoint), "receiver's endpoint isn't a string") - } - - return nil -} - -func getAddressFromConfig(logger logr.Logger, name, key string, config map[interface{}]interface{}) interface{} { - endpoint, ok := config[key] - if !ok { - logger.V(2).Info("%s receiver doesn't have an %s", name, key) - return nil - } - return endpoint -} - -func portFromEndpoint(endpoint string) (int32, error) { - var err error - var port int64 - - r := regexp.MustCompile(":[0-9]+") - - if r.MatchString(endpoint) { - port, err = strconv.ParseInt(strings.Replace(r.FindString(endpoint), ":", "", -1), 10, 32) - - if err != nil { - return 0, err - } - } - - if port == 0 { - return 0, errors.New("port should not be empty") - } - - return int32(port), err -} - -func receiverType(name string) string { - // receivers have a name like: - // - myreceiver/custom - // - myreceiver - // we extract the "myreceiver" part and see if we have a parser for the receiver - if strings.Contains(name, "/") { - return name[:strings.Index(name, "/")] - } - - return name -} diff --git a/internal/manifests/collector/parser/receiver/receiver_generic.go b/internal/manifests/collector/parser/receiver/receiver_generic.go deleted file mode 100644 index 2d416a9a3..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_generic.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver - -import ( - "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -const parserNameGeneric = "__generic" - -var _ parser.ComponentPortParser = &GenericReceiver{} - -// GenericReceiver is a special parser for generic receivers. It doesn't self-register and should be created/used directly. -type GenericReceiver struct { - config map[interface{}]interface{} - defaultAppProtocol *string - logger logr.Logger - name string - defaultProtocol corev1.Protocol - parserName string - defaultPort int32 -} - -// NOTE: Operator will sync with only receivers that aren't scrapers. Operator sync up receivers -// so that it can expose the required port based on the receiver's config. Receiver scrapers are ignored. - -// NewGenericReceiverParser builds a new parser for generic receivers. -func NewGenericReceiverParser(logger logr.Logger, name string, config map[interface{}]interface{}) parser.ComponentPortParser { - return &GenericReceiver{ - logger: logger, - name: name, - config: config, - parserName: parserNameGeneric, - } -} - -// Ports returns all the service ports for all protocols in this parser. -func (g *GenericReceiver) Ports() ([]corev1.ServicePort, error) { - port := singlePortFromConfigEndpoint(g.logger, g.name, g.config) - if port != nil { - port.Protocol = g.defaultProtocol - port.AppProtocol = g.defaultAppProtocol - return []corev1.ServicePort{*port}, nil - } - - if g.defaultPort > 0 { - return []corev1.ServicePort{{ - Port: g.defaultPort, - Name: naming.PortName(g.name, g.defaultPort), - Protocol: g.defaultProtocol, - AppProtocol: g.defaultAppProtocol, - }}, nil - } - - return []corev1.ServicePort{}, nil -} - -// ParserName returns the name of this parser. -func (g *GenericReceiver) ParserName() string { - return g.parserName -} diff --git a/internal/manifests/collector/parser/receiver/receiver_generic_test.go b/internal/manifests/collector/parser/receiver/receiver_generic_test.go deleted file mode 100644 index 6d0e9520c..000000000 --- a/internal/manifests/collector/parser/receiver/receiver_generic_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package receiver_test - -import ( - "testing" - - "github.com/stretchr/testify/assert" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/parser/receiver" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestParseEndpoint(t *testing.T) { - // prepare - // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := receiver.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0:1234", - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 1) - assert.EqualValues(t, 1234, ports[0].Port) -} - -func TestFailedToParseEndpoint(t *testing.T) { - // prepare - // there's no parser registered to handle "myreceiver", so, it falls back to the generic parser - builder := receiver.NewGenericReceiverParser(logger, "myreceiver", map[interface{}]interface{}{ - "endpoint": "0.0.0.0", - }) - - // test - ports, err := builder.Ports() - - // verify - assert.NoError(t, err) - assert.Len(t, ports, 0) -} diff --git a/internal/manifests/collector/podmonitor.go b/internal/manifests/collector/podmonitor.go index 0db4ef908..0c262ea51 100644 --- a/internal/manifests/collector/podmonitor.go +++ b/internal/manifests/collector/podmonitor.go @@ -5,7 +5,6 @@ package collector import ( "fmt" - "strings" "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -13,7 +12,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) @@ -66,25 +64,8 @@ func PodMonitor(params manifests.Params) (*monitoringv1.PodMonitor, error) { return &pm, nil } +// Not used in amazon-cloudwatch-agent-operator func metricsEndpointsFromConfig(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) []monitoringv1.PodMetricsEndpoint { - config, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - logger.V(2).Error(err, "Error while parsing the configuration") - return []monitoringv1.PodMetricsEndpoint{} - } - exporterPorts, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeExporter, config) - if err != nil { - logger.Error(err, "couldn't build endpoints to podMonitors from configuration") - return []monitoringv1.PodMetricsEndpoint{} - } metricsEndpoints := []monitoringv1.PodMetricsEndpoint{} - for _, port := range exporterPorts { - if strings.Contains(port.Name, "prometheus") { - e := monitoringv1.PodMetricsEndpoint{ - Port: port.Name, - } - metricsEndpoints = append(metricsEndpoints, e) - } - } return metricsEndpoints } diff --git a/internal/manifests/collector/route.go b/internal/manifests/collector/route.go index 739f13c64..ab1bd06fa 100644 --- a/internal/manifests/collector/route.go +++ b/internal/manifests/collector/route.go @@ -11,13 +11,12 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/autodetect/openshift" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) func Routes(params manifests.Params) ([]*routev1.Route, error) { - if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute || params.Config.OpenShiftRoutesAvailability() != openshift.RoutesAvailable { + if params.OtelCol.Spec.Ingress.Type != v1alpha1.IngressTypeRoute { return nil, nil } diff --git a/internal/manifests/collector/servicemonitor.go b/internal/manifests/collector/servicemonitor.go index 77f57059b..b51f3a7eb 100644 --- a/internal/manifests/collector/servicemonitor.go +++ b/internal/manifests/collector/servicemonitor.go @@ -5,7 +5,6 @@ package collector import ( "fmt" - "strings" "github.com/go-logr/logr" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" @@ -13,7 +12,6 @@ import ( "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" ) @@ -62,28 +60,7 @@ func ServiceMonitor(params manifests.Params) (*monitoringv1.ServiceMonitor, erro return &sm, nil } +// No endpoints for service monitor currently as we need to open an endpoint from cloudwatch agent first func endpointsFromConfig(logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) []monitoringv1.Endpoint { - c, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - logger.V(2).Error(err, "Error while parsing the configuration") - return []monitoringv1.Endpoint{} - } - - exporterPorts, err := adapters.ConfigToComponentPorts(logger, adapters.ComponentTypeExporter, c) - if err != nil { - logger.Error(err, "couldn't build service monitors from configuration") - return []monitoringv1.Endpoint{} - } - - endpoints := []monitoringv1.Endpoint{} - - for _, port := range exporterPorts { - if strings.Contains(port.Name, "prometheus") { - e := monitoringv1.Endpoint{ - Port: port.Name, - } - endpoints = append(endpoints, e) - } - } - return endpoints + return []monitoringv1.Endpoint{} } diff --git a/internal/manifests/collector/servicemonitor_test.go b/internal/manifests/collector/servicemonitor_test.go deleted file mode 100644 index 729c04f3a..000000000 --- a/internal/manifests/collector/servicemonitor_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package collector - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestDesiredServiceMonitors(t *testing.T) { - params := deploymentParams() - - actual, err := ServiceMonitor(params) - assert.NoError(t, err) - assert.Nil(t, actual) - - params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true - actual, err = ServiceMonitor(params) - assert.NoError(t, err) - assert.NotNil(t, actual) - assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) - assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) - assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) - - params, err = newParams("", "testdata/prometheus-exporter.yaml") - assert.NoError(t, err) - params.OtelCol.Spec.Observability.Metrics.EnableMetrics = true - actual, err = ServiceMonitor(params) - assert.NoError(t, err) - assert.NotNil(t, actual) - assert.Equal(t, fmt.Sprintf("%s-collector", params.OtelCol.Name), actual.Name) - assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) - assert.Equal(t, "monitoring", actual.Spec.Endpoints[0].Port) - assert.Equal(t, "prometheus-dev", actual.Spec.Endpoints[1].Port) - assert.Equal(t, "prometheus-prod", actual.Spec.Endpoints[2].Port) -} diff --git a/internal/manifests/collector/testdata/config_expected_targetallocator.yaml b/internal/manifests/collector/testdata/config_expected_targetallocator.yaml deleted file mode 100644 index 8708b6315..000000000 --- a/internal/manifests/collector/testdata/config_expected_targetallocator.yaml +++ /dev/null @@ -1,22 +0,0 @@ -debug: null -exporters: null -processors: null -receivers: - prometheus: - config: - global: - evaluation_interval: 1m - scrape_interval: 1m - scrape_timeout: 10s - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://test-targetallocator:80 - interval: 30s -service: - pipelines: - metrics: - exporters: - - debug - processors: [] - receivers: - - prometheus diff --git a/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml b/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml deleted file mode 100644 index 0cbcb1f0a..000000000 --- a/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test.yaml +++ /dev/null @@ -1,25 +0,0 @@ -processors: -receivers: - prometheus: - config: - scrape_configs: - - job_name: serviceMonitor/test/test/0 - - static_configs: - - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] - labels: - my: label - - file_sd_configs: - - files: - - file2.json - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [debug] diff --git a/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml b/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml deleted file mode 100644 index 1774e5248..000000000 --- a/internal/manifests/collector/testdata/http_sd_config_servicemonitor_test_ta_set.yaml +++ /dev/null @@ -1,31 +0,0 @@ -processors: -receivers: - prometheus: - config: - scrape_configs: - - job_name: serviceMonitor/test/test/0 - - static_configs: - - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] - labels: - my: label - - file_sd_configs: - - files: - - file2.json - target_allocator: - endpoint: http://test-targetallocator:80 - interval: 30s - collector_id: ${POD_NAME} - http_sd_config: - refresh_interval: 60s - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [debug] diff --git a/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml b/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml deleted file mode 100644 index fb4c8e92b..000000000 --- a/internal/manifests/collector/testdata/http_sd_config_ta_test.yaml +++ /dev/null @@ -1,25 +0,0 @@ -processors: -receivers: - prometheus: - config: - scrape_configs: - - job_name: prometheus - - static_configs: - - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] - labels: - my: label - target_allocator: - collector_id: ${POD_NAME} - endpoint: http://test-sd-targetallocator:80 - interval: 60s - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [debug] diff --git a/internal/manifests/collector/testdata/http_sd_config_test.yaml b/internal/manifests/collector/testdata/http_sd_config_test.yaml deleted file mode 100644 index 361afa093..000000000 --- a/internal/manifests/collector/testdata/http_sd_config_test.yaml +++ /dev/null @@ -1,36 +0,0 @@ -processors: -receivers: - prometheus: - config: - scrape_configs: - - job_name: prometheus - - static_configs: - - targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"] - labels: - my: label - - file_sd_configs: - - files: - - file1.json - - - job_name: service-x - - static_configs: - - targets: ["prom.domain:1001", "prom.domain:1002", "prom.domain:1003"] - labels: - my: label - - file_sd_configs: - - files: - - file2.json - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus] - processors: [] - exporters: [debug] \ No newline at end of file diff --git a/internal/manifests/collector/testdata/ingress_testdata.yaml b/internal/manifests/collector/testdata/ingress_testdata.yaml deleted file mode 100644 index 715d16520..000000000 --- a/internal/manifests/collector/testdata/ingress_testdata.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -receivers: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:12345 - otlp/test: - protocols: - grpc: - endpoint: 0.0.0.0:98765 -exporters: - logging: - loglevel: debug - -service: - pipelines: - traces: - receivers: [otlp, otlp/test] - exporters: [nop] diff --git a/internal/manifests/collector/testdata/prometheus-exporter.yaml b/internal/manifests/collector/testdata/prometheus-exporter.yaml deleted file mode 100644 index 546d900f7..000000000 --- a/internal/manifests/collector/testdata/prometheus-exporter.yaml +++ /dev/null @@ -1,19 +0,0 @@ -receivers: - otlp: - protocols: - grpc: - http: - -exporters: - prometheus/prod: - endpoint: 0.0.0.0:8884 - - prometheus/dev: - endpoint: 0.0.0.0:8885 - -service: - pipelines: - metrics: - receivers: [otlp] - processors: [] - exporters: [prometheus/dev, prometheus/prod] diff --git a/internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml b/internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml deleted file mode 100644 index 507feb802..000000000 --- a/internal/manifests/collector/testdata/relabel_config_expected_with_sd_config.yaml +++ /dev/null @@ -1,57 +0,0 @@ -debug: null -exporters: null -processors: null -receivers: - prometheus: - config: - global: - evaluation_interval: 1m - scrape_interval: 1m - scrape_timeout: 10s - scrape_configs: - - honor_labels: true - http_sd_configs: - - url: http://test-targetallocator:80/jobs/service-x/targets?collector_id=$POD_NAME - job_name: service-x - metric_relabel_configs: - - action: keep - regex: (.*) - separator: ; - source_labels: - - label1 - - action: labelmap - regex: (.*) - separator: ; - source_labels: - - label4 - metrics_path: /metrics - relabel_configs: - - action: keep - regex: (.*) - source_labels: - - label1 - - action: replace - regex: (.*) - replacement: $$1_$$2 - separator: ; - source_labels: - - label2 - target_label: label3 - - action: labelmap - regex: (.*) - separator: ; - source_labels: - - label4 - - action: labeldrop - regex: foo_.* - scheme: http - scrape_interval: 1m - scrape_timeout: 10s -service: - pipelines: - metrics: - exporters: - - debug - processors: [] - receivers: - - prometheus diff --git a/internal/manifests/collector/testdata/relabel_config_original.yaml b/internal/manifests/collector/testdata/relabel_config_original.yaml deleted file mode 100644 index 673b4ba4a..000000000 --- a/internal/manifests/collector/testdata/relabel_config_original.yaml +++ /dev/null @@ -1,51 +0,0 @@ -exporters: -debug: -processors: -receivers: - prometheus: - config: - global: - evaluation_interval: 1m - scrape_interval: 1m - scrape_timeout: 10s - scrape_configs: - - job_name: service-x - metrics_path: /metrics - scheme: http - scrape_interval: 1m - scrape_timeout: 10s - honor_labels: true - relabel_configs: - - source_labels: [label1] - action: keep - regex: (.*) - - target_label: label3 - source_labels: [label2] - action: replace - regex: (.*) - replacement: "$$1_$$2" - separator: ";" - - source_labels: [label4] - action: labelmap - regex: (.*) - separator: ";" - - regex: foo_.* - action: labeldrop - metric_relabel_configs: - - source_labels: [label1] - action: keep - regex: (.*) - separator: ";" - - regex: (.*) - action: labelmap - separator: ";" - source_labels: [label4] - -service: - pipelines: - metrics: - exporters: - - debug - receivers: - - prometheus - processors: [] diff --git a/internal/manifests/collector/testdata/route_crd.go b/internal/manifests/collector/testdata/route_crd.go deleted file mode 100644 index d8660e239..000000000 --- a/internal/manifests/collector/testdata/route_crd.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package testdata - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OpenShiftRouteCRD as go structure. -var OpenShiftRouteCRD = &apiextensionsv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "routes.route.openshift.io", - }, - Spec: apiextensionsv1.CustomResourceDefinitionSpec{ - Group: "route.openshift.io", - Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ - { - Name: "v1", - Served: true, - Storage: true, - Schema: &apiextensionsv1.CustomResourceValidation{ - OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ - Type: "object", - XPreserveUnknownFields: func(v bool) *bool { return &v }(true), - }, - }, - AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ - { - Name: "Host", - Type: "string", - JSONPath: ".status.ingress[0].host", - }, - { - Name: "Admitted", - Type: "string", - JSONPath: `.status.ingress[0].conditions[?(@.type=="Admitted")].status`, - }, - { - Name: "Service", - Type: "string", - JSONPath: ".spec.to.name", - }, - { - Name: "TLS", - Type: "string", - JSONPath: ".spec.tls.type", - }, - }, - Subresources: &apiextensionsv1.CustomResourceSubresources{ - Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, - }, - }, - }, - Scope: apiextensionsv1.NamespaceScoped, - Names: apiextensionsv1.CustomResourceDefinitionNames{ - Plural: "routes", - Singular: "route", - Kind: "Route", - }, - }, -} diff --git a/internal/manifests/collector/testdata/sm_crd.go b/internal/manifests/collector/testdata/sm_crd.go deleted file mode 100644 index 1652022b6..000000000 --- a/internal/manifests/collector/testdata/sm_crd.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package testdata - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ServiceMonitorCRD as go structure. -var ServiceMonitorCRD = &apiextensionsv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - Name: "servicemonitors.monitoring.coreos.com", - }, - Spec: apiextensionsv1.CustomResourceDefinitionSpec{ - Group: "monitoring.coreos.com", - Versions: []apiextensionsv1.CustomResourceDefinitionVersion{ - { - Name: "v1", - Served: true, - Storage: true, - Schema: &apiextensionsv1.CustomResourceValidation{ - OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ - Type: "object", - XPreserveUnknownFields: func(v bool) *bool { return &v }(true), - }, - }, - Subresources: &apiextensionsv1.CustomResourceSubresources{ - Status: &apiextensionsv1.CustomResourceSubresourceStatus{}, - }, - }, - }, - Scope: apiextensionsv1.NamespaceScoped, - Names: apiextensionsv1.CustomResourceDefinitionNames{ - Plural: "servicemonitors", - Singular: "servicemonitor", - Kind: "ServiceMonitor", - }, - }, -} diff --git a/internal/manifests/collector/testdata/test.yaml b/internal/manifests/collector/testdata/test.yaml deleted file mode 100644 index 4e95f681d..000000000 --- a/internal/manifests/collector/testdata/test.yaml +++ /dev/null @@ -1,22 +0,0 @@ -processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [debug] \ No newline at end of file diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config.go b/internal/manifests/targetallocator/adapters/config_to_prom_config.go deleted file mode 100644 index cb69435ac..000000000 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config.go +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters - -import ( - "errors" - "fmt" - "net/url" - "regexp" - "strings" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" -) - -func errorNoComponent(component string) error { - return fmt.Errorf("no %s available as part of the configuration", component) -} - -func errorNotAMapAtIndex(component string, index int) error { - return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid map: %s", index, component, component) -} - -func errorNotAMap(component string) error { - return fmt.Errorf("%s property in the configuration doesn't contain valid %s", component, component) -} - -func errorNotAList(component string) error { - return fmt.Errorf("%s must be a list in the config", component) -} - -func errorNotAListAtIndex(component string, index int) error { - return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid index: %s", index, component, component) -} - -func errorNotAStringAtIndex(component string, index int) error { - return fmt.Errorf("index %d: %s property in the configuration doesn't contain a valid string: %s", index, component, component) -} - -// getScrapeConfigsFromPromConfig extracts the scrapeConfig array from prometheus receiver config. -func getScrapeConfigsFromPromConfig(promReceiverConfig map[interface{}]interface{}) ([]interface{}, error) { - prometheusConfigProperty, ok := promReceiverConfig["config"] - if !ok { - return nil, errorNoComponent("prometheusConfig") - } - - prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheusConfig") - } - - scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] - if !ok { - return nil, errorNoComponent("scrape_configs") - } - - scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) - if !ok { - return nil, errorNotAList("scrape_configs") - } - - return scrapeConfigs, nil -} - -// ConfigToPromConfig converts the incoming configuration object into the Prometheus receiver config. -func ConfigToPromConfig(cfg string) (map[interface{}]interface{}, error) { - config, err := adapters.ConfigFromString(cfg) - if err != nil { - return nil, err - } - - receiversProperty, ok := config["receivers"] - if !ok { - return nil, errorNoComponent("receivers") - } - - receivers, ok := receiversProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("receivers") - } - - prometheusProperty, ok := receivers["prometheus"] - if !ok { - return nil, errorNoComponent("prometheus") - } - - prometheus, ok := prometheusProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheus") - } - - return prometheus, nil -} - -// UnescapeDollarSignsInPromConfig replaces "$$" with "$" in the "replacement" fields of -// both "relabel_configs" and "metric_relabel_configs" in a Prometheus configuration file. -func UnescapeDollarSignsInPromConfig(cfg string) (map[interface{}]interface{}, error) { - prometheus, err := ConfigToPromConfig(cfg) - if err != nil { - return nil, err - } - - scrapeConfigs, err := getScrapeConfigsFromPromConfig(prometheus) - if err != nil { - return nil, err - } - - for i, config := range scrapeConfigs { - scrapeConfig, ok := config.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMapAtIndex("scrape_config", i) - } - - relabelConfigsProperty, ok := scrapeConfig["relabel_configs"] - if !ok { - continue - } - - relabelConfigs, ok := relabelConfigsProperty.([]interface{}) - if !ok { - return nil, errorNotAListAtIndex("relabel_configs", i) - } - - for i, rc := range relabelConfigs { - relabelConfig, rcErr := rc.(map[interface{}]interface{}) - if !rcErr { - return nil, errorNotAMapAtIndex("relabel_config", i) - } - - replacementProperty, rcErr := relabelConfig["replacement"] - if !rcErr { - continue - } - - replacement, rcErr := replacementProperty.(string) - if !rcErr { - return nil, errorNotAStringAtIndex("replacement", i) - } - - relabelConfig["replacement"] = strings.ReplaceAll(replacement, "$$", "$") - } - - metricRelabelConfigsProperty, ok := scrapeConfig["metric_relabel_configs"] - if !ok { - continue - } - - metricRelabelConfigs, ok := metricRelabelConfigsProperty.([]interface{}) - if !ok { - return nil, errorNotAListAtIndex("metric_relabel_configs", i) - } - - for i, rc := range metricRelabelConfigs { - relabelConfig, ok := rc.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMapAtIndex("metric_relabel_config", i) - } - - replacementProperty, ok := relabelConfig["replacement"] - if !ok { - continue - } - - replacement, ok := replacementProperty.(string) - if !ok { - return nil, errorNotAStringAtIndex("replacement", i) - } - - relabelConfig["replacement"] = strings.ReplaceAll(replacement, "$$", "$") - } - } - - return prometheus, nil -} - -// AddHTTPSDConfigToPromConfig adds HTTP SD (Service Discovery) configuration to the Prometheus configuration. -// This function removes any existing service discovery configurations (e.g., `sd_configs`, `dns_sd_configs`, `file_sd_configs`, etc.) -// from the `scrape_configs` section and adds a single `http_sd_configs` configuration. -// The `http_sd_configs` points to the TA (Target Allocator) endpoint that provides the list of targets for the given job. -func AddHTTPSDConfigToPromConfig(prometheus map[interface{}]interface{}, taServiceName string) (map[interface{}]interface{}, error) { - prometheusConfigProperty, ok := prometheus["config"] - if !ok { - return nil, errorNoComponent("prometheusConfig") - } - - prometheusConfig, ok := prometheusConfigProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheusConfig") - } - - scrapeConfigsProperty, ok := prometheusConfig["scrape_configs"] - if !ok { - return nil, errorNoComponent("scrape_configs") - } - - scrapeConfigs, ok := scrapeConfigsProperty.([]interface{}) - if !ok { - return nil, errorNotAList("scrape_configs") - } - - sdRegex := regexp.MustCompile(`^.*(sd|static)_configs$`) - - for i, config := range scrapeConfigs { - scrapeConfig, ok := config.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMapAtIndex("scrape_config", i) - } - - // Check for other types of service discovery configs (e.g. dns_sd_configs, file_sd_configs, etc.) - for key := range scrapeConfig { - keyStr, keyErr := key.(string) - if !keyErr { - continue - } - if sdRegex.MatchString(keyStr) { - delete(scrapeConfig, key) - } - } - - jobNameProperty, ok := scrapeConfig["job_name"] - if !ok { - return nil, errorNotAStringAtIndex("job_name", i) - } - - jobName, ok := jobNameProperty.(string) - if !ok { - return nil, errorNotAStringAtIndex("job_name is not a string", i) - } - - escapedJob := url.QueryEscape(jobName) - scrapeConfig["http_sd_configs"] = []interface{}{ - map[string]interface{}{ - "url": fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", taServiceName, escapedJob), - }, - } - } - - return prometheus, nil -} - -// AddTAConfigToPromConfig adds or updates the target_allocator configuration in the Prometheus configuration. -// If the `EnableTargetAllocatorRewrite` feature flag for the target allocator is enabled, this function -// removes the existing scrape_configs from the collector's Prometheus configuration as it's not required. -func AddTAConfigToPromConfig(prometheus map[interface{}]interface{}, taServiceName string) (map[interface{}]interface{}, error) { - prometheusConfigProperty, ok := prometheus["config"] - if !ok { - return nil, errorNoComponent("prometheusConfig") - } - - prometheusCfg, ok := prometheusConfigProperty.(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("prometheusConfig") - } - - // Create the TargetAllocConfig dynamically if it doesn't exist - if prometheus["target_allocator"] == nil { - prometheus["target_allocator"] = make(map[interface{}]interface{}) - } - - targetAllocatorCfg, ok := prometheus["target_allocator"].(map[interface{}]interface{}) - if !ok { - return nil, errorNotAMap("target_allocator") - } - - targetAllocatorCfg["endpoint"] = fmt.Sprintf("http://%s:80", taServiceName) - targetAllocatorCfg["interval"] = "30s" - targetAllocatorCfg["collector_id"] = "${POD_NAME}" - - // Remove the scrape_configs key from the map - delete(prometheusCfg, "scrape_configs") - - return prometheus, nil -} - -// ValidatePromConfig checks if the prometheus receiver config is valid given other collector-level settings. -func ValidatePromConfig(config map[interface{}]interface{}, targetAllocatorEnabled bool, targetAllocatorRewriteEnabled bool) error { - _, promConfigExists := config["config"] - - if targetAllocatorEnabled { - if targetAllocatorRewriteEnabled { // if rewrite is enabled, we will add a target_allocator section during rewrite - return nil - } - _, targetAllocatorExists := config["target_allocator"] - - // otherwise, either the target_allocator or config section needs to be here - if !(promConfigExists || targetAllocatorExists) { - return errors.New("either target allocator or prometheus config needs to be present") - } - - return nil - } - // if target allocator isn't enabled, we need a config section - if !promConfigExists { - return errorNoComponent("prometheusConfig") - } - - return nil -} - -// ValidateTargetAllocatorConfig checks if the Target Allocator config is valid -// In order for Target Allocator to do anything useful, at least one of the following has to be true: -// - at least one scrape config has to be defined in Prometheus receiver configuration -// - PrometheusCR has to be enabled in target allocator settings -func ValidateTargetAllocatorConfig(targetAllocatorPrometheusCR bool, promReceiverConfig map[interface{}]interface{}) error { - - if targetAllocatorPrometheusCR { - return nil - } - // if PrometheusCR isn't enabled, we need at least one scrape config - scrapeConfigs, err := getScrapeConfigsFromPromConfig(promReceiverConfig) - if err != nil { - return err - } - - if len(scrapeConfigs) == 0 { - return fmt.Errorf("either at least one scrape config needs to be defined or PrometheusCR needs to be enabled") - } - - return nil -} diff --git a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go b/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go deleted file mode 100644 index 0fe2e8c26..000000000 --- a/internal/manifests/targetallocator/adapters/config_to_prom_config_test.go +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package adapters_test - -import ( - "errors" - "fmt" - "net/url" - "reflect" - "testing" - - ta "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - - "github.com/stretchr/testify/assert" -) - -func TestExtractPromConfigFromConfig(t *testing.T) { - configStr := `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" - examplereceiver/settings: - endpoint: "0.0.0.0:12346" - prometheus: - config: - scrape_config: - job_name: otel-collector - scrape_interval: 10s - jaeger/custom: - protocols: - thrift_http: - endpoint: 0.0.0.0:15268 -` - expectedData := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_config": map[interface{}]interface{}{ - "job_name": "otel-collector", - "scrape_interval": "10s", - }, - }, - } - - // test - promConfig, err := ta.ConfigToPromConfig(configStr) - assert.NoError(t, err) - - // verify - assert.Equal(t, expectedData, promConfig) -} - -func TestExtractPromConfigWithTAConfigFromConfig(t *testing.T) { - configStr := `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" - examplereceiver/settings: - endpoint: "0.0.0.0:12346" - prometheus: - config: - scrape_config: - job_name: otel-collector - scrape_interval: 10s - target_allocator: - endpoint: "test:80" - jaeger/custom: - protocols: - thrift_http: - endpoint: 0.0.0.0:15268 -` - expectedData := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_config": map[interface{}]interface{}{ - "job_name": "otel-collector", - "scrape_interval": "10s", - }, - }, - "target_allocator": map[interface{}]interface{}{ - "endpoint": "test:80", - }, - } - - // test - promConfig, err := ta.ConfigToPromConfig(configStr) - assert.NoError(t, err) - - // verify - assert.Equal(t, expectedData, promConfig) -} - -func TestExtractPromConfigFromNullConfig(t *testing.T) { - configStr := `receivers: - examplereceiver: - endpoint: "0.0.0.0:12345" - examplereceiver/settings: - endpoint: "0.0.0.0:12346" - jaeger/custom: - protocols: - thrift_http: - endpoint: 0.0.0.0:15268 -` - - // test - promConfig, err := ta.ConfigToPromConfig(configStr) - assert.Equal(t, err, fmt.Errorf("no prometheus available as part of the configuration")) - - // verify - assert.True(t, reflect.ValueOf(promConfig).IsNil()) -} - -func TestUnescapeDollarSignsInPromConfig(t *testing.T) { - actual := ` -receivers: - prometheus: - config: - scrape_configs: - - job_name: 'example' - relabel_configs: - - source_labels: ['__meta_service_id'] - target_label: 'job' - replacement: 'my_service_$$1' - - source_labels: ['__meta_service_name'] - target_label: 'instance' - replacement: '$1' - metric_relabel_configs: - - source_labels: ['job'] - target_label: 'job' - replacement: '$$1_$2' -` - expected := ` -receivers: - prometheus: - config: - scrape_configs: - - job_name: 'example' - relabel_configs: - - source_labels: ['__meta_service_id'] - target_label: 'job' - replacement: 'my_service_$1' - - source_labels: ['__meta_service_name'] - target_label: 'instance' - replacement: '$1' - metric_relabel_configs: - - source_labels: ['job'] - target_label: 'job' - replacement: '$1_$2' -` - - config, err := ta.UnescapeDollarSignsInPromConfig(actual) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - expectedConfig, err := ta.UnescapeDollarSignsInPromConfig(expected) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - if !reflect.DeepEqual(config, expectedConfig) { - t.Errorf("unexpected config: got %v, want %v", config, expectedConfig) - } -} - -func TestAddHTTPSDConfigToPromConfig(t *testing.T) { - t.Run("ValidConfiguration, add http_sd_config", func(t *testing.T) { - cfg := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{ - map[interface{}]interface{}{ - "job_name": "test_job", - "static_configs": []interface{}{ - map[interface{}]interface{}{ - "targets": []interface{}{ - "localhost:9090", - }, - }, - }, - }, - }, - }, - } - taServiceName := "test-service" - expectedCfg := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{ - map[interface{}]interface{}{ - "job_name": "test_job", - "http_sd_configs": []interface{}{ - map[string]interface{}{ - "url": fmt.Sprintf("http://%s:80/jobs/%s/targets?collector_id=$POD_NAME", taServiceName, url.QueryEscape("test_job")), - }, - }, - }, - }, - }, - } - - actualCfg, err := ta.AddHTTPSDConfigToPromConfig(cfg, taServiceName) - assert.NoError(t, err) - assert.Equal(t, expectedCfg, actualCfg) - }) - - t.Run("invalid config property, returns error", func(t *testing.T) { - cfg := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "job_name": "test_job", - "static_configs": []interface{}{ - map[interface{}]interface{}{ - "targets": []interface{}{ - "localhost:9090", - }, - }, - }, - }, - } - - taServiceName := "test-service" - - _, err := ta.AddHTTPSDConfigToPromConfig(cfg, taServiceName) - assert.Error(t, err) - assert.EqualError(t, err, "no scrape_configs available as part of the configuration") - }) -} - -func TestAddTAConfigToPromConfig(t *testing.T) { - t.Run("should return expected prom config map with TA config", func(t *testing.T) { - cfg := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{ - map[interface{}]interface{}{ - "job_name": "test_job", - "static_configs": []interface{}{ - map[interface{}]interface{}{ - "targets": []interface{}{ - "localhost:9090", - }, - }, - }, - }, - }, - }, - } - - taServiceName := "test-targetallocator" - - expectedResult := map[interface{}]interface{}{ - "config": map[interface{}]interface{}{}, - "target_allocator": map[interface{}]interface{}{ - "endpoint": "http://test-targetallocator:80", - "interval": "30s", - "collector_id": "${POD_NAME}", - }, - } - - result, err := ta.AddTAConfigToPromConfig(cfg, taServiceName) - - assert.NoError(t, err) - assert.Equal(t, expectedResult, result) - }) - - t.Run("missing or invalid prometheusConfig property, returns error", func(t *testing.T) { - testCases := []struct { - name string - cfg map[interface{}]interface{} - errText string - }{ - { - name: "missing config property", - cfg: map[interface{}]interface{}{}, - errText: "no prometheusConfig available as part of the configuration", - }, - { - name: "invalid config property", - cfg: map[interface{}]interface{}{ - "config": "invalid", - }, - errText: "prometheusConfig property in the configuration doesn't contain valid prometheusConfig", - }, - } - - taServiceName := "test-targetallocator" - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - _, err := ta.AddTAConfigToPromConfig(tc.cfg, taServiceName) - - assert.Error(t, err) - assert.EqualError(t, err, tc.errText) - }) - } - }) -} - -func TestValidatePromConfig(t *testing.T) { - testCases := []struct { - description string - config map[interface{}]interface{} - targetAllocatorEnabled bool - targetAllocatorRewriteEnabled bool - expectedError error - }{ - { - description: "target_allocator and rewrite enabled", - config: map[interface{}]interface{}{}, - targetAllocatorEnabled: true, - targetAllocatorRewriteEnabled: true, - expectedError: nil, - }, - { - description: "target_allocator enabled, target_allocator section present", - config: map[interface{}]interface{}{ - "target_allocator": map[interface{}]interface{}{}, - }, - targetAllocatorEnabled: true, - targetAllocatorRewriteEnabled: false, - expectedError: nil, - }, - { - description: "target_allocator enabled, config section present", - config: map[interface{}]interface{}{ - "config": map[interface{}]interface{}{}, - }, - targetAllocatorEnabled: true, - targetAllocatorRewriteEnabled: false, - expectedError: nil, - }, - { - description: "target_allocator enabled, neither section present", - config: map[interface{}]interface{}{}, - targetAllocatorEnabled: true, - targetAllocatorRewriteEnabled: false, - expectedError: errors.New("either target allocator or prometheus config needs to be present"), - }, - { - description: "target_allocator disabled, config section present", - config: map[interface{}]interface{}{ - "config": map[interface{}]interface{}{}, - }, - targetAllocatorEnabled: false, - targetAllocatorRewriteEnabled: false, - expectedError: nil, - }, - { - description: "target_allocator disabled, config section not present", - config: map[interface{}]interface{}{}, - targetAllocatorEnabled: false, - targetAllocatorRewriteEnabled: false, - expectedError: fmt.Errorf("no %s available as part of the configuration", "prometheusConfig"), - }, - } - - for _, testCase := range testCases { - testCase := testCase - t.Run(testCase.description, func(t *testing.T) { - err := ta.ValidatePromConfig(testCase.config, testCase.targetAllocatorEnabled, testCase.targetAllocatorRewriteEnabled) - assert.Equal(t, testCase.expectedError, err) - }) - } -} - -func TestValidateTargetAllocatorConfig(t *testing.T) { - testCases := []struct { - description string - config map[interface{}]interface{} - targetAllocatorPrometheusCR bool - expectedError error - }{ - { - description: "scrape configs present and PrometheusCR enabled", - config: map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{ - map[interface{}]interface{}{ - "job_name": "test_job", - "static_configs": []interface{}{ - map[interface{}]interface{}{ - "targets": []interface{}{ - "localhost:9090", - }, - }, - }, - }, - }, - }, - }, - targetAllocatorPrometheusCR: true, - expectedError: nil, - }, - { - description: "scrape configs present and PrometheusCR disabled", - config: map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{ - map[interface{}]interface{}{ - "job_name": "test_job", - "static_configs": []interface{}{ - map[interface{}]interface{}{ - "targets": []interface{}{ - "localhost:9090", - }, - }, - }, - }, - }, - }, - }, - targetAllocatorPrometheusCR: false, - expectedError: nil, - }, - { - description: "receiver config empty and PrometheusCR enabled", - config: map[interface{}]interface{}{}, - targetAllocatorPrometheusCR: true, - expectedError: nil, - }, - { - description: "receiver config empty and PrometheusCR disabled", - config: map[interface{}]interface{}{}, - targetAllocatorPrometheusCR: false, - expectedError: fmt.Errorf("no %s available as part of the configuration", "prometheusConfig"), - }, - { - description: "scrape configs empty and PrometheusCR disabled", - config: map[interface{}]interface{}{ - "config": map[interface{}]interface{}{ - "scrape_configs": []interface{}{}, - }, - }, - targetAllocatorPrometheusCR: false, - expectedError: fmt.Errorf("either at least one scrape config needs to be defined or PrometheusCR needs to be enabled"), - }, - } - - for _, testCase := range testCases { - testCase := testCase - t.Run(testCase.description, func(t *testing.T) { - err := ta.ValidateTargetAllocatorConfig(testCase.targetAllocatorPrometheusCR, testCase.config) - assert.Equal(t, testCase.expectedError, err) - }) - } -} diff --git a/internal/manifests/targetallocator/annotations.go b/internal/manifests/targetallocator/annotations.go deleted file mode 100644 index 4875d5f79..000000000 --- a/internal/manifests/targetallocator/annotations.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "crypto/sha256" - "fmt" - - v1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -const configMapHashAnnotationKey = "opentelemetry-targetallocator-config/hash" - -// Annotations returns the annotations for the TargetAllocator Pod. -func Annotations(instance v1alpha1.AmazonCloudWatchAgent, configMap *v1.ConfigMap) map[string]string { - // Make a copy of PodAnnotations to be safe - annotations := make(map[string]string, len(instance.Spec.PodAnnotations)) - for key, value := range instance.Spec.PodAnnotations { - annotations[key] = value - } - - if configMap != nil { - cmHash := getConfigMapSHA(configMap) - if cmHash != "" { - annotations[configMapHashAnnotationKey] = getConfigMapSHA(configMap) - } - } - - return annotations -} - -// getConfigMapSHA returns the hash of the content of the TA ConfigMap. -func getConfigMapSHA(configMap *v1.ConfigMap) string { - configString, ok := configMap.Data[targetAllocatorFilename] - if !ok { - return "" - } - h := sha256.Sum256([]byte(configString)) - return fmt.Sprintf("%x", h) -} diff --git a/internal/manifests/targetallocator/annotations_test.go b/internal/manifests/targetallocator/annotations_test.go deleted file mode 100644 index 58b998791..000000000 --- a/internal/manifests/targetallocator/annotations_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "crypto/sha256" - "fmt" - "testing" - - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -func TestPodAnnotations(t *testing.T) { - instance := collectorInstance() - instance.Spec.PodAnnotations = map[string]string{ - "key": "value", - } - annotations := Annotations(instance, nil) - assert.Subset(t, annotations, instance.Spec.PodAnnotations) -} - -func TestConfigMapHash(t *testing.T) { - cfg := config.New() - instance := collectorInstance() - params := manifests.Params{ - OtelCol: instance, - Config: cfg, - Log: logr.Discard(), - } - expectedConfigMap, err := ConfigMap(params) - require.NoError(t, err) - expectedConfig := expectedConfigMap.Data[targetAllocatorFilename] - require.NotEmpty(t, expectedConfig) - expectedHash := sha256.Sum256([]byte(expectedConfig)) - annotations := Annotations(instance, expectedConfigMap) - require.Contains(t, annotations, configMapHashAnnotationKey) - cmHash := annotations[configMapHashAnnotationKey] - assert.Equal(t, fmt.Sprintf("%x", expectedHash), cmHash) -} - -func TestInvalidConfigNoHash(t *testing.T) { - instance := collectorInstance() - instance.Spec.Config = "" - annotations := Annotations(instance, nil) - require.NotContains(t, annotations, configMapHashAnnotationKey) -} diff --git a/internal/manifests/targetallocator/configmap.go b/internal/manifests/targetallocator/configmap.go deleted file mode 100644 index 99a0bbfd1..000000000 --- a/internal/manifests/targetallocator/configmap.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "gopkg.in/yaml.v2" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/targetallocator/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -const ( - targetAllocatorFilename = "targetallocator.yaml" -) - -func ConfigMap(params manifests.Params) (*corev1.ConfigMap, error) { - name := naming.TAConfigMap(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - // Collector supports environment variable substitution, but the TA does not. - // TA ConfigMap should have a single "$", as it does not support env var substitution - prometheusReceiverConfig, err := adapters.UnescapeDollarSignsInPromConfig(params.OtelCol.Spec.Config) - if err != nil { - return &corev1.ConfigMap{}, err - } - - taConfig := make(map[interface{}]interface{}) - prometheusCRConfig := make(map[interface{}]interface{}) - taConfig["label_selector"] = manifestutils.SelectorLabels(params.OtelCol.ObjectMeta, collector.ComponentAmazonCloudWatchAgent) - // We only take the "config" from the returned object, if it's present - if prometheusConfig, ok := prometheusReceiverConfig["config"]; ok { - taConfig["config"] = prometheusConfig - } - - if len(params.OtelCol.Spec.TargetAllocator.AllocationStrategy) > 0 { - taConfig["allocation_strategy"] = params.OtelCol.Spec.TargetAllocator.AllocationStrategy - } else { - taConfig["allocation_strategy"] = v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted - } - - if len(params.OtelCol.Spec.TargetAllocator.FilterStrategy) > 0 { - taConfig["filter_strategy"] = params.OtelCol.Spec.TargetAllocator.FilterStrategy - } - - if params.OtelCol.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Size() > 0 { - prometheusCRConfig["scrape_interval"] = params.OtelCol.Spec.TargetAllocator.PrometheusCR.ScrapeInterval.Duration - } - - if params.OtelCol.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector != nil { - taConfig["service_monitor_selector"] = ¶ms.OtelCol.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector - } - - if params.OtelCol.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector != nil { - taConfig["pod_monitor_selector"] = ¶ms.OtelCol.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector - } - - if len(prometheusCRConfig) > 0 { - taConfig["prometheus_cr"] = prometheusCRConfig - } - - taConfigYAML, err := yaml.Marshal(taConfig) - if err != nil { - return &corev1.ConfigMap{}, err - } - - return &corev1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OtelCol.Namespace, - Labels: labels, - Annotations: params.OtelCol.Annotations, - }, - Data: map[string]string{ - targetAllocatorFilename: string(taConfigYAML), - }, - }, nil -} diff --git a/internal/manifests/targetallocator/configmap_test.go b/internal/manifests/targetallocator/configmap_test.go deleted file mode 100644 index 1d1cd2617..000000000 --- a/internal/manifests/targetallocator/configmap_test.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - "time" - - "github.com/go-logr/logr" - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -func TestDesiredConfigMap(t *testing.T) { - expectedLables := map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - "app.kubernetes.io/instance": "default.my-instance", - "app.kubernetes.io/part-of": "opentelemetry", - "app.kubernetes.io/version": "0.47.0", - } - - t.Run("should return expected target allocator config map", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" - - expectedData := map[string]string{ - "targetallocator.yaml": `allocation_strategy: least-weighted -config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: - - 0.0.0.0:8888 - - 0.0.0.0:9999 -label_selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator - app.kubernetes.io/part-of: opentelemetry -`, - } - instance := collectorInstance() - cfg := config.New() - params := manifests.Params{ - OtelCol: instance, - Config: cfg, - Log: logr.Discard(), - } - actual, err := ConfigMap(params) - assert.NoError(t, err) - - assert.Equal(t, "my-instance-targetallocator", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - t.Run("should return expected target allocator config map with label selectors", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" - - expectedData := map[string]string{ - "targetallocator.yaml": `allocation_strategy: least-weighted -config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: - - 0.0.0.0:8888 - - 0.0.0.0:9999 -label_selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator - app.kubernetes.io/part-of: opentelemetry -pod_monitor_selector: - release: my-instance -service_monitor_selector: - release: my-instance -`, - } - instance := collectorInstance() - instance.Spec.TargetAllocator.PrometheusCR.PodMonitorSelector = map[string]string{ - "release": "my-instance", - } - instance.Spec.TargetAllocator.PrometheusCR.ServiceMonitorSelector = map[string]string{ - "release": "my-instance", - } - cfg := config.New() - params := manifests.Params{ - OtelCol: instance, - Config: cfg, - Log: logr.Discard(), - } - actual, err := ConfigMap(params) - assert.NoError(t, err) - - assert.Equal(t, "my-instance-targetallocator", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - t.Run("should return expected target allocator config map with scrape interval set", func(t *testing.T) { - expectedLables["app.kubernetes.io/component"] = "opentelemetry-targetallocator" - expectedLables["app.kubernetes.io/name"] = "my-instance-targetallocator" - - expectedData := map[string]string{ - "targetallocator.yaml": `allocation_strategy: least-weighted -config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: - - 0.0.0.0:8888 - - 0.0.0.0:9999 -label_selector: - app.kubernetes.io/component: opentelemetry-collector - app.kubernetes.io/instance: default.my-instance - app.kubernetes.io/managed-by: amazon-cloudwatch-agent-operator - app.kubernetes.io/part-of: opentelemetry -prometheus_cr: - scrape_interval: 30s -`, - } - - collector := collectorInstance() - collector.Spec.TargetAllocator.PrometheusCR.ScrapeInterval = &metav1.Duration{Duration: time.Second * 30} - cfg := config.New() - params := manifests.Params{ - OtelCol: collector, - Config: cfg, - Log: logr.Discard(), - } - actual, err := ConfigMap(params) - assert.NoError(t, err) - - assert.Equal(t, "my-instance-targetallocator", actual.Name) - assert.Equal(t, expectedLables, actual.Labels) - assert.Equal(t, expectedData, actual.Data) - - }) - -} diff --git a/internal/manifests/targetallocator/container.go b/internal/manifests/targetallocator/container.go deleted file mode 100644 index 7a6931c9a..000000000 --- a/internal/manifests/targetallocator/container.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "github.com/go-logr/logr" - "github.com/operator-framework/operator-lib/proxy" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Container builds a container for the given TargetAllocator. -func Container(cfg config.Config, logger logr.Logger, otelcol v1alpha1.AmazonCloudWatchAgent) corev1.Container { - image := otelcol.Spec.TargetAllocator.Image - if len(image) == 0 { - image = cfg.TargetAllocatorImage() - } - - ports := make([]corev1.ContainerPort, 0) - ports = append(ports, corev1.ContainerPort{ - Name: "http", - ContainerPort: 8080, - Protocol: corev1.ProtocolTCP, - }) - - volumeMounts := []corev1.VolumeMount{{ - Name: naming.TAConfigMapVolume(), - MountPath: "/conf", - }} - - var envVars = otelcol.Spec.TargetAllocator.Env - if otelcol.Spec.TargetAllocator.Env == nil { - envVars = []corev1.EnvVar{} - } - - idx := -1 - for i := range envVars { - if envVars[i].Name == "OTELCOL_NAMESPACE" { - idx = i - } - } - if idx == -1 { - envVars = append(envVars, corev1.EnvVar{ - Name: "OTELCOL_NAMESPACE", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - FieldPath: "metadata.namespace", - }, - }, - }) - } - - var args []string - if otelcol.Spec.TargetAllocator.PrometheusCR.Enabled { - args = append(args, "--enable-prometheus-cr-watcher") - } - readinessProbe := &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - } - livenessProbe := &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - } - - envVars = append(envVars, proxy.ReadProxyVarsFromEnv()...) - return corev1.Container{ - Name: naming.TAContainer(), - Image: image, - Ports: ports, - Env: envVars, - VolumeMounts: volumeMounts, - Resources: otelcol.Spec.TargetAllocator.Resources, - Args: args, - LivenessProbe: livenessProbe, - ReadinessProbe: readinessProbe, - } -} diff --git a/internal/manifests/targetallocator/container_test.go b/internal/manifests/targetallocator/container_test.go deleted file mode 100644 index e1aad5a68..000000000 --- a/internal/manifests/targetallocator/container_test.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/apimachinery/pkg/util/intstr" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestContainerNewDefault(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{} - cfg := config.New(config.WithTargetAllocatorImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, "default-image", c.Image) -} - -func TestContainerWithImageOverridden(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Image: "overridden-image", - }, - }, - } - cfg := config.New(config.WithTargetAllocatorImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, "overridden-image", c.Image) -} - -func TestContainerPorts(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Image: "default-image", - }, - }, - } - cfg := config.New() - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Len(t, c.Ports, 1) - assert.Equal(t, "http", c.Ports[0].Name) - assert.Equal(t, int32(8080), c.Ports[0].ContainerPort) -} - -func TestContainerVolumes(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Image: "default-image", - }, - }, - } - cfg := config.New() - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Len(t, c.VolumeMounts, 1) - assert.Equal(t, naming.TAConfigMapVolume(), c.VolumeMounts[0].Name) -} - -func TestContainerResourceRequirements(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Resources: corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("128M"), - }, - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("200m"), - corev1.ResourceMemory: resource.MustParse("256M"), - }, - }, - }, - }, - } - - cfg := config.New() - resourceTest := corev1.ResourceRequirements{ - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("128M"), - }, - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("200m"), - corev1.ResourceMemory: resource.MustParse("256M"), - }, - } - // test - c := Container(cfg, logger, otelcol) - resourcesValues := c.Resources - - // verify - assert.Equal(t, resourceTest, resourcesValues) -} - -func TestContainerHasEnvVars(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Env: []corev1.EnvVar{ - { - Name: "TEST_ENV", - Value: "test", - }, - }, - }, - }, - } - cfg := config.New(config.WithTargetAllocatorImage("default-image")) - - expected := corev1.Container{ - Name: "ta-container", - Image: "default-image", - Env: []corev1.EnvVar{ - { - Name: "TEST_ENV", - Value: "test", - }, - { - Name: "OTELCOL_NAMESPACE", - Value: "", - ValueFrom: &corev1.EnvVarSource{ - FieldRef: &corev1.ObjectFieldSelector{ - APIVersion: "", - FieldPath: "metadata.namespace", - }, - ResourceFieldRef: nil, - ConfigMapKeyRef: nil, - SecretKeyRef: nil, - }, - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "ta-internal", - ReadOnly: false, - MountPath: "/conf", - SubPath: "", - MountPropagation: nil, - SubPathExpr: "", - }, - }, - Ports: []corev1.ContainerPort{ - { - Name: "http", - ContainerPort: 8080, - Protocol: corev1.ProtocolTCP, - }, - }, - ReadinessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - }, - LivenessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - }, - } - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, expected, c) -} - -func TestContainerHasProxyEnvVars(t *testing.T) { - err := os.Setenv("NO_PROXY", "localhost") - require.NoError(t, err) - defer os.Unsetenv("NO_PROXY") - - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Env: []corev1.EnvVar{ - { - Name: "TEST_ENV", - Value: "test", - }, - }, - }, - }, - } - cfg := config.New(config.WithTargetAllocatorImage("default-image")) - - // test - c := Container(cfg, logger, otelcol) - - // verify - require.Len(t, c.Env, 4) - assert.Equal(t, corev1.EnvVar{Name: "NO_PROXY", Value: "localhost"}, c.Env[2]) - assert.Equal(t, corev1.EnvVar{Name: "no_proxy", Value: "localhost"}, c.Env[3]) -} - -func TestContainerDoesNotOverrideEnvVars(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - Env: []corev1.EnvVar{ - { - Name: "OTELCOL_NAMESPACE", - Value: "test", - }, - }, - }, - }, - } - cfg := config.New(config.WithTargetAllocatorImage("default-image")) - - expected := corev1.Container{ - Name: "ta-container", - Image: "default-image", - Env: []corev1.EnvVar{ - { - Name: "OTELCOL_NAMESPACE", - Value: "test", - }, - }, - VolumeMounts: []corev1.VolumeMount{ - { - Name: "ta-internal", - ReadOnly: false, - MountPath: "/conf", - SubPath: "", - MountPropagation: nil, - SubPathExpr: "", - }, - }, - Ports: []corev1.ContainerPort{ - { - Name: "http", - ContainerPort: 8080, - Protocol: corev1.ProtocolTCP, - }, - }, - ReadinessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - }, - LivenessProbe: &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - }, - } - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, expected, c) -} -func TestReadinessProbe(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - }, - }, - } - cfg := config.New() - expected := &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/readyz", - Port: intstr.FromInt(8080), - }, - }, - } - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, expected, c.ReadinessProbe) -} -func TestLivenessProbe(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Enabled: true, - }, - }, - } - cfg := config.New() - expected := &corev1.Probe{ - ProbeHandler: corev1.ProbeHandler{ - HTTPGet: &corev1.HTTPGetAction{ - Path: "/livez", - Port: intstr.FromInt(8080), - }, - }, - } - - // test - c := Container(cfg, logger, otelcol) - - // verify - assert.Equal(t, expected, c.LivenessProbe) -} diff --git a/internal/manifests/targetallocator/deployment.go b/internal/manifests/targetallocator/deployment.go deleted file mode 100644 index 54f92c61c..000000000 --- a/internal/manifests/targetallocator/deployment.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Deployment builds the deployment for the given instance. -func Deployment(params manifests.Params) (*appsv1.Deployment, error) { - name := naming.TargetAllocator(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - configMap, err := ConfigMap(params) - if err != nil { - params.Log.Info("failed to construct target allocator config map for annotations") - configMap = nil - } - annotations := Annotations(params.OtelCol, configMap) - - return &appsv1.Deployment{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OtelCol.Namespace, - Labels: labels, - }, - Spec: appsv1.DeploymentSpec{ - Replicas: params.OtelCol.Spec.TargetAllocator.Replicas, - Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), - }, - Template: corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - Annotations: annotations, - }, - Spec: corev1.PodSpec{ - ServiceAccountName: ServiceAccountName(params.OtelCol), - Containers: []corev1.Container{Container(params.Config, params.Log, params.OtelCol)}, - Volumes: Volumes(params.Config, params.OtelCol), - NodeSelector: params.OtelCol.Spec.TargetAllocator.NodeSelector, - Tolerations: params.OtelCol.Spec.TargetAllocator.Tolerations, - TopologySpreadConstraints: params.OtelCol.Spec.TargetAllocator.TopologySpreadConstraints, - Affinity: params.OtelCol.Spec.TargetAllocator.Affinity, - SecurityContext: params.OtelCol.Spec.TargetAllocator.SecurityContext, - }, - }, - }, - }, nil -} diff --git a/internal/manifests/targetallocator/deployment_test.go b/internal/manifests/targetallocator/deployment_test.go deleted file mode 100644 index 9a993ca88..000000000 --- a/internal/manifests/targetallocator/deployment_test.go +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "fmt" - "os" - "testing" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -var testTolerationValues = []v1.Toleration{ - { - Key: "hii", - Value: "greeting", - Effect: "NoSchedule", - }, -} - -var testTopologySpreadConstraintValue = []v1.TopologySpreadConstraint{ - { - MaxSkew: 1, - TopologyKey: "kubernetes.io/hostname", - WhenUnsatisfiable: "DoNotSchedule", - LabelSelector: &metav1.LabelSelector{ - MatchLabels: map[string]string{ - "foo": "bar", - }, - }, - }, -} - -var testAffinityValue = &v1.Affinity{ - NodeAffinity: &v1.NodeAffinity{ - RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - { - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: "node", - Operator: v1.NodeSelectorOpIn, - Values: []string{"test-node"}, - }, - }, - }, - }, - }, - }, -} - -var runAsUser int64 = 1000 -var runAsGroup int64 = 1000 - -var testSecurityContextValue = &v1.PodSecurityContext{ - RunAsUser: &runAsUser, - RunAsGroup: &runAsGroup, -} - -func TestDeploymentSecurityContext(t *testing.T) { - // Test default - otelcol1 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - OtelCol: otelcol1, - Config: cfg, - Log: logger, - } - d1, err := Deployment(params1) - if err != nil { - t.Fatal(err) - } - assert.Empty(t, d1.Spec.Template.Spec.SecurityContext) - - // Test SecurityContext - otelcol2 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-securitycontext", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - SecurityContext: testSecurityContextValue, - }, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - OtelCol: otelcol2, - Config: cfg, - Log: logger, - } - - d2, err := Deployment(params2) - if err != nil { - t.Fatal(err) - } - assert.Equal(t, *testSecurityContextValue, *d2.Spec.Template.Spec.SecurityContext) -} - -func TestDeploymentNewDefault(t *testing.T) { - // prepare - otelcol := collectorInstance() - cfg := config.New() - - params := manifests.Params{ - OtelCol: otelcol, - Config: cfg, - Log: logger, - } - - // test - d, err := Deployment(params) - - assert.NoError(t, err) - - // verify - assert.Equal(t, "my-instance-targetallocator", d.GetName()) - assert.Equal(t, "my-instance-targetallocator", d.GetLabels()["app.kubernetes.io/name"]) - - assert.Len(t, d.Spec.Template.Spec.Containers, 1) - - // should only have the ConfigMap hash annotation - assert.Contains(t, d.Spec.Template.Annotations, configMapHashAnnotationKey) - assert.Len(t, d.Spec.Template.Annotations, 1) - - // the pod selector should match the pod spec's labels - assert.Subset(t, d.Spec.Template.Labels, d.Spec.Selector.MatchLabels) -} - -func TestDeploymentPodAnnotations(t *testing.T) { - // prepare - testPodAnnotationValues := map[string]string{"annotation-key": "annotation-value"} - otelcol := collectorInstance() - otelcol.Spec.PodAnnotations = testPodAnnotationValues - cfg := config.New() - - params := manifests.Params{ - OtelCol: otelcol, - Config: cfg, - Log: logger, - } - - // test - ds, err := Deployment(params) - assert.NoError(t, err) - // verify - assert.Equal(t, "my-instance-targetallocator", ds.Name) - assert.Subset(t, ds.Spec.Template.Annotations, testPodAnnotationValues) -} - -func collectorInstance() v1alpha1.AmazonCloudWatchAgent { - configYAML, err := os.ReadFile("testdata/test.yaml") - if err != nil { - fmt.Printf("Error getting yaml file: %v", err) - } - return v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "default", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator:0.47.0", - Config: string(configYAML), - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Image: "ghcr.io/aws/amazon-cloudwatch-agent-operator/opentelemetry-targetallocator:0.47.0", - }, - }, - } -} - -func TestDeploymentNodeSelector(t *testing.T) { - // Test default - otelcol1 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - OtelCol: otelcol1, - Config: cfg, - Log: logger, - } - d1, err := Deployment(params1) - assert.NoError(t, err) - assert.Empty(t, d1.Spec.Template.Spec.NodeSelector) - - // Test nodeSelector - otelcol2 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-nodeselector", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - NodeSelector: map[string]string{ - "node-key": "node-value", - }, - }, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - OtelCol: otelcol2, - Config: cfg, - Log: logger, - } - - d2, err := Deployment(params2) - assert.NoError(t, err) - assert.Equal(t, map[string]string{"node-key": "node-value"}, d2.Spec.Template.Spec.NodeSelector) -} -func TestDeploymentAffinity(t *testing.T) { - // Test default - otelcol1 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - OtelCol: otelcol1, - Config: cfg, - Log: logger, - } - d1, err := Deployment(params1) - assert.NoError(t, err) - assert.Empty(t, d1.Spec.Template.Spec.Affinity) - - // Test affinity - otelcol2 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-affinity", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Affinity: testAffinityValue, - }, - }, - } - - cfg = config.New() - - params2 := manifests.Params{ - OtelCol: otelcol2, - Config: cfg, - Log: logger, - } - - d2, err := Deployment(params2) - assert.NoError(t, err) - assert.Equal(t, *testAffinityValue, *d2.Spec.Template.Spec.Affinity) -} - -func TestDeploymentTolerations(t *testing.T) { - // Test default - otelcol1 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - params1 := manifests.Params{ - OtelCol: otelcol1, - Config: cfg, - Log: logger, - } - d1, err := Deployment(params1) - assert.NoError(t, err) - assert.Equal(t, "my-instance-targetallocator", d1.Name) - assert.Empty(t, d1.Spec.Template.Spec.Tolerations) - - // Test Tolerations - otelcol2 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-toleration", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - Tolerations: testTolerationValues, - }, - }, - } - - params2 := manifests.Params{ - OtelCol: otelcol2, - Config: cfg, - Log: logger, - } - d2, err := Deployment(params2) - assert.NoError(t, err) - assert.Equal(t, "my-instance-toleration-targetallocator", d2.Name) - assert.NotNil(t, d2.Spec.Template.Spec.Tolerations) - assert.NotEmpty(t, d2.Spec.Template.Spec.Tolerations) - assert.Equal(t, testTolerationValues, d2.Spec.Template.Spec.Tolerations) -} - -func TestDeploymentTopologySpreadConstraints(t *testing.T) { - // Test default - otelcol1 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - cfg := config.New() - - params1 := manifests.Params{ - OtelCol: otelcol1, - Config: cfg, - Log: logger, - } - d1, err := Deployment(params1) - assert.NoError(t, err) - assert.Equal(t, "my-instance-targetallocator", d1.Name) - assert.Empty(t, d1.Spec.Template.Spec.TopologySpreadConstraints) - - // Test TopologySpreadConstraints - otelcol2 := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-topologyspreadconstraint", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - TopologySpreadConstraints: testTopologySpreadConstraintValue, - }, - }, - } - - cfg = config.New() - params2 := manifests.Params{ - OtelCol: otelcol2, - Config: cfg, - Log: logger, - } - - d2, err := Deployment(params2) - assert.NoError(t, err) - assert.Equal(t, "my-instance-topologyspreadconstraint-targetallocator", d2.Name) - assert.NotNil(t, d2.Spec.Template.Spec.TopologySpreadConstraints) - assert.NotEmpty(t, d2.Spec.Template.Spec.TopologySpreadConstraints) - assert.Equal(t, testTopologySpreadConstraintValue, d2.Spec.Template.Spec.TopologySpreadConstraints) -} diff --git a/internal/manifests/targetallocator/labels.go b/internal/manifests/targetallocator/labels.go deleted file mode 100644 index a4566938c..000000000 --- a/internal/manifests/targetallocator/labels.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/manifestutils" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Labels return the common labels to all TargetAllocator objects that are part of a managed AmazonCloudWatchAgent. -func Labels(instance v1alpha1.AmazonCloudWatchAgent, name string) map[string]string { - return manifestutils.Labels(instance.ObjectMeta, name, instance.Spec.TargetAllocator.Image, ComponentOpenTelemetryTargetAllocator, nil) -} - -// SelectorLabels return the selector labels for Target Allocator Pods. -func SelectorLabels(instance v1alpha1.AmazonCloudWatchAgent) map[string]string { - selectorLabels := manifestutils.SelectorLabels(instance.ObjectMeta, ComponentOpenTelemetryTargetAllocator) - // TargetAllocator uses the name label as well for selection - // This is inconsistent with the Collector, but changing is a somewhat painful breaking change - selectorLabels["app.kubernetes.io/name"] = naming.TargetAllocator(instance.Name) - return selectorLabels -} diff --git a/internal/manifests/targetallocator/labels_test.go b/internal/manifests/targetallocator/labels_test.go deleted file mode 100644 index 26f030254..000000000 --- a/internal/manifests/targetallocator/labels_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -const ( - name = "my-instance" - namespace = "my-ns" -) - -func TestLabelsCommonSet(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - } - - // test - labels := Labels(otelcol, name) - assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) - assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) - assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) - assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) - assert.Equal(t, "latest", labels["app.kubernetes.io/version"]) - assert.Equal(t, name, labels["app.kubernetes.io/name"]) -} - -func TestLabelsPropagateDown(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "myapp": "mycomponent", - "app.kubernetes.io/name": "test", - }, - }, - } - - // test - labels := Labels(otelcol, name) - - // verify - assert.Len(t, labels, 7) - assert.Equal(t, "mycomponent", labels["myapp"]) - assert.Equal(t, "test", labels["app.kubernetes.io/name"]) -} - -func TestSelectorLabels(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - } - - // test - labels := SelectorLabels(otelcol) - assert.Equal(t, "amazon-cloudwatch-agent-operator", labels["app.kubernetes.io/managed-by"]) - assert.Equal(t, "my-ns.my-instance", labels["app.kubernetes.io/instance"]) - assert.Equal(t, "opentelemetry", labels["app.kubernetes.io/part-of"]) - assert.Equal(t, "opentelemetry-targetallocator", labels["app.kubernetes.io/component"]) - assert.Equal(t, naming.TargetAllocator(otelcol.Name), labels["app.kubernetes.io/name"]) -} diff --git a/internal/manifests/targetallocator/poddisruptionbudget.go b/internal/manifests/targetallocator/poddisruptionbudget.go deleted file mode 100644 index ad60a4e2e..000000000 --- a/internal/manifests/targetallocator/poddisruptionbudget.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "fmt" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" - - policyV1 "k8s.io/api/policy/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func PodDisruptionBudget(params manifests.Params) (*policyV1.PodDisruptionBudget, error) { - // defaulting webhook should set this if the strategy is compatible, but if unset then return nil. - if params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget == nil { - params.Log.Info("pdb field is unset in Spec, skipping podDisruptionBudget creation") - return nil, nil - } - - // defaulter doesn't set PodDisruptionBudget if the strategy isn't valid, - // if PodDisruptionBudget != nil and stategy isn't correct, users have set - // it wrongly - if params.OtelCol.Spec.TargetAllocator.AllocationStrategy != v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing { - params.Log.V(4).Info("current allocation strategy not compatible, skipping podDisruptionBudget creation") - return nil, fmt.Errorf("target allocator pdb has been configured but the allocation strategy isn't not compatible") - } - - name := naming.TAPodDisruptionBudget(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - annotations := Annotations(params.OtelCol, nil) - - objectMeta := metav1.ObjectMeta{ - Name: name, - Namespace: params.OtelCol.Namespace, - Labels: labels, - Annotations: annotations, - } - - return &policyV1.PodDisruptionBudget{ - ObjectMeta: objectMeta, - Spec: policyV1.PodDisruptionBudgetSpec{ - MinAvailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MinAvailable, - MaxUnavailable: params.OtelCol.Spec.TargetAllocator.PodDisruptionBudget.MaxUnavailable, - Selector: &metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), - }, - }, - }, nil -} diff --git a/internal/manifests/targetallocator/poddisruptionbudget_test.go b/internal/manifests/targetallocator/poddisruptionbudget_test.go deleted file mode 100644 index 18d267c41..000000000 --- a/internal/manifests/targetallocator/poddisruptionbudget_test.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -type test struct { - name string - MinAvailable *intstr.IntOrString - MaxUnavailable *intstr.IntOrString -} - -var tests = []test{ - { - name: "MinAvailable-int", - MinAvailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - { - name: "MinAvailable-string", - MinAvailable: &intstr.IntOrString{ - Type: intstr.String, - StrVal: "10%", - }, - }, - { - name: "MaxUnavailable-int", - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - { - name: "MaxUnavailable-string", - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.String, - StrVal: "10%", - }, - }, -} - -func TestPDBWithValidStrategy(t *testing.T) { - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ - MinAvailable: test.MinAvailable, - MaxUnavailable: test.MaxUnavailable, - }, - AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyConsistentHashing, - }, - }, - } - configuration := config.New() - pdb, err := PodDisruptionBudget(manifests.Params{ - Log: logger, - Config: configuration, - OtelCol: otelcol, - }) - - // verify - assert.NoError(t, err) - assert.Equal(t, "my-instance-targetallocator", pdb.Name) - assert.Equal(t, "my-instance-targetallocator", pdb.Labels["app.kubernetes.io/name"]) - assert.Equal(t, test.MinAvailable, pdb.Spec.MinAvailable) - assert.Equal(t, test.MaxUnavailable, pdb.Spec.MaxUnavailable) - }) - } -} - -func TestPDBWithNotValidStrategy(t *testing.T) { - for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - PodDisruptionBudget: &v1alpha1.PodDisruptionBudgetSpec{ - MinAvailable: test.MinAvailable, - MaxUnavailable: test.MaxUnavailable, - }, - AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, - }, - }, - } - configuration := config.New() - pdb, err := PodDisruptionBudget(manifests.Params{ - Log: logger, - Config: configuration, - OtelCol: otelcol, - }) - - // verify - assert.Error(t, err) - assert.Nil(t, pdb) - }) - } -} - -func TestNoPDB(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - AllocationStrategy: v1alpha1.OpenTelemetryTargetAllocatorAllocationStrategyLeastWeighted, - }, - }, - } - configuration := config.New() - pdb, err := PodDisruptionBudget(manifests.Params{ - Log: logger, - Config: configuration, - OtelCol: otelcol, - }) - - // verify - assert.NoError(t, err) - assert.Nil(t, pdb) -} diff --git a/internal/manifests/targetallocator/service.go b/internal/manifests/targetallocator/service.go deleted file mode 100644 index 4f16b6ab1..000000000 --- a/internal/manifests/targetallocator/service.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func Service(params manifests.Params) *corev1.Service { - name := naming.TAService(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - selector := SelectorLabels(params.OtelCol) - - return &corev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Name: naming.TAService(params.OtelCol.Name), - Namespace: params.OtelCol.Namespace, - Labels: labels, - }, - Spec: corev1.ServiceSpec{ - Selector: selector, - Ports: []corev1.ServicePort{{ - Name: "targetallocation", - Port: 80, - TargetPort: intstr.FromString("http"), - }}, - }, - } -} diff --git a/internal/manifests/targetallocator/service_test.go b/internal/manifests/targetallocator/service_test.go deleted file mode 100644 index 1391d64fc..000000000 --- a/internal/manifests/targetallocator/service_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - - "github.com/stretchr/testify/assert" - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/intstr" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -func TestServicePorts(t *testing.T) { - otelcol := collectorInstance() - cfg := config.New() - - params := manifests.Params{ - OtelCol: otelcol, - Config: cfg, - Log: logger, - } - - ports := []v1.ServicePort{{Name: "targetallocation", Port: 80, TargetPort: intstr.FromString("http")}} - - s := Service(params) - - assert.Equal(t, ports[0].Name, s.Spec.Ports[0].Name) - assert.Equal(t, ports[0].Port, s.Spec.Ports[0].Port) - assert.Equal(t, ports[0].TargetPort, s.Spec.Ports[0].TargetPort) -} diff --git a/internal/manifests/targetallocator/serviceaccount.go b/internal/manifests/targetallocator/serviceaccount.go deleted file mode 100644 index 5d0d64c7c..000000000 --- a/internal/manifests/targetallocator/serviceaccount.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -// ServiceAccountName returns the name of the existing or self-provisioned service account to use for the given instance. -func ServiceAccountName(instance v1alpha1.AmazonCloudWatchAgent) string { - if len(instance.Spec.TargetAllocator.ServiceAccount) == 0 { - return naming.TargetAllocatorServiceAccount(instance.Name) - } - - return instance.Spec.TargetAllocator.ServiceAccount -} - -// ServiceAccount returns the service account for the given instance. -func ServiceAccount(params manifests.Params) *corev1.ServiceAccount { - if len(params.OtelCol.Spec.TargetAllocator.ServiceAccount) > 0 { - return nil - } - - name := naming.TargetAllocatorServiceAccount(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - return &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: params.OtelCol.Namespace, - Labels: labels, - Annotations: params.OtelCol.Annotations, - }, - } -} diff --git a/internal/manifests/targetallocator/serviceaccount_test.go b/internal/manifests/targetallocator/serviceaccount_test.go deleted file mode 100644 index 4ea17f211..000000000 --- a/internal/manifests/targetallocator/serviceaccount_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" -) - -func TestServiceAccountDefaultName(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - } - - // test - saName := ServiceAccountName(otelcol) - - // verify - assert.Equal(t, "my-instance-targetallocator", saName) -} - -func TestServiceAccountOverrideName(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - ServiceAccount: "my-special-sa", - }, - }, - } - - // test - sa := ServiceAccountName(otelcol) - - // verify - assert.Equal(t, "my-special-sa", sa) -} - -func TestServiceAccountDefault(t *testing.T) { - params := manifests.Params{ - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - }, - } - expected := &corev1.ServiceAccount{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance-targetallocator", - Namespace: params.OtelCol.Namespace, - Labels: Labels(params.OtelCol, "my-instance-targetallocator"), - Annotations: params.OtelCol.Annotations, - }, - } - - saName := ServiceAccountName(params.OtelCol) - sa := ServiceAccount(params) - - assert.Equal(t, sa.Name, saName) - assert.Equal(t, expected, sa) -} - -func TestServiceAccountOverride(t *testing.T) { - params := manifests.Params{ - OtelCol: v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - TargetAllocator: v1alpha1.OpenTelemetryTargetAllocator{ - ServiceAccount: "my-special-sa", - }, - }, - }, - } - sa := ServiceAccount(params) - - assert.Nil(t, sa) -} diff --git a/internal/manifests/targetallocator/servicemonitor.go b/internal/manifests/targetallocator/servicemonitor.go deleted file mode 100644 index c4633ff43..000000000 --- a/internal/manifests/targetallocator/servicemonitor.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// ServiceMonitor returns the service monitor for the given instance. -func ServiceMonitor(params manifests.Params) *monitoringv1.ServiceMonitor { - name := naming.TargetAllocator(params.OtelCol.Name) - labels := Labels(params.OtelCol, name) - - return &monitoringv1.ServiceMonitor{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: params.OtelCol.Namespace, - Name: name, - Labels: labels, - }, - Spec: monitoringv1.ServiceMonitorSpec{ - Endpoints: []monitoringv1.Endpoint{ - { - Port: "targetallocation", - }, - }, - - NamespaceSelector: monitoringv1.NamespaceSelector{ - MatchNames: []string{params.OtelCol.Namespace}, - }, - Selector: metav1.LabelSelector{ - MatchLabels: SelectorLabels(params.OtelCol), - }, - }, - } -} diff --git a/internal/manifests/targetallocator/servicemonitor_test.go b/internal/manifests/targetallocator/servicemonitor_test.go deleted file mode 100644 index 5924dcda4..000000000 --- a/internal/manifests/targetallocator/servicemonitor_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "fmt" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - - "github.com/stretchr/testify/assert" -) - -func TestDesiredServiceMonitors(t *testing.T) { - otelcol := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "my-namespace", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Mode: v1alpha1.ModeStatefulSet, - Tolerations: testTolerationValues, - }, - } - cfg := config.New() - - params := manifests.Params{ - OtelCol: otelcol, - Config: cfg, - Log: logger, - } - - actual := ServiceMonitor(params) - assert.NotNil(t, actual) - assert.Equal(t, fmt.Sprintf("%s-targetallocator", params.OtelCol.Name), actual.Name) - assert.Equal(t, params.OtelCol.Namespace, actual.Namespace) - assert.Equal(t, "targetallocation", actual.Spec.Endpoints[0].Port) - -} diff --git a/internal/manifests/targetallocator/targetallocator.go b/internal/manifests/targetallocator/targetallocator.go deleted file mode 100644 index dc58d8182..000000000 --- a/internal/manifests/targetallocator/targetallocator.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/featuregate" -) - -const ( - ComponentOpenTelemetryTargetAllocator = "opentelemetry-targetallocator" -) - -// Build creates the manifest for the TargetAllocator resource. -func Build(params manifests.Params) ([]client.Object, error) { - var resourceManifests []client.Object - if !params.OtelCol.Spec.TargetAllocator.Enabled { - return resourceManifests, nil - } - resourceFactories := []manifests.K8sManifestFactory{ - manifests.Factory(ConfigMap), - manifests.Factory(Deployment), - manifests.FactoryWithoutError(ServiceAccount), - manifests.FactoryWithoutError(Service), - manifests.Factory(PodDisruptionBudget), - } - - if params.OtelCol.Spec.TargetAllocator.Observability.Metrics.EnableMetrics && featuregate.PrometheusOperatorIsAvailable.IsEnabled() { - resourceFactories = append(resourceFactories, manifests.FactoryWithoutError(ServiceMonitor)) - } - - for _, factory := range resourceFactories { - res, err := factory(params) - if err != nil { - return nil, err - } else if manifests.ObjectIsNotNil(res) { - resourceManifests = append(resourceManifests, res) - } - } - return resourceManifests, nil -} diff --git a/internal/manifests/targetallocator/testdata/test.yaml b/internal/manifests/targetallocator/testdata/test.yaml deleted file mode 100644 index f03253f78..000000000 --- a/internal/manifests/targetallocator/testdata/test.yaml +++ /dev/null @@ -1,22 +0,0 @@ -processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] - -exporters: - debug: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [debug] diff --git a/internal/manifests/targetallocator/volume.go b/internal/manifests/targetallocator/volume.go deleted file mode 100644 index a4ac2ecfe..000000000 --- a/internal/manifests/targetallocator/volume.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - corev1 "k8s.io/api/core/v1" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -// Volumes builds the volumes for the given instance, including the config map volume. -func Volumes(cfg config.Config, otelcol v1alpha1.AmazonCloudWatchAgent) []corev1.Volume { - volumes := []corev1.Volume{{ - Name: naming.TAConfigMapVolume(), - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{Name: naming.TAConfigMap(otelcol.Name)}, - Items: []corev1.KeyToPath{ - { - Key: cfg.TargetAllocatorConfigMapEntry(), - Path: cfg.TargetAllocatorConfigMapEntry(), - }}, - }, - }, - }} - - return volumes -} diff --git a/internal/manifests/targetallocator/volume_test.go b/internal/manifests/targetallocator/volume_test.go deleted file mode 100644 index 9e60c7a9f..000000000 --- a/internal/manifests/targetallocator/volume_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package targetallocator - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func TestVolumeNewDefault(t *testing.T) { - // prepare - otelcol := v1alpha1.AmazonCloudWatchAgent{} - cfg := config.New() - - // test - volumes := Volumes(cfg, otelcol) - - // verify - assert.Len(t, volumes, 1) - - // check if the number of elements in the volume source items list is 1 - assert.Len(t, volumes[0].VolumeSource.ConfigMap.Items, 1) - - // check that it's the ta-internal volume, with the config map - assert.Equal(t, naming.TAConfigMapVolume(), volumes[0].Name) -} diff --git a/internal/status/collector/handle.go b/internal/status/collector/handle.go index a0391ee19..7ed9e2b20 100644 --- a/internal/status/collector/handle.go +++ b/internal/status/collector/handle.go @@ -12,8 +12,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - collectorupgrade "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" ) const ( @@ -26,7 +24,7 @@ const ( ) // HandleReconcileStatus handles updating the status of the CRDs managed by the operator. -// TODO: make the status more useful https://github.com/aws/amazon-cloudwatch-agent-operator/issues/1972 +// TODO: make the status more useful https://github.com/open-telemetry/opentelemetry-operator/issues/1972 func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifests.Params, err error) (ctrl.Result, error) { log.V(2).Info("updating collector status") if err != nil { @@ -34,19 +32,6 @@ func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifest return ctrl.Result{}, err } changed := params.OtelCol.DeepCopy() - - up := &collectorupgrade.VersionUpgrade{ - Log: params.Log, - Version: version.Get(), - Client: params.Client, - Recorder: params.Recorder, - } - upgraded, upgradeErr := up.ManagedInstance(ctx, *changed) - if upgradeErr != nil { - // don't fail to allow setting the status - params.Log.Error(upgradeErr, "failed to upgrade the OpenTelemetry CR") - } - changed = &upgraded statusErr := UpdateCollectorStatus(ctx, params.Client, changed) if statusErr != nil { params.Recorder.Event(changed, eventTypeWarning, reasonStatusFailure, statusErr.Error()) @@ -54,7 +39,7 @@ func HandleReconcileStatus(ctx context.Context, log logr.Logger, params manifest } statusPatch := client.MergeFrom(¶ms.OtelCol) if err := params.Client.Status().Patch(ctx, changed, statusPatch); err != nil { - return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the OpenTelemetry CR: %w", err) + return ctrl.Result{}, fmt.Errorf("failed to apply status changes to the AmazonCloudWatchAgent CR: %w", err) } params.Recorder.Event(changed, eventTypeNormal, reasonInfo, "applied status changes") return ctrl.Result{}, nil diff --git a/internal/version/main.go b/internal/version/main.go index 8ba7f0812..6c1ff977c 100644 --- a/internal/version/main.go +++ b/internal/version/main.go @@ -13,8 +13,6 @@ var ( version string buildDate string otelCol string - targetAllocator string - operatorOpAMPBridge string autoInstrumentationJava string autoInstrumentationNodeJS string autoInstrumentationPython string @@ -28,10 +26,8 @@ var ( type Version struct { Operator string `json:"amazon-cloudwatch-agent-operator"` BuildDate string `json:"build-date"` - AmazonCloudWatchAgent string `json:"opentelemetry-collector-version"` + AmazonCloudWatchAgent string `json:"amazon-cloudwatch-agent-version"` Go string `json:"go-version"` - TargetAllocator string `json:"target-allocator-version"` - OperatorOpAMPBridge string `json:"operator-opamp-bridge"` AutoInstrumentationJava string `json:"auto-instrumentation-java"` AutoInstrumentationNodeJS string `json:"auto-instrumentation-nodejs"` AutoInstrumentationPython string `json:"auto-instrumentation-python"` @@ -48,8 +44,6 @@ func Get() Version { BuildDate: buildDate, AmazonCloudWatchAgent: AmazonCloudWatchAgent(), Go: runtime.Version(), - TargetAllocator: TargetAllocator(), - OperatorOpAMPBridge: OperatorOpAMPBridge(), AutoInstrumentationJava: AutoInstrumentationJava(), AutoInstrumentationNodeJS: AutoInstrumentationNodeJS(), AutoInstrumentationPython: AutoInstrumentationPython(), @@ -67,8 +61,6 @@ func (v Version) String() string { v.BuildDate, v.AmazonCloudWatchAgent, v.Go, - v.TargetAllocator, - v.OperatorOpAMPBridge, v.AutoInstrumentationJava, v.AutoInstrumentationNodeJS, v.AutoInstrumentationPython, @@ -90,28 +82,6 @@ func AmazonCloudWatchAgent() string { return "0.0.0" } -// TargetAllocator returns the default TargetAllocator to use when no versions are specified via CLI or configuration. -func TargetAllocator() string { - if len(targetAllocator) > 0 { - // this should always be set, as it's specified during the build - return targetAllocator - } - - // fallback value, useful for tests - return "0.0.0" -} - -// OperatorOpAMPBridge returns the default OperatorOpAMPBridge to use when no versions are specified via CLI or configuration. -func OperatorOpAMPBridge() string { - if len(operatorOpAMPBridge) > 0 { - // this should always be set, as it's specified during the build - return operatorOpAMPBridge - } - - // fallback value, useful for tests - return "0.0.0" -} - func AutoInstrumentationJava() string { if len(autoInstrumentationJava) > 0 { return autoInstrumentationJava diff --git a/internal/version/main_test.go b/internal/version/main_test.go index ab0cfba3e..9229c208c 100644 --- a/internal/version/main_test.go +++ b/internal/version/main_test.go @@ -24,21 +24,6 @@ func TestVersionFromBuild(t *testing.T) { assert.Contains(t, Get().String(), otelCol) } -func TestTargetAllocatorFallbackVersion(t *testing.T) { - assert.Equal(t, "0.0.0", TargetAllocator()) -} - -func TestTargetAllocatorVersionFromBuild(t *testing.T) { - // prepare - targetAllocator = "0.0.2" // set during the build - defer func() { - targetAllocator = "" - }() - - assert.Equal(t, targetAllocator, TargetAllocator()) - assert.Contains(t, Get().String(), targetAllocator) -} - func TestAutoInstrumentationJavaFallbackVersion(t *testing.T) { assert.Equal(t, "0.0.0", AutoInstrumentationJava()) } diff --git a/pkg/collector/upgrade/noop.go b/pkg/collector/upgrade/noop.go deleted file mode 100644 index e61eeb48a..000000000 --- a/pkg/collector/upgrade/noop.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -// nolint unused -func noop(cl client.Client, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - return otelcol, nil -} diff --git a/pkg/collector/upgrade/suite_test.go b/pkg/collector/upgrade/suite_test.go deleted file mode 100644 index 1ac41aa25..000000000 --- a/pkg/collector/upgrade/suite_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "crypto/tls" - "fmt" - "net" - "os" - "path/filepath" - "sync" - "testing" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes/scheme" - "k8s.io/client-go/rest" - "k8s.io/client-go/util/retry" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/controller-runtime/pkg/envtest" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - "sigs.k8s.io/controller-runtime/pkg/webhook" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/config" - // +kubebuilder:scaffold:imports -) - -var ( - k8sClient client.Client - testEnv *envtest.Environment - testScheme *runtime.Scheme = scheme.Scheme - ctx context.Context - cancel context.CancelFunc - err error - cfg *rest.Config - conf = config.New() -) - -func TestMain(m *testing.M) { - ctx, cancel = context.WithCancel(context.TODO()) - defer cancel() - - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")}, - WebhookInstallOptions: envtest.WebhookInstallOptions{ - Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, - }, - } - - cfg, err = testEnv.Start() - if err != nil { - fmt.Printf("failed to start testEnv: %v", err) - os.Exit(1) - } - - if err = v1alpha1.AddToScheme(testScheme); err != nil { - fmt.Printf("failed to register scheme: %v", err) - os.Exit(1) - } - // +kubebuilder:scaffold:scheme - - k8sClient, err = client.New(cfg, client.Options{Scheme: testScheme}) - if err != nil { - fmt.Printf("failed to setup a Kubernetes client: %v", err) - os.Exit(1) - } - - // start webhook server using Manager - webhookInstallOptions := &testEnv.WebhookInstallOptions - mgr, mgrErr := ctrl.NewManager(cfg, ctrl.Options{ - Scheme: testScheme, - LeaderElection: false, - WebhookServer: webhook.NewServer(webhook.Options{ - Host: webhookInstallOptions.LocalServingHost, - Port: webhookInstallOptions.LocalServingPort, - CertDir: webhookInstallOptions.LocalServingCertDir, - }), - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - }) - if mgrErr != nil { - fmt.Printf("failed to start webhook server: %v", mgrErr) - os.Exit(1) - } - - if err = v1alpha1.SetupCollectorWebhook(mgr, conf); err != nil { - fmt.Printf("failed to SetupWebhookWithManager: %v", err) - os.Exit(1) - } - - //+kubebuilder:scaffold:webhook - - go func() { - if err = mgr.Start(ctx); err != nil { - fmt.Printf("failed to start manager: %v", err) - os.Exit(1) - } - }() - - // wait for the webhook server to get ready - wg := &sync.WaitGroup{} - wg.Add(1) - dialer := &net.Dialer{Timeout: time.Second} - addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) - go func(wg *sync.WaitGroup) { - defer wg.Done() - if err = retry.OnError(wait.Backoff{ - Steps: 20, - Duration: 10 * time.Millisecond, - Factor: 1.5, - Jitter: 0.1, - Cap: time.Second * 30, - }, func(error) bool { - return true - }, func() error { - // #nosec G402 - conn, tlsErr := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) - if tlsErr != nil { - return tlsErr - } - _ = conn.Close() - return nil - }); err != nil { - fmt.Printf("failed to wait for webhook server to be ready: %v", err) - os.Exit(1) - } - - }(wg) - wg.Wait() - - code := m.Run() - - err = testEnv.Stop() - if err != nil { - fmt.Printf("failed to stop testEnv: %v", err) - os.Exit(1) - } - - os.Exit(code) -} diff --git a/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml b/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml deleted file mode 100644 index e04bc249a..000000000 --- a/pkg/collector/upgrade/testdata/v0_61_0-invalid.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -receivers: - jaeger: - protocols: - grpc: - remote_sampling: - strategy_file: "/etc/strategy.json" - strategy_file_reload_interval: 10s diff --git a/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml b/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml deleted file mode 100644 index 2dc25ca4a..000000000 --- a/pkg/collector/upgrade/testdata/v0_61_0-valid.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -receivers: - jaeger: - protocols: - grpc: diff --git a/pkg/collector/upgrade/upgrade.go b/pkg/collector/upgrade/upgrade.go deleted file mode 100644 index cb68599fa..000000000 --- a/pkg/collector/upgrade/upgrade.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Package upgrade handles the upgrade routine from one OpenTelemetry Collector to the next. -package upgrade - -import ( - "context" - "fmt" - "reflect" - - semver "github.com/Masterminds/semver/v3" - "github.com/go-logr/logr" - "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" -) - -type VersionUpgrade struct { - Client client.Client - Recorder record.EventRecorder - Version version.Version - Log logr.Logger -} - -const RecordBufferSize int = 10 - -// ManagedInstances finds all the otelcol instances for the current operator and upgrades them, if necessary. -func (u VersionUpgrade) ManagedInstances(ctx context.Context) error { - u.Log.Info("looking for managed instances to upgrade") - - opts := []client.ListOption{ - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - list := &v1alpha1.AmazonCloudWatchAgentList{} - if err := u.Client.List(ctx, list, opts...); err != nil { - return fmt.Errorf("failed to list: %w", err) - } - - for i := range list.Items { - original := list.Items[i] - itemLogger := u.Log.WithValues("name", original.Name, "namespace", original.Namespace) - - if original.Spec.ManagementState == v1alpha1.ManagementStateUnmanaged { - itemLogger.Info("skipping upgrade because instance is not managed") - continue - } - - if original.Spec.UpgradeStrategy == v1alpha1.UpgradeStrategyNone { - itemLogger.Info("skipping instance upgrade due to UpgradeStrategy") - continue - } - upgraded, err := u.ManagedInstance(ctx, original) - if err != nil { - const msg = "automated update not possible. Configuration must be corrected manually and CR instance must be re-created." - itemLogger.Info(msg) - u.Recorder.Event(&original, "Error", "Upgrade", msg) - continue - } - - if !reflect.DeepEqual(upgraded, list.Items[i]) { - // the resource update overrides the status, so, keep it so that we can reset it later - st := upgraded.Status - patch := client.MergeFrom(&original) - if err := u.Client.Patch(ctx, &upgraded, patch); err != nil { - itemLogger.Error(err, "failed to apply changes to instance") - continue - } - - // the status object requires its own update - upgraded.Status = st - if err := u.Client.Status().Patch(ctx, &upgraded, patch); err != nil { - itemLogger.Error(err, "failed to apply changes to instance's status object") - continue - } - - itemLogger.Info("instance upgraded", "version", upgraded.Status.Version) - } - } - - if len(list.Items) == 0 { - u.Log.Info("no instances to upgrade") - } - - return nil -} - -// ManagedInstance performs the necessary changes to bring the given otelcol instance to the current version. -func (u VersionUpgrade) ManagedInstance(ctx context.Context, otelcol v1alpha1.AmazonCloudWatchAgent) (v1alpha1.AmazonCloudWatchAgent, error) { - // this is likely a new instance, assume it's already up to date - if otelcol.Status.Version == "" { - return otelcol, nil - } - - instanceV, err := semver.NewVersion(otelcol.Status.Version) - if err != nil { - u.Log.Error(err, "failed to parse version for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) - return otelcol, err - } - - if instanceV.GreaterThan(&Latest.Version) { - // Update with the latest known version, which is what we have from versions.txt - u.Log.Info("no upgrade routines are needed for the OpenTelemetry instance", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version, "latest", Latest.Version.String()) - - otelColV, err := semver.NewVersion(u.Version.AmazonCloudWatchAgent) - if err != nil { - return otelcol, err - } - if instanceV.LessThan(otelColV) { - u.Log.Info("upgraded OpenTelemetry Collector version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) - otelcol.Status.Version = u.Version.AmazonCloudWatchAgent - } else { - u.Log.Info("skipping upgrade for OpenTelemetry Collector instance", "name", otelcol.Name, "namespace", otelcol.Namespace) - } - - return otelcol, nil - } - - for _, available := range versions { - if available.GreaterThan(instanceV) { - upgraded, err := available.upgrade(u, &otelcol) //available.upgrade(params., &otelcol) - - if err != nil { - u.Log.Error(err, "failed to upgrade managed otelcol instances", "name", otelcol.Name, "namespace", otelcol.Namespace) - return otelcol, err - } - - u.Log.V(1).Info("step upgrade", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", available.String()) - upgraded.Status.Version = available.String() - otelcol = *upgraded - } - } - // Update with the latest known version, which is what we have from versions.txt - otelcol.Status.Version = u.Version.AmazonCloudWatchAgent - - u.Log.V(1).Info("final version", "name", otelcol.Name, "namespace", otelcol.Namespace, "version", otelcol.Status.Version) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/upgrade_test.go b/pkg/collector/upgrade/upgrade_test.go deleted file mode 100644 index a9b7a36ab..000000000 --- a/pkg/collector/upgrade/upgrade_test.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - logf "sigs.k8s.io/controller-runtime/pkg/log" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -var logger = logf.Log.WithName("unit-tests") - -func TestShouldUpgradeAllToLatestBasedOnUpgradeStrategy(t *testing.T) { - const beginV = "0.0.1" // this is the first version we have an upgrade function - - currentV := version.Get() - currentV.AmazonCloudWatchAgent = upgrade.Latest.String() - - for _, tt := range []struct { - strategy v1alpha1.UpgradeStrategy - expectedV string - }{ - {v1alpha1.UpgradeStrategyAutomatic, upgrade.Latest.String()}, - {v1alpha1.UpgradeStrategyNone, beginV}, - } { - t.Run("spec.UpgradeStrategy = "+string(tt.strategy), func(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn, v1alpha1.ManagementStateManaged) - err := k8sClient.Create(context.Background(), &existing) - require.NoError(t, err) - - existing.Status.Version = beginV - err = k8sClient.Status().Update(context.Background(), &existing) - require.NoError(t, err) - - // sanity check - persisted := &v1alpha1.AmazonCloudWatchAgent{} - err = k8sClient.Get(context.Background(), nsn, persisted) - require.NoError(t, err) - require.Equal(t, beginV, persisted.Status.Version) - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: currentV, - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - - // test - err = up.ManagedInstances(context.Background()) - assert.NoError(t, err) - - // verify - err = k8sClient.Get(context.Background(), nsn, persisted) - assert.NoError(t, err) - assert.Equal(t, upgrade.Latest.String(), persisted.Status.Version) - - // cleanup - assert.NoError(t, k8sClient.Delete(context.Background(), &existing)) - }) - } -} - -func TestUpgradeUpToLatestKnownVersion(t *testing.T) { - for _, tt := range []struct { - desc string - v string - expectedV string - }{ - {"upgrade-routine", "0.8.0", "0.10.0"}, // we don't have a 0.10.0 upgrade, but we have a 0.9.0 - {"no-upgrade-routine", "0.61.1", "0.62.0"}, // No upgrade routines between these two versions - } { - t.Run(tt.desc, func(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := makeOtelcol(nsn, v1alpha1.ManagementStateManaged) - existing.Status.Version = tt.v - - currentV := version.Get() - currentV.AmazonCloudWatchAgent = tt.expectedV - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: currentV, - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - // test - res, err := up.ManagedInstance(context.Background(), existing) - - // verify - assert.NoError(t, err) - assert.Equal(t, tt.expectedV, res.Status.Version) - }) - } -} - -func TestVersionsShouldNotBeChanged(t *testing.T) { - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - for _, tt := range []struct { - desc string - v string - expectedV string - failureExpected bool - managementState v1alpha1.ManagementStateType - }{ - {"new-instance", "", "", false, v1alpha1.ManagementStateManaged}, - {"newer-than-our-newest", "100.0.0", "100.0.0", false, v1alpha1.ManagementStateManaged}, - {"unparseable", "unparseable", "unparseable", true, v1alpha1.ManagementStateManaged}, - // Ignore unmanaged instances - {"unmanaged-instance", "1.0.0", "1.0.0", false, v1alpha1.ManagementStateUnmanaged}, - } { - t.Run(tt.desc, func(t *testing.T) { - // prepare - existing := makeOtelcol(nsn, tt.managementState) - existing.Status.Version = tt.v - - currentV := version.Get() - currentV.AmazonCloudWatchAgent = upgrade.Latest.String() - - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: currentV, - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - - // test - res, err := up.ManagedInstance(context.Background(), existing) - if tt.failureExpected { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - - // verify - assert.Equal(t, tt.expectedV, res.Status.Version) - }) - } -} - -func makeOtelcol(nsn types.NamespacedName, managementState v1alpha1.ManagementStateType) v1alpha1.AmazonCloudWatchAgent { - return v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - ManagementState: managementState, - }, - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - } -} diff --git a/pkg/collector/upgrade/v0_15_0.go b/pkg/collector/upgrade/v0_15_0.go deleted file mode 100644 index f9c14d008..000000000 --- a/pkg/collector/upgrade/v0_15_0.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_15_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - delete(otelcol.Spec.Args, "--new-metrics") - delete(otelcol.Spec.Args, "--legacy-metrics") - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", "upgrade to v0.15.0 dropped the deprecated metrics arguments") - - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_15_0_test.go b/pkg/collector/upgrade/v0_15_0_test.go deleted file mode 100644 index 91b76c051..000000000 --- a/pkg/collector/upgrade/v0_15_0_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func TestRemoveMetricsTypeFlags(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Args: map[string]string{ - // this would not happen in the real world, as it's either one or another, but we aren't going that far - "--new-metrics": "true", - "--legacy-metrics": "true", - }, - }, - } - existing.Status.Version = "0.9.0" - - // sanity check - require.Contains(t, existing.Spec.Args, "--new-metrics") - require.Contains(t, existing.Spec.Args, "--legacy-metrics") - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.NotContains(t, res.Spec.Args, "--new-metrics") - assert.NotContains(t, res.Spec.Args, "--legacy-metrics") -} diff --git a/pkg/collector/upgrade/v0_19_0.go b/pkg/collector/upgrade/v0_19_0.go deleted file mode 100644 index 8c3368154..000000000 --- a/pkg/collector/upgrade/v0_19_0.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_19_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, failed to parse configuration: %w", err) - } - - processors, ok := cfg["processors"].(map[interface{}]interface{}) - if !ok { - // no processors? no need to fail because of that - return otelcol, nil - } - - for k, v := range processors { - // from the changelog https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.19.0 - - // Remove deprecated queued_retry processor - if strings.HasPrefix(k.(string), "queued_retry") { - delete(processors, k) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 removed the processor %q", k)) - continue - } - - // Remove deprecated configs from resource processor: type (set "opencensus.type" key in "attributes.upsert" map instead) and labels (use "attributes.upsert" instead). - if strings.HasPrefix(k.(string), "resource") { - switch processor := v.(type) { - case map[interface{}]interface{}: - // type becomes an attribute.upsert with key opencensus.type - if typ, found := processor["type"]; found { - var attributes []map[string]string - if attrs, found := processor["attributes"]; found { - if attributes, ok = attrs.([]map[string]string); !ok { - return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the attributes list for processors %q couldn't be parsed based on the previous value. Type: %t, value: %v", k, attrs, attrs) - } - } - attr := map[string]string{} - attr["key"] = "opencensus.type" - attr["value"] = typ.(string) - attr["action"] = "upsert" - attributes = append(attributes, attr) - - processor["attributes"] = attributes - delete(processor, "type") - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 migrated the property 'type' for processor %q", k)) - } - - // handle labels - if labels, found := processor["labels"]; found { - var attributes []map[string]string - if attrs, found := processor["attributes"]; found { - if attributes, ok = attrs.([]map[string]string); !ok { - return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the attributes list for processors %q couldn't be parsed based on the previous value. Type: %t, value: %v", k, attrs, attrs) - } - } - - if ls, ok := labels.(map[interface{}]interface{}); ok { - for labelK, labelV := range ls { - attr := map[string]string{} - attr["key"] = labelK.(string) - attr["value"] = labelV.(string) - attr["action"] = "upsert" - attributes = append(attributes, attr) - } - } - - processor["attributes"] = attributes - delete(processor, "labels") - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.19.0 migrated the property 'labels' for processor %q", k)) - } - - processors[k] = processor - case string: - if len(processor) == 0 { - // this processor is using the default configuration - continue - } - default: - return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, the processor %q is invalid (neither a string nor map)", k) - } - } - } - - cfg["processors"] = processors - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.19.0, failed to marshall back configuration: %w", err) - } - - otelcol.Spec.Config = string(res) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_19_0_test.go b/pkg/collector/upgrade/v0_19_0_test.go deleted file mode 100644 index 15162d958..000000000 --- a/pkg/collector/upgrade/v0_19_0_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func TestRemoveQueuedRetryProcessor(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `processors: - queued_retry: - otherprocessor: - queued_retry/second: - compression: "on" - reconnection_delay: 15 - num_workers: 123`, - }, - } - existing.Status.Version = "0.18.0" - - // sanity check - require.Contains(t, existing.Spec.Config, "queued_retry") - require.Contains(t, existing.Spec.Config, "queued_retry/second") - require.Contains(t, existing.Spec.Config, "num_workers: 123") // checking one property is sufficient - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.NotContains(t, res.Spec.Config, "queued_retry:") - assert.Contains(t, res.Spec.Config, "otherprocessor:") - assert.NotContains(t, res.Spec.Config, "queued_retry/second:") - assert.NotContains(t, res.Spec.Config, "num_workers: 123") // checking one property is sufficient -} - -func TestMigrateResourceType(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `processors: - resource: - type: some-type -`, - }, - } - existing.Status.Version = "0.18.0" - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, `processors: - resource: - attributes: - - action: upsert - key: opencensus.type - value: some-type -`, res.Spec.Config) -} - -func TestMigrateLabels(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `processors: - resource: - labels: - cloud.zone: zone-1 - host.name: k8s-node -`, - }, - } - existing.Status.Version = "0.18.0" - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - actual, err := adapters.ConfigFromString(res.Spec.Config) - require.NoError(t, err) - actualProcessors := actual["processors"].(map[interface{}]interface{}) - actualProcessor := actualProcessors["resource"].(map[interface{}]interface{}) - actualAttrs := actualProcessor["attributes"].([]interface{}) - - // verify - assert.Len(t, actualAttrs, 2) - assert.Nil(t, actualProcessor["labels"]) -} diff --git a/pkg/collector/upgrade/v0_24_0.go b/pkg/collector/upgrade/v0_24_0.go deleted file mode 100644 index 1fcec8045..000000000 --- a/pkg/collector/upgrade/v0_24_0.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_24_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, failed to parse configuration: %w", err) - } - - extensions, ok := cfg["extensions"].(map[interface{}]interface{}) - if !ok { - // We do not need an upgrade if there are no extensions. - return otelcol, nil - } - - for k, v := range extensions { - if strings.HasPrefix(k.(string), "health_check") { - switch extension := v.(type) { - case map[interface{}]interface{}: - if port, ok := extension["port"]; ok { - delete(extension, "port") - extension["endpoint"] = fmt.Sprintf("0.0.0.0:%d", port) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.24.0 migrated the property 'port' to 'endpoint' for extension %q", k)) - } - case string: - if len(extension) == 0 { - // This extension is using the default configuration. - continue - } - case nil: - // This extension is using the default configuration. - continue - default: - return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, the extension %q is invalid (expected string or map but was %t)", k, v) - } - } - } - - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.24.0, failed to marshall back configuration: %w", err) - } - - otelcol.Spec.Config = string(res) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_24_0_test.go b/pkg/collector/upgrade/v0_24_0_test.go deleted file mode 100644 index 0ced8f332..000000000 --- a/pkg/collector/upgrade/v0_24_0_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func TestHealthCheckEndpointMigration(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `extensions: - health_check/2: - endpoint: "localhost:13133" - health_check/3: - port: 13133 -`, - }, - } - existing.Status.Version = "0.23.0" - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, `extensions: - health_check/2: - endpoint: localhost:13133 - health_check/3: - endpoint: 0.0.0.0:13133 -`, res.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_2_10.go b/pkg/collector/upgrade/v0_2_10.go deleted file mode 100644 index 5d87674f5..000000000 --- a/pkg/collector/upgrade/v0_2_10.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -// this is our first version under otel/opentelemetry-collector. -func upgrade0_2_10(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - // this is a no-op, but serves to keep the skeleton here for the future versions - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_31_0.go b/pkg/collector/upgrade/v0_31_0.go deleted file mode 100644 index 5319027b0..000000000 --- a/pkg/collector/upgrade/v0_31_0.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_31_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.31.0, failed to parse configuration: %w", err) - } - - receivers, ok := cfg["receivers"].(map[interface{}]interface{}) - if !ok { - // no receivers? no need to fail because of that - return otelcol, nil - } - - for k, v := range receivers { - // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#v0310-beta - // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/4277 - - // Remove deprecated field metrics_schema from influxdb receiver - if strings.HasPrefix(k.(string), "influxdb") { - influxdbConfig, ok := v.(map[interface{}]interface{}) - if !ok { - // no influxdbConfig? no need to fail because of that - return otelcol, nil - } - for fieldKey := range influxdbConfig { - if strings.HasPrefix(fieldKey.(string), "metrics_schema") { - delete(influxdbConfig, fieldKey) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.31.0 dropped the 'metrics_schema' field from %q receiver", k)) - continue - } - } - } - } - - cfg["receivers"] = receivers - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.31.0, failed to marshall back configuration: %w", err) - } - - otelcol.Spec.Config = string(res) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_31_0_test.go b/pkg/collector/upgrade/v0_31_0_test.go deleted file mode 100644 index 4eab6edd1..000000000 --- a/pkg/collector/upgrade/v0_31_0_test.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func TestInfluxdbReceiverPropertyDrop(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: ` -receivers: - influxdb: - endpoint: 0.0.0.0:8080 - metrics_schema: telegraf-prometheus-v1 - -exporters: - prometheusremotewrite: - endpoint: "http:hello:4555/hii" - -service: - pipelines: - metrics: - receivers: [influxdb] - exporters: [prometheusremotewrite] -`, - }, - } - existing.Status.Version = "0.30.0" - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, `exporters: - prometheusremotewrite: - endpoint: http:hello:4555/hii -receivers: - influxdb: - endpoint: 0.0.0.0:8080 -service: - pipelines: - metrics: - exporters: - - prometheusremotewrite - receivers: - - influxdb -`, res.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_36_0.go b/pkg/collector/upgrade/v0_36_0.go deleted file mode 100644 index 34bba7a6b..000000000 --- a/pkg/collector/upgrade/v0_36_0.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_36_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.36.0, failed to parse configuration: %w", err) - } - - // upgrading the receivers - receivers, ok := cfg["receivers"].(map[interface{}]interface{}) - if !ok { - // no receivers? no need to fail because of that - return otelcol, nil - } - - for k1, v1 := range receivers { - // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#-breaking-changes--2 - // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector/pull/4063 - - // Change tls config key from tls_settings to tls in otlp.protocols.grpc - if strings.HasPrefix(k1.(string), "otlp") { - otlpConfig, withOTLP := v1.(map[interface{}]interface{}) - if !withOTLP { - // no otlpConfig? no need to fail because of that - return otelcol, nil - } - for k2, v2 := range otlpConfig { - // protocols config - if k2 == "protocols" { - protocConfig, withProtocConfig := v2.(map[interface{}]interface{}) - if !withProtocConfig { - // no protocolConfig? no need to fail because of that - return otelcol, nil - } - for k3, v3 := range protocConfig { - // grpc config - if k3 == "grpc" || k3 == "http" { - grpcHTTPConfig, withHTTPConfig := v3.(map[interface{}]interface{}) - if !withHTTPConfig { - // no grpcHTTPConfig? no need to fail because of that - return otelcol, nil - } - for k4, v4 := range grpcHTTPConfig { - // change tls_settings to tls - if k4.(string) == "tls_settings" { - grpcHTTPConfig["tls"] = v4 - delete(grpcHTTPConfig, "tls_settings") - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.36.0 has changed the tls_settings field name to tls in %s protocol of %s receiver", k3, k1)) - } - } - } - } - } - } - } - } - cfg["receivers"] = receivers - - // upgrading the exporters - exporters, ok := cfg["exporters"].(map[interface{}]interface{}) - if !ok { - // no exporters? no need to fail because of that - return otelcol, nil - } - - for k1, v1 := range exporters { - // from the changelog https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#-breaking-changes--2 - // Here is the upstream PR https://github.com/open-telemetry/opentelemetry-collector/pull/4063 - - // Move all tls config into separate field i,e, tls.* - if strings.HasPrefix(k1.(string), "otlp") { - otlpConfig, ok := v1.(map[interface{}]interface{}) - if !ok { - // no otlpConfig? no need to fail because of that - return otelcol, nil - } - tlsConfig := make(map[interface{}]interface{}, 5) - for key, value := range otlpConfig { - if key == "ca_file" || key == "cert_file" || key == "key_file" || key == "min_version" || key == "max_version" || - key == "insecure" || key == "insecure_skip_verify" || key == "server_name_override" { - tlsConfig[key] = value - delete(otlpConfig, key) - } - otlpConfig["tls"] = tlsConfig - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.36.0 move tls config i.e. ca_file, key_file, cert_file, min_version, max_version to tls.* in %s exporter", k1)) - } - } - } - cfg["exporters"] = exporters - - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.36.0, failed to marshall back configuration: %w", err) - } - otelcol.Spec.Config = string(res) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_36_0_test.go b/pkg/collector/upgrade/v0_36_0_test.go deleted file mode 100644 index 6a90aa7b6..000000000 --- a/pkg/collector/upgrade/v0_36_0_test.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_36_0Upgrade(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: ` -receivers: - otlp/mtls: - protocols: - grpc: - endpoint: mysite.local:55690 - tls_settings: - client_ca_file: client.pem - cert_file: server.crt - key_file: server.key - http: - endpoint: mysite.local:55690 - tls_settings: - client_ca_file: client.pem - cert_file: server.crt - key_file: server.key -exporters: - otlp: - endpoint: "example.com" - ca_file: /var/lib/mycert.pem - insecure: true - key_file: keyfile - min_version: "1.0.0" - max_version: "2.0.2" - insecure_skip_verify: true - server_name_override: hii - -service: - pipelines: - traces: - receivers: [otlp/mtls] - exporters: [otlp] -`, - }, - } - existing.Status.Version = "0.35.0" - - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - // test - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, `exporters: - otlp: - endpoint: example.com - tls: - ca_file: /var/lib/mycert.pem - insecure: true - insecure_skip_verify: true - key_file: keyfile - max_version: 2.0.2 - min_version: 1.0.0 - server_name_override: hii -receivers: - otlp/mtls: - protocols: - grpc: - endpoint: mysite.local:55690 - tls: - cert_file: server.crt - client_ca_file: client.pem - key_file: server.key - http: - endpoint: mysite.local:55690 - tls: - cert_file: server.crt - client_ca_file: client.pem - key_file: server.key -service: - pipelines: - traces: - exporters: - - otlp - receivers: - - otlp/mtls -`, res.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_38_0.go b/pkg/collector/upgrade/v0_38_0.go deleted file mode 100644 index 4b6cc92d3..000000000 --- a/pkg/collector/upgrade/v0_38_0.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "reflect" - "sort" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_38_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - // return if args exist - if len(otelcol.Spec.Args) == 0 { - return otelcol, nil - } - - // Remove otelcol args --log-level, --log-profile, --log-format - // are deprecated in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4213 - foundLoggingArgs := make(map[string]string) - for argKey, argValue := range otelcol.Spec.Args { - if argKey == "--log-level" || argKey == "--log-profile" || argKey == "--log-format" { - foundLoggingArgs[argKey] = argValue - delete(otelcol.Spec.Args, argKey) - } - } - - if len(foundLoggingArgs) > 0 { - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.38.0, failed to parse configuration: %w", err) - } - - serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) - if !ok { - // no serviceConfig? create one as we need to configure logging parameters - cfg["service"] = make(map[interface{}]interface{}) - serviceConfig, _ = cfg["service"].(map[interface{}]interface{}) - } - - telemetryConfig, ok := serviceConfig["telemetry"].(map[interface{}]interface{}) - if !ok { - // no telemetryConfig? create one as we need to configure logging parameters - serviceConfig["telemetry"] = make(map[interface{}]interface{}) - telemetryConfig, _ = serviceConfig["telemetry"].(map[interface{}]interface{}) - } - - logsConfig, ok := telemetryConfig["logs"].(map[interface{}]interface{}) - if !ok { - // no logsConfig? create one as we need to configure logging parameters - telemetryConfig["logs"] = make(map[interface{}]interface{}) - logsConfig, _ = telemetryConfig["logs"].(map[interface{}]interface{}) - } - - // if there is already loggingConfig - // do not override it with values from deprecated args - if len(logsConfig) == 0 { - if val, ok := foundLoggingArgs["--log-level"]; ok { - logsConfig["level"] = val - } - if _, ok := foundLoggingArgs["--log-profile"]; ok { - logsConfig["development"] = true - } - if val, ok := foundLoggingArgs["--log-format"]; ok { - logsConfig["encoding"] = val - } - } - cfg["service"] = serviceConfig - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.38.0, failed to marshall back configuration: %w", err) - } - otelcol.Spec.Config = string(res) - keys := reflect.ValueOf(foundLoggingArgs).MapKeys() - // sort keys to get always the same message - sort.Slice(keys, func(i, j int) bool { - return strings.Compare(keys[i].String(), keys[j].String()) <= 0 - }) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.38.0 dropped the deprecated logging arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.logs, if no logging parameters are configured already.", keys)) - } - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go deleted file mode 100644 index 4404d8e68..000000000 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_38_0Upgrade(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Args: map[string]string{ - "--hii": "hello", - "--log-profile": "", - "--log-format": "hii", - "--log-level": "debug", - "--arg1": "", - }, - Config: ` -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 - -exporters: - otlp: - endpoint: "example.com" - -service: - pipelines: - traces: - receivers: [otlp/mtls] - exporters: [otlp] -`, - }, - } - existing.Status.Version = "0.37.0" - - // TESTCASE 1: verify logging args exist and no config logging parameters - // EXPECTED: drop logging args and configure logging parameters into config from args - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, map[string]string{ - "--hii": "hello", - "--arg1": "", - }, res.Spec.Args) - - // verify - assert.Equal(t, `exporters: - otlp: - endpoint: example.com -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - traces: - exporters: - - otlp - receivers: - - otlp/mtls - telemetry: - logs: - development: true - encoding: hii - level: debug -`, res.Spec.Config) - - // TESTCASE 2: verify logging args exist and also config logging parameters exist - // EXPECTED: drop logging args and persist logging parameters as configured in config - configWithLogging := `exporters: - otlp: - endpoint: example.com -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - traces: - exporters: - - otlp - receivers: - - otlp/mtls - telemetry: - logs: - development: true - encoding: hii - level: debug -` - existing.Spec.Config = configWithLogging - existing.Spec.Args = map[string]string{ - "--hii": "hello", - "--log-profile": "", - "--log-format": "hii", - "--log-level": "debug", - "--arg1": "", - } - - res, err = up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, configWithLogging, res.Spec.Config) - assert.Equal(t, map[string]string{ - "--hii": "hello", - "--arg1": "", - }, res.Spec.Args) -} diff --git a/pkg/collector/upgrade/v0_39_0.go b/pkg/collector/upgrade/v0_39_0.go deleted file mode 100644 index 0638f9094..000000000 --- a/pkg/collector/upgrade/v0_39_0.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_39_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to parse configuration: %w", err) - } - - // Remove processors.memory_limiter.ballast_size_mib - // as it is deprecated in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4365 - processors, _ := cfg["processors"].(map[interface{}]interface{}) - - for k1, v1 := range processors { - // Drop the deprecated field ballast_size_mib from memory_limiter - if strings.HasPrefix(k1.(string), "memory_limiter") { - memoryLimiter, _ := v1.(map[interface{}]interface{}) - for k2 := range memoryLimiter { - if k2 == "ballast_size_mib" { - delete(memoryLimiter, k2) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", k1)) - } - } - } - } - - otelcol, err = updateConfig(otelcol, cfg) - if err != nil { - return otelcol, err - } - - // Rename httpd receiver to apache receiver - // in reference to https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/6207 - receivers, _ := cfg["receivers"].(map[interface{}]interface{}) - - for k1, v1 := range receivers { - if strings.HasPrefix(k1.(string), "httpd") { - // Rename httpd with apache - apacheKey := strings.Replace(k1.(string), "httpd", "apache", 1) - receivers[apacheKey] = v1 - delete(receivers, k1) - - // rename receiver name in service pipelines config - serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) - if !ok { - // no serviceConfig? - return otelcol, nil - } - - pipelinesConfig, ok := serviceConfig["pipelines"].(map[interface{}]interface{}) - if !ok { - // no pipelinesConfig? - return otelcol, nil - } - - for k2, v2 := range pipelinesConfig { - if k2.(string) == "metrics" { - metricsConfig, ok := v2.(map[interface{}]interface{}) - if !ok { - // no metricsConfig in service pipelines? - return otelcol, nil - } - for k3, v3 := range metricsConfig { - if k3.(string) == "receivers" { - receiversList, ok := v3.([]interface{}) - if !ok { - // no receivers list in service pipeline? - return otelcol, nil - } - for i, k4 := range receiversList { - if strings.HasPrefix(k4.(string), "httpd") { - receiversList[i] = strings.Replace(k4.(string), "httpd", "apache", 1) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.39.0 has dropped the ballast_size_mib field name from %s processor", receiversList[i])) - } - } - } - } - } - } - } - } - - return updateConfig(otelcol, cfg) -} - -func updateConfig(otelcol *v1alpha1.AmazonCloudWatchAgent, cfg map[interface{}]interface{}) (*v1alpha1.AmazonCloudWatchAgent, error) { - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.39.0, failed to marshall back configuration: %w", err) - } - - // Note: This is a hack to drop null occurrences from our config parsing above in upgrade routine - otelcol.Spec.Config = strings.ReplaceAll(string(res), " null", "") - - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_39_0_test.go b/pkg/collector/upgrade/v0_39_0_test.go deleted file mode 100644 index f02424253..000000000 --- a/pkg/collector/upgrade/v0_39_0_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_39_0Upgrade(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: ` -receivers: - httpd/mtls: - protocols: - http: - endpoint: mysite.local:55690 - - httpd: - -processors: - memory_limiter: - memory_limiter/with-settings: - check_interval: 5s - limit_mib: 4000 - spike_limit_mib: 500 - ballast_size_mib: 2000 - -service: - pipelines: - metrics: - receivers: [httpd/mtls, httpd] - exporters: [nop] -`, - }, - } - existing.Status.Version = "0.38.0" - - // TESTCASE 1: verify httpd receiver renamed to apache - // drop processors.memory_limiter field 'ballast_size_mib' - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - assert.Equal(t, `processors: - memory_limiter: - memory_limiter/with-settings: - check_interval: 5s - limit_mib: 4000 - spike_limit_mib: 500 -receivers: - apache: - apache/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - metrics: - exporters: - - nop - receivers: - - apache/mtls - - apache -`, res.Spec.Config) - - // TESTCASE 2: Drop ballast_size_mib from memory_limiter processor - existing1 := v1alpha1.AmazonCloudWatchAgent{ - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 - - otlp: - -processors: - memory_limiter: - memory_limiter/with-settings: - check_interval: 5s - limit_mib: 4000 - spike_limit_mib: 500 - ballast_size_mib: 2000 - -service: - pipelines: - traces: - receivers: [otlp/mtls, otlp] - exporters: [nop] -`, - }, - } - - existing1.Status.Version = "0.38.0" - res, err = up.ManagedInstance(context.Background(), existing1) - assert.NoError(t, err) - - // verify - assert.Equal(t, `processors: - memory_limiter: - memory_limiter/with-settings: - check_interval: 5s - limit_mib: 4000 - spike_limit_mib: 500 -receivers: - otlp: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - traces: - exporters: - - nop - receivers: - - otlp/mtls - - otlp -`, res.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_41_0.go b/pkg/collector/upgrade/v0_41_0.go deleted file mode 100644 index 3b7ffdf97..000000000 --- a/pkg/collector/upgrade/v0_41_0.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_41_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.41.0, failed to parse configuration: %w", err) - } - - // Re-structure the cors section in otlp receiver - // in reference to https://github.com/open-telemetry/opentelemetry-collector/pull/4492 - receivers, _ := cfg["receivers"].(map[interface{}]interface{}) - - for k1, v1 := range receivers { - if strings.HasPrefix(k1.(string), "otlp") { - otlpReceiver, _ := v1.(map[interface{}]interface{}) - var createdCors bool - for k2, v2 := range otlpReceiver { - if k2.(string) == "cors_allowed_origins" || k2.(string) == "cors_allowed_headers" { - if !createdCors { - otlpReceiver["cors"] = make(map[interface{}]interface{}) - createdCors = true - } - newsCorsKey := strings.Replace(k2.(string), "cors_", "", 1) - otlpCors, _ := otlpReceiver["cors"].(map[interface{}]interface{}) - otlpCors[newsCorsKey] = v2 - delete(otlpReceiver, k2) - - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.41.0 has re-structured the %s inside otlp "+"receiver config according to the upstream otlp receiver changes in 0.41.0 release.", k2)) - } - } - } - } - - return updateConfig(otelcol, cfg) -} diff --git a/pkg/collector/upgrade/v0_41_0_test.go b/pkg/collector/upgrade/v0_41_0_test.go deleted file mode 100644 index 013b20270..000000000 --- a/pkg/collector/upgrade/v0_41_0_test.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_41_0Upgrade(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: ` -receivers: - otlp: - cors_allowed_origins: - - https://foo.bar.com - - https://*.test.com - cors_allowed_headers: - - ExampleHeader - -service: - pipelines: - metrics: - receivers: [otlp] - exporters: [nop] -`, - }, - } - existing.Status.Version = "0.40.0" - - // TESTCASE 1: restructure cors for both allowed_origin & allowed_headers - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - assert.Equal(t, `receivers: - otlp: - cors: - allowed_headers: - - ExampleHeader - allowed_origins: - - https://foo.bar.com - - https://*.test.com -service: - pipelines: - metrics: - exporters: - - nop - receivers: - - otlp -`, res.Spec.Config) - - // TESTCASE 2: re-structure cors for allowed_origins - existing = v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: ` -receivers: - otlp: - cors_allowed_origins: - - https://foo.bar.com - - https://*.test.com - -service: - pipelines: - metrics: - receivers: [otlp] - exporters: [nop] -`, - }, - } - - existing.Status.Version = "0.40.0" - res, err = up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - assert.Equal(t, `receivers: - otlp: - cors: - allowed_origins: - - https://foo.bar.com - - https://*.test.com -service: - pipelines: - metrics: - exporters: - - nop - receivers: - - otlp -`, res.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_43_0.go b/pkg/collector/upgrade/v0_43_0.go deleted file mode 100644 index 9f01ef848..000000000 --- a/pkg/collector/upgrade/v0_43_0.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "sort" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_43_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - // return if args exist - if len(otelcol.Spec.Args) == 0 { - return otelcol, nil - } - - //Removing deprecated Spec.Args (--metrics-addr and --metrics-level) based on - // https://github.com/open-telemetry/opentelemetry-collector/pull/4695 - //Both args can be used now on the Spec.Config - foundMetricsArgs := make(map[string]string) - for argKey, argValue := range otelcol.Spec.Args { - if argKey == "--metrics-addr" || argKey == "--metrics-level" { - foundMetricsArgs[argKey] = argValue - delete(otelcol.Spec.Args, argKey) - } - } - - // If we find metrics being used on Spec.Args we'll move to the syntax on Spec.Config - if len(foundMetricsArgs) > 0 { - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.43.0, failed to parse configuration: %w", err) - } - serviceConfig, ok := cfg["service"].(map[interface{}]interface{}) - if !ok { - cfg["service"] = make(map[interface{}]interface{}) - serviceConfig, _ = cfg["service"].(map[interface{}]interface{}) - } - telemetryConfig, ok := serviceConfig["telemetry"].(map[interface{}]interface{}) - if !ok { - serviceConfig["telemetry"] = make(map[interface{}]interface{}) - telemetryConfig, _ = serviceConfig["telemetry"].(map[interface{}]interface{}) - } - metricsConfig, ok := telemetryConfig["metrics"].(map[interface{}]interface{}) - if !ok { - telemetryConfig["metrics"] = make(map[interface{}]interface{}) - metricsConfig, _ = telemetryConfig["metrics"].(map[interface{}]interface{}) - } - - // if there are already those Args under Spec.Config - // then we won't override them. - if len(metricsConfig) == 0 { - if val, ok := foundMetricsArgs["--metrics-addr"]; ok { - metricsConfig["address"] = val - } - if val, ok := foundMetricsArgs["--metrics-level"]; ok { - metricsConfig["level"] = val - } - } - cfg["service"] = serviceConfig - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.43.0, failed to marshall back configuration: %w", err) - } - otelcol.Spec.Config = string(res) - keys := make([]string, 0, len(foundMetricsArgs)) - for k := range foundMetricsArgs { - keys = append(keys, k) - } - sort.Strings(keys) - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.43.0 dropped the deprecated metrics arguments "+"i.e. %v from otelcol custom resource otelcol.spec.args and adding them to otelcol.spec.config.service.telemetry.metrics, if no metrics arguments are configured already.", keys)) - } - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go deleted file mode 100644 index 0ded79e04..000000000 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_43_0Upgrade(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Args: map[string]string{ - "--metrics-addr": ":8988", - "--metrics-level": "detailed", - "--test-upgrade43": "true", - "--test-arg1": "otel", - }, - Config: ` -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 - -exporters: - otlp: - endpoint: "example.com" - -service: - pipelines: - traces: - receivers: [otlp/mtls] - exporters: [otlp] -`, - }, - } - existing.Status.Version = "0.42.0" - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, map[string]string{ - "--test-upgrade43": "true", - "--test-arg1": "otel", - }, res.Spec.Args) - - // verify - assert.Equal(t, `exporters: - otlp: - endpoint: example.com -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - traces: - exporters: - - otlp - receivers: - - otlp/mtls - telemetry: - metrics: - address: :8988 - level: detailed -`, res.Spec.Config) - - configWithMetrics := `exporters: - otlp: - endpoint: example.com -receivers: - otlp/mtls: - protocols: - http: - endpoint: mysite.local:55690 -service: - pipelines: - traces: - exporters: - - otlp - receivers: - - otlp/mtls - telemetry: - metrics: - address: :8988 - level: detailed -` - existing.Spec.Config = configWithMetrics - existing.Spec.Args = map[string]string{ - "--metrics-addr": ":8988", - "--metrics-level": "detailed", - "--test-upgrade43": "true", - "--test-arg1": "otel", - } - res, err = up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Equal(t, configWithMetrics, res.Spec.Config) - assert.Equal(t, map[string]string{ - "--test-upgrade43": "true", - "--test-arg1": "otel", - }, res.Spec.Args) - -} diff --git a/pkg/collector/upgrade/v0_56_0.go b/pkg/collector/upgrade/v0_56_0.go deleted file mode 100644 index 7adb23ed9..000000000 --- a/pkg/collector/upgrade/v0_56_0.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "context" - "fmt" - - autoscalingv1 "k8s.io/api/autoscaling/v1" - "sigs.k8s.io/controller-runtime/pkg/client" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/naming" -) - -func upgrade0_56_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - // return if this does not use an autoscaler - if otelcol.Spec.MaxReplicas == nil { - return otelcol, nil - } - - // Add minReplicas - one := int32(1) - otelcol.Spec.MinReplicas = &one - - // Find the existing HPA for this collector and upgrade it if necessary - listOptions := []client.ListOption{ - client.InNamespace(otelcol.Namespace), - client.MatchingLabels(map[string]string{ - "app.kubernetes.io/instance": fmt.Sprintf("%s.%s", otelcol.Namespace, otelcol.Name), - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }), - } - - hpaList := &autoscalingv1.HorizontalPodAutoscalerList{} - ctx := context.Background() - if err := u.Client.List(ctx, hpaList, listOptions...); err != nil { - return nil, fmt.Errorf("couldn't upgrade to v0.56.0, failed trying to find HPA instances: %w", err) - } - - errors := []error{} - for i := range hpaList.Items { - existing := hpaList.Items[i] - // If there is an autoscaler based on Deployment, replace it with one based on AmazonCloudWatchAgent - if existing.Spec.ScaleTargetRef.Kind == "Deployment" { - updated := existing.DeepCopy() - updated.Spec.ScaleTargetRef = autoscalingv1.CrossVersionObjectReference{ - Kind: "AmazonCloudWatchAgent", - Name: naming.AmazonCloudWatchAgentName(otelcol.Name), - APIVersion: v1alpha1.GroupVersion.String(), - } - patch := client.MergeFrom(&existing) - err := u.Client.Patch(ctx, updated, patch) - if err != nil { - errors = append(errors, err) - } - } - } - - if len(errors) != 0 { - return nil, fmt.Errorf("couldn't upgrade to v0.56.0, failed to recreate autoscaler: %v", errors) - } - - u.Log.Info("in upgrade0_56_0", "Otel Instance", otelcol.Name, "Upgrade version", u.Version.String()) - u.Recorder.Event(otelcol, "Normal", "Upgrade", "upgraded to v0.56.0, added minReplicas. recreated HPA instance") - - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_56_0_test.go b/pkg/collector/upgrade/v0_56_0_test.go deleted file mode 100644 index 13e92035d..000000000 --- a/pkg/collector/upgrade/v0_56_0_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_56_0Upgrade(t *testing.T) { - one := int32(1) - three := int32(3) - - collectorInstance := v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "AmazonCloudWatchAgent", - APIVersion: "v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "my-instance", - Namespace: "somewhere", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Replicas: &one, - MaxReplicas: &three, - }, - } - - collectorInstance.Status.Version = "0.55.0" - versionUpgrade := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - upgradedInstance, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) - assert.NoError(t, err) - assert.Equal(t, one, *upgradedInstance.Spec.MinReplicas) -} diff --git a/pkg/collector/upgrade/v0_57_2.go b/pkg/collector/upgrade/v0_57_2.go deleted file mode 100644 index 122a85431..000000000 --- a/pkg/collector/upgrade/v0_57_2.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" -) - -func upgrade0_57_2(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - otelCfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, failed to parse configuration: %w", err) - } - - //Remove deprecated port field from config. (https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/10853) - extensionsConfig, ok := otelCfg["extensions"].(map[interface{}]interface{}) - if !ok { - // In case there is no extensions config. - return otelcol, nil - } - - for keyExt, valExt := range extensionsConfig { - if strings.HasPrefix(keyExt.(string), "health_check") { - switch extensions := valExt.(type) { - case map[interface{}]interface{}: - if port, ok := extensions["port"]; ok { - endpointV := extensions["endpoint"] - extensions["endpoint"] = fmt.Sprintf("%s:%s", endpointV, port) - delete(extensions, "port") - - otelCfg["extensions"] = extensionsConfig - res, err := yaml.Marshal(otelCfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, failed to marshall back configuration: %w", err) - } - - otelcol.Spec.Config = string(res) - u.Recorder.Event(otelcol, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.57.2 has deprecated port for healthcheck extension %q", keyExt)) - } - default: - return otelcol, fmt.Errorf("couldn't upgrade to v0.57.2, the extension %q is invalid (expected string or map but was %t)", keyExt, valExt) - } - } - } - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_57_2_test.go b/pkg/collector/upgrade/v0_57_2_test.go deleted file mode 100644 index 86d88ec15..000000000 --- a/pkg/collector/upgrade/v0_57_2_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func Test0_57_0Upgrade(t *testing.T) { - collectorInstance := v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "AmazonCloudWatchAgent", - APIVersion: "v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "otel-my-instance", - Namespace: "somewhere", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `receivers: - otlp: - protocols: - http: - endpoint: mysite.local:55690 -extensions: - health_check: - endpoint: "localhost" - port: "4444" - check_collector_pipeline: - enabled: false - exporter_failure_threshold: 5 - interval: 5m -service: - extensions: [health_check] - pipelines: - metrics: - receivers: [otlp] - exporters: [nop] -`, - }, - } - - collectorInstance.Status.Version = "0.56.0" - //Test to remove port and change endpoint value. - versionUpgrade := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - - upgradedInstance, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) - assert.NoError(t, err) - assert.Equal(t, `extensions: - health_check: - check_collector_pipeline: - enabled: false - exporter_failure_threshold: 5 - interval: 5m - endpoint: localhost:4444 -receivers: - otlp: - protocols: - http: - endpoint: mysite.local:55690 -service: - extensions: - - health_check - pipelines: - metrics: - exporters: - - nop - receivers: - - otlp -`, upgradedInstance.Spec.Config) -} diff --git a/pkg/collector/upgrade/v0_61_0.go b/pkg/collector/upgrade/v0_61_0.go deleted file mode 100644 index 82b448f8b..000000000 --- a/pkg/collector/upgrade/v0_61_0.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "errors" - "fmt" - "strings" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" -) - -func upgrade0_61_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - otelCfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.61.0, failed to parse configuration: %w", err) - } - - // Search for removed Jaeger remote sampling settings. (https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/14163) - receiversConfig, ok := otelCfg["receivers"].(map[any]any) - if !ok { - // In case there is no extensions config. - return otelcol, nil - } - - for key, rc := range receiversConfig { - k, ok := key.(string) - if !ok { - continue - } - cfg, ok := rc.(map[any]any) - // check if jaeger is configured - if !ok || !strings.HasPrefix(k, "jaeger") { - continue - } - - // check if remote sampling settings exit - if _, ok := cfg["remote_sampling"]; !ok { - continue - } - - const issueID = "https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/14707" - errStr := fmt.Sprintf( - "jaegerremotesampling is no longer available as receiver configuration. "+ - "Please use the extension instead with a different remote sampling port. See: %s", - issueID, - ) - u.Recorder.Event(otelcol, "Error", "Upgrade", errStr) - return nil, errors.New(errStr) - } - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_61_0_test.go b/pkg/collector/upgrade/v0_61_0_test.go deleted file mode 100644 index aa4629298..000000000 --- a/pkg/collector/upgrade/v0_61_0_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - _ "embed" - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -var ( - //go:embed testdata/v0_61_0-valid.yaml - valid string - //go:embed testdata/v0_61_0-invalid.yaml - invalid string -) - -func Test0_61_0Upgrade(t *testing.T) { - - collectorInstance := v1alpha1.AmazonCloudWatchAgent{ - TypeMeta: metav1.TypeMeta{ - Kind: "AmazonCloudWatchAgent", - APIVersion: "v1alpha1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "otel-my-instance", - Namespace: "somewhere", - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{}, - } - - tt := []struct { - name string - config string - expectErr bool - }{ - { - name: "no remote sampling config", // valid - config: valid, - expectErr: false, - }, - { - name: "has remote sampling config", // invalid - config: invalid, - expectErr: true, - }, - } - - for _, tc := range tt { - t.Run(tc.name, func(t *testing.T) { - collectorInstance.Spec.Config = tc.config - collectorInstance.Status.Version = "0.60.0" - - versionUpgrade := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: k8sClient, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - - _, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) - if (err != nil) != tc.expectErr { - t.Errorf("expect err: %t but got: %v", tc.expectErr, err) - } - }) - } -} diff --git a/pkg/collector/upgrade/v0_9_0.go b/pkg/collector/upgrade/v0_9_0.go deleted file mode 100644 index b19f9c4bd..000000000 --- a/pkg/collector/upgrade/v0_9_0.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "fmt" - "strings" - - "gopkg.in/yaml.v2" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" - - corev1 "k8s.io/api/core/v1" -) - -func upgrade0_9_0(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) { - if len(otelcol.Spec.Config) == 0 { - return otelcol, nil - } - - cfg, err := adapters.ConfigFromString(otelcol.Spec.Config) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to parse configuration: %w", err) - } - - exporters, ok := cfg["exporters"].(map[interface{}]interface{}) - if !ok { - return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to extract list of exporters from the configuration: %q", cfg["exporters"]) - } - - for k, v := range exporters { - if strings.HasPrefix("opencensus", k.(string)) { - switch exporter := v.(type) { - case map[interface{}]interface{}: - // delete is a noop if there's no such entry - delete(exporter, "reconnection_delay") - existing := &corev1.ConfigMap{} - updated := existing.DeepCopy() - u.Recorder.Event(updated, "Normal", "Upgrade", fmt.Sprintf("upgrade to v0.9.0 removed the property reconnection_delay for exporter %q", k)) - exporters[k] = exporter - case string: - if len(exporter) == 0 { - // this exporter is using the default configuration - continue - } - default: - return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, the exporter %q is invalid (neither a string nor map)", k) - } - } - } - - cfg["exporters"] = exporters - res, err := yaml.Marshal(cfg) - if err != nil { - return otelcol, fmt.Errorf("couldn't upgrade to v0.9.0, failed to marshall back configuration: %w", err) - } - - otelcol.Spec.Config = string(res) - return otelcol, nil -} diff --git a/pkg/collector/upgrade/v0_9_0_test.go b/pkg/collector/upgrade/v0_9_0_test.go deleted file mode 100644 index 0ea23d051..000000000 --- a/pkg/collector/upgrade/v0_9_0_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/tools/record" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" - "github.com/aws/amazon-cloudwatch-agent-operator/internal/version" - "github.com/aws/amazon-cloudwatch-agent-operator/pkg/collector/upgrade" -) - -func TestRemoveConnectionDelay(t *testing.T) { - // prepare - nsn := types.NamespacedName{Name: "my-instance", Namespace: "default"} - existing := v1alpha1.AmazonCloudWatchAgent{ - ObjectMeta: metav1.ObjectMeta{ - Name: nsn.Name, - Namespace: nsn.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "amazon-cloudwatch-agent-operator", - }, - }, - Spec: v1alpha1.AmazonCloudWatchAgentSpec{ - Config: `exporters: - opencensus: - compression: "on" - reconnection_delay: 15 - num_workers: 123`, - }, - } - existing.Status.Version = "0.8.0" - - // sanity check - require.Contains(t, existing.Spec.Config, "reconnection_delay") - - // test - up := &upgrade.VersionUpgrade{ - Log: logger, - Version: version.Get(), - Client: nil, - Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), - } - res, err := up.ManagedInstance(context.Background(), existing) - assert.NoError(t, err) - - // verify - assert.Contains(t, res.Spec.Config, "opencensus:") - assert.Contains(t, res.Spec.Config, `compression: "on"`) - assert.NotContains(t, res.Spec.Config, "reconnection_delay") - assert.Contains(t, res.Spec.Config, "num_workers: 123") -} diff --git a/pkg/collector/upgrade/versions.go b/pkg/collector/upgrade/versions.go deleted file mode 100644 index a43ffbb72..000000000 --- a/pkg/collector/upgrade/versions.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package upgrade - -import ( - "github.com/Masterminds/semver/v3" - - "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" -) - -type upgradeFunc func(u VersionUpgrade, otelcol *v1alpha1.AmazonCloudWatchAgent) (*v1alpha1.AmazonCloudWatchAgent, error) - -type otelcolVersion struct { - upgrade upgradeFunc - semver.Version -} - -var ( - versions = []otelcolVersion{ - { - Version: *semver.MustParse("0.2.10"), - upgrade: upgrade0_2_10, - }, - { - Version: *semver.MustParse("0.9.0"), - upgrade: upgrade0_9_0, - }, - { - Version: *semver.MustParse("0.15.0"), - upgrade: upgrade0_15_0, - }, - { - Version: *semver.MustParse("0.19.0"), - upgrade: upgrade0_19_0, - }, - { - Version: *semver.MustParse("0.24.0"), - upgrade: upgrade0_24_0, - }, - { - Version: *semver.MustParse("0.31.0"), - upgrade: upgrade0_31_0, - }, - { - Version: *semver.MustParse("0.36.0"), - upgrade: upgrade0_36_0, - }, - { - Version: *semver.MustParse("0.38.0"), - upgrade: upgrade0_38_0, - }, - { - Version: *semver.MustParse("0.39.0"), - upgrade: upgrade0_39_0, - }, - { - Version: *semver.MustParse("0.41.0"), - upgrade: upgrade0_41_0, - }, - { - Version: *semver.MustParse("0.43.0"), - upgrade: upgrade0_43_0, - }, - { - Version: *semver.MustParse("0.56.0"), - upgrade: upgrade0_56_0, - }, - { - Version: *semver.MustParse("0.57.2"), - upgrade: upgrade0_57_2, - }, - { - Version: *semver.MustParse("0.61.0"), - upgrade: upgrade0_61_0, - }, - } - - // Latest represents the latest version that we need to upgrade. This is not necessarily the latest known version. - Latest = versions[len(versions)-1] -) From 2d757b3f639044c5c9dcb44bef320c8eb7bc1e9b Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Wed, 17 Jan 2024 18:02:40 -0500 Subject: [PATCH 1233/1234] Remove config manifests and unused testdata --- ...emetry-operator.clusterserviceversion.yaml | 146 ------------------ config/manifests/kustomization.yaml | 4 - controllers/testdata/ingress_testdata.yaml | 17 -- controllers/testdata/test.yaml | 22 --- controllers/testdata/test_ta_update.yaml | 22 --- 5 files changed, 211 deletions(-) delete mode 100644 config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml delete mode 100644 config/manifests/kustomization.yaml delete mode 100644 controllers/testdata/ingress_testdata.yaml delete mode 100644 controllers/testdata/test.yaml delete mode 100644 controllers/testdata/test_ta_update.yaml diff --git a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml b/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml deleted file mode 100644 index 833b9ea46..000000000 --- a/config/manifests/bases/opentelemetry-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,146 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: '[]' - capabilities: Deep Insights - categories: Logging & Tracing,Monitoring - certified: "false" - containerImage: ghcr.io/aws/amazon-cloudwatch-agent-operator/amazon-cloudwatch-agent-operator - createdAt: "2020-12-16T13:37:00+00:00" - description: Provides the OpenTelemetry components, including the Collector - repository: github.com/aws/amazon-cloudwatch-agent-operator - support: OpenTelemetry Community - name: amazon-cloudwatch-agent-operator.v0.0.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents - API. - displayName: OpenTelemetry Collector - kind: AmazonCloudWatchAgent - name: amazoncloudwatchagents.core.opentelemetry.io - version: v1alpha1 - - description: Instrumentation is the spec for OpenTelemetry instrumentation. - displayName: OpenTelemetry Instrumentation - kind: Instrumentation - name: instrumentations.opentelemetry.io - resources: - - kind: Pod - name: "" - version: v1 - version: v1alpha1 - - description: OpAMPBridge is the Schema for the opampbridges API. - displayName: OpAMP Bridge - kind: OpAMPBridge - name: opampbridges.opentelemetry.io - resources: - - kind: ConfigMaps - name: "" - version: v1 - - kind: Deployment - name: "" - version: apps/v1 - - kind: Pod - name: "" - version: v1 - - kind: Service - name: "" - version: v1 - version: v1alpha1 - - description: AmazonCloudWatchAgent is the Schema for the amazoncloudwatchagents - API. - displayName: OpenTelemetry Collector - kind: AmazonCloudWatchAgent - name: amazoncloudwatchagents.opentelemetry.io - resources: - - kind: ConfigMaps - name: "" - version: v1 - - kind: DaemonSets - name: "" - version: apps/v1 - - kind: Deployment - name: "" - version: apps/v1 - - kind: Pod - name: "" - version: v1 - - kind: Service - name: "" - version: v1 - - kind: StatefulSets - name: "" - version: apps/v1 - specDescriptors: - - description: ObservabilitySpec defines how telemetry data gets handled. - displayName: Observability - path: observability - - description: Metrics defines the metrics configuration for operands. - displayName: Metrics Config - path: observability.metrics - - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the service managed by the OpenTelemetry Operator. - The operator.observability.prometheus feature gate must be enabled to use - this feature. - displayName: Create ServiceMonitors for OpenTelemetry Collector - path: observability.metrics.enableMetrics - - description: ObservabilitySpec defines how telemetry data gets handled. - displayName: Observability - path: targetAllocator.observability - - description: Metrics defines the metrics configuration for operands. - displayName: Metrics Config - path: targetAllocator.observability.metrics - - description: EnableMetrics specifies if ServiceMonitor or PodMonitor(for sidecar - mode) should be created for the service managed by the OpenTelemetry Operator. - The operator.observability.prometheus feature gate must be enabled to use - this feature. - displayName: Create ServiceMonitors for OpenTelemetry Collector - path: targetAllocator.observability.metrics.enableMetrics - version: v1alpha1 - description: |- - OpenTelemetry is a collection of tools, APIs, and SDKs. You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. - - ### Operator features - - * **Sidecar injection** - annotate your pods and let the operator inject a sidecar. - * **Managed upgrades** - updating the operator will automatically update your OpenTelemetry collectors. - * **Deployment modes** - your collector can be deployed as sidecar, daemon set, or regular deployment. - * **Service port management** - the operator detects which ports need to be exposed based on the provided configuration. - displayName: Community OpenTelemetry Operator - icon: - - base64data: PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHJvbGU9ImltZyIgdmlld0JveD0iLTEyLjcwIC0xMi43MCAxMDI0LjQwIDEwMjQuNDAiPjxzdHlsZT5zdmcge2VuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTAwMCAxMDAwfTwvc3R5bGU+PHBhdGggZmlsbD0iI2Y1YTgwMCIgZD0iTTUyOC43IDU0NS45Yy00MiA0Mi00MiAxMTAuMSAwIDE1Mi4xczExMC4xIDQyIDE1Mi4xIDAgNDItMTEwLjEgMC0xNTIuMS0xMTAuMS00Mi0xNTIuMSAwem0xMTMuNyAxMTMuOGMtMjAuOCAyMC44LTU0LjUgMjAuOC03NS4zIDAtMjAuOC0yMC44LTIwLjgtNTQuNSAwLTc1LjMgMjAuOC0yMC44IDU0LjUtMjAuOCA3NS4zIDAgMjAuOCAyMC43IDIwLjggNTQuNSAwIDc1LjN6bTM2LjYtNjQzbC02NS45IDY1LjljLTEyLjkgMTIuOS0xMi45IDM0LjEgMCA0N2wyNTcuMyAyNTcuM2MxMi45IDEyLjkgMzQuMSAxMi45IDQ3IDBsNjUuOS02NS45YzEyLjktMTIuOSAxMi45LTM0LjEgMC00N0w3MjUuOSAxNi43Yy0xMi45LTEyLjktMzQtMTIuOS00Ni45IDB6TTIxNy4zIDg1OC44YzExLjctMTEuNyAxMS43LTMwLjggMC00Mi41bC0zMy41LTMzLjVjLTExLjctMTEuNy0zMC44LTExLjctNDIuNSAwTDcyLjEgODUybC0uMS4xLTE5LTE5Yy0xMC41LTEwLjUtMjcuNi0xMC41LTM4IDAtMTAuNSAxMC41LTEwLjUgMjcuNiAwIDM4bDExNCAxMTRjMTAuNSAxMC41IDI3LjYgMTAuNSAzOCAwczEwLjUtMjcuNiAwLTM4bC0xOS0xOSAuMS0uMSA2OS4yLTY5LjJ6Ii8+PHBhdGggZmlsbD0iIzQyNWNjNyIgZD0iTTU2NS45IDIwNS45TDQxOS41IDM1Mi4zYy0xMyAxMy0xMyAzNC40IDAgNDcuNGw5MC40IDkwLjRjNjMuOS00NiAxNTMuNS00MC4zIDIxMSAxNy4ybDczLjItNzMuMmMxMy0xMyAxMy0zNC40IDAtNDcuNEw2MTMuMyAyMDUuOWMtMTMtMTMuMS0zNC40LTEzLjEtNDcuNCAwem0tOTQgMzIyLjNsLTUzLjQtNTMuNGMtMTIuNS0xMi41LTMzLTEyLjUtNDUuNSAwTDE4NC43IDY2My4yYy0xMi41IDEyLjUtMTIuNSAzMyAwIDQ1LjVsMTA2LjcgMTA2LjdjMTIuNSAxMi41IDMzIDEyLjUgNDUuNSAwTDQ1OCA2OTQuMWMtMjUuNi01Mi45LTIxLTExNi44IDEzLjktMTY1Ljl6Ii8+PC9zdmc+ - mediatype: image/svg+xml - install: - spec: - deployments: null - strategy: "" - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: true - type: AllNamespaces - keywords: - - opentelemetry - - tracing - - logging - - metrics - - monitoring - - troubleshooting - links: - - name: OpenTelemetry Operator - url: https://github.com/aws/amazon-cloudwatch-agent-operator - maintainers: - - email: jpkroehling@redhat.com - name: Juraci Paixão Kröhling - maturity: alpha - minKubeVersion: 1.23.0 - provider: - name: OpenTelemetry Community - version: 0.0.0 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml deleted file mode 100644 index 63ca74d72..000000000 --- a/config/manifests/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -resources: -- ../default -- ../samples -- ../scorecard diff --git a/controllers/testdata/ingress_testdata.yaml b/controllers/testdata/ingress_testdata.yaml deleted file mode 100644 index 4d6ba26c1..000000000 --- a/controllers/testdata/ingress_testdata.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -receivers: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:12345 - otlp/test: - protocols: - grpc: - endpoint: 0.0.0.0:12346 -exporters: - debug: -service: - pipelines: - traces: - receivers: [otlp, otlp/test] - exporters: [debug] diff --git a/controllers/testdata/test.yaml b/controllers/testdata/test.yaml deleted file mode 100644 index abba475c0..000000000 --- a/controllers/testdata/test.yaml +++ /dev/null @@ -1,22 +0,0 @@ -processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999' ] - -exporters: - logging: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [logging] \ No newline at end of file diff --git a/controllers/testdata/test_ta_update.yaml b/controllers/testdata/test_ta_update.yaml deleted file mode 100644 index b024fede6..000000000 --- a/controllers/testdata/test_ta_update.yaml +++ /dev/null @@ -1,22 +0,0 @@ -processors: -receivers: - jaeger: - protocols: - grpc: - prometheus: - config: - scrape_configs: - - job_name: otel-collector - scrape_interval: 10s - static_configs: - - targets: [ '0.0.0.0:8888', '0.0.0.0:9999', '0.0.0.0:10100' ] - -exporters: - logging: - -service: - pipelines: - metrics: - receivers: [prometheus, jaeger] - processors: [] - exporters: [logging] \ No newline at end of file From f98b527773d6d7ad766a0d0291120ddca74ad2c3 Mon Sep 17 00:00:00 2001 From: Lisa Guo Date: Fri, 19 Jan 2024 13:20:30 -0500 Subject: [PATCH 1234/1234] Use agent keyword instead of otelCol. Add statefulset rbac permissions. Fix config issue by using json instead of yaml --- Dockerfile | 2 +- controllers/amazoncloudwatchagent_controller.go | 6 +----- helm/templates/operator-clusterrole.yaml | 3 +++ internal/manifests/collector/adapters/config_from.go | 1 + internal/manifests/collector/config_replace.go | 7 ++++--- internal/manifests/collector/container_test.go | 8 ++++++-- internal/manifests/collector/suite_test.go | 2 +- main.go | 8 ++++---- 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1e880e897..2911f59b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ ARG AGENT_VERSION ARG AUTO_INSTRUMENTATION_JAVA_VERSION # Build -RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.otelCol=${AGENT_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -ldflags="-X ${VERSION_PKG}.version=${VERSION} -X ${VERSION_PKG}.buildDate=${VERSION_DATE} -X ${VERSION_PKG}.agent=${AGENT_VERSION} -X ${VERSION_PKG}.autoInstrumentationJava=${AUTO_INSTRUMENTATION_JAVA_VERSION}" -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/controllers/amazoncloudwatchagent_controller.go b/controllers/amazoncloudwatchagent_controller.go index d39d778d0..99721c3d9 100644 --- a/controllers/amazoncloudwatchagent_controller.go +++ b/controllers/amazoncloudwatchagent_controller.go @@ -9,9 +9,7 @@ import ( "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" - autoscalingv2 "k8s.io/api/autoscaling/v2" corev1 "k8s.io/api/core/v1" - policyV1 "k8s.io/api/policy/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" @@ -123,9 +121,7 @@ func (r *AmazonCloudWatchAgentReconciler) SetupWithManager(mgr ctrl.Manager) err Owns(&corev1.Service{}). Owns(&appsv1.Deployment{}). Owns(&appsv1.DaemonSet{}). - Owns(&appsv1.StatefulSet{}). - Owns(&autoscalingv2.HorizontalPodAutoscaler{}). - Owns(&policyV1.PodDisruptionBudget{}) + Owns(&appsv1.StatefulSet{}) return builder.Complete(r) } diff --git a/helm/templates/operator-clusterrole.yaml b/helm/templates/operator-clusterrole.yaml index 8daa78490..8e3800af2 100644 --- a/helm/templates/operator-clusterrole.yaml +++ b/helm/templates/operator-clusterrole.yaml @@ -24,6 +24,9 @@ rules: - apiGroups: [ "apps" ] resources: [ "deployments" ] verbs: [ "create","delete","get","list","patch","update","watch" ] +- apiGroups: [ "apps" ] + resources: [ "statefulsets" ] + verbs: [ "create","delete","get","list","patch","update","watch" ] - apiGroups: [ "apps" ] resources: [ "replicasets" ] verbs: [ "get","list","watch" ] diff --git a/internal/manifests/collector/adapters/config_from.go b/internal/manifests/collector/adapters/config_from.go index 5435e3dea..144317ce8 100644 --- a/internal/manifests/collector/adapters/config_from.go +++ b/internal/manifests/collector/adapters/config_from.go @@ -7,6 +7,7 @@ package adapters import ( "encoding/json" "errors" + "gopkg.in/yaml.v2" ) diff --git a/internal/manifests/collector/config_replace.go b/internal/manifests/collector/config_replace.go index 53201e171..e11d2e170 100644 --- a/internal/manifests/collector/config_replace.go +++ b/internal/manifests/collector/config_replace.go @@ -4,20 +4,21 @@ package collector import ( + "encoding/json" + _ "github.com/prometheus/prometheus/discovery/install" // Package install has the side-effect of registering all builtin. - "gopkg.in/yaml.v2" "github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1" "github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters" ) func ReplaceConfig(instance v1alpha1.AmazonCloudWatchAgent) (string, error) { - config, err := adapters.ConfigFromString(instance.Spec.Config) + config, err := adapters.ConfigFromJSONString(instance.Spec.Config) if err != nil { return "", err } - out, err := yaml.Marshal(config) + out, err := json.Marshal(config) if err != nil { return "", err } diff --git a/internal/manifests/collector/container_test.go b/internal/manifests/collector/container_test.go index 83390a704..c6afebdef 100644 --- a/internal/manifests/collector/container_test.go +++ b/internal/manifests/collector/container_test.go @@ -1,11 +1,15 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + package collector import ( - "github.com/stretchr/testify/assert" - corev1 "k8s.io/api/core/v1" "os" "strings" "testing" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" ) func TestStatsDGetContainerPorts(t *testing.T) { diff --git a/internal/manifests/collector/suite_test.go b/internal/manifests/collector/suite_test.go index 7ad9edc43..ce09029f4 100644 --- a/internal/manifests/collector/suite_test.go +++ b/internal/manifests/collector/suite_test.go @@ -25,7 +25,7 @@ var ( ) const ( - defaultCollectorImage = "default-collector" + defaultCollectorImage = "default-collector" ) func deploymentParams() manifests.Params { diff --git a/main.go b/main.go index b3ff59509..a9703078d 100644 --- a/main.go +++ b/main.go @@ -86,7 +86,7 @@ func main() { metricsAddr string probeAddr string pprofAddr string - collectorImage string + agentImage string autoInstrumentationJava string webhookPort int tlsOpt tlsConfig @@ -95,7 +95,7 @@ func main() { pflag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") pflag.StringVar(&probeAddr, "health-probe-addr", ":8081", "The address the probe endpoint binds to.") pflag.StringVar(&pprofAddr, "pprof-addr", "", "The address to expose the pprof server. Default is empty string which disables the pprof server.") - stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default CloudWatch Agent image. This image is used when no image is specified in the CustomResource.") + stringFlagOrEnv(&agentImage, "agent-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("%s:%s", cloudwatchAgentImageRepository, v.AmazonCloudWatchAgent), "The default CloudWatch Agent image. This image is used when no image is specified in the CustomResource.") stringFlagOrEnv(&autoInstrumentationJava, "auto-instrumentation-java-image", "RELATED_IMAGE_AUTO_INSTRUMENTATION_JAVA", fmt.Sprintf("%s:%s", autoInstrumentationJavaImageRepository, v.AutoInstrumentationJava), "The default OpenTelemetry Java instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.Parse() @@ -107,7 +107,7 @@ func main() { logger.Info("Starting the Amazon CloudWatch Agent Operator", "amazon-cloudwatch-agent-operator", v.Operator, - "cloudwatch-agent", collectorImage, + "cloudwatch-agent", agentImage, "auto-instrumentation-java", autoInstrumentationJava, "build-date", v.BuildDate, "go-version", v.Go, @@ -118,7 +118,7 @@ func main() { cfg := config.New( config.WithLogger(ctrl.Log.WithName("config")), config.WithVersion(v), - config.WithCollectorImage(collectorImage), + config.WithCollectorImage(agentImage), config.WithAutoInstrumentationJavaImage(autoInstrumentationJava), )